summaryrefslogtreecommitdiff
path: root/libavcodec/bit_depth_template.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-07-09 11:44:07 +0100
committerMans Rullgard <mans@mansr.com>2011-07-10 17:56:06 +0100
commit39c2a6bf44b25534fdbc9b6ac3844dab28ba5b0e (patch)
tree89a4d6dccebdf467a096790100ad19c7c0b141da /libavcodec/bit_depth_template.c
parent710b8df949248b29446e5ee8b081b611a83951fa (diff)
bitdepth: simplify FUNC/FUNCC macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/bit_depth_template.c')
-rw-r--r--libavcodec/bit_depth_template.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libavcodec/bit_depth_template.c b/libavcodec/bit_depth_template.c
index 4da0a6e0c9..9071ec2a35 100644
--- a/libavcodec/bit_depth_template.c
+++ b/libavcodec/bit_depth_template.c
@@ -85,13 +85,7 @@
# define CLIP(a) cm[a]
#endif
-#if BIT_DEPTH == 8
-# define FUNC(a) a ## _8
-# define FUNCC(a) a ## _8_c
-#elif BIT_DEPTH == 9
-# define FUNC(a) a ## _9
-# define FUNCC(a) a ## _9_c
-#elif BIT_DEPTH == 10
-# define FUNC(a) a ## _10
-# define FUNCC(a) a ## _10_c
-#endif
+#define FUNC3(a, b, c) a ## _ ## b ## c
+#define FUNC2(a, b, c) FUNC3(a, b, c)
+#define FUNC(a) FUNC2(a, BIT_DEPTH,)
+#define FUNCC(a) FUNC2(a, BIT_DEPTH, _c)