From 09b905c6c4f9269656f12a4d926fc8714fe9babe Mon Sep 17 00:00:00 2001 From: siivonek Date: Thu, 11 Aug 2022 14:41:21 +0300 Subject: [PATCH] [isp] Add height to get_tr_type function. --- src/strategies/avx2/dct-avx2.c | 5 +++-- src/strategies/generic/dct-generic.c | 8 +++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/strategies/avx2/dct-avx2.c b/src/strategies/avx2/dct-avx2.c index 61e08839..35890e91 100644 --- a/src/strategies/avx2/dct-avx2.c +++ b/src/strategies/avx2/dct-avx2.c @@ -1579,6 +1579,7 @@ static tr_func* idct_table[5] = { extern void uvg_get_tr_type( int8_t width, + int8_t height, color_t color, const cu_info_t* tu, tr_type_t* hor_out, @@ -1599,7 +1600,7 @@ static void mts_dct_avx2( tr_type_t type_ver; // ISP_TODO: height passed but not used - uvg_get_tr_type(width, color, tu, &type_hor, &type_ver, mts_idx); + uvg_get_tr_type(width, height, color, tu, &type_hor, &type_ver, mts_idx); if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && width == height) { @@ -1630,7 +1631,7 @@ static void mts_idct_avx2( tr_type_t type_hor; tr_type_t type_ver; - uvg_get_tr_type(width, color, tu, &type_hor, &type_ver, mts_idx); + uvg_get_tr_type(width, height, color, tu, &type_hor, &type_ver, mts_idx); if (type_hor == DCT2 && type_ver == DCT2 && width == height) { diff --git a/src/strategies/generic/dct-generic.c b/src/strategies/generic/dct-generic.c index ff221180..c790034f 100644 --- a/src/strategies/generic/dct-generic.c +++ b/src/strategies/generic/dct-generic.c @@ -2442,6 +2442,7 @@ static const tr_type_t mts_subset_intra[4][2] = { { DST7, DST7 }, { DCT8, DST7 } void uvg_get_tr_type( int8_t width, + int8_t height, color_t color, const cu_info_t* tu, tr_type_t* hor_out, @@ -2456,7 +2457,6 @@ void uvg_get_tr_type( return; } - const int height = width; const bool explicit_mts = mts_idx == UVG_MTS_BOTH || (tu->type == CU_INTRA ? mts_idx == UVG_MTS_INTRA : (mts_idx == UVG_MTS_INTER && tu->type == CU_INTER)); const bool implicit_mts = tu->type == CU_INTRA && (mts_idx == UVG_MTS_IMPLICIT || mts_idx == UVG_MTS_INTER); @@ -2501,8 +2501,7 @@ static void mts_dct_generic( tr_type_t type_hor; tr_type_t type_ver; - // ISP_TODO: height - uvg_get_tr_type(width, color, tu, &type_hor, &type_ver, mts_idx); + uvg_get_tr_type(width, height, color, tu, &type_hor, &type_ver, mts_idx); if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && !tu->cr_lfnst_idx && width == height) { @@ -2555,8 +2554,7 @@ static void mts_idct_generic( tr_type_t type_hor; tr_type_t type_ver; - // ISP_TODO: height - uvg_get_tr_type(width, color, tu, &type_hor, &type_ver, mts_idx); + uvg_get_tr_type(width, height, color, tu, &type_hor, &type_ver, mts_idx); if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && !tu->cr_lfnst_idx && width == height) {