Commit 57923340 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into 968-ism-to-binaural_room_ir-not-be-between-20ms-and-5ms-rendering

parents 911433ae acfa67af
Loading
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -325,11 +325,12 @@ build-codec-instrumented-linux:
  extends:
  extends:
    - .build-job-linux
    - .build-job-linux
    - .rules-basis
    - .rules-basis
  timeout: "6 minutes"
  timeout: "7 minutes"
  script:
  script:
    - *print-common-info
    - *print-common-info
    - *activate-Werror-linux
    - *activate-Werror-linux
    - bash ci/build_codec_instrumented_linux.sh
    - ./scripts/prepare_instrumentation.sh
    - make -j -C scripts/c-code_instrument


# make sure that the codec builds with msan, asan and usan
# make sure that the codec builds with msan, asan and usan
build-codec-sanitizers-linux:
build-codec-sanitizers-linux:
@@ -751,7 +752,7 @@ ivas-pytest-on-merge-request:
    - .rules-merge-request
    - .rules-merge-request
  stage: compare
  stage: compare
  needs: ["build-codec-linux-cmake", "codec-smoke-test"]
  needs: ["build-codec-linux-cmake", "codec-smoke-test"]
  timeout: "10 minutes"
  timeout: "14 minutes"
  script:
  script:
    - *print-common-info
    - *print-common-info
    - *get-commits-behind-count
    - *get-commits-behind-count
+0 −54
Original line number Original line Diff line number Diff line
@@ -722,20 +722,6 @@ int main(
        }
        }


#ifdef NONBE_FIX_BINARY_BINAURAL_READING
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
        if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        {
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
            {
#ifdef FIX_OLD_BINARY_FORMAT
                hrtfFileReader_close( &hrtfReader );
                strcat( arg.hrtfFileName, "new" );

                if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName );
                    goto cleanup;
                }

        if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        {
        {
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
@@ -748,16 +734,6 @@ int main(
                destroy_td_hrtf( hHrtfTD );
                destroy_td_hrtf( hHrtfTD );
            }
            }
        }
        }
#else
                fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName );
                goto cleanup;
#endif
            }
            else
            {
                destroy_td_hrtf( hHrtfTD );
            }
        }
#else
#else
        if ( ( error = load_HRTF_binary( hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        if ( ( error = load_HRTF_binary( hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        {
        {
@@ -797,29 +773,6 @@ int main(
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
        if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK )
        if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK )
        {
        {
#ifdef FIX_OLD_BINARY_FORMAT
            cleanup_SetOfHRTF( hSetOfHRTF );
            hrtfFileReader_close( &hrtfReader );
            strcat( arg.hrtfFileName, "new" );

            if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName );
                goto cleanup;
            }
            if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != 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;
                }
                else
                {
                    destroy_SetOfHRTF( hSetOfHRTF );
                }
            }
#else
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
            {
            {
                fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName );
                fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName );
@@ -829,13 +782,6 @@ int main(
            {
            {
                destroy_SetOfHRTF( hSetOfHRTF );
                destroy_SetOfHRTF( hSetOfHRTF );
            }
            }
#endif
        }
#else
        if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfFileName );
            goto cleanup;
        }
        }
#endif
#endif


+0 −45
Original line number Original line Diff line number Diff line
@@ -1044,18 +1044,6 @@ int main(
            {
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
                {
#ifdef FIX_OLD_BINARY_FORMAT
                    hrtfFileReader_close( &hrtfFileReader );
                    strcat( args.customHrtfFilePath, "new" );
                    if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) );
                        goto cleanup;
                    }
                    if ( ( error = load_HRTF_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 ) );
                    fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) );
                    goto cleanup;
                    goto cleanup;
                }
                }
@@ -1064,16 +1052,6 @@ int main(
                    destroy_td_hrtf( hHrtfTD );
                    destroy_td_hrtf( hHrtfTD );
                }
                }
            }
            }
#else
                    fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) );
                    goto cleanup;
#endif
                }
                else
                {
                    destroy_td_hrtf( hHrtfTD );
                }
            }


#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
            if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK )
            if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK )
@@ -1094,28 +1072,6 @@ int main(


            if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK )
            if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK )
            {
            {
#ifdef FIX_OLD_BINARY_FORMAT
                cleanup_SetOfHRTF( hSetOfHRTF );
                hrtfFileReader_close( &hrtfFileReader );
                strcat( args.customHrtfFilePath, "new" );
                if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) );
                    goto cleanup;
                }
                if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != 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;
                    }
                    else
                    {
                        destroy_SetOfHRTF( hSetOfHRTF );
                    }
                }
#else
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                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 ) );
                    fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) );
@@ -1125,7 +1081,6 @@ int main(
                {
                {
                    destroy_SetOfHRTF( hSetOfHRTF );
                    destroy_SetOfHRTF( hSetOfHRTF );
                }
                }
#endif
            }
            }


            if ( ( error = IVAS_REND_GetHrtfFastConvHandle( hIvasRend, &hHrtfFastConv ) ) != IVAS_ERR_OK )
            if ( ( error = IVAS_REND_GetHrtfFastConvHandle( hIvasRend, &hHrtfFastConv ) ) != IVAS_ERR_OK )
+0 −1
Original line number Original line Diff line number Diff line
@@ -153,7 +153,6 @@
#define FIX_954_OTR_REF_VEC                             /* FhG: Fix forward vector direction for OTR REF VEC mode */
#define FIX_954_OTR_REF_VEC                             /* FhG: Fix forward vector direction for OTR REF VEC mode */


#define FIX_638_ENERGIE_IAC_ROM_TABLES                  /* Orange : Missing left/right and coherence late reverb tables in binary format*/
#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                       /* Orange: fix warning on windows build */
#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */
#define FIX_WARNING_SPLIT_RENDER                        /* Orange: fix warning on windows build vscode */
#define FIX_WARNING_SPLIT_RENDER                        /* Orange: fix warning on windows build vscode */
#define FIX_INV_DIFFUSE_WEIGHT                          /* Orange : Fix error in energy compensation in late binaural reverb*/
#define FIX_INV_DIFFUSE_WEIGHT                          /* Orange : Fix error in energy compensation in late binaural reverb*/
+0 −36
Original line number Original line Diff line number Diff line
@@ -1209,18 +1209,6 @@ static ivas_error create_HRTF_from_rawdata(
    }
    }
#endif
#endif


#ifdef FIX_OLD_BINARY_FORMAT
#ifdef FIX_INV_DIFFUSE_WEIGHT
    for ( i = 0; i < ( *hHRTF )->max_num_ir; i++ )
    {
        if ( ( *hHRTF )->inv_diffuse_weight[1][i] != ( *hHRTF )->inv_diffuse_weight[0][i] )
        {
            return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file format not compliant (BINAURAL_CHANNELS)" );
        }
    }
#endif
#endif

    /* max_total_num_fsamp_per_iteration */
    /* max_total_num_fsamp_per_iteration */
    max_total_num_fsamp_per_iteration = *( (uint16_t *) ( hrtf_data_rptr ) );
    max_total_num_fsamp_per_iteration = *( (uint16_t *) ( hrtf_data_rptr ) );
    hrtf_data_rptr += sizeof( uint16_t );
    hrtf_data_rptr += sizeof( uint16_t );
@@ -2178,30 +2166,6 @@ static ivas_error destroy_HRTF(
 *
 *
 * Destroy the HRTF data set.
 * Destroy the HRTF data set.
 *---------------------------------------------------------------------*/
 *---------------------------------------------------------------------*/
#ifdef FIX_OLD_BINARY_FORMAT
/*---------------------------------------------------------------------*
 * cleanup_SetOfHRTF()
 *
 * Destroy the HRTF data set.
 *---------------------------------------------------------------------*/

void cleanup_SetOfHRTF(
    HRTFS_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */
)
{
    if ( ( hSetOfHRTF != NULL ) && ( *hSetOfHRTF != NULL ) )
    {
        destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_combined ) );
        destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_hoa3 ) );
        destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_hoa2 ) );
        destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_foa ) );
        destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_brir_combined ) );
    }

    return;
}
#endif

void destroy_SetOfHRTF(
void destroy_SetOfHRTF(
    HRTFS_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */
    HRTFS_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */
)
)
Loading