debayering: fix divide for reading 12 bit values (#24546)

old-commit-hash: 8f9ba7540b4549b4a57312129b8ff678d045f70f
This commit is contained in:
Joost Wooning
2022-05-16 13:19:22 +02:00
committed by GitHub
parent 3dcf2ab4f1
commit fb32a313a1
+1 -1
View File
@@ -60,7 +60,7 @@ inline half val_from_10(const uchar * source, int gx, int gy, half black_level)
int offset = gx % 2;
uint major = (uint)source[start + offset] << 4;
uint minor = (source[start + 2] >> (4 * offset)) & 0xf;
half pv = (half)((major + minor)/4);
half pv = ((half)(major + minor)) / 4.0;
// normalize
pv = max((half)0.0, pv - black_level);