What is CUDA? What about OpenCL and OpenGL and why should we deal with them? The answers to these questions are hard to define, but we will try to find a clear explanation in an easy to understand language.
There comes a time in the life of a video editor when he inevitably thinks about the basic questions: “Is that all the speed that is realizable? Are there no other possibilities? Like the search for the meaning of life or a great unified theory, this simple thought takes you into an endless and infinitely deep abyss of contemplation and research, until you inevitably encounter a question to which you simply don’t get a real answer.
We can’t help you with a great unified theory, but we can say that the wall of information you will eventually encounter in your quest for the speed of video processing will ultimately be due to: “What is CUDA? What is OpenCL and why should I deal with it?”
“In order to understand CUDA and OpenGL, you also need to be very much involved with OpenCL.
You can access many definitions on the Internet wikis, read forums on specific topics, and visit sites that maintain these standards, but you’ll still be confused. In this article, we want to shed light on the dark with a language that is as understandable as possible, but as mentioned above, you can only understand CUDA and OpenGL if you’re also familiar with OpenCL.
What is CUDA?
CUDA was developed by the graphics card manufacturer Nvidia and enables your programs to use the intelligence of your graphics card as a sub-CPU. Your CPU forwards certain tasks to the CUDA-enabled card. The graphics card specializes in processing things like lighting, movement and interaction as quickly as possible and even sending them across multiple tracks at once – as if you had four supermarket checkouts for a shopping basket. The results of this work are then returned to the CPU, which has now achieved larger and better results.
For programmers it is relatively easy to integrate. Since it is software-based, a large part of the system must be programmed into the program code so that its function can vary or be adapted. Since the main functionality of CUDA lies in calculation, data generation and image manipulation, the processing, rendering and export times of your effects can be significantly reduced, especially when upscaling or downscaling. Image analysis can also be improved, as can simulations such as flow dynamics and predictive processes such as weather patterns. CUDA is also ideal for light sources and raytracing. All this means that functions such as rendering effects, video encoding and conversion will be much faster.
So not everyone can use CUDA immediately. This only works with “CUDA-enabled” graphics cards. Since CUDA is owned by Nvidia, you will need a graphics card manufactured by this company. For example, if you have a Mac Pro PC, this is simply not an option for you, as they only come with AMD graphics cards. There are third-party options, but Apple only ships AMD in their packages. You’ll also find that fewer applications support CUDA than its alternative, so let’s talk about this other option.
What is OpenCL?
OpenCL is a relatively new system and can be considered an alternative to CUDA for our discussion. However, it is an open standard – which means that anyone can use their functionality in their hardware and software without paying for proprietary technologies or licenses. While CUDA uses the video card for a co-processor, OpenCL shares the information completely and uses the video card as a separate universal peer processor. It is a small philosophical distinction, but in the end there is a quantifiable difference. For the programmer, it is somewhat more difficult to program. As a user, you are not tied to a single vendor, and support is so widespread that most programs don’t even mention its use.
What is OpenGL?
OpenGL is really the beginning of the story. It’s not about using the graphics card as a universal processor. Instead, it’s simply about drawing pixels or vertices on the screen. It’s the system that allows your graphics card to create 2D and 3D displays for yours much faster than your CPU. As CUDA and OpenCL are alternatives to each other, OpenGL is an alternative to systems like DirectX on Windows. Simply put, OpenGL draws everything very quickly to your screen, OpenCL and CUDA process the necessary calculations when your videos interact with your effects and other media. OpenGL can place your video in the editing interface and play it, but if you apply color correction to it, CUDA or OpenCL will perform the calculations to correctly change every pixel of the video.
OpenGL can be implemented at the hardware level, so programmers don’t have to include the code in their program, they just have to invoke it. In addition, hardware manufacturers have the option to extend the core functionality with extensions, which means that some hardware may be better than others for certain tasks. This allows a very specific customization.
Where the user will see the benefits of OpenGL is in the operational performance of the software. Previews are displayed particularly quickly. In many programs it is also used for accelerated interfaces and overlays such as timelines, film footage, windows, grids, guides, rulers and boundary frames.
Finally, OpenGL is not an issue for the user, since both OpenCL and CUDA can and want to use the OpenGL system. What you need to understand here is that if you have a graphics card with the latest OpenGL support, you will always work faster than on a computer with CPU and integrated graphics.
To the point.
What does all this mean for you and your workplace? What’s better – CUDA or OpenCL? We assume that you have taken the first step and reviewed your software and that everything you use supports both options. If you have a Nvidia card, then use CUDA. It is usually considered faster than OpenCL. Also note that Nvidia cards support OpenCL. The general consensus is that they are not as good at it as AMD cards, but they are getting closer and closer. Is it worth buying a Nvidia card just for CUDA support? This would depend on too many specific case factors that we couldn’t consider here. You need to specify your needs and do your research. Not only what kind of work your company does, but also the individual machine and its workload and function. You should also plan an intensive test phase before purchasing.
Adobe, for example, explains on the company’s homepage that, with a few exceptions, everything CUDA does for Premiere Pro can also be done by OpenGL. It is also explained that it does not use either encoding or decoding. However, they can be used for rendering previews and final exports. The majority of those who compared the two seem interested in CUDA being faster with Adobe products. CUDA has the advantage of being self-contained, which can lead to faster performance through better optimization.
We would also like to take this opportunity to communicate our personal experiences in this article. Please note, however, that we have not carried out any concrete tests. We speak exclusively for ourselves. It is our experience that CUDA, if available, works excellently and can really noticeably increase the working speed. However, we must also point out a few crashes or malfunctions during rendering, transcoding and exporting. We also ran out of options on a few rare occasions and switched off CUDA, which eventually led to a successful result. We’ve never had to do the opposite. We have to add restrictively that our working time with CUDA was also very limited. We have experienced these problems when using with more than one program, so it might be due to an outdated version of CUDA. I just found it important enough to mention that you should pay attention to such things. That’s why we don’t want to make a recommendation for one or the other option here.
If you are able to figure out whether your graphics card or your entire system is slowing down your workflow, then you have a good chance that upgrading to a new card can bring a huge improvement compared to what you’re currently working with. A good understanding of these technologies will help you understand where to start to make your jobs as effective as possible. If you invest in a card that supports the use of the GPU to complement or relieve the CPU, your workflow will be greatly accelerated.
Thank you for your visit.