mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-08 23:22:04 +08:00
dae628002f
* refactor add function get_camerabuf_by_type remove cl_free use camera_id move front stuff into frontview_thread bigger refactor more typo rename camerabuf *c to *b cleanup header files remove wideview_thread camera_qcom.c to c++ fix SConscript camera_process_buf space sendrgb same with before do autoexposure in processing_thread correct sendrgb add camera_common.cc move yuv_transform to CameraBuf * use C to keep consitent * rebase master * rebase master * continue refactor * refactor all camera related data&function out of main done * cleanup * -use buf.rgb_width&height * remoe , * rebase master * remove unused std::vector * add func common_camera_process_front * fix max * fix sendrgb * less crap being logged * fix indents * add back thumbnails * thumbnail fixed on tici * junk junk junk * unify api * fix ptr ref * lol! * cleanup * more simplified * typos * remove terminate * use standard polling * ops_thread refactor, too much code! * fix build * ok * assert * listen * incl more * wq! * fix more build * macos * fix exp targets * front is different * const * bye * remath * remove irrelevant * do ops in a thread * fix init * return null * QCOM2 ops * qcom2 build * missing comma Co-authored-by: deanlee <deanlee3@gmail.com> Co-authored-by: Comma Device <device@comma.ai> old-commit-hash: 6b020241c986f614e9a1f08b5b870ff225cf7b19
42 lines
906 B
C
42 lines
906 B
C
#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
|