Commit 3c5fb24d authored by thomas dettbarn's avatar thomas dettbarn
Browse files

Merge branch 'ivas-float-update' into 2034_ref_portFlp2235_ambiConv

parents 602f3192 5a13903e
Loading
Loading
Loading
Loading
Loading
+0 −72
Original line number Diff line number Diff line
@@ -32,30 +32,12 @@
    <ClCompile Include="..\lib_rend\ivas_hrtf.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_lc3plus_common.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_lc3plus_dec.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_lc3plus_enc.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_limiter.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_masa_merge.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_mcmasa_ana.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_MSPred.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_NoiseGen.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_objectRenderer.c">
      <Filter>rend_c</Filter>
    </ClCompile>
@@ -83,15 +65,6 @@
    <ClCompile Include="..\lib_rend\ivas_output_init.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_PerceptualModel.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_PredDecoder.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_PredEncoder.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_render_config.c">
      <Filter>rend_c</Filter>
    </ClCompile>
@@ -113,9 +86,6 @@
    <ClCompile Include="..\lib_rend\ivas_reverb_utils.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_RMSEnvGrouping.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_rom_binaural_crend_head.c">
      <Filter>rend_c</Filter>
    </ClCompile>
@@ -134,24 +104,6 @@
    <ClCompile Include="..\lib_rend\ivas_sba_rendering.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_splitRend_lcld_dec.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_splitRend_lcld_enc.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_splitRenderer_utils.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_splitRendererPLC.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_splitRendererPost.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_splitRendererPre.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_shoebox.c">
      <Filter>rend_c</Filter>
    </ClCompile>
@@ -161,30 +113,12 @@
    <ClCompile Include="..\lib_rend\ivas_vbap.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_lcld_rom_tables.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_lcld_decoder.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_lcld_encoder.c">
      <Filter>rend_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_rend\ivas_td_decorr.c">
      <Filter>rend_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_rend\lib_rend.h" />
    <ClInclude Include="..\lib_rend\ivas_lc3plus_common.h">
      <Filter>rend_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_rend\ivas_lc3plus_enc.h">
      <Filter>rend_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_rend\ivas_lc3plus_dec.h">
      <Filter>rend_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_rend\ivas_prot_rend.h">
      <Filter>rend_h</Filter>
    </ClInclude>
@@ -203,12 +137,6 @@
    <ClInclude Include="..\lib_rend\ivas_rom_TdBinauralRenderer.h">
      <Filter>rend_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_rend\ivas_lcld_prot.h">
      <Filter>rend_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_rend\ivas_lcld_rom_tables.h">
      <Filter>rend_h</Filter>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
    <Filter Include="rend_h">
+3 −1
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="..\lib_util\ambi_convert.c" />
    <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" />
@@ -127,6 +128,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" />
+27 −0
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
#include "split_render_file_read_write.h"
#ifdef VARIABLE_SPEED_DECODING
#include "tsm_scale_file_reader.h"
@@ -1465,6 +1468,24 @@ static bool parseCmdlIVAS_dec(

            if ( !is_digits_only( argv[i] ) )
            {
#ifdef FIX_1053_REVERB_RECONFIGURATION
                aeidFileReader *aeidReader = NULL;
                if ( aeidFileReader_open( argv[i], &aeidReader ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError: Can't open aeid file %s \n", argv[i] );
                    usage_dec();
                    return false;
                }
                if ( aeidFileReading( aeidReader, &arg->aeSequence.count, &arg->aeSequence.pID, &arg->aeSequence.pValidity ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError while reading aeid from %s\n", argv[i] );
                    usage_dec();
                    return false;
                }
                aeidFileReader_close( &aeidReader );
                i++;
            }
#else
                uint16_t k;
                char *s = argv[i];
                char *token = argv[i];
@@ -1525,6 +1546,7 @@ static bool parseCmdlIVAS_dec(
                    return false;
                }
            }
#endif

            else
            {
@@ -1779,10 +1801,15 @@ static void usage_dec( void )
    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" );
#ifdef FIX_1053_REVERB_RECONFIGURATION
    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" );
#else
    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" );
#endif
    fprintf( stdout, "                      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" );
+8 −0
Original line number Diff line number Diff line
@@ -211,6 +211,8 @@ int main(
#ifdef DEBUG_SBA
    int16_t numTransportChannels = 1;
#endif
    int32_t noClipping;
    float maxOverload, minOverload;
#endif

#ifdef DEBUGGING
@@ -820,6 +822,12 @@ int main(
    }

#ifdef DEBUGGING
    if ( ( noClipping = IVAS_ENC_GetNoCLipping( hIvasEnc, &maxOverload, &minOverload ) ) > 0 )
    {
        fprintf( stdout, "Core input overload detected: %d samples!!!\n", noClipping );
        fprintf( stdout, "Max overload value: %f \n", maxOverload );
        fprintf( stdout, "Min overload value: %f \n\n", minOverload );
    }
    print_snr();
#endif
    /*------------------------------------------------------------------------------------------*
+36 −2
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
#include "split_render_file_read_write.h"
#include "split_rend_bfi_file_reader.h"
#include "vector3_pair_file_reader.h"
@@ -381,7 +384,11 @@ static const CmdLnParser_Option cliOptions[] = {
        .id = CmdLnOptionId_acousticEnvironmentId,
        .match = "acoustic_environment_id",
        .matchShort = "aeid",
#ifdef FIX_1053_REVERB_RECONFIGURATION
        .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 ) 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.",
#endif
    },
};

@@ -702,6 +709,9 @@ int main(
    int32_t delayTimeScale = 0;
    int16_t i, numChannels;
    uint16_t aeID;
#ifdef FIX_1053_REVERB_RECONFIGURATION
    IVAS_RENDER_CONFIG_DATA renderConfig;
#endif
    ivas_error error = IVAS_ERR_OK;

#ifdef WMOPS
@@ -1051,8 +1061,9 @@ int main(

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

#endif
        /* sanity check */
        if ( ( args.outConfig.audioConfig != IVAS_AUDIO_CONFIG_BINAURAL ) && ( args.outConfig.audioConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) && ( args.outConfig.audioConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && !is_split_pre_rend_mode( &args ) )
        {
@@ -1488,8 +1499,11 @@ 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;
@@ -1499,7 +1513,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;
                    }
                }
@@ -2461,6 +2475,25 @@ static bool parseAcousticEnvironmentIds(
    const char *value,
    AcousticEnvironmentSequence *aeSequence )
{
#ifdef FIX_1053_REVERB_RECONFIGURATION
    char config_string[RENDERER_MAX_METADATA_LINE_LENGTH];
    strncpy( config_string, value, RENDERER_MAX_METADATA_LINE_LENGTH );
    if ( !is_digits_only( config_string ) )
    {
        aeidFileReader *aeidReader = NULL;
        if ( aeidFileReader_open( config_string, &aeidReader ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError: Can't open aeid file %s \n", config_string );
            return false;
        }
        if ( aeidFileReading( aeidReader, &aeSequence->count, &aeSequence->pID, &aeSequence->pValidity ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError while reading aeid from %s\n", config_string );
            return false;
        }
        aeidFileReader_close( &aeidReader );
    }
#else
    uint16_t k;
    char config_string[RENDERER_MAX_METADATA_LINE_LENGTH];
    char *s;
@@ -2525,6 +2558,7 @@ static bool parseAcousticEnvironmentIds(
            return false;
        }
    }
#endif
    else
    {
        /* A single acoustic environment */
Loading