Commit e0f94ab2 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] mono split rendering and revert unintentional changes w.r.t. main

parent e5162fa0
Loading
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -3174,15 +3174,7 @@ static ivas_error doSanityChecks_IVAS(
    /* Verify stereo output configuration */
    if ( st_ivas->ivas_format == STEREO_FORMAT )
    {
        if ( output_config != IVAS_AUDIO_CONFIG_MONO &&
             output_config != IVAS_AUDIO_CONFIG_STEREO &&
             output_config != IVAS_AUDIO_CONFIG_5_1 &&
             output_config != IVAS_AUDIO_CONFIG_7_1 &&
             output_config != IVAS_AUDIO_CONFIG_5_1_2 &&
             output_config != IVAS_AUDIO_CONFIG_5_1_4 &&
             output_config != IVAS_AUDIO_CONFIG_7_1_4 &&
             output_config != IVAS_AUDIO_CONFIG_LS_CUSTOM &&
             output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
        if ( output_config != IVAS_AUDIO_CONFIG_MONO && output_config != IVAS_AUDIO_CONFIG_STEREO && output_config != IVAS_AUDIO_CONFIG_5_1 && output_config != IVAS_AUDIO_CONFIG_7_1 && output_config != IVAS_AUDIO_CONFIG_5_1_2 && output_config != IVAS_AUDIO_CONFIG_5_1_4 && output_config != IVAS_AUDIO_CONFIG_7_1_4 && output_config != IVAS_AUDIO_CONFIG_LS_CUSTOM && output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Wrong output configuration specified for Stereo!" );
        }
+4 −3
Original line number Diff line number Diff line
@@ -945,6 +945,7 @@ ivas_error ivas_jbm_dec_render(
        /* Rendering */
        if ( st_ivas->renderer_type == RENDERER_MC )
        {
            *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal );
            ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output );
        }
#ifdef FIX_1419_MONO_STEREO_UMX
@@ -2881,11 +2882,11 @@ void ivas_dec_prepare_renderer(
            ivas_omasa_gain_masa_tc( st_ivas->hTcBuffer->tc, st_ivas->hMasaIsmData->gain_masa_edited, st_ivas->nchan_ism, st_ivas->hTcBuffer->n_samples_available );
        }
    }
    else if (
#ifdef FIX_1419_MONO_STEREO_UMX
        st_ivas->ivas_format == MONO_FORMAT ||
    else if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT )
#else
    else if ( st_ivas->ivas_format == STEREO_FORMAT )
#endif
        st_ivas->ivas_format == STEREO_FORMAT )
    {
        ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );
    }
+19 −3
Original line number Diff line number Diff line
@@ -887,6 +887,16 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
        {
            hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00;

#ifdef FIX_1419_MONO_STEREO_UMX
            if ( hIvasDec->st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ||
                 hIvasDec->st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
            {
                /* necessary to set up correct amount of memory for rendering; remaining setup happens in ivas_dec_setup_all() */
                ISAR_PRE_REND_GetMultiBinPoseData( &hIvasDec->st_ivas->hRenderConfig->split_rend_config,
                                                   &hIvasDec->st_ivas->hSplitBinRend->splitrend.multiBinPoseData,
                                                   ( hIvasDec->st_ivas->hCombinedOrientationData != NULL ) ? hIvasDec->st_ivas->hCombinedOrientationData->sr_pose_pred_axis : DEFAULT_AXIS );
            }
#endif
            if ( ( error = ivas_init_decoder( hIvasDec->st_ivas ) ) != IVAS_ERR_OK )
            {
                return error;
@@ -2360,11 +2370,13 @@ static ivas_error ivas_dec_setup_all(
{
    ivas_error error;

    if ( hIvasDec->mode == IVAS_DEC_MODE_EVS )
    {
#ifdef FIX_1419_MONO_STEREO_UMX
// TODO split rendering for MONO
    /* split rendering related functions in else are required also for mono SR */
    if ( hIvasDec->mode == IVAS_DEC_MODE_EVS && splitRendBits == NULL )
#else
    if ( hIvasDec->mode == IVAS_DEC_MODE_EVS )
#endif
    {
        if ( hIvasDec->st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX )
        {
            *nTransportChannels = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN;
@@ -2401,7 +2413,11 @@ static ivas_error ivas_dec_setup_all(
         * - reconfigure the decoder when the number of TC or IVAS total bitrate change
         *----------------------------------------------------------------*/

#ifdef FIX_1419_MONO_STEREO_UMX
        if ( st_ivas->bfi == 0 && hIvasDec->mode != IVAS_DEC_MODE_EVS )
#else
        if ( st_ivas->bfi == 0 )
#endif
        {
            if ( ( error = ivas_dec_setup( st_ivas ) ) != IVAS_ERR_OK )
            {
+1 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ ivas_error ivas_td_binaural_open_unwrap(
#ifdef FIX_1419_MONO_STEREO_UMX
            case IVAS_AUDIO_CONFIG_MONO:
            case IVAS_AUDIO_CONFIG_STEREO:
                /* appropriate values are set in ivas_init_decoder() */
                ls_azimuth = hTransSetup.ls_azimuth;
                ls_elevation = hTransSetup.ls_elevation;
                break;