diff options
author | trav90 <travawine@palemoon.org> | 2018-10-17 05:59:08 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-17 05:59:08 -0500 |
commit | df9477dfa60ebb5d31bc142e58ce46535c17abce (patch) | |
tree | c4fdd5d1b09d08c0514f208246260fc87372cb56 /third_party/aom/av1/common/alloccommon.c | |
parent | 0cc51bc106250988cc3b89cb5d743a5af52cd35a (diff) | |
download | UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.gz UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.lz UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.xz UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.zip |
Update aom to slightly newer commit ID
Diffstat (limited to 'third_party/aom/av1/common/alloccommon.c')
-rw-r--r-- | third_party/aom/av1/common/alloccommon.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/third_party/aom/av1/common/alloccommon.c b/third_party/aom/av1/common/alloccommon.c index 79d41a9c8..80f6b095f 100644 --- a/third_party/aom/av1/common/alloccommon.c +++ b/third_party/aom/av1/common/alloccommon.c @@ -125,6 +125,11 @@ void av1_free_context_buffers(AV1_COMMON *cm) { #if CONFIG_VAR_TX aom_free(cm->above_txfm_context); cm->above_txfm_context = NULL; + + for (i = 0; i < MAX_MB_PLANE; ++i) { + aom_free(cm->top_txfm_context[i]); + cm->top_txfm_context[i] = NULL; + } #endif } @@ -155,7 +160,8 @@ int av1_alloc_context_buffers(AV1_COMMON *cm, int width, int height) { for (i = 0; i < MAX_MB_PLANE; i++) { aom_free(cm->above_context[i]); cm->above_context[i] = (ENTROPY_CONTEXT *)aom_calloc( - 2 * aligned_mi_cols, sizeof(*cm->above_context[0])); + aligned_mi_cols << (MI_SIZE_LOG2 - tx_size_wide_log2[0]), + sizeof(*cm->above_context[0])); if (!cm->above_context[i]) goto fail; } @@ -167,8 +173,16 @@ int av1_alloc_context_buffers(AV1_COMMON *cm, int width, int height) { #if CONFIG_VAR_TX aom_free(cm->above_txfm_context); cm->above_txfm_context = (TXFM_CONTEXT *)aom_calloc( - aligned_mi_cols, sizeof(*cm->above_txfm_context)); + aligned_mi_cols << TX_UNIT_WIDE_LOG2, sizeof(*cm->above_txfm_context)); if (!cm->above_txfm_context) goto fail; + + for (i = 0; i < MAX_MB_PLANE; ++i) { + aom_free(cm->top_txfm_context[i]); + cm->top_txfm_context[i] = + (TXFM_CONTEXT *)aom_calloc(aligned_mi_cols << TX_UNIT_WIDE_LOG2, + sizeof(*cm->top_txfm_context[0])); + if (!cm->top_txfm_context[i]) goto fail; + } #endif cm->above_context_alloc_cols = aligned_mi_cols; |