Commit ff142679 authored by sagnowski's avatar sagnowski
Browse files

Convert JBM to float processing

Works, but not BE
parent 4a68572a
Loading
Loading
Loading
Loading
Loading
+154 −9
Original line number Diff line number Diff line
@@ -1231,7 +1231,8 @@ static ivas_error initOnFirstGoodFrame(
    /* Open audio writer and write all previously skipped bad frames now that frame size is known */
    if ( ( error = AudioFileWriter_open( ppAfWriter, arg.outputWavFilename, arg.output_Fs, *pNumOutChannels
#ifdef FLOAT_INTERFACE_DEC_REND
    , arg.outputFloatFile
                                         ,
                                         arg.outputFloatFile
#endif
                                         ) ) != IVAS_ERR_OK )
    {
@@ -1910,10 +1911,20 @@ static ivas_error decodeVoIP(
    bool decodedGoodFrame = false;
    int16_t numInitialBadFrames = 0; /* Number of bad frames received until first good frame is decoded */
    int16_t nOutChannels = 0;
#ifdef FLOAT_INTERFACE_JBM
    int16_t nOutSamples = 0;
#endif
    MasaFileWriter *masaWriter = NULL;
    uint16_t numObj = 0;

#ifdef FLOAT_INTERFACE_JBM
    int16_t *audioDecBufInt = NULL;   /* Buffer for receiving audio from decoder via int interface. Packed. */
    float *audioDecBufFloat = NULL;   /* Buffer for receiving audio from decoder via float interface. Packed. */
    int16_t *audioWriteBufInt = NULL; /* Buffer for writing audio to int wav/pcm files. Interleaved. */
    float *audioWriteBufFloat = NULL; /* Buffer for reading audio to float wav files. Interleaved. */
#else
    int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE];
#endif
    AudioFileWriter *afWriter = NULL;
#ifdef SUPPORT_JBM_TRACEFILE
    JbmTraceFileWriter *jbmTraceWriter = NULL;
@@ -2023,6 +2034,44 @@ static ivas_error decodeVoIP(
        fprintf( stdout, "\n-- Start the decoder (quiet mode) --\n\n" );
    }

#ifdef FLOAT_INTERFACE_JBM
    /*------------------------------------------------------------------------------------------*
     * Allocate output audio buffers
     *------------------------------------------------------------------------------------------*/

    /* TODO(sgi): This is duplicated from decodeG192 */
    if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT )
    {
        nOutChannels = 4; /* Currently allocating max expected */ /* TODO(sgi): Get this from decoder before GetSamples() is called - then EXT is no longer a special case */
    }
    else
    {
        if ( ( error = IVAS_DEC_GetNumOutputChannels( hIvasDec, &nOutChannels ) ) != IVAS_ERR_OK )
        {
            goto cleanup;
        }
    }
    nOutSamples = arg.output_Fs / 50; /* TODO(sgi): Get from API */

    if ( arg.useInt16Interface )
    {
        audioDecBufInt = malloc( nOutChannels * nOutSamples * sizeof( int16_t ) );
    }
    else
    {
        audioDecBufFloat = malloc( nOutChannels * nOutSamples * sizeof( float ) );
    }

    if ( arg.outputFloatFile )
    {
        audioWriteBufFloat = malloc( nOutChannels * nOutSamples * sizeof( float ) );
    }
    else
    {
        audioWriteBufInt = malloc( nOutChannels * nOutSamples * sizeof( int16_t ) );
    }
#endif

#ifdef WMOPS
    reset_stack();
    reset_wmops();
@@ -2034,7 +2083,9 @@ static ivas_error decodeVoIP(

    while ( 1 )
    {
#ifndef FLOAT_INTERFACE_JBM
        int16_t nOutSamples = 0;
#endif

        /* read all packets with a receive time smaller than the system time */
        while ( nextPacketRcvTime_ms <= systemTime_ms )
@@ -2084,8 +2135,42 @@ static ivas_error decodeVoIP(
            break;
        }

#ifndef FLOAT_INTERFACE_JBM
        nOutSamples = (int16_t) ( arg.output_Fs / 50 );
#endif

#ifdef FLOAT_INTERFACE_JBM
        if ( arg.useInt16Interface )
        {
            /* decode and get samples */
            if ( ( error = IVAS_DEC_VoIP_GetSamplesInt( hIvasDec, nOutSamples, audioDecBufInt, systemTime_ms
#ifdef SUPPORT_JBM_TRACEFILE
                                                        ,
                                                        writeJbmTraceFileFrameWrapper,
                                                        jbmTraceWriter
#endif
                                                        ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                goto cleanup;
            }
        }
        else
        {
            /* decode and get samples */
            if ( ( error = IVAS_DEC_VoIP_GetSamplesFloat( hIvasDec, nOutSamples, audioDecBufFloat, systemTime_ms
#ifdef SUPPORT_JBM_TRACEFILE
                                                          ,
                                                          writeJbmTraceFileFrameWrapper,
                                                          jbmTraceWriter
#endif
                                                          ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                goto cleanup;
            }
        }
#else
        /* decode and get samples */
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms
#ifdef SUPPORT_JBM_TRACEFILE
@@ -2098,6 +2183,7 @@ static ivas_error decodeVoIP(
            fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }
#endif


        /* write JBM Offset file entry */
@@ -2162,14 +2248,48 @@ static ivas_error decodeVoIP(
            if ( delayNumSamples < nOutSamples )
            {
#ifdef FLOAT_INTERFACE_DEC_REND
                if ( ( error = AudioFileWriter_writeFromInt16( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK )
                /* TODO(sgi): This is a duplicate from decodeG192 */
                if ( arg.outputFloatFile )
                {
                    if ( arg.useInt16Interface )
                    {
                        copyBufferPackedIntToInterleavedFloat( audioDecBufInt, nOutSamples, audioWriteBufFloat, nOutSamples, nOutChannels );
                    }
                    else
                    {
                        copyBufferPackedFloatToInterleavedFloat( audioDecBufFloat, nOutSamples, audioWriteBufFloat, nOutSamples, nOutChannels );
                    }

                    if ( ( error = AudioFileWriter_writeFromFloat( afWriter, &audioWriteBufFloat[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nOutput audio file writer error\n" );
                        goto cleanup;
                    }
                }
                else
                {
                    if ( arg.useInt16Interface )
                    {
                        copyBufferPackedIntToInterleavedInt( audioDecBufInt, nOutSamples, audioWriteBufInt, nOutSamples, nOutChannels );
                    }
                    else
                    {
                        copyBufferPackedFloatToInterleavedInt( audioDecBufFloat, nOutSamples, audioWriteBufInt, nOutSamples, nOutChannels, float2int );
                    }

                    if ( ( error = AudioFileWriter_writeFromInt16( afWriter, &audioWriteBufInt[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nOutput audio file writer error\n" );
                        goto cleanup;
                    }
                }
#else
                if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nOutput audio file writer error\n" );
                    goto cleanup;
                }
#endif
                delayNumSamples = 0;
            }
            else
@@ -2195,16 +2315,34 @@ static ivas_error decodeVoIP(
    }

    /* add zeros at the end to have equal length of synthesized signals */
    memset( pcmBuf, 0, delayNumSamples_orig * nOutChannels * sizeof( int16_t ) );
#ifdef FLOAT_INTERFACE_DEC_REND
    if ( ( error = AudioFileWriter_writeFromInt16( afWriter, pcmBuf, delayNumSamples_orig * nOutChannels ) ) != IVAS_ERR_OK )
    /* TODO(sgi): This is a duplicate from decodeG192 */
    if ( arg.outputFloatFile )
    {
        memset( audioWriteBufFloat, 0, delayNumSamples_orig * nOutChannels * sizeof( float ) );
        if ( ( error = AudioFileWriter_writeFromFloat( afWriter, audioWriteBufFloat, delayNumSamples_orig * nOutChannels ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) );
            goto cleanup;
        }
    }
    else
    {
        memset( audioWriteBufInt, 0, delayNumSamples_orig * nOutChannels * sizeof( int16_t ) );
        if ( ( error = AudioFileWriter_writeFromInt16( afWriter, audioWriteBufInt, delayNumSamples_orig * nOutChannels ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) );
            goto cleanup;
        }
    }
#else
    memset( pcmBuf, 0, delayNumSamples_orig * nOutChannels * sizeof( int16_t ) );
    if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig * nOutChannels ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) );
        goto cleanup;
    }
#endif

    /*------------------------------------------------------------------------------------------*
     * Printouts after decoding has finished
@@ -2223,6 +2361,13 @@ static ivas_error decodeVoIP(

cleanup:

#ifdef FLOAT_INTERFACE_DEC_REND
    free( audioDecBufInt );
    free( audioDecBufFloat );
    free( audioWriteBufInt );
    free( audioWriteBufFloat );
#endif

    EVS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker );
    AudioFileWriter_close( &afWriter );
    JbmOffsetFileWriter_close( &jbmOffsetWriter );
+3 −0
Original line number Diff line number Diff line
@@ -174,6 +174,9 @@
// #define FLOAT_INTERFACE_DEC_REND_DBG_OOB_WRITES
#endif

#define FLOAT_INTERFACE_JBM


/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
+141 −15
Original line number Diff line number Diff line
@@ -66,7 +66,11 @@
struct apa_state_t
{
/* output buffer */
#ifdef FLOAT_INTERFACE_JBM
    float *buf_out;
#else
    int16_t *buf_out;
#endif
    uint16_t buf_out_capacity;
    uint16_t l_buf_out;

@@ -123,15 +127,71 @@ static float apa_corrEnergy2dB( float energy, uint16_t corr_len );

static float apa_getQualityIncreaseForLowEnergy( float energydB );

static bool logarithmic_search( const apa_state_t *ps, const int16_t *signal, int16_t s_start, uint16_t inlen, uint16_t offset, uint16_t fixed_pos, uint16_t corr_len, uint16_t wss, uint16_t css, int16_t *synchpos );
static bool logarithmic_search(
    const apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
    const float *signal,
#else
    const int16_t *signal,
#endif
    int16_t s_start,
    uint16_t inlen,
    uint16_t offset,
    uint16_t fixed_pos,
    uint16_t corr_len,
    uint16_t wss,
    uint16_t css,
    int16_t *synchpos );

static bool find_synch( apa_state_t *ps, const int16_t *in, uint16_t l_in, int16_t s_start, uint16_t s_len, int16_t fixed_pos, uint16_t corr_len, uint16_t offset, float *energy, float *quality, int16_t *synch_pos );
static bool find_synch( apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
                        const float *in,
#else
                        const int16_t *in,
#endif
                        uint16_t l_in,
                        int16_t s_start,
                        uint16_t s_len,
                        int16_t fixed_pos,
                        uint16_t corr_len,
                        uint16_t offset,
                        float *energy,
                        float *quality,
                        int16_t *synch_pos );

static bool copy_frm( apa_state_t *ps, const int16_t frm_in[], int16_t frm_out[], uint16_t *l_frm_out );
static bool copy_frm( apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
                      const float frm_in[],
                      float frm_out[],
#else
                      const int16_t frm_in[],
                      int16_t frm_out[],
#endif
                      uint16_t *l_frm_out );

static bool shrink_frm( apa_state_t *ps, const int16_t frm_in[], uint16_t maxScaling, int16_t frm_out[], uint16_t *l_frm_out );
static bool shrink_frm( apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
                        const float frm_in[],
#else
                        const int16_t frm_in[],
#endif
                        uint16_t maxScaling,
#ifdef FLOAT_INTERFACE_JBM
                        float frm_out[],
#else
                        int16_t frm_out[],
#endif
                        uint16_t *l_frm_out );

static bool extend_frm( apa_state_t *ps, const int16_t frm_in[], int16_t frm_out[], uint16_t *l_frm_out );
static bool extend_frm( apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
                        const float frm_in[],
                        float frm_out[],
#else
                        const int16_t frm_in[],
                        int16_t frm_out[],
#endif
                        uint16_t *l_frm_out );


/*---------------------------------------------------------------------*
@@ -455,15 +515,27 @@ bool apa_exit(
*/
uint8_t apa_exec(
    apa_state_t *ps, /* i/o: state struct                                  */
#ifdef FLOAT_INTERFACE_JBM
    const float a_in[], /* i  : input samples                                 */
#else
    const int16_t a_in[],    /* i  : input samples                                 */
#endif
    uint16_t l_in,       /* i  : number of input samples                       */
    uint16_t maxScaling, /* i  : allowed number of inserted/removed samples    */
#ifdef FLOAT_INTERFACE_JBM
    float a_out[], /* o  : output samples                                */
#else
    int16_t a_out[],         /* o  : output samples                                */
#endif
    uint16_t *l_out /* o  : number of output samples                      */
)
{
    uint16_t i;
#ifdef FLOAT_INTERFACE_JBM
    float frm_in[APA_BUF]; /* TODO(mcjbm): this buffer could be smaller - always allocates space for 16 channels */
#else
    int16_t frm_in[APA_BUF]; /* TODO(mcjbm): this buffer could be smaller - always allocates space for 16 channels */
#endif
    uint16_t l_frm_out;
    int16_t l_rem;
    int32_t dl_scaled, dl_copied, l_frm_out_target;
@@ -525,8 +597,13 @@ uint8_t apa_exec(
    }
    else
    {
#ifdef FLOAT_INTERFACE_JBM
        float *buf_out_ptr = &( ps->buf_out[ps->l_buf_out - ps->l_frm] );
        float *frm_in_ptr = &( frm_in[ps->l_frm] );
#else
        int16_t *buf_out_ptr = &( ps->buf_out[ps->l_buf_out - ps->l_frm] );
        int16_t *frm_in_ptr = &( frm_in[ps->l_frm] );
#endif

        /* fill input frame */
        /* 1st input frame: previous output samples */
@@ -581,8 +658,13 @@ uint8_t apa_exec(
    /* discard old samples; always keep at least most recent l_frm samples */
    if ( ( ps->l_buf_out + l_frm_out ) > ps->buf_out_capacity )
    {
#ifdef FLOAT_INTERFACE_JBM
        float *buf_out_ptr1 = ps->buf_out;
        float *buf_out_ptr2;
#else
        int16_t *buf_out_ptr1 = ps->buf_out;
        int16_t *buf_out_ptr2;
#endif

        l_rem = ( ps->l_frm - l_frm_out );
        if ( l_rem < 0 )
@@ -602,7 +684,11 @@ uint8_t apa_exec(
        return 5;
    }
    {
#ifdef FLOAT_INTERFACE_JBM
        float *buf_out_ptr = &( ps->buf_out[ps->l_buf_out] );
#else
        int16_t *buf_out_ptr = &( ps->buf_out[ps->l_buf_out] );
#endif
        for ( i = 0; i < l_frm_out; i++ )
        {
            buf_out_ptr[i] = a_out[i];
@@ -660,7 +746,11 @@ uint8_t apa_exec(
*/
static void get_scaling_quality(
    const apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
    const float *signal,
#else
    const int16_t *signal,
#endif
    uint16_t s_len,
    uint16_t offset,
    uint16_t corr_len,
@@ -813,7 +903,11 @@ static float apa_getQualityIncreaseForLowEnergy(
*/
static bool logarithmic_search(
    const apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
    const float *signal,
#else
    const int16_t *signal,
#endif
    int16_t s_start,
    uint16_t inlen,
    uint16_t offset,
@@ -926,7 +1020,11 @@ static bool logarithmic_search(
*/
static bool find_synch(
    apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
    const float *in,
#else
    const int16_t *in,
#endif
    uint16_t l_in,
    int16_t s_start,
    uint16_t s_len,
@@ -981,8 +1079,13 @@ static bool find_synch(
*/
static bool copy_frm(
    apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
    const float frm_in[],
    float frm_out[],
#else
    const int16_t frm_in[],
    int16_t frm_out[],
#endif
    uint16_t *l_frm_out )
{
    uint16_t i;
@@ -1029,9 +1132,17 @@ static bool copy_frm(
*/
static bool shrink_frm(
    apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
    const float frm_in[],
#else
    const int16_t frm_in[],
#endif
    uint16_t maxScaling,
#ifdef FLOAT_INTERFACE_JBM
    float frm_out[],
#else
    int16_t frm_out[],
#endif
    uint16_t *l_frm_out )
{
    bool findSynchResult = 0;
@@ -1165,8 +1276,13 @@ static bool shrink_frm(
*/
static bool extend_frm(
    apa_state_t *ps,
#ifdef FLOAT_INTERFACE_JBM
    const float frm_in[],
    float frm_out[],
#else
    const int16_t frm_in[],
    int16_t frm_out[],
#endif
    uint16_t *l_frm_out )
{
    bool findSynchResult = 0;
@@ -1180,8 +1296,13 @@ static bool extend_frm(
    int16_t s_start = 0;
    float energy, quality = 0.0f;
    uint16_t l_frm, l_seg;
#ifdef FLOAT_INTERFACE_JBM
    const float *fadeOut, *fadeIn;
    float *out;
#else
    const int16_t *fadeOut, *fadeIn;
    int16_t *out;
#endif

    l_frm = ps->l_frm;
    l_seg = ps->l_seg;
@@ -1332,8 +1453,13 @@ static bool extend_frm(
        else
        {
/* just copy down 1st half of current segment (= 2nd half of previous segment) */
#ifdef FLOAT_INTERFACE_JBM
            float *frm_out_ptr;
            const float *frm_in_ptr;
#else
            int16_t *frm_out_ptr;
            const int16_t *frm_in_ptr;
#endif
            frm_out_ptr = &( frm_out[( n - 2 ) * l_seg] );
            frm_in_ptr = &( frm_in[l_frm + xtract[n]] );
            for ( i = 0; i < l_seg; i++ )
+14 −1
Original line number Diff line number Diff line
@@ -120,6 +120,19 @@ bool apa_set_quality( apa_state_t *s, float quality, uint16_t qualityred, uint16

bool apa_exit( apa_state_t **s );

uint8_t apa_exec( apa_state_t *s, const int16_t a_in[], uint16_t l_in, uint16_t maxScaling, int16_t a_out[], uint16_t *l_out );
uint8_t apa_exec( apa_state_t *s,
#ifdef FLOAT_INTERFACE_JBM
                  const float a_in[],
#else
                  const int16_t a_in[],
#endif
                  uint16_t l_in,
                  uint16_t maxScaling,
#ifdef FLOAT_INTERFACE_JBM
                  float a_out[],
#else
                  int16_t a_out[],
#endif
                  uint16_t *l_out );

#endif /* JBM_PCMDSP_APA_H */
+36 −0
Original line number Diff line number Diff line
@@ -52,7 +52,11 @@

/* Calculates cross correlation coefficient for template segment. */
float cross_correlation_self(
#ifdef FLOAT_INTERFACE_JBM
    const float *signal,
#else
    const int16_t *signal,
#endif
    uint16_t x,
    uint16_t y,
    uint16_t corr_len )
@@ -63,7 +67,11 @@ float cross_correlation_self(
    c_c = 0.0f;
    for ( j = 0; j < corr_len; j++ )
    {
#ifdef FLOAT_INTERFACE_JBM
        c_c += ( signal[j + x] * signal[j + y] );
#else
        c_c += ( (float) signal[j + x] * (float) signal[j + y] );
#endif
    }

    return c_c;
@@ -71,7 +79,11 @@ float cross_correlation_self(

/* Calculates cross correlation coefficient for template segment. */
float cross_correlation_subsampled_self(
#ifdef FLOAT_INTERFACE_JBM
    const float *signal,
#else
    const int16_t *signal,
#endif
    uint16_t x,
    uint16_t y,
    uint16_t corr_len,
@@ -83,7 +95,11 @@ float cross_correlation_subsampled_self(
    c_c = 0.0f;
    for ( j = 0; j < corr_len; j += subsampling )
    {
#ifdef FLOAT_INTERFACE_JBM
        c_c += ( signal[j + x] * signal[j + y] );
#else
        c_c += ( (float) signal[j + x] * (float) signal[j + y] );
#endif
    }

    return c_c;
@@ -92,7 +108,11 @@ float cross_correlation_subsampled_self(

/* Calculates normalized cross correlation coefficient for template segment. */
float normalized_cross_correlation_self(
#ifdef FLOAT_INTERFACE_JBM
    const float *signal,
#else
    const int16_t *signal,
#endif
    uint16_t x,
    uint16_t y,
    uint16_t corr_len,
@@ -102,7 +122,11 @@ float normalized_cross_correlation_self(
    float c_c;
    float energy_xy, energy_x, energy_y;
    uint16_t j;
#ifdef FLOAT_INTERFACE_JBM
    const float *signal_a, *signal_b;
#else
    const int16_t *signal_a, *signal_b;
#endif

    c_c = 0.0f;
    energy_x = 0.0f;
@@ -111,11 +135,19 @@ float normalized_cross_correlation_self(
    signal_b = &signal[y];
    for ( j = 0; j < corr_len; j += subsampling )
    {
#ifdef FLOAT_INTERFACE_JBM
        c_c += ( signal_a[j] * signal_b[j] );
        energy_x += ( signal_a[j] ) * ( signal_a[j] );
        energy_y += ( signal_b[j] ) * ( signal_b[j] );
    }
    energy_xy = sqrt( energy_x * energy_y );
#else
        c_c += ( (float) signal_a[j] * (float) signal_b[j] );
        energy_x += ( (float) signal_a[j] ) * ( (float) signal_a[j] );
        energy_y += ( (float) signal_b[j] ) * ( (float) signal_b[j] );
    }
    energy_xy = (float) sqrt( (float) energy_x * (float) energy_y );
#endif
    if ( energy_xy < 1.0f )
    {
        energy_xy = 1.0f; /* conceal silent frames */
@@ -130,7 +162,11 @@ float normalized_cross_correlation_self(

/* Splits the signal into segments and checks if all of them have very low energy. */
bool isSilence(
#ifdef FLOAT_INTERFACE_JBM
    const float *signal,
#else
    const int16_t *signal,
#endif
    uint32_t len,
    uint32_t segments )
{
Loading