Revision 4278e7a6 libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
1123 1123
    
1124 1124
    s->avg_mb_var = s->avg_mb_var / s->mb_num;        
1125 1125
    
1126
    s->block_wrap[0]=
1127
    s->block_wrap[1]=
1128
    s->block_wrap[2]=
1129
    s->block_wrap[3]= s->mb_width*2 + 2;
1130
    s->block_wrap[4]=
1131
    s->block_wrap[5]= s->mb_width + 2;
1126 1132
    for(mb_y=0; mb_y < s->mb_height; mb_y++) {
1127 1133
        /* Put GOB header based on RTP MTU */
1128 1134
        /* TODO: Put all this stuff in a separate generic function */
......
1138 1144
            }
1139 1145
        }
1140 1146
        
1147
        s->block_index[0]= s->block_wrap[0]*(mb_y*2 + 1) - 1;
1148
        s->block_index[1]= s->block_wrap[0]*(mb_y*2 + 1);
1149
        s->block_index[2]= s->block_wrap[0]*(mb_y*2 + 2) - 1;
1150
        s->block_index[3]= s->block_wrap[0]*(mb_y*2 + 2);
1151
        s->block_index[4]= s->block_wrap[4]*(mb_y + 1)                    + s->block_wrap[0]*(s->mb_height*2 + 2);
1152
        s->block_index[5]= s->block_wrap[4]*(mb_y + 1 + s->mb_height + 2) + s->block_wrap[0]*(s->mb_height*2 + 2);
1141 1153
        for(mb_x=0; mb_x < s->mb_width; mb_x++) {
1142 1154

  
1143 1155
            s->mb_x = mb_x;
1144 1156
            s->mb_y = mb_y;
1157
            s->block_index[0]+=2;
1158
            s->block_index[1]+=2;
1159
            s->block_index[2]+=2;
1160
            s->block_index[3]+=2;
1161
            s->block_index[4]++;
1162
            s->block_index[5]++;
1145 1163
#if 0
1146 1164
            /* compute motion vector and macro block type (intra or non intra) */
1147 1165
            motion_x = 0;

Also available in: Unified diff