Open vashisthg opened 10 years ago
Been running into the same problem here. Look at this post: https://vec.io/posts/faster-alternatives-to-glreadpixels-and-glteximage2d-in-opengl-es
@JesseScott Were you able to port this library to that implementation
@gvv-fueled working on it, along with a video implementation. Almost done, will post here (and issue a pull request) when it's done.
@JesseScott Got any solution?
@vashisthg soon. project has had a few different priorities, so have ahd to shift gears this week. Will be revisiting next week.
Currently working on adapting the FBO/PBO activity from Grafika into GPUImageRenderer, but its proving tricky because of the GLContext...
For refernce: https://github.com/google/grafika/blob/f3c8c3dee60153f471312e21acac8b3a3cddd7dc/src/com/android/grafika/RecordFBOActivity.java
@JesseScott Had opened a issue on Grafika some time ago https://github.com/google/grafika/issues/10
@vashisthg yeah, I've seen that actually. Maybe we should just chip in and buy Fadden a nice bottle of scotch to fix this for us ;-)
@JesseScott did you accomplish the FBO solution? glReadPixels() is very very slow and can't apply in real time video application.
I have the same question as JuannyWang, is anywhere can find a demo about copy from PBO
We haven't released our code yet - I'll ping my boss about it. But a hint, we ended up utilizing several of the examples/functionality from Grafika https://github.com/google/grafika
@JesseScott We're looking forward to your release. ^_^
I have done the PBO copy in my own project, but the bitmap decode from the buffer, is not I need, it seems like width and height exchanged, may need do some transform action.(no problem in grafika) http://stackoverflow.com/questions/34347835/how-can-i-implement-pbopixel-buffer-object-in-android-grafika-project
With 8 mega pixel images the glReadPixels method being called in PixelBuffer.convertToBitmap() takes 700 - 1000 milli seconds. I have read that that glReadPixels is slow and can be replaced by Pixel buffer objects. I don't have any experience with OPENGL, can someone come up with a faster solution.
Line: https://github.com/CyberAgent/android-gpuimage/blob/febdf4900b437b2069661fd371d5469196e26f18/library/src/jp/co/cyberagent/android/gpuimage/PixelBuffer.java#L194