[FFmpeg-devel] [PATCH][VAAPI][2/6] Add common data structures and helpers (take 13)
Gwenole Beauchesne
gbeauchesne
Fri Mar 20 07:39:25 CET 2009
Le 20 mars 09 ? 03:24, Michael Niedermayer a ?crit :
> [...]
>> +static int commit_slices(AVCodecContext *avctx, Picture *pic)
>> +{
>> + const struct vaapi_context * const va_context = avctx-
>> >hwaccel_context;
>> + struct vaapi_picture_private * const pp = pic-
>> >hwaccel_picture_private;
>> + VABufferID *slice_buf_ids;
>> + VABufferID slice_param_buf_id, slice_data_buf_id;
>
> shouldnt this take vaapi_picture_private as argument instead of
> Picture ?
> also this might apply to other functions too
OK for commit_slices() but I can hardly see how I could pass a
vaapi_picture_private only instead of a Picture in the other function
because I need Picture.data[3] in render_picture() for example.
> [...]
>> +void *ff_vaapi_alloc_slice(AVCodecContext *avctx, const uint8_t
>> *buffer, uint32_t size)
>> +{
>> + MpegEncContext * const s = avctx->priv_data;
>> + struct vaapi_picture_private *pp = s->current_picture_ptr-
>> >hwaccel_picture_private;
>> + uint8_t *slice_params;
>> + VASliceParameterBufferBase *slice_param;
>
> shouldnt the return type be VASliceParameterBufferBase * ?
Keeping it void * will avoid a cast to VASliceParameterBufferCODEC *
in any vaapi_CODEC.c file. Do you really want an explicit cast in the
callers?
More information about the ffmpeg-devel
mailing list