The GPU's HEVC seat waits behind a flag
Browse files at this commitc67649f45abe507c4bd2a2f0c3fb10617d48dbd0Parent: d113599- chore
- the GPU's HEVC seat waits behind a flag
1 changed file +9 -6
crates/engine/src/export.rsmodified+9 -6
| @@ -496,12 +496,15 @@ fn hw_seat(meta: &VideoMeta, settings: &ExportSettings) -> Option<HwEncoder> { | |||
| 496 | let (fps_num, fps_den) = crate::mux::frame_timing(meta.frame_rate).ok()?; | 496 | let (fps_num, fps_den) = crate::mux::frame_timing(meta.frame_rate).ok()?; |
| 497 | let bitrate = bitrate_of(meta, settings); | 497 | let bitrate = bitrate_of(meta, settings); |
| 498 | match settings.format { | 498 | match settings.format { |
| 499 | - // Both HEVC formats sit on the plugin's HEVC seat, and it is the | 499 | + // Both HEVC formats sit on the plugin's HEVC seat, and it is opt-in |
| 500 | - // default: what it codes is intra-only, the very file the software seat | 500 | + // while its pixels are under repair: on real 1080p and 4K material the |
| 501 | - // writes, so preferring the GPU changes how long an export takes and | 501 | + // GPU's file decodes frame-for-frame and *looks* wrong -- a garbled |
| 502 | - // not what comes out of it. `None` here is the plugin's own "no" -- | 502 | + // band over flat green, one `CABAC_MAX_BIN` notice per frame. Until |
| 503 | - // no entrypoint, or a picture under the driver's 384x384 floor -- and | 503 | + // that is found and proven gone, the software intra encoder takes the |
| 504 | - // the software intra encoder takes the file. | 504 | + // file and `VE_HW_HEVC=1` is what asks for the GPU. |
| 505 | + format if format.is_hevc() && !forced("VE_HW_HEVC") => None, | ||
| 506 | + // `None` here is the plugin's own "no" -- no entrypoint, or a picture | ||
| 507 | + // under the driver's 384x384 floor -- and the software seat takes it. | ||
| 505 | format if format.is_hevc() => { | 508 | format if format.is_hevc() => { |
| 506 | HwEncoder::open_hevc(meta.width, meta.height, fps_num, fps_den, bitrate) | 509 | HwEncoder::open_hevc(meta.width, meta.height, fps_num, fps_den, bitrate) |
| 507 | } | 510 | } |