unarr/internal
Deivid Soto cda2e1322c feat(hls): full-GPU scale_cuda for NVENC SDR downscales
Keep an NVENC downscale of an SDR source entirely on the GPU
(decode -> scale_cuda -> h264_nvenc) instead of copying every frame to the
CPU for `scale=` and back. That GPU->CPU->GPU round-trip is the wall on
modest GPUs; even a strong box gains ~37% (scale_cuda 14.9x vs CPU 10.9x
on a 4K SDR HEVC -> 1080p encode).

Strictly gated so every case that needs CPU frames is unchanged:
- HDR (libplacebo Vulkan / zscale CPU tonemap can't consume a CUDA surface),
- burn-in (the scale2ref+overlay composite runs on CPU frames),
- non-NVENC encoders, and no-op when not actually downscaling.

- hwscale.go: FFmpegSupportsScaleCuda — a functional 1-frame probe mirroring
  the libplacebo probe (presence in -filters lies; needs a real CUDA device).
  Probes the worst-case real input (10-bit p010 -> 8-bit yuv420p) so a host
  whose scale_cuda can't do the 10->8-bit conversion fails closed to CPU.
- hls.go: useCudaScale gate + `-hwaccel_output_format cuda` + a
  `scale_cuda=-2:H:format=yuv420p` filter branch. Output is 8-bit
  (format=yuv420p + `-profile:v main`), browser-safe.
- transcode_quality.go / player_session_registry.go / daemon.go: HasScaleCuda
  flag, populated + warmed at startup like the other ffmpeg capability probes.

Fail-closed: probe absent/fails -> keep the CPU scale path, no regression.
Verified live (real 4K SDR HEVC Main10 session emitted scale_cuda, 5.54x
realtime, nvenc at 100%) + 8 arg-builder unit tests for the gate.
2026-06-10 21:44:58 +02:00
..
acme feat(agent): per-agent direct-TLS cert client + HTTPS listener wiring 2026-06-05 12:09:46 +02:00
agent Merge branch 'main' into feat/agent-tls-direct 2026-06-10 19:44:44 +02:00
arr feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
cmd feat(hls): full-GPU scale_cuda for NVENC SDR downscales 2026-06-10 21:44:58 +02:00
config Merge branch 'main' into feat/agent-tls-direct 2026-06-10 19:44:44 +02:00
engine feat(hls): full-GPU scale_cuda for NVENC SDR downscales 2026-06-10 21:44:58 +02:00
funnel feat(subtitles): subtitle-fetch jobs vía sync + auto-fetch opcional en scan 2026-06-10 14:48:35 +02:00
library fix(daemon): reportar fallos de arranque de sesión a la web + scan en sesión única 2026-06-10 17:39:09 +02:00
mediaserver feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
parser feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
sentry refactor(sentry): decouple agent import via string-match, rename predicate 2026-05-27 17:03:26 +02:00
ui fix(ci): fix lint errors and pin CI to Go 1.25 2026-03-31 22:15:12 +02:00
upgrade test(upgrade): exercise the real signed checksum flow, not a bypass 2026-06-04 08:47:24 +02:00
usenet fix(agent): surface par2/install/NFS failures instead of degrading silently 2026-06-01 15:52:54 +02:00
vpn feat(subtitles): subtitle-fetch jobs vía sync + auto-fetch opcional en scan 2026-06-10 14:48:35 +02:00