mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
Formatting
This commit is contained in:
parent
d78614705c
commit
32e928e996
@ -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)
|
||||
|
||||
@ -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]]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user