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

Michael Niedermayer michaelni
Thu Jan 14 15:50:48 CET 2010


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

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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- 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/20100114/cf88c292/attachment.pgp>



More information about the ffmpeg-devel mailing list