Commit Graph

21 Commits

Author SHA1 Message Date
Adeeb Shihadeh
9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh
3abe307374 encoder test speedup (#24601)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d87f30ea06
2022-05-19 22:33:17 -07:00
Adeeb Shihadeh
6a8fefd5de loggerd: adjust qcamera threshold, seemed to be tuned for comma two
old-commit-hash: 5a58ebf183
2022-05-14 01:04:46 -07:00
George Hotz
a053d070be encoderd: enable (#24492)
* enable encoderd

* correct enable line

* fix loggerd tests

* fix power draw and cpu tests

* correct cpu for encoderd

* fix a bug, video_writer is shared

* fix issue with not recording dcam

* add recording state

* wooo tests pass. encode id keeps counting

* core 3

* loggerd then encoderd

* stop loggerd first

* core 3 always online

* see the camera when we see encoder packet

* encoderd on small core uses 37%

* remove encoder logic from loggerd

* delete unit test that doesn't really make sense anymore

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 94b9972eb7
2022-05-13 17:56:02 -07:00
Willem Melching
be08693d5c delay bz2 compression from logging to uploading (#24392)
* remove log_name

* log without compression

* fix tests

* remove extension for bootlog

* another test fix

* uploader compresses

* also compress in athena

* only compress qlog

* more generic check in do_upload

* fix bootlog compression

* lower loggerd cpu usage

* dont link against bz2

* set core affinity to little cluster

* handle old files
old-commit-hash: 77a6f3d034
2022-05-03 14:09:17 +02:00
George Hotz
7119a98414 loggerd: switch to v4l encoder try 2 (#24380)
* start v4l encoder

* v4l encoder starts

* start and stop

* fill in proper controls

* it dequeued a buffer

* getting bytes

* it made a video

* it does make files

* getting close

* ahh, so that's how dequeue works

* qcam works (no remuxing)

* remuxing works

* we just need to make shutdown and rollover graceful

* graceful destruction

* switch to polling

* should work now

* fix pc build

* refactors, stop properly

* touchups, remove a copy

* add v4l encoder to release

* inlcude file

* move writing to it's own thread

* fix minor memory leak

* block instead of dropping frames

* add counter, fix tests maybe

* better debugging and test print

* print file path in assert

* format string in test

* no more oversized qlogs

* match qcam

* touchups, remove omx encoder

* remove omx include files

* checked ioctl, better debugging, open by name

* unused import

* move linux includes to third_party/linux/include

* simple encoderd

* full packet

* encoderd should be complete

* lagging print

* updates

* name dq thread

* subset idx

* video file writing works

* debug

* potential bugfix

* rotation works

* iframe

* keep writing support

* ci should pass

* loggerd, not encoderd

* remote encoder code

* support remote encoder

* cereal to master, add encoderd

* header no longer required

* put that back there

* realtime

* lower decoder latency

* don't use queue for VisionIpcBufExtra, disable realtime again

* assert all written

* hmm simpler

* only push to to_write if we are writing

* assert timestamp is right

* use at and remove assert

* revert to queue

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0baa4c3e2a
2022-04-30 09:22:52 -07:00
Adeeb Shihadeh
5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86
2022-04-18 17:55:23 -07:00
Adeeb Shihadeh
44568de155 faster jenkins (#22973)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e13630dfee
2021-11-18 23:43:09 -08:00
Adeeb Shihadeh
35bfdce477 loggerd: trigger rotate on frame id instead of frame count (#22848)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ea761cbbd5
2021-11-13 15:38:10 -08:00
Willem Melching
0f77dd4506 loggerd: set encodeIdx.valid if frame id is correct (#22634)
* loggerd: set encodeIdx.valid if frame id is correct

* check valid flag in test

* test cleanup

* bump cereal
old-commit-hash: 89f311714c
2021-10-26 16:00:43 +02:00
Willem Melching
60e7e09127 Ensure that first segment starts with all cameras on the same frameId (#22096)
* test that segment starts with the same frame id

* improve test

* add sync logic

* atomic max

* review comments
old-commit-hash: a93271a518
2021-09-01 14:28:50 -07:00
Willem Melching
ae4f3c98d5 refactor loggerd: trigger rotate in encoder thread (#21860)
* trigger rotate in eoncode thread

* rotate in time

* lgtm

* dcam trigger rotate on C3

* check trigger rotate field

* Use >=

* add rotator thread

* set cnt to 0

* test encodeIdx is increasing across segments

* test both segmentId and encodeId

* fix encodeIdx

* no thread needed

* add log for failed to encode

* stricter C3 test, dont check start encodeId on C2 dcam

* only update last_camera_seen_tms when considered for rotate

Co-authored-by: deanlee <deanlee3@gmail.com>
old-commit-hash: a39873872d
2021-08-06 11:10:33 +02:00
Willem Melching
badae8669a More encoder test cleanup (#20623)
* more encode test cleanup

* fix check at end of function
old-commit-hash: c4e2d374c9
2021-04-08 17:48:57 +02:00
Willem Melching
9f84ff75cc check encodeIdx in loggerd test (#20621)
old-commit-hash: ec5465ffd5
2021-04-08 16:50:48 +02:00
ZwX1616
46840807fa up tici hevc bitrate (#20093)
* 2x tici bitrate

* update test

* clean up
old-commit-hash: e2044ca5a2
2021-02-22 09:15:56 -08:00
Greg Hogan
d59a13e22a adjust qcamera quality (#20066)
* better ts

* fix test
old-commit-hash: 1cd9105e96
2021-02-11 17:55:00 -08:00
Adeeb Shihadeh
bfa5674d4f fix up encoder test for tici rotation (#19941)
* fix encoder test

* revert for c2

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0411015103
2021-01-27 14:20:48 -08:00
Adeeb Shihadeh
edd881fa16 more tici tests in jenkins (#19908)
* run loggerd tests on tici

* boardd loopback

* fix up seg length

* this doesn't add more coverage
old-commit-hash: 810ed30cab
2021-01-24 17:54:03 -08:00
Adeeb Shihadeh
cfdeda3393 OMX encoder stability (#19758)
* cleanup test first

* wait for other encoder threads

* fixes initial crash

* no print

* unused

* fix up tests

* need that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d4489fbf91
2021-01-21 10:40:08 -08:00
Adeeb Shihadeh
eaa1489093 loggerd: another rotation test (#19742)
* another rotation test

* make encoder test fast

* fix pc

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 5221450f2d
2021-01-12 19:40:57 -08:00
Adeeb Shihadeh
0d895ad82a loggerd tests (#19671)
old-commit-hash: af81190cfc
2021-01-06 19:18:35 -08:00