From 637a314f979f8aed4ec4a53075d9de7a93541014 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Wed, 27 Jun 2012 10:00:48 -0700 Subject: [PATCH] remove the now unused *KeepA variants Change-Id: I65217f3075e30bc9a7f38a49d09f01c9d7271d6a --- src/dsp/yuv.h | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/dsp/yuv.h b/src/dsp/yuv.h index 8f52acb2..cf9f4d76 100644 --- a/src/dsp/yuv.h +++ b/src/dsp/yuv.h @@ -48,33 +48,21 @@ static WEBP_INLINE void VP8YuvToRgb565(uint8_t y, uint8_t u, uint8_t v, (VP8kClip[y + b_off - YUV_RANGE_MIN] >> 3)); } -static WEBP_INLINE void VP8YuvToArgbKeepA(uint8_t y, uint8_t u, uint8_t v, - uint8_t* const argb) { - // Don't update Aplha (argb[0]) - VP8YuvToRgb(y, u, v, argb + 1); -} - static WEBP_INLINE void VP8YuvToArgb(uint8_t y, uint8_t u, uint8_t v, uint8_t* const argb) { argb[0] = 0xff; - VP8YuvToArgbKeepA(y, u, v, argb); -} - -static WEBP_INLINE void VP8YuvToRgba4444KeepA(uint8_t y, uint8_t u, uint8_t v, - uint8_t* const argb) { - const int r_off = VP8kVToR[v]; - const int g_off = (VP8kVToG[v] + VP8kUToG[u]) >> YUV_FIX; - const int b_off = VP8kUToB[u]; - // Don't update Aplha (last 4 bits of argb[1]) - argb[0] = ((VP8kClip4Bits[y + r_off - YUV_RANGE_MIN] << 4) | - VP8kClip4Bits[y + g_off - YUV_RANGE_MIN]); - argb[1] = (argb[1] & 0x0f) | (VP8kClip4Bits[y + b_off - YUV_RANGE_MIN] << 4); + VP8YuvToRgb(y, u, v, argb + 1); } static WEBP_INLINE void VP8YuvToRgba4444(uint8_t y, uint8_t u, uint8_t v, uint8_t* const argb) { - argb[1] = 0x0f; - VP8YuvToRgba4444KeepA(y, u, v, argb); + const int r_off = VP8kVToR[v]; + const int g_off = (VP8kVToG[v] + VP8kUToG[u]) >> YUV_FIX; + const int b_off = VP8kUToB[u]; + // Don't update alpha (last 4 bits of argb[1]) + argb[0] = ((VP8kClip4Bits[y + r_off - YUV_RANGE_MIN] << 4) | + VP8kClip4Bits[y + g_off - YUV_RANGE_MIN]); + argb[1] = 0x0f | (VP8kClip4Bits[y + b_off - YUV_RANGE_MIN] << 4); } static WEBP_INLINE void VP8YuvToBgr(uint8_t y, uint8_t u, uint8_t v,