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

Ivan Kalvachev ikalvachev at gmail.com
Thu Mar 31 21:00:39 CEST 2011


On 3/29/11, Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> 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).

Have you committed/pushed this patch already?

The get_format() approach is the correct one
and I'm happy to see somebody working on it.

I may try to port XvMC to hwaccel (at least partially), I won't mind
discussing some implementation details first.


More information about the ffmpeg-devel mailing list