improve arg order
more consistent
This commit is contained in:
parent
269cbb8641
commit
65b9ced6e9
@ -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] =
|
||||||
|
@ -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:
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user