[Libva] [Libva-intel-driver][PATCH v2 18/18] Add support for VAConfigAttribEncRateControlExt attribute
Xiang, Haihao
haihao.xiang at intel.com
Thu Sep 8 14:45:05 UTC 2016
Currently bit rate control per temporal layer is disabled
v2: rebased
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 1a3a6b9..3a7c8fb 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1076,6 +1076,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