summaryrefslogtreecommitdiff
path: root/drivers/media/video/wmt_v4l2/sensors/sp0838/sp0838.h
blob: 6f98a9efe5140a674336e0a083255c2429d37ed2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788

#ifndef __SP0838_H_
#define __SP0838_H_

//ECLK Drv
#define  Pre_Value_P0_0x30  0x00
//Filter en&dis
#define  Pre_Value_P0_0x56  0x70
#define  Pre_Value_P0_0x57  0x10  //filter outdoor
#define  Pre_Value_P0_0x58  0x10  //filter indoor
#define  Pre_Value_P0_0x59  0x10  //filter night
#define  Pre_Value_P0_0x5a  0x08  //smooth outdoor 0x02
#define  Pre_Value_P0_0x5b  0x14  //smooth indoor 0x02
#define  Pre_Value_P0_0x5c  0x30  //smooht night 0x20
//outdoor sharpness
#define  Pre_Value_P0_0x65  0x03
#define  Pre_Value_P0_0x66  0x01
#define  Pre_Value_P0_0x67  0x03
#define  Pre_Value_P0_0x68  0x46
//indoor sharpness
#define  Pre_Value_P0_0x6b  0x04
#define  Pre_Value_P0_0x6c  0x01
#define  Pre_Value_P0_0x6d  0x03// 0x03
#define  Pre_Value_P0_0x6e  0x43
//night sharpness
#define  Pre_Value_P0_0x71  0x05
#define  Pre_Value_P0_0x72  0x01
#define  Pre_Value_P0_0x73  0x03
#define  Pre_Value_P0_0x74  0x43
//color
#define  Pre_Value_P0_0x7f  0xd7  //R
#define  Pre_Value_P0_0x87  0xf8  //B
//satutation
#define  Pre_Value_P0_0xd8  0x48
#define  Pre_Value_P0_0xd9  0x44//0x48
#define  Pre_Value_P0_0xda  0x3a//0x48
#define  Pre_Value_P0_0xdb  0x38//0x48
//AE target
#define  Pre_Value_P0_0xf7  0x78
#define  Pre_Value_P0_0xf8  0x63
#define  Pre_Value_P0_0xf9  0x68
#define  Pre_Value_P0_0xfa  0x53
//HEQ
#define  Pre_Value_P0_0xdd  0x78 // 0x70
#define  Pre_Value_P0_0xde  0x88 // 0x90
//AWB pre gain
#define  Pre_Value_P1_0x28  0x75
#define  Pre_Value_P1_0x29  0x4e

//VBLANK
#define  Pre_Value_P0_0x05  0x00
#define  Pre_Value_P0_0x06  0x00
//HBLANK
#define  Pre_Value_P0_0x09  0x01
#define  Pre_Value_P0_0x0a  0x76


// Scene Mode
uint8_t sp0838_scene_mode_auto[] = {
	//caprure preview daylight 24M 50hz 20-8FPS maxgain:0x70
	0xfd,0x00,
	0x05,0x0 ,
	0x06,0x0 ,
	0x09,0x1 ,
	0x0a,0x76,
	0xf0,0x62,
	0xf1,0x0 ,
	0xf2,0x5f,
	0xf5,0x78,
	0xfd,0x01,
	0x00,0xb2,
	0x0f,0x60,
	0x16,0x60,
	0x17,0xa2,
	0x18,0xaa,
	0x1b,0x60,
	0x1c,0xaa,
	0xb4,0x20,
	0xb5,0x3a,
	0xb6,0x5e,
	0xb9,0x40,
	0xba,0x4f,
	0xbb,0x47,
	0xbc,0x45,
	0xbd,0x43,
	0xbe,0x42,
	0xbf,0x42,
	0xc0,0x42,
	0xc1,0x41,
	0xc2,0x41,
	0xc3,0x41,
	0xc4,0x41,
	0xc5,0x70,
	0xc6,0x41,
	0xca,0x70,
	0xcb,0xc ,
	0x14,0x20,
	0x15,0x0f,
	0xfd,0x00,
};

uint8_t sp0838_scene_mode_night[] = {
	//capture preview night 24M 50hz 20-6FPS maxgain:0x78
	0xfd,0x00,
	0x05,0x0 ,
	0x06,0x0 ,
	0x09,0x1 ,
	0x0a,0x76,
	0xf0,0x62,
	0xf1,0x0 ,
	0xf2,0x5f,
	0xf5,0x78,
	0xfd,0x01,
	0x00,0xc0,
	0x0f,0x60,
	0x16,0x60,
	0x17,0xa8,
	0x18,0xb0,
	0x1b,0x60,
	0x1c,0xb0,
	0xb4,0x20,
	0xb5,0x3a,
	0xb6,0x5e,
	0xb9,0x40,
	0xba,0x4f,
	0xbb,0x47,
	0xbc,0x45,
	0xbd,0x43,
	0xbe,0x42,
	0xbf,0x42,
	0xc0,0x42,
	0xc1,0x41,
	0xc2,0x41,
	0xc3,0x41,
	0xc4,0x41,
	0xc5,0x41,
	0xc6,0x41,
	0xca,0x78,
	0xcb,0x10,
	0x14,0x20,
	0x15,0x1f,
	0xfd,0x00,
};


// White Balance
uint8_t sp0838_wb_auto [] = {
	0xfd,0x01,
	0x28,Pre_Value_P1_0x28,
	0x29,Pre_Value_P1_0x29,
	0xfd,0x00,
	0x32,0x15,
	0xfd,0x00,
};

uint8_t sp0838_wb_incandescent [] = {
	0xfd,0x00,  //2800K-3000K
	0x32,0x05,
	0xfd,0x01,
	0x28,0x41,
	0x29,0x71,
	0xfd,0x00,
};

uint8_t sp0838_wb_fluorescent [] = {
	0xfd,0x00,  //4200K-5000K
	0x32,0x05,
	0xfd,0x01,
	0x28,0x5a,
	0x29,0x62,
	0xfd,0x00,
};

uint8_t sp0838_wb_daylight [] = {
	0xfd,0x00,
	0x32,0x05,
	0xfd,0x01,
	0x28,0x6b,
	0x29,0x48,
	0xfd,0x00,
};

uint8_t sp0838_wb_cloudy [] = {
	0xfd,0x00,
	0x32,0x05,
	0xfd,0x01,
	0x28,0x71,
	0x29,0x41,
	0xfd,0x00,
};

uint8_t sp0838_wb_tungsten [] = {
	0xfd,0x00,  //4000K
	0x32,0x05,
	0xfd,0x01,
	0x28,0x57,
	0x29,0x66,
	0xfd,0x00
};


// Exposure
uint8_t sp0838_exposure_neg2[] = {
	//level -2
	0xfd,0x00,
	0xed,Pre_Value_P0_0xf7-0x20+0x04,
	0xf7,Pre_Value_P0_0xf7-0x20,
	0xf8,Pre_Value_P0_0xf8-0x20,
	0xec,Pre_Value_P0_0xf8-0x20-0x04,
	0xef,Pre_Value_P0_0xf9-0x20+0x04,
	0xf9,Pre_Value_P0_0xf9-0x20,
	0xfa,Pre_Value_P0_0xfa-0x20,
	0xee,Pre_Value_P0_0xfa-0x20-0x04,
	0xfd, 0x00,
};

uint8_t sp0838_exposure_neg1[] = {
	//level -2
	0xfd,0x00,
	0xed,Pre_Value_P0_0xf7-0x10+0x04,
	0xf7,Pre_Value_P0_0xf7-0x10,
	0xf8,Pre_Value_P0_0xf8-0x10,
	0xec,Pre_Value_P0_0xf8-0x10-0x04,
	0xef,Pre_Value_P0_0xf9-0x10+0x04,
	0xf9,Pre_Value_P0_0xf9-0x10,
	0xfa,Pre_Value_P0_0xfa-0x10,
	0xee,Pre_Value_P0_0xfa-0x10-0x04,

	0xfd, 0x00,
};

uint8_t sp0838_exposure_zero[] = {
	//level 0
	0xfd,0x00,
	0xed,Pre_Value_P0_0xf7+0x04,
	0xf7,Pre_Value_P0_0xf7,
	0xf8,Pre_Value_P0_0xf8,
	0xec,Pre_Value_P0_0xf8-0x04,
	0xef,Pre_Value_P0_0xf9+0x04,
	0xf9,Pre_Value_P0_0xf9,
	0xfa,Pre_Value_P0_0xfa,
	0xee,Pre_Value_P0_0xfa-0x04,
	0xfd, 0x00,
};

uint8_t sp0838_exposure_pos1[] = {
	//level +2
	0xfd,0x00,
	0xed,Pre_Value_P0_0xf7+0x10+0x04,
	0xf7,Pre_Value_P0_0xf7+0x10,
	0xf8,Pre_Value_P0_0xf8+0x10,
	0xec,Pre_Value_P0_0xf8+0x10-0x04,
	0xef,Pre_Value_P0_0xf9+0x10+0x04,
	0xf9,Pre_Value_P0_0xf9+0x10,
	0xfa,Pre_Value_P0_0xfa+0x10,
	0xee,Pre_Value_P0_0xfa+0x10-0x04,
	0xfd, 0x00,
};

uint8_t sp0838_exposure_pos2[] = {
	//level +2
	0xfd,0x00,
	0xed,Pre_Value_P0_0xf7+0x20+0x04,
	0xf7,Pre_Value_P0_0xf7+0x20,
	0xf8,Pre_Value_P0_0xf8+0x20,
	0xec,Pre_Value_P0_0xf8+0x20-0x04,
	0xef,Pre_Value_P0_0xf9+0x20+0x04,
	0xf9,Pre_Value_P0_0xf9+0x20,
	0xfa,Pre_Value_P0_0xfa+0x20,
	0xee,Pre_Value_P0_0xfa+0x20-0x04,
	0xfd, 0x00,
};


// Color Effect
uint8_t sp0838_colorfx_none[] = {
	0xfd, 0x00,
	0x62, 0x00,
	0x63, 0x80,
	0x64, 0x80,
};

uint8_t sp0838_colorfx_bw[] = {
	0xfd, 0x00,
	0x62, 0x40,
	0x63, 0x80,
	0x64, 0x80,
};

uint8_t sp0838_colorfx_sepia[] = {
	0xfd, 0x00,
	0x62, 0x20,
	0x63, 0xc0,
	0x64, 0x20,

};

uint8_t sp0838_colorfx_negative[] = {
	0xfd, 0x00,
	0x62, 0x10,
	0x63, 0x80,
	0x64, 0x80,
};

uint8_t sp0838_colorfx_emboss[] = {
	0xfd, 0x00,
	0x62, 0x02,
	0x63, 0x80,
	0x64, 0x80,
};

uint8_t sp0838_colorfx_sketch[] = {
	0xfd, 0x00,
	0x62, 0x01,
	0x63, 0x80,
	0x64, 0x80,
};

uint8_t sp0838_colorfx_sky_blue[] = {
	0xfd, 0x00,
	0x62, 0x20,
	0x63, 0x20,
	0x64, 0xf0,
};

uint8_t sp0838_colorfx_grass_green[] = {
	0xfd, 0x00,
	0x62, 0x20,
	0x63, 0x20,
	0x64, 0x20,
};

uint8_t sp0838_colorfx_skin_whiten[] = {
};

uint8_t sp0838_colorfx_vivid[] = {
};

// Brightness
uint8_t sp0838_brightness_neg4[] = {
	0xfd,0x00,
	0xdc,0xc0,//level -4
};

uint8_t sp0838_brightness_neg3[] = {
	0xfd,0x00,
	0xdc,0xd0,//level -3
};

uint8_t sp0838_brightness_neg2[] = {
	0xfd,0x00,
	0xdc,0xe0,//level -2
};

uint8_t sp0838_brightness_neg1[] = {
	0xfd,0x00,
	0xdc,0x00,//level -1
};

uint8_t sp0838_brightness_zero[] = {
	0xfd,0x00,
	0xdc,0x00,//level 0
};

uint8_t sp0838_brightness_pos1[] = {
	0xfd,0x00,
	0xdc,0x10,//level +1
};

uint8_t sp0838_brightness_pos2[] = {
	0xfd,0x00,
	0xdc,0x20,//level +2
};

uint8_t sp0838_brightness_pos3[] = {
	0xfd,0x00,
	0xdc,0x30,//level +3
};

uint8_t sp0838_brightness_pos4[] = {
	0xfd,0x00,
	0xdc,0x40,//level +4
};

// Contrast
uint8_t sp0838_contrast_neg4[] = {
	0xfd, 0x00,
	0xdd,Pre_Value_P0_0xdd-0x40,	//level -4
	0xde,Pre_Value_P0_0xde-0x40,

};

uint8_t sp0838_contrast_neg3[] = {
	0xfd, 0x00,
	0xdd,Pre_Value_P0_0xdd-0x30,	//level -3
	0xde,Pre_Value_P0_0xde-0x30,

};

uint8_t sp0838_contrast_neg2[] = {
	0xfd, 0x00,
	0xdd,Pre_Value_P0_0xdd-0x20,	//level -2
	0xde,Pre_Value_P0_0xde-0x20,

};

uint8_t sp0838_contrast_neg1[] = {
	0xfd, 0x00,
	0xdd, Pre_Value_P0_0xdd-0x10,	//level -1
	0xde, Pre_Value_P0_0xde-0x10,

};

uint8_t sp0838_contrast_zero[] = {
	0xfd, 0x00,
	0xdd, Pre_Value_P0_0xdd, //level 0
	0xde, Pre_Value_P0_0xde,

};

uint8_t sp0838_contrast_pos1[] = {
	0xfd, 0x00,
	0xdd,Pre_Value_P0_0xdd+0x10,	//level +1
	0xde,Pre_Value_P0_0xde+0x10,

};

uint8_t sp0838_contrast_pos2[] = {
	0xfd, 0x00,
	0xdd,Pre_Value_P0_0xdd+0x20,	//level +2
	0xde,Pre_Value_P0_0xde+0x20,

};

uint8_t sp0838_contrast_pos3[] = {
	0xfd, 0x00,
	0xdd,Pre_Value_P0_0xdd+0x30,	//level +3
	0xde,Pre_Value_P0_0xde+0x30,

};

uint8_t sp0838_contrast_pos4[] = {
	0xfd, 0x00,
	0xdd,Pre_Value_P0_0xdd+0x40,	//level +4
	0xde,Pre_Value_P0_0xde+0x40,

};

// Saturation
uint8_t sp0838_saturation_neg4[] = {
	0xfd, 0x00,
	0xd8, 0x00,
	0xd9, 0x00,
	0xda, 0x00,
	0xdb, 0x00,
};

uint8_t sp0838_saturation_neg3[] = {
	0xfd, 0x00,
	0xd8, Pre_Value_P0_0xd8-0x30,
	0xd9, Pre_Value_P0_0xd9-0x30,
	0xda, Pre_Value_P0_0xda-0x30,
	0xdb, Pre_Value_P0_0xdb-0x30,
};

uint8_t sp0838_saturation_neg2[] = {
	0xfd, 0x00,
	0xd8, Pre_Value_P0_0xd8-0x20,
	0xd9, Pre_Value_P0_0xd9-0x20,
	0xda, Pre_Value_P0_0xda-0x20,
	0xdb, Pre_Value_P0_0xdb-0x20,
};

uint8_t sp0838_saturation_neg1[] = {
	0xfd, 0x00,
	0xd8, Pre_Value_P0_0xd8-0x10,
	0xd9, Pre_Value_P0_0xd9-0x10,
	0xda, Pre_Value_P0_0xda-0x10,
	0xdb, Pre_Value_P0_0xdb-0x10,
};

uint8_t sp0838_saturation_zero[] = {
	0xfd, 0x00,
	0xd8, Pre_Value_P0_0xd8,
	0xd9, Pre_Value_P0_0xd9,
	0xda, Pre_Value_P0_0xda,
	0xdb, Pre_Value_P0_0xdb,

};

uint8_t sp0838_saturation_pos1[] = {
	0xfd, 0x00,
	0xd8, Pre_Value_P0_0xd8+0x10,
	0xd9, Pre_Value_P0_0xd9+0x10,
	0xda, Pre_Value_P0_0xda+0x10,
	0xdb, Pre_Value_P0_0xdb+0x10,
};

uint8_t sp0838_saturation_pos2[] = {
	0xfd, 0x00,
	0xd8, Pre_Value_P0_0xd8+0x20,
	0xd9, Pre_Value_P0_0xd9+0x20,
	0xda, Pre_Value_P0_0xda+0x20,
	0xdb, Pre_Value_P0_0xdb+0x20,

};

uint8_t sp0838_saturation_pos3[] = {
	0xfd, 0x00,
	0xd8, Pre_Value_P0_0xd8+0x30,
	0xd9, Pre_Value_P0_0xd9+0x30,
	0xda, Pre_Value_P0_0xda+0x30,
	0xdb, Pre_Value_P0_0xdb+0x30,

};

uint8_t sp0838_saturation_pos4[] = {
	0xfd, 0x00,
	0xd8, Pre_Value_P0_0xd8+0x40,
	0xd9, Pre_Value_P0_0xd9+0x40,
	0xda, Pre_Value_P0_0xda+0x40,
	0xdb, Pre_Value_P0_0xdb+0x40,

};


// Resolution

// QCIF
uint8_t sp0838_176x144[]={
};

// QVGA
uint8_t sp0838_320x240[]={
};

// CIF
uint8_t sp0838_352x288[]={
};

// VGA
uint8_t sp0838_640x480[]={
};

// SVGA
uint8_t sp0838_800x600[]={
};

// XGA
uint8_t sp0838_1024x768[]={
};

// 720p
uint8_t sp0838_1280x720[]={
};

// UXGA
uint8_t sp0838_1600x1200[]={
};

// 1080p
uint8_t sp0838_1920x1080[]={
};

// QXGA
uint8_t sp0838_2048x1536[]={
};

uint8_t sp0838_2592x1944[]={
};

// Initiliztion
uint8_t sp0838_default_regs_init[] = {
	//SP0838 ini
	0xfd,0x00,//P0
	0x1B,0x02,
	0x27,0xe8,
	0x28,0x0B,
	0x32,0x00,
	0x22,0xc0,
	0x26,0x10,
	0x5f,0x11,//Bayer order
	0xfd,0x01,//P1
	0x25,0x1a,//Awb start
	0x26,0xfb,
	0x28,Pre_Value_P1_0x28,
	0x29,Pre_Value_P1_0x29,
	0xfd,0x00,
	0xe7,0x03,
	0xe7,0x00,
	0xfd,0x01,
	0x31,0x60,//64
	0x32,0x18,
	0x4d,0xdc,
	0x4e,0x53,
	0x41,0x8c,
	0x42,0x57,
	0x55,0xff,
	0x56,0x00,
	0x59,0x82,
	0x5a,0x00,
	0x5d,0xff,
	0x5e,0x6f,
	0x57,0xff,
	0x58,0x00,
	0x5b,0xff,
	0x5c,0xa8,
	0x5f,0x75,
	0x60,0x00,
	0x2d,0x00,
	0x2e,0x00,
	0x2f,0x00,
	0x30,0x00,
	0x33,0x00,
	0x34,0x00,
	0x37,0x00,
	0x38,0x00,//awb end
	0xfd,0x00,//P0
	0x33,0x6f,//LSC BPC EN
	0x51,0x3f,//BPC debug start
	0x52,0x09,
	0x53,0x00,
	0x54,0x00,
	0x55,0x10,//BPC debug end
	0x4f,0x08,//blueedge
	0x50,0x08,
	0x57,Pre_Value_P0_0x57,//Raw filter debut start
	0x58,Pre_Value_P0_0x58,
	0x59,Pre_Value_P0_0x59,
	0x56,Pre_Value_P0_0x56,
	0x5a,Pre_Value_P0_0x5a,
	0x5b,Pre_Value_P0_0x5b,
	0x5c,Pre_Value_P0_0x5c,//Raw filter debut end
	0x65,Pre_Value_P0_0x65,//Sharpness debug start
	0x66,Pre_Value_P0_0x66,
	0x67,Pre_Value_P0_0x67,
	0x68,Pre_Value_P0_0x68,
	0x69,0x7f,
	0x6a,0x01,
	0x6b,Pre_Value_P0_0x6b,
	0x6c,Pre_Value_P0_0x6c,
	0x6d,Pre_Value_P0_0x6d,//Edge gain normal
	0x6e,Pre_Value_P0_0x6e,//Edge gain normal
	0x6f,0x7f,
	0x70,0x01,
	0x71,Pre_Value_P0_0x71, //Èñ»¯ãÐÖµ
	0x72,Pre_Value_P0_0x72, //ÈõÂÖÀªãÐÖµ
	0x73,Pre_Value_P0_0x73, //±ßÔµÕýÏòÔöÒæÖµ
	0x74,Pre_Value_P0_0x74, //±ßÔµ·´ÏòÔöÒæÖµ
	0x75,0x7f,              //ʹÄÜλ
	0x76,0x01,//Sharpness debug end
	0xcb,0x07,//HEQ&Saturation debug start
	0xcc,0x04,
	0xce,0xff,
	0xcf,0x10,
	0xd0,0x20,
	0xd1,0x00,
	0xd2,0x1c,
	0xd3,0x16,
	0xd4,0x00,
	0xd6,0x1c,
	0xd7,0x16,
	0xdd,Pre_Value_P0_0xdd,//Contrast
	0xde,Pre_Value_P0_0xde,//HEQ&Saturation debug end
	0x7f,Pre_Value_P0_0x7f,//Color Correction start
	0x80,0xbc,
	0x81,0xed,
	0x82,0xd7,
	0x83,0xd4,
	0x84,0xd6,
	0x85,0xff,
	0x86,0x89,
	0x87,Pre_Value_P0_0x87,
	0x88,0x3c,
	0x89,0x33,
	0x8a,0x0f,//Color Correction end
	0x8b,0x0 ,//gamma start
	0x8c,0x1a,
	0x8d,0x29,
	0x8e,0x41,
	0x8f,0x62,
	0x90,0x7c,
	0x91,0x90,
	0x92,0xa2,
	0x93,0xaf,
	0x94,0xbc,
	0x95,0xc5,
	0x96,0xcd,
	0x97,0xd5,
	0x98,0xdd,
	0x99,0xe5,
	0x9a,0xed,
	0x9b,0xf5,
	0xfd,0x01,//P1
	0x8d,0xfd,
	0x8e,0xff,//gamma end
	0xfd,0x00,//P0
	0xca,0xcf,
	0xd8,Pre_Value_P0_0xd8,//UV outdoor
	0xd9,Pre_Value_P0_0xd9,//UV indoor
	0xda,Pre_Value_P0_0xda,//UV dummy
	0xdb,Pre_Value_P0_0xdb,//UV lowlight
	0xb9,0x00,//Ygamma start
	0xba,0x04,
	0xbb,0x08,
	0xbc,0x10,
	0xbd,0x20,
	0xbe,0x30,
	0xbf,0x40,
	0xc0,0x50,
	0xc1,0x60,
	0xc2,0x70,
	0xc3,0x80,
	0xc4,0x90,
	0xc5,0xA0,
	0xc6,0xB0,
	0xc7,0xC0,
	0xc8,0xD0,
	0xc9,0xE0,
	0xfd,0x01,//P1
	0x89,0xf0,
	0x8a,0xff,//Ygamma end
	0xfd,0x00,//P0
	0xe8,0x30,//AEdebug start
	0xe9,0x30,
	0xea,0x40,//Alc Window sel
	0xf4,0x1b,//outdoor mode sel
	0xf5,0x80,
	0xf7,Pre_Value_P0_0xf7,//AE target
	0xf8,Pre_Value_P0_0xf8,
	0xf9,Pre_Value_P0_0xf9,//AE target
	0xfa,Pre_Value_P0_0xfa,
	0xfd,0x01,//P1
	0x09,0x31,//AE Step 3.0
	0x0a,0x85,
	0x0b,0x0b,//AE Step 3.0
	0x14,0x20,
	0x15,0x0f,
	//caprure preview daylight 24M 50hz 20-8FPS maxgain:0x70
	0xfd,0x00,
	0x05,Pre_Value_P0_0x05 ,
	0x06,Pre_Value_P0_0x06 ,
	0x09,Pre_Value_P0_0x09 ,
	0x0a,Pre_Value_P0_0x0a ,
	0xf0,0x62,
	0xf1,0x0 ,
	0xf2,0x5f,
	0xf5,0x78,
	0xfd,0x01,
	0x00,0xb2,
	0x0f,0x60,
	0x16,0x60,
	0x17,0xa2,
	0x18,0xaa,
	0x1b,0x60,
	0x1c,0xaa,
	0xb4,0x20,
	0xb5,0x3a,
	0xb6,0x5e,
	0xb9,0x40,
	0xba,0x4f,
	0xbb,0x47,
	0xbc,0x45,
	0xbd,0x43,
	0xbe,0x42,
	0xbf,0x42,
	0xc0,0x42,
	0xc1,0x41,
	0xc2,0x41,
	0xc3,0x41,
	0xc4,0x41,
	0xc5,0x70,
	0xc6,0x41,
	0xca,0x70,
	0xcb,0x0c,
	0xfd,0x00,
	0xfd,0x00,  //P0
	0x32,0x15,  //Auto_mode set
	0x34,0x66,  //Isp_mode set
	0x35,0x40,  //out format
	0x36,0x80,
};

// Exit
uint8_t sp0838_default_regs_exit[] = {
};

#endif	/* #ifndef __SP0838_H_ */