LOCAL uint32_t GT2005_Change_Image_Format(uint32_t param)
{
        SENSOR_REG_TAB_INFO_T st_jpeg_reg_table_info = { ADDR_AND_LEN_OF_ARRAY(GT2005_JPEG_MODE), 0,0,0, 0};
        SENSOR_REG_TAB_INFO_T st_yuv422_reg_table_info = { ADDR_AND_LEN_OF_ARRAY(GT2005_YUV_COMMON),0,0,0,0};
        uint32_t ret_val = SENSOR_FAIL;

        switch(param) {
        case SENSOR_IMAGE_FORMAT_YUV422:
                ret_val = Sensor_SendRegTabToSensor(&st_yuv422_reg_table_info);
                break;
        case SENSOR_IMAGE_FORMAT_JPEG:
                ret_val = Sensor_SendRegTabToSensor(&st_jpeg_reg_table_info);
                break;
        default:
                break;
        }
        return ret_val;
} 
	{0x0110 , 0x02},
	{0x0111 , 0x80},
	{0x0112 , 0x01},
	{0x0113 , 0xE0},

	{0xff , 0xff}
};

SENSOR_REG_T GT2005_JPEG_MODE[] =
{
	{0xff , 0xff}
};

LOCAL SENSOR_REG_TAB_INFO_T s_GT2005_resolution_Tab_YUV[]=
{   
        { ADDR_AND_LEN_OF_ARRAY(GT2005_YUV_COMMON),	640, 480, 12, SENSOR_IMAGE_FORMAT_YUV422 },
        // YUV422 PREVIEW 1
        { ADDR_AND_LEN_OF_ARRAY(GT2005_YUV_640X480), 	640, 480, 12, SENSOR_IMAGE_FORMAT_YUV422},
        { ADDR_AND_LEN_OF_ARRAY(GT2005_YUV_1280X960),	1280, 960, 12, SENSOR_IMAGE_FORMAT_YUV422},
        { ADDR_AND_LEN_OF_ARRAY(GT2005_YUV_1600X1200),1600, 1200, 12,SENSOR_IMAGE_FORMAT_YUV422},
        { PNULL,                    0,      0,  	0  ,        0,       0      },
        // YUV422 PREVIEW 2 
         { PNULL,                   0,      0,  	0  ,        0,        0      },
         { PNULL,                   0,      0,  	0  ,        0,        0      },
         { PNULL,                   0,      0,  	0  ,        0,        0      },
         { PNULL,                   0,      0,  	0  ,        0,        0      }
}; 

LOCAL SENSOR_IOCTL_FUNC_TAB_T s_GT2005_ioctl_func_tab = 
{
        // Internal 
// SCLK = 216Mhz
{0x3090 ,0x02},//pll2_prediv
{0x3091 ,0x12},//pll2_multiplier
{0x3092 ,0x00},//pll2_divs
{0x3093 ,0x00},//pll2_seld5
{0x3094 ,0x00},
// MIPI data rate = 640Mbps
//{0x30b3 ,0x50},//pll1_multiplier
//{0x30b4 ,0x03},//pll1_prediv
//{0x30b5 ,0x04},//pll1_op_pix_div
//{0x30b6 ,0x01},//pll1_op_sys_div
//{0x4837 ,0x0d},//MIPI global timing
};

LOCAL SENSOR_REG_TAB_INFO_T s_ov8830_resolution_Tab_RAW[] = {
	{ADDR_AND_LEN_OF_ARRAY(ov8830_common_init), 0, 0, 24, SENSOR_IMAGE_FORMAT_RAW},
	{ADDR_AND_LEN_OF_ARRAY(ov8830_1632x1224_setting), 1632, 1224, 24, SENSOR_IMAGE_FORMAT_RAW},
	{ADDR_AND_LEN_OF_ARRAY(ov8830_3264x2448_setting), 3264, 2448, 24, SENSOR_IMAGE_FORMAT_RAW},
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0}
};

LOCAL SENSOR_TRIM_T s_ov8830_Resolution_Trim_Tab[] = {
	{0, 0, 0, 0, 0, 0},
	{0, 0, 1632, 1224, 264, 90},
	{0, 0, 3264, 2448, 268, 82},
	{0, 0, 0, 0, 0, 0},
    SENSOR_REG_T* sensor_reg_ptr = (SENSOR_REG_T*)SP0A19_ev_tab[level];

  //  SCI_ASSERT(PNULL != sensor_reg_ptr);
  //  SCI_ASSERT(level < 7);
 
    for(i = 0; (0xFF != sensor_reg_ptr[i].reg_addr) ||(0xFF != sensor_reg_ptr[i].reg_value) ; i++)
    {
        SP0A19_WriteReg(sensor_reg_ptr[i].reg_addr, sensor_reg_ptr[i].reg_value);
    }
    return 0;
}

LOCAL SENSOR_REG_TAB_INFO_T s_SP0A19_resolution_Tab_YUV[]=
{   
	// COMMON INIT
	{ ADDR_AND_LEN_OF_ARRAY(SP0A19_YUV_640X480),    640,    480, 24,  SENSOR_IMAGE_FORMAT_YUV422 },

	// YUV422 PREVIEW 1
	{ PNULL,                    0,   640,    480,    24   ,        SENSOR_IMAGE_FORMAT_YUV422 },
	{ PNULL,                    0,      0,  0  ,        0,        0      },   
	{ PNULL,                    0,      0,  0  ,        0,        0      },   
	{ PNULL,                    0,      0,  0  ,        0,        0      },   


	// YUV422 PREVIEW 2 
	{ PNULL,                    0,      0,  0  ,        0,        0      },   
	{ PNULL,                    0,      0,  0  ,        0,        0      },   
	{ PNULL,                    0,      0,  0  ,        0,        0      },   
	{ PNULL,                    0,      0,  0  ,        0,        0      }

};
	{0x0d, 0x92},
	{0x0d, 0x90},
       {SENSOR_WRITE_DELAY, 100}//delay 100ms	

};

const SENSOR_REG_T OV9660_yuv422_mode[]=
{
        /**/
        {0xff, 0xff},
};

LOCAL SENSOR_REG_TAB_INFO_T s_OV9660_resolution_Tab_YUV[]=
{	
        // COMMON INIT
        {ADDR_AND_LEN_OF_ARRAY(OV9660_YUV_COMMON), 0, 0, 24, SENSOR_IMAGE_FORMAT_YUV422}, 

        // YUV422 PREVIEW 1 
        {ADDR_AND_LEN_OF_ARRAY(OV9660_YUV_640X480), 640, 480, 24, SENSOR_IMAGE_FORMAT_YUV422},
        {ADDR_AND_LEN_OF_ARRAY(OV9660_YUV_1280X960), 1280, 960, 12, SENSOR_IMAGE_FORMAT_YUV422},
        {PNULL, 0, 0, 0, 0, 0},
        {PNULL, 0, 0, 0, 0, 0},

        // YUV422 PREVIEW 2 
        {PNULL, 0, 0, 0, 0, 0},
        {PNULL, 0, 0, 0, 0, 0},
        {PNULL, 0, 0, 0, 0, 0},
        {PNULL, 0, 0, 0, 0, 0}
};

LOCAL SENSOR_IOCTL_FUNC_TAB_T s_OV9660_ioctl_func_tab = 
示例#6
0

//640*480 YUV   Mode
LOCAL const SENSOR_REG_T BF3905_640x480[] =
{
{0xff, 0xff},
{0xff, 0xff},
	
} ; 



LOCAL SENSOR_REG_TAB_INFO_T s_BF3905_resolution_Tab_YUV[]=
{    
	// COMMON INIT
	{ADDR_AND_LEN_OF_ARRAY(BF3905_YUV_COMMON),   0, 0, 24, SENSOR_IMAGE_FORMAT_YUV422}, 

	// YUV422 PREVIEW 1 
	{ADDR_AND_LEN_OF_ARRAY(BF3905_640x480),   640,  480,   24, SENSOR_IMAGE_FORMAT_YUV422}, 
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0},

	// YUV422 PREVIEW 2 
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0},
	{PNULL, 0, 0, 0, 0, 0}
};

        {0xa2, 0x11},

        {0x14,0x21},//8x gain ceiling, PPChrg off

        {0x50, 0x9a},//50hz banding filter value
        {0x51, 0x80},//60hz banding filter value
        {0x13,0xf7},
        {0x1e, 0x33},

        {0x68, 0xb2} 
};

LOCAL SENSOR_REG_TAB_INFO_T s_OV7690_resolution_Tab_YUV[]=
{	
        // COMMON INIT
        { ADDR_AND_LEN_OF_ARRAY(OV7690_YUV_640X480),		640,	480,	24 ,0},
        //{ ADDR_AND_LEN_OF_ARRAY(OV7690_YUV_640X480),		0,	0,	24 ,SENSOR_IMAGE_FORMAT_YUV422},
        // YUV422 PREVIEW 1
        { NULL, 0, 640, 480, 24, 0},
        //{ ADDR_AND_LEN_OF_ARRAY(OV7690_YUV_640X480),		640,	480,	24 ,SENSOR_IMAGE_FORMAT_YUV422},

        { PNULL,		0,			0,		0,	0,							0 },
        { PNULL,		0,			0,		0,	0,							0 },
        { PNULL,		0,			0,		0,	0,							0 },

        // YUV422 PREVIEW 2 
        { PNULL, 0,	0, 0,	0, 0},
        { PNULL, 0,	0, 0,	0, 0},
        { PNULL, 0,	0, 0,	0, 0},
        { PNULL, 0,	0, 0,	0, 0}  
};