libavcodec/mathops.h File Reference

#include "libavutil/common.h"
#include "config.h"

Go to the source code of this file.

Defines

#define MUL64(a, b)   ((int64_t)(a) * (int64_t)(b))
#define MULL(a, b, s)   (MUL64(a, b) >> (s))
#define MAC64(d, a, b)   ((d) += MUL64(a, b))
#define MLS64(d, a, b)   ((d) -= MUL64(a, b))
#define MAC16(rt, ra, rb)   rt += (ra) * (rb)
#define MUL16(ra, rb)   ((ra) * (rb))
#define MLS16(rt, ra, rb)   ((rt) -= (ra) * (rb))
#define mid_pred   mid_pred
#define COPY3_IF_LT(x, y, a, b, c, d)
#define NEG_SSR32(a, s)   ((( int32_t)(a))>>(32-(s)))
#define NEG_USR32(a, s)   (((uint32_t)(a))>>(32-(s)))
#define PACK_2U8(a, b)   (((b) << 8) | (a))
#define PACK_4U8(a, b, c, d)   (((d) << 24) | ((c) << 16) | ((b) << 8) | (a))
#define PACK_2U16(a, b)   (((b) << 16) | (a))
#define PACK_2S8(a, b)   PACK_2U8((a)&255, (b)&255)
#define PACK_4S8(a, b, c, d)   PACK_4U8((a)&255, (b)&255, (c)&255, (d)&255)
#define PACK_2S16(a, b)   PACK_2U16((a)&0xffff, (b)&0xffff)

Functions

static av_always_inline int MULH (int a, int b)
static av_always_inline unsigned UMULH (unsigned a, unsigned b)
static av_const int mid_pred (int a, int b, int c)
static av_const int sign_extend (int val, unsigned bits)
static av_const unsigned zero_extend (unsigned val, unsigned bits)


Define Documentation

#define COPY3_IF_LT ( x,
y,
a,
b,
c,
 ) 

Value:

if ((y) < (x)) {\
    (x) = (y);\
    (a) = (b);\
    (c) = (d);\
}

Definition at line 133 of file mathops.h.

#define MAC16 ( rt,
ra,
rb   )     rt += (ra) * (rb)

Definition at line 74 of file mathops.h.

Referenced by ff_g722_apply_qmf().

#define MAC64 ( d,
a,
 )     ((d) += MUL64(a, b))

Definition at line 65 of file mathops.h.

Referenced by ac3_sum_square_butterfly_int32_c().

#define mid_pred   mid_pred

#define MLS16 ( rt,
ra,
rb   )     ((rt) -= (ra) * (rb))

Definition at line 83 of file mathops.h.

#define MLS64 ( d,
a,
 )     ((d) -= MUL64(a, b))

Definition at line 69 of file mathops.h.

#define MUL16 ( ra,
rb   )     ((ra) * (rb))

Definition at line 79 of file mathops.h.

#define MUL64 ( a,
 )     ((int64_t)(a) * (int64_t)(b))

#define MULL ( a,
b,
 )     (MUL64(a, b) >> (s))

Definition at line 49 of file mathops.h.

Referenced by long_term_filter(), and lsp2poly().

#define NEG_SSR32 ( a,
 )     ((( int32_t)(a))>>(32-(s)))

Definition at line 142 of file mathops.h.

#define NEG_USR32 ( a,
 )     (((uint32_t)(a))>>(32-(s)))

#define PACK_2S16 ( a,
 )     PACK_2U16((a)&0xffff, (b)&0xffff)

Definition at line 178 of file mathops.h.

#define PACK_2S8 ( a,
 )     PACK_2U8((a)&255, (b)&255)

Definition at line 172 of file mathops.h.

#define PACK_2U16 ( a,
 )     (((b) << 16) | (a))

Definition at line 167 of file mathops.h.

#define PACK_2U8 ( a,
 )     (((b) << 8) | (a))

Definition at line 161 of file mathops.h.

#define PACK_4S8 ( a,
b,
c,
 )     PACK_4U8((a)&255, (b)&255, (c)&255, (d)&255)

Definition at line 175 of file mathops.h.

#define PACK_4U8 ( a,
b,
c,
 )     (((d) << 24) | ((c) << 16) | ((b) << 8) | (a))

Definition at line 164 of file mathops.h.

Referenced by pred4x4_vertical_vp8_c().


Function Documentation

static av_const int mid_pred ( int  a,
int  b,
int  c 
) [inline, static]

Definition at line 89 of file mathops.h.

static av_always_inline int MULH ( int  a,
int  b 
) [static]

Definition at line 53 of file mathops.h.

static av_const int sign_extend ( int  val,
unsigned  bits 
) [inline, static]

static av_always_inline unsigned UMULH ( unsigned  a,
unsigned  b 
) [static]

Definition at line 59 of file mathops.h.

Referenced by pRNG().

static av_const unsigned zero_extend ( unsigned  val,
unsigned  bits 
) [inline, static]

Definition at line 126 of file mathops.h.


Generated on Fri Oct 26 02:46:07 2012 for FFmpeg by  doxygen 1.5.8