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

Gwenole Beauchesne gbeauchesne
Sat Mar 21 07:52:27 CET 2009


Le 20 mars 09 ? 18:26, Michael Niedermayer a ?crit :

> On Fri, Mar 20, 2009 at 05:48:39PM +0100, Gwenole Beauchesne wrote:
>> On Fri, 20 Mar 2009, Michael Niedermayer wrote:
>>
>>> [...]
>>>> +int ff_vaapi_common_end_frame(AVCodecContext *avctx)
>>>> +{
>>>
>>>> +    MpegEncContext * const s = avctx->priv_data;
>>>
>>> that is not pretty, in common code
>>
>> Do you mean passing an MpegEncContext instead of an AVCodecContext  
>> and
>> then use s->avctx instead if that context is needed?
>>
>> Or what is not pretty in particular?
>
> that common code assumes avctx->priv_data is a MpegEncContext

Because that was currently the case for all VA API supported  
codecs. ;-) And this actually simplified vaapi_codec.c implementation  
by only providing .enf_frame = ff_vaapi_common_end_frame. Anyway, this  
is now changed.

>> /**
>>  * VAPictureParameterBuffer ID
>>  *
>>  * - encoding: Set by libavcodec
>>  * - decoding: Set by libavcodec
>>  */
>> VABufferID pic_param_buf_id;
>>
>> ? (including de-alignment?... since comments are now "large enough")
>
> yes but there is no encoding (at least not yet) ;)

OK, marked encoding as "unused" but it was also to show you that when  
encoding is implemented, this would be the same uses as for decoding,  
so probably duplicate comments.

New patch attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.vaapi.common.14.patch
Type: application/octet-stream
Size: 14439 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090321/e19c3dd6/attachment.obj>
-------------- next part --------------




More information about the ffmpeg-devel mailing list