Commit 58f75437 authored by Dmitry Kovalev's avatar Dmitry Kovalev Committed by Gerrit Code Review

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

parents 4995dbc7 7bfc20ac
......@@ -419,19 +419,16 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
MACROBLOCKD *const xd = &x->e_mbd;
struct optimize_ctx *const ctx = args->ctx;
struct macroblockd_plane *const pd = &xd->plane[plane];
const int raster_block = txfrm_block_to_raster_block(plane_bsize, tx_size,
block);
int16_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
uint8_t *const dst = raster_block_offset_uint8(plane_bsize, raster_block,
pd->dst.buf, pd->dst.stride);
int i, j;
uint8_t *dst;
txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
dst = &pd->dst.buf[4 * j * pd->dst.stride + 4 * i];
// TODO(jingning): per transformed block zero forcing only enabled for
// luma component. will integrate chroma components as well.
if (x->zcoeff_blk[tx_size][block] && plane == 0) {
int i, j;
pd->eobs[block] = 0;
txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j);
ctx->ta[plane][i] = 0;
ctx->tl[plane][j] = 0;
return;
......@@ -443,10 +440,8 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
if (x->optimize && (!x->skip_recode || !x->skip_optimize)) {
vp9_optimize_b(plane, block, plane_bsize, tx_size, x, ctx);
} else {
int i, k;
txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &k);
ctx->ta[plane][i] = pd->eobs[block] > 0;
ctx->tl[plane][k] = pd->eobs[block] > 0;
ctx->tl[plane][j] = pd->eobs[block] > 0;
}
if (x->skip_encode || pd->eobs[block] == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment