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

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Sep 10 04:07:23 EEST 2022


Always one.

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

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];
-- 
2.34.1



More information about the ffmpeg-devel mailing list