Revision dc4a1883 libavcodec/vp3.c

View differences:

libavcodec/vp3.c
1345 1345
 */
1346 1346
static void render_slice(Vp3DecodeContext *s, int slice)
1347 1347
{
1348
    int x, y, i, j;
1348
    int x, y, i, j, fragment;
1349 1349
    LOCAL_ALIGNED_16(DCTELEM, block, [64]);
1350 1350
    int motion_x = 0xdeadbeef, motion_y = 0xdeadbeef;
1351 1351
    int motion_halfpel_index;
......
1390 1390
                for (j = 0; j < 16; j++) {
1391 1391
                    x = 4*sb_x + hilbert_offset[j][0];
1392 1392
                    y = 4*sb_y + hilbert_offset[j][1];
1393
                    fragment = y*fragment_width + x;
1393 1394

  
1394
                    i = fragment_start + y*fragment_width + x;
1395
                    i = fragment_start + fragment;
1395 1396

  
1396 1397
                    // bounds check
1397 1398
                    if (x >= fragment_width || y >= fragment_height)
......
1415 1416
                    if ((s->all_fragments[i].coding_method > MODE_INTRA) &&
1416 1417
                        (s->all_fragments[i].coding_method != MODE_USING_GOLDEN)) {
1417 1418
                        int src_x, src_y;
1418
                        motion_x = motion_val[y*fragment_width + x][0];
1419
                        motion_y = motion_val[y*fragment_width + x][1];
1419
                        motion_x = motion_val[fragment][0];
1420
                        motion_y = motion_val[fragment][1];
1420 1421

  
1421 1422
                        src_x= (motion_x>>1) + 8*x;
1422 1423
                        src_y= (motion_y>>1) + 8*y;

Also available in: Unified diff