0

We are developing an iphone app that needs to process audio data in real time, but we are suffering with performance. The bottlenecks are in audio effects, which are in fact quite simple, but the performance hit is noticeable when several are added.

Most of the audio effects code is written in C.

We think there are two places we can use gpu hardware to speed things up: using openCL for effects and hardware for interpolation/smoothing. We are fairly new to this and don't know where to begin.

4

2 回答 2

0

您可能指的是 OpenGL,因为 OpenCL 仅存在于桌面上。是的,如果您想执行一些非常快速的并行处理,您可以为此使用 OpenGL ES 2.0 可编程着色器,但这将非常复杂。

您可能首先想查看 Accelerate 框架,它具有硬件加速功能,用于执行音频处理所需的任务。一个很好的起点是 Apple 的WWDC 2010 会议202 -“iPhone OS 的 Accelerate 框架”,以及他们的“利用 Accelerate 框架”文章。

此外,不要忽视 Hans 建议您首先分析代码的建议,因为您的性能瓶颈可能出现在您意想不到的地方。

于 2010-09-24T12:57:46.447 回答
0

您可能会为 ARM NEON SIMD 单元获得更好的 DSP 加速编码。NEON 专为 DSP 运算而设计,每个周期可以流水线化多个单精度浮点运算。而将音频数据输入和输出 GPU 内存可能是可能的,但可能不会那么快。

但是您可能想要分析您的代码以查看其他是否是瓶颈。iPhone 4 CPU 可以轻松跟上实时音频流上的多个 FFT 和 IIR 滤波器。

于 2010-09-24T17:11:06.113 回答