mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
[isp] Fix mistake in cost calculation. Remove some commented out code blocks.
This commit is contained in:
parent
bbb8faea98
commit
f86dc29ce7
|
@ -1014,9 +1014,8 @@ void uvg_encode_intra_luma_coding_unit(const encoder_state_t * const state,
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Intra Subpartition mode
|
|
||||||
uint32_t width = (LCU_WIDTH >> depth);
|
uint32_t width = (LCU_WIDTH >> depth);
|
||||||
uint32_t height = (LCU_WIDTH >> depth);
|
uint32_t height = (LCU_WIDTH >> depth); // TODO: height for non-square blocks
|
||||||
|
|
||||||
// Code MIP related bits
|
// Code MIP related bits
|
||||||
bool enable_mip = state->encoder_control->cfg.mip;
|
bool enable_mip = state->encoder_control->cfg.mip;
|
||||||
|
@ -1079,10 +1078,6 @@ void uvg_encode_intra_luma_coding_unit(const encoder_state_t * const state,
|
||||||
bool allow_isp = enable_isp ? uvg_can_use_isp(width, height, 64 /*MAX_TR_SIZE*/) : false;
|
bool allow_isp = enable_isp ? uvg_can_use_isp(width, height, 64 /*MAX_TR_SIZE*/) : false;
|
||||||
uint8_t isp_mode = allow_isp ? cur_cu->intra.isp_mode : 0;
|
uint8_t isp_mode = allow_isp ? cur_cu->intra.isp_mode : 0;
|
||||||
|
|
||||||
// ToDo: add height comparison
|
|
||||||
//isp_mode += ((width > TR_MAX_WIDTH) || !enough_samples) ? 1 : 0;
|
|
||||||
//isp_mode += ((height > TR_MAX_WIDTH) || !enough_samples) ? 2 : 0;
|
|
||||||
|
|
||||||
if (allow_isp && !multi_ref_idx /*&& !bdpcm && !color_transform*/) {
|
if (allow_isp && !multi_ref_idx /*&& !bdpcm && !color_transform*/) {
|
||||||
if (isp_mode == ISP_MODE_NO_ISP) {
|
if (isp_mode == ISP_MODE_NO_ISP) {
|
||||||
CABAC_FBITS_UPDATE(cabac, &(cabac->ctx.intra_subpart_model[0]), 0, bits, "intra_subpartitions_mode");
|
CABAC_FBITS_UPDATE(cabac, &(cabac->ctx.intra_subpart_model[0]), 0, bits, "intra_subpartitions_mode");
|
||||||
|
@ -1093,23 +1088,6 @@ void uvg_encode_intra_luma_coding_unit(const encoder_state_t * const state,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//if (allow_isp && !multi_ref_idx /*&& !bdpcm && !color_transform*/) {
|
|
||||||
// if (isp_mode == ISP_MODE_NO_ISP) {
|
|
||||||
// if (isp_mode) {
|
|
||||||
// CABAC_FBITS_UPDATE(cabac, &(cabac->ctx.intra_subpart_model[0]), 0, bits, "intra_subPartitions");
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// CABAC_FBITS_UPDATE(cabac, &(cabac->ctx.intra_subpart_model[0]), 1, bits, "intra_subPartitions");
|
|
||||||
// // ToDo: complete this if-clause
|
|
||||||
// if (isp_mode == 3) {
|
|
||||||
// CABAC_FBITS_UPDATE(cabac, &(cabac->ctx.intra_subpart_model[0]), allow_isp - 1, bits, "intra_subPart_ver_hor");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
const int cu_width = LCU_WIDTH >> depth;
|
const int cu_width = LCU_WIDTH >> depth;
|
||||||
// PREDINFO CODING
|
// PREDINFO CODING
|
||||||
// If intra prediction mode is found from the predictors,
|
// If intra prediction mode is found from the predictors,
|
||||||
|
|
|
@ -567,7 +567,7 @@ static double cu_rd_cost_tr_split_accurate(
|
||||||
|
|
||||||
const bool is_isp = !(pred_cu->type == CU_INTER || pred_cu->intra.isp_mode == ISP_MODE_NO_ISP);
|
const bool is_isp = !(pred_cu->type == CU_INTER || pred_cu->intra.isp_mode == ISP_MODE_NO_ISP);
|
||||||
// Add transform_tree cbf_luma bit cost.
|
// Add transform_tree cbf_luma bit cost.
|
||||||
if (is_isp) {
|
if (!is_isp) {
|
||||||
const int is_tr_split = depth - tr_cu->depth;
|
const int is_tr_split = depth - tr_cu->depth;
|
||||||
if ((pred_cu->type == CU_INTRA ||
|
if ((pred_cu->type == CU_INTRA ||
|
||||||
is_tr_split ||
|
is_tr_split ||
|
||||||
|
|
Loading…
Reference in a new issue