From ea7ee9b770ea0a0b030aa10faea1af9b6db22afc Mon Sep 17 00:00:00 2001 From: Nicolas Robidoux Date: Sun, 16 May 2010 19:25:19 +0000 Subject: [PATCH] return window_offset values for bicubic and lbb to the nonintuitive values -> no artifact for lbb, possibly method-based artifacts for bicubic --- libvips/resample/bicubic.cpp | 6 +++++- libvips/resample/lbb.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libvips/resample/bicubic.cpp b/libvips/resample/bicubic.cpp index 83c71028..22c4f6fb 100644 --- a/libvips/resample/bicubic.cpp +++ b/libvips/resample/bicubic.cpp @@ -434,7 +434,11 @@ vips_interpolate_bicubic_class_init( VipsInterpolateBicubicClass *iclass ) interpolate_class->interpolate = vips_interpolate_bicubic_interpolate; interpolate_class->window_size = 4; - interpolate_class->window_offset = 1; + interpolate_class->window_offset = 2; + /* + * Note from nicolas: If things were programmed sanely, I + * think window_offset should be 1, not 2. + */ /* Build the tables of pre-computed coefficients. */ diff --git a/libvips/resample/lbb.cpp b/libvips/resample/lbb.cpp index 1c2ba488..0ca0dcb5 100644 --- a/libvips/resample/lbb.cpp +++ b/libvips/resample/lbb.cpp @@ -796,7 +796,11 @@ vips_interpolate_lbb_class_init( VipsInterpolateLbbClass *klass ) interpolate_class->interpolate = vips_interpolate_lbb_interpolate; interpolate_class->window_size = 4; - interpolate_class->window_offset = 1; + interpolate_class->window_offset = 2; + /* + * Note from nicolas: If things were sane, window_offset should be + * 1, not 2. + */ } static void