summaryrefslogtreecommitdiff
path: root/utils/raspberrypi/ctt/ctt_image_load.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-05-02 03:32:00 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-05-13 16:58:32 +0300
commit863e31fa52b837d30d38de9ba5d7e30096297b0c (patch)
treebd0e6c3277b9ebf67a6ae9534e260584c53fee1e /utils/raspberrypi/ctt/ctt_image_load.py
parent641c6ebe9b278e0b00f0125133eebe9c0037ab88 (diff)
utils: raspberrypi: ctt: Fix pycodestyle E228
E228 missing whitespace around modulo operator Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Diffstat (limited to 'utils/raspberrypi/ctt/ctt_image_load.py')
-rw-r--r--utils/raspberrypi/ctt/ctt_image_load.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/raspberrypi/ctt/ctt_image_load.py b/utils/raspberrypi/ctt/ctt_image_load.py
index 035256e3..584e0f8e 100644
--- a/utils/raspberrypi/ctt/ctt_image_load.py
+++ b/utils/raspberrypi/ctt/ctt_image_load.py
@@ -112,10 +112,10 @@ class Image:
"""
assemble 10 bit numbers
"""
- ch0 = np.left_shift((np.left_shift(ba0, 2) + (ba4%4)), 6)
- ch1 = np.left_shift((np.left_shift(ba1, 2) + (np.right_shift(ba4, 2)%4)), 6)
- ch2 = np.left_shift((np.left_shift(ba2, 2) + (np.right_shift(ba4, 4)%4)), 6)
- ch3 = np.left_shift((np.left_shift(ba3, 2) + (np.right_shift(ba4, 6)%4)), 6)
+ ch0 = np.left_shift((np.left_shift(ba0, 2) + (ba4 % 4)), 6)
+ ch1 = np.left_shift((np.left_shift(ba1, 2) + (np.right_shift(ba4, 2) % 4)), 6)
+ ch2 = np.left_shift((np.left_shift(ba2, 2) + (np.right_shift(ba4, 4) % 4)), 6)
+ ch3 = np.left_shift((np.left_shift(ba3, 2) + (np.right_shift(ba4, 6) % 4)), 6)
"""
interleave bits
"""
@@ -146,8 +146,8 @@ class Image:
ba0 = raw[..., 0:3*((self.w+1)>>1):3]
ba1 = raw[..., 1:3*((self.w+1)>>1):3]
ba2 = raw[..., 2:3*((self.w+1)>>1):3]
- ch0 = np.left_shift((np.left_shift(ba0, 4) + ba2%16), 4)
- ch1 = np.left_shift((np.left_shift(ba1, 4) + (np.right_shift(ba2, 4))%16), 4)
+ ch0 = np.left_shift((np.left_shift(ba0, 4) + ba2 % 16), 4)
+ ch1 = np.left_shift((np.left_shift(ba1, 4) + (np.right_shift(ba2, 4)) % 16), 4)
mat = np.empty((self.h, self.w), dtype=ch0.dtype)
mat[..., 0::2] = ch0
mat[..., 1::2] = ch1