PICK_MODE_CONTEXT *ctx) {
const int num_blk = (num_4x4_blk < 4 ? 4 : num_4x4_blk);
const int num_pix = num_blk << 4;
- int i, k;
+ int i;
ctx->num_4x4_blk = num_blk;
#if CONFIG_EXT_PARTITION_TYPES
ctx->partition = partition;
#if CONFIG_VAR_TX
CHECK_MEM_ERROR(cm, ctx->blk_skip[i], aom_calloc(num_blk, sizeof(uint8_t)));
#endif
- for (k = 0; k < 3; ++k) {
- CHECK_MEM_ERROR(cm, ctx->coeff[i][k],
- aom_memalign(32, num_pix * sizeof(*ctx->coeff[i][k])));
- CHECK_MEM_ERROR(cm, ctx->qcoeff[i][k],
- aom_memalign(32, num_pix * sizeof(*ctx->qcoeff[i][k])));
- CHECK_MEM_ERROR(cm, ctx->dqcoeff[i][k],
- aom_memalign(32, num_pix * sizeof(*ctx->dqcoeff[i][k])));
- CHECK_MEM_ERROR(cm, ctx->eobs[i][k],
- aom_memalign(32, num_blk * sizeof(*ctx->eobs[i][k])));
- }
+ CHECK_MEM_ERROR(cm, ctx->coeff[i],
+ aom_memalign(32, num_pix * sizeof(*ctx->coeff[i])));
+ CHECK_MEM_ERROR(cm, ctx->qcoeff[i],
+ aom_memalign(32, num_pix * sizeof(*ctx->qcoeff[i])));
+ CHECK_MEM_ERROR(cm, ctx->dqcoeff[i],
+ aom_memalign(32, num_pix * sizeof(*ctx->dqcoeff[i])));
+ CHECK_MEM_ERROR(cm, ctx->eobs[i],
+ aom_memalign(32, num_blk * sizeof(*ctx->eobs[i])));
#if CONFIG_PVQ
CHECK_MEM_ERROR(cm, ctx->pvq_ref_coeff[i],
aom_memalign(32, num_pix * sizeof(*ctx->pvq_ref_coeff[i])));
}
static void free_mode_context(PICK_MODE_CONTEXT *ctx) {
- int i, k;
+ int i;
for (i = 0; i < MAX_MB_PLANE; ++i) {
#if CONFIG_VAR_TX
aom_free(ctx->blk_skip[i]);
ctx->blk_skip[i] = 0;
#endif
- for (k = 0; k < 3; ++k) {
- aom_free(ctx->coeff[i][k]);
- ctx->coeff[i][k] = 0;
- aom_free(ctx->qcoeff[i][k]);
- ctx->qcoeff[i][k] = 0;
- aom_free(ctx->dqcoeff[i][k]);
- ctx->dqcoeff[i][k] = 0;
+ aom_free(ctx->coeff[i]);
+ ctx->coeff[i] = 0;
+ aom_free(ctx->qcoeff[i]);
+ ctx->qcoeff[i] = 0;
+ aom_free(ctx->dqcoeff[i]);
+ ctx->dqcoeff[i] = 0;
#if CONFIG_PVQ
- aom_free(ctx->pvq_ref_coeff[i]);
- ctx->pvq_ref_coeff[i] = 0;
+ aom_free(ctx->pvq_ref_coeff[i]);
+ ctx->pvq_ref_coeff[i] = 0;
#endif
- aom_free(ctx->eobs[i][k]);
- ctx->eobs[i][k] = 0;
- }
+ aom_free(ctx->eobs[i]);
+ ctx->eobs[i] = 0;
}
#if CONFIG_PALETTE
#endif
// dual buffer pointers, 0: in use, 1: best in store
- tran_low_t *coeff[MAX_MB_PLANE][3];
- tran_low_t *qcoeff[MAX_MB_PLANE][3];
- tran_low_t *dqcoeff[MAX_MB_PLANE][3];
+ tran_low_t *coeff[MAX_MB_PLANE];
+ tran_low_t *qcoeff[MAX_MB_PLANE];
+ tran_low_t *dqcoeff[MAX_MB_PLANE];
#if CONFIG_PVQ
tran_low_t *pvq_ref_coeff[MAX_MB_PLANE];
#endif
- uint16_t *eobs[MAX_MB_PLANE][3];
+ uint16_t *eobs[MAX_MB_PLANE];
int num_4x4_blk;
int skip;
const int mis = cm->mi_stride;
const int mi_width = num_8x8_blocks_wide_lookup[bsize];
const int mi_height = num_8x8_blocks_high_lookup[bsize];
- int max_plane;
#if CONFIG_REF_MV
int8_t rf_type;
}
}
- max_plane = is_inter_block(mbmi) ? MAX_MB_PLANE : 1;
- for (i = 0; i < max_plane; ++i) {
- p[i].coeff = ctx->coeff[i][1];
- p[i].qcoeff = ctx->qcoeff[i][1];
- pd[i].dqcoeff = ctx->dqcoeff[i][1];
- p[i].eobs = ctx->eobs[i][1];
- }
-
- for (i = max_plane; i < MAX_MB_PLANE; ++i) {
- p[i].coeff = ctx->coeff[i][2];
- p[i].qcoeff = ctx->qcoeff[i][2];
- pd[i].dqcoeff = ctx->dqcoeff[i][2];
+ for (i = 0; i < MAX_MB_PLANE; ++i) {
+ p[i].coeff = ctx->coeff[i];
+ p[i].qcoeff = ctx->qcoeff[i];
+ pd[i].dqcoeff = ctx->dqcoeff[i];
#if CONFIG_PVQ
pd[i].pvq_ref_coeff = ctx->pvq_ref_coeff[i];
#endif
- p[i].eobs = ctx->eobs[i][2];
+ p[i].eobs = ctx->eobs[i];
}
-
#if CONFIG_PALETTE
for (i = 0; i < 2; ++i) pd[i].color_index_map = ctx->color_index_map[i];
#endif // CONFIG_PALETTE
for (i = 0; i < MAX_MB_PLANE; ++i) {
if (pmc != NULL) {
- p[i].coeff = pmc->coeff[i][1];
- p[i].qcoeff = pmc->qcoeff[i][1];
- pd[i].dqcoeff = pmc->dqcoeff[i][1];
- p[i].eobs = pmc->eobs[i][1];
+ p[i].coeff = pmc->coeff[i];
+ p[i].qcoeff = pmc->qcoeff[i];
+ pd[i].dqcoeff = pmc->dqcoeff[i];
+ p[i].eobs = pmc->eobs[i];
} else {
// These should never be used
p[i].coeff = NULL;
#endif
for (i = 0; i < MAX_MB_PLANE; ++i) {
- p[i].coeff = ctx->coeff[i][0];
- p[i].qcoeff = ctx->qcoeff[i][0];
- pd[i].dqcoeff = ctx->dqcoeff[i][0];
+ p[i].coeff = ctx->coeff[i];
+ p[i].qcoeff = ctx->qcoeff[i];
+ pd[i].dqcoeff = ctx->dqcoeff[i];
#if CONFIG_PVQ
pd[i].pvq_ref_coeff = ctx->pvq_ref_coeff[i];
#endif
- p[i].eobs = ctx->eobs[i][0];
+ p[i].eobs = ctx->eobs[i];
}
#if CONFIG_PALETTE
#endif
for (i = 0; i < MAX_MB_PLANE; ++i) {
- p[i].coeff = ctx->coeff[i][1];
- p[i].qcoeff = ctx->qcoeff[i][1];
- pd[i].dqcoeff = ctx->dqcoeff[i][1];
+ p[i].coeff = ctx->coeff[i];
+ p[i].qcoeff = ctx->qcoeff[i];
+ pd[i].dqcoeff = ctx->dqcoeff[i];
#if CONFIG_PVQ
pd[i].pvq_ref_coeff = ctx->pvq_ref_coeff[i];
#endif
- p[i].eobs = ctx->eobs[i][1];
+ p[i].eobs = ctx->eobs[i];
}
av1_init_mv_probs(cm);