Commit Graph

100990 Commits

Author SHA1 Message Date
Paul B Mahol 6317d40d08 avfilter/avfilter: move enable_str expression parsing into avfilter_init_dict()
This ensures that needed arrays are always allocated and properly initialized.

Previously if code would use only avfilter_init_dict() to set options for filters
it would not allocate arrays for timeline processing thus it would crash if
user supplied enable option for filter(s).
2021-02-06 11:40:59 +01:00
Paul B Mahol d0a24bfad1 avfilter/vf_mix: add support for commands 2021-02-06 11:34:28 +01:00
Paul B Mahol 3583d2a837 avfilter/vf_mix: add timeline support 2021-02-06 11:34:28 +01:00
Paul B Mahol e28b6e0448 avformat/img2dec: improve xbm probing 2021-02-05 22:37:34 +01:00
Gyan Doshi d99cc17825 ffmpeg: add -fpsmax to clamp output framerate
Useful when encoding in batch or with aberrant inputs.
2021-02-05 22:54:18 +05:30
Paul B Mahol 6b8ef5119c avformat/cdxl: add back options to override sample and frame rate
It make sense to allow to control speed of playback when
no infomation is provided.
2021-02-05 18:11:42 +01:00
Paul B Mahol 2a2f685613 avcodec/xbm_parser: mark frame as intra only and as key frame 2021-02-05 15:49:13 +01:00
Paul B Mahol 4978512dcd avcodec/xbm_parser: split long line 2021-02-05 15:49:13 +01:00
Paul B Mahol 84d5df5446 avformat: add xbm_pipe demuxer 2021-02-05 15:36:19 +01:00
Paul B Mahol 7dfa98665c avcodec: add xbm parser 2021-02-05 15:35:29 +01:00
Paul B Mahol d16293e76c avfilter/vf_lensfun: display list of possible values if user supplied none 2021-02-05 15:27:50 +01:00
Paul B Mahol 8b78eb312d avfilter/vf_lensfun: replace deprecated calls 2021-02-05 15:27:50 +01:00
Paul B Mahol 593817f51d avfilter/vf_frei0r: add timeline support 2021-02-05 13:18:21 +01:00
Gyan Doshi 5c8d4c4fac avfilter/drawbox: fix formatting after d64cbd4fda 2021-02-05 17:29:59 +05:30
Limin Wang 81c462ad95 avformat/mxfenc: prefer to use the configured metadata
The metadata company_name, product_name, product_version from input
file will be deleted to avoid overwriting information
Please to test with below commands:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
and
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy \
        -metadata company_name="xxx" \
        -metadata product_name="xxx" \
        -metadata product_version="xxx" \
        out.mxf

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:06 +08:00
Limin Wang 9605307e78 avformat/mxf: add platform local tag
Please check the string of platform with below command:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
./ffmpeg -i out.mxf
....
application_platform: Lavf (linux)

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:06 +08:00
Limin Wang 3f8db7eea0 avformat/mxfdec: set toolkit version metadata
Please check the string of toolkit version with below command:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
./ffmpeg -i out.mxf
....
toolkit_version : 58.65.101.0.0

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:05 +08:00
Paul B Mahol cba716f55e avformat/cdxl: improve frame rate guessing for standard cdxl
Use audio size and sample rate to get real frame rate.
Also make seeking more robust.
2021-02-05 00:43:11 +01:00
Paul B Mahol fb9c56bbd5 avfilter/af_arnndn: add support for commands 2021-02-05 00:43:11 +01:00
Michael Niedermayer 996ef512fe tools/target_dec_fuzzer: Adjust threshold for interplayacm
Fixes: Timeout (long -> 1sec)
Fixes: 27439/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5145715814432768

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-04 23:34:29 +01:00
Michael Niedermayer 842c268c64 avformat/4xm: Make audio_frame_count 64bit
Fixes: signed integer overflow: 2099257366 * 2 cannot be represented in type 'int'
Fixes: 27486/clusterfuzz-testcase-minimized-ffmpeg_dem_FOURXM_fuzzer-5112179134824448

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-04 23:34:29 +01:00
Michael Niedermayer 4f70e1ec0c avformat/mov: Use av_mul_q() to avoid integer overflows
Fixes: signed integer overflow: 538976288 * 538976288 cannot be represented in type 'int'
Fixes: 27473/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5758978289827840

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-04 23:34:29 +01:00
Michael Niedermayer 4dfb7ff528 avcodec/vp9dsp_template: Fix integer overflows in itxfm_wrapper
Fixes: signed integer overflow: 2147483641 + 32 cannot be represented in type 'int'
Fixes: 27452/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5078752576667648

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-04 23:34:29 +01:00
Paul B Mahol 3d7ee5c91a avfilter/vf_blend: add support for commands 2021-02-04 21:44:31 +01:00
Paul B Mahol 89e2fbceee avcodec/utils: unbreak BINKAUDIO_DCT duration calculation 2021-02-04 17:54:13 +01:00
Paul B Mahol 5765149392 avfilter/af_amix: add sum option 2021-02-04 17:52:45 +01:00
Paul B Mahol e955f5ac01 avformat: add binka demuxer 2021-02-04 17:52:45 +01:00
Michael Niedermayer b12e713b80 avformat/rmdec: Reorder operations to avoid overflow
Fixes: signed integer overflow: -2147483648 - 14 cannot be represented in type 'int'
Fixes: 27659/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-5697250168406016

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-04 17:26:07 +01:00
Michael Niedermayer 401495def6 avcodec/mxpegdec: fix SOF counting
Fixes: Timeout (>10sec -> 15ms)
Fixes: 27652/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-5125920868007936

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-04 17:26:06 +01:00
Michael Niedermayer a5ed6da9bd avcodec/rscc: Check inflated_buf size whan it is used
Fixes: out of array access
Fixes: 27434/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-5196757675540480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2021-02-04 17:20:41 +01:00
Michael Niedermayer ab82c10578 avformat/mvdec: Sanity check SAMPLE_WIDTH
Fixes: signed integer overflow: 999999999 * 8 cannot be represented in type 'int'
Fixes: 30048/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5864289917337600

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-02-04 17:20:31 +01:00
Andreas Rheinhardt 4f3d8cb554 avcodec/cabac_functions, x86/cabac: Include stddef.h
Fixes checkheaders after 8c01eb0a31.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-04 05:17:33 +01:00
sfan5 a44c42dc31 avformat/dashdec: Avoid segfault when URL template is unexpectedly missing
This isn't supposed to happen, but unfinished support for non-templated
manifests and lack of e.g. presentationTimeOffset handling can provoke
such a situation even with well-formed input.
2021-02-04 10:30:39 +08:00
sfan5 5a98a027d6 avformat/dashdec: Fix missing NULL check 2021-02-04 10:30:37 +08:00
Steven Liu 29ef547c16 avformat/dashdec: rename variable name for more readable
Rename is_init_section_common_audio to is_init_section_common_subtitle
for is_common_init_section_exist(c->subtitles, c->n_subtitles).
Because it is checked to subtitles, not audio.

Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
2021-02-04 10:30:35 +08:00
Steven Liu 756897eff4 avformat/dashdec: check init_section before use it.
because there have no Initialization in SegmentTemplate,
so it will have no init_section for init segment file.
but in the is_common_init_section_exist function it will be used for
check to url, url_offset and size, so check init_section
before use init_section.
And fix code style in is_common_init_section_exist,
make the code block short when it too long.

fix ticket: 9062

Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
2021-02-04 10:30:32 +08:00
Paul B Mahol a8b3a51790 avformat/cdxl: rework probe and fix sample rate and frame rate 2021-02-04 00:57:49 +01:00
Andreas Rheinhardt 1873d128f9 avformat/qtpalette: Use better headers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-03 22:28:11 +01:00
Andreas Rheinhardt e9513052b5 avformat/rtsp: Fix build failure when RTP demuxers are disabled
rtsp.c uses a check of the form "if (CONFIG_RTSP_DEMUXER && ...) {}"
with the intent to make the code compilable even though the part guarded
by this check contains calls to functions that don't exist when the RTSP
demuxer is disabled. Yet even then compilers still need a declaration of
all the functions in the dead code block and error out if not (due to
our usage of -Werror=implicit-function-declaration) and no such
declaration exists for a static function in rtsp.c. Simply adding a
declaration leads to a "used but never defined" warning, therefore this
commit resorts to an #if.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-03 21:36:47 +01:00
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