diff options
Diffstat (limited to 'graphics/dither.h')
-rw-r--r-- | graphics/dither.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/graphics/dither.h b/graphics/dither.h index e6d606cdd4..18f98ce4e0 100644 --- a/graphics/dither.h +++ b/graphics/dither.h @@ -43,19 +43,6 @@ public: kPaletteYUV //!< Palette in YUV colorspace }; - /** Converting a color from YUV to RGB colorspace. */ - inline static void YUV2RGB(byte y, byte u, byte v, byte &r, byte &g, byte &b) { - r = CLIP<int>(y + ((1357 * (v - 128)) >> 10), 0, 255); - g = CLIP<int>(y - (( 691 * (v - 128)) >> 10) - ((333 * (u - 128)) >> 10), 0, 255); - b = CLIP<int>(y + ((1715 * (u - 128)) >> 10), 0, 255); - } - /** Converting a color from RGB to YUV colorspace. */ - inline static void RGB2YUV(byte r, byte g, byte b, byte &y, byte &u, byte &v) { - y = CLIP<int>( ((r * 306) >> 10) + ((g * 601) >> 10) + ((b * 117) >> 10) , 0, 255); - u = CLIP<int>(-((r * 172) >> 10) - ((g * 340) >> 10) + ((b * 512) >> 10) + 128, 0, 255); - v = CLIP<int>( ((r * 512) >> 10) - ((g * 429) >> 10) - ((b * 83) >> 10) + 128, 0, 255); - } - /** Create a lookup table of a given depth and palette format. * * @param depth How many bits of each color component to consider. |