Mercurial > libavcodec.hg
comparison vp56.c @ 5718:bb4293d858da libavcodec
rename one variable to be consistent with the rest of the file
author | aurel |
---|---|
date | Tue, 25 Sep 2007 22:31:00 +0000 |
parents | c5ec68f922d8 |
children | 1643aa6ac147 |
comparison
equal
deleted
inserted
replaced
5717:c5ec68f922d8 | 5718:bb4293d858da |
---|---|
259 } | 259 } |
260 | 260 |
261 static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame) | 261 static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame) |
262 { | 262 { |
263 int idx = s->scantable.permutated[0]; | 263 int idx = s->scantable.permutated[0]; |
264 int i; | 264 int b; |
265 | 265 |
266 for (i=0; i<6; i++) { | 266 for (b=0; b<6; b++) { |
267 vp56_ref_dc_t *ab = &s->above_blocks[s->above_block_idx[i]]; | 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[i]]; | 268 vp56_ref_dc_t *lb = &s->left_block[vp56_b6to4[b]]; |
269 int count = 0; | 269 int count = 0; |
270 int dc = 0; | 270 int dc = 0; |
271 | 271 |
272 if (ref_frame == lb->ref_frame) { | 272 if (ref_frame == lb->ref_frame) { |
273 dc += lb->dc_coeff; | 273 dc += lb->dc_coeff; |
286 dc += ab[1].dc_coeff; | 286 dc += ab[1].dc_coeff; |
287 count++; | 287 count++; |
288 } | 288 } |
289 } | 289 } |
290 if (count == 0) | 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 else if (count == 2) | 292 else if (count == 2) |
293 dc /= 2; | 293 dc /= 2; |
294 | 294 |
295 s->block_coeff[i][idx] += dc; | 295 s->block_coeff[b][idx] += dc; |
296 s->prev_dc[vp56_b2p[i]][ref_frame] = s->block_coeff[i][idx]; | 296 s->prev_dc[vp56_b2p[b]][ref_frame] = s->block_coeff[b][idx]; |
297 ab->dc_coeff = s->block_coeff[i][idx]; | 297 ab->dc_coeff = s->block_coeff[b][idx]; |
298 ab->ref_frame = ref_frame; | 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 lb->ref_frame = ref_frame; | 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 |
305 static void vp56_edge_filter(vp56_context_t *s, uint8_t *yuv, | 305 static void vp56_edge_filter(vp56_context_t *s, uint8_t *yuv, |
306 int pix_inc, int line_inc, int t) | 306 int pix_inc, int line_inc, int t) |