Rounding Modes for Speech Codecs

Speech coding functions described in this chapter do not use the default nearest even rounding mode.

For speech coding functions in this chapter, there are two different rounding modes:

  • Clipping is the default rounding mode in which the fractional part of the fixed point number is cut off and the result of rounding is always less than the initial value. Specifically, the fixed point number x=N + α, 0 ≤ α < 1, where N is an integer number, is always rounded to N. For example, -1.3 will be rounded to -2 and 1.7 to 1. No special suffix is added to the names of functions that use this default mode.

  • Nearest right is a rounding mode in which the fixed point number x=N + α, 0 ≤ α < 1, where N is an integer number, is rounded as follows:



For example, 1.5 is rounded to 2 (same as for nearest even mode) but -1.5 to -1 (different from nearest even mode where -1.5 is rounded to -2).

The suffix “NR” is added to names of functions that use the nearest right rounding mode.

For more complete information about compiler optimizations, see our Optimization Notice.