Loading lib_com/bitstream_fx.c +12 −9 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ static Word16 rate2AMRWB_IOmode( case ACELP_23k85: return AMRWB_IO_2385; default: break; BREAK; } return -1; Loading Loading @@ -298,7 +298,7 @@ Word16 rate2EVSmode( case HQ_128k: return PRIMARY_128000; default: break; BREAK; } if ( is_amr_wb != NULL ) Loading Loading @@ -3206,12 +3206,15 @@ Word16 find_indice( { Word16 i; for ( i = 0; i < hBstr->nb_ind_tot; i++ ) FOR( i = 0; i < hBstr->nb_ind_tot; i++ ) { if ( hBstr->ind_list[i].id == id && hBstr->ind_list[i].nb_bits > 0 ) test(); IF( EQ_16( hBstr->ind_list[i].id, id ) && hBstr->ind_list[i].nb_bits > 0 ) { *value = hBstr->ind_list[i].value; *nb_bits = hBstr->ind_list[i].nb_bits; move16(); move16(); return i; } } Loading Loading @@ -3273,7 +3276,7 @@ UWord16 delete_indice( #endif } return i - j; return sub( i, j ); } Loading Loading @@ -3949,13 +3952,13 @@ static void decoder_selectCodec( case 2800: st->codec_mode = MODE1; move16(); break; BREAK; default: /* validate that total_brate (derived from RTP packet or a file header) is one of the defined bitrates */ st->codec_mode = st->last_codec_mode; move16(); st->bfi = 1; move16(); break; BREAK; } } } Loading Loading @@ -4417,7 +4420,7 @@ void ivas_set_bitstream_pointers( num_bits = 0; /* set bitstream pointers for SCEs */ for ( k = 0; k < st_ivas->nSCE; k++ ) FOR( k = 0; k < st_ivas->nSCE; k++ ) { sts = st_ivas->hSCE[k]->hCoreCoder; sts[0]->bit_stream = st_ivas->bit_stream + num_bits; Loading @@ -4425,7 +4428,7 @@ void ivas_set_bitstream_pointers( } /* set bitstream pointers for CPEs */ for ( k = 0; k < st_ivas->nCPE; k++ ) FOR( k = 0; k < st_ivas->nCPE; k++ ) { sts = st_ivas->hCPE[k]->hCoreCoder; sts[0]->bit_stream = st_ivas->bit_stream + num_bits; Loading lib_com/fd_cng_com_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -3259,11 +3259,11 @@ void SynthesisSTFT_dirac_fx( case 640: fftScale = FFT_SCALING_640; move32(); break; BREAK; case 512: fftScale = FFT_SCALING_512; move32(); break; BREAK; default: assert( !"Not supported FFT length!" ); } Loading lib_com/ivas_mc_com_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ Word16 ivas_mc_ls_setup_get_num_channels_fx( case MC_LS_SETUP_7_1: nchan = 8; move16(); break; BREAK; case MC_LS_SETUP_5_1_2: nchan = 8; move16(); Loading lib_com/longarith.c +19 −17 Original line number Diff line number Diff line Loading @@ -62,18 +62,18 @@ void longadd( Word32 carry = 0; assert( lena >= lenb ); for ( h = 0; h < lenb; h++ ) FOR( h = 0; h < lenb; h++ ) { carry += ( (UWord32) a[h] ) + ( (UWord32) b[h] ); a[h] = (UWord16) carry; carry = carry >> 16; carry = L_shr( carry, 16 ); } for ( ; h < lena; h++ ) FOR( ; h < lena; h++ ) { carry = ( (UWord32) a[h] ) + carry; a[h] = (UWord16) carry; carry = carry >> 16; carry = L_shr( carry, 16 ); } assert( carry == 0 ); /* carry != 0 indicates addition overflow */ Loading Loading @@ -106,26 +106,26 @@ void longshiftright( lena -= intb; fracb = b & 0xF; if ( fracb ) IF( fracb ) { fracb_u = 16 - fracb; for ( k = 0; k < lena - 1; k++ ) FOR( k = 0; k < lena - 1; k++ ) { d[k] = ( ( a[k] >> fracb ) | ( a[k + 1] << fracb_u ) ) & 0xFFFF; } d[k] = ( a[k] >> fracb ); k++; } else ELSE { for ( k = 0; k < lena; k++ ) FOR( k = 0; k < lena; k++ ) { d[k] = a[k]; } } /* fill remaining upper bits with zero */ for ( ; k < lend; k++ ) FOR( ; k < lend; k++ ) { d[k] = 0; } Loading Loading @@ -175,30 +175,32 @@ void longshiftleft( Word16 fracb_l; /* shift right value for all lower words a[k-1] */ Word16 k = len - 1; intb = b >> 4; intb = shr( b, 4 ); fracb = b & 0xF; if ( fracb ) IF( fracb ) { fracb_l = 16 - fracb; for ( ; k > intb; k-- ) FOR( ; k > intb; k-- ) { d[k] = ( a[k - intb] << fracb ) | ( a[k - intb - 1] >> fracb_l ); d[k] = ( shl( a[k - intb], fracb ) ) | ( shr( a[k - intb - 1], fracb_l ) ); } d[k] = ( a[k - intb] << fracb ); d[k] = shl( a[k - intb], fracb ); k--; } else ELSE { for ( ; k >= intb; k-- ) FOR( ; k >= intb; k-- ) { d[k] = a[k - intb]; move16(); } } for ( ; k >= 0; k-- ) FOR( ; k >= 0; k-- ) { d[k] = 0; move16(); } return; Loading lib_com/options.h +5 −0 Original line number Diff line number Diff line Loading @@ -93,8 +93,12 @@ #define FIX_BASOP_2475_ASSERT_IN_MASA2_REND_TO_MONO /* Nokia: basop issue 2475: Fix MASA2 to MONO rendering within IVAS_rend */ #define FIX_2346_DUPLICATED_IGF_FUNCTIONS /* FhG: basop issue 2346: Review potentially duplicated IGF functions */ #define FIX_1525_UNINIT_FORMAT_SWITCHING_DEC /* VA: float issue 1525: fix reading of uninitialized memory in format switching at the decoder */ #define FIX_BASOP_2457_HARM_GEN /* FhG: harmonization of function generate_comfort_noise_dec_hf_ivas_fx()*/ #define HARMONIZE_2446_CON_TCX_FX /* FhG: basop issue: 2446 harmonization of function con_tcx_fx() */ #define FIX_BASOP_2478_HARM_ENC_PRM_HM /* FhG: basop issue 2478: harmonize enc_prm_hm() and enc_prm_hm_ivas_fx() */ #define FIX_2433_ARITH_OVERFLOW_IN_QMETA_ENC /* Nokia: Fix to convert non-converted binary operations */ #define FIX_2455_HARMONIZE_generate_comfort_noise_enc /* FhG: harmonize generate_comfort_noise_enc and generate_comfort_noise_enc_ivas */ #define FIX_2455_HARMONIZE_configureFdCngEnc /* FhG: harmonize generate_comfort_noise_enc and generate_comfort_noise_enc_ivas */ #define HARMONIZE_2481_EXTEND_SHRINK /* FhG: basop issue 2481 Harmonizing functions extend_frm_*fx() and shrink_frm_*fx */ /* #################### End BE switches ################################## */ Loading @@ -110,6 +114,7 @@ #define FIX_BASOP_2472_IGF_SP_AUD_DEC_CHAN /* FhG: always use channel 1 for sp_aud_decision0[] being passed to ProcessIGF_ivas_fx() */ #define FIX_BASOP_REMOVE_SYNTH2_FX /* FhG: Replace 32bit olapBufferSynth2_fx with 16bit olapBufferSynth2 buffer */ #define FIX_FLOAT_1528_5MS_REND_ISM_META_DELAY_COMPENSATION /* Nokia: float issue 1528: Fixes incorrect compensation for ISM metadata delay in 5ms TD rendering */ #define FIX_2398_PRECISSION_ORIENTATION_TRACKING /* FhG: use refinement of Sqrt32 within certain functions*/ #define FIX_2462_PARCOR_FIX /* VA: issue 2462: Fix bug in calculating parcor coefficient in Calc_rc0_h() */ /* ##################### End NON-BE switches ########################### */ Loading Loading
lib_com/bitstream_fx.c +12 −9 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ static Word16 rate2AMRWB_IOmode( case ACELP_23k85: return AMRWB_IO_2385; default: break; BREAK; } return -1; Loading Loading @@ -298,7 +298,7 @@ Word16 rate2EVSmode( case HQ_128k: return PRIMARY_128000; default: break; BREAK; } if ( is_amr_wb != NULL ) Loading Loading @@ -3206,12 +3206,15 @@ Word16 find_indice( { Word16 i; for ( i = 0; i < hBstr->nb_ind_tot; i++ ) FOR( i = 0; i < hBstr->nb_ind_tot; i++ ) { if ( hBstr->ind_list[i].id == id && hBstr->ind_list[i].nb_bits > 0 ) test(); IF( EQ_16( hBstr->ind_list[i].id, id ) && hBstr->ind_list[i].nb_bits > 0 ) { *value = hBstr->ind_list[i].value; *nb_bits = hBstr->ind_list[i].nb_bits; move16(); move16(); return i; } } Loading Loading @@ -3273,7 +3276,7 @@ UWord16 delete_indice( #endif } return i - j; return sub( i, j ); } Loading Loading @@ -3949,13 +3952,13 @@ static void decoder_selectCodec( case 2800: st->codec_mode = MODE1; move16(); break; BREAK; default: /* validate that total_brate (derived from RTP packet or a file header) is one of the defined bitrates */ st->codec_mode = st->last_codec_mode; move16(); st->bfi = 1; move16(); break; BREAK; } } } Loading Loading @@ -4417,7 +4420,7 @@ void ivas_set_bitstream_pointers( num_bits = 0; /* set bitstream pointers for SCEs */ for ( k = 0; k < st_ivas->nSCE; k++ ) FOR( k = 0; k < st_ivas->nSCE; k++ ) { sts = st_ivas->hSCE[k]->hCoreCoder; sts[0]->bit_stream = st_ivas->bit_stream + num_bits; Loading @@ -4425,7 +4428,7 @@ void ivas_set_bitstream_pointers( } /* set bitstream pointers for CPEs */ for ( k = 0; k < st_ivas->nCPE; k++ ) FOR( k = 0; k < st_ivas->nCPE; k++ ) { sts = st_ivas->hCPE[k]->hCoreCoder; sts[0]->bit_stream = st_ivas->bit_stream + num_bits; Loading
lib_com/fd_cng_com_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -3259,11 +3259,11 @@ void SynthesisSTFT_dirac_fx( case 640: fftScale = FFT_SCALING_640; move32(); break; BREAK; case 512: fftScale = FFT_SCALING_512; move32(); break; BREAK; default: assert( !"Not supported FFT length!" ); } Loading
lib_com/ivas_mc_com_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ Word16 ivas_mc_ls_setup_get_num_channels_fx( case MC_LS_SETUP_7_1: nchan = 8; move16(); break; BREAK; case MC_LS_SETUP_5_1_2: nchan = 8; move16(); Loading
lib_com/longarith.c +19 −17 Original line number Diff line number Diff line Loading @@ -62,18 +62,18 @@ void longadd( Word32 carry = 0; assert( lena >= lenb ); for ( h = 0; h < lenb; h++ ) FOR( h = 0; h < lenb; h++ ) { carry += ( (UWord32) a[h] ) + ( (UWord32) b[h] ); a[h] = (UWord16) carry; carry = carry >> 16; carry = L_shr( carry, 16 ); } for ( ; h < lena; h++ ) FOR( ; h < lena; h++ ) { carry = ( (UWord32) a[h] ) + carry; a[h] = (UWord16) carry; carry = carry >> 16; carry = L_shr( carry, 16 ); } assert( carry == 0 ); /* carry != 0 indicates addition overflow */ Loading Loading @@ -106,26 +106,26 @@ void longshiftright( lena -= intb; fracb = b & 0xF; if ( fracb ) IF( fracb ) { fracb_u = 16 - fracb; for ( k = 0; k < lena - 1; k++ ) FOR( k = 0; k < lena - 1; k++ ) { d[k] = ( ( a[k] >> fracb ) | ( a[k + 1] << fracb_u ) ) & 0xFFFF; } d[k] = ( a[k] >> fracb ); k++; } else ELSE { for ( k = 0; k < lena; k++ ) FOR( k = 0; k < lena; k++ ) { d[k] = a[k]; } } /* fill remaining upper bits with zero */ for ( ; k < lend; k++ ) FOR( ; k < lend; k++ ) { d[k] = 0; } Loading Loading @@ -175,30 +175,32 @@ void longshiftleft( Word16 fracb_l; /* shift right value for all lower words a[k-1] */ Word16 k = len - 1; intb = b >> 4; intb = shr( b, 4 ); fracb = b & 0xF; if ( fracb ) IF( fracb ) { fracb_l = 16 - fracb; for ( ; k > intb; k-- ) FOR( ; k > intb; k-- ) { d[k] = ( a[k - intb] << fracb ) | ( a[k - intb - 1] >> fracb_l ); d[k] = ( shl( a[k - intb], fracb ) ) | ( shr( a[k - intb - 1], fracb_l ) ); } d[k] = ( a[k - intb] << fracb ); d[k] = shl( a[k - intb], fracb ); k--; } else ELSE { for ( ; k >= intb; k-- ) FOR( ; k >= intb; k-- ) { d[k] = a[k - intb]; move16(); } } for ( ; k >= 0; k-- ) FOR( ; k >= 0; k-- ) { d[k] = 0; move16(); } return; Loading
lib_com/options.h +5 −0 Original line number Diff line number Diff line Loading @@ -93,8 +93,12 @@ #define FIX_BASOP_2475_ASSERT_IN_MASA2_REND_TO_MONO /* Nokia: basop issue 2475: Fix MASA2 to MONO rendering within IVAS_rend */ #define FIX_2346_DUPLICATED_IGF_FUNCTIONS /* FhG: basop issue 2346: Review potentially duplicated IGF functions */ #define FIX_1525_UNINIT_FORMAT_SWITCHING_DEC /* VA: float issue 1525: fix reading of uninitialized memory in format switching at the decoder */ #define FIX_BASOP_2457_HARM_GEN /* FhG: harmonization of function generate_comfort_noise_dec_hf_ivas_fx()*/ #define HARMONIZE_2446_CON_TCX_FX /* FhG: basop issue: 2446 harmonization of function con_tcx_fx() */ #define FIX_BASOP_2478_HARM_ENC_PRM_HM /* FhG: basop issue 2478: harmonize enc_prm_hm() and enc_prm_hm_ivas_fx() */ #define FIX_2433_ARITH_OVERFLOW_IN_QMETA_ENC /* Nokia: Fix to convert non-converted binary operations */ #define FIX_2455_HARMONIZE_generate_comfort_noise_enc /* FhG: harmonize generate_comfort_noise_enc and generate_comfort_noise_enc_ivas */ #define FIX_2455_HARMONIZE_configureFdCngEnc /* FhG: harmonize generate_comfort_noise_enc and generate_comfort_noise_enc_ivas */ #define HARMONIZE_2481_EXTEND_SHRINK /* FhG: basop issue 2481 Harmonizing functions extend_frm_*fx() and shrink_frm_*fx */ /* #################### End BE switches ################################## */ Loading @@ -110,6 +114,7 @@ #define FIX_BASOP_2472_IGF_SP_AUD_DEC_CHAN /* FhG: always use channel 1 for sp_aud_decision0[] being passed to ProcessIGF_ivas_fx() */ #define FIX_BASOP_REMOVE_SYNTH2_FX /* FhG: Replace 32bit olapBufferSynth2_fx with 16bit olapBufferSynth2 buffer */ #define FIX_FLOAT_1528_5MS_REND_ISM_META_DELAY_COMPENSATION /* Nokia: float issue 1528: Fixes incorrect compensation for ISM metadata delay in 5ms TD rendering */ #define FIX_2398_PRECISSION_ORIENTATION_TRACKING /* FhG: use refinement of Sqrt32 within certain functions*/ #define FIX_2462_PARCOR_FIX /* VA: issue 2462: Fix bug in calculating parcor coefficient in Calc_rc0_h() */ /* ##################### End NON-BE switches ########################### */ Loading