Releases: simpmix/bc250-encoding-decoding-fix
Release list
v0.5.1 - Steam Link Multi-Slice Fix, Gamescope Green Screen Fix & Inter HEVC Pipelining
Release v0.5.1: Multi-Slice Boundary Sanitization, Gamescope Green Screen Fix & Inter HEVC Pipelining
Release v0.5.1 delivers major streaming stability, Gamescope / Gaming Mode compatibility, true inter-prediction motion compensation for HEVC, and native libx264 CPU offloading for both 64-bit and 32-bit ecosystems on the AMD BC-250 APU.
1. Gaming Mode & Steam Link Fixes
- Gamescope Blank & Green Screen Resolution: When streaming inside Gamescope sessions in Gaming Mode, Steam Link and Sunshine attempt zero-copy DMA-BUF imports via
vaCreateSurfaces2()(VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2). Previously, un-imported attributes were discarded while returningVA_STATUS_SUCCESS, resulting in uninitialized surfaces encoding to solid green (NV12 Y=0, U=0, V=0) or black screens.bc250_CreateSurfaces2()now explicitly rejects unsupported external memory imports withVA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE, forcing Sunshine and Steam Link onto their working EGL blit (vaExportSurfaceHandle) and frame copy pathways. - Steam Link Multi-Slice Fix (Issue #49): Implemented strict ITU-T H.264 intra prediction sanitization across slice boundaries and image borders (
h264_sanitize_i16_mode(),h264_sanitize_chroma_mode()). Eliminates decoder aborts and green screens when streaming via Steam Link with multi-slice parallel encoding enabled. - 32-Bit libx264 CPU Backend Support: Added 32-bit
libx264support to the companion driver package (bc250-driver-linux-i386.tar.gz) andtools/build_32bit.sh. When streaming 100% GPU-saturating titles like Red Dead Redemption 2, Steam Link can now encode across Zen 2 CPU cores (BC250_H264_BACKEND=x264), eliminating compute queue stalls and driver timeouts.
2. Encoder & Performance Upgrades
- Full Inter-Prediction HEVC Wavefront Pipeline (PR #48): True inter-prediction motion compensation, AMVP and Merge candidate derivation, 8x8 DCT transforms, dead-zone quantization (-21.8% bit savings), and complexity-based rate control model (0.04 dB vs constant QP) for H.265/HEVC encoding.
- High-Performance H.264 Backend (PR #47): Integrated native
libx264backend (BC250_H264_BACKEND=x264, with compute encoder as fallback) delivering 4x faster execution, CABAC entropy optimization, and multi-reference frames while leaving the APU's 40 Compute Units free for 3D games. - Live Stream Governor Pinning (PR #46): Governor telemetry dynamically engages only during active live streaming sessions, preventing duplicated H.264 frames during offline FFmpeg file transcodes.
- Sliding-Window Rate Control: Prevents video bitrate ballooning during recording and streaming by enforcing continuous buffer drain tracking and QP delta capping.
3. Hardware & Platform Compatibility
- Kernel Audio Parity for Modern Distributions (Issue #54): Updated
build_and_install.shand platform setup scripts to preserve modern native kernel audio support on CachyOS 7.2+ and Arch kernels. Made legacy DKMSaudio-fixopt-in via--with-audio-fix. - Hardware Architecture Precision: Updated driver vendor identification to
AMD BC-250 Compute VA-API Driverand refined documentation to accurately describe the semi-custom RDNA 1.5 architecture (Cyan Skillfish / Oberongfx1013, 40 CUs, packed dual-rate FP16, ray tracing BVH accelerators, no Infinity Cache). - Diagnostics & Tooling: Enhanced
tools/bc250_diagnose.shto automatically detect Gamescope sessions, KMS render node permissions, and missing 32-bit companion drivers. Integrated dynamic FFmpegfps_modedetection and the tunablegpu_contentiontest suite.
4. Installation & Verification
- 64-bit Driver Bundle:
bc250-driver-linux-x86_64.tar.gz(installs to/usr/local/lib64/dri/or distro path). - 32-bit Companion Driver:
bc250-driver-linux-i386.tar.gz(installs to/usr/lib32/dri/for Steam Link). - CI Verification: 100% CI pass rate with unit tests and external FFmpeg reference oracle validation across both 64-bit and 32-bit targets.
v0.5.0
BC-250 Driver v0.5.0: Complete VA-API Encode/Decode, Multi-Slice, Tiles, WPP & WiVRn VR Suite (Hotfix Update)
The v0.5.0 release represents a comprehensive overhaul of video acceleration for the AMD BC-250 (Cyan Skillfish) APU on Linux. It brings 100% bit-exact hardware-conforming video decoding (VAEntrypointVLD), multi-slice HEVC encoding at 111+ FPS (3x speedup), WiVRn wireless VR streaming optimization with multi-core concurrency, 10-bit HEVC Main 10 decoding and encoding, hardware scaling/cropping (VAEntrypointVideoProc), and native Linux distribution packaging.
🌟 Key Highlights & Improvements
1. Rate Control Alignment & Intelligent Constant Quality (ICQ) Fix
- Intelligent Constant Quality (
VA_RC_ICQ): When FFmpeg or GStreamer encodes without an explicit bitrate target (-b:v), standard encoders selectVA_RC_ICQ. The driver now supportsVA_RC_ICQ, computing normative bitrate targets (~4.0 Mbps H.264 / ~2.2 Mbps HEVC at 1080p, matching Intel iGPU bitrate and file size) while maintaining dynamic per-frame rate control. - CQP Fallback & Compatibility: Restored
VA_RC_CQPadvertisement alongsideVA_RC_CBR,VA_RC_VBR, andVA_RC_ICQ, resolving FFmpeg-22(EINVAL: "Driver does not support any RC mode compatible with selected options") errors on unconstrained commands. - Dynamic Rate Control & Base QP Restoration:
- Guarded
pic_init_qp = 26inVAEncPictureParameterBufferfrom overwriting the rate controller's bitrate-derivedbase_qpduring CBR/VBR encoding, allowing dynamic QP selection across the entire 12..51 range to match requested target bitrates. - Implemented HEVC CBR filler NAL support (
maybe_append_filler_hevc), enabling exact target bitrate conformance in CBR mode and feeding accurate bit accounting to the leaky-bucket model. - Lowered CU skip threshold from overly aggressive 1024 down to 48..96 based on quality presets, eliminating texture smearing and preserving fine grain and high-frequency motion.
- Tightened rate-control integral window from 150 frames to 30 frames for fast 1-second bitrate convergence.
- Guarded
2. HEVC Encoder Quality Reconstruction & Main 10 Encoding (PR #44, PR #45)
- Planar Prediction Bottom-Left Sample Fix (PR #44): Fixed a reconstruction drift where Planar prediction incorrectly mirrored
left[3]instead of reading the true reconstructed sample below the left column (p[-1][4]). Eliminates encoder/decoder divergence and delivers a massive +12 to +21 dB PSNR boost (1080p QP 30: 24.4 dB -> 45.4 dB; 1080p 8 Mbps: 22.3 dB -> 34.3 dB). - HEVC Main 10 Encoding (
VAProfileHEVCMain10) (PR #45): Full 10-bit HEVC encoding from P010 surfaces with Qp' = QP + 12 scaling, proper transform shifts, and surface boundary clamping.
3. Full Bit-Exact VA-API Video Decoding (VAEntrypointVLD)
- Direct VA-API Reference Picture Lists & MPV / FFmpeg Playback Fix:
- In standard MP4/MKV containers, sequence reference tables are stored in container atoms (
hvcC) rather than inside slice headers. The driver now extracts pre-resolved Reference Picture Lists (L0/L1) directly fromVASliceParameterBufferHEVC.RefPicList[2][15], eliminating slice parsing desync. - Added container slice header scan fallback when
sps->num_st_rps == 0, recovering byte alignment and WPP entry points so multi-threaded wavefront parallel processing executes without single-threaded fallbacks. - Replaced per-frame UV interleaving buffer allocations with persistent allocations and SSE2 SIMD vectorization.
- Added DPB closest-POC concealment fallback to smoothly handle frame drops and player seeks.
- Completely fixes frozen/ghosted title cards, block displacement, and audio/video desync in
mpv --hwdec=vaapiand FFmpeg.
- In standard MP4/MKV containers, sequence reference tables are stored in container atoms (
- H.264 & HEVC/H.265 Decoding: Implemented complete
VAProfileH264*,VAProfileHEVCMain, andVAProfileHEVCMain10(10-bit on P010 surfaces) decoding entrypoints via threaded CPU wavefront execution. - Multi-Slice & Dependent Slice Segments (PR #29): Per-slice reference picture lists for temporal motion vector prediction. Resolves flickery and semi-garbled playback artifacts in multi-slice HEVC media (e.g. Big Buck Bunny, streaming captures).
- HEVC Tile Decoding (PR #27): Full support for arbitrary multi-tile layouts with independent tile decoding boundaries, verified across all 13 ITU tile test streams.
- Wavefront Parallel Processing / WPP (PR #31): Correct CABAC context state synchronization and quantization parameter prediction across CTU rows. All 12 ITU WPP conformance vectors pass bit-exact.
4. WiVRn & Game Streaming Optimization (Sunshine / Moonlight / WiVRn)
- WiVRn Auto-Detection & 4-Core Concurrency: Automatically allocates 4 CPU worker threads and 4 slices for
wivrn-server, slashing host VR encode latency from ~50ms to ~15ms. - Low-Latency HEVC Rate Control: Assigns a 2-frame low-latency buffer (
RC_LOW_LATENCY) for WiVRn HEVC streaming, eliminating 1-second VBR buffer latency swings. - Extended Max Dimensions (4096×4096): Raised maximum picture width and height to 4096 to natively support Meta Quest 3 (2064×2208/2240) and high-res VR headsets without clamping.
- High Bitrate Unlocked (
BC250_QP_MIN): Configurable minimum QP floor (1..51, default 12). SettingBC250_QP_MIN=8allows VR enthusiasts to push bitrates past 150 Mbps (up to 200–300+ Mbps). - SPS Frame-Cropping Window: Implemented normative H.264 SPS frame cropping. Resolves 1080p streams decoding as 1088p with bottom green line artifacts; restores frame PSNR from 13.7 dB to 44.3 dB.
5. Hardware Video Post-Processing (VAEntrypointVideoProc)
- Compute Scaling & Cropping: Hardware-accelerated surface scaling via compute shaders supporting both NV12 and P010 formats (PR #26).
6. Native Packaging & Multi-Arch Distribution
- Native Packages: Included packaging for Arch Linux / CachyOS (
PKGBUILD), Fedora / Bazzite (bc250-vaapi.spec), and Debian / Ubuntu (packaging/debian/). - Steam Link & 32-Bit Support: Automatic CI builds for both 64-bit (
x86_64) and companion 32-bit (i386) drivers (bc250-driver-linux-i386.tar.gz) for Steam Link and 32-bit Wine applications.
📦 Installation Quickstart
Pre-built Release Bundles:
tar -xzf bc250-driver-linux-x86_64.tar.gz
sudo ./install.shArch Linux / CachyOS:
./tools/install_cachyos_arch.shSteamOS / HoloISO:
sudo ./tools/setup_steamos.shv0.4.3 - Zero-Stutter Scene Adaptation, HEVC Hardware Conformance & Steam CPU Fix
🚀 Highlights & Critical Bug Fixes
1. Sunshine Low Latency & Frame Pacing Stabilization
- Eliminated
0.5 / 32 / 22ms Latency Oscillation:- Root-caused the latency oscillation reported by testers: the dynamic governor's 15.5ms Tier 3 emergency spike trip-wire was false-triggering under real-time streaming loads, causing every alternate frame to bypass GPU submission and emit a 0.5ms P_Skip failover frame followed by a 32ms full encode.
- Auto-tuned dynamic governor thresholds for Sunshine streaming (
program_invocation_short_name == "sunshine") to 14ms (Tier 1 Fast ME), 22ms (Tier 2 Offload), and 45ms (Tier 3 Failover). - Added user/tester tunable environment variables:
BC250_GOVERNOR_TIER1_MS,BC250_GOVERNOR_TIER2_MS,BC250_GOVERNOR_TIER3_MS.
- Targeted Multi-Threading for Sunshine (Restoring Sub-10ms Latency):
- Sunshine configures multi-slice network packetization (typically 4 slices). Hardcoding 1 thread forced slice entropy coding sequentially onto a single core (~14ms).
- Automatically grants 2 threads to Sunshine (
program_invocation_short_name == "sunshine") for parallel CAVLC and CABAC slice encoding, slashing encode latency by ~50% down to sub-10ms. - Keeps FFmpeg transcodes and Steam Link at a lean 1 thread baseline to preserve 100% of host Zen 2 CPU headroom.
- Vulkan Fence Wait in
bc250_SyncSurface():- Restored non-blocking GPU fence synchronization in
bc250_SyncSurface()when a GPU slot is submitted, ensuring smooth frame pacing and preventing EGL surface reuse collisions.
- Restored non-blocking GPU fence synchronization in
2. HEVC Real-Time Transcoding Acceleration & Visual Fixes
-
Eliminated Redundant 15ms GPU Shader Dispatch:
- Removed an unnecessary H.264 GPU compute shader dispatch pass from
hevc_encoder_encode_frame()that was executing 10 stages of unused shaders and waiting on fences, saving 15ms of GPU time per frame.
- Removed an unnecessary H.264 GPU compute shader dispatch pass from
-
Fixed Merge Candidate Motion Vector Rejection:
- Removed an aggressive parity filter that discarded odd-pixel displacement vectors, which previously forced up to 90% of moving blocks into slow INTRA NxN mode.
-
DC Intra Fast Path for Transcoding (
quality_level >= 4):- In balanced/speed transcoding modes, directly selects spec-compliant DC intra prediction, bypassing over 500,000 directional mode predictions and SAD searches per second at 1080p.
-
Zero-Residual Transform Bypass:
- Bypasses 4x4 DST-VII and DCT-II inverse transforms and dequantization when transform blocks contain all zero coefficients, accelerating CPU reconstruction by up to 4x.
-
Spec-Compliant Spatial Merge Candidate Derivation (ITU-T H.265 Section 8.5.3.2.2):
- Strict Z-scan raster decoding order rank checking (
hevc_cu_rank()), fixed CTU boundary candidate availability ($B_0$ ,$A_0$ ), and candidate$B_2$ pruning.
- Strict Z-scan raster decoding order rank checking (
-
8-Bit Picture Order Count (POC) & CABAC Low-Register Overflow Fix:
- 8-bit POC (
log2_max_pic_order_cnt_lsb_minus4 = 4) prevents 16-frame DPB reference desync, while CABAC multi-byte bypass loop prevents arithmetic register overflow.
- 8-bit POC (
-
Access Unit Delimiters (AUD):
- Emits NAL unit type 35 (
NAL_UNIT_AUD) before every frame for Android and Qualcomm OMX hardware decoders.
- Emits NAL unit type 35 (
3. FFmpeg & Steam Link CPU Optimization
- Relaxed Driver Locks During Synchronous Encode:
- Unlocked
DRIVER_LOCKduring synchronous encode inbc250_EndPicture()(with surface pinning), preventing FFmpeg worker threads (vf#0:0) from locking up.
- Unlocked
- Persistent Surface Memory Mapping:
bc250_DeriveImage()directly aliases persistently mapped surface memory, eliminating per-framevkMapMemory/vkUnmapMemorypage table churn.
- Fast Path for Internal Non-Exported Surfaces:
- Bypasses
DMA_BUF_IOCTL_EXPORT_SYNC_FILEon non-exported surfaces.
- Bypasses
- OpenMP Passive Waiting:
- Enforced
OMP_WAIT_POLICY=PASSIVEandGOMP_SPINCOUNT=0to prevent libgomp core spinning in Steam.
- Enforced
📦 Bundled Release Assets
bc250-driver-linux-x86_64.tar.gz: 64-bit VA-API driver (bc250_drv_video.so) with precompiled SPIR-V compute shaders and install scripts.bc250-driver-linux-i386.tar.gz: 32-bit companion driver for 32-bit Steam Link / Steam Remote Play gaming environments.
v0.4.2 - Live Governor Telemetry, Zen 2 Core Pinning, Steam Link Low-CPU Fix & Sunshine Guide
🚀 Highlights & Performance Upgrades
1. Live Governor Telemetry & Query API
- Added real-time governor monitoring via
BC250_GOVERNOR_STATS=N(or1for ~1s interval at 60fps), logging frame index, active tier, GPU compute latency, EMA latency, offload frame counts, and failover stats tostderr. - Added query API
dynamic_governor_get_stats()and human-readable string lookupdynamic_governor_tier_name(). - Refined downward hysteresis transition logic with robust stable-frame counting to prevent tier fluttering during transient load spikes.
2. Steam Link & Steam Remote Play Low-CPU Optimization (Issue #17)
- Eliminated 600% Host CPU Spike: Root-caused high host CPU usage in Steam Link to OpenMP worker threads busy-spinning (
GOMP_SPINCOUNT) between 60 FPS frames. - Enforced
OMP_WAIT_POLICY=PASSIVEandGOMP_SPINCOUNT=0on driver initialization, ensuring idle worker threads sleep immediately on kernel futexes instead of active spin-waiting. - Hard-capped slice entropy coding worker threads to at most 2 (
BC250_MAX_CPU_THREADS=2), guaranteeing 75% of the Zen 2 CPU cores remain completely free for games and the Steam client. - Added
BC250_DISABLE_OPENMPknob to allow strictly single-threaded slice coding without thread pool overhead.
3. Zen 2 CPU Core Pinning & Affinity
- Added
BC250_CPU_CORESconfiguration (e.g.BC250_CPU_CORES=6,7), allowing users to pin encoder worker threads to specific CPU cores away from game rendering threads.
4. HEVC Non-16-Multiple Buffer Boundary Overrun Fix
- Implemented edge replication padding in
encoder_h265.cto pad source surfaces out to 16-multiple macroblock boundaries prior to SIMD motion estimation, eliminating boundary overruns on arbitrary stream dimensions.
5. Dedicated Sunshine & Moonlight Setup Guide
- Added
docs/sunshine-guide.mdwith recommended Web UI configurations, bitrate tuning, multi-slice parallel decoding, governor controls, and troubleshooting for both Sunshine/Moonlight and Steam Link. - Documented verified real-world benchmark result: 5,410 without streaming vs 5,165 with live streaming using BC-250 drivers (~4.5% overhead under active game streaming).
📦 Bundled Artifacts
bc250-driver-linux-x86_64.tar.gz: 64-bit VA-API driver with precompiled SPIR-V shaders, setup scripts, and audio clock fix.bc250-driver-linux-i386.tar.gz: 32-bit companion VA-API driver for 32-bit gaming runtimes (Steam Link / Steam Remote Play).
v0.4.1 - 256-Bit AVX2 Kernel, HEVC Governor Parity & Stability Fixes
🚀 Highlights & Performance Upgrades
1. 256-Bit AVX2 SIMD Motion Estimation Engine
- Implemented high-throughput 256-bit AVX2 vector kernel in cpu_simd_me.c unrolled by 4 rows with dual vector accumulators.
- Fully exploits AMD Zen 2 native 256-bit AVX2 execution units, halving instruction count and latency for CPU-side motion estimation.
- Automatic runtime CPUID detection with seamless SSE2 and scalar fallbacks.
2. HEVC (H.265) Dynamic Governor Parity
- Brought full 4-tier dynamic hybrid load balancing to the H.265 encoder (encoder_h265.c).
- When GPU contention occurs during HEVC streaming, Motion Estimation (~70% of compute work) is seamlessly offloaded to idle Zen 2 CPU cores, preserving stream frame delivery.
- Added hevc_encoder_get_governor_tier() observability.
3. Critical Bug Fixes
- Governor Tier 3 Latch Bug: Fixed a stall where emergency failover (P_Skip) could lock the driver in Tier 3 indefinitely by adding dynamic_governor_notify_failover_handled().
- Asymmetric vkMapMemory Leak: Resolved host GPU address space leak by structuring nested mapping checks with guaranteed vkUnmapMemory execution.
- 1080p Bottom Row ME Cutoff: Corrected boundary check in cpu_simd_me.c to use macroblock-padded buffer dimensions, restoring motion search for row 67 (y = 1072..1087).
- Fast Spatial Motion Predictor: Evaluates left neighbor MB vector prior to diamond search, allowing ~75% of non-static blocks to converge in <= 2 SAD checks (<0.5 ms CPU time).
📦 Bundled Artifacts
- bc250-driver-linux-x86_64.tar.gz: 64-bit VA-API driver with precompiled SPIR-V shaders, setup scripts, and audio clock fix.
- bc250-driver-linux-i386.tar.gz: 32-bit VA-API driver for 32-bit gaming runtimes (Steam Link).
v0.4.0: Dynamic CPU/GPU Hybrid Load Balancer & OpenMP Slice Threading
Release v0.4.0: Dynamic CPU/GPU Hybrid Load Balancer, OpenMP Slice Threading, and Project Transparency Rebranding
🚀 Highlights
1. Project Rebranding & Transparency (bc250-encoding-decoding-fix)
- Renamed repository and project branding from bc250-vcn-driver to bc250-encoding-decoding-fix to eliminate confusion.
- Clarification: Factory eFuses permanently disable the hardware VCN (Video Core Next) block on BC-250 mining dies. No software, driver, or firmware modification can turn the dead ASIC back on. This project provides a high-performance VA-API hardware driver replacement powered by custom Vulkan Compute shaders executed directly across the APU's RDNA 2 Compute Units, coupled with real-time CPU SIMD load balancing and audio clock fixes.
2. Dynamic CPU/GPU Hybrid Load Balancer (Asymmetric Offloading)
- Solves the long-standing streaming frame drop issue under heavy 3D titles (e.g. Proton/DXVK/Gamescope) when GPU CUs reach 95–100% saturation.
- Bypasses the GPU Motion Estimation compute pass (~70% of encoder compute load) during CU saturation and offloads 16x16 macroblock motion search to the Zen 2 CPU cores (which maintain ~25% headroom) using vectorized SSE2 intrinsics (_mm_sad_epu8) over the unified 16 GB GDDR6 physical memory bus.
- Real-Time Saturation Governor: 4-tier state machine (Tier 0 Full GPU, Tier 1 Fast GPU ME, Tier 2 CPU SIMD ME Offload, Tier 3 P_Skip Failover) with latency EMA tracking (\alpha = 0.20) and a 15-frame anti-thrashing hysteresis filter to lock 60 fps game streaming without frame drops.
- Bounded to strictly 2 CPU worker threads to guarantee gaming CPU headroom.
3. Multi-Threaded Slice Entropy Coding
- Added OpenMP parallelized CAVLC and CABAC slice encoding (#pragma omp parallel for) when multi-slice streaming is active (\BC250_SLICES_PER_FRAME).
4. Pre-built Dual Architecture Bundles
- bc250-driver-linux-x86_64.tar.gz: 64-bit driver for standard VA-API clients (Sunshine, OBS, FFmpeg).
- bc250-driver-linux-i386.tar.gz: 32-bit driver for 32-bit Steam Link streaming.
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)
v0.2.0: Conformance-Verified Compute Encoder, Real Motion Estimation & Hardware Audio DTO Driver
🎮 AMD BC-250 Custom Driver & VA-API Video Encoder v0.2.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).
---
### 🚀 What's New in v0.2.0
#### 🎬 Vulkan Compute Video Encoder (`bc250_drv_video.so`)
* **Real Motion Vector Estimation:** Emits genuine motion vector differences (`mvd_x`, `mvd_y`) in P-slices using adaptive diamond
search and GPU activity hints, resulting in significantly smoother gameplay motion.
* Spec-Compliant H.264 Bitstream: Conforming CAVLC entropy coding, Exp-Golomb integers, AUD frame delimiters, and dynamic
CBR/VBR rate control.
* Vulkan Lifecycle Hardening: Eliminated command buffer state conflicts (double-begin) across BeginPicture and EndPicture
calls.
* Sunshine & OBS Packed Headers: Advertises and handles VA_ENC_PACKED_HEADER_SEQUENCE, VA_ENC_PACKED_HEADER_PICTURE, and
VA_ENC_PACKED_HEADER_SLICE for clean compatibility with game streaming tools.
* External Oracle Verification: Fully validated in CI with the FFmpeg reference decoder, decoding all 30 frames of 1080p60 test
streams with zero stream corruption.
#### 🔊 Hardware DisplayPort & HDMI Audio Fix (`bc250_audio_fix.ko`)
* **Physical APU MMIO Register Programming:** Maps the APU graphics controller MMIO BAR and physically writes phase and modulo
values to DCN Display Controller Clock Generator (DCCG) registers (0x05E0, 0x05E4, 0x05E8) for 48 kHz and 44.1 kHz clocks.
* Azalia HDA Probing: Discovers companion AMD HD Audio controllers, maps HDA BAR 0, and monitors stream state.
* Interactive Procfs Interface: Monitor hardware clock status or switch sample rates on the fly:
```bash
cat /proc/bc250_audio_status
echo 44100 | sudo tee /proc/bc250_audio_status
• Dynamic DKMS Support: Synced to PACKAGE_VERSION="0.2.0" with automated rebuilds across kernel upgrades.
📦 Zero-Dependency Console Installer (build_and_install.sh)
• Pre-Built Package Auto-Detection: If running from this release archive, the script bypasses all compiler/build tool checks and
installs the pre-compiled driver, shaders, DRI links, and audio fix directly. Ideal for immutable gaming distros (Bazzite, ChimeraOS,
SteamOS) where GCC and CMake are not installed.
──────
📥 Installation Instructions
Option A: Pre-Built Archive (Fastest — No Compiling Needed)
- Download bc250-driver-linux-x86_64.tar.gz from the Assets below.
- Extract and run the installer:
tar -xzvf bc250-driver-linux-x86_64.tar.gz
cd bc250-driver
sudo ./build_and_install.sh
Option B: Compile from Source
git clone https://github.com/simpmix/bc250-vcn-driver.git
cd bc250-vcn-driver
sudo ./build_and_install.sh
──────
⚡ Recommended Streaming Environment
Add these to your session or streaming launcher (e.g. Sunshine / OBS):
export LIBVA_DRIVER_NAME=bc250
export BC250_FAST_MODE=1
(Keeps GPU compute overhead under 3–5% of the 40 Compute Units for locked 60 FPS gameplay!)
──────
📢 Hardware Testers Wanted!
If you own an AMD BC-250 board, please run the built-in diagnostic suite:
./tools/bc250_diagnose.sh
and submit your results to our Hardware & Benchmark Report https://github.com/simpmix/bc250-vcn-
driver/issues/new?template=hardware_report.md issue tracker!