Hi, On Thu, Oct 9, 2014 at 3:41 PM, <di1028...@samsung.com> wrote:
> From: Di Wu <di1028...@samsung.com> > > Multi-thread decoding doesn't work when refreshctx is equal to 0. Fix > it by call ff_thread_finish_setup function in the condition when > refreshctx is equal to 0. > > In vp9_decode_frame function, ff_thread_finish_setup is not called > when refreshctx is equal to 0. The next decoding thread can not > start work until the cunrrent frame has been decoded completely. So > multi-thread decoding in frame level is not enabled when refreshctx > is equal to 0. > > Signed-off-by: Di Wu <di1028...@samsung.com> > --- > libavcodec/vp9.c | 3 +++ > 1 file changed, 3 insertions(+) > mode change 100644 => 100755 libavcodec/vp9.c > > diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c > old mode 100644 > new mode 100755 > index 31725e6..364b36a > --- a/libavcodec/vp9.c > +++ b/libavcodec/vp9.c > @@ -3799,6 +3799,9 @@ static int vp9_decode_frame(AVCodecContext *ctx, > void *frame, > "Failed to allocate block buffers\n"); > return res; > } > + if (!s->refreshctx){ > + ff_thread_finish_setup(ctx); > + } > if (s->refreshctx && s->parallelmode) { I think functionally this looks OK, thanks for finding it. Please do follow Reynaldo's suggestions on style/cosmetics. I'd go as far as to change the second if into an else if, since they do related stuff, but I don't mind either way. Ronald _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel