[MPlayer-dev-eng] [PATCH] Add -va for video acceleration

Gwenole Beauchesne gbeauchesne at splitted-desktop.com
Tue Feb 16 18:31:19 CET 2010


On Tue, 16 Feb 2010, Uoti Urpala wrote:

>> (1) We will tend to duplicate videocodec entries since this would require
>> different "driver" lines, isn't it? So far, my current approach works by
>> just adding e.g. out VAAPI_MPEG2 to an existing videocodec entry. It's
>> preferable to add a single line rather than copying the whole entry x N
>> accelerators (N can be 4 very easily).
>
> I think it's preferable to distinguish various accelerated versions on
> the video codec level. If you don't then you need to duplicate all the
> codec preferred/forced/fallback functionality to implement selecting the
> actual hardware decoder used within the "same" codec. Also things like
> "use VAAPI for mpeg4 but software for mpeg2 because my hardware has
> problems with that" becomes hard to express on the command line if you
> try to separate hardware decoding mode from other codec selection.

You can't express that with -vfm either, can you?

I really don't want to duplicate videocodec entries since this is 
error-prone. see e.g. VDPAU, the fourcc lines now deviate a little. This 
could be worse when there will be 4 hwaccels to maintain...

OTOH, I quite don't mind duplicating and stick to the current approach 
which is -vo VO -vc ffmpeg12ACCEL,ffodivxACCEL,

> The syntax used in codecs.conf can be extended if that is an issue.
>
>> (2) This probably would require more changes to vd_ffmpeg.c since new
>> vd_info and LIBVD_EXTERN(xxx) would be needed + a means to pass the
>> selected video accelerator to the init function.
>
> You could add new -vfm names in simpler ways than adding new
> vd_info/VD_EXTERN; OTOH maybe showing a different name for the decoder
> used would actually make sense. The codec has access to the codecs.conf
> entry used so passing information to init() is not an issue.

I thought about an "hwaccel" attribute, this would be more appropriate 
than overriding "out" semantics. But I still don't see how we could test 
for the currently selected/tested variant.

e.g.
videocodec ffmpeg12
fourcc ...
hwaccel vaapi
hwaccel vdpau
out YV12



More information about the MPlayer-dev-eng mailing list