Skip to content

media: Launch FixNeedMoreInputBackpressure with max pending inputs size 512 - #13118

Merged
kjyoun merged 1 commit into
youtube:mainfrom
kjyoun:launch-kMediaFixNeedMoreInputBackpressure
Oct 7, 2026
Merged

kjyoun merged 1 commit into
youtube:mainfrom
kjyoun:launch-kMediaFixNeedMoreInputBackpressure

Conversation

@kjyoun

@kjyoun kjyoun commented Oct 5, 2026

Copy link
Copy Markdown
Member

With the CobaltFixNeedMoreInputBackpressure experiment (b/539672039) concluded, this change removes the temporary experiment flags (kMediaFixNeedMoreInputBackpressure and
kMediaVideoDecoderMaxPendingInputsSize), enables the NEED_MORE_INPUT backpressure fix unconditionally, and sets kMaxPendingInputsSize to 512 frames.

Experiment results showed that smaller caps (128 and 256 frames) caused YouTube Time regressions, whereas 512 frames fully recovered YouTube Time while reducing playback restarts (qoe.restart -4.96%) and CPU memory usage. Also removes the temporary
kVideoFrameTrackerCapacityWithoutBackpressureFix workaround.

Bug: 539672039
Bug: 517914191

@kjyoun
kjyoun marked this pull request as ready for review October 5, 2026 21:48
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


media: Enable input backpressure fix at 512 frames

Following the conclusion of the FixNeedMoreInputBackpressure experiment,
this change enables the backpressure fix unconditionally and sets the
maximum pending inputs size to 512 frames. It removes the associated
experimental flags and temporary capacity workarounds.

Experiment results showed that a 512-frame cap recovers YouTube Time
regressions found in smaller configurations while reducing playback
restarts and CPU memory usage. This configuration prevents unbounded
queue growth while providing a sufficient buffer to handle main-thread
congestion.

Bug: 539672039
Bug: 517914191

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies the MediaCodecVideoDecoder by removing the experimental features kMediaFixNeedMoreInputBackpressure and kMediaVideoDecoderMaxPendingInputsSize, and hardcoding the maximum pending inputs size to 512 frames. Feedback on the changes highlights a potential build failure due to -Wsign-compare compiler warnings, where GetNumberOfPendingInputs() (returning size_t) is compared directly with the signed integer kMaxPendingInputsSize. It is recommended to restore the static_cast<size_t> casts to resolve this issue.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
Context State Description
CI / All Pass ✅ PASS All checks passed
CI / android ✅ PASS Passed
CI / evergreen ✅ PASS Passed
CI / linux ✅ PASS Passed
CI / tvos ✅ PASS Passed
…ze 512

With the CobaltFixNeedMoreInputBackpressure experiment (b/539672039)
concluded, this change removes the temporary experiment flags
(kMediaFixNeedMoreInputBackpressure and
kMediaVideoDecoderMaxPendingInputsSize), enables the NEED_MORE_INPUT
backpressure fix unconditionally, and sets kMaxPendingInputsSize to 512
frames.

Experiment results showed that smaller caps (128 and 256 frames) caused
YouTube Time regressions, whereas 512 frames fully recovered YouTube
Time while reducing playback restarts (qoe.restart -4.96%) and CPU
memory usage. Also removes the temporary
kVideoFrameTrackerCapacityWithoutBackpressureFix workaround.

Bug: 539672039
Bug: 517914191
@kjyoun
kjyoun force-pushed the launch-kMediaFixNeedMoreInputBackpressure branch from edeeddd to b9e22d3 Compare October 5, 2026 22:20
@kjyoun
kjyoun requested a review from xiaomings October 5, 2026 22:20
@kjyoun
kjyoun requested review from a team and jasonzhangxx October 5, 2026 22:57
@kjyoun
kjyoun enabled auto-merge (squash) October 7, 2026 18:11
@kjyoun
kjyoun merged commit af41bcb into youtube:main Oct 7, 2026
871 of 883 checks passed
@kjyoun
kjyoun deleted the launch-kMediaFixNeedMoreInputBackpressure branch October 7, 2026 18:50
briantting pushed a commit that referenced this pull request Oct 8, 2026
…h max pending inputs size 512

Refer to original PR: #13118

With the CobaltFixNeedMoreInputBackpressure experiment (b/539672039)
concluded, this change removes the temporary experiment flags
(kMediaFixNeedMoreInputBackpressure and
kMediaVideoDecoderMaxPendingInputsSize), enables the NEED_MORE_INPUT
backpressure fix unconditionally, and sets kMaxPendingInputsSize to 512
frames.

Experiment results showed that smaller caps (128 and 256 frames) caused
YouTube Time regressions, whereas 512 frames fully recovered YouTube
Time while reducing playback restarts (qoe.restart -4.96%) and CPU
memory usage. Also removes the temporary
kVideoFrameTrackerCapacityWithoutBackpressureFix workaround.

Bug: 539672039
Bug: 517914191

(cherry picked from commit af41bcb)
briantting pushed a commit that referenced this pull request Oct 16, 2026
…h max pending inputs size 512

Refer to original PR: #13118

With the CobaltFixNeedMoreInputBackpressure experiment (b/539672039)
concluded, this change removes the temporary experiment flags
(kMediaFixNeedMoreInputBackpressure and
kMediaVideoDecoderMaxPendingInputsSize), enables the NEED_MORE_INPUT
backpressure fix unconditionally, and sets kMaxPendingInputsSize to 512
frames.

Experiment results showed that smaller caps (128 and 256 frames) caused
YouTube Time regressions, whereas 512 frames fully recovered YouTube
Time while reducing playback restarts (qoe.restart -4.96%) and CPU
memory usage. Also removes the temporary
kVideoFrameTrackerCapacityWithoutBackpressureFix workaround.

Bug: 539672039
Bug: 517914191

(cherry picked from commit af41bcb)
briantting pushed a commit that referenced this pull request Oct 16, 2026
…h max pending inputs size 512

Refer to original PR: #13118

With the CobaltFixNeedMoreInputBackpressure experiment (b/539672039)
concluded, this change removes the temporary experiment flags
(kMediaFixNeedMoreInputBackpressure and
kMediaVideoDecoderMaxPendingInputsSize), enables the NEED_MORE_INPUT
backpressure fix unconditionally, and sets kMaxPendingInputsSize to 512
frames.

Experiment results showed that smaller caps (128 and 256 frames) caused
YouTube Time regressions, whereas 512 frames fully recovered YouTube
Time while reducing playback restarts (qoe.restart -4.96%) and CPU
memory usage. Also removes the temporary
kVideoFrameTrackerCapacityWithoutBackpressureFix workaround.

Bug: 539672039
Bug: 517914191

(cherry picked from commit af41bcb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants