From 46dc8f84fb2fbc2c95b4cd8aa73daf1c9297ac39 Mon Sep 17 00:00:00 2001 From: Jorge Rodriguez Date: Wed, 10 Sep 2014 20:12:38 -0700 Subject: [PATCH] Use vertical pixel width for the ring buffer. --- stb_image_resize.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_image_resize.h b/stb_image_resize.h index 35517c3..f454286 100644 --- a/stb_image_resize.h +++ b/stb_image_resize.h @@ -1561,7 +1561,7 @@ static void stbir__buffer_loop_upsample(stbir__info* stbir_info) else { stbir_info->ring_buffer_first_scanline++; - stbir_info->ring_buffer_begin_index = (stbir_info->ring_buffer_begin_index + 1) % stbir__get_filter_pixel_width_horizontal(stbir_info); + stbir_info->ring_buffer_begin_index = (stbir_info->ring_buffer_begin_index + 1) % stbir__get_filter_pixel_width_vertical(stbir_info); } } }