Mercurial > libavcodec.hg
comparison dsputil.c @ 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 | 56aba5a9761c |
children | e382860b855f |
comparison
equal
deleted
inserted
replaced
11980:263b4ef7ad87 | 11981:d3551fcf4c1c |
---|---|
3986 for(i=0, j=c; i<len; i++, j+=channels) | 3986 for(i=0, j=c; i<len; i++, j+=channels) |
3987 dst[j] = float_to_int16_one(src[c]+i); | 3987 dst[j] = float_to_int16_one(src[c]+i); |
3988 } | 3988 } |
3989 } | 3989 } |
3990 | 3990 |
3991 static int32_t scalarproduct_int16_c(int16_t * v1, int16_t * v2, int order, int shift) | 3991 static int32_t scalarproduct_int16_c(const int16_t * v1, const int16_t * v2, int order, int shift) |
3992 { | 3992 { |
3993 int res = 0; | 3993 int res = 0; |
3994 | 3994 |
3995 while (order--) | 3995 while (order--) |
3996 res += (*v1++ * *v2++) >> shift; | 3996 res += (*v1++ * *v2++) >> shift; |
3997 | 3997 |
3998 return res; | 3998 return res; |
3999 } | 3999 } |
4000 | 4000 |
4001 static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul) | 4001 static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul) |
4002 { | 4002 { |
4003 int res = 0; | 4003 int res = 0; |
4004 while (order--) { | 4004 while (order--) { |
4005 res += *v1 * *v2++; | 4005 res += *v1 * *v2++; |
4006 *v1++ += mul * *v3++; | 4006 *v1++ += mul * *v3++; |