Commit 6a000e0e authored by vaclav's avatar vaclav
Browse files

port FIX_1043_JBM_MD_BUFFER

parent 2498b3d5
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@

#define NONBE_FIX_968_ISM_BRIR_WITH_HEADROTATION_5MS_FIX      /* FhG : issue #968: differences between 5ms and 20ms rendering for discrete ISM with BRIR and head rotation*/
#define FIX_969_USAN_IGF_ARITH                          /* FhG: issue 969: fix USAN error in igf_sce_dec; same issue as #962 */
#define FIX_1043_JBM_MD_BUFFER                          /* VA: issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations */

/* #################### End BASOP porting switches ############################ */

+6 −1
Original line number Diff line number Diff line
@@ -2583,7 +2583,6 @@ ivas_error ivas_init_decoder_fx(
     *-----------------------------------------------------------------*/

    IF( st_ivas->hTcBuffer == NULL )

    {
        /* no module has yet open the TC buffer, open a default one */
        n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels_fx( st_ivas );
@@ -2603,7 +2602,12 @@ ivas_error ivas_init_decoder_fx(
        }
    }

#ifdef FIX_1043_JBM_MD_BUFFER
    test();
    if ( st_ivas->hJbmMetadata == NULL && st_ivas->hDecoderConfig->Opt_tsm )
#else
    IF( st_ivas->hJbmMetadata == NULL )
#endif
    {
        IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
        {
@@ -2617,6 +2621,7 @@ ivas_error ivas_init_decoder_fx(
    /*-----------------------------------------------------------------*
     * Allocate floating-point output audio buffers
     *-----------------------------------------------------------------*/

    st_ivas->p_out_len = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
    move16();
    FOR( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ )
+10 −0
Original line number Diff line number Diff line
@@ -309,7 +309,12 @@ ivas_error ivas_jbm_dec_tc_fx(
                return error;
            }

#ifdef FIX_1043_JBM_MD_BUFFER
            test();
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && st_ivas->hDecoderConfig->Opt_tsm )
#else
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#endif
            {
                ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas );
            }
@@ -1592,7 +1597,12 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx(

        test();
        test();
#ifdef FIX_1043_JBM_MD_BUFFER
        test();
        IF( ( EQ_16( st_ivas->ivas_format, MASA_FORMAT ) || EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) && EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && st_ivas->hDecoderConfig->Opt_tsm )
#else
        IF( ( EQ_16( st_ivas->ivas_format, MASA_FORMAT ) || EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) && EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#endif
        {
            ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
        }