Commit 85125fbf authored by vaclav's avatar vaclav
Browse files

rename AUDIO_CONFIG enum and its members to to IVAS_*

parent 0dfdd419
Loading
Loading
Loading
Loading
Loading
+65 −65
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ typedef struct
    char *outputWavFilename;
    IVAS_DEC_MODE decMode;
    int32_t output_Fs;
    AUDIO_CONFIG outputConfig;
    IVAS_AUDIO_CONFIG outputConfig;
    bool quietModeEnabled;
    bool delayCompensationEnabled;
    bool voipMode;
@@ -274,11 +274,11 @@ int main(
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
    {
        fprintf( stdout, "Output metadata file:   %s\n", arg.outputWavFilename );
    }
    else if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    else if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        fprintf( stdout, "Output synthesis file:  %s\n", arg.outputWavFilename );
        fprintf( stdout, "Output metadata file:   %s\n", arg.outputMdFilename );
@@ -296,7 +296,7 @@ int main(
    if ( arg.hrtfReaderEnabled )
    {
        /* sanity check */
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            arg.hrtfReaderEnabled = false;
            fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" );
@@ -318,9 +318,9 @@ int main(
    if ( arg.enableHeadRotation )
    {
        /* sanity check */
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB
#ifdef SPLIT_REND_WITH_HEAD_ROT
             && arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_PCM
             && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
        )
        {
@@ -342,7 +342,7 @@ int main(
    if ( arg.enableReferenceRotation )
    {
        /* sanity check */
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            fprintf( stderr, "\nError: Reference rotation file cannot be used in this output configuration.\n\n" );
            goto cleanup;
@@ -369,7 +369,7 @@ int main(
    if ( arg.enableReferenceVectorTracking )
    {
        /* sanity check */
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            fprintf( stderr, "\nError: Reference vector trajectory file cannot be used in this output configuration.\n\n" );
            goto cleanup;
@@ -422,9 +422,9 @@ int main(
    if ( arg.renderConfigEnabled )
    {
        /* sanity check */
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB
#ifdef SPLIT_REND_WITH_HEAD_ROT
             && arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_PCM
             && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
        )
        {
@@ -454,17 +454,17 @@ int main(
    {
        /* sanity check */
#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_CODED &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL &&
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR &&
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED &&
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
        {
            fprintf( stderr, "\nExternal Renderer Config is supported only when binaural output configurations is used as output OR when Split rendering mode is enabled. Exiting. \n" );
            exit( -1 );
        }
#else
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            fprintf( stderr, "\nExternal Renderer Config is supported only for binaural output configurations. Exiting. \n\n" );
            goto cleanup;
@@ -488,7 +488,7 @@ int main(
 * Configure the decoder
 *------------------------------------------------------------------------------------------*/
#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        arg.enableHeadRotation = true;
#ifdef API_5MS_BASELINE
@@ -524,7 +524,7 @@ int main(

#ifdef API_5MS
#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK )
        {
@@ -687,14 +687,14 @@ int main(

        /* sanity check */
#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
        {
            fprintf( stderr, "\nExternal Renderer Config is supported only when binaural output configurations is used as output OR when Split rendering mode is enabled. Exiting. \n" );
            goto cleanup;
        }
#else
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            fprintf( stderr, "\nExternal Renderer Config is supported only for binaural output configurations. Exiting. \n\n" );
            goto cleanup;
@@ -719,7 +719,7 @@ int main(
            goto cleanup;
        }

        if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK )
            {
@@ -942,10 +942,10 @@ cleanup:
 * Translate command-line argument to output configuration
 *---------------------------------------------------------------------*/

static AUDIO_CONFIG cmdline2config(
static IVAS_AUDIO_CONFIG cmdline2config(
    char *argv )
{
    AUDIO_CONFIG output_config;
    IVAS_AUDIO_CONFIG output_config;

    char argv_to_upper[FILENAME_MAX];

@@ -955,73 +955,73 @@ static AUDIO_CONFIG cmdline2config(

    if ( strcmp( argv_to_upper, "EXT" ) == 0 ) /* external renderer */
    {
        output_config = AUDIO_CONFIG_EXTERNAL;
        output_config = IVAS_AUDIO_CONFIG_EXTERNAL;
    }
    else if ( strcmp( argv_to_upper, "MONO" ) == 0 )
    {
        output_config = AUDIO_CONFIG_MONO;
        output_config = IVAS_AUDIO_CONFIG_MONO;
    }
    else if ( strcmp( argv_to_upper, "STEREO" ) == 0 )
    {
        output_config = AUDIO_CONFIG_STEREO;
        output_config = IVAS_AUDIO_CONFIG_STEREO;
    }
    else if ( strcmp( argv_to_upper, "5_1" ) == 0 )
    {
        output_config = AUDIO_CONFIG_5_1;
        output_config = IVAS_AUDIO_CONFIG_5_1;
    }
    else if ( strcmp( argv_to_upper, "7_1" ) == 0 )
    {
        output_config = AUDIO_CONFIG_7_1;
        output_config = IVAS_AUDIO_CONFIG_7_1;
    }
    else if ( strcmp( argv_to_upper, "5_1_2" ) == 0 )
    {
        output_config = AUDIO_CONFIG_5_1_2;
        output_config = IVAS_AUDIO_CONFIG_5_1_2;
    }
    else if ( strcmp( argv_to_upper, "5_1_4" ) == 0 )
    {
        output_config = AUDIO_CONFIG_5_1_4;
        output_config = IVAS_AUDIO_CONFIG_5_1_4;
    }
    else if ( strcmp( argv_to_upper, "7_1_4" ) == 0 )
    {
        output_config = AUDIO_CONFIG_7_1_4;
        output_config = IVAS_AUDIO_CONFIG_7_1_4;
    }
    else if ( strcmp( argv_to_upper, "FOA" ) == 0 )
    {
        output_config = AUDIO_CONFIG_FOA;
        output_config = IVAS_AUDIO_CONFIG_FOA;
    }
    else if ( strcmp( argv_to_upper, "HOA2" ) == 0 )
    {
        output_config = AUDIO_CONFIG_HOA2;
        output_config = IVAS_AUDIO_CONFIG_HOA2;
    }
    else if ( strcmp( argv_to_upper, "HOA3" ) == 0 )
    {
        output_config = AUDIO_CONFIG_HOA3;
        output_config = IVAS_AUDIO_CONFIG_HOA3;
    }
    else if ( strcmp( argv_to_upper, "BINAURAL" ) == 0 )
    {
        output_config = AUDIO_CONFIG_BINAURAL;
        output_config = IVAS_AUDIO_CONFIG_BINAURAL;
    }
#ifdef SPLIT_REND_WITH_HEAD_ROT
    else if ( strcmp( argv_to_upper, "BINAURAL_SPLIT_CODED" ) == 0 )
    {
        output_config = AUDIO_CONFIG_BINAURAL_SPLIT_CODED;
        output_config = IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED;
    }
    else if ( strcmp( argv_to_upper, "BINAURAL_SPLIT_PCM" ) == 0 )
    {
        output_config = AUDIO_CONFIG_BINAURAL_SPLIT_PCM;
        output_config = IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM;
    }
#endif
    else if ( strcmp( argv_to_upper, "BINAURAL_ROOM_IR" ) == 0 )
    {
        output_config = AUDIO_CONFIG_BINAURAL_ROOM_IR;
        output_config = IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR;
    }
    else if ( strcmp( argv_to_upper, "BINAURAL_ROOM_REVERB" ) == 0 )
    {
        output_config = AUDIO_CONFIG_BINAURAL_ROOM_REVERB;
        output_config = IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB;
    }
    else
    {
        output_config = AUDIO_CONFIG_LS_CUSTOM;
        output_config = IVAS_AUDIO_CONFIG_LS_CUSTOM;
    }

    return output_config;
@@ -1051,7 +1051,7 @@ static bool parseCmdlIVAS_dec(
#endif
#endif
    arg->output_Fs = 48000;
    arg->outputConfig = AUDIO_CONFIG_MONO;
    arg->outputConfig = IVAS_AUDIO_CONFIG_MONO;
    arg->decMode = IVAS_DEC_MODE_IVAS;
    arg->quietModeEnabled = false;
    arg->delayCompensationEnabled = true;
@@ -1532,13 +1532,13 @@ static bool parseCmdlIVAS_dec(
    if ( i < argc - 3 )
    {
        arg->outputConfig = cmdline2config( argv[i] );
        if ( arg->outputConfig == AUDIO_CONFIG_LS_CUSTOM )
        if ( arg->outputConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM )
        {
            arg->customLsOutputEnabled = true;
            arg->customLsSetupFilename = argv[i];
        }
        i++;
        if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputConfig != AUDIO_CONFIG_STEREO ) )
        if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputConfig != IVAS_AUDIO_CONFIG_STEREO ) )
        {
            fprintf( stderr, "Error: non-diegetic panning is supported in stereo only\n\n" );
            usage_dec();
@@ -1547,11 +1547,11 @@ static bool parseCmdlIVAS_dec(
    }
    else
    {
        arg->outputConfig = AUDIO_CONFIG_MONO;
        arg->outputConfig = IVAS_AUDIO_CONFIG_MONO;
        arg->decMode = IVAS_DEC_MODE_EVS;
        if ( ( arg->Opt_non_diegetic_pan ) )
        {
            arg->outputConfig = AUDIO_CONFIG_STEREO;
            arg->outputConfig = IVAS_AUDIO_CONFIG_STEREO;
        }
    }

@@ -1772,7 +1772,7 @@ static ivas_error initOnFirstGoodFrame(
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        pFullDelayNumSamples[0] = 0;
    }
@@ -1799,7 +1799,7 @@ static ivas_error initOnFirstGoodFrame(
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        /* Open split rendering metadata writer */
        int16_t delayNumSamples_temp[3];
@@ -1811,7 +1811,7 @@ static ivas_error initOnFirstGoodFrame(
            return error;
        }

        if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
        if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
        {
            if ( ( error = split_rend_writer_open( hSplitRendFileReadWrite, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp ) ) != IVAS_ERR_OK )
            {
@@ -1829,7 +1829,7 @@ static ivas_error initOnFirstGoodFrame(
        }
    }

    if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
    if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
    {
#endif
        /* Open audio writer and write all previously skipped bad frames now that frame size is known */
@@ -1915,7 +1915,7 @@ static ivas_error initOnFirstGoodFrame(
    free( zeroBuf );

    /* Open other output files if EXT output config - now details about ISM or MASA are known */
    if ( arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
        if ( ( error = IVAS_DEC_GetFormat( hIvasDec, pBsFormat ) ) != IVAS_ERR_OK )
        {
@@ -2372,7 +2372,7 @@ static ivas_error decodeG192(
            }

#ifdef SPLIT_REND_WITH_HEAD_ROT
            if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
            if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
            {
                error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec,
                                                            (void *) ( pcmBuf + nOutChannels * nSamplesRendered ),
@@ -2468,7 +2468,7 @@ static ivas_error decodeG192(
        if ( decodedGoodFrame )
        {
#ifdef SPLIT_REND_WITH_HEAD_ROT
            if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) )
            if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) )
            {
                if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written,
                                                         splitRendBits.codec, splitRendBits.pose_correction
@@ -2484,7 +2484,7 @@ static ivas_error decodeG192(
            }
            else
            {
                if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
                if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
                {
                    if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written,
                                                             splitRendBits.codec, splitRendBits.pose_correction
@@ -2518,7 +2518,7 @@ static ivas_error decodeG192(
        }

        /* Write ISm metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
        if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ )
            {
@@ -2680,7 +2680,7 @@ static ivas_error decodeG192(
        }

        /* Write ISm metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
        if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ )
            {
@@ -2753,7 +2753,7 @@ static ivas_error decodeG192(
    }

    /* Print output metadata file name(s) */
    if ( arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
        if ( bsFormat == IVAS_DEC_BS_OBJ )
        {
@@ -3070,7 +3070,7 @@ static ivas_error decodeG192(
        if ( decodedGoodFrame )
        {
#ifdef SPLIT_REND_WITH_HEAD_ROT
            if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
            if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
            {
                IVAS_SPLIT_REND_BITS_DATA splitRendBits;

@@ -3087,7 +3087,7 @@ static ivas_error decodeG192(
                }
            }

            if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
            if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
            {
#endif
                if ( delayNumSamples < nOutSamples )
@@ -3109,7 +3109,7 @@ static ivas_error decodeG192(
        }

        /* Write MASA/ISM metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
        if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM )
            {
@@ -3206,7 +3206,7 @@ static ivas_error decodeG192(
    }

    /* Print output metadata file name(s) */
    if ( arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
        if ( bsFormat == IVAS_DEC_BS_OBJ )
        {
@@ -3714,7 +3714,7 @@ static ivas_error decodeVoIP(
            }

            /* Write ISM metadata to external file(s) */
            if ( decodedGoodFrame && arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
            if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
            {
                int16_t i;

@@ -4151,7 +4151,7 @@ static ivas_error decodeVariableSpeed(
        }

        /* Write ISm metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
        if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM )
            {
@@ -4327,7 +4327,7 @@ static ivas_error decodeVariableSpeed(
        }

        /* Write ISm metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
        if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM )
            {
@@ -4401,7 +4401,7 @@ static ivas_error decodeVariableSpeed(
    }

    /* Print output metadata file name(s) */
    if ( arg.outputConfig == AUDIO_CONFIG_EXTERNAL )
    if ( arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
        if ( bsFormat == IVAS_DEC_BS_OBJ )
        {
+81 −80

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -2712,7 +2712,7 @@ ivas_error preview_indices(
                st_ivas->nchan_transport++;
                k--;
            }
            st_ivas->transport_config = AUDIO_CONFIG_EXTERNAL + st_ivas->nchan_transport;
            st_ivas->transport_config = IVAS_AUDIO_CONFIG_EXTERNAL + st_ivas->nchan_transport;

            st_ivas->ism_mode = ivas_ism_mode_select( st_ivas->nchan_transport, total_brate );
            st_ivas->nSCE = st_ivas->nchan_transport;
+27 −27
Original line number Diff line number Diff line
@@ -75,33 +75,33 @@

typedef enum _IVAS_AUDIO_CONFIG
{
    AUDIO_CONFIG_INVALID,
    AUDIO_CONFIG_MONO,                 /* mono output                            */
    AUDIO_CONFIG_STEREO,               /* stereo output                          */
    AUDIO_CONFIG_5_1,                  /* 5.1 speakers layout CICP6              */
    AUDIO_CONFIG_7_1,                  /* 7.1 speakers layout CICP12             */
    AUDIO_CONFIG_5_1_2,                /* 5.1+2 speakers layout CICP14           */
    AUDIO_CONFIG_5_1_4,                /* 5.1+4 speakers layout CICP16           */
    AUDIO_CONFIG_7_1_4,                /* 7.1+4 speakers layout CICP19           */
    AUDIO_CONFIG_LS_CUSTOM,            /* custom loudspeaker layout              */
    AUDIO_CONFIG_FOA,                  /* ambisonics, order 1                    */
    AUDIO_CONFIG_HOA2,                 /* ambisonics, order 2                    */
    AUDIO_CONFIG_HOA3,                 /* ambisonics, order 3                    */
    AUDIO_CONFIG_OBA,                  /* object based audio                     */
    AUDIO_CONFIG_BINAURAL,             /* binaural with HRIR                     */
    AUDIO_CONFIG_BINAURAL_SPLIT_CODED, /* split binaural with CLDFB coded output */
    AUDIO_CONFIG_BINAURAL_SPLIT_PCM,   /* split binaural with PCM coded output   */
    AUDIO_CONFIG_BINAURAL_ROOM_IR,     /* binaural with BRIR                     */
    AUDIO_CONFIG_BINAURAL_ROOM_REVERB, /* binaural with HRIR + reverb            */
    AUDIO_CONFIG_ISM1,                 /* ISM1                                   */
    AUDIO_CONFIG_ISM2,                 /* ISM2                                   */
    AUDIO_CONFIG_ISM3,                 /* ISM3                                   */
    AUDIO_CONFIG_ISM4,                 /* ISM4                                   */
    AUDIO_CONFIG_MASA1,                /* MASA1                                  */
    AUDIO_CONFIG_MASA2,                /* MASA2                                  */
    AUDIO_CONFIG_EXTERNAL              /* external renderer                      */

} AUDIO_CONFIG;
    IVAS_AUDIO_CONFIG_INVALID,
    IVAS_AUDIO_CONFIG_MONO,                 /* mono output                            */
    IVAS_AUDIO_CONFIG_STEREO,               /* stereo output                          */
    IVAS_AUDIO_CONFIG_5_1,                  /* 5.1 speakers layout CICP6              */
    IVAS_AUDIO_CONFIG_7_1,                  /* 7.1 speakers layout CICP12             */
    IVAS_AUDIO_CONFIG_5_1_2,                /* 5.1+2 speakers layout CICP14           */
    IVAS_AUDIO_CONFIG_5_1_4,                /* 5.1+4 speakers layout CICP16           */
    IVAS_AUDIO_CONFIG_7_1_4,                /* 7.1+4 speakers layout CICP19           */
    IVAS_AUDIO_CONFIG_LS_CUSTOM,            /* custom loudspeaker layout              */
    IVAS_AUDIO_CONFIG_FOA,                  /* ambisonics, order 1                    */
    IVAS_AUDIO_CONFIG_HOA2,                 /* ambisonics, order 2                    */
    IVAS_AUDIO_CONFIG_HOA3,                 /* ambisonics, order 3                    */
    IVAS_AUDIO_CONFIG_OBA,                  /* object based audio                     */
    IVAS_AUDIO_CONFIG_BINAURAL,             /* binaural with HRIR                     */
    IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED, /* split binaural with CLDFB coded output */
    IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM,   /* split binaural with PCM coded output   */
    IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR,     /* binaural with BRIR                     */
    IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB, /* binaural with HRIR + reverb            */
    IVAS_AUDIO_CONFIG_ISM1,                 /* ISM1                                   */
    IVAS_AUDIO_CONFIG_ISM2,                 /* ISM2                                   */
    IVAS_AUDIO_CONFIG_ISM3,                 /* ISM3                                   */
    IVAS_AUDIO_CONFIG_ISM4,                 /* ISM4                                   */
    IVAS_AUDIO_CONFIG_MASA1,                /* MASA1                                  */
    IVAS_AUDIO_CONFIG_MASA2,                /* MASA2                                  */
    IVAS_AUDIO_CONFIG_EXTERNAL              /* external renderer                      */

} IVAS_AUDIO_CONFIG;


/*----------------------------------------------------------------------------------*
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ int32_t get_delay(
            delay = IVAS_DEC_DELAY_NS;

#ifdef SPLIT_REND_WITH_HEAD_ROT
            if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
            if ( output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
            {
#endif
                if ( hCldfb != NULL )
Loading