summaryrefslogtreecommitdiff
path: root/libavcodec/faandct.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-03-27 16:42:23 +0200
committerDiego Biurrun <diego@biurrun.de>2012-03-28 09:38:31 +0200
commit856c8e0a049dc7069b7504d3aaa48549c75852de (patch)
treeeca57e084ce4855c88d9130c77093e117be0708b /libavcodec/faandct.c
parenta839dbb94ed9244a1678339dbb05355d8257a126 (diff)
faandct: Remove FAAN_POSTSCALE define and related code.
It is not a user-accessible option and unlikely to ever be changed.
Diffstat (limited to 'libavcodec/faandct.c')
-rw-r--r--libavcodec/faandct.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/libavcodec/faandct.c b/libavcodec/faandct.c
index a986f65440..eaf4b65f41 100644
--- a/libavcodec/faandct.c
+++ b/libavcodec/faandct.c
@@ -29,11 +29,6 @@
#include "faandct.h"
#define FLOAT float
-#ifdef FAAN_POSTSCALE
-# define SCALE(x) postscale[x]
-#else
-# define SCALE(x) 1
-#endif
//numbers generated by simple c code (not as accurate as they could be)
/*
@@ -150,13 +145,13 @@ void ff_faandct(DCTELEM * data)
tmp11= tmp1 + tmp2;
tmp12= tmp1 - tmp2;
- data[8*0 + i]= lrintf(SCALE(8*0 + i) * (tmp10 + tmp11));
- data[8*4 + i]= lrintf(SCALE(8*4 + i) * (tmp10 - tmp11));
+ data[8*0 + i]= lrintf(postscale[8*0 + i] * (tmp10 + tmp11));
+ data[8*4 + i]= lrintf(postscale[8*4 + i] * (tmp10 - tmp11));
tmp12 += tmp13;
tmp12 *= A1;
- data[8*2 + i]= lrintf(SCALE(8*2 + i) * (tmp13 + tmp12));
- data[8*6 + i]= lrintf(SCALE(8*6 + i) * (tmp13 - tmp12));
+ data[8*2 + i]= lrintf(postscale[8*2 + i] * (tmp13 + tmp12));
+ data[8*6 + i]= lrintf(postscale[8*6 + i] * (tmp13 - tmp12));
tmp4 += tmp5;
tmp5 += tmp6;
@@ -175,10 +170,10 @@ void ff_faandct(DCTELEM * data)
z11= tmp7 + tmp5;
z13= tmp7 - tmp5;
- data[8*5 + i]= lrintf(SCALE(8*5 + i) * (z13 + z2));
- data[8*3 + i]= lrintf(SCALE(8*3 + i) * (z13 - z2));
- data[8*1 + i]= lrintf(SCALE(8*1 + i) * (z11 + z4));
- data[8*7 + i]= lrintf(SCALE(8*7 + i) * (z11 - z4));
+ data[8*5 + i]= lrintf(postscale[8*5 + i] * (z13 + z2));
+ data[8*3 + i]= lrintf(postscale[8*3 + i] * (z13 - z2));
+ data[8*1 + i]= lrintf(postscale[8*1 + i] * (z11 + z4));
+ data[8*7 + i]= lrintf(postscale[8*7 + i] * (z11 - z4));
}
}
@@ -208,25 +203,25 @@ void ff_faandct248(DCTELEM * data)
tmp12 = tmp1 - tmp2;
tmp13 = tmp0 - tmp3;
- data[8*0 + i] = lrintf(SCALE(8*0 + i) * (tmp10 + tmp11));
- data[8*4 + i] = lrintf(SCALE(8*4 + i) * (tmp10 - tmp11));
+ data[8*0 + i] = lrintf(postscale[8*0 + i] * (tmp10 + tmp11));
+ data[8*4 + i] = lrintf(postscale[8*4 + i] * (tmp10 - tmp11));
tmp12 += tmp13;
tmp12 *= A1;
- data[8*2 + i] = lrintf(SCALE(8*2 + i) * (tmp13 + tmp12));
- data[8*6 + i] = lrintf(SCALE(8*6 + i) * (tmp13 - tmp12));
+ data[8*2 + i] = lrintf(postscale[8*2 + i] * (tmp13 + tmp12));
+ data[8*6 + i] = lrintf(postscale[8*6 + i] * (tmp13 - tmp12));
tmp10 = tmp4 + tmp7;
tmp11 = tmp5 + tmp6;
tmp12 = tmp5 - tmp6;
tmp13 = tmp4 - tmp7;
- data[8*1 + i] = lrintf(SCALE(8*0 + i) * (tmp10 + tmp11));
- data[8*5 + i] = lrintf(SCALE(8*4 + i) * (tmp10 - tmp11));
+ data[8*1 + i] = lrintf(postscale[8*0 + i] * (tmp10 + tmp11));
+ data[8*5 + i] = lrintf(postscale[8*4 + i] * (tmp10 - tmp11));
tmp12 += tmp13;
tmp12 *= A1;
- data[8*3 + i] = lrintf(SCALE(8*2 + i) * (tmp13 + tmp12));
- data[8*7 + i] = lrintf(SCALE(8*6 + i) * (tmp13 - tmp12));
+ data[8*3 + i] = lrintf(postscale[8*2 + i] * (tmp13 + tmp12));
+ data[8*7 + i] = lrintf(postscale[8*6 + i] * (tmp13 - tmp12));
}
}