mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Bug fix for reading alf type to cfg.
This commit is contained in:
parent
9d56d6444d
commit
0914864300
12
src/alf.c
12
src/alf.c
|
@ -1991,6 +1991,13 @@ void kvz_alf_enc_create(encoder_state_t * const state)
|
|||
return;
|
||||
}
|
||||
|
||||
static bool init_aps_map = true;
|
||||
if (init_aps_map)
|
||||
{
|
||||
set_aps_map(&state->encoder_control->cfg);
|
||||
init_aps_map = false;
|
||||
}
|
||||
|
||||
enum kvz_chroma_format chroma_fmt = state->encoder_control->chroma_format;
|
||||
const int pic_width = state->tile->frame->width;
|
||||
const int pic_height = state->tile->frame->height;
|
||||
|
@ -7107,10 +7114,6 @@ void determine_control_idc_values(encoder_state_t *const state, const alf_compon
|
|||
for (int x = 0; x < pic_width_c; x += ctu_width_c)
|
||||
{
|
||||
const int filter_idx_plus1 = filter_control[ctu_idx];
|
||||
|
||||
//const Position lumaPos = Position(
|
||||
// { x << getComponentScaleX(comp_id, cs.pcv->chrFormat), y << getComponentScaleY(comp_id, cs.pcv->chrFormat) });
|
||||
|
||||
code_cc_alf_filter_control_idc(state, &cabac_estimator, (filter_idx_plus1 == 0 ? 0
|
||||
: map_filter_idx_to_filter_idc[filter_idx_plus1 - 1]),
|
||||
comp_id, ctu_idx, filter_control, *cc_alf_filter_count);
|
||||
|
@ -7123,7 +7126,6 @@ void determine_control_idc_values(encoder_state_t *const state, const alf_compon
|
|||
#endif
|
||||
|
||||
// restore for next iteration
|
||||
//m_CABACEstimator->getCtx() = ctx_initial;
|
||||
memcpy(&cabac_estimator, &ctx_initial, sizeof(cabac_estimator));
|
||||
}
|
||||
|
||||
|
|
15
src/alf.h
15
src/alf.h
|
@ -177,15 +177,6 @@ static const int alf_weights_7[14] = {
|
|||
2, 2, 2, 1, 1
|
||||
};
|
||||
|
||||
/*#if !JVET_O0216_ALF_COEFF_EG3 || !JVET_O0064_SIMP_ALF_CLIP_CODING
|
||||
static const int alf_golomb_idx_7[14] = {
|
||||
0,
|
||||
0, 1, 0,
|
||||
0, 1, 2, 1, 0,
|
||||
0, 1, 2, 3, 3
|
||||
};
|
||||
#endif*/
|
||||
|
||||
//-------------------------typedef enums----------------------------
|
||||
typedef enum { ALF_FILTER_5X5 = 0, ALF_FILTER_7X7 = 1, ALF_NUM_OF_FILTER_TYPES = 2 } alf_filter_type;
|
||||
typedef enum { ALF_LUMA = 0, ALF_CHROMA = 1 } alf_type;
|
||||
|
@ -271,12 +262,6 @@ typedef struct cc_alf_filter_param {
|
|||
int number_valid_components;
|
||||
} cc_alf_filter_param;
|
||||
|
||||
/*typedef struct filter_idx_count
|
||||
{
|
||||
uint64_t count;
|
||||
uint8_t filter_idx;
|
||||
} filter_idx_count;*/
|
||||
|
||||
typedef struct alf_aps {
|
||||
int aps_id;
|
||||
int aps_type;
|
||||
|
|
|
@ -810,11 +810,8 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
|
|||
}
|
||||
else if OPT("alf") {
|
||||
int8_t alf_type = 0;
|
||||
if(!parse_enum(value, alf_names, &alf_type)) cfg->alf_type = alf_type;
|
||||
if (cfg->alf_type)
|
||||
{
|
||||
set_aps_map(cfg);
|
||||
}
|
||||
if (!parse_enum(value, alf_names, &alf_type)) alf_type = atobool(value) ? 2 : 0;
|
||||
cfg->alf_type = alf_type;
|
||||
}
|
||||
else if OPT("rdoq")
|
||||
cfg->rdoq_enable = atobool(value);
|
||||
|
|
Loading…
Reference in a new issue