[Libva] [Libva-intel-driver][PATCH 18/18] Add support for VAConfigAttribEncRateControlExt attribute

Zhao Yakui yakui.zhao at intel.com
Wed Sep 7 05:38:57 UTC 2016


On 09/06/2016 11:46 PM, Xiang, Haihao wrote:
> Currently bit rate control per temporal layer is disabled

This looks good to me.

Add: Reviewed-by: Zhao Yakui <yakui.zhao at intel.com>

Thanks
>
> 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;



More information about the Libva mailing list