diff --git a/frigate/api/app.py b/frigate/api/app.py index ea8ad4bdd..a324b6a05 100644 --- a/frigate/api/app.py +++ b/frigate/api/app.py @@ -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) diff --git a/frigate/util/image.py b/frigate/util/image.py index 349240c95..67f8b5c22 100644 --- a/frigate/util/image.py +++ b/frigate/util/image.py @@ -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]]