Commit Graph

47 Commits

Author SHA1 Message Date
YassineYousfi
adbf68f771 FrameReader: add hwaccel arg and clear frames_cache (#36974) 2026-01-02 11:29:45 -08:00
YassineYousfi
f62177a827 FrameReader: use hwaccel auto (#36973)
* FrameReader: use hwaccel auto

* rm main block
2026-01-01 19:06:31 -08:00
Adeeb Shihadeh
63c9a85c6a FrameReader: use HW accel if available (#36964)
* FrameReader: add macOS hw accel

* sys

* more platforms

* logging
2025-12-28 21:38:54 -08:00
commaci-public
3a2c4a855a [bot] Update Python packages (#35726)
* Update Python packages

* dep

* ref

* hint

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-07-14 13:48:55 -07:00
Maxime Desroches
6a37d8a89e fix framereader indent 2025-06-19 10:38:26 -07:00
Harald Schäfer
87a6e369aa Framereader: minor cleanup (#35577)
* No wrapping

* unused test

* another list

* mypy

* cleaner

* Revert "cleaner"

This reverts commit ccc1446b9d649d64b20175e22a66e135c44b21e5.

* mypy
2025-06-19 09:49:51 -07:00
Harald Schäfer
5f3d876aaa model replay: framereader cache (#35576)
* Simpler cache version

* cachetools

* different LRU

* lint

* smaller

* just write LRU

* mypy

* same length
2025-06-18 16:29:22 -07:00
Harald Schäfer
d9b6c16037 Cleanup framereader (#35513)
* squash

* misc cleanup

* no LLM garbage

* misc fixes

* typo

* fix CI

* fix hints

* LLM soo wordy

* improve
2025-06-09 22:39:35 -07:00
Harald Schäfer
a8639d3feb rgb is default (#35467)
* rgb is default

* change dummy default
2025-06-04 23:40:41 -07:00
Harald Schäfer
5505338ffb model replay: less frames and less complexity (#35427)
* Revert "ci: faster model_replay (#34036)"

This reverts commit 847a5ce1f3.

* fix conflict

* trigger on test change

* zst

* give start and end frame

* unused flags

* no print

* whitespace

* fix plotting

* slice correct

* no print

* Just start from beginning
2025-06-02 21:54:37 -07:00
Maxime Desroches
847a5ce1f3 ci: faster model_replay (#34036)
* cache draft

* fix

* fix

* fix

* better

* zst

* more

* try

* pool

* fix

* fix

* revert :C

* better

* cleanup

* no cache

* this too
2024-11-16 15:34:21 -08:00
Greg Hogan
a544533476 framereader: eliminate tempfile usage (#30289)
old-commit-hash: 68acb26aa2
2023-10-18 19:48:26 -07:00
Greg Hogan
99d094a006 fix ffprobe on device (#30286)
* fix ffprobe on device

* use FileReader

* no more requests
old-commit-hash: 59e947dc6c
2023-10-18 18:31:14 -07:00
Greg Hogan
e0469bdde6 filereader cleanup (#30191)
* filereader cleanup

* make name return url

* remove unused imports
old-commit-hash: 86b90a8ba2
2023-10-05 19:45:46 -07:00
Greg Hogan
29bb2cf867 convert vidindex to python (#30176)
* convert vidindex to python

* fix whitespace

* corrupt file option

* fix up typings

* fix return type

* update framereader

* change length delimiter to uint32 value

* change length to uint32 value

* move url_file changes to separate PR

* cleanup caching

* revert whitespace change

* fix frame type param type
old-commit-hash: f8e488f881
2023-10-05 18:40:24 -07:00
YassineYousfi
eb7cad40dd framereader: add cache_dir argument (#29904)
* framereader: add cache_dir argument

* make it an env var
old-commit-hash: 880157f5a6
2023-09-14 14:36:32 -07:00
Justin Newberry
c4f322ce2d Linter: remove pylint (#29611)
remove pylint
old-commit-hash: 1ee6ed4b16
2023-08-24 16:30:54 -07:00
Adeeb Shihadeh
16ec56398c add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Adeeb Shihadeh
e76af64065 CI: enable PYTHONWARNINGS=error (#29364)
* CI: enable PYTHONWARNINGS=error

* fixes

* more ignore

* more modeld ignore
old-commit-hash: b11b14aff8
2023-08-12 17:15:16 -07:00
Justin Newberry
d487c0501f Ruff: enable most of bugbear (#29320)
* added mutable default args

* most of the Bs

* add comment about lrucache
old-commit-hash: 62c1e65924
2023-08-11 15:33:49 -07: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: ea5b8cdfb1
2022-06-01 17:18:28 +02:00
mitchellgoffpc
b7e99b3f45 Ignore BrokenPipeError
old-commit-hash: 5c8c6faa9a
2022-03-22 12:52:25 -07:00
Greg Hogan
0b659ce9b6 eliminate xx filereader (#23514)
* eliminate xx filereader

* framereader cleanup
old-commit-hash: d5f4fdb1db
2022-01-13 15:56:54 -08:00
Ewout ter Hoeven
f206ebd054 Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default

Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
old-commit-hash: 332f568a82
2021-12-24 11:18:39 -08:00
Ewout ter Hoeven
a962365292 Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 55390d273f
2021-12-16 14:58:17 +01:00
Willem Melching
fd3140fd6f cleanup unused pip packages (#22947)
* cleanup unused pip packages

* fix linter
old-commit-hash: f1c77f97b9
2021-11-17 16:23:03 +01:00
Willem Melching
6f92abc815 Less open file permissions (#21922)
* Less open file permissions

* add test back

* remove params test for permissions

* remove umask

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dddab597bc
2021-08-28 18:25:05 -07:00
Greg Hogan
eca265120f FrameIterator that uses 1+ GB less RAM (#21687)
old-commit-hash: 8f1806602c
2021-07-22 12:08:56 -07:00
Adeeb Shihadeh
0c1c0ddcb1 unlogger: put YUV vipc send behind flag
old-commit-hash: 4b6ec3bca6
2021-06-03 21:53:16 -07:00
Greg Hogan
b518934573 ffmpeg hwaccel is better
old-commit-hash: 32c4367ffb
2020-06-12 16:11:40 -07:00
Adeeb Shihadeh
68a3061c9d enable E261 in flake8: two spaces before inline comment
old-commit-hash: 27754a277c
2020-05-31 14:07:29 -07:00
Adeeb Shihadeh
be0b43f339 enable flake8 E231: missing whitespace after comma
old-commit-hash: efd5dffb1e
2020-05-31 12:49:11 -07:00
Greg Hogan
10becfa268 FrameReader env vars FFMPEG_THREADS and FFMPEG_CUDA
old-commit-hash: d112a58366
2020-05-28 17:33:34 -07:00
Greg Hogan
5db5ecd0b9 framereader single threaded env var
old-commit-hash: 2d0686faa1
2020-05-28 13:39:28 -07:00
Willem Melching
57cc3cd69a framereader only has to support h265 and raw (#1588)
old-commit-hash: 639cf2288f
2020-05-28 12:45:38 -07:00
Willem Melching
12a306021d flake8 in pre-commit(#1583)
old-commit-hash: 29aaa44740
2020-05-27 20:33:05 -07:00
Willem Melching
c0866d9edb pre-commit pylint (#1580)
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
-  pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344

* add pylint to pre-commit and make everything pass

* Remove uncommented stuff

Co-authored-by: J <user@4800.lan>
old-commit-hash: bd06434243
2020-05-27 20:00:14 -07:00
Willem Melching
89241b3dba ffprobe use -f instead of -format
old-commit-hash: cd79cee41a
2020-05-11 15:32:40 -07:00
Adeeb Shihadeh
d6d8d48b3f Revert "function doesn't have that arg"
This reverts commit 9b8b482a0048290fcadc19f0bb4de442f8faa143.

old-commit-hash: a25d535793
2020-05-09 17:26:24 -07:00
Adeeb Shihadeh
e2687448d6 function doesn't have that arg
old-commit-hash: d712d9cf3b
2020-05-09 17:21:51 -07:00
Greg Hogan
83c1286efd framereader index data as param
old-commit-hash: 0b5758f1be
2020-05-07 18:23:19 -07:00
George Hotz
d47b2ef576 More LGTM fixups (#1457)
* exclude lib dirs, fix 3 cpp errors

* fix more alerts, exclude mkvparse

Co-authored-by: George Hotz <geohot@gmail.com>
old-commit-hash: e568d3cadc
2020-05-02 20:00:41 -07:00
George Hotz
6fbcde48e5 Using lgtm.com and fixing found alerts (#1452)
* lgtm in readme, and mac nui fixes

* call super inits in radars

* unused imports, dup lines

* more radars, more unused imports

* pass CP into RadarInterfaceBase

* more fixups

* unused imports

* delete unused lines

* ugh, new unused import

Co-authored-by: George Hotz <geohot@gmail.com>
old-commit-hash: 1295cfe06c
2020-05-02 12:07:34 -07:00
George Hotz
7eb4fabe97 more red diffs, remove hevc framereader stuff and two unused classes
old-commit-hash: d4f8943075
2020-04-24 12:15:50 -07:00
Andy Haden
03acf56736 Revert "no more xx imports in tools"
This reverts commit 2de79769f0e7d29cc1e4f5544ae1681127ed3c5c.

old-commit-hash: 4a94e507cf
2020-02-25 11:36:02 -08:00
Willem Melching
6929d5b6e0 no more xx imports in tools
old-commit-hash: 1f9485171e
2020-02-25 11:06:27 -08:00
George Hotz
99c5800ea5 merge in tools
old-commit-hash: 29ac3da7b8
2020-01-17 10:07:22 -08:00