📄 camif.h
字号:
/******************************************************************************
Filename: camif.h
Descriptions
- header file of camif.c
History
- July 23, 2003. Draft Version 0.0 by purnnamu
- Janualy 15, 2004. Modifed by Boaz
Copyright (c) 2003 SAMSUNG Electronics.
# However, Anybody can use this code without our permission.
******************************************************************************/
#ifndef __CAMIF_H__
#define __CAMIF_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "imagedef.h"
#define CAM_CCIR420 (0)
#define CAM_CCIR422 (1)
#define CAM_RGB16B (0)
#define CAM_RGB24B (1)
#define CAM_CODEC_OUTPUT (0) //CCIR420
//#define CAM_CODEC_OUTPUT (1) //CCIR422
#define CAM_PVIEW_OUTPUT (0) //RGB 16-Bit
//#define CAM_PVIEW_OUTPUT (1) //RGB 24-Bit
#define CAM_ITU601 (1)
#define CAM_ITU656 (0)
#define CAM_ITU601_8B (0)
#define CAM_ITU601_16B (1)
#define CAM_ORDER_YCBYCR (0)
#define CAM_ORDER_YCRYCB (1)
#define CAM_ORDER_CBYCRY (2)
#define CAM_ORDER_CRYCBY (3)
#define CAM_CODEC_IN_420 (0)
#define CAM_CODEC_IN_422 (1)
#define CAM_CODEC_OUT_420 (0)
#define CAM_CODEC_OUT_422 (1)
#define CAM_FLIP_NORMAL (0)
#define CAM_FLIP_XAXIS (1)
#define CAM_FLIP_YAXIS (2)
#define CAM_FLIP_180 (3)
#define CAM_SCALER_BYPASS_ON (1)
#define CAM_SCALER_BYPASS_OFF (0)
#define CAM_PVIEW_PINGPONG TRUE
#define CAM_CODEC_PINGPONG TRUE
#define CAM_CODEC_SACLER_START_BIT (1<<15)
#define CAM_PVIEW_SACLER_START_BIT (1<<15)
#define CAM_CAMIF_GLOBAL_CAPTURE_ENABLE_BIT (1<<31)
#define CAM_CODEC_SCALER_CAPTURE_ENABLE_BIT (1<<30)
#define CAM_PVIEW_SCALER_CAPTURE_ENABLE_BIT (1<<29)
//camTestMode
#define CAM_TEST_MODE_PVIEW (1<<0)
#define CAM_TEST_MODE_CODEC (1<<1)
#define CAM_TEST_MODE_CODEC_POST (1<<2)
#define CAM_TEST_MODE_PVIEW_POST (1<<3)
//camCodecStatus, camPviewStatus
#define CAM_STARTED (0)
#define CAM_STOP_ISSUED (1)
#define CAM_LASTIRQ_ISSUED (2)
#define CAM_LAST_CAPTURING (3)
#define CAM_STOPPED (4)
#define CAM_CODEC_SCALER_BYPASS_STATE (5)
#define LCD_XSIZE (240)
#define LCD_YSIZE (320)
#define YCbCrtoR(Y,Cb,Cr) (1000*Y + 1371*(Cr-128))/1000
#define YCbCrtoG(Y,Cb,Cr) (1000*Y - 336*(Cb-128) - 698*(Cr-128))/1000
#define YCbCrtoB(Y,Cb,Cr) (1000*Y + 1732*(Cb-128))/1000
#if 1 //If you have to use
extern volatile unsigned int camTestMode;
extern volatile unsigned int camCodecCaptureCount;
extern volatile unsigned int camPviewCaptureCount;
extern volatile unsigned int camPviewStatus;
extern volatile unsigned int camCodecStatus;
extern unsigned int CAMTYPE, CAMSIZE, CAMIICID;
#endif
void Ch21_CAMERA(void);
void CamDemoDisplay(void);
void CamReset();
void CalculatePrescalerRatioShift(unsigned int srcWidth, unsigned int dstWidth, unsigned int *ratio,unsigned int *shift);
void CamInit(unsigned int CoDstWidth, unsigned int CoDstHeight, unsigned int PrDstWidth, unsigned int PrDstHeight,
unsigned int WinHorOffset, unsigned int WinVerOffset, unsigned int CoFrameBuffer, unsigned int PrFrameBuffer);
#ifdef __cplusplus
}
#endif
#endif /*__CAMIF_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -