user_macro.h
来自「用MPEG-4对YUV视频文件编码压缩成divx视频文件」· C头文件 代码 · 共 40 行
H
40 行
#ifndef _USERMACRO_H_
#define _USERMACRO_H_
/* calculate PSNR value */
#define _DEBUG_PSNR
/* output encoding log file */
/*#define _LOGFILE*/
/* output constructed image */
#define _OUT_CONSTRUCT_IMAGE
/* profiling performance */
/*#define _PROFILING_*/
/* Trimedia platform compile macro */
//#define _TRIMEDIA
#ifdef _TRIMEDIA
#include <custom_defs.h>
#define __inline inline
#define abs(a) IABS(a)
/*#define min(x,y) (((x)<(y))?(x):(y))
#define max(x,y) (((x)>(y))?(x):(y))*/
#define min(x,y) IMIN(x,y)
#define max(x,y) IMAX(x,y)
#else
#define restrict
#define CYCLES() 0
#endif
/*#define SIGN(X) (((X)>0)?1:-1)*/
#define SIGN(X) ((((X)>0)<<1)-1)
/* 实现X/(2**N)运算 */
#define DIV(X,N) ((abs(X)>>N)*SIGN(X))
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?