Skip to content
Snippets Groups Projects

codec: videotoolbox: misc fixes and pacing rework

Merged François Cartegnie requested to merge fcartegnie/vlc:vtrebase into master
All threads resolved!

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.

Edited by François Cartegnie

Merge request reports

Merge request pipeline #315140 passed

Merge request pipeline passed for 98a5b3ba

Merged by Jean-Baptiste KempfJean-Baptiste Kempf 2 years ago (Feb 18, 2023 4:44pm UTC)

Merge details

  • Changes merged into master with 98a5b3ba.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #315145 passed

Pipeline passed for 98a5b3ba on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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

    Compare with previous version

  • François Cartegnie resolved all threads

    resolved all threads

  • François Cartegnie changed the description

    changed the description

  • MR Acceptance result

    :tada: This MergeRequest has been Accepted! Congratulations.

    MR acceptance checks details:

    • :white_check_mark: MR should be considered mergeable by Gitlab
    • :white_check_mark: Last pipeline should be successful
    • :white_check_mark: MergeRequest should have at least one external review and/or vote
    • :white_check_mark: All threads should be resolved, and score >= 0
    • :white_check_mark: MergeRequest should have no activity (threads/votes) for (24h/24h)

    This message was automatically generated by homer-bot.

  • 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

    Compare with previous version

  • Jean-Baptiste Kempf enabled an automatic merge when the pipeline for 98a5b3ba succeeds

    enabled an automatic merge when the pipeline for 98a5b3ba succeeds

  • Please register or sign in to reply
    Loading