From e59b48cfbb7dd1790f8e182f6e9618aa2fb796aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B4=E7=B4=A0=E8=B4=9D=E5=8F=B6=E6=96=AF?= Date: Thu, 26 Sep 2024 09:39:42 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A3=80=E8=A7=86?= =?UTF-8?q?=E6=84=8F=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朴素贝叶斯 --- Source/astcenc_compress_symbolic.cpp | 2 +- Source/astcenc_pick_best_endpoint_format.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/astcenc_compress_symbolic.cpp b/Source/astcenc_compress_symbolic.cpp index a93046a..a9b4f05 100644 --- a/Source/astcenc_compress_symbolic.cpp +++ b/Source/astcenc_compress_symbolic.cpp @@ -210,7 +210,7 @@ static bool realign_weights_undecimated( vfloat4 error_up_vec = vfloat4(error_up0, error_up1, error_up2, error_up3); vmask4 check_result_up = (error_up_vec < error_base_vec) & - (error_up_vec < error_down_vec) & (uqw_vec < vint4(64)); + (error_up_vec < error_down_vec) & (uqw_vec < vint4(64)); // 64 is the max uqw value vmask4 check_result_down = (error_down_vec < error_base_vec) & (uqw_vec > vint4::zero()); check_result_down = check_result_down & (~check_result_up); diff --git a/Source/astcenc_pick_best_endpoint_format.cpp b/Source/astcenc_pick_best_endpoint_format.cpp index d3b9f6c..aba19bb 100644 --- a/Source/astcenc_pick_best_endpoint_format.cpp +++ b/Source/astcenc_pick_best_endpoint_format.cpp @@ -317,7 +317,7 @@ static void compute_encoding_choice_errors( partition_metrics *pms = reinterpret_cast(&blk.pms[0]); - if (!blk.is_constant_channel(3) || (partition_count != 1 && privateProfile == HIGH_QUALITY_PROFILE)) + if (!blk.is_constant_channel(3) || (partition_count != 1 && privateProfile == HIGH_QUALITY_PROFILE)) // 3 : Alpha channel { compute_avgs_and_dirs_3_comp_rgb(pi, blk, pms); } -- Gitee From 435b0272cb0608282f5fbe3aa345052ae5b1cbd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B4=E7=B4=A0=E8=B4=9D=E5=8F=B6=E6=96=AF?= Date: Thu, 26 Sep 2024 11:35:57 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朴素贝叶斯 --- Source/astcenc_compress_symbolic.cpp | 1 - Source/astcenc_pick_best_endpoint_format.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/astcenc_compress_symbolic.cpp b/Source/astcenc_compress_symbolic.cpp index a9b4f05..ceeab71 100644 --- a/Source/astcenc_compress_symbolic.cpp +++ b/Source/astcenc_compress_symbolic.cpp @@ -256,7 +256,6 @@ static bool realign_weights_undecimated( float error_base = dot_s(color_diff * color_diff, error_weight); float error_down = dot_s(color_diff_down * color_diff_down, error_weight); float error_up = dot_s(color_diff_up * color_diff_up, error_weight); - // Check if the prev or next error is better, and if so use it if ((error_up < error_base) && (error_up < error_down) && (uqw < 64)) { diff --git a/Source/astcenc_pick_best_endpoint_format.cpp b/Source/astcenc_pick_best_endpoint_format.cpp index aba19bb..0612adf 100644 --- a/Source/astcenc_pick_best_endpoint_format.cpp +++ b/Source/astcenc_pick_best_endpoint_format.cpp @@ -317,7 +317,7 @@ static void compute_encoding_choice_errors( partition_metrics *pms = reinterpret_cast(&blk.pms[0]); - if (!blk.is_constant_channel(3) || (partition_count != 1 && privateProfile == HIGH_QUALITY_PROFILE)) // 3 : Alpha channel + if (!blk.is_constant_channel(3) || (partition_count != 1 && privateProfile == HIGH_QUALITY_PROFILE)) //3:Alpha channel { compute_avgs_and_dirs_3_comp_rgb(pi, blk, pms); } -- Gitee From 2884748772a5d2b3ad0d7d836803e32190970cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B4=E7=B4=A0=E8=B4=9D=E5=8F=B6=E6=96=AF?= Date: Thu, 26 Sep 2024 11:44:05 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朴素贝叶斯 --- Source/astcenc_compress_symbolic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/astcenc_compress_symbolic.cpp b/Source/astcenc_compress_symbolic.cpp index ceeab71..aa4341a 100644 --- a/Source/astcenc_compress_symbolic.cpp +++ b/Source/astcenc_compress_symbolic.cpp @@ -210,7 +210,7 @@ static bool realign_weights_undecimated( vfloat4 error_up_vec = vfloat4(error_up0, error_up1, error_up2, error_up3); vmask4 check_result_up = (error_up_vec < error_base_vec) & - (error_up_vec < error_down_vec) & (uqw_vec < vint4(64)); // 64 is the max uqw value + (error_up_vec < error_down_vec) & (uqw_vec < vint4(64)); vmask4 check_result_down = (error_down_vec < error_base_vec) & (uqw_vec > vint4::zero()); check_result_down = check_result_down & (~check_result_up); @@ -257,7 +257,7 @@ static bool realign_weights_undecimated( float error_down = dot_s(color_diff_down * color_diff_down, error_weight); float error_up = dot_s(color_diff_up * color_diff_up, error_weight); // Check if the prev or next error is better, and if so use it - if ((error_up < error_base) && (error_up < error_down) && (uqw < 64)) + if ((error_up < error_base) && (error_up < error_down) && (uqw < 64)) // 64 is the max uqw value { dec_weights_uquant[texel] = static_cast(uqw_up); adjustments = true; -- Gitee