# HG changeset patch # User vitor # Date 1251387539 0 # Node ID 7775f66276125b2c5a2a0bd314b9dfcaf06e924b # Parent 0fa3d21b317ec5d3b0f9d70348c32d0a597b624c Mark parameter src of vector_clipf() as const diff -r 0fa3d21b317e -r 7775f6627612 dsputil.c --- a/dsputil.c Thu Aug 27 14:49:36 2009 +0000 +++ b/dsputil.c Thu Aug 27 15:38:59 2009 +0000 @@ -4102,13 +4102,13 @@ else return a; } -static void vector_clipf_c_opposite_sign(float *dst, float *src, float *min, float *max, int len){ +static void vector_clipf_c_opposite_sign(float *dst, const float *src, float *min, float *max, int len){ int i; uint32_t mini = *(uint32_t*)min; uint32_t maxi = *(uint32_t*)max; uint32_t maxisign = maxi ^ (1<<31); uint32_t *dsti = (uint32_t*)dst; - uint32_t *srci = (uint32_t*)src; + const uint32_t *srci = (const uint32_t*)src; for(i=0; i 0) { vector_clipf_c_opposite_sign(dst, src, &min, &max, len); diff -r 0fa3d21b317e -r 7775f6627612 dsputil.h --- a/dsputil.h Thu Aug 27 14:49:36 2009 +0000 +++ b/dsputil.h Thu Aug 27 15:38:59 2009 +0000 @@ -396,7 +396,7 @@ void (*vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len); /* assume len is a multiple of 8, and arrays are 16-byte aligned */ void (*int32_to_float_fmul_scalar)(float *dst, const int *src, float mul, int len); - void (*vector_clipf)(float *dst /* align 16 */, float *src /* align 16 */, float min, float max, int len /* align 16 */); + void (*vector_clipf)(float *dst /* align 16 */, const float *src /* align 16 */, float min, float max, int len /* align 16 */); /* C version: convert floats from the range [384.0,386.0] to ints in [-32768,32767] * simd versions: convert floats from [-32768.0,32767.0] without rescaling and arrays are 16byte aligned */ diff -r 0fa3d21b317e -r 7775f6627612 x86/dsputil_mmx.c --- a/x86/dsputil_mmx.c Thu Aug 27 14:49:36 2009 +0000 +++ b/x86/dsputil_mmx.c Thu Aug 27 15:38:59 2009 +0000 @@ -2346,7 +2346,7 @@ ); } -static void vector_clipf_sse(float *dst, float *src, float min, float max, +static void vector_clipf_sse(float *dst, const float *src, float min, float max, int len) { x86_reg i = (len-16)*4;