Formatting

This commit is contained in:
Nicolas Mowen 2024-04-09 15:17:47 -06:00
parent d78614705c
commit 32e928e996
2 changed files with 7 additions and 11 deletions

View File

@ -138,7 +138,9 @@ def stats_history():
@bp.route("/config")
def config():
config_obj: FrigateConfig = current_app.frigate_config
config: dict[str, dict[str, any]] = config_obj.model_dump(mode="json", exclude_none=True)
config: dict[str, dict[str, any]] = config_obj.model_dump(
mode="json", exclude_none=True
)
# remove the mqtt password
config["mqtt"].pop("password", None)

View File

@ -360,17 +360,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,
@ -379,14 +376,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]]