diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-04-18 18:30:05 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-18 18:30:05 +0000 |
commit | 3803021453fbf1a8dc1460fa14ea640416cda4ba (patch) | |
tree | 0439c2a6a87f1cdefe70d36e60804e955a1b5964 | |
parent | 0c352cadb0eb63a39c852d0636490c905a8a1628 (diff) | |
download | ffmpeg-3803021453fbf1a8dc1460fa14ea640416cda4ba.tar.gz |
fix y scale of mv vissualization of interlaced MVs
Originally committed as revision 3033 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegvideo.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index e88db4cc2a..03e73f2fc5 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1738,9 +1738,13 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){ int sx=mb_x*16 + 8; int sy=mb_y*16 + 4 + 8*i; int xy= mb_x*2 + (mb_y*2 + i)*s->b8_stride; - int mx=(pict->motion_val[direction][xy][0]>>shift) + sx; - int my=(pict->motion_val[direction][xy][1]>>shift) + sy; - draw_arrow(ptr, sx, sy, mx, my, s->width, s->height, s->linesize, 100); + int mx=(pict->motion_val[direction][xy][0]>>shift); + int my=(pict->motion_val[direction][xy][1]>>shift); + + if(IS_INTERLACED(pict->mb_type[mb_index])) + my*=2; + + draw_arrow(ptr, sx, sy, mx+sx, my+sy, s->width, s->height, s->linesize, 100); } }else{ int sx= mb_x*16 + 8; |