Commit 32a76b95 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for LTV crash for stereo at 13.2 kbps, 32kHz in, 32kHz out, DTX on, random...

Fix for LTV crash for stereo at 13.2 kbps, 32kHz in, 32kHz out, DTX on, random FER at 5%, bandwidth switching
parent 5b294c55
Loading
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -6392,6 +6392,16 @@ void lp_gain_updt_fx(
    Word16 *lp_gainc,            /* i/o: LP-filtered code gain (FEC) Q3 */
    const Word16 L_frame         /* i  : length of the frame         */
);

void lp_gain_updt_ivas_fx(
    const Word16 i_subfr,        /* i  :  subframe number      Q0    */
    const Word16 gain_pit,       /* i  : Decoded gain pitch    Q14   */
    const Word32 norm_gain_code, /* i  : Normalised gain code   Q16  */
    Word16 *lp_gainp,            /* i/o: LP-filtered pitch gain(FEC) Q14 */
    Word16 *lp_gainc,            /* i/o: LP-filtered code gain (FEC) Q3 */
    const Word16 L_frame         /* i  : length of the frame         */
);

Word32 gain_dec_gaus_fx(                             /* o  : quantized codebook gain                Q16  */
                         Word16 index,               /* i  : quantization index                          */
                         const Word16 bits,          /* i  : number of bits to quantize                  */
+1 −1
Original line number Diff line number Diff line
@@ -708,7 +708,7 @@ ivas_error decod_gen_voic_ivas_fx(
        }

        /* update LP filtered gains for the case of frame erasures */
        lp_gain_updt_fx( i_subfr_fx, gain_pit_fx, L_add( norm_gain_code_fx, norm_gain_preQ_fx ), &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_frame );
        lp_gain_updt_ivas_fx( i_subfr_fx, gain_pit_fx, L_add( norm_gain_code_fx, norm_gain_preQ_fx ), &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_frame );

        /*----------------------------------------------------------------------*
         * Find the total excitation
+2 −2
Original line number Diff line number Diff line
@@ -864,7 +864,7 @@ void dec_pit_exc_ivas_fx(
            move16();
            pt_gain++;

            lp_gain_updt_fx( i_subfr_fx, gain_pit_fx, 0, &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, st_fx->L_frame );
            lp_gain_updt_ivas_fx( i_subfr_fx, gain_pit_fx, 0, &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, st_fx->L_frame );
        }
    }

+5 −3
Original line number Diff line number Diff line
@@ -160,15 +160,17 @@ void decod_tran_fx(
        }

        /* update LP filtered gains for the case of frame erasures */
        IF( st_fx->element_mode == EVS_MONO )
        {
            lp_gain_updt_fx( i_subfr, gain_pit_fx, L_add( norm_gain_code_fx, norm_gain_preQ_fx ), &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_frame_fx );

        IF( EQ_16( st_fx->element_mode, EVS_MONO ) )
        {
            st_fx->tilt_code_fx = est_tilt_fx( exc_fx + i_subfr, gain_pit_fx, code_fx, gain_code_fx, &voice_fac_fx, st_fx->Q_exc );
            move16();
        }
        ELSE
        {
            lp_gain_updt_ivas_fx( i_subfr, gain_pit_fx, L_add( norm_gain_code_fx, norm_gain_preQ_fx ), &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_frame_fx );

            st_fx->tilt_code_fx = est_tilt_ivas_fx( exc_fx + i_subfr, gain_pit_fx, code_fx, gain_code_fx, &voice_fac_fx, st_fx->Q_exc, L_SUBFR, 0 );
            move16();
        }
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ void decod_unvoiced_ivas_fx(

            /* update LP filtered gains for the case of frame erasures */
            // lp_gain_updt(i_subfr, gain_pit, norm_gain_code, &st->lp_gainp, &st->lp_gainc, L_FRAME);
            lp_gain_updt_fx( i_subfr_fx, gain_pit_fx, norm_gain_code_fx, &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_FRAME );
            lp_gain_updt_ivas_fx( i_subfr_fx, gain_pit_fx, norm_gain_code_fx, &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_FRAME );

            /*-------------------------------------------------------*
             * - Find the total excitation.                          *
Loading