Commit 09e00d58 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'main' into '844-crash-in-mdct-core-decoder-for-bitrate-switching'

# Conflicts:
#   lib_com/options.h
parents dbad7a2e e3439979
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2218,7 +2218,7 @@ static UWord16 deindex_sph_idx_general_fx(

    IF( GE_32( *theta_dec_fx, 90 << Q22 ) )
    {
        *theta_dec_fx = 90 << 22 * sign_theta;
        *theta_dec_fx = ( 90 << 22 ) * sign_theta;
        move32();
        *phi_dec_fx = 0;
        move32();
+6 −1
Original line number Diff line number Diff line
@@ -1412,7 +1412,12 @@ void stereo_icBWE_dec_fx(
    const Word16 *fb_synth_ref_fx,  /* i  : ref. high-band synthesis 16-20 kHz              */
    const Word16 *voice_factors_fx, /* i  : voicing factors                                 */
    const Word16 output_frame,      /* i  : frame length                                    */
    Word16 *Q_syn );
    Word16 *Q_syn
#ifdef FIX_839_FB_CONTENT_SOMETIME_MISSING
    ,
    const Word16 Q_white_exc /* i  : Q of fb_synth_ref_fx                 */
#endif
);

void decoder_tcx_tns_fx(
    Decoder_State *st,         /* i/o: coder memory state                      */
+1 −0
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@
#endif
#define NONE_BE_FIX_816_LFE_PLC_FLOAT                   /* DLB: issue 816: reduce required precision to float for LFE-PLC*/
#define FIX_844_Q_SYN_INIT                          /* VA : proposed fix to 844, initializing q_old_synth when switching to MDCT*/
#define FIX_839_FB_CONTENT_SOMETIME_MISSING     /* VA : Fix scaling error for FB TB BWE */
/* ################## End DEVELOPMENT switches ######################### */

/* clang-format on */
+7 −1
Original line number Diff line number Diff line
@@ -1694,6 +1694,13 @@ ivas_error core_switching_post_dec_ivas_fx(
            }
            /* delay HQ synthesis to synchronize with ACELP synthesis */
            /* rescaling to the min exp of the 2 */
            if ( hHQ_core->Q_old_postdec )
            {
                Scale_sig( st_fx->delay_buf_out_fx, delay_comp, negate( hHQ_core->Q_old_postdec ) );
            }

            hHQ_core->Q_old_postdec = 0;
            move16();
            Qtmp = s_min( *Qsynth, hHQ_core->Q_old_postdec );
            Scale_sig( synth, output_frame, sub( Qtmp, *Qsynth ) );
            *Qsynth = Qtmp;
@@ -1816,7 +1823,6 @@ ivas_error core_switching_post_dec_ivas_fx(
                    L_tmp2 = L_mac0( L_tmp2, div_s( sub( tmpDelta, i ), tmpDelta ), tmp );
                    L_tmp2 = L_shl( L_tmp2, 1 );
                    synth[i + delay_comp] = round_fx( L_add( L_tmp, L_tmp2 ) );
                    move16();
                }
                test();
                test();
+5 −1
Original line number Diff line number Diff line
@@ -1256,8 +1256,12 @@ ivas_error ivas_core_dec_fx(
                hCPE->hStereoDft->td_gain_fx[0] = 1;
                move32();
            }
            Scale_sig( tmp_buffer_fx, L_FRAME48k, sub( Q11, Q_white_exc ) );
#ifndef FIX_839_FB_CONTENT_SOMETIME_MISSING
            Scale_sig( tmp_buffer_fx, L_FRAME48k, sub( Q11, Q_white_exc ) ); // for small value, this was just mostly p
            stereo_icBWE_dec_fx( hCPE, hb_synth_32_fx[0], hb_synth_32_fx[1], tmp_buffer_fx /*fb_synth_ref*/, voice_factors_fx[0], output_frame, &q );
#else
            stereo_icBWE_dec_fx( hCPE, hb_synth_32_fx[0], hb_synth_32_fx[1], tmp_buffer_fx /*fb_synth_ref*/, voice_factors_fx[0], output_frame, &q, Q_white_exc );
#endif
#ifdef MSAN_FIX
            test();
            test();
Loading