Files
StarPilot/selfdrive/common/visionimg.h
T
Vehicle Researcher 7062c6dcc4 openpilot v0.5.4 release
old-commit-hash: a422246dc3
2018-09-25 00:13:41 -07:00

39 lines
708 B
C

#ifndef VISIONIMG_H
#define VISIONIMG_H
#ifdef QCOM
#include <GLES3/gl3.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#endif
#include "common/visionbuf.h"
#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(int width, int height, VisionBuf *out_buf);
#ifdef QCOM
EGLClientBuffer visionimg_to_egl(const VisionImg *img);
GLuint visionimg_to_gl(const VisionImg *img);
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif