projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
710b8df
)
bitdepth: simplify FUNC/FUNCC macros
author
Mans Rullgard
<mans@mansr.com>
Sat, 9 Jul 2011 10:44:07 +0000
(11:44 +0100)
committer
Mans Rullgard
<mans@mansr.com>
Sun, 10 Jul 2011 16:56:06 +0000
(17:56 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/bit_depth_template.c
patch
|
blob
|
history
diff --git
a/libavcodec/bit_depth_template.c
b/libavcodec/bit_depth_template.c
index
4da0a6e
..
9071ec2
100644
(file)
--- 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)