Commit f52dbd2a authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_BASOP_1765_MASA1TC_CNG_MISMATCH

parent 44353713
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -2720,19 +2720,14 @@ Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with un
                               const Word16 *bufY16, /* i: 16-bit buffer quite right-aligned   */
                               Word16 bufY16_exp,    /* i: exponent of buffer bufY16           */
                               Word16 len,           /* i: buffer len to process               */
#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH
                               Word16 *exp,           /* o: result exponent                     */
                               const Word16 is_ivas ) /* i: flag indicating IVAS to maintain EVS BE */
#else
                               Word16 *exp ) /* o: result exponent                     */
#endif
{
    Word32 L_sum;
    Word16 shift, shift1, i;


    shift = getScaleFactor32( bufX32, len ); /* current available headroom */
#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH
    IF( EQ_16( is_ivas, 1 ) )
    {
        shift = sub( shift, sub( 15, norm_s( len ) ) ); /* reduced required headroom  */
@@ -2741,14 +2736,10 @@ Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with un
    {
        shift = sub( shift, sub( 14, norm_s( len ) ) ); /* reduced required headroom  */
    }
#else
    shift = sub( shift, sub( 14, norm_s( len ) ) ); /* reduced required headroom  */
#endif
    L_sum = 0; /* Clear accu                 */
    move32();
    FOR( i = 0; i < len; i++ )
    {
#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH
        IF( EQ_16( is_ivas, 1 ) )
        {
            L_sum = L_add( L_sum, Mpy_32_16_1( L_shl( bufX32[i], shift ), bufY16[i] ) );
@@ -2757,22 +2748,15 @@ Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with un
        {
            L_sum = L_mac0( L_sum, round_fx( L_shl( bufX32[i], shift ) ), bufY16[i] );
        }
#else
        L_sum = L_mac0( L_sum, round_fx( L_shl( bufX32[i], shift ) ), bufY16[i] );
#endif
    }
    shift1 = norm_l( L_sum );
    L_sum = L_shl( L_sum, shift1 ); /* return value */

    shift = sub( add( bufX32_exp, bufY16_exp ), add( shift, shift1 ) );
#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH
    IF( EQ_16( is_ivas, 0 ) )
    {
        shift = add( shift, 1 ); /* compensate for factor of 2 introduced by L_mac0 */
    }
#else
    shift = add( shift, 1 ); /* compensate for factor of 2 introduced by L_mac0 */
#endif
    /* In case of NULL result, we want to have a 0 exponent too */
    if ( L_sum == 0 )
        shift = 0;
+0 −4
Original line number Diff line number Diff line
@@ -864,12 +864,8 @@ Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with un
                               const Word16 *bufY16, /* i: 16-bit buffer quite right-aligned   */
                               Word16 bufY16_exp,    /* i: exponent of buffer bufY16           */
                               Word16 len,           /* i: buffer len to process               */
#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH
                               Word16 *exp,            /* o: result exponent                     */
                               const Word16 is_ivas ); /* i: flag indicating IVAS to maintain EVS BE */
#else
                               Word16 *exp ); /* o: result exponent                     */
#endif

/*!**********************************************************************
   \brief   Converts linear factor or energy to Decibel
+0 −1
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define FIX_FLOAT_1600_OMASA_WRONG_RENDER_PATH          /* Nokia: float issue 1600: fix initialization condition of stereo type detection for OMASA */
#define FIX_BASOP_1765_MASA1TC_CNG_MISMATCH             /* Nokia: BASOP issue 1765: Improve accuracy of FD CNG noise estimation */
#define FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP           /* FhG: BASOP #2627: accumulate 10^(ILD/10) using a dynamic exponent */
#define FIX_BASOP_2635_EFAP_ADD_VERTEX_ELE_ROUND        /* FhG: BASOP #2635: round |elevation| with anint_fx before the 90deg subtraction in add_vertex_fx */

+0 −4
Original line number Diff line number Diff line
@@ -6420,12 +6420,8 @@ void noisy_speech_detection_fx(
    HANDLE_FD_CNG_DEC hFdCngDec, /* i/o: FD_CNG structure            */
    const Word16 vad,            /* i  : VAD flag                    */
    const Word16 *syn,           /* i  : i   time-domain frame       */
#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH
    const Word16 Q,
    const Word16 is_ivas );
#else
    const Word16 Q );
#endif

void generate_comfort_noise_dec_fx(
    Word32 **bufferReal, /* o   : matrix to real part of i   bands */
+0 −4
Original line number Diff line number Diff line
@@ -1549,7 +1549,6 @@ ivas_error acelp_core_dec_fx(
            IF( st->idchan == 0 && ( st->flag_cna || ( EQ_16( st->cng_type, FD_CNG ) && LE_32( st->total_brate, ACELP_32k ) ) || ( st->cng_type == LP_CNG && LE_32( st->core_brate, SID_2k40 ) ) ) )
            {
                /*Noisy speech detector*/
#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH
                IF( NE_16( st->element_mode, EVS_MONO ) )
                {
                    noisy_speech_detection_fx( st->hFdCngDec, st->VAD, psyn_fx, st->Q_syn, 1 );
@@ -1558,9 +1557,6 @@ ivas_error acelp_core_dec_fx(
                {
                    noisy_speech_detection_fx( st->hFdCngDec, st->VAD, psyn_fx, st->Q_syn, 0 );
                }
#else
                noisy_speech_detection_fx( st->hFdCngDec, st->VAD, psyn_fx, st->Q_syn );
#endif

                st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = mult_r( st->hFdCngDec->hFdCngCom->likelihood_noisy_speech, 32440 /*0.99 Q15*/ );
                move16();
Loading