Cabac context array for inter direction

This commit is contained in:
Marko Viitanen 2015-03-06 16:26:16 +02:00
parent 890b4c1e20
commit 18d9789fab
2 changed files with 10 additions and 0 deletions

View file

@ -54,6 +54,7 @@ typedef struct
cabac_ctx split_flag_model[3]; //!< \brief split flag context models cabac_ctx split_flag_model[3]; //!< \brief split flag context models
cabac_ctx intra_mode_model; //!< \brief intra mode context models cabac_ctx intra_mode_model; //!< \brief intra mode context models
cabac_ctx chroma_pred_model[2]; cabac_ctx chroma_pred_model[2];
cabac_ctx inter_dir[5];
cabac_ctx trans_subdiv_model[3]; //!< \brief intra mode context models cabac_ctx trans_subdiv_model[3]; //!< \brief intra mode context models
cabac_ctx qt_cbf_model_luma[4]; cabac_ctx qt_cbf_model_luma[4];
cabac_ctx qt_cbf_model_chroma[4]; cabac_ctx qt_cbf_model_chroma[4];

View file

@ -108,6 +108,11 @@ const uint8_t INIT_CHROMA_PRED_MODE[3][2] = {
{ 63, 139 }, { 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] = { const uint8_t INIT_TRANS_SUBDIV_FLAG[3][3] = {
{ 224, 167, 122 }, { 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]); 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++) { for (i = 0; i < 8; i++) {
ctx_init(&cabac->ctx.cu_one_model_chroma[i], QP, INIT_ONE_FLAG[slice][i+16]); ctx_init(&cabac->ctx.cu_one_model_chroma[i], QP, INIT_ONE_FLAG[slice][i+16]);
} }