@@ -290,7 +290,7 @@ void oaci_anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collaps
290290 N0 = m -> eBands [i + 1 ] - m -> eBands [i ];
291291 /* depth in 1/8 bits */
292292 celt_sig_assert (pulses [i ] >= 0 );
293- depth = celt_udiv (1 + pulses [i ], (m -> eBands [i + 1 ] - m -> eBands [i ]))>>LM ;
293+ depth = oaci_celt_udiv (1 + pulses [i ], (m -> eBands [i + 1 ] - m -> eBands [i ]))>>LM ;
294294
295295#ifdef FIXED_POINT
296296 thresh32 = SHR32 (oaci_celt_exp2 (- SHL16 (depth , 10 - BITRES )), 1 );
@@ -508,7 +508,7 @@ int oaci_spreading_decision(const CELTMode *m, const celt_norm *X, int *average,
508508
509509 /* Only include four last bands (8 kHz and up) */
510510 if (i > m -> nbEBands - 4 )
511- hf_sum += celt_udiv (32 * (tcount [1 ] + tcount [0 ]), N );
511+ hf_sum += oaci_celt_udiv (32 * (tcount [1 ] + tcount [0 ]), N );
512512 tmp = (2 * tcount [2 ] >= N ) + (2 * tcount [1 ] >= N ) + (2 * tcount [0 ] >= N );
513513 sum += tmp * spread_weight [i ];
514514 nbBands += spread_weight [i ];
@@ -517,7 +517,7 @@ int oaci_spreading_decision(const CELTMode *m, const celt_norm *X, int *average,
517517
518518 if (update_hf ) {
519519 if (hf_sum )
520- hf_sum = celt_udiv (hf_sum , C * (4 - m -> nbEBands + end ));
520+ hf_sum = oaci_celt_udiv (hf_sum , C * (4 - m -> nbEBands + end ));
521521 * hf_average = (* hf_average + hf_sum )>>1 ;
522522 hf_sum = * hf_average ;
523523 if (* tapset_decision == 2 )
@@ -534,7 +534,7 @@ int oaci_spreading_decision(const CELTMode *m, const celt_norm *X, int *average,
534534 /*printf("%d %d %d\n", hf_sum, *hf_average, *tapset_decision);*/
535535 celt_assert (nbBands > 0 ); /* end has to be non-zero */
536536 celt_assert (sum >= 0 );
537- sum = celt_udiv ((oac_int32 )sum <<8 , nbBands );
537+ sum = oaci_celt_udiv ((oac_int32 )sum <<8 , nbBands );
538538 /* Recursive averaging */
539539 sum = (sum + * average )>>1 ;
540540 * average = sum ;
@@ -634,7 +634,7 @@ static int oaci_compute_qn(int N, int b, int offset, int pulse_cap, int stereo)
634634 /* The upper limit ensures that in a stereo split with itheta==16384, we'll
635635 always have enough bits left over to code at least one pulse in the
636636 side; otherwise it would collapse, since it doesn't get folded. */
637- qb = celt_sudiv (b + N2 * offset , N2 );
637+ qb = oaci_celt_sudiv (b + N2 * offset , N2 );
638638 qb = IMIN (b - pulse_cap - (4 <<BITRES ), qb );
639639
640640 qb = IMIN (8 <<BITRES , qb );
@@ -727,7 +727,7 @@ static void oaci_compute_theta(struct band_ctx *ctx, struct split_ctx *sctx,
727727 /* Check if the selected value of theta will cause the bit allocation
728728 to inject noise on one side. If so, make sure the energy of that side
729729 is zero. */
730- int unquantized = celt_udiv ((oac_int32 )itheta * 16384 , qn );
730+ int unquantized = oaci_celt_udiv ((oac_int32 )itheta * 16384 , qn );
731731 imid = oaci_bitexact_cos ((oac_int16 )unquantized );
732732 iside = oaci_bitexact_cos ((oac_int16 )(16384 - unquantized ));
733733 delta = FRAC_MUL16 ((N - 1 )<<7 , oaci_bitexact_log2tan (iside , imid ));
@@ -806,7 +806,7 @@ static void oaci_compute_theta(struct band_ctx *ctx, struct split_ctx *sctx,
806806 }
807807 }
808808 celt_assert (itheta >= 0 );
809- itheta = celt_udiv ((oac_int32 )itheta * 16384 , qn );
809+ itheta = oaci_celt_udiv ((oac_int32 )itheta * 16384 , qn );
810810 itheta_q30 = (oac_int32 )itheta <<16 ;
811811 if (encode && stereo ) {
812812 if (itheta == 0 )
@@ -954,8 +954,8 @@ static unsigned oaci_quant_partition(struct band_ctx *ctx, celt_norm *X,
954954 mid = oaci_celt_cos_norm32 (sctx .itheta_q30 );
955955 side = oaci_celt_cos_norm32 ((1 <<30 ) - sctx .itheta_q30 );
956956#else
957- mid = celt_cos_norm2 (sctx .itheta_q30 * (1.f /(1 <<30 )));
958- side = celt_cos_norm2 (1.f - sctx .itheta_q30 * (1.f /(1 <<30 )));
957+ mid = oaci_celt_cos_norm2 (sctx .itheta_q30 * (1.f /(1 <<30 )));
958+ side = oaci_celt_cos_norm2 (1.f - sctx .itheta_q30 * (1.f /(1 <<30 )));
959959#endif
960960
961961 /* Give more bits to low-energy MDCTs than they would otherwise deserve */
@@ -1103,8 +1103,8 @@ unsigned oaci_cubic_quant_partition(struct band_ctx *ctx, celt_norm *X, int N, i
11031103 g1 = oaci_celt_cos_norm32 (itheta_q30 );
11041104 g2 = oaci_celt_cos_norm32 ((1 <<30 ) - itheta_q30 );
11051105#else
1106- g1 = celt_cos_norm2 (itheta_q30 * (1.f /(1 <<30 )));
1107- g2 = celt_cos_norm2 (1.f - itheta_q30 * (1.f /(1 <<30 )));
1106+ g1 = oaci_celt_cos_norm2 (itheta_q30 * (1.f /(1 <<30 )));
1107+ g2 = oaci_celt_cos_norm2 (1.f - itheta_q30 * (1.f /(1 <<30 )));
11081108#endif
11091109 if (itheta_q30 == 0 ) {
11101110 b1 = b ;
@@ -1144,7 +1144,7 @@ static unsigned oaci_quant_band(struct band_ctx *ctx, celt_norm *X,
11441144
11451145 longBlocks = B0 == 1 ;
11461146
1147- N_B = celt_udiv (N_B , B );
1147+ N_B = oaci_celt_udiv (N_B , B );
11481148
11491149 /* Special case for one sample */
11501150 if (N == 1 ) {
@@ -1287,8 +1287,8 @@ static unsigned oaci_quant_band_stereo(struct band_ctx *ctx, celt_norm *X, celt_
12871287 mid = oaci_celt_cos_norm32 (sctx .itheta_q30 );
12881288 side = oaci_celt_cos_norm32 ((1 <<30 ) - sctx .itheta_q30 );
12891289#else
1290- mid = celt_cos_norm2 (sctx .itheta_q30 * (1.f /(1 <<30 )));
1291- side = celt_cos_norm2 (1.f - sctx .itheta_q30 * (1.f /(1 <<30 )));
1290+ mid = oaci_celt_cos_norm2 (sctx .itheta_q30 * (1.f /(1 <<30 )));
1291+ side = oaci_celt_cos_norm2 (1.f - sctx .itheta_q30 * (1.f /(1 <<30 )));
12921292#endif
12931293
12941294 /* This is a special case for N=2 that only works for stereo and takes
@@ -1510,7 +1510,7 @@ void oaci_quant_all_bands(int encode, const CELTMode *m, int start, int end,
15101510 remaining_bits = total_bits - tell ;
15111511 ctx .total_bits = total_bits ;
15121512 if (i <= codedBands - 1 ) {
1513- curr_balance = celt_sudiv (balance , IMIN (3 , codedBands - i ));
1513+ curr_balance = oaci_celt_sudiv (balance , IMIN (3 , codedBands - i ));
15141514 b = IMAX (0 , IMIN (16383 , IMIN (remaining_bits , pulses [i ] + curr_balance )));
15151515 } else {
15161516 b = 0 ;
0 commit comments