Skip to content

Commit 00668f9

Browse files
committed
encode segmentation map refine
Signed-off-by: Yao, Leyu <leyu.yao@intel.com>
1 parent b4870fd commit 00668f9

File tree

4 files changed

+47
-2
lines changed

4 files changed

+47
-2
lines changed

va/va.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,14 @@ typedef enum {
10361036
* The value returned uses the VAConfigAttribValEncPerBlockControl type.
10371037
*/
10381038
VAConfigAttribEncPerBlockControl = 55,
1039+
/**
1040+
* \brief VP9 encoding attribute. Read-only.
1041+
*
1042+
* This attribute exposes a number of capabilities of the underlying
1043+
* VP9 implementation. The attribute value is partitioned into fields as defined in the
1044+
* VAConfigAttribValEncVP9 union.
1045+
*/
1046+
VAConfigAttribEncVP9 = 56,
10391047
/**@}*/
10401048
VAConfigAttribTypeMax
10411049
} VAConfigAttribType;

va/va_enc_av1.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,8 @@ typedef struct _VAEncPictureParameterBufferAV1 {
666666
* 0: 16x16 block size, default value;
667667
* 1: 32x32 block size;
668668
* 2: 64x64 block size;
669-
* 3: 8x8 block size.
669+
* 3: 8x8 block size;
670+
* 4: 4x4 block size.
670671
*/
671672
uint8_t seg_id_block_size;
672673

va/va_enc_vp9.h

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,19 @@ typedef struct _VAEncPictureParameterBufferVP9 {
507507
*/
508508
uint32_t skip_frames_size;
509509

510+
/** \brief Block size for each Segment ID in Segment Map.
511+
* This specify the granularity of media driver of reading and processing the segment map.
512+
* 0: 16x16 block size, default value;
513+
* 1: 32x32 block size;
514+
* 2: 64x64 block size;
515+
* 3: 8x8 block size.
516+
*/
517+
uint8_t seg_id_block_size;
518+
519+
uint8_t va_reserved8[3];
520+
510521
/** \brief Reserved bytes for future use, must be zero */
511-
uint32_t va_reserved[VA_PADDING_MEDIUM];
522+
uint32_t va_reserved[7];
512523
} VAEncPictureParameterBufferVP9;
513524

514525

@@ -594,6 +605,30 @@ typedef struct _VAEncMiscParameterTypeVP9PerSegmantParam {
594605
*/
595606

596607

608+
/** \brief Attribute value for VAConfigAttribEncVP9. */
609+
typedef union _VAConfigAttribValEncVP9 {
610+
struct {
611+
/**
612+
* \brief Min segmentId block size accepted.
613+
* This is the granularity of segmentation map.
614+
*/
615+
uint32_t min_segid_block_size_accepted : 8;
616+
617+
/**
618+
* \brief Type of segment feature supported.
619+
* (segment_feature_support & 0x01) == 1: SEG_LVL_ALT_Q is supported, 0: not.
620+
* (segment_feature_support & 0x02) == 1: SEG_LVL_ALT_L is supported, 0: not.
621+
* (segment_feature_support & 0x04) == 1: SEG_LVL_REF_FRAME is supported, 0: not.
622+
* (segment_feature_support & 0x08) == 1: SEG_LVL_SKIP is supported, 0: not.
623+
*/
624+
uint32_t segment_feature_support : 4;
625+
626+
/** \brief Reserved bits for future, must be zero. */
627+
uint32_t reserved : 20;
628+
} bits;
629+
uint32_t value;
630+
} VAConfigAttribValEncVP9;
631+
597632
/**@}*/
598633

599634
#ifdef __cplusplus

va/va_str.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType)
149149
TOSTR(VAConfigAttribEncAV1Ext1);
150150
TOSTR(VAConfigAttribEncAV1Ext2);
151151
TOSTR(VAConfigAttribEncPerBlockControl);
152+
TOSTR(VAConfigAttribEncVP9);
152153
case VAConfigAttribTypeMax:
153154
break;
154155
}

0 commit comments

Comments
 (0)