Files
video-v1/vav2/Vav2Player

Vav2Player

High-performance AV1 video player built with WinUI 3 and DirectX 12.

Overview

Vav2Player is a modern video player specifically designed for AV1 video codec support with hardware acceleration. Built using WinUI 3 and DirectX 12, it provides real-time decoding and GPU-accelerated rendering for optimal performance.

Features

Video Playback

  • AV1 Codec Support: Native AV1 video decoding using dav1d library
  • Hardware Acceleration: Intel QSV, NVIDIA NVDEC, AMD VCN support via Media Foundation
  • Real-time Performance: 30fps+ playback for 4K content
  • Multiple Formats: WebM, MKV container support

GPU Rendering Pipeline

  • Zero-CPU Conversion: Direct GPU YUV→RGB conversion using HLSL shaders
  • D3D12 Acceleration: Modern graphics pipeline with command list pooling
  • Dependency Scheduling: Advanced GPU task scheduler for optimal resource utilization
  • Memory Optimization: Frame pooling and zero-copy texture uploads

User Interface

  • WinUI 3: Modern Windows application framework
  • Multi-Window Support: Multiple video windows with independent playback
  • Aspect Ratio: Automatic AspectFit scaling with proper letterboxing
  • Responsive Design: Real-time window resizing and layout updates

Technical Specifications

System Requirements

  • OS: Windows 10 version 1903 or later
  • Architecture: x64 only
  • GPU: DirectX 12 compatible graphics card
  • RAM: 8GB minimum, 16GB recommended for 4K content

Supported Formats

  • Video Codecs: AV1
  • Containers: WebM (.webm), Matroska (.mkv)
  • Color Spaces: YUV420P, YUV422P, YUV444P with BT.709 conversion
  • Resolutions: Up to 8K (7680×4320)

Performance Targets

  • 4K Playback: 0.6-1.3ms GPU render time (15-30x improvement over CPU)
  • Memory Usage: Optimized frame pooling with configurable buffer sizes
  • Latency: Real-time decoding with minimal buffering

Architecture

Core Components

  • AV1Decoder: dav1d and Media Foundation decoder backends
  • YUVRenderer: GPU-based YUV→RGB conversion pipeline
  • DependencyScheduler: Multi-threaded GPU task scheduling
  • CommandListPool: D3D12 command list pooling for reduced overhead
  • VideoPlayerControl: WinUI 3 video display component

Performance Optimizations

  • GPU Pipeline: Hardware-accelerated YUV→RGB shader conversion
  • Memory Pooling: Reusable frame and packet buffers
  • Zero-Copy Operations: Direct texture uploads without CPU intervention
  • Async Processing: Multi-threaded decode and render pipeline

Build Requirements

Development Environment

  • Visual Studio 2022: Community, Professional, or Enterprise
  • Windows SDK: 10.0.26100.0 or later
  • C++ Standard: C++17 or later
  • WinUI 3: Windows App SDK 1.8

Dependencies

  • dav1d: AV1 decoder library
  • libwebm: WebM container parsing
  • DirectX 12: Graphics and compute pipeline
  • Media Foundation: Hardware decoder integration

Quick Start

Building the Project

cd vav2/Vav2Player/Vav2Player
MSBuild.exe Vav2Player.vcxproj /p:Configuration=Debug /p:Platform=x64

Running Tests

# Headless test runner
cd x64/Debug/Headless
.\Vav2PlayerHeadless.exe "path/to/video.webm"

# Unit tests
vstest.console.exe "x64\Debug\UnitTest\Vav2UnitTest.dll"

Project Status

Current State

  • AV1 decoding (software and hardware)
  • GPU YUV→RGB shader pipeline
  • Multi-window video playback
  • Real-time performance optimization
  • Memory management and pooling

Performance Achievements

  • GPU Rendering: 15-30x performance improvement over CPU conversion
  • Memory Efficiency: Reduced allocations through frame pooling
  • Hardware Acceleration: Automatic fallback from GPU to CPU decoding
  • 4K Support: Smooth playback of high-resolution AV1 content

Development

Code Structure

src/
├── Common/          # Shared utilities and data types
├── Decoder/         # AV1 decoder implementations
├── FileIO/          # WebM/MKV file parsing
├── Pipeline/        # Multi-threaded processing pipeline
├── Rendering/       # GPU rendering and D3D12 integration
└── Output/          # File output and testing utilities

Testing

  • Unit Tests: Component-level testing with Microsoft Test Framework
  • Headless Mode: Console application for automated testing
  • Performance Benchmarks: GPU vs CPU rendering comparisons

Requirements

DirectX 12 Dependencies

License

This project is developed for educational and research purposes.