Revision e6e7ba0c libavfilter/vf_unsharp.c

View differences:

libavfilter/vf_unsharp.c
63 63
    FilterParam chroma; ///< chroma parameters (width, height, amount)
64 64
} UnsharpContext;
65 65

  
66
static void unsharpen(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, FilterParam *fp)
66
static void unsharpen(uint8_t *dst, const uint8_t *src, int dst_stride, int src_stride, int width, int height, FilterParam *fp)
67 67
{
68 68
    uint32_t **sc = fp->sc;
69 69
    uint32_t sr[(MAX_SIZE * MAX_SIZE) - 1], tmp1, tmp2;
......
96 96
                tmp1 = sc[z + 1][x + fp->steps_x] + tmp2; sc[z + 1][x + fp->steps_x] = tmp2;
97 97
            }
98 98
            if (x >= fp->steps_x && y >= fp->steps_y) {
99
                uint8_t* srx = src - fp->steps_y * src_stride + x - fp->steps_x;
99
                const uint8_t* srx = src - fp->steps_y * src_stride + x - fp->steps_x;
100 100
                uint8_t* dsx = dst - fp->steps_y * dst_stride + x - fp->steps_x;
101 101

  
102 102
                res = (int32_t)*srx + ((((int32_t) * srx - (int32_t)((tmp1 + fp->halfscale) >> fp->scalebits)) * fp->amount) >> 16);

Also available in: Unified diff