mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 04:22:09 +08:00
os04c10: 12bit tune (#33947)
* much better * also isp --------- Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
@@ -70,7 +70,7 @@ OS04C10::OS04C10() {
|
||||
};
|
||||
for (int i = 0; i < 65; i++) {
|
||||
float fx = i / 64.0;
|
||||
gamma_lut_rgb.push_back((uint32_t)(pow(fx, 0.7)*1023.0 + 0.5));
|
||||
gamma_lut_rgb.push_back((uint32_t)((10*fx)/(1+9*fx)*1023.0 + 0.5));
|
||||
}
|
||||
prepare_gamma_lut();
|
||||
linearization_lut = {
|
||||
|
||||
@@ -52,11 +52,7 @@ float3 color_correct(float3 rgb) {
|
||||
}
|
||||
|
||||
float3 apply_gamma(float3 rgb, int expo_time) {
|
||||
return powr(rgb, 0.7);
|
||||
/*float s = log2((float)expo_time);
|
||||
if (s < 6) {s = fmin(12.0 - s, 9.0);}
|
||||
// log function adaptive to number of bits
|
||||
return clamp(log(1 + rgb*(PV_MAX16 - BLACK_LVL)) * (0.48*s*s - 12.92*s + 115.0) - (1.08*s*s - 29.2*s + 260.0), 0.0, 255.0) / 255.0;*/
|
||||
return (10 * rgb) / (1 + 9 * rgb);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user