Commit a8778a8d authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for 3GPP issue 1381: High MLD around 15, audible differences (0 to 1s) at MC 160 kbps, 48 khz

Link #1381
parent be68a0d9
Loading
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -445,13 +445,21 @@ ivas_error ivas_core_enc_fx(
                        move16();
                    }

                    Scale_sig( st->input_fx, input_frame, negate( st->q_inp ) );                // Q0
                    Scale_sig( st->old_input_signal_fx, input_frame, negate( st->q_old_inp ) ); // Q0
                    test();
                    test();
                    test();
                    test();
                    test();
                    IF( ( st->q_old_inp < 0 && st->q_inp < 0 && norm_arr( st->input_fx, input_frame ) && norm_arr( st->old_input_signal_fx, input_frame ) ) || ( st->q_old_inp > 0 && st->q_inp > 0 ) )
                    {
                        scale_sig( st->input_fx, input_frame, negate( st->q_inp ) );                // Q0
                        scale_sig( st->old_input_signal_fx, input_frame, negate( st->q_old_inp ) ); // Q0
                        st->q_old_inp = 0;
                        move16();
                        st->q_inp = 0;
                        move16();
                    }
                }
                Word16 Q_spec_old[2], L_spec;
                Q_spec_old[0] = hCPE->hCoreCoder[0]->hTcxEnc->spectrum_long_e;
                move16();