aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/d3d12va_encode: add max_frame_size optionHEADmasterTong Wu80 min.3-0/+27
| | | | | | | | Add the max_frame_size option to support setting max frame size in bytes. Max frame size is the maximum cap in the bitrate algorithm per each encoded frame. Signed-off-by: Tong Wu <wutong1208@outlook.com>
* libavcodec/dpxenc: map AVCodecContext color transfer and color primaries fieldsPeter Ross5 hours1-2/+42
|
* avcodec/dpx: move enum DPX_TRC and DPX_COL_SPEC to dpx.hPeter Ross5 hours2-32/+58
|
* avcodec/x86/vp9dsp_init: remove preprocessor checks for some prototypesJames Almer43 hours1-2/+0
| | | | | | Fixes compilation with --disable-avx512icl Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/version: update the codec_idsNicolas Gaullier45 hours1-4/+4
| | | | | | | The counters should be incremented for each new codec. Catch-up to be in sync with codec_id.h again. Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
* avcodec/atrac3: fix inconsistent band num calculationDaniil Cherednik48 hours1-1/+1
| | | | | | | | | | | | | | | | 'decode_spectrum' reads 5 bits from bitstream to get number of encoded subbands – so 31 means all 32 subbands are encoded. This value also is used to determinate the number of used band in the hybrid filterbank. 'subband_tab' array contains 33 values of MDCT spec line positions started from 0 line and used to map subband number in to the range of mdct lines. Since the subband_num returned by decode_spectrum actually is number – 1 and subband_tab started from 0 we need to add 1 to make num_bands calculation correct.
* vp9: Add AVX-512ICL asm for 8bpc subpel mcHenrik Gramner3 days3-0/+909
|
* avcodec/exif: also copy zero termination for AV_TIFF_STRINGMichael Niedermayer4 days1-1/+5
| | | | | | | | Fixes: out of array read Fixes: 441131173/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_DEC_fuzzer-6700429212975104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libjxlenc: fix leaked EXIF ifdLeo Izen4 days1-0/+1
| | | | | | | We're missing a call to av_exif_free here. We leak the internal heap- allocated objects when &ifd goes out of scope. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/libjxldec: fix leaked EXIF ifdLeo Izen4 days1-0/+1
| | | | | | | We're missing a call to av_exif_free here. We leak the internal heap- allocated objects when &ifd goes out of scope. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/webp: simplify special-case handling when building Huffman readerRaphaël Zumer5 days1-8/+10
| | | | Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
* avcodec/webp: fix incorrectly returning AVERROR_INVALIDDATA when building ↵Raphaël Zumer5 days1-0/+1
| | | | | | | | Huffman reader This corrects an error in commit c33f16d. Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
* configure: bump LCEVCdec minimum required version to 4.0.0James Almer6 days1-2/+2
| | | | | | | | The project introduced API breaking changes to some of their public functions, and given the library is relatively new, just bump the minimum supported version instead of adding ifdeffery to the source files. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/exif: avoid allocation failure on empty EXIF metadataLeo Izen7 days1-3/+8
| | | | | | | | | | | An EXIF IFD with 0 entries is legal, but does not contain metadata. We should not attempt to allocate a struct with size zero in this case, as this causes an allocation failure. Instead, we just leave the struct empty. Fixes: #20305. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: avoid writing native-endian EXIF buffersLeo Izen7 days1-9/+1
| | | | | | | | | | | Currently there's platform-dependent behavior where if no endianness is requested, it writes the buffers in native-endian. This breaks FATE tests on big-endian architecture. This commit changes the default to little-endian buffers upon writing. Fixes: #20291. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: make the get and remove helpers take a flags argument as inputJames Almer7 days3-11/+14
| | | | | | | | | | | | This makes the functions extensible, as future behavior change flags can be introduced. This is strictly speaking not an API break. Only if a user was setting recursive to anything other than 1 it would now behave differently, but given these functions have been in the tree for only a few days, the chances for that are practically zero. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/Makefile: Make exif.o compulsoryFrank Plowman9 days1-1/+2
| | | | | | | | av_exif_* functions are part of libavcodec's public API since ad77345a5d14862f4701e5ad422b03b14934a5b9, so the EXIF objects can't be disabled. Fixes compilation with --disable-everything.
* avcodec/decode: remove Exif Orientation tag after adding it as display matrixJames Almer10 days1-6/+4
| | | | | | Don't replace it with a conflicting value. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/exif: use ff_frame_new_side_data() to export display matrixJames Almer10 days9-137/+151
| | | | | | | | Otherwise, the user requested priority of packet side data will be ignored. For this, move the relevant functions to decode.c, as they need access to an AVCodecContext. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/sanm: fix issues with FTCH offset hackManuel Lauss10 days1-35/+30
| | | | | | | | | | | | | Just add an extra x/y offset parameter pair to process_frame_obj(), and store the size of the data to FTCH in a separate context member. The only valid sizes for FTCH are 6 and 12, reject any other. Finally, if a FOBJ uses codecs37 and above, enforce it to be subversion 2, to use the simpler STOR/FTCH method. Fixes BIGSLEEP-440183164/process_ftch.anim Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sanm: Eliminate reference into reallocated frameMichael Niedermayer10 days1-1/+6
| | | | | | | | | | | | | | | | | | AFAIK the original decoder uses the frame buffers in very strange ways our implementation seems to mimic that and that results in the bitstream input to point into a frame buffer while code then parses that and potentially reallocates the frame buffer leaving pointers hanging into dealllocated space This simply uses a temporary buffer Fixes: Writing into freed buffers Fixes: BIGSLEEP-440183164/old_codec21.anim Fixes: BIGSLEEP-440183164/old_codec4.anim Found-by: Google Big Sleep Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sanm: Replace impossible bitstream check by assertMichael Niedermayer10 days1-2/+1
| | | | | | the space left and size have already been cross checked by the caller Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exif: fix some coverity errorsLeo Izen10 days1-4/+23
| | | | | | | | | | | This commit fixes some memory and security issues due to improper sanitizing and checks. Fixes: - CID 1665100..1665107 Signed-off-by: Leo Izen <leo.izen@gmail.com> Reportedy-by: James Almer <jamrial@gmail.com>
* avcodec/sanm: handle xpal cmd 0Manuel Lauss10 days1-1/+1
| | | | | | | It's like cmd 2. Fixes the Rebel Assault 1 Intro Video "C1BLOCK.ANM" crossfade from planet view to space view and subsequent wrong colors. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
* avcodec/exif: don't expose a private function in an installed headerJames Almer11 days2-6/+7
| | | | | | And it doesn't need an entry in APIChanges, given it's not public API. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc: Fix invalid null pointer checkZhao Zhili11 days1-1/+1
| | | | | c5287178b4d added a null pointer check, but checked the wrong variable. &s->cur_frame->f->data[c_idx] cannot be null.
* libavcodec/vima: reindentManuel Lauss11 days1-40/+40
| | | | Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
* avcodec/vima: IMA4 subtag supportManuel Lauss11 days1-0/+15
| | | | | | | Support decoding of the IMA4 ADPCM QT scheme used in some LucasArts SANM files. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
* avcodec/adpcm: export ff_adpcm_ima_qt_expand_nibbleManuel Lauss11 days2-9/+10
| | | | | | For use in the LucasArts VIMA decoder, where it is used as a subvariant. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
* avcodec/libjxlenc: apply displaymatrix side data orientation to outputLeo Izen12 days1-4/+61
| | | | | | | If the output is tagged with AV_FRAME_DATA_DISPLAYMATRIX we will read it and apply it to the output file. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: add ff_exif_sanitize_ifdLeo Izen12 days2-25/+51
| | | | | | | | This commit takes some of the sanitize code used by ff_exif_get_buffer and exposes it as an ff_ API, so encoders who wish to modify the sanitized IFD before calling av_exif_write can do so. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/libjxldec: read EXIF metadata from container JPEG XL filesLeo Izen12 days1-1/+77
| | | | | | | | libjxl provides the ability to get EXIF metadata from an ISO18181-2 JPEG XL container file. This commit enables reading it and attaching it to an AVFrame using the new EXIF API. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/tiff: decode TIFF non-image-data tags into EXIF metadata structLeo Izen12 days1-0/+14
| | | | | | | | This commit will cause TIFF files to store their tags in the EXIF struct so tags such as orientation can be transfered to other formats (such as PNG) in a way that doesn't corrupt the IFD. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: add av_exif_get_entryLeo Izen12 days2-16/+53
| | | | | | | Add an API function to retrieve am AVExifEntry struct with a given TIFF tag ID from the AVExifMetadata ifd struct. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: add av_exif_remove_entryLeo Izen12 days2-0/+50
| | | | | | | Add an API function that allows popping an exif entry out of the struct entirely rather than requiring it be replaced with a default value. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: add orientation ID and matrix conversion routinesLeo Izen12 days2-54/+70
| | | | | | | Takes existing code that makes display matricies work with EXIF orientation tags and expose the conversion as a public API. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/pngenc: support writing EXIF profilesLeo Izen12 days2-0/+23
| | | | | | | Add support to write EXIF profiles using the new EXIF framework, namely ff_exif_get_buffer, and writing them into eXIf chunks. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/pngdec: support reading EXIF profilesLeo Izen12 days1-0/+143
| | | | | | | Add support to parse eXIf chunks using the new EXIF framework, as well as EXIF profiles in zTXt and tEXt with Raw profile type exif. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: add ff_exif_get_bufferLeo Izen12 days2-11/+211
| | | | | | | Add a function to allow encoders to get a self-contained EXIF buffer to write into an EXIF chunk. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: remove ff_exif_decode_ifdLeo Izen12 days2-19/+7
| | | | | | | | This function is no longer called and its functionality can be accessed using the new API in exif.h as well as the various internal attach functions in exif_internal.h. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/webp: use new EXIF parse APILeo Izen12 days1-16/+12
| | | | | | Switch over to the new API to parse EXIF metadata. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/mjpegdec: use new EXIF parse APILeo Izen12 days2-76/+16
| | | | | | Switch over to the new API to parse EXIF metadata. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: add deprecation guards for old avpriv_Leo Izen12 days3-0/+6
| | | | | | | Add FF_API_OLD_EXIF deprecation guard based on lavc version < 62 in order to allow removing the avpriv_ next major version bump. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/exif: add EXIF parser and struct APILeo Izen12 days7-81/+1216
| | | | | | | | | | | | | This commit adds a structure to contain parsed EXIF metadata, as well as code to read and write that struct from/to binary EXIF buffers. Some internal functions have been moved to exif_internal.h. Code to read from this new struct and write to an AVDictionary **dict has been added as well in order to preserve interoperability with existing callers. The only codec changes so far as of this commit are to call these interop functions, but in future commits there will be codec changes to use the new parsing routines instead. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/tiff_common: rename TIFF enum constantsLeo Izen12 days6-73/+74
| | | | | | | | | | This makes the enum TiffTypes public by moving it to the public header exif.h and renaming it to AVTiffDataType, as well as adding an AV_ prefix in front of each of the entry names. This allows callers to use enum AVTiffDataType without pulling in all of tiff_common.h, as that header is not public. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* aacdec_usac: use RefStruct to track unfinished extension buffersLynne12 days3-17/+47
| | | | | | | | | | | | | | | | | | | | | | | | | Extensions in AAC USAC can be stored across multiple frames (mainly to keep CBR compliance). This means that we need to reallocate a buffer when new data is received, accumulate the bitstream data, and so on until the end of extension flag is signalled and the extension can be decoded. This is made more complicated by the way in which the AAC channel layout switching is performed. After decades of evolution, our AAC decoder evolved to double-buffer its entire configuration. All changes are buffered, verified, and applied, on a per-frame basis if required, in often random order. Since we allocate the extension data on heap, this means that if configuration is applied, in order to avoid double-freeing, we have to keep track of what we've allocated. It should be noted that extensions which are spread in multiple frames are generally rare, so an optimization to introduce av_refstruct_realloc() wouldn't generally be useful across the codebase. Therefore, a copy is good enough for now. Thanks to Michael Niedermayer for additional fixing. Fixes: double free Fixes: 393523547/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-6740617236905984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
* avcodec/dxv: Check coded_height, to avoid invalid av_clip()Michael Niedermayer12 days1-0/+2
| | | | | | | | Fixes: assertion failure Fixes: 438961582/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_DEC_fuzzer-5850827739955200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcode: Use av_fast_realloc() in ff_lzf_uncompress()Michael Niedermayer12 days4-10/+24
| | | | | | | | | | Fixes: 438961582/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_DEC_fuzzer-5850827739955200 Fixes: mixed up realloc() functions Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Co-Authored-by: James Almer <jamrial@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* vulkan_vp9: Read segment and lf data from cbsBenjamin Cheng12 days1-14/+15
| | | | | | | | The previous change 26a2a76346 broke Vulkan decoding because the lf and segmentation values contained within VP9RawFrameHeader can no longer be updated. Read the propogated values from the CBS instead.
* avcodec/aac/aacdec: dont allow ff_aac_output_configure() allocating a new ↵Michael Niedermayer12 days1-0/+3
| | | | | | | | | | frame if it has no frame Fixes: null pointer dereference Fixes: crash_test.mp4 Found-by: Intel PSIRT Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>