stuff
This commit is contained in:
parent
d87cf4c6e7
commit
1ed3ca8197
|
@ -299,7 +299,7 @@ typedef struct _VipsInterpolateNohaloClass {
|
||||||
* bilinear interpolation of them.
|
* bilinear interpolation of them.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void inline
|
||||||
nohalo_sharp_level_1(
|
nohalo_sharp_level_1(
|
||||||
const double dos_thr,
|
const double dos_thr,
|
||||||
const double dos_fou,
|
const double dos_fou,
|
||||||
|
@ -862,9 +862,6 @@ vips_interpolate_nohalo_interpolate( VipsInterpolate *interpolate,
|
||||||
const int ix = FAST_PSEUDO_FLOOR (absolute_x + 0.5);
|
const int ix = FAST_PSEUDO_FLOOR (absolute_x + 0.5);
|
||||||
const int iy = FAST_PSEUDO_FLOOR (absolute_y + 0.5);
|
const int iy = FAST_PSEUDO_FLOOR (absolute_y + 0.5);
|
||||||
|
|
||||||
/* FIXME ... this ^^^ will go outsie the 5x5 stencil, argh
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* x is the x-coordinate of the sampling point relative to the
|
* x is the x-coordinate of the sampling point relative to the
|
||||||
* position of the tre_thr pixel center. Similarly for y. Range of
|
* position of the tre_thr pixel center. Similarly for y. Range of
|
||||||
|
@ -1096,10 +1093,7 @@ vips_interpolate_nohalo_class_init( VipsInterpolateNohaloClass *klass )
|
||||||
|
|
||||||
interpolate_class->interpolate =
|
interpolate_class->interpolate =
|
||||||
vips_interpolate_nohalo_interpolate;
|
vips_interpolate_nohalo_interpolate;
|
||||||
|
interpolate_class->window_size = 5;
|
||||||
/* Should be 5, but round-to-nearest FIXME above makes this 7.
|
|
||||||
*/
|
|
||||||
interpolate_class->window_size = 7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -79,10 +79,10 @@ bilinear_signed(
|
||||||
const double trequa_thrfou )
|
const double trequa_thrfou )
|
||||||
{
|
{
|
||||||
const double val =
|
const double val =
|
||||||
(w_times_z / 16) * tre_thr +
|
w_times_z * tre_thr +
|
||||||
(x_times_z / 16) * tre_thrfou +
|
x_times_z * tre_thrfou +
|
||||||
(w_times_y / 16) * trequa_thr +
|
w_times_y * trequa_thr +
|
||||||
(x_times_y / 16) * trequa_thrfou;
|
x_times_y * trequa_thrfou;
|
||||||
|
|
||||||
const int sign_of_val = 2 * ( val >= 0. ) - 1;
|
const int sign_of_val = 2 * ( val >= 0. ) - 1;
|
||||||
|
|
||||||
|
@ -107,10 +107,10 @@ bilinear_unsigned(
|
||||||
const double trequa_thrfou )
|
const double trequa_thrfou )
|
||||||
{
|
{
|
||||||
const T newval =
|
const T newval =
|
||||||
(w_times_z / 16) * tre_thr +
|
w_times_z * tre_thr +
|
||||||
(x_times_z / 16) * tre_thrfou +
|
x_times_z * tre_thrfou +
|
||||||
(w_times_y / 16) * trequa_thr +
|
w_times_y * trequa_thr +
|
||||||
(x_times_y / 16) * trequa_thrfou +
|
x_times_y * trequa_thrfou +
|
||||||
0.5;
|
0.5;
|
||||||
|
|
||||||
return( newval );
|
return( newval );
|
||||||
|
|
Loading…
Reference in New Issue