[FFmpeg-cvslog] vp9: fix intraonly frame decoding.
Ronald S. Bultje
git at videolan.org
Fri Apr 24 17:11:19 CEST 2015
ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed Apr 22 20:57:15 2015 -0400| [640d878bc161a3fb5a85d26a5cca13fc414bbe9c] | committer: Michael Niedermayer
vp9: fix intraonly frame decoding.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=640d878bc161a3fb5a85d26a5cca13fc414bbe9c
---
libavcodec/vp9.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 1935f94..1310798 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -3111,8 +3111,8 @@ static void decode_sb(AVCodecContext *ctx, int row, int col, struct VP9Filter *l
VP9Context *s = ctx->priv_data;
int c = ((s->above_partition_ctx[col] >> (3 - bl)) & 1) |
(((s->left_partition_ctx[row & 0x7] >> (3 - bl)) & 1) << 1);
- const uint8_t *p = s->keyframe ? vp9_default_kf_partition_probs[bl][c] :
- s->prob.p.partition[bl][c];
+ const uint8_t *p = s->keyframe || s->intraonly ? vp9_default_kf_partition_probs[bl][c] :
+ s->prob.p.partition[bl][c];
enum BlockPartition bp;
ptrdiff_t hbs = 4 >> bl;
AVFrame *f = s->frames[CUR_FRAME].tf.f;
@@ -3791,7 +3791,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
return res;
f = s->frames[CUR_FRAME].tf.f;
f->key_frame = s->keyframe;
- f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
+ f->pict_type = (s->keyframe || s->intraonly) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
ls_y = f->linesize[0];
ls_uv =f->linesize[1];
@@ -3801,7 +3801,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
ff_thread_release_buffer(ctx, &s->next_refs[i]);
if (s->refreshrefmask & (1 << i)) {
res = ff_thread_ref_frame(&s->next_refs[i], &s->frames[CUR_FRAME].tf);
- } else {
+ } else if (s->refs[i].f->data[0]) {
res = ff_thread_ref_frame(&s->next_refs[i], &s->refs[i]);
}
if (res < 0)
More information about the ffmpeg-cvslog
mailing list