# HG changeset patch # User michaelni # Date 1020562747 0 # Node ID dc2fb310008d68967354a5f59b3b142ecda1de3c # Parent 71792167020c6884e25d62a4b0e5cca681374b03 MV visualisation support diff -r 71792167020c -r dc2fb310008d h263dec.c --- a/h263dec.c Sun May 05 01:37:07 2002 +0000 +++ b/h263dec.c Sun May 05 01:39:07 2002 +0000 @@ -260,7 +260,40 @@ } MPV_frame_end(s); - +#if 0 //dirty show MVs, we should export the MV tables and write a filter to show them +{ + int mb_y; + s->has_b_frames=1; + for(mb_y=0; mb_ymb_height; mb_y++){ + int mb_x; + int y= mb_y*16; + for(mb_x=0; mb_xmb_width; mb_x++){ + int x= mb_x*16; + uint8_t *ptr= s->last_picture[0]; + int xy= 1 + mb_x*2 + (mb_y*2 + 1)*(s->mb_width*2 + 2); + int mx= (s->motion_val[xy][0]>>1) + x; + int my= (s->motion_val[xy][1]>>1) + y; + int i; + int max; + + if(mx<0) mx=0; + if(my<0) my=0; + if(mx>=s->width) mx= s->width -1; + if(my>=s->height) my= s->height-1; + max= ABS(mx-x); + if(ABS(my-y) > max) max= ABS(my-y); + /* the ugliest linedrawing routine ... */ + for(i=0; ilinesize + x1]+=100; + } + s->mbskip_table[mb_x + mb_y*s->mb_width]=0; + } + } + +} +#endif if(s->pict_type==B_TYPE || (!s->has_b_frames)){ pict->data[0] = s->current_picture[0]; pict->data[1] = s->current_picture[1];