diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2014-02-18 14:19:38 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2014-02-18 14:19:38 +0100 |
| commit | a18e8249a4ef0656550461b95c573c86f19aaf66 (patch) | |
| tree | fa7bf2e764585dd75106e5b66ed0c4e42ac93b46 /Source/Core/VideoBackends/Software/SWRenderer.cpp | |
| parent | 73691a8587e5f09ef138384d2ff97e4059ba9380 (diff) | |
| parent | 0d6ab2c65809054730d7301d60d517661f39602d (diff) | |
Merge pull request #79 from Tilka/nits
Silence some Windows compiler warnings
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWRenderer.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWRenderer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp index 783a8eee0a..7809c7a99c 100644 --- a/Source/Core/VideoBackends/Software/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp @@ -182,14 +182,14 @@ void SWRenderer::UpdateColorTexture(EfbInterface::yuv422_packed *xfb, u32 fbWidt // We do the inverse BT.601 conversion for YCbCr to RGB // http://www.equasys.de/colorconversion.html#YCbCr-RGBColorFormatConversion - TexturePointer[offset++] = min(255.0f, max(0.0f, 1.164f * Y1 + 1.596f * V)); - TexturePointer[offset++] = min(255.0f, max(0.0f, 1.164f * Y1 - 0.392f * U - 0.813f * V)); - TexturePointer[offset++] = min(255.0f, max(0.0f, 1.164f * Y1 + 2.017f * U )); + TexturePointer[offset++] = (u8)min(255.0f, max(0.0f, 1.164f * Y1 + 1.596f * V)); + TexturePointer[offset++] = (u8)min(255.0f, max(0.0f, 1.164f * Y1 - 0.392f * U - 0.813f * V)); + TexturePointer[offset++] = (u8)min(255.0f, max(0.0f, 1.164f * Y1 + 2.017f * U )); TexturePointer[offset++] = 255; - TexturePointer[offset++] = min(255.0f, max(0.0f, 1.164f * Y2 + 1.596f * V)); - TexturePointer[offset++] = min(255.0f, max(0.0f, 1.164f * Y2 - 0.392f * U - 0.813f * V)); - TexturePointer[offset++] = min(255.0f, max(0.0f, 1.164f * Y2 + 2.017f * U )); + TexturePointer[offset++] = (u8)min(255.0f, max(0.0f, 1.164f * Y2 + 1.596f * V)); + TexturePointer[offset++] = (u8)min(255.0f, max(0.0f, 1.164f * Y2 - 0.392f * U - 0.813f * V)); + TexturePointer[offset++] = (u8)min(255.0f, max(0.0f, 1.164f * Y2 + 2.017f * U )); TexturePointer[offset++] = 255; } xfb += fbWidth; |
