Cherry pick PR #9309: android: Optimize av1 codec initialization#10030
Cherry pick PR #9309: android: Optimize av1 codec initialization#10030cobalt-github-releaser-bot wants to merge 1 commit intomainfrom
Conversation
|
Caution There were merge conflicts while cherry picking! Check out cherry-pick-main-9309 and fix the conflicts before proceeding. Check the log at https://github.com/youtube/cobalt/actions/runs/24421533252 for details. |
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
1d66e32 to
73b6f3b
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces an optimization for AV1 playback on Android devices that support 8K at 30fps but not 60fps. It adds a mechanism in MediaCapabilitiesCache to detect this cap and updates MediaCodecVideoDecoder to delay codec initialization until the video frame rate can be estimated. Feedback focuses on thread safety by recommending std::atomic_bool for shared flags, adhering to Chromium style by marking getter methods as const, and improving map access efficiency in the capabilities loading logic.
Introduce a feature flag to enable optimized AV1 codec initialization. When enabled, detect if the device supports AV1 only up to 8K30. If so, defer codec initialization until the video's actual frame rate is known. Bug: 486980027 (cherry picked from commit df8841f)
73b6f3b to
dbf1178
Compare

Refer to the original PR: #9309
Introduce a feature flag to enable optimized AV1 codec initialization.
When enabled, detect if the device supports AV1 only up to 8K30.
If so, defer codec initialization until the video's actual frame rate
is known.
Bug: 486980027