summaryrefslogtreecommitdiff
path: root/libavcodec/mlpdec.c
Commit message (Collapse)AuthorAge
* Merge commit '970c76f32283bddf3a5afd24fe52db7a96186244'James Almer2017-10-30
|\ | | | | | | | | | | | | * commit '970c76f32283bddf3a5afd24fe52db7a96186244': mlp_parser: Drop in-parser downmix functionality Merged-by: James Almer <jamrial@gmail.com>
| * mlp_parser: Drop in-parser downmix functionalityVittorio Giovara2017-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request_channel_layout is a decoder option and it makes no sense to have it in a parser. This feature was needed in the past when the decoder was allowed to reuse the avctx from the demuxer. Nowadays the decoder receives only the parameters from it, already containing the real channel layout (and the correct request_channel_layout option). After initialization the decoder overwrites the channel layout with the downmixed one that is actually output, so there is no need to preserve this functionality in the parser. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '94c54d97e7f4fe90570c323803f2bdf6246c1010'James Almer2017-10-30
|\| | | | | | | | | | | | | * commit '94c54d97e7f4fe90570c323803f2bdf6246c1010': mlp: Factor out channel layout subset checks Merged-by: James Almer <jamrial@gmail.com>
| * mlp: Factor out channel layout subset checksVittorio Giovara2017-04-26
| |
* | Merge commit '1f6e5dd4d4dd9c02371ad211049d27edb6d95286'James Almer2017-10-30
|\| | | | | | | | | | | | | * commit '1f6e5dd4d4dd9c02371ad211049d27edb6d95286': mlp: Rename the channel layout variable Merged-by: James Almer <jamrial@gmail.com>
| * mlp: Rename the channel layout variableVittorio Giovara2017-04-26
| | | | | | | | | | Purely cosmetic change, will make code more readable once the new channel layout takes over.
| * Use bitstream_init8() where appropriateDiego Biurrun2017-02-07
| |
| * mlp: Convert to the new bitstream readerAlexandra Hájková2016-12-19
| |
| * mlpdec: Fix a undefined left shift of negative numberGanesh Ajjanagadde2015-09-29
| | | | | | | | | | | | This fixes a -Wshift-negative-value warning reported with clang 3.7+. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec/mlpdec: Check quant_step_size against huff_lsbsMichael Niedermayer2017-06-03
| | | | | | | | | | | | | | | | | | This reorders the operations so as to avoid computations with the above arguments before they have been initialized. Fixes part of 1708/clusterfuzz-testcase-minimized-5035111957397504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlpdec: Do not leave invalid values in matrix_out_ch[] on errorMichael Niedermayer2017-05-27
| | | | | | | | | | | | | | | | Fixes: runtime error: index 12 out of bounds for type 'uint8_t [8]' Fixes: 1832/clusterfuzz-testcase-minimized-6574546079449088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlpdec: Fix runtime error: shift exponent -5 is negativeMichael Niedermayer2017-05-22
| | | | | | | | | | | | | | Fixes part of 1708/clusterfuzz-testcase-minimized-5035111957397504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlpdec: Do not leave a invalid num_primitive_matrices in the contextMichael Niedermayer2017-05-20
| | | | | | | | | | | | | | | | Fixes: runtime error: index 8 out of bounds for type 'uint8_t [8]' Fixes: 1699/clusterfuzz-testcase-minimized-6327177438035968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlpdec: Fix: runtime error: left shift of negative value -8Michael Niedermayer2017-05-18
| | | | | | | | | | | | | | Fixes: 1658/clusterfuzz-testcase-minimized-4889937130291200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlpdec: Fix runtime error: left shift of negative value -1Michael Niedermayer2017-05-17
| | | | | | | | | | | | | | Fixes: 1636/clusterfuzz-testcase-minimized-5310494757879808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlpdec: Check that there is enough data for headersMichael Niedermayer2017-05-13
| | | | | | | | | | | | | | | | Fixes: out of array access Fixes: 1541/clusterfuzz-testcase-minimized-6403410590957568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlp: Fix multiple runtime error: left shift of negative value -1Michael Niedermayer2017-05-13
| | | | | | | | | | | | | | Fixes: 1512/clusterfuzz-testcase-minimized-4713846423945216 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlpdec: Fix runtime error: left shift of negative value -22Michael Niedermayer2017-05-06
| | | | | | | | | | | | | | Fixes: 1355/clusterfuzz-testcase-minimized-6662205472768000 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mlpdec: fix a undefined left shift of negative numberGanesh Ajjanagadde2015-09-20
| | | | | | | | | | | | | | | | This fixes a -Wshift-negative-value reported with clang 3.7+, e.g http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'dc70c19476e76f1118df73b5d97cc76f0e5f6f6c'Hendrik Leppkes2015-09-05
|\| | | | | | | | | | | | | * commit 'dc70c19476e76f1118df73b5d97cc76f0e5f6f6c': lavc: Drop deprecated request_channels related functions Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: Drop deprecated request_channels related functionsVittorio Giovara2015-08-28
| | | | | | | | Deprecated in 04/2011.
* | 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>
| * mlpdec: support TrueHD streams with an Atmos substreamHendrik Leppkes2015-03-11
| | | | | | | | | | | | | | | | | | The fourth substream is being discarded, since its not raw audio data, but an encoded Atmos stream which needs a specialized decoder. Fixes decoding of the true hd stream from Transformers\ -\ Age\ of\ Extinction\ 2014\ 1080P-003.mkv Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * mlpdec: support major sync headers with optional extension blocksHendrik Leppkes2015-03-11
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '2ffb0598dbdb81c40650952aa9299fa02fa5e834'Michael Niedermayer2014-11-13
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '2ffb0598dbdb81c40650952aa9299fa02fa5e834': mlpdec: check for negative index Conflicts: libavcodec/mlpdec.c See: 8491ac3ad2e9fc92479d6fc42d6ee4cb8d6f61d3 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mlpdec: check for negative indexVittorio Giovara2014-11-13
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 970924
| * truehd: break out part of output_data into platform-specific callback.Ben Avison2014-03-26
| | | | | | | | | | | | | | Verified with profiling that this doesn't have a measurable effect upon overall performance. Signed-off-by: Martin Storsjö <martin@martin.st>
* | x86/mlpdec: add ff_mlp_rematrix_channel_{sse4,avx2}James Almer2014-10-02
| | | | | | | | | | | | | | 2x to 2.5x faster than the C version. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | mlpdec: move rematrix_channels code to output_data()James Almer2014-10-02
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | mlpdec: support TrueHD streams with an Atmos substreamHendrik Leppkes2014-09-21
| | | | | | | | | | | | | | | | | | The fourth substream is being discarded, since its not raw audio data, but an encoded Atmos stream which needs a specialized decoder. Fixes decoding of the true hd stream from Transformers\ -\ Age\ of\ Extinction\ 2014\ 1080P-003.mkv Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mlpdec: support major sync headers with optional extension blocksHendrik Leppkes2014-09-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mlpdec: fix () in MSB_MASK() macroMichael Niedermayer2014-05-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'fcf5fc444522d24caa9907225802817ae788f511'Michael Niedermayer2014-03-26
|\| | | | | | | | | | | | | | | | | | | | | * commit 'fcf5fc444522d24caa9907225802817ae788f511': truehd: tune VLC decoding for ARM. Conflicts: libavcodec/mlpdec.c See: e555e1bc39ea71d46a07d0bb847fb426c2dd4d80 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * truehd: tune VLC decoding for ARM.Ben Avison2014-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiling on a Raspberry Pi revealed the best performance to correspond with VLC_BITS = 5. Results for overall audio decode and the get_vlc2 function in particular are as follows: Before After Mean StdDev Mean StdDev Confidence Change 6:2 total 348.8 20.1 339.6 15.1 88.8% +2.7% (insignificant) 6:2 function 38.1 8.1 26.4 4.1 100.0% +44.5% 8:2 total 339.1 15.4 324.5 15.5 99.4% +4.5% 8:2 function 33.8 7.0 27.3 5.6 99.7% +23.6% 6:6 total 604.6 20.8 572.8 20.6 100.0% +5.6% 6:6 function 95.8 8.4 68.9 8.2 100.0% +39.1% 8:8 total 766.4 17.6 741.5 21.2 100.0% +3.4% 8:8 function 106.0 11.4 86.1 9.9 100.0% +23.1% Signed-off-by: Martin Storsjö <martin@martin.st>
| * truehd: break out part of rematrix_channels into platform-specific callback.Ben Avison2014-03-26
| | | | | | | | | | | | | | Verified with profiling that this doesn't have a measurable effect upon overall performance. Signed-off-by: Martin Storsjö <martin@martin.st>
| * mlpdec: fix request_channel_layout behavior.Michael Niedermayer2014-02-08
| | | | | | | | | | | | | | When request_channel_layout is 0, all substreams should be decoded. Signed-off-by: Tim Walker <tdskywalker@gmail.com>
* | truehd: break out part of output_data into platform-specific callback.Ben Avison2014-03-26
| | | | | | | | | | | | | | Verified with profiling that this doesn't have a measurable effect upon overall performance. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | truehd: break out part of rematrix_channels into platform-specific callback.Ben Avison2014-03-26
| | | | | | | | | | | | | | Verified with profiling that this doesn't have a measurable effect upon overall performance. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | truehd: tune VLC decoding for ARM.Ben Avison2014-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiling on a Raspberry Pi revealed the best performance to correspond with VLC_BITS = 5. Results for overall audio decode and the get_vlc2 function in particular are as follows: Before After Mean StdDev Mean StdDev Confidence Change 6:2 total 348.8 20.1 339.6 15.1 88.8% +2.7% (insignificant) 6:2 function 38.1 8.1 26.4 4.1 100.0% +44.5% 8:2 total 339.1 15.4 324.5 15.5 99.4% +4.5% 8:2 function 33.8 7.0 27.3 5.6 99.7% +23.6% 6:6 total 604.6 20.8 572.8 20.6 100.0% +5.6% 6:6 function 95.8 8.4 68.9 8.2 100.0% +39.1% 8:8 total 766.4 17.6 741.5 21.2 100.0% +3.4% 8:8 function 106.0 11.4 86.1 9.9 100.0% +23.1% Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mlpdec: fix mulichannel outputMichael Niedermayer2014-02-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c0c45188e56cfa3050bb39f8299025345b8a204c'Michael Niedermayer2014-02-08
|\| | | | | | | | | | | | | * commit 'c0c45188e56cfa3050bb39f8299025345b8a204c': mlp: improve request_channel_layout behavior. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mlp: improve request_channel_layout behavior.Tim Walker2014-02-08
| | | | | | | | | | | | | | | | | | | | Don't decode further substreams if request_channel_layout is a subset of the current substream's channel_layout. Before, we would only discard further substreams if request_channel_layout matched the substream's channel_layout extactly, thus decoding additional channels which the caller would probably end up downmixing.
* | Merge commit 'e92123093dfdca0ef6608998240e2f9345d63bff'Michael Niedermayer2014-01-05
|\| | | | | | | | | | | | | * commit 'e92123093dfdca0ef6608998240e2f9345d63bff': mlpdec: set AV_FRAME_DATA_MATRIXENCODING side data. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mlpdec: set AV_FRAME_DATA_MATRIXENCODING side data.Tim Walker2014-01-05
| |
* | Merge commit '4b7f1a7ced0e98f2cc698d896f7ebab8d30eaa09'Michael Niedermayer2014-01-05
|\| | | | | | | | | | | | | | | | | | | | | * commit '4b7f1a7ced0e98f2cc698d896f7ebab8d30eaa09': mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for each substream. Conflicts: libavcodec/mlp_parser.h libavcodec/mlpdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for ↵Tim Walker2014-01-05
| | | | | | | | each substream.
* | avcodec/mlpdec: check that streamtype matches the codecMichael Niedermayer2013-12-16
| | | | | | | | | | | | | | Fixes use of uninitialized memory Fixes msan_uninit-mem_7f126c8ed1ac_5945_issue1731_nonpublic.mpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind 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
| |