From c67649f45abe507c4bd2a2f0c3fb10617d48dbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 13 Aug 2026 08:43:23 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(export):=20the=20GPU's=20H?= =?UTF-8?q?EVC=20seat=20waits=20behind=20a=20flag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Its pictures are wrong on real material -- a garbled band over flat green, one `CABAC_MAX_BIN` notice per frame -- while the frame count decodes clean, so nothing that only counts frames ever saw it. The software intra encoder takes HEVC again until that is found and proven gone; `VE_HW_HEVC=1` asks for the GPU, exactly as `VE_HW_AV1=1` does for the other opt-in seat. --- crates/engine/src/export.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crates/engine/src/export.rs b/crates/engine/src/export.rs index 8bc6ffe..6e1be6c 100644 --- a/crates/engine/src/export.rs +++ b/crates/engine/src/export.rs @@ -496,12 +496,15 @@ fn hw_seat(meta: &VideoMeta, settings: &ExportSettings) -> Option { let (fps_num, fps_den) = crate::mux::frame_timing(meta.frame_rate).ok()?; let bitrate = bitrate_of(meta, settings); match settings.format { - // Both HEVC formats sit on the plugin's HEVC seat, and it is the - // default: what it codes is intra-only, the very file the software seat - // writes, so preferring the GPU changes how long an export takes and - // not what comes out of it. `None` here is the plugin's own "no" -- - // no entrypoint, or a picture under the driver's 384x384 floor -- and - // the software intra encoder takes the file. + // Both HEVC formats sit on the plugin's HEVC seat, and it is opt-in + // while its pixels are under repair: on real 1080p and 4K material the + // GPU's file decodes frame-for-frame and *looks* wrong -- a garbled + // band over flat green, one `CABAC_MAX_BIN` notice per frame. Until + // that is found and proven gone, the software intra encoder takes the + // file and `VE_HW_HEVC=1` is what asks for the GPU. + format if format.is_hevc() && !forced("VE_HW_HEVC") => None, + // `None` here is the plugin's own "no" -- no entrypoint, or a picture + // under the driver's 384x384 floor -- and the software seat takes it. format if format.is_hevc() => { HwEncoder::open_hevc(meta.width, meta.height, fps_num, fps_den, bitrate) }