From 18d9789fab2fd51aaf9f0c7873491fcbb588079b Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Fri, 6 Mar 2015 16:26:16 +0200 Subject: [PATCH] Cabac context array for inter direction --- src/cabac.h | 1 + src/context.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/cabac.h b/src/cabac.h index 2a583b16..785968d0 100644 --- a/src/cabac.h +++ b/src/cabac.h @@ -54,6 +54,7 @@ typedef struct cabac_ctx split_flag_model[3]; //!< \brief split flag context models cabac_ctx intra_mode_model; //!< \brief intra mode context models cabac_ctx chroma_pred_model[2]; + cabac_ctx inter_dir[5]; cabac_ctx trans_subdiv_model[3]; //!< \brief intra mode context models cabac_ctx qt_cbf_model_luma[4]; cabac_ctx qt_cbf_model_chroma[4]; diff --git a/src/context.c b/src/context.c index a1f168a6..6c8217dc 100644 --- a/src/context.c +++ b/src/context.c @@ -108,6 +108,11 @@ const uint8_t INIT_CHROMA_PRED_MODE[3][2] = { { 63, 139 }, }; +const uint8_t INIT_INTER_DIR[3][5] = { + { 95, 79, 63, 31, 31, }, + { 95, 79, 63, 31, 31, }, + { CNU, CNU, CNU, CNU, CNU, }, +}; const uint8_t INIT_TRANS_SUBDIV_FLAG[3][3] = { { 224, 167, 122 }, @@ -255,6 +260,10 @@ void init_contexts(encoder_state *encoder_state, int8_t QP, int8_t slice) ctx_init(&cabac->ctx.qt_cbf_model_chroma[i], QP, INIT_QT_CBF[slice][i + 4]); } + for (i = 0; i < 5; i++) { + ctx_init(&cabac->ctx.inter_dir[i], QP, INIT_INTER_DIR[slice][i]); + } + for (i = 0; i < 8; i++) { ctx_init(&cabac->ctx.cu_one_model_chroma[i], QP, INIT_ONE_FLAG[slice][i+16]); }