Commit 3e05b41c authored by emerit's avatar emerit
Browse files

bug fix

parent ebe97c9b
Loading
Loading
Loading
Loading
+6 −13
Original line number Diff line number Diff line
@@ -614,7 +614,7 @@ int main(
    IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL;
    IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL;
    IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL;
#ifdef FIX_POINT_HRTF_FILE_REVERB
#ifdef FIX_POINT_HRTF_FILE_FORMAT_REVERB
    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL;
#endif
#endif
@@ -1001,7 +1001,7 @@ int main(
                }
            }

#ifdef FIX_POINT_HRTF_FILE_REVERB
#ifdef FIX_POINT_HRTF_FILE_FORMAT_REVERB
            if ( ( error = IVAS_REND_GetHrtfStatisticsHandle( hIvasRend, &hHrtfStatistics ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nIVAS_REND_GetHrtfStatisticsHandle failed\n\n" );
@@ -1825,20 +1825,13 @@ cleanup:
    RotationFileReader_close( &externalOrientationFileReader );
    RotationFileReader_close( &referenceRotReader );
    Vector3PairFileReader_close( &referenceVectorReader );
#ifdef FIX_POINT_HRTF_FILE_REVERB
    destroy_hrtf_statistics( hHrtfStatistics );
#endif

#ifdef FIX_POINT_HRTF_FILE_OPTIM
#ifndef FIX_POINT_HRTF_FILE_OPTIM
    destroy_td_hrtf( hHrtfTD );
#else
#ifdef FIX_POINT_HRTF_FILE_FORMAT
    dealloc_HRTF_binary( *hHrtfTD );
#endif
#ifdef FIX_POINT_HRTF_FILE_FORMAT_REVERB
    destroy_hrtf_statistics( hHrtfStatistics );
#endif
#ifndef FIX_POINT_HRTF_FILE_FORMAT
    hrtfFileReader_close( &hrtfFileReader );
#endif

    IVAS_REND_Close( &hIvasRend );
    IsmPositionProvider_close( positionProvider );
    RenderConfigReader_close( &renderConfigReader );
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@
#define CR_2109_to_2112_cd0_ce0  /* This is related to the CRs include in the 26.444 package of 21-12. Concerns lead_deindexing and  */
#define FIX_QMETADATA_PENALTY /* Nokia: transform penalty calculation in qmetadata into integer operations */

//#define FIX_POINT_HRTF_FILE_FORMAT          /* ORANGE : add crend changes and fix point binaural rom and hrtf binary file format */
#define FIX_POINT_HRTF_FILE_FORMAT          /* ORANGE : add crend changes and fix point binaural rom and hrtf binary file format */
// #define FIX_1123_FASTCONV_PARAMBIN_16BIT_ROM                     /* FhG: issue 1123: update FastConv and ParamBin ROM tables and scripts to generate 16 bit tables instead of float */
//#define FIX_POINT_HRTF_FILE_FORMAT_REVERB          /* ORANGE : add crend changes and fix point binaural rom and hrtf binary file format */
// #define FIX_POINT_CREND_HRTF_FILE_FORMAT
+7 −6
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ static ivas_error doSanityChecks_IVAS( Decoder_Struct *st_ivas );


#ifdef FIX_POINT_HRTF_FILE_OPTIM

/*---------------------------------------------------------------------*
 * ivas_dec_get_format( )
 *
@@ -452,7 +453,10 @@ ivas_error ivas_dec_setup(
     * Read IVAS format
     *-------------------------------------------------------------------*/

    ivas_read_format( st_ivas, &num_bits_read );
    IF( ( error = ivas_read_format( st_ivas, &num_bits_read ) ) != IVAS_ERR_OK )
    {
        return error;
    }

    Word16 SrcInd[MAX_NUM_TDREND_CHANNELS];
    Word16 num_src = 0;
@@ -1291,6 +1295,7 @@ ivas_error ivas_init_decoder_front(
        }
    }

#ifndef FIX_POINT_HRTF_FILE_OPTIM
    /*-------------------------------------------------------------------*
     * Allocate HRTF binary handle
     *--------------------------------------------------------------------*/
@@ -1303,11 +1308,7 @@ ivas_error ivas_init_decoder_front(
        }


#ifdef FIX_POINT_HRTF_FILE_OPTIM
        IF( NE_32( ( error = ivas_HRTF_CRend_binary_open_fx( &( st_ivas->hHrtfCrend ) ) ), IVAS_ERR_OK ) )
#else
        IF( NE_32( ( error = ivas_HRTF_CRend_binary_open_fx( &( st_ivas->hSetOfHRTF ) ) ), IVAS_ERR_OK ) )
#endif
        {
            return error;
        }
@@ -1322,7 +1323,7 @@ ivas_error ivas_init_decoder_front(
            return error;
        }
    }

#endif
    /*-------------------------------------------------------------------*
     * Allocate and initialize Binaural Renderer configuration handle
     *--------------------------------------------------------------------*/
+1 −1
Original line number Diff line number Diff line
@@ -2776,7 +2776,7 @@ void ivas_rend_closeCrend(
        return;
    }

    IF( ( *pCrend )->hHrtfCrend != NULL )
    IF( ( *pCrend )->hHrtfCrend != NULL && ( *pCrend )->hHrtfCrend->init_from_rom )
    {
        ivas_hrtf_close( &( *pCrend )->hHrtfCrend );
    }
+8 −1
Original line number Diff line number Diff line
@@ -180,6 +180,9 @@ ivas_error ivas_dirac_dec_init_binaural_data_fx(
        hDiracDecBin->hReverb = NULL;
        hDiracDecBin->h_freq_domain_decorr_ap_params = NULL;
        hDiracDecBin->h_freq_domain_decorr_ap_state = NULL;
#ifdef FIX_POINT_HRTF_FILE_FORMAT
        hDiracDecBin->phHrtfParambin = NULL;
#endif
    }

    output_Fs = st_ivas->hDecoderConfig->output_Fs;
@@ -360,6 +363,10 @@ ivas_error ivas_dirac_dec_init_binaural_data_fx(
    hDiracDecBin->reqularizationFactor_fx = configure_reqularization_factor_fx( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); /* Q14 */
    move16();

#ifdef FIX_POINT_HRTF_FILE_FORMAT
    hDiracDecBin->phHrtfParambin = phHrtfParambin;
#endif

    st_ivas->hDiracDecBin = hDiracDecBin;

    /* allocate transport channels */
@@ -1438,7 +1445,7 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric
            }

#ifdef FIX_POINT_HRTF_FILE_FORMAT
            getDirectPartGains_fx( bin, aziDeg, eleDeg, &lRealp_fx, &lImagp_fx, &rRealp_fx, &rImagp_fx, hDiracDecBin->renderStereoOutputInsteadOfBinaural, Rmat_fx, &gainCache[gainCacheBaseIndex], isHeadtracked, *hDiracDecBin->phHrtfParambin );
            getDirectPartGains_fx( bin, aziDeg, eleDeg, &lRealp_fx, &lImagp_fx, &rRealp_fx, &rImagp_fx, hDiracDecBin->renderStereoOutputInsteadOfBinaural, Rmat_fx, &gainCache[gainCacheBaseIndex], isHeadtracked, *( hDiracDecBin->phHrtfParambin ) );
#else
            getDirectPartGains_fx( bin, aziDeg, eleDeg, &lRealp_fx, &lImagp_fx, &rRealp_fx, &rImagp_fx, hDiracDecBin->renderStereoOutputInsteadOfBinaural, Rmat_fx, &gainCache[gainCacheBaseIndex], isHeadtracked );
#endif
Loading