Commit 573222f2 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/main' into 822-ivas_binaural_reverb_open-needs-rework

parents 8eaa15a4 82cfd242
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -909,6 +909,7 @@ clang-format-check:
      - run: git apply $PATCH_FILE_NAME\n
      - commit new changes"

    - format_problems=0
    - scripts/check-format.sh -af -p 8 || format_problems=$?
    - if [ $format_problems == 0 ] ; then exit 0; fi

@@ -926,7 +927,7 @@ clang-format-check:
    expire_in: 1 day
    paths:
      - tmp-formatting-fix/
    when: always
    when: on_failure
    name: "$ARTIFACT_BASE_NAME"
    expose_as: "formatting patch"

@@ -948,18 +949,19 @@ check-first-frame-is-sid:
    - cmake .
    - make -j

    # TODO: for some MASA modes, we currently do not have testvectors that actually trigger DTX
    # SBA modes are run separately to use shorter part of file
    - exit_code_no_sba=0
    - exit_code_sba=0
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -v MASA | grep -vE "FOA|HOA" )
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 200 -U 0:20 || exit_code_no_sba=$?
    - exit_code_hoa=0
    - exit_code_foa=0

    # run all modes and cut bitstream to start with an SID. Use stereo output to limit runtime, test is only about decoding
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -vE "FOA|HOA" )
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 200 -U 0:20 --oc stereo || exit_code_no_sba=$?
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -E "HOA")
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 100 -U 70:80 || exit_code_sba=$?
    # need to do FOA separately as VAD apparently behaves differently there
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 100 -U 70:80 --oc stereo || exit_code_hoa=$?
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep "FOA")
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 100 -U 75:110 || exit_code_sba=$?
    - if [ $exit_code_no_sba -ne 0 ] || [ $exit_code_sba -ne 0 ]; then exit 1; fi
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 100 -U 75:110 --oc stereo || exit_code_foa=$?

    - if [ $exit_code_no_sba -ne 0 ] || [ $exit_code_hoa -ne 0 ] || [ $exit_code_hoa -ne 0 ]; then exit 1; fi
  artifacts:
    paths:
      - out/logs
@@ -1332,7 +1334,7 @@ sanitizer-test-masa:
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 21 hours
  timeout: 3 hours
  timeout: 5 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS
@@ -1476,7 +1478,7 @@ coverage-test-on-main-scheduled:
  rules:
    # only run in scheduled pipeline that passes this env vars
    - if: $COVERAGE_TEST
  timeout: 2 hours
  timeout: 4 hours
  script:
    - *print-common-info
    - *update-ltv-repo
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ endif()
if(INCLUDE_SPLIT)
  file(GLOB libLC3plusSrcs "lib_lc3plus/*.c")
  file(GLOB libLC3plusHeaders "lib_lc3plus/*.h")
  add_library(lc3plus ${libLC3plusSrcs} ${libLC3plusHeaders})
  add_library(lib_lc3plus ${libLC3plusSrcs} ${libLC3plusHeaders})
  target_include_directories(lib_lc3plus PUBLIC lib_lc3plus)
  target_link_libraries(lib_lc3plus lib_com) # For including options.h, which is needed for instrumentation to work correctly
  if(WMOPS)
+1 −0
Original line number Diff line number Diff line
@@ -192,6 +192,7 @@
    <ClCompile Include="..\lib_com\ivas_fb_mixer.c" />
    <ClCompile Include="..\lib_com\ivas_filters.c" />
    <ClCompile Include="..\lib_com\ivas_ism_com.c" />
    <ClCompile Include="..\lib_com\ivas_lfe_com.c" />
    <ClCompile Include="..\lib_com\ivas_mcmasa_com.c" />
    <ClCompile Include="..\lib_com\ivas_dirac_com.c" />
    <ClCompile Include="..\lib_com\ivas_masa_com.c" />
+3 −0
Original line number Diff line number Diff line
@@ -469,6 +469,9 @@
    <ClCompile Include="..\lib_com\ivas_omasa_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_lfe_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop_proto_func.h">
+9 −57
Original line number Diff line number Diff line
@@ -145,10 +145,9 @@ typedef struct
#endif
#endif
    uint16_t acousticEnvironmentId;
#ifdef FIX_708_DPID_COMMAND_LINE
    int16_t Opt_dpid_on;
#endif
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];

} DecArguments;


@@ -434,15 +433,8 @@ int main(
     * Configure the decoder
     *------------------------------------------------------------------------------------------*/

    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.enable5ms,
                                       arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain,
#ifdef FIX_708_DPID_COMMAND_LINE
                                       arg.Opt_dpid_on,
#endif
#ifdef FIX_708_AEID_COMMAND_LINE
                                       arg.acousticEnvironmentId,
#endif
                                       arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.enable5ms, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation,
                                       arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.Opt_dpid_on, arg.acousticEnvironmentId, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -640,11 +632,7 @@ int main(

        if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK )
        {
#ifdef FIX_730_DPID_NOT_SET_CORRECTLY
            fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
#else
            fprintf( stderr, "Failed to get directivity for objects: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
#endif
            goto cleanup;
        }

@@ -658,11 +646,7 @@ int main(
                    goto cleanup;
                }
            }
#ifdef FIX_708_AEID_COMMAND_LINE
            else
#else
            else if ( error != IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING )
#endif
            {
                fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", arg.acousticEnvironmentId );
                goto cleanup;
@@ -1008,9 +992,7 @@ static bool parseCmdlIVAS_dec(

    arg->renderConfigEnabled = false;
    arg->renderConfigFilename = NULL;
#ifdef FIX_708_DPID_COMMAND_LINE
    arg->Opt_dpid_on = 0;
#endif

#ifdef SPLIT_REND_WITH_HEAD_ROT
    arg->outputMdFilename = NULL;
@@ -1034,18 +1016,10 @@ static bool parseCmdlIVAS_dec(
    arg->noBadFrameDelay = false;
#endif
#endif
#ifdef FIX_708_AEID_COMMAND_LINE
    arg->acousticEnvironmentId = 65535;
#else
    arg->acousticEnvironmentId = 0;
#endif
    for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i )
    {
#ifdef FIX_730_DPID_NOT_SET_CORRECTLY
        arg->directivityPatternId[i] = 65535;
#else
        arg->directivityPatternId[i] = 0;
#endif
    }

    /*-----------------------------------------------------------------*
@@ -1417,7 +1391,6 @@ static bool parseCmdlIVAS_dec(
        else if ( strcmp( argv_to_upper, "-AEID" ) == 0 )
        {
            ++i;
#ifdef FIX_708_AEID_COMMAND_LINE
            if ( argc - i <= 4 )
            {
                fprintf( stderr, "Error: Acoustic environment ID not specified!\n\n" );
@@ -1431,22 +1404,17 @@ static bool parseCmdlIVAS_dec(
                usage_dec();
                return false;
            }
#endif
            arg->acousticEnvironmentId = (int16_t) atoi( argv[i++] );
        }
        else if ( strcmp( argv_to_upper, "-DPID" ) == 0 )
        {
#ifdef FIX_708_DPID_COMMAND_LINE
            int16_t id;
            int16_t id, tmp;

            arg->Opt_dpid_on = 1;
#endif
            ++i;
            int16_t tmp;
            tmp = 0;
            while ( is_number( argv[i + tmp] ) && tmp < IVAS_MAX_NUM_OBJECTS )
            {
#ifdef FIX_708_DPID_COMMAND_LINE
                id = (int16_t) atoi( argv[i + tmp] );

                if ( !is_digits_only( argv[i + tmp] ) || id < 0 )
@@ -1457,13 +1425,9 @@ static bool parseCmdlIVAS_dec(
                }

                arg->directivityPatternId[tmp] = id;
#else
                arg->directivityPatternId[tmp] = (int16_t) atoi( argv[i + tmp] );
#endif
                ++tmp;
            }

#ifdef FIX_708_DPID_COMMAND_LINE
            if ( tmp == 0 )
            {
                if ( argc - i <= 4 || argv[i][0] == '-' )
@@ -1480,7 +1444,6 @@ static bool parseCmdlIVAS_dec(
                    return false;
                }
            }
#endif

            i += tmp;
        }
@@ -1576,7 +1539,7 @@ static bool parseCmdlIVAS_dec(
        return false;
    }

    if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) )
    if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) && ( !arg->tsmEnabled ) )
    {
        arg->enable5ms = false;
    }
@@ -1670,15 +1633,11 @@ static void usage_dec( void )
    fprintf( stdout, "-force R            : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" );
#endif
    fprintf( stdout, "-exof File          : External orientation File for external orientation trajectory\n" );
#ifdef FIX_708_DPID_COMMAND_LINE
    fprintf( stdout, "-dpid ID            : Directivity pattern ID(s) = [ID1, ID2, ID3, ID4]. Space-separated list of up\n" );
    fprintf( stdout, "                      to 4 numbers (unsigned integers) can be specified for BINAURAL output configuration.\n" );
    fprintf( stdout, "                      ID1, ID2, ID3, ID4 specify the directivity pattern IDs used for ISMs 1,2,3 and 4 respectively.\n" );
    fprintf( stdout, "                      This options needs to be accompanied by a render_config file, otherwise a default\n" );
    fprintf( stdout, "                      directivity pattern is used.\n" );
#else
    fprintf( stdout, "-dpid ID            : Directivity pattern ID(s) (space-separated list of up to 4 numbers can be specified) for binaural output configuration\n" );
#endif
    fprintf( stdout, "                      to 4 numbers (unsigned integers) can be specified for BINAURAL and BINAURAL_ROOM_REVERB\n" );
    fprintf( stdout, "                      output configuration. ID1, ID2, ID3, ID4 specify the directivity pattern IDs used for\n" );
    fprintf( stdout, "                      ISMs 1,2,3 and 4 respectively. This options needs to be accompanied by a render_config file,\n" );
    fprintf( stdout, "                      otherwise a default directivity pattern is used.\n" );
    fprintf( stdout, "-aeid ID            : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration\n" );
    fprintf( stdout, "-level level        : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" );
    fprintf( stdout, "                      Currently, all values default to level 3 (full functionality).\n" );
@@ -2476,18 +2435,11 @@ static ivas_error decodeG192(
        {
            // update_mem(); TODO: verify this
            update_wmops();
#ifdef FIX_RAM_COUNTING_5MS_RENDERING
            update_mem();
#ifdef MEM_COUNT_DETAILS
            export_mem( "mem_analysis.csv" );
#endif
#endif
        }
#ifndef FIX_RAM_COUNTING_5MS_RENDERING
#ifdef MEM_COUNT_DETAILS
        export_mem( "mem_analysis.csv" );
#endif
#endif
#endif
    }

Loading