camerad: lower YUV vipc buffer count to 40 on tici

old-commit-hash: 20d5c0c1cb
commatwo_master
Adeeb Shihadeh 3 years ago
parent 43abb312f8
commit bef53929d7
  1. 4
      selfdrive/camerad/cameras/camera_common.cc
  2. 5
      selfdrive/camerad/cameras/camera_common.h

@ -28,8 +28,6 @@
#include "selfdrive/camerad/cameras/camera_replay.h"
#endif
const int YUV_COUNT = 100;
class Debayer {
public:
Debayer(cl_device_id device_id, cl_context context, const CameraBuf *b, const CameraState *s) {
@ -109,7 +107,7 @@ void CameraBuf::init(cl_device_id device_id, cl_context context, CameraState *s,
vipc_server->create_buffers(rgb_type, UI_BUF_COUNT, true, rgb_width, rgb_height);
rgb_stride = vipc_server->get_buffer(rgb_type)->stride;
vipc_server->create_buffers(yuv_type, YUV_COUNT, false, rgb_width, rgb_height);
vipc_server->create_buffers(yuv_type, YUV_BUFFER_COUNT, false, rgb_width, rgb_height);
if (ci->bayer) {
debayer = new Debayer(device_id, context, this, s);

@ -14,6 +14,7 @@
#include "selfdrive/common/queue.h"
#include "selfdrive/common/swaglog.h"
#include "selfdrive/common/visionimg.h"
#include "selfdrive/hardware/hw.h"
#define CAMERA_ID_IMX298 0
#define CAMERA_ID_IMX179 1
@ -26,7 +27,9 @@
#define CAMERA_ID_AR0231 8
#define CAMERA_ID_MAX 9
#define UI_BUF_COUNT 4
const int UI_BUF_COUNT = 4;
const int YUV_BUFFER_COUNT = Hardware::EON() ? 100 : 40;
enum CameraType {
RoadCam = 0,

Loading…
Cancel
Save