You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							41 lines
						
					
					
						
							906 B
						
					
					
				
			
		
		
	
	
							41 lines
						
					
					
						
							906 B
						
					
					
				| #ifndef VISIONIMG_H
 | |
| #define VISIONIMG_H
 | |
| 
 | |
| #include "common/visionbuf.h"
 | |
| #include "common/glutil.h"
 | |
| 
 | |
| #ifdef QCOM
 | |
| #include <EGL/egl.h>
 | |
| #include <EGL/eglext.h>
 | |
| #undef Status
 | |
| #else
 | |
| typedef int EGLImageKHR;
 | |
| typedef void *EGLClientBuffer;
 | |
| #endif
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| extern "C" {
 | |
| #endif
 | |
| 
 | |
| #define VISIONIMG_FORMAT_RGB24 1
 | |
| 
 | |
| typedef struct VisionImg {
 | |
|   int fd;
 | |
|   int format;
 | |
|   int width, height, stride;
 | |
|   int bpp;
 | |
|   size_t size;
 | |
| } VisionImg;
 | |
| 
 | |
| void visionimg_compute_aligned_width_and_height(int width, int height, int *aligned_w, int *aligned_h);
 | |
| VisionImg visionimg_alloc_rgb24(cl_device_id device_id, cl_context ctx, int width, int height, VisionBuf *out_buf);
 | |
| 
 | |
| EGLClientBuffer visionimg_to_egl(const VisionImg *img, void **pph);
 | |
| GLuint visionimg_to_gl(const VisionImg *img, EGLImageKHR *pkhr, void **pph);
 | |
| void visionimg_destroy_gl(EGLImageKHR khr, void *ph);
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| }  // extern "C"
 | |
| #endif
 | |
| 
 | |
| #endif
 | |
| 
 |