Commit bc2288cc authored by Angie Chiang's avatar Angie Chiang

Add av1_inverse_transform_block_facade

This function will apply av1_inverse_transform_block to
pd->dst.buf directly.

Change-Id: I703762c2d3cee2af626c190fe3b3995e3cce2082
parent 0be435a0
...@@ -2822,6 +2822,20 @@ void av1_inverse_transform_block(MACROBLOCKD *xd, const tran_low_t *dqcoeff, ...@@ -2822,6 +2822,20 @@ void av1_inverse_transform_block(MACROBLOCKD *xd, const tran_low_t *dqcoeff,
#endif // CONFIG_AOM_HIGHBITDEPTH #endif // CONFIG_AOM_HIGHBITDEPTH
} }
void av1_inverse_transform_block_facade(MACROBLOCKD *xd, int plane, int block,
int blk_row, int blk_col, int eob) {
struct macroblockd_plane *const pd = &xd->plane[plane];
tran_low_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
const PLANE_TYPE plane_type = get_plane_type(plane);
const TX_SIZE tx_size = get_tx_size(plane, xd);
const TX_TYPE tx_type = get_tx_type(plane_type, xd, block, tx_size);
const int dst_stride = pd->dst.stride;
uint8_t *dst =
&pd->dst.buf[(blk_row * dst_stride + blk_col) << tx_size_wide_log2[0]];
av1_inverse_transform_block(xd, dqcoeff, tx_type, tx_size, dst, dst_stride,
eob);
}
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
void av1_highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride, void av1_highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
INV_TXFM_PARAM *inv_txfm_param) { INV_TXFM_PARAM *inv_txfm_param) {
......
...@@ -69,6 +69,8 @@ void av1_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride, ...@@ -69,6 +69,8 @@ void av1_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
void av1_inverse_transform_block(MACROBLOCKD *xd, const tran_low_t *dqcoeff, void av1_inverse_transform_block(MACROBLOCKD *xd, const tran_low_t *dqcoeff,
const TX_TYPE tx_type, const TX_SIZE tx_size, const TX_TYPE tx_type, const TX_SIZE tx_size,
uint8_t *dst, int stride, int eob); uint8_t *dst, int stride, int eob);
void av1_inverse_transform_block_facade(MACROBLOCKD *xd, int plane, int block,
int blk_row, int blk_col, int eob);
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
int eob, int bd); int eob, int bd);
......
...@@ -1560,6 +1560,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col, ...@@ -1560,6 +1560,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
*(args->t_left + blk_row)); *(args->t_left + blk_row));
RD_STATS this_rd_stats; RD_STATS this_rd_stats;
assert(tx_size == get_tx_size(plane, xd));
av1_init_rd_stats(&this_rd_stats); av1_init_rd_stats(&this_rd_stats);
if (args->exit_early) return; if (args->exit_early) return;
...@@ -1577,15 +1579,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col, ...@@ -1577,15 +1579,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
if (!is_inter_block(mbmi)) { if (!is_inter_block(mbmi)) {
struct macroblock_plane *const p = &x->plane[plane]; struct macroblock_plane *const p = &x->plane[plane];
struct macroblockd_plane *const pd = &xd->plane[plane]; av1_inverse_transform_block_facade(xd, plane, block, blk_row, blk_col,
tran_low_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block); p->eobs[block]);
PLANE_TYPE plane_type = get_plane_type(plane);
const TX_TYPE tx_type = get_tx_type(plane_type, xd, block, tx_size);
const int dst_stride = pd->dst.stride;
uint8_t *dst =
&pd->dst.buf[(blk_row * dst_stride + blk_col) << tx_size_wide_log2[0]];
av1_inverse_transform_block(xd, dqcoeff, tx_type, tx_size, dst, dst_stride,
p->eobs[block]);
dist_block(args->cpi, x, plane, plane_bsize, block, blk_row, blk_col, dist_block(args->cpi, x, plane, plane_bsize, block, blk_row, blk_col,
tx_size, &this_rd_stats.dist, &this_rd_stats.sse, tx_size, &this_rd_stats.dist, &this_rd_stats.sse,
OUTPUT_HAS_DECODED_PIXELS); OUTPUT_HAS_DECODED_PIXELS);
......
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