summaryrefslogtreecommitdiff
path: root/libavcodec/ac3.c
Commit message (Collapse)AuthorAge
* avcodec/ac3: Move non-(de|en)coder-only parts out of ac3.hAndreas Rheinhardt2022-05-15
| | | | | | | | | | Move AC3HeaderInfo into ac3_parser_internal.h and the rest into a new header ac3defs.h. This also breaks an include cycle of ac3.h and ac3tab.h (the latter now only needs ac3defs.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3tab: Move some tables only used by ac3.c to itAndreas Rheinhardt2022-05-15
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove unnecessary libavutil/(avutil|common|internal).h inclusionsAndreas Rheinhardt2022-02-24
| | | | | | | | | | Some of these were made possible by moving several common macros to libavutil/macros.h. While just at it, also improve the other headers a bit. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove/replace some unnecessary avcodec.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | Also remove other unnecessary headers and include headers directly while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Merge commit 'b7f98659f21dce438c33b512e25fd64b8d07c347'Clément Bœsch2016-06-29
|\ | | | | | | | | | | | | * commit 'b7f98659f21dce438c33b512e25fd64b8d07c347': Remove unnecessary get_bits.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Remove unnecessary get_bits.h #includesDiego Biurrun2016-06-07
| |
* | avcodec/ac3: always use hardcoded tablesGanesh Ajjanagadde2015-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The table in question is a 253 byte one. In fact, it turns out that dynamic generation of the table results in an increased binary size. Code compiled with GCC 5.2.0, x86-64 (size in bytes), before and after patch: old: 62321064 libavcodec/libavcodec.so.57 new: 62320536 libavcodec/libavcodec.so.57 Thus, it always make sense to statically allocate this. Tested with FATE with/without --enable-hardcoded-tables. Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | ac3: validate end in ff_ac3_bit_alloc_calc_maskAndreas Cadhalpun2015-04-16
| | | | | | | | | | | | | | | | | | | | | | This fixes an invalid read if end is 0: band_end = ff_ac3_bin_to_band_tab[end-1] + 1; Depending on what is before the array, this can cause stack smashing, when band_end becomes too large. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/ac3: Fix undefined shift in ff_ac3_bit_alloc_calc_mask()Michael Niedermayer2015-03-15
| | | | | | | | | | | | Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ac3dec: fix processing of delta bit allocation information. vc1: fix fate-vc1 after previous commit. wmv3dec: fix playback of complex WMV3 files using simple_idct. make av_dup_packet() more cautious on allocation failures make containers pass palette change in AVPacket introduce side information for AVPacket Politic commits that have not been pulled: Update regtest checksums after revision 6001dad. Replace more FFmpeg references by Libav. Replace references to ffmpeg-devel with libav-devel; fix roundup URL. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ac3dec: fix processing of delta bit allocation information.Justin Ruggles2011-04-17
| | | | | | | | | | The number of dba segments is the coded value + 1. The coupling dba offset starts at the first coupling band, not at zero.
* | Merge remote-tracking branch 'newdev/master'Michael Niedermayer2011-03-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | * newdev/master: ac3enc: move compute_mantissa_size() to ac3dsp ac3enc: move mant*_cnt and qmant*_ptr out of AC3EncodeContext Remove support for stripping executables ac3enc: NEON optimised float_to_fixed24 ac3: move ff_ac3_bit_alloc_calc_bap to ac3dsp dfa: protect pointer range checks against overflows. Duplicate: mimic: implement multithreading. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ac3: move ff_ac3_bit_alloc_calc_bap to ac3dspMans Rullgard2011-03-29
| | | | | | | | 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>
| * Add ff_ prefix to ac3_common_init().Justin Ruggles2011-01-26
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * ac3: Remove ff_ac3_critical_band_size_tab.Justin Ruggles2011-01-26
| | | | | | | | | | | | | | It is only used to generate band_start_tab, which about the same size, at runtime, so it's simpler just to always hardcode band_start_tab. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Move ff_ac3_critical_band_size_tab in ac3.c for non-hardcoded tables.Diego Elio Pettenò2011-01-25
| | | | | | | | | | | | | | This symbol is only ever used to calculate the non-hardcoded tables, so only enable it in that case, and static to the source unit that uses it. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Remove unused ac3_parametric_bit_allocation function.Diego Elio Pettenò2011-01-25
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Add ff_ prefix to ac3_common_init().Justin Ruggles2011-01-28
| | | | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 4c57cde942b3d28074d0bb06e2ca200bc1098f22)
* | ac3: Remove ff_ac3_critical_band_size_tab.Justin Ruggles2011-01-28
| | | | | | | | | | | | | | | | It is only used to generate band_start_tab, which about the same size, at runtime, so it's simpler just to always hardcode band_start_tab. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 24e3ad3031fa26e12d4b939f0ff0dd6e12f05ef5)
* | Move ff_ac3_critical_band_size_tab in ac3.c for non-hardcoded tables.Diego Elio Pettenò2011-01-26
| | | | | | | | | | | | | | | | This symbol is only ever used to calculate the non-hardcoded tables, so only enable it in that case, and static to the source unit that uses it. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 6ed3b504f984dc6cefde8d57a57726f9d30e5033)
* | Remove unused ac3_parametric_bit_allocation function.Diego Elio Pettenò2011-01-26
|/ | | | | Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 362bfe29971b3bb8497d2b341337697be15a257c)
* Use AC3_MAX_COEFS instead of 256 in a couple places in ac3.cJustin Ruggles2010-12-14
| | | | Originally committed as revision 25968 to svn://svn.ffmpeg.org/ffmpeg/trunk
* define AC3_CRITICAL_BANDS and use it in the AC-3 encoder and decoder.Justin Ruggles2010-12-14
| | | | Originally committed as revision 25967 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix grammar errors in documentationMåns Rullgård2010-06-30
| | | | Originally committed as revision 23904 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
* Change code so it uses 2 adds instead of one FFABS.Reimar Döffinger2010-01-14
| | | | | | | | About 1% faster ff_ac3_bit_alloc_calc_psd on Intel Atom, overall speedup not measurable though. Should have a bigger effect on systems without cmov or with very slow cmov. Originally committed as revision 21214 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Simplify AC-3 critical band end calculation (correctly this time).Justin Ruggles2009-11-03
| | | | Originally committed as revision 20438 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Revert r20050, which caused decoding errors with at least one valid AC-3 file.Justin Ruggles2009-11-03
| | | | Originally committed as revision 20437 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove unneeded table lookup.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20050 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: Rename some variables to be more descriptive of their use.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20049 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move some variable declarations to inside of loops.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20048 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove unneeded variable.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20047 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: Rename some variables to be more descriptive of their use.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20046 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove some unneeded variables.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20045 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: Rename some variablesJustin Ruggles2009-09-27
| | | | Originally committed as revision 20044 to svn://svn.ffmpeg.org/ffmpeg/trunk
* simplify 2 lines into 1 using FFMINJustin Ruggles2009-09-27
| | | | Originally committed as revision 20043 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: Do some basic pretty-printing.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20042 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Simplify by combining increment with array access.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20041 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Rename some variables to be more descriptive of their use. Do someJustin Ruggles2009-09-27
| | | | | | pretty-printing as well. Originally committed as revision 20040 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move 2 variable declarations to inside of loop.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20039 to svn://svn.ffmpeg.org/ffmpeg/trunk
* simplify by combining increment with array accessJustin Ruggles2009-09-27
| | | | Originally committed as revision 20038 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove unneeded variableJustin Ruggles2009-09-27
| | | | Originally committed as revision 20037 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Hardcode AC-3 critical band tables when CONFIG_HARDCODED_TABLES is set.Justin Ruggles2009-09-27
| | | | Originally committed as revision 20036 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-13
| | | | Originally committed as revision 18494 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
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: alignment after last commitJustin Ruggles2008-12-08
| | | | Originally committed as revision 16035 to svn://svn.ffmpeg.org/ffmpeg/trunk
* ac3: detect dba errors and prevent writing past end of arrayJustin Ruggles2008-12-08
| | | | Originally committed as revision 16034 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: make all references to AC-3 capitalized and hyphenatedJustin Ruggles2008-08-03
| | | | Originally committed as revision 14523 to svn://svn.ffmpeg.org/ffmpeg/trunk