ui.py: update for nv12

pull/24847/head
Adeeb Shihadeh 3 years ago
parent 566de12671
commit f05166ae26
  1. 2
      tools/replay/ui.py

@ -118,7 +118,7 @@ def ui_thread(addr):
imgff = np.frombuffer(yuv_img_raw, dtype=np.uint8).reshape((vipc_client.height * 3 // 2, vipc_client.width))
num_px = vipc_client.width * vipc_client.height
bgr = cv2.cvtColor(imgff, cv2.COLOR_YUV2RGB_I420)
bgr = cv2.cvtColor(imgff, cv2.COLOR_YUV2RGB_NV12)
zoom_matrix = _BB_TO_FULL_FRAME[num_px]
cv2.warpAffine(bgr, zoom_matrix[:2], (img.shape[1], img.shape[0]), dst=img, flags=cv2.WARP_INVERSE_MAP)

Loading…
Cancel
Save