⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 camera.h

📁 MMI层OBJ不能完全编译
💻 H
字号:
/* 联想  密级:绝密 保密期限:3年                  */

/***CONFIDENTIAL *****************************************************
本文件属于公司秘密信息,请您恪守保密义务,勿向第三人透露。谢谢合作。 
This file is confidential. Recipient(s) is(are) obligated to maintain secrecy
and is(are) not permitted to disclose the contents of this communication to others. 
Thank you. 
***********************************************************************/
/**************************************************************************
*
*                        联想移动上海研发中心
*							软件二处
*
*			 联想移动上海研发中心 版权所有(c)  
*
* 文件名    :   camera.h
*
* 目的      :    Camera source file on CLC 712S8 platform
*               
* 作者      :   Mark Hu
* 
* 生成日期  :   2005.01.04
*
* 修改纪录  :
* 
* 
*-------------------------------------------------------------------------
* 姓名          日期            版本            描述
*-------------------------------------------------------------------------
* Mark hu   2005.01.04      		0.1         		创建
*                                        
***************************************************************************/
#ifndef __CAMERA_H__
#define __CAMERA_H__

/*Fujl start============*/
#define MOVIE_PB_EXIT		0x0000
#define MOVIE_PB_START		0x0001
#define MOVIE_PB_PAUSE		0x0002
#define MOVIE_PB_PLAY		0x0003
/*Fujl end============*/


//add by Mark chen 


//set/get attribute item 
typedef enum                         
{
    Preview_Rotation	=0x01,  	//reg0x01	bit[4:2]
    Display_Rotation	=0x02,	//reg0x01	bit[7:5]	
    Image_Effect		=0x03,  	//reg0x02	bit[13:8]
    JPEG_File_Size      	=0x04,  	//reg0x03 bit[3:0]    reg0x04   bit[15:0]
    
    JPEG_Quantity       	=0x05,  	//reg0x16 
    OSD_Mode            	=0x06,  	//reg0x18  
    Frame_Rate		=0x07,	//
    Strobe_Mode		=0x08,	//reg0x2d	bit0
    
    Sensor_Brightness	=0x10,	//reg0xa3
    Sensor_Contrast	=0x11,	//reg0xa3
    Sensor_Hue		=0x12,	//reg0xa3
    LCD_Brightness	=0x13,	//reg0xa4
    LCD_Contrast		=0x14,	//reg0xa4
    LCD_Hue			=0x15,	//reg0xa4

    Img_Effect_Mode	=0x16, 
    Menu_Mode		=0x17,
    Night_Mode		=0x18,
    Brightness		=0x19,
    Contrast                 =0x1a,
    Environment		=0x1b,	//fujl
    Frame_Mode		=0x1c,

    AWB             =0x1d

}CAM_ATTRIBUTE;

enum PlaybackMode {PlaybackFromHost,PlaybackFromW9968x};


//for decode&display
typedef struct tagJPEGTOBMP
{
U16*    img_buf;            //image file buffer
U32     img_size;           //image file size
U16     jpeg_file_type; 

U16     x_res;              //jpeg x resolution
U16     y_res;              //jpeg y resolution

U16*    bmp_buf;            //bmp buffer

U16     width;              //input display x width
U16     height;             //input display y height

U16     bmp_width;          //output bmp width
U16     bmp_height;         //output bmp width
}T_JPEGTOBMP;


/*************************************
JPEG 文件的显示是在媒体管理器中使用
文件类型
1.  camera自拍的标准类型0和1
2.  
*************************************/
typedef struct tagJPEGVIEW
{
//api setting (hopen)   
U16*    img_buf;                //api   
U32     img_size;               //api
U16     x_res;
U16     y_res;

//driver setting    
U16     jpeg_file_type;   

U16     file_zoom;   //只有类型0和1有放大缩小功能
U16     adjust_flag;    //0--       1--default display setting
U16     zoom_flag;

//capture
U16     cap_xstart;
U16     cap_ystart;
U16     cap_width;
U16     cap_height;

//view 
U16     dis_xstart;
U16     dis_ystart;
U16     dis_width;
U16     dis_height;

//move flag and ratio
U16     x_flag;     //0-disable     1-enable
U16     x_value;    //x普通调节范围 0,1,2(left)     4,5,6(right)
U16     x_scope;    //x最大调节范围 (1-3)
U16     x_ratio;    //x 移动步长


U16     y_flag;
U16     y_value;    //x普通调节范围 0,1,2(down)     4,5,6(up)
U16     y_scope;    //y最大调节范围
U16     y_ratio;    //y 移动步长
}T_JPEGVIEW;        //上层函数下传的结构

//camera global struct (describe JPEG IC )
typedef struct tagCAMERA
{
//system
U16 camera_mode;	//0-off		1-on
U16	operate_mode;	//jpegic operate mode
U16	strobe_flag;		//0-off		1-on		only single capture used

//sensor
U16	sensor_flag;		
U16	sensor_type;

    
//source
U16	source_mode;    //0-sensor      1-decoder
U16	source_x;       
U16	source_y;

//jpeg capture
U16	jpeg_mode;      //0-640*480         1-128*160       2-128*140(osd)   
U16	img_quantity;
U16 	frame_rate;
U16 	Frame_Mode;
U16  Mutil_mode;

//preview capture
U16 	preview_mode;
U16	preview_rotate;        //reg01	bit[4:2]
U16 	preview_start_flag;	//for initial sensor one time
U16	zoom;
U16	zoom_flag;

//display position
U16	display_rotate;	//reg01	bit[7:5]

//osd mode
U16	osd_mode;           //reg0x18
U16 	osd_color;          //reg0x19


//image effect
U16	image_effect;

//jpeg file size
U32 	jpeg_file_size;     //unit is word
U16	jpeg_file_zoom;

//only for clc712S8
U16	sensor_brightness;		//rega3
U16	sensor_contrast;
U16	sensor_hue;
U16	lcd_brightness;			//rega4
U16	lcd_contrast;
U16	lcd_hue;	
U16 Sensor_Environment;
}T_CAMERA;  


typedef struct tagJPEGFILE
{
U16*    img_buf;            //image file buffer
U32     img_size;           //image file size
U16     jpeg_file_type; 

U16     x_res;              //jpeg x resolution
U16     y_res;              //jpeg y resolution
}T_JPEGFILE;


typedef struct tagJPEGTOVIEW
{
U16*	bmp_buf;             //bmp buffer
U32		buf_size;

//source
U16     	x_res;              	//jpeg x resolution
U16     	y_res;             	//jpeg y resolution

//display or bmp
U16		x_dis_offset;	//only for display
U16		y_dis_offset;	//only for display
U16		x_dis_width;
U16		y_dis_height;

U16		bmp_width;		//only for convert
U16		bmp_height;		//only for convert
}T_JPEGTOVIEW;


//system
void CAM_SetMode(U8 usOnOff);
U16	CAM_GetMode(void);
void CAM_PowerOnOff(U8 ucOnOff);
U16 	CAM_SetLCDLock(U16 usValue);

void CAM_Init(void);        //initial register on CLC 
void CAM_SWReset(void);
void Lcd_Reset_UseJpgIc(void);
void CAM_ClearOPMode(void);
U16 	CAM_GetOPMode(void);
void CAM_SetAttribute(CAM_ATTRIBUTE usAttr, U16 usValue);
U32 	CAM_GetAttribute(CAM_ATTRIBUTE usAttr);

//osd function
void CAM_SetOSDData(U16* img_buf,U16 usColor);
void CAM_SetOSDWindow(U16 usXStart, U16 usYStart, U16 usXEnd, U16 usYEnd);
//void CAM_DisableOSD(void);

//preview&single capture
U8 	CAM_Preview(U16 usMode,U16 usZoom);
void CAM_PreviewOff(void);
U8 	CAM_SingleCapture(void);
//multi capture
U8 	CAM_MultiCapture(U16 usMode,U16 number);
U32	CAM_ReadCaptureJPEG(U16* img_buf,U32 buf_size,U16 number);
U8	CAM_ReadCaptureBMP(U16* img_buf,U32 buf_size);
	
//playback
U16 	CAM_GetJpegType(U16* pBuf,U32 img_size,U16 usXView,U16 usYView,U16 x_res,U16 y_res);     //huhao add 2004/7/8
U16 	CAM_WriteJPEGFile(T_JPEGFILE* img_info);
U16	CAM_JPEGConvertBMP_NEW(T_JPEGTOVIEW* img_info,U8 ucType,U8 ucView);

//motion jpeg
U16	CAM_MovieView(void);
void CAM_MovieCapture(U16 usMode,U16* img_buf) ;
U32 CAM_WriteMovieData(U16* img_buf,U32 img_size);
U16 	CAM_MoviePlayback(enum PlaybackMode type,U16 control);

//add by Mark chen for frame data
void CAM_SetFrameOsdData(U16* img_buf,U16 usColor);
void CAM_SetQualityTemp(void);
//not used
/*
U16 	CAM_Display_new(U16 *pBuf, U32 len, U16 wx, U16 wy, U16 tx, U16 ty, U16 lsx, U16 lsy, U16 DecodeOpt, U16 zoom, U16 Move, U16 MoveFlag);

U16 	CAM_StillCapture(U16* img_buf);
U16	CAM_Display(T_JPEGVIEW* img_info);
U16 	CAM_JPEGConvertBMP(T_JPEGTOBMP* img_info,U16 usType);
*/
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -