Commit 6014bc5b authored by stoutjesdijk's avatar stoutjesdijk 🎧
Browse files

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

Merge remote-tracking branch 'origin/main' into 103-Digest-room-acoustics-parameters-for-Parametric-Binaural-Renderer
parents 6948af56 7f87eaef
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4089,6 +4089,9 @@ ivas_error ivas_spar_md_dec_open(
    const DECODER_CONFIG_HANDLE hDecoderConfig,                 /* i  : configuration structure                 */
    const int16_t num_channels,                                 /* i  : number of internal channels             */
	const int16_t sba_order                                     /* i  : SBA order                               */
#ifdef SBA_BR_SWITCHING_RECONFIG
    ,const int16_t sid_format
#endif
);

void ivas_spar_md_dec_close(
+1 −0
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@
#define FIX_337_TDREND_INTP                             /* Issue 337: TD renderer interpolation threshold set too low */

#define FIX_310_TD_REND_DELAY                           /* Adding HRTF delay being read from ROM/Binary file, fix rounding for delay compensation in renderer */
#define FIX_334_DEBUG_BE_STEREO_SWITCHING               /* FhG: Fix non-BE issue for stereo switching when DEBUGGING is enabled */
#define FIX_103_RA_PARAMS_PARAM_BIN_REND                    /* Issue 103: Digest room acoustics parameters for Parametric Binaural Renderer*/

/* ################## End DEVELOPMENT switches ######################### */
+31 −0
Original line number Diff line number Diff line
@@ -267,6 +267,37 @@ ivas_error ivas_dec_setup(
                st_ivas->element_mode_init = IVAS_CPE_MDCT;
                break;
        }
#ifdef SBA_BR_SWITCHING_RECONFIG
        if ( ( st_ivas->ini_frame > 0 ) && ( st_ivas->ivas_format == SBA_FORMAT ) )
        {
            int16_t nchan_transport_old, nchan_transport;
            SBA_MODE sba_mode_old;
            int32_t last_ivas_total_brate;
            last_ivas_total_brate = st_ivas->last_active_ivas_total_brate;
            sba_mode_old = ivas_sba_mode_select( last_ivas_total_brate );
            nchan_transport_old = st_ivas->nchan_transport;
            nchan_transport = ( st_ivas->sid_format == SID_SBA_2TC ) ? 2 : 1;

            if ( ( nchan_transport_old != nchan_transport ) || ( sba_mode_old != st_ivas->sba_mode ) )
            {
                /*Setting the default bitrate for the reconfig function*/
                if ( st_ivas->sid_format == SID_SBA_2TC )
                {
                    st_ivas->hDecoderConfig->ivas_total_brate = IVAS_48k;
                }
                else
                {
                    st_ivas->hDecoderConfig->ivas_total_brate = ( st_ivas->sba_mode == SBA_MODE_SPAR ) ? IVAS_24k4 : IVAS_13k2;
                }
                if ( ( error = ivas_sba_dec_reconfigure( st_ivas ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
                st_ivas->last_active_ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;
                st_ivas->hDecoderConfig->ivas_total_brate = ivas_total_brate;
            }
        }
#endif
    }

    /*-------------------------------------------------------------------*
+1 −1
Original line number Diff line number Diff line
@@ -658,7 +658,7 @@ ivas_error ivas_sba_dec_reconfigure(
            /* MD handle */
            ivas_spar_md_dec_close( &hSpar->hMdDec );

            if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, nchan_internal, sba_order_internal ) ) != IVAS_ERR_OK )
            if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, nchan_internal, sba_order_internal, st_ivas->sid_format ) ) != IVAS_ERR_OK )
            {
                return error;
            }
+4 −0
Original line number Diff line number Diff line
@@ -89,7 +89,11 @@ ivas_error ivas_spar_dec_open(
    }

    /* MD handle */
#ifdef SBA_BR_SWITCHING_RECONFIG
    if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal, sba_order_internal, st_ivas->sid_format ) ) != IVAS_ERR_OK )
#else
    if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal, sba_order_internal ) ) != IVAS_ERR_OK )
#endif
    {
        return error;
    }
Loading