Commit Graph

8 Commits

Author SHA1 Message Date
Justin Ruggles
7539a1fee2 ac3enc: Add x86-optimized function to speed up log2_tab().
AC3DSPContext.ac3_max_msb_abs_int16() finds the maximum MSB of the absolute
value of each element in an array of int16_t.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit fbb6b49dab)
2011-02-14 23:58:20 +01:00
Justin Ruggles
943dc94265 ac3enc: Remove unneeded clipping of shift amount.
s->windowed_samples will always have a range of [-32767,32767] due to the
window function, so the return value from log2_tab() will always be in the
range [0,14].

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 626264b11b)
2011-02-11 02:54:10 +01:00
Justin Ruggles
95234e051b ac3enc: remove right shifting from lshift_tab() and make lshift unsigned.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d4582889ee)
2011-02-11 02:54:10 +01:00
Diego Elio Pettenò
e7e2df27f8 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69)
2011-01-28 03:15:34 +01:00
Justin Ruggles
eddf8f4100 ac3enc: use dsputil functions in apply_window()
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 3b924294ea)
2011-01-23 19:32:08 +01:00
Justin Ruggles
ac05f9030e 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
2011-01-05 20:35:36 +00:00
Justin Ruggles
6fd96d1a85 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
2011-01-04 11:53:44 +00:00
Justin Ruggles
ad6b2c1f6d Move fixed-point parts of the AC-3 encoder to separate files.
Originally committed as revision 26206 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-03 16:08:56 +00:00