summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-01-04 11:53:44 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2011-01-04 11:53:44 +0000
commit6fd96d1a85f3b81a1dbf08b79ba395506471ded0 (patch)
tree50aff50d56d178128d75a120a387f46b116d4965 /libavcodec/ac3enc.c
parent6780f488467f75444317a95f00f35c26453f4e96 (diff)
Change the AC-3 encoder to use floating-point.
Fixed-point AC-3 encoder renamed to ac3_fixed. Regression test acodec-ac3 renamed to acodec-ac3_fixed. Regression test lavf-rm changed to use ac3_fixed encoder. Originally committed as revision 26209 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index ec678ee6f4..902aabf795 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -37,6 +37,11 @@
#include "audioconvert.h"
+#ifndef CONFIG_AC3ENC_FLOAT
+#define CONFIG_AC3ENC_FLOAT 0
+#endif
+
+
/** Maximum number of exponent groups. +1 for separate DC exponent. */
#define AC3_MAX_EXP_GROUPS 85
@@ -44,7 +49,11 @@
#define SCALE_FLOAT(a, bits) lrintf((a) * (float)(1 << (bits)))
+#if CONFIG_AC3ENC_FLOAT
+#include "ac3enc_float.h"
+#else
#include "ac3enc_fixed.h"
+#endif
/**
@@ -130,7 +139,7 @@ typedef struct AC3EncodeContext {
} AC3EncodeContext;
-/* prototypes for functions in ac3enc_fixed.c */
+/* prototypes for functions in ac3enc_fixed.c and ac3_float.c */
static av_cold void mdct_end(AC3MDCTContext *mdct);