home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / dctm.lzh / DCTM / source.lzh / source / macros.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-02-08  |  2.3 KB  |  87 lines

  1. /*************************************************************************
  2.     macros.h
  3.  
  4.     03/02/08    Xiaohong
  5. *************************************************************************/
  6. #ifndef _INCLUDE_MACROS_H_______________________________________
  7. #define _INCLUDE_MACROS_H_______________________________________
  8.  
  9. #include <windows.h>
  10.  
  11. /**********************************************************
  12.     â}âNâìïyé╤ÆΦÉöé╠ÉΘî╛
  13. **********************************************************/
  14. #define VERSION_INFO "Encoded by TOMPEG Ver.1.0"
  15.  
  16. #define _malloc(s) HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, (s) )
  17. #define _free(p) HeapFree( GetProcessHeap(), 0, (p));p=NULL;
  18. #define MAX(a, b) ((a)>(b)?(a):(b))
  19. #define MIN(a, b) ((a)<(b)?(a):(b))
  20.  
  21. //------ cDCT é┼Ägùpé╡é─éóéΘÆΦÉö ------------//
  22. #define PI 3.14159265358979
  23. #define W1 2841 /* 2048*sqrt(2)*cos(1*pi/16) */
  24. #define W2 2676 /* 2048*sqrt(2)*cos(2*pi/16) */
  25. #define W3 2408 /* 2048*sqrt(2)*cos(3*pi/16) */
  26. #define W5 1609 /* 2048*sqrt(2)*cos(5*pi/16) */
  27. #define W6 1108 /* 2048*sqrt(2)*cos(6*pi/16) */
  28. #define W7 565  /* 2048*sqrt(2)*cos(7*pi/16) */
  29.  
  30.  
  31. #define PICTURE_START_CODE 0x100L
  32. #define SLICE_MIN_START    0x101L
  33. #define SLICE_MAX_START    0x1AFL
  34. #define USER_START_CODE    0x1B2L
  35. #define SEQ_START_CODE     0x1B3L
  36. #define EXT_START_CODE     0x1B5L
  37. #define SEQ_END_CODE       0x1B7L
  38. #define GOP_START_CODE     0x1B8L
  39. #define ISO_END_CODE       0x1B9L
  40. #define PACK_START_CODE    0x1BAL
  41. #define SYSTEM_START_CODE  0x1BBL
  42.  
  43. /* picture coding type */
  44. #define I_TYPE 1
  45. #define P_TYPE 2
  46. #define B_TYPE 3
  47. #define D_TYPE 4
  48.  
  49. /* picture structure */
  50. #define TOP_FIELD     1
  51. #define BOTTOM_FIELD  2
  52. #define FRAME_PICTURE 3
  53.  
  54. /* macroblock type */
  55. #define MB_INTRA    1
  56. #define MB_PATTERN  2
  57. #define MB_BACKWARD 4
  58. #define MB_FORWARD  8
  59. #define MB_QUANT    16
  60.  
  61. /* motion_type */
  62. #define MC_FIELD 1
  63. #define MC_FRAME 2
  64. #define MC_16X8  2
  65. #define MC_DMV   3
  66.  
  67. /* mv_format */
  68. #define MV_FIELD 0
  69. #define MV_FRAME 1
  70.  
  71. /* chroma_format */
  72. #define CHROMA420 1
  73. #define CHROMA422 2
  74. #define CHROMA444 3
  75.  
  76. /* extension start code IDs */
  77.  
  78. #define SEQ_ID       1
  79. #define DISP_ID      2
  80. #define QUANT_ID     3
  81. #define SEQSCAL_ID   5
  82. #define PANSCAN_ID   7
  83. #define CODING_ID    8
  84. #define SPATSCAL_ID  9
  85. #define TEMPSCAL_ID 10
  86.  
  87. #endif