summaryrefslogtreecommitdiff
path: root/libavcodec/ac3tab.h
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/ac3: Move non-(de|en)coder-only parts out of ac3.hAndreas Rheinhardt2022-05-151-1/+1
| | | | | | | | | | 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-151-2/+0
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3tab: Unavpriv ac3_channel_layout_tabAndreas Rheinhardt2022-01-041-3/+1
| | | | | | | | | | | | | | | | | It is small (16 B) and therefore the overhead of exporting it more than outweighs the size savings from not having duplicated symbols: When the symbol is no longer avpriv, one saves twice the size of the string containing the symbols name (2x30 byte), two entries in .dynsym (24 bytes each on x64), one entry in the importing libraries .got and .rela.dyn (8 + 24 bytes on x64) and two entries for the symbol version (2 bytes each) and one hash value in the exporting library (4 bytes). (The exact numbers are of course different for other platforms (e.g. when using dlls), but given that the strings saved alone more than outweigh the array size it can be presumed that this is beneficial for all platforms.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3tab: Remove unused ff_eac3_default_chmapAndreas Rheinhardt2021-02-241-1/+0
| | | | | | | | Added in 0c79b1402a48a99f32435a0f5ad2364c58c6fcf3 to use it in a function that was never used and was itself removed in 676f1f533e2c2960d81784188592a066b9ff1c3d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ac3tab: Move ff_ac3_enc_channel_map to its only userAndreas Rheinhardt2021-02-201-1/+8
| | | | | | | and make it static. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* ac3enc_fixed: drop unnecessary fixed-point DSP codeLynne2021-01-141-1/+0
|
* avcodec/ac3_tab: Zero-terminate ff_ac3_sample_rate_tabAndreas Rheinhardt2020-04-111-1/+1
| | | | | | | | | This is required to use it as an AVCodec.supported_samplerates array. Adding the sentinel has been forgotten in 4679a474. Without it e.g. the FATE-test ffmpeg-filter_complex_audio fails with ASAN. Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavc: Use supported_samplerates for Dolby Digital encoders.Carl Eugen Hoyos2020-04-041-1/+1
| | | | Fixes ticket #8518.
* avcodec/eac3dec: Check that channel_map does not contain more than ↵Michael Niedermayer2018-09-221-0/+2
| | | | | | EAC3_MAX_CHANNELS Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'abf1c058d1bd0ed1b820ea5e501a4484756f00b0'James Almer2017-11-111-1/+2
|\ | | | | | | | | | | | | * commit 'abf1c058d1bd0ed1b820ea5e501a4484756f00b0': msvc: Properly specify dllexport for data symbols shared across dll boundaries Merged-by: James Almer <jamrial@gmail.com>
| * msvc: Properly specify dllexport for data symbols shared across dll boundariesMartin Storsjö2017-08-311-1/+2
| | | | | | | | | | | | | | | | | | We currently only have exported data symbols within libavcodec, but the concept is easy to extend to other libraries if necessary. The attribute declaration needs to be in a private header though, since we can't use CONFIG_SHARED in public installed headers. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avcodec/ac3: always use hardcoded tablesGanesh Ajjanagadde2015-11-301-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit '4b48201d4d9d57a2a1ecf8504bc928aff83cb99a'Michael Niedermayer2014-01-091-1/+3
|\ \ | |/ | | | | | | | | | | * commit '4b48201d4d9d57a2a1ecf8504bc928aff83cb99a': ac3tab.h: #include the correct headers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ac3tab.h: #include the correct headersDiego Biurrun2014-01-091-1/+3
| |
* | Merge commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72'Michael Niedermayer2012-10-191-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72': fate: add a dependency helper macro Add support for building shared libraries with MSVC avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab gxf: Add a local copy of the relevant parts of the frame rate table configure: Split out msvc as a separate target OS aviobuf: Remove a senseless ifdef in avio_seek Conflicts: configure libavcodec/dirac.c libavcodec/mpeg12data.h libavcodec/mpeg12enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add support for building shared libraries with MSVCMartin Storsjö2012-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires the makedef perl script by Derek, from the c89-to-c99 repo. That scripts produces a .def file, listing the symbols to be exported, based on the gcc version scripts and the built object files. To properly load non-function symbols from DLL files, the data symbol declarations need to have the attribute __declspec(dllimport) when building the calling code. (On mingw, the linker can fix this up automatically, which is why it has not been an issue so far. If this attribute is omitted, linking actually succeeds, but reads from the table will not produce the desired results at runtime.) MSVC seems to manage to link DLLs (and run properly) even if this attribute is present while building the library itself (which normally isn't recommended) - other object files in the same library manage to link to the symbol (with a small warning at link time, like "warning LNK4049: locally defined symbol _avpriv_mpa_bitrate_tab imported" - it doesn't seem to be possible to squelch this warning), and the definition of the tables themselves produce a warning that can be squelched ("warning C4273: 'avpriv_mpa_bitrate_tab' : inconsistent dll linkage, see previous definition of 'avpriv_mpa_bitrate_tab'). In this setup, mingw isn't able to link object files that refer to data symbols with __declspec(dllimport) without those symbols actually being linked via a DLL (linking avcodec.dll ends up with errors like "undefined reference to `__imp__avpriv_mpa_freq_tab'"). The dllimport declspec isn't needed at all in mingw, so we simply choose not to declare it for other compilers than MSVC that requires it. (If ICL support later requires it, the condition can be extended later to include both of them.) This also implies that code that is built to link to a certain library as a DLL can't link to the same library as a static library. Therefore, we only allow building either static or shared but not both at the same time. (That is, static libraries as such can be, and actually are, built - this is used for linking the test tools to internal symbols in the libraries - but e.g. libavformat built to link to libavcodec as a DLL cannot link statically to libavcodec.) Also, linking to DLLs is slightly different from linking to shared libraries on other platforms. DLLs use a thing called import libraries, which is basically a stub library allowing the linker to know which symbols exist in the DLL and what name the DLL will have at runtime. In mingw/gcc, the import library is usually named libfoo.dll.a, which goes next to a static library named libfoo.a. This allows gcc to pick the dynamic one, if available, from the normal -lfoo switches, just as it does for libfoo.a vs libfoo.so on Unix. On MSVC however, you need to literally specify the name of the import library instead of the static library. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-241-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (40 commits) swf: check return values for av_get/new_packet(). wavpack: Don't shift minclip/maxclip rtpenc: Expose the max packet size via an avoption rtpenc: Move max_packet_size to a context variable rtpenc: Add an option for not sending RTCP packets lavc: drop encode() support for video. snowenc: switch to encode2(). snowenc: don't abuse input picture for storing information. a64multienc: switch to encode2(). a64multienc: don't write into output buffer when there's no output. libxvid: switch to encode2(). tiffenc: switch to encode2(). tiffenc: properly forward error codes in encode_frame(). lavc: drop libdirac encoder. gifenc: switch to encode2(). libvpxenc: switch to encode2(). flashsvenc: switch to encode2(). Remove libpostproc. lcl: don't overwrite input memory. swscale: take first/lastline over/underflows into account for MMX. ... Conflicts: .gitignore Makefile cmdutils.c configure doc/APIchanges libavcodec/Makefile libavcodec/allcodecs.c libavcodec/libdiracenc.c libavcodec/libxvidff.c libavcodec/qtrleenc.c libavcodec/tiffenc.c libavcodec/utils.c libavformat/mov.c libavformat/movenc.c libpostproc/Makefile libpostproc/postprocess.c libpostproc/postprocess.h libpostproc/postprocess_altivec_template.c libpostproc/postprocess_internal.h libpostproc/postprocess_template.c libswscale/swscale.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: set channel layout for AC-3 streams based on the 'dac3' atom infoJustin Ruggles2012-02-221-1/+1
| | | | | | | | fixes Bug 225
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-251-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) configure: enable memalign_hack automatically when needed swscale: unbreak the build on non-x86 systems. swscale: remove if(bitexact) branch from functions. swscale: remove if(canMMX2BeUsed) conditional. swscale: remove swScale_{c,MMX,MMX2} duplication. swscale: use emms_c(). Move emms_c() from libavcodec to libavutil. tiff: set palette in the context when specified in TIFF_PAL tag rtsp: use strtoul to parse rtptime and seq values. pgssubdec: fix incorrect colors. dvdsubdec: fix incorrect colors. ape: Allow demuxing of files with metadata tags. swscale: remove dead macro WRITEBGR24OLD. swscale: remove AMD3DNOW "optimizations". swscale: remove duplicate code in ppc/ subdirectory. swscale: remove duplicated x86/ functions. swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*. vsrc_buffer.h: add file doxy vsrc_buffer: tweak error message in init() msmpeg4: reindent. ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ac3enc: add channel coupling supportJustin Ruggles2011-05-241-0/+1
| | | | | | | | | | | | | | | | | | Channel coupling is an optional AC-3 feature that increases quality by combining high frequency information from multiple channels into a single channel. The per-channel high frequency information is sent with less accuracy in both the frequency and time domains. This allows more bits to be used for lower frequencies while preserving enough information to reconstruct the high frequencies.
* | Merge remote-tracking branch 'newdev/master'Michael Niedermayer2011-03-301-0/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * 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-291-0/+8
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * ac3: remove ff_ac3_critical_band_size_tab[] external declarationMans Rullgard2011-01-251-1/+0
| | | | | | | | | | | | This fixes compilation broken by 6ed3b504f984dc6cefde8d57a57726f9d30e5033 Signed-off-by: Mans Rullgard <mans@mansr.com>
* | ac3: remove ff_ac3_critical_band_size_tab[] external declarationMans Rullgard2011-01-261-1/+0
|/ | | | | | | This fixes compilation broken by 6ed3b504f984dc6cefde8d57a57726f9d30e5033 Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 21c900129c268587fa2df774242bfd8af72ff890)
* Add stereo rematrixing support to the AC-3 encoders.Justin Ruggles2011-01-081-0/+1
| | | | | | | | This improves the audio quality significantly for stereo source with both the fixed-point and floating-point AC-3 encoders. Update acodec-ac3_fixed and seek-ac3_rm test references. Originally committed as revision 26271 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: use some size macros in ac3tab.c/hJustin Ruggles2010-12-141-3/+4
| | | | Originally committed as revision 25969 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add channel layout support to the AC-3 decoder and AC-3 parser.Justin Ruggles2009-04-191-0/+1
| | | | Originally committed as revision 18622 to svn://svn.ffmpeg.org/ffmpeg/trunk
* ac3dec: reorder output channels to SMPTE channel orderJustin Ruggles2009-04-171-0/+1
| | | | Originally committed as revision 18542 to svn://svn.ffmpeg.org/ffmpeg/trunk
* ac3enc: reorder input channels to AC-3 channel orderJustin Ruggles2009-04-171-0/+1
| | | | Originally committed as revision 18540 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-191-1/+1
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Globally rename the header inclusion guard names.Stefano Sabatini2008-08-311-3/+3
| | | | | | | | | Consistently apply this rule: the guard name is obtained from the filename by stripping the leading "lib", converting '/' and '.' to '_' and uppercasing the resulting name. Guard names in the root directory have to be prefixed by "FFMPEG_". Originally committed as revision 15120 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: make all references to AC-3 capitalized and hyphenatedJustin Ruggles2008-08-031-1/+1
| | | | Originally committed as revision 14523 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full path for #includes from another directory.Diego Biurrun2008-05-091-1/+1
| | | | Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add a ff_ac3_parse_header_full() which calls ff_ac3_parse_header()Bartlomiej Wolowiec2008-04-241-0/+16
| | | | | | and then reads the channel_map stuff Originally committed as revision 12944 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: rename ac3 tablesJustin Ruggles2007-12-091-14/+14
| | | | Originally committed as revision 11193 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add FFMPEG_ prefix to all multiple inclusion guards.Diego Biurrun2007-10-171-3/+3
| | | | Originally committed as revision 10765 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: alignAurelien Jacobs2007-04-251-5/+5
| | | | Originally committed as revision 8817 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move ac3 tables from a .h to a .cAurelien Jacobs2007-04-251-231/+23
| | | | Originally committed as revision 8816 to svn://svn.ffmpeg.org/ffmpeg/trunk
* hardcode ff_ac3_frame_sizes tableJustin Ruggles2007-03-181-2/+41
| | | | Originally committed as revision 8435 to svn://svn.ffmpeg.org/ffmpeg/trunk
* remove redundancy in AC-3 parser by using common tables from ac3tab.hJustin Ruggles2007-03-111-0/+14
| | | | Originally committed as revision 8318 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove common code from AC-3 encoder and utilize ac3.c.Justin Ruggles2007-03-091-16/+9
| | | | Originally committed as revision 8306 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change license headers to say 'FFmpeg' instead of 'this program/this library'Diego Biurrun2006-10-071-4/+6
| | | | | | and fix GPL/LGPL version mismatches. Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add official LGPL license headers to the files that were missing them.Diego Biurrun2006-09-101-0/+19
| | | | Originally committed as revision 6219 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix 2 bit allocation bugs. One fix enables using a higher bandwidth code. ↵Justin Ruggles2006-09-031-1/+1
| | | | | | The other fixes an issue with floorcod=7. Originally committed as revision 6156 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Revert bad ac3enc commit, the commited code was bigger and slower.Benjamin Larsson2006-04-281-3/+38
| | | | Originally committed as revision 5327 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Patch to generate the ac3 window, based on code by Justin Ruggles.Benjamin Larsson2006-04-221-38/+3
| | | | Originally committed as revision 5310 to svn://svn.ffmpeg.org/ffmpeg/trunk
* switch ac3enc to av_crcMichael Niedermayer2006-03-061-2/+0
| | | | Originally committed as revision 5116 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: Remove all trailing whitespace.Diego Biurrun2005-12-171-19/+19
| | | | Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
* make the tables staticAlex Beregszaszi2004-06-261-9/+9
| | | | Originally committed as revision 3255 to svn://svn.ffmpeg.org/ffmpeg/trunk