mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 01:21:06 +00:00
Remove the static supported_formats[] allowlist from hwcontext_cuda. cuda_frames_get_constraints() now iterates all registered pixel formats and includes every non-hwaccel, non-palette format. cuda_frames_init() validates with av_pix_fmt_desc_get() instead of checking against the allowlist. Palette formats have a special-cased use of plane[1] for the palette itself and it's not worth the hassle of supporting in an otherwise clean generic copy loop. Also add a roundtrip test that uploads a deterministic byte pattern to CUDA, downloads it back, and verifies the data match. This tests all non-hwaccel pixel formats. The test is gated on CONFIG_CUDA.