View Full Version : Explain like I'm 5: Hardware Encoding
Spades45
12th January 2018, 21:01
I'm curious about how hardcore encoding works. In what ways is it similar to, and in what ways is it different from software encoding?
Does the chip use settings like we do when we encode a video -- could hardware encoded h.264 be --stitchable with software encoded h.264 for example?
LoRd_MuldeR
12th January 2018, 21:53
Simply put, CPU's provide awesome flexibility: Any algorithm you can ever think of can be implemented "in software" and then run on a stock CPU.
But this flexibility comes at a cost! Because CPU's only implement a set of "standard" (arithmetic, logic, etc. pp.) operations directly in the silicon, complex algorithms - such as video encoding - need to be spliced together from zillions and zillions of those simple "standard" operations. That is what "implement in software" really means. So, while CPU's are very flexible, they also are not very efficient for a highly specific task - such as video encoding.
Now, imagine you could design a chip for the sole purpose of running one specific algorithm - such as video encoding. This kind of chip, known as ASIC (application-specific integrated circuit), can be made extremely efficient (for its specific task), because all of the complex algorithms are implemented directly in the silicon. But, because those algorithms are now "hardwired" in the silicon, an ASIC has zero flexibility. That's pretty much what "hardware encoding" means ;)
Finally, GPU's are somewhere in the middle between CPU's and ASIC's. GPU cores are much more simple/limited than CPU cores, but a GPU generally has MUCH more compute cores than a CPU. This makes GPU's well-suited for "massively parallel" computations - which, of course, includes 3D rendering, but (at least in theory) also video encoding. Offloading the video encoding (usually only partly!) to the GPU is sometimes called "hardware encoding" as well.
(This explains why "hardware encoders" run so extremely fast, compared to "software encoders", but at the same time do not provide the "sophisticated" options and tweaks that we are used to from software encoders like x264 or x265)
Motenai Yoda
14th January 2018, 13:54
LoRd_MuldeR wrote right but you have to discriminate between hw accelerate encoding using ie cuda opencl and direct3d which are basically general purpose instruction sets executed by gpus and hw based encoding, a fixed algorithm intergrated in a dedicate hw of gpus like nvenc quicksync and amd amf
raffriff42
15th January 2018, 00:42
>Explain like I'm 5
One must explain such things to a five-year-old in terms of "NED" or "nearest equivalent dinosaur."
A CPU is a Tyrannosaurus Rex, and a GPU is a pack of Velociraptors. :)
feisty2
15th January 2018, 05:15
>Explain like I'm 5
One must explain such things to a five-year-old in terms of "NED" or "nearest equivalent dinosaur."
A CPU is a Tyrannosaurus Rex, and a GPU is a pack of Velociraptors. :)
that's the kinda explanation for 5 yrs old kids in 80s
I'd make it like
cpu, slay queen
gpu, bunch of basic bitches
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.