im_conv() bug fixed
there was a typo in overflow estimation which could cause vips to use the vector path when it should not, resulting in errors
This commit is contained in:
parent
e92f5ff353
commit
03d54dd099
@ -55,6 +55,7 @@
|
|||||||
- im_bufjpeg2vips() has a "header_only" parameter
|
- im_bufjpeg2vips() has a "header_only" parameter
|
||||||
- added vips_image_get_data()
|
- added vips_image_get_data()
|
||||||
- updated German translation (thanks Chris)
|
- updated German translation (thanks Chris)
|
||||||
|
- fixed typo in im_conv() overflow estimation which could cause errors
|
||||||
|
|
||||||
30/11/10 started 7.24.0
|
30/11/10 started 7.24.0
|
||||||
- bump for new stable
|
- bump for new stable
|
||||||
|
@ -63,6 +63,8 @@
|
|||||||
* keeping two versions
|
* keeping two versions
|
||||||
* 8/11/10
|
* 8/11/10
|
||||||
* - add array tiling
|
* - add array tiling
|
||||||
|
* 9/5/11
|
||||||
|
* - argh typo in overflow estimation could cause errors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -110,6 +112,9 @@
|
|||||||
|
|
||||||
- make up a signed 8-bit code path?
|
- make up a signed 8-bit code path?
|
||||||
|
|
||||||
|
- don't use divluw, it's insanely slow, instead scale coefficients so
|
||||||
|
that we can just do >>8 at the end
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
@ -355,10 +360,8 @@ conv_compile_convolution_u8s16( Conv *conv )
|
|||||||
for( i = 0; i < n_mask; i++ ) {
|
for( i = 0; i < n_mask; i++ ) {
|
||||||
int v = 255 * mask->coeff[i];
|
int v = 255 * mask->coeff[i];
|
||||||
|
|
||||||
if( min + v < min )
|
min = IM_MIN( min, min + v );
|
||||||
min += v;
|
max = IM_MAX( max, max + v );
|
||||||
else if( min + v > max )
|
|
||||||
max += v;
|
|
||||||
|
|
||||||
if( max > SHRT_MAX )
|
if( max > SHRT_MAX )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
@ -1008,6 +1011,11 @@ im_conv_raw( IMAGE *in, IMAGE *out, INTMASK *mask )
|
|||||||
Conv *conv;
|
Conv *conv;
|
||||||
im_generate_fn generate;
|
im_generate_fn generate;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf( "im_conv_raw: starting with matrix:\n" );
|
||||||
|
im_print_imask( mask );
|
||||||
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
/* Check parameters.
|
/* Check parameters.
|
||||||
*/
|
*/
|
||||||
if( im_piocheck( in, out ) ||
|
if( im_piocheck( in, out ) ||
|
||||||
|
@ -43,8 +43,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define DEBUG
|
|
||||||
*/
|
*/
|
||||||
|
#define DEBUG
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@ -312,7 +312,7 @@ vips_vector_print( VipsVector *vector )
|
|||||||
if( vector->compiled )
|
if( vector->compiled )
|
||||||
printf( "successfully compiled\n" );
|
printf( "successfully compiled\n" );
|
||||||
else
|
else
|
||||||
printf( "not compiled successfully\n" );
|
printf( "not compiled\n" );
|
||||||
printf( " n_scanline = %d\n", vector->n_scanline );
|
printf( " n_scanline = %d\n", vector->n_scanline );
|
||||||
for( i = 0; i < vector->n_scanline; i++ )
|
for( i = 0; i < vector->n_scanline; i++ )
|
||||||
printf( " var %d = line %d\n",
|
printf( " var %d = line %d\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user