Updated split_flag initialization to support Large CTUs in VVC

This commit is contained in:
Marko Viitanen 2018-07-27 12:32:45 +03:00
parent 7abadaafe4
commit c6572d644f
2 changed files with 8 additions and 5 deletions

View file

@ -53,7 +53,7 @@ typedef struct
struct { struct {
cabac_ctx_t sao_merge_flag_model; cabac_ctx_t sao_merge_flag_model;
cabac_ctx_t sao_type_idx_model; cabac_ctx_t sao_type_idx_model;
cabac_ctx_t split_flag_model[3]; //!< \brief split flag context models cabac_ctx_t split_flag_model[5]; //!< \brief split flag context models
cabac_ctx_t intra_mode_model; //!< \brief intra mode context models cabac_ctx_t intra_mode_model; //!< \brief intra mode context models
cabac_ctx_t chroma_pred_model[2]; cabac_ctx_t chroma_pred_model[2];
cabac_ctx_t inter_dir[5]; cabac_ctx_t inter_dir[5];

View file

@ -87,10 +87,10 @@ static const uint8_t INIT_PART_SIZE[3][4] = {
{ 184, CNU, CNU, CNU, }, { 184, CNU, CNU, CNU, },
}; };
static const uint8_t INIT_SPLIT_FLAG[3][3] = { static const uint8_t INIT_SPLIT_FLAG[3][5] = {
{ 107, 139, 126 }, { 107, 139, 126, 255, 0, },
{ 107, 139, 126 }, { 107, 139, 126, 255, 0, },
{ 139, 141, 157 }, { 139, 141, 157, 255, 0, },
}; };
static const uint8_t INIT_INTRA_PRED_MODE[3] = { static const uint8_t INIT_INTRA_PRED_MODE[3] = {
@ -230,6 +230,9 @@ void kvz_init_contexts(encoder_state_t *state, int8_t QP, int8_t slice)
kvz_ctx_init(&cabac->ctx.split_flag_model[0], QP, INIT_SPLIT_FLAG[slice][0]); kvz_ctx_init(&cabac->ctx.split_flag_model[0], QP, INIT_SPLIT_FLAG[slice][0]);
kvz_ctx_init(&cabac->ctx.split_flag_model[1], QP, INIT_SPLIT_FLAG[slice][1]); kvz_ctx_init(&cabac->ctx.split_flag_model[1], QP, INIT_SPLIT_FLAG[slice][1]);
kvz_ctx_init(&cabac->ctx.split_flag_model[2], QP, INIT_SPLIT_FLAG[slice][2]); kvz_ctx_init(&cabac->ctx.split_flag_model[2], QP, INIT_SPLIT_FLAG[slice][2]);
// VVC Large CTU use
kvz_ctx_init(&cabac->ctx.split_flag_model[3], QP, INIT_SPLIT_FLAG[slice][3]);
kvz_ctx_init(&cabac->ctx.split_flag_model[4], QP, INIT_SPLIT_FLAG[slice][4]);
kvz_ctx_init(&cabac->ctx.intra_mode_model, QP, INIT_INTRA_PRED_MODE[slice]); kvz_ctx_init(&cabac->ctx.intra_mode_model, QP, INIT_INTRA_PRED_MODE[slice]);