News for hackers. Stuff that matters.
Re:GPUImage 2 by Veratyr on Monday April 18, 2016 @01:02AM (#11517811)
A lower level but more portable alternative: http://halide-lang.org/

Takes a bit of learning but it's really fast. The tutorial series is good http://halide-lang.org/tutorials/tutorial_introduction.html

It'd be interesting to see a comparison between the two for something non-trivial, both in terms of code complexity and performance. My guess is that Halide takes a lot more code but ends up being 2-3x faster due to the ease of low level optimization.

Re:GPUImage 2 by JustFinishedBSG on Monday April 18, 2016 @08:30AM (#11519362)
Does it support Metal? Because it is what GPUImage blazing fast on iOS in the first place
Re:GPUImage 2 by Veratyr on Monday April 18, 2016 @05:10PM (#11523186)
Yes, Halide supports Metal as one of its targets. The Github repo has samples for iOS apps and generic Metal: https://github.com/halide/Halide/tree/master/apps
Re:GPUImage 2 by ipsum2 on Monday April 18, 2016 @02:51AM (#11518135)
Off topic, do you know if Halide supports RAW image format?
Re:GPUImage 2 by vanderZwan on Monday April 18, 2016 @04:09AM (#11518393)
Well, RAW image formats vary per camera, so it probably won't "support" any particular format out of the box since that is not really the responsibility of the language.

But given a known format I'm pretty sure you can convert any RAW image format into something Halide understands without loss (at the moment most RAW image data uses at most 14 bits IIRC, so a 16 bit RGB array should be enough), after which you can implement, say, debayering algorithms yourself.

In fact, that's the first example you see in the first publication (see top left) about Halide:

http://people.csail.mit.edu/jrk/halide12/

Re:GPUImage 2 by Veratyr on Monday April 18, 2016 @05:09PM (#11523177)
Halide doesn't operate that high level. You need to use another library to decode the image, Halide takes raw pixel values.

But yes, you can use Halide for handling RAW image data. I actually used it for exactly that a couple of months ago, when I implemented a demosaic algorithm. It's damn fast too.