www.pudn.com > wm2.5.zip > defines.h
/*! *************************************************************************** * \file * defines.h * * \brief * marco, variable definition * * * \date * 01. Apr 2005 *************************************************************************** */ #ifndef _DEFINES_H_ #define _DEFINES_H_ #define _PSNR_YUV_ #define USE_ABT 0//WJP #define ABT_RDO 0//WJP 040824N #define _ISOLATED_REGION_ //cbzhu 12-15 #define MAX_CODED_FRAME_SIZE 1500000 //!< bytes for one frame #if defined _DEBUG #define TRACE 1 //!< 0:Trace off 1:Trace on #else #define TRACE 1 //!< 0:Trace off 1:Trace on #endif #define absm(A) ((A)<(0) ? (-(A)):(A)) //!< abs macro, faster than procedure #define MAX_VALUE 999999 //!< used for start value for some variables #define Clip1(a) ((a)>255?255:((a)<0?0:(a))) #define IClip(min,max,val) (((val)<(min))?(min):(((val)>(max))?(max):(val))) // FLAGS and DEFINES. #define P8x8 4 //#define I4MB 6 #define I4MB 5 // JX 05-4-1 #define IS_INTRA(MB) ((MB)->mb_type==I4MB) #define IS_INTER(MB) ((MB)->mb_type!=I4MB ) #define IS_INTERMV(MB) ((MB)->mb_type!=I4MB && (MB)->mb_type!=0) #define IS_COPY(MB) ((MB)->mb_type==0 && (pgImage-> type==P_IMG)) //#define IS_P8x8(MB) ((MB)->mb_type==4 ||(MB)->mb_type==5) #define IS_P8x8(MB) ((MB)->mb_type==P8x8) // JX 05-4-1 // Quantization parameter range #define MIN_QP 0 #define MAX_QP 63 #define BLOCK_SIZE 4 #define B8_SIZE 8 #define MB_BLOCK_SIZE 16 //added by MAZHAN //!< 4x4 intra prediction modes #define DOWN_LEFT_PRED 0 #define VERT_LEFT_PRED 1 #define VERT_PRED 2 #define VERT_RIGHT_PRED 3 #define DOWN_RIGHT_PRED 4 #define HOR_DOWN_PRED 5 #define HOR_PRED 6 #define HOR_UP_PRED 7 #define DC_PRED 8 // 8x8 chroma intra prediction modes #define DC_PRED_8 0 #define HOR_PRED_8 1 #define VERT_PRED_8 2 //#define PLANE_8 3 #define INIT_FRAME_RATE 30 #define EOS 1 //!< End Of Sequence #define SOP 2 //!< Start Of Picture #define LPOS 3 //WJP FOR NAL #define DECODING_OK 0 #define SEARCH_SYNC 1 #ifndef WIN32 #define max(a, b) ((a) > (b) ? (a) : (b)) //!< Macro returning max value #define min(a, b) ((a) < (b) ? (a) : (b)) //!< Macro returning min value #endif #define mmax(a, b) ((a) > (b) ? (a) : (b)) //!< Macro returning max value #define mmin(a, b) ((a) < (b) ? (a) : (b)) //!< Macro returning min value #define clamp(a,b,c) ( (a)<(b) ? (b) : ((a)>(c)?(c):(a)) ) //!< clamp a to the range of [b;c] #define MVPRED_MEDIAN 0 #define MVPRED_L 1 #define MVPRED_U 2 #define MVPRED_UR 3 #define DECODE_MB 1 #define BLOCK_MULTIPLE (MB_BLOCK_SIZE/(BLOCK_SIZE)) //VLC defines #define CODE2D_ESCAPE_SYMBOL 39 #define ABTCODE2D_ESCAPE_SYMBOL 59 #endif