Commit Graph

74 Commits (57b6fdc17a1f84ec922647c044da5df3cafc0ddc)

Author SHA1 Message Date
Gijs Koning 57b6fdc17a
Rename RGB vision streams to match YUV streams (#23961)
* Renaming VISION_STREAM_RGB_.. to match yuv names like VISION_STREAM_ROAD
VISION_STREAM_RGB_BACK -> VISION_STREAM_RGB_ROAD
VISION_STREAM_RGB_FRONT -> VISION_STREAM_RGB_DRIVER

* little more

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-14 14:03:54 -07:00
George Hotz a9b7f3bdd8
12bit only (#23953)
Co-authored-by: Comma Device <device@comma.ai>
2022-03-13 21:43:38 -07:00
George Hotz 0adfef0b34
camera_qcom2 refactor (#23946)
* convert camerastate to a class

* more refactor

* do the refactor in file

* put that one back

* those changes can wait

* very minor

Co-authored-by: Comma Device <device@comma.ai>
2022-03-11 13:37:29 -08:00
George Hotz 51767c037b
camerad: use open_v4l_by_name_and_index on c2 also (#23794)
* use open_v4l_by_name_and_index on c2 also

* remove open_v4l_by_name_and_index from qcom2
2022-02-19 13:31:11 -08:00
George Hotz cb6a68373b
Prepare for using the ISP (#23621)
* parse out isp packet with structs

* dsp mode

* support only driver / comments for yuv

* minor touchups

* DEBUG_FRAMES

Co-authored-by: Comma Device <device@comma.ai>
2022-01-26 19:25:05 -08:00
George Hotz 7e83d9a618
camerad: Out of bounds memory write (#23534)
* parens were totally wrong

* cleaner
2022-01-14 15:22:28 -08:00
Dean Lee 5c6229f3df
common_process_driver_camera: same parameters as process_thread_cb (#23202) 2021-12-13 15:07:31 +01:00
Dean Lee 348d2d2b0d
rename yuv streams (#23071)
* rename yuv streams

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-29 18:14:59 -08:00
Dean Lee 3d0246eed5
camera_qcom2: cleanup camera_open (#22085)
* cleanup camera_open

* remove static

* apply review
2021-11-17 12:18:14 +01:00
Willem Melching 45c506bb17 wshadow: fix comma three build 2021-11-02 17:27:34 +01:00
Dean Lee b8be692c1a
config_isp: remove hardcoded buffer size (#22119) 2021-10-29 16:05:19 +02:00
Dean Lee f02c8d0e2c
Handle EINTR for all syscalls that can return it (#21948) 2021-08-31 16:22:56 -07:00
Dean Lee 0d3eec385c
camera_qcom2: new functions device_acquire & device_config (#22077)
* new function device_acquire & device_config

* add space

* apply reviews

* use the specified struct for each command

* fix typo

* apply review

* remove static

* revert device_control
2021-08-31 07:21:40 -07:00
Dean Lee ee5ef4dab2
camera_qcom2: use macros for link control operations (#22088) 2021-08-30 22:10:18 -07:00
Dean Lee cf4ad99554
camera_qcom2: refactor open_v4l_by_name_and_index (#22067)
* refactor

* small cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-08-30 17:12:22 -07:00
Dean Lee 31230e5b60
retry ioctls while errno == EINTR (#22054) 2021-08-30 16:07:34 -07:00
Dean Lee 37dda3d6bf
camera_qcom2: remove req_mgr_session_info from CameraState (#22059)
* remove req_mgr_session_info from CameraState

* handle should be int32_t
2021-08-30 15:32:31 -07:00
Dean Lee 7a80bf7fcc
camera_qcom2: fix memory leaks in camera_open (#22061) 2021-08-30 14:59:04 -07:00
Dean Lee 862f93f7f1
camera_qcom2.cc : fix wrong LOGD order (#22072) 2021-08-30 09:21:35 -07:00
Dean Lee 0f4227f42b
qcom2/enqueue_buffer: use macro CAM_MEM_FLAG_HW_READ_WRITE (#22060) 2021-08-28 17:43:50 -07:00
Dean Lee ffb1dd019e
camera_qcom2.cc: use V4L_EVENT_CAM_REQ_MGR_EVENT (#22057) 2021-08-28 14:49:56 -07:00
Dean Lee e646febaae
camerad: remove unused macros and global (#21970) 2021-08-19 14:49:16 -07:00
Dean Lee 74ecbbed63
cameras_qcom2.cc: add a missing newline (#21956) 2021-08-18 10:37:05 +02:00
arfy slowy d74def61f8
fix: spelling typos (#21861)
* fix: typo spelling grammar

* revert

* Update selfdrive/locationd/calibrationd.py

* more revert

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-08-05 12:05:49 -07:00
Willem Melching 25de93d133
C3 AE improvements (#21698)
* AE improvements

* boardd: also use gain to compute IR brightness

* use default rect for DM autoexposure

* more smooth

* whitespace

* camerad cpu usage

* hcg on is slightly better for noise

* hysteris around high conversion gain

* improve i2c timing

* use AB contexts

* HCG default off

* run at 10 hz

* stay in context A for now

* remove ae thread

* wait till next frame is started before sending i2c

* back at 20fps

* add comment and filter across 3 evs

* remove context switch code

* tuning

* recomened without HCG is 0.8x
2021-08-05 16:34:36 +02:00
Willem Melching b6b0393e2d
Revert AE changes (#21682)
* Revert AE changes

* keep YUV buffer count
2021-07-22 11:22:19 -07:00
Willem Melching b35f6871cb
AE: revert changes to min grey target (#21648) 2021-07-19 10:37:43 +02:00
Willem Melching 3ad40963cc
tici: AE sane default values (#21610)
* tici: AE sane default values

* set exposure time

* remove comment

* set dc gain variable

* whitespace
2021-07-15 16:11:27 +02:00
Willem Melching 63c9b56063
tici: improve AE (#21493)
* simplify histogram calculation

* add debug prints

* faster AE

* revert that

* lower log level

* use minimum recomended gains from datasheet

* use define

* fix min gain

* dynamic grey target

* fix build

* add low pass

* more stable rounding

* increase max gain

* always enable HCG

* correctly set min ev

* fix analog gain

* remove unused variable

* fix build

* move recomended gain into cost function

* tweak cost function a bit

* small LPF on desired ev

* fix typo

* lower ts

* clean up defines

* that was used in common

* add cast

* less cost is fine

* fix tests

* whitespace

* filtering is broken

* put back

* clip gain changes instead

* cost function tweaking

* Only go below recomended gain when absolutely necessary

* small penalty on changing gains
2021-07-13 23:33:50 +02:00
Willem Melching 47be6c751e
Refactor camerad exposure logging (#21506)
* simplify gain logging

* clean up metadata

* log grey fractions

* those are not used

* set grey fracs in message

* fix qcom
2021-07-08 15:22:00 +02:00
Maxime Desroches 03df1b08bb
Convert C++ while loops from int to bool (#21214) 2021-06-09 21:09:21 -07:00
Adeeb Shihadeh 9e94fb17cf fix qcom and qcom2 builds 2021-06-08 16:44:05 -07:00
Dean Lee c53cb5d570
Use C++ header files instead of C header files. (#21192)
* use cstring instead of string.h

* use cstdio instead of stdio.h

* remove inttypes.h

* use cstdlib instead of stdlib.h

* use cstdint instead of stdint.h

* #include <cstddef>

* cstdlib

* use cmath

* remove stddef.h

* use cassert

* use csignal

* use ctime

* use cerror

* rebase master
2021-06-08 13:46:22 -07:00
Dean Lee b06b3ecb60
Use full include path (#21194) 2021-06-08 12:09:30 -07:00
George Hotz f43671c987
Move MCLK from 24 -> 19.2 mhz + Add accuracy in sidebar (#20960)
* wip

* one day i'll flip that right

Co-authored-by: Comma Device <device@comma.ai>
2021-05-18 22:37:33 -07:00
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
Dean Lee cf80675369
Use std::size for element counts (#20654) 2021-04-12 12:22:22 +02:00
Dean Lee 9b9bdd3da5
Added function power_set_wait, fix munmap invalid pointer error. (#20189)
* added function power_set_wait_cmd

* cleanup

* rename power_set_wait_cmd to power_set_wait

* rename delay to delay_ms
2021-04-02 21:17:42 -07:00
Dean Lee 5e6e9df407
camera_qcom2: move the common file descriptors to MultiCameraState (#20182)
* move the common file descriptors to MultiCameraState

* use unique_fd for file descriptors

* done

* fix build

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
2021-03-30 19:43:09 -07:00
Dean Lee 4c225c6e1d
camera_qcom2: add std::mutex exp_lock (#20183)
* add std::mutex exp_lock

* auto &meta_data
2021-03-12 20:03:15 -08:00
ZwX1616 65bb979c34
set_exposure_target test (#20318)
* build

* remove junk

* clean up

* clean up rebase

* new patterns

* add gts

* add to jenkis

* this more useful

* typo

* test only

* Update Jenkinsfile

* test flag

* remove from jenkins

* these should all just be common:wq

* oops

* unigt

* add to unit tests?

* build all is fine

Co-authored-by: Comma Device <device@comma.ai>
2021-03-12 17:40:50 -08:00
Dean Lee 92e69e8b75
refactor function alloc (#20192) 2021-03-11 17:40:33 -08:00
Comma Device 0d036de205 better transition 2021-03-04 11:08:52 -08:00
robbederks 491309b639
Tici MIPI config (#20205)
* remove non-default mipi timings and preamble lengths

* actual correct settle count
2021-03-02 14:10:32 +01:00
ZwX1616 dd2bba0b42
Tici art4 (#20210)
* adjust gamma

* trust that light

* trust that chart

* unsrgb

Co-authored-by: Comma Device <device@comma.ai>
2021-03-01 16:35:43 -08:00
Dean Lee 468dc3f5a4
Move duplicate function declarations to camera_common.h (#20176) 2021-02-26 20:35:21 -08:00
Dean Lee 2f718d28e4
camerad: remove param pix_ptr from set_exposure_target (#20157) 2021-02-26 14:42:27 +01:00
Comma Device ab694dbace better gain values 2021-02-25 16:34:15 -08:00
ZwX1616 d8ddc1208e
tici camerart III: prehistoric visuals (#20012)
* reworked

* add ref

* f16

* faster

* extended tm

* fix hdr

* Revert "extended tm"

This reverts commit 55ba3ae320.

* reduce static/temporal noise

* split kernels to sync max

* no print

* cleanup qcom2

* optimize

* tune DC

* doesnt work

* minor fix

* adaptive

* smoothen HCG switch

* t

* histogram ceiling

* recalulate params

* group_hold

* less contrast

* recalibrate ccm

* better ae

* better ae revised

* made some changes

* clean up

* midtones

* some improvements

* more

* cleanup

* remove more junk

* lgtm

Co-authored-by: Comma Device <device@comma.ai>
2021-02-21 23:23:40 -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