Commit 27ed4d5c authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Q update in mct core dec

parent 9332ccde
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -300,14 +300,22 @@ void ivas_mct_core_dec(
                        /* mono or dual mono IGF decoding */
                        x_e = sub( 31, q_x[ch] );
                        decoder_tcx_IGF_mono_fx( st, x_fx[ch][k], &x_e, &x_len, L_frame, left_rect, bfi, k );
#ifdef OPT_SBA_DEC_V2_NBE
                        q_x[ch] = sub( 31 - 11, x_e ); // Shift to bring x to Q12
#else                                                  /* OPT_SBA_DEC_V2_NBE */
                        q_x[ch] = sub( 31 - 12, x_e ); // Shift to bring x to Q12
#endif                                                 /* OPT_SBA_DEC_V2_NBE */
                        move16();
                        FOR( i = 0; i < x_len; i++ )
                        {
                            x_fx[ch][k][i] = L_shr( x_fx[ch][k][i], q_x[ch] );
                            move32();
                        }
#ifdef OPT_SBA_DEC_V2_NBE
                        q_x[ch] = Q11;
#else  /* OPT_SBA_DEC_V2_NBE */
                        q_x[ch] = Q12;
#endif /* OPT_SBA_DEC_V2_NBE */
                        move16();
                    }
                }
@@ -325,14 +333,22 @@ void ivas_mct_core_dec(
                        /* mono or dual mono IGF decoding */
                        x_e = sub( 31, q_x[ch] );
                        decoder_tcx_IGF_mono_fx( st, x_fx[ch][0], &x_e, &x_len, L_frame, left_rect, bfi, 0 );
#ifdef OPT_SBA_DEC_V2_NBE
                        q_x[ch] = sub( 31 - 11, x_e ); // Shift to bring x to Q12
#else                                                  /* OPT_SBA_DEC_V2_NBE */
                        q_x[ch] = sub( 31 - 12, x_e ); // Shift to bring x to Q12
#endif                                                 /* OPT_SBA_DEC_V2_NBE */
                        move16();
                        FOR( i = 0; i < x_len; i++ )
                        {
                            x_fx[ch][0][i] = L_shr( x_fx[ch][0][i], q_x[ch] );
                            move32();
                        }
#ifdef OPT_SBA_DEC_V2_NBE
                        q_x[ch] = Q11;
#else  /* OPT_SBA_DEC_V2_NBE */
                        q_x[ch] = Q12;
#endif /* OPT_SBA_DEC_V2_NBE */
                        move16();
                    }
                }