According to ISO 9899:1999 S 6.5.7/4:
The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits
are filled with zeros. If E1 has an unsigned type, the value of the
result is E1× 2^E2, reduced modulo one more than the maximum value
representable in the result type. If E1 has a signed type and
nonnegative value, and E1× 2^E2 is representable in the result type, then
that is the resulting value; otherwise, the behavior is undefined.
These windows do not really belong in fft/mdct files and were
easily confused with the similarly named tables used by rdft.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This function is not tightly coupled to mdct, and it's in the way
of making a fixed-point mdct implementation.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This removes the rather pointless wrappers (one not even inline)
for calling the fft_calc and related function pointers.
Signed-off-by: Mans Rullgard <mans@mansr.com>
When decoding latm config, use the corresponding aac context and its
m4ac instead of using NULL and a local variable. This fixes decoding of
audio in MPEG TS from SBTVD (the Brazillian Digital TV Sytem), when
there is no extradata. This is the case when using the decoder with
gst-ffmpeg and a GStreamer mpegts demuxer.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This will be beneficial for use with the audio conversion API without
requiring it to depend on all of dsputil.
Signed-off-by: Mans Rullgard <mans@mansr.com>
With the removal of the libmpeg2 bitstream reader, MIN_CACHE_BITS
is always >= 25, so tests against smaller values can be removed.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Muxlength does not include the 3 bytes of AudioSyncStream() before the
AudioMuxElement(). If these three bytes are not accounted for the last three
bytes of the LATM packet are sent back to the decoder again.
Fixes issue244/mux2.share.ts
Originally committed as revision 25685 to svn://svn.ffmpeg.org/ffmpeg/trunk
Spotted by Alex after Carl Eugen found errors some samples. There no errors or
noticeable artifacts in the samples I used during development.
Originally committed as revision 25676 to svn://svn.ffmpeg.org/ffmpeg/trunk
The decoder is just a wrapper around the AAC decoder.
based on patch by Paul Kendall { paul <ät> kcbbs gen nz }
Originally committed as revision 25642 to svn://svn.ffmpeg.org/ffmpeg/trunk
Use avctx in all called functions. This allows passing a NULL AACContext
for LATM since the AACContext is only used in output_configure() which
is skipped for LATM parsing.
Originally committed as revision 25641 to svn://svn.ffmpeg.org/ffmpeg/trunk
aac_decode_frame() remains as AVPacket handling a wrapper. The actual
decoding function takes a GetBitContext as input and will be used be the
AAC LATM decoder to avoid copying the unaligned AAC bitstream.
Originally committed as revision 25640 to svn://svn.ffmpeg.org/ffmpeg/trunk
This will be used by the latm decoder to avoid AACContext changes during
audio specific config parsing.
Originally committed as revision 25638 to svn://svn.ffmpeg.org/ffmpeg/trunk
For a PCE based configuration map the channels solely based on tags.
For an indexed configuration map the channels solely based on position.
This works with all known exotic samples including al17, elem_id0, bad_concat,
and lfe_is_sce.
Originally committed as revision 25098 to svn://svn.ffmpeg.org/ffmpeg/trunk
The AAC decoder and ADTS-to-ASC BSF both require the header decoder
but not full parsing capabilities.
Originally committed as revision 24217 to svn://svn.ffmpeg.org/ffmpeg/trunk
It created false positives on seeks and where the first frame is STOP or SHORT.
It failed to warn in illegal SHORT->LONG transitions. In general it created
much confusion and many junk bug reports from the users.
Originally committed as revision 24214 to svn://svn.ffmpeg.org/ffmpeg/trunk