Commit b49004d7 authored by Jingning Han's avatar Jingning Han

Refactor reset_skip_context() to support 2x2 txfm block

Refactor to remove the assumption that transform block operates in
the unit of 4x4. This generalizes the codec to support 2x2 transform
block later.

Change-Id: If1448a915f5765d409394c914af68f44b0749bc2
parent 7bc61a6a
......@@ -846,10 +846,10 @@ static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) {
for (i = 0; i < MAX_MB_PLANE; i++) {
struct macroblockd_plane *const pd = &xd->plane[i];
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
memset(pd->above_context, 0,
sizeof(ENTROPY_CONTEXT) * num_4x4_blocks_wide_lookup[plane_bsize]);
memset(pd->left_context, 0,
sizeof(ENTROPY_CONTEXT) * num_4x4_blocks_high_lookup[plane_bsize]);
const int txs_wide = block_size_wide[plane_bsize] >> tx_size_wide_log2[0];
const int txs_high = block_size_high[plane_bsize] >> tx_size_high_log2[0];
memset(pd->above_context, 0, sizeof(ENTROPY_CONTEXT) * txs_wide);
memset(pd->left_context, 0, sizeof(ENTROPY_CONTEXT) * txs_high);
}
}
......
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