summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-3.2.20/test/testyuv_cvt.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-08-30 16:53:58 -0700
committer3gg <3gg@shellblade.net>2025-08-30 16:53:58 -0700
commit6aaedb813fa11ba0679c3051bc2eb28646b9506c (patch)
tree34acbfc9840e02cb4753e6306ea7ce978bf8b58e /src/contrib/SDL-3.2.20/test/testyuv_cvt.h
parent8f228ade99dd3d4c8da9b78ade1815c9adf85c8f (diff)
Update to SDL3
Diffstat (limited to 'src/contrib/SDL-3.2.20/test/testyuv_cvt.h')
-rw-r--r--src/contrib/SDL-3.2.20/test/testyuv_cvt.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/contrib/SDL-3.2.20/test/testyuv_cvt.h b/src/contrib/SDL-3.2.20/test/testyuv_cvt.h
new file mode 100644
index 0000000..460026d
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/test/testyuv_cvt.h
@@ -0,0 +1,28 @@
1/*
2 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely.
11*/
12
13/* These functions are designed for testing correctness, not for speed */
14
15typedef enum
16{
17 YUV_CONVERSION_JPEG, /**< Full range JPEG */
18 YUV_CONVERSION_BT601, /**< BT.601 (the default) */
19 YUV_CONVERSION_BT709, /**< BT.709 */
20 YUV_CONVERSION_BT2020, /**< BT.2020 */
21 YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */
22} YUV_CONVERSION_MODE;
23
24extern void SetYUVConversionMode(YUV_CONVERSION_MODE mode);
25extern YUV_CONVERSION_MODE GetYUVConversionModeForResolution(int width, int height);
26extern SDL_Colorspace GetColorspaceForYUVConversionMode(YUV_CONVERSION_MODE mode);
27extern bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, YUV_CONVERSION_MODE mode, int monochrome, int luminance);
28extern int CalculateYUVPitch(Uint32 format, int width);