          memcpy(yuv_ion.addr, buf->addr, buf_info.buf_len);
          visionbuf_sync(&yuv_ion, VISIONBUF_SYNC_TO_DEVICE);
  
          ModelDataRaw model_buf =
              model_eval_frame(&model, yuv_ion.buf_cl, buf_info.width, buf_info.height,
                               model_transform, vec_desire);
          mt2 = millis_since_boot();
          float model_execution_time = (mt2 - mt1) / 1000.0;
  
          // tracked dropped frames
 
</s> remove         // TODO: don't make copies!
        memcpy(yuv_ion.addr, buf->addr, buf_info.buf_len);
        visionbuf_sync(&yuv_ion, VISIONBUF_SYNC_TO_DEVICE);

 </s> add  </s> remove       DMonitoringResult res = dmonitoring_eval_frame(&dmonitoringmodel, buf->addr, buf_info.width, buf_info.height);
 </s> add       DMonitoringResult res = dmonitoring_eval_frame(&dmonitoringmodel, buf->addr, buf->width, buf->height); </s> remove     LOGW("connected with buffer size: %d", buf_info.buf_len);
 </s> add     break;
  }

  // loop
  while (!do_exit) {
    VisionBuf *b = &vipc_client.buffers[0];
    LOGW("connected with buffer size: %d (%d x %d)", b->len, b->width, b->height); </s> remove     // one frame in memory
    VisionBuf yuv_ion = visionbuf_allocate_cl(buf_info.buf_len, device_id, context);

 </s> add  </s> remove   // loop
  VisionStream stream;
  while (!do_exit) {
    VisionStreamBufs buf_info;
    err = visionstream_init(&stream, VISION_STREAM_YUV, true, &buf_info);
    if (err) {
      LOGW("visionstream connect failed");
      util::sleep_for(100);
 </s> add   VisionIpcClient vipc_client = VisionIpcClient("camerad", VISION_STREAM_YUV_BACK, true, device_id, context);

  while (!do_exit){
    if (!vipc_client.connect(false)){
      std::this_thread::sleep_for(std::chrono::milliseconds(100));
            model_eval_frame(&model, buf->buf_cl, buf->width, buf->height,
          memcpy(yuv_ion.addr, buf->addr, buf_info.buf_len);
          visionbuf_sync(&yuv_ion, VISIONBUF_SYNC_TO_DEVICE);
  
          ModelDataRaw model_buf =
            model_eval_frame(&model, buf->buf_cl, buf->width, buf->height,
                               model_transform, vec_desire);
          mt2 = millis_since_boot();
          float model_execution_time = (mt2 - mt1) / 1000.0;
  
          // tracked dropped frames
keep keep keep keep replace keep keep keep keep keep
 VisionIPC 2.0 (#19641)

* Squashed vipc

* Update release files

* Remove else

* add visionipc to release files

* use poller in vipc receive

* opencl framework instead of lib on macos

* Fix camera webcam

* Fix opencl on mac in ui

* more webcam fixes

* typo in ui sconsfile

* Use cur_yuv_buf

* visionbuf c++ class

* Camera qcom was still using visionbuf_allocate

* Turn loggerd back on

* fix snapshot

* No build needed

* update test camerad

* no more release callback

* make encoder c++

* Revert "no more release callback"

This reverts commit e5707b07002fee665d0483d90713154efc2d70d4.

* fix exit handlers

* No need to check errno

* move release callback call

* s/VIPCBufExtra/VisionIpcBufExtra/g

* use non blocking connect

* ui use non blocking connect

* Lower condition variable wait time

* Snapshot cleanup

* bump cereal

* bump cereal 
selfdrive/modeld/modeld.cc