Commit a654b6a3 authored by sbsarac's avatar sbsarac
Browse files

Add aeid file - wip

parent 88edcfe7
Loading
Loading
Loading
Loading
+43 −34
Original line number Diff line number Diff line
@@ -1530,19 +1530,41 @@ 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];
                FILE *aeidFile = NULL;
                int32_t id;
                int32_t duration;
                uint16_t k = 0;

                for ( k = 0; s[k]; )
                /* Open aeid file */
                if ( strlen( argv[i] ) < 1 )
                {
                    s[k] == ',' ? k++ : *s++;
                    return IVAS_ERR_FAILED_FILE_OPEN;
                }

                aeidFile = fopen( argv[i], "r" );

                if ( !aeidFile )
                {
                    return IVAS_ERR_FAILED_FILE_OPEN;
                }

                while ( !feof( aeidFile ) )
                {
                    if ( fscanf( aeidFile, "%d:%d", &id, &duration ) == 2 )
                    {
                        k++;
                    }
                    else
                    {
                        fprintf( stdout, "Error while parsing acoustic environment sequence: %s\n\n", argv[i] );
                        usage_dec();
                        return false;
                    }
                }

                if ( k == 0 )
                {
                    fprintf( stdout, "Error: Invalid acoustic environment sequence specified: %s\n\n", argv[i] );
                    fprintf( stdout, "Error: No acoustic environment: %s\n\n", argv[i] );
                    usage_dec();
                    return false;
                }
@@ -1556,39 +1578,27 @@ static bool parseCmdlIVAS_dec(
                }

                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 );
                fseek( aeidFile, 0, SEEK_SET );

                    token = strtok( NULL, "," );
                    if ( !is_number( token ) )
                while ( !feof( aeidFile ) )
                {
                        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, "-" );
                    if ( fscanf( aeidFile, "%d:%d", &id, &duration ) == 2 )
                    {
                        arg->aeSequence.pID[k] = (uint16_t) id;
                        arg->aeSequence.pValidity[k] = (uint16_t) duration;
                        k++;
                    }

                if ( k != arg->aeSequence.count )
                    else
                    {
                        fprintf( stdout, "Error while parsing acoustic environment sequence: %s\n\n", argv[i] );
                        usage_dec();
                        return false;
                    }
                }
                i++;
                fclose( aeidFile );
#else
                fprintf( stdout, "Error: Invalid acoustic environment ID specified: %s\n\n", argv[i] );
                usage_dec();
@@ -1861,10 +1871,9 @@ 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) or\n" );
    fprintf( stdout, "                      file contains lines for each ID and duration in the format [ID1:duration1] without braces and\n" );
    fprintf( stdout, "                      spaces, with ':' character separating ID from duration, where duration is specified in frames\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" );
+3 −3
Original line number Diff line number Diff line
@@ -1294,15 +1294,15 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1

// Multi-channel 5_1 at 512 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (CREND)
//../IVAS_cod -mc 5_1 512000 48 testv/stv51MC48c.wav bit
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid 1-200,0-100,2-500 BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid1.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst

// Multi-channel 5_1 at 64 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (FastConv)
//../IVAS_cod -mc 5_1 64000 48 testv/stv51MC48c.wav bit
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid 1-500,2-100,0-300 BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid2.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst

// Multi-channel 5_1 at 32 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (ParamBin)
//../IVAS_cod -mc 5_1 32000 48 testv/stv51MC48c.wav bit
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid 0-100,2-500,1-200 BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid3.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst

// Multi-channel 5_1 at 32 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out Config hospital_patientroom
../IVAS_cod -mc 5_1 32000 48 testv/stv51MC48c.wav bit
+3 −3
Original line number Diff line number Diff line
@@ -1293,15 +1293,15 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1

// Multi-channel 5_1 at 512 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (CREND)
//../IVAS_cod -mc 5_1 512000 48 testv/ltv51MC48c.wav bit
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid 1-500,0-1000,2-500 BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid1.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst

// Multi-channel 5_1 at 64 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (FastConv)
//../IVAS_cod -mc 5_1 64000 48 testv/ltv51MC48c.wav bit
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid 1-500,2-500,0-500 BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid2.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst

// Multi-channel 5_1 at 32 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (ParamBin)
//../IVAS_cod -mc 5_1 32000 48 testv/ltv51MC48c.wav bit
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid 0-1000,2-500,1-500 BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst
//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid3.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst

// Multi-channel 5_1 at 32 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out Config hospital_patientroom
../IVAS_cod -mc 5_1 32000 48 testv/ltv48_MC51.wav bit
+3 −0
Original line number Diff line number Diff line
1:200
0:100
2:500
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
1:500
2:100
0:300
 No newline at end of file
Loading