aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_dctdnoiz.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2014-08-09 20:34:14 +0200
committerClément Bœsch <u@pkh.me>2014-08-09 20:34:14 +0200
commitd7594beedee38211d82c9d30236e3fc22c4cad65 (patch)
tree22a8aa2fcda3a26ff6b2e551f5c16522cb39d964 /libavfilter/vf_dctdnoiz.c
parentf75786f3bc8819545aa070f62d2ab3b579a8c781 (diff)
downloadffmpeg-d7594beedee38211d82c9d30236e3fc22c4cad65.tar.gz
avfilter/dctdnoiz: remove a few indirections in idcts
No change in the generated asm.
Diffstat (limited to 'libavfilter/vf_dctdnoiz.c')
-rw-r--r--libavfilter/vf_dctdnoiz.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c
index 83a38ed9e3..fe1c5d78bf 100644
--- a/libavfilter/vf_dctdnoiz.c
+++ b/libavfilter/vf_dctdnoiz.c
@@ -151,10 +151,9 @@ static void av_always_inline idct8_1d(float *dst, const float *src,
const float x14 = 0.353553390593274f * (x11 + x12);
const float x15 = 0.353553390593274f * (x11 - x12);
const float x16 = 0.5f*x13;
- const float x08 = -x15;
dst[0*dst_stridea] = (add ? dst[ 0*dst_stridea] : 0) + 0.25f * (x09 + x0b) + 0.353553390593274f*x0a;
- dst[1*dst_stridea] = (add ? dst[ 1*dst_stridea] : 0) + 0.707106781186547f * (x0f - x08);
- dst[2*dst_stridea] = (add ? dst[ 2*dst_stridea] : 0) + 0.707106781186547f * (x0f + x08);
+ dst[1*dst_stridea] = (add ? dst[ 1*dst_stridea] : 0) + 0.707106781186547f * (x0f + x15);
+ dst[2*dst_stridea] = (add ? dst[ 2*dst_stridea] : 0) + 0.707106781186547f * (x0f - x15);
dst[3*dst_stridea] = (add ? dst[ 3*dst_stridea] : 0) + 0.707106781186547f * (x0e + x16);
dst[4*dst_stridea] = (add ? dst[ 4*dst_stridea] : 0) + 0.707106781186547f * (x0e - x16);
dst[5*dst_stridea] = (add ? dst[ 5*dst_stridea] : 0) + 0.707106781186547f * (x10 - x14);
@@ -324,20 +323,17 @@ static void av_always_inline idct16_1d(float *dst, const float *src,
const float x42 = 0.25f * (x3f + x40);
const float x43 = 0.25f * (x3f - x40);
const float x44 = 0.353553390593274f*x41;
- const float x36 = -x43;
- const float x10 = -x34;
- const float x11 = -x3d;
dst[ 0*dst_stridea] = (add ? dst[ 0*dst_stridea] : 0) + 0.176776695296637f * (x1d + x1f) + 0.25f*x1e;
- dst[ 1*dst_stridea] = (add ? dst[ 1*dst_stridea] : 0) + 0.707106781186547f * (x29 - x11);
- dst[ 2*dst_stridea] = (add ? dst[ 2*dst_stridea] : 0) + 0.707106781186547f * (x29 + x11);
- dst[ 3*dst_stridea] = (add ? dst[ 3*dst_stridea] : 0) + 0.707106781186547f * (x23 + x36);
- dst[ 4*dst_stridea] = (add ? dst[ 4*dst_stridea] : 0) + 0.707106781186547f * (x23 - x36);
+ dst[ 1*dst_stridea] = (add ? dst[ 1*dst_stridea] : 0) + 0.707106781186547f * (x29 + x3d);
+ dst[ 2*dst_stridea] = (add ? dst[ 2*dst_stridea] : 0) + 0.707106781186547f * (x29 - x3d);
+ dst[ 3*dst_stridea] = (add ? dst[ 3*dst_stridea] : 0) + 0.707106781186547f * (x23 - x43);
+ dst[ 4*dst_stridea] = (add ? dst[ 4*dst_stridea] : 0) + 0.707106781186547f * (x23 + x43);
dst[ 5*dst_stridea] = (add ? dst[ 5*dst_stridea] : 0) + 0.707106781186547f * (x1b - x35);
dst[ 6*dst_stridea] = (add ? dst[ 6*dst_stridea] : 0) + 0.707106781186547f * (x1b + x35);
dst[ 7*dst_stridea] = (add ? dst[ 7*dst_stridea] : 0) + 0.707106781186547f * (x22 + x44);
dst[ 8*dst_stridea] = (add ? dst[ 8*dst_stridea] : 0) + 0.707106781186547f * (x22 - x44);
- dst[ 9*dst_stridea] = (add ? dst[ 9*dst_stridea] : 0) + 0.707106781186547f * (x1c - x10);
- dst[10*dst_stridea] = (add ? dst[10*dst_stridea] : 0) + 0.707106781186547f * (x1c + x10);
+ dst[ 9*dst_stridea] = (add ? dst[ 9*dst_stridea] : 0) + 0.707106781186547f * (x1c + x34);
+ dst[10*dst_stridea] = (add ? dst[10*dst_stridea] : 0) + 0.707106781186547f * (x1c - x34);
dst[11*dst_stridea] = (add ? dst[11*dst_stridea] : 0) + 0.707106781186547f * (x24 + x42);
dst[12*dst_stridea] = (add ? dst[12*dst_stridea] : 0) + 0.707106781186547f * (x24 - x42);
dst[13*dst_stridea] = (add ? dst[13*dst_stridea] : 0) + 0.707106781186547f * (x2b - x3b);