Commit 8c782e73 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_I214_CLIPPING_STANDALONE_REND

parent 3fc6306c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -148,7 +148,6 @@
#define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS              /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */
#define SBA_BR_SWITCHING                                /* Issue 114: Changes for sba bit rate switching*/
#define FIX_ITD                                         /* Contribution 16: TD renderer ITD improvement and code cleanup */
#define FIX_I214_CLIPPING_STANDALONE_REND               /* Issue 214: TD standalone renderer does not handle clipping */
#define FIX_I218_PARAMISM_NOISY_SPEECH                  /* Issue 218: Fix noisy speech buffer in ParamISM */
#define FIX_I217_GSC_FLAG_IN_ISM                        /* Issue 217: fix BER detected in ISM4 due to desynchronized 'GSC_IVAS_mode' parameter */
#define FIX_158_DIRAC_MEM                               /* Issue 158: Reduce memory consumption in the hDirac_mem handle */
+0 −19
Original line number Diff line number Diff line
@@ -125,10 +125,8 @@ int main( int argc, char *argv[] )
    int16_t *MixFrameWav;
    int16_t *input_buff;
    int16_t nChannels;
#ifdef FIX_I214_CLIPPING_STANDALONE_REND
    float tmp;
    int32_t noClipping;
#endif
    FILE *f_input;
    FILE *f_output;
    FILE *f_quat_traj;
@@ -141,9 +139,7 @@ int main( int argc, char *argv[] )
    MixFrameWav = count_malloc( 2 * L_FRAME48k * sizeof( int16_t ) );
    input_buff = count_malloc( MAX_CICP_CHANNELS * L_FRAME48k * sizeof( int16_t ) );
    nChannels = 0;
#ifdef FIX_I214_CLIPPING_STANDALONE_REND
    noClipping = 0;
#endif

    for ( i = 0; i < 2 * L_FRAME48k; i++ )
    {
@@ -333,13 +329,8 @@ int main( int argc, char *argv[] )
    }

    /* Init limiter */
#ifdef FIX_I214_CLIPPING_STANDALONE_REND
    st_ivas->hLimiter = ivas_limiter_open( NumLdspks, st_ivas->hDecoderConfig->output_Fs );
    st_ivas->hDecoderConfig->nchan_out = NumLdspks;
#else
    st_ivas->hLimiter = ivas_limiter_open( nChannels, st_ivas->hDecoderConfig->output_Fs );
    st_ivas->hDecoderConfig->nchan_out = nChannels;
#endif
    st_ivas->hLimiter->strong_saturation_count = 0;
    st_ivas->hLimiter->gain = 1.f;
    st_ivas->hLimiter->release_heuristic = 0.f;
@@ -477,7 +468,6 @@ int main( int argc, char *argv[] )
        {
            for ( nS = 0; nS < NumLdspks; nS++ )
            {
#ifdef FIX_I214_CLIPPING_STANDALONE_REND
#ifdef FIX_ITD
                tmp = output[nS][n] + 0.5f * sign( output[nS][n] );
#else
@@ -494,13 +484,6 @@ int main( int argc, char *argv[] )
                    noClipping++;
                }
                MixFrameWav[n * NumLdspks + nS] = (int16_t) ( tmp );
#else
#ifdef FIX_ITD
                MixFrameWav[n *NumLdspks + nS] = (int16_t) ( output[nS][n] + 0.5f * sign( output[nS][n] ) );
#else
                MixFrameWav[n * NumLdspks + nS] = (int16_t) ( output[nS][n + offset] + 0.5f * sign( output[nS][n + offset] ) );
#endif
#endif
            }
        }
#ifdef FIX_ITD
@@ -560,12 +543,10 @@ int main( int argc, char *argv[] )
#endif

    fprintf( stdout, "Done rendering %d frames.\n", nFrameCount );
#ifdef FIX_I214_CLIPPING_STANDALONE_REND
    if ( noClipping > 0 )
    {
        fprintf( stderr, "*** Clipping on %d samples.\n", noClipping );
    }
#endif
    /* system( "pause" ); */
    return 0;
}