1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

44346 Commits

Author SHA1 Message Date
Andreas Rheinhardt
3e0bd5064d avcodec/mpeg4videodec: Don't initialize unused RL VLCs
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>
2021-01-25 14:51:53 +01:00
Andreas Rheinhardt
b0c4748770 avcodec/msmpeg4dec: Don't initialize unused RL VLCs
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>
2021-01-25 14:51:53 +01:00
Andreas Rheinhardt
b9071a70fc avcodec/h261dec: Don't initialize unused VLCs
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>
2021-01-25 14:51:53 +01:00
Andreas Rheinhardt
8f04988e46 avcodec/rl: Allow to create only a few VLC tables
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>
2021-01-25 14:51:53 +01:00
Andreas Rheinhardt
f741bd0674 avcodec/mpeg12enc, speedhqenc: Avoid redundant copies of tables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-25 14:51:53 +01:00
Nicolas Gaullier
c7016e35a6 avcodec/dolby_e: Split decoder/parser files 2021-01-25 13:19:48 +01:00
Nicolas Gaullier
0bf18db26a avcodec/dolby_e: Add a parser 2021-01-25 13:17:43 +01:00
Andreas Rheinhardt
ae5be6236f avcodec/tiff_common: Remove declarations of inexistent functions
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-25 00:23:17 +01:00
Andreas Rheinhardt
a82001c8cf avcodec/vp8data: Remove unused array
Unused since 748f921ad1997a464fb8963d0ba2c5bb5e036b1b.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-25 00:18:47 +01:00
Peter Ross
63be96414b avcodec/dvenc: dv100_weight_shift never used
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-24 09:35:12 +11:00
Marton Balint
257a83b969 avcodec/flashsv2enc: factorize updating block dimensions
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>
2021-01-23 20:13:39 +01:00
Haihao Xiang
b8cd37a59f qsv: dump more info in error, debug and verbose mode
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
2021-01-23 16:10:16 +00:00
Xu Guangxin
7a5a5e68bf avcodec/qsvdec: refact, remove duplicate code for plugin loading
Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-01-23 16:07:54 +00:00
Xu Guangxin
d78ecf10bd avcodec/qsvdec: refact, move qsvdec_other.c to qsvdec.c
Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-01-23 16:07:27 +00:00
Xu Guangxin
399c1f9235 avcodec/qsvdec: refact, move qsvdec_h2645.c to qsvdec.c
Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-01-23 16:06:37 +00:00
Xu Guangxin
e8df3808bd avcodec/qsvdec_h2645: refact, use DEFINE_QSV_DECODER to remove duplicate code
Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-01-23 16:04:40 +00:00
Xu Guangxin
96915ac51b avcodec/qsvdec_other: refact, use DEFINE_QSV_DECODER to remove duplicate code
Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-01-23 16:04:09 +00:00
Xu Guangxin
4c47b41782 avcodec/qsv_h2645: fix memory leak for plugin load
Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-01-23 16:01:12 +00:00
Michael Niedermayer
2488ba85a0 avcodec/utils: Check for integer overflow in get_audio_frame_duration() for 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>
2021-01-23 01:05:25 +01:00
Andreas Rheinhardt
da607832b5 avcodec/tableprint: Don't include mem_internal.h
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>
2021-01-22 19:09:57 +01:00
Andreas Rheinhardt
ee1d1c4b37 avcodec/h264_metadata_bsf: Don't use unitialized value
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-22 14:38:09 +01:00
Andreas Rheinhardt
53db591a2e avcodec/videotoolboxenc: Fix SEI enum identifiers
Broken in 64b3aac8d07a8744656737619b70977359d9a6a5.

Tested-by: Mark Himsley <mark.himsley@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-22 13:31:16 +01:00
Michael Niedermayer
43c8d3097b avcodec/cri: check for available input in unpack_10bit()
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>
2021-01-21 20:21:32 +01:00
Andreas Rheinhardt
b347384173 avcodec/me_cmp: Remove ff_check_alignment()
The usage of a static variable presents a potential for data races and
means that this function can't be used in init functions of codecs with
FF_CODEC_CAP_INIT_THREADSAFE (unless of course one presumes that
everything is alright in which case the error is not triggered; but then
the whole function is pointless...). This makes the Snow decoder
init-threadsafe as it already claims.

Notice that this function has been removed in 2014 by Libav in commit
9103185bd116930f90b847090e66a64fa9971ce2, because only some codepaths
are checked this way and because it only affects legacy compilers. The
latter is of course even more true today.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:13:06 +01:00
Andreas Rheinhardt
1f9ef2f3cf avcodec/mpeg12dec: Remove redundant writes
ff_mpv_decode_init() already sets MpegEncContext.avctx.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:12:43 +01:00
Andreas Rheinhardt
aff923c0b5 avcodec/Makefile: Make H.263 encoder compilable without MPEG4 encoder
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Andreas Rheinhardt
ab905f1dbc avcodec/Makefile: Make H.263 decoder compilable without H.263I
The only call to ff_intel_h263_decode_picture_header() is already behind
"if (CONFIG_H263I_DECODER)".

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Andreas Rheinhardt
d64828c8af avcodec/Makefile: Remove FLAC dependencies on vorbis_data
2ef2496cd19eb833f4ad22a5051c11be80d09598 used ff_vorbis_channel_layouts
in flac.c, but added a dependency to the FLAC decoder only; lateron
aba0278e9fe8e66c078588efe66f6af4db432770 added the dependency of the
FLAC parser and encoder on vorbis_data.o. Yet when the original commit
was reverted in aba0278e9fe8e66c078588efe66f6af4db432770, the two other
dependencies were not removed. This commit fixes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Andreas Rheinhardt
21b4b90475 avcodec/Makefile: Remove dependency of H.263 on FLV codecs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Andreas Rheinhardt
9e74f324d8 avcodec/Makefile: Remove unnecessary cbrt_data dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Mark Thompson
fa75e43875 h264_redundant_pps_bsf: Use common cbs bsf implementation 2021-01-21 17:13:55 +00:00
Mark Thompson
375176a540 av1_metadata_bsf: Use common cbs bsf implementation 2021-01-21 17:13:55 +00:00
Mark Thompson
e46aa5a894 vp9_metadata_bsf: Use common cbs bsf implementation 2021-01-21 17:13:55 +00:00
Mark Thompson
f35b268327 mpeg2_metadata_bsf: Use common cbs bsf implementation
This also adds support for updating new extradata.
2021-01-21 17:13:55 +00:00
Mark Thompson
b95f901c7f h265_metadata_bsf: Use common cbs bsf implementation 2021-01-21 17:13:55 +00:00
Mark Thompson
c837d9481a h264_metadata_bsf: Use common cbs bsf implementation 2021-01-21 17:13:54 +00:00
Mark Thompson
01a68c12a7 cbs: Implement common parts of cbs-based bitstream filters separately
This allows removal of a lot of duplicated code between BSFs.
2021-01-21 17:13:54 +00:00
Mark Thompson
c9c5b1977f h264_metadata_bsf: Improve interpretation of input display matrices
The previous code here only worked in more limited cases.
2021-01-21 17:13:54 +00:00
Mark Thompson
8a14d51b8b h264_metadata_bsf: Refactor the filter function into smaller parts 2021-01-21 17:13:54 +00:00
Mark Thompson
88b65bed9c cbs_sei: Remove restrictions on MDCV values
Since this was originally written the standards have changed to allow
arbitrary values here, but leaves their meaning unspecified.
2021-01-21 17:13:54 +00:00
Mark Thompson
8843607f49 cbs_h2645: Merge SEI message handling in common between codecs 2021-01-21 17:13:54 +00:00
Mark Thompson
773857df59 hevc: Use common SEI types 2021-01-21 17:13:54 +00:00
Mark Thompson
64b3aac8d0 h264: Use common SEI types 2021-01-21 17:13:54 +00:00
Mark Thompson
9ef32649d0 lavc: Add new header for SEI payload types
These form a common namespace between the H.264, H.265 and H.266
standards, so we can use the same definitions in all three places.
2021-01-21 17:13:54 +00:00
Mark Thompson
75092c5b45 h264_metadata_bsf: Move SEI user data parsing to init time 2021-01-21 17:13:54 +00:00
Mark Thompson
4bf3384800 cbs_h2645: Merge SEI messages in common between codecs
Make a new template file for common SEI messages - this will also apply
to H.266.
2021-01-21 17:13:54 +00:00
rcombs
eabf5e6d6b All: update names in copyright headers 2021-01-20 01:02:56 -06:00
Derek Buitenhuis
e55a80da38 avcodec/librav1e: Pass through timestamps as opaque user data
avcodec has no facilities to generate timestamps properly from
output frame numbers (and it would be wrong for VFR anyway),
so pass through the timestamps using rav1e's opaque user data
feature, which was added in v0.4.0.

This bumps the minimum librav1e version to 0.4.0.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-01-17 14:49:46 +00:00
Paul B Mahol
f975cf7cc0 avcodec/cfhd: only increase s->level if transform is supported 2021-01-17 13:40:15 +01:00
Derek Buitenhuis
b085a72c54 avcodec/librav1e: Fix indentation
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-01-17 12:38:49 +00:00