D:/opendownloadmanager/ODM-1.x/Include.Add/ffmpeg/common.h File Reference

#include <inttypes.h>

Go to the source code of this file.

Defines

#define av_always_inline   inline
#define attribute_deprecated
#define INT64_C(c)   (c ## LL)
#define UINT64_C(c)   (c ## ULL)
#define RSHIFT(a, b)   ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
#define ROUNDED_DIV(a, b)   (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
#define FFABS(a)   ((a) >= 0 ? (a) : (-(a)))
#define FFSIGN(a)   ((a) > 0 ? 1 : -1)
#define FFMAX(a, b)   ((a) > (b) ? (a) : (b))
#define FFMIN(a, b)   ((a) > (b) ? (b) : (a))
#define FFSWAP(type, a, b)   do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
#define MKTAG(a, b, c, d)   (a | (b << 8) | (c << 16) | (d << 24))
#define MKBETAG(a, b, c, d)   (d | (c << 8) | (b << 16) | (a << 24))
#define GET_UTF8(val, GET_BYTE, ERROR)
#define PUT_UTF8(val, tmp, PUT_BYTE)
#define START_TIMER
#define STOP_TIMER(id)   {}
#define DECLARE_ALIGNED(n, t, v)   __declspec(align(n)) t v

Functions

static int av_log2 (unsigned int v)
static int av_log2_16bit (unsigned int v)
static int mid_pred (int a, int b, int c)
static int clip (int a, int amin, int amax)
static uint8_t clip_uint8 (int a)
int64_t ff_gcd (int64_t a, int64_t b)
static int ff_get_fourcc (const char *s)
void * av_malloc (unsigned int size)
void * av_realloc (void *ptr, unsigned int size)
void av_free (void *ptr)
void * av_mallocz (unsigned int size)
char * av_strdup (const char *s)
void av_freep (void *ptr)

Variables

const uint8_t ff_log2_tab [256]


Define Documentation

Definition at line 43 of file common.h.

#define av_always_inline   inline

Definition at line 31 of file common.h.

#define DECLARE_ALIGNED ( n,
t,
 )     __declspec(align(n)) t v

Definition at line 265 of file common.h.

#define FFABS ( a   )     ((a) >= 0 ? (a) : (-(a)))

Definition at line 55 of file common.h.

Referenced by av_encode().

#define FFMAX ( a,
b   )     ((a) > (b) ? (a) : (b))

Definition at line 58 of file common.h.

Referenced by av_encode(), do_audio_out(), and output_packet().

#define FFMIN ( a,
b   )     ((a) > (b) ? (b) : (a))

Definition at line 59 of file common.h.

Referenced by av_fifo_generic_read(), av_fifo_write(), and do_video_out().

#define FFSIGN ( a   )     ((a) > 0 ? 1 : -1)

Definition at line 56 of file common.h.

#define FFSWAP ( type,
a,
b   )     do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)

Definition at line 61 of file common.h.

#define GET_UTF8 ( val,
GET_BYTE,
ERROR   ) 

Value:

val= GET_BYTE;\
    {\
        int ones= 7 - av_log2(val ^ 255);\
        if(ones==1)\
            ERROR\
        val&= 127>>ones;\
        while(--ones > 0){\
            int tmp= GET_BYTE - 128;\
            if(tmp>>6)\
                ERROR\
            val= (val<<6) + tmp;\
        }\
    }

Definition at line 163 of file common.h.

#define INT64_C ( c   )     (c ## LL)

Definition at line 48 of file common.h.

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

Definition at line 161 of file common.h.

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

Definition at line 160 of file common.h.

#define PUT_UTF8 ( val,
tmp,
PUT_BYTE   ) 

Value:

{\
        int bytes, shift;\
        uint32_t in = val;\
        if (in < 0x80) {\
            tmp = in;\
            PUT_BYTE\
        } else {\
            bytes = (av_log2(in) + 4) / 5;\
            shift = (bytes - 1) * 6;\
            tmp = (256 - (256 >> bytes)) | (in >> shift);\
            PUT_BYTE\
            while (shift >= 6) {\
                shift -= 6;\
                tmp = 0x80 | ((in >> shift) & 0x3f);\
                PUT_BYTE\
            }\
        }\
    }

Definition at line 178 of file common.h.

#define ROUNDED_DIV ( a,
b   )     (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))

Definition at line 54 of file common.h.

#define RSHIFT ( a,
b   )     ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))

Definition at line 52 of file common.h.

#define START_TIMER

Definition at line 258 of file common.h.

#define STOP_TIMER ( id   )     {}

Definition at line 259 of file common.h.

#define UINT64_C ( c   )     (c ## ULL)

Definition at line 49 of file common.h.


Function Documentation

void av_free ( void *  ptr  ) 

void av_freep ( void *  ptr  ) 

Referenced by av_encode(), and output_packet().

static int av_log2 ( unsigned int  v  )  [inline, static]

Definition at line 65 of file common.h.

References ff_log2_tab, and n.

static int av_log2_16bit ( unsigned int  v  )  [inline, static]

Definition at line 83 of file common.h.

References ff_log2_tab, and n.

void* av_malloc ( unsigned int  size  ) 

void* av_mallocz ( unsigned int  size  ) 

Referenced by av_encode().

void* av_realloc ( void *  ptr,
unsigned int  size 
)

Referenced by do_audio_out().

char* av_strdup ( const char *  s  ) 

static int clip ( int  a,
int  amin,
int  amax 
) [inline, static]

Definition at line 137 of file common.h.

Referenced by do_audio_out().

static uint8_t clip_uint8 ( int  a  )  [inline, static]

Definition at line 144 of file common.h.

int64_t ff_gcd ( int64_t  a,
int64_t  b 
)

static int ff_get_fourcc ( const char *  s  )  [inline, static]

Definition at line 152 of file common.h.

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

Definition at line 97 of file common.h.


Variable Documentation

const uint8_t ff_log2_tab[256]

Referenced by av_log2(), and av_log2_16bit().


Generated on Sun May 25 00:19:39 2008 by  doxygen 1.5.6