Can OpenGL And OpenCL Overhaul Your Photo Editing Experience?

Applications: GIMP, AfterShot Pro, And Musemage

For this article, we tested with four applications: GIMP, Corel AfterShot Pro, Musemage, and Adobe Photoshop CS6.

GIMP (GNU Image Manipulation Program), an open source project since 1995, is pretty much the go-to app for anyone who doesn’t want to pay for an image/graphics editor. The title is brimming with advanced features ranging from channels and paths to animation and pattern tools. While we tested under Windows, there are versions for several operating systems, including Mac OS X, Linux, FreeBSD, and even AmigaOS 4. Specifically, we tested with the version 2.8 build released on April 2, 2012, that incorporated OpenCL support for 19 filters. We accessed three of these filters (Gaussian blur, bilateral, and motion blur) through the Generic Graphics Library (GEGL) menu list that first started appearing in GIMP 2.6. AMD described GEGL to us like so:

“GEGL is a floating-point-based processing pipeline that will be the foundation for the next upcoming major release of GIMP. GEGL requires more computational power than the baseline GIMP pipeline, which is 8-bit-based. While the computation requirements are high, floating-point does provide flexibilities that 8-bit processing just can’t match. Since GEGL is going to be the future of GIMP processing, we have focused our OpenCL work with GIMP on accelerating the GEGL pipeline (as opposed to the baseline GIMP pipeline). As such, only GEGL operations will experience OpenCL acceleration. GEGL is being integrated piece by piece into GIMP, and that’s why you see special menus for GEGL operation in this build and in the near future, until it’s fully integrated in GIMP, at which point there will not be a special menu for GEGL since everything will be GEGL.”

In speaking with GIMP/GEGL developer Victor Oliveira, we gained an interesting insight. OpenGL is inherently made for graphics processing, and I’d long assumed that OpenCL was much the same, only aimed at somewhat different graphical tasks. However, it turns out that the API is more robust and flexible than most people appreciate.

“OpenCL not only gives GPU acceleration, but we can also use OpenCL in the CPU to provide good multi-threading, which GIMP lacked, and vectorization support,” says Oliveira. “Notice that GIMP's audience is very heterogeneous, so if we want to, for example, support the AVX instruction set in our code, we would have to generate two builds, because it wouldn't work on older machines, or detect it on runtime. Either option is bad. With OpenCL, we can do that while distributing just one build, it's a really interesting technology.

Our GIMP build has command line options for running with or without OpenCL support, as well as displaying a debug window that shows benchmarking results. For a test file, we used a 4096x2048 30 MB bitmap image.

Corel’s AfterShot Pro is a non-destructive photo workflow application. From a technical perspective, this means that every time an image is opened, edited, or output, ASP reapplies all of the image processing, starting at the very earliest step of decoding the image content all the way though rendering the final image on-screen. Throughout this process, no data is eliminated. A better metaphor may be to say that changes are stacked, and users can modify any change made within that stack. Of course, if that stack is flattened or merged, then the non-destructive workflow vanishes.

We obtained a special preview build of ASP from Corel that implements OpenCL in such a way that it helps accelerate file conversions. So we gathered a batch of 50 RAW images, each measuring 6048x4032 and roughly 37 MB, and used ASP to batch convert them into JPG with and without OpenCL assistance.

Musemage is a newer and lesser-known photo editor deserving of a larger audience. As we hear from AMD, this application was the work of several engineers in China, which explains a lot. Technically, the app is a marvel of utility and convenience for photo manipulation, especially for batch editing, but it seems to have received practically no marketing here in America. This is unfortunate because, unlike so many editing tools that have bolted-on GPU-based acceleration as an iterative afterthought, Musemage was built from the ground up with such acceleration.

In our Musemage batch test, we used eight JPEG images supplied by JLucasPhoto.com, each of 10 to 12 MP, totaling 35.4 MB of data. Musemage hosts dozens of adjustments, color effects, lens effects, distortions, resizing options, and so on. During the batch run, we applied eleven of these processes onto each image: Auto Contrast, Auto White Balance, Gaussian Blur (4.0 pixels), Color Denoising (0.8 pixel), Negative Film (highlight 50, shadow 50), Advanced Defog (threshold 0.10, strength 0.65), Vignetting (FoV angle 45), Soften Skin (radius 3.3 pixels, strength 0.05, whiten 0.02), Horizontal Flip, Resize (150% fixed width and height), and Add Text (40% opacity).

Create a new thread in the US Reviews comments forum about this subject
This thread is closed for comments
53 comments
Comment from the forums
    Your comment
    Top Comments
  • ilysaml
    Now Adobe uses both CUDA and OpenCL that's superb.
    17
  • Other Comments
  • ilysaml
    Now Adobe uses both CUDA and OpenCL that's superb.
    17
  • alphaalphaalpha1
    Tahiti is pretty darned fast for compute, especially for the price of the 7900 cards, and if too many applications get proper OpenCL support, then Nvidia might be left behind for a lot of professional GPGPU work if they don't offer similar performance at a similar price point or some other incentive.

    With the 7970 meeting or beating much of the far more expensive Quadro line, Nvidia will have to step up. Maybe a GK114 or a cut-down GK110 will be put into use to counter 7900. I've already seen several forum threads talking about the 7970 being incredible in Maya and some other programs, but since I'm not a GPGPU compute expert, I guess I'm not in the best position to consider this topic on a very advanced level. Would anyone care to comment (or correct me if I made a mistake) about this?
    3
  • A Bad Day
    How many CPUs would it take to match the tested GPUs?
    1
  • blazorthon
    A Bad DayHow many CPUs would it take to match the tested GPUs?


    That would depend on the CPU.
    2
  • esrever
    Would be interesting to compare the i7 ivybridge against trinity in openCL
    5
  • mayankleoboy1
    why no nvidia cards here?
    1
  • mayankleoboy1
    any CUDA vs OpenCL benchmarks?
    2
  • de5_Roy
    can you test like these combos:
    core i5 + 7970
    core i5 hd4000
    trinity + 7970
    trinity apu
    core i7 + 7970
    and core i7 hd 4000, and compare against fx8150 (or piledriver) + 7970.
    it seemed to me as if the apu bottlenecks the 7970 and the 7970 could work better with an intel i5/i7 cpu on the graphical processing workloads.
    7
  • vitornob
    Nvidia cards test please. People needs to know if it's better/faster to go OpenCL or CUDA.
    1
  • bgaimur
    vitornobNvidia cards test please. People needs to know if it's better/faster to go OpenCL or CUDA.


    http://www.streamcomputing.eu/blog/2011-06-22/opencl-vs-cuda-misconceptions/

    CUDA is a dying breed.
    7
  • Anonymous
    no intel or nvidia because for professional editing you need hardware capable of more than gaming...
    -1
  • A Bad Day
    blazorthonThat would depend on the CPU.


    2687W: 2P server CPU, 8 core (16 threads), 3.1 GHz (3.8 GHz turbo), and 20 MB of L3 cache.

    Cost per CPU: $1885
    1
  • blazorthon
    nousernameno intel or nvidia because for professional editing you need hardware capable of more than gaming...


    Quadro, Tesla... These are graphics cards that are also capable of more than gaming, even if like alpha said above, many of them aren't always the very fastest such cards for compute performance anymore and most definitely aren't the fastest compute cards for the money.

    A Bad Day2687W: 2P server CPU, 8 core (16 threads), 3.1 GHz (3.8 GHz turbo), and 20 MB of L3 cache.Cost per CPU: $1885


    I'll have a look and see if I can find benchmarks to compare with those done in this article.
    5
  • annymmo
    I'm hoping that OpenCL will make it possible to implement high demanding video codecs for smartphone GPU's.

    This would allow software vendors to implement their video format of choice everywhere while making it able to play fluently everywhere where it matters!
    2
  • annymmo
    And being able to play video's fluently on computers with weak CPU's.
    1
  • blazorthon
    annymmoAnd being able to play video's fluently on computers with weak CPU's.


    What semi-modern computer has a CPU so weak that it can't play video? Even a single core Atom CPU can play video without trouble. I'd be more worried about old GPUs (such as older Atom netbook GPUs and other weak GPUs) not always being able to play modern video very well, not CPUs. Heck, even my almost ten year old laptop with an old P4 is GPU limited in video, not CPU limited.
    3
  • Yuka
    blazorthonWhat semi-modern computer has a CPU so weak that it can't play video? Even a single core Atom CPU can play video without trouble. I'd be more worried about old GPUs (such as older Atom netbook GPUs and other weak GPUs) not always being able to play modern video very well, not CPUs. Heck, even my almost ten year old laptop with an old P4 is GPU limited in video, not CPU limited.


    Prior to the HD3k, Intel wasn't able to play videos decently; only blocky and badly rendered pictures of something moving on the screen. Period.

    And no, unless the Atoms are on the ION platform, they can't play any video in more than SD format. Let alone apply filters for re-size.

    And to directly answer your question. Core2 Duos on laptops were not able to play videos decently and nothing before that was able to, where any iGPU from nVidia or AMD was able to prior to the C2D's in notebooks. I'm pretty sure in desktop was not that much different.

    Cheers!
    5
  • blazorthon
    YukaPrior to the HD3k, Intel wasn't able to play videos decently; only blocky and badly rendered pictures of something moving on the screen. Period.And no, unless the Atoms are on the ION platform, they can't play any video in more than SD format. Let alone apply filters for re-size.And to directly answer your question. Core2 Duos on laptops were not able to play videos decently and nothing before that was able to, where any iGPU from nVidia or AMD was able to prior to the C2D's in notebooks. I'm pretty sure in desktop was not that much different.Cheers!


    My GMA 950 IGP of my 2GHz Pentium-Dual Core computer (on-board IGP) from 2007 or so would disagree with you. It handles 720p excellently and 1080p well and even my Pentium 4 630 from my 2004 desktop can handle 1080p excellently once I gave it a Radeon 5450. It's CPU is only a 3GHz P4. My old Dell 2.4GHz P4 laptop with an Intel IGP (I'd have to check to make sure which one it is) can't handle 720p very well, but the CPU has not trouble with it, just the GPU. Heck, my Atom netbook (1.6GHz single core from around two years ago, I'd have to check the model to be sure of it's GPU and CPU model number) can play 480p just fine and 720p/1080p also don't tax the CPU much, just the GPU.

    My whole point is that weak CPUs have no trouble with video, only weak GPUs have trouble with video. You'd have to find an extremely slow CPU to be unable to watch video on it so long as the rest of the computer, such as the graphics, are good enough. Even low-end GPUs like my GMA 950 can handle video playback decently, so having a GPU should not be much of a problem except with extremely weak systems such as some Intel netbooks or a very old notebook/desktop without a decent video card.
    2
  • wiyosaya
    bgaimurhttp://www.streamcomputing.eu/blog [...] nceptions/CUDA is a dying breed.

    Maybe so, howerver, nVidia is supporting openCL with 301.42 drivers. IMHO, having nVidia cards benchmarked would be of interest to those of us who own nVidia cards.
    3
  • nebun
    bgaimurhttp://www.streamcomputing.eu/blog [...] nceptions/CUDA is a dying breed.

    that's why there are more CUDA apps out there....you are very wrong my friend....CUDA is and will be the better engine
    -5