mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 17:39:08 +00:00
The previous chroma stride formula (width >> log2_chroma_w) is correct for planar yuv but wrong for semi-planar nv12/nv21, where the UV plane is interleaved at width bytes per row (width/2 UV pairs of 2 bytes each). Use av_image_get_linesize() so the test feeds a valid stride to libswscale regardless of input format; for the existing planar suites the value is unchanged. With the stride fixed, add nv12 and nv21 to check_yuv2rgb() so the upcoming NEON 16bpp paths get bench coverage. ff_get_unscaled_swscale does not wire a C yuv2rgb fast path for these inputs, so the suites report bench-only (no correctness reference); they still run clobber detection and cycle counts. Signed-off-by: DROOdotFOO <drew@axol.io>