summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_fixed.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-01-05 20:35:36 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2011-01-05 20:35:36 +0000
commitac05f9030ed4baae317071d0321c91afabaf1080 (patch)
tree89e2030d2568763b382a1a27756bb6c8134d6926 /libavcodec/ac3enc_fixed.c
parent87c1410d11c34670ab2bec1ee97fc18354aa3c8d (diff)
Convert floating-point MDCT coefficients to 24-bit fixed-point all at once
instead of doing it separately in 2 different functions. This makes float AC-3 encoding approx. 3-7% faster overall. Also, the coefficient conversion can now be easily SIMD-optimized. Originally committed as revision 26232 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3enc_fixed.c')
-rw-r--r--libavcodec/ac3enc_fixed.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index 9d3b195ded..3723b08b96 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -319,6 +319,17 @@ static int normalize_samples(AC3EncodeContext *s)
}
+/**
+ * Scale MDCT coefficients from float to fixed-point.
+ */
+static void scale_coefficients(AC3EncodeContext *s)
+{
+ /* scaling/conversion is obviously not needed for the fixed-point encoder
+ since the coefficients are already fixed-point. */
+ return;
+}
+
+
#ifdef TEST
/*************************************************************************/
/* TEST */