Question / Help OpenCL + x264 preset = ???

z0rz

Member
I don't really know anything about OpenCL, so I was just wondering how it coexists with x264 presets. If you use a slower preset with OpenCL enabled, is the extra load of the slower preset placed on the CPU or the GPU?

If the extra load goes to the CPU, it seems like you could run slower presets with the extra room you get from offloading some encoding to the GPU. Assuming that's true and you have a powerful enough GPU, is this a viable way to improve output quality with little/no impact? Or does OpenCL suffer enough loss in quality to make it a moot point?
 

Kharay

Member
If you enable OpenCL and then use a slower preset, most of the additional load is not placed on the GPU. As it stands, OpenCL in x264 has a fairly limited task. I have high hopes that eventually more can be offloaded to the GPU but at the moment it's not at all much. Saves me about 5% on my i5 760, not at all a monster CPU. So, imagine how little it saves on monster CPUs.

So, is it a viable way to improve quality with little to no impact? No, not really. It might be at some point but, not right now.

One other point -- Enabling OpenCL does not cause any kind of additional quality loss. It is not QuickSync, it's OpenCL. In fact, several people have in fact claimed they felt it increased quality. Although I find that unlikely as well. But, I use it and the quality I record in/stream at is just fine.
 

Momentum

Member
It may be promising in the future, maybe they find a way to offload some work from CPU to GPU, but i feel it will only do good in not so graphically intense games, like LoL since in high motion and high graphic games like some newer FPS's, GPU could be too busy rendering the game to be useful for encoding work...
 

Kharay

Member
Well, that all depends on the game's settings really; it doesn't take a whole lot of tuning down to free up enough GPU time to get away with OpenCL there.
 

z0rz

Member
I recall reading somewhere that OpenCL could cause a slight decrease in quality (nowhere near as bad as Quick Sync), but I must have misread. I should probably do some quality comparisons with the presets to see if this is even worth the trouble haha

As far as it being less useful in graphics intensive games, I think that's the point. Encoding is already very taxing on the CPU, and if you play a CPU intensive game with low graphics requirements, why wouldn't you want to free up some CPU resources by offloading to the GPU? It's not a blanket option that everyone should be using, but it's definitely something that should be explored and hopefully improved.
 

Kharay

Member
Hey, I'm all for more people enabling OpenCL. If for no other reason than to have more (possible) feedback for both the OBS developers as well as the x264 developers. To help improve on x264's OpenCL implementation.
 
Top