Commit ba0e860d authored by norvell's avatar norvell
Browse files

Applying format patch, except for lib_com/fft_evs.c

parent bca52151
Loading
Loading
Loading
Loading
Loading
+86 −79
Original line number Diff line number Diff line
@@ -256,8 +256,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
        )
        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: Head-rotation file file cannot be used in this output configuration.\n\n" );
            goto cleanup;
@@ -357,8 +356,7 @@ 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
        )
        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: Renderer configuration file cannot be used in this output configuration.\n\n" );
            goto cleanup;
@@ -1313,7 +1311,6 @@ static void usage_dec( void )
}



/*---------------------------------------------------------------------*
 * initOnFirstGoodFrame()
 *
@@ -1521,7 +1518,13 @@ static ivas_error decodeG192(
#ifdef IVAS_FLOAT_FIXED
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } };
#else
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0,  }, { 0, 0,0 }, { 0, 0, 0 } };
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, {
                                                                            0,
                                                                            0,
                                                                            0,
                                                                        },
                                                           { 0, 0, 0 },
                                                           { 0, 0, 0 } };
#endif
    int16_t vec_pos_update, vec_pos_len;

@@ -2092,7 +2095,13 @@ static ivas_error decodeVoIP(
#ifdef IVAS_FLOAT_FIXED
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } };
#else
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0,  }, { 0, 0,0 }, { 0, 0, 0 } };
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, {
                                                                            0,
                                                                            0,
                                                                            0,
                                                                        },
                                                           { 0, 0, 0 },
                                                           { 0, 0, 0 } };
#endif
    int16_t vec_pos_update, vec_pos_len;
    int16_t nOutSamples = 0;
@@ -2272,8 +2281,7 @@ static ivas_error decodeVoIP(

            for ( i = 0; i < num_subframes; i++ )
            {
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i
                                                           ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
@@ -2570,5 +2578,4 @@ cleanup:
}



#undef WMC_TOOL_SKIP
+44 −44
Original line number Diff line number Diff line
@@ -831,7 +831,8 @@ int main(
    const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) );

#ifdef IVAS_FLOAT_FIXED
    Word32 nonDiegeticPanGain_fx = (args.nonDiegeticPanGain ==1.0f)? ONE_IN_Q31: (args.nonDiegeticPanGain == -1.0f)? L_negate(ONE_IN_Q31):(Word32)(args.nonDiegeticPanGain*(1LL<< Q31 ));
    Word32 nonDiegeticPanGain_fx = ( args.nonDiegeticPanGain == 1.0f ) ? ONE_IN_Q31 : ( args.nonDiegeticPanGain == -1.0f ) ? L_negate( ONE_IN_Q31 )
                                                                                                                           : (Word32) ( args.nonDiegeticPanGain * ( 1LL << Q31 ) );
    IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, nonDiegeticPanGain_fx, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) );
@@ -1443,7 +1444,6 @@ int main(
                fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }

        }

        for ( i = 0; i < args.inConfig.numAudioObjects; ++i )
+16 −17
Original line number Diff line number Diff line
@@ -75,4 +75,3 @@ Word16 update_mixed_context(Word16 ctx, Word16 a)
    }
    return add( shl( s_and( ctx, 0xf ), 4 ), add( t, 13 ) );
}
+60 −61
Original line number Diff line number Diff line
@@ -106,8 +106,7 @@ void UnmapIndex_fx(
    const Word16 LtpPitchLag,
    const Word8 SmallerLags,
    Word16 *FractionalResolution,
    Word32 *Lag
)
    Word32 *Lag )
{
    Word16 LtpPitchIndex, Multiplier;
    Word16 Lag16;
@@ -146,7 +145,8 @@ void UnmapIndex_fx(
            move16();
            Lag16 = add( PeriodicityIndex, GET_ADJ2( 80, 12, 3 ) );
        }
        ELSE {
        ELSE
        {
            test();
            IF( LT_16( PeriodicityIndex, 224 ) || SmallerLags != 0 )
            {
@@ -154,7 +154,8 @@ void UnmapIndex_fx(
                move16();
                Lag16 = add( PeriodicityIndex, GET_ADJ2( 208, 28, 1 ) );
            }
            ELSE {
            ELSE
            {
                *FractionalResolution = 0;
                move16();
                Lag16 = add( PeriodicityIndex, GET_ADJ2( 224, 188, 0 ) );
@@ -262,8 +263,7 @@ int16_t CountIndexBits_ivas(

Word16 CountIndexBits_fx(
    Word16 Bandwidth,
    Word16 PeriodicityIndex
)
    Word16 PeriodicityIndex )
{
    Word16 result;
    Word16 PeriodicityIndexS;
@@ -486,7 +486,6 @@ void tcx_hm_modify_envelope_fx(
        h = add( h, 1 );
        k = extract_l( L_shr( imult3216( lag, h ), fract_res ) );
    }

}


+100 −105
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@ void UnmapIndex(
    const Word16 LtpPitchLag,
    const Word16 SmallerLags,
    Word16 *FractionalResolution,
    Word32 *Lag
)
    Word32 *Lag )
{
    Word16 LtpPitchIndex, Multiplier;
    Word16 Lag16;
@@ -59,7 +58,8 @@ void UnmapIndex(
            move16();
            Lag16 = add( PeriodicityIndex, GET_ADJ2( 80, 12, 3 ) );
        }
        ELSE {
        ELSE
        {
            test();
            IF( LT_16( PeriodicityIndex, 224 ) || SmallerLags != 0 )
            {
@@ -67,7 +67,8 @@ void UnmapIndex(
                move16();
                Lag16 = add( PeriodicityIndex, GET_ADJ2( 208, 28, 1 ) );
            }
            ELSE {
            ELSE
            {
                *FractionalResolution = 0;
                move16();
                Lag16 = add( PeriodicityIndex, GET_ADJ2( 224, 188, 0 ) );
@@ -162,13 +163,11 @@ void ConfigureContextHm(
    hm_cfg->numHoleIndices = (Word16) ( tmp - hm_cfg->holeIndices );
    *tmp++ = NumCoeffs;
    move16(); /* Add extremal element signaling the end of the buffer */

}

Word16 CountIndexBits(
    Word16 Bandwidth,
    Word16 PeriodicityIndex
)
    Word16 PeriodicityIndex )
{
    Word16 result;
    Word16 PeriodicityIndexS;
@@ -187,7 +186,6 @@ Word16 CountIndexBits(
}



int tcx_hm_render(
    Word32 lag,       /* i: pitch lag                         Q0  */
    Word16 fract_res, /* i: fractional resolution of the lag  Q0  */
@@ -288,7 +286,4 @@ void tcx_hm_modify_envelope(
        h = add( h, 1 );
        k = extract_l( L_shr( imult3216( lag, h ), fract_res ) );
    }

}

Loading