Home
last modified time | relevance | path

Searched refs:MANTISSA_BITS (Results 1 – 2 of 2) sorted by relevance

/system/media/audio_utils/
Dminifloat.c24 #define MANTISSA_BITS 13 macro
25 #define MANTISSA_MAX ((1 << MANTISSA_BITS) - 1)
26 #define HIDDEN_BIT (1 << MANTISSA_BITS)
27 #define ONE_FLOAT ((float) (1 << (MANTISSA_BITS + 1)))
29 #define MINIFLOAT_MAX ((EXPONENT_MAX << MANTISSA_BITS) | MANTISSA_MAX)
31 #if EXPONENT_BITS + MANTISSA_BITS != 16
32 #error EXPONENT_BITS and MANTISSA_BITS must sum to 16
48 if (-exp >= MANTISSA_BITS) { in gain_from_float()
52 return exp > 0 ? (exp << MANTISSA_BITS) | (mantissa & ~HIDDEN_BIT) : in gain_from_float()
59 int exponent = (a >> MANTISSA_BITS) & EXPONENT_MAX; in float_from_gain()
Dsample.c30 #define MANTISSA_BITS 12 macro
31 #define MANTISSA_MAX ((1 << MANTISSA_BITS) - 1)
32 #define HIDDEN_BIT (1 << MANTISSA_BITS)
33 #define ONE_FLOAT ((float) (1 << (MANTISSA_BITS + 1)))
36 #if SIGN_BITS + EXPONENT_BITS + MANTISSA_BITS != 16
37 #error SIGN_BITS, EXPONENT_BITS and MANTISSA_BITS must sum to 16
65 if (-exp >= MANTISSA_BITS) { in sample_from_float()
70 sample_minifloat_t ret = exp > 0 ? (exp << MANTISSA_BITS) | (mantissa & ~HIDDEN_BIT) : in sample_from_float()
79 int exponent = (a >> MANTISSA_BITS) & EXPONENT_MAX; in float_from_sample()