[Mplayer-cvslog] CVS: main/libavcodec mpegvideo.c,1.5,1.6
Nick Kurshev
nick at mplayer.dev.hu
Sat Jul 21 07:51:01 CEST 2001
Update of /cvsroot/mplayer/main/libavcodec
In directory mplayer:/var/tmp.root/cvs-serv23149/main/libavcodec
Modified Files:
mpegvideo.c
Log Message:
Better insns scheduling and minor C-improvements.
Index: mpegvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/mpegvideo.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mpegvideo.c 20 Jul 2001 10:55:43 -0000 1.5
+++ mpegvideo.c 21 Jul 2001 05:50:59 -0000 1.6
@@ -498,11 +498,10 @@
mx = motion_x >> 2;
my = motion_y >> 2;
} else {
- mx = motion_x / 2;
- my = motion_y / 2;
- dxy = ((my & 1) << 1) | (mx & 1);
+ mx = motion_x >> 1;
+ my = motion_y >> 2;
+ dxy = (motion_y & 2) | (mx & 1);
mx >>= 1;
- my >>= 1;
}
src_x = s->mb_x * 8 + mx;
@@ -530,9 +529,6 @@
int mb_x, mb_y, i;
UINT8 *ptr, *dest;
- mb_x = s->mb_x;
- mb_y = s->mb_y;
-
switch(s->mv_type) {
case MV_TYPE_16X16:
mpeg_motion(s, dest_y, dest_cb, dest_cr, 0,
@@ -541,6 +537,8 @@
s->mv[dir][0][0], s->mv[dir][0][1], 16);
break;
case MV_TYPE_8X8:
+ mb_x = s->mb_x;
+ mb_y = s->mb_y;
for(i=0;i<4;i++) {
motion_x = s->mv[dir][i][0];
motion_y = s->mv[dir][i][1];
@@ -891,11 +889,10 @@
mx = motion_x >> 2;
my = motion_y >> 2;
} else {
- mx = motion_x / 2;
- my = motion_y / 2;
- dxy = ((my & 1) << 1) | (mx & 1);
+ mx = motion_x >> 1;
+ my = motion_y >> 2;
+ dxy = ((motion_y & 2) | (mx & 1));
mx >>= 1;
- my >>= 1;
}
offset = ((mb_y * 8 + my) * (s->linesize >> 1)) + (mb_x * 8 + mx);
ptr = s->last_picture[1] + offset;
More information about the MPlayer-cvslog
mailing list