Commit Graph

21 Commits

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

* fix mypy
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh
d87f30ea06 encoder test speedup (#24601)
Co-authored-by: Comma Device <device@comma.ai>
2022-05-19 22:33:17 -07:00
Adeeb Shihadeh
5a58ebf183 loggerd: adjust qcamera threshold, seemed to be tuned for comma two 2022-05-14 01:04:46 -07:00
George Hotz
94b9972eb7 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>
2022-05-13 17:56:02 -07:00
Willem Melching
77a6f3d034 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
2022-05-03 14:09:17 +02:00
George Hotz
0baa4c3e2a 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>
2022-04-30 09:22:52 -07:00
Adeeb Shihadeh
5c48e7bc86 remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
2022-04-18 17:55:23 -07:00
Adeeb Shihadeh
e13630dfee faster jenkins (#22973)
Co-authored-by: Comma Device <device@comma.ai>
2021-11-18 23:43:09 -08:00
Adeeb Shihadeh
ea761cbbd5 loggerd: trigger rotate on frame id instead of frame count (#22848)
Co-authored-by: Comma Device <device@comma.ai>
2021-11-13 15:38:10 -08:00
Willem Melching
89f311714c 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
2021-10-26 16:00:43 +02:00
Willem Melching
a93271a518 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
2021-09-01 14:28:50 -07:00
Willem Melching
a39873872d 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>
2021-08-06 11:10:33 +02:00
Willem Melching
c4e2d374c9 More encoder test cleanup (#20623)
* more encode test cleanup

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

* update test

* clean up
2021-02-22 09:15:56 -08:00
Greg Hogan
1cd9105e96 adjust qcamera quality (#20066)
* better ts

* fix test
2021-02-11 17:55:00 -08:00
Adeeb Shihadeh
0411015103 fix up encoder test for tici rotation (#19941)
* fix encoder test

* revert for c2

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

* boardd loopback

* fix up seg length

* this doesn't add more coverage
2021-01-24 17:54:03 -08:00
Adeeb Shihadeh
d4489fbf91 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>
2021-01-21 10:40:08 -08:00
Adeeb Shihadeh
5221450f2d loggerd: another rotation test (#19742)
* another rotation test

* make encoder test fast

* fix pc

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