Skip to content
Commits on Source (2)
......@@ -1346,7 +1346,7 @@ typedef enum {
BETA
} PAR_TYPE;
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
typedef enum {
FINE,
COARSE
......@@ -1358,7 +1358,7 @@ typedef struct {
int16_t offset;
float data[35];
} ACPL_QUANT_TABLE;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
typedef struct
{
const int16_t (*alpha)[2];
......
......@@ -2522,7 +2522,7 @@ const uint16_t ivas_param_mc_sym_freq_ild_delta_combined_48_16bits[2 * PARAM_MC_
/*----------------------------------------------------------------------------------*
* Parametric Upmix MC ROM tables
*----------------------------------------------------------------------------------*/
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
const int16_t ivas_param_upmx_mx_qmap[33] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0
......@@ -6443,7 +6443,7 @@ const int16_t sns_1st_means_32k[2][16] =
/*----------------------------------------------------------------------*
* MC ParamUpmix ROM tables
*-----------------------------------------------------------------------*/
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
const ACPL_QUANT_TABLE ivas_mc_paramupmix_alpha_quant_table =
{
33, /* nquant */
......
......@@ -262,7 +262,7 @@ extern const uint16_t ivas_param_mc_sym_freq_icc_delta_combined_48_16bits[2 * PA
/*----------------------------------------------------------------------------------*
* Parametric Upmix MC ROM tables
*----------------------------------------------------------------------------------*/
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
extern const int16_t ivas_param_upmx_mx_qmap[33];
#else
extern const int16_t ivas_param_upmx_mx_qmap[2][33];
......@@ -456,7 +456,7 @@ extern const int16_t sns_1st_means_32k[2][16];
/*----------------------------------------------------------------------*
* MC ParamUpmix ROM tables
*-----------------------------------------------------------------------*/
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
extern const ACPL_QUANT_TABLE ivas_mc_paramupmix_alpha_quant_table;
extern const ACPL_QUANT_TABLE ivas_mc_paramupmix_beta_quant_table[9];
#else
......
......@@ -156,7 +156,7 @@
#define FIX_890_ARRAY_SIZE /* Nokia: issue #890: mismatch in 2D array size declaration and use */
#define BE_FIX_887_GCC_WARNING_ARRAY_SIZE /* VoiceAge: Issue 887: change array size definition to avoid warning with gcc 11.4.0 */
#define FIX_247_EXTERNAL_RENDERER_COMMAND_LINE /* VA: issue 247: harmonize command-line options names of external renderer with the decoder */
#define FIX_DLB_PARAMUPMIX_CLEANUP
#define FIX_891_PARAMUPMIX_CLEANUP /* Dlb: issue 891: remove unneeded code from ParamUpmix */
/* #################### End BE switches ################################## */
......
......@@ -79,7 +79,7 @@ static void ivas_param_upmix_dec_decorr_subframes( Decoder_Struct *st_ivas, cons
static void paramupmix_td_decorr_process( ivas_td_decorr_state_t *hTdDecorr[], float *pcm_in[], float **pp_out_pcm, const int16_t output_frame );
static int16_t huff_read( Decoder_State *st, const int16_t ( *ht )[2] );
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
static void huffman_decode( Decoder_State *st, PAR_TYPE parType, int32_t *vq );
static void dequant_alpha( int32_t *vq, float *v );
......@@ -149,7 +149,7 @@ void ivas_mc_paramupmix_dec_read_BS(
for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
get_ec_data( st0, ALPHA, hMCParamUpmix->alpha_quant[i], alpha_quant, hMCParamUpmix->alphas[i] );
get_ec_data( st0, BETA, hMCParamUpmix->beta_quant[i], alpha_quant, hMCParamUpmix->betas[i] );
......@@ -1348,13 +1348,12 @@ static int16_t huff_read(
static void huffman_decode(
Decoder_State *st,
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const int16_t nv,
const int16_t ivStart,
const PAR_TYPE parType,
const QUANT_TYPE quant_type,
const int16_t bNoDt,
0
#else
const PAR_TYPE parType,
#endif
......@@ -1366,7 +1365,7 @@ static void huffman_decode(
nquant = 0;
switch ( parType )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
case ALPHA:
nquant = ivas_mc_paramupmix_alpha_quant_table.nquant;
break;
......@@ -1387,7 +1386,7 @@ static void huffman_decode(
offset = nquant - 1; /* range of df/dt [-(nquant - 1), nquant - 1] */
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
bdt = st->bit_stream[st->next_bit_pos];
st->next_bit_pos++;
#else
......@@ -1405,7 +1404,7 @@ static void huffman_decode(
{ /* Get dt */
switch ( parType )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
case ALPHA:
huff_node_table = ivas_mc_paramupmix_huff_nodes_dt.alpha;
break;
......@@ -1441,7 +1440,7 @@ static void huffman_decode(
{
switch ( parType )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
case ALPHA:
huff_node_table = ivas_mc_paramupmix_huff_nodes_df0.alpha;
break;
......@@ -1507,7 +1506,7 @@ static void huffman_decode(
static void dequant_alpha(
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const int16_t nv,
const int16_t ivStart,
const QUANT_TYPE quant_type,
......@@ -1516,7 +1515,7 @@ static void dequant_alpha(
float *v )
{
int16_t iv;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
const ACPL_QUANT_TABLE *quant_table = &ivas_mc_paramupmix_alpha_quant_table;
for ( iv = 0; iv < 0; iv++ )
......@@ -1546,7 +1545,7 @@ static void dequant_alpha(
static void dequant_beta(
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const int16_t nv,
const int16_t ivStart,
const QUANT_TYPE quant_type,
......@@ -1558,7 +1557,7 @@ static void dequant_beta(
int16_t iv;
const ACPL_QUANT_TABLE *quant_table;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
for ( iv = 0; iv < 0; iv++ )
{
beta[iv] = 0;
......@@ -1588,7 +1587,7 @@ static void dequant_beta(
static void get_ec_data(
Decoder_State *st,
const PAR_TYPE parType,
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const QUANT_TYPE quant_type,
const int16_t nParBand,
const int16_t parBandStart,
......@@ -1597,7 +1596,7 @@ static void get_ec_data(
int32_t *alphaQEnv,
float ab[IVAS_MAX_NUM_BANDS] )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
huffman_decode( st, parType, parQ );
#else
huffman_decode( st, nParBand, parBandStart, parType, quant_type, 0, parQ );
......@@ -1605,7 +1604,7 @@ static void get_ec_data(
if ( parType == ALPHA )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
dequant_alpha( parQ, ab );
mvl2l( parQ, alphaQEnv, (int16_t) IVAS_MAX_NUM_BANDS );
#else
......@@ -1615,7 +1614,7 @@ static void get_ec_data(
}
else
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
dequant_beta( alphaQEnv, parQ, ab );
#else
dequant_beta( nParBand, parBandStart, quant_type, alphaQEnv, parQ, ab );
......
......@@ -720,7 +720,7 @@ static const int16_t huff_nodes_first_band_alpha[32][2] =
{ -2, -32 }
};
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
/* Alpha Coarse Huffman table df0 */
static const int16_t huff_nodes_first_band_alpha_coarse[16][2] =
{
......@@ -812,7 +812,7 @@ static const int16_t huff_nodes_alpha_1D_DF[64][2] =
{ -2, -62 }
};
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
/* Alpha Coarse Huffman table df */
static const int16_t huff_nodes_alpha_1D_DF_coarse[32][2] =
{
......@@ -920,7 +920,7 @@ static const int16_t huff_nodes_alpha_1D_DT[64][2] =
{ -2, -63 }
};
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
/* Alpha Coarse Huffman table dt */
static const int16_t huff_nodes_alpha_1D_DT_coarse[32][2] =
{
......@@ -965,7 +965,7 @@ static const int16_t huff_nodes_first_band_beta[8][2] =
{ -1, 1 }, { -2, 2 }, { -3, 3 }, { -4, 4 }, { -5, 5 }, { -6, 6 }, { -7, 7 }, { -8, -9 }
};
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
/* Beta Coarse Huffman table df0 */
static const int16_t huff_nodes_first_band_beta_coarse[4][2] =
{
......@@ -979,7 +979,7 @@ static const int16_t huff_nodes_beta_1D_DF[16][2] =
{ -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { 9, 8 }, { -5, -13 }, { 11, 10 }, { -4, -14 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 }
};
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
/* Beta Coarse Huffman table df */
static const int16_t huff_nodes_beta_1D_DF_coarse[8][2] =
{
......@@ -993,7 +993,7 @@ static const int16_t huff_nodes_beta_1D_DT[16][2] =
{ -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { -13, 8 }, { -5, 9 }, { -14, 10 }, { -4, 11 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 }
};
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
/* Beta Coarse Huffman table dt */
static const int16_t huff_nodes_beta_1D_DT_coarse[8][2] =
{
......@@ -1001,7 +1001,7 @@ static const int16_t huff_nodes_beta_1D_DT_coarse[8][2] =
};
#endif
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df0 =
{
huff_nodes_first_band_alpha,
......
......@@ -56,7 +56,7 @@
static void ivas_mc_paramupmix_dmx( MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, float *data_f[], const int16_t input_frame );
static void ivas_mc_paramupmix_param_est_enc( MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, float *input_frame_t[], const int16_t input_frame, float alphas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS], float betas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS] );
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
static void get_huff_table( const PAR_TYPE par_type, HUFF_TAB *df0, HUFF_TAB *df, HUFF_TAB *dt );
#else
static void get_huff_table( const PAR_TYPE par_type, const QUANT_TYPE quant_type, HUFF_TAB *df0, HUFF_TAB *df, HUFF_TAB *dt );
......@@ -64,7 +64,7 @@ static void get_huff_table( const PAR_TYPE par_type, const QUANT_TYPE quant_type
static void write_huff_bits( const int32_t value, const uint16_t length, uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], int16_t *bit_pos );
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
static void huffman_encode( const int32_t *vqPrev, const int32_t *vq, const PAR_TYPE parType, const int16_t nq, uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], int16_t *bit_pos );
#else
static void huffman_encode( const int16_t bdfOnly, const int16_t bdtAllowed, const int16_t nv, const int16_t ivStart, const int32_t *vqPrev, const int32_t *vq, const PAR_TYPE parType, const QUANT_TYPE quant_type, const int16_t nq, uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], int16_t *bit_pos );
......@@ -72,7 +72,7 @@ static void huffman_encode( const int16_t bdfOnly, const int16_t bdtAllowed, con
static void put_ec_data( MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, const int16_t ch, const float pars[IVAS_MAX_NUM_BANDS], const float alphas[IVAS_MAX_NUM_BANDS], const PAR_TYPE parType, uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], int16_t *bit_pos );
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
static void quantize_alpha( const float *alpha, int16_t *pnq, int32_t aq[IVAS_MAX_NUM_BANDS], float *adeq );
static void quantize_pars( const float *v, const int16_t nq, const float *data, int32_t vq[IVAS_MAX_NUM_BANDS], float *vdeq );
#else
......@@ -372,7 +372,7 @@ void ivas_mc_paramupmix_enc_close(
static void get_huff_table(
const PAR_TYPE par_type,
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const QUANT_TYPE quant_type,
#endif
HUFF_TAB *df0,
......@@ -381,7 +381,7 @@ static void get_huff_table(
{
switch ( par_type )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
case ALPHA:
df0->value = huff_alpha_table.df0.value;
df0->length = huff_alpha_table.df0.length;
......@@ -440,7 +440,7 @@ static void write_huff_bits(
static void huffman_encode(
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const int16_t bdfOnly,
const int16_t bdtAllowed,
const int16_t nv,
......@@ -449,19 +449,23 @@ static void huffman_encode(
const int32_t *vqPrev,
const int32_t *vq,
const PAR_TYPE parType,
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const QUANT_TYPE quant_type,
#endif
const int16_t nq,
uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS],
int16_t *bit_pos )
{
#ifdef FIX_891_PARAMUPMIX_CLEANUP
int16_t iv;
#else
int16_t iv, ndf, ndt;
#endif
int32_t icode;
int16_t offset;
HUFF_TAB df0, df, dt;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
get_huff_table( parType, &df0, &df, &dt );
#else
get_huff_table( parType, quant_type, &df0, &df, &dt );
......@@ -469,35 +473,43 @@ static void huffman_encode(
offset = nq - 1; /* range [-(nquant - 1), nquant - 1] */
#ifndef FIX_891_PARAMUPMIX_CLEANUP
/* Get code length for time and freq diff coding */
ndf = 0;
ndt = 0;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#endif
#ifdef FIX_891_PARAMUPMIX_CLEANUP
for ( iv = 0; iv < IVAS_MAX_NUM_BANDS; iv++ )
#else
for ( iv = ivStart; iv < nv; iv++ )
#endif
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
if ( iv == 0 )
#else
if ( iv == ivStart )
#endif
{
icode = vq[iv];
#ifndef FIX_891_PARAMUPMIX_CLEANUP
ndf += df0.length[icode];
#endif
}
else
{
icode = vq[iv] - vq[iv - 1] + offset;
#ifndef FIX_891_PARAMUPMIX_CLEANUP
ndf += df.length[icode];
#endif
}
icode = vq[iv] - vqPrev[iv] + offset;
#ifndef FIX_891_PARAMUPMIX_CLEANUP
ndt += dt.length[icode];
#endif
}
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
if ( !bdtAllowed ) /* Time diff not allowed due to conformance or other reason even if bdfOnly = 0 */
{
ndt = ndf + 1;
......@@ -505,24 +517,28 @@ static void huffman_encode(
#endif
/* Write the bitstream */
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
if ( ndf < ndt )
#ifdef FIX_891_PARAMUPMIX_CLEANUP
bit_buffer[( *bit_pos )++] = (uint16_t) 0 & 1;
for ( iv = 0; iv < IVAS_MAX_NUM_BANDS; iv++ )
{
if ( iv == 0 )
{
icode = vq[iv];
write_huff_bits( df0.value[icode], df0.length[icode], bit_buffer, bit_pos );
}
else
{
icode = vq[iv] - vq[iv - 1] + offset;
write_huff_bits( df.value[icode], df.length[icode], bit_buffer, bit_pos );
}
}
#else
if ( bdfOnly || ndf < ndt )
#endif
{
bit_buffer[( *bit_pos )++] = (uint16_t) 0 & 1;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
for ( iv = 0; iv < IVAS_MAX_NUM_BANDS; iv++ )
#else
for ( iv = ivStart; iv < nv; iv++ )
#endif
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
if ( iv == 0 )
#else
if ( iv == ivStart )
#endif
{
icode = vq[iv];
write_huff_bits( df0.value[icode], df0.length[icode], bit_buffer, bit_pos );
......@@ -537,11 +553,7 @@ static void huffman_encode(
else
{
bit_buffer[( *bit_pos )++] = (uint16_t) 1 & 1;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
for ( iv = 0; iv < IVAS_MAX_NUM_BANDS; iv++ )
#else
for ( iv = ivStart; iv < nv; iv++ )
#endif
{
icode = vq[iv] - vqPrev[iv] + offset;
#ifdef DEBUGGING
......@@ -553,13 +565,14 @@ static void huffman_encode(
write_huff_bits( dt.value[icode], dt.length[icode], bit_buffer, bit_pos );
}
}
#endif
return;
}
static void quantize_pars(
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const int16_t nv,
#endif
const float *v,
......@@ -570,7 +583,7 @@ static void quantize_pars(
{
int16_t iv, iq, iq0, iq1;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
for ( iv = 0; iv < IVAS_MAX_NUM_BANDS; iv++ )
#else
for ( iv = 0; iv < nv; iv++ )
......@@ -609,11 +622,11 @@ static void quantize_pars(
static void quantize_alpha(
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const int16_t nv,
#endif
const float *alpha,
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const QUANT_TYPE quant_type,
#endif
int16_t *pnq,
......@@ -623,7 +636,7 @@ static void quantize_alpha(
int16_t nq;
const float *data;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
nq = ivas_mc_paramupmix_alpha_quant_table.nquant;
data = ivas_mc_paramupmix_alpha_quant_table.data;
......@@ -641,12 +654,12 @@ static void quantize_alpha(
static void quantize_beta(
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const int16_t nv,
#endif
const float *beta,
const int32_t aq[IVAS_MAX_NUM_BANDS],
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
const QUANT_TYPE quant_type,
#endif
int16_t *pnq,
......@@ -654,20 +667,20 @@ static void quantize_beta(
float *bdeq )
{
int16_t iv, iq, iq0, iq1;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
const ACPL_QUANT_TABLE *tables = ivas_mc_paramupmix_beta_quant_table;
#else
const ACPL_QUANT_TABLE *tables = ivas_mc_paramupmix_beta_quant_table[quant_type];
#endif
ACPL_QUANT_TABLE quant_table;
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
for ( iv = 0; iv < IVAS_MAX_NUM_BANDS; iv++ )
#else
for ( iv = 0; iv < nv; iv++ )
#endif
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
quant_table = tables[ivas_param_upmx_mx_qmap[aq[iv]]];
#else
quant_table = tables[ivas_param_upmx_mx_qmap[quant_type][aq[iv]]];
......@@ -701,7 +714,7 @@ static void quantize_beta(
}
}
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
*pnq = ivas_mc_paramupmix_beta_quant_table[0].nquant;
#else
*pnq = ivas_mc_paramupmix_beta_quant_table[quant_type][0].nquant;
......@@ -720,12 +733,12 @@ static void put_ec_data(
uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS],
int16_t *bit_pos )
{
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
int16_t npar = IVAS_MAX_NUM_BANDS;
int16_t onlyFreq = 1;
#endif
int16_t nq;
#ifndef FIX_DLB_PARAMUPMIX_CLEANUP
#ifndef FIX_891_PARAMUPMIX_CLEANUP
QUANT_TYPE quant_type = FINE;
#endif
int32_t alphaQuant[IVAS_MAX_NUM_BANDS];
......@@ -735,7 +748,7 @@ static void put_ec_data(
if ( parType == ALPHA )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
quantize_alpha( pars, &nq, alphaQuant, alphaDequant );
#else
quantize_alpha( npar, pars, quant_type, &nq, alphaQuant, alphaDequant );
......@@ -743,7 +756,7 @@ static void put_ec_data(
}
else
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
quantize_alpha( alphas, &nq, alphaQuant, alphaDequant );
quantize_beta( pars, alphaQuant, &nq, betaQuant, betaDequant );
#else
......@@ -768,7 +781,7 @@ static void put_ec_data(
/* Always one parameter set per frame for transient frames. Original PS framing is used internally. */
if ( parType == ALPHA )
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
huffman_encode( hMCParamUpmix->alpha_quant_prev[ch], alphaQuant, ALPHA, nq, bit_buffer, bit_pos );
#else
huffman_encode( onlyFreq, 1, npar, 0, hMCParamUpmix->alpha_quant_prev[ch], alphaQuant, ALPHA, quant_type, nq, bit_buffer, bit_pos );
......@@ -776,7 +789,7 @@ static void put_ec_data(
}
else
{
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
huffman_encode( hMCParamUpmix->beta_quant_prev[ch], betaQuant, BETA, nq, bit_buffer, bit_pos );
#else
huffman_encode( onlyFreq, 1, npar, 0, hMCParamUpmix->beta_quant_prev[ch], betaQuant, BETA, quant_type, nq, bit_buffer, bit_pos );
......
......@@ -722,7 +722,7 @@ const float Stereo_dmx_wnd_coef_48k[L_FRAME48k] = {
0.0310834963f, 0.0278123822f, 0.0245409720f, 0.0212692991f, 0.0179976355f, 0.0147257810f, 0.0114535289f, 0.00818115473f, 0.00490869302f, 0.00163617858f
};
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
const HUFF_TABLE huff_alpha_table =
{
{ /* df0 */
......
......@@ -126,7 +126,7 @@ extern const float Stereo_dmx_s_wnd_coef_48k[L_FRAME48k >> 4];
extern const float Stereo_dmx_wnd_coef_32k[L_FRAME32k];
extern const float Stereo_dmx_wnd_coef_48k[L_FRAME48k];
#ifdef FIX_DLB_PARAMUPMIX_CLEANUP
#ifdef FIX_891_PARAMUPMIX_CLEANUP
/*----------------------------------------------------------------------------------*
* ParamUpmix ROM tables
*----------------------------------------------------------------------------------*/
......