Mercurial > libavcodec.hg
changeset 11981:d3551fcf4c1c libavcodec
Add const to some pointer parameters.
Patch by Eli Friedman, eli D friedman A gmail
author | cehoyos |
---|---|
date | Sun, 27 Jun 2010 15:11:38 +0000 |
parents | 263b4ef7ad87 |
children | 669bf7f6c986 |
files | arm/dsputil_init_neon.c dsputil.c dsputil.h ppc/int_altivec.c x86/dsputil_mmx.c |
diffstat | 5 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/arm/dsputil_init_neon.c Sun Jun 27 12:21:12 2010 +0000 +++ b/arm/dsputil_init_neon.c Sun Jun 27 15:11:38 2010 +0000 @@ -168,10 +168,10 @@ 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) {
--- a/dsputil.c Sun Jun 27 12:21:12 2010 +0000 +++ b/dsputil.c Sun Jun 27 15:11:38 2010 +0000 @@ -3988,7 +3988,7 @@ } } -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 @@ 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--) {
--- a/dsputil.h Sun Jun 27 12:21:12 2010 +0000 +++ b/dsputil.h Sun Jun 27 15:11:38 2010 +0000 @@ -544,14 +544,14 @@ * @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];
--- a/ppc/int_altivec.c Sun Jun 27 12:21:12 2010 +0000 +++ b/ppc/int_altivec.c Sun Jun 27 15:11:38 2010 +0000 @@ -79,7 +79,7 @@ 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 @@ 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;
--- a/x86/dsputil_mmx.c Sun Jun 27 12:21:12 2010 +0000 +++ b/x86/dsputil_mmx.c Sun Jun 27 15:11:38 2010 +0000 @@ -2374,11 +2374,11 @@ 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);