Reset CBFs because CBFs might have been set earlier for depth earlier.

This commit is contained in:
Ari Lemmetti 2019-08-16 19:47:16 +03:00
parent a80de22bc7
commit 800fc8644d
2 changed files with 22 additions and 0 deletions

View file

@ -665,7 +665,18 @@ void kvz_intra_recon_cu(
cur_cu = LCU_GET_CU_AT_PX(lcu, lcu_px.x, lcu_px.y); cur_cu = LCU_GET_CU_AT_PX(lcu, lcu_px.x, lcu_px.y);
} }
// Reset CBFs because CBFs might have been set
// for depth earlier
if (mode_luma >= 0) {
cbf_clear(&cur_cu->cbf, depth, COLOR_Y);
}
if (mode_chroma >= 0) {
cbf_clear(&cur_cu->cbf, depth, COLOR_U);
cbf_clear(&cur_cu->cbf, depth, COLOR_V);
}
if (depth == 0 || cur_cu->tr_depth > depth) { if (depth == 0 || cur_cu->tr_depth > depth) {
const int offset = width / 2; const int offset = width / 2;
const int32_t x2 = x + offset; const int32_t x2 = x + offset;
const int32_t y2 = y + offset; const int32_t y2 = y + offset;

View file

@ -445,7 +445,18 @@ void kvz_quantize_lcu_residual(encoder_state_t * const state,
width == 32 || width == 32 ||
width == 64); width == 64);
// Reset CBFs because CBFs might have been set
// for depth earlier
if (luma) {
cbf_clear(&cur_pu->cbf, depth, COLOR_Y);
}
if (chroma) {
cbf_clear(&cur_pu->cbf, depth, COLOR_U);
cbf_clear(&cur_pu->cbf, depth, COLOR_V);
}
if (depth == 0 || cur_pu->tr_depth > depth) { if (depth == 0 || cur_pu->tr_depth > depth) {
// Split transform and increase depth // Split transform and increase depth
const int offset = width / 2; const int offset = width / 2;
const int32_t x2 = x + offset; const int32_t x2 = x + offset;