Re: [libav-devel] Fix for FFMPEG vp8dec loopfilter delta values reset at keyframes
Hi, please find attached a stream for reproducing this issue. It's CIF resolution 8 frames high QP, with pics=5 and 7 having multiple occurences of the issue. Br, Sami On Fri, Oct 12, 2012 at 5:20 PM, Ronald Bultje rbul...@google.com wrote: Hi Sami, On Fri, Oct 12, 2012 at 3:42 AM, Sami Pietilä samipiet...@google.com wrote: 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. Br, 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 buf_size) memcpy(s-prob-pred8x8c , vp8_pred8x8c_prob_inter , sizeof(s-prob-pred8x8c)); memcpy(s-prob-mvc , vp8_mv_default_prob , sizeof(s-prob-mvc)); memset(s-segmentation, 0, sizeof(s-segmentation)); +memset(s-lf_delta, 0, sizeof(s-lf_delta)); } Nice catch, thanks for noticing. I've applied it upstream (will flow to ffmpeg-devel in a few hours), and I'll update Chrome's tree ASAP. As Luca said on libav-devel, a test vector would be nice for archiving/regression testing purposes if it's not too much of a hassle. Ronald lf_delta_keyframe_reset.ivf Description: Binary data ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] Fix for FFMPEG vp8dec loopfilter delta values reset at keyframes
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. Br, 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 buf_size) memcpy(s-prob-pred8x8c , vp8_pred8x8c_prob_inter , sizeof(s-prob-pred8x8c)); memcpy(s-prob-mvc , vp8_mv_default_prob , sizeof(s-prob-mvc)); 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); ffmpeg_vp8dec_lf_delta_keyframe.patch Description: Binary data ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] Fix for FFMPEG vp8dec loopfilter delta values reset at keyframes
On 10/12/2012 12:42 PM, Sami Pietilä wrote: 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. Would be nice to have a small vector to add it to fate, indeed. The patch itself looks like that this specific detail hadn't been considered, while implementing it. If you can point me where in the specification it is stated I'd like to point it in the commit message. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] Fix for FFMPEG vp8dec loopfilter delta values reset at keyframes
Hi, On Fri, Oct 12, 2012 at 7:12 AM, Luca Barbato lu_z...@gentoo.org wrote: On 10/12/2012 12:42 PM, Sami Pietilä wrote: 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. Would be nice to have a small vector to add it to fate, indeed. The patch itself looks like that this specific detail hadn't been considered, while implementing it. If you can point me where in the specification it is stated I'd like to point it in the commit message. It's only natural for all codec state to be reset in a keyframe. It is supposed to be a re-entry point where all values are reset to defaults. The patch itself is LGTM, I was about to push it myself just now. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] Fix for FFMPEG vp8dec loopfilter delta values reset at keyframes
On 10/12/2012 04:15 PM, Ronald S. Bultje wrote: If you can point me where in the specification it is stated I'd like to point it in the commit message. It's only natural for all codec state to be reset in a keyframe. It is supposed to be a re-entry point where all values are reset to defaults. The patch itself is LGTM, I was about to push it myself just now. Please do =) ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] Fix for FFMPEG vp8dec loopfilter delta values reset at keyframes
Hi Sami, On Fri, Oct 12, 2012 at 3:42 AM, Sami Pietilä samipiet...@google.com wrote: 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. Br, 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 buf_size) memcpy(s-prob-pred8x8c , vp8_pred8x8c_prob_inter , sizeof(s-prob-pred8x8c)); memcpy(s-prob-mvc , vp8_mv_default_prob , sizeof(s-prob-mvc)); memset(s-segmentation, 0, sizeof(s-segmentation)); +memset(s-lf_delta, 0, sizeof(s-lf_delta)); } Nice catch, thanks for noticing. I've applied it upstream (will flow to ffmpeg-devel in a few hours), and I'll update Chrome's tree ASAP. As Luca said on libav-devel, a test vector would be nice for archiving/regression testing purposes if it's not too much of a hassle. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] Fix for FFMPEG vp8dec loopfilter delta values reset at keyframes
Hi, On Fri, Oct 12, 2012 at 7:18 AM, Luca Barbato lu_z...@gentoo.org wrote: On 10/12/2012 04:15 PM, Ronald S. Bultje wrote: If you can point me where in the specification it is stated I'd like to point it in the commit message. It's only natural for all codec state to be reset in a keyframe. It is supposed to be a re-entry point where all values are reset to defaults. The patch itself is LGTM, I was about to push it myself just now. Please do =) Pushed. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel