Revision 4278e7a6 libavcodec/h263dec.c

View differences:

libavcodec/h263dec.c
140 140
#endif
141 141

  
142 142
    /* decode each macroblock */
143
    s->block_wrap[0]=
144
    s->block_wrap[1]=
145
    s->block_wrap[2]=
146
    s->block_wrap[3]= s->mb_width*2 + 2;
147
    s->block_wrap[4]=
148
    s->block_wrap[5]= s->mb_width + 2;
143 149
    for(s->mb_y=0; s->mb_y < s->mb_height; s->mb_y++) {
144 150
        /* Check for GOB headers on H.263 */
145 151
        /* FIXME: In the future H.263+ will have intra prediction */
......
147 153
        if (s->mb_y && !s->h263_pred) {
148 154
            s->first_gob_line = h263_decode_gob_header(s);
149 155
        }
156
        s->block_index[0]= s->block_wrap[0]*(s->mb_y*2 + 1) - 1;
157
        s->block_index[1]= s->block_wrap[0]*(s->mb_y*2 + 1);
158
        s->block_index[2]= s->block_wrap[0]*(s->mb_y*2 + 2) - 1;
159
        s->block_index[3]= s->block_wrap[0]*(s->mb_y*2 + 2);
160
        s->block_index[4]= s->block_wrap[4]*(s->mb_y + 1)                    + s->block_wrap[0]*(s->mb_height*2 + 2);
161
        s->block_index[5]= s->block_wrap[4]*(s->mb_y + 1 + s->mb_height + 2) + s->block_wrap[0]*(s->mb_height*2 + 2);
150 162
        for(s->mb_x=0; s->mb_x < s->mb_width; s->mb_x++) {
163
            s->block_index[0]+=2;
164
            s->block_index[1]+=2;
165
            s->block_index[2]+=2;
166
            s->block_index[3]+=2;
167
            s->block_index[4]++;
168
            s->block_index[5]++;
151 169
#ifdef DEBUG
152 170
            printf("**mb x=%d y=%d\n", s->mb_x, s->mb_y);
153 171
#endif

Also available in: Unified diff