Commit 631d0f5e authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into...

Merge remote-tracking branch 'remotes/origin/main' into 1309-object-editing-crash-when-debugging-is-activated
parents aafea5cc 98c8bc51
Loading
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -656,6 +656,13 @@ void ivas_renderer_select(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);

#ifdef NONBE_1303_REND_GRANULARITY
/*! r: secondary binaural renderer type */
RENDERER_TYPE ivas_renderer_secondary_select(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);

#endif
ivas_error ivas_mc_enc_config(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
);
@@ -885,10 +892,16 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode(

/*! r: render granularity */
int16_t ivas_jbm_dec_get_render_granularity(
#ifdef NONBE_1303_REND_GRANULARITY
    const RENDERER_TYPE renderer_type,                          /* i  : renderer type                                               */
    const RENDERER_TYPE renderer_type_sec,                      /* i  : secondary renderer type                                     */
    const int32_t output_Fs                                     /* i  : sampling rate                                               */
#else
    const RENDERER_TYPE rendererType, /* i  : renderer type     */
    const IVAS_FORMAT ivas_format,    /* i  : ivas format */
    const MC_MODE mc_mode,            /* i  : MC mode */
    const int32_t output_Fs           /* i  : sampling rate     */
#endif
);

ivas_error ivas_jbm_dec_tc_buffer_open(
+2 −0
Original line number Diff line number Diff line
@@ -180,6 +180,8 @@
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_1296_TDREND_ITD_OUT_OF_BOUNDS_ACCESS      /* Eri: issue 1296: ITD resampling can occasionally read out of bounds, especially when the requested subframes are short (1.25 ms). Seen for headtracking+JBM. */
#define NONBE_1303_GRANULARITY_OSBA_REND                /* VA: issue 1303: Correctly set the granularity in OSBA, Disc mode, and BINAURAL_ROOM_REVERB output */
#define NONBE_1118_EVS_LR_HQ_BITERROR                   /* VA: issue 1118: fix EVS decoder crash in LR-HQ in case of bit errors */
#define NONBE_1303_REND_GRANULARITY                     /* VA: issue 1303: Renderer granularity revision */

/* ##################### End NON-BE switches ########################### */

+20 −0
Original line number Diff line number Diff line
@@ -635,10 +635,30 @@ void hq_lr_dec(

            IF( sub( i, highband ) >= 0 )
            {
#ifdef NONBE_1118_EVS_LR_HQ_BITERROR
                /* safety check in case of bit errors */
                if ( Ep_fx[i] > 536788991 /* max(Q30) */ )
                {
                    st->BER_detect = 1;
                    set_f( yout, 0, inner_frame );
                    return;
                }

#endif
                enerH_fx = L_add( enerH_fx, L_shl( Ep_fx[i], 2 ) ); /*Q0 */
            }
            ELSE IF( sub( i, lowband ) >= 0 )
            {
#ifdef NONBE_1118_EVS_LR_HQ_BITERROR
                /* safety check in case of bit errors */
                if ( Ep_fx[i] > 536788991 /* max(Q30) */ )
                {
                    st->BER_detect = 1;
                    set_f( yout, 0, inner_frame );
                    return;
                }

#endif
                enerL_fx = L_add( enerL_fx, L_shl( Ep_fx[i], 2 ) ); /*Q0 */
            }
        }
+12 −2
Original line number Diff line number Diff line
@@ -2126,6 +2126,7 @@ ivas_error ivas_init_decoder(
                return error;
            }
        }
#ifndef NONBE_1303_REND_GRANULARITY

        granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES );
        n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas );
@@ -2134,6 +2135,7 @@ ivas_error ivas_init_decoder(
        {
            return error;
        }
#endif
    }
    else if ( st_ivas->renderer_type == RENDERER_MC )
    {
@@ -2166,6 +2168,7 @@ ivas_error ivas_init_decoder(
        }

        st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns;
#ifndef NONBE_1303_REND_GRANULARITY

        if ( ( st_ivas->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) )
        {
@@ -2189,6 +2192,7 @@ ivas_error ivas_init_decoder(
                return error;
            }
        }
#endif
    }

    if ( st_ivas->ivas_format == MASA_ISM_FORMAT )
@@ -2203,7 +2207,7 @@ ivas_error ivas_init_decoder(

            if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
            {
                if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
@@ -2382,12 +2386,18 @@ ivas_error ivas_init_decoder(
     *-----------------------------------------------------------------*/

    if ( st_ivas->hTcBuffer == NULL )

    {
        /* no module has yet open the TC buffer, open a default one */
#ifdef NONBE_1303_REND_GRANULARITY
        granularity = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, ivas_renderer_secondary_select( st_ivas ), output_Fs );
        n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas );

        if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, ivas_jbm_dec_get_tc_buffer_mode( st_ivas ), n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, granularity ) ) != IVAS_ERR_OK )
#else
        n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas );

        if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, ivas_jbm_dec_get_tc_buffer_mode( st_ivas ), n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
+5 −2
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ static ivas_error ivas_ism_bitrate_switching_dec(
        mvs2s( st_ivas->hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS );
    }

#ifndef NONBE_1303_REND_GRANULARITY
    /* JBM: when granularity goes down (e.g. Discrete ISM with TD Obj Renderer -> ParamISM with binaural fastconv
            render what still fits in the new granularity */
    tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, st_ivas->ivas_format, st_ivas->mc_mode, st_ivas->hDecoderConfig->output_Fs );
@@ -138,7 +139,7 @@ static ivas_error ivas_ism_bitrate_switching_dec(
            return error;
        }
    }

#endif
    if ( st_ivas->ism_mode != last_ism_mode )
    {
        /* EFAP handle */
@@ -306,7 +307,9 @@ static ivas_error ivas_ism_bitrate_switching_dec(
    tc_nchan_tc_new = ivas_jbm_dec_get_num_tc_channels( st_ivas );
    tc_nchan_allocate_new = tc_nchan_tc_new;
    tc_nchan_full_new = tc_nchan_tc_new;

#ifdef NONBE_1303_REND_GRANULARITY
    tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, RENDERER_DISABLE, st_ivas->hDecoderConfig->output_Fs );
#endif

    if ( st_ivas->ism_mode == ISM_MODE_PARAM && ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM ) )
    {
Loading