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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jul 31 10:36:14 CEST 2011

On 30 Jul 2011, at 20:26, Ivan Kalvachev <ikalvachev at gmail.com> wrote:
> On 4/1/11, Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
>> On Thu, Mar 31, 2011 at 10:00:39PM +0300, Ivan Kalvachev wrote:
>>> 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
>>>>>> ==
>>>>> 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?
>> Done now.
>>> I may try to port XvMC to hwaccel (at least partially), I won't mind
>>> discussing some implementation details first.
>> Might be a bit hard, AVHWAccel IMO currently is only intended for bitstream
>> acceleration.
>> Well, it might be possible to use it partially in a similar way to how I
>> hacked VDPAU now, but on the other hand I don't know if maybe xvmc can
>> run at least parts of the error concealment in a way that is reasonable?
>> Setting hwaccel will automatically disable a lot of error concealment code.
> Reimar, I was wondering if you are going to do the same for h264 and
> mpeg4video ?
> I tried to see why only vdpau is still using its own codec, but I
> could find any hint in the maillists.

I intend to at some point, but I have too much other things to do and on my setups it's always a lot of effort to get VDPAU to work.

More information about the ffmpeg-devel mailing list