/* The presence of the required functions are detected during the configure **processandthevaluesHAVE_LRINTandHAVE_LRINTFaresetaccordinglyin **theconfig.hfile.
*/
/* With GCC, when SSE is available, the fastest conversion is cvtss2si. */ #ifdefined(__GNUC__) && defined(__SSE__)
/* These defines enable functionality introduced with the 1999 ISO C **standard.Theymustbedefinedbeforetheinclusionofmath.hto **engagethem.Ifoptimisationisenabled,thesefunctionswillbe **inlined.Withoptimisationswitchedoff,youhavetolinkinthe **mathslibraryusing-lm.
*/
#if (defined(__GNUC__) && defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) /* supported by gcc in C99 mode, but not by all other compilers */ #warning"Don't have the functions lrint() and lrintf ()." #warning"Replacing these functions with a standard C cast." #endif/* __STDC_VERSION__ >= 199901L */ #include <math.h> #define float2int(flt) ((int)(floor(.5+flt))) #endif
#ifndef DISABLE_FLOAT_API static OPUS_INLINE opus_int16 FLOAT2INT16(float x)
{
x = x*CELT_SIG_SCALE;
x = MAX32(x, -32768);
x = MIN32(x, 32767); return (opus_int16)float2int(x);
}
static OPUS_INLINE opus_int32 FLOAT2INT24(float x)
{
x = x*(CELT_SIG_SCALE*256.f);
x = MAX32(x, -16777216);
x = MIN32(x, 16777216); return float2int(x);
} #ifdef FIXED_POINT static OPUS_INLINE opus_int32 FLOAT2SIG(float x)
{
x = x*((opus_int32)32768<<SIG_SHIFT);
x = MAX32(x, -(65536<<SIG_SHIFT));
x = MIN32(x, 65536<<SIG_SHIFT); return float2int(x);
} #endif #endif/* DISABLE_FLOAT_API */
#endif/* FLOAT_CAST_H */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.