diff options
author | Wim Taymans <wtaymans@redhat.com> | 2016-02-11 18:01:40 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2016-02-11 18:03:59 +0100 |
commit | 188c0811de402e00ee4cbc0e8cdb03ea8dc1dfd9 (patch) | |
tree | f3d7b0ef5d5479a52cd942e86b9552a08eb6a25d /gst | |
parent | 5cef3f31ad4454c2bf7cecbbb0e9b3d6dca60050 (diff) |
resample: fix double interpolation sse code
We were only reading 2 filter taps and we need to read 4 to do cubic
interpolation.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/audioresample/resample_sse.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gst/audioresample/resample_sse.h b/gst/audioresample/resample_sse.h index e60de239e..55d1f40da 100644 --- a/gst/audioresample/resample_sse.h +++ b/gst/audioresample/resample_sse.h @@ -168,13 +168,13 @@ static inline double interpolate_product_double(const double *a, const double *b { for(;i<len-1;i+=2) { - 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); |