//***************************************************************************** // OmniVision 2640 (low profile lens) camera driver setup file for ONLY_CHEN //***************************************************************************** //N1 4.1 CYBERSHOT // - redone entire jpeg compression // - longer exposure time night mode 1/3 sec shutter speed // - new buffers // - 16-30fps video // - Optics testing added // - Light meter control added // - Window positioning added // - longer exposure time for auto mode 1/4 sec shutter speed // - +4 jpeg retry // - Iso gain from 80 // - New colour bar code // - W910 whitebalances // - K600 qtable // - w910 brightness property // // Information section //========================================================= info_name=OV2640_CHEN; // ONLY_CHEN info_vendor=N1; info_major_ver=4; info_minor_ver=1; seq_get_prop_0=$s1 01 $s0 08; // This property GET is put here so that it gets changed when the version number is changed // Camera characteristics section //========================================================= // I2C address is 0x60. EMP doesn't consider low bit (the R/W indicator) // to be part of address, so cam_i2c_address is (true I2C address / 2) cam_i2c_address=30; I2C_SELECT_CAMERA=$a30; // VSYNC active level high, last data is sampled before VSYNC goes inactive // HSYNC active level high, last data is sampled before HSYNC goes inactive cam_vf_sync=5; cam_ss_sync=5; // TODO: define any of these that are needed: // cam_i2c_clock_freq= // The desired I2C clock frequency in kHz (hexadecimal). Default is 100 kHz // cam_data_offset= // The number of bytes in the data stream to be // skipped before the image data appears when // taking a snapshot (hexadecimal) // cam_frame_skip= // The number of frames to be skipped before the // final image frame is captured when taking a // snapshot (hexadecimal) // cam_ss_retries= // The number of times to retry taking a snapshot // cam_ss_jpeg_buf_size_1= // cam_ss_jpeg_buf_size_2= // cam_ss_jpeg_buf_size_3= // cam_ss_jpeg_buf_size_4= // Suggested snapshot buffer size in bytes (hexadecimal) // cam_post_processing_x= // Post processing for size configuration x: // 0 = 0 degrees rotation // 1 = 90 degrees clockwise rotation // 2 = 180 degrees clockwise rotation // 3 = 270 degrees clockwise rotation // Rotation setting // for VF cam_post_processing_20=01; // for VF 320x240 @ max 15fps // for VT cam_post_processing_25=01; // for VT 96 x 128 @ 12fps cam_post_processing_26=01; // for VT 144 x 176 @ 12fps // for VR cam_post_processing_29=01; // for VR 144 x 176 @ 10fps // clock ID 9 is SYSCON_SYSCLK_13MHZ cam_vf_clock_freq=9,32C8; // Clock #9 on, frequency 13MHz cam_ss_clock_freq=9,32C8; // Clock #9 on, frequency 13MHz //----ONLY_CHEN POWER ON SEQUENCE-------------------------------------------------------------------- //---------------------------------------ONLY_CHEN------PORT NAME--------STATUS--------WAIT cam_power_on_0= 5, 2, 03, 1, 0; // ONLY_CHEN MEGA_STANDBY HIGHT 0ms cam_power_on_1= 5, 2, 04, 1, 1; // ONLY_CHEN CAM_LDO_EN HIGHT 1ms cam_power_on_2= 5, 1, 03, 0, 1; // ONLY_JIE MEGA_STANDBY(PWDN) GPIO 03, direction = 0 (read) cam_power_on_3= 5, 4, 00, 0, 1; // ONLY_CHEN I2C sequence 0 cam_power_i2c_0=$gi 5 03; // ONLY_CHEN read GPIO 03 into register 5 cam_power_on_4= 5, 1, 03, 1, 1; // ONLY_CHEN MEGA_STANDBY(PWDN) GPIO 03, direction = 1 (write) cam_power_on_5= 5, 3, 09, 32C8, 96; // ONLY_CHEN CAMSYSCLK#9 13MHz 150ms cam_power_on_6= 5, 0, 00, 0, 1; // ONLY_CHEN CIR_RES DISABLE 1ms cam_power_on_7= 5, 2, 13, 1, 1; // ONLY_CHEN CIF_STANDY ENABLE 1ms cam_power_on_8= 5, 2, 03, 0, 1; // ONLY_CHEN MEGA_STANDBY LOW 1ms //----ONLY_CHEN POWER OFF SEQUENCE------------------------------------------------------------------- //---------------------------------------ONLY_CHEN------PORT NAME--------STATUS--------WAIT cam_power_off_0= 5, 3, 09, 1, 0; // ONLY_CHEN CAMSYSCLK#9 DISABLE&INV 0ms cam_power_off_1= 5, 0, 00, 1, 1; // ONLY_CHEN CIRES_N HIGHT 1ms cam_power_off_2= 5, 2, 03, 1, 0; // ONLY_CHEN MEGA_STANDBY HIGHT 0ms cam_power_off_3= 5, 2, 13, 0, 0; // ONLY_CHEN CIF_STANDBY LOW 0ms cam_power_off_4= 5, 2, 04, 0, 3; // ONLY_CHEN CAM_LDO_EN DISABLE 3ms cam_power_off_5= 5, 2, 03, 0, 1; // ONLY_CHEN MEGA_STANDBY LOW 1ms // Support section //========================================================= // Sizes: // sup_sizes= // CAPTURE MODE // JPEG 1[280,1E0,0], // SS 640 x 480, JPEG 2[500,3C0,0], // SS 1280 x 960, JPEG 3[640,4B0,0], // SS 1600 x 1200, JPEG // YUV 11[280,1E0,0], // SS 640 x 480, YUV // DRAFT MODE 20[140,F0,56D], // VF 320 x 240, Chen VF max 13.89 FPS. Used for rotation to fix broken image // VT MODE for Vertical UI 25[60,80,4B0], // VT 96 x 128, max 12 fps 26[90,B0,4B0], // VT 144 x 176, max 12 fps // VT MODE for Horizontal UI 27[80,60,4B0], // VT 128 x 96, max 12 fps 28[B0,90,4B0], // VT 176 x 144, max 12 fps // VR MODE for Vertical UI 29[90,B0,3E8], // VR 144 x 176, fixed 10.0 fps (night mode OFF) // VR MODE 2a[140,F0,BB8], // VR 320 x 240, fixed 30.0 FPS (night mode OFF) 2b[140,F0,640], // VR 320 x 240, fixed 16.0 FPS (night mode OFF) 2c[140,F0,2EE], // VR 320 x 240, fixed 7.5 FPS (night mode ON) // VR MODE for Horizontal UI 2d[B0,90,3E8], // VT 176 x 144, fixed 10.0 fps (night mode OFF) ; //========================================================= // all viewfinder (and video record) // modes are YUV422, Y1, U, Y2, V: cam_vf_format=E400; // Most capture modes are JPEG cam_ss_format=0001; cam_ss_format_11=E400; // this one is YUV422, Y1, U, Y2, V //-- JPEG buffer sizes (only used for ITP) cam_ss_jpeg_buf_size_1=927C0; // 600 KB buffer for 640x480 JPEG snap cam_ss_jpeg_buf_size_2=C3500; // 800 KB buffer for 1280x960 JPEG snap cam_ss_jpeg_buf_size_3=E1000; // 920 KB buffer for 1600x1200 JPEG snap //========================================================= // Properties: // // NOTE: properties 11 (0x0b) and 12 (0x0c) are GET only // property 0 is used for driver version, so it is defined near the top of this file // sup_properties= 0[3,F,9], // Exposure 1[0,4,0], // White balance 2[0,3,0], // Flicker 3[0,1,0], // Vertical mirror 4[0,1,0], // Horizontal mirror 5[0,1,0], // JPEG compression level 6[a,28,a], // Zoom (NOTE: this gives 1x to 4x) 7[0,1,0], // Night mode 8[0,4,0], // Effect b[0,0,0], // Get Exif Information 1 c[0,0,0], // Get Exif Information 2 d[0,1,0], // internal LED flash e[0,1,0], // external xenon flash 26[0,c,0], // Optics testing property 27[0,5,1], // Light meter control 28[0,4,0], // Window positioning 1e[0,1,0], // Test Pattern for ITP ; //========================================================= // change bank select register (0xff) REG_BANK_00=ff 00 $f; REG_BANK_01=ff 01 $f; CLEAR_BIT_0=$b0 00 0 1; SET_BIT_0=$b0 01 0 1; CLEAR_BIT_1=$b0 00 1 1; SET_BIT_1=$b0 01 1 1; CLEAR_BIT_2=$b0 00 2 1; SET_BIT_2=$b0 01 2 1; CLEAR_BIT_3=$b0 00 3 1; SET_BIT_3=$b0 01 3 1; CLEAR_BIT_4=$b0 00 4 1; SET_BIT_4=$b0 01 4 1; CLEAR_BIT_5=$b0 00 5 1; SET_BIT_5=$b0 01 5 1; CLEAR_BIT_6=$b0 00 6 1; SET_BIT_6=$b0 01 6 1; CLEAR_BIT_7=$b0 00 7 1; SET_BIT_7=$b0 01 7 1; REGISTER_READ= !0 $r1 0; // read 1 byte from cam reg !0 into internal 0 REGISTER_WRITE=!0 $w0 $f; // write internal register 0 to selected register // Reads out register !0, performs operation !1, then writes back // register !0. Register is read so that high byte is in internal // register 1, and low byte is in internal register 0. REGISTER_MODIFY= #REGISTER_READ(!0) // read 2 bytes from cam reg !0 into internal 0 and 1 !1 // perform !1 #REGISTER_WRITE(!0) // write back to selected register ; FRAME_OUTPUT_ON= #REG_BANK_00 #REGISTER_MODIFY(dd, #SET_BIT_4); FRAME_OUTPUT_OFF= #REG_BANK_00 #REGISTER_MODIFY(dd, #CLEAR_BIT_4); SELECT_PREMIER_OR_FLEX= $c5 00 // $"camdriver0.dat using a premier setting" !0 $cl // $"camdriver0.dat using a flextronics setting" !1 $cx ; INPUT_CLOCK_SETTINGS_REV2B = #REG_BANK_01 // 24MHz //3d 34 $f 2b 00 $f //39 82 $f 35 c8 $f 22 0f $f 37 42 $f 23 00 $f 34 a0 $f //36 12 $f 06 08 $f 07 c0 $f 0d b7 $f 0e 39 $f 4c 00 $f // 13MHz 3d 28 $f 2b 9c $f 35 88 $f 22 09 $f 37 40 $f 23 00 $f 34 a0 $f 36 1a $f 06 02 $f 07 c0 $f 0d b7 $f 0e 01 $f 4c 00 $f ; FLICKER_BASE_SETTINGS_REV2B= #REG_BANK_01 0c 3a $f 56 40 $f 0f 47 $f 36 1a $f 51 c0 $f 52 30 $f 53 20 $f 54 30 $f 55 87 $f 57 0e $f 59 0e $f 7e 60 $f 58 c3 $f 59 00 $f 7e f0 $f 59 01 $f 7e f0 $f 59 02 $f 7e 80 $f 59 03 $f 7e 60 $f 59 04 $f 7e f0 $f 59 05 $f 7e 80 $f 59 06 $f 7e 04 $f 59 07 $f 7e a3 $f 59 08 $f 7e 54 $f 59 09 $f 7e 20 $f 59 0a $f 7e 80 $f 59 0b $f 7e 01 $f 59 0c $f 7e 0f $f 59 0d $f 7e 20 $f 59 0f $f 7e 00 $f 59 10 $f 7e 7e $f 56 29 $f ; SENSOR_30FPS_SVGA_MODE= // sensor 30fps SVGA mode setting #REG_BANK_01 12 40 $f 17 11 $f 18 43 $f 19 00 $f 1a 4b $f 32 09 $f 6d 00 $f 3d 30 $f 55 a7 $f 39 12 $f 35 da $f 22 19 $f 37 c3 $f 23 00 $f 34 c0 $f 36 1a $f 06 88 $f 07 c0 $f 0d 87 $f 0e 41 $f 4c 00 $f #REG_BANK_00 e0 04 $f 87 d5 $f e0 00 $f ; SENSOR_15FPS_UXGA_MODE= // sensor 15fps UXGA mode setting #REG_BANK_01 12 00 $f 17 11 $f 18 75 $f 19 01 $f 1a 97 $f 32 36 $f 6d 80 $f 3d 28 $f 55 87 $f 39 02 $f 35 88 $f 22 09 $f 37 40 $f 23 00 $f 34 a0 $f 36 1a $f 06 02 $f 07 c0 $f 0d b7 $f 0e 01 $f 4c 00 $f #REG_BANK_00 e0 04 $f 87 d0 $f e0 00 $f ; FRAME_RATE_30_FPS= #REG_BANK_01 11 00 $f 2b 61 $f 4f ca $f 50 a8 $f 5a 23 $f 46 00 $f 47 00 $f; FRAME_RATE_15_FPS= #REG_BANK_01 11 00 $f 2b 9c $f 4f bb $f 50 9c $f 5a 57 $f 46 00 $f 47 00 $f; FRAME_RATE_13_FPS= #REG_BANK_01 11 00 $f 2b 9c $f 4f bb $f 50 9c $f 5a 57 $f 46 70 $f 47 00 $f; // 13.89fps of VF FRAME_RATE_12_FPS= #REG_BANK_01 11 00 $f 2b 9c $f 4f bb $f 50 9c $f 5a 79 $f 46 38 $f 47 01 $f; FRAME_RATE_10_FPS= #REG_BANK_01 11 00 $f 2b 9c $f 4f bb $f 50 9c $f 5a 9b $f 46 70 $f 47 02 $f; FRAME_RATE_7_5_FPS=#REG_BANK_01 11 01 $f 2b 9a $f 4f 5d $f 50 4e $f 5a cf $f 46 00 $f 47 00 $f 59 0b $f 7e 21 $f; FRAME_RATE_7_0_FPS=#REG_BANK_01 11 01 $f 2b 58 $f 4f 61 $f 50 51 $f 5a be $f 46 89 $f 47 00 $f 59 0b $f 7e 21 $f; MANUAL_EXP=#REG_BANK_01 13 e0 $f; // Enable manually set Exposure/Gain AUTO_EXP= #REG_BANK_01 13 e5 $f; // Disable manually set Exposure/Gain STOP_AE_PRE= #REG_BANK_01 13 e1 $f 24 FF $f 25 00 $f 26 F0 $f; STOP_AE_POST=#REG_BANK_01 5d 00 $f 5e 00 $f 5f 00 $f 60 00 $f; // freeze AEC/AGC START_AE= #REG_BANK_01 5d 55 $f 5e 7D $f 5f 7D $f 60 55 $f $u00 #REG_BANK_01 13 e5 $f; // restart AEC/AGC MANUAL_WB=#REG_BANK_00 #REGISTER_MODIFY(c3 $b0 03 2 2) c7 40 $f cc !0 $f // r_gain cd !1 $f // g_gain ce !2 $f // b_gain ; FREEZ_AWB=#REG_BANK_00 #REGISTER_MODIFY(c3 #CLEAR_BIT_3); START_AWB=$u01; // NOTE: use propoerty 1 to re-start AWB OUTPUT_FORMAT_JPEG= #REG_BANK_00 E0 14 $f E1 77 $f E5 1F $f D7 03 $f DA 10 $f D3 04 $f E0 00 $f; OUTPUT_FORMAT_YUV422= #REG_BANK_00 E0 04 $f E1 67 $f D7 01 $f DA 00 $f E0 00 $f; //----------------------------------------------------------------------- // name : COMP_UINT32_R0_R1 // description : Compare param0 with param1 as the unsigned 32bit data // input : REG_0 = A // REG_1 = B // output : REG_0 // A=B => result = 0 // A result = 1 // A>B => result = 2 // reg usage : REG_0, REG_1 //----------------------------------------------------------------------- COMP_UINT32_R0_R1 = $-0 r1 // Subtract REG_1 from REG_0 $c0 00 // if REG_0 is 0 then $s0 00 // A = B : pass result 0 in REG_0. $cl // else $>0 8 $>0 8 $>0 8 $>0 7 // Shift 31bit to the right $c0 01 // if REG_0 is 0x01 then $s0 01 // A < B : pass result 01 in REG_0 $cl // else $s0 02 // A > B : pass result 02 in REG_0 $cx // endif $cx; // endif //----------------------------------------------------------------------- // name : GET_EXPOSURE // description : Get current AEC register value from camera // input : none // output : REG_0 // reg usage : REG_0, REG_1, REG2 //----------------------------------------------------------------------- GET_EXPOSURE = #REG_BANK_01 #REGISTER_READ(04) $m2 0 // Get Value2 to REG_2 #REG_BANK_01 #REGISTER_READ(10) $m1 0 // Get Value1 to REG_1 #REG_BANK_01 #REGISTER_READ(45) // Get Value0 to REG_0 $b0 00 6 2 $<0 9 $<0 f $>0 f $>0 9 $<0 a // (Value0&0x3f)<<10 $<1 2 // Value1<<2 $b2 00 2 6 $<2 9 $<2 f $>2 f $>2 9 // Value2&0x03 $+0 r1 $+0 r2; // (((Value0&0x3f)<<10)|(Value1<<2)|(Value2&0x03)) //----------------------------------------------------------------------- // name : GET_GAIN // description : Get current AGC register value from camera // input : none // output : REG_0 // reg usage : REG_0, REG_1 //----------------------------------------------------------------------- GET_GAIN = #REG_BANK_01 #REGISTER_READ(45) $m1 0 // Get MValue to REG_1 #REG_BANK_01 #REGISTER_READ(00) // Get LValue to REG_0 $>1 6 $<1 8 $+0 r1; // ((MValue >>6)<<8)|LValue //----------------------------------------------------------------------- // name : GET_FRAME_RATE // description : Get current Frame Rate from camera // [Auto Pixel Clock mode] // if 0x4D[5:4] == 2 // 0x0F0 <= GAIN < 0x0FF : 1/2 // 0x1F0 <= GAIN < 0x1FF : 1/4 // 0x3F0 <= GAIN : 1/8 // NOTE: must change this sequence if it uses auto dummy line mode // input : none // output : REG_3 (1:15fps, 2:15/2=7.5fps, 4:15/4=3.75fps, 8:15/8=1.857fps) // reg usage : REG_0, REG_3 //----------------------------------------------------------------------- GET_FRAME_RATE = #GET_GAIN $m3 0 $>3 6 // R3 = AGC[9:6] #REGISTER_READ(4D) $b0 00 6 2 $>0 4 // R0 = 0x4D[5:4] $c0 00 $>3 3 // R3 = AGC[9] $cl $c0 01 $>3 2 // R3 = AGC[9:8] $cl $c0 02 $>3 1 // R3 = AGC[9:7] $cl $cx $cx $cx $c3 01 $s3 04 $cl $c3 03 $s3 05 $cl $c3 07 $s3 04 $cl $s3 03 $cx $cx $cx; //----------------------------------------------------------------------- // name : CALC_GAIN_SUB // description : Subroutine of calculation GAIN // input : REG_0: GAIN, !0: Shift // output : REG_0 // reg usage : REG_0, REG_1, REG_3 //----------------------------------------------------------------------- CALC_GAIN_SUB= !0 $b3 00 1 7 $<3 9 $<3 f $>3 f $>3 9 // REG3 = ( & bit_mask ) >> !1 $+3 01 $*0 r3 // REG0 *= (REG3 + 1) ; //************************************************************************* // name : GET_SHUTTERSPEED // description : Get Exposure Time in previous capture. // input : none // output : REG0 ExposureTime [1/10,000s = 100us] // reg usage : REG0, REG1, REG2, REG3 // limitation : This macro should be used during locked AGC and AEC. //************************************************************************* GET_SHUTTERSPEED = #GET_FRAME_RATE // R3 = FrameRate #GET_EXPOSURE // $"====AEC=%0====" // ExpTime = *R3*1,000,000/15/1248[us] = *R3*10,000/15/1248[100us] $s1 27 $<1 8 $+1 10 // REG1 = 10,000 (= 0x2710) $*0 r3 // REG0 *= R3 $*0 r1 // REG0 *= 10,000 $/0 0F // REG0 /= 15 (0x0F) $s1 04 $<1 8 $+1 E0 // REG1 = 1248 (= 0x4E0) $/0 r1 // REG0 /= 1248 = ExpTime[100us] // $"====SHUT=%0====" ; //************************************************************************* // name : GET_ISOVALUE // description : Get ISOSpeedRatings in previous capture. x1: ISO80(0x50) // GAIN = ( AGC[9:4] + 1 ) * ( 1 + AGC[3:0] / 16 ) // Default GAIN = x1.0: ISO80 (0x50) // input : none // output : REG0 ISOSpeedRatings // reg usage : REG0 REG1 REG3 (can't use REG2) // limitation : This macro should be used during locked AGC and AEC. //************************************************************************* GET_ISOVALUE = #GET_GAIN //$"====AGC=%0====" $m1 0 $m3 1 // init: R3 = R1 = R0; // R1 = 1 + AGC[3:0]/16 // R3 = AGC[9:4] + 1 // ISO = ISO80 * R1 * R3 $b1 00 4 4 $<1 c $<1 f $>1 f $>1 c // R1 = AGC[3:0] $<1 4 $/1 10 $+1 10 // R1 = 1+AGC[3:0]/16 [U4.4] $>3 4 // R3 = AGC[9:4] // for Auto Pixel Clock #REGISTER_READ(4D) $b0 00 6 2 $>0 4 // 0x4D[5:4] $c0 01 $b3 00 4 2 // R3 = AGC[9:4] & 0x0F $cl $c0 02 $b3 00 3 3 // R3 = AGC[9:4] & 0x07 $cl $c0 03 $b3 00 2 4 // R3 = AGC[9:4] & 0x03 $cl $cx $cx $cx $+3 01 // R3 += 1 $*3 r1 // GAIN = R3 * R1 [U8.4] $s0 50 // ISO80 * GAIN [U16.0] $*0 r3 $>0 4 //$"====ISO=%0====" ; //=============================================================== // Macros for JPEG sequence //=============================================================== // Wait time, longer than 1 frame WAIT_1_FRAME= #GET_FRAME_RATE // $c3 02 $d0085 // 133ms = 7.5fps // $cl $c3 04 $d0120 // 288ms = 3.75fps // $cl $c3 08 $d0215 // 533ms = 1.875fps // $cl $d0042 // 66ms = 15fps $c3 02 $d0090 // 144ms = 6.945fps $cl $c3 04 $d0120 // 288ms = 3.4725fps $cl $c3 08 $d0240 // 576ms = 1.73625fps $cl $d0047 // 66ms = 13.89fps $cx $cx $cx ; JPEG_ONESHOT_PRE= #REG_BANK_00 EB 20 $f E0 14 $f 29 E7 $f #STOP_AE_PRE #WAIT_1_FRAME #STOP_AE_POST; JPEG_ONESHOT_POST= #REG_BANK_00 E0 00 $f 29 FF $f EB 72 $f; JPEG_ONESHOT_RETRY=#REG_BANK_00 EB 20 $f #WAIT_1_FRAME; JPEG_ONESHOT_END= #REG_BANK_00 EB 30 $f; GET_JPEG_Q_SCALE= #REG_BANK_00 #REGISTER_READ(44); SET_JPEG_Q_SCALE= #REG_BANK_00 44 !0 $f; CLR_JPEG_ERROR_FLG=#REG_BANK_00 e9 08 $f; cam_ss_retries=04; // the number of JPEG retry JPEG_RETRY_INIT= $sf 00; // NOTE: REG_F is reserved for JEPG retry //--------------------------------------------------------------- // Mirroring Macros //--------------------------------------------------------------- // These macros mirror the sensor output SENSOR_MIRROR_V_OFF=#REG_BANK_01 #REGISTER_MODIFY(04, #CLEAR_BIT_6 #CLEAR_BIT_4); SENSOR_MIRROR_V_ON= #REG_BANK_01 #REGISTER_MODIFY(04, #SET_BIT_6 #SET_BIT_4); SENSOR_MIRROR_H_OFF=#REG_BANK_01 #REGISTER_MODIFY(04, #CLEAR_BIT_7); SENSOR_MIRROR_H_ON= #REG_BANK_01 #REGISTER_MODIFY(04, #SET_BIT_7); seq_ping=#REG_BANK_01 #REGISTER_READ(0A); cam_ping_result=26; //---------------------------------------------------------------- // JPEG compression (Q scaling factor) tables for JPEG retry // // NOTE: OV provided "Normal" (08), "High" (10), "Fine" (04) // NOTE: Reserved Internal Registers for JPEG retry // REG_B: 1st Qs, REG_C: 2nd Qs, // REG_D: 3rd Qs, REG_E: last Qs, // REG_F: retry counter JPEG_Q_SCALE_NORMAL= $z0 $c0 01 $sb 02 $sc 04 $sd 06 $se 08 $cl $c0 02 $sb 02 $sc 04 $sd 06 $se 08 $cl $c0 03 $sb 02 $sc 04 $sd 06 $se 08 $cl // not JPEG $cx $cx $cx; JPEG_Q_SCALE_FINE= $z0 $c0 01 $sb 01 $sc 02 $sd 03 $se 04 $cl $c0 02 $sb 01 $sc 02 $sd 03 $se 04 $cl $c0 03 $sb 01 $sc 02 $sd 03 $se 04 $cl // not JPEG $cx $cx $cx; JPEG_Q_SCALE_NORMAL_XENON= $z0 $c0 01 $sb 03 $sc 05 $sd 07 $se 09 $cl $c0 02 $sb 03 $sc 05 $sd 07 $se 09 $cl $c0 03 $sb 03 $sc 05 $sd 07 $se 09 $cl // not JPEG $cx $cx $cx; JPEG_Q_SCALE_FINE_XENON= $z0 $c0 01 $sb 02 $sc 04 $sd 06 $se 08 $cl $c0 02 $sb 02 $sc 04 $sd 06 $se 08 $cl $c0 03 $sb 02 $sc 04 $sd 06 $se 08 $cl // not JPEG $cx $cx $cx; JPEG_RETRY_SET_QS= // REG_F: retry counter $cf 00 #SET_JPEG_Q_SCALE($wb) $cl $cf 01 #SET_JPEG_Q_SCALE($wc) $cl $cf 02 #SET_JPEG_Q_SCALE($wd) $cl #SET_JPEG_Q_SCALE($we) $cx $cx $cx $+f 04 // Increment retry counter ; //=============================================================== // Macros for Xenon flash sequence //=============================================================== // while (!(ReadRegister(0xE9) & 0x04)); WHILE_REG_E9= #REGISTER_READ(E9) $b0 00 3 5 $b0 00 0 2 $c0 00 $s0 01 $d0001 $cl $s0 00 $cx ; JPEG_ONESHOT_XENON= #REG_BANK_00 E9 77 $f $d0001 [0 64 #WHILE_REG_E9] // while (!(ReadRegister(0xE9) & 0x04)); (NOTE: limmited 100 times) E9 04 $f ; XENON_PULSE_OFF= #REG_BANK_01 4B 00 $f; // turn off strobe pulse XENON_PULSE_ON= #REG_BANK_01 4B 80 $f; // turn on strobe pulse after 3rd frame vsync blanking period //--------------------------------------------------------------- // NOTE: Reserved REG_8: Xenon auto flash (0=none flash, 1=flash) // TODO: determine criterion for judge flash //--------------------------------------------------------------- XENON_JUDGE_AUTO_FLASH= $s8 00 // init: none flash #GET_GAIN // R0 = AGC $s1 3E // R1 = ISO600 #COMP_UINT32_R0_R1 $c0 02 // if ( AGC > ISO600 ) { $s8 01 // R8 = 1 (do flash) $cl $cx // } ; //--------------------------------------------------------------- // set fixed AEC/AGC for Xenon flash //--------------------------------------------------------------- XENON_SET_AE_AWB= #REG_BANK_01 #MANUAL_EXP // for VF 15.00fps // set ExposureTime for Xenon: MAX 1247(0x4df)line at UXGA mode // 45 01 $f // 0x45[5:0] = 0x01 & 0x45[7:6] = 0x00 // 10 37 $f // 0x10[7:0] = 0x37 // #REGISTER_MODIFY(04, $b0 03 0 2) // 0x04[1:0] = 0x03 // for VF 13.89fps // set ExposureTime for Xenon: MAX 1360(0x550)line at UXGA mode 45 01 $f // 0x45[5:0] = 0x01 & 0x45[7:6] = 0x00 10 54 $f // 0x10[7:0] = 0x54 #REGISTER_MODIFY(04, $b0 00 0 2) // 0x04[1:0] = 0x00 // set Gain for Xenon // ISO=1SO605=x5.5: x5.5=4*(1+6/16) -> 0x036 00 36 $f // 0x00[7:0] = 0x35 #MANUAL_WB(60, 48, 40) // R,G,B ; XENON_END= #AUTO_EXP #START_AWB // AWB restart ; seq_ping=#REG_BANK_01 #REGISTER_READ(0A); cam_ping_result=26; //================================================ //=============== PROPERTIES ===================== //================================================ // NOTE: Reserved REG_9: ExpTime, REG_A: ISO seq_get_prop_b = $m0 a // load ISO from REG_A $m1 0 $<0 9 $<0 f $>0 f $>0 9 // R0 = L_ISO = ISO & 0x000000FF $>1 8 $<1 9 $<1 f $>1 f $>1 9 // R1 = H_ISO = (ISO>>8) & 0x000000FF $m2 9 // load ExpTime from REG_9 $m3 2 $<2 9 $<2 f $>2 f $>2 9 // R2 = L_SHUTTERSPEED = SHT & 0x000000FF $>3 8 $<3 9 $<3 f $>3 f $>3 9 // R3 = H_SHUTTERSPEED = (SHT>>8) & 0x000000FF ; //----------------------------------------------------------------------- // name : CHECK_FLASHED // description : checking of flashed LED/Xenon // input : none // output : REG_2 (0 = not flashed, 1 = flashed) // reg usage : REG_0 RGE_1 REG_2 REG_8(Reserved) //----------------------------------------------------------------------- CHECK_FLASHED= $p0 0d // LED $p1 0e // Xenon $c0 01 $s2 01 // flashed LED $cl $c1 00 $s2 00 $cl $c8 01 $s2 01 // flashed Xenon $cl $s2 00 $cx $cx $cx ; seq_get_prop_c= #GET_JPEG_Q_SCALE $m3 0 // R3 = Q scaling factor #CHECK_FLASHED // R2 = Flash (0 = not flashed, 1 = flashed) $s1 00 // R1 = Distance (0 = unknown) $p0 01 $c0 00 $cl $s0 01 $cx // R0 = White balance (0 = auto, 1 = manual) ; // --- Brightness property 0 --------------------- // // 0 => -3 EV 1=> -(2 2/3) EV .... // 9 => 0 EV .... // 15 => 2 EV //------------------------------------------------ //seq_set_prop_0_0=; // -3.0EV (no supported) //seq_set_prop_0_1=; // -2.7EV (no supported) //seq_set_prop_0_2=; // -2.3EV (no supported) seq_set_prop_0_3=#REG_BANK_01 7C 00 $f 24 10 $f 25 08 $f 26 20 $f; // -2.0EV seq_set_prop_0_4=#REG_BANK_01 7C 00 $f 24 13 $f 25 0B $f 26 20 $f; // -1.7EV seq_set_prop_0_5=#REG_BANK_01 7C 00 $f 24 18 $f 25 0F $f 26 30 $f; // -1.3EV seq_set_prop_0_6=#REG_BANK_01 7C 00 $f 24 1E $f 25 13 $f 26 40 $f; // -1.0EV seq_set_prop_0_7=#REG_BANK_01 7C 00 $f 24 24 $f 25 19 $f 26 50 $f; // -0.7EV seq_set_prop_0_8=#REG_BANK_01 7C 00 $f 24 2E $f 25 23 $f 26 61 $f; // -0.3EV seq_set_prop_0_9=#REG_BANK_01 7C 00 $f 24 38 $f 25 2C $f 26 61 $f; // default seq_set_prop_0_a=#REG_BANK_01 7C 00 $f 24 44 $f 25 38 $f 26 81 $f; // 0.3EV seq_set_prop_0_b=#REG_BANK_01 7C 00 $f 24 57 $f 25 4B $f 26 A2 $f; // 0.7EV seq_set_prop_0_c=#REG_BANK_01 7C 00 $f 24 6A $f 25 5E $f 26 C3 $f; // 1.0EV seq_set_prop_0_d=#REG_BANK_01 7C 00 $f 24 81 $f 25 75 $f 26 F3 $f; // 1.3EV seq_set_prop_0_e=#REG_BANK_01 7C 00 $f 24 A8 $f 25 9C $f 26 F5 $f; // 1.7EV seq_set_prop_0_f=#REG_BANK_01 7C 00 $f 24 CE $f 25 C2 $f 26 F6 $f; // 2.0EV // --- White balance property 1 ------------------ // // 0 => auto 1 => incandescent 2 => fluorescent // 3 => clear sky 4 => cloudy //------------------------------------------------ seq_set_prop_1_0=#REG_BANK_00 c3 ef $f c5 11 $f c6 51 $f c7 00 $f b6 36 $f b8 4c $f b7 34 $f b9 4a $f b3 cc $f b4 be $f b5 22 $f b0 50 $f b1 41 $f b2 01 $f c4 9e $f; seq_set_prop_1_1=#MANUAL_WB(40, 44, 58); // R,G,B seq_set_prop_1_2=#MANUAL_WB(44, 40, 4A); seq_set_prop_1_3=#MANUAL_WB(54, 42, 40); seq_set_prop_1_4=#MANUAL_WB(60, 48, 40); // --- Flicker correction property 2 ------------- // // 0 => auto, 1 => 50 Hz, 2 => 60 Hz, // TODO: 3 => disable //------------------------------------------------ seq_set_prop_2_0=#REG_BANK_01 0C 3A $f 56 29 $f; seq_set_prop_2_1=#REG_BANK_01 0C 3C $f 56 40 $f; seq_set_prop_2_2=#REG_BANK_01 0C 38 $f 56 40 $f; // seq_set_prop_2_3=; // --- Vertical mirror property 3 ---------------- // // 0 => off, 1 => on //------------------------------------------------ seq_set_prop_3= #REG_BANK_01 #REGISTER_MODIFY(04, $b0 %0 6 1 $b0 %0 4 1); // --- Horizontal mirror property 4 -------------- // // 0 => off, 1 => on //------------------------------------------------ seq_set_prop_4= #REG_BANK_01 #REGISTER_MODIFY(04, $b0 %0 7 1); // --- JPEG Compression property 5 --------------- // // 0 => normal // 1 => low compression ("Fine" quality) //------------------------------------------------ seq_set_prop_5_0= // normal quality $p1 0e $c1 00 #JPEG_Q_SCALE_NORMAL $cl $c8 01 #JPEG_Q_SCALE_NORMAL_XENON $cl #JPEG_Q_SCALE_NORMAL $cx $cx; seq_set_prop_5_1= // fine quality $p1 0e $c1 00 #JPEG_Q_SCALE_FINE $cl $c8 01 #JPEG_Q_SCALE_FINE_XENON $cl #JPEG_Q_SCALE_FINE $cx $cx; // --- Zoom property 6 --------------------------- // // 10 => 1.0 x zoom // 11 => 1.1 x zoom // ... // 25 => 2.5 x zoom // many of these values only work with certain sizes // if zoom selection is too great for current size, // then zoom will be 1.0x // // Registers used: // 1 - size config // 2 - zoom selection //------------------------------------------------ SIZE_640_480_ZOOM= // 640 x 480: zoom from 1.0 to 2.5 Default is 1.0, so put that one last $c2 0b 50 89 $f 51 6c $f 52 11 $f 53 48 $f 54 36 $f 55 88 $f $s0 04 $cl $c2 0c 50 89 $f 51 4e $f 52 fa $f 53 84 $f 54 64 $f 55 08 $f $s0 04 $cl $c2 0d 50 00 $f 51 34 $f 52 e7 $f 53 b8 $f 54 8a $f 55 08 $f $s0 04 $cl $c2 0e 50 00 $f 51 1e $f 52 d6 $f 53 e4 $f 54 ac $f 55 08 $f $s0 04 $cl $c2 0f 50 00 $f 51 0b $f 52 c8 $f 53 0e $f 54 c8 $f 55 09 $f $s0 04 $cl $c2 10 50 00 $f 51 fa $f 52 bc $f 53 2c $f 54 de $f 55 01 $f $s0 04 $cl $c2 11 50 00 $f 51 eb $f 52 b0 $f 53 4a $f 54 f8 $f 55 01 $f $s0 02 $cl $c2 12 50 00 $f 51 de $f 52 a7 $f 53 68 $f 54 08 $f 55 11 $f $s0 02 $cl $c2 13 50 00 $f 51 d3 $f 52 9e $f 53 7c $f 54 1c $f 55 11 $f $s0 02 $cl $c2 14 50 00 $f 51 c8 $f 52 96 $f 53 90 $f 54 2a $f 55 11 $f $s0 02 $cl $c2 15 50 00 $f 51 be $f 52 8f $f 53 a4 $f 54 38 $f 55 11 $f $s0 02 $cl $c2 16 50 00 $f 51 b6 $f 52 88 $f 53 b8 $f 54 48 $f 55 11 $f $s0 02 $cl $c2 17 50 00 $f 51 ae $f 52 82 $f 53 c8 $f 54 54 $f 55 11 $f $s0 02 $cl $c2 18 50 00 $f 51 a7 $f 52 7d $f 53 d6 $f 54 5e $f 55 11 $f $s0 02 $cl $c2 19 50 00 $f 51 a0 $f 52 78 $f 53 e0 $f 54 66 $f 55 11 $f $s0 02 $cl 50 89 $f 51 90 $f 52 2c $f 53 00 $f 54 00 $f 55 88 $f $s0 04 $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a A0 $f 5b 78 $f 5c 00 $f d3 $w0 $f ; SIZE_1280_960_ZOOM= // 1280 x 960: zoom from 1.0 to 1.2 $c2 0b 50 00 $f 51 6c $f 52 11 $f 53 50 $f 54 3e $f 55 88 $f $cl $c2 0c 50 00 $f 51 4d $f 52 fa $f 53 8c $f 54 6a $f 55 08 $f $cl 50 00 $f 51 90 $f 52 2C $f 53 00 $f 54 00 $f 55 88 $f $cx $cx 5a 40 $f 5b F0 $f 5c 01 $f d3 04 $f ; SIZE_1600_1200_ZOOM= // 1600 x 1200: only 1.0 zoom 50 00 $f 51 90 $f 52 2C $f 53 00 $f 54 00 $f 55 88 $f 5a 90 $f 5b 2c $f 5c 05 $f d3 04 $f ; SIZE_176_132_ZOOM= // 176 x 132: zoom from 1.0 to 2.5 $c2 0b 50 9B $f 51 68 $f 52 11 $f 53 52 $f 54 3c $f 55 88 $f $cl $c2 0c 50 92 $f 51 4C $f 52 FA $f 53 88 $f 54 6a $f 55 08 $f $cl $c2 0d 50 92 $f 51 34 $f 52 E7 $f 53 B8 $f 54 90 $f 55 08 $f $cl $c2 0e 50 92 $f 51 1C $f 52 D6 $f 53 E8 $f 54 b2 $f 55 08 $f $cl $c2 0f 50 92 $f 51 0C $f 52 C8 $f 53 08 $f 54 CC $f 55 09 $f $cl $c2 10 50 92 $f 51 FC $f 52 BC $f 53 2A $f 54 E0 $f 55 01 $f $cl $c2 11 50 92 $f 51 EC $f 52 B0 $f 53 4A $f 54 F8 $f 55 01 $f $cl $c2 12 50 92 $f 51 E0 $f 52 A7 $f 53 62 $f 54 12 $f 55 11 $f $cl $c2 13 50 89 $f 51 D4 $f 52 9E $f 53 78 $f 54 1C $f 55 11 $f $cl $c2 14 50 92 $f 51 C8 $f 52 96 $f 53 92 $f 54 34 $f 55 11 $f $cl $c2 15 50 92 $f 51 C0 $f 52 8F $f 53 A2 $f 54 44 $f 55 11 $f $cl $c2 16 50 92 $f 51 B4 $f 52 88 $f 53 BA $f 54 4C $f 55 11 $f $cl $c2 17 50 89 $f 51 AE $f 52 82 $f 53 C4 $f 54 54 $f 55 11 $f $cl $c2 18 50 89 $f 51 A6 $f 52 7D $f 53 D4 $f 54 62 $f 55 11 $f $cl $c2 19 50 89 $f 51 A0 $f 52 78 $f 53 E0 $f 54 6A $f 55 11 $f $cl 50 9b $f 51 90 $f 52 2c $f 53 00 $f 54 00 $f 55 88 $f $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a 2C $f 5b 21 $f 5c 00 $f d3 04 $f ; SIZE_220_168_ZOOM= // 220 x 168: zoom from 1.0 to 2.5 $c2 0b 50 92 $f 51 6c $f 52 11 $f 53 4a $f 54 38 $f 55 88 $f $cl $c2 0c 50 92 $f 51 4C $f 52 FA $f 53 8a $f 54 68 $f 55 08 $f $cl $c2 0d 50 92 $f 51 34 $f 52 E7 $f 53 BA $f 54 8C $f 55 08 $f $cl $c2 0e 50 92 $f 51 1C $f 52 D6 $f 53 EA $f 54 AC $f 55 08 $f $cl $c2 0f 50 92 $f 51 0C $f 52 C8 $f 53 0E $f 54 C8 $f 55 09 $f $cl $c2 10 50 92 $f 51 FC $f 52 BC $f 53 28 $f 54 E4 $f 55 01 $f $cl $c2 11 50 92 $f 51 EC $f 52 B0 $f 53 4a $f 54 F8 $f 55 01 $f $cl $c2 12 50 89 $f 51 E0 $f 52 A7 $f 53 60 $f 54 0e $f 55 11 $f $cl $c2 13 50 89 $f 51 D2 $f 52 9E $f 53 7C $f 54 1E $f 55 11 $f $cl $c2 14 50 89 $f 51 C8 $f 52 96 $f 53 90 $f 54 2E $f 55 11 $f $cl $c2 15 50 89 $f 51 BE $f 52 8F $f 53 A4 $f 54 3E $f 55 11 $f $cl $c2 16 50 89 $f 51 B6 $f 52 88 $f 53 B6 $f 54 4a $f 55 11 $f $cl $c2 17 50 89 $f 51 AE $f 52 82 $f 53 C4 $f 54 56 $f 55 11 $f $cl $c2 18 50 89 $f 51 A6 $f 52 7D $f 53 D6 $f 54 5E $f 55 11 $f $cl $c2 19 50 89 $f 51 A0 $f 52 78 $f 53 E0 $f 54 6a $f 55 11 $f $cl 50 92 $f 51 90 $f 52 2c $f 53 00 $f 54 00 $f 55 88 $f $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a 37 $f 5b 2a $f 5c 00 $f d3 04 $f ; SIZE_320_240_ZOOM= // 320 x 240: zoom from 1.0 to 4.0 $c2 0b 50 92 $f 51 6c $f 52 11 $f 53 4e $f 54 36 $f 55 88 $f $s0 04 $cl $c2 0c 50 92 $f 51 4c $f 52 fa $f 53 8a $f 54 68 $f 55 08 $f $s0 04 $cl $c2 0d 50 89 $f 51 34 $f 52 e7 $f 53 b8 $f 54 8a $f 55 08 $f $s0 04 $cl $c2 0e 50 89 $f 51 1e $f 52 d6 $f 53 e6 $f 54 ae $f 55 08 $f $s0 04 $cl $c2 0f 50 89 $f 51 0a $f 52 c8 $f 53 0e $f 54 cc $f 55 09 $f $s0 04 $cl $c2 10 50 89 $f 51 fa $f 52 bc $f 53 2c $f 54 e2 $f 55 01 $f $s0 04 $cl $c2 11 50 89 $f 51 ec $f 52 b0 $f 53 4a $f 54 fc $f 55 01 $f $s0 04 $cl $c2 12 50 89 $f 51 de $f 52 a7 $f 53 68 $f 54 10 $f 55 11 $f $s0 04 $cl $c2 13 50 89 $f 51 d2 $f 52 9e $f 53 7c $f 54 1e $f 55 11 $f $s0 04 $cl $c2 14 50 89 $f 51 c8 $f 52 96 $f 53 90 $f 54 2c $f 55 11 $f $s0 04 $cl $c2 15 50 89 $f 51 be $f 52 8f $f 53 a4 $f 54 3e $f 55 11 $f $s0 04 $cl $c2 16 50 89 $f 51 b6 $f 52 88 $f 53 b8 $f 54 4a $f 55 11 $f $s0 04 $cl $c2 17 50 89 $f 51 ae $f 52 82 $f 53 c6 $f 54 54 $f 55 11 $f $s0 04 $cl $c2 18 50 89 $f 51 a6 $f 52 7d $f 53 d6 $f 54 60 $f 55 11 $f $s0 04 $cl $c2 19 50 89 $f 51 a0 $f 52 78 $f 53 e0 $f 54 68 $f 55 11 $f $s0 04 $cl $c2 1a 50 00 $f 51 9a $f 52 73 $f 53 ee $f 54 74 $f 55 11 $f $s0 02 $cl $c2 1b 50 00 $f 51 94 $f 52 6f $f 53 fa $f 54 7c $f 55 11 $f $s0 02 $cl $c2 1c 50 00 $f 51 8f $f 52 6b $f 53 04 $f 54 84 $f 55 12 $f $s0 02 $cl $c2 1d 50 00 $f 51 8a $f 52 67 $f 53 0e $f 54 8c $f 55 12 $f $s0 02 $cl $c2 1e 50 00 $f 51 85 $f 52 64 $f 53 18 $f 54 92 $f 55 12 $f $s0 02 $cl $c2 1f 50 00 $f 51 81 $f 52 61 $f 53 20 $f 54 98 $f 55 12 $f $s0 02 $cl $c2 20 50 00 $f 51 7d $f 52 5e $f 53 28 $f 54 9e $f 55 12 $f $s0 02 $cl $c2 21 50 00 $f 51 79 $f 52 5b $f 53 30 $f 54 a4 $f 55 12 $f $s0 02 $cl $c2 22 50 00 $f 51 76 $f 52 58 $f 53 36 $f 54 ac $f 55 12 $f $s0 02 $cl $c2 23 50 00 $f 51 72 $f 52 56 $f 53 3c $f 54 b0 $f 55 12 $f $s0 02 $cl $c2 24 50 00 $f 51 6f $f 52 53 $f 53 44 $f 54 b4 $f 55 12 $f $s0 02 $cl $c2 25 50 00 $f 51 6c $f 52 51 $f 53 4a $f 54 b8 $f 55 12 $f $s0 02 $cl $c2 26 50 00 $f 51 69 $f 52 4f $f 53 4e $f 54 bc $f 55 12 $f $s0 02 $cl $c2 27 50 00 $f 51 67 $f 52 4d $f 53 52 $f 54 c0 $f 55 12 $f $s0 02 $cl $c2 28 50 00 $f 51 64 $f 52 4b $f 53 58 $f 54 c4 $f 55 12 $f $s0 02 $cl 50 92 $f 51 90 $f 52 2C $f 53 00 $f 54 00 $f 55 88 $f $s0 04 $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a 50 $f 5b 3c $f 5c 00 $f d3 $w0 $f ; SIZE_320_240_30FPS_ZOOM= c0 64 $f c1 4b $f // over write original image size of SVGA mode // 320 x 240: zoom from 1.0 to 2.5 at 30fps mode $c2 0b 50 89 $f 51 B6 $f 52 88 $f 53 2a $f 54 1C $f $s0 04 $cl $c2 0c 50 89 $f 51 A6 $f 52 7D $f 53 48 $f 54 32 $f $s0 04 $cl $c2 0d 50 00 $f 51 9A $f 52 73 $f 53 5C $f 54 46 $f $s0 04 $cl $c2 0e 50 00 $f 51 8F $f 52 6B $f 53 72 $f 54 56 $f $s0 04 $cl $c2 0f 50 00 $f 51 85 $f 52 64 $f 53 86 $f 54 64 $f $s0 04 $cl $c2 10 50 00 $f 51 7D $f 52 5E $f 53 96 $f 54 70 $f $s0 04 $cl $c2 11 50 00 $f 51 76 $f 52 58 $f 53 A4 $f 54 7C $f $s0 04 $cl $c2 12 50 00 $f 51 6F $f 52 53 $f 53 B2 $f 54 86 $f $s0 04 $cl $c2 13 50 00 $f 51 69 $f 52 4F $f 53 BE $f 54 8E $f $s0 04 $cl $c2 14 50 00 $f 51 64 $f 52 4B $f 53 C8 $f 54 96 $f $s0 04 $cl $c2 15 50 00 $f 51 5F $f 52 47 $f 53 D2 $f 54 9E $f $s0 04 $cl $c2 16 50 00 $f 51 5B $f 52 44 $f 53 DA $f 54 A4 $f $s0 04 $cl $c2 17 50 00 $f 51 57 $f 52 41 $f 53 E2 $f 54 AA $f $s0 04 $cl $c2 18 50 00 $f 51 53 $f 52 3E $f 53 EA $f 54 B0 $f $s0 02 $cl $c2 19 50 00 $f 51 50 $f 52 3C $f 53 F0 $f 54 B4 $f $s0 02 $cl 50 89 $f 51 C8 $f 52 96 $f 53 00 $f 54 00 $f $s0 04 $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 55 00 $f 5a 50 $f 5b 3c $f 5c 00 $f d3 $w0 $f ; SIZE_240_180_ZOOM= // 240 x 180: zoom from 1.0 to 2.5 $c2 0b 50 92 $f 51 6C $f 52 11 $f 53 48 $f 54 36 $f 55 88 $f $cl $c2 0c 50 92 $f 51 4C $f 52 FA $f 53 8C $f 54 64 $f 55 08 $f $cl $c2 0d 50 92 $f 51 34 $f 52 E7 $f 53 B8 $f 54 8A $f 55 08 $f $cl $c2 0e 50 92 $f 51 1C $f 52 D6 $f 53 EE $f 54 AC $f 55 08 $f $cl $c2 0f 50 92 $f 51 0C $f 52 C8 $f 53 0C $f 54 C4 $f 55 09 $f $cl $c2 10 50 92 $f 51 F8 $f 52 BB $f 53 32 $f 54 E6 $f 55 01 $f $cl $c2 11 50 89 $f 51 EC $f 52 B0 $f 53 4c $f 54 F6 $f 55 01 $f $cl $c2 12 50 89 $f 51 DE $f 52 A7 $f 53 68 $f 54 0A $f 55 11 $f $cl $c2 13 50 89 $f 51 D2 $f 52 9E $f 53 7E $f 54 1C $f 55 11 $f $cl $c2 14 50 89 $f 51 C8 $f 52 96 $f 53 94 $f 54 2C $f 55 11 $f $cl $c2 15 50 89 $f 51 BE $f 52 8F $f 53 A6 $f 54 3E $f 55 11 $f $cl $c2 16 50 89 $f 51 B6 $f 52 88 $f 53 B6 $f 54 4A $f 55 11 $f $cl $c2 17 50 89 $f 51 AE $f 52 82 $f 53 C8 $f 54 56 $f 55 11 $f $cl $c2 18 50 89 $f 51 A6 $f 52 7D $f 53 D8 $f 54 60 $f 55 11 $f $cl $c2 19 50 89 $f 51 A0 $f 52 78 $f 53 E2 $f 54 6A $f 55 11 $f $cl 50 92 $f 51 90 $f 52 2C $f 53 00 $f 54 00 $f 55 88 $f $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a 3C $f 5b 2D $f 5c 00 $f d3 04 $f ; SIZE_128_96_ZOOM= // 128 x 96: zoom from 1.0 to 4.0 $c2 0b 50 9B $f 51 68 $f 52 11 $f 53 50 $f 54 36 $f 55 88 $f $cl $c2 0c 50 9B $f 51 50 $f 52 fa $f 53 80 $f 54 64 $f 55 08 $f $cl $c2 0d 50 9B $f 51 30 $f 52 e7 $f 53 c0 $f 54 94 $f 55 08 $f $cl $c2 0e 50 9B $f 51 20 $f 52 d6 $f 53 e0 $f 54 b4 $f 55 08 $f $cl $c2 0f 50 9B $f 51 08 $f 52 c8 $f 53 10 $f 54 ca $f 55 09 $f $cl $c2 10 50 92 $f 51 fc $f 52 bc $f 53 28 $f 54 e0 $f 55 01 $f $cl $c2 11 50 92 $f 51 ec $f 52 b0 $f 53 48 $f 54 f8 $f 55 01 $f $cl $c2 12 50 92 $f 51 e0 $f 52 a7 $f 53 60 $f 54 10 $f 55 11 $f $cl $c2 13 50 92 $f 51 d4 $f 52 9e $f 53 78 $f 54 20 $f 55 11 $f $cl $c2 14 50 92 $f 51 c8 $f 52 96 $f 53 90 $f 54 30 $f 55 11 $f $cl $c2 15 50 92 $f 51 c0 $f 52 8f $f 53 a0 $f 54 40 $f 55 11 $f $cl $c2 16 50 92 $f 51 b4 $f 52 88 $f 53 b8 $f 54 48 $f 55 11 $f $cl $c2 17 50 92 $f 51 ac $f 52 82 $f 53 c8 $f 54 58 $f 55 11 $f $cl $c2 18 50 92 $f 51 a8 $f 52 7d $f 53 d0 $f 54 62 $f 55 11 $f $cl $c2 19 50 92 $f 51 a0 $f 52 78 $f 53 e0 $f 54 68 $f 55 11 $f $cl $c2 1a 50 92 $f 51 98 $f 52 73 $f 53 f0 $f 54 7A $f 55 11 $f $cl $c2 1b 50 92 $f 51 94 $f 52 6f $f 53 f8 $f 54 80 $f 55 11 $f $cl $c2 1c 50 92 $f 51 90 $f 52 6b $f 53 00 $f 54 88 $f 55 12 $f $cl $c2 1d 50 92 $f 51 88 $f 52 67 $f 53 10 $f 54 90 $f 55 12 $f $cl $c2 1e 50 92 $f 51 84 $f 52 64 $f 53 16 $f 54 90 $f 55 12 $f $cl $c2 1f 50 92 $f 51 80 $f 52 61 $f 53 1E $f 54 98 $f 55 12 $f $cl $c2 20 50 89 $f 51 7e $f 52 5e $f 53 24 $f 54 9c $f 55 12 $f $cl $c2 21 50 89 $f 51 7a $f 52 5b $f 53 2c $f 54 a4 $f 55 12 $f $cl $c2 22 50 89 $f 51 76 $f 52 58 $f 53 34 $f 54 aa $f 55 12 $f $cl $c2 23 50 89 $f 51 72 $f 52 56 $f 53 3c $f 54 ae $f 55 12 $f $cl $c2 24 50 89 $f 51 70 $f 52 53 $f 53 40 $f 54 b6 $f 55 12 $f $cl $c2 25 50 89 $f 51 6c $f 52 51 $f 53 48 $f 54 ba $f 55 12 $f $cl $c2 26 50 89 $f 51 6a $f 52 4f $f 53 4c $f 54 bc $f 55 12 $f $cl $c2 27 50 89 $f 51 66 $f 52 4d $f 53 54 $f 54 c2 $f 55 12 $f $cl $c2 28 50 89 $f 51 64 $f 52 4b $f 53 58 $f 54 c6 $f 55 12 $f $cl 50 9B $f 51 90 $f 52 2C $f 53 00 $f 54 00 $f 55 88 $f $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a 20 $f 5b 18 $f 5c 00 $f d3 04 $f ; SIZE_96_128_ZOOM= // 96 x 128: zoom from 1.0 to 4.0 $c2 0b 50 9B $f 51 D0 $f 52 11 $f 53 80 $f 54 36 $f 55 81 $f $cl $c2 0c 50 92 $f 51 BC $f 52 FA $f 53 A8 $f 54 68 $f 55 01 $f $cl $c2 0d 50 92 $f 51 AC $f 52 E7 $f 53 C8 $f 54 8E $f 55 01 $f $cl $c2 0e 50 92 $f 51 A0 $f 52 D6 $f 53 E0 $f 54 B0 $f 55 01 $f $cl $c2 0f 50 92 $f 51 98 $f 52 C8 $f 53 F0 $f 54 C8 $f 55 01 $f $cl $c2 10 50 92 $f 51 8C $f 52 BC $f 53 08 $f 54 E0 $f 55 02 $f $cl $c2 11 50 92 $f 51 84 $f 52 B0 $f 53 16 $f 54 F8 $f 55 02 $f $cl $c2 12 50 92 $f 51 7C $f 52 A7 $f 53 28 $f 54 10 $f 55 12 $f $cl $c2 13 50 92 $f 51 78 $f 52 9E $f 53 2E $f 54 20 $f 55 12 $f $cl $c2 14 50 92 $f 51 70 $f 52 96 $f 53 40 $f 54 30 $f 55 12 $f $cl $c2 15 50 92 $f 51 6C $f 52 8F $f 53 46 $f 54 40 $f 55 12 $f $cl $c2 16 50 92 $f 51 68 $f 52 88 $f 53 4E $f 54 48 $f 55 12 $f $cl $c2 17 50 92 $f 51 60 $f 52 82 $f 53 5E $f 54 58 $f 55 12 $f $cl $c2 18 50 89 $f 51 5E $f 52 7D $f 53 64 $f 54 60 $f 55 12 $f $cl $c2 19 50 89 $f 51 5A $f 52 78 $f 53 6C $f 54 68 $f 55 12 $f $cl $c2 1a 50 89 $f 51 56 $f 52 73 $f 53 74 $f 54 74 $f 55 12 $f $cl $c2 1b 50 89 $f 51 54 $f 52 6F $f 53 78 $f 54 7C $f 55 12 $f $cl $c2 1c 50 89 $f 51 50 $f 52 6B $f 53 80 $f 54 84 $f 55 12 $f $cl $c2 1d 50 89 $f 51 4E $f 52 67 $f 53 84 $f 54 8C $f 55 12 $f $cl $c2 1e 50 89 $f 51 4C $f 52 64 $f 53 88 $f 54 90 $f 55 12 $f $cl $c2 1f 50 89 $f 51 48 $f 52 61 $f 53 90 $f 54 98 $f 55 12 $f $cl $c2 20 50 89 $f 51 46 $f 52 5E $f 53 94 $f 54 9C $f 55 12 $f $cl $c2 21 50 89 $f 51 44 $f 52 5B $f 53 98 $f 54 A4 $f 55 12 $f $cl $c2 22 50 89 $f 51 42 $f 52 58 $f 53 9C $f 54 A8 $f 55 12 $f $cl $c2 23 50 89 $f 51 40 $f 52 56 $f 53 A0 $f 54 AC $f 55 12 $f $cl $c2 24 50 89 $f 51 3E $f 52 53 $f 53 A4 $f 54 B4 $f 55 12 $f $cl $c2 25 50 89 $f 51 3C $f 52 51 $f 53 A8 $f 54 B8 $f 55 12 $f $cl $c2 26 50 89 $f 51 3C $f 52 4F $f 53 A8 $f 54 BC $f 55 12 $f $cl $c2 27 50 89 $f 51 3A $f 52 4D $f 53 AC $f 54 C0 $f 55 12 $f $cl $c2 28 50 89 $f 51 38 $f 52 4B $f 53 B0 $f 54 C4 $f 55 12 $f $cl 50 9B $f 51 E0 $f 52 2C $f 53 60 $f 54 00 $f 55 81 $f $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a 18 $f 5b 20 $f 5c 00 $f d3 04 $f ; SIZE_176_144_ZOOM= // 176 x 144: zoom from 1.0 to 4.0 $c2 0b 50 92 $f 51 50 $f 52 11 $f 53 80 $f 54 3A $f 55 88 $f $cl $c2 0c 50 92 $f 51 34 $f 52 fa $f 53 b8 $f 54 68 $f 55 08 $f $cl $c2 0d 50 92 $f 51 1c $f 52 e7 $f 53 e8 $f 54 90 $f 55 08 $f $cl $c2 0e 50 92 $f 51 08 $f 52 d6 $f 53 10 $f 54 b0 $f 55 09 $f $cl $c2 0f 50 92 $f 51 f4 $f 52 c8 $f 53 3a $f 54 cc $f 55 01 $f $cl $c2 10 50 92 $f 51 e8 $f 52 bc $f 53 52 $f 54 e2 $f 55 01 $f $cl $c2 11 50 92 $f 51 d8 $f 52 b0 $f 53 72 $f 54 f8 $f 55 01 $f $cl $c2 12 50 92 $f 51 cc $f 52 a7 $f 53 86 $f 54 0c $f 55 11 $f $cl $c2 13 50 92 $f 51 c0 $f 52 9e $f 53 a2 $f 54 20 $f 55 11 $f $cl $c2 14 50 92 $f 51 b8 $f 52 96 $f 53 b2 $f 54 2c $f 55 11 $f $cl $c2 15 50 89 $f 51 b0 $f 52 8f $f 53 c0 $f 54 3c $f 55 11 $f $cl $c2 16 50 89 $f 51 a8 $f 52 88 $f 53 d0 $f 54 4a $f 55 11 $f $cl $c2 17 50 89 $f 51 a0 $f 52 82 $f 53 e0 $f 54 56 $f 55 11 $f $cl $c2 18 50 89 $f 51 9a $f 52 7d $f 53 ec $f 54 62 $f 55 11 $f $cl $c2 19 50 89 $f 51 94 $f 52 78 $f 53 f8 $f 54 6a $f 55 11 $f $cl $c2 1a 50 89 $f 51 8e $f 52 73 $f 53 04 $f 54 76 $f 55 12 $f $cl $c2 1b 50 89 $f 51 88 $f 52 6f $f 53 12 $f 54 7e $f 55 12 $f $cl $c2 1c 50 89 $f 51 84 $f 52 6b $f 53 18 $f 54 86 $f 55 12 $f $cl $c2 1d 50 89 $f 51 7e $f 52 67 $f 53 26 $f 54 8e $f 55 12 $f $cl $c2 1e 50 89 $f 51 7a $f 52 64 $f 53 2e $f 54 94 $f 55 12 $f $cl $c2 1f 50 89 $f 51 76 $f 52 61 $f 53 36 $f 54 9a $f 55 12 $f $cl $c2 20 50 89 $f 51 74 $f 52 5e $f 53 38 $f 54 9e $f 55 12 $f $cl $c2 21 50 89 $f 51 70 $f 52 5b $f 53 40 $f 54 a6 $f 55 12 $f $cl $c2 22 50 89 $f 51 6C $f 52 58 $f 53 48 $f 54 aa $f 55 12 $f $cl $c2 23 50 89 $f 51 6a $f 52 56 $f 53 4c $f 54 ae $f 55 12 $f $cl $c2 24 50 89 $f 51 66 $f 52 53 $f 53 54 $f 54 b6 $f 55 12 $f $cl $c2 25 50 89 $f 51 64 $f 52 51 $f 53 5A $f 54 b8 $f 55 12 $f $cl $c2 26 50 89 $f 51 60 $f 52 4f $f 53 62 $f 54 be $f 55 12 $f $cl $c2 27 50 89 $f 51 5e $f 52 4d $f 53 64 $f 54 c0 $f 55 12 $f $cl $c2 28 50 89 $f 51 5c $f 52 4b $f 53 6a $f 54 c6 $f 55 12 $f $cl 50 9B $f 51 70 $f 52 2C $f 53 44 $f 54 0C $f 55 88 $f $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a 2c $f 5b 24 $f 5c 00 $f d3 04 $f ; SIZE_144_176_ZOOM= // 144 x 176: zoom from 1.0 to 4.0 $c2 0b 50 92 $f 51 E0 $f 52 11 $f 53 60 $f 54 3C $f 55 81 $f $cl $c2 0c 50 92 $f 51 CC $f 52 FA $f 53 88 $f 54 68 $f 55 01 $f $cl $c2 0d 50 92 $f 51 BC $f 52 E7 $f 53 A8 $f 54 8C $f 55 01 $f $cl $c2 0e 50 92 $f 51 B0 $f 52 D6 $f 53 C0 $f 54 B0 $f 55 01 $f $cl $c2 0f 50 92 $f 51 A4 $f 52 C8 $f 53 DA $f 54 CC $f 55 01 $f $cl $c2 10 50 92 $f 51 98 $f 52 BC $f 53 F2 $f 54 E2 $f 55 01 $f $cl $c2 11 50 92 $f 51 90 $f 52 B0 $f 53 00 $f 54 F8 $f 55 02 $f $cl $c2 12 50 89 $f 51 88 $f 52 A7 $f 53 12 $f 54 0E $f 55 12 $f $cl $c2 13 50 89 $f 51 82 $f 52 9E $f 53 1C $f 54 20 $f 55 12 $f $cl $c2 14 50 89 $f 51 7C $f 52 96 $f 53 28 $f 54 2E $f 55 12 $f $cl $c2 15 50 89 $f 51 76 $f 52 8F $f 53 36 $f 54 3E $f 55 12 $f $cl $c2 16 50 89 $f 51 70 $f 52 88 $f 53 40 $f 54 4C $f 55 12 $f $cl $c2 17 50 89 $f 51 6A $f 52 82 $f 53 4C $f 54 56 $f 55 12 $f $cl $c2 18 50 89 $f 51 66 $f 52 7D $f 53 54 $f 54 62 $f 55 12 $f $cl $c2 19 50 89 $f 51 62 $f 52 78 $f 53 5C $f 54 6A $f 55 12 $f $cl $c2 1a 50 89 $f 51 5E $f 52 73 $f 53 64 $f 54 78 $f 55 12 $f $cl $c2 1b 50 89 $f 51 5C $f 52 6F $f 53 68 $f 54 7C $f 55 12 $f $cl $c2 1c 50 89 $f 51 58 $f 52 6B $f 53 70 $f 54 86 $f 55 12 $f $cl $c2 1d 50 89 $f 51 54 $f 52 67 $f 53 78 $f 54 8E $f 55 12 $f $cl $c2 1e 50 89 $f 51 52 $f 52 64 $f 53 7C $f 54 92 $f 55 12 $f $cl $c2 1f 50 89 $f 51 50 $f 52 61 $f 53 80 $f 54 9A $f 55 12 $f $cl $c2 20 50 89 $f 51 4C $f 52 5E $f 53 88 $f 54 9E $f 55 12 $f $cl $c2 21 50 89 $f 51 4A $f 52 5B $f 53 8C $f 54 A4 $f 55 12 $f $cl $c2 22 50 89 $f 51 48 $f 52 58 $f 53 90 $f 54 A8 $f 55 12 $f $cl $c2 23 50 00 $f 51 46 $f 52 56 $f 53 94 $f 54 AC $f 55 12 $f $cl $c2 24 50 00 $f 51 44 $f 52 53 $f 53 98 $f 54 B2 $f 55 12 $f $cl $c2 25 50 00 $f 51 42 $f 52 51 $f 53 9C $f 54 B8 $f 55 12 $f $cl $c2 26 50 00 $f 51 41 $f 52 4F $f 53 9E $f 54 BC $f 55 12 $f $cl $c2 27 50 00 $f 51 3F $f 52 4D $f 53 A2 $f 54 BE $f 55 12 $f $cl $c2 28 50 00 $f 51 3E $f 52 4B $f 53 A4 $f 54 C4 $f 55 12 $f $cl 50 92 $f 51 F8 $f 52 2C $f 53 30 $f 54 00 $f 55 81 $f $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx 5a 24 $f 5b 2C $f 5c 00 $f d3 04 $f ; ZOOM_PRE= #REG_BANK_00 eb 20 $f; ZOOM_POST=#REG_BANK_00 eb 30 $f; seq_set_prop_6= $z1 // int reg 1 gets size config $c1 01 $cl $c1 02 $cl $c1 03 $cl $c1 11 $cl // only VF/VR/VT $h0 V 01a0 // wait for end of frame or 416ms (> 4/10fps) #ZOOM_PRE $h0 V 01a0 // wait for end of frame or 416ms (> 4/10fps) $cx $cx $cx $cx $s2 %0 // int reg 2 gets new property selection #REG_BANK_00 86 3d $f c0 c8 $f c1 96 $f 8c 00 $f $c1 01 #SIZE_640_480_ZOOM $cl $c1 02 #SIZE_1280_960_ZOOM $cl $c1 03 #SIZE_1600_1200_ZOOM $cl $c1 11 #SIZE_640_480_ZOOM $cl $c1 20 #SIZE_320_240_ZOOM $cl $c1 25 #SIZE_96_128_ZOOM $cl $c1 26 #SIZE_144_176_ZOOM $cl $c1 29 #SIZE_144_176_ZOOM $cl $c1 2a #SIZE_320_240_30FPS_ZOOM $cl $c1 2b #SIZE_320_240_ZOOM $cl $c1 2c #SIZE_320_240_ZOOM $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $c1 01 $cl $c1 02 $cl $c1 03 $cl $c1 11 $cl // only VF/VR/VT #ZOOM_POST $cx $cx $cx $cx ; // --- Exposure property 7 ----------------------- // // 0 => Normal mode, 1 => Dark mode //------------------------------------------------ // Auto Pixel Clock FRAME_ADJUST_0=#REG_BANK_01 14 68 $f 4d 70 $f; // fixed(15fps) and x8 FRAME_ADJUST_1=#REG_BANK_01 14 68 $f 4d 70 $f; // 1/2(3.75fps) and x8 FRAME_ADJUST_2=#REG_BANK_01 14 88 $f 4d 70 $f; // 1/4(3.75fps) and x8 seq_set_prop_7_0=#FRAME_ADJUST_0; // Normal mode seq_set_prop_7_1= // Dark mode $z0 $c0 2c #FRAME_ADJUST_0 $cl #FRAME_ADJUST_2 $cx ; // --- Effect property 8 ------------------------- // // 0 => normal, 1 => negative, 2 => solarize* // 3 => sepia, 4 => black & white // // * solarize is not supported by this // sensor a blueish tint is substituted //------------------------------------------------ seq_set_prop_8_0=#REG_BANK_00 7c 00 $f 7d 02 $f 7c 05 $f 7d 80 $f 7d 80 $f; seq_set_prop_8_1=#REG_BANK_00 7c 00 $f 7d 42 $f 7c 05 $f 7d 80 $f 7d 80 $f; seq_set_prop_8_2=#REG_BANK_00 7c 00 $f 7d 1a $f 7c 05 $f 7d a0 $f 7d 40 $f; seq_set_prop_8_3=#REG_BANK_00 7c 00 $f 7d 1a $f 7c 05 $f 7d 61 $f 7d 98 $f; seq_set_prop_8_4=#REG_BANK_00 7c 00 $f 7d 1a $f 7c 05 $f 7d 80 $f 7d 80 $f; // --- LED flash property 13 (d) ----------------- // // 0 => off, 1 => on //------------------------------------------------ seq_set_prop_d_0=#REG_BANK_01 4B 00 $f; // turn off LED immediately seq_set_prop_d_1=#REG_BANK_01 4B 83 $f; // turn on LED at next frame vysnc blanking period // --- Xenon flash property 14 (e) --------------- // // 0 => off, 1 => auto external Xenon flash //------------------------------------------------ seq_set_prop_e=; // ---------- Optics testing property 26 ---------- // // TESTING ONLY!!! // // 0 => Normal colors // 1 => Warm colors // 2 => Skin tones 1 // 3 => Register dump // 4 => PSA Color settings // 5 => Skin tones 2 // 6 => Gamma curve 1/2.2 // 7 => Skin tones 3 // 8 => N/A // 9 => Increased contrast // a => Decreased contrast // b => Default contrast // c => Set reg17 to zero for SS testing //------------------------------------------------ seq_set_prop_26_0= 79 74 $f 7a 5f $f 7b 15 $f 7c 14 $f 7d 68 $f 7e 7c $f 7f 1e $f; seq_set_prop_26_1= 79 9a $f 7a 83 $f 7b 17 $f 7c 0c $f 7d 8e $f 7e 9a $f 7f 1e $f; seq_set_prop_26_2= 79 d7 $f 7a c3 $f 7b 14 $f 7c 36 $f 7d ba $f 7e f0 $f 7f 1e $f; seq_set_prop_26_3= $"CAM_Prop_26_3" #REGISTER_DUMP_TO_LOG; seq_set_prop_26_4= 79 7c $f 7a 68 $f 7b 14 $f 7c 0a $f 7d 76 $f 7e 80 $f 7f 1e $f; seq_set_prop_26_5= 79 81 $f 7a 6d $f 7b 14 $f 7c 0a $f 7d 7e $f 7e 88 $f 7f 1e $f; seq_set_prop_26_6= 82 0f $f 83 1e $f 84 3d $f 85 6f $f 86 79 $f 87 83 $f 88 8b $f 89 93 $f 8a 9a $f 8b a0 $f 8c ac $f 8d b7 $f 8e cb $f 8f dc $f 90 eb $f; seq_set_prop_26_7= 79 80 $f 7a 6c $f 7b 14 $f 7c 0a $f 7d 7e $f 7e 88 $f 7f 1e $f; seq_set_prop_26_8= ; seq_set_prop_26_9= 70 60 $f 71 30 $f; seq_set_prop_26_a= 70 60 $f 71 10 $f; seq_set_prop_26_b= 70 00 $f 71 20 $f; seq_set_prop_26_c= 17 00 $f $s6 00; // ---------- Light Meter property 27------------ // // TESTING ONLY!!!! // // 0 => off, 1 => on, 2 => get value via debug print // 3 => sleep mode off, 4 => sleep mode on // 5 => get value via I2C //------------------------------------------------ seq_set_prop_27_0= #REGISTER_MODIFY(30,#CLEAR_BIT_6); //Disable light meter seq_set_prop_27_1= #REGISTER_MODIFY(30,#SET_BIT_6) 4d a1 $f 4e 06 $f 3e 69 $f; //Enable light meter with complete register settings seq_set_prop_27_2= 3a $f $r1 d 39 $f $r1 e $"CAM_Light_meter_value__MSB_q%dq__LSB_z%ez"; //Output value if ENDE=1 in ITP seq_set_prop_27_3= #REGISTER_MODIFY(09,#CLEAR_BIT_4); //Disable sleep mode seq_set_prop_27_4= #REGISTER_MODIFY(09,#SET_BIT_4); //Enable sleep mode seq_set_prop_27_5= 3a $f 39 $f $"CAM_Light_meter_output_on_I2C_bus"; // Light meter output to I2C instead of by using ENDE=1, for Illumination driver app. seq_get_prop_27 = 3a $f $r1 0 39 $f $r1 1 $d0002 $"CAM_light_meter_output_%0_%1"; // Light meter output to SW app. // ---------- WINDOW MOVING property 28 ---------- // // TESTING ONLY!!! // // 0 => Reset to original positions 17=0x41, 19=0x20 // 1 => Increase H- startpos with 4 pixels (reg 0x17) // 2 => Decrease H-startpos with 4 pixels (reg 0x17) // 3 => Increase V-startpos with 4 pixels (reg 0x19) // 4 => Decrease V-startpos with 4 pixels (reg 0x19) //------------------------------------------------ seq_set_prop_28_0=17 41 $f 19 20 $f; seq_set_prop_28_1=17 $f $r1 f $+f 01 $f 17 $wf $f $"CAM_Reg_17_content_%f"; seq_set_prop_28_2=17 $f $r1 f $-f 01 $f 17 $wf $f $"CAM_Reg_17_content_%f"; seq_set_prop_28_3=19 $f $r1 f $+f 02 $f 19 $wf $f $"CAM_Reg_19_content_%f"; seq_set_prop_28_4=19 $f $r1 f $-f 02 $f 19 $wf $f $"CAM_Reg_19_content_%f"; ---------- COLOR BAR PATTERN property 1e ---------- // // ITP TESTING ONLY!!! // // 0 => Disable color bar // 1 => Enable color bar with fading bars //------------------------------------------------ seq_set_prop_1e_0= #REGISTER_MODIFY(61,#CLEAR_BIT_1); // Disable color bar output image seq_set_prop_1e_1= #REGISTER_MODIFY(61,#SET_BIT_1) // Enable color bar output image #REGISTER_MODIFY(68,#SET_BIT_6); // Set color bar to fade-to-gray //================================================ //=============== RESOLUTIONS ==================== //================================================ // JPEG SS seq_ss_config_1= #JPEG_ONESHOT_PRE $u06 #OUTPUT_FORMAT_JPEG $s7 01; seq_ss_config_2= #JPEG_ONESHOT_PRE $u06 #OUTPUT_FORMAT_JPEG $s7 01; seq_ss_config_3= #JPEG_ONESHOT_PRE $u06 #OUTPUT_FORMAT_JPEG $s7 01; // YUV SS seq_ss_config_11=#JPEG_ONESHOT_PRE $u06 #OUTPUT_FORMAT_YUV422 $s7 01; VF_CONFIG_SET= $z0 $m1 7 $c7 01 $u06 #OUTPUT_FORMAT_YUV422 $cl #COMP_UINT32_R0_R1 $c0 00 $cl $z0 $c0 2a #SENSOR_30FPS_SVGA_MODE // change sensor mode from 15fps (other) to 30fps (ID 2a) $cl $c7 2a #SENSOR_15FPS_UXGA_MODE // change sensor mode from 30fps (ID 2a) to 15fps (other) $cl // not change mode, do nothing $cx $cx $u06 #OUTPUT_FORMAT_YUV422 !0 $cx $cx $z7 ; // VF seq_vf_config_20=#VF_CONFIG_SET(#FRAME_RATE_13_FPS $t0200); // VT seq_vf_config_25=#VF_CONFIG_SET(#FRAME_RATE_12_FPS $t0200); seq_vf_config_26=#VF_CONFIG_SET(#FRAME_RATE_12_FPS $t0200); seq_vf_config_27=#VF_CONFIG_SET(#FRAME_RATE_12_FPS $t0200); seq_vf_config_28=#VF_CONFIG_SET(#FRAME_RATE_12_FPS $t0200); // VR seq_vf_config_29=#VF_CONFIG_SET(#FRAME_ADJUST_0 #FRAME_RATE_10_FPS $t0200); seq_vf_config_2d=#VF_CONFIG_SET(#FRAME_ADJUST_0 #FRAME_RATE_10_FPS $t0200); seq_vf_config_2a=#VF_CONFIG_SET(#FRAME_ADJUST_0 #FRAME_RATE_30_FPS $t0200); seq_vf_config_2b=#VF_CONFIG_SET(#FRAME_ADJUST_0 #FRAME_RATE_15_FPS $t0200); seq_vf_config_2c=#VF_CONFIG_SET(#FRAME_ADJUST_0 #FRAME_RATE_7_5_FPS $t0200); seq_vf_start= #FRAME_OUTPUT_ON; seq_vf_stop= #FRAME_OUTPUT_OFF; seq_ss_start= #FRAME_OUTPUT_ON $p1 0e // Xenon $c1 01 #XENON_JUDGE_AUTO_FLASH $c8 01 #XENON_SET_AE_AWB $cl $cx $cl $cx $z1 $c1 11 // YUV $cl // JPEG #JPEG_RETRY_INIT #CLR_JPEG_ERROR_FLG $u05 // load Qscale talbe $cx ; seq_ss_stop= #JPEG_ONESHOT_END // YUV/JPEG $p1 0e // Xenon $c1 00 $cl $c8 01 #XENON_END $cl $cx $cx // save EXIF info to reserved registers #GET_SHUTTERSPEED $m9 0 // REG_9 = SHUT #GET_ISOVALUE $ma 0 // REG_A = ISO #START_AE #OUTPUT_FORMAT_YUV422 #FRAME_OUTPUT_OFF ; seq_ss_take= $z1 $c1 11 // YUV $cl // JPEG $cf 00 $cl #JPEG_ONESHOT_RETRY $cx #JPEG_RETRY_SET_QS $cx $p1 0e // Xenon $c1 00 $cl $c8 01 #JPEG_ONESHOT_XENON #XENON_PULSE_ON $cl $cx $cx #JPEG_ONESHOT_POST ; seq_ss_verify= $z1 $c1 11 // YUV $s0 01 $cl // JPEG // checking overflow flag of JPEG encoder #REG_BANK_00 #REGISTER_READ(e9) // get flag $m2 0 #CLR_JPEG_ERROR_FLG $b2 00 0 3 $b2 00 4 4 $c2 08 $s0 00 // $"===JPEG_ERROR=%f==" $cl $s0 01 $cx $cx $p1 0e // Xenon $c1 00 $cl $c8 01 #XENON_PULSE_OFF $cl $cx $cx ; // TODO: define any of these that are needed: // seq_read_data=; // TODO: define any of these that are needed: // cam_exif_ifd_x= // cam_exif_type_x= // cam_exif_tag_x= // cam_exif_value_x= INIT_SETTINGS_REV2B = #REG_BANK_01 12 80 $f // Reset Register $d0001 #REG_BANK_00 2c ff $f 2e df $f d3 04 $f #REG_BANK_01 3c 35 $f 09 02 $f // drive capability 2x 11 00 $f 04 28 $f 13 e5 $f 14 48 $f 2c 0c $f 33 78 $f 3b f7 $f 3e 00 $f 43 11 $f 16 10 $f 39 82 $f 35 c8 $f 22 09 $f 37 42 $f 23 00 $f 34 a0 $f 36 00 $f 06 08 $f 07 c0 $f 0d b7 $f 0e 39 $f 4c 00 $f 4a 81 $f 21 99 $f // Average-base AEC/AGC #SELECT_PREMIER_OR_FLEX( // From_LINDSAY 24 3d $f 25 35 $f 26 71 $f , // From_LINDSAY 24 32 $f 25 28 $f 26 61 $f // From_LINDSAY ) // From_LINDSAY 24 3d $f 25 35 $f 26 71 $f 5c 00 $f 63 00 $f 5d 55 $f 5e 7D $f 5f 7D $f 60 55 $f 61 70 $f 62 80 $f 7c 05 $f 20 80 $f 28 30 $f 6c 00 $f 6d 80 $f 6e 00 $f 70 02 $f 71 94 $f 73 c1 $f 3d 34 $f 5a 57 $f 4f bb $f 50 9c $f #INPUT_CLOCK_SETTINGS_REV2B $u00 #REG_BANK_00 e5 7f $f f9 c0 $f 41 04 $f e0 14 $f 76 ff $f 33 a0 $f 42 20 $f 43 18 $f 4c 00 $f 87 d0 $f 88 3f $f d7 03 $f d9 10 $f c8 0f $f c9 80 $f // Specail Digital Effects 7c 00 $f 7d 02 $f 7c 03 $f 7d 48 $f 7d 48 $f 7c 08 $f 7d 20 $f 7d 10 $f 7d 0e $f // Gamma 90 00 $f 91 0f $f 91 1e $f 91 3a $f 91 62 $f 91 74 $f 91 82 $f 91 8e $f 91 98 $f 91 a0 $f 91 a7 $f 91 b5 $f 91 c0 $f 91 d2 $f 91 e1 $f 91 ed $f 91 19 $f // CPI #SELECT_PREMIER_OR_FLEX( // From_LINDSAY // CPI 92 00 $f 93 06 $f 93 e3 $f 93 05 $f 93 05 $f 93 02 $f 93 04 $f 93 00 $f 93 00 $f 93 00 $f 93 00 $f 93 00 $f 93 00 $f 93 00 $f , // From_LINDSAY // CPI // From_LINDSAY 92 00 $f 93 06 $f 93 e3 $f 93 05 $f 93 05 $f // From_LINDSAY 93 00 $f 93 00 $f 93 00 $f 93 00 $f // From_LINDSAY 93 00 $f 93 00 $f 93 00 $f 93 00 $f 93 00 $f // From_LINDSAY ) // From_LINDSAY // Color Matrix 96 00 $f 97 08 $f 97 19 $f 97 02 $f 97 0c $f 97 23 $f 97 30 $f 97 28 $f 97 26 $f 97 02 $f 97 98 $f 97 80 $f 97 00 $f 97 00 $f #SELECT_PREMIER_OR_FLEX( // From_LINDSAY // Lens Correction for Premier lens // TODO: to modify for sensor Rev2B a6 00 $f a7 20 $f a7 d8 $f a7 1d $f a7 31 $f a7 00 $f a7 18 $f a7 20 $f a7 d8 $f a7 19 $f a7 31 $f a7 00 $f a7 18 $f a7 20 $f a7 d8 $f a7 19 $f a7 31 $f a7 00 $f a7 18 $f , // From_LINDSAY // Lens Correction for Flextronics // From_LINDSAY a6 00 $f a7 e0 $f a7 00 $f a7 19 $f a7 21 $f a7 00 $f a7 28 $f // From_LINDSAY a7 d0 $f a7 00 $f a7 18 $f a7 21 $f a7 00 $f a7 28 $f // From_LINDSAY a7 d0 $f a7 00 $f a7 19 $f a7 21 $f a7 00 $f a7 28 $f // From_LINDSAY ) // From_LINDSAY #SELECT_PREMIER_OR_FLEX( // From_LINDSAY // White balance c3 ef $f c4 9a $f a4 00 $f a8 00 $f c5 11 $f c6 51 $f c7 00 $f bf 00 $f ba f0 $f bb 14 $f b6 36 $f b8 4c $f b7 34 $f b9 4a $f b3 cc $f b4 be $f b5 22 $f b0 50 $f b1 41 $f b2 01 $f c4 9e $f , // From_LINDSAY c3 ef $f a4 00 $f a8 00 $f // From_LINDSAY bf 00 $f // From_LINDSAY bc 64 $f // From_LINDSAY ba dc $f bb 08 $f // From_LINDSAY b6 22 $f b8 30 $f b7 20 $f b9 30 $f // From_LINDSAY b3 b4 $f b4 ca $f b5 34 $f b0 48 $f b1 46 $f // From_LINDSAY b2 06 $f // From_LINDSAY c7 00 $f // From_LINDSAY c6 51 $f // From_LINDSAY c5 11 $f // From_LINDSAY c4 9c $f // From_LINDSAY ) // From_LINDSAY c0 c8 $f c1 96 $f 86 1d $f 50 00 $f 51 90 $f 52 18 $f 53 00 $f 54 00 $f 55 88 $f 57 00 $f 5a 90 $f 5b 18 $f 5c 05 $f 7f 00 $f da 04 $f e5 1f $f #SELECT_PREMIER_OR_FLEX( // ONLY_LINDSAY e1 77 $f , // ONLY_LINDSAY e1 67 $f // ONLY_LINDSAY ) // ONLY_LINDSAY e0 00 $f dd 7f $f 05 00 $f ; seq_init= #INIT_SETTINGS_REV2B #FLICKER_BASE_SETTINGS_REV2B #OUTPUT_FORMAT_YUV422 $u01 $u02 $u07 #MANUAL_EXP #REG_BANK_01 00 01 $f $d0050 #AUTO_EXP $s7 FF; //================================================ //============ JPEG HEADER CREATION ============== //================================================ jpeg_qtable_selector_0= $s2 00 #GET_JPEG_Q_SCALE; jpeg_qtable_selector_1= $s2 01 #GET_JPEG_Q_SCALE; jpeg_qtable_0=08 10 10 13 10 13 16 16 16 16 16 16 1A 18 1A 1B 1B 1B 1A 1A 1A 1A 1B 1B 1B 1D 1D 1D 22 22 22 1C 1D 1D 1B 1B 1D 1D 20 20 22 22 25 26 25 23 23 22 23 26 26 28 28 28 30 30 24 2E 38 38 3A 45 45 53; jpeg_qtable_1=11 12 12 18 15 18 2F 1A 1A 2F 63 42 38 42 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63; // scale factors are same as value of regiseter 0x44 (0x0 <--> 0x30) jpeg_qtable_factors= 1, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, A000, B000, C000, D000, E000, F000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 1A000, 1B000, 1C000, 1D000, 1E000, 1F000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, 2A000, 2B000, 2C000, 2D000, 2E000, 2F000, 30000; jpeg_header= FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 84 00 $qt0 01 $qt1 FF C4 01 A2 00 00 01 05 01 01 01 01 01 01 00 00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B 01 00 03 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B 10 00 02 01 03 03 02 04 03 05 05 04 04 00 00 01 7D 01 02 03 00 04 11 05 12 21 31 41 06 13 51 61 07 22 71 14 32 81 91 a1 08 23 42 b1 c1 15 52 d1 f0 24 33 62 72 82 09 0a 16 17 18 19 1a 25 26 27 28 29 2a 34 35 36 37 38 39 3a 43 44 45 46 47 48 49 4a 53 54 55 56 57 58 59 5a 63 64 65 66 67 68 69 6a 73 74 75 76 77 78 79 7a 83 84 85 86 87 88 89 8a 92 93 94 95 96 97 98 99 9a a2 a3 a4 a5 a6 a7 a8 a9 aa b2 b3 b4 b5 b6 b7 b8 b9 ba c2 c3 c4 c5 c6 c7 c8 c9 ca d2 d3 d4 d5 d6 d7 d8 d9 da e1 e2 e3 e4 e5 e6 e7 e8 e9 ea f1 f2 f3 f4 f5 f6 f7 f8 f9 fa 11 00 02 01 02 04 04 03 04 07 05 04 04 00 01 02 77 00 01 02 03 11 04 05 21 31 06 12 41 51 07 61 71 13 22 32 81 08 14 42 91 a1 b1 c1 09 23 33 52 f0 15 62 72 d1 0a 16 24 34 e1 25 f1 17 18 19 1a 26 27 28 29 2a 35 36 37 38 39 3a 43 44 45 46 47 48 49 4a 53 54 55 56 57 58 59 5a 63 64 65 66 67 68 69 6a 73 74 75 76 77 78 79 7a 82 83 84 85 86 87 88 89 8a 92 93 94 95 96 97 98 99 9a a2 a3 a4 a5 a6 a7 a8 a9 aa b2 b3 b4 b5 b6 b7 b8 b9 ba c2 c3 c4 c5 c6 c7 c8 c9 ca d2 d3 d4 d5 d6 d7 d8 d9 da e2 e3 e4 e5 e6 e7 e8 e9 ea f2 f3 f4 f5 f6 f7 f8 f9 fa FF C0 00 11 08 $h $w 03 01 21 00 02 11 01 03 11 01 FF DA 00 0C 03 01 00 02 11 03 11 00 3F 00; // cam_init_result=