From f50d0b16e097c10009adedcedfd3eef61e85bc04 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 24 Oct 2012 23:12:26 +0200 Subject: draw_bmp: remove CONDITIONAL2 code This was sometimes slower, sometimes slightly faster. Remove it. --- sub/draw_bmp.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'sub') diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c index d58033fceb..f191389785 100644 --- a/sub/draw_bmp.c +++ b/sub/draw_bmp.c @@ -51,7 +51,6 @@ struct mp_draw_sub_cache #define ACCURATE #define CONDITIONAL -#define CONDITIONAL2 static void blend_const16_alpha(uint8_t *dst, ssize_t dstRowStride, @@ -75,12 +74,6 @@ static void blend_const16_alpha(uint8_t *dst, #ifdef CONDITIONAL if (!srcap) continue; -#endif -#ifdef CONDITIONAL2 - if (srcap == 255 && srcamul == 255) { - dstr[j] = srcp; - continue; - } #endif uint16_t dstp = dstr[j]; srcap *= srcamul; // now 0..65025 @@ -113,12 +106,6 @@ static void blend_src16_alpha(uint8_t *dst, continue; #endif uint16_t srcp = srcr[j]; -#ifdef CONDITIONAL2 - if (srcap == 255) { - dstr[j] = srcp; - continue; - } -#endif uint16_t dstp = dstr[j]; uint16_t outp = (srcp * srcap + dstp * (255 - srcap) + 127) / 255; @@ -149,12 +136,6 @@ static void blend_const8_alpha(uint8_t *dst, #ifdef CONDITIONAL if (!srcap) continue; -#endif -#ifdef CONDITIONAL2 - if (srcap == 255 && srcamul == 255) { - dstr[j] = srcp; - continue; - } #endif uint8_t dstp = dstr[j]; #ifdef ACCURATE @@ -194,12 +175,6 @@ static void blend_src8_alpha(uint8_t *dst, continue; #endif uint8_t srcp = srcr[j]; -#ifdef CONDITIONAL2 - if (srcap == 255) { - dstr[j] = srcp; - continue; - } -#endif uint8_t dstp = dstr[j]; #ifdef ACCURATE uint8_t outp = -- cgit v1.2.3