[vlc-devel] [PATCH 1/1] avcodec: hw accel with frame multithreading works since libavcodec 55.01.00

Rafaël Carré funman at videolan.org
Wed Mar 27 01:03:38 CET 2013


Hi,

Le 26/03/2013 20:25, Janne Grunau a écrit :
> Hi,
> 
> if have tested this and the libavcodec change only with vdpau and vaapi
> h264 on linux. I would be grateful if someone else could test dxva2 and
> vda/videotoolbox. I don't expect any problems.

I'll test dxva2 tomorrow and vda/videotoolbox if feepk doesn't beat me
to 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.
> ---
>  modules/codec/avcodec/video.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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))
>          {
>              msg_Warn( p_dec, "threaded frame decoding is not compatible with libavcodec-hw, disabled" );
>              p_sys->p_context->thread_type &= ~FF_THREAD_FRAME;
> 




More information about the vlc-devel mailing list