Commit 567b85c3 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for LTV crash issues observed with OMASA format after BASOP changes

[x] Fix for ltv-OMASA 1Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start
24.4 kbps, 32kHz in, 48kHz out, 5.1.4 out crash.
parent 77409e44
Loading
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -151,13 +151,22 @@ void tdm_configure_dec(
    Word16 mod_ct, core, bits_offset;
    Word16 idx_LRTD_pri_side, tdm_inst_ratio_idx;
    Word32 element_brate_adapt;
    Word16 bstr_last_pos;
    Word16 bstr_last_pos, temp;

    hStereoTD = hCPE->hStereoTD;
    sts = hCPE->hCoreCoder;

    element_brate_adapt = L_add( hCPE->element_brate, hCPE->brate_surplus );
    bstr_last_pos = add( sub( div_l( hCPE->element_brate, FRAMES_PER_SEC / 2 ), nb_bits_metadata ), div_l( hCPE->brate_surplus, FRAMES_PER_SEC / 2 ) );

    IF( hCPE->brate_surplus < 0 )
    {
        temp = extract_l( L_negate( Mpy_32_32( L_abs( hCPE->brate_surplus ), ONE_BY_FRAMES_PER_SEC_Q31 ) ) );
    }
    ELSE
    {
        temp = extract_l( Mpy_32_32( hCPE->brate_surplus, ONE_BY_FRAMES_PER_SEC_Q31 ) );
    }
    bstr_last_pos = add( sub( div_l( hCPE->element_brate, FRAMES_PER_SEC / 2 ), nb_bits_metadata ), temp );

    /*----------------------------------------------------------------*
     * Decode CoreCoder signaling