Commit a272530b authored by Yaowu Xu's avatar Yaowu Xu

Two optimizations:

1. Reduced the size memset based on eob for 32x32 transform. The reset
of non-zero coefficient should probably go into where they are read in
inverse transform functions. (TODO)
2. Removed a redundant level of indirection.
vp9_iht4x4_add() checks transform type and call vp9_iht4x4_16_add()
for tranforms other than DCT_DCT. In this case, the DCT_DCT case
has been already handled here.

Change-Id: Iacbc77da761f0b308df5acea0f20c9add9f33d20
parent f0446164
......@@ -262,7 +262,7 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block,
if (tx_type == DCT_DCT)
xd->itxm_add(qcoeff, dst, stride, eob);
else
vp9_iht4x4_add(tx_type, qcoeff, dst, stride, eob);
vp9_iht4x4_16_add(qcoeff, dst, stride, tx_type);
break;
case TX_8X8:
tx_type = get_tx_type_8x8(pd->plane_type, xd);
......@@ -285,6 +285,8 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block,
} else {
if (tx_type == DCT_DCT && tx_size <= TX_16X16 && eob <= 10)
vpx_memset(qcoeff, 0, 4 * (4 << tx_size) * sizeof(qcoeff[0]));
else if (tx_size == TX_32X32 && eob <= 34)
vpx_memset(qcoeff, 0, 256 * sizeof(qcoeff[0]));
else
vpx_memset(qcoeff, 0, (16 << (tx_size << 1)) * sizeof(qcoeff[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