PR #24543 opened by Forgejo_Fairy URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24543 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24543.patch
Format-only CUDA conversion can leave the automatic `use_filters` setting unresolved, producing zero-valued image planes and green encoded output. Backport Zhao Zhili's c57660fb18f0 from #23739 to release/8.1, resolving the automatic setting to zero when generic filtering is unnecessary. Addresses #23737. Verified on an RTX 5090 with driver 595.84 and Clang 18.1.3 CUDA compilation: release/8.1 at 1005b294ffdf reproduces using a generated 320×240 HEVC test pattern and the reporter's complete encoding command. With this backport, the downloaded first converted frame matches the CUDA-decoded, software-converted reference byte-for-byte, and the 100-frame HEVC encode succeeds with correct nonuniform first-frame image data. `git diff --check` passes. From c573a95381b035868c4cc8ff0750638dd07746ab Mon Sep 17 00:00:00 2001 From: Zhao Zhili <[email protected]> Date: Wed, 8 Jul 2026 19:31:30 +0800 Subject: [PATCH] avfilter/vf_scale_cuda: fix non-scaling format conversion A format-only conversion leaves the auto use_filters value unresolved. Regression since 5d0748243f8. Fix issue #23737 Signed-off-by: Zhao Zhili <[email protected]> (cherry picked from commit c57660fb18f058e8ead224e840b242d9c68fd3c4) Assisted-by: Fairy --- libavfilter/vf_scale_cuda.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c index dd1f534e55..4acb4c91a8 100644 --- a/libavfilter/vf_scale_cuda.c +++ b/libavfilter/vf_scale_cuda.c @@ -422,6 +422,8 @@ static av_cold int init_processing_chain(AVFilterContext *ctx, int in_width, int s->use_filters = 0; } else if (s->use_filters < 0 && (out_width < in_width || out_height < in_height)) s->use_filters = 1; /* downscaling; needed for anti-aliasing */ + else if (s->use_filters < 0) + s->use_filters = 0; } outl->hw_frames_ctx = av_buffer_ref(s->frames_ctx); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
