diff options
author | wm4 <wm4@nowhere> | 2015-12-24 17:08:02 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-24 17:08:02 +0100 |
commit | a042dcc700e93d20c78dc5849c36c23688d6fdef (patch) | |
tree | 72994dc289edbf776861b55019b6a52d44e0d5e1 | |
parent | 3973a953df7516afbb21f4b95dde2161a67e5d84 (diff) |
sub: remove "inaccurate" code path
The "accurate" one always has been enabled, and I can't find much
evidence that the "inaccurate" one is much faster on my particular
machine anyway.
-rw-r--r-- | sub/draw_bmp.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c index 8ea426a768..b4551d5247 100644 --- a/sub/draw_bmp.c +++ b/sub/draw_bmp.c @@ -64,7 +64,6 @@ static bool get_sub_area(struct mp_rect bb, struct mp_image *temp, struct sub_bitmap *sb, struct mp_image *out_area, int *out_src_x, int *out_src_y); -#define ACCURATE #define CONDITIONAL static void blend_const16_alpha(void *dst, int dst_stride, uint16_t srcp, @@ -103,13 +102,8 @@ static void blend_const8_alpha(void *dst, int dst_stride, uint16_t srcp, if (!srcap) continue; #endif -#ifdef ACCURATE srcap *= srcamul; // now 0..65025 dst_r[x] = (srcp * srcap + dst_r[x] * (65025 - srcap) + 32512) / 65025; -#else - srcap = (srcap * srcamul + 255) >> 8; - dst_r[x] = (srcp * srcap + dst_r[x] * (255 - srcap) + 255) >> 8; -#endif } } } @@ -161,11 +155,7 @@ static void blend_src8_alpha(void *dst, int dst_stride, void *src, if (!srcap) continue; #endif -#ifdef ACCURATE dst_r[x] = (src_r[x] * srcap + dst_r[x] * (255 - srcap) + 127) / 255; -#else - dst_r[x] = (src_r[x] * srcap + dst_r[x] * (255 - srcap) + 255) >> 8; -#endif } } } |