Commit 92020e9b authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into 1899-basop-PortFlpMr1645

parents 495646d1 aae041ea
Loading
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -266,7 +266,11 @@ int main(
    if ( arg.hrtfReaderEnabled )
    {
        /* sanity check */
#ifdef NONBE_1293_SR_HRTF
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
#else
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
#endif
        {
            arg.hrtfReaderEnabled = false;
            fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" );
@@ -476,7 +480,19 @@ int main(
        }
    }

#ifdef FIX_VOIP_FUNCTIONS
    /*-----------------------------------------------------------------*
     * Print config information
     *-----------------------------------------------------------------*/

    if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
    }
#else
    IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode );
#endif

    /*-------------------------------------------------------------------*
     * Load renderer configuration from file
@@ -558,7 +574,7 @@ int main(

            if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                fprintf( stderr, "\nIVAS_DEC_SetRenderFramesize failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                goto cleanup;
            }

+247 −247

File changed.

Preview size limit exceeded, changes collapsed.

+5 −5
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8

    /* len = (0.5f * (pitch[2]/64.0 + pitch[3]/64.0) + 0.5f) */
#ifdef ISSUE_1836_replace_overflow_libcom
    len = mult_r( add_sat( pitch[2], pitch[3] ), 256 ); //??sat
    len = mult_r( add_sat( pitch[2], pitch[3] ), 256 );
#else
    len = mult_r( add_o( pitch[2], pitch[3], &Overflow ), 256 );
#endif
@@ -285,13 +285,13 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8
    /*add ld(2^exp1)=exp1 but check format, first*/
    tmp16 = sub( sub( 15, norm_s( exp1 ) ), 5 ); /*factor to shift Ltmp and exp1 with (shr) to avoid overflows when adding*/
#ifdef ISSUE_1836_replace_overflow_libcom
    Ltmp = L_shr_sat( Ltmp, tmp16 ); /*Q25, tmp16*/ //??sat
    Ltmp = L_shr_sat( Ltmp, tmp16 ); /*Q25, tmp16*/
#else
    Ltmp = L_shr_o( Ltmp, tmp16, &Overflow );                               /*Q25, tmp16*/
#endif
    exp2 = shr( exp1, tmp16 ); /*Q0 , tmp16*/
#ifdef ISSUE_1836_replace_overflow_libcom
    Ltmp = L_add_sat( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ) ); /*Q25, tmp16, normalized*/ //??sat
    Ltmp = L_add_sat( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ) ); /*Q25, tmp16, normalized*/
#else
    Ltmp = L_add_o( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ), &Overflow );    /*Q25, tmp16, normalized*/
#endif
@@ -299,9 +299,9 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8
    /*make 10*log10 out of log2*/
    Ltmp = Mpy_32_16_1( Ltmp, LG10 ); /*Q25,tmp16 * Q13 = Q23, tmp16*/
#ifdef ISSUE_1836_replace_overflow_libcom
    *frame_ener = extract_h( L_shl_sat( Ltmp, add( tmp16, 1 ) ) ); /*Q8*/ //??sat
    *frame_ener = extract_h( L_shl_sat( Ltmp, add( tmp16, 1 ) ) ); /*Q8*/
    move16();
    enern = sub_sat( *frame_ener, lp_speech ); /*Q8*/ //??sat
    enern = sub_sat( *frame_ener, lp_speech ); /*Q8*/
#else
    *frame_ener = extract_h( L_shl_o( Ltmp, add( tmp16, 1 ), &Overflow ) ); /*Q8*/
    move16();
+3 −3
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ Word32 get_gain( /* output: codebook gain (adaptive or fixed)
    tener = Dot_productSq16HQ( 0, y, n, &exp_e );

#ifdef ISSUE_1836_replace_overflow_libcom
    BASOP_Util_Divide_MantExp( round_fx_sat( tcorr ), exp_c, s_max( round_fx_sat( tener ), 1 ), exp_e, &tmp, &exp ); //??sat
    BASOP_Util_Divide_MantExp( round_fx_sat( tcorr ), exp_c, s_max( round_fx_sat( tener ), 1 ), exp_e, &tmp, &exp );
    Lgain = L_shl_sat( L_deposit_l( tmp ) /*Q15*/, add( 1, exp ) ) /*Q16*/; //?sat
#else
    BASOP_Util_Divide_MantExp( round_fx_o( tcorr, &Overflow ), exp_c, s_max( round_fx_o( tener, &Overflow ), 1 ), exp_e, &tmp, &exp );
@@ -140,7 +140,7 @@ Word32 get_gain2( /* output: codebook gain (adaptive or fixed)
    Q_corr = sub( Q_corr, Q_ener );

#ifdef ISSUE_1836_replace_overflow_libcom
    Lgain = L_shl_sat( L_deposit_l( m_corr ), add( Q_corr, 1 ) ); /* Lgain in Q16 */ //??sat
    Lgain = L_shl_sat( L_deposit_l( m_corr ), add( Q_corr, 1 ) ); /* Lgain in Q16 */
#else
    Lgain = L_shl_o( L_deposit_l( m_corr ), add( Q_corr, 1 ), &Overflow ); /* Lgain in Q16 */
#endif
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ void bands_and_bit_alloc_fx(

    /* To adapt current energy band to PVQ freq band for sorting*/
#ifdef ISSUE_1836_replace_overflow_libcom
    ener_vec[0] = add_sat( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1] ); /*Q12 */ //??sat
    ener_vec[0] = add_sat( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1] ); /*Q12 */
#else
    ener_vec[0] = add_o( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1], &Overflow ); /*Q12 */
#endif
Loading