ref: 7b9ca3caa78bd08fbc4dac8a05396be6c7240143
parent: e571d3badc080ef6b670254d074bf3cd21dced43
author: James Zern <[email protected]>
date: Thu Oct 24 17:33:46 EDT 2013
vp9: remove partition+entropy contexts from common these are now handled separately by the encoder and decoder Change-Id: If9b16f7d734e992fb94a510a6d88f2690d7fb7cb
--- a/vp9/common/vp9_alloccommon.c
+++ b/vp9/common/vp9_alloccommon.c
@@ -41,17 +41,12 @@
vpx_free(cm->mip);
vpx_free(cm->prev_mip);
- vpx_free(cm->above_seg_context);
vpx_free(cm->last_frame_seg_map);
vpx_free(cm->mi_grid_base);
vpx_free(cm->prev_mi_grid_base);
- vpx_free(cm->above_context[0]);
- for (i = 0; i < MAX_MB_PLANE; i++)
- cm->above_context[i] = 0;
cm->mip = NULL;
cm->prev_mip = NULL;
- cm->above_seg_context = NULL;
cm->last_frame_seg_map = NULL;
cm->mi_grid_base = NULL;
cm->prev_mi_grid_base = NULL;
@@ -85,7 +80,7 @@
}
int vp9_alloc_frame_buffers(VP9_COMMON *cm, int width, int height) {
- int i, mi_cols;
+ int i;
const int aligned_width = ALIGN_POWER_OF_TWO(width, MI_SIZE_LOG2);
const int aligned_height = ALIGN_POWER_OF_TWO(height, MI_SIZE_LOG2);
@@ -140,21 +135,6 @@
setup_mi(cm);
- // FIXME(jkoleszar): allocate subsampled arrays for U/V once subsampling
- // information is exposed at this level
- mi_cols = mi_cols_aligned_to_sb(cm->mi_cols);
-
- // 2 contexts per 'mi unit', so that we have one context per 4x4 txfm
- // block where mi unit size is 8x8.
- cm->above_context[0] = vpx_calloc(sizeof(ENTROPY_CONTEXT) * MAX_MB_PLANE *
- (2 * mi_cols), 1);
- if (!cm->above_context[0])
- goto fail;
-
- cm->above_seg_context = vpx_calloc(sizeof(PARTITION_CONTEXT) * mi_cols, 1);
- if (!cm->above_seg_context)
- goto fail;
-
// Create the segmentation map structure and set to 0.
cm->last_frame_seg_map = vpx_calloc(cm->mi_rows * cm->mi_cols, 1);
if (!cm->last_frame_seg_map)
@@ -186,17 +166,11 @@
}
void vp9_update_frame_size(VP9_COMMON *cm) {
- int i, mi_cols;
const int aligned_width = ALIGN_POWER_OF_TWO(cm->width, MI_SIZE_LOG2);
const int aligned_height = ALIGN_POWER_OF_TWO(cm->height, MI_SIZE_LOG2);
set_mb_mi(cm, aligned_width, aligned_height);
setup_mi(cm);
-
- mi_cols = mi_cols_aligned_to_sb(cm->mi_cols);
- for (i = 1; i < MAX_MB_PLANE; i++)
- cm->above_context[i] =
- cm->above_context[0] + i * sizeof(ENTROPY_CONTEXT) * 2 * mi_cols;
// Initialize the previous frame segment map to 0.
if (cm->last_frame_seg_map)
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -183,14 +183,6 @@
struct loopfilter lf;
struct segmentation seg;
- /* Y,U,V */
- ENTROPY_CONTEXT *above_context[MAX_MB_PLANE];
- ENTROPY_CONTEXT left_context[MAX_MB_PLANE][16];
-
- // partition contexts
- PARTITION_CONTEXT *above_seg_context;
- PARTITION_CONTEXT left_seg_context[8];
-
// Context probabilities for reference frame prediction
int allow_comp_inter_inter;
MV_REFERENCE_FRAME comp_fixed_ref;