[FFmpeg-cvslog] Add const to fix "cast discards qualifiers" warnings.

Reimar Döffinger git at videolan.org
Mon May 30 20:03:24 CEST 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Mon May 30 20:02:39 2011 +0200| [70564983c5e3a4e62426510aee8cd27bc636774e] | committer: Reimar Döffinger

Add const to fix "cast discards qualifiers" warnings.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70564983c5e3a4e62426510aee8cd27bc636774e
---

 libswscale/swscale_template.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c
index 98de521..3555883 100644
--- a/libswscale/swscale_template.c
+++ b/libswscale/swscale_template.c
@@ -441,7 +441,7 @@ static inline void hyscale_c(SwsContext *c, uint16_t *dst, int dstWidth,
 
     if (c->hScale16) {
         int shift= isAnyRGB(c->srcFormat) || c->srcFormat==PIX_FMT_PAL8 ? 13 : av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;
-        c->hScale16(dst, dstWidth, (uint16_t*)src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize, shift);
+        c->hScale16(dst, dstWidth, (const uint16_t*)src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize, shift);
     } else if (!c->hyscale_fast) {
         c->hScale(dst, dstWidth, src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize);
     } else { // fast bilinear upscale / crap downscale
@@ -486,8 +486,8 @@ inline static void hcscale_c(SwsContext *c, uint16_t *dst1, uint16_t *dst2, int
 
     if (c->hScale16) {
         int shift= isAnyRGB(c->srcFormat) || c->srcFormat==PIX_FMT_PAL8 ? 13 : av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;
-        c->hScale16(dst1, dstWidth, (uint16_t*)src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize, shift);
-        c->hScale16(dst2, dstWidth, (uint16_t*)src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize, shift);
+        c->hScale16(dst1, dstWidth, (const uint16_t*)src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize, shift);
+        c->hScale16(dst2, dstWidth, (const uint16_t*)src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize, shift);
     } else if (!c->hcscale_fast) {
         c->hScale(dst1, dstWidth, src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
         c->hScale(dst2, dstWidth, src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);



More information about the ffmpeg-cvslog mailing list