diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-06-27 15:11:38 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-06-27 15:11:38 +0000 |
commit | b3858964d6ddc61c89588be64ef6b2290debd136 (patch) | |
tree | e64d19c6da795d2561927a739b91eb8ad95239c1 | |
parent | 1444438ab09878d8ab6e5953db4882b90f018995 (diff) | |
download | ffmpeg-b3858964d6ddc61c89588be64ef6b2290debd136.tar.gz |
Add const to some pointer parameters.
Patch by Eli Friedman, eli D friedman A gmail
Originally committed as revision 23826 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/arm/dsputil_init_neon.c | 6 | ||||
-rw-r--r-- | libavcodec/dsputil.c | 4 | ||||
-rw-r--r-- | libavcodec/dsputil.h | 4 | ||||
-rw-r--r-- | libavcodec/ppc/int_altivec.c | 4 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 10 |
5 files changed, 14 insertions, 14 deletions
diff --git a/libavcodec/arm/dsputil_init_neon.c b/libavcodec/arm/dsputil_init_neon.c index ff19672487..04ebb00576 100644 --- a/libavcodec/arm/dsputil_init_neon.c +++ b/libavcodec/arm/dsputil_init_neon.c @@ -168,10 +168,10 @@ void ff_float_to_int16_interleave_neon(int16_t *, const float **, long, int); void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize); -int32_t ff_scalarproduct_int16_neon(int16_t *v1, int16_t *v2, int len, +int32_t ff_scalarproduct_int16_neon(const int16_t *v1, const int16_t *v2, int len, int shift); -int32_t ff_scalarproduct_and_madd_int16_neon(int16_t *v1, int16_t *v2, - int16_t *v3, int len, int mul); +int32_t ff_scalarproduct_and_madd_int16_neon(int16_t *v1, const int16_t *v2, + const int16_t *v3, int len, int mul); void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx) { diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 0db637a501..cf333c95e4 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3988,7 +3988,7 @@ void ff_float_to_int16_interleave_c(int16_t *dst, const float **src, long len, i } } -static int32_t scalarproduct_int16_c(int16_t * v1, int16_t * v2, int order, int shift) +static int32_t scalarproduct_int16_c(const int16_t * v1, const int16_t * v2, int order, int shift) { int res = 0; @@ -3998,7 +3998,7 @@ static int32_t scalarproduct_int16_c(int16_t * v1, int16_t * v2, int order, int return res; } -static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul) +static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul) { int res = 0; while (order--) { diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index d943b84929..d67483679c 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -544,14 +544,14 @@ typedef struct DSPContext { * @param len length of vectors, should be multiple of 16 * @param shift number of bits to discard from product */ - int32_t (*scalarproduct_int16)(int16_t *v1, int16_t *v2/*align 16*/, int len, int shift); + int32_t (*scalarproduct_int16)(const int16_t *v1, const int16_t *v2/*align 16*/, int len, int shift); /* ape functions */ /** * Calculate scalar product of v1 and v2, * and v1[i] += v3[i] * mul * @param len length of vectors, should be multiple of 16 */ - int32_t (*scalarproduct_and_madd_int16)(int16_t *v1/*align 16*/, int16_t *v2, int16_t *v3, int len, int mul); + int32_t (*scalarproduct_and_madd_int16)(int16_t *v1/*align 16*/, const int16_t *v2, const int16_t *v3, int len, int mul); /* rv30 functions */ qpel_mc_func put_rv30_tpel_pixels_tab[4][16]; diff --git a/libavcodec/ppc/int_altivec.c b/libavcodec/ppc/int_altivec.c index 7fb11ddd9b..61c18c8154 100644 --- a/libavcodec/ppc/int_altivec.c +++ b/libavcodec/ppc/int_altivec.c @@ -79,7 +79,7 @@ static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2, return u.score[3]; } -static int32_t scalarproduct_int16_altivec(int16_t * v1, int16_t * v2, int order, const int shift) +static int32_t scalarproduct_int16_altivec(const int16_t * v1, const int16_t * v2, int order, const int shift) { int i; LOAD_ZERO; @@ -109,7 +109,7 @@ static int32_t scalarproduct_int16_altivec(int16_t * v1, int16_t * v2, int order return ires; } -static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul) +static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul) { LOAD_ZERO; vec_s16 *pv1 = (vec_s16*)v1; diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index 911a4de5fd..4e1efb1887 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -2374,11 +2374,11 @@ static void float_to_int16_sse2(int16_t *dst, const float *src, long len){ void ff_float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len); void ff_float_to_int16_interleave6_3dnow(int16_t *dst, const float **src, int len); void ff_float_to_int16_interleave6_3dn2(int16_t *dst, const float **src, int len); -int32_t ff_scalarproduct_int16_mmx2(int16_t *v1, int16_t *v2, int order, int shift); -int32_t ff_scalarproduct_int16_sse2(int16_t *v1, int16_t *v2, int order, int shift); -int32_t ff_scalarproduct_and_madd_int16_mmx2(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul); -int32_t ff_scalarproduct_and_madd_int16_sse2(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul); -int32_t ff_scalarproduct_and_madd_int16_ssse3(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul); +int32_t ff_scalarproduct_int16_mmx2(const int16_t *v1, const int16_t *v2, int order, int shift); +int32_t ff_scalarproduct_int16_sse2(const int16_t *v1, const int16_t *v2, int order, int shift); +int32_t ff_scalarproduct_and_madd_int16_mmx2(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul); +int32_t ff_scalarproduct_and_madd_int16_sse2(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul); +int32_t ff_scalarproduct_and_madd_int16_ssse3(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul); void ff_add_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top); int ff_add_hfyu_left_prediction_ssse3(uint8_t *dst, const uint8_t *src, int w, int left); int ff_add_hfyu_left_prediction_sse4(uint8_t *dst, const uint8_t *src, int w, int left); |