Commit Graph

28 Commits (7222d0f20dc8edfe0d2f3417d1ce7c84fbd32805)

Author SHA1 Message Date
Dean Lee 7222d0f20d
Cleanup selfdrive/ includes (#20822)
* cleanup include path

* continue

* format includes

* fix testraw.cc

* remove include path from SConstruct

* regroup

* rebase master

* almost done

* apply review

* rename FileReader.xx to filereader.xx

* rename Unlogger.x->unlogger.x

* rename FrameReader.xx -> framereader.xx

* apply reviews

* ui.h

* continue

* fix framebuffer.cc build error:mv util.h up

* full path to msm_media_info

* fix qcom2 camerad

Co-authored-by: Comma Device <device@comma.ai>
2021-05-08 22:15:17 -07:00
Adeeb Shihadeh 8a280fbb8e bump cereal 2021-05-03 20:47:11 -07:00
Dean Lee 540b853c9f
init frame_length in camera_init (#20261) 2021-04-02 21:10:48 -07:00
Dean Lee e654d9ddf9
cleanup camera_qcom const structs (#20251)
* move actuator_ringing_params from global to function actuator_move

* remove varaible infinity_dac from CameraState

* static actuator_ringing_params

* continue

* rebase master
2021-03-12 19:52:04 -08:00
Dean Lee 74afec9f15
camera_qcom: change unsigned int to uint32_t (#20262) 2021-03-08 10:41:07 +01:00
Dean Lee e0cc95a565
camera_qcom: remove eeprom related stuff (#20254) 2021-03-08 10:19:43 +01:00
Dean Lee 59698344a2
camera_qcom: move opencl stuff into class LapConv (#20180)
* class RGB2Gray

* rename Rgb2Grey to LapConv

* rebase master

* rebase master
2021-03-04 20:41:59 -08:00
Dean Lee 2f46ddf779
oneplus cleanup (continue) (#20212)
* cleanup cameras_supported

* use macro

* remove ois_fd

* remove ois_init_settings

* cleanup sensor_i2c.h

* apply_exposure

* better comment

* remove int err

* init apply_exposure in camera_init

* continue

* remove event startupOneplus

* Revert "remove event startupOneplus"

This reverts commit f5b16e864399bcf4dc7c48fc07a43e35c47e7dc2.

* move camera_init after xxx_apply_exposure
2021-03-04 11:25:53 -08:00
Dean Lee f5109d9207
cameras_qcom: use std::mutex (#20181) 2021-03-03 11:48:49 +01:00
Adeeb Shihadeh 07ab081a42
oneplus cleanup (#20200)
* start cleanup

* cleanup camerad

* remove unused

* little more

Co-authored-by: Comma Device <device@comma.ai>
2021-03-01 17:14:03 -08:00
Dean Lee afcbf60cad
camera_qcom.h: regroup variables by usage (#20196) 2021-03-01 14:49:04 +01:00
Dean Lee 468dc3f5a4
Move duplicate function declarations to camera_common.h (#20176) 2021-02-26 20:35:21 -08:00
Dean Lee e7906fb446
camerad: rename variables&functions to follow new convention (#20096)
* rename CameraState variables to follow new convention

* continue

* rename camera_process functions

* qcom:rename exposure related variables

* continue

* update commments

* bool real -> bool is_road_cam

* rename sm_front -> sm

* remove paramater tname from start_process_thread

* rename rhd_front to is_rhd

* remove unused varialble name from struct CameraInfo

* rename env_send_xxx

* rename cap_front to cap_driver,cap_rear to cap_road

* rename xxx_camera_process to process_xxx_camera

* update snapshot.py
2021-02-19 13:13:21 -08:00
Dean Lee 139470f033
camera_qcom: cleanup main() (#19805)
* cleanup main

* continue

* remove last_t from CameraState

* cleanup
2021-02-16 16:25:46 -08:00
Dean Lee 595830135b
merge utilpp.h into util.h (#19710) 2021-01-10 14:57:32 -08:00
Willem Melching fb496c692a
VisionIPC 2.0 (#19641)
* Squashed vipc

* Update release files

* Remove else

* add visionipc to release files

* use poller in vipc receive

* opencl framework instead of lib on macos

* Fix camera webcam

* Fix opencl on mac in ui

* more webcam fixes

* typo in ui sconsfile

* Use cur_yuv_buf

* visionbuf c++ class

* Camera qcom was still using visionbuf_allocate

* Turn loggerd back on

* fix snapshot

* No build needed

* update test camerad

* no more release callback

* make encoder c++

* Revert "no more release callback"

This reverts commit e5707b07002fee665d0483d90713154efc2d70d4.

* fix exit handlers

* No need to check errno

* move release callback call

* s/VIPCBufExtra/VisionIpcBufExtra/g

* use non blocking connect

* ui use non blocking connect

* Lower condition variable wait time

* Snapshot cleanup

* bump cereal

* bump cereal
2021-01-08 14:54:25 +01:00
Dean Lee 06e3b1e445
fix thread safety issue in camera focusing (#19576) 2021-01-04 10:18:10 +01:00
Dean Lee 9890f958d9
cameras: use common transform (#19552) 2020-12-20 17:21:46 -08:00
Dean Lee d31a87cd21
qcom: make camera_process_frame more readable (#2765)
* more readable

* rgb_addr

* offset

* speed up if statement

* --self_recover

* rgb_addr_offset

* x_offset&y_offset

* static rgb_roi_buf & conv_result

* remove variables from struct

* simplify read sensorEvents

* use i for loop

* split to functions

* make it works

* y_offset should be ROI_Y_MAX-ROY_Y_MIN+1

* std::size is better than ARRAYSIZE

* rebase master

* shorter variable name

* Revert "shorter variable name"

This reverts commit 47612e3a741d8b6ddfd72bccbb5337882b369224.

* std::fill_n

* reday for merge

* Revert "y_offset should be ROI_Y_MAX-ROY_Y_MIN+0"

This reverts commit 1f8526fb1c59c89d747210eb8bf17a2688a4f2bc.
2020-12-15 16:39:38 -08:00
Dean Lee c1f3c3b2df
camera_qcom: read SensorEvents in op thread (#2764)
* get acceleration in op thread

* std::atomic last_sag_acc_z

* cleanup
2020-12-14 16:54:49 -08:00
ZwX1616 4954db0381
use different SubMasters for driverState/sensorEvents (#2522)
* use different sms

* rename
2020-11-11 13:53:11 -08:00
ZwX1616 6b020241c9
Clean up and test camerad refactor (#2310)
* 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>
2020-10-16 21:58:05 -07:00
Dean Lee 9f34d1ff66
camerad: close file descriptors (#2065)
* close file descriptors

* fix struct indent

* add some new lines
2020-09-24 13:39:27 -07:00
robbederks 37d6472bfa
Tici camerad (#2048)
* fix camera config

* typos

* oops

* more typo

* lambless

* forget to send

* visualize hist

* more typo

* 0xC000

* simple

* data loss prevention, clean up later

* loggerd

* back up code

* backup

* fixed memory leak

* fix vsync

* upload ecam

* WB

* 3stream

* fix OMX crash on loggerd rotation

* rewritten debayer kernel

* update viewer

* improved AE

* no artifact lines/grids

* standard trigger

* cleanups

* CCM

* cleanups

* slight tweak

* upd push sock

* build all these

* update tele fl

* update cereal

* upd viewer

* DualCameraState -> MultiCameraState

* cameras_open

* disable frame zmq push by default

* more cleanup

* no apks

* fix submodule error

* wat

* clean up trash

* remove junk

* only build on qcom2

* no need to check these

* update cereal

* some more minor cleanup

* bump panda

* add todo

* minor typo

* Revert "minor typo"

This reverts commit 9233a1df7cac214fae6827cdae3a10cb3bd060d9.

* not care

* use consistent hdr

* some cleanup

* Update selfdrive/camerad/main.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* more cleanups

* remove irrelevant stuff

* this too

* cleanup

* rerun ci

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-26 19:59:56 -07:00
Dean Lee f3fb406eee
camerad: protect concurrent access to shared variables and avoid race conditions (#1966)
* Protect concurrent access for shared resources

* fix
2020-08-11 11:40:11 -07:00
Dean Lee 55ece6991e
camerad: close ops_sock in camera_close (#1998) 2020-08-08 15:55:09 -07:00
ZwX1616 3aa99a01d7
recover EON/C2 AF (#1665) 2020-06-23 14:33:32 -07:00
George Hotz 84560ccd55 selfdrive/camerad 2020-01-17 10:52:42 -08:00