From c7174b25cf8204f6761833485b01f9defa0d1c08 Mon Sep 17 00:00:00 2001 From: Joose Sainio Date: Tue, 1 Feb 2022 14:16:38 +0200 Subject: [PATCH] smp/amp CUs cannot be skipped --- src/search_inter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/search_inter.c b/src/search_inter.c index 0bbca858..dfd5563c 100644 --- a/src/search_inter.c +++ b/src/search_inter.c @@ -2082,7 +2082,7 @@ void kvz_cu_cost_inter_rd2(encoder_state_t * const state, double no_cbf_bits; double bits = 0; int skip_context = kvz_get_skip_context(x, y, lcu, NULL); - if (cur_cu->merged) { + if (cur_cu->merged && cur_cu->part_size == SIZE_2Nx2N) { no_cbf_bits = CTX_ENTROPY_FBITS(&state->cabac.ctx.cu_skip_flag_model[skip_context], 1); bits += CTX_ENTROPY_FBITS(&state->cabac.ctx.cu_skip_flag_model[skip_context], 0); } @@ -2110,7 +2110,7 @@ void kvz_cu_cost_inter_rd2(encoder_state_t * const state, else { // If we have no coeffs after quant we already have the cost calculated *inter_cost = no_cbf_cost; - if(cur_cu->merged) { + if(cur_cu->merged && cur_cu->part_size == SIZE_2Nx2N) { *inter_bitcost += no_cbf_bits; } return; @@ -2122,12 +2122,12 @@ void kvz_cu_cost_inter_rd2(encoder_state_t * const state, if(no_cbf_cost < *inter_cost) { cur_cu->cbf = 0; - if (cur_cu->merged) { + if (cur_cu->merged && cur_cu->part_size == SIZE_2Nx2N) { cur_cu->skipped = 1; } kvz_inter_recon_cu(state, lcu, x, y, CU_WIDTH_FROM_DEPTH(depth), true, reconstruct_chroma); *inter_cost = no_cbf_cost; - if (cur_cu->merged) { + if (cur_cu->merged && cur_cu->part_size == SIZE_2Nx2N) { *inter_bitcost += no_cbf_bits; } }