[FFmpeg-devel] [PATCH] Allow selecting VDPAU, XvMC via get_format for MPEG-2
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Mar 29 20:09:22 CEST 2011
On Tue, Mar 29, 2011 at 06:59:34AM +0000, Carl Eugen Hoyos wrote:
> 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 && ...?
No, there isn't any reason to have a separare VDPAU decoder in that case,
so I'd actually be in favour of removing it with a major bump.
> > - 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.
Not yet, but I think VDPAU can be switched to use AVHWAccel properly and then
all this code goes away.
The first step was rather to make the codec easier to use (and as I noticed it will
make VDPAU and VAAPI more consistent from a user's view).
More information about the ffmpeg-devel
mailing list