Commit 188c0811 authored by Wim Taymans's avatar Wim Taymans

resample: fix double interpolation sse code

We were only reading 2 filter taps and we need to read 4 to do cubic
parent 5cef3f31
......@@ -168,13 +168,13 @@ static inline double interpolate_product_double(const double *a, const double *b
t = _mm_mul_pd(_mm_load1_pd(a+i), _mm_loadu_pd(b+i*oversample));
sum1 = _mm_add_pd(sum1, t);
sum2 = _mm_add_pd(sum2, _mm_unpackhi_pd(t, t));
t = _mm_load1_pd(a+i);
sum1 = _mm_add_pd(sum1, _mm_mul_pd(t, _mm_loadu_pd(b+i*oversample)));
sum2 = _mm_add_pd(sum2, _mm_mul_pd(t, _mm_loadu_pd(b+i*oversample+2)));
t = _mm_mul_pd(_mm_load1_pd(a+i+1), _mm_loadu_pd(b+(i+1)*oversample));
sum1 = _mm_add_pd(sum1, t);
sum2 = _mm_add_pd(sum2, _mm_unpackhi_pd(t, t));
t = _mm_load1_pd(a+i+1);
sum1 = _mm_add_pd(sum1, _mm_mul_pd(t, _mm_loadu_pd(b+(i+1)*oversample)));
sum2 = _mm_add_pd(sum2, _mm_mul_pd(t, _mm_loadu_pd(b+(i+1)*oversample+2)));
sum1 = _mm_mul_pd(f1, sum1);
sum2 = _mm_mul_pd(f2, sum2);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment