Loading lib_enc/hvq_enc_fx.c +12 −2 Original line number Diff line number Diff line Loading @@ -113,7 +113,11 @@ Word16 hvq_enc_fx( /*o : Consumed bits nf_cnt = add(nf_cnt, 1); /* Q0 */ } #ifdef BASOP_NOGLOB pe_mean = L_add_o(pe_mean, pe, &Overflow); /* in Q12 and always positive */ #else pe_mean = L_add(pe_mean, pe); /* in Q12 and always positive */ #endif } IF (pe_mean > 0) Loading Loading @@ -141,8 +145,11 @@ Word16 hvq_enc_fx( /*o : Consumed bits expNfpe3 = extract_l(L_mult0(expNfpe, 3)); /* Cube operation */ /* Number of bits required to adjust to Q15 */ adjust = add(19 - (15 + 16), expNfpe3); /* +16 is due to the following extract_h(). */ #ifdef BASOP_NOGLOB noise_level[i] = extract_h(L_shr_o(acc, adjust, &Overflow)); /* noise_level[] in Q15 */ #else noise_level[i] = extract_h(L_shr(acc, adjust)); /* noise_level[] in Q15 */ #endif q_noise_level_idx[i] = quant_lc( noise_level[i], &q_noise_level[i] ); } ELSE Loading Loading @@ -170,8 +177,11 @@ Word16 hvq_enc_fx( /*o : Consumed bits expo3 = extract_l(L_mult0(expo, 3)); /* Cube operation. */ /* Number of bits required to adjust to Q15 */ adjust = add(22 - (15 + 16), expo3); /* +16 is due to the following extract_h(). */ #ifdef BASOP_NOGLOB lb_nfpe = extract_h(L_shr_o(acc, adjust, &Overflow)); /* noise_level[] in Q15 */ #else lb_nfpe = extract_h(L_shr(acc, adjust)); /* noise_level[] in Q15 */ #endif IF( lb_nfpe > 16384 ) /* in Q15 */ { lb_nfpe = 16384; Loading lib_enc/mdct_classifier_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -405,9 +405,15 @@ Word16 mdct_classifier_fx( /* o: MDCT A/B decision test(); test(); test(); #ifdef BASOP_NOGLOB IF (GT_32(Mult_32_16(gain3, 27307), gain2)||(GE_32(gain3,Mult_32_16(gain2,26214))&>_32(peak_H1,L_shl_o(avrg_H1,1, &Overflow))) || (LT_32(Mult_32_32(L_shl_o(peak_l, exp, &Overflow), L_shl_o(avrg_h, exp1, &Overflow)), Mult_32_32(L_shl_o(L_tmp, exp, &Overflow), L_shl_o(avrg_l, exp1, &Overflow))) || GT_32(Mult_32_32(L_shl_o(L_tmp1, exp2, &Overflow), L_shl_o(avrg_h, exp1, &Overflow)), Mult_32_32(L_shl_o(peak_h, exp2, &Overflow), L_shl_o(avrg_l, exp1, &Overflow))))) #else IF (GT_32(Mult_32_16(gain3, 27307), gain2)||(GE_32(gain3,Mult_32_16(gain2,26214))&>_32(peak_H1,L_shl(avrg_H1,1))) || (LT_32(Mult_32_32(L_shl(peak_l, exp), L_shl(avrg_h, exp1)), Mult_32_32(L_shl(L_tmp, exp), L_shl(avrg_l, exp1))) || GT_32(Mult_32_32(L_shl(L_tmp1, exp2), L_shl(avrg_h, exp1)), Mult_32_32(L_shl(peak_h, exp2), L_shl(avrg_l, exp1))))) #endif { condition3 = 1; move16(); Loading Loading
lib_enc/hvq_enc_fx.c +12 −2 Original line number Diff line number Diff line Loading @@ -113,7 +113,11 @@ Word16 hvq_enc_fx( /*o : Consumed bits nf_cnt = add(nf_cnt, 1); /* Q0 */ } #ifdef BASOP_NOGLOB pe_mean = L_add_o(pe_mean, pe, &Overflow); /* in Q12 and always positive */ #else pe_mean = L_add(pe_mean, pe); /* in Q12 and always positive */ #endif } IF (pe_mean > 0) Loading Loading @@ -141,8 +145,11 @@ Word16 hvq_enc_fx( /*o : Consumed bits expNfpe3 = extract_l(L_mult0(expNfpe, 3)); /* Cube operation */ /* Number of bits required to adjust to Q15 */ adjust = add(19 - (15 + 16), expNfpe3); /* +16 is due to the following extract_h(). */ #ifdef BASOP_NOGLOB noise_level[i] = extract_h(L_shr_o(acc, adjust, &Overflow)); /* noise_level[] in Q15 */ #else noise_level[i] = extract_h(L_shr(acc, adjust)); /* noise_level[] in Q15 */ #endif q_noise_level_idx[i] = quant_lc( noise_level[i], &q_noise_level[i] ); } ELSE Loading Loading @@ -170,8 +177,11 @@ Word16 hvq_enc_fx( /*o : Consumed bits expo3 = extract_l(L_mult0(expo, 3)); /* Cube operation. */ /* Number of bits required to adjust to Q15 */ adjust = add(22 - (15 + 16), expo3); /* +16 is due to the following extract_h(). */ #ifdef BASOP_NOGLOB lb_nfpe = extract_h(L_shr_o(acc, adjust, &Overflow)); /* noise_level[] in Q15 */ #else lb_nfpe = extract_h(L_shr(acc, adjust)); /* noise_level[] in Q15 */ #endif IF( lb_nfpe > 16384 ) /* in Q15 */ { lb_nfpe = 16384; Loading
lib_enc/mdct_classifier_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -405,9 +405,15 @@ Word16 mdct_classifier_fx( /* o: MDCT A/B decision test(); test(); test(); #ifdef BASOP_NOGLOB IF (GT_32(Mult_32_16(gain3, 27307), gain2)||(GE_32(gain3,Mult_32_16(gain2,26214))&>_32(peak_H1,L_shl_o(avrg_H1,1, &Overflow))) || (LT_32(Mult_32_32(L_shl_o(peak_l, exp, &Overflow), L_shl_o(avrg_h, exp1, &Overflow)), Mult_32_32(L_shl_o(L_tmp, exp, &Overflow), L_shl_o(avrg_l, exp1, &Overflow))) || GT_32(Mult_32_32(L_shl_o(L_tmp1, exp2, &Overflow), L_shl_o(avrg_h, exp1, &Overflow)), Mult_32_32(L_shl_o(peak_h, exp2, &Overflow), L_shl_o(avrg_l, exp1, &Overflow))))) #else IF (GT_32(Mult_32_16(gain3, 27307), gain2)||(GE_32(gain3,Mult_32_16(gain2,26214))&>_32(peak_H1,L_shl(avrg_H1,1))) || (LT_32(Mult_32_32(L_shl(peak_l, exp), L_shl(avrg_h, exp1)), Mult_32_32(L_shl(L_tmp, exp), L_shl(avrg_l, exp1))) || GT_32(Mult_32_32(L_shl(L_tmp1, exp2), L_shl(avrg_h, exp1)), Mult_32_32(L_shl(peak_h, exp2), L_shl(avrg_l, exp1))))) #endif { condition3 = 1; move16(); Loading