Commit 0315e07d authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

clang-format

parent 3b97f727
Loading
Loading
Loading
Loading
Loading
+18 −31
Original line number Diff line number Diff line
@@ -299,9 +299,7 @@ int main(
    if ( arg.enableHeadRotation )
    {
        /* sanity check */
        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
        )
        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, "\nError: Head-rotation file file cannot be used in this output configuration.\n\n" );
            goto cleanup;
@@ -401,10 +399,8 @@ int main(
    if ( arg.renderConfigEnabled )
    {
        /* sanity check */
        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 &&
             arg.Opt_non_diegetic_pan == 0
        )
        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 &&
             arg.Opt_non_diegetic_pan == 0 )
        {
            fprintf( stderr, "\nError: Renderer configuration file cannot be used in this output configuration.\n\n" );
            goto cleanup;
@@ -1821,8 +1817,7 @@ static ivas_error initOnFirstGoodFrame(
    IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS], /* o  : */
    int16_t *pNumOutChannels,                        /* o  : */
    uint16_t *pNumObj,                               /* o  : */
    SplitFileReadWrite **splitRendWriter
)
    SplitFileReadWrite **splitRendWriter )
{
    ivas_error error = IVAS_ERR_UNKNOWN;

@@ -1879,10 +1874,8 @@ static ivas_error initOnFirstGoodFrame(
                                                             &splitRendCodec,
                                                             &poseCorrection,
                                                             &splitRendIsarFrameSizeMs,
                                                             &splitRendCodecFrameSizeMs
                                                             ,
                                                             &lc3plusHighRes
                                                             ) ) != IVAS_ERR_OK )
                                                             &splitRendCodecFrameSizeMs,
                                                             &lc3plusHighRes ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nUnable to get split renderer bitstream header: %s\n", ivas_error_to_string( error ) );
            return error;
@@ -1896,12 +1889,10 @@ static ivas_error initOnFirstGoodFrame(
                                                   delayTimeScale_temp,
                                                   splitRendCodec,
                                                   poseCorrection,
                                                   splitRendCodecFrameSizeMs
                                                   ,
                                                   splitRendCodecFrameSizeMs,
                                                   splitRendIsarFrameSizeMs,
                                                   arg.output_Fs,
                                                   lc3plusHighRes
                                                   ) ) != IVAS_ERR_OK )
                                                   lc3plusHighRes ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename );
                return error;
@@ -1921,12 +1912,10 @@ static ivas_error initOnFirstGoodFrame(
                                                   delayTimeScale_temp,
                                                   splitRendCodec,
                                                   poseCorrection,
                                                   splitRendCodecFrameSizeMs
                                                   ,
                                                   splitRendCodecFrameSizeMs,
                                                   splitRendIsarFrameSizeMs,
                                                   arg.output_Fs,
                                                   lc3plusHighRes
                                                   ) ) != IVAS_ERR_OK )
                                                   lc3plusHighRes ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename );
                return error;
@@ -3121,10 +3110,8 @@ static ivas_error decodeVoIP(

            for ( i = 0; i < num_subframes; i++ )
            {
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i
                                                           ,
                                                           DEFAULT_AXIS
                                                           ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i,
                                                           DEFAULT_AXIS ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
+7 −15
Original line number Diff line number Diff line
@@ -754,12 +754,10 @@ int main(
                                        args.inMetadataFilePaths[0],
                                        &bitsBuffer.config.codec,
                                        &bitsBuffer.config.poseCorrection,
                                        &bitsBuffer.config.codec_frame_size_ms
                                        ,
                                        &bitsBuffer.config.codec_frame_size_ms,
                                        &bitsBuffer.config.isar_frame_size_ms,
                                        &inFileSampleRate,
                                        &bitsBuffer.config.lc3plusHighRes
        );
                                        &bitsBuffer.config.lc3plusHighRes );
        if ( error != IVAS_ERR_OK )
        {
            fprintf( stderr, "Could not open split rend metadata file %s\n", args.inMetadataFilePaths[0] );
@@ -780,12 +778,10 @@ int main(
                                        args.inputFilePath,
                                        &bitsBuffer.config.codec,
                                        &bitsBuffer.config.poseCorrection,
                                        &bitsBuffer.config.codec_frame_size_ms
                                        ,
                                        &bitsBuffer.config.codec_frame_size_ms,
                                        &bitsBuffer.config.isar_frame_size_ms,
                                        &inFileSampleRate,
                                        &bitsBuffer.config.lc3plusHighRes
        );
                                        &bitsBuffer.config.lc3plusHighRes );
        if ( error != IVAS_ERR_OK )
        {
            fprintf( stderr, "Could not open split rend metadata file %s\n", args.inputFilePath );
@@ -798,8 +794,7 @@ int main(
    {
        error = AudioFileReader_getSamplingRate( audioReader, &inFileSampleRate );
    }
    else
        if ( hSplitRendFileReadWrite == NULL )
    else if ( hSplitRendFileReadWrite == NULL )
    {
        inFileSampleRate = args.sampleRate;
    }
@@ -861,11 +856,9 @@ int main(
        if ( ( error = ISAR_REND_SetSplitRendBitstreamHeader( hIsarPostRend,
                                                              bitsBuffer.config.codec,
                                                              bitsBuffer.config.poseCorrection,
                                                              bitsBuffer.config.codec_frame_size_ms
                                                              ,
                                                              bitsBuffer.config.codec_frame_size_ms,
                                                              bitsBuffer.config.isar_frame_size_ms,
                                                              bitsBuffer.config.lc3plusHighRes
                                                              ) ) != IVAS_ERR_OK )
                                                              bitsBuffer.config.lc3plusHighRes ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Error in getting split renderer bitstream header: %s\n", ivas_error_to_string( error ) );
            exit( -1 );
@@ -1221,4 +1214,3 @@ int main(


#undef WMC_TOOL_SKIP
+10 −21
Original line number Diff line number Diff line
@@ -1396,10 +1396,8 @@ int main(
        IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend,
                                               &bitsBuffer.config.codec,
                                               &bitsBuffer.config.poseCorrection,
                                               &bitsBuffer.config.codec_frame_size_ms
                                               ,
                                               &bitsBuffer.config.isar_frame_size_ms
        );
                                               &bitsBuffer.config.codec_frame_size_ms,
                                               &bitsBuffer.config.isar_frame_size_ms );

        if ( IVAS_REND_GetDelay( hIvasRend, &delayNumSamples_temp, &delayTimeScale_temp ) != IVAS_ERR_OK )
        {
@@ -1413,12 +1411,10 @@ int main(
                                               delayTimeScale_temp,
                                               bitsBuffer.config.codec,
                                               bitsBuffer.config.poseCorrection,
                                               bitsBuffer.config.codec_frame_size_ms
                                               ,
                                               bitsBuffer.config.codec_frame_size_ms,
                                               bitsBuffer.config.isar_frame_size_ms,
                                               args.sampleRate,
                                               bitsBuffer.config.lc3plus_highres
                                               ) ) != IVAS_ERR_OK )
                                               bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Could not open split rend metadata file %s\n", args.outputFilePath );
            exit( -1 );
@@ -1433,10 +1429,8 @@ int main(
            IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend,
                                                   &bitsBuffer.config.codec,
                                                   &bitsBuffer.config.poseCorrection,
                                                   &bitsBuffer.config.codec_frame_size_ms
                                                   ,
                                                   &bitsBuffer.config.isar_frame_size_ms
            );
                                                   &bitsBuffer.config.codec_frame_size_ms,
                                                   &bitsBuffer.config.isar_frame_size_ms );

            if ( IVAS_REND_GetDelay( hIvasRend, &delayNumSamples_temp, &delayTimeScale_temp ) != IVAS_ERR_OK )
            {
@@ -1450,12 +1444,10 @@ int main(
                                                   delayTimeScale_temp,
                                                   bitsBuffer.config.codec,
                                                   bitsBuffer.config.poseCorrection,
                                                   bitsBuffer.config.codec_frame_size_ms
                                                   ,
                                                   bitsBuffer.config.codec_frame_size_ms,
                                                   bitsBuffer.config.isar_frame_size_ms,
                                                   args.sampleRate,
                                                   bitsBuffer.config.lc3plus_highres
                                                   ) ) != IVAS_ERR_OK )
                                                   bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Could not open split rend metadata file %s\n", args.outMetadataFilePath );
                exit( -1 );
@@ -1843,7 +1835,6 @@ int main(
            {
                delayNumSamples -= (int16_t) ( outBufferSize / num_out_channels );
            }

        }

        bitsBuffer.config.bitsRead = 0;
@@ -3756,8 +3747,7 @@ static void convertInputBuffer(
    const int16_t numChannels,
    float *floatBuffer,
    const int16_t cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbAna
)
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbAna )
{
    int16_t chnl, smpl, i;

@@ -3837,8 +3827,7 @@ static void convertOutputBuffer(
    const int16_t numChannels,
    int16_t *intBuffer,
    const int16_t cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbSyn
)
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbSyn )
{
    int16_t chnl, smpl, i;
    float temp;
+0 −4
Original line number Diff line number Diff line
@@ -181,7 +181,6 @@
#define NONBE_FIX_AVG_IAC_CLDFB_REVERB
#endif


//#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#ifdef USE_NEW_HRTF_BINARY_FILE_FORMAT
#define NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES			  /* Philips: Use pre-computed HRTF average L/R energies and IAC in all renderers	*/
@@ -201,10 +200,7 @@
#define FIX_INV_DIFFUSE_WEIGHT                          /* Orange : Fix error in energy compensation in late binaural */
#endif


//#define FIX_777_COMBI_RENDER_CONFIG_FILE                /* Philips: Fix for combined renderer config file support */


#define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS             /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */
/* #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF */             /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on  )*/
#define FIX_1009_ISM_NONDIEGETIC_PANNING                /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan      */
+5 −6
Original line number Diff line number Diff line
@@ -129,8 +129,7 @@ static ivas_error ivas_binRenderer_convModuleOpen(
    const int16_t isLoudspeaker,
    const AUDIO_CONFIG input_config,
    const HRTFS_FASTCONV_HANDLE hHrtf,
    const int16_t num_poses
)
    const int16_t num_poses )
{
    int16_t bandIdx, chIdx;
    BINRENDERER_CONV_MODULE_HANDLE hBinRenConvModule;
Loading