Commit Graph

18 Commits

Author SHA1 Message Date
Justin Ruggles e0cc66df61 ac3enc: split templated float vs. fixed functions into a separate file.
Function pointers are used for templated functions instead of needlessly
duplicating many functions.
2011-06-13 16:49:35 -04:00
Justin Ruggles 7f3a7b5c40 ac3enc: add channel coupling support
Channel coupling is an optional AC-3 feature that increases quality by
combining high frequency information from multiple channels into a
single channel. The per-channel high frequency information is sent with
less accuracy in both the frequency and time domains. This allows more
bits to be used for lower frequencies while preserving enough
information to reconstruct the high frequencies.
2011-05-24 07:52:31 +02:00
Justin Ruggles 79ee8977c2 ac3enc: correct the flipped sign in the ac3_fixed encoder 2011-04-26 17:19:37 -04:00
Janne Grunau 6ad2bafcfd ac3: fix memleak in fixed-point encoder
caused by typo in mdct_end
2011-04-25 20:27:05 +02:00
Mans Rullgard 79997def65 ac3enc: use generic fixed-point mdct
This makes the AC3 encoder use the shared fixed-point MDCT rather
than its own implementation.  The checksum changes are due to
different rounding in the MDCT.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-03 19:01:53 +01:00
Justin Ruggles 991f3de1bb ac3enc: Add codec-specific options for writing AC-3 metadata. 2011-03-27 11:30:09 -04:00
Justin Ruggles e6e9823488 Add apply_window_int16() to DSPContext with x86-optimized versions and use it
in the ac3_fixed encoder.
2011-03-22 21:08:30 -04:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Justin Ruggles f1efbca5e9 ac3enc: add SIMD-optimized shifting functions for use with the fixed-point AC3 encoder. 2011-03-14 08:45:31 -04:00
Justin 323e6fead0 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.
2011-03-14 08:45:26 -04:00
Justin Ruggles fbb6b49dab 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>
2011-02-13 16:49:39 -05:00
Justin Ruggles 626264b11b 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>
2011-02-10 23:16:23 +00:00
Justin Ruggles d4582889ee ac3enc: remove right shifting from lshift_tab() and make lshift unsigned.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 23:16:22 +00:00
Diego Elio Pettenò d36beb3f69 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>
2011-01-26 16:08:45 +00:00
Justin Ruggles 3b924294ea ac3enc: use dsputil functions in apply_window()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-22 17:53:28 +00: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