static void free_tree_contexts(PC_TREE *tree) { free_mode_context(&tree->none); free_mode_context(&tree->horizontal[0]); free_mode_context(&tree->horizontal[1]); free_mode_context(&tree->vertical[0]); free_mode_context(&tree->vertical[1]); }
void vp10_free_pc_tree(ThreadData *td) { const int tree_nodes = 64 + 16 + 4 + 1; int i; // Set up all 4x4 mode contexts for (i = 0; i < 64; ++i) free_mode_context(&td->leaf_tree[i]); // Sets up all the leaf nodes in the tree. for (i = 0; i < tree_nodes; ++i) free_tree_contexts(&td->pc_tree[i]); vpx_free(td->pc_tree); td->pc_tree = NULL; vpx_free(td->leaf_tree); td->leaf_tree = NULL; }
void vp9_free_pc_tree(MACROBLOCK *x) { const int tree_nodes = 64 + 16 + 4 + 1; int i; // Set up all 4x4 mode contexts for (i = 0; i < 64; ++i) free_mode_context(&x->leaf_tree[i]); // Sets up all the leaf nodes in the tree. for (i = 0; i < tree_nodes; ++i) free_tree_contexts(&x->pc_tree[i]); vpx_free(x->pc_tree); x->pc_tree = NULL; vpx_free(x->leaf_tree); x->leaf_tree = NULL; }