vf_unsharp: Mark readonly variable as const.
authorDiego Biurrun <diego@biurrun.de>
Wed, 4 Apr 2012 08:08:37 +0000 (10:08 +0200)
committerDiego Biurrun <diego@biurrun.de>
Wed, 4 Apr 2012 17:34:40 +0000 (19:34 +0200)
This fixes the following warning:
libavfilter/vf_unsharp.c:106: warning: initialization discards qualifiers from pointer target type

libavfilter/vf_unsharp.c

index a40df13..7aca2cf 100644 (file)
@@ -103,8 +103,8 @@ static void apply_unsharp(      uint8_t *dst, int dst_stride,
                 tmp1 = sc[z + 1][x + fp->steps_x] + tmp2; sc[z + 1][x + fp->steps_x] = tmp2;
             }
             if (x >= fp->steps_x && y >= fp->steps_y) {
                 tmp1 = sc[z + 1][x + fp->steps_x] + tmp2; sc[z + 1][x + fp->steps_x] = tmp2;
             }
             if (x >= fp->steps_x && y >= fp->steps_y) {
-                uint8_t* srx = src - fp->steps_y * src_stride + x - fp->steps_x;
-                uint8_t* dsx = dst - fp->steps_y * dst_stride + x - fp->steps_x;
+                const uint8_t *srx = src - fp->steps_y * src_stride + x - fp->steps_x;
+                uint8_t *dsx       = dst - fp->steps_y * dst_stride + x - fp->steps_x;
 
                 res = (int32_t)*srx + ((((int32_t) * srx - (int32_t)((tmp1 + fp->halfscale) >> fp->scalebits)) * fp->amount) >> 16);
                 *dsx = av_clip_uint8(res);
 
                 res = (int32_t)*srx + ((((int32_t) * srx - (int32_t)((tmp1 + fp->halfscale) >> fp->scalebits)) * fp->amount) >> 16);
                 *dsx = av_clip_uint8(res);