Why does GPGPU still suck so bad?

ShawnD1

Lifer
May 24, 2003
15,987
2
81
Doing Blu-Ray rips takes a hell of a long time, so I started to look for programs that use the GPU. As it turns out, there's nothing. They all seem to be horribly broken. Why is this? Didn't Badaboom come out in 2008? That's about 4 solid years of GPU encoding, and the general concept still doesn't work. Can someone please explain why the situation is so broken?

Article showing how pathetic these programs are:
http://www.extremetech.com/computing/128681-the-wretched-state-of-gpu-transcoding
 

Imouto

Golden Member
Jul 6, 2011
1,241
2
81
I think I remember some x264 dev saying that GPUs ain't suited for video encoding at all.

Anyway if you want to do any good encoding you will need to do a lot of research and ditch crappy software away.
 

ShawnD1

Lifer
May 24, 2003
15,987
2
81
I think I remember some x264 dev saying that GPUs ain't suited for video encoding at all.
Did they give an explanation? A GPU is just another processor. It does math. Folding@Home manages to use the GPU for math, and it works very well. What is it about video encoding that makes it so hard to do 1 + 1 = 2?


Anyway if you want to do any good encoding you will need to do a lot of research and ditch crappy software away.
I'm not really concerned with good encoding. I just want temporary encoding. My DVD library is ripped as decrypted versions of the original stuff with no tweaking. I can't be putting bloated 5gb files on an iphone, so I encode something to maybe 500mb. After watching it, the encoded file is deleted.
 

Imouto

Golden Member
Jul 6, 2011
1,241
2
81
Encoding isn't number crunching. Modern encoding software like x264 have a hell of complex calculations, different modules and other stuff that are better suited for a CPU. You can take it as CPU being a supersmart guy that can do a lot of different works pretty well and GPU as an army of amoebas that can do a simple work very fast because of its amount.

DVD encoding with no upscaling, fancy filters and other stuff should take next to no time in a modern CPU.

If we are talking about Bluray you should downsize it to DVD res or 720p and would take just a bit more than DVD.

I'm pretty sure you're trying to make it the easy way. I did a lot of encoding myself and a Q6600 is already really fast for phone suited video.
 

LoveMachine

Senior member
May 8, 2012
491
3
81
Did they give an explanation? A GPU is just another processor. It does math. Folding@Home manages to use the GPU for math, and it works very well. What is it about video encoding that makes it so hard to do 1 + 1 = 2?



I'm not really concerned with good encoding. I just want temporary encoding. My DVD library is ripped as decrypted versions of the original stuff with no tweaking. I can't be putting bloated 5gb files on an iphone, so I encode something to maybe 500mb. After watching it, the encoded file is deleted.

A GPU in NOT just another processor. It does perform calculations, but it is somewhat limited as to the type of calculations it can do efficiently. "Good" encoding is a rather complex algorithm, and certain portions of it are suited to GPUs, and others aren't. On a 2 pass encode, from my understanding, the GPU is good at look-ahead evaluation of the video information, but the CPU is still better at ensuring that quality isn't lost in compression in the 2nd pass.
 

MrK6

Diamond Member
Aug 9, 2004
4,458
4
81
As mentioned, GPU's just don't have the architectures for encoding. I agree that GPU's horsepower can be used for a lot more, but because things are very UNunified with both hardware and software, it's difficult to make progress. I also agree that encoding is still extremely slow considering the hardware capabilities we have today. Some of my DVD projects still take over 24 hours to finish with my CPU at 5GHz, and I have a pretty refined process. It is what it is until someone invests the time and capital to improve it.
 

notty22

Diamond Member
Jan 1, 2010
3,375
0
0
You could try Airvideo app for Ipad/Iphone. You set up airvideo server on your computer and it transcodes on the fly and sends your video to your Ipad via wifi router. Works great, I only play with the free version. It lets you try functionality, but won't let you select certain sub-folders in the free version.
Over internet streaming also.
http://www.inmethod.com/air-video/index.html
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,603
4,521
75
A GPU in NOT just another processor. It does perform calculations, but it is somewhat limited as to the type of calculations it can do efficiently.

Let me make an analogy here. A CPU is like one guy with a big workshop. He has lots of space and lots of tools to do almost anything, and almost everything he needs is at most a few steps away. Technically, sometimes he has to go to the library next door (main memory), but not often.

A GPU is not like this at all. It's more like a cubicle farm in an office building. There are lots of workers, but they only have a tiny space to work in. If the stuff they're working on doesn't all fit in the cubicle at once, they have to take stuff up and down the elevator to the library in the basement (GPU memory). If multiple workers are working on the same stuff at the same time, and working in the same part of the library, they can often share the elevator, which speeds things up, but not as much as just staying in the cubicle. Even worse, if they want to work with the workshop (CPU), library workers have to cart stuff from the library (main memory) onto a bus (the PCI Express), and haul it down the street to the basement library (GPU memory), and then haul stuff back again.
 

Midwayman

Diamond Member
Jan 28, 2000
5,723
325
126
DVD fab uses both gpu and igp acceleration. At least for DVDs. Not sure on their blueray.
 

ViRGE

Elite Member, Moderator Emeritus
Oct 9, 1999
31,516
167
106
I would note that the Extremetech article in question is effectively a year out of date. All of the major players have effectively given up on GPGPU powered video encoding. Video encoding is primarily a serial process that has continued to map poorly to the capabilities of GPUs.

This is why everyone now integrates a fixed function H.264 encoder. QuickSync (Intel), NVENC (NVIDIA), and the Video Codec Engine (AMD), all of which work rather well for the tasks they were designed for.

Anyhow, with the latter two encoders only being introduced roughly a year ago, this is why the Extremetech article is out of date. Any kind of commercial video encoding software these days will either use these fixed function encoders, or do most of the work in software.
 

Deltaechoe

Member
Feb 18, 2013
113
0
0
There is a distinct difference between CPU and GPU computation, CPUs are great at doing complex computation, it's like you have a few really smart guys doing it. By contrast GPUs are like a massive cluster of simple people who are only capable of much simpler calculation, albeit at a MUCH higher level of parallelism.
 

Carfax83

Diamond Member
Nov 1, 2010
6,841
1,536
136
So the double precision capabilities in modern GPUs doesn't help with the encoding process at all?
 

KingFatty

Diamond Member
Dec 29, 2010
3,034
1
81
Interesting about the dedicated hardware encoders used in the video card. With that recent introduction, it really does make the article above seem obsolete. I guess it's yet another bonus reason for people to upgrade their video card, at least I know this makes me feel a little more comfortable about upgrading. Also makes sense that any software programs for video conversion would be silly not to simply utilize the hardware encoder of the video card, instead of trying to cook up their own solution using the GPU shaders or something.

Here is some more info from Techreport http://techreport.com/review/22192/amd-radeon-hd-7970-graphics-processor/5

AMD has cooked up a new acronym for the encoder, VCE or Video Codec Engine. Like the QuickSync feature of Intel's Sandy Bridge processors (and probably the SoC driving the smart phone in your pocket), VCE can encode videos using H.264 compression with full, custom hardware acceleration. We're talking about hardware purpose-built to encode H.264, not just an encoder that does its calculations on the chip's shader array. As usual, the main advantages of custom logic are higher performance and lower power consumption. Tahiti's encode logic looks to be quite nice, with the ability to encode 1080p videos at 60 frames per second, at least twice the rate of the most widely used formats. The VCE hardware supports multiple compression and quality levels, and it can multiplex inputs from various sources for the audio and video tracks to be encoded. Interestingly, the video card's frame buffer can act as an input source, allowing for a hardware-accelerated HD video capture of a gaming session.

AMD plans to enable a hybrid mode for situations where raw encoding speed is of the essence. In this mode, the VCE block will take care of entropy encoding and the GPU's shader array will handle the other computational work. On a high-end chip like Tahiti, this mode should be even faster than the fixed encoding mode, with the penalty of higher power draw.

Unfortunately, software applications that support Tahiti's VCE block aren't available yet, so we haven't been able to test its performance. We fully expect support to be forthcoming, though. AMD had reps on hand from both ArcSoft and Sony Creative Software at its press event for the 7970, in a show of support. We'll have to revisit VCE once we can get our hands on software that uses it properly.
 

Imouto

Golden Member
Jul 6, 2011
1,241
2
81
Some of my DVD projects still take over 24 hours to finish with my CPU at 5GHz, and I have a pretty refined process. It is what it is until someone invests the time and capital to improve it.

You're doing some placebo stuff there because even the slowest among the slow filters and encoding settings can't make a DVD encode last more than 24 hours with a highly overclocked modern CPU. I can almost encode my 1080p gameplays realtime with my Q6600@3Ghz.