Commit 0f90b4a0 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND

parent c1451885
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_1435_MOVE_STEREO_PANNING                    /* VA: issue 1435: do the EVS stereo panning in the renderer */
#define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */
#define FIX_2245_INIT_FD_CNG_EVS                        /* Dolby/VA: Issue 2245: initialize FD CNG with EVS-type of init function */
#define FIX_2252_SCALING_SAVE_HB_SYNTH                  /* VA: issue 2252: fix use-of-uninit-value in save_hb_synth_fx[] scaling in FOA decoding with bitstream that starts with an SID */
#define FIX_2248_EVS_ASSERT                             /* VA: Include _sat in an EVS related part of the code */
+0 −4
Original line number Diff line number Diff line
@@ -92,11 +92,9 @@ ivas_error ivas_Crend_hrtf_init_fx(
            hHrtf->pIndex_frequency_max[i][j] = NULL;
            hHrtf->pOut_to_bin_re_fx[i][j] = NULL;
            hHrtf->pOut_to_bin_im_fx[i][j] = NULL;
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
            hHrtf->pOut_to_bin_re_dyn_fx[i][j] = NULL;
            hHrtf->pOut_to_bin_im_dyn_fx[i][j] = NULL;
            hHrtf->pIndex_frequency_max_dyn_fx[i][j] = NULL;
#endif
        }
    }

@@ -107,10 +105,8 @@ ivas_error ivas_Crend_hrtf_init_fx(
        hHrtf->pIndex_frequency_max_diffuse[j] = NULL;
        hHrtf->pOut_to_bin_diffuse_re_fx[j] = NULL;
        hHrtf->pOut_to_bin_diffuse_im_fx[j] = NULL;
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
        hHrtf->pOut_to_bin_diffuse_re_dyn_fx[j] = NULL;
        hHrtf->pOut_to_bin_diffuse_im_dyn_fx[j] = NULL;
#endif
    }

    hHrtf->init_from_rom = 1;
+0 −56
Original line number Diff line number Diff line
@@ -179,12 +179,10 @@ static ivas_error read_and_check_hrtf_binary_file_header(
static ivas_error check_hrtf_binary_header(
    ivas_hrtfs_header_t *hrtf_header )
{
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
    if ( hrtf_header == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }
#endif
    /* Check the renderer type */
    if ( ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM ) &&
         ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM ) &&
@@ -792,11 +790,7 @@ static ivas_error load_reverb_from_binary(
            if ( hrtf_header.frequency != sampleRate )
            {
                free( hrtf_data );
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
                return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE;
#else
                return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" );
#endif
            }
        }
    }
@@ -963,11 +957,7 @@ static ivas_error TDREND_MIX_LoadHRTF(
            if ( hrtf_header.frequency != sampleRate )
            {
                free( hrtf_data );
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
                return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE;
#else
                return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" );
#endif
            }
        }
    }
@@ -1736,11 +1726,7 @@ ivas_error load_fastconv_HRTF_from_binary(
            if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */
            {
                free( hrtf_data );
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
                return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE;
#else
                return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" );
#endif
            }

            if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size )
@@ -1840,11 +1826,7 @@ ivas_error load_parambin_HRTF_from_binary(
            if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */
            {
                free( hrtf_data );
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
                return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE;
#else
                return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" );
#endif
            }

            if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size )
@@ -1964,11 +1946,7 @@ ivas_error load_Crend_HRTF_from_binary(
            if ( hrtf_header.frequency != sampleRate )
            {
                free( hrtf_data );
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
                return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE;
#else
                return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" );
#endif
            }

            if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size )
@@ -2060,38 +2038,6 @@ void destroy_crend_hrtf(
}


#ifndef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
/*---------------------------------------------------------------------*
 * destroy_hrtf_statistics()
 *
 * Destroy the HRTF statistics set.
 *---------------------------------------------------------------------*/

void destroy_hrtf_statistics(
    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle  */
)
{
    if ( ( hHrtfStatistics != NULL ) && ( *hHrtfStatistics != NULL ) && ( ( *hHrtfStatistics )->fromROM == FALSE ) )
    {
        if ( ( *hHrtfStatistics )->average_energy_l_dyn != NULL )
        {
            free( ( *hHrtfStatistics )->average_energy_l_dyn );
        }
        if ( ( *hHrtfStatistics )->average_energy_r_dyn != NULL )
        {
            free( ( *hHrtfStatistics )->average_energy_r_dyn );
        }
        if ( ( *hHrtfStatistics )->inter_aural_coherence_dyn != NULL )
        {
            free( ( *hHrtfStatistics )->inter_aural_coherence_dyn );
        }
    }

    ivas_HRTF_statistics_close_fx( hHrtfStatistics );

    return;
}
#endif

/*---------------------------------------------------------------------*
 * destroy_fastconv_hrtf()
@@ -2128,7 +2074,6 @@ void destroy_parambin_hrtf(
    return;
}

#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
/*---------------------------------------------------------------------*
 * destroy_hrtf_statistics()
 *
@@ -2159,4 +2104,3 @@ void destroy_hrtf_statistics(

    return;
}
#endif
+0 −21
Original line number Diff line number Diff line
@@ -124,11 +124,7 @@ ivas_error load_reverb_binary(
 *---------------------------------------------------------------------*/

ivas_error load_Crend_HRTF_from_binary(
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
    IVAS_DEC_HRTF_CREND_HANDLE hHrtfCrend, /* i/o: HRTF CRend handle                   */
#else
    IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF, /* i/o: Set of HRTF CRend handle            */
#endif
    const hrtfFileReader *hrtfReader,           /* i  : pointer to hrtfFileReader handle    */
    const IVAS_AUDIO_CONFIG OutputConfig,       /* i  : output audio configuration          */
    const IVAS_AUDIO_CONFIG hrtf_set_audio_cfg, /* i  : HRTF set audio config.              */
@@ -142,11 +138,7 @@ ivas_error load_Crend_HRTF_from_binary(
 *---------------------------------------------------------------------*/

void destroy_crend_hrtf(
#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
    IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend /* i/o: Crend HRTF handle                 */
#else
    IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle              */
#endif
);

/*---------------------------------------------------------------------*
@@ -182,17 +174,6 @@ ivas_error load_parambin_HRTF_from_binary(
    IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin, /* i/o: Parambin HRTF handle             */
    const hrtfFileReader *hrtfReader             /* i  : pointer to hrtfFileReader handle */
);
#ifndef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
/*---------------------------------------------------------------------*
 * destroy_hrtf_statistics()
 *
 * free memory allocated for HRTF statistics binary data
 *---------------------------------------------------------------------*/

void destroy_hrtf_statistics(
    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle  */
);
#endif
/*---------------------------------------------------------------------*
 * destroy_parambin_hrtf()
 *
@@ -213,7 +194,6 @@ void destroy_td_hrtf(
    IVAS_DEC_HRTF_TD_HANDLE *hHRTF /* i/o: TD rend. HRTF handle */
);

#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND
/*---------------------------------------------------------------------*
 * destroy_hrtf_statistics()
 *
@@ -223,6 +203,5 @@ void destroy_td_hrtf(
void destroy_hrtf_statistics(
    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle  */
);
#endif

#endif /* IVAS_HRTF_FILE_READER_H */