Commit Graph

36 Commits

Author SHA1 Message Date
Greg Hogan
a544533476 framereader: eliminate tempfile usage (#30289)
old-commit-hash: 68acb26aa2dde973bd7a8b48dca4fa8a06d79fe3
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: 59e947dc6c70f515e887cc2e09ed2ea0b39fa679
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: 86b90a8ba263df067406e0089eb507c3a397640e
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: f8e488f881cec5c654282b44910b07a541832fa8
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: 880157f5a614a4a524273a9833e0a066fdec371e
2023-09-14 14:36:32 -07:00
Justin Newberry
c4f322ce2d Linter: remove pylint (#29611)
remove pylint
old-commit-hash: 1ee6ed4b16e2ade0dd887c0687243aee769043e5
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: a9626f95b69af19306143fc4def02fb5769405d2
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: b11b14aff86a4c993bf5342ee37af169788c9026
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: 62c1e6592439119f360dd64b854e7047f35222ba
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: ea5b8cdfb10686c972d8d2bc1778e6e6567e45a9
2022-06-01 17:18:28 +02:00
mitchellgoffpc
b7e99b3f45 Ignore BrokenPipeError
old-commit-hash: 5c8c6faa9a6a3041bf2d85b8397656d61b1603ce
2022-03-22 12:52:25 -07:00
Greg Hogan
0b659ce9b6 eliminate xx filereader (#23514)
* eliminate xx filereader

* framereader cleanup
old-commit-hash: d5f4fdb1dbda7cfabdcc9d2c9342636e56388716
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: 332f568a8241fba9459cb70c76840b9670e6993a
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: 55390d273f36f49da3896e687ac5530f40c1d150
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: f1c77f97b934fac877230d9438fb4a15d1813c52
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: dddab597bcee0a103895509b7909743f97cbdf83
2021-08-28 18:25:05 -07:00
Greg Hogan
eca265120f FrameIterator that uses 1+ GB less RAM (#21687)
old-commit-hash: 8f1806602c4e4a70e073bf1abd8f61206864d652
2021-07-22 12:08:56 -07:00
Adeeb Shihadeh
0c1c0ddcb1 unlogger: put YUV vipc send behind flag
old-commit-hash: 4b6ec3bca645c2bc675d512dd20a5af76ffe3912
2021-06-03 21:53:16 -07:00
Greg Hogan
b518934573 ffmpeg hwaccel is better
old-commit-hash: 32c4367ffbd5c472ad6f6a84f89458b29b4465e1
2020-06-12 16:11:40 -07:00
Adeeb Shihadeh
68a3061c9d enable E261 in flake8: two spaces before inline comment
old-commit-hash: 27754a277c36b82ef4040e536cc918ba8ad77bec
2020-05-31 14:07:29 -07:00
Adeeb Shihadeh
be0b43f339 enable flake8 E231: missing whitespace after comma
old-commit-hash: efd5dffb1e727c70065fdbe7499ec9e009dfd282
2020-05-31 12:49:11 -07:00
Greg Hogan
10becfa268 FrameReader env vars FFMPEG_THREADS and FFMPEG_CUDA
old-commit-hash: d112a58366d9d9a8830fa344efe6c50bf587cd00
2020-05-28 17:33:34 -07:00
Greg Hogan
5db5ecd0b9 framereader single threaded env var
old-commit-hash: 2d0686faa1876d65642f6c982a4352630a842676
2020-05-28 13:39:28 -07:00
Willem Melching
57cc3cd69a framereader only has to support h265 and raw (#1588)
old-commit-hash: 639cf2288f3527230d103ba9e12652f52d38ad39
2020-05-28 12:45:38 -07:00
Willem Melching
12a306021d flake8 in pre-commit(#1583)
old-commit-hash: 29aaa44740b5dae3c1cc0c273c72c7eb53135e5e
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: bd0643424357864287ae0485da03f66df85e1fb1
2020-05-27 20:00:14 -07:00
Willem Melching
89241b3dba ffprobe use -f instead of -format
old-commit-hash: cd79cee41a3120f867b7d89b8dd7d9b65073d275
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: a25d535793cb22a8842679e119f759a8fcf054ee
2020-05-09 17:26:24 -07:00
Adeeb Shihadeh
e2687448d6 function doesn't have that arg
old-commit-hash: d712d9cf3b7e9b4f6787d3ed2f25aa3a777c3bde
2020-05-09 17:21:51 -07:00
Greg Hogan
83c1286efd framereader index data as param
old-commit-hash: 0b5758f1bef3cbfd37e4bf0b6c71db11e442422f
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: e568d3cadc71d2b301fcb46af9afb3c8c8005f72
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: 1295cfe06cd80a2c2f40e0af97697ee818037f08
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: d4f89430755445338270bb0a4c63d44404422fd6
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: 4a94e507cff94e55885e1b5efd2aa84bf642634d
2020-02-25 11:36:02 -08:00
Willem Melching
6929d5b6e0 no more xx imports in tools
old-commit-hash: 1f9485171edf2dded671d2e13aa8c8f60287bd5a
2020-02-25 11:06:27 -08:00
George Hotz
99c5800ea5 merge in tools
old-commit-hash: 29ac3da7b84426c6764150cb233b9c7bab1446d8
2020-01-17 10:07:22 -08:00