From 5a079a2d114f96d4847d1ee305d5b7c16eeec50e Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 27 Dec 2025 12:03:39 -0800 Subject: Initial commit --- contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h (limited to 'contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h') diff --git a/contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h b/contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h new file mode 100644 index 0000000..c359316 --- /dev/null +++ b/contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h @@ -0,0 +1,33 @@ +#ifndef YUV_RGB_H_ +#define YUV_RGB_H_ + +// Copyright 2016 Adrien Descamps +// Distributed under BSD 3-Clause License + +// Provide optimized functions to convert images from 8bits yuv420 to rgb24 format + +// There are a few slightly different variations of the YCbCr color space with different parameters that +// change the conversion matrix. +// The three most common YCbCr color space, defined by BT.601, BT.709 and JPEG standard are implemented here. +// See the respective standards for details +// The matrix values used are derived from http://www.equasys.de/colorconversion.html + +// YUV420 is stored as three separate channels, with U and V (Cb and Cr) subsampled by a 2 factor +// For conversion from yuv to rgb, no interpolation is done, and the same UV value are used for 4 rgb pixels. This +// is suboptimal for image quality, but by far the fastest method. + +// For all methods, width and height should be even, if not, the last row/column of the result image won't be affected. +// For sse methods, if the width if not divisable by 32, the last (width%32) pixels of each line won't be affected. + +/*#include */ + +// yuv to rgb, standard c implementation +#include "yuv_rgb_std.h" + +// yuv to rgb, sse2 implementation +#include "yuv_rgb_sse.h" + +// yuv to rgb, lsx implementation +#include "yuv_rgb_lsx.h" + +#endif /* YUV_RGB_H_ */ -- cgit v1.2.3