[FFmpeg-devel] [PATCH 8/8] avcodec/resample2: replace #define by typedef
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Thu Nov 19 14:14:15 CET 2015
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
libavcodec/resample2.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c
index cd9fe1c..56ae9f7 100644
--- a/libavcodec/resample2.c
+++ b/libavcodec/resample2.c
@@ -34,9 +34,9 @@
#ifndef CONFIG_RESAMPLE_HP
#define FILTER_SHIFT 15
-#define FELEM int16_t
-#define FELEM2 int32_t
-#define FELEML int64_t
+typedef int16_t FELEM;
+typedef int32_t FELEM2;
+typedef int64_t FELEML;
#define FELEM_MAX INT16_MAX
#define FELEM_MIN INT16_MIN
#define WINDOW_TYPE 9
@@ -52,9 +52,9 @@
#else
#define FILTER_SHIFT 0
-#define FELEM double
-#define FELEM2 double
-#define FELEML double
+typedef double FELEM;
+typedef double FELEM2;
+typedef double FELEML;
#define WINDOW_TYPE 24
#endif
--
2.6.2
More information about the ffmpeg-devel
mailing list