improve arg order

more consistent
This commit is contained in:
John Cupitt 2016-04-11 13:23:25 +01:00
parent 269cbb8641
commit 65b9ced6e9
3 changed files with 6 additions and 7 deletions

View File

@ -457,8 +457,8 @@ bicubic_notab( void *pout, const VipsPel *pin,
double cx[4]; double cx[4];
double cy[4]; double cy[4];
calculate_coefficients_catmull( x, cx ); calculate_coefficients_catmull( cx, x );
calculate_coefficients_catmull( y, cy ); calculate_coefficients_catmull( cy, y );
for( int z = 0; z < bands; z++ ) { for( int z = 0; z < bands; z++ ) {
const T uno_one = in[0]; const T uno_one = in[0];
@ -644,9 +644,8 @@ vips_interpolate_bicubic_class_init( VipsInterpolateBicubicClass *iclass )
/* Build the tables of pre-computed coefficients. /* Build the tables of pre-computed coefficients.
*/ */
for( int x = 0; x < VIPS_TRANSFORM_SCALE + 1; x++ ) { for( int x = 0; x < VIPS_TRANSFORM_SCALE + 1; x++ ) {
calculate_coefficients_catmull( calculate_coefficients_catmull( vips_bicubic_matrixf[x],
(float) x / VIPS_TRANSFORM_SCALE, (float) x / VIPS_TRANSFORM_SCALE );
vips_bicubic_matrixf[x] );
for( int i = 0; i < 4; i++ ) for( int i = 0; i < 4; i++ )
vips_bicubic_matrixi[x][i] = vips_bicubic_matrixi[x][i] =

View File

@ -139,7 +139,7 @@ vips_reduce_make_mask( double *c, VipsKernel kernel, double shrink, double x )
break; break;
case VIPS_KERNEL_CUBIC: case VIPS_KERNEL_CUBIC:
calculate_coefficients_catmull( x, c ); calculate_coefficients_catmull( c, x );
break; break;
case VIPS_KERNEL_LANCZOS2: case VIPS_KERNEL_LANCZOS2:

View File

@ -287,7 +287,7 @@ bicubic_float(
* from the interpolator as well as from the table builder. * from the interpolator as well as from the table builder.
*/ */
static void inline static void inline
calculate_coefficients_catmull( const double x, double c[4] ) calculate_coefficients_catmull( double c[4], const double x )
{ {
/* Nicolas believes that the following is an hitherto unknown /* Nicolas believes that the following is an hitherto unknown
* hyper-efficient method of computing Catmull-Rom coefficients. It * hyper-efficient method of computing Catmull-Rom coefficients. It