On 28/11/16 23:54, Mark Thompson wrote:
> ...
> +    if (!(ctx->va_rc_mode & VA_RC_CQP)) {
> +        unsigned int num, den;
> +        // Framerate isn't supplied inside the parameter structures,
> +        // so we need to have supply it separately here.  VAAPI
> +        // specifies that this can be fractional, but that isn't
> +        // actually implemented in the i965 driver so just give it
> +        // the best integer we can make here.
> +        if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
> +            num = avctx->framerate.num;
> +            den = avctx->framerate.den;
> +        } else {
> +            num = avctx->time_base.den;
> +            den = avctx->time_base.num;
> +        }
> +        if (num < den)
> +            num = den;
> +
> +        priv->fr_params.misc.type = VAEncMiscParameterTypeFrameRate;
> +        priv->fr_params.fr.framerate = num / den;
> +
> +        ctx->global_params[ctx->nb_global_params] =
> +            &priv->fr_params.misc;
> +        ctx->global_params_size[ctx->nb_global_params++] =
> +            sizeof(priv->fr_params);
> +    }
> ...
On 29/11/16 22:51, Mark Thompson wrote:
> This is required by both the VP8 and VP9 encoders and is harmless to
> others, so add it to the common code.
> ---
> The VP9 encoder just loses the appropriate fragment, with no other change 
> (not resent here).
> 
> 
>  libavcodec/vaapi_encode.c | 25 +++++++++++++++++++++++++
>  libavcodec/vaapi_encode.h |  4 ++++
>  2 files changed, 29 insertions(+)

I'm trying to fix this framerate stuff in the i965 driver 
<https://lists.freedesktop.org/archives/libva/2016-December/004970.html>, at 
which point the setting will all be in the generic code.

VP8/9 on hold until that is resolved.

- Mark
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to