Revision 137c8468 libavcodec/motion_est.c

View differences:

libavcodec/motion_est.c
733 733
        s->current_picture.motion_val[0][mot_xy+1][0]= mx;
734 734
        s->current_picture.motion_val[0][mot_xy+1][1]= my;
735 735

  
736
        mot_xy += s->block_wrap[0];
736
        mot_xy += s->b8_stride;
737 737
        s->current_picture.motion_val[0][mot_xy  ][0]= mx;
738 738
        s->current_picture.motion_val[0][mot_xy  ][1]= my;
739 739
        s->current_picture.motion_val[0][mot_xy+1][0]= mx;
......
780 780
        int pred_x4, pred_y4;
781 781
        int dmin4;
782 782
        static const int off[4]= {2, 1, 1, -1};
783
        const int mot_stride = s->block_wrap[0];
783
        const int mot_stride = s->b8_stride;
784 784
        const int mot_xy = s->block_index[block];
785 785
        const int block_x= (block&1);
786 786
        const int block_y= (block>>1);
......
1102 1102
    case ME_X1:
1103 1103
    case ME_EPZS:
1104 1104
       {
1105
            const int mot_stride = s->block_wrap[0];
1105
            const int mot_stride = s->b8_stride;
1106 1106
            const int mot_xy = s->block_index[0];
1107 1107

  
1108 1108
            P_LEFT[0]       = s->current_picture.motion_val[0][mot_xy - 1][0];
......
1252 1252
                int mean;
1253 1253
                
1254 1254
                if(s->out_format == FMT_H263){
1255
                    mean= (s->dc_val[i][mb_x + (mb_y+1)*(s->mb_width+2)] + 4)>>3; //FIXME not exact but simple ;)
1255
                    mean= (s->dc_val[i][mb_x + mb_y*s->b8_stride] + 4)>>3; //FIXME not exact but simple ;)
1256 1256
                }else{
1257 1257
                    mean= (s->last_dc[i] + 4)>>3;
1258 1258
                }
......
1809 1809
    
1810 1810
//printf("%d no:%d %d//\n", clip, noclip, f_code);
1811 1811
    if(s->flags&CODEC_FLAG_4MV){
1812
        const int wrap= 2+ s->mb_width*2;
1812
        const int wrap= s->b8_stride;
1813 1813

  
1814 1814
        /* clip / convert to intra 8x8 type MVs */
1815 1815
        for(y=0; y<s->mb_height; y++){
1816
            int xy= (y*2 + 1)*wrap + 1;
1816
            int xy= y*2*wrap;
1817 1817
            int i= y*s->mb_stride;
1818 1818
            int x;
1819 1819

  

Also available in: Unified diff