Commit 702e43e6 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/main' into nokia/contribution-42-masa-prerend

parents 785db88b d9d21b15
Loading
Loading
Loading
Loading
+275 −9
Original line number Diff line number Diff line
@@ -91,6 +91,15 @@ typedef struct
    uint16_t durationCounters[RENDERER_MAX_ISM_INPUTS];                /* Number of frames spent at current position */
} IsmPositionProvider;

#ifdef FIX_296_CFG_LFE_SCENE_DESC
typedef struct
{
    float lfe_azi;
    float lfe_ele;
    float lfe_gain_dB;
    char lfe_routing_mtx[FILENAME_MAX];
} LfeRoutingConfig;
#endif
typedef struct
{
    IVAS_REND_AudioConfig audioConfig;
@@ -308,7 +317,11 @@ static const int32_t numCliOptions = sizeof( cliOptions ) / sizeof( CmdLnParser_

static IVAS_REND_AudioConfig ambisonicsOrderToEnum( const int16_t order );

#ifdef FIX_296_CFG_LFE_SCENE_DESC
static void parseSceneDescriptionFile( char *path, char *audioFilePath, InputConfig *inConfig, IsmPositionProvider *positionProvider, MasaFileReader **masaReaders, LfeRoutingConfig **lfeRoutingConfigs );
#else
static void parseSceneDescriptionFile( char *path, char *audioFilePath, InputConfig *inConfig, IsmPositionProvider *positionProvider, MasaFileReader **masaReaders );
#endif

static ivas_error parseCustomLayoutFile( const char *filePath, IVAS_CUSTOM_LS_DATA *pLsSetupCustom );

@@ -320,6 +333,11 @@ static void IsmPositionProvider_getNextFrame( IsmPositionProvider *positionProvi

static void IsmPositionProvider_close( IsmPositionProvider *positionProvider );

#ifdef FIX_296_CFG_LFE_SCENE_DESC
static LfeRoutingConfig *LfeRoutingConfig_open( void );
static void LfeRoutingConfig_close( LfeRoutingConfig *lfeRoutingCfg );
#endif

static void readFromShorthandMetadata( IsmPositionProvider *positionProvider, ObjectPositionBuffer *objectMetadataBuffer, const uint32_t objIdx );

void getMetadataFromFileReader( IsmFileReader *ismReader, ObjectPositionBuffer *objectMetadataBuffer, const uint32_t objIdx );
@@ -338,7 +356,11 @@ static int8_t parseInt32( const char *line, int32_t *ret );

static void parseObjectPosition( char *line, IVAS_REND_AudioObjectPosition *position, uint16_t *positionDuration );

#ifdef FIX_296_CFG_LFE_SCENE_DESC
static void parseMetadata( char *metadataString, char *inDir, InputConfig *inConfig, IsmPositionProvider *positionProvider, MasaFileReader **masaReaders, LfeRoutingConfig **lfeRoutingConfigs );
#else
static void parseMetadata( char *metadataString, char *inDir, InputConfig *inConfig, IsmPositionProvider *positionProvider, MasaFileReader **masaReaders );
#endif

static ivas_error parseLfePanMtxFile( const char *lfeRoutingMatrixFilePath, IVAS_REND_LfePanMtx *lfePanMtx );

@@ -530,6 +552,9 @@ int main(
    HeadRotFileReader *referenceRotReader = NULL;
    hrtfFileReader *hrtfFileReader = NULL;
    IsmPositionProvider *positionProvider;
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    LfeRoutingConfig *lfeRoutingConfigs[RENDERER_MAX_MC_INPUTS];
#endif
    RenderConfigReader *renderConfigReader = NULL;
    MasaFileReader *masaReaders[RENDERER_MAX_MASA_INPUTS];
#ifdef MASA_PREREND
@@ -567,6 +592,13 @@ int main(
        hMasaMetadata[i] = NULL;
    }

#ifdef FIX_296_CFG_LFE_SCENE_DESC
    for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i )
    {
        lfeRoutingConfigs[i] = NULL;
    }
#endif

    CmdlnArgs args = parseCmdlnArgs( argc, argv );

    if ( args.nonDiegeticPan && !( ( args.inConfig.numAudioObjects == 0 && args.inConfig.multiChannelBuses[0].audioConfig == IVAS_REND_AUDIO_CONFIG_MONO ) ||
@@ -639,7 +671,16 @@ int main(
    if ( args.sceneDescriptionInput )
    {
        /* With scene description input, inputFilePath is the path to the scene description file. Parse it. */
#ifdef FIX_296_CFG_LFE_SCENE_DESC
        parseSceneDescriptionFile( args.inputFilePath,
                                   audioFilePath,
                                   &args.inConfig,
                                   positionProvider,
                                   masaReaders,
                                   lfeRoutingConfigs );
#else
        parseSceneDescriptionFile( args.inputFilePath, audioFilePath, &args.inConfig, positionProvider, masaReaders );
#endif
    }
    else
    {
@@ -722,13 +763,6 @@ int main(
    }

    /* === Configure === */
    // Todo Tapani Prerend: Check that this works correctly now.
//#ifdef MASA_PREREND
//    if ( ( error = IVAS_REND_InitConfig( hIvasRend, strlen( args.renderConfigFilePath ) != 0 ) ) != IVAS_ERR_OK )
//#else
//    if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK )
//#endif

    if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "Error in Renderer Config Init\n" );
@@ -807,7 +841,6 @@ int main(
    /* parse input LFE panning matrix */
    if ( args.lfeCustomRoutingEnabled && !isEmptyString( args.inLfePanningMatrixFile ) )
    {
        /* TODO tmu: how should we handle this on CLI for multiple MC inputs? */
        if ( ( error = parseLfePanMtxFile( args.inLfePanningMatrixFile, &lfePanMatrix ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
@@ -829,7 +862,6 @@ int main(
            exit( -1 );
        }

        /* TODO(sgi): Command line only supports one custom LS input for now, extend */
        if ( args.inConfig.multiChannelBuses[i].audioConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM )
        {
            if ( ( error = IVAS_REND_ConfigureCustomInputLoudspeakerLayout( hIvasRend, mcIds[i], args.inConfig.inSetupCustom ) ) != IVAS_ERR_OK )
@@ -843,7 +875,11 @@ int main(
        {
            if ( args.lfePanningEnabled )
            {
#ifdef FIX_296_CFG_LFE_SCENE_DESC
                fprintf( stderr, "Warning: LFE position specified as well as panning matrix! Ignoring position and using gains from panning matrix\n" );
#else
                fprintf( stdout, "Warning LFE position specified as well as panning matrix! Ignoring position and using gains from panning matrix\n" );
#endif
                args.lfePanningEnabled = false;
            }

@@ -862,6 +898,39 @@ int main(
                exit( -1 );
            }
        }
#ifdef FIX_296_CFG_LFE_SCENE_DESC
        else
        {
            /* check for configuration from scene description file */
            if ( lfeRoutingConfigs[i] != NULL )
            {
                /* prioritise panning matrix if configured */
                if ( !isEmptyString( lfeRoutingConfigs[i]->lfe_routing_mtx ) )
                {
                    if ( ( error = parseLfePanMtxFile( lfeRoutingConfigs[i]->lfe_routing_mtx, &lfePanMatrix ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                        exit( -1 );
                    }

                    if ( ( error = IVAS_REND_SetInputLfeMtx( hIvasRend, mcIds[i], (const IVAS_REND_LfePanMtx *) &lfePanMatrix ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                        exit( -1 );
                    }
                }
                /* set position based gains */
                else
                {
                    if ( ( error = IVAS_REND_SetInputLfePos( hIvasRend, mcIds[i], lfeRoutingConfigs[i]->lfe_gain_dB, lfeRoutingConfigs[i]->lfe_azi, lfeRoutingConfigs[i]->lfe_ele ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                        exit( -1 );
                    }
                }
            }
        }
#endif
    }

    for ( i = 0; i < args.inConfig.numAudioObjects; ++i )
@@ -1343,6 +1412,12 @@ int main(
    {
        MasaFileReader_close( &masaReaders[i] );
    }
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i )
    {
        LfeRoutingConfig_close( lfeRoutingConfigs[i] );
    }
#endif
#ifdef MASA_PREREND
    MasaFileWriter_close( &masaWriter );
#endif
@@ -1857,8 +1932,13 @@ static CmdlnArgs defaultArgs(

    args.lfePanningEnabled = false;
    args.lfeConfigGain = 1.0f;
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    args.lfeConfigAzimuth = 0.f;
    args.lfeConfigElevation = 0.f;
#else
    args.lfeConfigAzimuth = 0;
    args.lfeConfigElevation = 0;
#endif

    args.lfeCustomRoutingEnabled = false;
    clearString( args.inLfePanningMatrixFile );
@@ -2041,6 +2121,34 @@ IsmPositionProvider *IsmPositionProvider_open(
    return ipp;
}

#ifdef FIX_296_CFG_LFE_SCENE_DESC
LfeRoutingConfig *LfeRoutingConfig_open(
    void )
{
    LfeRoutingConfig *lrc;

    lrc = (LfeRoutingConfig *) malloc( sizeof( LfeRoutingConfig ) );
    lrc->lfe_azi = 0.f;
    lrc->lfe_ele = 0.f;
    lrc->lfe_gain_dB = 0.f;
    lrc->lfe_routing_mtx[0] = '\0';

    return lrc;
}

void LfeRoutingConfig_close(
    LfeRoutingConfig *lfeRoutingCfg )
{
    if ( lfeRoutingCfg != NULL )
    {

        free( lfeRoutingCfg );
    }

    return;
}
#endif

void getMetadataFromFileReader(
    IsmFileReader *ismReader,
    ObjectPositionBuffer *objectMetadataBuffer,
@@ -2330,6 +2438,12 @@ static int8_t parseInt32(

static void parseOptionalInputValues(
    char *line,
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    float *lfe_gain_dB,
    float *lfe_pos_azi,
    float *lfe_pos_ele,
    char *lfe_pan_mtx_filename,
#endif
    float *gain_dB )
{
    char *parse_pos;
@@ -2341,6 +2455,24 @@ static void parseOptionalInputValues(

    /* Set default values, in case some values are not specified */
    *gain_dB = 0.f;
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    if ( lfe_gain_dB != NULL )
    {
        *lfe_gain_dB = 0.f;
    }
    if ( lfe_pos_azi != NULL )
    {
        *lfe_pos_azi = 0.f;
    }
    if ( lfe_pos_ele != NULL )
    {
        *lfe_pos_ele = 0.f;
    }
    if ( lfe_pan_mtx_filename != NULL )
    {
        *lfe_pan_mtx_filename = '\0';
    }
#endif

    /* Save parsing position - will have to be passed to strtok to resume parsing after using strtok with non-NULL value below */
    parse_pos = readNextMetadataChunk( line, "\n" );
@@ -2357,10 +2489,50 @@ static void parseOptionalInputValues(

            if ( *endptr != '\0' )
            {
#ifdef FIX_296_CFG_LFE_SCENE_DESC
                fprintf( stderr, "Cannot parse string \"%s\" as a float value\n", value );
#else
                fprintf( stderr, "Cannot parse string string \"%s\" as a float value\n", value );
#endif
                exit( -1 );
            }
        }
#ifdef FIX_296_CFG_LFE_SCENE_DESC
        else if ( ( strcmp( key, "lfe_gain_dB" ) == 0 ) && lfe_gain_dB != NULL )
        {
            *lfe_gain_dB = (float) strtod( value, &endptr );

            if ( *endptr != '\0' )
            {
                fprintf( stderr, "Cannot parse string \"%s\" as a float value\n", value );
                exit( -1 );
            }
        }
        else if ( ( strcmp( key, "lfe_azi" ) == 0 ) && lfe_pos_azi != NULL )
        {
            *lfe_pos_azi = (float) strtod( value, &endptr );

            if ( *endptr != '\0' )
            {
                fprintf( stderr, "Cannot parse string \"%s\" as a float value\n", value );
                exit( -1 );
            }
        }
        else if ( ( strcmp( key, "lfe_ele" ) == 0 ) && lfe_pos_ele != NULL )
        {
            *lfe_pos_ele = (float) strtod( value, &endptr );

            if ( *endptr != '\0' )
            {
                fprintf( stderr, "Cannot parse string \"%s\" as a float value\n", value );
                exit( -1 );
            }
        }
        else if ( strcmp( key, "lfe_matrix" ) == 0 )
        {
            strncpy( lfe_pan_mtx_filename, value, FILENAME_MAX - 1 );
        }
#endif
        else
        {
            fprintf( stderr, "Unsupported optional key: %s\n", key );
@@ -2446,7 +2618,11 @@ static void parseIsm(
    }

    /* Read optional values */
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    parseOptionalInputValues( line, NULL, NULL, NULL, NULL, &inConfig->audioObjects[idx].gain_dB );
#else
    parseOptionalInputValues( line, &inConfig->audioObjects[idx].gain_dB );
#endif

    return;
}
@@ -2467,7 +2643,11 @@ static void parseSba(
    inConfig->ambisonicsBuses[idx].audioConfig = ambisonicsOrderToEnum( ambiOrder );

    /* Read optional values */
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    parseOptionalInputValues( line, NULL, NULL, NULL, NULL, &inConfig->ambisonicsBuses[idx].gain_dB );
#else
    parseOptionalInputValues( line, &inConfig->ambisonicsBuses[idx].gain_dB );
#endif

    return;
}
@@ -2475,6 +2655,9 @@ static void parseSba(
static void parseMc(
    char *line,
    InputConfig *inConfig,
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    LfeRoutingConfig **lfeRoutingConfigs,
#endif
    const int32_t idx )
{
    readNextMetadataChunk( line, "\n" );
@@ -2483,17 +2666,70 @@ static void parseMc(

    readNextMetadataChunk( line, "\n" );
    IVAS_REND_AudioConfig cfg = parseAudioConfig( line );
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    /* Try to use the given string as a path to a custom loudspeaker layout file. */
    if ( cfg == IVAS_REND_AUDIO_CONFIG_UNKNOWN )
    {
        ivas_error error = parseCustomLayoutFile( line, &inConfig->inSetupCustom );

        if ( error != IVAS_ERR_OK )
        {
            fprintf( stderr, "Error while parsing input format %s\n", line );
            exit( -1 );
        }
        inConfig->numMultiChannelBuses = 1;
        inConfig->multiChannelBuses[idx].audioConfig = IVAS_REND_AUDIO_CONFIG_LS_CUSTOM;
        inConfig->multiChannelBuses[idx].inputChannelIndex = 0;
        inConfig->multiChannelBuses[idx].gain_dB = 0.0f;
    }
#else
    if ( cfg == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM )
    {
        parseCustomLayoutFile( line, &inConfig->inSetupCustom );
    }
#endif
    else
    {
        inConfig->multiChannelBuses[idx].audioConfig = cfg;
    }

    /* Read optional values */
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    bool lfe_panningEnabled;
    float lfe_gain_dB, lfe_azi, lfe_ele;
    char lfe_routing_mtx[FILENAME_MAX];

    parseOptionalInputValues( line, &lfe_gain_dB, &lfe_azi, &lfe_ele, lfe_routing_mtx, &inConfig->multiChannelBuses[idx].gain_dB );

    lfe_panningEnabled = ( lfe_gain_dB != 0.f || lfe_azi != 0.f || lfe_ele != 0.f ) ? true : false;

    if ( lfe_panningEnabled && !isEmptyString( lfe_routing_mtx ) )
    {
        fprintf( stderr, "Warning: LFE position specified as well as panning matrix! Ignoring position and using gains from panning matrix\n" );
        lfe_panningEnabled = false;
    }

    if ( lfe_panningEnabled || !isEmptyString( lfe_routing_mtx ) )
    {
        /* a configuration was specified, set the values */
        lfeRoutingConfigs[idx] = LfeRoutingConfig_open();

        if ( lfe_panningEnabled )
        {
            lfeRoutingConfigs[idx]->lfe_gain_dB = lfe_gain_dB;
            lfeRoutingConfigs[idx]->lfe_azi = lfe_azi;
            lfeRoutingConfigs[idx]->lfe_ele = lfe_ele;
        }

        if ( !isEmptyString( lfe_routing_mtx ) )
        {
            strncpy( lfeRoutingConfigs[idx]->lfe_routing_mtx, lfe_routing_mtx, FILENAME_MAX );
            convert_backslash( lfeRoutingConfigs[idx]->lfe_routing_mtx );
        }
    }
#else
    parseOptionalInputValues( line, &inConfig->multiChannelBuses[idx].gain_dB );
#endif

    return;
}
@@ -2534,7 +2770,11 @@ static void parseMasa(
    }

    /* Read optional values */
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    parseOptionalInputValues( line, NULL, NULL, NULL, NULL, &inConfig->masaBuses[idx].gain_dB );
#else
    parseOptionalInputValues( line, &inConfig->masaBuses[idx].gain_dB );
#endif

    return;
}
@@ -2575,7 +2815,12 @@ static void parseMetadata(
    char *inDir,
    InputConfig *inConfig,
    IsmPositionProvider *positionProvider,
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    MasaFileReader **masaReaders,
    LfeRoutingConfig **lfeRoutingConfigs )
#else
    MasaFileReader **masaReaders )
#endif
{
    char line[RENDERER_MAX_METADATA_LINE_LENGTH];
    char *delimiter;
@@ -2627,7 +2872,11 @@ static void parseMetadata(
                fprintf( stderr, "Metadata exceeds the supported number of MC inputs\n" );
                exit( -1 );
            }
#ifdef FIX_296_CFG_LFE_SCENE_DESC
            parseMc( line, inConfig, lfeRoutingConfigs, counterChannelAudioObjects - 1 );
#else
            parseMc( line, inConfig, counterChannelAudioObjects - 1 );
#endif
        }
        else if ( strcmp( line, "SBA" ) == 0 )
        {
@@ -2695,7 +2944,12 @@ static void parseSceneDescriptionFile(
    char *audioFilePath,
    InputConfig *inConfig,
    IsmPositionProvider *positionProvider,
#ifdef FIX_296_CFG_LFE_SCENE_DESC
    MasaFileReader **masaReaders,
    LfeRoutingConfig **lfeRoutingConfigs )
#else
    MasaFileReader **masaReaders )
#endif
{
    uint32_t inAudioFilePathLen;
    char inAudioFilePath[FILENAME_MAX];
@@ -2724,7 +2978,11 @@ static void parseSceneDescriptionFile(
    strcpy( audioFilePath, inDir );
    strncat( audioFilePath, inAudioFilePath, inAudioFilePathLen );

#ifdef FIX_296_CFG_LFE_SCENE_DESC
    parseMetadata( mtdStr, inDir, inConfig, positionProvider, masaReaders, lfeRoutingConfigs );
#else
    parseMetadata( mtdStr, inDir, inConfig, positionProvider, masaReaders );
#endif

    return;
}
@@ -2787,8 +3045,16 @@ static ivas_error parseLfePanMtxFile(
        set_zero( ( *lfePanMtx )[lfe_in], IVAS_MAX_OUTPUT_CHANNELS );
    }

#ifdef FIX_296_CFG_LFE_SCENE_DESC
    for ( lfe_in = 0; lfe_in < IVAS_MAX_INPUT_LFE_CHANNELS; lfe_in++ )
#else
    for ( lfe_in = 0, ch_out = 0; lfe_in < IVAS_MAX_INPUT_LFE_CHANNELS; lfe_in++ )
#endif
    {
#ifdef FIX_296_CFG_LFE_SCENE_DESC
        ch_out = 0;

#endif
        /* if EOF or a blank line is encountered, simply return */
        if ( ( fgets( line, 200, mtxFile ) == NULL ) && ( strcmp( line, "\n" ) == 0 ) && ( strcmp( line, "\r\n" ) == 0 ) )
        {
+9 −8
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ fi
cfg=./scripts/config/ci_linux.json
dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat
ism_md_cmd="--metadata_files /usr/local/ltv/ltvISM1.csv /usr/local/ltv/ltvISM2.csv /usr/local/ltv/ltvISM3.csv /usr/local/ltv/ltvISM4.csv"
duration_arg="-U 1:2"

if [ $BUILD -eq 1 ];then
	# Enable memory macros to find unbalanced memory allocations/deallocations
@@ -79,20 +80,20 @@ fi
ism_modes=$(./scripts/runIvasCodec.py -l | grep ISM)
non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ISM)
echo "\n======================= 1. non-ism modes no FEC =======================\n\n"
./scripts/runIvasCodec.py -m $non_ism_modes -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt
./scripts/runIvasCodec.py -m $non_ism_modes -p $cfg $duration_arg $WORKERS | tee smoke_test_output.txt
echo "\n======================= 2. ism modes no FEC =======================\n\n"
./scripts/runIvasCodec.py -m $ism_modes -p $cfg -U 1 $WORKERS $ism_md_cmd | tee smoke_test_output.txt
./scripts/runIvasCodec.py -m $ism_modes -p $cfg $duration_arg $WORKERS $ism_md_cmd | tee smoke_test_output.txt
# run the decoding again, but with 15% frame loss
echo "\n======================= 3. all modes with FEC =======================\n\n"
./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt
./scripts/runIvasCodec.py -p $cfg $duration_arg $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt

# run JBM modes - EXT is excluded as not supported yet
modes_with_no_ext_out=$(./scripts/runIvasCodec.py -l | grep -v MASA | grep -v ISM)
modes_with_ext_out=$(./scripts/runIvasCodec.py -l | grep 'MASA\|ISM' | grep -v ISM+)
echo "\n======================= 4. JBM, modes with no EXT =======================\n\n"
./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt
./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg $duration_arg $WORKERS --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt
echo "\n======================= 5. JBM, modes with EXT =======================\n\n"
./scripts/runIvasCodec.py -m $modes_with_ext_out -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt
./scripts/runIvasCodec.py -m $modes_with_ext_out -p $cfg $duration_arg $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt

# run all modes with binaural output using external files
modes_with_bin_out="SBA PlanarSBA MASA MC ISM1 ISM2 ISM3 ISM4"
@@ -101,14 +102,14 @@ bin_out_modes="BINAURAL BINAURAL_ROOM"
echo "\n======================= 6. binaural out with HRTF files - WB =======================\n\n"
wb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _wb_)
hrtf_wb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin"
./scripts/runIvasCodec.py -p $cfg -m $wb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_wb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt
./scripts/runIvasCodec.py -p $cfg -m $wb_modes $duration_arg $WORKERS -D="-hrtf ${hrtf_wb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt

echo "\n======================= 7. binaural out with HRTF files - SWB =======================\n\n"
swb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _swb_)
hrtf_swb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin"
./scripts/runIvasCodec.py -p $cfg -m $swb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_swb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt
./scripts/runIvasCodec.py -p $cfg -m $swb_modes $duration_arg $WORKERS -D="-hrtf ${hrtf_swb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt

echo "\n======================= 8. binaural out with HRTF files - FB =======================\n\n"
fb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _fb_)
hrtf_fb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin"
./scripts/runIvasCodec.py -p $cfg -m $fb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_fb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt
./scripts/runIvasCodec.py -p $cfg -m $fb_modes $duration_arg $WORKERS -D="-hrtf ${hrtf_fb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt
+2 −0
Original line number Diff line number Diff line
@@ -227,6 +227,7 @@
#define FIX_483                                         /* FhG: fix issue 483, division by zero in nois_est */
#define FIX_483b                                        /* FhG: fix issue 483, uninitialized values in ivas_mct_core_enc */
#define FIX_170_DTX_MASA                                /* Nokia: Fix issue 170, relaxing the use of DTX in MASA format */
#define FIX_296_CFG_LFE_SCENE_DESC                       /* FhG: Fix issue 296 - add configurable LFE handling to the scene description file */
#define FIX_510                                         /* FhG: fix issue 510, misleading error message for invalid input format */
#define FIX_509                                         /* FhG: fix issue 509, too low number of bitsream indices in SBA */
#define FIX_519_JBM_ACCESS_NULL_TC_BUFFER               /* FhG: fix issue 519, accessing a yet uninitialized TC Buffer in frame 0*/
@@ -241,6 +242,7 @@

#define BINAURAL_AUDIO_CMDLINE
#define FIX_570_TCX_LPC_WRITE                           /* FhG: fix issue 570: LPC bitstream writer in TCX */
#define FIX_506                                         /* FhG: Compiler warnings */

#define MASA_PREREND                                    /* Nokia: Contribution 42: Support for IVAS_rend to merge MASA + other format to MASA */

+8 −1
Original line number Diff line number Diff line
@@ -387,7 +387,10 @@ static void spectrum_mod_dct(
    float slope;
    float inv_noise[MBANDS_GN_LD];
    float *pt_gbin, alpha, tmpN;
    int16_t i, cnt;
    int16_t i;
#ifndef FIX_506
    int16_t cnt;
#endif
    float *pt;
    float tmp, shift;
    const float *pt2;
@@ -475,7 +478,9 @@ static void spectrum_mod_dct(

            tmpN = slope * inv_noise[i];
            tmp = 0.0f;
#ifndef FIX_506
            cnt = 0;
#endif
            while ( freq <= mfreq_loc_LD[i] )
            {
                gain = 1.0f;
@@ -502,7 +507,9 @@ static void spectrum_mod_dct(

                *pt_gbin = gain + alpha * *pt_gbin;
                *pt++ *= *pt_gbin;
#ifndef FIX_506
                cnt++;
#endif
                freq += BIN_16kdct;
                pt_gbin++;
            }
+6 −0
Original line number Diff line number Diff line
@@ -1370,10 +1370,14 @@ static void spt_shorten_domain_set_dec(
)
{
    int16_t j, k;
#ifndef FIX_506
    int16_t kpos;
#endif
    int16_t spt_shorten_flag[SPT_SHORTEN_SBNUM];

#ifndef FIX_506
    kpos = 0;
#endif
    j = 0;
    for ( k = bands - SPT_SHORTEN_SBNUM; k < bands; k++ )
    {
@@ -1390,7 +1394,9 @@ static void spt_shorten_domain_set_dec(
            }
        }

#ifndef FIX_506
        kpos++;
#endif
        j++;
    }

Loading