home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- macros.h
-
- 03/02/08 Xiaohong
- *************************************************************************/
- #ifndef _INCLUDE_MACROS_H_______________________________________
- #define _INCLUDE_MACROS_H_______________________________________
-
- #include <windows.h>
-
- /**********************************************************
- â}âNâìïyé╤ÆΦÉöé╠ÉΘî╛
- **********************************************************/
- #define VERSION_INFO "Encoded by TOMPEG Ver.1.0"
-
- #define _malloc(s) HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, (s) )
- #define _free(p) HeapFree( GetProcessHeap(), 0, (p));p=NULL;
- #define MAX(a, b) ((a)>(b)?(a):(b))
- #define MIN(a, b) ((a)<(b)?(a):(b))
-
- //------ cDCT é┼Ägùpé╡é─éóéΘÆΦÉö ------------//
- #define PI 3.14159265358979
- #define W1 2841 /* 2048*sqrt(2)*cos(1*pi/16) */
- #define W2 2676 /* 2048*sqrt(2)*cos(2*pi/16) */
- #define W3 2408 /* 2048*sqrt(2)*cos(3*pi/16) */
- #define W5 1609 /* 2048*sqrt(2)*cos(5*pi/16) */
- #define W6 1108 /* 2048*sqrt(2)*cos(6*pi/16) */
- #define W7 565 /* 2048*sqrt(2)*cos(7*pi/16) */
-
-
- #define PICTURE_START_CODE 0x100L
- #define SLICE_MIN_START 0x101L
- #define SLICE_MAX_START 0x1AFL
- #define USER_START_CODE 0x1B2L
- #define SEQ_START_CODE 0x1B3L
- #define EXT_START_CODE 0x1B5L
- #define SEQ_END_CODE 0x1B7L
- #define GOP_START_CODE 0x1B8L
- #define ISO_END_CODE 0x1B9L
- #define PACK_START_CODE 0x1BAL
- #define SYSTEM_START_CODE 0x1BBL
-
- /* picture coding type */
- #define I_TYPE 1
- #define P_TYPE 2
- #define B_TYPE 3
- #define D_TYPE 4
-
- /* picture structure */
- #define TOP_FIELD 1
- #define BOTTOM_FIELD 2
- #define FRAME_PICTURE 3
-
- /* macroblock type */
- #define MB_INTRA 1
- #define MB_PATTERN 2
- #define MB_BACKWARD 4
- #define MB_FORWARD 8
- #define MB_QUANT 16
-
- /* motion_type */
- #define MC_FIELD 1
- #define MC_FRAME 2
- #define MC_16X8 2
- #define MC_DMV 3
-
- /* mv_format */
- #define MV_FIELD 0
- #define MV_FRAME 1
-
- /* chroma_format */
- #define CHROMA420 1
- #define CHROMA422 2
- #define CHROMA444 3
-
- /* extension start code IDs */
-
- #define SEQ_ID 1
- #define DISP_ID 2
- #define QUANT_ID 3
- #define SEQSCAL_ID 5
- #define PANSCAN_ID 7
- #define CODING_ID 8
- #define SPATSCAL_ID 9
- #define TEMPSCAL_ID 10
-
- #endif