From 3545786e813035a221393413701734dca84fd750 Mon Sep 17 00:00:00 2001 From: Nicolas Robidoux Date: Thu, 10 Jun 2010 19:54:27 +0000 Subject: [PATCH] tweak of the 5*, 1+ and 5- computation of the four Catmull-Rom weights --- libvips/resample/templates.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvips/resample/templates.h b/libvips/resample/templates.h index 31b229a3..26ec848f 100644 --- a/libvips/resample/templates.h +++ b/libvips/resample/templates.h @@ -256,8 +256,8 @@ calculate_coefficients_catmull( const double x, double c[4] ) const double cone = cr1 * cr3; const double cfou = x * cr3; const double cr4 = cfou - cone; - const double ctwo = cr4 + cr1 - cone; - const double cthr = x - cr4 - cfou; + const double ctwo = cr1 - cone + cr4; + const double cthr = x - cfou - cr4; g_assert( x >= 0. && x <= 1. );