Broken version with header mismatch

This commit is contained in:
Arttu Mäkinen 2019-07-04 15:26:01 +03:00 committed by Arttu Makinen
parent 06233b5d3b
commit 236224dbb9
4 changed files with 11 additions and 1 deletions

View file

@ -52,6 +52,7 @@ typedef struct
// CONTEXTS
struct {
cabac_ctx_t alf_ctb_flag_model[9];
cabac_ctx_t sao_merge_flag_model;
cabac_ctx_t sao_type_idx_model;
cabac_ctx_t split_flag_model[9]; //!< \brief split flag context models

View file

@ -379,6 +379,7 @@ void kvz_init_contexts(encoder_state_t *state, int8_t QP, int8_t slice)
for (i = 0; i < 9; i++) {
kvz_ctx_init(&cabac->ctx.split_flag_model[i], QP, INIT_SPLIT_FLAG[slice][i], INIT_SPLIT_FLAG[3][i]);
kvz_ctx_init(&cabac->ctx.alf_ctb_flag_model[i], QP, INIT_ALF_CTB_FLAG[slice][i], INIT_ALF_CTB_FLAG[3][i]);
}

View file

@ -667,6 +667,14 @@ static void encoder_state_worker_encode_lcu(void * opaque)
encode_sao(state, lcu->position.x, lcu->position.y, &frame->sao_luma[lcu->position.y * frame->width_in_lcu + lcu->position.x], &frame->sao_chroma[lcu->position.y * frame->width_in_lcu + lcu->position.x]);
}
if (encoder->cfg.alf_enable) {
cabac_data_t * const cabac = &state->cabac;
for (int component = 0; component < 1; component++) {
cabac->cur_ctx = &(cabac->ctx.alf_ctb_flag_model[component * 3]);
CABAC_BIN(cabac, 0, "alf_ctb_flag");
}
}
//Encode coding tree
kvz_encode_coding_tree(state, lcu->position.x * LCU_WIDTH, lcu->position.y * LCU_WIDTH, 0);

View file

@ -286,7 +286,7 @@ typedef struct kvz_config
int32_t framerate_denom; /*!< \brief Framerate denominator */
int32_t deblock_enable; /*!< \brief Flag to enable deblocking filter */
enum kvz_sao sao_type; /*!< \brief Flag to enable sample adaptive offset filter */
int8_t alf_enable; /*!< \brief Flag to enable advanced loop filter */
int8_t alf_enable; /*!< \brief Flag to enable adaptive loop filter */
int32_t rdoq_enable; /*!< \brief Flag to enable RD optimized quantization. */
int32_t signhide_enable; /*!< \brief Flag to enable sign hiding. */
int32_t smp_enable; /*!< \brief Flag to enable SMP blocks. */