summaryrefslogtreecommitdiff
path: root/libavcodec/dca.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>
* Avoid intermediate bitcount for number of bytes in PutBitContextAndreas Rheinhardt2021-03-30
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dca: return standard error codes in avpriv_dca_parse_core_frame_header()James Almer2017-11-01
| | | | | | | | This prevents making the DCAParseError enum part of the ABI. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: foo86 <foobaz86@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/tak: make buf const in avpriv_dca_parse_core_frame_header()James Almer2017-10-22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* 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: add avpriv_dca_parse_core_frame_header()foo862017-07-18
| | | | | | | | There are 3 different places where DCA core frame header is parsed: decoder, parser and demuxer. Each one uses ad-hoc code. Add common core frame header parsing function that will be used in all places. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: move bits per sample array to dca.cfoo862017-07-18
| | | | | | | It will be used by the parser. This change avoids unwanted parser dependency on dcadata. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: support EXSS marker in avpriv_dca_convert_bitstream()foo862016-05-31
| | | | | | | This is now required by dcadec_decode_frame(). All remaining users of avpriv_dca_convert_bitstream() have been updated to expect EXSS marker. 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>
* dca: fix misaligned access in avpriv_dca_convert_bitstreamAndreas Cadhalpun2016-01-14
| | | | | | | | | | | src and dst are only 8-bit-aligned, so accessing them as uint16_t causes SIGBUS crashes on architectures like sparc. This fixes ubsan runtime error: load of misaligned address for type 'const uint16_t', which requires 2 byte alignment Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* 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 remote-tracking branch 'qatar/master'Michael Niedermayer2014-03-04
|\| | | | | | | | | | | | | | | | | | | * qatar/master: put_bits: Remove unused includes Conflicts: libavcodec/put_bits.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * put_bits: Remove unused includesVittorio Giovara2014-03-04
| | | | | | | | | | This requires adding includes to other files that relied on these being included implicitly.
* | 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 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
| |
| * dca: Rename dca.c ---> dcadec.cDiego Biurrun2012-08-01
| | | | | | | | This will allow adding dca.c with tables used from other files.
* | Fix DCA-XXCH extension scaling for embedded downmixes.Nick Brereton2012-07-16
| | | | | | | | | | Reviewed-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix ordering of XXCH downmix coefficients.Nick Brereton2012-07-16
| | | | | | | | | | Reviewed-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dca: map xxch side channels to AV_CH_SIDE_LEFT/RIGHT instead of REAR.Hendrik Leppkes2012-07-12
| | | | | | | | | | | | | | | | | | This fixes decoding of certain 7.1 DTS-HD HRA files, as well as matches the spec better. Table 6-22 in the DTS spec labels the two channels "Left/Right surround on side", and not rear. Reviewed-by: Benjamin Larsson <benjamin@southpole.se> Reviewed-by: Nick Brereton <nick@nbrereton.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dca: favor native over ffmpeg in table nameMichael Niedermayer2012-06-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dca: fix project reference in table nameMichael Niedermayer2012-06-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Generate channel layout, reordering for DTS-XXCH extension and, undo ↵Nick Brereton2012-06-28
| | | | | | | | | | | | | | embedded downmixes Reviewed-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Parse & decode DTS XXCH framesNick Brereton2012-06-28
| | | | | | | | | | Reviewed-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (24 commits) flvdec: remove incomplete, disabled seeking code mem: add support for _aligned_malloc() as found on Windows lavc: Extend the documentation for avcodec_init_packet flvdec: remove incomplete, disabled seeking code http: replace atoll() with strtoll() mpegts: remove unused/incomplete/broken seeking code af_amix: allow float planar sample format as input af_amix: use AVFloatDSPContext.vector_fmac_scalar() float_dsp: add x86-optimized functions for vector_fmac_scalar() float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil lavr: Add x86-optimized function for flt to s32 conversion lavr: Add x86-optimized function for flt to s16 conversion lavr: Add x86-optimized functions for s32 to flt conversion lavr: Add x86-optimized functions for s32 to s16 conversion lavr: Add x86-optimized functions for s16 to flt conversion lavr: Add x86-optimized function for s16 to s32 conversion rtpenc: Support packetizing iLBC rtpdec: Add a depacketizer for iLBC Implement the iLBC storage file format mov: Support muxing/demuxing iLBC ... Conflicts: Changelog configure libavcodec/avcodec.h libavcodec/dsputil.c libavcodec/version.h libavformat/movenc.c libavformat/mpegts.c libavformat/version.h libavutil/mem.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * float_dsp: Move vector_fmac_scalar() from libavcodec to libavutilJustin Ruggles2012-06-18
| |
* | Decode XBR extension in first assetNick Brereton2012-05-07
| | | | | | | | | | Reviewed-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dcadec: fix global array overread.Michael Niedermayer2012-04-16
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ttadec: unbreak playback of matroska files vorbisdec: avoid invalid memory access Fix uninitialized reads on malformed ogg files. huffyuv: add padding to classic (v1) huffman tables. png: convert to bytestream2 API. dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2 avs: fix infinite loop on end-of-stream. tiffdec: Prevent illegal memory access caused by recycled pointers. rtpenc: Fix the AVRational used for av_rescale_q_rnd wma: fix off-by-one in array bounds check. Conflicts: libavcodec/huffyuv.c libavcodec/pngdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2Kostya Shishkov2012-03-08
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) sbrdsp.asm: convert all instructions to float/SSE ones. dv: cosmetics. dv: check buffer size before reading profile. Revert "AAC SBR: group some writes." udp: Print an error message if bind fails cook: extend channel uncoupling tables so the full bit range is covered. roqvideo: cosmetics. roqvideo: convert to bytestream2 API. dca: don't use av_clip_uintp2(). wmall: fix build with -DDEBUG enabled. smc: port to bytestream2 API. AAC SBR: group some writes. dsputil: remove shift parameter from scalarproduct_int16 SBR DSP: unroll sum_square rv34: remove dead code in intra availability check rv34: clean a bit availability checks. v4l2: update documentation tgq: convert to bytestream2 API. parser: remove forward declaration of MpegEncContext dca: prevent accessing static arrays with invalid indexes. ... Conflicts: doc/indevs.texi libavcodec/Makefile libavcodec/dca.c libavcodec/dvdata.c libavcodec/eatgq.c libavcodec/mmvideo.c libavcodec/roqvideodec.c libavcodec/smc.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca: don't use av_clip_uintp2().Ronald S. Bultje2012-03-07
| | | | | | | | | | The argument is not a literal, thus causing the ARM v6 or later builds to break.
| * dca: prevent accessing static arrays with invalid indexes.Ronald S. Bultje2012-03-07
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | 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
| |
* | dca: dont overread dca_default_coeffs.Michael Niedermayer2012-02-29
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dca: Check scale_sum.Michael Niedermayer2012-02-29
| | | | | | | | | | | | | | Fixes a out of array read. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dca: Check LFEScaleIndex.Michael Niedermayer2012-02-29
| | | | | | | | | | | | | | | | Its not clear from the spec what to do with values larger than 127 so iam opting for the safe side and ask for a sample. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (27 commits) ppc: Add ff_ prefix to nonstatic symbols sh4: Add ff_ prefix to nonstatic symbols mpegvideo: Add ff_ prefix to nonstatic functions rtjpeg: Add ff_ prefix to nonstatic symbols rv: Add ff_ prefix to nonstatic symbols vp56: Add ff_ prefix to nonstatic symbols vorbis: Add ff_ prefix to nonstatic symbols msmpeg4: Add ff_ prefix to nonstatic symbols vc1: Add ff_ prefix to nonstatic symbols msmpeg4: Add ff_ prefixes to nonstatic symbols snow: Add ff_ prefix to nonstatic symbols mpeg12: Add ff_ prefix to nonstatic symbols mpeg4: Add ff_ prefixes to nonstatic symbols lagarith: Add ff_ prefix to lag_rac_init libavcodec: Add ff_ prefix to j_rev_dct* dsputil: Add ff_ prefix to inv_zigzag_direct16 libavcodec: Prefix fdct_ifast, fdct_ifast248 dsputil: Add ff_ prefix to the dsputil*_init* functions libavcodec: Add ff_ prefix to some nonstatic symbols vlc/rl: Add ff_ prefix to the nonstatic symbols ... Conflicts: libavcodec/Makefile libavcodec/allcodecs.c libavcodec/dnxhddec.c libavcodec/ffv1.c libavcodec/h263.h libavcodec/h263dec.c libavcodec/h264.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/nuv.c libavcodec/ppc/dsputil_ppc.c libavcodec/proresdsp.c libavcodec/svq3.c libavcodec/version.h libavformat/dv.h libavformat/dvenc.c libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Add ff_ prefix to the dsputil*_init* functionsMartin Storsjö2012-02-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | dca: Fix uninitialized variable warnings.Michael Niedermayer2012-01-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: fate: add dxtory test adx_parser: rewrite. adxdec: Validate channel count to fix a division by zero. adxdec: Do not require extradata. cmdutils: K&R reformatting cosmetics alacdec: implement the 2-pass prediction type. alacenc: implement the 2-pass prediction type. alacenc: do not generate invalid multi-channel ALAC files alacdec: fill in missing or guessed info about the extradata format. utvideo: proper median prediction for interlaced videos lavu: bump lavu minor for av_popcount64 dca: K&R formatting cosmetics dct: K&R formatting cosmetics lavf: flush decoders in avformat_find_stream_info(). win32: detect number of CPUs using affinity Add av_popcount64 snow: Restore three mistakenly removed casts. Conflicts: cmdutils.c doc/APIchanges libavcodec/adx_parser.c libavcodec/adxdec.c libavcodec/alacenc.c libavutil/avutil.h tests/fate/screen.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dca: K&R formatting cosmeticsShitiz Garg2012-01-03
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | 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>