summaryrefslogtreecommitdiff
path: root/libavcodec/aac.h
Commit message (Collapse)AuthorAge
* AAC Encoder: clipping avoidanceClaudio Freire2015-07-27
| | | | | | | | | | | | | | | | | Avoid clipping due to quantization noise to produce audible artifacts, by detecting near-clipping signals and both attenuating them a little and encoding escape-encoded bands (usually the loudest) rounding towards zero instead of nearest, which tends to decrease overall energy and thus clipping. Currently fate tests measure numerical error so this change makes tests using asynth (which are near clipping) report higher error not less, because of window attenuation. Yet, they sound better, not worse (albeit subtle, other samples aren't subtle at all). Only measuring psychoacoustically weighted error would make for a representative test, so that will be left for a future patch. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: Implementation of AAC_fixed_decoder (SBR-module)Djordje Pesut2015-07-20
| | | | | | | Add fixed poind code. Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec: Implementation of AAC_fixed_decoder (LC-module) [3/4]Djordje Pesut2015-07-09
| | | | | | | Add fixed point implementation Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavcodec: Implementation of AAC_fixed_decoder (LC-module) [2/4]Jovan Zelincevic2015-07-09
| | | | | | | Add fixed point implementation of functions for generating tables Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* aac: add additional fields needed by the encoder for intensity stereoRostislav Pehlivanov2015-06-28
| | | | | | This commit adds additional fields which are used by the native encoder to add intensity stereo support. It also adds some clarifying statements to the comments for the codebooks. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* aacenc: Adjust the initial offset for PNS valuesRostislav Pehlivanov2015-04-14
| | | | | | | | | This commit adjusts the intial offset for PNS values, introduced with commit f7f71b5795d708763eb0c55fe5e2cb051b2b69f4 earlier. This commit shifts the value in such a way that no further offsets are required in the aaccoder.c file. Earlier version of the PNS patch had 2 offsets in both the aaccoder and aacenc. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* aacenc: Add support for Perceptual Noise Substitution energy valuesRostislav Pehlivanov2015-04-13
| | | | | | | | | | | | This commit implements support for writing the noise energy values used in PNS. The difference between regular scalefactors and noise energy values is that the latter require a small preamble (NOISE_PRE + energy_value_diff) to be written as the first noise-containing band. Any following noise energy values use the previous one to base their "diff" on. Ordinary scalefactors remain unchanged other than that they ignore the noise values. This commit should not change anything by itself, the following commits will bring it in use. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* AAC: Fix M/S stereo encodingClaudio Freire2015-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a pointer arithmetic bug in adjust_frame_information that resulted in heavily corrupted audio when using M/S encoding. Also, a backup copy of untransformed coefficients has to be kept around or attempts at re-processing the frame (which happens when hevavily overspending bits during transients) will result in re-encoding of the coefficients and subsequent corruption of the resulting stream. A/B testing shows the bug as corrected, but still cannot prove that M/S coding is a win at least in numbers. Limited listening tests do show improvement on M/S encoded samples in lower bitrates, but they're hidden among the other artifacts that remain to be corrected in the encoder. Some of the regressions flagged in the report do show poor stereo image (but not buggy), so M/S encoding is clearly not good enough yet to be defaulted to auto. In numbers, Patched against Unpatched, stereo_mode auto: Files: 114 Bitrates: 6 Tests: 683 Serious Regressions: 0 (0%) Regressions: 0 (0%) Improvements: 227 (33%) Big improvements: 92 (13%) Worst regression - mybloodrusts.wv - 256k - StdDev: 28.61 pSNR: -0.43 maxdiff: 1372.00 Best improvement - 60.wv - 384k - StdDev: -369.57 pSNR: 45.02 maxdiff: -13322.00 Average - StdDev: -80.56 pSNR: 2.49 maxdiff: -8858.00 Patched against Unpatched stereo_mode ms_off shows no difference. Patched stereo_mode auto vs Unpatched stereo_mode ms_off shows a small average improvement, just not too significant: Serious Regressions: 0 (0%) Regressions: 10 (1%) Improvements: 45 (6%) Big improvements: 2 (0%) Worst regression - Illinois.wv - 256k - StdDev: 33.20 pSNR: -2.03 maxdiff: 477.00 Best improvement - song_of_circomstances.flac - 384k - StdDev: -3.97 pSNR: 7.61 maxdiff: -826.00 Average - StdDev: -10.25 pSNR: 0.20 maxdiff: -281.00 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'ee964145b5d229571e00bf6883a44189d02babe2'Michael Niedermayer2015-02-28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ee964145b5d229571e00bf6883a44189d02babe2': lavc: remove unused traces of fmtconvert usage Conflicts: libavcodec/aac.h libavcodec/aacdec.c libavcodec/atrac3.c libavcodec/vorbisdec.c libavcodec/wma.c libavcodec/wma.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: remove unused traces of fmtconvert usageAnton Khirnov2015-02-28
| | | | | | | | | | Those decoders have been switched to float output and so do not use fmtconvert anymore.
* | Merge commit 'd615187f74ddf3413778a8b5b7ae17255b0df88e'Michael Niedermayer2015-02-04
|\| | | | | | | | | | | | | | | | | | | * commit 'd615187f74ddf3413778a8b5b7ae17255b0df88e': aacdec: Support for ER AAC ELD 480. Conflicts: libavcodec/aacdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aacdec: Support for ER AAC ELD 480.Alex Converse2015-02-03
| | | | | | | | Based in part on work from Niel van der Westhuizen <espes@pequalsnp.com>.
* | avcodec/aacdec: Use avpriv_float_dsp_alloc()Michael Niedermayer2014-12-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/aacdec: Skip processing channel elements which have not been presentMichael Niedermayer2014-11-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/aacdec: warn user when remapping streams.Benoit Fouet2014-10-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/aac: fix () in IS_CODEBOOK_UNSIGNED macroMichael Niedermayer2014-05-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-23
|\| | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aac: Add support for Enhanced AAC Low Delay (ER AAC ELD). Conflicts: Changelog libavcodec/aacdec.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aac: Add support for Enhanced AAC Low Delay (ER AAC ELD).Alex Converse2013-10-23
| | | | | | | | | | This does not include support for LD SBR, epTool, data resilience, nor the 960 transform family.
* | Merge commit '1914e6f010b3320025c7b692aaea51d9b9a992a8'Michael Niedermayer2013-09-19
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '1914e6f010b3320025c7b692aaea51d9b9a992a8': aacdec: Add support for LD (Low Delay) AAC Conflicts: Changelog libavcodec/aacdec.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aacdec: Add support for LD (Low Delay) AACAlex Converse2013-09-18
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-26
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: miscellaneous typo fixes Conflicts: configure libavformat/avisynth.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * miscellaneous typo fixesDiego Biurrun2013-07-25
| |
* | Revert "aacdec: Reconfigure output as needed, disable ↵Michael Niedermayer2013-03-08
| | | | | | | | | | | | | | | | pop_output_configuration()" This reverts commit 60dbf2eff92f8aa4683b6dcaba9e694890258ade. This is not needed anymore, Ticket 1694 has been fixed differently
* | aacdec: Reconfigure output as needed, disable pop_output_configuration()Michael Niedermayer2013-03-07
| | | | | | | | | | | | Fixes Ticket1694 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c242bbd8b6939507a1a6fb64101b0553d92d303f'Michael Niedermayer2013-02-26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c242bbd8b6939507a1a6fb64101b0553d92d303f': Remove unnecessary dsputil.h #includes Conflicts: libavcodec/ffv1.c libavcodec/h261dec.c libavcodec/h261enc.c libavcodec/h264pred.c libavcodec/lpc.h libavcodec/mjpegdec.c libavcodec/rectangle.h libavcodec/x86/idct_sse2_xvid.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove unnecessary dsputil.h #includesDiego Biurrun2013-02-26
| |
* | mips: optimization for float aac decoder (sbr module)Mirjana Vulin2013-02-21
| | | | | | | | | | Signed-off-by: Mirjana Vulin <mvulin@mips.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e57daa876bf0cf50782550e366e589441cd8c2bd'Michael Niedermayer2013-02-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e57daa876bf0cf50782550e366e589441cd8c2bd': adpcm: decode directly to the user-provided AVFrame ac3: decode directly to the user-provided AVFrame aac: decode directly to the user-provided AVFrame 8svx: decode directly to the user-provided AVFrame Conflicts: libavcodec/8svx.c libavcodec/ac3dec.c libavcodec/adpcm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aac: decode directly to the user-provided AVFrameJustin Ruggles2013-02-12
| |
* | mips: optimization for float aac decoder (core module)Mirjana Vulin2013-01-31
| | | | | | | | | | Signed-off-by: Mirjana Vulin <mvulin@mips.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '73b704ac609d83e0be124589f24efd9b94947cf9'Michael Niedermayer2013-01-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '73b704ac609d83e0be124589f24efd9b94947cf9': arm: Add some missing header #includes floatdsp: move scalarproduct_float from dsputil to avfloatdsp. Conflicts: libavcodec/acelp_pitch_delay.c libavcodec/amrnbdec.c libavcodec/amrwbdec.c libavcodec/ra288.c libavcodec/x86/dsputil_mmx.c libavutil/x86/float_dsp.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * floatdsp: move scalarproduct_float from dsputil to avfloatdsp.Ronald S. Bultje2013-01-22
| | | | | | | | This makes the aac decoder and all voice codecs independent of dsputil.
* | aacdec: make dual mono mode selectable through AVOptions too.Michael Niedermayer2012-12-30
| | | | | | | | | | | | Based on patch by Akihiro Tsukada Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aacdec: simplify dmonoMichael Niedermayer2012-12-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '3d3cf6745e2a5dc9c377244454c3186d75b177fa'Michael Niedermayer2012-11-26
|\| | | | | | | | | | | | | | | | | | | | | * commit '3d3cf6745e2a5dc9c377244454c3186d75b177fa': aacdec: use float planar sample format for output Conflicts: libavcodec/aacdec.c libavcodec/aacsbr.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aacdec: use float planar sample format for outputJustin Ruggles2012-11-25
| |
* | Merge commit '1cd432e167b1a80853760c89a33606e2b5f229c2'Michael Niedermayer2012-10-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1cd432e167b1a80853760c89a33606e2b5f229c2': configure: fix libcdio check rtsp: Allow setting the reordering buffer size via an AVOption rtsp: Vertically align a constant definition rtp: Update the check for distinguishing between RTP and RTCP aac: fix build with hardcoded tables fate: dependencies for screen codec tests riff: Move functions around to be covered by appropriate #ifdefs Conflicts: configure tests/fate/screen.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aac: fix build with hardcoded tablesMans Rullgard2012-10-18
| | | | | | | | | | | | | | | | | | | | | | aac_tablegen.h includes aac.h for the POW_SF2_ZERO definition, but this also pulls in a raft of other headers, some of which are not safe to use in code built with the host compiler. Moving POW_SF2_ZERO to aac_tablegen_decl.h, where the declaration of the array it relates to already resides, fixes the problems. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: yuv4mpeg: return proper error codes. Give all anonymously typedeffed structs in headers a name fate: Add parseutils test parseutils-test: Drop random colors from parsing test vf_pad/scale: use double precision for aspect ratios. build: error on variable-length arrays ppc: swscale: rework yuv2planeX_altivec() ppc: fmtconvert: kill VLA in float_to_int16_interleave_altivec() x86: dsputil: kill VLA in gmc_mmx() libspeexenc: Updated commentary to reflect recent changes libspeexenc: Add an option for enabling DTX doc/APIchanges: fill in missing dates and hashes. lavr: bump major to 1 and declare it stable. lavr: change the type of the data buffers to uint8_t**. lavc: deprecate the audio resampling API. Conflicts: cmdutils.h configure doc/APIchanges ffplay.c libavcodec/dwt.h libavcodec/libspeexenc.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavformat/asf.h tests/fate/libavutil.mak tests/ref/fate/parseutils Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Give all anonymously typedeffed structs in headers a nameDiego Biurrun2012-10-06
| | | | | | | | Anonymous structs cannot be forward declared and have no benefit.
* | aacdec: add support for dual mono in Japanese DTVAkihiro Tsukada2012-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Japanese DTV uses some non standard extensions in AAC audio. One example is 'dual mono', which combines two independent audio into one stereo stream, storing them in left and right channels respectively. Historically, dual mono audio has been used for multi-lingual audio, one for local/native language, and another for english, and usually the "main" (local language) channel should be output without any user interactions. The frames of those dual mono audio are allowed to set ADTS channel_config field to 0, and just contain two SCE's *WITHOUT* PCE, which is a non standard extension by Japanese DTV standard. (ref. ARIB STD-B32 PartII 5.2.3) This patch adds an AVPacket side data, AV_PKT_DATA_JP_DUALMONO, which indicates that the AVPacket is likely to contain an audio frame with the above dual mono extension, and has the parameter to specify the desired channel selection in that case. It also makes aacdec to detect dual mono and output just the desired channel when this side data is attached. Signed-off-by: Akihiro Tsukada <atsukada@users.sourceforge.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-08
|\| | | | | | | | | | | | | | | | | | | | | | | * qatar/master: float_dsp: ppc: add a separate header for Altivec function prototypes ARM: fix float_dsp breakage from d5a7229 Add a float DSP framework to libavutil PPC: Move types_altivec.h and util_altivec.h from libavcodec to libavutil ARM: Move asm.S from libavcodec to libavutil vc1dsp: mark put/avg_vc1_mspel_mc() always_inline Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add a float DSP framework to libavutilJustin Ruggles2012-06-08
| | | | | | | | Move vector_fmul() from DSPContext to AVFloatDSPContext.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aacenc: Fix issues with huge values of bit_rate. dv_tablegen: Drop unnecessary av_unused attribute from dv_vlc_map_tableinit(). proresenc: multithreaded quantiser search riff: use bps instead of bits_per_coded_sample in the WAVEFORMATEXTENSIBLE header avconv: only set the "channels" option when it exists for the specified input format avplay: update get_buffer to be inline with avconv aacdec: More robust output configuration. faac: Fix multi-channel ordering faac: Add .channel_layouts rtmp: Support 'rtmp_playpath', an option which overrides the stream identifier rtmp: Support 'rtmp_app', an option which overrides the name of application avutil: add better documentation for AVSampleFormat Conflicts: libavcodec/aac.h libavcodec/aacdec.c libavcodec/aacenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aacdec: More robust output configuration.Alex Converse2012-04-16
| | | | | | | | | | | | Save the old output configuration (if it has been used successfully) when trying a new configuration. If the new configuration fails to decode, restore the last successful configuration.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (38 commits) v210enc: remove redundant check for pix_fmt wavpack: allow user to disable CRC checking v210enc: Use Bytestream2 functions cafdec: Check return value of avio_seek and avoid modifying state if it fails yop: Check return value of avio_seek and avoid modifying state if it fails tta: Check return value of avio_seek and avoid modifying state if it fails tmv: Check return value of avio_seek and avoid modifying state if it fails r3d: Check return value of avio_seek and avoid modifying state if it fails nsvdec: Check return value of avio_seek and avoid modifying state if it fails mpc8: Check return value of avio_seek and avoid modifying state if it fails jvdec: Check return value of avio_seek and avoid modifying state if it fails filmstripdec: Check return value of avio_seek and avoid modifying state if it fails ffmdec: Check return value of avio_seek and avoid modifying state if it fails dv: Check return value of avio_seek and avoid modifying state if it fails bink: Check return value of avio_seek and avoid modifying state if it fails Check AVCodec.pix_fmts in avcodec_open2() svq3: Prevent illegal reads while parsing extradata. remove ParseContext1 vc1: use ff_parse_close mpegvideo parser: move specific fields into private context ... Conflicts: libavcodec/4xm.c libavcodec/aacdec.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/mpeg4video_parser.c libavcodec/svq3.c libavcodec/v210enc.c libavformat/cafdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aacdec: Try to sniff a reasonable channel layout for PCE based configurations.Alex Converse2012-02-09
| | | | | | | | This changes the output order of multichannel PCE based streams.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: fate: Add tests for more AAC features. aacps: Add missing newline in error message. fate: Add tests for vc1/wmapro in ism. aacdec: Add a fate test for 5.1 channel SBR. aacdec: Turn off PS for multichannel files that use PCE based configs. cabac: remove put_cabac_u/ueg from cabac-test. swscale: RGB4444 and BGR444 input FATE: add test for xWMA demuxer. FATE: add test for SMJPEG demuxer and associated IMA ADPCM audio decoder. mpegaudiodec: optimized iMDCT transform mpegaudiodec: change imdct window arrangment for better pointer alignment mpegaudiodec: move imdct and windowing function to mpegaudiodsp mpegaudiodec: interleave iMDCT buffer to simplify future SIMD implementations swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm. FATE: test to exercise WTV demuxer. mjpegdec: K&R formatting cosmetics swscale: K&R formatting cosmetics for code examples swscale: K&R reformatting cosmetics for header files FATE test: cvid-grayscale; ensures that the grayscale Cinepak variant is exercised. Conflicts: libavcodec/cabac.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec.c libavcodec/mpegaudiodsp.c libavcodec/mpegaudiodsp.h libavcodec/mpegaudiodsp_template.c libavcodec/x86/Makefile libavcodec/x86/imdct36_sse.asm libavcodec/x86/mpegaudiodec_mmx.c libswscale/swscale-test.c libswscale/swscale.c libswscale/swscale_internal.h libswscale/x86/swscale_template.c tests/fate/demux.mak tests/fate/microsoft.mak tests/fate/video.mak tests/fate/wma.mak tests/ref/lavfi/pixfmts_scale Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aacdec: Turn off PS for multichannel files that use PCE based configs.Alex Converse2012-01-09
| | | | | | | | Fixes al_sbr_cm_48_5.1.mp4.
* | Support "VLB " audio in NSV files.Reimar Döffinger2011-12-13
| | | | | | | | | | | | See samples/nsv/vlb_audio. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>