summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-12-27 12:03:39 -0800
committer3gg <3gg@shellblade.net>2025-12-27 12:03:39 -0800
commit5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch)
tree8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h')
-rw-r--r--contrib/SDL-3.2.8/src/video/yuv2rgb/yuv_rgb.h33
1 files changed, 33 insertions, 0 deletions
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 @@
1#ifndef YUV_RGB_H_
2#define YUV_RGB_H_
3
4// Copyright 2016 Adrien Descamps
5// Distributed under BSD 3-Clause License
6
7// Provide optimized functions to convert images from 8bits yuv420 to rgb24 format
8
9// There are a few slightly different variations of the YCbCr color space with different parameters that
10// change the conversion matrix.
11// The three most common YCbCr color space, defined by BT.601, BT.709 and JPEG standard are implemented here.
12// See the respective standards for details
13// The matrix values used are derived from http://www.equasys.de/colorconversion.html
14
15// YUV420 is stored as three separate channels, with U and V (Cb and Cr) subsampled by a 2 factor
16// For conversion from yuv to rgb, no interpolation is done, and the same UV value are used for 4 rgb pixels. This
17// is suboptimal for image quality, but by far the fastest method.
18
19// For all methods, width and height should be even, if not, the last row/column of the result image won't be affected.
20// For sse methods, if the width if not divisable by 32, the last (width%32) pixels of each line won't be affected.
21
22/*#include <stdint.h>*/
23
24// yuv to rgb, standard c implementation
25#include "yuv_rgb_std.h"
26
27// yuv to rgb, sse2 implementation
28#include "yuv_rgb_sse.h"
29
30// yuv to rgb, lsx implementation
31#include "yuv_rgb_lsx.h"
32
33#endif /* YUV_RGB_H_ */