      CL_CHECK(clEnqueueNDRangeKernel(q, krnl_debayer, 1, NULL,
                                      &debayer_work_size, NULL, 0, 0, &debayer_event));
  #endif
    } else {
      assert(cur_rgb_buf->len >= frame_size);
      assert(rgb_stride == camera_state->ci.frame_stride);
      CL_CHECK(clEnqueueCopyBuffer(q, camrabuf_cl, cur_rgb_buf->buf_cl, 0, 0,
                                 cur_rgb_buf->len, 0, 0, &debayer_event));
    }
  
 
</s> remove   cur_rgb_idx = cur_rgb_buf->idx;
 </s> add  </s> remove   cur_yuv_idx = cur_yuv_buf->idx;
  yuv_metas[cur_yuv_idx] = frame_data;
 </s> add   yuv_metas[cur_yuv_buf->idx] = frame_data; </s> remove   frame_size = ci->frame_height * ci->frame_stride;
 </s> add   const int frame_size = ci->frame_height * ci->frame_stride; </s> remove   int cur_yuv_idx, cur_rgb_idx;
 </s> add  </s> remove   size_t yuv_buf_size;
 </s> add 
      CL_CHECK(clEnqueueNDRangeKernel(q, krnl_debayer, 1, NULL,
                                      &debayer_work_size, NULL, 0, 0, &debayer_event));
  #endif
    } else {

      assert(rgb_stride == camera_state->ci.frame_stride);
      CL_CHECK(clEnqueueCopyBuffer(q, camrabuf_cl, cur_rgb_buf->buf_cl, 0, 0,
                                 cur_rgb_buf->len, 0, 0, &debayer_event));
    }
  
keep keep keep keep replace keep keep keep keep keep
 CameraBuf: removed unused variables (#19735) 
selfdrive/camerad/cameras/camera_common.cc