Commit d611e063 authored by norvell's avatar norvell
Browse files

Merge branch '1741_ref_enable-new-hrtf-format' into 'float-pc'

[Non-BE][Rend Non-BE][Non-IO] Resolve "Enable New HRTF Format" in float-pc

See merge request !1752
parents 8032c28d f9283f4e
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -235,12 +235,18 @@ stages:
  - cd $SCRIPTS_DIR
  - sed -i '/fetch/d' .git/config # Remove all fetch lines to clean out dead links
  - git remote set-branches --add origin "$BASOP_CI_BRANCH_PC_REPO" # Add currently used branch
  - git remote set-branches --add origin main # Add main to be able to load new format HRTFs
  - git fetch
  - git restore --staged . # Needed if HRTF model files were updated.
  - git restore . # Just as a precaution
  - git checkout "$BASOP_CI_BRANCH_PC_REPO"
  - git reset --hard origin/"$BASOP_CI_BRANCH_PC_REPO"
  - git pull

# Restore new format of HRTF binary
  - git fetch origin main
  - git checkout 78154d0b3f1b2c6c8ff8a234f3f7cf865d467d35 -- scripts/binauralRenderer_interface/binaural_renderers_hrtf_data

  - cd -
  - cp -r $SCRIPTS_DIR/ci .
  - cp -r $SCRIPTS_DIR/scripts .
@@ -2031,7 +2037,7 @@ ivas-pytest-on-merge-request:

    ### prepare pytest
    # create references
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -k "not model"

    ### Run test using branch scripts and input
    - if [ $ref_using_target == 1 ]; then git checkout $source_branch_commit_sha; fi
@@ -2039,7 +2045,7 @@ ivas-pytest-on-merge-request:
    ### run pytest
    - exit_code=0
    - testcase_timeout=60
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout || exit_code=$?
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout -k "not model" || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check
+6 −7
Original line number Diff line number Diff line
@@ -735,7 +735,6 @@ int main(
        }

#ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
        if ( ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        {
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
@@ -744,7 +743,6 @@ int main(
                goto cleanup;
            }
        }
#endif
#endif

        if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK )
@@ -832,7 +830,6 @@ int main(


#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
        if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -851,12 +848,14 @@ int main(
            }
        }
#else
        if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK )
        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
        }
#endif
    }

+0 −4
Original line number Diff line number Diff line
@@ -933,7 +933,6 @@ int main(
            }

#ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
            if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK )
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
@@ -942,7 +941,6 @@ int main(
                    goto cleanup;
                }
            }
#endif
#endif

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

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

+5 −14
Original line number Diff line number Diff line
@@ -183,24 +183,15 @@
#define FIX_993_REMOVE_SBA_GET_ORDER                    /* VA: issue 993: remove unused function ivas_sba_get_order() */
#define FIX_960_SYN_OUTPUT                              /* VA: issue 960: unused function syn_output() is removed */

//#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#ifdef USE_NEW_HRTF_BINARY_FILE_FORMAT
#define NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES			  /* Philips: Use pre-computed HRTF average L/R energies and IAC in all renderers	*/
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
#define	FIX_638_ENERGIE_IAC_ROM_TABLES						  /* Orange: Missing left/right and coherence late reverb tables in binary format */
#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
#define NONBE_FIX_AVG_IAC_CLDFB_REVERB
#endif
#endif
#define FIX_638_ENERGIE_IAC_ROM_TABLES                  /* Orange: Missing left/right and coherence late reverb tables in binary format*/
#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
#define NONBE_FIX_AVG_IAC_CLDFB_REVERB
#endif
#define FIX_OLD_BINARY_FORMAT                           /* Orange: trick to make tests succesful when changing hrtf binary format between ref and new branch*/      
#define FIX_OLD_BINARY_FILE                             /* Orange: current hrtf binary file in ref branch contains wrong values for fastconv value. This switch can be activated to compre running codec with and without hrtf file*/      
//#define NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES       /* Philips: Use pre-computed HRTF average L/R energies and IAC in all renderers	*/
#endif
//#define FIX_638_ENERGIE_IAC_ROM_TABLES                  /* Orange: Missing left/right and coherence late reverb tables in binary format */
#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */
#define FIX_INV_DIFFUSE_WEIGHT                          /* Orange : Fix error in energy compensation in late binaural */
#endif


#define FIX_1002_DEC_PHASE_ECU_USAN_OF_PHASE            /* Eri: issue #1002, usan-value-out-of-range-for-int16, kept BE for PLC-conditions   */
//#define FIX_777_COMBI_RENDER_CONFIG_FILE                /* Philips: Fix for combined renderer config file support */
+2 −1
Original line number Diff line number Diff line
@@ -1956,7 +1956,8 @@ ivas_error ivas_init_decoder(
        }

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
        if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
        if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config,
                                            st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config,
                                            st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK )
Loading