1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

101051 Commits

Author SHA1 Message Date
Andreas Rheinhardt
7936cfc157 avformat/Makefile: Only compile qtpalette.c when needed
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-03 21:35:43 +01:00
Andreas Rheinhardt
d97e84b46f avformat/qtpalette: Move default palette to their only user
Namely qtpalette.c itself.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-03 21:35:43 +01:00
Andreas Rheinhardt
a703410d25 avformat/cutils, dvenc: Move ff_brktimegm to its only user
This also allows to completely remove cutils.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-03 21:35:43 +01:00
Paul B Mahol
e818951505 avformat/cdxl: add support for custom 24bit pal8 formats
Also stop discarding half of audio samples and use planar pcm s8.
2021-02-03 19:11:35 +01:00
Tomas Härdin
e6254d5ab9 avformat/mxfdec: Add missing const to mxf_mastering_display* 2021-02-03 17:56:28 +01:00
Jose Da Silva
7ccea3bf09 avcodec/xbmdec: get_nibble() minor speed increase, and binary reduction
Replace av_isxdigit(*ptr) and convert(*ptr) with get_nibble(*ptr) which
returns a valid nibble=={0x00..0x0f} or false==255 for all other values.
This way we only need to work with *ptr once instead of twice.

Removing inline av_isxdigit(x) functions also shrinks executable size.

Signed-off-by: Joe Da Silva <digital@joescat.com>
2021-02-03 16:03:15 +01:00
Jose Da Silva
8c3d31fbee avcodec/xbmdec: convert() minor speed increase
If we test for {0..9} first, we have tested for 10/16th of all possible
characters first and avoid testing the remaining 6/16th of all possible
characters, which can be either 6/16th lowercase or 6/16th uppercase.

Signed-off-by: Joe Da Silva <digital@joescat.com>
2021-02-03 16:03:15 +01:00
Jose Da Silva
42c636c972 avcodec/xbmenc: Pre-compute variables once for parse_str_int()
Some compilers are very intuitive, and others are not so much, so let's
pre-compute the variables e and keylen outside the for loop. Ensuring a
minor speed increase regardless of if compiler is smart enough to solve
this improvement for itself, or not.

Signed-off-by: Joe Da Silva <digital@joescat.com>
2021-02-03 16:03:15 +01:00
Jose Da Silva
b6bc981d25 avcodec/xbmenc: substitute end instead of recalculating end
Minor speed increase, end is calculated before entering parse_str_int(),
so let's take advantage of the value and avoid recalculating twice more.
This also allows parse_str_int() to work with file size larger than int.

Signed-off-by: Joe Da Silva <digital@joescat.com>
2021-02-03 16:03:15 +01:00
Paul B Mahol
b4ad669a42 avfilter/avfilter: mark enable as runtime option too 2021-02-03 15:51:40 +01:00
Paul B Mahol
f6621a8e72 avfilter: add colorcorrect filter 2021-02-03 15:49:13 +01:00
Anton Khirnov
b7251aed46 av_dump_format(): reduce indentation for streams
Makes it easier to identify where metadata/chapters end and streams
begin.
2021-02-03 10:41:33 +01:00
Anton Khirnov
3696c3b161 av_dump_format(): increase indentation for chapter metadata
It should be at a deeper level than the chapter it belongs to.
2021-02-03 10:41:29 +01:00
Anton Khirnov
80aad8886a av_dump_format: add a heading for chapters
Otherwise the chapters look like a part of the metadata section.
2021-02-03 10:41:20 +01:00
Andreas Rheinhardt
2367affc2c fftools/ffmpeg_filter: Make functions only used locally static
Also remove some declarations of inexistent functions while at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Andreas Rheinhardt
2166d8d6b2 fftools/ffmpeg_filter: Remove ist_in_filtergraph
Unused since af1761f7b5.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Andreas Rheinhardt
8c01eb0a31 avcodec/cabac: Move encoder related stuff to libavcodec/tests/cabac.c
(This is actually the second time the encoder stuff is removed;
the first was in 8b4119187b62d6932e07aded11d33d3b24e1b42f.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Andreas Rheinhardt
455d3a7684 avcodec/h264_levels, h265_profile_level: Remove ff_h26[45]_get_level
Unused.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Andreas Rheinhardt
ba874ad904 avfilter/ebur128: Remove unused functions
Also make a function only used here static.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Andreas Rheinhardt
a40c158eda fftools/ffmpeg_filter: Remove choose_sample_fmt
Unused since 6b35a83214.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Andreas Rheinhardt
bb072a0369 avformat/rtmppkt: Only compile ff_rtmp_packet_dump if defined(DEBUG)
It is only used in this case.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:29 +01:00
Andreas Rheinhardt
7b43646e18 avformat/avio: Remove ffurl_open
It is only used in commented-out (and nonworking) code in async.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:29 +01:00
Andreas Rheinhardt
5cad6c6e85 avformat/rtmpproto: Only include RTMP protocols that are enabled
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:29 +01:00
Andreas Rheinhardt
82d5316c57 avformat/rtmppkt: Remove ff_amf_read_bool
Added in 50468f93e3, but never used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:29 +01:00
Mark Thompson
ac05413dfb vc2enc: Add missing static to local variables 2021-02-02 22:34:55 +00:00
Paul B Mahol
68b5236eae avfilter/vf_colorlevels: call execute once per frame 2021-02-02 17:53:29 +01:00
Paul B Mahol
7ee3a5594b avfilter/vf_colorlevels: no need to use double for coeff 2021-02-02 17:53:29 +01:00
Paul B Mahol
62e24a5d80 avfilter/vf_colorlevels: beautify define 2021-02-02 17:53:29 +01:00
Paul B Mahol
a7e826b9e1 avfilter/vf_colorlevels: typedef ThreadData struct 2021-02-02 17:53:29 +01:00
Paul B Mahol
85bdf18917 avcodec: add PFM image encoder 2021-02-02 14:29:33 +01:00
Paul B Mahol
090f31f813 avfilter: add colorcontrast filter 2021-02-02 14:27:06 +01:00
Limin Wang
38caef3876 avformat/hlsenc: use AV_OPT_TYPE_DURATION
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-02 20:55:50 +08:00
Michael Niedermayer
3c41d0bfd6 avformat/rmdec: Fix codecdata_length overflow check
Fixes: signed integer overflow: 2147483647 + 64 cannot be represented in type 'int'
Fixes: 28509/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-6310969680723968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-02 13:12:12 +01:00
Michael Niedermayer
57f7e5caa3 avcodec/simple_idct: Fix undefined integer overflow in idct4row()
Fixes: signed integer overflow: -1498310196 - 902891776 cannot be represented in type 'int'
Fixes: 28445/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5075163389493248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-02 13:12:12 +01:00
Michael Niedermayer
0af0a80cef avformat/wavdec: Check block_align vs. channels before combining them
Fixes: signed integer overflow: 65535 * 65312 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6606935226974208

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-02 13:12:12 +01:00
Michael Niedermayer
fd61b42b4c avformat/tta: Use 64bit intermediate for index
Fixes: signed integer overflow: 42032 * 51092 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-6679539648430080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-02 13:12:12 +01:00
Michael Niedermayer
b0588b73da avformat/soxdec: Check channels to be positive
Fixes: signed integer overflow: 32 * -1795162112 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SOX_fuzzer-6724151473340416

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-02 13:12:12 +01:00
Michael Niedermayer
f54aab94a3 avformat/smacker: Check for too small pts_inc
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SMACKER_fuzzer-6705429132476416

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-02 13:12:12 +01:00
Michael Niedermayer
92b1949191 avformat/sccdec: Use larger intermediate for ts/next_ts computation
Fixes: signed integer overflow: 92237203 * 33 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SCC_fuzzer-6603769487949824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-02 13:12:12 +01:00
Michael Niedermayer
2a0d17c4d1 avcodec/cri: Use ff_set_dimensions()
Fixes: out of memory
Fixes: 29985/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6424425392111616

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>
2021-02-02 13:12:12 +01:00
Andreas Rheinhardt
e742bf3421 avcodec/aacps_fixed_tablegen: Don't include config.h
It is only valid for the target, not the host and therefore it must not
be included when building the tables when hardcoded tables are enabled.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 01:47:01 +01:00
Tomas Härdin
ff0618b5c4 avformat/mxf: Establish register of local tags
Tags can be marked "not used" upfront, saving some space in the primer.
av_asserts0() is used to enforce that only tags that are in the primer can actually be written.
Sharing of MasteringDisplay ULs is now done via macros.
2021-02-01 23:52:55 +01:00
Michael Niedermayer
5441699f83 avformat/sbgdec: Use av_sat_add64() in str_to_time()
Fixes: signed integer overflow: 7279992792120000000 + 4611686018427387904 cannot be represented in type 'long long'
Fixes: 29744/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6434060249464832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-01 19:03:53 +01:00
Piotr Uracz
7ceceee8b6 avcodec/aac_ac3_parser: fix channel information parsing in case decoder is disabled
Fixes #7372
2021-02-01 18:02:11 +01:00
Andreas Rheinhardt
ad2cc0e2f4 avformat/rtpdec: Avoid allocations of small dynamic buffers
Besides avoiding allocations this also fixes a design defect of
ff_rtp_send_punch_packets: It did not return an error in case of
these allocations failed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-31 21:26:44 +01:00
Paul B Mahol
459c6e8ab3 avfilter/vf_vibrance: add packed formats support 2021-01-31 20:55:23 +01:00
Paul B Mahol
98b0c0e44f avfilter/vf_colortemperature: add packed formats support 2021-01-31 20:55:23 +01:00
Paul B Mahol
aa8cf8fdee avfilter/vf_colortemperature: use macro for identical code 2021-01-31 20:55:23 +01:00
Michael Niedermayer
6de039823c avcodec/cscd: Check output len in zlib as in lzo
Fixes: Timeout (>10sec -> 134ms)
Fixes: 27245/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CSCD_fuzzer-575318210772992

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-31 14:37:07 +01:00
Michael Niedermayer
869fe41d10 avcodec/vp3: Check input amount in theora_decode_header()
Fixes: Timeout
Fixes: 29226/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-6195092572471296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-31 14:37:07 +01:00