ffmpeg/compat
nyanmisaka 69fc910777 avfilter/scale_cuda: fix color bleeding in lanczos scaling
Prior to this, the results were not saturated into the uchar/ushort range before
being written. The characteristics of the Lanczos filter exposed this issue.

In addition, the results were truncated rather than rounded, which resulted
in checkerboard artifacts in solid color areas and were noticeable when
using Lanczos with 8-bit input.

Example:
ffmpeg -init_hw_device cuda -f lavfi -i testsrc2=s=960x540,format=yuv420p \
-vf hwupload,scale_cuda=format=yuv420p:w=-2:h=720:interp_algo=lanczos \
-c:v h264_nvenc -qp:v 20 -t 1 <OUTPUT>

Fix #20784

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2026-04-04 11:31:16 +00:00
..
aix all: Make header guard names consistent 2016-01-31 15:44:11 -08:00
android fftools: Fix MediaCodec on Android15+ 2025-11-23 12:53:43 +00:00
atomics compat: drop gcc, suncc, and pthreads stdatomic emulation 2024-09-23 17:08:46 +02:00
cuda avfilter/scale_cuda: fix color bleeding in lanczos scaling 2026-04-04 11:31:16 +00:00
dispatch_semaphore Merge commit '6bb99757b7' 2016-05-08 23:02:33 +01:00
djgpp additional math.h functions for djgpp 2018-11-28 22:16:07 +11:00
float Merge remote-tracking branch 'qatar/master' 2014-03-10 12:05:02 +01:00
msvcrt fix broken links to msdn documentation 2021-05-13 09:13:03 +10:00
solaris all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
stdbit compat: Fix the fallback definition of stdc_trailing_zeros 2024-09-24 14:00:27 +03:00
windows compat: Fix .def file generation for ARM64EC builds on Windows 2025-12-19 10:01:16 +00:00
getopt.c compat/getopt: constify opts 2025-08-14 00:08:10 +00:00
os2threads.h compat/os2threads: define INCL_DOSERRORS 2020-02-15 18:25:51 +01:00
strtod.c compat/strtod: Add missing const qualifiers. 2017-05-04 23:17:20 +02:00
va_copy.h all: Add missing header guards 2016-01-28 19:49:48 -08:00
w32dlfcn.h avutil/common: Don't auto-include mem.h 2024-03-31 00:08:43 +01:00
w32pthreads.h ALL: move av_unused to conform with standard requirement 2025-09-26 16:15:46 +00:00