Commit 32aa5004 authored by vaclav's avatar vaclav
Browse files

Merge branch '733-public-api-enum-names' into 'main'

Resolve "Public API enum names"

See merge request !1036
parents 77151658 5d17449e
Loading
Loading
Loading
Loading
Loading
+62 −62
Original line number Original line Diff line number Diff line
@@ -96,7 +96,7 @@ typedef struct
    char *outputWavFilename;
    char *outputWavFilename;
    IVAS_DEC_MODE decMode;
    IVAS_DEC_MODE decMode;
    int32_t output_Fs;
    int32_t output_Fs;
    AUDIO_CONFIG outputConfig;
    IVAS_AUDIO_CONFIG outputConfig;
    bool quietModeEnabled;
    bool quietModeEnabled;
    bool delayCompensationEnabled;
    bool delayCompensationEnabled;
    bool voipMode;
    bool voipMode;
@@ -268,11 +268,11 @@ int main(
    }
    }


#ifdef SPLIT_REND_WITH_HEAD_ROT
#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 );
        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 synthesis file:  %s\n", arg.outputWavFilename );
        fprintf( stdout, "Output metadata file:   %s\n", arg.outputMdFilename );
        fprintf( stdout, "Output metadata file:   %s\n", arg.outputMdFilename );
@@ -290,7 +290,7 @@ int main(
    if ( arg.hrtfReaderEnabled )
    if ( arg.hrtfReaderEnabled )
    {
    {
        /* sanity check */
        /* 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;
            arg.hrtfReaderEnabled = false;
            fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" );
            fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" );
@@ -312,9 +312,9 @@ int main(
    if ( arg.enableHeadRotation )
    if ( arg.enableHeadRotation )
    {
    {
        /* sanity check */
        /* 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
#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
#endif
        )
        )
        {
        {
@@ -336,7 +336,7 @@ int main(
    if ( arg.enableReferenceRotation )
    if ( arg.enableReferenceRotation )
    {
    {
        /* sanity check */
        /* 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" );
            fprintf( stderr, "\nError: Reference rotation file cannot be used in this output configuration.\n\n" );
            goto cleanup;
            goto cleanup;
@@ -363,7 +363,7 @@ int main(
    if ( arg.enableReferenceVectorTracking )
    if ( arg.enableReferenceVectorTracking )
    {
    {
        /* sanity check */
        /* 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" );
            fprintf( stderr, "\nError: Reference vector trajectory file cannot be used in this output configuration.\n\n" );
            goto cleanup;
            goto cleanup;
@@ -416,9 +416,9 @@ int main(
    if ( arg.renderConfigEnabled )
    if ( arg.renderConfigEnabled )
    {
    {
        /* sanity check */
        /* 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
#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
#endif
        )
        )
        {
        {
@@ -447,17 +447,17 @@ int main(
    {
    {
        /* sanity check */
        /* sanity check */
#ifdef SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( arg.outputConfig != AUDIO_CONFIG_BINAURAL &&
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_IR &&
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_CODED &&
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED &&
             arg.outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
             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" );
            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 );
            exit( -1 );
        }
        }
#else
#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" );
            fprintf( stderr, "\nExternal Renderer Config is supported only for binaural output configurations. Exiting. \n\n" );
            goto cleanup;
            goto cleanup;
@@ -477,7 +477,7 @@ int main(
     *------------------------------------------------------------------------------------------*/
     *------------------------------------------------------------------------------------------*/


#ifdef SPLIT_REND_WITH_HEAD_ROT
#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;
        arg.enableHeadRotation = true;
        if ( arg.enable5ms &&
        if ( arg.enable5ms &&
@@ -514,7 +514,7 @@ int main(
     *------------------------------------------------------------------------------------------*/
     *------------------------------------------------------------------------------------------*/


#ifdef SPLIT_REND_WITH_HEAD_ROT
#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 )
        if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK )
        {
        {
@@ -652,14 +652,14 @@ int main(


        /* sanity check */
        /* sanity check */
#ifdef SPLIT_REND_WITH_HEAD_ROT
#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 &&
        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 != 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 )
        {
        {
            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" );
            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;
            goto cleanup;
        }
        }
#else
#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" );
            fprintf( stderr, "\nExternal Renderer Config is supported only for binaural output configurations. Exiting. \n\n" );
            goto cleanup;
            goto cleanup;
@@ -688,7 +688,7 @@ int main(
            goto cleanup;
            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.roomAcoustics ) ) == IVAS_ERR_OK )
            if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK )
            {
            {
@@ -908,10 +908,10 @@ cleanup:
 * Translate command-line argument to output configuration
 * Translate command-line argument to output configuration
 *---------------------------------------------------------------------*/
 *---------------------------------------------------------------------*/


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


    char argv_to_upper[FILENAME_MAX];
    char argv_to_upper[FILENAME_MAX];


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


    if ( strcmp( argv_to_upper, "EXT" ) == 0 ) /* external renderer */
    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 )
    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 )
    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 )
    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 )
    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 )
    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 )
    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 )
    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 )
    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 )
    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 )
    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 )
    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
#ifdef SPLIT_REND_WITH_HEAD_ROT
    else if ( strcmp( argv_to_upper, "BINAURAL_SPLIT_CODED" ) == 0 )
    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 )
    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
#endif
    else if ( strcmp( argv_to_upper, "BINAURAL_ROOM_IR" ) == 0 )
    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 )
    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
    else
    {
    {
        output_config = AUDIO_CONFIG_LS_CUSTOM;
        output_config = IVAS_AUDIO_CONFIG_LS_CUSTOM;
    }
    }


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


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


#ifdef SPLIT_REND_WITH_HEAD_ROT
#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;
        pFullDelayNumSamples[0] = 0;
    }
    }
@@ -1820,7 +1820,7 @@ static ivas_error initOnFirstGoodFrame(
    }
    }


#ifdef SPLIT_REND_WITH_HEAD_ROT
#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 */
        /* Open split rendering metadata writer */
        int16_t delayNumSamples_temp[3];
        int16_t delayNumSamples_temp[3];
@@ -1832,7 +1832,7 @@ static ivas_error initOnFirstGoodFrame(
            return error;
            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 )
            if ( ( error = split_rend_writer_open( hSplitRendFileReadWrite, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp ) ) != IVAS_ERR_OK )
            {
            {
@@ -1850,7 +1850,7 @@ static ivas_error initOnFirstGoodFrame(
        }
        }
    }
    }


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


    /* Open other output files if EXT output config - now details about ISM or MASA are known */
    /* 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 )
        if ( ( error = IVAS_DEC_GetFormat( hIvasDec, pBsFormat ) ) != IVAS_ERR_OK )
        {
        {
@@ -1991,7 +1991,7 @@ static ivas_error initOnFirstGoodFrame(
            if ( numInitialBadFrames > 0 )
            if ( numInitialBadFrames > 0 )
            {
            {
                /* Duplicate good first frame metadata to fill the beginning of stream. */
                /* Duplicate good first frame metadata to fill the beginning of stream. */
                MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL;
                IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL;
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                {
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -2357,7 +2357,7 @@ static ivas_error decodeG192(
            }
            }


#ifdef SPLIT_REND_WITH_HEAD_ROT
#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,
                error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec,
                                                            (void *) ( pcmBuf + nOutChannels * nSamplesRendered ),
                                                            (void *) ( pcmBuf + nOutChannels * nSamplesRendered ),
@@ -2453,7 +2453,7 @@ static ivas_error decodeG192(
        if ( decodedGoodFrame )
        if ( decodedGoodFrame )
        {
        {
#ifdef SPLIT_REND_WITH_HEAD_ROT
#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,
                if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written,
                                                         splitRendBits.codec, splitRendBits.pose_correction,
                                                         splitRendBits.codec, splitRendBits.pose_correction,
@@ -2465,7 +2465,7 @@ static ivas_error decodeG192(
            }
            }
            else
            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,
                    if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written,
                                                             splitRendBits.codec, splitRendBits.pose_correction,
                                                             splitRendBits.codec, splitRendBits.pose_correction,
@@ -2495,7 +2495,7 @@ static ivas_error decodeG192(
        }
        }


        /* Write ISm metadata to external file(s) */
        /* 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 )
            if ( bsFormat == IVAS_DEC_BS_OBJ )
            {
            {
@@ -2524,7 +2524,7 @@ static ivas_error decodeG192(
            }
            }
            else if ( bsFormat == IVAS_DEC_BS_MASA )
            else if ( bsFormat == IVAS_DEC_BS_MASA )
            {
            {
                MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
                IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                {
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -2661,7 +2661,7 @@ static ivas_error decodeG192(
        }
        }


        /* Write ISm metadata to external file(s) */
        /* 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 )
            if ( bsFormat == IVAS_DEC_BS_OBJ )
            {
            {
@@ -2690,7 +2690,7 @@ static ivas_error decodeG192(
            }
            }
            else if ( bsFormat == IVAS_DEC_BS_MASA )
            else if ( bsFormat == IVAS_DEC_BS_MASA )
            {
            {
                MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
                IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                {
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -2734,7 +2734,7 @@ static ivas_error decodeG192(
    }
    }


    /* Print output metadata file name(s) */
    /* 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 )
        if ( bsFormat == IVAS_DEC_BS_OBJ )
        {
        {
@@ -3237,7 +3237,7 @@ static ivas_error decodeVoIP(
            }
            }


            /* Write ISM metadata to external file(s) */
            /* 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;
                int16_t i;


@@ -3269,7 +3269,7 @@ static ivas_error decodeVoIP(


                if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM )
                if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM )
                {
                {
                    MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
                    IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
                    if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK )
                    if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK )
                    {
                    {
                        fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                        fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
+88 −87

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Original line Diff line number Diff line
@@ -2712,7 +2712,7 @@ ivas_error preview_indices(
                st_ivas->nchan_transport++;
                st_ivas->nchan_transport++;
                k--;
                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->ism_mode = ivas_ism_mode_select( st_ivas->nchan_transport, total_brate );
            st_ivas->nSCE = st_ivas->nchan_transport;
            st_ivas->nSCE = st_ivas->nchan_transport;
+3 −3
Original line number Original line Diff line number Diff line
@@ -69,7 +69,7 @@
#define PCM16_TO_FLT_FAC                32768.0f
#define PCM16_TO_FLT_FAC                32768.0f
#define MDFT_NORM_SCALING               ( 1.0f / PCM16_TO_FLT_FAC )
#define MDFT_NORM_SCALING               ( 1.0f / PCM16_TO_FLT_FAC )
#define MAX_FRAME_COUNTER               200
#define MAX_FRAME_COUNTER               200
#define MAX_BITS_PER_FRAME              10240           /* Bits per frame for max. bitrate 512kbps */
#define MAX_BITS_PER_FRAME              10240           /* Bits per frame for max. bitrate 512kbps, == IVAS_MAX_BITS_PER_FRAME */


#define ENC                             0               /* Index for "encoder" */
#define ENC                             0               /* Index for "encoder" */
#define DEC                             1               /* Index for "decoder" */
#define DEC                             1               /* Index for "decoder" */
@@ -621,8 +621,8 @@ enum


#define L_HP20_MEM                          4                      /* HP20 filter memory length */
#define L_HP20_MEM                          4                      /* HP20 filter memory length */


#define CLDFB_NO_CHANNELS_MAX               60                     /* CLDFB resampling - max number of CLDFB channels */
#define CLDFB_NO_CHANNELS_MAX               60                     /* CLDFB resampling - max number of CLDFB channels, == IVAS_CLDFB_NO_CHANNELS_MAX */
#define CLDFB_NO_COL_MAX                    16                     /* CLDFB resampling - max number of CLDFB col. */
#define CLDFB_NO_COL_MAX                    16                     /* CLDFB resampling - max number of CLDFB col., == IVAS_CLDFB_NO_COL_MAX */
#define CLDFB_NO_COL_MAX_SWITCH             6                      /* CLDFB resampling - max number of CLDFB col. for switching */
#define CLDFB_NO_COL_MAX_SWITCH             6                      /* CLDFB resampling - max number of CLDFB col. for switching */
#define CLDFB_NO_COL_MAX_SWITCH_BFI         10                     /* CLDFB resampling - max number of CLDFB col. for switching, BFI */
#define CLDFB_NO_COL_MAX_SWITCH_BFI         10                     /* CLDFB resampling - max number of CLDFB col. for switching, BFI */
#define CLDFB_OVRLP_MIN_SLOTS               3                      /* CLDFB resampling - minimize processing to minimum required for transition frame ACELP->TCX/HQ */
#define CLDFB_OVRLP_MIN_SLOTS               3                      /* CLDFB resampling - minimize processing to minimum required for transition frame ACELP->TCX/HQ */
+44 −45

File changed.

Preview size limit exceeded, changes collapsed.

Loading