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

Gwenole Beauchesne gbeauchesne
Thu Mar 12 10:08:13 CET 2009


On Thu, 12 Mar 2009, Michael Niedermayer wrote:

>> +    slice_param = (VASliceParameterBufferBase *)(slice_params + p->slice_count * p->slice_param_size);
>
> why the cast? why is slice_params uint8_t and not that type to begin
> with?

Because sizeof(VASliceParameterBufferBase) != 
sizeof(VASliceParameterBufferCODEC) where CODEC is any of MPEG2, MPEG4 et 
al.

If slice_params was VASliceParameterBufferBase, I would have to cast it to 
uint8_t * anyway to compute the location of the right entry (based on 
slice_count and actual slice_param_size).




More information about the ffmpeg-devel mailing list