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 131 of file mathops.h.

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

Definition at line 74 of file mathops.h.

Referenced by apply_qmf(), idctRowCondDC(), idctSparseCol(), idctSparseColAdd(), and idctSparseColPut().

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

Definition at line 65 of file mathops.h.

#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 lsp2poly().

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

Definition at line 140 of file mathops.h.

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

Definition at line 144 of file mathops.h.

Referenced by decode_block(), decode_block_progressive(), dv_decode_ac(), and get_xbits().

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

Definition at line 176 of file mathops.h.

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

Definition at line 170 of file mathops.h.

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

Definition at line 165 of file mathops.h.

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

Definition at line 159 of file mathops.h.

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

Definition at line 173 of file mathops.h.

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

Definition at line 162 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 124 of file mathops.h.


Generated on Fri Oct 26 02:38:15 2012 for FFmpeg by  doxygen 1.5.8