added explicit interpolate_class->window_offset values to every resampler
This commit is contained in:
parent
7de848e644
commit
bc1d19b7ed
@ -434,6 +434,7 @@ vips_interpolate_bicubic_class_init( VipsInterpolateBicubicClass *iclass )
|
|||||||
|
|
||||||
interpolate_class->interpolate = vips_interpolate_bicubic_interpolate;
|
interpolate_class->interpolate = vips_interpolate_bicubic_interpolate;
|
||||||
interpolate_class->window_size = 4;
|
interpolate_class->window_size = 4;
|
||||||
|
interpolate_class->window_offset = 1;
|
||||||
|
|
||||||
/* Build the tables of pre-computed coefficients.
|
/* Build the tables of pre-computed coefficients.
|
||||||
*/
|
*/
|
||||||
|
@ -796,6 +796,7 @@ vips_interpolate_lbb_class_init( VipsInterpolateLbbClass *klass )
|
|||||||
|
|
||||||
interpolate_class->interpolate = vips_interpolate_lbb_interpolate;
|
interpolate_class->interpolate = vips_interpolate_lbb_interpolate;
|
||||||
interpolate_class->window_size = 4;
|
interpolate_class->window_size = 4;
|
||||||
|
interpolate_class->window_offset = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -291,8 +291,8 @@ nohalo1( const double uno_two,
|
|||||||
* = qua_two = qua_thr
|
* = qua_two = qua_thr
|
||||||
*
|
*
|
||||||
* Here, ix is the floor of the requested left-to-right location, iy
|
* Here, ix is the floor of the requested left-to-right location, iy
|
||||||
* is the floor of the requested up-to-down location.
|
* is the floor of the requested up-to-down location.
|
||||||
*
|
*
|
||||||
* Pointer arithmetic is used to implicitly reflect the input
|
* Pointer arithmetic is used to implicitly reflect the input
|
||||||
* stencil so that the requested pixel location is closer to
|
* stencil so that the requested pixel location is closer to
|
||||||
* dos_two, The above consequently corresponds to the case in which
|
* dos_two, The above consequently corresponds to the case in which
|
||||||
@ -591,7 +591,7 @@ vips_interpolate_nohalo1_interpolate( VipsInterpolate* restrict interpolate,
|
|||||||
/*
|
/*
|
||||||
* Double bands for complex images:
|
* Double bands for complex images:
|
||||||
*/
|
*/
|
||||||
const int bands = vips_bandfmt_iscomplex( in->im->BandFmt ) ?
|
const int bands = vips_bandfmt_iscomplex( in->im->BandFmt ) ?
|
||||||
2 * actual_bands : actual_bands;
|
2 * actual_bands : actual_bands;
|
||||||
|
|
||||||
#define CALL( T, inter ) \
|
#define CALL( T, inter ) \
|
||||||
@ -610,35 +610,35 @@ vips_interpolate_nohalo1_interpolate( VipsInterpolate* restrict interpolate,
|
|||||||
case IM_BANDFMT_CHAR:
|
case IM_BANDFMT_CHAR:
|
||||||
CALL( signed char, withsign );
|
CALL( signed char, withsign );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IM_BANDFMT_USHORT:
|
case IM_BANDFMT_USHORT:
|
||||||
CALL( unsigned short, nosign );
|
CALL( unsigned short, nosign );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IM_BANDFMT_SHORT:
|
case IM_BANDFMT_SHORT:
|
||||||
CALL( signed short, withsign );
|
CALL( signed short, withsign );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IM_BANDFMT_UINT:
|
case IM_BANDFMT_UINT:
|
||||||
CALL( unsigned int, nosign );
|
CALL( unsigned int, nosign );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IM_BANDFMT_INT:
|
case IM_BANDFMT_INT:
|
||||||
CALL( signed int, withsign );
|
CALL( signed int, withsign );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Complex images handled by doubling of bands, see above.
|
/* Complex images handled by doubling of bands, see above.
|
||||||
*/
|
*/
|
||||||
case IM_BANDFMT_FLOAT:
|
case IM_BANDFMT_FLOAT:
|
||||||
case IM_BANDFMT_COMPLEX:
|
case IM_BANDFMT_COMPLEX:
|
||||||
CALL( float, fptypes );
|
CALL( float, fptypes );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IM_BANDFMT_DOUBLE:
|
case IM_BANDFMT_DOUBLE:
|
||||||
case IM_BANDFMT_DPCOMPLEX:
|
case IM_BANDFMT_DPCOMPLEX:
|
||||||
CALL( double, fptypes );
|
CALL( double, fptypes );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
g_assert( 0 );
|
g_assert( 0 );
|
||||||
break;
|
break;
|
||||||
@ -657,6 +657,7 @@ vips_interpolate_nohalo1_class_init( VipsInterpolateNohalo1Class *klass )
|
|||||||
|
|
||||||
interpolate_class->interpolate = vips_interpolate_nohalo1_interpolate;
|
interpolate_class->interpolate = vips_interpolate_nohalo1_interpolate;
|
||||||
interpolate_class->window_size = 4;
|
interpolate_class->window_size = 4;
|
||||||
|
interpolate_class->window_offset = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1083,6 +1083,7 @@ vips_interpolate_nohalo2_class_init( VipsInterpolateNohalo2Class *klass )
|
|||||||
|
|
||||||
interpolate_class->interpolate = vips_interpolate_nohalo2_interpolate;
|
interpolate_class->interpolate = vips_interpolate_nohalo2_interpolate;
|
||||||
interpolate_class->window_size = 6;
|
interpolate_class->window_size = 6;
|
||||||
|
interpolate_class->window_offset = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1096,6 +1096,7 @@ vips_interpolate_snohalo1_class_init( VipsInterpolateSnohalo1Class *klass )
|
|||||||
interpolate_class->interpolate =
|
interpolate_class->interpolate =
|
||||||
vips_interpolate_snohalo1_interpolate;
|
vips_interpolate_snohalo1_interpolate;
|
||||||
interpolate_class->window_size = 7;
|
interpolate_class->window_size = 7;
|
||||||
|
interpolate_class->window_size = 3;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create properties:
|
* Create properties:
|
||||||
|
Loading…
Reference in New Issue
Block a user