History

Merge "Eliminating usage of txfrm_block_to_raster_block() from encode_block()."

Dmitry Kovalev committed 13 years ago

Commit 58f75432 parents 4995dbc 7bfc20a1 file · +5 −10Browse files

Unified · Split

vp9/encoder/vp9_encodemb.c+5−10
@@ -419,19 +419,16 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, · 418 unmodified lines
419419 MACROBLOCKD *const xd = &x->e_mbd;
420420 struct optimize_ctx *const ctx = args->ctx;
421421 struct macroblockd_plane *const pd = &xd->plane[plane];
422− const int raster_block = txfrm_block_to_raster_block(plane_bsize, tx_size,
423− block);
424−
425422 int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
426− uint8_t *const dst = raster_block_offset_uint8(plane_bsize, raster_block,
427− pd->dst.buf, pd->dst.stride);
423+ int i, j;
424+ uint8_t *dst;
425+ txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
426+ dst = &pd->dst.buf[4 * j * pd->dst.stride + 4 * i];
428427
429428 // TODO(jingning): per transformed block zero forcing only enabled for
430429 // luma component. will integrate chroma components as well.
431430 if (x->zcoeff_blk[tx_size][block] && plane == 0) {
432− int i, j;
433431 pd->eobs[block] = 0;
434− txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
435432 ctx->ta[plane][i] = 0;
436433 ctx->tl[plane][j] = 0;
437434 return;
@@ -443,10 +440,8 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, · 5 unmodified lines
443440 if (x->optimize && (!x->skip_recode || !x->skip_optimize)) {
444441 vp9_optimize_b(plane, block, plane_bsize, tx_size, x, ctx);
445442 } else {
446− int i, k;
447− txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &k);
448443 ctx->ta[plane][i] = pd->eobs[block] > 0;
449− ctx->tl[plane][k] = pd->eobs[block] > 0;
444+ ctx->tl[plane][j] = pd->eobs[block] > 0;
450445 }
451446
452447 if (x->skip_encode || pd->eobs[block] == 0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t