[Libva] [Libva-intel-driver][PATCH 18/18] Add support for VAConfigAttribEncRateControlExt attribute
Xiang, Haihao
haihao.xiang at intel.com
Tue Sep 6 15:46:05 UTC 2016
Currently bit rate control per temporal layer is disabled
Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
src/i965_drv_video.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 3be7f6a..664a19a 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1068,6 +1068,21 @@ i965_GetConfigAttributes(VADriverContextP ctx,
break;
+ case VAConfigAttribEncRateControlExt:
+ if ((profile == VAProfileH264ConstrainedBaseline ||
+ profile == VAProfileH264Main ||
+ profile == VAProfileH264High) &&
+ entrypoint == VAEntrypointEncSlice) {
+ VAConfigAttribValEncRateControlExt *val_config = (VAConfigAttribValEncRateControlExt *)&(attrib_list[i].value);
+
+ val_config->bits.max_num_temporal_layers_minus1 = MAX_TEMPORAL_LAYERS - 1;
+ val_config->bits.temporal_layer_bitrate_control_flag = 1;
+ } else {
+ attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
+ }
+
+ break;
+
default:
/* Do nothing */
attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
--
1.9.1
More information about the Libva
mailing list