Due to a shortcoming in the AAC specification, if an all zero buffer is
fed to section data decoding it will never terminate. That means without
a buffer exhaustion check decode_band_types() will consume all input
buffer padding. Worse if a get_bits() implementation that returns zeros
when padding is exhausted is used, the function will never terminate.
The fixes that by added a buffer exhaustion check in the sectioning
decoding loop.
Originally committed as revision 22044 to svn://svn.ffmpeg.org/ffmpeg/trunk
Using the low-level macros directly avoids redundant open/update/close
cycles.
2-3% faster on ARM, PPC, and Core i7.
Originally committed as revision 21224 to svn://svn.ffmpeg.org/ffmpeg/trunk
Simplify cur_band_type, group_len, and coef/offset calculations. This
makes the code easier to read and slightly faster.
Originally committed as revision 21189 to svn://svn.ffmpeg.org/ffmpeg/trunk
The codebooks each consist of small number of values repeated in
groups of 2 or 4. Storing the codebooks as a packed list of 2- or
4-bit indexes into a table reduces their size substantially (from 7.5k
to 1.5k), resulting in less cache pressure.
For the band types with sign bits in the bitstream, storing the number
and position of non-zero codebook values using a few bits avoids
multiple get_bits() calls and floating-point comparisons which gcc
handles miserably.
Some float/int type punning also avoids gcc brain damage.
Overall speedup 20-35% on Cortex-A8, 20% on Core i7.
Originally committed as revision 21188 to svn://svn.ffmpeg.org/ffmpeg/trunk
The maximum length of escape_sequence is 21 bits, so adjust limit in
code to match this.
Up to 10% faster on Cortex-A8.
Originally committed as revision 21153 to svn://svn.ffmpeg.org/ffmpeg/trunk
The maximum length of escape_sequence is 21 bits, so adjust limit in
code to match this. Also fix the comment.
Originally committed as revision 21151 to svn://svn.ffmpeg.org/ffmpeg/trunk
non extradata formats. Instead lock it only after the successful decoding of a
frame. This fixes issue 999.
Originally committed as revision 20448 to svn://svn.ffmpeg.org/ffmpeg/trunk
signalled as having a channel configuration of 1 in output_configure().
Previously this didn't matter but it does now.
Originally committed as revision 20193 to svn://svn.ffmpeg.org/ffmpeg/trunk
current code doesn't handle them properly, and they are a dubious construction
at best.
Originally committed as revision 19399 to svn://svn.ffmpeg.org/ffmpeg/trunk
Scaling (i)MDCT output has no runtime overhead and can be used to improve
performance of audio codecs. All the changes are only needed in
'ff_mdct_init' function and slow down initialization a bit.
Originally committed as revision 18855 to svn://svn.ffmpeg.org/ffmpeg/trunk
AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows
passing of packet-specific flags from demuxer to decoder, such as the keyframe
flag, which appears necessary to playback corePNG P-frames.
Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread
"Google Summer of Code participation" on the mailinglist.
Originally committed as revision 18351 to svn://svn.ffmpeg.org/ffmpeg/trunk