Unified · Split
| @@ -419,19 +419,16 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, · 418 unmodified lines | ||
| 419 | 419 | MACROBLOCKD *const xd = &x->e_mbd; |
| 420 | 420 | struct optimize_ctx *const ctx = args->ctx; |
| 421 | 421 | 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 | − | |
| 425 | 422 | 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]; | |
| 428 | 427 | |
| 429 | 428 | // TODO(jingning): per transformed block zero forcing only enabled for |
| 430 | 429 | // luma component. will integrate chroma components as well. |
| 431 | 430 | if (x->zcoeff_blk[tx_size][block] && plane == 0) { |
| 432 | − int i, j; | |
| 433 | 431 | pd->eobs[block] = 0; |
| 434 | − txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &j); | |
| 435 | 432 | ctx->ta[plane][i] = 0; |
| 436 | 433 | ctx->tl[plane][j] = 0; |
| 437 | 434 | return; |
| @@ -443,10 +440,8 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, · 5 unmodified lines | ||
| 443 | 440 | if (x->optimize && (!x->skip_recode || !x->skip_optimize)) { |
| 444 | 441 | vp9_optimize_b(plane, block, plane_bsize, tx_size, x, ctx); |
| 445 | 442 | } else { |
| 446 | − int i, k; | |
| 447 | − txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &i, &k); | |
| 448 | 443 | 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; | |
| 450 | 445 | } |
| 451 | 446 | |
| 452 | 447 | if (x->skip_encode || pd->eobs[block] == 0) |