From 3b850299bf3bc6253bf3e6a7b02935b38940666c Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 14 Jun 2023 15:48:28 +0200 Subject: [PATCH 1/3] correct comment --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index e756e035cc..99184e1c26 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -177,7 +177,7 @@ #define ISM_16_KHZ_CORE // 1ISM 16.4 kbps: change starting bitrate of core-coder with 16kHz internal sampling rate from 17 kbps to 15.9 kbps -#define ISM_FB // 1ISM 32 kbps: change SWB to FB coding +#define ISM_FB // 1ISM 24.4 kbps: change SWB to FB coding #define ISM_25k6_HZ_CORE // 1ISM 48 kbps: change ACELP/TCX 16 kHz core to TCX only 25.6 kHz core -- GitLab From 727beb5406693d629ce91b58958ea1c6049381b3 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 15 Jun 2023 13:45:31 +0200 Subject: [PATCH 2/3] put back accidentally erased code --- lib_enc/ivas_ism_metadata_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/ivas_ism_metadata_enc.c b/lib_enc/ivas_ism_metadata_enc.c index 518ba3353a..27a4a3b0cb 100644 --- a/lib_enc/ivas_ism_metadata_enc.c +++ b/lib_enc/ivas_ism_metadata_enc.c @@ -636,7 +636,7 @@ ivas_error ivas_ism_metadata_enc( if ( ism_mode == ISM_MODE_DISC ) { #ifdef FIX_532_ISM_MD_INACTIVE - if ( ism_imp[ch] == ISM_NO_META ) + if ( ism_imp[ch] == ISM_NO_META && total_brate[ch] < ACELP_8k00 ) #else if ( hIsmMeta[ch]->ism_metadata_flag == 0 && vad_flag[ch] == 0 && ism_metadata_flag_global ) #endif -- GitLab From 9061faffeb6c23ff69800318fa6231141677af22 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 15 Jun 2023 16:32:27 +0200 Subject: [PATCH 3/3] issue 556: change SWB to FB coding in 1ISM at 24.4 kbps; under ISM_FB --- lib_com/ivas_cnst.h | 3 +++ lib_com/options.h | 6 +----- lib_dec/ivas_sce_dec.c | 4 ++++ lib_enc/bw_detect.c | 4 ++++ lib_enc/ivas_decision_matrix_enc.c | 4 ++++ 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index a4b7e1c5d5..60caf72150 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -310,6 +310,9 @@ typedef enum #define MIN_BRATE_SWB_SCE ACELP_9k60 /* min. SCE bitrate where SWB is supported */ #define MIN_BRATE_SWB_STEREO IVAS_13k2 /* min. stereo bitrate where SWB is supported */ #define MIN_BRATE_FB_STEREO IVAS_32k /* min. SCE and stereo bitrate where FB is supported */ +#ifdef ISM_FB +#define MIN_BRATE_FB_STEREO_ISM 24000 /* min. SCE bitrate where FB is supported in ISM format */ +#endif #define MIN_TDM_BRATE_WB_TBE_1k05 12000 /* min. per channel bitrate where WB TBE @1.05 kbps is supported (0.35kbs at lower bitrates) */ #define MIN_BRATE_WB_TBE_1k05 9650 /* min. per channel bitrate where WB TBE @1.05 kbps is supported (0.35kbs at lower bitrates) */ diff --git a/lib_com/options.h b/lib_com/options.h index 5188b77b37..a7ca414ec1 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -157,11 +157,7 @@ #define FIX_529_BWD_ISSUE /* VA: issue 529: fix Bandwidth Detector not working reliably for Music and Generic Audio */ - - - -#define ISM_16_KHZ_CORE // 1ISM 16.4 kbps: change starting bitrate of core-coder with 16kHz internal sampling rate from 17 kbps to 15.9 kbps -#define ISM_FB // 1ISM 24.4 kbps: change SWB to FB coding +#define ISM_FB /* issue 556: change SWB to FB coding in 1ISM at 24.4 kbps */ diff --git a/lib_dec/ivas_sce_dec.c b/lib_dec/ivas_sce_dec.c index e1472d2a37..6b4d6f61ce 100755 --- a/lib_dec/ivas_sce_dec.c +++ b/lib_dec/ivas_sce_dec.c @@ -123,7 +123,11 @@ ivas_error ivas_sce_dec( /* only WB is supported */ st->bwidth = WB; } +#ifdef ISM_FB + else if ( ( hSCE->element_brate < MIN_BRATE_FB_STEREO_ISM && st_ivas->ism_mode != ISM_MODE_NONE ) || ( hSCE->element_brate < MIN_BRATE_FB_STEREO && st_ivas->ism_mode == ISM_MODE_NONE ) ) +#else else if ( hSCE->element_brate < MIN_BRATE_FB_STEREO ) +#endif { /* WB and SWB are supported */ st->bwidth = get_next_indice( st, 1 ) + WB; diff --git a/lib_enc/bw_detect.c b/lib_enc/bw_detect.c index 9c96a851f2..92889d755e 100644 --- a/lib_enc/bw_detect.c +++ b/lib_enc/bw_detect.c @@ -587,7 +587,11 @@ void set_bw( { st->bwidth = WB; } +#ifdef ISM_FB + else if ( ( ( element_brate < MIN_BRATE_FB_STEREO_ISM && st->is_ism_format ) || ( element_brate < MIN_BRATE_FB_STEREO && !st->is_ism_format ) ) && st->bwidth > SWB ) +#else else if ( element_brate < MIN_BRATE_FB_STEREO && st->bwidth > SWB ) +#endif { st->bwidth = SWB; } diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index 8f3a9de2f1..85a94e247c 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -434,7 +434,11 @@ void ivas_signaling_enc( { /* only WB is supported */ } +#ifdef ISM_FB + else if ( ( element_brate < MIN_BRATE_FB_STEREO_ISM && st->is_ism_format ) || ( element_brate < MIN_BRATE_FB_STEREO && !st->is_ism_format ) ) +#else else if ( element_brate < MIN_BRATE_FB_STEREO ) +#endif { /* WB and SWB are supported */ ind = st->bwidth - WB; -- GitLab