Commit 0f051772 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch 'accept_sba_switches_issues_99_119' into 'main'

Accept sba switches issues 99 119

See merge request !148
parents 8b68590a f299ed35
Loading
Loading
Loading
Loading
Loading
+6 −20
Original line number Diff line number Diff line
@@ -4247,27 +4247,13 @@ int16_t ivas_map_num_decd_r_to_idx( const int16_t num_quant_points_decd_r );

/* Quantization utilities */
void ivas_quantise_real_values(
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    const float *values,
#else
        float **values,
#endif
    const int16_t q_levels,
    const float min_value,
    const float max_value,
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    int16_t *index,
    float *quant,
#else
        int16_t **index,
        float **quant,
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    const int16_t dim
#else
    const int16_t dim1,
    const int16_t dim2
#endif
);


+1 −82
Original line number Diff line number Diff line
@@ -41,31 +41,6 @@
#include "ivas_rom_com.h"
#include <assert.h>
#include "wmops.h"
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
/*-----------------------------------------------------------------------------------------*
 * Function ivas_limit_values()
 *
 * Limit values within given range
 *-----------------------------------------------------------------------------------------*/

static void ivas_limit_values(
    float **ppValues,
    const float min_value,
    const float max_value,
    const int16_t dim1,
    const int16_t dim2 )
{
    int16_t i, j;
    for ( i = 0; i < dim1; i++ )
    {
        for ( j = 0; j < dim2; j++ )
        {
            ppValues[i][j] = max( min_value, min( ppValues[i][j], max_value ) );
        }
    }
    return;
}
#endif

/*-----------------------------------------------------------------------------------------*
 * Function ivas_quantise_real_values()
@@ -73,72 +48,28 @@ static void ivas_limit_values(
 * Quantize real values
 *-----------------------------------------------------------------------------------------*/
void ivas_quantise_real_values(
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    const float *values,
#else
    float **values,
#endif
    const int16_t q_levels,
    const float min_value,
    const float max_value,
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    int16_t *index,
    float *quant,
#else
    int16_t **index,
    float **quant,
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    const int16_t dim
#else
    const int16_t dim1,
    const int16_t dim2
#endif
)
    const int16_t dim )
{
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
    int16_t i, j;
#else
    int16_t i;
#endif
    float q_step, one_by_q_step;
    if ( q_levels == 1 )
    {
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
        for ( i = 0; i < dim1; i++ )
        {
            for ( j = 0; j < dim2; j++ )
            {

                quant[i][j] = 0;
                index[i][j] = 0;
            }
        }
#else
        for ( i = 0; i < dim; i++ )
        {
            quant[i] = 0;
            index[i] = 0;
        }
#endif
    }
    else if ( q_levels && max_value != min_value )
    {
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
        ivas_limit_values( values, min_value, max_value, dim1, dim2 );
#endif
        q_step = ( max_value - min_value ) / ( q_levels - 1 );
        one_by_q_step = ( q_levels - 1 ) / ( max_value - min_value );
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
        for ( i = 0; i < dim1; i++ )
        {
            for ( j = 0; j < dim2; j++ )
            {
                index[i][j] = (int16_t) round( one_by_q_step * values[i][j] );
                quant[i][j] = index[i][j] * q_step;
            }
        }
#else
        float val;
        for ( i = 0; i < dim; i++ )
        {
@@ -146,24 +77,13 @@ void ivas_quantise_real_values(
            index[i] = (int16_t) round( one_by_q_step * val );
            quant[i] = index[i] * q_step;
        }
#endif
    }
    else
    {
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
        for ( i = 0; i < dim1; i++ )
        {
            for ( j = 0; j < dim2; j++ )
            {
                quant[i][j] = values[i][j];
            }
        }
#else
        for ( i = 0; i < dim; i++ )
        {
            quant[i] = values[i];
        }
#endif
    }
    return;
}
@@ -425,7 +345,6 @@ void ivas_clear_band_coeff_idx(
    for ( i = 0; i < num_bands; i++ )
    {
        set_s( pband_coeff_idx[i].pred_index_re, 0, ( IVAS_SPAR_MAX_CH - 1 ) );

        set_s( pband_coeff_idx[i].drct_index_re, 0, IVAS_SPAR_MAX_C_COEFF );
        set_s( pband_coeff_idx[i].decd_index_re, 0, ( IVAS_SPAR_MAX_CH - 1 ) );
    }
+0 −4
Original line number Diff line number Diff line
@@ -147,12 +147,8 @@
/*#define FIX_I1_113*/                                  /* under review : MCT bit distribution optimization for SBA high bitrates*/

#define SPAR_SCALING_HARMONIZATION                      /* Issue 80: Changes to harmonize scaling in spar */
#define SBA_INTERN_CONFIG_FIX_HOA2                      /* Issue 99 : Fix for incorrect internal_config when output format is HOA2 or FOA*/
#define FIX_I98_HANDLES_TO_NULL                         /* Issue 98: do the setting of all handles to NULL in one place */

#define QUANTISE_REAL_FCN_CLEAN_UP                      /*Clean up the ivas_quantise_real_values() function*/


#define FIX_I74_BW_LIMITATION_ALT                       /* issue 74: Propagate bitrate induced BW limitation to hEncoderConfig. Ensures BE between explicit BW limitation using "-max_band <BW>" and BW limited by bitrate; alternative fix */
#define FIX_I74_CLEANING                                /* issue 74: remove redundant function call in ivas_cpe_enc() */

+0 −4
Original line number Diff line number Diff line
@@ -511,7 +511,6 @@ void ivas_renderer_select(
        if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR &&
             ( output_config != AUDIO_CONFIG_5_1 && output_config != AUDIO_CONFIG_5_1_2 && output_config != AUDIO_CONFIG_5_1_4 && output_config != AUDIO_CONFIG_7_1 && output_config != AUDIO_CONFIG_7_1_4 && output_config != AUDIO_CONFIG_LS_CUSTOM ) )
        {
#ifdef SBA_INTERN_CONFIG_FIX_HOA2
            if ( output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_FOA )
            {
                *internal_config = output_config;
@@ -520,9 +519,6 @@ void ivas_renderer_select(
            {
                *internal_config = AUDIO_CONFIG_HOA3;
            }
#else
            *internal_config = AUDIO_CONFIG_HOA3;
#endif
            st_ivas->renderer_type = RENDERER_SBA_LINEAR_DEC;
        }
        else if ( ( st_ivas->ivas_format == MASA_FORMAT && output_config == AUDIO_CONFIG_MONO && st_ivas->nchan_transport == 1 ) ||
+85 −307
Original line number Diff line number Diff line
@@ -82,11 +82,7 @@ static void ivas_spar_md_fill_invalid_bands( ivas_spar_dec_matrices_t *pSpar_coe
static ivas_error ivas_spar_set_dec_config( ivas_spar_md_dec_state_t *hMdDec, const int16_t nchan_transport, float *pFC );

static void ivas_parse_parameter_bitstream_dtx( ivas_spar_md_t *pSpar_md, Decoder_State *st, const int16_t bw, const int16_t num_bands, int16_t *num_dmx_per_band, int16_t *num_dec_per_band );
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
static ivas_error ivas_deindex_real_index( const int16_t *index, const int16_t q_levels, const float min_value, const float max_value, float *quant, const int16_t num_ch_dim2 );
#else
static ivas_error ivas_deindex_real_index( int16_t **index, const int16_t q_levels, const float min_value, const float max_value, float **quant, const int16_t num_ch, const int16_t dim2 );
#endif
static void ivas_spar_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode );


@@ -1607,59 +1603,12 @@ static void ivas_spar_dec_parse_md_bs(
        for ( i = 0; i < *nB; i++ )
        {
            int16_t ii, jj;
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            int16_t *index_scratch[IVAS_SPAR_P_LOWERTRI];
            float *quant_scratch[IVAS_SPAR_P_LOWERTRI];
#endif
            int16_t ndec = hMdDec->spar_md_cfg.num_decorr_per_band[( *bands_bw ) * i];
            int16_t ndm = hMdDec->spar_md_cfg.num_dmx_chans_per_band[( *bands_bw ) * i];
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            int16_t **index = (int16_t **) &index_scratch[0];
            float **quant = (float **) &quant_scratch[0];
            float coeff_decd[IVAS_SPAR_MAX_CH - 1];
            float coeff_decx_re[IVAS_SPAR_P_LOWERTRI];
            int16_t decx_index_re[IVAS_SPAR_P_LOWERTRI];
            int16_t pred_index_re[IVAS_SPAR_MAX_CH - 1];
            int16_t drct_index_re[IVAS_SPAR_MAX_C_COEFF];
            int16_t decd_index_re[IVAS_SPAR_MAX_CH - 1];
#else
            float quant[IVAS_SPAR_MAX_C_COEFF];
#endif
#ifndef QUANTISE_REAL_FCN_CLEAN_UP

            for ( j = 0; j < ndm + ndec - 1; j++ )
            {
                pred_index_re[j] = hMdDec->spar_md.band_coeffs_idx[i].pred_index_re[j];
            }

            for ( j = 0; j < ndec * ( ndm - 1 ); j++ )
            {
                drct_index_re[j] = hMdDec->spar_md.band_coeffs_idx[i].drct_index_re[j];
            }
            for ( j = 0; j < ndec; j++ )
            {
                decd_index_re[j] = hMdDec->spar_md.band_coeffs_idx[i].decd_index_re[j];
            }
#endif
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            index[0] = &pred_index_re[0];
            quant[0] = &hMdDec->spar_md.band_coeffs[i].pred_re[0];
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            ivas_deindex_real_index( hMdDec->spar_md.band_coeffs_idx[i].pred_index_re, qs.PR.q_levels[0], qs.PR.min, qs.PR.max, hMdDec->spar_md.band_coeffs[i].pred_re, ndm + ndec - 1 );
#else
            ivas_deindex_real_index( index, qs.PR.q_levels[0], qs.PR.min, qs.PR.max, quant, 1, ndm + ndec - 1 );
            for ( ii = 0; ii < ndec; ii++ )
            {
                for ( jj = 0; jj < ndm - 1; jj++ )
                {
                    hMdDec->spar_md.band_coeffs[i].C_re[ii][jj] = 0;
                }
            }
#endif

            j = 0;
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            for ( ii = 0; ii < ndec; ii++ )
            {
                for ( jj = 0; jj < ndm - 1; jj++ )
@@ -1668,23 +1617,7 @@ static void ivas_spar_dec_parse_md_bs(
                    j++;
                }
            }
#else
            for ( ii = 0; ii < ndec; ii++ )
            {
                for ( jj = 0; jj < ndm - 1; jj++ )
                {
                    index[j] = &drct_index_re[j];
                    quant[j] = &hMdDec->spar_md.band_coeffs[i].C_re[ii][jj];
                    j++;
                }
            }
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            ivas_deindex_real_index( hMdDec->spar_md.band_coeffs_idx[i].drct_index_re, qs.C.q_levels[0], qs.C.min, qs.C.max, quant, ndec * ( ndm - 1 ) );
#else
            ivas_deindex_real_index( index, qs.C.q_levels[0], qs.C.min, qs.C.max, quant, ndec * ( ndm - 1 ), 1 );
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            j = 0;
            for ( ii = 0; ii < ndec; ii++ )
            {
@@ -1694,70 +1627,20 @@ static void ivas_spar_dec_parse_md_bs(
                    j++;
                }
            }
#endif
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            index[0] = &decd_index_re[0];
            quant[0] = &coeff_decd[0];
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            ivas_deindex_real_index( hMdDec->spar_md.band_coeffs_idx[i].decd_index_re, qs.P_r.q_levels[0], qs.P_r.min, qs.P_r.max, hMdDec->spar_md.band_coeffs[i].P_re, ndm + ndec - 1 );
#else
            ivas_deindex_real_index( index, qs.P_r.q_levels[0], qs.P_r.min, qs.P_r.max, quant, 1, ndm + ndec - 1 );
#endif
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            index[0] = &decx_index_re[0];
            quant[0] = &coeff_decx_re[0];
#endif
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            ivas_deindex_real_index( index, qs.P_c.q_levels[0], qs.P_c.min, qs.P_c.max, quant, 1, ndec * ( ndec - 1 ) >> 2 );
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            /* Store prior coefficient indices */
            for ( j = 0; j < ndm + ndec - 1; j++ )
            {
                hMdDec->spar_md_prev.band_coeffs_idx[i].pred_index_re[j] = hMdDec->spar_md.band_coeffs_idx[i].pred_index_re[j];
            }
#else
            /* Store prior coefficient indices */
            for ( j = 0; j < ndm + ndec - 1; j++ )
            {
                hMdDec->spar_md_prev.band_coeffs_idx[i].pred_index_re[j] = pred_index_re[j];
            }
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            for ( j = 0; j < ndec * ( ndm - 1 ); j++ )
            {
                hMdDec->spar_md_prev.band_coeffs_idx[i].drct_index_re[j] = hMdDec->spar_md.band_coeffs_idx[i].drct_index_re[j];
            }
#else
            for ( j = 0; j < ndec * ( ndm - 1 ); j++ )
            {
                hMdDec->spar_md_prev.band_coeffs_idx[i].drct_index_re[j] = drct_index_re[j];
            }
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            for ( j = 0; j < ndec; j++ )
            {
                hMdDec->spar_md_prev.band_coeffs_idx[i].decd_index_re[j] = hMdDec->spar_md.band_coeffs_idx[i].decd_index_re[j];
            }
#else
            for ( j = 0; j < ndec; j++ )
            {
                hMdDec->spar_md_prev.band_coeffs_idx[i].decd_index_re[j] = decd_index_re[j];
            }
#endif

#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            for ( k = 0; k < ndec; k++ )
            {
                hMdDec->spar_md.band_coeffs[i].P_re[k] = 0;
            }
            for ( j = 0; j < ndec; j++ )
            {
                /* Don't bother adding in the decx parameters */
                hMdDec->spar_md.band_coeffs[i].P_re[j] = coeff_decd[j];
            }
#endif
            hMdDec->valid_bands[i] |= ( do_diff[i] == 0 ) ? 1 : 0;
        }
    }
@@ -2401,58 +2284,28 @@ static void ivas_spar_unquant_dtx_indicies(
{
    int16_t i, b;
    int16_t q_lvl;
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
    float **ppVal, *pVal, val;
    int16_t **ppIdx, *pIdx, idx;
#else
    float val;
    int16_t idx;
#endif
    float pr_min_max[2];

    pr_min_max[0] = pSpar_md->min_max[0];
    pr_min_max[1] = pSpar_md->min_max[1];
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
    ppVal = (float **) &pVal;
    ppIdx = (int16_t **) &pIdx;

    ppVal[0] = (float *) &val;
    ppIdx[0] = (int16_t *) &idx;
#endif
    for ( b = 0; b < nB; b++ )
    {
        for ( i = 0; i < FOA_CHANNELS - 1; i++ )
        {
            q_lvl = dtx_pr_real_q_levels[ndm_per_band[bw * b] - 1][i];
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            ppIdx[0][0] = pSpar_md->band_coeffs_idx[b].pred_index_re[i];
#else
            idx = pSpar_md->band_coeffs_idx[b].pred_index_re[i];
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            ivas_deindex_real_index( &idx, q_lvl, pr_min_max[0], pr_min_max[1], &val, 1 );
            pSpar_md->band_coeffs[b].pred_re[i] = val;
#else
            ivas_deindex_real_index( ppIdx, q_lvl, pr_min_max[0], pr_min_max[1], ppVal, 1, 1 );
            pSpar_md->band_coeffs[b].pred_re[i] = ppVal[0][0];
#endif
        }

        for ( i = 0; i < FOA_CHANNELS - ndm_per_band[bw * b]; i++ )
        {
            q_lvl = dtx_pd_real_q_levels[ndm_per_band[bw * b] - 1][i];
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
            ppIdx[0][0] = pSpar_md->band_coeffs_idx[b].decd_index_re[i];
#else
            idx = pSpar_md->band_coeffs_idx[b].decd_index_re[i];
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
            ivas_deindex_real_index( &idx, q_lvl, dtx_pd_real_min_max[0], dtx_pd_real_min_max[1], &val, 1 );
            pSpar_md->band_coeffs[b].P_re[i] = val;
#else
            ivas_deindex_real_index( ppIdx, q_lvl, dtx_pd_real_min_max[0], dtx_pd_real_min_max[1], ppVal, 1, 1 );
            pSpar_md->band_coeffs[b].P_re[i] = ppVal[0][0];
#endif
        }
    }

@@ -2475,25 +2328,13 @@ static void ivas_parse_parameter_bitstream_dtx(
    int16_t *num_dec_per_band )
{
    int16_t i, j;
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    float val;
    int16_t idx;
#else
    float **ppVal, *pVal, val;
    int16_t **ppIdx, *pIdx, idx;
#endif
    float pr_min_max[2];
    int16_t pr_q_lvls, pr, pd, pd_q_lvls, pr_pd_bits;
    int16_t pr_q_lvls1, pr_q_lvls2, pr_idx1, pr_idx2, pr_pr_bits;
    int16_t zero_pad_bits, sid_bits_len;
    sid_bits_len = st0->next_bit_pos;
#ifndef QUANTISE_REAL_FCN_CLEAN_UP
    ppVal = (float **) &pVal;
    ppIdx = (int16_t **) &pIdx;

    ppVal[0] = (float *) &val;
    ppIdx[0] = (int16_t *) &idx;
#endif
    pr_min_max[0] = pSpar_md->min_max[0];
    pr_min_max[1] = pSpar_md->min_max[1];

@@ -2533,26 +2374,13 @@ static void ivas_parse_parameter_bitstream_dtx(

                    pr = (int16_t) floor( value / pd_q_lvls );
                    pd = value - pr * pd_q_lvls;
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
                    val = dtx_pd_real_min_max[0];
                    ivas_quantise_real_values( &val, pd_q_lvls, dtx_pd_real_min_max[0], dtx_pd_real_min_max[1], &idx, &val, 1 );
#else
                    ppVal[0][0] = dtx_pd_real_min_max[0];
                    ivas_quantise_real_values( ppVal, pd_q_lvls, dtx_pd_real_min_max[0], dtx_pd_real_min_max[1], ppIdx, ppVal, 1, 1 );
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
                    pd = pd + idx;

                    val = pr_min_max[0];
                    ivas_quantise_real_values( &val, pr_q_lvls, pr_min_max[0], pr_min_max[1], &idx, &val, 1 );
                    pr = pr + idx;
#else
                    pd = pd + ppIdx[0][0];

                    ppVal[0][0] = pr_min_max[0];
                    ivas_quantise_real_values( ppVal, pr_q_lvls, pr_min_max[0], pr_min_max[1], ppIdx, ppVal, 1, 1 );
                    pr = pr + ppIdx[0][0];
#endif

                    if ( ( j + 1 ) <= ndec )
                    {
@@ -2572,7 +2400,6 @@ static void ivas_parse_parameter_bitstream_dtx(

                    pr_idx2 = (int16_t) floor( value / pr_q_lvls1 );
                    pr_idx1 = value - pr_idx2 * pr_q_lvls1;
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
                    val = pr_min_max[0];
                    ivas_quantise_real_values( &val, pr_q_lvls1, pr_min_max[0], pr_min_max[1], &idx, &val, 1 );

@@ -2582,17 +2409,6 @@ static void ivas_parse_parameter_bitstream_dtx(
                    ivas_quantise_real_values( &val, pr_q_lvls2, pr_min_max[0], pr_min_max[1], &idx, &val, 1 );

                    pr_idx2 += idx;
#else
                    ppVal[0][0] = pr_min_max[0];
                    ivas_quantise_real_values( ppVal, pr_q_lvls1, pr_min_max[0], pr_min_max[1], ppIdx, ppVal, 1, 1 );

                    pr_idx1 += ppIdx[0][0];

                    ppVal[0][0] = pr_min_max[0];
                    ivas_quantise_real_values( ppVal, pr_q_lvls2, pr_min_max[0], pr_min_max[1], ppIdx, ppVal, 1, 1 );

                    pr_idx2 += ppIdx[0][0];
#endif
                    pSpar_md->band_coeffs_idx[i].pred_index_re[pr_idx_1 - 1] = pr_idx1;
                    pSpar_md->band_coeffs_idx[i].pred_index_re[pr_idx_2 - 1] = pr_idx2;
                }
@@ -2621,32 +2437,14 @@ static void ivas_parse_parameter_bitstream_dtx(
 *-----------------------------------------------------------------------------------------*/

static ivas_error ivas_deindex_real_index(
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    const int16_t *index,
#else
    int16_t **index,
#endif
    const int16_t q_levels,
    const float min_value,
    const float max_value,
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    float *quant,
#else
    float **quant,
#endif
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    const int16_t dim
#else
    const int16_t num_ch,
    const int16_t dim2
#endif
)
    const int16_t dim )
{
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
    int16_t i;
#else
    int16_t i, j;
#endif
    float q_step;

    if ( q_levels == 0 )
@@ -2656,38 +2454,18 @@ static ivas_error ivas_deindex_real_index(

    if ( q_levels == 1 )
    {
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
        for ( i = 0; i < dim; i++ )
        {
            quant[i] = 0;
        }
#else
        for ( i = 0; i < num_ch; i++ )
        {
            for ( j = 0; j < dim2; j++ )
            {
                quant[i][j] = 0;
            }
        }
#endif
    }
    else
    {
        q_step = ( max_value - min_value ) / ( q_levels - 1 );
#ifdef QUANTISE_REAL_FCN_CLEAN_UP
        for ( i = 0; i < dim; i++ )
        {
            quant[i] = index[i] * q_step;
        }
#else
        for ( i = 0; i < num_ch; i++ )
        {
            for ( j = 0; j < dim2; j++ )
            {
                quant[i][j] = index[i][j] * q_step;
            }
        }
#endif
    }

    return IVAS_ERR_OK;
Loading