summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/EfbInterface.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-02-18 14:19:38 +0100
committerPierre Bourdon <delroth@gmail.com>2014-02-18 14:19:38 +0100
commita18e8249a4ef0656550461b95c573c86f19aaf66 (patch)
treefa7bf2e764585dd75106e5b66ed0c4e42ac93b46 /Source/Core/VideoBackends/Software/EfbInterface.cpp
parent73691a8587e5f09ef138384d2ff97e4059ba9380 (diff)
parent0d6ab2c65809054730d7301d60d517661f39602d (diff)
Merge pull request #79 from Tilka/nits
Silence some Windows compiler warnings
Diffstat (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/EfbInterface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp
index c5c7724462..a4b6a98993 100644
--- a/Source/Core/VideoBackends/Software/EfbInterface.cpp
+++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp
@@ -473,9 +473,9 @@ namespace EfbInterface
// GameCube/Wii uses the BT.601 standard algorithm for converting to YCbCr; see
// http://www.equasys.de/colorconversion.html#YCbCr-RGBColorFormatConversion
- out->Y = 0.257f * color[RED_C] + 0.504f * color[GRN_C] + 0.098f * color[BLU_C];
- out->U = -0.148f * color[RED_C] + -0.291f * color[GRN_C] + 0.439f * color[BLU_C];
- out->V = 0.439f * color[RED_C] + -0.368f * color[GRN_C] + -0.071f * color[BLU_C];
+ out->Y = (u8)( 0.257f * color[RED_C] + 0.504f * color[GRN_C] + 0.098f * color[BLU_C]);
+ out->U = (u8)(-0.148f * color[RED_C] + -0.291f * color[GRN_C] + 0.439f * color[BLU_C]);
+ out->V = (u8)( 0.439f * color[RED_C] + -0.368f * color[GRN_C] + -0.071f * color[BLU_C]);
}
u32 GetDepth(u16 x, u16 y)