diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-07-16 21:09:32 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-07-16 21:09:32 +0000 |
commit | d2744e19e01bdce56c89d4d4636c5a2ba1245e4d (patch) | |
tree | 8467ae39557e0414433808f1666fbb032f1172f2 /libavcodec/vp3.c | |
parent | 4501e678e79ac51c94a7bbcd92bcabc43d66b6f4 (diff) | |
download | ffmpeg-d2744e19e01bdce56c89d4d4636c5a2ba1245e4d.tar.gz |
use RSHIFT
Originally committed as revision 5773 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index fbd14c75a5..ed2f6015e3 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1145,17 +1145,10 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb) motion_y[4] += motion_y[k]; } - if (motion_x[4] >= 0) - motion_x[4] = (motion_x[4] + 2) / 4; - else - motion_x[4] = (motion_x[4] - 2) / 4; - motion_x[5] = motion_x[4]; - - if (motion_y[4] >= 0) - motion_y[4] = (motion_y[4] + 2) / 4; - else - motion_y[4] = (motion_y[4] - 2) / 4; - motion_y[5] = motion_y[4]; + motion_x[5]= + motion_x[4]= RSHIFT(motion_x[4], 2); + motion_y[5]= + motion_y[4]= RSHIFT(motion_y[4], 2); /* vector maintenance; vector[3] is treated as the * last vector in this case */ |