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

James Almer git at videolan.org
Wed Aug 26 00:47:29 EEST 2020


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Aug 23 20:45:12 2020 -0300| [98f7e0081b998d0a31bda2a3214856435e321850] | committer: James Almer

avcodec/cbs_av1: fix setting FrameWidth in frame_size_with_refs()

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 ] ]
like we're currently doing.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=98f7e0081b998d0a31bda2a3214856435e321850
---

 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 a492b02792..19b82bc3f8 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;



More information about the ffmpeg-cvslog mailing list