summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-06-27 14:29:33 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-07-01 13:02:11 -0400
commit523b7eba19590652b7ba19c5bdd85dd257bfe4f7 (patch)
treeb5d326ff4d73740275cae5bf623eabcbee692cb6 /libavcodec/ac3enc.h
parent6054cd25b4d7dce97c4fa3cc6e4757ba1e59ab86 (diff)
ac3enc: clip coefficients after MDCT.
This ensures that any processing between the MDCT and exponent extraction will be using clipped coefficients.
Diffstat (limited to 'libavcodec/ac3enc.h')
-rw-r--r--libavcodec/ac3enc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h
index be62656650..54f427a523 100644
--- a/libavcodec/ac3enc.h
+++ b/libavcodec/ac3enc.h
@@ -50,12 +50,16 @@
#if CONFIG_AC3ENC_FLOAT
#define AC3_NAME(x) ff_ac3_float_ ## x
#define MAC_COEF(d,a,b) ((d)+=(a)*(b))
+#define COEF_MIN (-16777215.0/16777216.0)
+#define COEF_MAX ( 16777215.0/16777216.0)
typedef float SampleType;
typedef float CoefType;
typedef float CoefSumType;
#else
#define AC3_NAME(x) ff_ac3_fixed_ ## x
#define MAC_COEF(d,a,b) MAC64(d,a,b)
+#define COEF_MIN -16777215
+#define COEF_MAX 16777215
typedef int16_t SampleType;
typedef int32_t CoefType;
typedef int64_t CoefSumType;