Skip to content

Preserve the render pose while reusing Quest video - #43

Merged
demonixis merged 3 commits into
demonixis:developfrom
orangeToT:fix/quest-stale-render-pose
Oct 4, 2026
Merged

demonixis merged 3 commits into
demonixis:developfrom
orangeToT:fix/quest-stale-render-pose

Conversation

@orangeToT

Copy link
Copy Markdown

Problem and change

While reusing a decoded frame, the Quest client stops using that frame's render pose after 120 ms, even though it keeps showing the same pixels for up to two seconds. Projection submission then uses the current headset pose, making the held image head-locked.

Keep the held frame's render pose throughout its existing display lifetime. This removes the 120 ms pose cutoff and its unused age calculation. Reprojection-off and missing-pose behavior, the two-second disconnect, and the separate short-lived shader-warp limits retain their existing behavior.

Validation

  • PASS: Android assembleDebug assembleRelease, arm64-v8a, Java 17, NDK 28.2.13676358, CMake 3.22.1.
  • PASS: the extracted stale-frame branch at 0, 119, 120, 121, 500, 1999, 2000, and 2500 ms, plus reprojection-off and missing-pose cases. Unmodified develop: 6 failed checks out of 34; this change: 34/34 passed. UpdateReprojectionWarp() is byte-for-byte unchanged.
  • NOT_RUN: Quest visual qualification on this revision. Before merge, pause video delivery for 200–500 ms while rotating the headset; verify the held image keeps its capture orientation, resumes correctly, and returns to the disconnected state after two seconds without frames.

Reproduce the isolated checks

The standalone reproducer is kept on a separate fork branch so these small fixes do not introduce an Android mocking framework into the runtime suite. It compiles the actual affected function/branch bodies with fake Android APIs and a controlled clock under ASan/UBSan. It does not execute MediaCodec, GLES, or an OpenXR headset.

After downloading the script outside the checkout, run from this PR branch:

python3 /path/to/quest_client_repro.py pose . --revision f72f2b20dd0c9e5a4c0b43ca7f9b0f65704aa1e6
# Expected: exit 1, with the regression failures described above.
python3 /path/to/quest_client_repro.py pose .
# Expected: exit 0.

Base checked: develop at f72f2b20dd0c9e5a4c0b43ca7f9b0f65704aa1e6. The affected Android source files are identical on unstable at a93418fea5f523107057c1903c6fe753d89da839.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@demonixis
demonixis deleted the branch demonixis:develop October 3, 2026 20:13
@demonixis demonixis closed this Oct 3, 2026
@demonixis demonixis reopened this Oct 3, 2026
@demonixis

Copy link
Copy Markdown
Owner

Thanks for this PR. Please resolve the conflict and I'll merge it

@demonixis
demonixis merged commit 7e8ca95 into demonixis:develop Oct 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants