diff options
author | trav90 <travawine@palemoon.org> | 2018-10-19 23:05:00 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-19 23:05:03 -0500 |
commit | d2499ead93dc4298c0882fe98902acb1b5209f99 (patch) | |
tree | cb0b942aed59e5108f9a3e9d64e7b77854383421 /third_party/aom/av1/encoder/context_tree.c | |
parent | 41fbdea457bf50c0a43e1c27c5cbf7f0a3a9eb33 (diff) | |
download | UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.gz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.lz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.xz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.zip |
Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591
Diffstat (limited to 'third_party/aom/av1/encoder/context_tree.c')
-rw-r--r-- | third_party/aom/av1/encoder/context_tree.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/third_party/aom/av1/encoder/context_tree.c b/third_party/aom/av1/encoder/context_tree.c index d6e556b93..57f59f304 100644 --- a/third_party/aom/av1/encoder/context_tree.c +++ b/third_party/aom/av1/encoder/context_tree.c @@ -175,14 +175,15 @@ void av1_setup_pc_tree(AV1_COMMON *cm, ThreadData *td) { } void av1_free_pc_tree(ThreadData *td, const int num_planes) { - const int tree_nodes_inc = 1024; - - const int tree_nodes = tree_nodes_inc + 256 + 64 + 16 + 4 + 1; - int i; - for (i = 0; i < tree_nodes; ++i) - free_tree_contexts(&td->pc_tree[i], num_planes); - aom_free(td->pc_tree); - td->pc_tree = NULL; + if (td->pc_tree != NULL) { + const int tree_nodes_inc = 1024; + const int tree_nodes = tree_nodes_inc + 256 + 64 + 16 + 4 + 1; + for (int i = 0; i < tree_nodes; ++i) { + free_tree_contexts(&td->pc_tree[i], num_planes); + } + aom_free(td->pc_tree); + td->pc_tree = NULL; + } } void av1_copy_tree_context(PICK_MODE_CONTEXT *dst_ctx, |