]> git.sesse.net Git - ffmpeg/commitdiff
vp9: enable multi-thread decoding when refreshctx is equal to 0
authorDi Wu <di1028.wu@samsung.com>
Sat, 11 Oct 2014 17:20:18 +0000 (01:20 +0800)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Fri, 10 Oct 2014 12:13:44 +0000 (09:13 -0300)
In vp9_decode_frame function, ff_thread_finish_setup is not called
when refreshctx is equal to 0, and the next decoding thread can not
start work until the cunrrent frame has been decoded completely. So
ff_thread_finish_setup needs to be called to enable Multi-thread
decoding in this condition.

Signed-off-by: Di Wu <di1028.wu@samsung.com>
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
libavcodec/vp9.c

index 76fd37248b40b71b7cd5ab6bdb4e4536973916ae..7b7deb3aa6fc82fd110e1e30bb7e968e551a431e 100644 (file)
@@ -3826,6 +3826,8 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
         }
         s->prob_ctx[s->framectxid].p = s->prob.p;
         ff_thread_finish_setup(ctx);
+    } else if (!s->refreshctx) {
+        ff_thread_finish_setup(ctx);
     }
 
     do {