From c982ed837aab5eb4f652266ee9b00fb82afa456c Mon Sep 17 00:00:00 2001 From: siivonek Date: Thu, 11 Aug 2022 13:55:04 +0300 Subject: [PATCH] [isp] Fix error in mts dct and idct. --- src/strategies/avx2/dct-avx2.c | 4 ++-- src/strategies/generic/dct-generic.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/strategies/avx2/dct-avx2.c b/src/strategies/avx2/dct-avx2.c index fea2256d..ada4c9fe 100644 --- a/src/strategies/avx2/dct-avx2.c +++ b/src/strategies/avx2/dct-avx2.c @@ -1601,7 +1601,7 @@ static void mts_dct_avx2( uvg_get_tr_type(width, color, tu, &type_hor, &type_ver, mts_idx); - if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx) + if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && width == height) { dct_func* dct_func = uvg_get_dct_func(width, height, color, tu->type); dct_func(bitdepth, input, output); @@ -1632,7 +1632,7 @@ static void mts_idct_avx2( uvg_get_tr_type(width, color, tu, &type_hor, &type_ver, mts_idx); - if (type_hor == DCT2 && type_ver == DCT2) + if (type_hor == DCT2 && type_ver == DCT2 && width == height) { dct_func* idct_func = uvg_get_idct_func(width, color, tu->type); idct_func(bitdepth, input, output); diff --git a/src/strategies/generic/dct-generic.c b/src/strategies/generic/dct-generic.c index 5b4c5d7e..c9074132 100644 --- a/src/strategies/generic/dct-generic.c +++ b/src/strategies/generic/dct-generic.c @@ -2504,7 +2504,7 @@ static void mts_dct_generic( // ISP_TODO: height uvg_get_tr_type(width, color, tu, &type_hor, &type_ver, mts_idx); - if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && !tu->cr_lfnst_idx || width == height) + if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && !tu->cr_lfnst_idx && width == height) { dct_func *dct_func = uvg_get_dct_func(width, height, color, tu->type); dct_func(bitdepth, input, output); @@ -2558,7 +2558,7 @@ static void mts_idct_generic( // ISP_TODO: height uvg_get_tr_type(width, color, tu, &type_hor, &type_ver, mts_idx); - if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && !tu->cr_lfnst_idx || width == height) + if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && !tu->cr_lfnst_idx && width == height) { dct_func *idct_func = uvg_get_idct_func(width, color, tu->type); idct_func(bitdepth, input, output);