aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/rematrix.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-11-14 23:02:12 +0100
committerClément Bœsch <ubitux@gmail.com>2012-11-15 21:24:49 +0100
commit5e68bf9b927ef377f271a0d12185aac6172e5658 (patch)
tree601ed64a23c5338831737d1c7808078f95bebe9d /libswresample/rematrix.c
parent8ea8833979d2ffa9b7a792a2a758144d9b2c3da2 (diff)
downloadffmpeg-5e68bf9b927ef377f271a0d12185aac6172e5658.tar.gz
swr/rematrix: move templating parameters to template itself.
Diffstat (limited to 'libswresample/rematrix.c')
-rw-r--r--libswresample/rematrix.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index e23c45e852..51658cee21 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -22,42 +22,17 @@
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
-#define ONE (1.0)
-#define R(x) x
-#define SAMPLE float
-#define COEFF float
-#define INTER float
-#define RENAME(x) x ## _float
+#define TEMPLATE_REMATRIX_FLT
#include "rematrix_template.c"
-#undef SAMPLE
-#undef RENAME
-#undef R
-#undef ONE
-#undef COEFF
-#undef INTER
-
-#define ONE (1.0)
-#define R(x) x
-#define SAMPLE double
-#define COEFF double
-#define INTER double
-#define RENAME(x) x ## _double
-#include "rematrix_template.c"
-#undef SAMPLE
-#undef RENAME
-#undef R
-#undef ONE
-#undef COEFF
-#undef INTER
-
-#define ONE (-32768)
-#define R(x) (((x) + 16384)>>15)
-#define SAMPLE int16_t
-#define COEFF int
-#define INTER int
-#define RENAME(x) x ## _s16
+#undef TEMPLATE_REMATRIX_FLT
+
+#define TEMPLATE_REMATRIX_DBL
#include "rematrix_template.c"
+#undef TEMPLATE_REMATRIX_DBL
+#define TEMPLATE_REMATRIX_S16
+#include "rematrix_template.c"
+#undef TEMPLATE_REMATRIX_S16
#define FRONT_LEFT 0
#define FRONT_RIGHT 1