Commit b0de82f2 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge branch...

Merge branch '798-osba-decoder-crashes-with-output-format-mc-5_1-7_1-5_1_2-and-5_1_4' into 775-osba-bitrate-switching-crashes-with-foa-and-hoa2-output-with-higher-order-input
parents 8d55242f c60d547a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@
#define NONBE_FIX_738_SBA_BR_SW_ASAN                          /* FhG: issue 738: fixes bug when switching to an MCT bitrate and previous frame was ACELP */
#define NONBE_CR_FIX_735_SBA_HP20_BRATE_SWITCHING             /* VA: Issue 735: Resolve "HP20 filtering bug in SBA/OSBA bitrate switching" */
#define NONBE_FIX_588_UPDATE_FASTCONV_SD                      /* FhG: issue 588: update FastConv SD HRTFs in CLDFB domain with new conversion method */
#define NONBE_FIX_778_TNS_UNFIED_STEREO_MSAN                  /* FhG: Issue 778: MSAN error due to uninitialized TNS configuration */

#define NONBE_FIX_798_OSBA_MC_DEC_CRASH

+3 −6
Original line number Diff line number Diff line
@@ -2215,14 +2215,11 @@ ivas_error ivas_init_decoder(

    if ( !st_ivas->hDecoderConfig->Opt_5ms )
    {
        for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas
#ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH
                                                     ,
                                                     st_ivas->sba_analysis_order,
                                                     st_ivas->hDecoderConfig->ivas_total_brate
        for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ )
#else
        for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas ); n++ )
#endif
                         );
              n++ )
        {
            /* note: these are intra-frame heap memories */
            if ( ( st_ivas->p_output_f[n] = (float *) malloc( ( 48000 / FRAMES_PER_SEC ) * sizeof( float ) ) ) == NULL )
+6 −10
Original line number Diff line number Diff line
@@ -81,13 +81,11 @@ static ivas_error ivas_ism_bitrate_switching_dec(
    st_ivas->ism_mode = last_ism_mode;
    ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old );
    st_ivas->ism_mode = ism_mode;
    nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas
#ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH
                                                     ,
                                                     st_ivas->sba_analysis_order,
                                                     st_ivas->hDecoderConfig->ivas_total_brate
    nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
#else
    nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas );
#endif
    );

    if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL, 0 ) ) != IVAS_ERR_OK )
    {
@@ -360,13 +358,11 @@ static ivas_error ivas_ism_bitrate_switching_dec(

    if ( !st_ivas->hDecoderConfig->Opt_5ms )
    {
        nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas
#ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH
                                                     ,
                                                     st_ivas->sba_analysis_order,
                                                     st_ivas->hDecoderConfig->ivas_total_brate
        nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
#else
        nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas );
#endif
        );

        if ( nchan_out_buff > nchan_out_buff_old )
        {
+3 −6
Original line number Diff line number Diff line
@@ -483,14 +483,11 @@ void ivas_mc_paramupmix_dec(
        }
    }

    for ( ch = first_empty_channel; ch < ivas_get_nchan_buffers_dec( st_ivas
#ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH
                                                                     ,
                                                                     st_ivas->sba_analysis_order,
                                                                     st_ivas->hDecoderConfig->ivas_total_brate
    for ( ch = first_empty_channel; ch < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); ch++ )
#else
    for ( ch = first_empty_channel; ch < ivas_get_nchan_buffers_dec( st_ivas ); ch++ )
#endif
                                         );
          ch++ )
    {
        set_f( output_f[ch], 0.0f, output_frame );
    }
+7 −10
Original line number Diff line number Diff line
@@ -180,13 +180,12 @@ ivas_error ivas_omasa_dec_config(
    ivas_format_orig = st_ivas->ivas_format;
    st_ivas->ivas_format = st_ivas->last_ivas_format;
    ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old );
    nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas
#ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH
                                                     ,
                                                     st_ivas->sba_analysis_order,
                                                     st_ivas->hDecoderConfig->ivas_total_brate
    nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
#else
    nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas );
#endif
    );

    st_ivas->ivas_format = ivas_format_orig;

    nSCE_old = st_ivas->nSCE;
@@ -419,13 +418,11 @@ ivas_error ivas_omasa_dec_config(

        if ( !st_ivas->hDecoderConfig->Opt_5ms )
        {
            nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas
#ifdef NONBE_FIX_798_OSBA_MC_DEC_CRASH
                                                         ,
                                                         st_ivas->sba_analysis_order,
                                                         st_ivas->hDecoderConfig->ivas_total_brate
            nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
#else
            nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
#endif
            );

            if ( nchan_out_buff > nchan_out_buff_old )
            {
Loading