[FFmpeg-cvslog] vp9: ignore frame_context_index field in key-/intraonly-frames.

Ronald S. Bultje git at videolan.org
Sun Apr 17 15:46:51 CEST 2016


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Sun Apr 17 09:28:56 2016 -0400| [ee729cc0ed0bdc6d9029ccd21c76bdde09519b45] | committer: Ronald S. Bultje

vp9: ignore frame_context_index field in key-/intraonly-frames.

Reproduces a bug to remain consistent with libvpx' behaviour.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee729cc0ed0bdc6d9029ccd21c76bdde09519b45
---

 libavcodec/vp9.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 5c6f176..cb2a4a2 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -642,6 +642,8 @@ static int decode_frame_header(AVCodecContext *ctx,
     s->s.h.refreshctx   = s->s.h.errorres ? 0 : get_bits1(&s->gb);
     s->s.h.parallelmode = s->s.h.errorres ? 1 : get_bits1(&s->gb);
     s->s.h.framectxid   = c = get_bits(&s->gb, 2);
+    if (s->s.h.keyframe || s->s.h.intraonly)
+        s->s.h.framectxid = 0; // BUG: libvpx ignores this field in keyframes
 
     /* loopfilter header data */
     if (s->s.h.keyframe || s->s.h.errorres || s->s.h.intraonly) {



More information about the ffmpeg-cvslog mailing list