Commit 1e9b543b authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Merge remote-tracking branch 'origin/main' into 3gpp_issue_1931_fix

parents fe404b0a 1e52e7a9
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@
#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR            /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */
#define NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC      /* FhG: fix out-of-bound errors when switching from SID frame to active frame*/
#define NONBE_FIX_1052_SBA_EXT_FIX                      /* VA: SBA external output support fix - do not overwrite "output_config" parameter */
#define NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION    /* Ericsson: Issue 1196, Always apply filter interpolation for each subframe */
#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING       /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */
#define FIX_1099_JBM_MD_HANDLE_ALLOC                    /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */
#define FIX_1121_MASA_DESCRIPTOR                        /* VA: issue 1121: Define 'ivasmasaFormatDescriptor' at one common place */
+4 −0
Original line number Diff line number Diff line
@@ -263,7 +263,11 @@ ivas_error ivas_td_binaural_renderer_sf_fx(
        /* Render subframe */
        /* ism_md_subframe_update_jbm != subframe_idx: trigger update only for ism_md_subframe_update_jbm == subframe_idx,
           where then the two TDREND_GetMix()-arguments subframe_idx and ism_md_subframe_update are equal, and we want to enforce the update inside TDREND_GetMix to use subframe_idx == 0 */
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
        IF( NE_32( ( error = TDREND_GetMix_fx( st_ivas->hBinRendererTd, output_fx_local, output_frame, 0 ) ), IVAS_ERR_OK ) )
#else
        IF( NE_32( ( error = TDREND_GetMix_fx( st_ivas->hBinRendererTd, output_fx_local, output_frame, 0, ism_md_subframe_update_jbm != subframe_idx ) ), IVAS_ERR_OK ) )
#endif
        {
            return error;
        }
+0 −1
Original line number Diff line number Diff line
@@ -338,7 +338,6 @@ void ivas_mct_core_enc_fx(

    FOR( ch = CPE_CHANNELS; ch < MCT_MAX_CHANNELS; ch++ )
    {
        set32_fx( powerSpecMsInv_long_fx[ch], 0, L_FRAME48k );
        q_powSpec[ch] = 0;
        move16();
        set16_fx( exp_powerSpec[ch], 0, N_MAX + L_MDCT_OVLP_MAX );
+25 −3
Original line number Diff line number Diff line
@@ -459,7 +459,12 @@ ivas_error ivas_td_binaural_renderer_unwrap_fx(
        }

        /* Render subframe */

#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
        IF( NE_32( ( error = TDREND_GetMix_fx( hBinRendererTd, output_fx, subframe_length, subframe_idx ) ), IVAS_ERR_OK ) )
#else
        IF( NE_32( ( error = TDREND_GetMix_fx( hBinRendererTd, output_fx, subframe_length, subframe_idx, ism_md_subframe_update ) ), IVAS_ERR_OK ) )
#endif
        {
            return error;
        }
@@ -502,8 +507,12 @@ ivas_error TDREND_GetMix_fx(
    BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle                                           */
    Word32 *output[],                                  /* i/o: ISM object synth / rendered output in 0,1       Q11          */
    const Word16 subframe_length,                      /* i/o: subframe length                                              */
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    const Word16 subframe_idx /* i  : Subframe index to 5 ms subframe                              */
#else
    const Word16 subframe_idx,          /* i  : Subframe index to 5 ms subframe                              */
    const Word16 ism_md_subframe_update /* i  : Number of subframes to delay ism metadata to sync with audio */
#endif
)
{
    Word16 i;
@@ -515,14 +524,18 @@ ivas_error TDREND_GetMix_fx(
    Word32 hrf_left_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH];
    Word32 hrf_right_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH];
    Word16 intp_count;

#ifndef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    Word16 subframe_update_flag;
#endif
    Word16 hrf_left_delta_e = 0, hrf_right_delta_e = 0;
    move16();
    move16();

#ifndef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    subframe_update_flag = (Word16) EQ_16( subframe_idx, ism_md_subframe_update );
    move16();

#endif
    error = IVAS_ERR_OK;
    move32();
    /* Clear the output buffer to accumulate rendered sources */
@@ -548,12 +561,21 @@ ivas_error TDREND_GetMix_fx(
        test();
        IF( EQ_16( SrcRend_p->PlayStatus, TDREND_PLAYSTATUS_PLAYING ) && ( hBinRendererTd->Listener_p->PoseUpdated || SrcSpatial_p->Updated ) )
        {
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
            TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( hBinRendererTd, SrcRend_p, SrcSpatial_p,
                                                               Src_p->hrf_left_prev_fx, &Src_p->hrf_left_prev_e, Src_p->hrf_right_prev_fx, &Src_p->hrf_right_prev_e,
                                                               hrf_left_delta, &hrf_left_delta_e, hrf_right_delta, &hrf_right_delta_e,
                                                               &intp_count, &Src_p->filterlength, &Src_p->itd,
                                                               &Src_p->Gain_fx,
                                                               Src_p );
#else
            TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( hBinRendererTd, SrcRend_p, SrcSpatial_p,
                                                               Src_p->hrf_left_prev_fx, &Src_p->hrf_left_prev_e, Src_p->hrf_right_prev_fx, &Src_p->hrf_right_prev_e,
                                                               hrf_left_delta, &hrf_left_delta_e, hrf_right_delta, &hrf_right_delta_e,
                                                               &intp_count, &Src_p->filterlength, &Src_p->itd,
                                                               &Src_p->Gain_fx,
                                                               Src_p, subframe_update_flag );
#endif
        }

        /* Render source if needed */
+13 −3
Original line number Diff line number Diff line
@@ -308,8 +308,13 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx(
    /* o  : ITD value                                 */ // Q0
    Word32 *Gain,
/* o  : Gain value                                */ // Q30
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    TDREND_SRC_t *Src_p /* i/o: Source pointer                            */
#else
    TDREND_SRC_t *Src_p, /* i/o: Source pointer                            */
    const Word16 subframe_update_flag )
    const Word16 subframe_update_flag
#endif
)
{
    TDREND_MIX_Listener_t *Listener_p;
    TDREND_HRFILT_FiltSet_t *HrFiltSet_p;
@@ -469,7 +474,12 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx(
    }

    test();

#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    IF( ( *intp_count > 0 ) )
#else
    IF( ( *intp_count > 0 ) && subframe_update_flag )
#endif
    {
        /* Set deltas for interpolation */
        Word16 tmp_e;
Loading