From 56401d5f7d8f196eb0bff6a1fa8be8d5dec6994e Mon Sep 17 00:00:00 2001 From: castano Date: Thu, 27 May 2010 19:28:49 +0000 Subject: [PATCH] fix polyphase filter --- src/nvimage/FloatImage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvimage/FloatImage.cpp b/src/nvimage/FloatImage.cpp index a5388b4..78ba0b4 100644 --- a/src/nvimage/FloatImage.cpp +++ b/src/nvimage/FloatImage.cpp @@ -506,8 +506,8 @@ FloatImage * FloatImage::fastDownSample() const float f = 0.0f; f += v0 * (w0 * src[0 * m_width + 2 * x] + w1 * src[0 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]); - f += v1 * (w0 * src[1 * m_width + 2 * x] + w1 * src[1 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]); - f += v2 * (w0 * src[2 * m_width + 2 * x] + w1 * src[2 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]); + f += v1 * (w0 * src[1 * m_width + 2 * x] + w1 * src[1 * m_width + 2 * x + 1] + w2 * src[1 * m_width + 2 * x + 2]); + f += v2 * (w0 * src[2 * m_width + 2 * x] + w1 * src[2 * m_width + 2 * x + 1] + w2 * src[2 * m_width + 2 * x + 2]); *dst = f * scale; dst++;