Mercurial > libavcodec.hg
comparison mpegvideo.c @ 1947:b306574523ad libavcodec
fix y scale of mv vissualization of interlaced MVs
author | michael |
---|---|
date | Sun, 18 Apr 2004 18:30:05 +0000 |
parents | 32f68745c431 |
children | d10578f7fd40 |
comparison
equal
deleted
inserted
replaced
1946:f9212b59a802 | 1947:b306574523ad |
---|---|
1736 int i; | 1736 int i; |
1737 for(i=0; i<2; i++){ | 1737 for(i=0; i<2; i++){ |
1738 int sx=mb_x*16 + 8; | 1738 int sx=mb_x*16 + 8; |
1739 int sy=mb_y*16 + 4 + 8*i; | 1739 int sy=mb_y*16 + 4 + 8*i; |
1740 int xy= mb_x*2 + (mb_y*2 + i)*s->b8_stride; | 1740 int xy= mb_x*2 + (mb_y*2 + i)*s->b8_stride; |
1741 int mx=(pict->motion_val[direction][xy][0]>>shift) + sx; | 1741 int mx=(pict->motion_val[direction][xy][0]>>shift); |
1742 int my=(pict->motion_val[direction][xy][1]>>shift) + sy; | 1742 int my=(pict->motion_val[direction][xy][1]>>shift); |
1743 draw_arrow(ptr, sx, sy, mx, my, s->width, s->height, s->linesize, 100); | 1743 |
1744 if(IS_INTERLACED(pict->mb_type[mb_index])) | |
1745 my*=2; | |
1746 | |
1747 draw_arrow(ptr, sx, sy, mx+sx, my+sy, s->width, s->height, s->linesize, 100); | |
1744 } | 1748 } |
1745 }else{ | 1749 }else{ |
1746 int sx= mb_x*16 + 8; | 1750 int sx= mb_x*16 + 8; |
1747 int sy= mb_y*16 + 8; | 1751 int sy= mb_y*16 + 8; |
1748 int xy= mb_x*2 + mb_y*2*s->b8_stride; | 1752 int xy= mb_x*2 + mb_y*2*s->b8_stride; |