From 40eb37a40dfa12498b21b8a53ed8740a3f820f8f Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Wed, 10 Dec 2014 23:42:50 +0100 Subject: [PATCH] better move whole line in scottie decoder --- app/src/main/rs/decoder.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/rs/decoder.rs b/app/src/main/rs/decoder.rs index 16b92f9..396ab48 100644 --- a/app/src/main/rs/decoder.rs +++ b/app/src/main/rs/decoder.rs @@ -150,9 +150,7 @@ static void scottie_decoder() uchar b = value_blur(i * (b_end-b_begin) / bitmap_width + b_begin); pixel_buffer[bitmap_width * vpos + i] = rgb(r, g, b); } - for (int i = g_begin; i < g_end; ++i) - value_buffer[i] = value_buffer[i + prev_hpos]; - for (int i = b_begin; i < b_end; ++i) + for (int i = 0; i < scanline_length; ++i) value_buffer[i] = value_buffer[i + prev_hpos]; prev_hpos = scanline_length; hpos = 0;