Commit 3dc61d51 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

clang-format

parent 363a8903
Loading
Loading
Loading
Loading
Loading
+18 −31
Original line number Diff line number Diff line
@@ -266,9 +266,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;
@@ -368,10 +366,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;
@@ -1561,8 +1557,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;

@@ -1619,10 +1614,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;
@@ -1636,12 +1629,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;
@@ -1661,12 +1652,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;
@@ -2676,10 +2665,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
@@ -758,12 +758,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] );
@@ -784,12 +782,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 );
@@ -802,8 +798,7 @@ int main(
    {
        error = AudioFileReader_getSamplingRate( audioReader, &inFileSampleRate );
    }
    else
        if ( hSplitRendFileReadWrite == NULL )
    else if ( hSplitRendFileReadWrite == NULL )
    {
        inFileSampleRate = args.sampleRate;
    }
@@ -865,11 +860,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 );
@@ -1230,4 +1223,3 @@ int main(


#undef WMC_TOOL_SKIP
+12 −25
Original line number Diff line number Diff line
@@ -431,8 +431,7 @@ static void convertOutputBuffer_fx(
    Word16 *intBuffer,
    const Word16 cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbSyn,
    Word16 out_q
);
    Word16 out_q );
static void convertInputBuffer_fx(
    const Word16 *intBuffer,
    const Word16 numIntSamplesPerChannel,
@@ -442,8 +441,7 @@ static void convertInputBuffer_fx(
    Word16 in_q_factor,
    const int16_t cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbAna,
    Word16 *out_q_factor
);
    Word16 *out_q_factor );


/*------------------------------------------------------------------------------------------*
@@ -1499,10 +1497,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_fx( hIvasRend, &delayNumSamples_temp, &delayTimeScale_temp ) != IVAS_ERR_OK )
        {
@@ -1516,12 +1512,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 );
@@ -1536,10 +1530,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_fx( hIvasRend, &delayNumSamples_temp, &delayTimeScale_temp ) != IVAS_ERR_OK )
            {
@@ -1553,12 +1545,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 );
@@ -1962,7 +1952,6 @@ int main(
            {
                delayNumSamples -= (int16_t) ( outBufferSize / num_out_channels );
            }

        }

        bitsBuffer.config.bitsRead = 0;
@@ -3878,8 +3867,7 @@ static void convertInputBuffer_fx(
    Word16 in_q_factor,
    const int16_t cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbAna,
    Word16 *out_q_factor
)
    Word16 *out_q_factor )
{
    Word16 chnl, smpl, i;

@@ -3962,8 +3950,7 @@ static void convertOutputBuffer_fx(
    Word16 *intBuffer,
    const Word16 cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbSyn,
    Word16 out_q
)
    Word16 out_q )
{
    Word16 chnl, smpl, i;
    Word32 temp_fx;
+0 −1
Original line number Diff line number Diff line
@@ -78,7 +78,6 @@ void Euler2Quat_fx(
}



/*-------------------------------------------------------------------------
 * Copy_Quat_fx()
 *
+0 −3
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@
#define FIX_1372_ISAR_POST_REND
#define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM   /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */


//#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	*/
@@ -118,11 +117,9 @@
#define FIX_OLD_BINARY_FILE                             /* Orange: current hrtf binary file in ref branch contains wrong values for fastconv value. This switch can be activated to compre running codec with and without hrtf file*/      
#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */
#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 activate 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      */
Loading