- 22 May, 2023 40 commits
-
-
Anton Khirnov authored
-
Anton Khirnov authored
Not only is this easier to read, this also makes the code shorter.
-
Anton Khirnov authored
-
Anton Khirnov authored
It currently emulates the long-removed avcodec_decode_audio4/avcodec_decode_video2 APIs, which obfuscates the actual decoding flow. Restructure the decoding calls so that they naturally follow the new avcodec_send_packet()/avcodec_receive_frame() design. This is not only significantly easier to read, but also shorter.
-
Anton Khirnov authored
It is currently handled in the same loop as audio and video, but this obscures the actual flow, because only one iteration is ever performed for subtitles. Also, avoid a pointless packet reference.
-
Anton Khirnov authored
-
Anton Khirnov authored
process_input_packet() contains two non-interacting pieces of nontrivial size and complexity - decoding and streamcopy. Separating them makes the code easier to read.
-
Anton Khirnov authored
New placement requires fewer explicit conditions and is easier to understand. The logic should be exactly equivalent, since this is the only place where eof_reached is set for decoding.
-
Anton Khirnov authored
Replace the decode_error_stat global with a per-input-stream variable. Also, print an error message when the error rate is exceeded.
-
Anton Khirnov authored
Passing ist=NULL is currently used to identify stream types that do not decode into AVFrames, i.e. subtitles. That is highly non-obvious - always pass a non-NULL InputStream and just check the type explicitly.
-
Anton Khirnov authored
This cannot be reached, because initialization will fail if decoding is requested for a stream but no decoder can be found.
-
Anton Khirnov authored
It tracks whether the decoder for this stream ever produced any frames and its only use is for checking whether a filter input ever received a frame - those that did not are prioritized by the scheduler. This is awkward and unnecessarily complicated - checking whether the filtergraph input format is valid works just as well and does not require maintaining an extra variable.
-
Anton Khirnov authored
This special handling for decoder flushing has not been needed since af1761f7, as the filtergraph actually is drained after that commit.
-
Anton Khirnov authored
-
Anton Khirnov authored
It has a small fixed size, so it is better to embed it rather than deal with dynamic allocation.
-
Anton Khirnov authored
Avoid extracting it from various remote sources.
-
Anton Khirnov authored
It is not accessed outside of ffmpeg_filter.
-
Anton Khirnov authored
It is not accessed outside of ffmpeg_filter.
-
Anton Khirnov authored
In case no decoder is available, dec_open() called from ist_use() will fail with 'Decoding requested, but no decoder found', so this check is redundant.
-
Anton Khirnov authored
They are not used outside of ffmpeg_filter.
-
Anton Khirnov authored
That is a more appropriate place for that function.
-
Anton Khirnov authored
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.
-
Anton Khirnov authored
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.
-
Anton Khirnov authored
This is less ad-hoc than checking explicitly in every place that binds an input stream to a filter or output.
-
Anton Khirnov authored
Will be useful in future commits.
-
Anton Khirnov authored
Avoids filtering code from digging in demuxer internals.
-
Anton Khirnov authored
-
Anton Khirnov authored
-
Anton Khirnov authored
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.
-
Anton Khirnov authored
Otherwise the two values might get desynchronized and lavfi can prefer the wrong one.
-
Anton Khirnov authored
Decoder timebase does not always have to match filter timebase.
-
Anton Khirnov authored
They are the same for now, but this may change in the future.
-
Anton Khirnov authored
Store decoded frame timestamp directly in AVFrame.pts, there is no advantage to using a separate local variable for it.
-
Anton Khirnov authored
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.
-
Paul B Mahol authored
No point to consume 1st input frames any more after crossfade is over.
-
Niklas Haas authored
No reason to use this prefix here.
-
Niklas Haas authored
Upstream peak detection lost one option and gained one option. Update code and documentation as required.
-
Niklas Haas authored
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.
-
Niklas Haas authored
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.
-
Niklas Haas authored
Explicitly forbid using a non-RGB colorspace with RGB pixel format or vice versa. This mirrors identical logic from vf_scale.
-