[FFmpeg-devel] [PATCH] Const correctness for libswscale

Måns Rullgård mans
Thu Jan 14 04:05:33 CET 2010


Zuxy Meng <zuxy.meng at gmail.com> writes:

> 2010/1/14 Ramiro Polla <ramiro.polla at gmail.com>:
>> On Thu, Jan 14, 2010 at 12:32 AM, Zuxy Meng <zuxy.meng at gmail.com> wrote:
>>> This patch avoids all const related warnings in libswscale via proper
>>> declaration and casts.
>>
>>> Index: libswscale/rgb2rgb.c
>>> ===================================================================
>>> --- libswscale/rgb2rgb.c ? ? ?(???? 30298)
>>> +++ libswscale/rgb2rgb.c ? ? ?(????????)
>>> @@ -74,9 +74,6 @@
>>> ? ? ? ? ? ? ? ? ? ? ?long lumStride, long chromStride, long srcStride);
>>> ?void (*planar2x)(const uint8_t *src, uint8_t *dst, long width, long height,
>>> ? ? ? ? ? ? ? ? ? long srcStride, long dstStride);
>>> -void (*interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dst,
>>> - ? ? ? ? ? ? ? ? ? ? ? ?long width, long height, long src1Stride,
>>> - ? ? ? ? ? ? ? ? ? ? ? ?long src2Stride, long dstStride);
>>> ?void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
>>> ? ? ? ? ? ? ? ? ? ? ?uint8_t *dst1, uint8_t *dst2,
>>> ? ? ? ? ? ? ? ? ? ? ?long width, long height,
>>
>> Unrelated?
>
> The prototype is declared in two places i.e. rgb2rgb.h and rgb2rgb.c
> and the latter includes the former so rather than fixing it in both
> files I just removed the redundant one in the .c file.

That's not a prototype, that's a function pointer definition.  Did you
really test this?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list