[FFmpeg-devel] [PATCH 02/18] avcodec/vp8: Disable lf_delta for VP7

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


It is a VP8-only feature.

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

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index c00c5c975e..04a2113cc8 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -637,7 +637,6 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
         for (i = 0; i < 2; i++)
             memcpy(s->prob->mvc[i], vp7_mv_default_prob[i],
                    sizeof(vp7_mv_default_prob[i]));
-        memset(&s->lf_delta, 0, sizeof(s->lf_delta));
         memcpy(s->prob[0].scan, ff_zigzag_scan, sizeof(s->prob[0].scan));
     }
 
@@ -2171,7 +2170,7 @@ void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb,
     } else
         filter_level = s->filter.level;
 
-    if (s->lf_delta.enabled) {
+    if (!is_vp7 && s->lf_delta.enabled) {
         filter_level += s->lf_delta.ref[mb->ref_frame];
         filter_level += s->lf_delta.mode[mb->mode];
     }
-- 
2.34.1



More information about the ffmpeg-devel mailing list