aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
Commit message (Collapse)AuthorAgeFilesLines
...
* avcodec/d3d12va_encode: use correct none flagKacper Michajłow10 days1-1/+1
| | | | | | NFC, it's still 0, but correct enum type so compilers won't complain. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avcodec/d3d12va_decode: remove unused variableKacper Michajłow10 days1-1/+0
| | | | Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avformat/options_table: supress implicit conversion warningsKacper Michajłow10 days1-1/+1
| | | | Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avcodec/jpegxl_parser: add sanity check for frame sizeLeo Izen12 days1-1/+8
| | | | | | | | | | If a frame size is absolutely massive, this can spin the parser as it attempts to decode a permuted TOC. We add a sanity check here for eight times the size of the image for an internal frame to prevent malicious bitstreams from slowing the parser down to a crawl. Signed-off-by: Leo Izen <leo.izen@gmail.com> Reported-by: Kacper Michajłow <kasper93@gmail.com>
* avcodec/opus/silk: don't assume stereo when calling silk_decode_frame()James Almer12 days1-2/+4
| | | | | | | Fixes use-of-uninitialized-value under MSAN. Reviewed-by: Kacper Michajlow <kasper93@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/ffv1dec: don't check chroma_planes for f->colorspace > 0James Almer13 days1-8/+6
| | | | | | | It's RGB, so check instead if it's packed or planar. Fixes: libavcodec/ffv1dec.c:461:43: runtime error: applying zero offset to null pointer Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: use the getters for xGA font data arraysJames Almer13 days3-9/+10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_apv: add missing READ/WRITE preprocessor checksJames Almer13 days1-0/+14
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/ffv1dec: don't add offsets to more NULL pointersJames Almer13 days1-6/+10
| | | | | Fixes: libavcodec/ffv1dec.c:453:43: runtime error: applying zero offset to null pointer Signed-off-by: James Almer <jamrial@gmail.com>
* libtheoraenc: Add encoding speed level optionBernat Arlandis13 days1-0/+25
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/smacker: cleanup on bet buffer failureMichael Niedermayer2025-07-201-1/+1
| | | | | | | | Fixes: memleak (of vlc) Fixes: 430343927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-5265858979233792 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Check k in get_vlc_symbol()Michael Niedermayer2025-07-201-0/+5
| | | | | | | | | | | | The true problem happens in several previous get_vlc_symbol() but checking that is more expensive (involving FFABS()) here its just a simple check between 2 variables we have. Fixes: Assertion log >= k failed at libavcodec/golomb.h:406 Fixes: 429296194/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_DEC_fuzzer-4691594622337024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ivi: Check luma/chroma mb_sizeMichael Niedermayer2025-07-201-3/+5
| | | | | | | | Fixes: shift exponent -1 is negative Fixes: 429011224/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5031059358285824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cfhd: Check idwt_buf size before allocationMichael Niedermayer2025-07-201-0/+4
| | | | | | | | Fixes: OOM Fixes: 428760799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_DEC_fuzzer-5685176435015680 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: move code closer to use to avoid unused warningsKacper Michajłow2025-07-191-128/+129
| | | | | | Put decoding and encoding code into thier respective #if blocks. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avcodec/sonic: remove dead codeKacper Michajłow2025-07-191-299/+0
| | | | | | | This was in else branch of `#if 1` since ever. No need to keep dead code like that, if anyone needs it they can get it from git history. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avformat/mov_muxer: Extended MOV muxer to handle APV video contentDawid Kozinski2025-07-181-6/+12
| | | | | | | | | - Changes in mov_write_video_tag function to handle APV elementary stream - Provided structure APVDecoderConfigurationRecord that specifies the decoder configuration information for APV video content Co-Authored-by: James Almer <jamrial@gmail.com> Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/motion_est: don't add offsets to NULL pointersJames Almer2025-07-181-3/+3
| | | | | Fixes: libavcodec/motion_est.c:94:31: runtime error: applying zero offset to null pointer Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/ohenc: Add h264/hevc OpenHarmony encodersZhao Zhili2025-07-186-1/+726
|
* avcodec/ohdec: Add h264/hevc OpenHarmony decodersZhao Zhili2025-07-186-1/+904
|
* avcodec/ffv1dec: don't add offsets to NULL pointersJames Almer2025-07-151-4/+6
| | | | | Fixes: libavcodec/ffv1dec.c:452:43: runtime error: applying zero offset to null pointer Signed-off-by: James Almer <jamrial@gmail.com>
* aacenc_tns: clamp filter direction energy measurementLynne2025-07-151-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is that: float en[2]; ... tns->n_filt[w] = is8 ? 1 : order != TNS_MAX_ORDER ? 2 : 3; for (g = 0; g < tns->n_filt[w]; g++) { tns->direction[w][g] = slant != 2 ? slant : en[g] < en[!g]; When using the AAC Main profile, n_filt = 3, and slant is by default 2 (normal long frames), g can go above 1. en is the evolution of energy in the frequency domain for every band at the given window. E.g. whether the energy is concentrated at the top of each band, or the bottom. For 2-pole filters, its straightforward. For 3-pole filters, we need more than 2 measurements. This commit properly implements support for 3-pole filters, by measuring the band energy across three areas. Do note that even xHE-AAC caps n_filt to 2, and only AAC Main allows n_filt == 3. Fixes https://trac.ffmpeg.org/ticket/11418
* libavcodec/alsdec.c: Add check for av_malloc_array() and av_calloc()Jiasheng Jiang2025-07-121-2/+6
| | | | | | | | | Add check for the return value of av_malloc_array() and av_calloc() to avoid potential NULL pointer dereference. Fixes: dcfd24b10c ("avcodec/alsdec: Implement floating point sample data decoding") Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nvdec: switch to proper pixfmts on next major bumpTimo Rothenpieler2025-07-113-0/+26
|
* avcodec/nvenc: add support for new 10 bit MSB pixel formatsTimo Rothenpieler2025-07-111-12/+21
|
* avcodec/mpegvideo_dec: Avoid implicit NULL + offsetAndreas Rheinhardt2025-07-112-32/+33
| | | | | | | | | Happens since 4fc874ef0813d39983f9b634cec42798aa94b57a when this code is called via error resilience. Also do the same for wmv2dec.c. Fixes the vsynth_{1,2,3,_lena}-mpeg4-error and wmv2-drm-dec FATE-tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/opus/dec: Simplify resetting AVAudioFifoAndreas Rheinhardt2025-07-111-3/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/opus/dec: Don't call function multiple times in FFMAXAndreas Rheinhardt2025-07-111-1/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/opus/dec: Remove unused parametersAndreas Rheinhardt2025-07-111-5/+2
| | | | | | | | The parameters here are not only unused, but buf_size's value is actually wrong when flushing (it comes from the subpacket of the last packet sent and is therefore outdated). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/get_bits: Remove GetBitContext.buffer_endAndreas Rheinhardt2025-07-111-5/+1
| | | | | | | | | | | It is unused. Furthermore, this automatically fixes the issue that init_get_bits() failure would lead to NULL + 0 (when setting buffer_end) which is UB before C23. This happened in the fic-avi and fic-avi-skip_cursor FATE-tests. This saved 7296B of .text here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/get_bits: Add get_bits_bytesize()Andreas Rheinhardt2025-07-118-11/+38
| | | | | | And use it to avoid accesses to GetBitContext.buffer_end. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vvc/dec: Don't use GetBit-API when byte-alignedAndreas Rheinhardt2025-07-111-13/+16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/bytestream: Add const where appropriateAndreas Rheinhardt2025-07-111-8/+8
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcm: squelch uninitialized variable warningsPeter Ross2025-07-101-0/+4
| | | | | | Fixes CID1655273 and CID1655274. Signed-off-by: Marvin Scholz <epirat07@gmail.com>
* avcodec: bump minor after adding AV_PKT_DATA_RTCP_SRMarvin Scholz2025-07-071-1/+1
|
* avcodec: add AV_PKT_DATA_RTCP_SR side data typeMarvin Scholz2025-07-072-0/+7
|
* lavf: add and use AVRTCPSenderReport structMarvin Scholz2025-07-071-0/+14
| | | | This will be used in a future commit to expose the SR as side-data.
* avcodec/vvc/ctu: Check ff_vvc_num_signalled_palette_entriesMichael Niedermayer2025-07-061-1/+1
| | | | | | | | Fixes: index 107 out of bounds for type 'uint16_t const[63]' Fixes: 421336912/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-6436225806565376 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vvc/ctu: Check palette_escape_valMichael Niedermayer2025-07-061-0/+2
| | | | | | | | Fixes: integer overflow Fixes: 418314174/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4871731867353088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/psd: Move frame allocation after RLE processingMichael Niedermayer2025-07-061-3/+3
| | | | | | | | Fixes: Timeout Fixes: 410609448/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PSD_fuzzer-6267226128973824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apv_dsp: Avoid UB overflow in dequantMichael Niedermayer2025-07-061-2/+2
| | | | | | | | Fixes: signed integer overflow: 33632416 * 64 cannot be represented in type 'int' Fixes: 421817631/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-4957386534354944 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 input before allocationMichael Niedermayer2025-07-061-0/+4
| | | | | | | | Fixes: Timeout Fixes: 421650030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-6144441767493632 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: Move buffer allocation to laterMichael Niedermayer2025-07-061-4/+6
| | | | | | | | Reduces allocations on random input Fixes: 421650030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-6144441767493632 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/opus: don't materialize buf pointer from nullKacper Michajłow2025-07-051-0/+3
| | | | | | | Fixes: avcodec/opus/dec.c: runtime error: applying non-zero offset 10 to null pointer Signed-off-by: Kacper Michajłow <kasper93@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nvdec: fix 10bit output pixel formatsTimo Rothenpieler2025-07-041-2/+12
| | | | Fixes #11655
* avcodec/adpcm: Sanyo LD-ADPCM decoderPeter Ross2025-07-046-2/+212
|
* avcodec/rv60dec: Check ofs for overflowsMichael Niedermayer2025-07-031-1/+3
| | | | | | | | Fixes: signed integer overflow: 30 + 2147483647 cannot be represented in type 'int' Fixes: 418335931/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV60_fuzzer-6568264620900352 Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sunrast: fix leak in sunrast_decode_frame()Lidong Yan2025-07-031-1/+3
| | | | | | | | | | In sunrast_decode_frame(), we use av_malloc_array() allocates memory to ptr and ptr2. However if buf_end - buf < 1, this function returns error code without freeing this memory thus cause a leak. Add av_freep() before return. Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rv34: Fix spelling mistakeAndreas Rheinhardt2025-07-031-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rv34: Don't report progress unnecessarilyAndreas Rheinhardt2025-07-031-4/+0
| | | | | | ff_mpv_frame_end() already does it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>