aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/msmpeg4.c
diff options
context:
space:
mode:
authorBERO <bero@geocities.co.jp>2003-05-14 15:12:13 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-05-14 15:12:13 +0000
commitd4961b35236beb67785410473442f5923ac8a488 (patch)
tree7b8474ce797d6e8b33ef0b3e6c19ff5b532ea375 /libavcodec/msmpeg4.c
parentb82cdc727855fc11f0110c46c39eadd00009ebc0 (diff)
downloadffmpeg-d4961b35236beb67785410473442f5923ac8a488.tar.gz
fastdiv patch by (BERO <bero at geocities dot co dot jp>) with fixes & cleanup by me
Originally committed as revision 1879 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/msmpeg4.c')
-rw-r--r--libavcodec/msmpeg4.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index e4daec4e8f..093ee985ca 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -78,8 +78,6 @@ static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
static int wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
-extern uint32_t inverse[256];
-
#ifdef DEBUG
int intra_count = 0;
@@ -699,7 +697,7 @@ static int get_dc(uint8_t *src, int stride, int scale)
sum+=src[x + y*stride];
}
}
- return (sum + (scale>>1))/scale;
+ return FASTDIV((sum + (scale>>1)), scale);
}
/* dir = 0: left, dir = 1: top prediction */
@@ -763,9 +761,9 @@ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n,
b = (b + (8 >> 1)) / 8;
c = (c + (8 >> 1)) / 8;
} else {
- a = (a + (scale >> 1)) / scale;
- b = (b + (scale >> 1)) / scale;
- c = (c + (scale >> 1)) / scale;
+ a = FASTDIV((a + (scale >> 1)), scale);
+ b = FASTDIV((b + (scale >> 1)), scale);
+ c = FASTDIV((c + (scale >> 1)), scale);
}
#endif
/* XXX: WARNING: they did not choose the same test as MPEG4. This