fix(render): scope burst headroom to high refresh - #65
Merged
Conversation
Contributor
📝 WalkthroughWalkthrough调整 PTS 演示调度器的未来提前量预算,使其根据刷新率选择半帧、单帧或更大预算,并新增 120fps、90fps 及低刷新率 burst 场景测试。 ChangesPTS 未来提前量预算
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nativelib/src/main/cpp/presentation_scheduler.cpp`:
- Around line 21-22: Lower the kTripleBurstFps threshold from 120.0 to a value
such as 119.0 so safeFps values of 119.88 FPS enter the triple-burst budget path
while preserving the existing threshold logic for other frame rates.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 61f7e187-98d4-4500-b6f4-0fca324ac6b7
📒 Files selected for processing (3)
nativelib/src/main/cpp/presentation_scheduler.cppnativelib/src/main/cpp/presentation_scheduler.hnativelib/src/test/cpp/presentation_scheduler_test.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了啥呀
<=60 FPS半帧、61-119 FPS一帧、>=119.88 FPS两帧为啥要改
一帧 future lead 已让 120 FPS 比 PR63 更容易跑满,但真机仍会间歇掉帧,说明这个小杂鱼硬解偶尔会一次吐出三帧。120 FPS 下把瞬时预算从约 10.33 ms 放宽到 18.67 ms,可以保留第三帧的 PTS 节奏;稳态 lead 仍是 2 ms,不固定增加两帧延迟。
NTSC 119.88 FPS 同样进入两帧预算。阈值精确设为 119.88,而不是宽泛的 119.0,因此真正的 119 FPS 自定义流仍保持一帧预算;90 FPS、30/60 FPS 的边界也不变。
验证
c++ -std=c++17 -Wall -Wextra -Werror nativelib/src/main/cpp/presentation_scheduler.cpp nativelib/src/test/cpp/presentation_scheduler_test.cpp -I nativelib/src/main/cpp -o /tmp/moonlight_presentation_scheduler_test && /tmp/moonlight_presentation_scheduler_testnpm run checknode hvigorw.js assembleApp --mode project -p product=default -p buildMode=debug --no-daemon(DevEco SDK 6.1 / JBR 21,BUILD SUCCESSFUL)