[FFmpeg-devel] [PATCH][VAAPI][2/6] Add common data structures and helpers (take 2)

Gwenole Beauchesne gbeauchesne
Tue Mar 3 13:40:09 CET 2009


Hi,

Here is a new patch with the suggested changes. I kept the overview below 
and added new changes.

Note: this depends on the alloc/free_frame_buffer() and hwaccel_data 
patches.

> The buf/buf_size args to AVHWAccel::start_frame() are particularly useful for 
> optimization purposes. Whenever possible, slice data chunks are directly 
> copied to mapped HW memory. Otherwise, they are accumulated to a temporary 
> buffer that will be copied in end_frame().
> - vaapi_slice_data_prepare() [usually called in ::start_frame()]
> - vaapi_slice_data_append()  [usually called in ::decode_slice()]
> - vaapi_slice_data_commit()  [usually called in ::end_frame()]
>
> The same happens for slice control blocks. If we can predetermine the number 
> of slices, we can map the whole slice params buffer from HW memory space. 
> Otherwise, they are accumulated to a temporary buffer that is also copied in 
> end_frame().
> - vaapi_slice_params_prepare() [usually called in ::start_frame()]
> - vaapi_slice_params_next()    [usually called in ::decode_slice()]
> - vaapi_slice_params_commit()  [usually called in ::end_frame()]
>
> Other helpers include:
> - vaapi_common_end_frame(): common commit code to the HW accelerator
> - vaapi_render_picture(): doing the actual rendering

- ff_vaapi_destroy_picture(): implements AVHWAccel::close() for 
hwaccel_data_private destruction.

Regards,
Gwenole.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.vaapi.common.2.patch
Type: text/x-diff
Size: 23983 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090303/c17587ad/attachment.patch>



More information about the ffmpeg-devel mailing list