Commit Graph

363 Commits

Author SHA1 Message Date
Willem Melching c38032656a loggerd: add missing utility include (#26502)
old-commit-hash: 844f7692d48c5b2b2b6f8bc90070d9fc83ef7171
2022-11-15 10:44:25 -08:00
Jake Poznanski e708055ca2 loggerd: fix length of ArrayPtr in handle_encoder_msg (#26077)
old-commit-hash: c782e4d796e0981b3717222cb5551911fe40cb7a
2022-10-17 17:22:47 -07:00
Kurt Nistelberger 6416888822 reset LaikadEphemeris after loggerd test
old-commit-hash: dc63245b8955dc941e4c2370f6b953564f3f775b
2022-10-03 20:47:00 -07:00
Dean Lee 219a0f97c7 bootlog: rename bz_file to file (#25881)
old-commit-hash: f4a4ec8fa21dfef5ef0ebe2eafaadc1c2536d861
2022-09-23 13:28:25 -07:00
Dean Lee a709ca5388 encoderd: build v4l_encoder.cc on PC (#25872)
old-commit-hash: d4404511bcfb420aaf26ae466654821ba4216b2a
2022-09-22 10:41:09 -07:00
Dean Lee b7d7436556 V4LEncoder: remove unused member variable buf_in (#25870)
old-commit-hash: 3b9add56025a2807bd7a75d105421f7c276e578b
2022-09-22 10:40:41 -07:00
Adeeb Shihadeh 040b222896 loggerd: add params test cases (#25843)
old-commit-hash: 8b741261cf4538ab88f42f18837ba13d71bcc0de
2022-09-19 14:06:03 -07:00
George Hotz 71f609f2cc port OX03C10 (#25161)
* start porting OS04C10

* something

* is the pll why this doesn't work

* understand plls, still doesn't work

* work

* weee something

* working?

* timing

* encoderd works with less cameras

* 1928

* flip image

* color balance

* adjust black level

* extra height maybe

* cleanups

* clean up sensor i2c

* sensors

* approx 20fps

* remove mirror

* 50ms, no fsin yet

* remove imx390 support

* some attempt at AE

* linearize the response

* OX changes (#25697)

* organize

* wb

* best effort but probably messed up by artifacts

* multicam sync

Co-authored-by: Comma Device <device@comma.ai>

* clean up

* more

* fix multiexposure

* start porting OS04C10

* something

* is the pll why this doesn't work

* understand plls, still doesn't work

* work

* weee something

* working?

* timing

* encoderd works with less cameras

* 1928

* flip image

* color balance

* adjust black level

* extra height maybe

* cleanups

* clean up sensor i2c

* sensors

* approx 20fps

* remove mirror

* 50ms, no fsin yet

* remove imx390 support

* some attempt at AE

* linearize the response

* OX changes (#25697)

* organize

* wb

* best effort but probably messed up by artifacts

* multicam sync

Co-authored-by: Comma Device <device@comma.ai>

* clean up

* more

* fix multiexposure

* unbroken AE

* oops

* sort of good AE

* both should work 1

* open then init

* fix debayer

* rename

* fix test build

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: aea1a0d5e684daf7682703174233390b0cf79c83
2022-09-09 22:38:00 -07:00
Jeroen 25f275636e bootlog: only do nvme checks on tici (#25634)
old-commit-hash: 502a39219932172d52ee0f280c5200ba11bca0c9
2022-09-01 19:05:15 -07:00
Adeeb Shihadeh 35ff65121e pre-commit: add codespell (#25571)
old-commit-hash: 6590fb2b93baedb2e1c5267b4f191f8e20fcd1d2
2022-08-30 11:20:55 -07:00
Dean Lee 6b230fd94f V4LEncoder: set bytesused to buf->len (#25050)
old-commit-hash: aece21c7cb1bd58e9a3939dca3e4439461e870ec
2022-08-25 16:57:34 -07:00
Dean Lee 48a9dc789d v4l_encoder: free buf_out in destructor (#25044)
old-commit-hash: ed70a9ab1de142dfc3a8afe89a5b3c32b592dda1
2022-08-21 14:03:44 -07:00
Adeeb Shihadeh fe89c4d6ab loggerd: log all disk space usage in initData (#25455)
* bootlog: log all disk space usage

* not just agnos

* move to initData

* cleanup
old-commit-hash: aa32ea0f64e4035ac929e09ee85d268c3185221c
2022-08-16 16:37:58 -07:00
Adeeb Shihadeh 33a85302e0 Fix master-ci dirty working tree + CI test (#25087)
* check

* test for dirty working tree

* swap order

* fix diff
old-commit-hash: df251ef50ebfe5c997e14a03fca4ec932bc4c5cf
2022-07-08 13:00:43 -07:00
Dean Lee e9f2954ee5 loggerd: remove 'enable' from struct LogCameraInfo (#25052)
remove enalbe
old-commit-hash: 568cc0f892d650bd5906b59e1ab169158a7a6bf7
2022-07-07 10:54:56 -07:00
Dean Lee 2156e71e7a move replay from selfdrive/ui/replay to tools/replay (#24971)
* mv to tools/replay

* change folder

* add .gitignore

* fix build doc

* disable warning

* enable warning after build

* build qt/util.cc qt/api.cc to library

* cleanup
old-commit-hash: fd5b3d76036b78864111790931a3abcb1d11ee0f
2022-06-28 16:12:42 +02:00
Dean Lee ae596241d1 FfmpegEncoder: free codec_ctx in encoder_close (#24967)
free context
old-commit-hash: 0aa9ae21d4068d1e8099ff4256d86a204ec31c1c
2022-06-27 11:20:13 +02:00
Dean Lee 1b725b5005 loggerd: remove rotate_lock (#24969)
remove lock
old-commit-hash: 748bbac3444cc30e6dafc2f0bda60b46f3fc8d5a
2022-06-27 11:19:46 +02:00
Dean Lee 16898dee68 logger.cc: remove unused function append_property (#24966)
remove append_property
old-commit-hash: 461f747247add7d4c50344042997427cdb2a90fa
2022-06-27 11:18:56 +02:00
Adeeb Shihadeh d9d83b0225 Move camerad to system/ (#24836)
* mv camerad

* add hardware symlink

* fix unit tests
old-commit-hash: 6123ab3d1c901ed3763e1a7cb8e1aac3f6b8fda3
2022-06-19 14:43:49 -07:00
Adeeb Shihadeh 3c48bc47b7 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
old-commit-hash: 0fce5d90459b77bf2cfa70f55f322f0e1fb8d01c
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh 9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b01f34de9714c99228f411558b44231
2022-06-11 16:38:24 -07:00
Willem Melching 753045c73d less TICI when not needed (#24698)
* less TICI when not needed

* fix process replay

* move reading voltages into hw abstraction layer

* Update selfdrive/hardware/tici/hardware.h

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

* Update selfdrive/hardware/hw.h

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

* Update selfdrive/hardware/base.h

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

* rename init function

* Update selfdrive/athena/athenad.py

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>

* Update selfdrive/boardd/boardd.cc

* Apply suggestions from code review

* Update selfdrive/thermald/thermald.py

* update ref

* fix alert width if all cameras are bad

* add ecam to test_loggerd

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
old-commit-hash: f49a9c9fd2100a4f1401a93d88064ddbbbd935c1
2022-06-02 15:20:51 +02:00
George Hotz 2a6ffaf71d nv12: encoderd avoids a full frame copy (#24519)
* rgb to nv12

* nv12 works (w memcpy)

* correct now

* no copy

* fix nv12 with fast debayer

* reverts of unused stuff

* ui use nv12

* comment out thumbnails for now

* rebase fix

* dm read nv12

* model read nv12

* fix ffmpeg encoder

* thumbnails from nv12

* replay to nv12

* python framereader support nv12

* remove hardcoded frame/buffer sizes

* fix build

* ffmpeg encoder fix buffers

* small cleanup

* reduce power usage test

* fix cpu usage test

* fix snapshot

* fix loggerd test

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Joost Wooning <jwooning@gmail.com>
old-commit-hash: ea5b8cdfb10686c972d8d2bc1778e6e6567e45a9
2022-06-01 17:18:28 +02:00
Adeeb Shihadeh 3e8625e50b visionipc python shim (#24660)
old-commit-hash: 32a9ccfc37d97e6692435153ac9f0fe72feb1e9f
2022-05-25 20:49:56 -07:00
Adeeb Shihadeh 8456b0e79c uploader: increase max uncompressed qlog size to 100MB
old-commit-hash: eca265e07b512831d473cd1cf6d6b3dea5a03327
2022-05-23 13:43:14 -07:00
Willem Melching f7e2813438 Small fixes for macOS build (#24620)
* Small fixes for macOS build

* remove gpu_libs
old-commit-hash: 1cc652602f008122cf82171f7705522d3e2457dd
2022-05-23 13:46:48 +02:00
George Hotz 109916df80 loggerd: Fix loggerd encode packet drops (#24599)
* hmm, try this

* hmm, try this

* rewrite handle_encoder_msg

* fix new logic

* add comments and an assert

* handle startup condition better

* handle restarts of encoderd

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0000ad2ac0996075481841221e9bcc842f2812d7
2022-05-20 00:02:50 -07:00
Adeeb Shihadeh 3abe307374 encoder test speedup (#24601)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d87f30ea069a4bbfc20c8caa32e9fdf89a498ed5
2022-05-19 22:33:17 -07:00
Adeeb Shihadeh f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb313bea258c012c3026461a22bf8135
2022-05-18 14:11:57 -07:00
George Hotz fca47bb6a4 add unixTimestampNanos to encoderd (#24583)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: c2279ef39dd7a2cda88ec6949b24ff0f71c19983
2022-05-18 12:58:52 -07:00
George Hotz d0bcf17691 encoderd: fix bytesused (#24553)
fix bytesused

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3718f9a6e0fdae601b1f90e1f88328609edea885
2022-05-16 16:58:19 -07:00
Adeeb Shihadeh fb1c3b0d5d common: replace custom xattr implementation with os module's (#24448)
* use os module's xattr function

* fix that

* handle in helper
old-commit-hash: 81dacbedcacaf9db43d19700e04e7361c0fbbbcc
2022-05-15 17:13:50 -07:00
Adeeb Shihadeh 6a8fefd5de loggerd: adjust qcamera threshold, seemed to be tuned for comma two
old-commit-hash: 5a58ebf183e1066f5d94163a05d9180a66447409
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: 94b9972eb798408a3c412716b8d9eb8ddb9354bc
2022-05-13 17:56:02 -07:00
grekiki 7cd23af9b1 Mypy fixes for --check-untyped-defs (#24372)
more type fixes
old-commit-hash: 17e33978cdd9322918e9d5d388f7fa47aa30e9b7
2022-05-12 14:08:11 +02:00
Willem Melching c7e31ef974 encoderd: update deprecated ffmpeg functions (#24501)
old-commit-hash: 75f21492671ad34949061e57760b360e93e440f9
2022-05-12 12:43:07 +02:00
George Hotz eb9e57e070 encoderd: support remote encoder behind env var (#24490)
* remote encoder

* remote encoder on PC, fix type

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: bd0cc655fbbfdafc0ef081be8558b4c773e76eda
2022-05-10 16:53:47 -07:00
George Hotz 1f4628bad5 encoderd: make work on PC (#24483)
* don't use the codec in video_writer

* this produces broken videos for some reason

* bugfix

* refactor on the class

* works on device

* fix codec

* no codec enum

* fix pc

* move into dirs

* these includes also

* rename it ffmpegencoder

* add avcodec_close

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2008db47c208f6f0fd661cc45f215bb80aef38d0
2022-05-10 15:20:51 -07:00
Willem Melching badbd3347c uploader: ensure requests.put gets file like object (#24462)
old-commit-hash: ba89faa5f77c76023f49b85888e6d6eb7f2e1a11
2022-05-07 15:42:47 +02:00
George Hotz 210508d3f1 sync qcam p frames (#24459)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ac343433a22984109401a9de97eab28220e38e72
2022-05-06 21:47:58 -07:00
Joost Wooning 08da73721c uploader: size limit for automatic uploading of qlogs/qcams (#24403)
* uploader: size limit for automatic uploading of qlogs/qcams

* move check to add logging

* use constant

* mark as uploaded

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: df8f024e19de2d7a528b5921f73895f2078cf03a
2022-05-06 11:47:58 +02:00
Adeeb Shihadeh 2e45c3bd68 uploader: compress rlogs (#24447)
old-commit-hash: 66fbce638f1a6a2bc9c08c4a17d5efe47fb91651
2022-05-05 19:13:06 -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: 77a6f3d034a7b17d70b750b9ea454310f4b8edf1
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: 0baa4c3e2ad9ee6f8daba8267db44c2cd44caa62
2022-04-30 09:22:52 -07:00
George Hotz b872fe92ab loggerd: Separate writer from encoder (#24257)
* seperate writer from encoder

* video writer in release

* confirm loggerd on PC works, add YUV option to compressed_vipc

* make raw_logger use video_writer

* put this back to master

* close codec

* put this back

* use unique_ptr

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 8d2465578707022ca4a54defe171103955026a65
2022-04-20 14:51:24 -07:00
George Hotz d73af8d298 C2: remove some dead code (#24256)
* remove some dead code

* still needed

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1795a2ac03d2707deeb6f17b4b5eb287284b9cef
2022-04-18 20:38:03 -07:00
George Hotz 6dde52671b loggerd: prereqs for deanlee loggerd omx encoder (try 2) (#24252)
* refactor encoders

* fix pc build

* buf_info

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0ac35a656acad2ecb2a394ddce1358cb41dfb4ab
2022-04-18 18:21:46 -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: 5c48e7bc86a621dd35f4ff25da7a26ee506bac76
2022-04-18 17:55:23 -07:00
Comma Device d9d3f9a8ee encodeData: add flags support
old-commit-hash: df7275f1f77a98c66fcb16c287bafc5c4326328b
2022-04-16 15:54:22 -07:00