Commit c4cf1d2d authored by vaclav's avatar vaclav
Browse files

fix waveform adjustment decoder PLC; under NONBE_FIX_1402_WAVEADJUST

parent c9fc1150
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -172,4 +172,5 @@
#define DOT_PROD_CHOLESKY_64BIT                 /* FhG: Issue 1323, optimized 64 bit implementation of dot_product_cholesky() */
#define OPT_BASOP_ADD_v1                        /* optimizations to avoid usage of BASOP_Util_Add_MantExp */
#define FIX_ISSUE_1327                          /* Ittiam: Fix for issue 1327: Glitch when stereo is switching from TD to FD*/
#define NONBE_FIX_1402_WAVEADJUST               /* VA: BASOP iisue 1402: fix waveform adjustment decoder PLC */
#endif
+4 −0
Original line number Diff line number Diff line
@@ -4410,7 +4410,11 @@ void decoder_tcx_noisefilling_fx(
        /* get the starting location of the subframe in the frame */
        IF( EQ_16( st->core, TCX_10_CORE ) )
        {
#ifdef NONBE_FIX_1402_WAVEADJUST
            st->hPlcInfo->subframe_fx = extract_l( L_mult0( frame_cnt, L_frameTCX_glob ) );
#else
            st->hPlcInfo->subframe = extract_l( L_mult0( frame_cnt, L_frameTCX_glob ) );
#endif
            move16();
        }
    }
+4 −1
Original line number Diff line number Diff line
@@ -1329,8 +1329,11 @@ ivas_error ivas_core_dec_fx(
                waveform_adj2_fix( st->hTonalMDCTConc->secondLastPcmOut, synth_16_fx[n] + tmps, st->plcInfo.data_noise, &st->plcInfo.outx_new_n1_fx,
                                   &st->plcInfo.nsapp_gain_fx, &st->plcInfo.nsapp_gain_n_fx, &st->plcInfo.recovery_gain, st->plcInfo.step_concealgain_fx,
                                   st->plcInfo.Pitch_fx, st->plcInfo.FrameSize, tmps, add( st->hPlcInfo->nbLostCmpt, 1 ), st->bfi );

#ifdef NONBE_FIX_1402_WAVEADJUST
                st->hPlcInfo->Pitch_fx = 0;
#else
                st->hPlcInfo->Pitch = 0;
#endif
                move16();
            }
        }
+8 −0
Original line number Diff line number Diff line
@@ -644,13 +644,21 @@ void stereo_tcx_core_dec_fx(
            test();
            test();
            test();
#ifdef NONBE_FIX_1402_WAVEADJUST
            IF( ( bfi || st->prev_bfi ) && st->hPlcInfo->Pitch_fx && EQ_16( st->hPlcInfo->concealment_method, TCX_NONTONAL ) )
#else
            IF( ( bfi || st->prev_bfi ) && st->hPlcInfo->Pitch && EQ_16( st->hPlcInfo->concealment_method, TCX_NONTONAL ) )
#endif
            {
                lerp( synthFB_fx, synth_fx, st->L_frame, hTcxDec->L_frameTCX );

                if ( !bfi && st->prev_bfi )
                {
#ifdef NONBE_FIX_1402_WAVEADJUST
                    st->hPlcInfo->Pitch_fx = 0;
#else
                    st->hPlcInfo->Pitch = 0;
#endif
                    move16();
                }
            }
+8 −1
Original line number Diff line number Diff line
@@ -176,10 +176,13 @@ typedef struct
    Word16 L_frameTCX;
    Word16 FrameSize;

#ifndef NONBE_FIX_1402_WAVEADJUST
    Word16 Pitch;
#endif
    Word16 Pitch_fx;

#ifndef NONBE_FIX_1402_WAVEADJUST
    Word16 T_bfi;
#endif
    Word8 T_bfi_fx;

    Word16 Transient[MAX_POST_LEN];
@@ -194,14 +197,18 @@ typedef struct
    Word32 ener_mean_fx;
    Word32 ener_fx;

#ifndef NONBE_FIX_1402_WAVEADJUST
    Word16 zp;
#endif
    Word16 zp_fx;
    Word16 recovery_gain; /*outside waveformadjustment: Q14 - insinde waveformadjustment: Q15*/
    Word16 step_concealgain_fx;

    Word16 concealment_method;

#ifndef NONBE_FIX_1402_WAVEADJUST
    Word16 subframe;
#endif
    Word16 subframe_fx;

    Word16 nbLostCmpt;
Loading