[FFmpeg-devel] [PATCH][VAAPI][6/6] Add H.264 bitstream decoding (take 14)(ping)

Michael Niedermayer michaelni
Mon Jun 1 23:59:29 CEST 2009


On Fri, May 29, 2009 at 10:21:22AM +0200, Cyril Russo wrote:
> Hi again,
>
>   Michael, can you say if this patch is ok for you, and in that case, 
> commit it ?
> It's ok for Diego:
> > No more comments from me.
> >
> > Diego
[...]
> +/** Reconstruct bitstream slice_type. */
> +static int h264_get_slice_type(H264Context *h)
> +{
> +    switch (h->slice_type) {
> +    case FF_P_TYPE:  return 0;
> +    case FF_B_TYPE:  return 1;
> +    case FF_I_TYPE:  return 2;
> +    case FF_SP_TYPE: return 3;

> +    case FF_SI_TYPE: return 4;
> +    default: return -1;

align


> +    }
> +}
> +
> +/** Initialize an empty VAAPI picture.
> + *  VAAPI requires a fixed size reference picture array. */
> +static void vaapi_h264_init_picture(VAPictureH264 *va_pic)

please document the convention used for function names
which are part of our wraper and which are part of VAAPI
In that sense is it really needed to have h264 and vaapi prefixes for static
function names in a file that is specific to these?


> +{
> +    va_pic->picture_id          = 0xffffffff;
> +    va_pic->flags               = VA_PICTURE_H264_INVALID;
> +    va_pic->TopFieldOrderCnt    = 0;
> +    va_pic->BottomFieldOrderCnt = 0;
> +}
> +

> +/** Translate an FFmpeg Picture into its VAAPI form.
> + *  @param[out] va_pic          A pointer to VAAPI's own picture struct
> + *  @param[in]  pic             A pointer to the FFmpeg picture struct to convert

> + *  @param[in]  pic_structure   The picture field type to use, as defined in mpegvideo.h
> + *                              (can be 0 to use pic's field type) */

what does "to use" mean? I dont think thats clear


> +static void vaapi_h264_fill_vaapi_picture(VAPictureH264  *va_pic,

the function name is not good

libav_pic_to_vaapi()
might be reasonable

[...]


> +/** Initialize VAPictureParameterBufferH264.ReferenceFrames[] array
> + *  from its FFmpeg counterpart. */
[...]
> +/** Initialize VAAPI reference picture lists from the FFmpeg reference picture list.

hmm, confusing

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- 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/20090601/b6d03692/attachment.pgp>



More information about the ffmpeg-devel mailing list