    }
  }
  
  half3 color_correct(half3 rgb) {
    half3 ret = (0,0,0);
    half cpx = 0.01;
    ret += (half)rgb.x * color_correction[0];
    ret += (half)rgb.y * color_correction[1];
    ret += (half)rgb.z * color_correction[2];
    ret.x = mf(ret.x, cpx);
 
</s> remove   ret += (half)rgb.x * color_correction[0];
  ret += (half)rgb.y * color_correction[1];
  ret += (half)rgb.z * color_correction[2];
 </s> add   ret += (half)rgb.x * color_correction_0;
  ret += (half)rgb.y * color_correction_1;
  ret += (half)rgb.z * color_correction_2; </s> remove   ret = clamp(0.0h, 255.0h, ret*255.0h);
 </s> add   ret = clamp(0.0, 255.0, ret*255.0); </s> remove   pv = clamp(0.0h, 1.0h, pv);
 </s> add   pv = clamp((half)0.0, (half)1.0, pv); </s> remove   pv = max(0.0h, pv - black_level);
 </s> add   pv = max((half)0.0, pv - black_level); </s> remove const __constant half3 color_correction[3] = {
  // post wb CCM
  (half3)(1.82717181, -0.31231438, 0.07307673),
  (half3)(-0.5743977, 1.36858544, -0.53183455),
  (half3)(-0.25277411, -0.05627105, 1.45875782),
};
 </s> add // post wb CCM
const __constant half3 color_correction_0 = (half3)(1.82717181, -0.31231438, 0.07307673);
const __constant half3 color_correction_1 = (half3)(-0.5743977, 1.36858544, -0.53183455);
const __constant half3 color_correction_2 = (half3)(-0.25277411, -0.05627105, 1.45875782);
  half3 ret = (half3)(0.0, 0.0, 0.0);
    }
  }
  
  half3 color_correct(half3 rgb) {
  half3 ret = (half3)(0.0, 0.0, 0.0);
    half cpx = 0.01;
    ret += (half)rgb.x * color_correction[0];
    ret += (half)rgb.y * color_correction[1];
    ret += (half)rgb.z * color_correction[2];
    ret.x = mf(ret.x, cpx);
keep keep keep keep replace keep keep keep keep keep
 debayering: typedef half as float to run on pc (#24439)

* debayering: typedef half as float to run on pc

* add casts to literals

* define existing half type

* remove test code 
selfdrive/camerad/cameras/real_debayer.cl