vlc | branch: master | Janne Grunau <[email protected]> | Wed Mar 27 17:05:44 2013 +0100| [7ecd714b5c53514154cfd4668d55a36434794ae1] | committer: Jean-Baptiste Kempf
avcodec: hw accel with frame multithreading works since libavcodec 55.01.00 On 2013-03-27 12:05:00 +0100, Jean-Baptiste Kempf wrote: > On 27 Mar, Janne Grunau wrote : > > On 2013-03-27 08:43:47 +0100, Rémi Denis-Courmont wrote: > > > On Tue, 26 Mar 2013 20:25:00 +0100, Janne Grunau <[email protected]> > > > wrote: > > > > diff --git a/modules/codec/avcodec/video.c > > > b/modules/codec/avcodec/video.c > > > > index 7697ef9..7bcae64 100644 > > > > --- a/modules/codec/avcodec/video.c > > > > +++ b/modules/codec/avcodec/video.c > > > > @@ -342,7 +342,8 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext > > > > *p_context, > > > > i_codec_id == AV_CODEC_ID_VC1 || i_codec_id == > > > AV_CODEC_ID_WMV3) > > > > ) > > > > { > > > > #ifdef HAVE_AVCODEC_MT > > > > - if( p_sys->p_context->thread_type & FF_THREAD_FRAME ) > > > > + if( p_sys->p_context->thread_type & FF_THREAD_FRAME && > > > > + LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 1, 0)) > > > > > > Why not use the preprocessor instead? > > > > no reason. just libav's style to handle it this way and rely on the > > compiler's dead code elimination. I can resubmit with the code enclosed > > in #if/#endif if you prefer that. > > > > Seeing that the ifdef HAVE_AVCODEC_MT is just above, it would make more > sense to merge them done. mpeg2 decoding is busted with both vdpau and vaapi right now. The Error doesn't differ between single and multi-threaded so I assume it's unrelated. I'll investigate and fix it. Janne ---8<--- This is mostly useful if the hw accelerator cannot handle the stream. The software decoder fallback will then use frame multithreading if it supports it. Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ecd714b5c53514154cfd4668d55a36434794ae1 --- modules/codec/avcodec/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index d8ce8a2..2b87f35 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -341,7 +341,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, i_codec_id == AV_CODEC_ID_H264 || i_codec_id == AV_CODEC_ID_VC1 || i_codec_id == AV_CODEC_ID_WMV3) ) { -#ifdef HAVE_AVCODEC_MT +#if defined(HAVE_AVCODEC_MT) && LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 1, 0) if( p_sys->p_context->thread_type & FF_THREAD_FRAME ) { msg_Warn( p_dec, "threaded frame decoding is not compatible with libavcodec-hw, disabled" ); _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
