|  |  | @ -91,37 +91,35 @@ struct MultiCameraState; | 
			
		
	
		
		
			
				
					
					|  |  |  | struct CameraState; |  |  |  | struct CameraState; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | class CameraBuf { |  |  |  | class CameraBuf { | 
			
		
	
		
		
			
				
					
					|  |  |  | public: |  |  |  | private: | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   VisionIpcServer *vipc_server; |  |  |  |   VisionIpcServer *vipc_server; | 
			
		
	
		
		
			
				
					
					|  |  |  |   CameraState *camera_state; |  |  |  |   CameraState *camera_state; | 
			
		
	
		
		
			
				
					
					|  |  |  |   cl_kernel krnl_debayer; |  |  |  |   cl_kernel krnl_debayer; | 
			
		
	
		
		
			
				
					
					|  |  |  |   cl_command_queue q; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   RGBToYUVState rgb_to_yuv_state; |  |  |  |   RGBToYUVState rgb_to_yuv_state; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   mat3 yuv_transform; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   FrameMetadata yuv_metas[YUV_COUNT]; |  |  |  |   FrameMetadata yuv_metas[YUV_COUNT]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   VisionStreamType rgb_type, yuv_type; |  |  |  |   VisionStreamType rgb_type, yuv_type; | 
			
		
	
		
		
			
				
					
					|  |  |  |   int rgb_width, rgb_height, rgb_stride; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   
 |  |  |  |   
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   FrameMetadata cur_frame_data; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   VisionBuf *cur_rgb_buf; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   VisionBuf *cur_yuv_buf; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   int cur_buf_idx; |  |  |  |   int cur_buf_idx; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   std::mutex frame_queue_mutex; |  |  |  |   std::mutex frame_queue_mutex; | 
			
		
	
		
		
			
				
					
					|  |  |  |   std::condition_variable frame_queue_cv; |  |  |  |   std::condition_variable frame_queue_cv; | 
			
		
	
		
		
			
				
					
					|  |  |  |   std::queue<size_t> frame_queue; |  |  |  |   std::queue<size_t> frame_queue; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   int frame_buf_count; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   release_cb release_callback; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | public: | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   cl_command_queue q; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   FrameMetadata cur_frame_data; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   VisionBuf *cur_rgb_buf; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   VisionBuf *cur_yuv_buf; | 
			
		
	
		
		
			
				
					
					|  |  |  |   std::unique_ptr<VisionBuf[]> camera_bufs; |  |  |  |   std::unique_ptr<VisionBuf[]> camera_bufs; | 
			
		
	
		
		
			
				
					
					|  |  |  |   std::unique_ptr<FrameMetadata[]> camera_bufs_metadata; |  |  |  |   std::unique_ptr<FrameMetadata[]> camera_bufs_metadata; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   int rgb_width, rgb_height, rgb_stride; | 
			
		
	
		
		
			
				
					
					|  |  |  |   
 |  |  |  |   
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   int frame_buf_count; |  |  |  |   mat3 yuv_transform; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   release_cb release_callback; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   CameraBuf() = default; |  |  |  |   CameraBuf() = default; | 
			
		
	
		
		
			
				
					
					|  |  |  |   ~CameraBuf(); |  |  |  |   ~CameraBuf(); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |