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

Diego Biurrun diego
Wed Mar 11 17:02:11 CET 2009


On Wed, Mar 11, 2009 at 02:20:54PM +0100, Gwenole Beauchesne wrote:
>
> New patch attached.

> --- /dev/null
> +++ b/libavcodec/vaapi.c
> @@ -0,0 +1,219 @@
> +/*
> + * Video Acceleration API (video decoding)
> + * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1.

nit: pointless period

> +    slice_buf_ids = av_fast_realloc(
> +        rdsp->slice_buf_ids,
> +        &rdsp->slice_buf_ids_alloc,
> +        (rdsp->n_slice_buf_ids + 2) * sizeof(slice_buf_ids[0]));

weird indentation

> +    rdsp->n_slice_buf_ids = 0;
> +    rdsp->slice_buf_ids_alloc = 0;
> +    av_freep(&rdsp->slice_params);
> +    rdsp->slice_count = 0;
> +    rdsp->slice_params_alloc = 0;

This could be aligned.

> --- /dev/null
> +++ b/libavcodec/vaapi.h
> @@ -0,0 +1,63 @@
> +/*
> + * Video Acceleration API (shared data between FFmpeg and the video player)
> + * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1.

see above

> +struct vaapi_render_state {
> +    struct vaapi_context *va_context;   ///< Pointer to display-dependent data
> +    uint32_t    surface;                ///< Rendering surface, never changed
> +};

Is there a better name for this struct?

> --- /dev/null
> +++ b/libavcodec/vaapi_internal.h
> @@ -0,0 +1,101 @@
> +/*
> + * Video Acceleration API (video decoding)
> + * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1.

ditto

Diego




More information about the ffmpeg-devel mailing list