Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 34a5e28c authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera: Handle deviation between frame duration and vsync intervals

When camera frame duration deviates from display vsync interval, the
current approach doesn't work because it favors delaying the frames to
latch onto next VSYNC interval.

We cannot compensate such delay by pulling in and latching onto an
ealier VSYNC signal. That will result in periods where frames are
displayed at 16ms, 50ms, 16ms, 50ms intervals for 30fps case.

The solution is to use different methods for different cases:
1. If the frame duration is multiples of VSYNC intervals, use existing
   approach.
2. Otherwise, simply use the earlist expected presentation time in the
   VSYNC timeline.

Test: Run camera at lower FPS (24) and observe trace
Test: No regression for fixed 30fps or 60fps use cases
Test: Vendor verifies 24/30/60 fps display rate on different SoC chips
Test: PerformanceTest#testSurfaceViewJitterReduction
Bug: 236389092
Change-Id: I5408192550a1e09b18c4c0aa255a7687bf5dd829
parent 5b33db05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment