summaryrefslogtreecommitdiffstats
path: root/libswresample/rematrix_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'libswresample/rematrix_template.c')
-rw-r--r--libswresample/rematrix_template.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libswresample/rematrix_template.c b/libswresample/rematrix_template.c
index 5d5aef2..0c45fc9 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]);
}
}
OpenPOWER on IntegriCloud