tests: build tests with C90 standard

C90 mode is disabled for:
- testautomation: use of isnan/isfinite
- testlock: use of kill
- testvulkan: use of c++ style strings in vulkan.h
This commit is contained in:
Anonymous Maarten
2023-05-25 01:15:12 +02:00
committed by Anonymous Maarten
parent 5b5b67df20
commit b4291412a4
8 changed files with 25 additions and 20 deletions

View File

@@ -27,12 +27,14 @@ static void RGBtoYUV(const Uint8 *rgb, int *yuv, SDL_YUV_CONVERSION_MODE mode, i
yuv[1] = (int)((rgb[2] - yuv[0]) * 0.565 + 128);
yuv[2] = (int)((rgb[0] - yuv[0]) * 0.713 + 128);
} else {
// 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 = 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));
/**
* 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 = 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) {