Skip to content

Commit

Permalink
Add config attribute to advertise HEVC encoder features
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Thompson <[email protected]>
  • Loading branch information
fhvwy committed Mar 5, 2020
1 parent 0d2bb49 commit 92162e8
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
64 changes: 64 additions & 0 deletions va/va.h
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,12 @@ typedef enum
* implementation, multiple frames encode/decode can improve HW concurrency
*/
VAConfigAttribMultipleFrame = 40,
/** \brief HEVC/H.265 encoding features attribute. Read-only.
*
* This attribute describes the supported block sizes and features of
* an HEVC/H.265 encoder config.
*/
VAConfigAttribEncHEVCFeatures = 41,
/**@}*/
VAConfigAttribTypeMax
} VAConfigAttribType;
Expand Down Expand Up @@ -1141,6 +1147,64 @@ typedef union _VAConfigAttribValMultipleFrame {
/** \brief Driver supports decode processing rate report */
#define VA_PROCESSING_RATE_DECODE 0x00000002
/**@}*/

/** \brief Attribute value for VAConfigAttribEncHEVCFeatures. */
typedef union VAConfigAttribValEncHEVCFeatures {
struct {
/** separate_colour_plane_flag may be set. */
uint32_t separate_colour_plane_supported : 1;
/** scaling_list_enabled_flag may be set. */
uint32_t scaling_list_supported : 1;
/** amp_enabled_flag may be set. */
uint32_t amp_supported : 1;
/** sample_adaptive_offset_enabled_flag may be set. */
uint32_t sao_supported : 1;
/** slice_temporal_mvp_enabled_flag may be set. */
uint32_t temporal_mvp_supported : 1;
/** pcm_enabled_flag may be set. */
uint32_t pcm_supported : 1;
/** strong_intra_smoothing_enabled_flag may be set. */
uint32_t strong_intra_smoothing_supported : 1;
/** sign_data_hiding_enable_flag may be set. */
uint32_t sign_data_hiding_supported : 1;
/** transform_skip_enabled_flag may be set. */
uint32_t transform_skip_supported : 1;
/** weighted_pred_flag and weighted_bipred_flag may be set. */
uint32_t weighted_prediction_supported : 1;
/** transquant_bypass_enabled_flag may be set. */
uint32_t transquant_bypass_supported : 1;

/** Maximum supported size of coding tree blocks. */
uint32_t log2_max_coding_tree_block_size_minus3 : 2;
/** Minimum supported size of coding tree blocks.
*
* This may be the same as the maximum size, indicating that only
* one CTB size is supported.
*/
uint32_t log2_min_coding_tree_block_size_minus3 : 2;

/** Minimum supported size of luma coding blocks.
*
* The maximum supported size is already set by the CTB size.
*/
uint32_t log2_min_luma_coding_block_size_minus3 : 2;

/** Maximum supported size of luma transform blocks. */
uint32_t log2_max_luma_transform_block_size_minus2 : 2;
/** Minimum supported size of luma transform blocks. */
uint32_t log2_min_luma_transform_block_size_minus2 : 2;

/** Maximum supported transform hierarchy depth for inter blocks. */
uint32_t max_transform_hierarchy_depth_inter : 2;
/** Maximum supported transform hierarchy depth for intra blocks. */
uint32_t max_transform_hierarchy_depth_intra : 2;

/** Minimum supported block size containing a QP delta. */
uint32_t min_cu_qp_delta_block_size_minus3 : 2;
} bits;
uint32_t value;
} VAConfigAttribValEncHEVCFeatures;

/**
* if an attribute is not applicable for a given
* profile/entrypoint pair, then set the value to the following
Expand Down
1 change: 1 addition & 0 deletions va/va_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType)
TOSTR(VAConfigAttribMaxFrameSize);
TOSTR(VAConfigAttribPredictionDirection);
TOSTR(VAConfigAttribMultipleFrame);
TOSTR(VAConfigAttribEncHEVCFeatures);
case VAConfigAttribTypeMax: break;
}
return "<unknown config attribute type>";
Expand Down

0 comments on commit 92162e8

Please sign in to comment.