?? camera.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 + -