From 1e40b2c22b24a5758bcfce7620355750313c930d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 26 Oct 2011 00:40:29 +0200 Subject: [PATCH] rematrix: add type for coefficients Signed-off-by: Michael Niedermayer --- libswresample/rematrix.c | 3 +++ libswresample/rematrix_template.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 4a3ada62f4..b3e3e4a664 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -25,16 +25,19 @@ #define ONE (1.0) #define R(x) x #define SAMPLE float +#define COEFF float #define RENAME(x) x ## _float #include "rematrix_template.c" #undef SAMPLE #undef RENAME #undef R #undef ONE +#undef COEFF #define ONE (-32768) #define R(x) (((x) + 16384)>>15) #define SAMPLE int16_t +#define COEFF int #define RENAME(x) x ## _s16 #include "rematrix_template.c" diff --git a/libswresample/rematrix_template.c b/libswresample/rematrix_template.c index 0c45fc9110..862430e184 100644 --- a/libswresample/rematrix_template.c +++ b/libswresample/rematrix_template.c @@ -19,14 +19,14 @@ */ -static void RENAME(sum2)(SAMPLE *out, const SAMPLE *in1, const SAMPLE *in2, SAMPLE coeff1, SAMPLE coeff2, int len){ +static void RENAME(sum2)(SAMPLE *out, const SAMPLE *in1, const SAMPLE *in2, COEFF coeff1, COEFF coeff2, int len){ int i; for(i=0; i