mattday wrote: ↑Thu Feb 22, 2018 9:50 pm
6by9 wrote:
(I really must learn not to get distracted by potentially interesting things!)
I had a look. Turns out that after plotting out what goes where, the code changes aren't as hideous as they at first seemed. After a slight false start (blasted short-paths) I think I have native conversion routines handling most cases, but it could do with a bit more testing.
That's excellent!
Are volunteers required to help test, or do you have it covered?
https://drive.google.com/file/d/1CyocGJ ... sp=sharing should be the appropriate firmware files. Even more warnings on this than a normal rpi-update - absolutely no guarantees, so please back up your existing files before trying it.
I've created the internal pull request to merge the changes anyway as I'm happy with the results viewed through QV4L2, so it should be in the next rpi-update.
mattday wrote:6by9 wrote:
IIRC OpenCV does now support I420. Rgb support would be easier in arm neon as it supports reading triplets into 3 vector registers (the vpu doesn't) - I don't know if they've looked at that recently.
I believe recent versions of OpenCV have a load of NEON optimisations. It looks like OpenCV video capture now supports I420, but you then have to convert to the 'native' BGR to really do anything interesting, so I'm sure a lot of people will be happy with this performance boost!
In some ways doing conversions in NEON with multiple 1GHz ARM cores has some performance advantages over the dual-core VPU running at 250MHz. The normal pain is in loading the data from SDRAM in the first place, so loading once, doing all processing, and storing the result once is always preferable to loading and saving multiple times. The VPU can win sometimes on this as it can load up more stuff into the VRF for processing than fits in NEON registers, although NEON typically relies heavily on the data cache instead. Swings and roundabouts.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.