From 6edf47dd14251c9f3086f09e5f4747491bbaa9ef Mon Sep 17 00:00:00 2001 From: rtyag Date: Mon, 7 Nov 2022 15:20:20 +1100 Subject: [PATCH] enabling switch FIX_I1_113 and fixes for compilation errors --- lib_com/ivas_spar_com.c | 4 ++-- lib_com/options.h | 2 +- lib_enc/ivas_mct_core_enc.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 89b59d9392..bf6e3908d5 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -2186,7 +2186,7 @@ void ivas_spar_bitrate_dist( { for ( i = 0; i < nchan_transport; i++ ) { - core_range_bits[i] = (int16_t) ( ( ivas_spar_br_table_consts[table_idx].evs_brs[i][2] - ivas_spar_br_table_consts[table_idx].evs_brs[i][0] ) / FRAMES_PER_SEC ); + core_range_bits[i] = (int16_t) ( ( ivas_spar_br_table_consts[table_idx].core_brs[i][2] - ivas_spar_br_table_consts[table_idx].core_brs[i][0] ) / FRAMES_PER_SEC ); core_bits_act[i] += min( residual_bits, core_range_bits[i] ); residual_bits -= core_range_bits[i]; @@ -2200,7 +2200,7 @@ void ivas_spar_bitrate_dist( { for ( i = 0; i < nchan_transport; i++ ) { - core_range_bits[i] = (int16_t) ( ( ivas_spar_br_table_consts[table_idx].core_brs[i][0] - ivas_spar_br_table_consts[table_idx].evs_brs[i][1] ) / FRAMES_PER_SEC ); + core_range_bits[i] = (int16_t) ( ( ivas_spar_br_table_consts[table_idx].core_brs[i][0] - ivas_spar_br_table_consts[table_idx].core_brs[i][1] ) / FRAMES_PER_SEC ); } overflow_bits = -residual_bits; diff --git a/lib_com/options.h b/lib_com/options.h index eab7ee2e60..23af39c683 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -143,7 +143,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -/*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ +#define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */ #define SPAR_STEREO_NO_DIRAC /* Issue 180: skip DirAC processing channels for stereo output */ #define AGC_TUNING_IMPROVEMENT /* Issue 168: Enable AGC for low bit rate (1 TC) */ diff --git a/lib_enc/ivas_mct_core_enc.c b/lib_enc/ivas_mct_core_enc.c index 30e7022698..4a94dee5d9 100644 --- a/lib_enc/ivas_mct_core_enc.c +++ b/lib_enc/ivas_mct_core_enc.c @@ -136,7 +136,7 @@ static void AdjustChannelRatios( force_ch_bit_ratios[2] = 5; force_ch_bit_ratios[3] = 3; #else - ivas_spar_bitrate_dist( temp_brs, nAvailBits, , sba_order, 3 ); + ivas_spar_bitrate_dist( temp_brs, nAvailBits, ivas_total_brate, sba_order, (int16_t) FB ); sum_ratio = 0.0f; for ( i = 0; i < nChannels; i++ ) -- GitLab