From b69e9b29583e44e5af977b1183f5d6260489178a Mon Sep 17 00:00:00 2001 From: Joose Sainio Date: Wed, 14 Dec 2022 08:37:06 +0200 Subject: [PATCH] [mtt] Fix final issues? --- src/encode_coding_tree.c | 2 +- src/global.h | 2 +- src/intra.c | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/encode_coding_tree.c b/src/encode_coding_tree.c index 3be715d4..65efa06e 100644 --- a/src/encode_coding_tree.c +++ b/src/encode_coding_tree.c @@ -1439,7 +1439,7 @@ void uvg_encode_coding_tree( DBG_YUVIEW_VALUE(state->frame->poc, DBG_YUVIEW_CU_TYPE, abs_x, abs_y, cu_width, cu_height, cur_cu->type-1); - fprintf(stderr, "%4d %4d %2d %2d %d %d\n", x, y, cu_width, cu_height, has_chroma, cur_cu->split_tree); + // fprintf(stderr, "%4d %4d %2d %2d %d %d\n", x, y, cu_width, cu_height, has_chroma, cur_cu->split_tree); if (ctrl->cfg.lossless) { cabac->cur_ctx = &cabac->ctx.cu_transquant_bypass; diff --git a/src/global.h b/src/global.h index 27058463..972b7e82 100644 --- a/src/global.h +++ b/src/global.h @@ -129,7 +129,7 @@ typedef int16_t coeff_t; typedef int32_t mv_t; //#define VERBOSE 1 -#define UVG_DEBUG_PRINT_CABAC 1 +//#define UVG_DEBUG_PRINT_CABAC 1 //#define UVG_DEBUG 1 //#define UVG_DEBUG_PRINT_YUVIEW_CSV 1 diff --git a/src/intra.c b/src/intra.c index e39878df..4b6d056a 100644 --- a/src/intra.c +++ b/src/intra.c @@ -551,11 +551,8 @@ static void predict_cclm( const uvg_pixel *y_rec = lcu->rec.y + x_scu + y_scu * LCU_WIDTH; const int stride2 = (((state->tile->frame->width + 7) & ~7) + FRAME_PADDING_LUMA); - // Essentially what this does is that it uses 6-tap filtering to downsample - // the luma intra references down to match the resolution of the chroma channel. - // The luma reference is only needed when we are not on the edge of the picture. - // Because the reference pixels that are needed on the edge of the ctu this code - // is kinda messy but what can you do + tree_type = state->encoder_control->cfg.dual_tree && state->frame->slicetype == UVG_SLICE_I ? tree_type : UVG_BOTH_T; + const int ctu_size = tree_type == UVG_CHROMA_T ? LCU_WIDTH_C : LCU_WIDTH; if (y0) {