Adeeb Shihadeh
a30859cf12
camera frame stream cleanup ( #19741 )
...
* clean up
* more clean up first
old-commit-hash: eae7a6ed22a96f792a5b6ca187a309505c3f249c
2021-01-19 14:40:47 -08:00
Adeeb Shihadeh
c3783d5005
camerad: remove duplicate set_realtime_priority
...
old-commit-hash: 5cb6e69a78c9dadf0b12102e049fdb1feefa0295
2021-01-19 14:35:46 -08:00
Dean Lee
09a9eba635
CameraBuf: private variables ( #19811 )
...
old-commit-hash: aaac63689ddfd31c94ec490ef52faaa792ef3cb7
2021-01-19 14:28:40 -08:00
Adeeb Shihadeh
6a01983000
few fixes from LGTM
...
old-commit-hash: 758794dec5a886a8c3704d9e2ac191f8c208cc7e
2021-01-16 14:23:06 -08:00
Dean Lee
4eebd421a5
CameraBuf::acquire : using a scoped lock ( #19764 )
...
* Using a scoped lock
* Trigger Build
old-commit-hash: 20726997199aedea1ee40e6891a450ae70d56717
2021-01-15 12:09:18 +01:00
Dean Lee
fbca888d7e
camera_qcom2: simplify camera_process_frame ( #19763 )
...
* simplify camera_process_frame
* Trigger Build
* Update selfdrive/camerad/cameras/camera_qcom2.cc
Co-authored-by: Willem Melching <willem.melching@gmail.com >
old-commit-hash: c804059641d16dbb4d41b36afae1ba3ccc8a2dcc
2021-01-15 12:05:31 +01:00
Dean Lee
b5d575eb9f
fill_frame_image: reduce function parameters ( #19736 )
...
* reduce function paramaters
* add assert
* Trigger Build
old-commit-hash: ea9835f293e9c59715f794cd82474469965c1710
2021-01-15 11:12:56 +01:00
Dean Lee
8b2b835e62
camerad use std::thread ( #19771 )
...
old-commit-hash: 1b3c93813d37e09b0c695a9974cfc8789373352c
2021-01-15 11:10:52 +01:00
Dean Lee
b1ccf416c7
CameraBuf: removed unused variables ( #19735 )
...
old-commit-hash: c28ba97e67f55a8a5f9e7d8baa6030d6b36cd44a
2021-01-14 18:49:52 +01:00
ZwX1616
3d3c77423c
fix tici debayer GPU page faults
...
old-commit-hash: f0cc78ea9294ecbfc2a351cd38398e4a1ab31a86
2021-01-12 20:53:51 -08:00
Willem Melching
6f417e0051
CameraBuf::stop() is not used
...
old-commit-hash: 0b79d0e12d5da68c0d0985916b78e888d3fbdcb7
2021-01-12 15:28:30 +01:00
Dean Lee
7ea7f097c4
FIX: It is not safe to call cameras_close before all threads are done. ( #19555 )
...
* call cameras_close after all threads exited
* stop buffer before join
* remove buf->stop
old-commit-hash: 660abb79dc925427ae96e5bf03fb5635061cc919
2021-01-12 15:27:20 +01:00
Dean Lee
4c1919f41e
merge utilpp.h into util.h ( #19710 )
...
old-commit-hash: 595830135bb79c8b23eb8339ae768ca7b6a822f8
2021-01-10 14:57:32 -08:00
Dean Lee
50da200b5a
create_thumbnail in camera_common ( #19553 )
...
old-commit-hash: cefdca2fd67ed7cef1e536504ac71e631b7608ab
2021-01-08 14:31:21 -08:00
Dean Lee
46bd840be6
cleanup ( #19564 )
...
old-commit-hash: 621dcf8aa17ffe6342b6dbd660a8b24c1433f7d2
2021-01-08 14:07:33 -08:00
Willem Melching
3f950832b9
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
old-commit-hash: fb496c692a9ebdcda15069a8d4eb95734b587d68
2021-01-08 14:54:25 +01:00
Dean Lee
5e557ed96d
common exit handler ( #19661 )
...
* common signal handle
* fix typo
* rename to ExitHandler
* remove include signal.h
* remove include csignal
* rename variable exit to v
* rebase master
old-commit-hash: 86fe2d1697531bebdf5d0d83609e91ed4006f54b
2021-01-05 20:19:53 -08:00
Adeeb Shihadeh
d89bb8b29c
setup clang tidy ( #19533 )
...
* setup clang tidy
* config
* some cleanup
* little more
* remove that
* fix qcom build
old-commit-hash: 87950eb3127e175f0f2b0bb42440f5350c679369
2021-01-05 12:50:23 -08:00
Dean Lee
bbfb751d69
Replace usleep with util::sleep_for ( #19643 )
...
* replace usleep with sleep_for
* sleep microseconds
* sleep nanoseconds
* Trigger Build
old-commit-hash: c1cf0882bd4e0fce5e1a581536f6a0e7afb640e6
2021-01-04 18:03:11 +01:00
Dean Lee
6d729af2f9
fix thread safety issue in camera focusing ( #19576 )
...
old-commit-hash: 06e3b1e445c1a99fb6284beb95ae92c48fb5bade
2021-01-04 10:18:10 +01:00
Dean Lee
3fa5602f75
should not break if poll timeout ( #19578 )
...
old-commit-hash: 37826c00324cc8f9c9eae9650cafc0df6c838ebe
2021-01-04 10:17:52 +01:00
Adeeb Shihadeh
4fbefc8e10
camerad: revert tbuffer dispatch change ( #19589 )
...
old-commit-hash: 15cd71707d5f2de0c302577cbcd05b7c989e9a23
2020-12-25 15:18:00 -08:00
Dean Lee
824106eab4
cameras: use common transform ( #19552 )
...
old-commit-hash: 9890f958d9c5a15398ce4ebf281aaca9ec83b8ce
2020-12-20 17:21:46 -08:00
Dean Lee
34e98ac4d7
cleanup qcom2 ( #19506 )
...
* cleanup qcom2
* define DEBAYER_LOCAL_WORKSIZE in camera_qcom2.h
old-commit-hash: bc1cfa6d4fcb208633e5916645b27ebef95648bc
2020-12-17 11:43:50 -08:00
Robbe Derks
0792290d72
Revert MCLK change
...
old-commit-hash: 91c760a9e55029bd401210ca2f201116ac96e2f5
2020-12-17 18:08:58 +01:00
robbederks
5d5fed58e2
Move MCLK freq on tici ( #19494 )
...
* Move MCLK freq
* change PLL settings to compensate
* messed that up
* undo extclk change, move the internal freq. Does mean pixclk is decreased from 88MHz to 80MHz though
Co-authored-by: Comma Device <device@comma.ai >
old-commit-hash: 18ab82221384f9439ed3cbfa16a57d375779dfeb
2020-12-17 11:29:34 +01:00
Adeeb Shihadeh
b950cab874
HW abstraction layer ( #19530 )
...
* start hw refactor
* move that
* pins
* put that back
old-commit-hash: 8674b023bab2b44405139ceec5785a389f837682
2020-12-16 21:30:23 -08:00
Adeeb Shihadeh
762eda95cd
Set GPU priorities + improved modeld priorities ( #2691 )
...
* give gpu threads rt priority
* modeld gets highest prio on core 2
* fix frame stream
* lower prio of cal thread
Co-authored-by: Comma Device <device@comma.ai >
old-commit-hash: c57ee16e86275820f97631fb79df1685e914d564
2020-12-15 19:22:03 -08:00
Dean Lee
2865d75739
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.
old-commit-hash: d31a87cd218eeeb51193188b72332800d29dca69
2020-12-15 16:39:38 -08:00
Comma Device
cfce32acb5
fix camerad qcom2 build
...
old-commit-hash: 536a8c587643bc4aa046c414b18292bd65b72caf
2020-12-15 04:52:40 +00:00
Dean Lee
6ab28556c8
camera_qcom: read SensorEvents in op thread ( #2764 )
...
* get acceleration in op thread
* std::atomic last_sag_acc_z
* cleanup
old-commit-hash: c1f3c3b2df70d7f3fb24f165c2edcf01a1adcde9
2020-12-14 16:54:49 -08:00
Dean Lee
890df06246
refactor imgproc/utils ( #2766 )
...
* refactor imgproc/utils
* const
* space
* return value
old-commit-hash: 554ea8f54a699950a9226e1d0808cc41ca4859f0
2020-12-14 15:33:40 -08:00
George Hotz
2cedc8715e
Set camerad CL priority to 4 ( #2747 )
...
* priority 2 get
* add to files_common
* cl_ext_qcom
Co-authored-by: Comma Device <device@comma.ai >
old-commit-hash: cb238fd2ee22bcc6c02c3556f96439b3e08d9415
2020-12-14 13:59:48 -08:00
Dean Lee
0066e93b34
covert rgb_to_yuv.c to rgb_to_yuv.cc ( #2757 )
...
old-commit-hash: 3d63b3d4149efb1e597d8d97790fddd28abdbde0
2020-12-12 16:52:15 -08:00
Dean Lee
9be81a6f99
clutil refactor ( #2733 )
...
* cleaup clutil.h
* clutil.c -> clutil.cc
* std::hash
* try simplify functions
* using namespace group help functions
* continue
* add function get_platform_info
* continue
* remove caching
* struct CLContext
* std::cout & CL_ERR_TO_STR
* remove CLU_NO_CACHE
* Revert "struct CLContext"
This reverts commit 882e413f227e4c1ba4bb83f956cc67739a189221.
* cl_get_error_string : remove undefied error codes
* replace all printf with std::cout
* util::read_file
* cleanup
* revert CL_ERR_TO_STR
* simplify
* add macro CL_ERR_TO_STR
* cl_get_error_string: fix undeclared errors
* log_size should not +1
* use std::stirng log
* apply review
old-commit-hash: 3c08d0f1f7e7c9f376fd69fd46067c6f6ff59d39
2020-12-11 13:05:32 +01:00
Willem Melching
df97d4db04
Add thumbnails to camera_frame_stream
...
old-commit-hash: 7b998a7c21b6a15fa474df5a2c5a0bbd8a6f930c
2020-12-11 13:02:45 +01:00
Dean Lee
fc07703c8f
camerad: fix memory leak in create_thumbnail ( #2743 )
...
* fix memory leak in create_thumbnail
* free memory returned from jpeg_mem_dest
* OMG
old-commit-hash: f0d240a7e3d1a91a3d0bac1cc9050c531105d87d
2020-12-11 13:02:16 +01:00
Dean Lee
3f999c44a9
destroy rgb_to_yuv_state ( #2702 )
...
old-commit-hash: 1e9e31d6e1167e309660aad49986524d445b19d3
2020-12-10 19:39:46 -08:00
komma zwei
d365119d74
rhd dm AE sign flip
...
old-commit-hash: fef8d4093f1ebf6ad91c6bac95c465c83ee7e396
2020-12-10 19:27:45 -08:00
Comma Device
d5a6427330
make qcom2 robust to moving v4l-subdevs
...
old-commit-hash: 0e84e04539e0fdd767196ba3339690b498ef6338
2020-12-10 05:44:59 +00:00
Adeeb Shihadeh
519614d9c0
fix camerad exiting on pc
...
old-commit-hash: 90d73313125f0ad07481eba79baea0250a28c460
2020-12-08 20:20:42 -08:00
Dean Lee
8fd9523ce9
simplify common_camera_process_front ( #2470 )
...
* refactor camera_process_front
* improve
old-commit-hash: 24a84b2aff4b5a772d43b58be99a9618319abb8b
2020-12-03 16:28:32 -08:00
ZwX1616
08cd2dbb86
tici timing improvements ( #2613 )
...
* relocate
* impatience
* should be fine without
Co-authored-by: Comma Device <device@comma.ai >
old-commit-hash: d3387d540acca31eb70b6611f2a1f6cee20063ec
2020-12-02 16:18:31 -08:00
Dean Lee
df9e0b2cb4
simplify building capnp messages with arrays ( #2617 )
...
old-commit-hash: bd4f6650faea8b3c42a99087b4f1ce0560b7d652
2020-11-30 12:08:52 +01:00
Dean Lee
57138a6e0f
Error checking macros for opencl ( #2615 )
...
* macro CL_CHECK&CL_CHECK_ERR
* trigger checks
old-commit-hash: 42183d913f197fb6f9cc1d90322a1b891d46878a
2020-11-30 12:04:49 +01:00
ZwX1616
deab0f86aa
tici front/wide encodeIdx msgs ( #2564 )
...
* different msgs
* also add timestamps
* keep impatient log, remove the other
* meaningless
old-commit-hash: f244b7c7e156cd109be13a68ba1096dc2d25f3d0
2020-11-19 16:12:02 -08:00
Comma Device
64b450b43d
underflew
...
old-commit-hash: b9b6ed2d5258b9ac442005b8caa7904c5873ca88
2020-11-19 04:03:16 +00:00
ZwX1616
7af71098b6
send frame in packet on demand ( #2567 )
...
* focus lens helper2
* fix
* yes screen
* s
* new/del
* once
* cleanup
Co-authored-by: Comma Device <device@comma.ai >
old-commit-hash: c630cd44da607c3d2fdd080b493b2e6dc28c3a75
2020-11-18 13:39:50 -08:00
George Hotz
aa34cf305b
was wasting a ton of GPU on this debayer ( #2566 )
...
Co-authored-by: Comma Device <device@comma.ai >
old-commit-hash: 2f3e42169cbe74e0812d4e6fe1c53f5cca7c7a7a
2020-11-17 16:52:06 -08:00
ZwX1616
ba4c06a566
use different SubMasters for driverState/sensorEvents ( #2522 )
...
* use different sms
* rename
old-commit-hash: 4954db0381264b84aa238da4f9d429cff49bcf24
2020-11-11 13:53:11 -08:00