Commit Graph

27 Commits

Author SHA1 Message Date
George Hotz
ea5b8cdfb1 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>
2022-06-01 17:18:28 +02:00
mitchellgoffpc
5c8c6faa9a Ignore BrokenPipeError 2022-03-22 12:52:25 -07:00
Greg Hogan
d5f4fdb1db eliminate xx filereader (#23514)
* eliminate xx filereader

* framereader cleanup
2022-01-13 15:56:54 -08:00
Ewout ter Hoeven
332f568a82 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>
2021-12-24 11:18:39 -08:00
Ewout ter Hoeven
55390d273f 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>
2021-12-16 14:58:17 +01:00
Willem Melching
f1c77f97b9 cleanup unused pip packages (#22947)
* cleanup unused pip packages

* fix linter
2021-11-17 16:23:03 +01:00
Willem Melching
dddab597bc 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>
2021-08-28 18:25:05 -07:00
Greg Hogan
8f1806602c FrameIterator that uses 1+ GB less RAM (#21687) 2021-07-22 12:08:56 -07:00
Adeeb Shihadeh
4b6ec3bca6 unlogger: put YUV vipc send behind flag 2021-06-03 21:53:16 -07:00
Greg Hogan
32c4367ffb ffmpeg hwaccel is better 2020-06-12 16:11:40 -07:00
Adeeb Shihadeh
27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Adeeb Shihadeh
efd5dffb1e enable flake8 E231: missing whitespace after comma 2020-05-31 12:49:11 -07:00
Greg Hogan
d112a58366 FrameReader env vars FFMPEG_THREADS and FFMPEG_CUDA 2020-05-28 17:33:34 -07:00
Greg Hogan
2d0686faa1 framereader single threaded env var 2020-05-28 13:39:28 -07:00
Willem Melching
639cf2288f framereader only has to support h265 and raw (#1588) 2020-05-28 12:45:38 -07:00
Willem Melching
29aaa44740 flake8 in pre-commit(#1583) 2020-05-27 20:33:05 -07:00
Willem Melching
bd06434243 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>
2020-05-27 20:00:14 -07:00
Willem Melching
cd79cee41a ffprobe use -f instead of -format 2020-05-11 15:32:40 -07:00
Adeeb Shihadeh
a25d535793 Revert "function doesn't have that arg"
This reverts commit d712d9cf3b.
2020-05-09 17:26:24 -07:00
Adeeb Shihadeh
d712d9cf3b function doesn't have that arg 2020-05-09 17:21:51 -07:00
Greg Hogan
0b5758f1be framereader index data as param 2020-05-07 18:23:19 -07:00
George Hotz
e568d3cadc More LGTM fixups (#1457)
* exclude lib dirs, fix 3 cpp errors

* fix more alerts, exclude mkvparse

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 20:00:41 -07:00
George Hotz
1295cfe06c 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>
2020-05-02 12:07:34 -07:00
George Hotz
d4f8943075 more red diffs, remove hevc framereader stuff and two unused classes 2020-04-24 12:15:50 -07:00
Andy Haden
4a94e507cf Revert "no more xx imports in tools"
This reverts commit 1f9485171e.
2020-02-25 11:36:02 -08:00
Willem Melching
1f9485171e no more xx imports in tools 2020-02-25 11:06:27 -08:00
George Hotz
29ac3da7b8 merge in tools 2020-01-17 10:07:22 -08:00