Files
sunnypilot/selfdrive/camerad/cameras/camera_common.h
George Hotz 8db0993663 tici: add (somewhat) broken camerad support (#1300)
* capnparm

* building in progress

* scons build works

* that script fixes opencl

* start new camera code

* includes and more camera scripts

* control c works now

* no device control yet

* phy too

* just one camera for now

* fix capnparm

* hmm, the inits are needed

* more cameras

* link stop start

* doesn't work yet

* fix ion on qcom2

* start poll ish

* 4 pictures and done

* no jpeg

* it works to picture

* destroy sync obj

* both work for now

* defined QCOM2

* fix fd leak

* run modeld

* 10 bit mode

* real frame stride

* needs digital gain

* dnew

* no color correcting on new

* that snpe doesn't work

* qcom2 gate

* cleanups

* oops, fix aarch64 detector

* update cereal

* modeld works with SNPE

* fix driver monitoring model

Co-authored-by: Tici <robbe@comma.ai>
2020-03-31 16:34:55 -07:00

51 lines
943 B
C

#ifndef CAMERA_COMMON_H
#define CAMERA_COMMON_H
#include <stdint.h>
#include <stdbool.h>
#define CAMERA_ID_IMX298 0
#define CAMERA_ID_IMX179 1
#define CAMERA_ID_S5K3P8SP 2
#define CAMERA_ID_OV8865 3
#define CAMERA_ID_IMX298_FLIPPED 4
#define CAMERA_ID_OV10640 5
#define CAMERA_ID_LGC920 6
#define CAMERA_ID_LGC615 7
#define CAMERA_ID_AR0231 8
#define CAMERA_ID_MAX 9
#ifdef __cplusplus
extern "C" {
#endif
typedef struct CameraInfo {
const char* name;
int frame_width, frame_height;
int frame_stride;
bool bayer;
int bayer_flip;
bool hdr;
} CameraInfo;
typedef struct FrameMetadata {
uint32_t frame_id;
uint64_t timestamp_eof;
unsigned int frame_length;
unsigned int integ_lines;
unsigned int global_gain;
unsigned int lens_pos;
float lens_sag;
float lens_err;
float lens_true_pos;
float gain_frac;
} FrameMetadata;
extern CameraInfo cameras_supported[CAMERA_ID_MAX];
#ifdef __cplusplus
}
#endif
#endif