Rename intra_mode_model -> intra_luma_mpm_flag_model and update the contexts

This commit is contained in:
Marko Viitanen 2019-08-19 15:17:25 +03:00
parent 1c6ffc0a7e
commit db94ec1a84
4 changed files with 6 additions and 6 deletions

View file

@ -56,7 +56,7 @@ typedef struct
cabac_ctx_t sao_type_idx_model;
cabac_ctx_t split_flag_model[9]; //!< \brief split flag context models
cabac_ctx_t qt_split_flag_model[6]; //!< \brief qt split flag context models
cabac_ctx_t intra_mode_model; //!< \brief intra mode context models
cabac_ctx_t intra_luma_mpm_flag_model; //!< \brief intra mode context models
cabac_ctx_t intra_subpart_model[2]; //!< \brief intra sub part context models
cabac_ctx_t chroma_pred_model[1];
cabac_ctx_t inter_dir[5];

View file

@ -81,8 +81,8 @@ static const uint8_t MULTI_REF_LINE_MODE[4][2] = {
{ 6, 8, },
};
static const uint8_t INIT_INTRA_PRED_MODE[4] = {
154, 154, 170, 6
static const uint8_t INIT_INTRA_LUMA_MPM_FLAG[4] = {
36, 36, 45, 6
};
static const uint8_t INIT_INTRA_LUMA_PLANAR_MODE[4][2] = {
@ -344,7 +344,7 @@ void kvz_init_contexts(encoder_state_t *state, int8_t QP, int8_t slice)
kvz_ctx_init(&cabac->ctx.cu_pred_mode_model, QP, INIT_PRED_MODE[slice][0], INIT_PRED_MODE[3][0]);
kvz_ctx_init(&cabac->ctx.cu_transquant_bypass, QP, INIT_CU_TRANSQUANT_BYPASS[slice][0], INIT_CU_TRANSQUANT_BYPASS[3][0]);
kvz_ctx_init(&cabac->ctx.intra_mode_model, QP, INIT_INTRA_PRED_MODE[slice], INIT_INTRA_PRED_MODE[3]);
kvz_ctx_init(&cabac->ctx.intra_luma_mpm_flag_model, QP, INIT_INTRA_LUMA_MPM_FLAG[slice], INIT_INTRA_LUMA_MPM_FLAG[3]);
kvz_ctx_init(&cabac->ctx.intra_subpart_model[0], QP, INIT_INTRA_SUBPART_MODE[slice][0], INIT_INTRA_SUBPART_MODE[3][0]);

View file

@ -1107,7 +1107,7 @@ static void encode_intra_coding_unit(encoder_state_t * const state,
// ToDo: fix comments for VVC
const int cu_width = LCU_WIDTH >> depth;
cabac->cur_ctx = &(cabac->ctx.intra_mode_model);
cabac->cur_ctx = &(cabac->ctx.intra_luma_mpm_flag_model);
for (int j = 0; j < num_pred_units; ++j) {
const int pu_x = PU_GET_X(cur_cu->part_size, cu_width, x, j);
const int pu_y = PU_GET_Y(cur_cu->part_size, cu_width, y, j);

View file

@ -671,7 +671,7 @@ double kvz_luma_mode_bits(const encoder_state_t *state, int8_t luma_mode, const
}
}
const cabac_ctx_t *ctx = &(state->cabac.ctx.intra_mode_model);
const cabac_ctx_t *ctx = &(state->cabac.ctx.intra_luma_mpm_flag_model);
mode_bits = CTX_ENTROPY_FBITS(ctx, mode_in_preds);
if (mode_in_preds) {