Commit 814f4491 authored by emerit's avatar emerit
Browse files

merge with step2

parent be23045e
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -151,10 +151,9 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
/*#define SPLIT_REND_WITH_HEAD_ROT  */                  /* Dlb,FhG: Split Rendering contributions 21 and 35 */

#define FIX_WARNING_AS_ERROR

#define FIX_638_ENERGIE_IAC_ROM_TABLES                  /* Orange : Missing left/right and coherence late reverb tables in binary format*/
#define FIX_OLD_BINARY_FORMAT                           /* Orange: temporary to maintain bitexactness */
#define FIX_WARNING_RENDER_CONFIG
#define FIX_INV_DIFFUSE_WEIGHT                          /* Orange : Fix error in energy compensation in late binaural reverb*/
#define FIX_20_MS_FRAME_LEN_TABLES_CONVERTER            /* Orange : generate_tables_converter tools can generate rom for 5 and 20 ms frame length */
#define FIX_911_REMOVE_CREND_DUPLICATION                /* VA: issue 911: resolve duplication of CRend binaural external renderer function */
+7 −16
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ static ivas_error ivas_rend_initCrend(

#ifdef NONBE_FIX_BINARY_BINAURAL_READING
    if ( ( hSetOfHRTF == NULL ) ||
         ( ( hSetOfHRTF->hHRTF_hrir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) ||
         ( ( hSetOfHRTF->hHRTF_hrir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) ||
         ( ( hSetOfHRTF->hHRTF_hrir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL ) ) ||
         ( ( hSetOfHRTF->hHRTF_brir_combined == NULL ) && ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) && ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) ) ||
         ( ( hSetOfHRTF->hHRTF_hrir_foa == NULL ) && ( inConfig == IVAS_AUDIO_CONFIG_FOA ) ) ||
@@ -808,7 +808,7 @@ static ivas_error ivas_rend_initCrend(
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
                if ( hSetOfHRTF->hHRTF_brir_combined == NULL )
                {
                    return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Invalid command wrong output format" );
                    return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Invalid function parameters " );
                }
#endif
                hHrtf->latency_s = hSetOfHRTF->hHRTF_brir_combined->latency_s;
@@ -820,7 +820,7 @@ static ivas_error ivas_rend_initCrend(
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
                if ( hSetOfHRTF->hHRTF_hrir_combined == NULL )
                {
                    return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Invalid command wrong output format" );
                    return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Invalid function parameters" );
                }
#endif
                hHrtf->latency_s = hSetOfHRTF->hHRTF_hrir_combined->latency_s;
@@ -915,7 +915,7 @@ static ivas_error ivas_rend_initCrend(
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
                if ( hSetOfHRTF->hHRTF_hrir_hoa3 == NULL )
                {
                    return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Invalid command wrong output format" );
                    return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Invalid function parameters" );
                }
#endif
                hHrtf->latency_s = hSetOfHRTF->hHRTF_hrir_hoa3->latency_s;
@@ -951,7 +951,7 @@ static ivas_error ivas_rend_initCrend(
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
                if ( hSetOfHRTF->hHRTF_hrir_hoa2 == NULL )
                {
                    return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Invalid command wrong output format" );
                    return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Invalid function parameters" );
                }
#endif
                hHrtf->latency_s = hSetOfHRTF->hHRTF_hrir_hoa2->latency_s;
@@ -987,7 +987,7 @@ static ivas_error ivas_rend_initCrend(
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
                if ( hSetOfHRTF->hHRTF_hrir_foa == NULL )
                {
                    return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Invalid command wrong output format" );
                    return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Invalid function parameters" );
                }
#endif
                hHrtf->latency_s = hSetOfHRTF->hHRTF_hrir_foa->latency_s;
@@ -1454,6 +1454,7 @@ ivas_error ivas_rend_openCrend(
                    return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" );
                }
                set_zero_l( hCrend->freq_buffer_re[i], max_total_ir_len );

                if ( ( hCrend->freq_buffer_im[i] = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL )
                {
                    return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" );
@@ -2577,9 +2578,6 @@ ivas_error ivas_rend_crendProcessSubframesSplitBin(
    ivas_error error;
    float gain_lfe;
    float tmpLfeBuffer[L_FRAME48k];
#ifndef FIX_SPLITREND_WARNINGS
    float *p_bin_output[BINAURAL_CHANNELS];
#endif
    int16_t original_subframes_rendered, original_slots_rendered;
    float tmpInputBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k];
    float *p_tmpInputBuffer[MAX_OUTPUT_CHANNELS];
@@ -2654,13 +2652,6 @@ ivas_error ivas_rend_crendProcessSubframesSplitBin(

        pCombinedOrientationDataLocal = &combinedOrientationDataLocal;

#ifndef FIX_SPLITREND_WARNINGS
        /* set output channels */
        for ( i = 0; i < BINAURAL_CHANNELS; i++ )
        {
            p_bin_output[i] = output[pos_idx * BINAURAL_CHANNELS + i];
        }
#endif
        hTcBuffer->subframes_rendered = original_subframes_rendered;
        hTcBuffer->slots_rendered = original_slots_rendered;

+0 −4
Original line number Diff line number Diff line
@@ -437,10 +437,6 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs(
        mvr2r( parametricReverberationEneCorrections, hrtfParambin->parametricReverberationEneCorrections, CLDFB_NO_CHANNELS_MAX );
        mvr2r( parametricEarlyPartEneCorrection, hrtfParambin->parametricEarlyPartEneCorrection, CLDFB_NO_CHANNELS_MAX );

#ifdef NONBE_FIX_BINARY_BINAURAL_READING
        hrtfParambin->allocatedFromFile = 0;
#endif

        *hHrtfParambin = hrtfParambin;
    }

+2 −23
Original line number Diff line number Diff line
@@ -47,11 +47,6 @@
ivas_error ivas_HRTF_binary_open(
    TDREND_HRFILT_FiltSet_t **hHrtfTD )
{
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
    uint32_t ind;
    char *pTmp;
#endif

    /* Allocate HR filter set for headphones configuration */
    *hHrtfTD = (TDREND_HRFILT_FiltSet_t *) malloc( sizeof( TDREND_HRFILT_FiltSet_t ) );
    if ( *hHrtfTD == NULL )
@@ -60,12 +55,7 @@ ivas_error ivas_HRTF_binary_open(
    }

#ifdef NONBE_FIX_BINARY_BINAURAL_READING
    pTmp = (char *) *hHrtfTD;

    for ( ind = 0; ind < sizeof( TDREND_HRFILT_FiltSet_t ); ind++ )
    {
        pTmp[ind] = 0;
    }
    set_c( (char *) ( *hHrtfTD ), 0, (int32_t) sizeof( TDREND_HRFILT_FiltSet_t ) );
#endif

    return IVAS_ERR_OK;
@@ -191,11 +181,6 @@ void ivas_HRTF_fastconv_binary_close(
ivas_error ivas_HRTF_parambin_binary_open(
    HRTFS_PARAMBIN **hHrtfParambin )
{
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
    uint32_t ind;
    char *pTmp;
#endif

    *hHrtfParambin = (HRTFS_PARAMBIN *) malloc( sizeof( HRTFS_PARAMBIN ) );
    if ( *hHrtfParambin == NULL )
    {
@@ -203,13 +188,7 @@ ivas_error ivas_HRTF_parambin_binary_open(
    }

#ifdef NONBE_FIX_BINARY_BINAURAL_READING
    pTmp = (char *) *hHrtfParambin;

    for ( ind = 0; ind < sizeof( HRTFS_PARAMBIN ); ind++ )
    {
        pTmp[ind] = 0;
    }
    ( *hHrtfParambin )->allocatedFromFile = 1;
    set_c( (char *) ( *hHrtfParambin ), 0, (int32_t) sizeof( HRTFS_PARAMBIN ) );
#endif

    return IVAS_ERR_OK;
+1 −0
Original line number Diff line number Diff line
@@ -254,6 +254,7 @@ ivas_error TDREND_MIX_Init(
    {
        hBinRendererTd->HrFiltSet_p = *hHrtfTD;
    }

#ifdef NONBE_FIX_BINARY_BINAURAL_READING
    hBinRendererTd->pHrFiltSet_p = hHrtfTD;
#endif
Loading