From 9d7755dc7f9ecdb58cb64440c538b8059131d4ae Mon Sep 17 00:00:00 2001 From: mjq2020 Date: Mon, 7 Apr 2025 05:03:44 +0100 Subject: [PATCH] fix: code format error --- frigate/util/image.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/frigate/util/image.py b/frigate/util/image.py index 091b54a8d1..c7df25f6b0 100644 --- a/frigate/util/image.py +++ b/frigate/util/image.py @@ -458,17 +458,14 @@ def yuv_crop_and_resize(frame, region, height=None): # copy u2 yuv_cropped_frame[ size + uv_channel_y_offset : size + uv_channel_y_offset + uv_crop_height, - size // 2 - + uv_channel_x_offset : size // 2 + size // 2 + uv_channel_x_offset : size // 2 + uv_channel_x_offset + uv_crop_width, ] = frame[u2[1] : u2[3], u2[0] : u2[2]] # copy v1 yuv_cropped_frame[ - size - + size // 4 - + uv_channel_y_offset : size + size + size // 4 + uv_channel_y_offset : size + size // 4 + uv_channel_y_offset + uv_crop_height, @@ -477,14 +474,11 @@ def yuv_crop_and_resize(frame, region, height=None): # copy v2 yuv_cropped_frame[ - size - + size // 4 - + uv_channel_y_offset : size + size + size // 4 + uv_channel_y_offset : size + size // 4 + uv_channel_y_offset + uv_crop_height, - size // 2 - + uv_channel_x_offset : size // 2 + size // 2 + uv_channel_x_offset : size // 2 + uv_channel_x_offset + uv_crop_width, ] = frame[v2[1] : v2[3], v2[0] : v2[2]] @@ -1043,7 +1037,6 @@ class SharedMemoryResultManager(FrameManager): size = int.from_bytes(shm.buf[0:4], byteorder="little") if size <= 0: - return None batch_num = size // self.result_size // 4