Eliminating usage of txfrm_block_to_raster_block() from encode_block().
Change-Id: I7d11f1b6075a1115cdc2dcd605225b9c9c9b39c7
This commit is contained in:
Родитель
8282c1a68d
Коммит
7bfc20ac7a
|
@ -421,19 +421,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;
|
||||
|
@ -445,10 +442,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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче