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

Zuxy Meng zuxy.meng
Fri Jan 15 09:52:10 CET 2010


2010/1/14 Michael Niedermayer <michaelni at gmx.at>:
> On Thu, Jan 14, 2010 at 11:19:21AM +0800, Zuxy Meng wrote:
>> 2010/1/14 M?ns Rullg?rd <mans at mansr.com>:
>> > 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?
>>
>> Ooops I overlooked it. Actually I only compiled them.
>>
>> --
>> Zuxy
>> Beauty is truth,
>> While truth is beauty.
>> PGP KeyID: E8555ED6
>
>> ?rgb2rgb.c ? ? ? ? ? ? ?| ? ?2 -
>> ?rgb2rgb.h ? ? ? ? ? ? ?| ? ?2 -
>> ?rgb2rgb_template.c ? ? | ? ?2 -
>> ?swscale.c ? ? ? ? ? ? ?| ? 56 ++++++++++++++++++++++++-------------------------
>> ?swscale.h ? ? ? ? ? ? ?| ? ?4 +--
>> ?swscale_internal.h ? ? | ? ?2 -
>> ?swscale_template.c ? ? | ? 36 +++++++++++++++----------------
>> ?x86/yuv2rgb_template.c | ? 26 +++++++++++-----------
>> ?yuv2rgb.c ? ? ? ? ? ? ?| ? 12 +++++-----
>> ?9 files changed, 71 insertions(+), 71 deletions(-)
>> ee28f83fd06b642d7fdec60919200830b2fc1ef1 ?const.diff
>
> ok

Applied.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the ffmpeg-devel mailing list