DXVA2_VideoProc Sample
Shows how to use DXVA Video Processing.
This sample programmatically generates video with a primary stream and a substream. The primary stream displays SMPTE color bars, and the substream is a semi-transparent rectangle. The video is then processed and displayed using a DXVA video processor. The user can change the planar alpha values, source and destination rectangles, color adjustments, and color space.

APIs Demonstrated
This sample demonstrates the following DXVA interfaces:
Usage
The DXVA2_VideoProc sample builds a Windows application.
Command line options:
| Option | Description |
|---|---|
| -hh | Forces the application to use a hardware Direct3D device and a hardware DXVA device. |
| -hs | Forces the application to use a hardware Direct3D device and a software DXVA device. |
| -ss | Forces the application to use a software Direct3D device and a software DXVA device. |
Keyboard commands:
| Key | Description |
|---|---|
| ALT+ENTER | Switch between windowed mode and full-screen mode. |
| F1–F8 | Enter one of the modes shown in the following table. |
| END | Enable or disable debugging logging for dropped frames. |
| HOME | Reset a parameter to its initial value. |
Each of the function keys F1 through F8 switches to a mode in which the arrow keys can be used to adjust a particular rendering parameter. In addition, the color of the substream changes.
| Key | Description |
|---|---|
| F1 |
Adjust the alpha values.
Substream color: White |
| F2 |
Adjust the primary stream's source area (zoom).
Substream color: Red |
| F3 |
Move the primary stream's source area.
Substream color: Yellow |
| F4 |
Adjust the primary stream's destination area.
Substream color: Green |
| F5 |
Move the primary stream's destination area.
Substream color: Cyan |
| F6 |
Change background color or color space.
Substream color: Blue |
| F7 |
Adjust brightness and contrast.
Substream color: Magenta |
| F8 |
Adjust hue and saturation.
Substream color: Black |
In each mode, pressing the HOME key resets the parameters for that mode to their initial values.
Requirements
| Product | Version |
|---|---|
| Windows SDK | Windows 7 |
Downloading the Sample
This sample is available in the Windows classic samples github repository.
Related topics