codec: videotoolbox: misc fixes and pacing rework
Current pacing has many issues as it is done at allocation time, which use to deadlock because of uncontrolled decoder output and post decode held allocations.
A timeout hack to prevent those makes it even worse by letting allocations succeed after a certain amount of time, pushing an uncontrolled frame in a pool that will delay following frames even more: house of cards effect. Add to this long frame duration/low frame rate, or large pts delay between frames on frame drop, or simply ... a pause that releases all the decoder buffers: Recipe for chaos.
The reworked pacing works at ingest level and ensures we will never need to allocate more buffers than expected, and will block otherwise.
Other fixes mostly changes code that was not asynchronous and triggering other bugs.
Merge request reports
Activity
changed milestone to %4.0
added Component::Decoders Hw label
assigned to @fcartegnie
- Resolved by François Cartegnie
Hi, what's the rationale for the revert? I'm not sure to understand.
added MRStatus::InReview label
added 12 commits
- 7b41c842 - codec: videotoolbox: fix flush cases for hevc reorder with rasl output
- b675663b - codec: videotoolbox: process DPB on any decoding result
- 9981274e - codec: videotoolbox: only update reorder depth on next pic
- df01b3c6 - codec: videotoolbox: set strict DPB for HEVC
- d6e140ad - codec: videotoolbox: remove useless init
- e73d4299 - codec: videotoolbox: simplify by removing exclusive states booleans
- 3879df9f - codec: videotoolbox: rename discard flag
- 0a770752 - codec: videotoolbox: do not discard decoder output on drain
- e5939c09 - codec: videotoolbox: ensure flush on request
- 724f85fd - codec: videotoolbox: have asynchronous pts/rate updates
- be2bd393 - codec: videotoolbox: fix async pacing
- 1f7aa2e8 - codec: videotoolbox: rework pacing
Toggle commit listadded MRStatus::Acceptable label and removed MRStatus::InReview label
- Resolved by François Cartegnie
added MRStatus::InReview label and removed MRStatus::Acceptable label
added 7 commits
- dcbc4a3f - codec: videotoolbox: simplify by removing exclusive states booleans
- a7e6d8a0 - codec: videotoolbox: rename discard flag
- 7480dc58 - codec: videotoolbox: do not discard decoder output on drain
- 25182c0a - codec: videotoolbox: ensure flush on request
- a656413a - codec: videotoolbox: have asynchronous pts/rate updates
- f460a4e9 - codec: videotoolbox: fix async pacing
- c553b02f - codec: videotoolbox: rework pacing
Toggle commit listadded MRStatus::Acceptable label and removed MRStatus::InReview label
added MRStatus::Accepted label and removed MRStatus::Acceptable label
MR Acceptance result
This MergeRequest has been Accepted! Congratulations.MR acceptance checks details:
-
MR should be considered mergeable by Gitlab -
Last pipeline should be successful -
MergeRequest should have at least one external review and/or vote -
All threads should be resolved, and score >= 0 -
MergeRequest should have no activity (threads/votes) for (24h/24h)
-
added 45 commits
-
c553b02f...85d2e507 - 34 commits from branch
videolan:master
- d2ecef01 - codec: videotoolbox: fix flush cases for hevc reorder with rasl output
- c5de4fe8 - codec: videotoolbox: process DPB on any decoding result
- eb1fdc8f - codec: videotoolbox: only update reorder depth on next pic
- fcdbabb2 - codec: videotoolbox: set strict DPB for HEVC
- 0c3688e7 - codec: videotoolbox: simplify by removing exclusive states booleans
- 45585498 - codec: videotoolbox: rename discard flag
- 5d545255 - codec: videotoolbox: do not discard decoder output on drain
- 1d2be66b - codec: videotoolbox: ensure flush on request
- 78c5d581 - codec: videotoolbox: have asynchronous pts/rate updates
- 13ae92c2 - codec: videotoolbox: fix async pacing
- 98a5b3ba - codec: videotoolbox: rework pacing
Toggle commit list-
c553b02f...85d2e507 - 34 commits from branch
enabled an automatic merge when the pipeline for 98a5b3ba succeeds