off by one error

didn't always write the output
This commit is contained in:
John Cupitt 2016-03-19 10:37:02 +00:00
parent 05156edd15
commit 74984f1049
2 changed files with 3 additions and 3 deletions

View File

@ -48,8 +48,8 @@
*/
/* Trace all orc calls, handy for debugging.
#define DEBUG_TRACE
*/
#define DEBUG_TRACE
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@ -34,8 +34,8 @@
*/
/*
#define DEBUG
*/
#define DEBUG
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -229,7 +229,7 @@ vips_reducev_compile_section( VipsReducev *reducev, Pass *pass, gboolean first )
/* If this is the end of the mask, we write the 8-bit result to the
* image, otherwise write the 16-bit intermediate to our temp buffer.
*/
if( i == reducev->n_point ) {
if( i >= reducev->n_point - 1 ) {
ASM3( "shrsw", "sum", "sum", seven );
ASM3( "maxsw", "sum", zero, "sum" );
ASM2( "convwb", "d1", "sum" );