early-access version 2281
This commit is contained in:
6
externals/SDL/test/testyuv_cvt.c
vendored
6
externals/SDL/test/testyuv_cvt.c
vendored
@@ -31,9 +31,9 @@ static void RGBtoYUV(Uint8 * rgb, int *yuv, SDL_YUV_CONVERSION_MODE mode, int mo
|
||||
// This formula is from Microsoft's documentation:
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/dd206750(v=vs.85).aspx
|
||||
// L = Kr * R + Kb * B + (1 - Kr - Kb) * G
|
||||
// Y = floor(2^(M-8) * (219*(L-Z)/S + 16) + 0.5);
|
||||
// U = clip3(0, (2^M)-1, floor(2^(M-8) * (112*(B-L) / ((1-Kb)*S) + 128) + 0.5));
|
||||
// V = clip3(0, (2^M)-1, floor(2^(M-8) * (112*(R-L) / ((1-Kr)*S) + 128) + 0.5));
|
||||
// Y = SDL_floor(2^(M-8) * (219*(L-Z)/S + 16) + 0.5);
|
||||
// U = clip3(0, (2^M)-1, SDL_floor(2^(M-8) * (112*(B-L) / ((1-Kb)*S) + 128) + 0.5));
|
||||
// V = clip3(0, (2^M)-1, SDL_floor(2^(M-8) * (112*(R-L) / ((1-Kr)*S) + 128) + 0.5));
|
||||
float S, Z, R, G, B, L, Kr, Kb, Y, U, V;
|
||||
|
||||
if (mode == SDL_YUV_CONVERSION_BT709) {
|
||||
|
Reference in New Issue
Block a user