diff --git a/lib_com/ivas_dirac_com.c b/lib_com/ivas_dirac_com.c index 29a057ed76afcba955e0dca110cec68c915aa271..22b726f314c24f72afc86f61bf74fb73d28ede2c 100644 --- a/lib_com/ivas_dirac_com.c +++ b/lib_com/ivas_dirac_com.c @@ -169,7 +169,7 @@ ivas_error ivas_dirac_config( if ( hQMetaData != NULL ) { - if ( enc_dec == ENC || ( ivas_format != SBA_FORMAT && ivas_format != SBA_ISM_FORMAT ) ) /* Todo: This condition should probably be corrected in main */ + if ( enc_dec == ENC ) { hConfig->nbands = hQMetaData->q_direction[0].cfg.nbands; } diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 195a51432aabbceae5249c567bdf909d749ee8d0..45472ea441c1b8b4cb5774475706220fe27436aa 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -83,7 +83,7 @@ static void ivas_reorder_array( float in_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][ static void ivas_get_Wscaling_factor( float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], float pred_coeffs_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS], float ***mixer_mat, const int16_t start_band, const int16_t end_band, const int16_t dtx_vad, const int16_t num_ch, const int16_t *pNum_dmx, const int16_t bands_bw, const int16_t active_w, const int16_t active_w_vlbr, float *pWscale, const int16_t dyn_active_w_flag ); -static void ivas_calc_post_pred_per_band( float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], float ***mixer_mat, const int16_t num_ch, const int16_t num_dmx, const int16_t band_idx, float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] ); +static void ivas_calc_post_pred_per_band( float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], float ***mixer_mat, const int16_t num_ch, const int16_t band_idx, float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] ); static int16_t ivas_is_mat_inv( float in_re[MAX_MAT_DIM][MAX_MAT_DIM], const int16_t dim ); @@ -682,7 +682,7 @@ static void ivas_get_Wscaling_factor( { int16_t b, ch; float dm_f_local, abs_val; - float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; + float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] = { 0 }; if ( dtx_vad == 0 ) { @@ -701,7 +701,10 @@ static void ivas_get_Wscaling_factor( { float Gw_sq, g_sq = 0; - ivas_calc_post_pred_per_band( cov_real, mixer_mat, num_ch, pNum_dmx[b * bands_bw], b, postpred_cov_re ); + if ( num_ch != pNum_dmx[b * bands_bw] ) + { + ivas_calc_post_pred_per_band( cov_real, mixer_mat, num_ch, b, postpred_cov_re ); + } Gw_sq = cov_real[0][0][b] / max( postpred_cov_re[0][0], IVAS_FLT_EPS ); @@ -877,7 +880,6 @@ static void ivas_calc_post_pred_per_band( float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], float ***mixer_mat, const int16_t num_ch, - const int16_t num_dmx, const int16_t band_idx, float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] ) { @@ -886,15 +888,11 @@ static void ivas_calc_post_pred_per_band( float temp_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; float tmp_re; - // NOTE: What is this doing? - if ( num_dmx != num_ch ) + for ( i = 0; i < num_ch; i++ ) { - for ( i = 0; i < num_ch; i++ ) + for ( j = 0; j < num_ch; j++ ) { - for ( j = 0; j < num_ch; j++ ) - { - dmx_mat_conj[i][j] = mixer_mat[j][i][band_idx]; - } + dmx_mat_conj[i][j] = mixer_mat[j][i][band_idx]; } } @@ -1255,7 +1253,7 @@ void ivas_calc_c_p_coeffs( if ( num_dmx != num_ch ) { - ivas_calc_post_pred_per_band( cov_real, mixer_mat, num_ch, num_dmx, band_idx, postpred_cov_re ); + ivas_calc_post_pred_per_band( cov_real, mixer_mat, num_ch, band_idx, postpred_cov_re ); if ( num_dmx != 1 ) { diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index f2e99927b7ee467d1df8d3e2f0d65eb92bb3bddc..d137cccde1bc0e10740f7009d69081b06d511ff3 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -155,7 +155,7 @@ ivas_error ivas_sba_dec_reconfigure( st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); /* save old */ - if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) // ToDo; this never happens + if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) { st_ivas->hTcBuffer->num_slots = st_ivas->hSpar->num_slots; st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpar->nb_subframes; diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index 3251e3040873d573045663768237b9b3c440f71f..a82f5beea460ecbf7d26ee870bed9d94ec16ee85 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -193,9 +193,6 @@ ivas_error ivas_dirac_enc_reconfigure( return error; } - - /* :TODO: if the number of parameter bands change, do a meaningful mapping of parameter buffers from old to new band setting */ - if ( st_ivas->hQMetaData->useLowerRes ) { hDirAC->block_grouping[0] = 0; diff --git a/lib_rend/ivas_MSPred.c b/lib_rend/ivas_MSPred.c index 33581631d45ff1cc91509ebdf72bfefbcf2121b6..f7e48ce2e038358c788e02cbc7e15339349fef53 100644 --- a/lib_rend/ivas_MSPred.c +++ b/lib_rend/ivas_MSPred.c @@ -81,7 +81,7 @@ int32_t quantPhase( return phaseQ; } - +#ifdef SIMPLE_PHASE /*-------------------------------------------------------------------* * Function rot_pm_pi() * @@ -119,6 +119,21 @@ void rot_p_pi_2( return; } +/*-------------------------------------------------------------------* + * Function rot_zero() + * + * + *-------------------------------------------------------------------*/ + +void rot_zero( + float *pr, + float *pi ) +{ + *pr = *pr; + *pi = *pi; + + return; +} /*-------------------------------------------------------------------* * Function rot_m_pi_2() @@ -138,7 +153,7 @@ void rot_m_pi_2( return; } - +#endif /*-------------------------------------------------------------------* * Function cplxmult() diff --git a/lib_rend/ivas_PredDecoder.c b/lib_rend/ivas_PredDecoder.c index abc78e894014d4f2e931fd5df7561235f39afa8a..3ba8c88138e68a432714c617ae31df3708d25c10 100644 --- a/lib_rend/ivas_PredDecoder.c +++ b/lib_rend/ivas_PredDecoder.c @@ -251,10 +251,10 @@ int32_t ReadPredictors( float fA1Real; float fA1Imag; - iA1Mag = BSGetBits( psBSRead, PRED_QUNAT_FILTER_MAG_BITS ); + iA1Mag = ivas_split_rend_bitstream_read_int32( pBits, PRED_QUNAT_FILTER_MAG_BITS ); iBitsRead += PRED_QUNAT_FILTER_MAG_BITS; - iA1Phase = BSGetBits( psBSRead, PRED_QUANT_FILTER_PHASE_BITS ); + iA1Phase = ivas_split_rend_bitstream_read_int32( pBits, PRED_QUANT_FILTER_PHASE_BITS ); iBitsRead += PRED_QUANT_FILTER_PHASE_BITS; iA1Phase += PRED_QUANT_FILTER_PHASE_MIN; diff --git a/lib_rend/ivas_cldfb_codec_bitstream.c b/lib_rend/ivas_cldfb_codec_bitstream.c index 0b8126c7c545c4237f10c173bfee0ad9d8d19b7c..591f8f484df6ff693b75bdd27ef69bb6dc1cc214 100644 --- a/lib_rend/ivas_cldfb_codec_bitstream.c +++ b/lib_rend/ivas_cldfb_codec_bitstream.c @@ -39,143 +39,6 @@ #include "prot.h" #include "wmc_auto.h" - -/*------------------------------------------------------------------------------------------* - * Local ROM tables - *------------------------------------------------------------------------------------------*/ - -static const uint32_t MASKS[] = { - 0x00000000, - 0x00000001, - 0x00000003, - 0x00000007, - 0x0000000f, - 0x0000001f, - 0x0000003f, - 0x0000007f, - 0x000000ff, - 0x000001ff, - 0x000003ff, - 0x000007ff, - 0x00000fff, - 0x00001fff, - 0x00003fff, - 0x00007fff, - 0x0000ffff, - 0x0001ffff, - 0x0003ffff, - 0x0007ffff, - 0x000fffff, - 0x001fffff, - 0x003fffff, - 0x007fffff, - 0x00ffffff, - 0x01ffffff, - 0x03ffffff, - 0x07ffffff, - 0x0fffffff, - 0x1fffffff, - 0x3fffffff, - 0x7fffffff, -}; - - -/*------------------------------------------------------------------------------------------* - * Function BSPutBits() - * - * - *------------------------------------------------------------------------------------------*/ - -int32_t BSPutBits( - Bitstream *psBitstream, - int32_t iValue, - int32_t iBitCount ) -{ - iValue &= MASKS[iBitCount]; - while ( iBitCount ) - { - int32_t iByte; - int32_t iRem; - int32_t iShift; - - iByte = psBitstream->iIndex >> 3; - iRem = 8 - ( psBitstream->iIndex - ( iByte << 3 ) ); /* 8 - psBitstream->iIndex & 0x7; */ - - iShift = iBitCount - iRem; - if ( iShift <= 0 ) - { - iShift *= -1; - psBitstream->puchBuffer[iByte] += (uint8_t) ( iValue << iShift ); - psBitstream->iIndex += iBitCount; - iBitCount = 0; - } - else - { - psBitstream->puchBuffer[iByte] += (uint8_t) ( iValue >> iShift ); - iValue &= MASKS[iShift]; - psBitstream->iIndex += iRem; - iBitCount -= iRem; - } - } - - if ( psBitstream->iDirection != BS_WRITE ) - { - psBitstream->iError = BS_ERROR_FAIL; - } - - return psBitstream->iError; -} - - -/*------------------------------------------------------------------------------------------* - * Function BSGetBits() - * - * - *------------------------------------------------------------------------------------------*/ - -int32_t BSGetBits( - Bitstream *psBitstream, - int32_t iBitCount ) -{ - int32_t iValue = 0; - - while ( iBitCount ) - { - uint8_t uchByte; - int32_t iByte; - int32_t iRem; - int32_t iShift; - - iByte = psBitstream->iIndex >> 3; - iRem = 8 - ( psBitstream->iIndex - ( iByte << 3 ) ); /* 8 - psBitstream->iIndex & 0x7; */ - uchByte = psBitstream->puchBuffer[iByte]; - iShift = iBitCount - iRem; - - if ( iShift <= 0 ) - { - iShift *= -1; - iValue += (int32_t) ( ( uchByte >> iShift ) & MASKS[iBitCount] ); - psBitstream->iIndex += iBitCount; - iBitCount = 0; - } - else - { - uchByte &= MASKS[iRem]; - iValue += ( ( (int32_t) uchByte ) << iShift ); - psBitstream->iIndex += iRem; - iBitCount -= iRem; - } - } - - if ( psBitstream->iDirection != BS_READ ) - { - psBitstream->iError = BS_ERROR_FAIL; - } - - return iValue; -} - - /*------------------------------------------------------------------------------------------* * Function BSForceBack() * diff --git a/lib_rend/ivas_cldfb_codec_bitstream.h b/lib_rend/ivas_cldfb_codec_bitstream.h index 1ca49b1edab7baf37a8c15e6ad7b9eb123d3deff..0fd6d6a223b00840904841e3d99d09b3d485a669 100644 --- a/lib_rend/ivas_cldfb_codec_bitstream.h +++ b/lib_rend/ivas_cldfb_codec_bitstream.h @@ -39,40 +39,6 @@ #ifdef SPLIT_REND_WITH_HEAD_ROT -// ToDo: file can be removed if SIMPLE_PHASE is removed - -enum -{ - BS_READ, - BS_WRITE -}; - -enum -{ - BS_ERROR_NONE, - BS_ERROR_FAIL -}; - -typedef struct BITSTREAM -{ - int32_t iMaxBuffer; - int32_t iDirection; - int32_t iBufferEnd; - int32_t iBufferStart; - int32_t iIndex; - int32_t iError; - uint8_t *puchBuffer; -} Bitstream; - -int32_t BSPutBits( - Bitstream *psBitstream, - int32_t iValue, - int32_t iBitCount ); - -int32_t BSGetBits( - Bitstream *psBitstream, - int32_t iBitCount ); - int32_t BSForceBack( ivas_split_rend_bits_t *pBits, int32_t iValue, diff --git a/lib_rend/ivas_lcld_decoder.c b/lib_rend/ivas_lcld_decoder.c index ba408cb3809256ba39a1b4802e1ce4833ccae4cd..47d1e5f6013c9ba7e433fb96d7cc6f2df7590720 100644 --- a/lib_rend/ivas_lcld_decoder.c +++ b/lib_rend/ivas_lcld_decoder.c @@ -46,11 +46,8 @@ * Local constants *------------------------------------------------------------------------------------------*/ -#define DECODER_ERROR_NONE ( 0 ) // todo: not really used - #define HUFF_READ_SIZE ( 4 ) - /*------------------------------------------------------------------------------------------* * Local structures *------------------------------------------------------------------------------------------*/ @@ -114,8 +111,6 @@ struct LCLD_DECODER NoiseGen *psNoiseGen; - - int32_t iLastError; }; #ifdef ROM_TO_RAM @@ -545,9 +540,6 @@ ivas_error CreateLCLDDecoder( return error; } psLCLDDecoder->psNoiseGen = NULL; // CreateNoiseGen(); // No noise fill for now - - psLCLDDecoder->iLastError = DECODER_ERROR_NONE; - *psLCLDDecoder_out = psLCLDDecoder; return IVAS_ERR_OK; @@ -729,19 +721,6 @@ void DeleteLCLDDecoder( LCLDDecoder *psLCLDDecoder ) } } - -/*------------------------------------------------------------------------------------------* - * Function LCLDDecoderGetError() - * - * - *------------------------------------------------------------------------------------------*/ - -int32_t LCLDDecoderGetError( LCLDDecoder *psLCLDDecoder ) -{ - return psLCLDDecoder->iLastError; -} - - /*------------------------------------------------------------------------------------------* * Local function declarations * @@ -807,7 +786,7 @@ int32_t DecodeLCLDFrame( ReadRMSEnvelope( psLCLDDecoder->iChannels, (const int32_t *) psLCLDDecoder->piNumGroups, psLCLDDecoder->iNumBands, psLCLDDecoder->pppiRMSEnvelope, pBits ); #ifdef ENABLE_PMOD_ADJUST - ReadPmodInformation( psLCLDDecoder->ppiHiSMRFlags, psLCLDDecoder->psBSRead, psLCLDDecoder->iChannels, psLCLDDecoder->iNumBands ); + ReadPmodInformation( psLCLDDecoder->ppiHiSMRFlags, pBits, psLCLDDecoder->iChannels, psLCLDDecoder->iNumBands ); #endif ReadAllocInformation( &psLCLDDecoder->iAllocOffset, pBits ); @@ -1220,7 +1199,7 @@ static int32_t ReadMSInformation( #ifdef SIMPLE_PHASE for ( n = 0; n < iNumMSPredBands; n++ ) { - piLRPhaseDiffs[n] = BSGetBits( psBSRead, SIMPLE_PHASE_BITS ); + piLRPhaseDiffs[n] = ivas_split_rend_bitstream_read_int32( pBits, SIMPLE_PHASE_BITS ); iBitsRead += SIMPLE_PHASE_BITS; } #else @@ -1462,7 +1441,7 @@ static int32_t ReadRMSEnvelope( #ifdef ENABLE_PMOD_ADJUST -static int32_t ReadPmodInformation( int32_t **ppiHiSMRFlags, Bitstream *psBSRead, int32_t iChannels, int32_t iNumBands ) +static int32_t ReadPmodInformation( int32_t **ppiHiSMRFlags, ivas_split_rend_bits_t *pBits, int32_t iChannels, int32_t iNumBands ) { int32_t iBitsRead; int32_t c; @@ -1470,13 +1449,13 @@ static int32_t ReadPmodInformation( int32_t **ppiHiSMRFlags, Bitstream *psBSRead for ( c = 0; c < iChannels; c++ ) { int32_t b; - int32_t iFlags = BSGetBits( psBSRead, 1 ); + int32_t iFlags = ivas_split_rend_bitstream_read_int32( pBits, 1 ); iBitsRead += 1; if ( iFlags ) { for ( b = 0; b < iNumBands; b++ ) { - ppiHiSMRFlags[c][b] = BSGetBits( psBSRead, 1 ); + ppiHiSMRFlags[c][b] = ivas_split_rend_bitstream_read_int32( pBits, 1 ); iBitsRead += 1; } } diff --git a/lib_rend/ivas_lcld_encoder.c b/lib_rend/ivas_lcld_encoder.c index c7ae7a291fef9a5d919b423b2a59f04243ea483a..82c0438cec28bf6f9984a02188fd171fd63560e8 100644 --- a/lib_rend/ivas_lcld_encoder.c +++ b/lib_rend/ivas_lcld_encoder.c @@ -45,8 +45,6 @@ #endif #include "wmc_auto.h" -#define ENCODER_ERROR_NONE ( 0 ) // todo: not really used - /*------------------------------------------------------------------------------------------* * Local structures *------------------------------------------------------------------------------------------*/ @@ -93,7 +91,6 @@ struct LCLD_ENCODER PredictionEncoder *psPredictionEncoder; - int32_t iLastError; }; @@ -311,8 +308,6 @@ ivas_error CreateLCLDEncoder( return error; } - psLCLDEncoder->iLastError = ENCODER_ERROR_NONE; - *psLCLDEncoder_out = psLCLDEncoder; return IVAS_ERR_OK; @@ -477,19 +472,6 @@ void DeleteLCLDEncoder( return; } - -/*------------------------------------------------------------------------------------------* - * Function LCLDEncoderGetError() - * - * - *------------------------------------------------------------------------------------------*/ - -int32_t LCLDEncoderGetError( LCLDEncoder *psLCLDEncoder ) -{ - return psLCLDEncoder->iLastError; -} - - /*------------------------------------------------------------------------------------------* * Local function declarations *------------------------------------------------------------------------------------------*/ @@ -502,7 +484,7 @@ static int32_t CountLCLDBits( const int32_t iNumGroups, const int32_t *piGroupLe static int32_t WriteHeaderInformation( const int32_t iNumBands, ivas_split_rend_bits_t *pBits ); -static int32_t WritePmodInformation( const int32_t **ppiHiSMRFlags, Bitstream *psBSWrite, int32_t iChannels, int32_t iNumBands ); +static int32_t WritePmodInformation( const int32_t **ppiHiSMRFlags, ivas_split_rend_bits_t *pBits, int32_t iChannels, int32_t iNumBands ); static int32_t WriteMSInformation( const int32_t iNumBands, const int32_t iMSMode, const int32_t *piMSFlags, const int32_t *piLRPhaseDiffs, const int32_t *piMSPredCoefs, int32_t iNumMSPredBands, ivas_split_rend_bits_t *pBits ); @@ -632,7 +614,7 @@ int32_t EncodeLCLDFrame( #ifdef ENABLE_PMOD_ADJUST iBitsWritten += WritePmodInformation( psLCLDEncoder->ppiHiSMRFlags, - psLCLDEncoder->psBSWrite, + pBits, psLCLDEncoder->iChannels, psLCLDEncoder->iNumBands ); #endif @@ -1338,7 +1320,7 @@ static void QuantizeSpectrumDPCM( } } else - { // don't need // ToDo ? + { fPrevReal = 0.0; fPrevImag = 0.0; } @@ -1524,7 +1506,7 @@ static int32_t WriteMSInformation( #ifdef SIMPLE_PHASE for ( b = 0; b < iNumMSPredBands; b++ ) { - BSPutBits( psBSWrite, piLRPhaseDiff[b], SIMPLE_PHASE_BITS ); + ivas_split_rend_bitstream_write_int32( pBits, piLRPhaseDiff[b], SIMPLE_PHASE_BITS ); iBitsWritten += SIMPLE_PHASE_BITS; } #else @@ -1702,7 +1684,7 @@ static int32_t WriteRMSEnvelope( #ifdef ENABLE_PMOD_ADJUST static int32_t WritePmodInformation( const int32_t **ppiHiSMRFlags, - Bitstream *psBSWrite, + ivas_split_rend_bits_t *pBits, int32_t iChannels, int32_t iNumBands ) { @@ -1722,13 +1704,13 @@ static int32_t WritePmodInformation( break; } } - BSPutBits( psBSWrite, anyNonZero, 1 ); + ivas_split_rend_bitstream_write_int32( pBits, anyNonZero, 1 ); iBitsWritten += 1; if ( anyNonZero ) { for ( b = 0; b < iNumBands; b++ ) { - BSPutBits( psBSWrite, flags[b], 1 ); + ivas_split_rend_bitstream_write_int32( pBits, flags[b], 1 ); iBitsWritten += 1; } } diff --git a/lib_rend/ivas_lcld_prot.h b/lib_rend/ivas_lcld_prot.h index 2d60f127dc6222353c1801a17f098eacabf3137d..fa92e1be5ddd851e479362aebba7bbd115baf89c 100644 --- a/lib_rend/ivas_lcld_prot.h +++ b/lib_rend/ivas_lcld_prot.h @@ -51,9 +51,6 @@ ivas_error CreateLCLDEncoder( void DeleteLCLDEncoder( LCLDEncoder *psLCLDEncoder ); -int32_t LCLDEncoderGetError( - LCLDEncoder *psLCLDEncoder ); - int32_t EncodeLCLDFrame( LCLDEncoder *psLCLDEncoder, float ***pppfLCLDReal, @@ -76,9 +73,6 @@ ivas_error CreateLCLDDecoder( void DeleteLCLDDecoder( LCLDDecoder *psLCLDDecoder ); -int32_t LCLDDecoderGetError( - LCLDDecoder *psLCLDDecoder ); - int32_t DecodeLCLDFrame( LCLDDecoder *psLCLDDecoder, ivas_split_rend_bits_t *pBits, @@ -99,6 +93,7 @@ void cplxmult( float r2, float i2 ); +#ifdef SIMPLE_PHASE void rot_pm_pi( float *pr, float *pi ); @@ -111,6 +106,11 @@ void rot_m_pi_2( float *pr, float *pi ); +void rot_zero( + float *pr, + float *pi ); +#endif + int32_t requantPhase( int32_t phaseQ ); diff --git a/lib_rend/ivas_splitRendererPost.c b/lib_rend/ivas_splitRendererPost.c index 5d545b4156870e2b93c70a9d60d6a6ee95384a83..042f34d9e065e2d7983d841ad9ecc475f94815c3 100644 --- a/lib_rend/ivas_splitRendererPost.c +++ b/lib_rend/ivas_splitRendererPost.c @@ -244,41 +244,6 @@ static int16_t ivas_split_rend_huffman_decode_opt( return (int16_t) ind; } - -/*-----------------------------------------------------------------------------------------* - * Function ivas_split_rend_huffman_decode() - * - * - *-----------------------------------------------------------------------------------------*/ -// ToDo: unused function -static int16_t ivas_split_rend_huffman_decode( - ivas_split_rend_huffman_cfg_t *huff_cfg, - ivas_split_rend_bits_t *pBits ) -{ - int32_t code, bit, num_bits_read, ind; - - code = ivas_split_rend_bitstream_read_int32( pBits, huff_cfg->min_len ); - num_bits_read = huff_cfg->min_len; - - ind = ivas_split_rend_huffman_code_bits_present( huff_cfg->codebook, code, num_bits_read, huff_cfg->sym_len ); - - while ( ind > huff_cfg->sym_len ) - { - bit = ivas_split_rend_bitstream_read_int32( pBits, 1 ); - num_bits_read += 1; - code = code << 1 | bit; - ind = ivas_split_rend_huffman_code_bits_present( huff_cfg->codebook, code, num_bits_read, huff_cfg->sym_len ); - - if ( num_bits_read > huff_cfg->max_len ) - { - assert( 0 ); - } - } - - return (int16_t) ind; -} - - static void ivas_split_rend_unquant_md( BIN_HR_SPLIT_REND_MD_HANDLE hMd, IVAS_SPLIT_REND_POSE_TYPE pose_type,