diff options
Diffstat (limited to 'drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h')
-rwxr-xr-x | drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h | 514 |
1 files changed, 514 insertions, 0 deletions
diff --git a/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h b/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h new file mode 100755 index 00000000..96eefa19 --- /dev/null +++ b/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h @@ -0,0 +1,514 @@ +#ifndef BF3920_H
+#define BF3920_H
+
+// Scene Mode
+uint8_t bf3920_scene_mode_auto[] = {
+ 0x89,0x55,
+ 0xff,0xff,
+};
+
+uint8_t bf3920_scene_mode_night[] = {
+ 0x89,0x75,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t bf3920_wb_auto [] = {
+ 0x13, 0x07,
+ 0x01, 0x12,
+ 0x02, 0x22,
+ 0xff,0xff,
+};
+
+uint8_t bf3920_wb_incandescent [] = {
+ 0x13, 0x05,
+ 0x01, 0x28,
+ 0x02, 0x0a,
+
+ 0xff,0xff,
+};
+
+uint8_t bf3920_wb_fluorescent [] = {
+ 0x13, 0x05,
+ 0x01, 0x1a,
+ 0x02, 0x1e,
+ 0xff,0xff,
+};
+
+uint8_t bf3920_wb_daylight [] = {
+ 0x13, 0x05,
+ 0x01, 0x10,
+ 0x02, 0x20,
+ 0xff,0xff,
+};
+
+uint8_t bf3920_wb_cloudy [] = {
+ 0x13, 0x05,
+ 0x01, 0x0e,
+ 0x02, 0x24,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t bf3920_exposure_neg6[] = {
+ 0x56,0x28,
+ 0x55,0xb0,
+};
+
+uint8_t bf3920_exposure_neg3[] = {
+ 0x56,0x28,
+ 0x55,0x98,
+};
+
+uint8_t bf3920_exposure_zero[] = {
+ 0x56,0x28,
+ 0x55,0x00,
+};
+
+uint8_t bf3920_exposure_pos3[] = {
+ 0x56,0x28,
+ 0x55,0x18,
+};
+
+uint8_t bf3920_exposure_pos6[] = {
+ 0x56,0x28,
+ 0x55,0x38,
+};
+
+
+// Resolution
+uint8_t bf3920_1600_1200_rets[]={
+ /* 1600X1200 UXGA */
+
+ 0x1b,0x2c,
+ 0x11,0x30,//38
+ 0x8a,0x7f,//0XBF
+ 0x2a,0x0c,
+ 0x2b,0x1c,
+ 0x92,0x02,
+ 0x93,0x00,
+
+
+ //window
+ 0x4a,0x80,
+ 0xcc,0x00,
+ 0xca,0x00,
+ 0xcb,0x00,
+ 0xcf,0x00,
+ 0xcd,0x00,
+ 0xce,0x00,
+ 0xc0,0x00,
+ 0xc1,0x00,
+ 0xc2,0x00,
+ 0xc3,0x00,
+ 0xc4,0x00,
+ 0xb5,0x00,
+ 0x03,0x60,
+ 0x17,0x00,
+ 0x18,0x40,
+ 0x10,0x40,
+ 0x19,0x00,
+ 0x1a,0xb0,
+ 0x0B,0x00,
+ 0xff, 0xff,
+};
+
+uint8_t bf3920_1280_720_regs[]={
+};
+
+uint8_t bf3920_800_600_regs[]={
+
+ 0x1b,0x2c,
+ 0x11,0x30,//38
+ 0x8a,0x7f,//0XBF
+ 0x2a,0x0c,
+ 0x2b,0x1c,
+ 0x92,0x02,
+ 0x93,0x00,
+
+
+ //window
+ 0x4a,0x80,
+ 0xcc,0x00,
+ 0xca,0x00,
+ 0xcb,0x00,
+ 0xcf,0x00,
+ 0xcd,0x00,
+ 0xce,0x00,
+ 0xc0,0x00,
+ 0xc1,0x00,
+ 0xc2,0x00,
+ 0xc3,0x00,
+ 0xc4,0x00,
+ 0xb5,0x00,
+ 0x03,0x60,
+ 0x17,0x00,
+ 0x18,0x40,
+ 0x10,0x40,
+ 0x19,0x00,
+ 0x1a,0xb0,
+ 0x0B,0x10,
+ 0xff, 0xff,
+};
+
+uint8_t bf3920_640_480_regs[]={
+ 0x1b,0x2c,
+ 0x11,0x30,//38
+ 0x8a,0x7f,//0XBF
+ 0x2a,0x0c,
+ 0x2b,0x1c,
+ 0x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ading gain of G
+ 0x66,0x2a, //lens shading gain of B
+ 0xbc,0xd3,
+ 0xbd,0x5c,
+ 0xbe,0x24,
+ 0xbf,0x13,
+ 0x9b,0x5c,
+ 0x9c,0x24,
+ 0x36,0x13,
+ 0x37,0x5c,
+ 0x38,0x24,
+
+ 0x92,0x02,//Dummy Line Insert LSB
+ 0x93,0x00,
+ 0x2a,0x0c,
+ 0x2b,0x13,//Dummy Pixel Insert LSB
+
+ //initial AWB and AE
+ 0x13,0x00,
+ 0x8c,0x0b,
+ 0x8d,0xc4,
+ 0x24,0xc8,
+ 0x87,0x2d,
+ 0x01,0x12,
+ 0x02,0x22,
+ 0x13,0x07,
+
+
+
+ //black sun
+ /*
+ 0xfb,0x06, //72M
+ 0xfb,0x0a,//48M
+ 0xfb,0x0c, //36M
+ 0xfb,0x12, //24M
+ */
+
+
+
+ //denoise and edge enhancement
+ 0x70,0x01,
+ 0x72,0x62,//0x72[7:6]: Bright edge enhancement; 0x72[5:4]: Dark edge enhancement
+ 0x78,0x37,
+ 0x7a,0x29,//0x7a[7:4]: The bigger, the smaller noise; 0x7a[3:0]: The smaller, the smaller noise
+ 0x7d,0x85, //
+
+ 0x39,0xa8, //0xa0 zzg 0xa8
+ 0x3f,0x28, //0x20 zzg 0x28
+
+
+ // gamma default(low noise)
+
+ 0x40,0x20,
+ 0x41,0x25,
+ 0x42,0x23,
+ 0x43,0x1f,
+ 0x44,0x18,
+ 0x45,0x15,
+ 0x46,0x12,
+ 0x47,0x10,
+ 0x48,0x10,
+ 0x49,0x0f,
+ 0x4b,0x0e,
+ 0x4c,0x0c,
+ 0x4e,0x0b,
+ 0x4f,0x09,
+ 0x50,0x07,
+
+
+ //gamma清晰亮丽
+ /*
+ 0x40,0x28,
+ 0x41,0x26,
+ 0x42,0x24,
+ 0x43,0x22,
+ 0x44,0x1c,
+ 0x45,0x19,
+ 0x46,0x11,
+ 0x47,0x10,
+ 0x48,0x0f,
+ 0x49,0x0e,
+ 0x4b,0x0c,
+ 0x4c,0x0a,
+ 0x4e,0x09,
+ 0x4f,0x08,
+ 0x50,0x04,
+ */
+
+ /*
+ //gamma 过曝亮度好,高亮
+
+ 0x40,0x28,
+ 0x41,0x28,
+ 0x42,0x30,
+ 0x43,0x29,
+ 0x44,0x23,
+ 0x45,0x1b,
+ 0x46,0x17,
+ 0x47,0x0f,
+ 0x48,0x0d,
+ 0x49,0x0b,
+ 0x4b,0x09,
+ 0x4c,0x08,
+ 0x4e,0x07,
+ 0x4f,0x05,
+ 0x50,0x04,
+
+ //// from ryx zzg
+ 0x40,0x25,
+ 0x41,0x28,
+ 0x42,0x25,
+ 0x43,0x23,
+ 0x44,0x1b,
+ 0x45,0x18,
+ 0x46,0x15,
+ 0x47,0x11,
+ 0x48,0x10,
+ 0x49,0x0f,
+ 0x4b,0x0e,
+ 0x4c,0x0c,
+ 0x4e,0x0a,
+ 0x4f,0x06,
+ 0x50,0x05,
+*/
+
+
+
+
+ //color default
+ /*
+ 0x5c,0x00,
+ 0x51,0x32,
+ 0x52,0x17,
+ 0x53,0x8C,
+ 0x54,0x79,
+ 0x57,0x6E,
+ 0x58,0x01,
+ 0x5a,0x36,
+ 0x5e,0x38,
+ */
+
+ //color 绿色好红色主系数高
+
+ 0x5c,0x00,
+ 0x51,0x24,//16
+ 0x52,0x0b,//e
+ 0x53,0x77,//6f
+ 0x54,0x65,//66
+ 0x57,0x5e,//76
+ 0x58,0x19,//15
+ 0x5a,0x16,//16
+ 0x5e,0x60,//0x38 zzg
+
+ /*
+ //color 艳丽
+
+ 0x5c,0x00,
+ 0x51,0x2b,
+ 0x52,0x0e,
+ 0x53,0x9f,
+ 0x54,0x7d,
+ 0x57,0x91,
+ 0x58,0x21,
+ 0x5a,0x16,
+ 0x5e,0x38,
+ */
+
+
+ //color 色彩淡
+ /*
+ 0x5c,0x00,
+ 0x51,0x24,
+ 0x52,0x0b,
+ 0x53,0x77,
+ 0x54,0x65,
+ 0x57,0x5e,
+ 0x58,0x19,
+ 0x5a,0x16,
+ 0x5e,0x38,
+ */
+ //A color
+ 0x5c,0x80,
+ 0x51,0x22,
+ 0x52,0x00,
+ 0x53,0x96,
+ 0x54,0x8C,
+ 0x57,0x7F,
+ 0x58,0x0B,
+ 0x5a,0x14,
+ 0x5e,0x60, ////0x38 zzg
+ // saturn and auto contrast
+ 0x56,0x28,
+ 0x55,0x00,//when 0x56[7:6]=2'b0x,0x55[7:0]:Brightness control.bit[7]: 0:positive 1:negative [6:0]:value
+ 0xb0,0x8d,
+ 0xb1,0x15,//when 0x56[7:6]=2'b0x,0xb1[7]:auto contrast switch(0:on 1:off)
+ 0x56,0xe8,
+ 0x55,0xf0,//when 0x56[7:6]=2'b11,cb coefficient of F light
+ 0xb0,0xb8,//when 0x56[7:6]=2'b11,cr coefficient of F light
+ 0x56,0xa8,
+ 0x55,0xb8,//when 0x56[7:6]=2'b10,cb coefficient of !F light
+ 0xb0,0xa8,//when 0x56[7:6]=2'b10,cr coefficient of !F light
+ // manual rast
+
+ 0x56,0x28,
+ 0xb1,0x95,//when 0x56[7:6]=2'b0x,0xb1[7]:auto contrast switch(0:on 1:off)
+ 0x56,0xe8,
+ 0xb4,0x40,//when 0x56[7:6]=2'b11,manual contrast coefficient
+
+ //AE
+ 0x13,0x07,
+ 0x24,0x40,// AE Target
+ 0x25,0x88,// Bit[7:4]: AE_LOC_INT; Bit[3:0]:AE_LOC_GLB
+ 0x97,0x30,// Y target value1.
+ 0x98,0x18,// AE 窗口和权重 0x0a zzg
+ 0x80,0xd2,//Bit[3:2]: the bigger, Y_AVER_MODIFY is smaller 0x92
+ 0x81,0xff,//AE speed //0xe0
+ 0x82,0x30,//minimum global gain 0x30 zzg
+ 0x83,0x60, //0x60 zzg
+ 0x84,0x45, ///0x65 zzg
+ 0x85,0x7d, ///0x90 zzg
+ 0x86,0xa0,//maximum gain zzg 0xc0 0x97
+ 0x89,0x6d,//INT_MAX_MID 9d zzg
+ 0x94,0x82,//Bit[7:4]: Threshold for over exposure pixels, the smaller, the more over exposure pixels; Bit[3:0]: Control the start of AE. 0x42 zzg b2
+
+ //AWB
+ 0x6a,0x81,
+ 0x23,0x66,// green gain
+ 0xa1,0x31,
+ 0xa2,0x0b,//the low limit of blue gain for indoor scene
+ 0xa3,0x25,//the upper limit of blue gain for indoor scene
+ 0xa4,0x09,//the low limit of red gain for indoor scene
+ 0xa5,0x26,//the upper limit of red gain for indoor scene
+ 0xa7,0x9a,//Base B gain不建议修改
+ 0xa8,0x15,//Base R gain不建议修改
+ 0xa9,0x13,
+ 0xaa,0x12,
+ 0xab,0x16,
+ 0xac,0x20, //avoiding red scence when openning
+ 0xc8,0x10,
+ 0xc9,0x15,
+ 0xd2,0x78,
+ 0xd4,0x20,
+
+ ///awb base gain offset
+ 0xd0,0x11,
+ 0xd1,0x09, ///0x01 zzg
+
+
+ 0x0b,0x10, //800*600
+ 0x09,0x72, ///0x42 HSYNC delay bit[5:4]: HREF delay select, 0:no delay,01:delay 2ns,10:delay 4ns,11:delay 6ns
+ //skin
+ 0xee,0x2a,
+ 0xef,0x1b,
+
+
+};
+
+#endif
+
|