[FFmpeg-devel] Fix for FFMPEG vp8dec loopfilter delta values reset at keyframes

Sami Pietilä samipietila at google.com
Fri Oct 12 12:42:09 CEST 2012

Hi all,

while testing a VP8 encoder I found a mismatch between FFMPEG and libvpx
VP8 decoders. The reason for this mismatch is that FFMPEG doesn't reset
loopfilter delta values at keyframes. Patch that fixes the issue is below.
I've verified that the output of ffmpeg after this patch matches libvpx. If
you need I can send you a stream that shows the issue.

Sami Pietila

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 3f07b90..0bb5495 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -353,6 +353,7 @@ static int decode_frame_header(VP8Context *s, const
uint8_t *buf, int
         memcpy(s->prob->pred8x8c , vp8_pred8x8c_prob_inter ,
         memcpy(s->prob->mvc      , vp8_mv_default_prob     ,
         memset(&s->segmentation, 0, sizeof(s->segmentation));
+        memset(&s->lf_delta, 0, sizeof(s->lf_delta));

     ff_vp56_init_range_decoder(c, buf, header_size);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg_vp8dec_lf_delta_keyframe.patch
Type: application/octet-stream
Size: 580 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121012/3df74836/attachment.obj>

More information about the ffmpeg-devel mailing list