Commit 9b2202c1 authored by emerit's avatar emerit
Browse files

Merge branch...

Merge branch '2064-asan-crash-due-to-heap-use-after-free-in-hrtf-loading-with-binaural_room_ir' of https://forge.3gpp.org/rep/sa4/audio/ivas-basop into 2064-asan-crash-due-to-heap-use-after-free-in-hrtf-loading-with-binaural_room_ir
parents 9a8eb0ab 6ff25aaf
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3170,9 +3170,9 @@ void stereo_tcx_core_enc(
Word16 transient_analysis_ivas_fx(
    TRAN_DET_HANDLE hTranDet,  /* i  : handle transient detection       */
    const Word16 cor_map_LT[], /* i  : LT correlation map  Q_cor_map = Qx */
    Word16 Q_cor_map,
    const Word16 Q_cor_map,
    const Word16 multi_harm_limit, /* i  : multi harmonic threshold Q_multi_harm_limit = Qx */
    Word16 Q_multi_harm_limit );
    const Word16 Q_multi_harm_limit );

void set_transient_stereo_fx(
    CPE_ENC_HANDLE hCPE,  /* i  : CPE structure                           */
+5 −1
Original line number Diff line number Diff line
@@ -243,6 +243,7 @@ ivas_error ivas_dec_get_format_fx(
        ELSE IF( EQ_32( st_ivas->ivas_format, MASA_FORMAT ) )
        {
            /* read number of MASA transport channels */
            k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
            IF( st_ivas->bit_stream[k - 1] )
            {
                st_ivas->nchan_transport = 2;
@@ -312,6 +313,7 @@ ivas_error ivas_dec_get_format_fx(
            move16();

            /* the number of objects are written at the end of the bitstream */
            k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
            nchan_ism = add( add( shl( st_ivas->bit_stream[k - 1], 1 ), st_ivas->bit_stream[k - 2] ), 1 );
            st_ivas->ism_mode = ivas_omasa_ism_mode_select_fx( ivas_total_brate, nchan_ism );

@@ -330,6 +332,7 @@ ivas_error ivas_dec_get_format_fx(
        ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
        {
            /* the number of objects is written at the end of the bitstream, in the SBA metadata */
            k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
            nchan_ism = add( add( shl( st_ivas->bit_stream[k - 1], 1 ), st_ivas->bit_stream[k - 2] ), 1 );

            test();
@@ -465,6 +468,7 @@ ivas_error ivas_dec_get_format_fx(
                move16();
                BREAK;
            case SID_MASA_2TC:
                k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
                IF( st_ivas->bit_stream[k - 1 - SID_FORMAT_NBITS] == 1 )
                {
                    st_ivas->element_mode_init = IVAS_CPE_MDCT;
@@ -933,7 +937,7 @@ ivas_error ivas_dec_setup(
                st_ivas->nchan_transport = 1;
                move16();
                BREAK;
            case SID_MASA_2TC:; // empyt statement for declaration
            case SID_MASA_2TC:
                k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
                IF( EQ_16( st_ivas->bit_stream[( k - 1 ) - SID_FORMAT_NBITS], 1 ) )
                {
+2 −2
Original line number Diff line number Diff line
@@ -698,7 +698,7 @@ void core_encode_openloop_fx(
            test();
            test();
            IF( rf_PLC_Mode == 0 && hRF->rf_gain_tcx[1] != 0 &&
                ( ( st->transientDetection.transientDetector.bIsAttackPresent != 0 && LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 31785 /*0.97f Q15*/ ) ) ) ||
                ( ( st->hTranDet->transientDetector.bIsAttackPresent != 0 && LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 31785 /*0.97f Q15*/ ) ) ) ||
                  LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 29491 /*0.90f Q15*/ ) ) ) )
            {
                TD_mode = 0;
@@ -898,7 +898,7 @@ void core_acelp_tcx20_switching_fx(
                       st->pit_fr2,
                       st->pit_max,
                       st->pit_res_max,
                       &st->transientDetection,
                       st->hTranDet,
                       0,
                       A_q_tcx,
                       M );
+2 −2
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ void core_signal_analysis_high_bitrate_fx(
                           &hTcxEnc->tcxltp_pitch_int, &hTcxEnc->tcxltp_pitch_fr, &hTcxEnc->tcxltp_gain,
                           &hTcxEnc->tcxltp_pitch_int_past, &hTcxEnc->tcxltp_pitch_fr_past, &hTcxEnc->tcxltp_gain_past,
                           &hTcxEnc->tcxltp_norm_corr_past, st->last_core, st->pit_min, st->pit_fr1,
                           st->pit_fr2, st->pit_max, st->pit_res_max, &st->transientDetection,
                           st->pit_fr2, st->pit_max, st->pit_res_max, st->hTranDet,
                           tmp8, NULL, M );
    }
    ELSE
@@ -130,7 +130,7 @@ void core_signal_analysis_high_bitrate_fx(
                           &hTcxEnc->tcxltp_pitch_int, &hTcxEnc->tcxltp_pitch_fr, &hTcxEnc->tcxltp_gain,
                           &hTcxEnc->tcxltp_pitch_int_past, &hTcxEnc->tcxltp_pitch_fr_past, &hTcxEnc->tcxltp_gain_past,
                           &hTcxEnc->tcxltp_norm_corr_past, st->last_core, st->pit_min, st->pit_fr1,
                           st->pit_fr2, st->pit_max, st->pit_res_max, &st->transientDetection,
                           st->pit_fr2, st->pit_max, st->pit_res_max, st->hTranDet,
                           tmp8, NULL, M );
    }

+1 −1
Original line number Diff line number Diff line
@@ -1811,7 +1811,7 @@ void IGFEncApplyMono_fx( const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in
                   pPowerSpectrumParameterWhitening, /* i: MDCT^2 + MDST^2 spectrum, or estimate     */
                   PowerSpectrum_e,                  /* i: exponent of powerSpectrum                 */
                   igfGridIdx,                       /* i: IGF grid index                            */
                   ( st->transientDetection.transientDetector.bIsAttackPresent == 1 ),
                   ( st->hTranDet->transientDetector.bIsAttackPresent == 1 ),
                   last_core_acelp ); /* i: last frame was acelp indicator            */

    pPowerSpectrumParameter = NULL;
Loading