v0.3.0: H.265/HEVC Compute Encoder, Vulkan Motion Estimation, Quality Presets & 32-bit Steam Link Support
🎮 AMD BC-250 Custom Driver & VA-API Video Encoder v0.3.0
Hardware-accelerated video encoding and DisplayPort/HDMI audio fixes for the AMD BC-250 ("Cyan Skillfish" / PS5 "Oberon" APU) on Linux (Bazzite, ChimeraOS, CachyOS, Fedora, Ubuntu, Arch, SteamOS).
🚀 What's New in v0.3.0
⚡ Full H.265 / HEVC Compute Video Encoder
- Complete HEVC Encoding Pipeline: Produces fully spec-compliant H.265/HEVC bitstreams (VPS, SPS, PPS, IDR, and P-slices) matching ITU-T H.265.
- 4x4 Intra DST-VII & DCT-II Transforms: Real intra prediction with 3 MPM candidate derivation, directional modes, and CABAC syntax binarization.
- P-Frame Temporal Prediction & RPS: Full Reference Picture Set (RPS) management with short-term reference picture signaling and decoded picture buffer (DPB) tracking.
-
Vulkan Compute Motion Estimation: Leverages the BC-250's 40 RDNA2 Compute Units via
motion_estimation.compfor CTU motion search on P-frames, with host staging readback. -
SSE2 SIMD Vectorization: Fully vectorized 8x8 luma and 4x4 chroma Sum of Absolute Differences (SAD) using
_mm_sad_epu8(psadbw), cutting CPU motion estimation time by ~10x. -
Hierarchical Diamond Search & Spatial Merge Mode: Evaluates ITU-T Section 8.5.3.2.2 merge candidates (
$A_1, B_1, B_0, A_0, B_2$ ) with spatial deduplication and coarse diamond search bypass. -
Zero Chroma Drift Mathematical Invariant: All motion vectors strictly enforce even integer displacements (
$dx, dy \equiv 0 \pmod 2$ ), guaranteeing zero chroma rounding error and bit-exact reconstruction against standard HEVC decoders.
🎯 Quality Presets & Streaming Latency Optimization (Issue #10)
-
VA-API Quality Levels (1..7): Advertises and implements
VAConfigAttribEncQualityRangeandVAEncMiscParameterTypeQualityLevel(Level 1 = Quality, Level 4 = Balanced, Level 7 = Speed). -
Speed Preset Fast Paths:
-
H.264: Negligible chroma residual detection (
$|\Delta| \le 1$ ) enablesP_Skipwhen luma residual is zero, bypassing expensive CAVLC AC coefficient entropy coding. - HEVC: Relaxed early-exit SAD thresholds and skipped 8-point refinement for low-residual blocks, significantly reducing host CPU time in fast-motion scenes.
-
H.264: Negligible chroma residual detection (
-
Max Frame Size Constraint: Handles
VAEncMiscParameterTypeMaxFrameSizeto suppress network bandwidth spikes and prevent buffer bloat in Sunshine/Moonlight streaming sessions.
📈 Leaky-Bucket Rate Control & Dynamic Adaptation
- Multi-Mode Rate Control: Full CQP, CBR, VBR, and Low-Latency rate control models.
- Dynamic Feedback: Real-time frame SAD motion distortion feeds directly into QP decisions.
- Mid-Stream Adaptation: Verified dynamic runtime switching of bitrate and framerate without restarting encoding sessions.
🎮 32-bit (i386) Companion Driver for Steam Link (Issues #8 & #14)
- Dedicated 32-bit Package: Provides
bc250-driver-linux-i386.tar.gzbuilt for 32-bit VA-API runtimes such as Steam Link. - SELinux & Hardening Compatible: Built with shared
libgomp1:i386to eliminate text relocations (DT_TEXTREL), ensuring clean loading under SELinuxdeny_execmod. - Multiarch Installer & Diagnostics: Updated
tools/bc250_diagnose.shand addedtools/bc250_uninstall.shfor safe driver lifecycle management.
🔊 Audio DTO Driver v0.3.0 (bc250_audio_fix)
- Synchronized DKMS package version to
0.3.0with automated kernel rebuilds. - Direct DCN Display Controller Clock Generator (DCCG) register programming for 48 kHz / 44.1 kHz DisplayPort and HDMI audio.
🛡️ Automated CI & External Reference Oracle Verification
- 5 Passing Test Suites: Bitstream, CAVLC, H.264 Encode, VA-API Backend, and HEVC Encode test suites run on every commit.
- FFmpeg Reference Decoder Oracle: Every build verifies that external FFmpeg decodes 30/30 frames of both H.264 and H.265/HEVC with 100% zero errors.
📥 Installation Instructions
1. 64-bit Driver (Main Package — OBS, Sunshine, Games, Desktop)
tar -xzvf bc250-driver-linux-x86_64.tar.gz
cd bc250-driver
sudo ./build_and_install.sh2. 32-bit Companion Driver (For Steam Link Users)
Install the 64-bit package first (for shaders and configuration), then install the 32-bit companion driver:
tar -xzvf bc250-driver-linux-i386.tar.gz
sudo install -Dm755 bc250-driver-i386/bc250_drv_video.so /usr/lib32/dri/bc250_drv_video.so
# On Debian/Ubuntu multiarch:
# sudo install -Dm755 bc250-driver-i386/bc250_drv_video.so /usr/lib/i386-linux-gnu/dri/bc250_drv_video.so⚡ Recommended Sunshine / Moonlight Settings
Add these environment variables to your Sunshine service or launch script:
export LIBVA_DRIVER_NAME=bc250
export BC250_FAST_MODE=1In Sunshine Web UI:
- Encoder: VA-API
- Quality Preset:
speed(Preset 7) orbalanced(Preset 4) - Codec: H.264 or HEVC (H.265)