summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.c
Commit message (Collapse)AuthorAge
* aacenc: add description to the 'aac_coder' optionRostislav Pehlivanov2015-08-01
| | | | | | | | | | | This commit adds a short description to the aac_coder option of the AAC encoder in order to be consistent with the other options. Generally, right now, the 'FAAC' method works fine with speech and low broadband spectrum audio. 'Fast' is just as the name suggests. 'ANMR' still needs work and 'Twoloop', the default, works well with every type of audio. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* aacenc: remove redundant argument from coder functionsRostislav Pehlivanov2015-08-01
| | | | | | | | | | | This commit removes a redundant argument from the functions in aaccoder. The argument lambda was redundant as it was just a copy of s->lambda, to which all functions have access to anyway. This cleans up the function pointers a bit which is helpful as there are a lot of other search_for_* functions under development and with them populated it gets messy. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* 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 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec: Add a min size parameter to ff_alloc_packet2()Michael Niedermayer2015-07-27
| | | | | | | | | | | | | | | | This parameter can be used to inform the allocation code about how much downsizing might occur, and can be used to optimize how to allocate the packet Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | 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>
* | aacenc: move the generation of ff_aac_pow34sf_tab[]Rostislav Pehlivanov2015-07-21
| | | | | | | | | | | | | | | | | | | | | | | | This commit moves the generation of ff_aac_pow34sf_tab[] out of the encoder and into the table generator. The original commit log for this table in 2011 actually mentions that it should be moved outside but this never happened. This is the first commit which cleans up the encoder a little. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | aacenc: fix option descriptionsRostislav Pehlivanov2015-07-07
| | | | | | | | | | | | | | | | | | Since the new PNS implementation has been merged and is no longer considered proof of concept (as it's much more complex and better than the previous), change the comments to reflect that. We need people testing it (since all AAC profiles require it to be on by default) and having it tagged as proof of concept might drive some away. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aacenc: implement Intensity Stereo encoding supportRostislav Pehlivanov2015-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements intensity stereo coding support to the native aac encoder. This is a way to increase the efficiency of the encoder by zeroing the right channel's spectral coefficients (in a channel pair) and rederiving them in the decoder using information from the scalefactor indices of special band types. This commit confomrs to the official ISO 13818-7 specifications, although due to their ambiguity certain deviations have been taken to ensure maximum sound quality. This commit has been extensively tested and has shown to not result in audiable audio artifacts unless in extreme cases. This commit also adds an option, aac_is, which has the value of 0 by default. Intensity Stereo is part of the scalable aac profile and is thus non-default. The way IS coding works is that it rederives the right channel's spectral coefficients from the left channel via the scalefactor index values left in the right channel. Since an entire band's spectral coefficients do not need to be coded, the encoder's efficiency jumps up and it unzeroes some high frequency values which it previously did not have enough bits to encode. That way less information is lost than the information lost by rederiving the spectral coefficients with some error. This is why the filesize of files encoded with IS do not decrease significantly. Users wishing that IS coding should reduce filesize are expected to reduce their encoding bitrates appropriately. This is V2 of the commit. The old version did not mark ms_mask as 0 since M/S and IS coding are incompactible, which resulted in distortions with M/S coding enabled. This version also improves phase detection by measuring it for every spectral coefficient in the band and using a simple majority rule to determine whether the coefficients are in or out of phase. Also, the energy values per spectral coefficient were changed as to reflect the official specifications. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aacenc: add support for coding of IS spectral coefficientsRostislav Pehlivanov2015-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the coding of intensity stereo spectral coefficients. It also fixes the Mid/Side coding of band_types higher than RESERVED_BT (M/S must not be applied to their spectral coefficients, but marking M/S as present in encode_ms_info() is okay). Much of the changes here were taken from the decoder and inverted. This commit does not change the functionality of the decoder as the previous patch in this series zeroes ms_mask and is_mask. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aaccoder: add a new perceptual noise substitution implementationRostislav Pehlivanov2015-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit finalizes the PNS implementation previously added to the encoder by moving it to a seperate function search_for_pns() and thus making it coder-generic. This new implementation makes use of the spread field of the psy bands and the lambda quality feedback paremeter. The spread of the spectrum in a band prevents PNS from being used excessively and thus preserve more phase information in high frequencies. The lambda parameter allows the number of PNS-marked bands to vary based on the lambda parameter and the amount of bits available, making better choices on which bands are to be marked as noise. Comparisons with the previous PNS implementation can be found here: https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/ This is V2 of the patch, the changes from the previous version being that this version uses the new band->spread metric from aacpsy and normalizes the energy using the group size. These changes were suggested by Claudio Freire on the mailing list. Another change is the use of lambda to alter the frequency threshold. This change makes the actual threshold frequencies vary between +-2Khz of what's specified, depending on frame encoding performance. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aacenc: use the new function for setting special band scalefactor indicesRostislav Pehlivanov2015-07-05
| | | | | | | | | | | | | | | | | | | | | | This commit enables the function added with commit 7c10b87 and uses that new function for setting any special scalefactor indices. This commit does not change the behaviour of the encoder since no bands are being marked as either NOISE_BT(due to the previous PNS implementation removed in the previous commit) or INTENSITY_BT2/INTENSITY_BT. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aacenc: reset marked IS and M/S bands upon frame encodingRostislav Pehlivanov2015-07-03
| | | | | | | | | | | | | | | | | | | | This commit resets any bands marked as M/S or IS upon encoding a frame. This is needed because the arrays may contain some residual information upon allocation on startup and because there isn't any mechanism to reset the arrays once the frame has been encoded. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aacenc: add support for coding of intensity stereo scalefactor indicesRostislav Pehlivanov2015-06-29
| | | | | | | | | | | | | | | | | | | | | | This commit adds support for the coding of intensity stereo scalefactor indices. It does not do any marking of such bands and as such does no functional changes to the encoder. It removes any old twoloop specific code for PNS and moves it into a seperate function which handles setting of scalefactor indices for PNS and IS bands. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/aacenc: use < 0 instead of != 0 for error checksMichael Niedermayer2015-05-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aaccoder: Implement Perceptual Noise Substitution for AACRostislav Pehlivanov2015-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements the perceptual noise substitution AAC extension. This is a proof of concept implementation, and as such, is not enabled by default. This is the fourth revision of this patch, made after some problems were noted out. Any changes made since the previous revisions have been indicated. In order to extend the encoder to use an additional codebook, the array holding each codebook has been modified with two additional entries - 13 for the NOISE_BT codebook and 12 which has a placeholder function. The cost system was modified to skip the 12th entry using an array to map the input and outputs it has. It also does not accept using the 13th codebook for any band which is not marked as containing noise, thereby restricting its ability to arbitrarily choose it for bands. The use of arrays allows the system to be easily extended to allow for intensity stereo encoding, which uses additional codebooks. The 12th entry in the codebook function array points to a function which stops the execution of the program by calling an assert with an always 'false' argument. It was pointed out in an email discussion with Claudio Freire that having a 'NULL' entry can result in unexpected behaviour and could be used as a security hole. There is no danger of this function being called during encoding due to the codebook maps introduced. Another change from version 1 of the patch is the addition of an argument to the encoder, '-aac_pns' to enable and disable the PNS. This currently defaults to disable the PNS, as it is experimental. The switch will be removed in the future, when the algorithm to select noise bands has been improved. The current algorithm simply compares the energy to the threshold (multiplied by a constant) to determine noise, however the FFPsyBand structure contains other useful figures to determine which bands carry noise more accurately. Some of the sample files provided triggered an assertion when the parameter to tune the threshold was set to a value of '2.2'. Claudio Freire reported the problem's source could be in the range of the scalefactor indices for noise and advised to measure the minimal index and clip anything above the maximum allowed value. This has been implemented and all the files which used to trigger the asserion now encode without error. The third revision of the problem also removes unneded variabes and comparisons. All of them were redundant and were of little use for when the PNS implementation would be extended. The fourth revision moved the clipping of the noise scalefactors outside the second loop of the two-loop algorithm in order to prevent their redundant calculations. Also, freq_mult has been changed to a float variable due to the fact that rounding errors can prove to be a problem at low frequencies. Considerations were taken whether the entire expression could be evaluated inside the expression , but in the end it was decided that it would be for the best if just the type of the variable were to change. Claudio Freire reported the two problems. There is no change of functionality (except for low sampling frequencies) so the spectral demonstrations at the end of this commit's message were not updated. Finally, the way energy values are converted to scalefactor indices has changed since the first commit, as per the suggestion of Claudio Freire. This may still have some drawbacks, but unlike the first commit it works without having redundant offsets and outputs what the decoder expects to have, in terms of the ranges of the scalefactor indices. Some spectral comparisons: https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/Original.png (original), https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS_NO.png (encoded without PNS), https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS1.2.png (encoded with PNS, const = 1.2), https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/Difference1.png (spectral difference). The constant is the value which multiplies the threshold when it gets compared to the energy, larger values means more noise will be substituded by PNS values. Example when const = 2.2: https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS_2.2.png Reviewed-by: Claudio Freire <klaussfreire@gmail.com> 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: Add support for 7350Hz sampling rates, no error on too hight bitrate.Claudio Freire2015-03-06
| | | | | | | | | | | | | | | | Instead, warn that bitrate will be clamped down to the maximum allowed. Patch is mostly work of Kamendo2 in issue #2686, quite tested within that issue. 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>
* | Fix buffer_size argument to init_put_bits() in multiple encoders.Dyami Caliri2015-02-26
| | | | | | | | | | | | | | Several encoders were multiplying the buffer size by 8, in order to get a bit size. However, the buffer_size argument is for the byte size of the buffer. We had experienced crashes encoding prores (Anatoliy) at size 4096x4096.
* | avcodec/aacenc: Fix sample rate checkMichael Niedermayer2015-02-22
| | | | | | | | | | | | | | Fixes out of array read Fixes CID1257803, CID1257797, CID1257789, CID1257786 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '971099ff5a85377579eb5b8d3620e283957f097e'Michael Niedermayer2014-12-19
|\| | | | | | | | | | | | | * commit '971099ff5a85377579eb5b8d3620e283957f097e': aacenc: correctly check returned value Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aacenc: correctly check returned valueVittorio Giovara2014-12-18
| | | | | | | | CC: libav-stable@libav.org
* | avcodec/aacenc: Use avpriv_float_dsp_alloc()Michael Niedermayer2014-11-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/aacenc: check input for NaNMichael Niedermayer2014-11-08
| | | | | | | | | | | | Fixes Ticket3762 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2df0c32ea12ddfa72ba88309812bfb13b674130f'Michael Niedermayer2014-10-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '2df0c32ea12ddfa72ba88309812bfb13b674130f': lavc: use a separate field for exporting audio encoder padding Conflicts: libavcodec/audio_frame_queue.c libavcodec/avcodec.h libavcodec/libvorbisenc.c libavcodec/utils.c libavcodec/version.h libavcodec/wmaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use a separate field for exporting audio encoder paddingAnton Khirnov2014-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the amount of padding inserted at the beginning by some audio encoders, is exported through AVCodecContext.delay. However - the term 'delay' is heavily overloaded and can have multiple different meanings even in the case of audio encoding. - this field has entirely different meanings, depending on whether the codec context is used for encoding or decoding (and has yet another different meaning for video), preventing generic handling of the codec context. Therefore, add a new field -- AVCodecContext.initial_padding. It could conceivably be used for decoding as well at a later point.
* | avcodec/aacenc: Use FF_ALLOCZ_ARRAY_OR_GOTO()Michael Niedermayer2014-09-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/aacenc: dont use global quality if its negativeMichael Niedermayer2014-05-24
| | | | | | | | | | | | Some applications used a negative value as default for "not set" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2': cosmetics: Group .name and .long_name together in codec/format declarations Conflicts: libavcodec/8svx.c libavcodec/alac.c libavcodec/cljr.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dpxenc.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/ffv1dec.c libavcodec/flacdec.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g726.c libavcodec/gif.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopencore-amr.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/libvo-amrwbenc.c libavcodec/libvorbisenc.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/ljpegenc.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/msmpeg4dec.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/proresdec_lgpl.c libavcodec/proresenc_kostya.c libavcodec/ra144enc.c libavcodec/rawdec.c libavcodec/rv10.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tta.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/wavpack.c libavcodec/xbmenc.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-03
| |
| * aacenc: Fix erasure of surround channelsClaudio Freire2013-05-14
| | | | | | | | | | | | | | This was due to a miscomputation of s->cur_channel, which led to psy-based encoders using the psy coefficients for the wrong channel. Signed-off-by: Martin Storsjö <martin@martin.st>
* | aacenc: use constants to set AAC coderTimothy Gu2013-09-12
| | | | | | | | | | Signed-off-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aacenc: Fix ticket #1784: erasure of surround channelsClaudio Freire2013-05-12
| | | | | | | | | | | | | | | | | | This was due to a miscomputation of s->cur_channel, which led to psy-based encoders using the psy coefficients for the wrong channel. Test sample attached on the bug tracker had the peculiar case of all other channels being silent, so the error was far more noticeable. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mips: Optimization of AAC coefficients encoder functionsBojan Zivkovic2013-03-20
| | | | | | | | | | | | Signed-off-by: Bojan Zivkovic <bojan@mips.com> Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5'Michael Niedermayer2013-03-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5': lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruft Conflicts: libavcodec/flacenc.c libavcodec/libgsm.c libavcodec/utils.c libavcodec/version.h The compatibility wrapers are left as they likely sre still in wide use. They will be removed when they break or otherwise cause work without an volunteer being available. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruftAnton Khirnov2013-03-09
| |
* | normalize calls to ff_alloc_packet2James Zern2013-03-06
| | | | | | | | | | | | | | - check ret < 0 - remove excessive error log 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
| |
* | Merge commit '42d324694883cdf1fff1612ac70fa403692a1ad4'Michael Niedermayer2013-01-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '42d324694883cdf1fff1612ac70fa403692a1ad4': floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp. Conflicts: libavcodec/arm/dsputil_init_vfp.c libavcodec/arm/dsputil_vfp.S libavcodec/dsputil.c libavcodec/ppc/float_altivec.c libavcodec/x86/dsputil.asm libavutil/x86/float_dsp.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.Ronald S. Bultje2013-01-22
| | | | | | | | | | | | Now, nellymoserenc and aacenc no longer depends on dsputil. Independent of this patch, wmaprodec also does not depend on dsputil, so I removed it from there also.
| * lavc: Fix assignments in if() when calling ff_af_queue_addMichael Niedermayer2013-01-14
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * aacenc: use the correct output bufferMichael Niedermayer2012-11-26
| | | | | | | | | | | | | | This fixes segfault caused by 3d3cf6745e2a5dc9c377244454c3186d75b177fa when SingleChannelElement.ret was renamed to SingleChannelElement.ret_buf. Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | aacenc: Fix assignments in if()Michael Niedermayer2013-01-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>