Commit 8fdab6d9 authored by vaclav's avatar vaclav
Browse files

Merge branch '1225-disclaimer-missing-for-renderer-and-post-renderer' into 'main'

Print out disclaimer and info for renderer application

See merge request !1895
parents a6427733 f6ba5056
Loading
Loading
Loading
Loading
Loading
+48 −1
Original line number Diff line number Diff line
@@ -733,6 +733,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 ) ||
@@ -890,6 +894,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 )
+4 −0
Original line number Diff line number Diff line
@@ -47,7 +47,11 @@ int16_t print_disclaimer( FILE *fPtr )
{

    fprintf( fPtr, "\n==================================================================================================\n" );
#ifdef FIX_1225_DISCLAIMER
    fprintf( fPtr, " \n IVAS Codec Version IVAS-FL-2.0\n" );
#else
    fprintf( fPtr, " IVAS Codec Baseline\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
@@ -161,7 +161,7 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE    /* VA: issue 1228: Exit the processing when a HRTF binary file with wrong sampling rate is provided */

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

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

+4 −2
Original line number Diff line number Diff line
@@ -43,7 +43,9 @@
#include "jbm_pcmdsp_fifo.h"
#include <math.h>
#include <assert.h>
#ifndef FIX_1225_DISCLAIMER
#include <string.h>
#endif
#ifdef DEBUGGING
#include "debug.h"
#endif
@@ -3883,7 +3885,7 @@ const char *IVAS_DEC_GetErrorMessage(
    return ivas_error_to_string( error );
}


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

    return IVAS_ERR_OK;
}

#endif

/*---------------------------------------------------------------------*
 * printConfigInfo_dec( )
+116 −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>
@@ -476,3 +479,116 @@ 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_MASA1 )
    {
        strcpy( str, "Metadata-Assisted Spatial Audio mono (MASA1)" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_MASA2 )
    {
        strcpy( str, "Metadata-Assisted Spatial Audio stereo (MASA2)" );
    }
    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