Hi everyone.
We are trying to use mali 400 GP2 for real time audio processing. Audio data is signed short(16 bit).
We implemented FIR filter, but it work very slow for real time processing.
We have some problems to raise productivity.
Data loading and writing(rendering) to textures.
First problem is that, can't load data to textures as signed, forced to convert each input sample in fragment shader from additional code, if it less than zero, and convert it back when writing output sample.
Second problem: Can't load each sample to each component, forced to lad data in one color as 8 bit in R and 8 bit in G, or 5 bit in R 6 in G, 5 in B, because of this doing additional calculations.
Third problem, each component clumps to [0:1],
Can we somehow load signed data, or unsigned short for each of components, is there any way or any extensions to handling this?
We are using mali 400 on A20 under linux.
Thanks and Regards.
> Can we somehow load signed data, or unsigned short for each of components, is there any way or any extensions to handling this?
Not directly on Mali-400, at least not via textures. OpenGL ES 2.0 really doesn't have anything like the texture workload you are trying to implement, and Mali-400 it doesn't support OpenGL ES 3.0 (which has native support for integer textures). Any of the Midgard family of Mali GPUs would be better suited to what you are trying to do if you want to keep this approach.
If you want to try something different one other idea is to treat the input samples as per-vertex data, rather than texture samples. Render a grid of vertices on screen, and encode the audio data as per-vertex varying payload. On Mali-400 this would allow fp16 per channel inputs, and signed data.
HTH,
Pete
Thanks for reply Peter Harris.
Initially, when testing what can we do on mali 400 for GPGPU, we have done as you say: per-vertex varying loading.It was very slow, but then we didn't know anything, and now we can try it again, but there is one question.
In FIR filter to get one output sample, we need previews 32(or more) samples, is it possible to access data from current vertex to previews vertexes data, or we must to load all data for all vertexes?
> is it possible to access data from current vertex to previews vertexes data
No - in OpenGL all vertices and fragments are forced to be computationally independent to help remove serialization points which would stop multi-thread / multi-core scalability (this is how GPUs scale well to thousands of threads executing concurrently).
Thank you very much Peter Harris.