[FFmpeg-devel] [PATCH] avcodec/cbs_av1: fix setting FrameWidth in frame_size_with_refs()

James Almer jamrial at gmail.com
Tue Aug 25 21:26:29 EEST 2020


On 8/23/2020 8:47 PM, James Almer wrote:
> Section 5.9.7 of the spec states
> 
>     UpscaledWidth = RefUpscaledWidth[ ref_frame_idx[ i ] ]
>     FrameWidth    = UpscaledWidth
>     FrameHeight   = RefFrameHeight[ ref_frame_idx[ i ] ]
>     RenderWidth   = RefRenderWidth[ ref_frame_idx[ i ] ]
>     RenderHeight  = RefRenderHeight[ ref_frame_idx[ i ] ]
> 
> Meaning FrameWidth must not be set to RefFrameWidth[ ref_frame_idx[ i ] ]
> as we're currently doing.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavcodec/cbs_av1_syntax_template.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
> index dedd549572..d6b79dacd3 100644
> --- a/libavcodec/cbs_av1_syntax_template.c
> +++ b/libavcodec/cbs_av1_syntax_template.c
> @@ -553,7 +553,7 @@ static int FUNC(frame_size_with_refs)(CodedBitstreamContext *ctx, RWContext *rw,
>              infer(render_height_minus_1, ref->render_height - 1);
>  
>              priv->upscaled_width = ref->upscaled_width;
> -            priv->frame_width    = ref->frame_width;
> +            priv->frame_width    = priv->upscaled_width;
>              priv->frame_height   = ref->frame_height;
>              priv->render_width   = ref->render_width;
>              priv->render_height  = ref->render_height;
> 

Will apply soon.


More information about the ffmpeg-devel mailing list