diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2015-09-02 12:20:29 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2015-09-04 09:33:44 -0400 |
commit | 8d25a11dc79c11880e0f03722344dddd95a90f43 (patch) | |
tree | 161dcefe9002805dd050ca43968c7a538354e94a | |
parent | cc9d3a3e369667c2c24fe4adc9f6a9362df8de81 (diff) | |
download | ffmpeg-8d25a11dc79c11880e0f03722344dddd95a90f43.tar.gz |
vp9: use resetctx in the same way as libvpx.
-rw-r--r-- | libavcodec/vp9.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index b986c1e10f..c80468601c 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -856,7 +856,7 @@ static int decode_frame_header(AVCodecContext *ctx, } } - if (s->keyframe || s->errorres || s->intraonly) { + if (s->keyframe || s->errorres || (s->intraonly && s->resetctx == 3)) { s->prob_ctx[0].p = s->prob_ctx[1].p = s->prob_ctx[2].p = s->prob_ctx[3].p = vp9_default_probs; memcpy(s->prob_ctx[0].coef, vp9_default_coef_probs, @@ -867,6 +867,10 @@ static int decode_frame_header(AVCodecContext *ctx, sizeof(vp9_default_coef_probs)); memcpy(s->prob_ctx[3].coef, vp9_default_coef_probs, sizeof(vp9_default_coef_probs)); + } else if (s->intraonly && s->resetctx == 2) { + s->prob_ctx[c].p = vp9_default_probs; + memcpy(s->prob_ctx[c].coef, vp9_default_coef_probs, + sizeof(vp9_default_coef_probs)); } // next 16 bits is size of the rest of the header (arith-coded) |