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

Gwenole Beauchesne gbeauchesne
Wed Mar 11 17:33:43 CET 2009


On Wed, 11 Mar 2009, Diego Biurrun wrote:

>> @@ -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

Copy-pasted from VDPAU, assuming it was better looking than XvMC. I was 
wrong...

>> +    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

Copy-pasted from VDPAU.
+ it looks better as is anyway, otherwise, we end up post 80 chars, but I 
don't really care.

>> +    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.

There would be a line (av_freep) in the middle, which would make it look 
weird and I want to correlate resets.

>> +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?

Did not find any and this would require updating all others (xvmc, vdpau) 
for consistency + have an impact on existing code for no real advantage.




More information about the ffmpeg-devel mailing list