diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-19 09:18:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-19 09:25:50 +0200 |
commit | 8593b743a81263eebec79bb13b7b925bd024c5e1 (patch) | |
tree | 59a19c64b02b41c8cf435a29367e7f2040fee96b /libswresample/rematrix_template.c | |
parent | c3c1af6dc626a0677ec93ca10643ef2cc480814d (diff) | |
download | ffmpeg-8593b743a81263eebec79bb13b7b925bd024c5e1.tar.gz |
rematrix: dont use floats for int16 code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/rematrix_template.c')
-rw-r--r-- | libswresample/rematrix_template.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libswresample/rematrix_template.c b/libswresample/rematrix_template.c index 5d5aef2ca8..0c45fc9110 100644 --- a/libswresample/rematrix_template.c +++ b/libswresample/rematrix_template.c @@ -19,20 +19,20 @@ */ -static void RENAME(sum2)(SAMPLE *out, const SAMPLE *in1, const SAMPLE *in2, float coeff1, float coeff2, int len){ +static void RENAME(sum2)(SAMPLE *out, const SAMPLE *in1, const SAMPLE *in2, SAMPLE coeff1, SAMPLE coeff2, int len){ int i; for(i=0; i<len; i++) - out[i] = coeff1*in1[i] + coeff2*in2[i]; //FIXME better int16 + out[i] = R(coeff1*in1[i] + coeff2*in2[i]); } -static void RENAME(copy)(SAMPLE *out, const SAMPLE *in, float coeff, int len){ - if(coeff == 1.0){ +static void RENAME(copy)(SAMPLE *out, const SAMPLE *in, SAMPLE coeff, int len){ + if(coeff == ONE){ memcpy(out, in, sizeof(SAMPLE)*len); }else{ int i; for(i=0; i<len; i++) - out[i] = coeff*in[i]; //FIXME better int16 + out[i] = R(coeff*in[i]); } } |