Commit 0ecde5ce authored by Jingning Han's avatar Jingning Han

Remove unused variable from ctx_tree

Change-Id: Ic5b09169d7fbb28d09008756ec71703ff7322d78
parent 759771c6
......@@ -20,18 +20,11 @@ static const BLOCK_SIZE square[MAX_SB_SIZE_LOG2 - 1] = {
};
static void alloc_mode_context(AV1_COMMON *cm, int num_pix,
#if CONFIG_EXT_PARTITION_TYPES
PARTITION_TYPE partition,
#endif
PICK_MODE_CONTEXT *ctx) {
int i;
const int num_blk = num_pix / 16;
ctx->num_4x4_blk = num_blk;
#if CONFIG_EXT_PARTITION_TYPES
ctx->partition = partition;
#endif
for (i = 0; i < MAX_MB_PLANE; ++i) {
CHECK_MEM_ERROR(cm, ctx->blk_skip[i], aom_calloc(num_blk, sizeof(uint8_t)));
CHECK_MEM_ERROR(cm, ctx->coeff[i],
......@@ -86,31 +79,30 @@ static void free_mode_context(PICK_MODE_CONTEXT *ctx) {
static void alloc_tree_contexts(AV1_COMMON *cm, PC_TREE *tree, int num_pix,
int is_leaf) {
#if CONFIG_EXT_PARTITION_TYPES
alloc_mode_context(cm, num_pix, PARTITION_NONE, &tree->none);
alloc_mode_context(cm, num_pix, &tree->none);
if (is_leaf) return;
alloc_mode_context(cm, num_pix / 2, PARTITION_HORZ, &tree->horizontal[0]);
alloc_mode_context(cm, num_pix / 2, PARTITION_VERT, &tree->vertical[0]);
alloc_mode_context(cm, num_pix / 2, PARTITION_VERT, &tree->horizontal[1]);
alloc_mode_context(cm, num_pix / 2, PARTITION_VERT, &tree->vertical[1]);
alloc_mode_context(cm, num_pix / 4, PARTITION_HORZ_A, &tree->horizontala[0]);
alloc_mode_context(cm, num_pix / 4, PARTITION_HORZ_A, &tree->horizontala[1]);
alloc_mode_context(cm, num_pix / 2, PARTITION_HORZ_A, &tree->horizontala[2]);
alloc_mode_context(cm, num_pix / 2, PARTITION_HORZ_B, &tree->horizontalb[0]);
alloc_mode_context(cm, num_pix / 4, PARTITION_HORZ_B, &tree->horizontalb[1]);
alloc_mode_context(cm, num_pix / 4, PARTITION_HORZ_B, &tree->horizontalb[2]);
alloc_mode_context(cm, num_pix / 4, PARTITION_VERT_A, &tree->verticala[0]);
alloc_mode_context(cm, num_pix / 4, PARTITION_VERT_A, &tree->verticala[1]);
alloc_mode_context(cm, num_pix / 2, PARTITION_VERT_A, &tree->verticala[2]);
alloc_mode_context(cm, num_pix / 2, PARTITION_VERT_B, &tree->verticalb[0]);
alloc_mode_context(cm, num_pix / 4, PARTITION_VERT_B, &tree->verticalb[1]);
alloc_mode_context(cm, num_pix / 4, PARTITION_VERT_B, &tree->verticalb[2]);
alloc_mode_context(cm, num_pix / 2, &tree->horizontal[0]);
alloc_mode_context(cm, num_pix / 2, &tree->vertical[0]);
alloc_mode_context(cm, num_pix / 2, &tree->horizontal[1]);
alloc_mode_context(cm, num_pix / 2, &tree->vertical[1]);
alloc_mode_context(cm, num_pix / 4, &tree->horizontala[0]);
alloc_mode_context(cm, num_pix / 4, &tree->horizontala[1]);
alloc_mode_context(cm, num_pix / 2, &tree->horizontala[2]);
alloc_mode_context(cm, num_pix / 2, &tree->horizontalb[0]);
alloc_mode_context(cm, num_pix / 4, &tree->horizontalb[1]);
alloc_mode_context(cm, num_pix / 4, &tree->horizontalb[2]);
alloc_mode_context(cm, num_pix / 4, &tree->verticala[0]);
alloc_mode_context(cm, num_pix / 4, &tree->verticala[1]);
alloc_mode_context(cm, num_pix / 2, &tree->verticala[2]);
alloc_mode_context(cm, num_pix / 2, &tree->verticalb[0]);
alloc_mode_context(cm, num_pix / 4, &tree->verticalb[1]);
alloc_mode_context(cm, num_pix / 4, &tree->verticalb[2]);
for (int i = 0; i < 4; ++i) {
alloc_mode_context(cm, num_pix / 4, PARTITION_HORZ_4,
&tree->horizontal4[i]);
alloc_mode_context(cm, num_pix / 4, PARTITION_HORZ_4, &tree->vertical4[i]);
alloc_mode_context(cm, num_pix / 4, &tree->horizontal4[i]);
alloc_mode_context(cm, num_pix / 4, &tree->vertical4[i]);
}
#else
alloc_mode_context(cm, num_pix, &tree->none);
......
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