Atlas - testyuv_cvt.h
Home / ext / SDL / test Lines: 1 | Size: 1327 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/* 2 Copyright (C) 1997-2025 Sam Lantinga <[email protected]> 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 15#ifndef testyuv_cvt_h_ 16#define testyuv_cvt_h_ 17 18typedef enum 19{ 20 YUV_CONVERSION_JPEG, /**< Full range JPEG */ 21 YUV_CONVERSION_BT601, /**< BT.601 (the default) */ 22 YUV_CONVERSION_BT709, /**< BT.709 */ 23 YUV_CONVERSION_BT2020, /**< BT.2020 */ 24 YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */ 25} YUV_CONVERSION_MODE; 26 27extern void SetYUVConversionMode(YUV_CONVERSION_MODE mode); 28extern YUV_CONVERSION_MODE GetYUVConversionModeForResolution(int width, int height); 29extern SDL_Colorspace GetColorspaceForYUVConversionMode(YUV_CONVERSION_MODE mode); 30extern bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, YUV_CONVERSION_MODE mode, int monochrome, int luminance); 31extern int CalculateYUVPitch(Uint32 format, int width); 32 33#endif /* testyuv_cvt_h_ */ 34[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.