mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
Formatting
This commit is contained in:
parent
d78614705c
commit
32e928e996
@ -138,7 +138,9 @@ def stats_history():
|
|||||||
@bp.route("/config")
|
@bp.route("/config")
|
||||||
def config():
|
def config():
|
||||||
config_obj: FrigateConfig = current_app.frigate_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
|
# remove the mqtt password
|
||||||
config["mqtt"].pop("password", None)
|
config["mqtt"].pop("password", None)
|
||||||
|
|||||||
@ -360,17 +360,14 @@ def yuv_crop_and_resize(frame, region, height=None):
|
|||||||
# copy u2
|
# copy u2
|
||||||
yuv_cropped_frame[
|
yuv_cropped_frame[
|
||||||
size + uv_channel_y_offset : size + uv_channel_y_offset + uv_crop_height,
|
size + uv_channel_y_offset : size + uv_channel_y_offset + uv_crop_height,
|
||||||
size // 2
|
size // 2 + uv_channel_x_offset : size // 2
|
||||||
+ uv_channel_x_offset : size // 2
|
|
||||||
+ uv_channel_x_offset
|
+ uv_channel_x_offset
|
||||||
+ uv_crop_width,
|
+ uv_crop_width,
|
||||||
] = frame[u2[1] : u2[3], u2[0] : u2[2]]
|
] = frame[u2[1] : u2[3], u2[0] : u2[2]]
|
||||||
|
|
||||||
# copy v1
|
# copy v1
|
||||||
yuv_cropped_frame[
|
yuv_cropped_frame[
|
||||||
size
|
size + size // 4 + uv_channel_y_offset : size
|
||||||
+ size // 4
|
|
||||||
+ uv_channel_y_offset : size
|
|
||||||
+ size // 4
|
+ size // 4
|
||||||
+ uv_channel_y_offset
|
+ uv_channel_y_offset
|
||||||
+ uv_crop_height,
|
+ uv_crop_height,
|
||||||
@ -379,14 +376,11 @@ def yuv_crop_and_resize(frame, region, height=None):
|
|||||||
|
|
||||||
# copy v2
|
# copy v2
|
||||||
yuv_cropped_frame[
|
yuv_cropped_frame[
|
||||||
size
|
size + size // 4 + uv_channel_y_offset : size
|
||||||
+ size // 4
|
|
||||||
+ uv_channel_y_offset : size
|
|
||||||
+ size // 4
|
+ size // 4
|
||||||
+ uv_channel_y_offset
|
+ uv_channel_y_offset
|
||||||
+ uv_crop_height,
|
+ uv_crop_height,
|
||||||
size // 2
|
size // 2 + uv_channel_x_offset : size // 2
|
||||||
+ uv_channel_x_offset : size // 2
|
|
||||||
+ uv_channel_x_offset
|
+ uv_channel_x_offset
|
||||||
+ uv_crop_width,
|
+ uv_crop_width,
|
||||||
] = frame[v2[1] : v2[3], v2[0] : v2[2]]
|
] = frame[v2[1] : v2[3], v2[0] : v2[2]]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user