summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* Merge commit '165cc6fb9defcd79fd71c08167f3e8df26b058ff'Hendrik Leppkes2015-12-07
|\ | | | | | | | | | | | | * commit '165cc6fb9defcd79fd71c08167f3e8df26b058ff': g723_1: Move sharable functions to a separate file Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * g723_1: Move sharable functions to a separate fileVittorio Giovara2015-11-30
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'aac996cc01042194bf621d845bbe684549b5882e'Hendrik Leppkes2015-12-07
|\| | | | | | | | | | | | | * commit 'aac996cc01042194bf621d845bbe684549b5882e': g723_1: Rename files to better reflect their purpose Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * g723_1: Rename files to better reflect their purposeVittorio Giovara2015-11-30
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'b74b88f30da2389f333a31815d8326d5576d3331'Hendrik Leppkes2015-12-07
|\| | | | | | | | | | | | | * commit 'b74b88f30da2389f333a31815d8326d5576d3331': g723_1: Handle values at the ends of the table in lsp2lpc() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * g723_1: Handle values at the ends of the table in lsp2lpc()Michael Niedermayer2015-11-30
| | | | | | | | | | | | | | | | Fixes out of array reads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * pgssubdec: fix API compability layerPetri Hintukainen2015-11-26
| | | | | | | | | | | | | | Copy pointers to AVPicture after memory has been allocated. Fixes NULL pointers in AVPicture after a17a7661906ba295d67afd80ac0770422e1b02b3. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec: implement vp9 dxva2 hwaccelHendrik Leppkes2015-12-07
| |
* | vp9: add hwaccel hooksHendrik Leppkes2015-12-07
| |
* | vp9: fix pixel format changes with threadingHendrik Leppkes2015-12-07
| |
* | mjpegdec: consider chroma subsampling in size checkAndreas Cadhalpun2015-12-06
| | | | | | | | | | | | | | | | | | | | | | | | If the chroma components are subsampled, smaller buffers are allocated for them. In that case the maximal block_offset for the chroma components is not as large as for the luma component. This fixes out of bounds writes causing segmentation faults or memory corruption. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | aacenc_tns: tune and reduce artifactsRostislav Pehlivanov2015-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of major changes here: 1. Start using TNS coefficient compression. 2. Start using 3 bits per coefficient maximum for short windows. The bits we save from these 2 changes seem to make a nice impact on the rest of the file/windows. 3. Remove special case gain checking for short windows. 4. Modify the coefficient loop to support up to 3 windows. The additional restrictions on TNS were something that was no in the specifications and furthermore restricting TNS to only low energy short windows was done to compensate for bugs elsewhere in the code. Overall, the improvements here reduce crackling artifacts heard in very noisy tracks. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | aacenc: move the TNS search and filtering before PNSRostislav Pehlivanov2015-12-06
| | | | | | | | | | | | | | | | The original plan was to have TNS use data from the PNS search to better tune itself to noise but this was never used nor necessary. This should slightly boost the PNS accuracy if TNS was used. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | avcodec/dvdsubdec: fix typo in dlog messageGanesh Ajjanagadde2015-12-06
| | | | | | | | | | | | | | | | | | Likely accidental in 764900d6458a2f79166ff91df4f20ad39cd6acec. Fixes: CID 1341578. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec/hevc: Fix integer overflow of entry_point_offsetMichael Niedermayer2015-12-05
| | | | | | | | | | | | | | | | Fixes out of array read Fixes: d41d8cd98f00b204e9800998ecf8427e/signal_sigsegv_321165b_7641_077dfcd8cbc80b1c0b470c8554cd6ffb.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | aacenc_ltp: use an AR filter for LTP encoding as wellRostislav Pehlivanov2015-12-05
| | | | | | | | | | | | | | Seems to work better. Information on why the decoder does this is lacking. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | aacenc: fix aac_pred option triggering an errorRostislav Pehlivanov2015-12-05
| | | | | | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | avcodec/dirac_parser: Check that there is a previous PU before accessing itMichael Niedermayer2015-12-05
| | | | | | | | | | | | | | | | Fixes out of array read Fixes: 99d142c47e6ba3510a74b872a1a2ae72/asan_heap-oob_11b36f4_3811_0f5c69e7609a88a580135678de1df844.dxa Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/dirac_parser: Add basic validity checks for next_pu_offset and ↵Michael Niedermayer2015-12-05
| | | | | | | | | | | | prev_pu_offset Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/dirac_parser: Fix potential overflows in pointer checksMichael Niedermayer2015-12-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | aacenc: remove the experimental flagRostislav Pehlivanov2015-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thiss commit removes the experimental flag from the native AAC Encoder and thus makes it the default. After a lot of work, done by myself and Claudio Freire, the quality of this encoder rivals and surpasses libfdk_aac in some situations. The encoder had instability issues earlier which prevented it from having its experimental flag removed, however the last commits done by Claudio removed the last known source of instability and solved a lot of problems which were previously observed. The issues were caused by the various coding tools interfering with the scalefactor indices. Thus, with these problems solved, it should now be possible to declare this encoder as the default and recommend that the users should use it instead of others provided by external libraries, as it is both faster and has a subjectively higher quality with selected tracks. The encoder has still yet to be fine tuned for every possible audio file type like music or voice, so it is hoped that with the experimental flag removed the users should be able to provide feedback and make the encoder better than the alternatives for every type of audio and at every bitrate. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | aacenc: mark coders other than twoloop as experimentalRostislav Pehlivanov2015-12-05
| | | | | | | | | | | | | | ANMR has some interesting things coming up but is currently not in a shape fit for non-experimental usage. Same with "FAST". Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | aacenc: mark the "faac"-like coder for removalRostislav Pehlivanov2015-12-05
| | | | | | | | | | | | | | | | | | | | | | This coder produces a much lower quality audio than the rest, is much slower and is unstable. Hasn't been updated for a very long time as well, hence it is more appropriate to remove it since it also depends on a big burden of a code (the encode_window_bands_info function which is just as old, just as unstable and bad and in no way modifiable or fixable). Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | avcodec/wmaprodec: Check bits per sample to be within the range not causing ↵Michael Niedermayer2015-12-05
| | | | | | | | | | | | | | | | | | integer overflows Fixes: 549d5aab1480d10f2a775ed90b0342f1/signal_sigabrt_7ffff6ae7cc9_5643_96bbb0cfe3e28be1dadfce1075016345.wma Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Fix overflow in get_bit_rates computationsMichael Niedermayer2015-12-05
| | | | | | | | | | | | | | Fixes: 129ca3e28d73af7b1e24a9d4118e7a2d/signal_sigabrt_7ffff6ae7cc9_836_762b310fc3ef6087bd7771e5d8e90b9b.asf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/pcm: Fix overflow in bitrate computationMichael Niedermayer2015-12-05
| | | | | | | | | | | | | | Fixes: 129ca3e28d73af7b1e24a9d4118e7a2d/signal_sigabrt_7ffff6ae7cc9_836_762b310fc3ef6087bd7771e5d8e90b9b.asf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/wmaprodec: Fix overflow of cutoffMichael Niedermayer2015-12-05
| | | | | | | | | | | | | | Fixes: 129ca3e28d73af7b1e24a9d4118e7a2d/signal_sigabrt_7ffff6ae7cc9_836_762b310fc3ef6087bd7771e5d8e90b9b.asf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | AAC encoder: ANMR, avoid empty search rangesClaudio Freire2015-12-04
| | | | | | | | | | Avoid generating broken paths when some bands have an empty search space.
* | aaccoder: prevent crash of anmr coderAndreas Cadhalpun2015-12-05
| | | | | | | | | | | | | | | | | | If minq is negative, the range of sf_idx can be larger than SCALE_MAX_DIFF allows, causing assertion failures later in encode_scale_factors. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec/pgssubdec: Fix left shift of 255 by 24 places cannot be represented ↵Michael Niedermayer2015-12-04
| | | | | | | | | | | | | | | | | | in type int Fixes: b293a6479bb4b5286cff24d356bfd955/asan_generic_225c3c9_7819_cc526b657450c6cdef1371b526499626.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/jpeg2000dec: Check bpno in decode_cblk()Michael Niedermayer2015-12-04
| | | | | | | | | | | | | | | | Fixes: undefined shift Fixes: c409ef86f892335a0a164b5871174d5a/asan_heap-oob_1dff564_2159_162b7234616deab02b544410455eb07b.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mpegvideo: use constants for rc_strategyClément Bœsch2015-12-04
| |
* | avcodec: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | libavcodec/aacsbr_tablegen: fix tablegen on windowsHendrik Leppkes2015-12-04
| | | | | | | | | | | | Including these headers is not needed and breaks building on Windows as it tries to activate the full compat tools, which are not needed for host tools.
* | avcodec: include tablegen compat header before the tablegen functionalityHendrik Leppkes2015-12-04
| |
* | avcodec/dnxhddec: Fix runtime error: left shift of negative valueMichael Niedermayer2015-12-04
| | | | | | | | | | | | | | Fixes: 2abd25478c62a675f335fac00b467023/asan_static-oob_10aff98_1227_8811480c6ef1e970a7977ceb7e5a9958.mxf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/vp3: Fix "runtime error: left shift of negative value"Michael Niedermayer2015-12-04
| | | | | | | | | | | | | | Fixes: 5c6129154b356b80bcab86f9e3ee5d29/signal_sigabrt_7ffff6ae7cc9_7322_d26ac6d7cb6567db1b8be0159b387d0b.ogg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | mips: rename mipsdspr1 to mipsdspVicente Olivert Riera2015-12-04
| | | | | | | | | | Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264_direct: Check CO-POCs before useMichael Niedermayer2015-12-04
| | | | | | | | | | | | | | | | Fixes harmless integer overflow Fixes mozilla bug 1230286 Found-by: Tyson Smith Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | aacenc_ltp: fix out of bounds memory accessRostislav Pehlivanov2015-12-03
| | | | | | | | Discovered by Coverity.
* | avcodec/jpeg2000: fix type of arguments of tag_tree_sizeMichael Niedermayer2015-12-03
| | | | | | | | | | | | | | Fixes: out of array read Fixes: 36b8096fefab16c4c9326a508053e95c/signal_sigsegv_1d9ce18_3233_1a55196b018106dfabeace071a432d9e.r3d Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/vp3: ensure header is parsed successfully before tablesMichael Niedermayer2015-12-03
| | | | | | | | | | | | | | | | Fixes assertion failure Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/apedec: Check length in long_filter_high_3800()Michael Niedermayer2015-12-02
| | | | | | | | | | | | | | | | Fixes out of array read Fixes: 0a7ff0c1d93da9cef28a315ec91b692a/asan_heap-oob_4a52e5_3604_9c56dbb20e308f4faeef7b35f688521a.ape Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | vp9: always keep s->bytesperpixel and ctx->pix_fmt in sync.Ronald S. Bultje2015-12-02
| | | | | | | | Fixes mozilla bug 1229128.
* | AAC encoder: improve SF range utilizationClaudio Freire2015-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does 4 things, all of which interact and thus it woudln't be possible to commit them separately without causing either quality regressions or assertion failures. Fate comparison targets don't all reflect improvements in quality, yet listening tests show substantially improved quality and stability. 1. Increase SF range utilization. The spec requires SF delta values to be constrained within the range -60..60. The previous code was applying that range to the whole SF array and not only the deltas of consecutive values, because doing so requires smarter code: zeroing or otherwise skipping a band may invalidate lots of SF choices. This patch implements that logic to allow the coders to utilize the full dynamic range of scalefactors, increasing quality quite considerably, and fixing delta-SF-related assertion failures, since now the limitation is enforced rather than asserted. 2. PNS tweaks The previous modification makes big improvements in twoloop's efficiency, and every time that happens PNS logic needs to be tweaked accordingly to avoid it from stepping all over twoloop's decisions. This patch includes modifications of the sort. 3. Account for lowpass cutoff during PSY analysis The closer PSY's allocation is to final allocation the better the quality is, and given these modifications, twoloop is now very efficient at avoiding holes. Thus, to compute accurate thresholds, PSY needs to account for the lowpass applied implicitly during twoloop (by zeroing high bands). This patch makes twoloop set the cutoff in psymodel's context the first time it runs, and makes PSY account for it during threshold computation, making PE and threshold computations closer to the final allocation and thus achieving better subjective quality. 4. Tweaks to RC lambda tracking loop in relation to PNS Without this tweak some corner cases cause quality regressions. Basically, lambda needs to react faster to overall bitrate efficiency changes since now PNS can be quite successful in enforcing maximum bitrates, when PSY allocates too many bits to the lower bands, suppressing the signals RC logic uses to lower lambda in those cases and causing aggressive PNS. This tweak makes PNS much less aggressive, though it can still use some further tweaks. Also update MIPS specializations and adjust fuzz Also in lavc/mips/aacpsy_mips.h: remove trailing whitespace
* | avcodec/mpegaudio_tablegen: Add (), fix fateMichael Niedermayer2015-12-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/cbrt_tablegen: speed up dynamic table creationGanesh Ajjanagadde2015-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On systems having cbrt, there is no reason to use the slow pow function. Sample benchmark (x86-64, Haswell, GNU/Linux): new: 5124920 decicycles in cbrt_tableinit, 1 runs, 0 skips old: 12321680 decicycles in cbrt_tableinit, 1 runs, 0 skips Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec/mpegaudio_tablegen: more dynamic table creation speedupsGanesh Ajjanagadde2015-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This further speeds up runtime initialization, with identical generated tables. Sample benchmark (x86-64, Haswell, GNU/Linux): old: 34441423 decicycles in mpegaudio_tableinit, 8192 runs, 0 skips new: 10776291 decicycles in mpegaudio_tableinit, 8192 runs, 0 skips Most low hanging fruit is taken care of here. For some idea, note that 83,064 array elements totalling 233,722 bytes need to be initialized. Thus, with this patch, we average ~ 12.9 cycles per element or ~ 4.6 cycles per byte. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec/mpegaudio_tablegen: speed up dynamic table creationGanesh Ajjanagadde2015-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does some miscellaneous stuff mainly avoiding the usage of pow to achieve significant speedups. This is not speed critical, but is unnecessary latency and cycles wasted for a user. All tables tested and are identical to the old ones (bit-exact even in floating point case). Sample benchmark (x86-64, Haswell, GNU/Linux): old: 102329530 decicycles in mpegaudio_tableinit, 1 runs, 0 skips new: 34111900 decicycles in mpegaudio_tableinit, 1 runs, 0 skips Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec/ppc/fdctdsp: use more accurate constantsGanesh Ajjanagadde2015-12-01
| | | | | | | | | | | | | | | | Whoever wrote this stuff had a pretty bad libm - digits differ pretty quickly. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>