[FFmpeg-devel] [RFC] Add AVFrame::hwaccel_data{, _private} (Was: [PATCH][VAAPI][2/6] Add common data structures and helpers)

Gwenole Beauchesne gbeauchesne
Fri Feb 27 18:11:52 CET 2009


On Fri, 27 Feb 2009, Michael Niedermayer wrote:

>> 1. We want *_render_state structs be stored in a specific AVFrame member,
>> not hijack some data[i] (mandatory)
>
> this is a "if its cleaner" thing, that is if its cleaner otherwise there
> is no point

Here is the "alternate approach" implemented. I left the vaapi*.c parts 
since those were mechanical changes only. Is this cleaner for you? Changes 
to MPlayer are now zero effort.

As a reminder, I think this "alternate approach" is Reimar's if I got it 
right. That is:
- lavc: allocate private HW accel data
- user: ::get_buffer() that does mpi->planes[3] => AVFrame::hwaccel_data

Benefits:
- Fewer user app changes
- Keep AVFrame::data[0-2] for the original YV12 pixels, if needed

Drawbacks:
- More "expressive" in the HWAccel codec implementation part.

Though ,this point is solved by partial public vaapi_render_state struct 
members copies, once at ::start_frame(), no more expensive than doing 
((struct vaapi_render_state *)AVFrame->hwaccel_data)->whatever_needed_there

WDYT?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.data.3.patch
Type: text/x-diff
Size: 13241 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/bee9c003/attachment.patch>



More information about the ffmpeg-devel mailing list