From a1e3dda3ee44a692a809ae5ff3bee19a971c52b9 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 3 Jul 2023 20:04:01 -0600 Subject: [PATCH] Clarify comment --- frigate/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/output.py b/frigate/output.py index f4d9bb0c3..5b591f505 100644 --- a/frigate/output.py +++ b/frigate/output.py @@ -385,7 +385,7 @@ class BirdsEyeFrameManager: def get_standard_aspect_ratio(camera_width, camera_height) -> tuple[int, int]: """Ensure that only standard aspect ratios are used.""" - known_aspects = [(16, 9), (9, 16), (32, 9), (12, 9), (9, 12)] # aspects are scaled to be same ratio + known_aspects = [(16, 9), (9, 16), (32, 9), (12, 9), (9, 12)] # aspects are scaled to have common relative size known_aspects_ratios = list(map(lambda aspect: aspect[0] / aspect[1], known_aspects)) closest = min(known_aspects_ratios, key=lambda x:abs(x-(camera_width / camera_height))) return known_aspects[known_aspects_ratios.index(closest)]