hardware/intel/libva
リビジョン | c0af733a147306b4e79354174dc1be56de7dfeb7 (tree) |
---|---|
日時 | 2014-09-08 00:14:42 |
作者 | Jonathan Bian <jonathan.bian@inte...> |
コミッター | Xiang, Haihao |
Added VAConfigEncQualityRange attribute and VAEncMiscParameterBufferQualityLevel to support encoder quality settings.
(cherry picked from commit 24a14f9d13e6fe0c25d4094c4884aa4076ed05bc)
Conflicts:
va/va.h
@@ -386,6 +386,15 @@ typedef enum | ||
386 | 386 | * through VAEncSliceParameterBufferH264::macroblock_info. |
387 | 387 | */ |
388 | 388 | VAConfigAttribEncMacroblockInfo = 16, |
389 | + /** | |
390 | + * \brief Encoding quality range attribute. Read-only. | |
391 | + * | |
392 | + * This attribute conveys whether the driver supports different quality level settings | |
393 | + * for encoding. A value less than or equal to 1 means that the encoder only has a single | |
394 | + * quality setting, and a value greater than 1 represents the number of quality levels | |
395 | + * that can be configured. e.g. a value of 2 means there are two distinct quality levels. | |
396 | + */ | |
397 | + VAConfigAttribEncQualityRange = 21, | |
389 | 398 | /**@}*/ |
390 | 399 | VAConfigAttribTypeMax |
391 | 400 | } VAConfigAttribType; |
@@ -939,6 +948,7 @@ typedef enum | ||
939 | 948 | VAEncMiscParameterTypeMaxFrameSize = 4, |
940 | 949 | /** \brief Buffer type used for HRD parameters. */ |
941 | 950 | VAEncMiscParameterTypeHRD = 5, |
951 | + VAEncMiscParameterTypeQualityLevel = 6, | |
942 | 952 | } VAEncMiscParameterType; |
943 | 953 | |
944 | 954 | /** \brief Packed header type. */ |
@@ -1071,6 +1081,22 @@ typedef struct _VAEncMiscParameterBufferMaxFrameSize { | ||
1071 | 1081 | } VAEncMiscParameterBufferMaxFrameSize; |
1072 | 1082 | |
1073 | 1083 | /** |
1084 | + * \brief Encoding quality level. | |
1085 | + * | |
1086 | + * The encoding quality could be set through this structure, if the implementation | |
1087 | + * supports multiple quality levels. The quality level set through this structure is | |
1088 | + * persistent over the entire coded sequence, or until a new structure is being sent. | |
1089 | + * The quality level range can be queried through the VAConfigAttribEncQualityRange | |
1090 | + * attribute. A lower value means higher quality, and a value of 1 represents the highest | |
1091 | + * quality. The quality level setting is used as a trade-off between quality and speed/power | |
1092 | + * consumption, with higher quality corresponds to lower speed and higher power consumption. | |
1093 | + */ | |
1094 | +typedef struct _VAEncMiscParameterBufferQualityLevel { | |
1095 | + /** \brief Encoding quality level setting. */ | |
1096 | + unsigned int quality_level; | |
1097 | +} VAEncMiscParameterBufferQualityLevel; | |
1098 | + | |
1099 | +/* | |
1074 | 1100 | * There will be cases where the bitstream buffer will not have enough room to hold |
1075 | 1101 | * the data for the entire slice, and the following flags will be used in the slice |
1076 | 1102 | * parameter to signal to the server for the possible cases. |