mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-27 17:42:04 +08:00
debayering: fix divide for reading 12 bit values (#24546)
old-commit-hash: 8f9ba7540b4549b4a57312129b8ff678d045f70f
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user