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

110730 Commits

Author SHA1 Message Date
Anton Khirnov
2628c7049e fftools/ffmpeg_filter: try configuring graphs from input EOF
When a filtergraph input receives EOF but never saw any input frames, we
use the fallback parameters. Currently an attempt to actually configure
the filtergraph will happen elsewhere, but there is no reason to
postpone this.
2023-05-22 17:10:44 +02:00
Anton Khirnov
a16d7171d1 fftools/ffmpeg_filter: only use fallback parameters when necessary
With complex filtergraphs it can happen that the filtergraph is
unconfigured because some other filter than the one we just got EOF on
is missing parameters.

Make sure that the fallback parametes for a given input are only used
when that input is unconfigured.
2023-05-22 17:10:44 +02:00
Anton Khirnov
65f3d042a6 fftools/ffmpeg_demux: disallow using disabled input streams
This is less ad-hoc than checking explicitly in every place that binds
an input stream to a filter or output.
2023-05-22 17:10:44 +02:00
Anton Khirnov
dfa29ba955 fftools/ffmpeg: return error codes from ist_*_add()
Will be useful in future commits.
2023-05-22 17:10:44 +02:00
Anton Khirnov
ede6794d6a fftools/ffmpeg_filter: split finding an unused stream into a function
Avoids filtering code from digging in demuxer internals.
2023-05-22 17:10:44 +02:00
Anton Khirnov
8c0f516133 tests/fate/ffmpeg: add a test for input -r option 2023-05-22 17:10:44 +02:00
Anton Khirnov
900bb3f8e2 tests/fate/ffmpeg: move a misplaced line 2023-05-22 17:10:44 +02:00
Anton Khirnov
30a3fee24f fftools/ffmpeg: rework applying input -r
Do not use a separate counter for CFR timestamps forced with -r used as
an input option. Set durations properly and let estimation code do the
rest.
2023-05-22 17:10:44 +02:00
Anton Khirnov
1132507327 fftools/ffmpeg_filter: make sure pkt_duration matches duration
Otherwise the two values might get desynchronized and lavfi can prefer
the wrong one.
2023-05-22 17:10:44 +02:00
Anton Khirnov
14b9946967 fftools/ffmpeg_filter: convert input frame timestamps
Decoder timebase does not always have to match filter timebase.
2023-05-22 17:10:44 +02:00
Anton Khirnov
7b41785eb6 fftools/ffmpeg: replace stream timebase with decoded frame one
They are the same for now, but this may change in the future.
2023-05-22 17:10:44 +02:00
Anton Khirnov
1372e81aaa fftools/ffmpeg: drop a useless local variable
Store decoded frame timestamp directly in AVFrame.pts, there is no
advantage to using a separate local variable for it.
2023-05-22 17:10:44 +02:00
Anton Khirnov
94a9647195 fftools/ffmpeg: shorten a variable name
There is only one frame used in decode_video() -- the one output by the
decoder. So there is no point in explicitly calling it the _decoded_
frame.
2023-05-22 17:10:44 +02:00
Paul B Mahol
c37cf59c5b avfilter/vf_xfade: send EOF to first input early
No point to consume 1st input frames any more after crossfade is over.
2023-05-22 17:13:31 +02:00
Niklas Haas
877ccaf776 lavfi/vf_libplacebo: don't intrude on pl_ namespace
No reason to use this prefix here.
2023-05-22 10:31:51 +02:00
Niklas Haas
21715ecff1 lavfi/vf_libplacebo: update peak detection options
Upstream peak detection lost one option and gained one option. Update
code and documentation as required.
2023-05-22 10:31:51 +02:00
Niklas Haas
643cf2ec46 lavfi/vf_libplacebo: update for new tone mapping API
This algorithm has once again been refactored, this time leading to a
dropping of the old `tone_mapping_mode` field, to be replaced by a
single tunable hybrid mode with configurable strength.

We can approximately map the old modes onto the new API for backwards
compatibility. Replace deprecated enums by their integer equivalents to
safely preserve this API until the next bump.
2023-05-22 10:31:50 +02:00
Niklas Haas
d637f20f05 lavfi/vf_libplacebo: switch to new gamut mapping API
Upstream deprecated the old ad-hoc, enum/intent-based gamut mapping API
and added a new API based on colorimetrically accurate gamut mapping
functions.

The relevant change for us is the addition of several new modes, as well
as deprecation of the old options. Update the documentation accordingly.
2023-05-22 10:31:50 +02:00
Niklas Haas
f66280182a lavfi/vf_libplacebo: add RGB colorspace sanity
Explicitly forbid using a non-RGB colorspace with RGB pixel format or
vice versa. This mirrors identical logic from vf_scale.
2023-05-22 10:31:23 +02:00
Niklas Haas
c00fd02558 lavfi/libplacebo: properly handle EOF
The current code relied on pl_queue eventually returning EOF back to the
caller, which didn't work in all situations (e.g. single frame input).
Also, the current code assumed that ff_inlink_acknowledge_status only
fired once, which was patently not true, as the above edge cases
demonstrated.

Solve both issues by keeping track of the acknowledged link status and
forwarding it (instead of trying to probe the pl_queue again) in the
event that we run out of queued input frames, as well as (in CFR mode)
when we pass the indicated status PTS.
2023-05-22 10:31:13 +02:00
Paul B Mahol
7428f1e8f2 avfilter/vf_xfade: fix fadegrays for gbrp* formats
The array elements were left uninitialized.
2023-05-22 09:08:24 +02:00
Paul B Mahol
6284afec07 avfilter/vf_xfade: avoid some not needed dereferencing in inner loops 2023-05-22 08:42:06 +02:00
Paul B Mahol
0709680fc4 avfilter/vf_xfade: add horizontal and vertical wind transforms 2023-05-22 08:42:06 +02:00
Michael Niedermayer
43e5e2e423
avcodec/bonk: Avoid undefined integer overflow in predictor_calc_error()
Fixes: signed integer overflow: -159584 * 5105950 cannot be represented in type 'int'
Fixes: 55165/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-5796023719297024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-22 02:49:59 +02:00
Michael Niedermayer
a76efafdb9
avformat/wavdec: Check that smv block fits in available space
Fixes: OOM
Fixes: 56271/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-5290810045497344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-22 02:49:58 +02:00
Michael Niedermayer
d09f50c0f5
avformat/hls: remove non standard hls extension
Suggested-by: Kacper Michajlow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-22 02:49:58 +02:00
Michael Niedermayer
5b630743c6
avformat/hls: Better message from hls_probe()
Found-by: Kacper Michajlow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-22 02:49:58 +02:00
Michael Niedermayer
a0cb5722fd
avformat/hls: Check mime_ok first
This should be a few nano seconds faster (not measureable)
But Collectively the whole humankind watching hls will safe a minute

Found-by: Leo Izen

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-22 02:49:57 +02:00
Michael Niedermayer
19a74bc794
avformat/format: Remove redundant FFMIN() in ff_match_url_ext()
Found-by: Leo Izen

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-22 02:49:48 +02:00
Paul B Mahol
e684967e74 avfilter/f_graphmonitor: output one frame more after eof
To easily debug eof issues.
2023-05-21 22:06:55 +02:00
Paul B Mahol
a6068c8700 avformat/fits*: format does not store timestamps 2023-05-21 20:59:23 +02:00
Paul B Mahol
02823703f4 avformat/fitsdec: stop creating pts, instead set packet duration 2023-05-21 20:59:06 +02:00
Paul B Mahol
d912ff19c5 avcodec/fitsenc: mark output packets as keyframes 2023-05-21 20:51:55 +02:00
Paul B Mahol
fd2ca3d4c5 avformat/fitsenc: reindent switch 2023-05-21 20:43:52 +02:00
Paul B Mahol
8a49341666 avformat/fitsdec: fix demuxer class category 2023-05-21 20:41:19 +02:00
Paul B Mahol
a28df1faa9 avformat/fitsdec: remove .raw_codec_id
This non-raw demuxer does not have parser.
2023-05-21 20:40:17 +02:00
Paul B Mahol
4d4aed2815 avcodec/fitsdec: fix decoder class category 2023-05-21 20:31:46 +02:00
Paul B Mahol
c4b3e882f8 avfilter/f_graphmonitor: make opacity runtime option 2023-05-21 14:56:30 +02:00
Paul B Mahol
08eb13c05c avfilter/f_graphmonitor: add missing queue flag 2023-05-21 14:56:29 +02:00
Paul B Mahol
416c1e62f1 avfilter/f_graphmonitor: cache strlen() values 2023-05-21 14:56:27 +02:00
Paul B Mahol
f055345595 avfilter/f_graphmonitor: speed-up clear_image() 2023-05-21 14:56:26 +02:00
Kacper Michajłow
1aeefc4c06 lavfi/vf_libplacebo: allow linking to shared library with dllimport
Address of dll imported variables can't be used for constant
initialization in C language modes.
2023-05-21 13:15:28 +02:00
Paul B Mahol
65fe18040a avfilter/f_graphmonitor: add flags option shortcuts 2023-05-21 13:02:02 +02:00
Paul B Mahol
b528e098a9 avfilter/f_graphmonitor: show also current timeline status of filter 2023-05-21 13:01:59 +02:00
Paul B Mahol
fcabfcbf6f avcodec/wavpackenc: unbreak encoding 8bit pcm
Otherwise the reference decoder reports crc errors.
2023-05-21 11:30:12 +02:00
Paul B Mahol
ddc176d0ee avcodec/elbg: fix integer overflows
Fixes #9977
2023-05-21 10:50:59 +02:00
Paul B Mahol
5fe6a0e5c7 avfilter/src_movie: switch to activate 2023-05-21 10:49:41 +02:00
Paul B Mahol
3546f70410 avfilter/src_movie: dr support 2023-05-21 10:49:30 +02:00
Paul B Mahol
d81b6cbd42 avcodec/gif_parser: fix possible wrong splitting of frames
And properly signal keyframes.
2023-05-21 10:48:14 +02:00
James Almer
b6066ceb8b fate/checkasm: add h264chroma test
Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-20 18:26:13 -03:00