Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Windows App SDK 2.6.6-experimental.
Video super resolution (VSR) lets your app upscale video frames with VideoScaler. Create a scaler once for each stream with VideoScaler.CreateAsync(), then reuse it for subsequent frames. The default is face-focused enhancement with automatic device and quality selection.
Use Scale for supported Direct3D 11 surfaces or ScaleImageBuffer for RGB/BGR image buffers. Provide an output resource at the resolution your app needs. For setup, API availability, and programming examples, see Get started with video super resolution.
Important
Explicit device, scenario, and quality selection and input color properties require the experimental contract version 2 surface. These members aren't present in every older or stable SDK release. Check Prerequisites and API availability for your selected SDK package's Windows, runtime, and deployment requirements.
Device selection and fallback
For streaming, VSR selects the device first and the quality level second. It makes both choices once, when you create the instance. The public VSR API defaults to FaceFocused, Automatic device selection, and Automatic quality.
Use Automatic when your app can run on any device supported by the requested scenario. During creation, the scaler attempts device selection in the scenario-specific order below. It doesn't benchmark devices to select the fastest device, the lowest power consumption, or the highest quality.
If you request a specific device and that device can't support the request, creation fails instead of switching devices. Quality fallback can still occur on the explicitly requested device.
Because device selection comes first, a usable WODQ NPU model takes priority over a higher-quality CPU implementation. After initialization, a frame failure, a slow frame, or a missed application deadline doesn't automatically switch the instance's device or model.
Device order by scenario
| Scenario | When to use it | Automatic device order | Explicit device requests |
|---|---|---|---|
FaceFocused (default) |
Make the speaker's face clearer in a video call or recorded presentation. This is the default when you call VideoScaler.CreateAsync() without options. |
NPU, then GPU, then CPU | NPU, GPU, or CPU, if eligible |
TextFocused |
Improve the clarity of camera-captured text and fine edges, such as writing on a whiteboard or print on a document. | GPU, then CPU | GPU or CPU, if eligible; NPU isn't supported |
Gaming |
Upscale a lower-resolution game stream on the viewer's device. Creation fails if no supported GPU is available. | GPU only | GPU only; CPU and NPU aren't supported, and there's no CPU fallback |
Stabilization |
Reduce camera shake rather than enhance detail. Submit full frames in order and use a separate scaler for each independent stream because stabilization retains frame history. | CPU only | CPU only; GPU and NPU aren't supported |
Fallback stays within the requested scenario: TextFocused doesn't switch to a FaceFocused model, Gaming doesn't fall back to CPU processing, and Stabilization doesn't substitute a super resolution model.
If your app explicitly requests Gpu and no GPU qualifies, creation fails rather than silently switching to CPU processing. A TextFocused app that permits CPU processing can use Automatic. A Gaming app must handle GPU unavailability because that scenario has no CPU implementation.
FaceFocused models by device and quality
For FaceFocused, device preference takes precedence over quality preference: the scaler considers a device, then attempts the applicable models on that device in preference order. The table shows the current choices. Model names describe implementations; they aren't API values an app can request.
| Quality request | NPU | GPU | CPU |
|---|---|---|---|
Automatic / FavorPerformance |
WODQ | Spatial SR | CPU ONNX SR |
FavorQuality |
M8 (higher quality), then WODQ | Spatial SR at the available quality tier | Native SR, then CPU ONNX SR |
With automatic device selection, the scaler tries these options during initialization, skipping ineligible devices and stopping when a model initializes successfully:
- Automatic or FavorPerformance: NPU WODQ, then GPU Spatial SR, then CPU ONNX SR.
- FavorQuality: NPU M8, then NPU WODQ, then GPU Spatial SR, then native CPU SR, then CPU ONNX SR.
A quality preference doesn't guarantee a particular model, output quality, or frame rate.
GPU requirements
The installed driver must expose native 16-bit floating-point (FP16) shader operations, and the GPU must have at least 512 driver-reported total lanes (TotalLaneCount). Meeting these requirements establishes GPU eligibility but doesn't guarantee a particular frame rate. GPUs below the minimum lane count don't qualify, even if they support native FP16 shader operations.
CPU threading and hardware recommendations
Use the SDK's deployment model for runtime and model assets. On CPU devices, actual performance depends on the device, scenario, and available models.
When FaceFocused with FavorQuality or TextFocused uses native CPU inference, the scaler limits the number of threads it can use based on the input frame's pixel count. Smaller frames have a lower limit; larger frames can use more threads. The frame-size thresholds and thread limits depend on the CPU backend.
CPU processing is supported on systems with 12 logical processors. For better performance, we recommend 16 or more logical processors. Neither count is a minimum requirement or a guarantee of how many threads the scaler will use.
Choose a resolution for your video stream
The performance impact of changing input or output resolution depends on the selected model and device. Reducing either resolution may improve end-to-end frame time, but doesn't necessarily reduce inference work. Choose dimensions that meet your app's quality requirements and measure performance on representative devices.
For supported face-focused resolutions, frame rates, and formats, see Supported hardware.
Frame size, regions, and color
Output size and regions of interest
Allocate the output surface or image buffer at the final resolution your app needs. The scaler writes the processed frame directly to that resource; your app doesn't need to create an intermediate image. Use the output only when the call returns VideoScalerStatus.Success.
VideoScalerOptions.RegionsOfInterest contains input-coordinate rectangles, even when the output resolution differs. Each rectangle must have a positive width and height and fit entirely inside the input frame. An empty collection means full-frame processing; invalid regions are rejected rather than clipped. Stabilization supports only full-frame processing.
Color
For NV12 input, set VideoScalerOptions.InputColorRange and InputColorMatrix to match the source. If you leave them unset, the scaler uses full range and BT.601.
| Property | Values | Default | Description |
|---|---|---|---|
InputColorRange |
Full, Limited |
Full |
The quantization range of the NV12 input. |
InputColorMatrix |
Bt601, Bt709 |
Bt601 |
The YUV-to-RGB conversion matrix of the NV12 input. |
Null frame options mean full-frame processing with Full-range BT.601 defaults. RGB/BGR ImageBuffer data is full-range.
NV12 output inherits the declared input range and matrix, while RGB-family output is full-range. There is no separate output color setting. These options don't independently select HDR transfer functions or gamut conversion. If a required color conversion fails, the frame operation fails.