This week provided me with the opportunity to experiment with Apple's Core Image processing framework. Core Image's selling point is its native support for GPU acceleration. Image data is uploaded and maintained in fast graphics memory for the duration of a sequence of processing operations. Adjustments to the processing operation may be made without any data movement to or from the graphics card, giving exceptional interactive performance. Final renders still require data transfer to and from graphics memory in order to reach the backing store but can benefit from the faster computational performance.
Processing operations are written in a subset of the OpenGL Shading Language (GLSL). These are parallel expressions of image processing algorithms which can prove difficult to formulate from more advanced sequential algorithms. Some features of the GLSL language are notably missing, including support for control flow statements and multiple render targets. When a suitable GPU is not available the language can be compiled on the fly to SSE for CPU execution.
The framework is tied together with Objective C. This is perhaps the most contentious aspect of Core Image; and indeed of many of Mac OS X's software technologies. I am not a fan of the language, nor do I see its purpose in a modern development environment. The syntax is deliberately awkward to maintain backwards compatibility with C. C++ fills the modern object-oriented role, whilst managed languages such as C# and Java provide reflection along with other advanced language features. Obj C seems misplaced and it's unfortunate that one is forced to use it to interact with Apple's innovative technologies.
In the space of last week I put together a complete visual effect within the Core Image framework. Its performance was outstanding: real-time for 720p HD images and a respectable 15 FPS at 1080p HD. This is certainly the future of the industry; perhaps not Core Image specifically but there is certainly a place for accelerator-enhanced frameworks in solving the processing needs of increasingly data hungry industries.