Commit e7923672 authored by vaillancour's avatar vaillancour
Browse files

Merge branch 'main' into 1564_basop_PortFlpMR1476

parents bb217286 37544115
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -159,6 +159,8 @@
#define FIX_1044_ISM_REND_MEMORY                        /* VA: issue 1044: Lower the memory of the ISM renderer handle. */

#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#define FIX_1043_JBM_MD_BUFFER                          /* VA: issue  1043: JBM MD handle allocation is avoided in non-JBM EXT operations */

#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */
#define NONBE_FIX_991_PARAMBIN_BINARY_HRTF              /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */
#define FIX_1741_REVERB_TIMES_Q_FORMAT                  /* Philips: reverberation times in Q26 format instead of Q31 */
@@ -166,6 +168,9 @@
#define FIX_1835_REVERB_ACTIVATION                      /* FhG: Modified reverberation activation logic and corrected factEQ calculation */
#define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST           /* FhG: address issue 1037 */
#define FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI      /* FhG: move setting of pointers for parameter decoding so they are skipped in lost frames when they are not needed */
#define NONBE_FIX_1056_ISM_RATE_SWITCH                  /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */	
#define NONBE_FIX_1075                                  /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */
#define NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB     /* FhG: fix bug in TD MDCT-Stereo concealment */

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

+4 −0
Original line number Diff line number Diff line
@@ -1766,7 +1766,11 @@ void con_tcx_ivas_fx(

            alpha_inv = sub( 16384 /*Q.0f in Q14*/, alpha_delayed ); /*Q14*/

#ifdef NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB
            E_LPC_a_lsp_conversion( A_local, lsp_local, st->lspold_cng, M );
#else
            E_LPC_a_lsp_conversion( A_local, lsp_local, lsp_local, M );
#endif

            FOR( i = 0; i < M; i++ )
            {
+23 −1
Original line number Diff line number Diff line
@@ -2411,6 +2411,15 @@ ivas_error ivas_init_decoder_fx(
                SrcSpatial_p->q_Pos_p = Q31;
                move16();
            }
#ifdef NONBE_FIX_1075
            IF( EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )
            {
                IF( NE_32( ( error = ivas_reverb_open_fx( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ), IVAS_ERR_OK ) )
                {
                    return error;
                }
            }
#endif

            /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */
            IF( NE_32( ( error = ivas_omasa_separate_object_renderer_open( st_ivas ) ), IVAS_ERR_OK ) )
@@ -2527,6 +2536,15 @@ ivas_error ivas_init_decoder_fx(
                SrcSpatial_p->q_Pos_p = Q31;
                move16();
            }
#ifdef NONBE_FIX_1075
            IF( EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )
            {
                IF( NE_32( ( error = ivas_reverb_open_fx( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ), IVAS_ERR_OK ) )
                {
                    return error;
                }
            }
#endif
        }
    }

@@ -2653,8 +2671,12 @@ ivas_error ivas_init_decoder_fx(
            return error;
        }
    }

#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 ) )
        {
+8 −1
Original line number Diff line number Diff line
@@ -142,9 +142,16 @@ static ivas_error ivas_ism_bitrate_switching_dec_fx(
    {
        test();
        test();
#ifndef NONBE_FIX_1056_ISM_RATE_SWITCH
        test();
#endif
/* transfer subframe info from DirAC or ParamMC to central tc buffer */
#ifdef NONBE_FIX_1056_ISM_RATE_SWITCH
        /* only do this if we are not having done everything already in the TC decoding part and having only played out from the TC buffer */
        IF( EQ_32( last_ism_mode, ISM_MODE_PARAM ) && st_ivas->hSpatParamRendCom != NULL && NE_32( st_ivas->hTcBuffer->tc_buffer_mode, TC_BUFFER_MODE_BUFFER ) )
#else
        IF( EQ_32( last_ism_mode, ISM_MODE_PARAM ) && st_ivas->hSpatParamRendCom != NULL && ( NE_32( st_ivas->renderer_type, RENDERER_MONO_DOWNMIX ) && NE_32( st_ivas->renderer_type, RENDERER_DISABLE ) ) )
#endif
        {
            st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes;
            move16();
+25 −3
Original line number Diff line number Diff line
@@ -288,7 +288,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 );
            }
@@ -830,9 +835,13 @@ ivas_error ivas_jbm_dec_tc_fx(

            ivas_omasa_rearrange_channels_fx( p_output_fx, nchan_transport_ism, output_frame );
#endif

#ifdef FIX_1043_JBM_MD_BUFFER
            IF( st_ivas->hDecoderConfig->Opt_tsm )
#endif
            {
                ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas );
            }
        }
        IF( NE_16( output_q, Q11 ) )
        {
            FOR( n = 0; n < s_max( getNumChanSynthesis( st_ivas ), nchan_transport_ism + st_ivas->nchan_transport ); n++ )
@@ -1618,7 +1627,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 );
        }
@@ -1739,8 +1753,13 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx(
        IF( EQ_32( st_ivas->renderer_type, RENDERER_OMASA_MIX_EXT ) || EQ_32( st_ivas->renderer_type, RENDERER_OMASA_OBJECT_EXT ) )
        {
            ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );
#ifdef FIX_1043_JBM_MD_BUFFER
            IF( st_ivas->hDecoderConfig->Opt_tsm )
#endif
            {
                ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
            }
        }
        ELSE
        {
#endif
@@ -3828,6 +3847,9 @@ static void ivas_jbm_dec_tc_buffer_playout_fx(
        slots_to_render = sub( slots_to_render, st_ivas->hTcBuffer->subframe_nbslots[last_sf] );
        last_sf = add( last_sf, 1 );
    }
#ifdef DEBUGGING
    assert( slots_to_render == 0 );
#endif

    FOR( ch_idx = 0; ch_idx < st_ivas->hTcBuffer->nchan_transport_jbm; ch_idx++ )
    {
Loading