From 080d583b5a91413a7a1f3ca2770b383b8b52e69b Mon Sep 17 00:00:00 2001 From: Stephane Ragot Date: Thu, 7 Aug 2025 09:48:37 +0000 Subject: [PATCH 1/4] use saturation to avoid assert --- lib_enc/cod_uv_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/cod_uv_fx.c b/lib_enc/cod_uv_fx.c index 8b1e8a144..c19b56eaa 100644 --- a/lib_enc/cod_uv_fx.c +++ b/lib_enc/cod_uv_fx.c @@ -71,7 +71,7 @@ void gauss_L2_fx( FOR( i = 0; i < L_SUBFR; i++ ) { - tmp32 = L_mac0( tmp32, y11[i], y11[i] ); /* Q18 */ + tmp32 = L_mac0_sat( tmp32, y11[i], y11[i] ); /* Q18 */ tmp32_2 = L_mac0( tmp32_2, y11[i], y2[i] ); /* Q18 */ } -- GitLab From 094db0ff5f579c3f2be78e8b05a1c35f8df5b267 Mon Sep 17 00:00:00 2001 From: "@ragot" Date: Thu, 7 Aug 2025 12:01:50 +0200 Subject: [PATCH 2/4] fix clang format --- lib_enc/cod_uv_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_enc/cod_uv_fx.c b/lib_enc/cod_uv_fx.c index c19b56eaa..7efcb04a2 100644 --- a/lib_enc/cod_uv_fx.c +++ b/lib_enc/cod_uv_fx.c @@ -71,8 +71,8 @@ void gauss_L2_fx( FOR( i = 0; i < L_SUBFR; i++ ) { - tmp32 = L_mac0_sat( tmp32, y11[i], y11[i] ); /* Q18 */ - tmp32_2 = L_mac0( tmp32_2, y11[i], y2[i] ); /* Q18 */ + tmp32 = L_mac0_sat( tmp32, y11[i], y11[i] ); /* Q18 */ + tmp32_2 = L_mac0( tmp32_2, y11[i], y2[i] ); /* Q18 */ } tmp16 = norm_l( tmp32 ); -- GitLab From 5be236c8d3932e31bed011177ef2b4444984b579 Mon Sep 17 00:00:00 2001 From: "@ragot" Date: Thu, 7 Aug 2025 13:29:18 +0200 Subject: [PATCH 3/4] fixing second basop according to suggestions in issue 1848 --- lib_enc/cod_uv_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/cod_uv_fx.c b/lib_enc/cod_uv_fx.c index 7efcb04a2..02c03f291 100644 --- a/lib_enc/cod_uv_fx.c +++ b/lib_enc/cod_uv_fx.c @@ -72,7 +72,7 @@ void gauss_L2_fx( FOR( i = 0; i < L_SUBFR; i++ ) { tmp32 = L_mac0_sat( tmp32, y11[i], y11[i] ); /* Q18 */ - tmp32_2 = L_mac0( tmp32_2, y11[i], y2[i] ); /* Q18 */ + tmp32_2 = L_mac0_sat( tmp32_2, y11[i], y2[i] ); /* Q18 */ } tmp16 = norm_l( tmp32 ); -- GitLab From 334d6cfb0381b762e04ed1e5b9f1bd15df3bb67d Mon Sep 17 00:00:00 2001 From: "@ragot" Date: Thu, 7 Aug 2025 13:32:37 +0200 Subject: [PATCH 4/4] fix clang format --- lib_enc/cod_uv_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_enc/cod_uv_fx.c b/lib_enc/cod_uv_fx.c index 02c03f291..5fb8322a3 100644 --- a/lib_enc/cod_uv_fx.c +++ b/lib_enc/cod_uv_fx.c @@ -71,8 +71,8 @@ void gauss_L2_fx( FOR( i = 0; i < L_SUBFR; i++ ) { - tmp32 = L_mac0_sat( tmp32, y11[i], y11[i] ); /* Q18 */ - tmp32_2 = L_mac0_sat( tmp32_2, y11[i], y2[i] ); /* Q18 */ + tmp32 = L_mac0_sat( tmp32, y11[i], y11[i] ); /* Q18 */ + tmp32_2 = L_mac0_sat( tmp32_2, y11[i], y2[i] ); /* Q18 */ } tmp16 = norm_l( tmp32 ); -- GitLab