FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
softfloat_ieee754.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  SoftFloat_IEEE754
 

Macros

#define EXP_BIAS   127
 
#define MANT_BITS   23
 

Functions

static SoftFloat_IEEE754 av_normalize_sf_ieee754 (SoftFloat_IEEE754 sf)
 Normalize the softfloat as defined by IEEE 754 single-recision floating point specification. More...
 
static SoftFloat_IEEE754 av_int2sf_ieee754 (int64_t n, int e)
 Convert integer to softfloat. More...
 
static SoftFloat_IEEE754 av_bits2sf_ieee754 (uint32_t n)
 Make a softfloat out of the bitstream. More...
 
static int av_sf2int_ieee754 (SoftFloat_IEEE754 a)
 Convert the softfloat to integer. More...
 
static SoftFloat_IEEE754 av_div_sf_ieee754 (SoftFloat_IEEE754 a, SoftFloat_IEEE754 b)
 Divide a by b. More...
 
static SoftFloat_IEEE754 av_mul_sf_ieee754 (SoftFloat_IEEE754 a, SoftFloat_IEEE754 b)
 Multiply a with b return normalized result. More...
 
static int av_cmp_sf_ieee754 (SoftFloat_IEEE754 a, SoftFloat_IEEE754 b)
 Compare a with b strictly. More...
 

Variables

static const SoftFloat_IEEE754 FLOAT_0 = {0, 0, -126}
 
static const SoftFloat_IEEE754 FLOAT_1 = {0, 0, 0}
 

Macro Definition Documentation

#define EXP_BIAS   127

Definition at line 26 of file softfloat_ieee754.h.

Referenced by read_diff_float_data().

#define MANT_BITS   23

Definition at line 27 of file softfloat_ieee754.h.

Referenced by av_div_sf_ieee754(), av_int2sf_ieee754(), and av_mul_sf_ieee754().

Function Documentation

static SoftFloat_IEEE754 av_normalize_sf_ieee754 ( SoftFloat_IEEE754  sf)
inlinestatic

Normalize the softfloat as defined by IEEE 754 single-recision floating point specification.

Definition at line 41 of file softfloat_ieee754.h.

Referenced by av_cmp_sf_ieee754(), av_div_sf_ieee754(), av_int2sf_ieee754(), and av_mul_sf_ieee754().

static SoftFloat_IEEE754 av_int2sf_ieee754 ( int64_t  n,
int  e 
)
inlinestatic

Convert integer to softfloat.

Returns
softfloat with value n * 2^e

Definition at line 53 of file softfloat_ieee754.h.

Referenced by read_diff_float_data().

static SoftFloat_IEEE754 av_bits2sf_ieee754 ( uint32_t  n)
inlinestatic

Make a softfloat out of the bitstream.

Assumes the bits are in the form as defined by the IEEE 754 spec.

Definition at line 66 of file softfloat_ieee754.h.

Referenced by multiply(), and read_diff_float_data().

static int av_sf2int_ieee754 ( SoftFloat_IEEE754  a)
inlinestatic

Convert the softfloat to integer.

Definition at line 72 of file softfloat_ieee754.h.

static SoftFloat_IEEE754 av_div_sf_ieee754 ( SoftFloat_IEEE754  a,
SoftFloat_IEEE754  b 
)
inlinestatic

Divide a by b.

b should not be zero.

Returns
normalized result

Definition at line 80 of file softfloat_ieee754.h.

Referenced by read_diff_float_data().

static SoftFloat_IEEE754 av_mul_sf_ieee754 ( SoftFloat_IEEE754  a,
SoftFloat_IEEE754  b 
)
inlinestatic

Multiply a with b return normalized result.

Definition at line 93 of file softfloat_ieee754.h.

static int av_cmp_sf_ieee754 ( SoftFloat_IEEE754  a,
SoftFloat_IEEE754  b 
)
inlinestatic

Compare a with b strictly.

Returns
1 if the a and b are equal, 0 otherwise.

Definition at line 106 of file softfloat_ieee754.h.

Referenced by read_diff_float_data().

Variable Documentation

const SoftFloat_IEEE754 FLOAT_0 = {0, 0, -126}
static

Definition at line 35 of file softfloat_ieee754.h.

const SoftFloat_IEEE754 FLOAT_1 = {0, 0, 0}
static

Definition at line 36 of file softfloat_ieee754.h.