mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Test c_lambda instead of CHROMA_MULT
This commit is contained in:
parent
b2076d3b39
commit
7929c4bfe5
10
src/search.c
10
src/search.c
|
@ -49,11 +49,11 @@ static const int INTRA_THRESHOLD = 8;
|
||||||
|
|
||||||
// Modify weight of luma SSD.
|
// Modify weight of luma SSD.
|
||||||
#ifndef LUMA_MULT
|
#ifndef LUMA_MULT
|
||||||
# define LUMA_MULT 0.8
|
# define LUMA_MULT 1
|
||||||
#endif
|
#endif
|
||||||
// Modify weight of chroma SSD.
|
// Modify weight of chroma SSD.
|
||||||
#ifndef CHROMA_MULT
|
#ifndef CHROMA_MULT
|
||||||
# define CHROMA_MULT 1.5
|
# define CHROMA_MULT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static INLINE void copy_cu_info(int x_local, int y_local, int width, lcu_t *from, lcu_t *to)
|
static INLINE void copy_cu_info(int x_local, int y_local, int width, lcu_t *from, lcu_t *to)
|
||||||
|
@ -209,11 +209,11 @@ static double cu_zero_coeff_cost(const encoder_state_t *state, lcu_t *work_tree,
|
||||||
LCU_WIDTH, LCU_WIDTH, cu_width
|
LCU_WIDTH, LCU_WIDTH, cu_width
|
||||||
);
|
);
|
||||||
if (x % 8 == 0 && y % 8 == 0 && state->encoder_control->chroma_format != KVZ_CSP_400) {
|
if (x % 8 == 0 && y % 8 == 0 && state->encoder_control->chroma_format != KVZ_CSP_400) {
|
||||||
ssd += CHROMA_MULT * kvz_pixels_calc_ssd(
|
ssd += state->lambda / state->c_lambda * kvz_pixels_calc_ssd(
|
||||||
&lcu->ref.u[chroma_index], &lcu->rec.u[chroma_index],
|
&lcu->ref.u[chroma_index], &lcu->rec.u[chroma_index],
|
||||||
LCU_WIDTH_C, LCU_WIDTH_C, cu_width / 2
|
LCU_WIDTH_C, LCU_WIDTH_C, cu_width / 2
|
||||||
);
|
);
|
||||||
ssd += CHROMA_MULT * kvz_pixels_calc_ssd(
|
ssd += state->lambda / state->c_lambda * kvz_pixels_calc_ssd(
|
||||||
&lcu->ref.v[chroma_index], &lcu->rec.v[chroma_index],
|
&lcu->ref.v[chroma_index], &lcu->rec.v[chroma_index],
|
||||||
LCU_WIDTH_C, LCU_WIDTH_C, cu_width / 2
|
LCU_WIDTH_C, LCU_WIDTH_C, cu_width / 2
|
||||||
);
|
);
|
||||||
|
@ -374,7 +374,7 @@ double kvz_cu_rd_cost_chroma(const encoder_state_t *const state,
|
||||||
}
|
}
|
||||||
|
|
||||||
double bits = tr_tree_bits + coeff_bits;
|
double bits = tr_tree_bits + coeff_bits;
|
||||||
return (double)ssd * CHROMA_MULT + bits * state->lambda;
|
return (double)ssd + bits * state->c_lambda;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue