Commit 2a2ee2ce authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'mld_deviation_fix' into 'main'

Fix for MLD deviation observed with some raw streams.

See merge request !35
parents 6e927dc8 704267f0
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -453,7 +453,7 @@ void ivas_td_decorr_get_ducking_gains_fx(
    const Word16 frame_len,
    const Word16 tdet_flag )
{
    Word16 i, q = Q15;
    Word16 i, q = Q14;
    float e_fast[L_FRAME48k], e_slow[L_FRAME48k];
    Word32 e_fast_fx[L_FRAME48k], e_slow_fx[L_FRAME48k];
    Word32 in_duck_gain = hTranDet->in_duck_gain;
+6 −6
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ void ivas_agc_dec_process_fx(
            }
        }
        pState->gain_state[i].lastGain_fx = tmp_2;
        gainLast = div_l( ONE_IN_Q30, pState->gain_state[i].lastGain_fx ); // Q14
        gainLast = div_l( ONE_IN_Q29, pState->gain_state[i].lastGain_fx ); // Q13

        IF( NE_16( pState->gain_state[i].gainExpVal, 0 ) )
        {
@@ -254,14 +254,14 @@ void ivas_agc_dec_process_fx(
                        }
                        tmp_2 = shr( tmp_2, 1 ); // Q14
                    }
                    gain = mult( tmp_2, gainLast );
                    gain = mult( tmp_2, gainLast ); // Q12
                }
                ELSE
                {
                    gain = shr( gainLast, 1 ); // Q13
                    gain = shr( gainLast, 1 ); // Q12
                }

                pcm_out[i][idx] = Mpy_32_16_1( pcm_in[i][idx], gain );
                pcm_out[i][idx] = Mpy_32_16_1( pcm_in[i][idx], gain ); // Q_pcm_out = Q_pcm_in - 3
            }

            // pState->gain_state[i].lastGain *= powf( pState->agc_com.winFunc[offset - 1], (float) pState->gain_state[i].gainExpVal );
@@ -288,10 +288,10 @@ void ivas_agc_dec_process_fx(
        }
        ELSE
        {
            gain = shr( gainLast, 1 ); // Q13
            gain = shr( gainLast, 1 ); // Q12
            FOR( idx = 0; idx < output_frame; idx++ )
            {
                pcm_out[i][idx] = Mpy_32_16_1( pcm_in[i][idx], gain );
                pcm_out[i][idx] = Mpy_32_16_1( pcm_in[i][idx], gain ); // Q_pcm_out = Q_pcm_in - 3
            }
        }
        pState->gain_data[i].absGainExp = pState->gain_data[i].absGainExpCurr;
+2 −2
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ ivas_error ivas_jbm_dec_tc(
                {
                    FOR( Word16 j = 0; j < output_frame; j++ )
                    {
                        p_output[i][j] = (float) output_fx[i][j] / ONE_IN_Q12;
                        p_output[i][j] = (float) output_fx[i][j] / ONE_IN_Q11;
                    }
                }

@@ -507,7 +507,7 @@ ivas_error ivas_jbm_dec_tc(
            {
                FOR( Word16 j = 0; j < output_frame; j++ )
                {
                    p_output[i + sba_ch_idx][j] = (float) output_fx[i][j] / ONE_IN_Q12;
                    p_output[i + sba_ch_idx][j] = (float) output_fx[i][j] / ONE_IN_Q11;
                }
            }

+1 −1
Original line number Diff line number Diff line
@@ -592,7 +592,7 @@ static void ivas_param_upmix_dec_decorr_subframes(
            {
                pPcm_tmp_fx[i] = tmp_fx[i];
                p_tc_fx[i] = tc_fx[i];
                q_format[i] = Q15;
                q_format[i] = Q14;
                FOR( j = 0; j < nSamplesToDecorr; j++ )
                {
                    pPcm_tmp_fx[i][j] = (Word32) ( pPcm_tmp[i][j] * ( 1 << q_format[i] ) );
+1 −1
Original line number Diff line number Diff line
@@ -754,7 +754,7 @@ void ivas_sba_dec_digest_tc(
                    Word32 arr_decorr_signal_fx[BINAURAL_CHANNELS][L_FRAME48k];
                    Word32 arr_tc_fx[2 * BINAURAL_CHANNELS][L_FRAME48k];
                    Word32 i, j;
                    Word16 q_format = Q15;
                    Word16 q_format = Q14;

                    FOR( i = 0; i < BINAURAL_CHANNELS; i++ )
                    {
Loading