summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/sei: add Parameter Sets Inclusion Indication enum valueJames Almer2021-01-26
| | | | | | | Defined in H.274, it shares the same value as Active Parameter Sets from the H.265 spec. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cri: Fix whitespace issue in unpack_10bit()Michael Niedermayer2021-01-26
| | | | | Found-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Use FFABSU() in do_apply_filter()Michael Niedermayer2021-01-26
| | | | | | | | | Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 29053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-4814432697974784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc: shedule old encoding/decoding API for removalAnton Khirnov2021-01-26
| | | | | | | | It has been deprecated for 4 years and certain new codecs do not work with it. Also include AVCodecContext.refcounted_frames, as it has no effect with the new API.
* lavc/decode: move unrefcount_frame() right before its only callerAnton Khirnov2021-01-26
| | | | Will make wrapping it in deprecation guards simpler.
* avcodec/mpeg4videodec: Fix indentationAndreas Rheinhardt2021-01-26
| | | | | | It was wrong since e03bf251d8784f4d1df2c22381c902087e151e31. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg4videodec: Move code around to avoid forward declarationAndreas Rheinhardt2021-01-26
| | | | | | | Also fix the indentation of decode_studio_vol_header while at it; it was wrong since 177133a0f4b41b3c98b9cbc7f8f45755412c537b. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/sp5x: Remove unused quant tablesAndreas Rheinhardt2021-01-26
| | | | | | Only the fifth one is used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/exif: Avoid allocation for small bufferAndreas Rheinhardt2021-01-26
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/amrnbdata: Remove unused arrayAndreas Rheinhardt2021-01-26
| | | | | | Always unused. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ilbcdata: Remove unused arrayAndreas Rheinhardt2021-01-26
| | | | | | Never used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac3plus_data: Remove unused arraysAndreas Rheinhardt2021-01-26
| | | | | | Forgotten in 58fc810d42fde26ed6c1f2996122e98ab7005849. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dnxhd: Make ff_dxnhd_get_cid_table return a pointer, not indexAndreas Rheinhardt2021-01-26
| | | | | | | All callers only use the index into ff_dnxhd_cid_table to get a pointer to the desired entry. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: deprecate AVCodecContext.debug_mvJames Almer2021-01-25
| | | | | | It's been unused for almost three years now. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove long dead debug_mv codeJames Almer2021-01-25
| | | | | | FF_API_DEBUG_MV has been zero since ffmpeg 4.0 Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dolby_e: split decoder and parser more thoroughlyJames Almer2021-01-25
| | | | | | | | | Neither module should depend on the other. Move shared functions to its own file for this purpose, and ensure source files are compiled only when the required modules are enabled. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h263data, ituh263*: Make initializing RL inter table thread-safeAndreas Rheinhardt2021-01-25
| | | | | | | | | | | | Up until now, ff_h263_rl_inter was initialized by both ituh263dec and ituh263enc; this is an obstacle in making the codecs that use this code init-threadsafe. This obstacle is eliminated by only initializing this RLTable from a single place that is guarded by a dedicated AVOnce. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ituh263enc: Remove unused function parameterAndreas Rheinhardt2021-01-25
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ituh263dec: Don't initialize unused parts of RLTableAndreas Rheinhardt2021-01-25
| | | | | | | | | | The RLTable ff_rl_intra_aic is only used by ituh263dec and ituh263enc; the former only uses the RLTable's VLC, the latter only index_run, max_level and max_run. Yet ituh263dec also initializes the latter. This commit stops doing so. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h261enc: Make encoder init-threadsafeAndreas Rheinhardt2021-01-25
| | | | | | | | This is easy now that the H.261 encoder is the only user that initializes the non-VLC parts of ff_h261_rl_tcoeff. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h261dec: ReindentationAndreas Rheinhardt2021-01-25
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h261dec: Make decoder init-threadsafeAndreas Rheinhardt2021-01-25
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h261dec: Don't initialize unused part of RLTableAndreas Rheinhardt2021-01-25
| | | | | | | | | | | The H.261 decoder only uses an RLTable's VLC table, yet it also initializes its index_run, max_level and max_run. This commit stops doing so; it will also simplify making this decoder init-threadsafe, as the H.261 decoder and encoder now initialize disjoint parts of their common RLTable. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegvideo_enc: Make mpv_encode_defaults thread-safeAndreas Rheinhardt2021-01-25
| | | | | | | | | This is a prerequisite for making any encoder that uses ff_mpv_encode_init() init-threadsafe; it already makes the AMV, the MJPEG and the MPEG-1/2 encoders init-threadsafe. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/msmpeg4dec: Reuse identical MV VLCAndreas Rheinhardt2021-01-25
| | | | | | | | | | msmpeg4dec and ituh263dec both create VLCs with identical parameters out of ff_mvtab. Given that ff_msmpeg4_decode_init() always (indirectly) calls ff_h263_decode_init_vlc(), the VLC initialized by the latter can be directly used by msmpeg4dec. Doing so saves a bit more than 2KB from the .bss segment as well as the code to initialize a VLC. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/msmpeg4dec: Reuse identical RL VLCsAndreas Rheinhardt2021-01-25
| | | | | | | | | | | | | Some of the RLTables used by msmpeg4dec actually coincide with other RLTables: ff_rl_table[5] coincides with ff_h263_rl_inter (and ff_rl_table[2] with ff_mpeg4_rl_intra). Given that ff_h263_rl_inter is always initialized before msmpeg4dec's RLTables are initialized, one can just reuse the VLC tables by copying the pointers; after all, there are no ownership issues for static data. This saves 70912B from the .bss segment, translating into actual memory savings when this decoder is actually used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ituh263dec: Don't initialize unused RL VLCsAndreas Rheinhardt2021-01-25
| | | | | | | | | | The ff_rl_intra_aic RLTable is only used by ituh263dec and ituh263enc; the former is the only user of its RL VLC tables. It uses only the very first one of these VLC tables, but up until now all 32 are initialized, wasting 68696B from the .bss segment (or that amount of memory if this decoder has actually been used). This commit changes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg4videodec: Don't initialize unused RL VLCsAndreas Rheinhardt2021-01-25
| | | | | | | | | | The RLTables whose VLC tables are only used for intra blocks only use the very first VLC table; yet all 32 have been initialized. This commit stops this by switching to INIT_FIRST_VLC_RL. This saves 201624B from the .bss segment; in case the decoder is actually used, this translates into less memory used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/msmpeg4dec: Don't initialize unused RL VLCsAndreas Rheinhardt2021-01-25
| | | | | | | | | For the RLTables ff_rl_table[0..2] only the very first VLC is only ever used, so it makes no sense to create 32 of them. This saves 285200B from the .bss segment; this amount of memory is actually saved when this decoder is used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h261dec: Don't initialize unused VLCsAndreas Rheinhardt2021-01-25
| | | | | | | | The H.261 decoder uses only the very first VLC of ff_h261_rl_tcoeff, so only initialize this one. Saves 68448B from the .bss segment; in case the decoder is actually used, this amount of memory is saved. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/rl: Allow to create only a few VLC tablesAndreas Rheinhardt2021-01-25
| | | | | | | It is not uncommon that only the first one is used; this is similar to ff_init_2d_vlc_rl(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg12enc, speedhqenc: Avoid redundant copies of tablesAndreas Rheinhardt2021-01-25
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dolby_e: Split decoder/parser filesNicolas Gaullier2021-01-25
|
* avcodec/dolby_e: Add a parserNicolas Gaullier2021-01-25
|
* avcodec/tiff_common: Remove declarations of inexistent functionsAndreas Rheinhardt2021-01-25
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/vp8data: Remove unused arrayAndreas Rheinhardt2021-01-25
| | | | | | | Unused since 748f921ad1997a464fb8963d0ba2c5bb5e036b1b. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dvenc: dv100_weight_shift never usedPeter Ross2021-01-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/flashsv2enc: factorize updating block dimensionsMarton Balint2021-01-23
| | | | | | | | | | | | The patch changes the init function to initialize block dimensions to fixed 64x64 instead of the previously used image width/height based value. This should not cause any actual change in behaviour because block dimensions are recalculated on every keyframe in optimum_block_width() and optimum_block_height() functions and in the current code the result is always 64x64 regardless of the image dimensions used. Signed-off-by: Marton Balint <cus@passwd.hu>
* qsv: dump more info in error, debug and verbose modeHaihao Xiang2021-01-23
| | | | | | | | Dump iopattern mode and the SDK error/warning desciptions for qsv based filters and iopattern mode for qsvenc Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com
* avcodec/qsvdec: refact, remove duplicate code for plugin loadingXu Guangxin2021-01-23
| | | | | Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* avcodec/qsvdec: refact, move qsvdec_other.c to qsvdec.cXu Guangxin2021-01-23
| | | | | Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* avcodec/qsvdec: refact, move qsvdec_h2645.c to qsvdec.cXu Guangxin2021-01-23
| | | | | Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* avcodec/qsvdec_h2645: refact, use DEFINE_QSV_DECODER to remove duplicate codeXu Guangxin2021-01-23
| | | | | Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* avcodec/qsvdec_other: refact, use DEFINE_QSV_DECODER to remove duplicate codeXu Guangxin2021-01-23
| | | | | Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* avcodec/qsv_h2645: fix memory leak for plugin loadXu Guangxin2021-01-23
| | | | | Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* avcodec/utils: Check for integer overflow in get_audio_frame_duration() for ↵Michael Niedermayer2021-01-23
| | | | | | | | | | ADPCM_DTK Fixes: signed integer overflow: 131203586 * 28 cannot be represented in type 'int' Fixes: 26817/clusterfuzz-testcase-minimized-ffmpeg_dem_MSF_fuzzer-6296902548848640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tableprint: Don't include mem_internal.hAndreas Rheinhardt2021-01-22
| | | | | | | | | | | | | tableprint.h does not declare anything as aligned; it just prints DECLARE_ALIGNED. So it can be removed; in fact, it needs to be removed, because mem_internal.h includes config.h which leads to warnings when building with hardcoded tables enabled because of redefinitions of CONFIG_HARDCODED_TABLES. (Furthermore, config.h is only valid for the target, not the host, so HAVE_LOCAL_ALIGNED might even be wrong here.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h264_metadata_bsf: Don't use unitialized valueAndreas Rheinhardt2021-01-22
| | | | | Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/videotoolboxenc: Fix SEI enum identifiersAndreas Rheinhardt2021-01-22
| | | | | | | Broken in 64b3aac8d07a8744656737619b70977359d9a6a5. Tested-by: Mark Himsley <mark.himsley@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cri: check for available input in unpack_10bit()Michael Niedermayer2021-01-21
| | | | | | | | Fixes: Timeout (>20sec -> 56ms) Fixes: 26995/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5107217080254464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>