summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
...
* avcodec/photocd: Use ff_set_dimensions()Michael Niedermayer2020-10-18
| | | | | | | | Fixes: out of memory Fixes: 25588/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PHOTOCD_fuzzer-6612945080156160 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/asvenc: Avoid reversing output data twiceAndreas Rheinhardt2020-10-18
| | | | | | | | | | | | | | | | The ASUS V2 format is designed for a little-endian bitstream reader, yet our encoder used an ordinary big-endian bitstream writer to write it; the bits of every byte were swapped at the end and some data (namely the numbers not in static tables) had to be bitreversed before writing it at all, so that it would be reversed twice. This commit stops doing so; instead, a little-endian bitstream writer is used. This also necessitated to switch certain static tables, which required trivial modifications to the decoder (that uses the same tables). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/asvenc: Simplify flushing and padding packetAndreas Rheinhardt2020-10-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/asvdec: Avoid reversing input data twiceAndreas Rheinhardt2020-10-18
| | | | | | | | | | Up until now the ASV2 decoder used an ordinary big-endian bitreader to read data actually destined for a little-endian bitreader; this is done by reversing the whole input packet bitwise, using the big-endian bigreader and reversing (and shifting) the result again. This commit stops this and instead uses a little-endian bitreader directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/nvenc: update driver versions for SDK 11.0Timo Rothenpieler2020-10-17
|
* avcodec/mv30: Fix multiple integer overflowsMichael Niedermayer2020-10-17
| | | | | | | | Fixes: signed integer overflow: -895002 * 2400 cannot be represented in type 'int' Fixes: 26052/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5431812577558528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/smacker: Check remaining bits in SMK_BLK_FULLMichael Niedermayer2020-10-17
| | | | | | | | Fixes: out of array access Fixes: 26047/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5083031667474432 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cook: Check subpacket index against maxMichael Niedermayer2020-10-17
| | | | | | | | | Fixes: off by 1 error Fixes: index 5 out of bounds for type 'COOKSubpacket [5]' Fixes: 25772/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5762459498184704.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/utils: Check for overflow with ATRAC* in get_audio_frame_duration()Michael Niedermayer2020-10-17
| | | | | | | | Fixes: signed integer overflow: 1024 * 13129048 cannot be represented in type 'int' Fixes: 26378/clusterfuzz-testcase-minimized-ffmpeg_dem_CODEC2RAW_fuzzer-5634018353348608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevcpred_template: Fix diagonal chroma availability in 4:2:2 edge ↵Michael Niedermayer2020-10-17
| | | | | | | | | case in intra_pred Fixes: pixel decode issue.ts Fixes: raw frame.hevc Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_mvs: Cleanup ff_hevc_set_neighbour_available()Michael Niedermayer2020-10-17
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/adpcmenc: remove BLKSIZE #defineZane van Iperen2020-10-17
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcm_ima_wav: support custom block size for encodingZane van Iperen2020-10-17
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcm_yamaha: support custom block size for encodingZane van Iperen2020-10-17
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcm_ima_apm: support custom block size for encodingZane van Iperen2020-10-17
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcm_ima_ssi: support custom block size for encodingZane van Iperen2020-10-17
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcm_ms: support custom block size for encodingZane van Iperen2020-10-17
| | | | | | Fixes tickets #6585 and #7109 Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcmenc: add "block_size" optionZane van Iperen2020-10-17
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/av1dec: add cur_frame.spatial_id and temporal_id to AV1FrameJames Almer2020-10-16
| | | | | | | Will be used by hwaccels, which have access to a frame's AV1RawFrameHeader but not its AV1RawOBUHeader. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/movtextenc: cosmeticsAndriy Gelman2020-10-15
| | | | | | Change pointer position. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/movtextenc: fix writing to bytestream on BE archesAndriy Gelman2020-10-15
| | | | | | | | | | | | | | | | | | Fixes fate-binsub-movtextenc on PPC64 Currently tags are written in reverse order on BE arches. This is fixed by using MKBETAG() and AV_RB32() to be arch agnostics. Also s->font_count is of type int. On BE arches with 32bit int, count = AV_RB16(&s->font_count) will read two most significant bytes instead of the least significant bytes. This is fixed by assigning s->font_count to count first. The final change is modifying the type of len. On BE arches the most significant byte of the int was written instead of the least significant byte. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/asvenc: Inline constantsAndreas Rheinhardt2020-10-16
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/asvdec: Use init_get_bits8()Andreas Rheinhardt2020-10-16
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/asvdec: Reduce the size of some VLCsAndreas Rheinhardt2020-10-16
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ylc: Inline constantsAndreas Rheinhardt2020-10-16
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/v3/408enc: Remove empty close functionsAndreas Rheinhardt2020-10-16
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/exr: Fix overflow with many blocksMichael Niedermayer2020-10-15
| | | | | | | | Fixes: signed integer overflow: 1073741827 * 8 cannot be represented in type 'int' Fixes: 25621/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6304841641754624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/Makefile: add missing av1_cuvid entryJames Almer2020-10-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/vp9dsp_template: Fix integer overflows in idct16_1d()Michael Niedermayer2020-10-15
| | | | | | | | Fixes: signed integer overflow: -190760 * 11585 cannot be represented in type 'int' Fixes: 25471/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5743354917421056 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ansi: Check initial dimensionsMichael Niedermayer2020-10-15
| | | | | | | | Fixes: Timeout (minutes to less than 1sec) Fixes: 25682/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ANSI_fuzzer-6320712032452608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevcdec: Check slice_cb_qp_offset / slice_cr_qp_offsetMichael Niedermayer2020-10-15
| | | | | | | | Fixes: signed integer overflow: 29 + 2147483640 cannot be represented in type 'int' Fixes: 25413/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5697909331591168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sonic: Check for overreadMichael Niedermayer2020-10-15
| | | | | | | | Fixes: Timeout (too long -> 1.3 sec) Fixes: 24358/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5107284099989504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mobiclip: Check that Motion vectors are within the input frameMichael Niedermayer2020-10-15
| | | | | | | | | | | | The MV checks did not consider the width and height of the block, also they had some off by 1 errors. This resulted in undefined behavior and crashes. This commit instead errors out on these Fixes: out of array read Fixes: 26080/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5758146355920896 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mobiclip: set the bitstream size to the inputMichael Niedermayer2020-10-15
| | | | | | | | | Fixes: out of array read Fixes: 25453/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5163575973511168 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/allcodecs: move av1_cuvid below libaom_av1James Almer2020-10-15
| | | | | | Software decoders should always be first. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cuviddec: add av1 supportRoman Arzumanyan2020-10-15
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/webp: Use LE VLC table for LE bitstream readerAndreas Rheinhardt2020-10-12
| | | | | | | | | | | | | | | | The WebP format uses Huffman tables and the decoder therefore uses VLC tables. Given that WebP is a LE format, a LE bitreader is used; yet the VLC table is not created for a LE reader (the process used to create the tables puts the last bit to be read in the lowest bit) and therefore custom code for reading the VLCs that reverses the bits read is used instead of get_vlc2(). This commit changes this to use a table designed for LE bitreader which allows to use get_vlc2() directly. The necessary reversing of the codes is delegated to ff_init_vlc_sparse() (and is therefore only done during init and not when actually reading the VLCs). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ivi: Avoid reversing BE VLC codes for LE bitstream readerAndreas Rheinhardt2020-10-12
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/speedhq: Avoid reversing BE codes for LE bitstream readerAndreas Rheinhardt2020-10-12
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/vlc, bitstream: Allow to use BE codes to initialize LE VLCAndreas Rheinhardt2020-10-12
| | | | | | | | | This is easily possible because ff_init_vlc_sparse() already transforms both LE as well as BE codes to a normal form internally before processing them further. This will be used in subsequent commits. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/speedhq: Don't use ff_ prefix for static symbolsAndreas Rheinhardt2020-10-12
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/speedhq: Don't pretend reading DC can failAndreas Rheinhardt2020-10-12
| | | | | | | | It can't, because the tables used don't have any loose ends. This also fixes a bug in the only caller of decode_dc_le(): It didn't check the return value. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/indeo2: Remove #ifdef BITSTREAM_READER_LE cruftAndreas Rheinhardt2020-10-12
| | | | | | | | | | | | | | | | Before the LE bitstream reader was used in the Indeo 2 decoder, a standard BE bitstream reader with swapped bits was used; when the LE bitstream reader was added, the old code was only #ifdef'ed away and not removed. Said code has several problems: It modifies the input packet without ensuring that the packet is indeed writable; and it doesn't work since 09c4e5c5988c0037d108c5fc2a137d9ad488f7f4 because said commit removed the BE table used to initialize the VLC table. So just remove this cruft from the actual decoder, too. Also use INIT_LE_VLC_STATIC while at it. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs_av1: Free content in cbs_av1_free_metadata()Michael Niedermayer2020-10-12
| | | | | | | | | Fixes: memleak Fixes: 25838/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5736255957237760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: use proper macro and type for pivot variablePaul B Mahol2020-10-12
|
* avcodec/apedec: properly calculate and store absolute valuePaul B Mahol2020-10-12
|
* avcodec/apedec: fix decoding 24bit insane files with recent versionsPaul B Mahol2020-10-12
|
* avformat/isom: add support for RAW ASC Bayer BGGR in movPaul B Mahol2020-10-12
|
* avcodec/mpeg12: Don't pretend reading dct_dc_size_* VLCs can failAndreas Rheinhardt2020-10-12
| | | | | | | | | | It can't because the corresponding trees don't have any loose ends. Removing the checks also removed an instance of av_log(NULL (with a nonsense message) from the codebase. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg12: Reduce size of motion-vector VLCAndreas Rheinhardt2020-10-12
| | | | | | | | | | It currently uses 9 bits per table, but there are no codes with nine bits at all, while there are codes with eight, ten and eleven bits. So reducing the table size to eight bits will not reduce the amount of codes that can be parsed in the first step, but it allows to reduce the size of the motion-vector VLC. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>