mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 18:35:41 +01:00 
			
		
		
		
	cosmetic fixes after Idaba281a
Change-Id: I275a3dee5696fe1a3e2db0976f8241f2044be512
This commit is contained in:
		| @@ -408,7 +408,7 @@ static int ExportAlpha(WebPDecParams* const p, int y_pos) { | |||||||
|  |  | ||||||
| static int ExportAlphaRGBA4444(WebPDecParams* const p, int y_pos) { | static int ExportAlphaRGBA4444(WebPDecParams* const p, int y_pos) { | ||||||
|   const WebPRGBABuffer* const buf = &p->output->u.RGBA; |   const WebPRGBABuffer* const buf = &p->output->u.RGBA; | ||||||
|   uint8_t* base_rgba = buf->rgba + (p->last_y + y_pos) * buf->stride; |   uint8_t* const base_rgba = buf->rgba + (p->last_y + y_pos) * buf->stride; | ||||||
|   uint8_t* alpha_dst = base_rgba + 1; |   uint8_t* alpha_dst = base_rgba + 1; | ||||||
|   int num_lines_out = 0; |   int num_lines_out = 0; | ||||||
|   const WEBP_CSP_MODE colorspace = p->output->colorspace; |   const WEBP_CSP_MODE colorspace = p->output->colorspace; | ||||||
|   | |||||||
| @@ -206,11 +206,11 @@ const WebPYUV444Converter WebPYUV444Converters[MODE_LAST] = { | |||||||
| #define PREMULTIPLY(x, m) (((x) * (m) + (1UL << 23)) >> 24) | #define PREMULTIPLY(x, m) (((x) * (m) + (1UL << 23)) >> 24) | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| static void ApplyAlphaMultiply(uint8_t* rgba, int alpha_1rst, | static void ApplyAlphaMultiply(uint8_t* rgba, int alpha_first, | ||||||
|                                int w, int h, int stride) { |                                int w, int h, int stride) { | ||||||
|   while (h-- > 0) { |   while (h-- > 0) { | ||||||
|     uint8_t* const rgb = rgba + (alpha_1rst ? 1 : 0); |     uint8_t* const rgb = rgba + (alpha_first ? 1 : 0); | ||||||
|     const uint8_t* const alpha = rgba + (alpha_1rst ? 0 : 3); |     const uint8_t* const alpha = rgba + (alpha_first ? 0 : 3); | ||||||
|     int i; |     int i; | ||||||
|     for (i = 0; i < w; ++i) { |     for (i = 0; i < w; ++i) { | ||||||
|       const uint32_t a = alpha[4 * i]; |       const uint32_t a = alpha[4 * i]; | ||||||
| @@ -232,8 +232,13 @@ static void ApplyAlphaMultiply(uint8_t* rgba, int alpha_1rst, | |||||||
| #define MULTIPLIER(a)  ((a) * 0x11) | #define MULTIPLIER(a)  ((a) * 0x11) | ||||||
| #define PREMULTIPLY(x, m) (((x) * (m)) >> 12) | #define PREMULTIPLY(x, m) (((x) * (m)) >> 12) | ||||||
|  |  | ||||||
| static WEBP_INLINE uint8_t dither_hi(uint8_t x) { return (x & 0xf0) | (x >> 4); } | static WEBP_INLINE uint8_t dither_hi(uint8_t x) { | ||||||
| static WEBP_INLINE uint8_t dither_lo(uint8_t x) { return (x & 0x0f) | (x << 4); } |   return (x & 0xf0) | (x >> 4); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | static WEBP_INLINE uint8_t dither_lo(uint8_t x) { | ||||||
|  |   return (x & 0x0f) | (x << 4); | ||||||
|  | } | ||||||
|  |  | ||||||
| static void ApplyAlphaMultiply4444(uint8_t* rgba4444, | static void ApplyAlphaMultiply4444(uint8_t* rgba4444, | ||||||
|                                    int w, int h, int stride) { |                                    int w, int h, int stride) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user