From 0bc78ce16b6e5f96da9da8642724c752ba47202a Mon Sep 17 00:00:00 2001 From: ZwX1616 Date: Thu, 22 Sep 2022 12:52:48 -0700 Subject: [PATCH] camerad: recalibrate ox colors for HDR (#25874) re old-commit-hash: 4ed0abd19734f5af1f2dbb899fd75686a90afbde --- system/camerad/cameras/real_debayer.cl | 6 +++--- system/camerad/cameras/sensor2_i2c.h | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/system/camerad/cameras/real_debayer.cl b/system/camerad/cameras/real_debayer.cl index 4a36a03bf5..59aa488653 100644 --- a/system/camerad/cameras/real_debayer.cl +++ b/system/camerad/cameras/real_debayer.cl @@ -9,9 +9,9 @@ float3 color_correct(float3 rgb) { // color correction #if IS_OX - float3 x = rgb.x * (float3)(1.81485125, -0.51650643, -0.06985117); - x += rgb.y * (float3)(-0.51681964, 1.85935946, -0.49871889); - x += rgb.z * (float3)(-0.29803161, -0.34285304, 1.56857006); + float3 x = rgb.x * (float3)(1.5664815 , -0.29808738, -0.03973474); + x += rgb.y * (float3)(-0.48672447, 1.41914433, -0.40295248); + x += rgb.z * (float3)(-0.07975703, -0.12105695, 1.44268722); #else float3 x = rgb.x * (float3)(1.82717181, -0.31231438, 0.07307673); x += rgb.y * (float3)(-0.5743977, 1.36858544, -0.53183455); diff --git a/system/camerad/cameras/sensor2_i2c.h b/system/camerad/cameras/sensor2_i2c.h index 209e2d76d2..ab51059d9a 100644 --- a/system/camerad/cameras/sensor2_i2c.h +++ b/system/camerad/cameras/sensor2_i2c.h @@ -727,10 +727,10 @@ struct i2c_random_wr_payload init_array_ox03c10[] = { // color balance gains // blue - {0x5280, 0x06}, {0x5281, 0x4A}, // hcg - {0x5480, 0x06}, {0x5481, 0x4A}, // lcg - {0x5680, 0x07}, {0x5681, 0xDD}, // spd - {0x5880, 0x06}, {0x5881, 0x4A}, // vs + {0x5280, 0x06}, {0x5281, 0xCB}, // hcg + {0x5480, 0x06}, {0x5481, 0xCB}, // lcg + {0x5680, 0x06}, {0x5681, 0xCB}, // spd + {0x5880, 0x06}, {0x5881, 0xCB}, // vs // green(blue) {0x5282, 0x04}, {0x5283, 0x00}, @@ -745,10 +745,10 @@ struct i2c_random_wr_payload init_array_ox03c10[] = { {0x5884, 0x04}, {0x5885, 0x00}, // red - {0x5286, 0x08}, {0x5287, 0x6C}, - {0x5486, 0x08}, {0x5487, 0x6C}, - {0x5686, 0x08}, {0x5687, 0xAA}, - {0x5886, 0x08}, {0x5887, 0x6C}, + {0x5286, 0x08}, {0x5287, 0xDE}, + {0x5486, 0x08}, {0x5487, 0xDE}, + {0x5686, 0x08}, {0x5687, 0xDE}, + {0x5886, 0x08}, {0x5887, 0xDE}, }; struct i2c_random_wr_payload init_array_ar0231[] = {