Commit ebf14656 authored by multrus's avatar multrus
Browse files

[cleanup] accept MASA_PREREND

parent b860fa78
Loading
Loading
Loading
Loading
+0 −32
Original line number Diff line number Diff line
@@ -47,9 +47,7 @@
#include "ism_file_reader.h"
#include "ls_custom_file_reader.h"
#include "masa_file_reader.h"
#ifdef MASA_PREREND
#include "masa_file_writer.h"
#endif
#include "prot.h"
#include "render_config_reader.h"
#include "wmc_auto.h"
@@ -444,9 +442,7 @@ static int16_t getTotalNumInChannels(
            fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
            exit( -1 );
        }
#ifdef MASA_PREREND
        IVAS_REND_GetNumAllObjects( hIvasRend, &numInputChannels ); /* In case of MASA output, modify the numInputChannels to contain all objects. Otherwise, keep the original value. */
#endif
        totalNumInChannels += numInputChannels;
    }

@@ -568,9 +564,7 @@ int main(
    LfeRoutingConfig *lfeRoutingConfigs[RENDERER_MAX_MC_INPUTS];
    RenderConfigReader *renderConfigReader = NULL;
    MasaFileReader *masaReaders[RENDERER_MAX_MASA_INPUTS];
#ifdef MASA_PREREND
    MasaFileWriter *masaWriter = NULL;
#endif
    IVAS_MASA_METADATA_HANDLE hMasaMetadata[RENDERER_MAX_MASA_INPUTS];
    char audioFilePath[FILENAME_MAX];
    AudioFileReader *audioReader = NULL;
@@ -703,7 +697,6 @@ int main(
        setupWithSingleFormatInput( args, audioFilePath, positionProvider, masaReaders );
    }

#ifdef MASA_PREREND
    /* Check that there is allowed configuration for MASA format output */
    if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 )
    {
@@ -721,7 +714,6 @@ int main(
            exit( -1 );
        }
    }
#endif

    if ( AudioFileReader_open( &audioReader, audioFilePath ) != IVAS_ERR_OK )
    {
@@ -844,7 +836,6 @@ int main(
        }
    }

#ifdef MASA_PREREND
    /* Set up MASA writer for MASA output */
    if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 )
    {
@@ -861,7 +852,6 @@ int main(
    {
        IVAS_REND_SetTotalNumberOfObjects( hIvasRend, args.inConfig.numAudioObjects );
    }
#endif

    IVAS_REND_LfePanMtx lfePanMatrix;

@@ -968,13 +958,11 @@ int main(
            exit( -1 );
        }

#ifdef MASA_PREREND
        /* With MASA output, all objects are handled at once, so add only one input having all objects in it */
        if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 )
        {
            break;
        }
#endif
    }

    for ( i = 0; i < args.inConfig.numAmbisonicsBuses; ++i )
@@ -1201,7 +1189,6 @@ int main(

        for ( i = 0; i < args.inConfig.numAudioObjects; ++i )
        {
#ifdef MASA_PREREND
            if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 )
            {
                if ( i == 0 )
@@ -1237,21 +1224,6 @@ int main(
                    exit( -1 );
                }
            }
#else
            IVAS_REND_ReadOnlyAudioBuffer tmpBuffer = getReadOnlySubBuffer( inBuffer, (int16_t) args.inConfig.audioObjects[i].inputChannelIndex, 1 );

            if ( ( error = IVAS_REND_FeedInputAudio( hIvasRend, ismIds[i], tmpBuffer ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }

            if ( ( error = IVAS_REND_FeedInputObjectMetadata( hIvasRend, ismIds[i], mtdBuffer.positions[i] ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }
#endif
        }

        for ( i = 0; i < args.inConfig.numAmbisonicsBuses; ++i )
@@ -1343,7 +1315,6 @@ int main(
            delayNumSamples -= (int16_t) outBufferSize;
        }

#ifdef MASA_PREREND
        /* Write MASA metadata for MASA outputs */
        if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 )
        {
@@ -1417,7 +1388,6 @@ int main(
                fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) );
            }
        }
#endif

        frame++;
        if ( !args.quietModeEnabled )
@@ -1471,9 +1441,7 @@ int main(
    {
        LfeRoutingConfig_close( lfeRoutingConfigs[i] );
    }
#ifdef MASA_PREREND
    MasaFileWriter_close( &masaWriter );
#endif
    AudioFileReader_close( &audioReader );
    AudioFileWriter_close( &audioWriter );
    RotationFileReader_close( &headRotReader );
+0 −1
Original line number Diff line number Diff line
@@ -155,7 +155,6 @@



#define MASA_PREREND                                    /* Nokia: Contribution 42: Support for IVAS_rend to merge MASA + other format to MASA */
#define FIX_383_CLEAN_UP                                /* Dlb : Clean up of unused functions */
#define ISM_25k6_HZ_CORE                                /* VA: issue 540: 1ISM 48 kbps - change ACELP/TCX 16 kHz core to TCX only 25.6 kHz core */

+0 −2
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@
#endif
#include "wmc_auto.h"

#ifdef MASA_PREREND

/*-------------------------------------------------------------------------
 * Local function prototypes
@@ -403,4 +402,3 @@ static void ivas_dirac_dmx(
    return;
}
#endif /* MASA_PREREND */
+0 −2
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ the United Nations Convention on Contracts on the International Sales of Goods.
#include "prot.h"
#include "wmc_auto.h"

#ifdef MASA_PREREND


static void copy_masa_meta_tile(
@@ -359,4 +358,3 @@ void masaPrerendClose(
    return;
}
#endif /* MASA_PREREND */
+0 −2
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
#endif
#include "wmc_auto.h"

#ifdef MASA_PREREND


/*-------------------------------------------------------------------------
@@ -1113,4 +1112,3 @@ void ivas_create_masa_out_meta(
    return;
}
#endif /* MASA_PREREND */
Loading