Skip to content

Commit

Permalink
visionipc: remove RGB support
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Oct 7, 2024
1 parent 2040f04 commit 3f24f2b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions selfdrive/modeld/tests/test_modeld.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class TestModeld:

def setup_method(self):
self.vipc_server = VisionIpcServer("camerad")
self.vipc_server.create_buffers(VisionStreamType.VISION_STREAM_ROAD, 40, False, CAM.width, CAM.height)
self.vipc_server.create_buffers(VisionStreamType.VISION_STREAM_DRIVER, 40, False, CAM.width, CAM.height)
self.vipc_server.create_buffers(VisionStreamType.VISION_STREAM_WIDE_ROAD, 40, False, CAM.width, CAM.height)
self.vipc_server.create_buffers(VisionStreamType.VISION_STREAM_ROAD, 40, CAM.width, CAM.height)
self.vipc_server.create_buffers(VisionStreamType.VISION_STREAM_DRIVER, 40, CAM.width, CAM.height)
self.vipc_server.create_buffers(VisionStreamType.VISION_STREAM_WIDE_ROAD, 40, CAM.width, CAM.height)
self.vipc_server.start_listener()
Params().put("CarParams", get_demo_car_params().to_bytes())

Expand Down
2 changes: 1 addition & 1 deletion selfdrive/test/process_replay/process_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _setup_vision_ipc(self, all_msgs: LogIterable, frs: dict[str, Any]):
for meta in streams_metas:
if meta.camera_state in self.cfg.vision_pubs:
frame_size = (frs[meta.camera_state].w, frs[meta.camera_state].h)
vipc_server.create_buffers(meta.stream, 2, False, *frame_size)
vipc_server.create_buffers(meta.stream, 2, *frame_size)
vipc_server.start_listener()

self.vipc_server = vipc_server
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/ui/tests/test_ui/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def setup_settings_toggles(click, pm: PubMaster):
def setup_onroad(click, pm: PubMaster):
vipc_server = VisionIpcServer("camerad")
for stream_type, cam, _ in STREAMS:
vipc_server.create_buffers(stream_type, 5, False, cam.width, cam.height)
vipc_server.create_buffers(stream_type, 5, cam.width, cam.height)
vipc_server.start_listener()

uidebug_received_cnt = 0
Expand Down
2 changes: 1 addition & 1 deletion system/camerad/cameras/camera_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void CameraBuf::init(cl_device_id device_id, cl_context context, SpectraCamera *
// TODO: VENUS_BUFFER_SIZE should give the size, but it's too small. dependent on encoder settings?
size_t nv12_size = (out_img_width <= 1344 ? 2900 : 2346)*nv12_width;

vipc_server->create_buffers_with_sizes(stream_type, YUV_BUFFER_COUNT, false, out_img_width, out_img_height, nv12_size, nv12_width, nv12_uv_offset);
vipc_server->create_buffers_with_sizes(stream_type, YUV_BUFFER_COUNT, out_img_width, out_img_height, nv12_size, nv12_width, nv12_uv_offset);
LOGD("created %d YUV vipc buffers with size %dx%d", YUV_BUFFER_COUNT, nv12_width, nv12_height);

imgproc = new ImgProc(device_id, context, this, sensor, cam->cc.camera_num, nv12_width, nv12_uv_offset);
Expand Down
3 changes: 1 addition & 2 deletions system/loggerd/tests/test_loggerd.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_rotation(self):
pm = messaging.PubMaster(["roadCameraState", "driverCameraState", "wideRoadCameraState"])
vipc_server = VisionIpcServer("camerad")
for stream_type, frame_spec, _ in streams:
vipc_server.create_buffers_with_sizes(stream_type, 40, False, *(frame_spec))
vipc_server.create_buffers_with_sizes(stream_type, 40, *(frame_spec))
vipc_server.start_listener()

num_segs = random.randint(2, 5)
Expand Down Expand Up @@ -281,4 +281,3 @@ def test_not_preserving_unflagged_segments(self):

segment_dir = self._get_latest_log_dir()
assert getxattr(segment_dir, PRESERVE_ATTR_NAME) is None

0 comments on commit 3f24f2b

Please sign in to comment.