Commit 7873f6f3 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_197_CREND_INTERFACE

parent d86d7699
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -141,7 +141,6 @@
#define DISABLE_ADAP_RES_COD_TMP                        /* temporary fix for IVAS-403, disables adaptive residual coding */
/*#define ITD_WINNER_GAIN_MODIFY */                     /* ITD optimization - WORK IN PROGRESS */
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define FIX_197_CREND_INTERFACE
#define FIX_329_ENABLE_TD_RENDERER_REVERB_MC            /* Eri: Enable reverb for TD renderer for 5.1 and 7.1 with headtracking enabled for IVAS_dec */
#define FIX_330_ENABLE_TD_RENDERER_REVERB_REND          /* Eri: Enable reverb for TD renderer for ISM, 5.1 and 7.1 with headtracking enabled for IVAS_rend */

+0 −4
Original line number Diff line number Diff line
@@ -866,7 +866,6 @@ void ivas_binaural_add_LFE(

    if ( render_lfe )
    {
#ifdef FIX_197_CREND_INTERFACE
#ifdef FIX_329_ENABLE_TD_RENDERER_REVERB_MC
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
        {
@@ -878,9 +877,6 @@ void ivas_binaural_add_LFE(
        }
#else
        gain = ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hHrtfCrend != NULL ) ) ? st_ivas->hCrendWrapper->hHrtfCrend->gain_lfe : GAIN_LFE;
#endif
#else
        gain = st_ivas->hHrtf != NULL ? st_ivas->hHrtf->gain_lfe : GAIN_LFE;
#endif
        for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ )
        {
+0 −8
Original line number Diff line number Diff line
@@ -222,14 +222,10 @@ ivas_error ivas_dec(
            }
            else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
#ifdef FIX_197_CREND_INTERFACE
                if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM, NULL, NULL, NULL, NULL, output, output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#else
                ivas_crend_process( st_ivas, output );
#endif
                ivas_binaural_add_LFE( st_ivas, output_frame, output );
            }
#ifdef DEBUGGING
@@ -433,14 +429,10 @@ ivas_error ivas_dec(
            /* Rendering */
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
#ifdef FIX_197_CREND_INTERFACE
                if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hHeadTrackData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, output, output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#else
                ivas_crend_process( st_ivas, output );
#endif

                ivas_binaural_add_LFE( st_ivas, output_frame, output );
            }
+0 −20
Original line number Diff line number Diff line
@@ -1228,7 +1228,6 @@ ivas_error ivas_init_decoder(
                return error;
            }
#else
#ifdef FIX_197_CREND_INTERFACE
#ifdef FIX_329_ENABLE_TD_RENDERER_REVERB_MC
            if ( ( error = ivas_rend_initCrendWrapper( &st_ivas->hCrendWrapper ) ) != IVAS_ERR_OK )
#else
@@ -1237,9 +1236,6 @@ ivas_error ivas_init_decoder(
                return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend Wrapper\n" );
            }
            if ( ( st_ivas->hCrendWrapper->hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL )
#endif
#else
            if ( ( st_ivas->hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL )
#endif
            {
                return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend\n" );
@@ -1263,7 +1259,6 @@ ivas_error ivas_init_decoder(
    }
    else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
    {
#ifdef FIX_197_CREND_INTERFACE
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->ivas_format == MC_FORMAT && st_ivas->hDecoderConfig->Opt_Headrotation )
        {
            if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hIntSetup.ls_azimuth, st_ivas->hIntSetup.ls_elevation, st_ivas->hIntSetup.nchan_out_woLFE, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK )
@@ -1279,12 +1274,6 @@ ivas_error ivas_init_decoder(
        }

        st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns;
#else
        if ( ivas_crend_open( st_ivas ) != IVAS_ERR_OK )
        {
            return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "ivas_crend_open failed" );
        }
#endif
    }

    if ( st_ivas->ivas_format == ISM_FORMAT &&
@@ -1590,14 +1579,9 @@ void ivas_initialize_handles_dec(
    st_ivas->hIsmRendererData = NULL;
    st_ivas->hBinRendererTd = NULL;
    st_ivas->hMonoDmxRenderer = NULL;
#ifdef FIX_197_CREND_INTERFACE
    st_ivas->hCrendWrapper = NULL;
#ifdef FIX_330_ENABLE_TD_RENDERER_REVERB_REND
    st_ivas->hReverb = NULL;
#endif
#else
    st_ivas->hCrend = NULL;
    st_ivas->hHrtf = NULL;
#endif
    st_ivas->hSetOfHRTF = NULL;
    st_ivas->hHrtfFastConv = NULL;
@@ -1756,11 +1740,7 @@ void ivas_destroy_dec(
    ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );

    /* Crend handle */
#ifdef FIX_197_CREND_INTERFACE
    ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) );
#else
    ivas_crend_close( st_ivas );
#endif
#ifdef FIX_330_ENABLE_TD_RENDERER_REVERB_REND
    /* Reverb handle */
    ivas_reverb_close( &st_ivas->hReverb );
+0 −13
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@ static ivas_error ivas_ism_bitrate_switching(
            ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );

            /* Open Crend Binaural renderer */
#ifdef FIX_197_CREND_INTERFACE
            if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ),
                                                st_ivas->intern_config,
                                                st_ivas->hOutSetup.output_config,
@@ -164,9 +163,6 @@ static ivas_error ivas_ism_bitrate_switching(
            }

            st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns;
#else
            ivas_crend_open( st_ivas );
#endif
        }
    }

@@ -227,16 +223,7 @@ static ivas_error ivas_ism_bitrate_switching(
            }

            /* close the crend binaural renderer */
#ifdef FIX_197_CREND_INTERFACE
            ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) );
#else
            ivas_crend_close( st_ivas );

            if ( st_ivas->hHrtf != NULL )
            {
                st_ivas->hHrtf = NULL;
            }
#endif
        }
    }

Loading