Commit 3f503ab0 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch '1628_basop_port_fl1482' into 'main-pc'

Port MR1482 into main-pc: 20240326 cleanup

See merge request !1882
parents 78e44917 a8de754f
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -166,9 +166,7 @@ int main(
    IVAS_RENDER_FRAMESIZE asked_frame_size;
    IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL;
    IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL;
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL;
#endif

#ifdef WMOPS
    reset_wmops();
@@ -586,16 +584,6 @@ int main(
            }
        }

#ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
        if ( ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        {
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
            {
                fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName );
                goto cleanup;
            }
        }
#endif
        if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -654,7 +642,6 @@ int main(
                destroy_parambin_hrtf( hHrtfParambin );
            }
        }
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
        if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -672,16 +659,6 @@ int main(
                destroy_hrtf_statistics( hHrtfStatistics );
            }
        }
#else
        if ( ( hHrtfTD != NULL ) && ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        {
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
            {
                fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName );
                goto cleanup;
            }
        }
#endif
    }

    /*------------------------------------------------------------------------------------------*
+0 −16
Original line number Diff line number Diff line
@@ -735,9 +735,7 @@ int main(
    IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL;
    IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL;
    IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL;
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL;
#endif
    IsmPositionProvider *positionProvider = NULL;
    LfeRoutingConfig *lfeRoutingConfigs[RENDERER_MAX_MC_INPUTS];
    RenderConfigReader *renderConfigReader = NULL;
@@ -992,16 +990,6 @@ int main(
                }
            }

#ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
            if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK )
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
                    fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) );
                    goto cleanup;
                }
            }
#endif

            if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK )
            {
@@ -1062,7 +1050,6 @@ int main(
        }


#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
        if ( ( error = IVAS_REND_GetHrtfStatisticsHandle( hIvasRend, &hHrtfStatistics ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_REND_GetHrtfStatisticsHandle failed\n\n" );
@@ -1080,7 +1067,6 @@ int main(
                destroy_hrtf_statistics( hHrtfStatistics );
            }
        }
#endif

        hrtfFileReader_close( &hrtfFileReader );
    }
@@ -2107,9 +2093,7 @@ cleanup:
    {
        destroy_td_hrtf( hHrtfTD );
    }
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    destroy_hrtf_statistics( hHrtfStatistics );
#endif
    IVAS_REND_Close( &hIvasRend );
    IsmPositionProvider_close( positionProvider );
    RenderConfigReader_close( &renderConfigReader );
+0 −2
Original line number Diff line number Diff line
@@ -182,9 +182,7 @@ typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE;
typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE;
typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE;
typedef struct ivas_hrtfs_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE;
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
typedef struct ivas_hrtfs_statistics_struct *IVAS_DEC_HRTF_STATISTICS_HANDLE;
#endif
typedef struct cldfb_filter_bank_struct *IVAS_CLDFB_FILTER_BANK_HANDLE;

typedef struct ivas_LS_setup_custom *IVAS_LSSETUP_CUSTOM_HANDLE;
+0 −8
Original line number Diff line number Diff line
@@ -1286,11 +1286,7 @@ enum
#define MASA_RATIO_TOLERANCE                    0.1f
#define MASA_RATIO_THRESHOLD                    0.1f
#define MASA_ANGLE_TOLERANCE                    0.5f
#ifdef NONBE_FIX_1034_DRY_MASA_RATIOS
#define MASA_RATIO_THRESHOLD_FX                 32212255    // 0.015 in Q31
#else
#define MASA_RATIO_THRESHOLD_FX                 214748365   // 0.1 in Q31
#endif
#define MASA_RATIO_TOLERANCE_FX                 107374182   // 0.1 in Q30
#define MASA_ANGLE_TOLERANCE_FX                 ONE_IN_Q21  // 0.5 in Q22
#define MASA_LIMIT_NO_BANDS_SUR_COH             8
@@ -1747,15 +1743,11 @@ typedef enum
#define RV_FILTER_MAX_HISTORY                   ( 512 - 160 )               /* for longest history */
#define RV_LENGTH_NR_FC                         ( RV_FILTER_MAX_FFT_SIZE / 2 ) + 1

#ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB
#define RV_LENGTH_NR_FC_16KHZ                   ( RV_FILTER_MAX_FFT_SIZE / 4 ) + 1
#endif
#define IVAS_REVERB_DEFAULT_N_BANDS             31

#define LR_IAC_LENGTH_NR_FC                     ( RV_LENGTH_NR_FC )
#ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB
#define LR_IAC_LENGTH_NR_FC_16KHZ               ( RV_LENGTH_NR_FC_16KHZ )
#endif

/*----------------------------------------------------------------------------------*
 * FB mixer constants
+0 −2
Original line number Diff line number Diff line
@@ -1056,9 +1056,7 @@ ivas_error ivas_ism_renderer_open_fx(

void ivas_ism_render_sf_fx(
    Decoder_Struct *st_ivas,             /* i/o: IVAS decoder structure                      */
#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH
    const RENDERER_TYPE renderer_type,   /* i  : active renderer type                            */
#endif
    Word32 *output_fx[],                 /* i/o: core-coder transport channels/object output */
    const Word16 n_samples_to_render     /* i  : output frame length per channel             */
);
Loading