summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-24 23:12:26 +0200
committerwm4 <wm4@nowhere>2012-10-24 23:12:26 +0200
commitf50d0b16e097c10009adedcedfd3eef61e85bc04 (patch)
treea7dfba0d224cbebdb5e43a4a4bea94eef5ec2a4e /sub
parent0e81d62c53a205ce5a4a5b201c283a1f9aba7316 (diff)
downloadmpv-f50d0b16e097c10009adedcedfd3eef61e85bc04.tar.bz2
mpv-f50d0b16e097c10009adedcedfd3eef61e85bc04.tar.xz
draw_bmp: remove CONDITIONAL2 code
This was sometimes slower, sometimes slightly faster. Remove it.
Diffstat (limited to 'sub')
-rw-r--r--sub/draw_bmp.c25
1 files changed, 0 insertions, 25 deletions
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,
@@ -76,12 +75,6 @@ static void blend_const16_alpha(uint8_t *dst,
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
uint16_t outp =
@@ -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;
@@ -150,12 +137,6 @@ static void blend_const8_alpha(uint8_t *dst,
if (!srcap)
continue;
#endif
-#ifdef CONDITIONAL2
- if (srcap == 255 && srcamul == 255) {
- dstr[j] = srcp;
- continue;
- }
-#endif
uint8_t dstp = dstr[j];
#ifdef ACCURATE
srcap *= srcamul; // now 0..65025
@@ -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 =