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

📄 initio.h

📁 dz3000_51.0.0.4.rar
💻 H
📖 第 1 页 / 共 2 页
字号:
/*++

Copyright (c) 2001 Sunplus Technology Co., Ltd.

Module Name:

        initio.h

Abstract:

        Header file related to initialization functions

Environment:

        Keil C51 Compiler

Revision History:

        08/28/2001      Chi-Yeh Tsai    created

--*/

#include "sensor.h"


//------------------------------------------------------------------------------
//Constant
//------------------------------------------------------------------------------
//***************************************************************************
//All SDRAM Constant Are Defined in Unit of WORD
//***************************************************************************
//Number of Bad pixel coordinate
#define K_BADPIXEL_NumPixel             ((ULONG)512)

//Number of Character font
#define K_CHARFONT_NumChar              ((ULONG)512)//768)//512)//wendy@20/2/2004

//Resolution of Graphic font
#define K_GRAFFONT_Width                ((ULONG)256)
#define K_GRAFFONT_Height               ((ULONG)256)

//Resolution of thumbnail
#define K_THUMB_Width                   ((ULONG)160)
#define K_THUMB_Height                  ((ULONG)120)

//Resolution of Video clip
//patch5.0@richie@avi size begin the biggest size
#define K_VIDEOCLIP_Width               ((ULONG)448)//WENDY@2004/4/8
#define K_VIDEOCLIP_Height              ((ULONG)336)//WENDY@2004/4/8
//patch5.0@richie@avi size end

//Resolution of playback display buffer
#define K_DISPLAY_PlaybackWidth         ((ULONG)800)
#define K_DISPLAY_PlaybackHeight        ((ULONG)600)

//Size of total SDRAM = 16M word = 32M byte
//16M word = 0x00000000 - 0x00ffffff word
//patch4.2@richie@0524 begin
#ifdef M16
#define K_SDRAM_TotalSize               ((ULONG)0x00100000)
#endif
#ifdef M64
#define K_SDRAM_TotalSize               ((ULONG)0x00400000)
#endif
#ifdef M128
#define K_SDRAM_TotalSize               ((ULONG)0x00800000)
#endif
#ifdef M256
#define K_SDRAM_TotalSize               ((ULONG)0x01000000)
#endif
//patch4.2@richie@0524 end

//patch4.2@richie@ds0522					   4M word
#define K_DOSRAM_StartAddress           ((ULONG)0x00400000)

//***************************************************************************
//Buffer Size
//***************************************************************************
//*************************************
//Common
//*************************************
//Size of Bad pixel coordinate buffer
#define K_SDRAM_BadPixelCoordBufSize    (K_BADPIXEL_NumPixel * 2)       //(X-coord, Y-coord) / pixel

//Size of Character font buffer
#define K_SDRAM_CharFontBufSize         (K_CHARFONT_NumChar * 64)

//Size of Graphic font buffer
#define K_SDRAM_GrafFontBufSize         (K_GRAFFONT_Width * K_GRAFFONT_Height)

//Size of DOS work buffer
// WWWW0409 when K_DOS_HaveLinearFAT, enable LinearFAT for avi play and record
// require more 128K byte ram
#define K_SDRAM_DOS_WorkSize            ((ULONG)0x00020000)     //128K word = 256K byte, at least dos cluster size
//#define K_SDRAM_DOS_WorkSize            ((ULONG)0x00010000)   //64K word = 128K byte, at least dos cluster size // WWWW

//Size of DOS FAT1 buffer
#define K_SDRAM_DOS_Fat1BufSize         ((ULONG)0x00010000)     //64K word = 128K byte

//Size of DCF directory buffer
//patch4.4@ada@DirectoryIndexOrder begin
#define K_SDRAM_DcfDirBufSize           ((ULONG)0x0001C20)      //director index 100 to 999 => 900 * 8 = 7200
//#define K_SDRAM_DcfDirBufSize           ((ULONG)0x000189C)      //director index 100 to 999 => 900 * 7 = 6300
//patch4.4@ada@DirectoryIndexOrder end

//patch4.4@ada@MP3 begin
#if (MP3_OPTION)
//Size of MP3 directory buffer
#define K_SDRAM_Mp3DirBufSize           ((ULONG)0x000189C)      //director index 100 to 999 => 900 * 7 = 6300
#endif
//patch4.4@ada@MP3 end

//version4.0@ada@0513 for DCF

//patch4.5@ada@Record DCF file name begin
#define K_SDRAM_JPG_FdbParameterBufSize ((ULONG)0x00018696) //10 * 9999
//#define K_SDRAM_JPG_FdbParameterBufSize ((ULONG)0x00013878) //8 * 9999

//#define K_SDRAM_AVI_FdbParameterBufSize ((ULONG)0x00018696) //10 * 9999
#define K_SDRAM_AVI_FdbParameterBufSize ((ULONG)0x00000000)
//patch4.5@ada@Record DCF file name end

#define K_SDRAM_WAV_FdbParameterBufSize ((ULONG)0x00000000)

//patch4.4@ada@MP3 begin
#if (MP3_OPTION)
#define K_SDRAM_MP3_FdbParameterBufSize (K_SDRAM_JPG_FdbParameterBufSize) //9999 * 12 * 2
#endif
//patch4.4@ada@MP3 end

//patch5.0@richie@SDRAM begin
//*************************************
//Preview Capture
//*************************************
//patch5.0@richie@sdram mapping begin
///*//!!!????
//#define K_SDRAM_FrameBufASize           (K_SENSOR_CaptureWidth * (K_SENSOR_CaptureHeight + 12))
//Size of Frame buffer B
//#define K_SDRAM_FrameBufBSize           (K_SDRAM_FrameBufASize - ((ULONG)464 * (K_SENSOR_MonitorHeight - 13)))
//*/

//Size of Preview Buffer A
#define K_SDRAM_PreviewBufSizeA        ((ULONG)464 * (K_SENSOR_MonitorHeight - 13))

//Size of Preview Buffer B
#define K_SDRAM_PreviewBufSizeB        ((ULONG)464 * (K_SENSOR_MonitorHeight - 13))
//patch5.0@richie@SDRAM end

//*************************************
//Single Capture
//*************************************
//Size of Image Capture Buffer
//patch5.03@Joe@2003.4.5 8:58 add for interpolation begin
#if(INTERPOLATION_OPTION == 0)
#define K_SDRAM_ImageCaptureBufSize         (K_SENSOR_CaptureWidth * (K_SENSOR_CaptureHeight + 12))
#else
#define K_SDRAM_ImageCaptureBufSize         (K_SNAP_Resolution_Interpolation_Width * (K_SNAP_Resolution_Interpolation_Height + 12))
#endif
//patch5.03@Joe@2003.4.5 8:58 add for interpolation end

//Size of DC term buffer
//patch5.03@Joe@2003.4.5 8:58 add for interpolation begin
#if(INTERPOLATION_OPTION == 0)
#define K_SDRAM_DcTermBufSize	(K_SENSOR_CaptureWidth * K_SENSOR_CaptureHeight / 64)
#else
#define K_SDRAM_DcTermBufSize	(K_SNAP_Resolution_Interpolation_Width * K_SNAP_Resolution_Interpolation_Height / 64)
#endif
//patch5.03@Joe@2003.4.5 8:58 add for interpolation end

//Size of DC term general buffer
//patch5.03@Joe@2003.4.5 8:58 add for interpolation begin
#if(INTERPOLATION_OPTION == 0)
#define K_SDRAM_DcTermGeneralBufSize	(160 * K_SENSOR_CaptureHeight / 8)
#else
#define K_SDRAM_DcTermGeneralBufSize	(160 * K_SNAP_Resolution_Interpolation_Height / 8)
#endif
//patch5.03@Joe@2003.4.5 8:58 add for interpolation end

//Size of Thumbnail buffer
#define K_SDRAM_ThumbBufSize                (K_THUMB_Width * K_THUMB_Height)

//Size of Thumbnail VLC buffer
//!!!???
//#define K_SDRAM_ThumbVlcBufSize        (K_SDRAM_ThumbBufSize / 2)

//Size of EXIF header buffer
//#define K_SDRAM_EXIF_HeaderBufSize          ((ULONG)0x00005000) //ada@0118

//Size of Image Capture General buffer
//patch5.03@Joe@2003.4.5 8:58 add for interpolation begin
#if(INTERPOLATION_OPTION == 0)
#define K_SDRAM_ImageCaptureGeneralBufSize	(K_DISPLAY_PlaybackWidth * K_SENSOR_CaptureHeight)
#else
//patch5.04@Joe@2003.5.10 13:43 modify for continuse snap begin
//#define K_SDRAM_ImageCaptureGeneralBufSize	(K_DISPLAY_PlaybackWidth * K_SNAP_Resolution_Interpolation_Height)
#define K_SDRAM_ImageCaptureGeneralBufSize	(K_SNAP_Resolution_Interpolation_Width * K_SENSOR_CaptureHeight)
//patch5.04@Joe@2003.5.10 13:43 modify for continuse snap end
#endif
//patch5.03@Joe@2003.4.5 8:58 add for interpolation end

//#define K_SDRAM_ImageCaptureGeneralBufSize  (K_SENSOR_CaptureWidth * K_SENSOR_CaptureHeight / 4)

//Size of Image Capture Display buffer
#define K_SDRAM_ImageCaptureDisplayBufSize  (K_DISPLAY_PlaybackWidth * K_DISPLAY_PlaybackHeight)

//Size of General buffer
//!!!
//#define K_SDRAM_GeneralBufSize         (K_SENSOR_CaptureWidth * K_SENSOR_CaptureHeight)

//Size of Temporary buffer
//#define K_SDRAM_TemporaryBufSize          (Remained Size)


//*************************************
//Preview/AVI Capture
//*************************************
#define K_SDRAM_AviPvwBufSizeA			(K_VIDEOCLIP_Width * (K_SENSOR_MonitorHeight - 13))
#define K_SDRAM_AviPvwBufSizeB			(K_VIDEOCLIP_Width * (K_SENSOR_MonitorHeight - 13))
#define K_SDRAM_AviCapVLCBufSizeA		((K_VIDEOCLIP_Width * K_VIDEOCLIP_Height / 4) + 130)
#define K_SDRAM_AviCapVLCBufSizeB		((K_VIDEOCLIP_Width * K_VIDEOCLIP_Height / 4) + 130)
#define K_SDRAM_AviCapAudioBufSize		((ULONG)4096)
#define K_SDRAM_AviCapFragBufSize		((ULONG)512)
#define K_SDRAM_AviCapHeaderBufSize		((ULONG)256)
//#define K_SDRAM_AviCaptureIdx1Size		(remain size)


//!!!???
//remove
//Size of Video VLC buffer A
//#define K_SDRAM_VideoVlcBufASize        ((K_VIDEOCLIP_Width * K_VIDEOCLIP_Height / 4) + 130)

//Size of Video VLC buffer B
//#define K_SDRAM_VideoVlcBufBSize        K_SDRAM_VideoVlcBufASize

//Size of Capture audio buffer
//#define K_SDRAM_CaptureAudioBufSize     ((ULONG)4096)

//Size of Capture fragment buffer
//#define K_SDRAM_CaptureFragmentBufSize  ((ULONG)512)

//Size of AVI header buffer
//#define K_SDRAM_AviHeaderBufSize        ((ULONG)256)

//Size of Idx1 buffer
//#define K_SDRAM_Idx1BufSize             (Remained Size)

//*************************************
//Playback 1/4/9
//*************************************
//Size of Image playback display buffer
#define K_SDRAM_ImagePlaybackDisplayBufSize	(K_DISPLAY_PlaybackWidth * K_DISPLAY_PlaybackHeight)

//Size of Image playback buffer
//patch5.03@Joe@2003.4.5 8:58 add for interpolation begin
#if(INTERPOLATION_OPTION == 0)
#define K_SDRAM_ImagePlaybackBufSize	(K_SENSOR_CaptureWidth * K_SENSOR_CaptureHeight)
#else
#define K_SDRAM_ImagePlaybackBufSize	(K_SNAP_Resolution_Interpolation_Width * K_SNAP_Resolution_Interpolation_Height)
#endif
//patch5.03@Joe@2003.4.5 8:58 add for interpolation end

⌨️ 快捷键说明

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