Revision d7af6a9d

View differences:

libavcodec/vp56.c
261 261
static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame)
262 262
{
263 263
    int idx = s->scantable.permutated[0];
264
    int i;
264
    int b;
265 265

  
266
    for (i=0; i<6; i++) {
267
        vp56_ref_dc_t *ab = &s->above_blocks[s->above_block_idx[i]];
268
        vp56_ref_dc_t *lb = &s->left_block[vp56_b6to4[i]];
266
    for (b=0; b<6; b++) {
267
        vp56_ref_dc_t *ab = &s->above_blocks[s->above_block_idx[b]];
268
        vp56_ref_dc_t *lb = &s->left_block[vp56_b6to4[b]];
269 269
        int count = 0;
270 270
        int dc = 0;
271 271

  
......
288 288
            }
289 289
        }
290 290
        if (count == 0)
291
            dc = s->prev_dc[vp56_b2p[i]][ref_frame];
291
            dc = s->prev_dc[vp56_b2p[b]][ref_frame];
292 292
        else if (count == 2)
293 293
            dc /= 2;
294 294

  
295
        s->block_coeff[i][idx] += dc;
296
        s->prev_dc[vp56_b2p[i]][ref_frame] = s->block_coeff[i][idx];
297
        ab->dc_coeff = s->block_coeff[i][idx];
295
        s->block_coeff[b][idx] += dc;
296
        s->prev_dc[vp56_b2p[b]][ref_frame] = s->block_coeff[b][idx];
297
        ab->dc_coeff = s->block_coeff[b][idx];
298 298
        ab->ref_frame = ref_frame;
299
        lb->dc_coeff = s->block_coeff[i][idx];
299
        lb->dc_coeff = s->block_coeff[b][idx];
300 300
        lb->ref_frame = ref_frame;
301
        s->block_coeff[i][idx] *= s->dequant_dc;
301
        s->block_coeff[b][idx] *= s->dequant_dc;
302 302
    }
303 303
}
304 304

  

Also available in: Unified diff