[FFmpeg-devel] [PATCH]VDPAU patch for H264

Reimar Döffinger Reimar.Doeffinger
Tue Dec 30 09:02:51 CET 2008


On Tue, Dec 30, 2008 at 02:23:07AM +0100, Carl Eugen Hoyos wrote:
> @@ -2186,7 +2189,9 @@
>      s->quarter_sample = 1;
>      s->low_delay= 1;
>  
> -    if(avctx->codec_id == CODEC_ID_SVQ3)
> +    if(avctx->vdpau_acceleration)
> +        avctx->pix_fmt = PIX_FMT_NONE; // Set in decode_postinit() later
> +    else if(avctx->codec_id == CODEC_ID_SVQ3)
>          avctx->pix_fmt= PIX_FMT_YUVJ420P;
>      else
>          avctx->pix_fmt= PIX_FMT_YUV420P;

That's wrong. First, SQV3 is not supported by VDPAU, so IMO it should
stay first and the vdpau check should be in the else part.
Secondly, since the PIXFMT is now always the same, you can just set
it to PIX_FMT_VDPAU_H264 here and get rid of postinit (I am somewhat
against failing for unsupported chroma formats, I think that they are
not supported is a pure driver limitation and should be caught whereever
the actual hardware decoding is done).

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list