summaryrefslogtreecommitdiff
path: root/libavcodec/dca_parser.c
Commit message (Collapse)AuthorAge
* avcodec/dca: Unavpriv dca_sample_ratesAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | | | | Said table is 64 bytes long and exported so that it can be used both in libavcodec and libavformat. This commit stops doing so and instead duplicates it for shared builds, because the overhead of exporting the symbol is bigger than 64 bytes. It consists of the length of the name of the symbol (2x24 bytes), two entries in .dynsym (2x24 bytes), two entries for symbol version (2x2 bytes), one hash value in the exporting library (4 bytes) in addition to one entry in the importing library's .got and .rela.dyn (8 + 24 bytes). (The above numbers are for a Linux/GNU/Elf system; the numbers for other platforms may be different.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Constify all the AVCodecParsersAndreas Rheinhardt2021-04-27
| | | | | | | Possible now that the next pointer no longer exists. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca_parser: revert to conservative sync distance estimationfoo862017-10-09
| | | | | | | Fixes regression introduced by commit a0349ae27c127df8c72de1c30dc4090360ec7ef4 when parsing 14-bit streams with excessive frame size stored in header. Fixes ticket #6723.
* avcodec/dca: remove GetBitContext usage from ↵James Almer2017-07-21
| | | | | | | | | avpriv_dca_parse_core_frame_header() This prevents potential ABI issues with GetBitContext. Reviewed-by: foo86 <foobaz86@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca_parser: avoid use of magic valuesfoo862017-07-18
| | | | | | | Duration computation can be simplified because number of PCM blocks is only allowed to be a multiple of 8. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca_parser: export profile informationfoo862017-07-18
| | | | | | | Permits applications to access DTS profile information without having to decode a frame. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca_parser: switch to common frame header parsing functionfoo862017-07-18
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca_parser: skip initial paddingfoo862016-05-31
| | | | | | | Padding before the first sync word can be very large for DTS-in-WAV streams. There is no reason to include this padding in parsed packet. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca_parser: simplify state machinefoo862016-05-31
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: move EXSS sampling frequency arrays to dca.cfoo862016-05-26
| | | | | | Avoids unwanted parser dependency on dcadata. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca_parser: set duration for core-less streamsfoo862016-05-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca_parser: improve frame end searchfoo862016-05-20
| | | | | | | | | | | | | Parse core frame size directly when searching for frame end instead of using value extracted from previous frame. Account for unused bits when calculating sync word distance for 14-bit streams to avoid alias sync detection. Parse EXSS frame size and skip over EXSS frame to avoid alias sync detection. Signed-off-by: James Almer <jamrial@gmail.com>
* dca_parser: ensure frame duration matches the actual sample rateHendrik Leppkes2016-02-04
| | | | | | | The parser only parses the core, and thus has a duration relative to the core sample rate only, not the actual stream sample rate. FATE references changed due to now correct timestamps.
* dca_parser: don't overwrite the sample rate, it may not be correctHendrik Leppkes2015-10-20
| | | | | | | | | | | | The parser only reads the dca core sample rate, which is limited to a maximum of 48000 Hz, while X96 and HD extensions can increase the sample rate up to 192000 Hz. This change prevents the parser and decoder fighting over the sample rate, potentially confusing user applications. This also fixes sample rate display of >48000Hz files with ffmpeg/ffprobe when using libdcadec. Fixes ticket #4397
* Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '0670acc4f1c4ceb16968818a654e07a3f550a8c9'Michael Niedermayer2015-05-12
|\| | | | | | | | | | | | | | | | | | | | | * commit '0670acc4f1c4ceb16968818a654e07a3f550a8c9': dca_parser: Extend DTS core sync word and fix existing check Conflicts: libavcodec/dca_parser.c See: e80b2b9c81716a5d9f559c04cfe69d76b04e4cd3 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca_parser: Extend DTS core sync word and fix existing checkfoo862015-05-12
| | | | | | | | | | | | | | | | | | | | | | | | The previous version checked for 14-bit streams and did not properly work across buffer boundaries. Use the 64-bit parser state to make extended sync word detection work across buffer boundary and check the extended sync word for 16-bit LE and BE core streams to reduce probability of alias sync detection. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec/dca_parser: Extend DTS core sync word and fix existing checkfoo862015-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check extended sync word for 16-bit LE and BE core streams to reduce probability of alias sync detection. Previously sync word extension was checked only for 14-bit streams (and this check did not properly work across buffer boundary). Use 64-bit parser state to make extended sync word detection work across buffer boundary. This is sufficient to make the sample in ticket #4492 parse successfully. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '25f613f8be3b51e4396b93cda131e4631ba54302'Michael Niedermayer2015-03-04
|\| | | | | | | | | | | | | | | | | | | | | * commit '25f613f8be3b51e4396b93cda131e4631ba54302': dca: Move syncword definitions to a separate header Conflicts: libavcodec/dca_parser.c libavformat/dtsdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca: Move syncword definitions to a separate headerDiego Biurrun2015-03-04
| |
* | Merge commit '45ff7c93dd84a254cc96acc589e5ac3d7bd16bce'Michael Niedermayer2014-09-16
|\| | | | | | | | | | | | | | | | | | | | | * commit '45ff7c93dd84a254cc96acc589e5ac3d7bd16bce': dca: K&R formatting cosmetics Conflicts: libavcodec/dca_parser.c libavcodec/dcadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca: K&R formatting cosmeticsGabriel Dume2014-09-16
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avcodec/dca: Make ff_dca_convert_bitstream() available to libavformat, ↵Michael Niedermayer2014-08-06
| | | | | | | | | | | | needed for dts_probe() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '8411baf6f0a42bdd61f00f34aa9efec7e138b5f2'Michael Niedermayer2013-09-18
|\| | | | | | | | | | | | | | | | | | | * commit '8411baf6f0a42bdd61f00f34aa9efec7e138b5f2': dca_parser: Handle changes in DCA frame size Conflicts: libavcodec/dca_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca_parser: Handle changes in DCA frame sizeJohn Stebbins2013-09-17
| | | | | | | | | | | | | | | | A change in framesize caused a perpetual loss of synchronization. So read (and use) the frame size from the frame header instead of setting it only once. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '1db6a080bddd14fed6b29140ecd2e21e42b1c022'Michael Niedermayer2013-03-28
|\| | | | | | | | | | | | | | | | | | | | | * commit '1db6a080bddd14fed6b29140ecd2e21e42b1c022': dca: Move ff_dca_convert_bitstream() to the DCA common code vdpau: wrap codec specific functions in appropiate #ifs Conflicts: libavcodec/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca: Move ff_dca_convert_bitstream() to the DCA common codeDiego Biurrun2013-03-27
| | | | | | | | This makes the DCA parser and decoder independent.
* | Merge commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03'Michael Niedermayer2012-11-02
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03': dcadec: allow the decoder to change the channel layout mid-stream cook: use av_dlog() for debug logging instead of av_log() with AV_LOG_ERROR cook: move samples_per_frame from COOKSubpacket to where it is used cook: use av_get_channel_layout_nb_channels() instead of cook_count_channels() cook: reverse a condition so that the code makes more sense cook: remove unneeded COOKContext variable, sample_rate cook: remove unneeded COOKContext variable, bit_rate cook: use AVCodecContext.channels instead of keeping a private copy bmvaudio: set channel layout at init() rather than validating it atrac1: do not keep a copy of channel count in the private context dsicinaudio: set channels and channel layout g722dec: set channel layout at initialization instead of validating it amrwbdec: set channels, channel_layout, and sample_rate amrnbdec: set channels, channel_layout, and sample_rate dca_parser: allow the parser to change the sample rate lavc: check channel count after decoder init lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders Conflicts: libavcodec/dcadec.c libavcodec/pcm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca_parser: allow the parser to change the sample rateJustin Ruggles2012-11-01
| |
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dca: Switch dca_sample_rates to avpriv_ prefix; it is used across libs ARM: use =const syntax instead of explicit literal pools ARM: use standard syntax for all LDRD/STRD instructions fft: port FFT/IMDCT 3dnow functions to yasm, and disable on x86-64. dct-test: allow to compile without HAVE_INLINE_ASM. x86/dsputilenc: bury inline asm under HAVE_INLINE_ASM. dca: Move tables used outside of dcadec.c to a separate file. dca: Rename dca.c ---> dcadec.c x86: h264dsp: Remove unused variable ff_pb_3_1 apetag: change a forgotten return to return 0 Conflicts: libavcodec/Makefile libavcodec/dca.c libavcodec/x86/fft_3dn.c libavcodec/x86/fft_3dn2.c libavcodec/x86/fft_mmx.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca: Switch dca_sample_rates to avpriv_ prefix; it is used across libsDiego Biurrun2012-08-01
| |
| * dca: Move tables used outside of dcadec.c to a separate file.Diego Biurrun2012-08-01
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (31 commits) cdxl demux: do not create packets with uninitialized data at EOF. Replace computations of remaining bits with calls to get_bits_left(). amrnb/amrwb: Remove get_bits usage. cosmetics: reindent avformat: do not require a pixel/sample format if there is no decoder avformat: do not fill-in audio packet duration in compute_pkt_fields() lavf: Use av_get_audio_frame_duration() in get_audio_frame_size() dca_parser: parse the sample rate and frame durations libspeexdec: do not set AVCodecContext.frame_size libopencore-amr: do not set AVCodecContext.frame_size alsdec: do not set AVCodecContext.frame_size siff: do not set AVCodecContext.frame_size amr demuxer: do not set AVCodecContext.frame_size. aiffdec: do not set AVCodecContext.frame_size mov: do not set AVCodecContext.frame_size ape: do not set AVCodecContext.frame_size. rdt: remove workaround for infinite loop with aac avformat: do not require frame_size in avformat_find_stream_info() for CELT avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3 avformat: do not require frame_size in avformat_find_stream_info() for AAC ... Conflicts: doc/APIchanges libavcodec/Makefile libavcodec/avcodec.h libavcodec/h264.c libavcodec/h264_ps.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/dsputil_mmx.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca_parser: parse the sample rate and frame durationsJustin Ruggles2012-03-05
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: doxygen: misc consistency, spelling and wording fixes vcr1: drop unnecessary emms_c() calls without MMX code Replace all uses of av_close_input_file() with avformat_close_input(). lavf: add avformat_close_input(). lavf: deprecate av_close_input_stream(). lavf doxy: add some basic demuxing documentation. lavf doxy: add some general lavf information. lavf doxy: add misc utility functions to a group. lavf doxy: add av_guess_codec/format to the encoding group. lavf doxy: add core functions to a doxy group. Add basic libavdevice documentation. lavc: convert error_recognition to err_recognition. avconv: update -map option help text x86: Require 7 registers for the cabac asm x86: bswap: remove test for bswap instruction bswap: make generic implementation more compiler-friendly h264: remove useless cast proresdec: fix decode_slice() prototype Conflicts: configure doc/APIchanges ffprobe.c libavcodec/avcodec.h libavcodec/celp_math.h libavcodec/h264.c libavfilter/src_movie.c libavformat/anm.c libavformat/avformat.h libavformat/version.h libavutil/avstring.h libavutil/bswap.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * doxygen: misc consistency, spelling and wording fixesDiego Biurrun2011-12-12
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (44 commits) replacement Indeo 3 decoder gsm demuxer: do not allocate packet twice. flvenc: use first packet delay as global delay. ac3enc: doxygen update. imc: return error codes instead of 0 for error conditions. imc: return meaningful error codes instead of -1 imc: do not set channel layout for stereo imc: validate channel count imc: check for ff_fft_init() failure imc: check output buffer size before decoding imc: use DSPContext.bswap16_buf() to byte-swap packet data rtsp: add allowed_media_types option libgsm: add flush function to reset the decoder state when seeking libgsm: simplify decoding by using a loop gsm: log error message when packet is too small libgsmdec: do not needlessly set *data_size to 0 gsmdec: do not needlessly set *data_size to 0 gsmdec: add flush function to reset the decoder state when seeking libgsmdec: check output buffer size before decoding gsmdec: log error message when output buffer is too small. ... Conflicts: Changelog ffplay.c libavcodec/indeo3.c libavcodec/mjpeg_parser.c libavcodec/vp3.c libavformat/cutils.c libavformat/id3v2.c libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use designated initialisers for parsers.Anton Khirnov2011-11-02
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * 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>
* | Fix a regression in the dca parser introduced by dts express support.Hendrik Leppkes2011-10-28
| | | | | | | | | | | | | | | | | | | | The dca parser needs to check that the framesize is actually of a complete frame, and not of a partial DTS-HD frame, which is not constant size, and thus the check would fail. (cherry picked from commit ebc0ccb9af59b78732e82c09f8c90b1d46b478e0) Review-by: Benjamin Larsson Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dca_parser: Add support for parsing dts expressHendrik Leppkes2011-10-28
| | | | | | | | | | | | | | (cherry picked from commit ea36f60493f675db531dc2dbef04fb60fbc21a6a) Review-by: Benjamin Larsson Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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)
* 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
* Use full internal pathname in doxygen @file directives.Diego Biurrun2009-02-01
| | | | | | | Otherwise doxygen complains about ambiguous filenames when files exist under the same name in different subdirectories. Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add support for parsing and decoding DCA-HD streams.Kostya Shishkov2008-11-29
| | | | Originally committed as revision 15951 to svn://svn.ffmpeg.org/ffmpeg/trunk
* DCA frame size is constantKostya Shishkov2008-04-15
| | | | Originally committed as revision 12835 to svn://svn.ffmpeg.org/ffmpeg/trunk