From c8990cb174db9402dcdd1ff04fa4e462705fa838 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Wed, 22 Sep 2021 09:31:46 -0700 Subject: [PATCH] unlogger.py: fix YUV replay (#22299) old-commit-hash: 1e494a52248daa71c66ed92c59af3b2e822edc4b --- tools/replay/unlogger.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/replay/unlogger.py b/tools/replay/unlogger.py index 78bf4e6844..ff0ab9bcf2 100755 --- a/tools/replay/unlogger.py +++ b/tools/replay/unlogger.py @@ -173,7 +173,10 @@ def _get_address_send_func(address): return sock.send def _get_vipc_server(length): - w, h = {3 * w * h: (w, h) for (w, h) in [tici_f_frame_size, eon_f_frame_size]}[length] + sizes = {3 * w * h: (w, h) for (w, h) in [tici_f_frame_size, eon_f_frame_size]} # RGB + sizes.update({(3 * w * h) / 2: (w, h) for (w, h) in [tici_f_frame_size, eon_f_frame_size]}) # YUV + + w, h = sizes[length] vipc_server = VisionIpcServer("camerad") vipc_server.create_buffers(VisionStreamType.VISION_STREAM_RGB_BACK, 4, True, w, h)