Commit 34de2668 authored by vaclav's avatar vaclav
Browse files

Merge branch 'basop-2296-ivas_jbm_dec_tc-remove-unused-code' into 'main'

Resolve "ivas_jbm_dec_tc(): remove unused code" and unify code around ivas_sba_dirac_stereo_dec_fx()

See merge request !2678
parents 96b0b8c3 89f1f3f5
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1570,8 +1570,11 @@ void decoder_tcx_imdct_fx(
void ivas_sba_dirac_stereo_dec_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    Word32 *output[CPE_CHANNELS],                               /* i/o: output synthesis signal                 */
    const Word16 output_frame,                                  /* i  : output frame length per channel         */
    const Word16 output_frame                                   /* i  : output frame length per channel         */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    const Word16 mcmasa                                         /* i  : McMASA flag                             */
#endif
);

ivas_error ivas_osba_render_sf_fx(
@@ -4268,8 +4271,11 @@ void ivas_ism_coh_estim_dtx_enc_fx(
void ivas_ism_dtx_limit_noise_energy_for_near_silence_fx(
    SCE_DEC_HANDLE hSCE[],                                      /* i/o: SCE decoder structures                      */
    const Word16 sce_id_dtx,                                    /* i  : SCE DTX ID                                  */
    const Word16 nchan_transport,                               /* i  : number of transport channels                */
    const Word16 nchan_transport                                /* i  : number of transport channels                */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    Word16 *Q_cngNoiseLevel 
#endif
);

ivas_error stereo_dft_enc_create_fx(
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@
#define FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE          /* Dolby: Fix for issue 1479, MSAN error due to uninitialized value in SPAR */
#define HARM_LSF_ENC                                    /* VA: basop issue 2301: Remove duplicated code in LSF quantizer */
#define CLEANUP_HQ_CORE                                 /* VA: basop issue 2300: Remove unused code in core-coder: HQ core */

#define REMOVE_UNUSED_CODE_IVAS_DEC                     /* VA: remove unused code in ivas_jbm_dec_tc_fx() */
#define FIX_2294_CLANG_18_WARNINGS_ENC                  /* VA: Fix some encoder clang-18 warnings, desc. in 2294 */

/* #################### End BE switches ################################## */
+28 −4
Original line number Diff line number Diff line
@@ -158,16 +158,40 @@ void ivas_ism_dtx_dec_fx(
 * for DTX frames where the energy of the sent noise estimate of the dominant object
 * is near silence, limit the other objects CNG energies to the same level
 *-------------------------------------------------------------------*/

void ivas_ism_dtx_limit_noise_energy_for_near_silence_fx(
    SCE_DEC_HANDLE hSCE[],       /* i/o: SCE decoder structures          */
    const Word16 sce_id_dtx,     /* i  : SCE DTX ID                      */
    const Word16 nchan_transport, /* i  : number of transport channels    */
    const Word16 nchan_transport /* i  : number of transport channels    */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    Word16 *Q_cngNoiseLevel /* i  : stores Q factor of hFdCngCom->cngNoiseLevel for various channels*/
#endif
)
{
    Word32 fac_fx, cng_noise_nrg_obj_fx, cng_noise_nrg_dominant_fx;
    Word16 ch, cng_noise_level_len, Q_cng_noise_nrg_dominant, exp;
    HANDLE_FD_CNG_COM hFdCngCom;
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    Word16 Q_cngNoiseLevel[MAX_SCE];

    FOR( ch = 0; ch < nchan_transport; ch++ )
    {
        IF( hSCE[ch] != NULL )
        {
            Word16 shift = getScaleFactor32( hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN );
            if ( LT_16( sub( hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift ), 4 ) )
            {
                shift = sub( hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, 4 );
            }
            scale_sig32( hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN, shift ); // Q(31-(cngNoiseLevelExp -shift) )
            hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp = sub( hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift );
            Q_cngNoiseLevel[ch] = sub( 31, hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp );
            move16();
            move16();
        }
    }
#endif

    hFdCngCom = hSCE[sce_id_dtx]->hCoreCoder[0]->hFdCngDec->hFdCngCom;
    cng_noise_level_len = sub( hFdCngCom->stopFFTbin, hFdCngCom->startBand );
+323 −215

File changed.

Preview size limit exceeded, changes collapsed.

+310 −5

File changed.

Preview size limit exceeded, changes collapsed.