aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-07-19 23:51:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-07-19 23:51:11 +0000
commitd9cf32d9204554ef133755ca49c02973a8625006 (patch)
tree7c8fbd46d2499ebe6a65d148bef7045b1e27fd52
parentd26a9ea0df8c08faf1ed37041f4bc252db30f047 (diff)
downloadffmpeg-d9cf32d9204554ef133755ca49c02973a8625006.tar.gz
avoid 4 +
Originally committed as revision 5799 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/vp3dsp.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c
index 9a19dcaf46..f5a1fb6fff 100644
--- a/libavcodec/vp3dsp.c
+++ b/libavcodec/vp3dsp.c
@@ -112,8 +112,13 @@ static always_inline void idct(uint8_t *dst, int stride, int16_t *input, int typ
Cd = A + C;
Dd = B + D;
- E = M(xC4S4, (ip[0*8] + ip[4*8]));
- F = M(xC4S4, (ip[0*8] - ip[4*8]));
+ E = M(xC4S4, (ip[0*8] + ip[4*8])) + 8;
+ F = M(xC4S4, (ip[0*8] - ip[4*8])) + 8;
+
+ if(type==1){ //HACK
+ E += 16*128;
+ F += 16*128;
+ }
G = M(xC2S6, ip[2*8]) + M(xC6S2, ip[6*8]);
H = M(xC6S2, ip[2*8]) - M(xC2S6, ip[6*8]);
@@ -127,17 +132,6 @@ static always_inline void idct(uint8_t *dst, int stride, int16_t *input, int typ
Fd = F - Ad;
Hd = Bd + H;
- if(type==1){ //HACK
- Gd += 16*128;
- Add+= 16*128;
- Ed += 16*128;
- Fd += 16*128;
- }
- Gd += IdctAdjustBeforeShift;
- Add += IdctAdjustBeforeShift;
- Ed += IdctAdjustBeforeShift;
- Fd += IdctAdjustBeforeShift;
-
/* Final sequence of operations over-write original inputs. */
if(type==0){
ip[0*8] = (Gd + Cd ) >> 4;