Commit b815a28d authored by vaclav's avatar vaclav
Browse files

issue 1225: Add disclaimer for renderer application + Add info about IVAS...

issue 1225: Add disclaimer for renderer application + Add info about IVAS reference version; under FIX_1225_DISCLAIMER
parent d6e5b4e5
Loading
Loading
Loading
Loading
Loading
+48 −1
Original line number Diff line number Diff line
@@ -737,6 +737,10 @@ int main(
        lfeRoutingConfigs[i] = NULL;
    }

#ifdef FIX_1225_DISCLAIMER
    IVAS_REND_PrintDisclaimer();

#endif
    CmdlnArgs args = parseCmdlnArgs( argc, argv );

    if ( args.nonDiegeticPan && !( ( args.inConfig.numAudioObjects == 0 && args.inConfig.multiChannelBuses[0].audioConfig == IVAS_AUDIO_CONFIG_MONO ) ||
@@ -894,6 +898,49 @@ int main(
        exit( -1 );
    }

#ifdef FIX_1225_DISCLAIMER
    fprintf( stdout, "Input audio file:       %s\n", args.inputFilePath );
    fprintf( stdout, "Output audio file:      %s\n\n", args.outputFilePath );

    if ( args.inConfig.numAudioObjects > 0 )
    {
        if ( args.inConfig.numAudioObjects == 1 )
        {
            IVAS_REND_PrintInputConfig( IVAS_AUDIO_CONFIG_ISM1 );
        }
        else if ( args.inConfig.numAudioObjects == 2 )
        {
            IVAS_REND_PrintInputConfig( IVAS_AUDIO_CONFIG_ISM2 );
        }
        else if ( args.inConfig.numAudioObjects == 3 )
        {
            IVAS_REND_PrintInputConfig( IVAS_AUDIO_CONFIG_ISM3 );
        }
        else if ( args.inConfig.numAudioObjects == 4 )
        {
            IVAS_REND_PrintInputConfig( IVAS_AUDIO_CONFIG_ISM4 );
        }
    }
    for ( i = 0; i < args.inConfig.numMultiChannelBuses; i++ )
    {
        IVAS_REND_PrintInputConfig( args.inConfig.multiChannelBuses[i].audioConfig );
    }
    for ( i = 0; i < args.inConfig.numMasaBuses; i++ )
    {
        IVAS_REND_PrintInputConfig( args.inConfig.masaBuses[i].audioConfig );
    }
    for ( i = 0; i < args.inConfig.numAmbisonicsBuses; i++ )
    {
        IVAS_REND_PrintInputConfig( args.inConfig.ambisonicsBuses[i].audioConfig );
    }

    if ( ( error = IVAS_REND_PrintConfig( hIvasRend ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\n IVAS_REND_PrintConfig failed: %s\n\n", ivas_error_to_string( error ) );
        goto cleanup;
    }

#endif
    if ( !isEmptyString( args.customHrtfFilePath ) )
    {
        if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK )
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ int16_t print_disclaimer( FILE *fPtr )

    fprintf( fPtr, "\n==================================================================================================\n" );
    fprintf( fPtr, " IVAS Codec Baseline\n" );
#ifdef FIX_1225_DISCLAIMER
    fprintf( fPtr, " \n Initial IVAS Codec (Floating Point) 3GPP TS26.258 version IVAS-FLP-2.0\n" );
#endif
    fprintf( fPtr, " \n" );
    fprintf( fPtr, " Based on EVS Codec (Floating Point) 3GPP TS26.443 Nov 04, 2021,\n" );
    fprintf( fPtr, " Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0\n" );
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@
#define FIX_1226_FASTCONV_HRTF_LOADING_OPTIM            /* VA: issue 1226: for FastConv binaural renderer in decoder, load only HTRT coefficient set that is needed */
#define FIX_1227_Crend_HRTF_LOADING_OPTIM               /* VA: issue 1227: for Crend binaural renderer in decoder, load only HTRT coefficient set that is needed */
#define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS              /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */

#define FIX_1225_DISCLAIMER                             /* VA: issue 1225: Add disclaimer for external renderer + Add info about IVAS reference version */

/* #################### End BE switches ################################## */

+2 −2
Original line number Diff line number Diff line
@@ -3934,7 +3934,7 @@ const char *IVAS_DEC_GetErrorMessage(
    return ivas_error_to_string( error );
}


#ifndef FIX_1225_DISCLAIMER
/*---------------------------------------------------------------------*
 * get_channel_config()
 *
@@ -4020,7 +4020,7 @@ static ivas_error get_channel_config(

    return IVAS_ERR_OK;
}

#endif

/*---------------------------------------------------------------------*
 * printConfigInfo_dec( )
+108 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@
#include "ivas_prot_rend.h"
#include "ivas_rom_com.h"
#include "ivas_prot.h"
#ifdef FIX_1225_DISCLAIMER
#include <string.h>
#endif
#ifdef DEBUGGING
#include "debug.h"
#include <assert.h>
@@ -480,3 +483,108 @@ int16_t is_split_rendering_enabled(
        return 0;
    }
}

#ifdef FIX_1225_DISCLAIMER

/*---------------------------------------------------------------------*
 * get_channel_config()
 *
 * Gets a str related to input config
 *---------------------------------------------------------------------*/

ivas_error get_channel_config(
    const AUDIO_CONFIG config,
    char *str )
{
    if ( config == IVAS_AUDIO_CONFIG_MONO )
    {
        strcpy( str, "Mono" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_STEREO )
    {
        strcpy( str, "Stereo" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_ISM1 )
    {
        strcpy( str, "Object-based audio (1 object)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_ISM2 )
    {
        strcpy( str, "Object-based audio (2 objects)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_ISM3 )
    {
        strcpy( str, "Object-based audio (3 objects)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_ISM4 )
    {
        strcpy( str, "Object-based audio (4 objects)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_5_1 )
    {
        strcpy( str, "Multichannel 5.1 (CICP6)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_7_1 )
    {
        strcpy( str, "Multichannel 7.1 (CICP12)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_5_1_2 )
    {
        strcpy( str, "Multichannel 5.1+2 (CICP14)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_5_1_4 )
    {
        strcpy( str, "Multichannel 5.1+4 (CICP16)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_7_1_4 )
    {
        strcpy( str, "Multichannel 7.1+4 (CICP19)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_LS_CUSTOM )
    {
        strcpy( str, "Multichannel (custom loudspeaker layout)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_FOA )
    {
        strcpy( str, "Ambisonics: First Order (FOA)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_HOA2 )
    {
        strcpy( str, "Ambisonics: Second Order (HOA2)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_HOA3 )
    {
        strcpy( str, "Ambisonics: Third Order (HOA3)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL )
    {
        strcpy( str, "Binaural: no room" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
    {
        strcpy( str, "Binaural: room with impulse responses" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
    {
        strcpy( str, "Binaural: room with reverb" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
    {
        strcpy( str, "BINAURAL_SPLIT_CODED" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        strcpy( str, "Binaural_Split_PCM" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
        strcpy( str, "External renderer" );
    }
    else
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Error: Incorrect Input/Output Configuration" );
    }

    return IVAS_ERR_OK;
}
#endif
Loading