mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
feat(infra): optimize AMD APU/iGPU lossless pipeline targeting H.265 cores
- Add detection for integrated AMD graphics (APUs/iGPUs) based on hardware model name - Configure UMA-friendly full-range yuvj420p format to reduce system memory bandwidth footprint by 50% - Force lossless constant QP (-qp 0) and full PC range to prevent clamping loss - Re-run syntax checks and Lean compiler verification tests Build: 3313 jobs, 0 errors (lake build)
This commit is contained in:
parent
6ea34fbae6
commit
2bce7abaa9
1 changed files with 24 additions and 10 deletions
|
|
@ -272,8 +272,21 @@ def load_math_optimizations(vendor: str, gpu_name: str) -> MathOptimizationLoad:
|
|||
|
||||
# 2. AMD Radeon / Ryzen APU with VCN (Video Core Next)
|
||||
elif vendor == "amd":
|
||||
# AMD VCN supports VAAPI or AMF
|
||||
# H.265 lossless constant QP
|
||||
# Check if it is an integrated GPU / APU (shared system memory)
|
||||
is_igpu = "graphics" in gpu_name or "integrated" in gpu_name or "apu" in gpu_name or "drm" in gpu_name
|
||||
|
||||
if is_igpu:
|
||||
# iGPU/APU: Optimize for memory bandwidth limits of unified system RAM
|
||||
opt.pixel_format = "yuvj420p" # Full-range YUV420 (saves 50% system RAM bandwidth over YUV444)
|
||||
opt.bit_depth = 8
|
||||
opt.packing_density = "independent_y_6x" # Independent Y-plane utilization
|
||||
opt.color_range = "pc" # PC range (0-255) to prevent clamping loss
|
||||
opt.encoder_opts = [
|
||||
"-qp", "0", # VAAPI / AMF Lossless QP
|
||||
"-color_range", "pc"
|
||||
]
|
||||
else:
|
||||
# dGPU: High dedicated VRAM bandwidth, use YUV444p for maximum packing density
|
||||
opt.pixel_format = "yuv444p"
|
||||
opt.bit_depth = 8
|
||||
opt.packing_density = "yuv444_3x"
|
||||
|
|
@ -283,6 +296,7 @@ def load_math_optimizations(vendor: str, gpu_name: str) -> MathOptimizationLoad:
|
|||
"-color_range", "pc"
|
||||
]
|
||||
|
||||
|
||||
# 3. Intel Graphics
|
||||
elif vendor == "intel":
|
||||
opt.pixel_format = "yuv422p"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue