Libav
Macros | Functions
libm.h File Reference

Replacements for frequently missing libm functions. More...

#include <math.h>
#include "config.h"
#include "attributes.h"
#include "intfloat.h"

Go to the source code of this file.

Macros

#define atanf(x)   ((float)atan(x))
 
#define atan2f(y, x)   ((float)atan2(y, x))
 
#define powf(x, y)   ((float)pow(x, y))
 
#define cosf(x)   ((float)cos(x))
 
#define expf(x)   ((float)exp(x))
 
#define exp2(x)   exp((x) * 0.693147180559945)
 
#define exp2f(x)   ((float)exp2(x))
 
#define ldexpf(x, exp)   ((float)ldexp(x, exp))
 
#define llrint(x)   ((long long)rint(x))
 
#define llrintf(x)   ((long long)rint(x))
 
#define log2(x)   (log(x) * 1.44269504088896340736)
 
#define log2f(x)   ((float)log2(x))
 
#define log10f(x)   ((float)log10(x))
 
#define sinf(x)   ((float)sin(x))
 

Functions

static av_always_inline float cbrtf (float x)
 
static av_always_inline av_const int isinf (float x)
 
static av_always_inline av_const int isnan (float x)
 
static double rint (double x)
 
static av_always_inline av_const long int lrint (double x)
 
static av_always_inline av_const long int lrintf (float x)
 
static av_always_inline av_const double round (double x)
 
static av_always_inline av_const float roundf (float x)
 
static av_always_inline av_const double trunc (double x)
 
static av_always_inline av_const float truncf (float x)
 

Detailed Description

Replacements for frequently missing libm functions.

Definition in file libm.h.

Macro Definition Documentation

§ atanf

#define atanf (   x)    ((float)atan(x))

Definition at line 34 of file libm.h.

Referenced by calc_bark(), and ps_tableinit().

§ atan2f

#define atan2f (   y,
 
)    ((float)atan2(y, x))

Definition at line 39 of file libm.h.

Referenced by ps_tableinit().

§ powf

#define powf (   x,
 
)    ((float)pow(x, y))

§ cosf

#define cosf (   x)    ((float)cos(x))

Definition at line 56 of file libm.h.

Referenced by lsf2lsp(), and ps_tableinit().

§ expf

#define expf (   x)    ((float)exp(x))

Definition at line 61 of file libm.h.

Referenced by decode_init(), get_volume(), and synth_block_fcb_acb().

§ exp2

#define exp2 (   x)    exp((x) * 0.693147180559945)

Definition at line 66 of file libm.h.

§ exp2f

#define exp2f (   x)    ((float)exp2(x))

Definition at line 71 of file libm.h.

Referenced by ff_amr_set_fixed_gain(), and sbr_dequant().

§ ldexpf

#define ldexpf (   x,
  exp 
)    ((float)ldexp(x, exp))

Definition at line 96 of file libm.h.

Referenced by get_float().

§ llrint

#define llrint (   x)    ((long long)rint(x))

Definition at line 101 of file libm.h.

Referenced by ff_audio_mix_set_matrix(), and write_number().

§ llrintf

#define llrintf (   x)    ((long long)rint(x))

Definition at line 106 of file libm.h.

§ log2

#define log2 (   x)    (log(x) * 1.44269504088896340736)

Definition at line 111 of file libm.h.

Referenced by decode_frame(), decode_ppc(), find_best_state(), print_report(), and value_string().

§ log2f

#define log2f (   x)    ((float)log2(x))

§ log10f

#define log10f (   x)    ((float)log10(x))

Definition at line 121 of file libm.h.

Referenced by ff_amr_set_fixed_gain(), and ff_sipr_decode_frame_16k().

§ sinf

#define sinf (   x)    ((float)sin(x))

Definition at line 126 of file libm.h.

Referenced by ff_sine_window_init(), and ps_tableinit().

Function Documentation

§ cbrtf()

static av_always_inline float cbrtf ( float  x)
static

Definition at line 48 of file libm.h.

Referenced by decode_spectrum_and_dequant(), and quantize_and_encode_band_cost_template().

§ isinf()

static av_always_inline av_const int isinf ( float  x)
static

Definition at line 75 of file libm.h.

Referenced by av_d2q(), eval_expr(), and get_exponent_dynamic().

§ isnan()

static av_always_inline av_const int isnan ( float  x)
static

§ rint()

static double rint ( double  x)
inlinestatic

Definition at line 130 of file libm.h.

Referenced by idct248_ref(), lrint(), lrintf(), and video_image_display().

§ lrint()

static av_always_inline av_const long int lrint ( double  x)
static

§ lrintf()

static av_always_inline av_const long int lrintf ( float  x)
static

§ round()

static av_always_inline av_const double round ( double  x)
static

Definition at line 151 of file libm.h.

Referenced by dequant(), ffv1_encode_init(), normalize_double(), and vpx_init().

§ roundf()

static av_always_inline av_const float roundf ( float  x)
static

Definition at line 158 of file libm.h.

Referenced by xvid_correct_framerate().

§ trunc()

static av_always_inline av_const double trunc ( double  x)
static

Definition at line 165 of file libm.h.

Referenced by eval_expr().

§ truncf()

static av_always_inline av_const float truncf ( float  x)
static

Definition at line 172 of file libm.h.

Referenced by amrnb_decode_frame(), and amrwb_decode_frame().