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

Michael Niedermayer michaelni
Fri Mar 20 17:01:42 CET 2009


On Fri, Mar 20, 2009 at 07:39:25AM +0100, Gwenole Beauchesne wrote:
> Le 20 mars 09 ? 03:24, Michael Niedermayer a ?crit :
[...]
> > [...]
> >> +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?

it also permitts a cast to (float*) as is

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090320/c7e536bd/attachment.pgp>



More information about the ffmpeg-devel mailing list