- if((avctx->debug&FF_DEBUG_VIS_MV) && s->last_picture_ptr){
- const int shift= 1 + s->quarter_sample;
- int mb_y;
- uint8_t *ptr= s->last_picture.data[0];
- s->low_delay=0; //needed to see the vectors without trashing the buffers
-
- for(mb_y=0; mb_y<s->mb_height; mb_y++){
- int mb_x;
- for(mb_x=0; mb_x<s->mb_width; mb_x++){
- const int mb_index= mb_x + mb_y*s->mb_stride;
- if(IS_8X8(s->current_picture.mb_type[mb_index])){
- int i;
- for(i=0; i<4; i++){
- int sx= mb_x*16 + 4 + 8*(i&1);
- int sy= mb_y*16 + 4 + 8*(i>>1);
- int xy= 1 + mb_x*2 + (i&1) + (mb_y*2 + 1 + (i>>1))*(s->mb_width*2 + 2);
- int mx= (s->motion_val[xy][0]>>shift) + sx;
- int my= (s->motion_val[xy][1]>>shift) + sy;
- draw_arrow(ptr, sx, sy, mx, my, s->width, s->height, s->linesize, 100);
- }
- }else{
- int sx= mb_x*16 + 8;
- int sy= mb_y*16 + 8;
- int xy= 1 + mb_x*2 + (mb_y*2 + 1)*(s->mb_width*2 + 2);
- int mx= (s->motion_val[xy][0]>>shift) + sx;
- int my= (s->motion_val[xy][1]>>shift) + sy;
- draw_arrow(ptr, sx, sy, mx, my, s->width, s->height, s->linesize, 100);
- }
- s->mbskip_table[mb_index]=0;
- }
- }
- }
-