Change #286511
| Category | ffmpeg |
| Changed by | Timo Rothenpieler <timo@rothenpieler.org> |
| Changed at | Fri 16 Oct 2026 15:13:51 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | 447b72d90f2c0738c973e33532cfd325e2f3c9a5 |
Comments
avfilter/vf_scale_cuda: support resizing during YUV<->RGB conversion Resizing is done on the RGB side: YUV to RGB conversion converts at the visible input size before scaling, RGB to YUV conversion converts after scaling at the output size. Every scaling pass then works on a single packed plane and reuses the generic RGB kernels, and the conversion kernels are reused with a float RGB side. The RGB intermediates hold normalized floats, so filter overshoot and out of gamut colors are not clipped before the scaler rounds and clamps once. As conversion and filtering are linear, the result matches scaling on the YUV side, apart from rounding and the chroma upsampling of the conversion kernels. Resizing during conversion always uses the generic filters with the selected interp_algo, with nearest using point sampling weights. Conversion without resizing keeps using the direct conversion kernels. Assisted-By: Claude Opus 5.5
Changed files
- doc/filters.texi
- libavfilter/vf_scale_cuda.c
- libavfilter/vf_scale_cuda.cu
- tests/fate/filter-video.mak
- tests/ref/fate/filter-scale_cuda-resize-bgra-nv12-down
- tests/ref/fate/filter-scale_cuda-resize-bgra-p010-up
- tests/ref/fate/filter-scale_cuda-resize-bgra-yuv444p-h
- tests/ref/fate/filter-scale_cuda-resize-crop-nv12-bgra
- tests/ref/fate/filter-scale_cuda-resize-nv12-bgra-up
- tests/ref/fate/filter-scale_cuda-resize-p010-bgra-down
- tests/ref/fate/filter-scale_cuda-resize-step-p010
- tests/ref/fate/filter-scale_cuda-resize-yuv420p-rgba-w