Commit c991a9d5 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into 20250827_maintenance

parents 882e6f9f 4a1b55a1
Loading
Loading
Loading
Loading
+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\split_rend_bfi_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" />
+21 −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"
#include "vector3_pair_file_reader.h"
#include "wmc_auto.h"
@@ -1245,6 +1248,23 @@ 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];
@@ -1304,6 +1324,7 @@ static bool parseCmdlIVAS_dec(
                    usage_dec();
                    return false;
                }
#endif
            }
            else
            {
+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"
@@ -385,7 +388,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
    },
};

@@ -783,6 +790,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
@@ -1137,7 +1147,10 @@ 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 ) )
@@ -1611,8 +1624,9 @@ 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;
@@ -1622,7 +1636,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;
                    }
                }
@@ -2577,6 +2591,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;
@@ -2641,6 +2674,7 @@ static bool parseAcousticEnvironmentIds(
            return false;
        }
    }
#endif
    else
    {
        /* A single acoustic environment */
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@
#define NONBE_1377_REND_DIRATT_CONF                     /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */
#define FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK       /* Eri: Issue 1999: Range check on float values of distance attenuation, while the float values are not propagated to this function. The test is not correct, but configurable distance attenuation is not used in Characterization.*/
#define ADJUST_MCT_CHANNELS_MAX                         /* FhG: set correct max mct channels constant*/
#define FIX_1053_REVERB_RECONFIGURATION

/* #################### End BASOP porting switches ############################ */

+7 −0
Original line number Diff line number Diff line
@@ -4898,6 +4898,10 @@ Word16 IVAS_REND_GetRenderConfig(
    move16();
    move32();

#ifdef FIX_1053_REVERB_RECONFIGURATION
    Copy32( hRCin->distAtt_fx, hRCout->distAtt_fx, 3 );
#endif

    return IVAS_ERR_OK;
}

@@ -4938,6 +4942,9 @@ Word16 IVAS_REND_FeedRenderConfig(
    Copy32( renderConfig.roomAcoustics.pAcoustic_rt60_fx, hRenderConfig->roomAcoustics.pAcoustic_rt60_fx, CLDFB_NO_CHANNELS_MAX );
    Copy32( renderConfig.roomAcoustics.pAcoustic_dsr_fx, hRenderConfig->roomAcoustics.pAcoustic_dsr_fx, CLDFB_NO_CHANNELS_MAX );
    Copy( renderConfig.directivity_fx, hRenderConfig->directivity_fx, 3 * MAX_NUM_OBJECTS );
#ifdef FIX_1053_REVERB_RECONFIGURATION
    Copy32( renderConfig.distAtt_fx, hRenderConfig->distAtt_fx, 3 );
#endif

    hRenderConfig->roomAcoustics.use_er = 0;
    move16();
Loading