summaryrefslogtreecommitdiff
path: root/libavcodec/binkaudio.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: build: fix standalone compilation of OMA muxer build: fix standalone compilation of Microsoft XMV demuxer build: fix standalone compilation of Core Audio Format demuxer kvmc: fix invalid reads 4xm: Add a check in decode_i_frame to prevent buffer overreads adpcm: fix IMA SMJPEG decoding options: set minimum for "threads" to zero bsd: use number of logical CPUs as automatic thread count windows: use number of CPUs as automatic thread count linux: use number of CPUs as automatic thread count pthreads: reset active_thread_type when slice thread_init returrns early v410dec: include correct headers Drop ALT_ prefix from BITSTREAM_READER_LE name. lavfi: always build vsrc_buffer. ra144enc: zero the reflection coeffs if the filter is unstable sws: readd PAL8 to isPacked() mov: Don't stick the QuickTime field ordering atom in extradata. truespeech: fix invalid reads in truespeech_apply_twopoint_filter() Conflicts: configure libavcodec/4xm.c libavcodec/avcodec.h libavfilter/Makefile libavfilter/allfilters.c libavformat/Makefile libswscale/swscale_internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Drop ALT_ prefix from BITSTREAM_READER_LE name.Diego Biurrun2011-12-22
| | | | | | | | | | The prefix is a historic remnant that probably meant "alternative". Now that the A32 bitstream reader has been dropped it makes no sense anymore.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: x86: cabac: replace explicit memory references with "m" operands avplay: don't request a stereo downmix wmapro: use av_float2int() lavc: avoid invalid memcpy() in avcodec_default_release_buffer() lavu: replace int/float punning functions lavfi: install libavfilter/vsrc_buffer.h Remove extraneous semicolons sdp: Restore the original mp4 format h264 extradata if converted rtpenc: Add support for mp4 format h264 rtpenc: Simplify code by introducing a separate end pointer movenc: Use the actual converted sample for RTP hinting Fix a bunch of common typos. Conflicts: doc/developer.texi doc/eval.texi doc/filters.texi doc/protocols.texi ffmpeg.c ffplay.c libavcodec/mpegvideo.h libavcodec/x86/cabac.h libavfilter/Makefile libavformat/avformat.h libavformat/cafdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/gxfenc.c libavformat/img2.c libavformat/movenc.c libavformat/mpegts.c libavformat/rtpenc_h264.c libavformat/utils.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavu: replace int/float punning functionsMans Rullgard2011-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing functions defined in intfloat_readwrite.[ch] are both slow and incorrect (infinities are not handled). This introduces a new header with fast, inline conversion functions using direct union punning assuming an IEEE-754 system, an assumption already made throughout the code. The one use of Intel/Motorola extended 80-bit format is replaced by simpler code sufficient under the present constraints (positive normal values). The old functions are marked deprecated and retained for compatibility. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aac_latm: reconfigure decoder on audio specific config changes latmdec: fix audio specific config parsing Add avcodec_decode_audio4(). avcodec: change number of plane pointers from 4 to 8 at next major bump. Update developers documentation with coding conventions. svq1dec: avoid undefined get_bits(0) call ARM: h264dsp_neon cosmetics ARM: make some NEON macros reusable Do not memcpy raw video frames when using null muxer fate: update asf seektest vp8: flush buffers on size changes. doc: improve general documentation for MacOSX asf: use packet dts as approximation of pts asf: do not call av_read_frame rtsp: Initialize the media_type_mask in the rtp guessing demuxer Cleaned up alacenc.c Conflicts: doc/APIchanges doc/developer.texi libavcodec/8svx.c libavcodec/aacdec.c libavcodec/ac3dec.c libavcodec/avcodec.h libavcodec/nellymoserdec.c libavcodec/tta.c libavcodec/utils.c libavcodec/version.h libavcodec/wmadec.c libavformat/asfdec.c tests/ref/seek/lavf_asf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add avcodec_decode_audio4().Justin Ruggles2011-12-02
| | | | | | | | | | | | Deprecate avcodec_decode_audio3(). Implement audio support in avcodec_default_get_buffer(). Implement the new audio decoder API in all audio decoders.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: binkaudio: expand quant_table to accommodate all possible values libx264: Set the default of the rc_lookahead option to -1 avcodec: Set flags2 default value depending on availability configure: declare dependency of h264_vaapi_hwaccel on h264_decoder Conflicts: configure libavcodec/options.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * binkaudio: expand quant_table to accommodate all possible valuesJustin Ruggles2011-11-04
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (51 commits) cin audio: use sign_extend() instead of casting to int16_t cin audio: restructure decoding loop to avoid a separate counter variable cin audio: use local variable for delta value cin audio: remove unneeded cast from void* cin audio: validate the channel count cin audio: remove unneeded AVCodecContext pointer from CinAudioContext dsicin: fix several audio-related fields in the CIN demuxer flacdec: use av_get_bytes_per_sample() to get sample size dca: handle errors from dca_decode_block() dca: return error if the frame header is invalid dca: return proper error codes instead of -1 utvideo: handle empty Huffman trees binkaudio: change short to int16_t binkaudio: only decode one block at a time. binkaudio: store interleaved overlap samples in BinkAudioContext. binkaudio: pre-calculate quantization factors binkaudio: add some buffer overread checks. atrac3: support float or int16 output using request_sample_fmt atrac3: add CODEC_CAP_SUBFRAMES capability atrac3: return appropriate error codes instead of -1 ... Conflicts: libavcodec/atrac1.c libavcodec/dca.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * binkaudio: change short to int16_tJustin Ruggles2011-10-29
| |
| * binkaudio: only decode one block at a time.Justin Ruggles2011-10-29
| | | | | | | | | | This prevents truncating output due to an output buffer that is too small for all blocks. There is no limit on the number of blocks in a packet.
| * binkaudio: store interleaved overlap samples in BinkAudioContext.Justin Ruggles2011-10-29
| | | | | | | | | | This fixes the requirement for the buffer size to be larger than the number of samples actually decoded.
| * binkaudio: pre-calculate quantization factorsJustin Ruggles2011-10-29
| |
| * binkaudio: add some buffer overread checks.Justin Ruggles2011-10-29
| | | | | | | | This stops decoding before overreads instead of after.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata. H.264: tweak some other x86 asm for Atom probe: Fix insane flow control. mpegts: remove invalid error check s302m: use nondeprecated audio sample format API lavc: use designated initialisers for all codecs. x86: cabac: add operand size suffixes missing from 6c32576 Conflicts: libavcodec/ac3enc_float.c libavcodec/flacenc.c libavcodec/frwu.c libavcodec/pictordec.c libavcodec/qtrleenc.c libavcodec/v210enc.c libavcodec/wmv2dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use designated initialisers for all codecs.Anton Khirnov2011-07-29
| | | | | | | | It's more readable and less prone to breakage.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ffserver: remove unused variable. Remove unused and outdated TODO file. gitignore: Drop individual .d ignore; it is already covered by a wildcard. lavf: deprecate AVStream.quality. bink: pass Bink version to audio decoder through extradata instead of codec_tag. libpostproc: Remove disabled code. flashsv: improve some comments and fix some wrong ones flashsv: Eliminate redundant variable indirection. flashsv: set reference frame type to full frame flashsv: replace bitstream description by a link to the specification flashsv: convert a debug av_log into av_dlog flashsv: simplify condition flashsv: return more meaningful error values flashsv: cosmetics: break some overly long lines flashsv: cosmetics: drop some unnecessary parentheses swscale: amend documentation to mention use of native depth for scaling. eval: add missing comma to tests. eval: fix memleak. H.264: make loopfilter bS const where applicable Conflicts: libavcodec/binkaudio.c libavformat/bink.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * bink: pass Bink version to audio decoder through extradata instead of codec_tag.Kostya2011-07-06
| | | | | | | | | | | | | | This is needed because not all players (e.g. MPlayer) are able to distinguish two different Bink audio decoders when codec_tag is set. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Fix bink audio playback outside of FFmpeg.Ivan Kalvachev2011-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 2 known Bink audio codecs. Additionally they have a different flavor if they are found inside Bink-b "BIKb" file. In order to guess the correct flavor, the demuxer sets the audio codec_tag to be the same as the file format tag. This causes problem because same tag is used for both audio codecs. The hack works in FFmpeg because audio codecs are identified by their codec_id, but other players rely on standard behavior. This fix removes the codec_tag hack and instead uses artificial extradata format to signal the codec flavor. This would also allow proper embedding of Bink audio in other containers. Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) ac3enc: correct the flipped sign in the ac3_fixed encoder Eliminate pointless '#if 1' statements without matching '#else'. Add AVX FFT implementation. Increase alignment of av_malloc() as needed by AVX ASM. Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX. mjpeg: Detect overreads in mjpeg_decode_scan() and error out. documentation: extend documentation for ffmpeg -aspect option APIChanges: update commit hashes for recent additions. lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums aac: add headers needed for log2f() lavc: remove FF_API_MB_Q cruft lavc: remove FF_API_RATE_EMU cruft lavc: remove FF_API_HURRY_UP cruft pad: make the filter parametric vsrc_movie: add key_frame and pict_type. vsrc_movie: fix leak in request_frame() lavfi: add key_frame and pict_type to AVFilterBufferRefVideo. vsrc_buffer: add sample_aspect_ratio fields to arguments. lavfi: add fieldorder filter scale: make the filter parametric ... Conflicts: Changelog doc/filters.texi ffmpeg.c libavcodec/ac3dec.h libavcodec/dsputil.c libavfilter/avfilter.h libavfilter/vf_scale.c libavfilter/vf_yadif.c libavfilter/vsrc_buffer.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add AVX FFT implementation.Vitor Sessak2011-04-26
| | | | | | | | Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* | Merge remote-tracking branch 'newdev/master'Michael Niedermayer2011-03-21
|\| | | | | | | Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Move dct and rdft definitions to separate filesMans Rullgard2011-03-20
| | | | | | | | | | | | | | This leaves fft.h with only the core FFT and MDCT definitions thus making it more managable. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * fft: remove inline wrappers for function pointersMans Rullgard2011-03-19
| | | | | | | | | | | | | | 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>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Bink version 'b' audio decoderPeter Ross2011-02-25
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * binkaudio: simplify frame_len_bits and frame_len calculationPeter Ross2011-02-25
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * binkaudio: remove unnecessary loopPeter Ross2011-02-25
| | | | | | | | | | | | | | decode_init sets bands[0] == 2, so this loop always sets the band table index (k) to zero. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * binkaudio: perform band table scaling in decode_initPeter Ross2011-02-25
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * binkaudio: remove unused copy of AVCodecContext*Peter Ross2011-02-15
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * binkaudio: fix channel count checkPeter Ross2011-02-15
| | | | | | | | | | | | | | | | | | Perform validity check on AVFormatContext.channels instead of uninitialised field. This fixes issue 2001. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Separate format conversion DSP functions from DSPContext.Justin Ruggles2011-02-02
| | | | | | | | | | | | | | 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>
| * Remove the add bias hack for the C version of DSPContext.float_to_int16_*().Justin Ruggles2011-01-28
| |
| * Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-26
| | | | | | | | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Bink version 'b' audio decoderPeter Ross2011-02-26
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit ccfcddb3f287545a20831f266c2a2f734d6a9f31)
* | binkaudio: simplify frame_len_bits and frame_len calculationPeter Ross2011-02-26
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 8a8c283edd0da5863eb729a31a94b70820400941)
* | binkaudio: remove unnecessary loopPeter Ross2011-02-26
| | | | | | | | | | | | | | | | decode_init sets bands[0] == 2, so this loop always sets the band table index (k) to zero. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit a304def1dca50d63bf2a39651f84792980db3508)
* | binkaudio: perform band table scaling in decode_initPeter Ross2011-02-26
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 582ac86d19c61ad73c2e1a2d5ed54a5fe1e20bd1)
* | binkaudio: remove unused copy of AVCodecContext*Peter Ross2011-02-15
| | | | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 71f88b1f3843fdb676d6f72181da0c8c460341d8)
* | binkaudio: fix channel count checkPeter Ross2011-02-15
| | | | | | | | | | | | | | | | | | | | Perform validity check on AVFormatContext.channels instead of uninitialised field. This fixes issue 2001. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 9806fbd5351fa84f99fa5b18fe06859acb514f34)
* | Separate format conversion DSP functions from DSPContext.Justin Ruggles2011-02-04
| | | | | | | | | | | | | | | | 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> (cherry picked from commit c73d99e672329c8f2df290736ffc474c360ac4ae)
* | Remove the add bias hack for the C version of DSPContext.float_to_int16_*().Justin Ruggles2011-01-28
| | | | | | | | (cherry picked from commit 9d06d7bce3babb82ed650c13ed13a57f6f626a71)
* | Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-28
|/ | | | | | | | 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 d36beb3f6902b1217beda576aa18abf7eb72b03c)
* Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enumStefano Sabatini2010-11-12
| | | | | | SampleFormat with AVSampleFormat. Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make code using 1d-DCT consistent with the API changeVitor Sessak2010-04-03
| | | | Originally committed as revision 22792 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make binkaudio work with ff_float_to_int16_interleave_c (martin at martin ↵Peter Ross2010-03-11
| | | | | | dot st) Originally committed as revision 22466 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Give RDFT types more meaningful namesMåns Rullgård2010-03-07
| | | | Originally committed as revision 22290 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move FFT parts from dsputil.h to fft.hMåns Rullgård2010-03-06
| | | | Originally committed as revision 22235 to svn://svn.ffmpeg.org/ffmpeg/trunk