feat(player): improve enhancement quality and preserve video geometry - #755
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_dbf43106-a99b-459d-a619-8b47f4e2d645) |
Documentation previewThe documentation preview has been deployed for this pull request. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_c4500fd3-b418-4b30-84dd-62e5480e79db) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_ab667cc2-fa70-4822-9bd4-45008d21aab5) |
Improve denoising and display-size scaling for SD and 1080p/i playback, and prevent the picture changing proportions when enhancement is toggled on anamorphic channels such as Shanxi Satellite TV.
Validation: 43 frontend tests, TypeScript checking, changed-file Biome checks, and the production frontend build passed. Real WebGL checks on Chromium covered 32 combinations of native, smaller, and upscaled output, independent axis scaling, Y-flipping, caller-bound framebuffers, contrast and saturation, and returning from upscale to native size; both RGBA16F and RGBA8 denoising history paths passed. Six playback cases verified the expected shader stages for 1080p/i at 1920 × 1080, 2560 × 1440, and 3840 × 2160, plus 24 anamorphic geometry checks covering paused toggles and deinterlacing. Live preview checks on CCTV-1 at all three output sizes and on Shanxi Satellite TV confirmed the expected scale uniforms and contrast/saturation values; paired GPU replays of captured frames had zero pixel error. No GL errors were observed.
Note
Medium Risk
Large changes to the real-time WebGL video path (shaders, temporal state, and sizing) affect every enhanced playback session, though failures fall back to passthrough with explicit resets on seeks.
Overview
Replaces the spatial mosquito-nr filter with a new TemporalDenoiser at source resolution: motion-adaptive history blending, variance clipping on cuts, and original luma packed in alpha for downstream sharpening. History resets on seeks, stage changes, and timeline discontinuities.
FSR path is reworked: EASU runs only when the canvas is larger than the source; native-size output still gets denoise + RCAS with stronger, noise-aware luma sharpening (using denoiser/EASU alpha), scale-aware edge gating, and RGB10_A2 intermediates. Bit-hack reciprocals are replaced with guarded exact math.
The renderer keys uploads and the render gate off rVFC decoded dimensions (
metadata.width/height), not SAR-scaledvideoWidth/videoHeight, so anamorphic rasters keep correct aspect when enhancement is toggled. Frame textures use pre-allocated RGB8 storage plustexSubImage2Dfor ANGLE/Metal stability;createProgramcleans up shaders on link/compile failure.Pipeline wiring moves resize/discontinuity handling into the renderer (seeking, emptied, lightweight rVFC when stopped) and caps upscale targets with
MAX_TEXTURE_SIZE.Reviewed by Cursor Bugbot for commit 9327ca6. Configure here.