[FFmpeg-devel] [PATCH] Allow selecting VDPAU, XvMC via get_format for MPEG-2

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Mar 29 08:59:34 CEST 2011


Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:

[...]

> +static inline int uses_vdpau(AVCodecContext *avctx) {
> +    return avctx->pix_fmt == PIX_FMT_VDPAU_MPEG1 || avctx->pix_fmt ==
PIX_FMT_VDPAU_MPEG2;

Shouldn't this be CONFIG_MPEG_VDPAU_DECODER && ...?

[...]

> +    if(s->chroma_format <  2) {

Two spaces

> +        enum PixelFormat res;
> +        res = avctx->get_format(avctx,
> +	                        avctx->codec_id == CODEC_ID_MPEG1VIDEO ?

and a tab.

[...]

> -                if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) {
> +                if (uses_vdpau(avctx)) {

I still wonder if this is really simpler but I certainly have no objections.

Thank you, Carl Eugen



More information about the ffmpeg-devel mailing list