Skip to content

Commit

Permalink
lil more
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Oct 7, 2024
1 parent c2c60c5 commit fd04f94
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
7 changes: 0 additions & 7 deletions msgq/visionipc/visionbuf.cc
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 0 additions & 2 deletions msgq/visionipc/visionbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
1 change: 0 additions & 1 deletion msgq/visionipc/visionipc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions msgq/visionipc/visionipc_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fd04f94

Please sign in to comment.