summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* mpegvideo: use the AVVideoEncParams API for exporting QP tablesAnton Khirnov2021-01-01
| | | | | | | | | | Do it only when requested with the AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS flag. Drop previous code using the long-deprecated AV_FRAME_DATA_QP_TABLE* API. Temporarily disable fate-filter-pp, fate-filter-pp7, fate-filter-spp. They will be reenabled once these filters are converted in following commits.
* lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov2021-01-01
| | | | They are not properly namespaced and not intended for public use.
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-01
| | | | That is a more appropriate place for it.
* avcodec/svq1dec: Increase nb_bits of VLC to read it in one goAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dirac_arith: Make table only used here staticAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/qdmc: Mark decoder as init-threadsafeAndreas Rheinhardt2020-12-31
| | | | | | | It already uses ff_thread_once() to initialize its static data. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/opusdec: Mark decoder as init-threadsafeAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/opusdec: Cleanup generically on init failureAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/opusdec: Move per-stream fields to OpusStreamContextAndreas Rheinhardt2020-12-31
| | | | | | | | Besides being more natural it also avoids allocations for separate arrays of decoded samples/output buffers/.... Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/opusdec: Return error upon errorAndreas Rheinhardt2020-12-31
| | | | | | | | | The Opus decoder forgot to return an error when allocating an SwrContext fails. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aacps_common: Use minimal VLC nb_bits/max_depthAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aacps: Factor out code shared by float and fixed point decoderAndreas Rheinhardt2020-12-31
| | | | | | | Saves about 7KiB. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegvideo: Don't zero-initialize unnecessarilyAndreas Rheinhardt2020-12-31
| | | | | | | mbintra_table will be memset to 1 a few lines after its allocation. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aacsbr_template: Remove pointless runtime initializationAndreas Rheinhardt2020-12-31
| | | | | | | | | | | | | | | | | The sbr_qmf_window_us array is basically symmetric around its middle element and therefore the latter half is currently initialized from the first half at runtime. Yet because the first half is initialized, the array can't be placed in .bss at all, so that one gains nothing from not already initializing the whole array statically. Therefore this commit does exactly this. (There are two exceptions to the symmetry: Elements 384 and 512 are the negations of their mirror element; for the fixed-point decoder, Q31(-x) does not equal -Q31(x). In order to keep the array exactly the same, the latter form has been used for these two elements.) Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aacsbr: Remove remnants of tablegenAndreas Rheinhardt2020-12-31
| | | | | | | | These tables are always initialized at runtime since commit cb93df0dcbd34107c64ec053504fa294b728a9c9. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac3plus_data: Mark array as constAndreas Rheinhardt2020-12-31
| | | | | | | Forgotten in a7dbeb77c3c30ac4904928978938b209ff6e1ab1. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mlpenc: Simplify finding best codebookAndreas Rheinhardt2020-12-31
| | | | | | | | | | | | Finding the best codebook involves comparing different paths, where each path is a sequence of several decisions (namely which codebook to use). Up until now, these sequence was encoded in a NUL-terminated string and the actual decisions were encoded as ’\0'..'\3' (which encoded 0..3). This commit modifies this to actually encode it via 0..3 by switching away from a C-string to a simple array with an explicit length field. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/opusdec: Remove always-true checkAndreas Rheinhardt2020-12-31
| | | | | | | | The celt_delay AVAudioFifo is always allocated during init, so checking for its existence in .flush is unnecessary. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/opustab: Make array staticAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motion_est, mpegvideo: Make pointers to static storage constAndreas Rheinhardt2020-12-31
| | | | | | | | | Modifying static storage must not happen because of multithreading (except initialization of course), so add const to the pointed-to type for pointers that point to static storage. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* configure, libavcodec/speedhq: Fix compiling SpeedHQ encoderAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegvideo: Merge ff_mpv_decode_defaults into ff_mpv_decode_initAndreas Rheinhardt2020-12-31
| | | | | | | | | | | | | These two are always called directly after each other (with the exception of the calls in mpeg_decode_init() where some irrelevant modifications of the avctx (which could just as well be done before ff_mpv_decode_defaults(), because it doesn't have a pointer to the AVCodecContext at all and therefore can't see these modifications at all) are performed in between), so merge ff_mpv_decode_defaults() in ff_mpv_decode_init(). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h261dec: Don't use too big max_depth in get_vlc2()Andreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/speedhq: Remove castAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg12: ReindentationAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg12: Make initializing VLCs thread-safeAndreas Rheinhardt2020-12-31
| | | | | | | | | This automatically makes the eamad, eatqi, ipu and mdec decoders init-threadsafe; in addition to the actual mpeg[12]video decoders, of course. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg12: Don't initialize encoder-only parts of RLTableAndreas Rheinhardt2020-12-31
| | | | | | | | | | | ff_mpeg12_init_vlcs() currently initializes index_run, max_level and max_run of ff_rl_mpeg1/2; yet the only user of these fields is the MPEG-1/2 encoder which already initializes these tables on its own. So remove the initializations in ff_mpeg12_init_vlcs(); this also simplifies making ff_mpeg12_init_vlcs() thread-safe. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/rl: Remove nonstatic storage of RL tablesAndreas Rheinhardt2020-12-31
| | | | | | | | ff_rl_free() was added in 324e50ee95929a9491b855c5e15451145bd5d1ec, but never used; nonstatic storage was not used long before that. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/codec_desc: describe AV_CODEC_ID_MPEG2TSAman Karmani2020-12-28
| | | | Signed-off-by: Aman Karmani <aman@tmm1.net>
* avcodec/tiff: Disallow striped and tiled tiffs except for DNGMichael Niedermayer2020-12-28
| | | | | | | | | | | | | | strips + tiles is not allowed in TIFF DNG uses a separate codepath Regression since da5b3d002862d1e105002a6dc1567e6551860896. Fixes: NULL pointer dereference Fixes: poc1 Fixes: Ticket8960 Found-by: 1vanChen of NSFOCUS Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cfhd: properly handle midstream size changes for transform type 2Paul B Mahol2020-12-25
|
* avcodec/ffv1dec: Fix off by 1 error with quant tablesMichael Niedermayer2020-12-22
| | | | | | | | | Fixes: assertion failure Fixes: 28447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5369575948550144 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/fastaudio: Fix invalid shift exponentMichael Niedermayer2020-12-19
| | | | | | | | Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int' Fixes: 25434/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FASTAUDIO_fuzzer-6252363168612352 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 bitrate for overflow in get_bit_rate()Michael Niedermayer2020-12-19
| | | | | | | | Fixes: signed integer overflow: 617890810133996544 * 16 cannot be represented in type 'long' Fixes: 26565/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5092054700654592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_ps: Change scaling_list_dc_coef to 8 bitMichael Niedermayer2020-12-19
| | | | | Suggested-by: James Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_ps: check scaling_list_dc_coefMichael Niedermayer2020-12-19
| | | | | | | | | Fixes: signed integer overflow: 2147483640 + 8 cannot be represented in type 'int' Fixes: 28449/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5686013259284480 Reviewed-by: James Almer <jamrial@gmail.com> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dpx: fix use of uninitialised valueJames Almer2020-12-18
| | | | | | | Found by Valgrind. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: return the correct error code on User Data Registered ↵James Almer2020-12-18
| | | | | | parsing failure Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: print a log message when a unsupported ITU-T T35 SEI ↵James Almer2020-12-18
| | | | | | messages is parsed Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: refactor parsing User Data Registered ITU-T T35 SEI messagesJames Almer2020-12-18
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_sei: print a log message when a unsupported ITU-T T35 SEI ↵James Almer2020-12-18
| | | | | | messages is parsed Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_sei: refactor parsing User Data Registered ITU-T T35 SEI messagesJames Almer2020-12-18
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dpx: Fix B&W film scans from Lasergraphics IncHarry Mallon2020-12-17
| | | | Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avcodec/dpx: Read color information from DPX headerHarry Mallon2020-12-17
| | | | Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avcodec/dpx: Report color_range from DPX headerHarry Mallon2020-12-17
| | | | Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avcodec/dpx: Read SMPTE timecode from DPXHarry Mallon2020-12-17
| | | | Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avcodec/dpx: Read alternative frame rate from television headerHarry Mallon2020-12-17
| | | | Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avcodec/av1dec: support exporting Film Grain params as frame side dataJames Almer2020-12-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cuviddec: unref output frame on failureJames Almer2020-12-13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cuviddec: check for av_buffer_ref() failureJames Almer2020-12-13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>