From f19a0f43300bcce7eeeaae97b274e3e9ea1d5dc0 Mon Sep 17 00:00:00 2001 From: Ke Zhao Date: Wed, 23 Aug 2023 13:22:13 +1000 Subject: [PATCH] Remove some deactivated #if 0 code --- lib_debug/sba_debug.c | 12 +----------- lib_rend/ivas_PredEncoder.c | 27 +-------------------------- lib_rend/ivas_splitRend_lcld_enc.c | 7 ------- lib_rend/ivas_splitRenderer_utils.c | 7 ------- 4 files changed, 2 insertions(+), 51 deletions(-) diff --git a/lib_debug/sba_debug.c b/lib_debug/sba_debug.c index 73bb630b5f..de4b549aac 100644 --- a/lib_debug/sba_debug.c +++ b/lib_debug/sba_debug.c @@ -202,16 +202,6 @@ void ivas_spar_dump_signal_wav( { for ( i = 0; i < no_channel; i++, k++ ) { -#if 0 - if ( ppPcm ) - { - tmp_value = roundf( ppPcm[i][j] * PCM16_TO_FLT_FAC ); - } - else - { - tmp_value = roundf( pcm_array[i][j] * PCM16_TO_FLT_FAC ); - } -#else if ( ppPcm ) { tmp_value = roundf( ppPcm[i][j] ); @@ -220,7 +210,7 @@ void ivas_spar_dump_signal_wav( { tmp_value = roundf( pcm_array[i][j] ); } -#endif + if ( tmp_value > MAX16B_FLT ) { largest_value = (float) fabs( tmp_value ) > largest_value ? (float) fabs( tmp_value ) : largest_value; diff --git a/lib_rend/ivas_PredEncoder.c b/lib_rend/ivas_PredEncoder.c index 59aa58129e..280ea6de64 100644 --- a/lib_rend/ivas_PredEncoder.c +++ b/lib_rend/ivas_PredEncoder.c @@ -338,31 +338,7 @@ int32_t ComputePredictors( psPredictionEncoder->ppiA1Mag[c][b] = iA1Mag; psPredictionEncoder->ppiA1Phase[c][b] = iA1Phase; } -#if 0 - // Estimate if the savings outway the signaling cost - if(fChanPredictionGainBits > 1e20){//}(float)(psPredictionEncoder->piNumPredBands[c] + 6)){ - psPredictionEncoder->piPredChanEnable[c] = 1; - //printf("Prediction Enabled\n"); - iPredictionBits += 1; - iPredictionBits += 6; - for(b = 0; b < psPredictionEncoder->piNumPredBands[c]; b ++){ - iPredictionBits += 1; - if(psPredictionEncoder->ppiPredBandEnable[c][b] == 1){ - iPredictionBits += (PRED_QUANT_FILTER_BITS * 2); - printf("%f, ",(psPredictionEncoder->ppfEstPredGain[c][b])); - } - } - printf("\n"); - } - else{ - psPredictionEncoder->piPredChanEnable[c] = 0; - for(b = 0; b < psPredictionEncoder->piNumPredBands[c]; b ++){ - psPredictionEncoder->ppiPredBandEnable[c][b] = 0; - } - //printf("Prediction Disabled\n"); - iPredictionBits += 1; - } -#else + { /*int32_t iDone; int32_t iPredBands; @@ -446,7 +422,6 @@ int32_t ComputePredictors( psPredictionEncoder->piNumPredBands[c] = 0; } } -#endif } return iPredictionBits; diff --git a/lib_rend/ivas_splitRend_lcld_enc.c b/lib_rend/ivas_splitRend_lcld_enc.c index c243a2af9c..0a4090a480 100644 --- a/lib_rend/ivas_splitRend_lcld_enc.c +++ b/lib_rend/ivas_splitRend_lcld_enc.c @@ -185,17 +185,10 @@ void ivas_splitBinLCLDEncProcess( { for ( int16_t n = 0; n < hSplitBinLCLDEnc->iChannels; n++ ) { -#if 0 - readByte = fread(&hSplitBinLCLDEnc->pppfLCLDReal[n][k][b], sizeof(float), 1, hSplitBinLCLDEnc->cldfbIn); - if ( readByte != 1 ) - break; - readByte = fread(&hSplitBinLCLDEnc->pppfLCLDImag[n][k][b], sizeof(float), 1, hSplitBinLCLDEnc->cldfbIn); -#else readByte = fread( &Cldfb_In_Real[n][k][b], sizeof( float ), 1, hSplitBinLCLDEnc->cldfbIn ); if ( readByte != 1 ) break; readByte = fread( &Cldfb_In_Imag[n][k][b], sizeof( float ), 1, hSplitBinLCLDEnc->cldfbIn ); -#endif } } } diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 6330962fce..a25e0124bb 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -399,15 +399,8 @@ int32_t ivas_split_rend_bitstream_read_int32( val = 0; for ( k = bits - 1; k >= 0; k-- ) { -#if 0 - if ( pBits->bits_buf[pBits->bits_read >> 3] & ( 1 << ( pBits->bits_read & 7 ) ) ) - { - val |= 1 << k; - } -#else bit_val = ( pBits->bits_buf[pBits->bits_read >> 3] & ( 1 << ( pBits->bits_read & 7 ) ) ) != 0; val |= bit_val << k; -#endif pBits->bits_read++; } -- GitLab