Skip to content

Video Super Resolution for Moonlight iOS/tvOS#704

Open
linckosz wants to merge 1 commit intomoonlight-stream:masterfrom
linckosz:master
Open

Video Super Resolution for Moonlight iOS/tvOS#704
linckosz wants to merge 1 commit intomoonlight-stream:masterfrom
linckosz:master

Conversation

@linckosz
Copy link
Copy Markdown

@linckosz linckosz commented Apr 7, 2026

Video Super Resolution (VSR) brings to video what DLSS/FSR bring to 3D rendering.
This PR introduces high-quality spatial upscaling on iOS/tvOS using Metal, Core Image, and MetalFX SpatialScaler.

Mobile devices and Apple TVs can benefit from receiving a lower base stream resolution while reconstructing a sharper final image locally on-device.
This helps reduce bandwidth pressure and decoder workload while preserving visual quality at display resolution.

The Apple ecosystem requires an upscaling solution that is:

  • lightweight
  • GPU-driven
  • compatible with the native video pipeline
  • able to preserve HDR/color metadata correctly

MetalFX SpatialScaler is a strong fit for these constraints.

It provides a hardware-accelerated spatial upscaling path designed for Apple GPUs, with good quality and limited CPU overhead.
In this implementation, the decoded frame is first converted from YUV to RGB on the GPU, then optionally upscaled to the display resolution before being submitted to the existing display pipeline.

The observed power impact was very small, around +20%.
On an iPhone 13 Pro, during a 720p60 streaming session, battery usage was about 15% without VSR and about 18% with VSR enabled.

Result

400% Zoom:
Result

Original:
Original

Video Super Resolution:
VideoSuperResolution

Existing VSR Implementations

Video Super Resolution is also available in my other Moonlight ports:

This commit adds an optional Video Super Resolution path for iOS/tvOS.

- Introduce a Video​Super​Resolution renderer backed by Metal and Core Image.
- Convert decoded YUV frames to RGB and upscale them with MetalFX SpatialScaler.
- Preserve the existing rendering path as the default fallback.
- Add a user-facing toggle and hide it when MetalFX.
- Show "Video ​Enhancement: ​Metal​FX " in the performance overlay when active.
- Run the VSR path on a dedicated queue and cache session resources for better latency.
- Preserve HDR/color attachments through the converted output frames.
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.

1 participant