From fd04f947bb98879a81c4052ca6f47729a1b52a87 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 7 Oct 2024 10:20:01 -0700 Subject: [PATCH] lil more --- msgq/visionipc/visionbuf.cc | 7 ------- msgq/visionipc/visionbuf.h | 2 -- msgq/visionipc/visionipc_server.cc | 1 - msgq/visionipc/visionipc_tests.cc | 6 +++--- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/msgq/visionipc/visionbuf.cc b/msgq/visionipc/visionbuf.cc index f950c926..80c27850 100644 --- a/msgq/visionipc/visionbuf.cc +++ b/msgq/visionipc/visionbuf.cc @@ -1,12 +1,5 @@ #include "msgq/visionipc/visionbuf.h" -#define ALIGN(x, align) (((x) + (align)-1) & ~((align)-1)) - -void visionbuf_compute_aligned_width_and_height(int width, int height, int *aligned_w, int *aligned_h) { - *aligned_w = width; - *aligned_h = height; -} - void VisionBuf::init_yuv(size_t init_width, size_t init_height, size_t init_stride, size_t init_uv_offset){ this->width = init_width; this->height = init_height; diff --git a/msgq/visionipc/visionbuf.h b/msgq/visionipc/visionbuf.h index f0c0a01b..52345ba0 100644 --- a/msgq/visionipc/visionbuf.h +++ b/msgq/visionipc/visionbuf.h @@ -60,5 +60,3 @@ class VisionBuf { void set_frame_id(uint64_t id); uint64_t get_frame_id(); }; - -void visionbuf_compute_aligned_width_and_height(int width, int height, int *aligned_w, int *aligned_h); diff --git a/msgq/visionipc/visionipc_server.cc b/msgq/visionipc/visionipc_server.cc index e0458d07..611456b1 100644 --- a/msgq/visionipc/visionipc_server.cc +++ b/msgq/visionipc/visionipc_server.cc @@ -41,7 +41,6 @@ VisionIpcServer::VisionIpcServer(std::string name, cl_device_id device_id, cl_co void VisionIpcServer::create_buffers(VisionStreamType type, size_t num_buffers, size_t width, size_t height){ // TODO: assert that this type is not created yet assert(num_buffers < VISIONIPC_MAX_FDS); - int aligned_w = 0, aligned_h = 0; size_t size = 0; size_t stride = 0; diff --git a/msgq/visionipc/visionipc_tests.cc b/msgq/visionipc/visionipc_tests.cc index 6de16697..ddf790df 100644 --- a/msgq/visionipc/visionipc_tests.cc +++ b/msgq/visionipc/visionipc_tests.cc @@ -52,7 +52,7 @@ TEST_CASE("Check buffers"){ TEST_CASE("Send single buffer"){ VisionIpcServer server("camerad"); - server.create_buffers(VISION_STREAM_ROAD, 1, true, 100, 100); + server.create_buffers(VISION_STREAM_ROAD, 1, 100, 100); server.start_listener(); VisionIpcClient client = VisionIpcClient("camerad", VISION_STREAM_ROAD, false); @@ -81,7 +81,7 @@ TEST_CASE("Send single buffer"){ TEST_CASE("Test no conflate"){ VisionIpcServer server("camerad"); - server.create_buffers(VISION_STREAM_ROAD, 1, true, 100, 100); + server.create_buffers(VISION_STREAM_ROAD, 1, 100, 100); server.start_listener(); VisionIpcClient client = VisionIpcClient("camerad", VISION_STREAM_ROAD, false); @@ -109,7 +109,7 @@ TEST_CASE("Test no conflate"){ TEST_CASE("Test conflate"){ VisionIpcServer server("camerad"); - server.create_buffers(VISION_STREAM_ROAD, 1, true, 100, 100); + server.create_buffers(VISION_STREAM_ROAD, 1, 100, 100); server.start_listener(); VisionIpcClient client = VisionIpcClient("camerad", VISION_STREAM_ROAD, true);