diff mbox series

[FFmpeg-devel,12/18] avcodec/vp8: Inline update_last for VP7

Message ID AS8P250MB074458E0A135A8F5CD2F557B8F429@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,01/18] avcodec/vp8: Disable segmentation for VP7 | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 10, 2022, 1:07 a.m. UTC
Always one.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vp8.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index ee30fc2846..1f0deddb1a 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -2678,7 +2678,7 @@  int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame,
 
     prev_frame = s->framep[VP8_FRAME_CURRENT];
 
-    referenced = s->update_last || s->update_golden == VP8_FRAME_CURRENT ||
+    referenced = is_vp7 || s->update_last || s->update_golden == VP8_FRAME_CURRENT ||
                  s->update_altref == VP8_FRAME_CURRENT;
 
     skip_thresh = !referenced ? AVDISCARD_NONREF
@@ -2740,7 +2740,7 @@  int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame,
     else
         s->next_framep[VP8_FRAME_GOLDEN] = s->framep[VP8_FRAME_GOLDEN];
 
-    if (s->update_last)
+    if (is_vp7 || s->update_last)
         s->next_framep[VP8_FRAME_PREVIOUS] = curframe;
     else
         s->next_framep[VP8_FRAME_PREVIOUS] = s->framep[VP8_FRAME_PREVIOUS];