aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3enc_fixed.h
diff options
context:
space:
mode:
authorJustin <justin.ruggles@gmail.com>2011-03-11 13:03:26 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2011-03-14 08:45:26 -0400
commit323e6fead07c75f418e4b60704a4f437bb3483b2 (patch)
tree14e0886587813468e232931cc8cee782b205b44a /libavcodec/ac3enc_fixed.h
parent6e7cf13b6b1d0e08969b64129b9022cc1171d875 (diff)
downloadffmpeg-323e6fead07c75f418e4b60704a4f437bb3483b2.tar.gz
ac3enc: do not right-shift fixed-point coefficients in the final MDCT stage.
This increases the accuracy of coefficients, leading to improved quality. Rescaling of the coefficients to full 25-bit accuracy is done rather than offsetting the exponent values. This requires coefficient scaling to be done before determining the rematrixing strategy. Also, the rematrixing strategy calculation must use 64-bit math to prevent overflow due to the higher precision coefficients.
Diffstat (limited to 'libavcodec/ac3enc_fixed.h')
-rw-r--r--libavcodec/ac3enc_fixed.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ac3enc_fixed.h b/libavcodec/ac3enc_fixed.h
index 12c8ace4aa..bad2306321 100644
--- a/libavcodec/ac3enc_fixed.h
+++ b/libavcodec/ac3enc_fixed.h
@@ -36,6 +36,8 @@ typedef int16_t SampleType;
typedef int32_t CoefType;
typedef int64_t CoefSumType;
+#define MAC_COEF(d,a,b) MAC64(d,a,b)
+
/**
* Compex number.