Skip to content

Commit 196abb8

Browse files
author
Stefan Klug
committed
ipa: rkisp1: Move ov4689 and ov5640 black levels into sensor helpers
Move black levels for tuning files that contained a BLC block into the camera sensor helpers. ov4689.yaml had 66@12bit while the datasheet states 64@12bit. Use the value from the datasheet (scaled to 16bit). ov5640.yaml had 256@12bit while the datasheet states 16@10bit. Looking at the commit message the 256 most likely stems from the imx219 tuning file and 16@10bit is the same as the 64@12bit from the ov4689. This seems more likely and is therefore used. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1 parent 27e4d3f commit 196abb8

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/ipa/libipa/camera_sensor_helper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ class CameraSensorHelperOv4689 : public CameraSensorHelper
553553
public:
554554
CameraSensorHelperOv4689()
555555
{
556+
/* From datasheet: 0x40 at 12bits. */
557+
blackLevel_ = 1024;
556558
gainType_ = AnalogueGainLinear;
557559
gainConstants_.linear = { 1, 0, 0, 128 };
558560
}
@@ -564,6 +566,8 @@ class CameraSensorHelperOv5640 : public CameraSensorHelper
564566
public:
565567
CameraSensorHelperOv5640()
566568
{
569+
/* From datasheet: 0x10 at 10bits. */
570+
blackLevel_ = 1024;
567571
gainType_ = AnalogueGainLinear;
568572
gainConstants_.linear = { 1, 0, 0, 16 };
569573
}

src/ipa/rkisp1/data/ov4689.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@ algorithms:
66
- Agc:
77
- Awb:
88
- BlackLevelCorrection:
9-
R: 66
10-
Gr: 66
11-
Gb: 66
12-
B: 66
139
...

src/ipa/rkisp1/data/ov5640.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ algorithms:
66
- Agc:
77
- Awb:
88
- BlackLevelCorrection:
9-
R: 256
10-
Gr: 256
11-
Gb: 256
12-
B: 256
139
- ColorProcessing:
1410
- GammaSensorLinearization:
1511
x-intervals: [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]

0 commit comments

Comments
 (0)