camdef.h
上传用户:dzdeming
上传日期:2022-08-03
资源大小:381k
文件大小:4k
源码类别:

Windows CE

开发平台:

Visual C++

  1. /*****************************************
  2.   NAME: Camdef.h
  3.   DESC: header file for Imagetest test codes 
  4.   HISTORY:  2002.03.13:draft ver 0.0
  5.                   2004.02.09:edited by junon for S3C2440A
  6.  *****************************************/
  7. #ifndef __CAMDEF_H__
  8. #define __CAMDEF_H__
  9. #ifdef __cplusplus
  10. extern "C"{
  11. #endif
  12. #include "def.h"
  13. //Boaz Sekwang Kim
  14. #define CAM_CCIR420 (0)
  15. #define CAM_CCIR422 (1)
  16. #define CAM_RGB16B 0
  17. #define CAM_RGB24B 1
  18. #define CAM_ITU601 (1)
  19. #define CAM_ITU656 (0)
  20. #define CAM_ORDER_YCBYCR (0)
  21. #define CAM_ORDER_YCRYCB (1)
  22. #define CAM_ORDER_CBYCRY (2)
  23. #define CAM_ORDER_CRYCBY (3)
  24. #define CAM_CODEC_IN_420 (0)
  25. #define CAM_CODEC_IN_422 (1)
  26. #define CAM_CODEC_OUT_420 (0)
  27. #define CAM_CODEC_OUT_422 (1)
  28. #define CAM_FLIP_NORMAL (0)
  29. #define CAM_FLIP_XAXIS (1)
  30. #define CAM_FLIP_YAXIS (2)
  31. #define CAM_FLIP_180 (3)
  32. #define CAM_SCALER_BYPASS_ON (1)
  33. #define CAM_SCALER_BYPASS_OFF (0)
  34. #define CAM_CODEC_SACLER_START_BIT (1<<15)
  35. #define CAM_PVIEW_SACLER_START_BIT (1<<15)
  36. #define CAM_CAMIF_GLOBAL_CAPTURE_ENABLE_BIT (1<<31)
  37. #define CAM_CODEC_SCALER_CAPTURE_ENABLE_BIT (1<<30)
  38. #define CAM_PVIEW_SCALER_CAPTURE_ENABLE_BIT (1<<29)
  39. //camTestMode
  40. #define CAM_TEST_MODE_PVIEW (1<<0)
  41. #define CAM_TEST_MODE_CODEC (1<<1)
  42. //camCodecStatus, camPviewStatus
  43. #define CAM_STARTED (0)
  44. #define CAM_STOP_ISSUED (1)
  45. #define CAM_LAST_CAPTURING (2)
  46. #define CAM_STOPPED (3)
  47. #define CAM_CODEC_SCALER_BYPASS_STATE (4)
  48. //Image Size
  49. #define XGA_XSIZE (1024)
  50. #define XGA_YSIZE (768)
  51. #define SVGA_XSIZE (800)
  52. #define SVGA_YSIZE (600)
  53. #define VGA_XSIZE (640)
  54. #define VGA_YSIZE (480)
  55. #define QVGA_XSIZE (320)
  56. #define QVGA_YSIZE (240)
  57. #define PQVGA_XSIZE (240)
  58. #define PQVGA_YSIZE (320)
  59. #define CIF_XSIZE (352)
  60. #define CIF_YSIZE (288)
  61. #define QCIF_XSIZE (176)
  62. #define QCIF_YSIZE (144)
  63. #define CAMCLK48000000 (0)
  64. #define CAMCLK24000000 (1)
  65. #define CAMCLK16000000 (2)
  66. #define CAMCLK12000000 (3)
  67. #define CAMCLK9600000 (4)
  68. #define CAMCLK8000000 (5)
  69. #define C16_BLUE  (0x1f<<0)
  70. #define C16_GREEN  (0x3f<<5)
  71. #define C16_RED  (0x1f<<11)
  72. #define C16_BLACK  (0x0)
  73. #define C16_WHITE  (0xffff)
  74. #define C18_BLUE (0xfc)
  75. #define C18_GREEN (0xfc00)
  76. #define C18_RED  (0xfc0000)
  77. #define C18_BLACK (0x0)
  78. #define C18_WHITE (0xfcfcfc)
  79. //camera type
  80. #define CAM_OV7620 (0) // 640X480 VGA, 
  81. #define CAM_S5X433 (1) // VGA,
  82. #define CAM_S5X532 (2) // VGA,
  83. #define CAM_AU70H (3)  //1152x864 MegaPixel Camera, max 19.3MHz 
  84. #define CAM_S5X3A1 (4) // Mega pixel,
  85. #define YCbCrtoR(Y,Cb,Cr) (1000*Y + 1371*(Cr-128))/1000
  86. #define  YCbCrtoG(Y,Cb,Cr) (1000*Y - 336*(Cb-128) - 698*(Cr-128))/1000
  87. #define YCbCrtoB(Y,Cb,Cr) (1000*Y + 1732*(Cb-128))/1000
  88. #define CAM_FRAMEBUFFER_C _NONCACHE_STARTADDRESS+0x1000000// Adjusting is needed..
  89. #define CAM_FRAMEBUFFER_P _NONCACHE_STARTADDRESS// Max buffer size of Port : 0x1000000 (2048*2048*4)
  90. // Current modes
  91. //#define USED_CAM_TYPE CAM_S5X532
  92. #define USED_CAM_TYPE CAM_OV7620 //use OV9650
  93. #define USED_LCD_TYPE   MODE_TFT_16BIT_240320  // refer to Lcdlib.h 
  94. //AU70H camera resolution
  95. #define AU70H_VIDEO_SIZE (1152)   // 1152:(1152x864) or 640:(640x480)
  96. //#define CAM_CODEC_OUTPUT CAM_CCIR420
  97. #define CAM_CODEC_OUTPUT CAM_CCIR422 //directly CCIR422
  98. //#define CAM_PVIEW_OUTPUT CAM_RGB24B
  99. #define CAM_PVIEW_OUTPUT CAM_RGB16B //use 16B
  100. #define CAM_CODEC_4PP (0) // 0:all equal, 1:4 pingpong
  101. #define CAM_PVIEW_4PP (0) // 0:all equal, 1:4 pingpong
  102. #if USED_CAM_TYPE==CAM_AU70H && AU70H_VIDEO_SIZE==1152
  103. #define CAM_SRC_HSIZE (1152)
  104. #define CAM_SRC_VSIZE (864)
  105. #elif USED_CAM_TYPE==CAM_S5X3A1
  106. #define CAM_SRC_HSIZE (1280)
  107. #define CAM_SRC_VSIZE (1024)
  108. #else
  109. #define CAM_SRC_HSIZE (640)
  110. #define CAM_SRC_VSIZE (480)
  111. #endif
  112. #ifdef __cplusplus
  113. }
  114. #endif
  115. #endif /*__CAMDEF_H__*/