summaryrefslogtreecommitdiff
path: root/libavcodec/qdm2.c
Commit message (Collapse)AuthorAge
* avcodec/qdm2: Check fft_coefs_indexMichael Niedermayer2020-02-19
| | | | | | | | | Fixes: out of array access Fixes: 20660/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5658290216501248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qdm2: The smallest header seems to have 2 bytes so treat 1 as invalidMichael Niedermayer2019-11-20
| | | | | | | | Fixes: Timeout (217sec -> 2ms) Fixes: 18488/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5708293662310400 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qdm2: Check frame sizeMichael Niedermayer2019-09-06
| | | | | | | | Fixes: index 2304 out of bounds for type 'float [2304]' Fixes: 16332/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5679142481166336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qdm2: Check checksum_size for 0Michael Niedermayer2019-07-08
| | | | | | | | Fixes: Infinite loop Fixes: 15337/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5757428949319680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qdm2: error out of qdm2_fft_decode_tones() before entering endless loopMichael Niedermayer2019-07-08
| | | | | | | | | Fixes: signed integer overflow: 2147483646 + 2 cannot be represented in type 'int' Fixes: infinite loop Fixes: 15396/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5116605501014016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qdm2: Do not read out of array in fix_coding_method_array()Michael Niedermayer2019-07-08
| | | | | | | | | | Instead we ask for a sample, its unclear what to do in this case. Fixes: index 30 out of bounds for type 'int8_t [30][64]' Fixes: 15339/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5749441484554240 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qdm2: Move fft_order check upMichael Niedermayer2019-06-29
| | | | | | | | | | This avoids undefined computations with unchecked values Fixes: shift exponent -21 is negative Fixes: 15262/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5651261753393152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qdm2: make use of bytestream2Paul B Mahol2017-01-09
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavc/qdm2: increase code clarityAdriano Pallavicino2016-09-28
| | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Josh de Kock <josh@itanimul.li>
* Merge commit 'b668662939de3a02454cfc9ba3e6d10b87527a40'Clément Bœsch2016-06-29
|\ | | | | | | | | | | | | | | | | | | * commit 'b668662939de3a02454cfc9ba3e6d10b87527a40': get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes The merge commit also includes changes for libavcodec/interplayacm.c and libavcodec/truemotion2rt.c Merged-by: Clément Bœsch <clement@stupeflix.com>
| * get_bits: Move BITSTREAM_READER_LE definition before all relevant #includesDiego Biurrun2016-06-07
| | | | | | | | | | | | | | This avoids the danger that get_bits.h might get indirectly #included before BITSTREAM_READER_LE is defined. Also sort headers into canonical order where appropriate.
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * Drop pointless assert.h #includesDiego Biurrun2016-05-03
| |
* | Merge commit '29c2d06d67724e994980045afa055c6c34611b30'Derek Buitenhuis2016-02-24
|\| | | | | | | | | | | | | * commit '29c2d06d67724e994980045afa055c6c34611b30': cosmetics: Drop empty comment lines Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * cosmetics: Drop empty comment linesDiego Biurrun2016-02-18
| |
* | 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 'f3e045263e445c4ab54d85ecae359494cd96a3e2'Michael Niedermayer2015-02-17
|\| | | | | | | | | | | | | * commit 'f3e045263e445c4ab54d85ecae359494cd96a3e2': qdm2: Return meaningful error codes Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: Return meaningful error codesHimangi Saraogi2015-02-17
| |
* | Merge commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0'Michael Niedermayer2015-02-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0': avcodec: Don't anonymously typedef structs Conflicts: libavcodec/alac.c libavcodec/cinepak.c libavcodec/cscd.c libavcodec/dcadec.c libavcodec/g723_1.c libavcodec/gif.c libavcodec/iff.c libavcodec/kgv1dec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/ra288.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Don't anonymously typedef structsDiego Biurrun2015-02-14
| |
| * qdm2: avoid integer overflowVittorio Giovara2014-11-21
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 700555
* | avcodec/qdm2: remove unneeded #include, there are no assert()Paul B Mahol2015-01-30
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | qdm2: Allow hard-coding VLC tables.Reimar Döffinger2014-12-18
| | | | | | | | | | | | | | | | | | | | Also adds a lot of infrastructure necessary for it. Some of it is a bit ugly though. Increases binary size for hardcoded tables by about 12 kB, which is about 15 kB from qdm2_table minus data and code saved that was only used for creating it. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867'Michael Niedermayer2014-08-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867': cosmetics: Write NULL pointer inequality checks more compactly Conflicts: libavcodec/dvdsubdec.c libavcodec/h263dec.c libavcodec/libxvid.c libavcodec/rv10.c libavcodec/utils.c libavformat/format.c libavformat/matroskadec.c libavformat/segment.c libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume2014-08-15
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avcodec/qdm2: move static init to normal init to avoid initializing tables ↵Michael Niedermayer2013-12-06
| | | | | | | | | | | | that might never be used 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
| |
* | Merge commit '45ee556d51ef04d79d52bf6b0b7f28a4d231cb0c'Michael Niedermayer2013-07-29
|\| | | | | | | | | | | | | | | | | | | | | * commit '45ee556d51ef04d79d52bf6b0b7f28a4d231cb0c': qdm2: Whitespace cosmetics flac: use meaningful return values Conflicts: libavcodec/flacdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: Whitespace cosmeticsLuca Barbato2013-07-28
| |
* | avcodec/qdm2: initialize sign_bitsMichael Niedermayer2013-07-10
| | | | | | | | | | | | Fixes non deterministic output Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/qdm2: store bits in an integer instead of float variableMichael Niedermayer2013-07-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-10
|\| | | | | | | | | | | | | | | | | * qatar/master: qdm2: Conceal broken samples See: 5ee008e01d5a50d976b5f2a4abd6932185672d91 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: Conceal broken samplesLuca Barbato2013-07-09
| | | | | | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | Merge commit 'adadc3f2443d25b375e21e801516ccfd78e0b080'Michael Niedermayer2013-07-10
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'adadc3f2443d25b375e21e801516ccfd78e0b080': qdm2: refactor joined stereo support Conflicts: libavcodec/qdm2.c See: 2b12d1ffd841cf57976b124c1882e4a23a7c5f61 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: refactor joined stereo supportLuca Barbato2013-07-09
| | | | | | | | | | | | | | qdm2 does support only two channels. Loop over the run once. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-08
|\| | | | | | | | | | | | | * qatar/master: qdm2: check and reset dithering index per channel Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: check and reset dithering index per channelLuca Barbato2013-07-07
| | | | | | | | | | | | | | | | Checking per subband would have the index exceed the dithering noise table size. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | Merge commit '76efedeadb1f6bf79020c44a71dd0cee13d932ad'Michael Niedermayer2013-07-08
|\| | | | | | | | | | | | | | | | | | | * commit '76efedeadb1f6bf79020c44a71dd0cee13d932ad': qdm2: formatting cosmetics Conflicts: libavcodec/qdm2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: formatting cosmeticsLuca Barbato2013-07-07
| | | | | | | | | | Apply the usual style plus drop few unnecessary return at the end of void functions.
* | Merge commit 'f054e309c58894450a5d18cce9799ef58aab9f14'Michael Niedermayer2013-07-08
|\| | | | | | | | | | | | | | | | | | | | | * commit 'f054e309c58894450a5d18cce9799ef58aab9f14': qdm2: use init_static_data westwood_vqa: do not free extradata on error in read_header Conflicts: libavformat/westwood_vqa.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: use init_static_dataLuca Barbato2013-07-07
| |
* | qdm2: initialize coeff_per_sb_select from bit_rateRoberto Togni2013-04-21
| | | | | | | | | | | | | | | | | | | | The value of coeff_per_sb_select depends on the bit rate, not on sub_sampling. Also remove the calculation of tmp, no longer needed. Fixes tickets #1868 and #742 (only audio part) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '69f6f03cd16a09e4e848b4e82bae4993bc361cd0'Michael Niedermayer2013-04-17
|\| | | | | | | | | | | | | | | | | | | | | * commit '69f6f03cd16a09e4e848b4e82bae4993bc361cd0': rv10: cosmetics, reformat qdm2: check that the FFT size is a power of 2 Conflicts: libavcodec/rv10.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: check that the FFT size is a power of 2Anton Khirnov2013-04-17
| | | | | | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* | lavc & lavf: replace deprecated av_log* functionsPaul B Mahol2013-03-15
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>