Commit 8437671e authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'spectral_holes_fix_ltv_crash_fix' into 'main'

Fix for spectral holes by rearranging LPC to LSF conversion, LTV crash issue fix

See merge request !1811
parents da5e41e6 b30ef4a8
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -661,7 +661,7 @@ Word16 inov_encode_ivas_fx(
                            {
                                FOR( k = 0; k < L_SUBFR - i; k++ )
                                {
                                    y2[i + k] = add_sat( y2[i + k], round_fx( L_shl( L_mult( code[i], h2[k] ), sh ) ) ); // Q9 Added saturation: needs to be rechecked
                                    y2[i + k] = add_sat( y2[i + k], round_fx_sat( L_shl_sat( L_mult( code[i], h2[k] ), sh ) ) ); // Q9 Added saturation: needs to be rechecked
                                    move16();
                                }
                            }
+8 −8
Original line number Diff line number Diff line
@@ -3107,6 +3107,14 @@ void swb_tbe_enc_ivas_fx(

    /* stab_check = a2lsp( lsf_shb, lpc_shb, LPC_SHB_ORDER ); */

    /* LPC to LSP conversion */
    /* LPC: Q12, LSP: Q15 */
    E_LPC_a_lsp_conversion( lpc_shb_fx, lsp_shb_fx, hBWE_TD->prev_lsp_shb_fx, LPC_SHB_ORDER );

    /* LSP to LSF conversion */
    /* LSP: Q15, LSF: Q15 */
    E_LPC_lsp_lsf_conversion( lsp_shb_fx, lsf_shb_fx, LPC_SHB_ORDER );

    test();
    test();
    IF( ( NE_16( st_fx->last_extl, SWB_TBE ) && NE_16( st_fx->last_extl, FB_TBE ) ) || st_fx->ini_frame == 0 )
@@ -3124,14 +3132,6 @@ void swb_tbe_enc_ivas_fx(
    //     mvr2r( hBWE_TD->prev_lsp_shb, lsf_shb, LPC_SHB_ORDER );
    // }

    /* LPC to LSP conversion */
    /* LPC: Q12, LSP: Q15 */
    E_LPC_a_lsp_conversion( lpc_shb_fx, lsp_shb_fx, hBWE_TD->prev_lsp_shb_fx, LPC_SHB_ORDER );

    /* LSP to LSF conversion */
    /* LSP: Q15, LSF: Q15 */
    E_LPC_lsp_lsf_conversion( lsp_shb_fx, lsf_shb_fx, LPC_SHB_ORDER );

    Copy( lsp_shb_fx, hBWE_TD->prev_lsp_shb_fx, LPC_SHB_ORDER );
    Copy( lsf_shb_fx, lsf_shb_orig_fx, LPC_SHB_ORDER );