Commit 5ff0c3b4 authored by norvell's avatar norvell
Browse files

Merge branch 'main' into basop-ci/remove-test-param-file-ltv

parents 747e1408 c3c5d667
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2289,7 +2289,7 @@ coverage-test-on-main-scheduled:
  &complexity-measurements-setup # create necessary environment
  - mkdir -p wmops/logs

  - job_id=$(python3 ci/get_id_of_last_job_occurence.py $CI_COMMIT_REF_NAME $CI_JOB_NAME)
  - job_id=$(python3 ci/get_id_of_last_job_occurence.py $CI_COMMIT_REF_NAME $CI_JOB_NAME $CI_PROJECT_ID --success_only)
  - echo $job_id
  - curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$job_id/artifacts" --output artifacts.zip
  - unzip artifacts.zip || true # this may fail on first run, when there are no artifacts there and the zip file is actually just "404"-html
+2 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@
    </Lib>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="..\lib_util\aeid_file_reader.c" />
    <ClCompile Include="..\lib_util\audio_file_reader.c" />
    <ClCompile Include="..\lib_util\audio_file_writer.c" />
    <ClCompile Include="..\lib_util\bitstream_reader.c" />
@@ -126,6 +127,7 @@
    <ClCompile Include="..\lib_util\tsm_scale_file_reader.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_util\aeid_file_reader.h" />
    <ClInclude Include="..\lib_util\audio_file_reader.h" />
    <ClInclude Include="..\lib_util\audio_file_writer.h" />
    <ClInclude Include="..\lib_util\bitstream_reader.h" />
+12 −51
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@
#include "masa_file_writer.h"
#include "render_config_reader.h"
#include "rotation_file_reader.h"
#ifdef FIX_1053_REVERB_RECONFIGURATION
#include "aeid_file_reader.h"
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
#include "split_render_file_read_write.h"
#endif
@@ -1543,65 +1546,25 @@ static bool parseCmdlIVAS_dec(
            if ( !is_digits_only( argv[i] ) )
            {
#ifdef FIX_1053_REVERB_RECONFIGURATION
                uint16_t k;
                char *s = argv[i];
                char *token = argv[i];
                aeidFileReader *aeidReader = NULL;

                for ( k = 0; s[k]; )
                if ( aeidFileReader_open( argv[i], &aeidReader ) != IVAS_ERR_OK )
                {
                    s[k] == ',' ? k++ : *s++;
                }
                k++;

                if ( k == 0 )
                {
                    fprintf( stdout, "Error: Invalid acoustic environment sequence specified: %s\n\n", argv[i] );
                    fprintf( stderr, "\nError: Can't open aeid file %s \n", argv[i] );
                    usage_dec();
                    return false;
                }

                if ( NULL == ( arg->aeSequence.pID = malloc( sizeof( uint16_t ) * k ) ) ||
                     NULL == ( arg->aeSequence.pValidity = malloc( sizeof( uint16_t ) * k ) ) )
                if ( aeidFileReading( aeidReader, &arg->aeSequence.count, &arg->aeSequence.pID, &arg->aeSequence.pValidity ) != IVAS_ERR_OK )
                {
                    fprintf( stdout, "Error: Unable to allocate memory for acoustic environment sequence: %s\n\n", argv[i] );
                    fprintf( stderr, "\nError while reading aeid from %s\n", argv[i] );
                    usage_dec();
                    return false;
                }

                arg->aeSequence.count = k;

                k = 0;
                token = strtok( argv[i++], ":" );

                while ( token != NULL )
                {
                    if ( !is_number( token ) )
                    {
                        fprintf( stdout, "Error: Invalid token %s found in acoustic environment sequence: %s\n\n", token, argv[i] );
                        usage_dec();
                        return false;
                    }
                    arg->aeSequence.pID[k] = (uint16_t) atoi( token );
                aeidFileReader_close( &aeidReader );

                    token = strtok( NULL, "," );
                    if ( !is_number( token ) )
                    {
                        fprintf( stdout, "Error: Invalid token %s found in acoustic environment sequence: %s\n\n", token, argv[i] );
                        usage_dec();
                        return false;
                    }
                    arg->aeSequence.pValidity[k] = (uint16_t) atoi( token );

                    token = strtok( NULL, ":" );
                    k++;
                }

                if ( k != arg->aeSequence.count )
                {
                    fprintf( stdout, "Error while parsing acoustic environment sequence: %s\n\n", argv[i] );
                    usage_dec();
                    return false;
                }
                i++;
#else
                fprintf( stdout, "Error: Invalid acoustic environment ID specified: %s\n\n", argv[i] );
                usage_dec();
@@ -1872,10 +1835,8 @@ static void usage_dec( void )
    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" );
#ifdef FIX_1053_REVERB_RECONFIGURATION
    fprintf( stdout, "-aeid ID            : Acoustic environment ID (number > 0) or\n" );
    fprintf( stdout, "                      a sequence thereof in the format [ID1:duration1,ID2:duration2...]\n" );
    fprintf( stdout, "                      without braces and spaces, with ':' character separating ID from duration and ',' separating\n" );
    fprintf( stdout, "                      ID and duration pairs, where duration is specified in frames\n" );
    fprintf( stdout, "-aeid ID | File     : Acoustic environment ID (number > 0)\n" );
    fprintf( stdout, "                      alternatively, it can be a text file where each line contains \"ID duration\"\n" );
    fprintf( stdout, "                      for BINAURAL_ROOM_REVERB output configuration.\n" );
#else
    fprintf( stdout, "-aeid ID            : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration\n" );
+16 −50
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@
#include "masa_file_writer.h"
#include "render_config_reader.h"
#include "rotation_file_reader.h"
#ifdef FIX_1053_REVERB_RECONFIGURATION
#include "aeid_file_reader.h"
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
#include "split_render_file_read_write.h"
#include "split_rend_bfi_file_reader.h"
@@ -400,7 +403,7 @@ static const CmdLnParser_Option cliOptions[] = {
        .match = "acoustic_environment_id",
        .matchShort = "aeid",
#ifdef FIX_1053_REVERB_RECONFIGURATION
        .description = "Acoustic environment ID( number > 0 ) or a sequence thereof in the format [ID1:duration1,ID2:duration2...] without braces and spaces, with ':' character separating ID from duration and ',' separating ID and duration pairs, where duration is specified in frames for BINAURAL_ROOM_REVERB output configuration.",
        .description = "Acoustic environment ID (number > 0) alternatively, it can be a text file where each line contains \"ID duration\" for BINAURAL_ROOM_REVERB output configuration.",
#else
        .description = "Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration",
#endif
@@ -737,6 +740,7 @@ int main(
    int32_t delayTimeScale = 0;
    int16_t i, numChannels;
#ifdef FIX_1053_REVERB_RECONFIGURATION
    IVAS_RENDER_CONFIG_DATA renderConfig;
    uint16_t aeID;
#endif
    ivas_error error = IVAS_ERR_OK;
@@ -1051,7 +1055,9 @@ int main(

    if ( args.renderConfigFilePath[0] != '\0' )
    {
#ifndef FIX_1053_REVERB_RECONFIGURATION
        IVAS_RENDER_CONFIG_DATA renderConfig;
#endif

        /* sanity check */
#ifdef SPLIT_REND_WITH_HEAD_ROT
@@ -1563,8 +1569,10 @@ int main(
        {
            if ( ++args.aeSequence.frameCounter >= args.aeSequence.pValidity[args.aeSequence.selected] )
            {
#ifndef FIX_1053_REVERB_RECONFIGURATION
                IVAS_RENDER_CONFIG_DATA renderConfig;

#endif
                if ( ++args.aeSequence.selected >= args.aeSequence.count )
                {
                    args.aeSequence.selected = 0;
@@ -1574,7 +1582,7 @@ int main(
                {
                    if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "Invalid acoustic environment configuratoin parameters\n\n" );
                        fprintf( stderr, "Invalid acoustic environment configuration parameters\n\n" );
                        goto cleanup;
                    }
                }
@@ -2569,69 +2577,27 @@ static bool parseAcousticEnvironmentIds(
    const char *value,
    AcousticEnvironmentSequence *aeSequence )
{
    uint16_t k;
    char config_string[RENDERER_MAX_METADATA_LINE_LENGTH];
    char *s;
    char *token;

    strncpy( config_string, value, RENDERER_MAX_METADATA_LINE_LENGTH );
    s = config_string;
    token = config_string;

    if ( !is_digits_only( config_string ) )
    {
        aeidFileReader *aeidReader = NULL;

        for ( k = 0; s[k]; )
        {
            s[k] == ',' ? k++ : *s++;
        }
        k++;

        if ( k == 0 )
        if ( aeidFileReader_open( config_string, &aeidReader ) != IVAS_ERR_OK )
        {
            fprintf( stdout, "Error: Invalid acoustic environment sequence specified: %s\n\n", config_string );
            fprintf( stderr, "\nError: Can't open aeid file %s \n", config_string );
            return false;
        }

        if ( NULL == ( aeSequence->pID = malloc( sizeof( uint16_t ) * k ) ) ||
             NULL == ( aeSequence->pValidity = malloc( sizeof( uint16_t ) * k ) ) )
        if ( aeidFileReading( aeidReader, &aeSequence->count, &aeSequence->pID, &aeSequence->pValidity ) != IVAS_ERR_OK )
        {
            fprintf( stdout, "Error: Unable to allocate memory for acoustic environment sequence: %s\n\n", config_string );
            fprintf( stderr, "\nError while reading aeid from %s\n", config_string );
            return false;
        }

        aeSequence->count = k;

        k = 0;

        token = strtok( config_string, ":" );

        while ( token != NULL )
        {
            if ( !is_number( token ) )
            {
                fprintf( stdout, "Error: Invalid token %s found in acoustic environment sequence: %s\n\n", token, config_string );
                return false;
            }
            aeSequence->pID[k] = (uint16_t) atoi( token );

            token = strtok( NULL, "," );
            if ( !is_number( token ) )
            {
                fprintf( stdout, "Error: Invalid token %s found in acoustic environment sequence: %s\n\n", token, config_string );
                return false;
            }
            aeSequence->pValidity[k] = (uint16_t) atoi( token );

            token = strtok( NULL, ":" );
            k++;
        }

        if ( k != aeSequence->count )
        {
            fprintf( stdout, "Error while parsing acoustic environment sequence: %s\n\n", config_string );
            return false;
        }
        aeidFileReader_close( &aeidReader );
    }
    else
    {
+22 −0
Original line number Diff line number Diff line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
  </head>
<body>
  <h1>Ivas BASOP code Development</h1>

  <h2>Daily long testvector tests</h2>

  <ul>
    <li><a href="ivas-pytest-mld-long-dec-index.html">ivas-pytest-mld-long-dec</a></li>
    <li><a href="ivas-pytest-mld-long-dec-lev+10-index.html">ivas-pytest-mld-long-dec-lev+10</a></li>
    <li><a href="ivas-pytest-mld-long-dec-lev-10-index.html">ivas-pytest-mld-long-dec-lev-10</a></li>
  </ul>

  <h2>Test Coverage</h2>

  <br>
  tbd...
  </br>

</body>
Loading