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

Gwenole Beauchesne gbeauchesne
Fri Feb 27 11:24:55 CET 2009

On Fri, 27 Feb 2009, Gwenole Beauchesne wrote:

>> Btw. why is "surface" in vaapi_render_state, is that pure lazyness/bad
>> design as in XvMC and VDPAU or does FFmpeg actually use it?
> Yes. I will check if I can allocate it in ff_alloc_vaapi_render_state() 
> instead. So that user only has to set va_context to something sensible 
> enough.

No, this is not possible, creating the surfaces requires va_context which 
is not available yet at the point ff_alloc_vaapi_render_state() is called. 
And, if they are lazily allocated afterwards, we'd need a new hook to 
clean the pool up or let it be free'd in the ff_free_vaapi_render_state() 
but this way to alloc/free surfaces is not very efficient.

More information about the ffmpeg-devel mailing list