Commit e17446e8 authored by norvell's avatar norvell
Browse files

Merge branch 'main' into 915-improvements-to-prepare_delivery-sh

parents a7fb48e7 7f0c7462
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -169,6 +169,8 @@
#define NONBE_FIX_874_OMASA_BRSW_2TD                          /* Nokia: issue 874: Fixes the crashes with the long test vectors that prompted switching to TD*/
#define NONBE_FIX_871_ACELP_CRASH_IN_OSBA                     /* FhG: isse 871: crash in ACELP core encoder with OSBA */
#define NONBE_FIX_906_SBA_LBR_SMOOTHING                       /* FhG: issue #906: fix SBA low bit rate smoothing for HOA2/HOA3 output */
#define NONBE_FIX_878_RS_FEC_STEREO_CNG                       /* Eri: Frame loss and Unified Stereo CNG may cause false BER detection which results in corrupt bitstream decoding */
#define NONBE_FIX_904_JBM_SBA_RS_FOA                          /* FhG: issue #904: fix JBM SBA RS to FOA decoding */
/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+4 −0
Original line number Diff line number Diff line
@@ -248,6 +248,10 @@ ivas_error ivas_cpe_dec(
            {
                nb_bits -= SID_FORMAT_NBITS;
                sts[1]->bit_stream -= SID_FORMAT_NBITS;
#ifdef NONBE_FIX_878_RS_FEC_STEREO_CNG
                /* set total bitrate of Stereo CNG parameters for BER detection */
                sts[1]->total_brate = IVAS_SID_5k2 - SID_2k40;
#endif
            }

            if ( ( ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE ) || ( st_ivas->ivas_format == MASA_ISM_FORMAT && cpe_brate < MASA_STEREO_MIN_BITRATE ) ) && ivas_total_brate > IVAS_SID_5k2 )
+4 −0
Original line number Diff line number Diff line
@@ -894,6 +894,10 @@ void ivas_jbm_dec_feed_tc_to_renderer(
        }
        else
        {
#ifdef NONBE_FIX_904_JBM_SBA_RS_FOA
            ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );

#endif
            ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
        }
    }
+24 −0
Original line number Diff line number Diff line
@@ -253,6 +253,15 @@ ivas_error ivas_sba_dec_reconfigure(
            {
                return error;
            }
#ifdef NONBE_FIX_904_JBM_SBA_RS_FOA

            /* make sure the changed number of slots in the last subframe is not lost in the following steps */
            if ( st_ivas->hSpatParamRendCom != NULL )
            {
                st_ivas->hSpatParamRendCom->subframe_nbslots[st_ivas->hSpatParamRendCom->nb_subframes - 1] = st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1];
            }
            st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->nb_subframes - 1] = st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1];
#endif
        }
    }

@@ -651,6 +660,17 @@ ivas_error ivas_sba_dec_reconfigure(
    }

    /* resync SPAR and DirAC JBM info from TC Buffer */
#ifdef NONBE_FIX_904_JBM_SBA_RS_FOA
    if ( st_ivas->hSpatParamRendCom != NULL && st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity )
    {
        mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS );
        st_ivas->hSpatParamRendCom->nb_subframes = st_ivas->hTcBuffer->nb_subframes;
        st_ivas->hSpatParamRendCom->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered;
    }
    mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpar->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS );
    st_ivas->hSpar->nb_subframes = st_ivas->hTcBuffer->nb_subframes;
    st_ivas->hSpar->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered;
#else
    if ( st_ivas->hSpatParamRendCom != NULL )
    {
        if ( st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity )
@@ -664,6 +684,7 @@ ivas_error ivas_sba_dec_reconfigure(
            st_ivas->hSpar->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered;
        }
    }
#endif

    if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
    {
@@ -672,6 +693,9 @@ ivas_error ivas_sba_dec_reconfigure(
        for ( n = 0; n < MAX_JBM_SUBFRAMES_5MS; n++ )
        {
            st_ivas->hSpatParamRendCom->subframe_nbslots[n] = st_ivas->hTcBuffer->subframe_nbslots[n] * granularityMultiplier;
#ifdef NONBE_FIX_904_JBM_SBA_RS_FOA
            st_ivas->hSpar->subframe_nbslots[n] = st_ivas->hSpatParamRendCom->subframe_nbslots[n];
#endif
        }
    }