[FFmpeg-devel] [PATCH] AVHWAccel infrastructure v2

Gwenole Beauchesne gbeauchesne
Sat Sep 26 09:28:18 CEST 2009


This patch updates the AVHWAccel infrastructure to make it possible to:
- Get rid of the PixelFormat hacks
- Get pixels back from GPU memory when the user requested it
- Fallback implicitly to SW decoding
- Handle multiple hardware accelerators (e.g. different chips in a  
single system)
- Enable user-applications very easily

As a bonus, it's backwards compatible with the v1 infrastructure.

On a user point of view, everything is now controlled with  
- HW specific context that is initialized by the user (e.g. a VAAPI  
- HWACCEL_ATTR_GET_PIXELS: controls whether the user wants decoded  
pixels in Picture.data[0-2] as usual (off by default for performance)
- HWACCEL_ATTR_FORCE_ID: controls whether the user wants a specific HW  

No get_buffer() override. Nothing but AVCodecContext.hwaccel_attrs to  
be filled in. It's an array of uintptr_t that is HWACCEL_ATTR_NONE  

As a result, enabling ffplay for VAAPI was a very simple operation. On  
the MPlayer side, the usual VO (x11, xv, gl2) can be kept with very  
minimal changes too.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.v2.patch
Type: application/octet-stream
Size: 11360 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090926/9881bd3c/attachment.obj>
-------------- next part --------------

More information about the ffmpeg-devel mailing list