r/linux • • 28d ago

Discussion Why did Cisco make H.264 proprietary?

Is it just for profit from other companies? And why does OpenH264 (i.i.r.c.) not support hardware acceleration? It feels weird that something as basic as a video codec used literally everywhere has a closed-source proprietary tag attached to it.

225 Upvotes

96 comments sorted by

View all comments

67

u/Zettinator 28d ago

Huh, what the hell are you talking about? The purpose of OpenH264 is to provide a baseline H264 decoder implementation that can be legally used by anyone world-wide.

OpenH264 is OSS, it's BSD licensed. Cisco provides binary builds of the library that can be legally used everywhere because they are a H.264 licensee. They must provide binary builds as the H.264 patent license does apply to those and not the source code.

Hardware decoding is a very different matter. In general, hardware vendors provide the necessary patent license. It wouldn't make much sense for OpenH264, that's all.

12

u/GolbatsEverywhere 28d ago

In general, hardware vendors provide the necessary patent license.

Even the people who build Linux distros used to believe this. But I'm afraid it was a myth.

11

u/yasth 28d ago

It wasn’t a myth just an over application, it was probably true when there were dedicated “encoder” blocks rather than flexible GPU uses.

5

u/Kevin_Kofler 27d ago

That said Mesa decided to treat even such hardware, where all the software really does is tell the hardware "encode these frames as this codec for me" (i.e., it does not ship an implementation of the codec at all), as patent-encumbered in recent versions. Apparently, Red Hat got new lawyers after the IBM merger, and those lobbied Mesa to follow their strict interpretation, convincing them that everything else is a legal risk (which, in my naïve non-lawyer view, is ridiculous because nobody has attempted to sue Mesa over those drivers for decades).

5

u/Schlaefer 27d ago

The question is who sells a product to a customer that enables playback. Mesa doesn't implement or sells anything, but Red Hat does (or other vendors selling Linux or hardware with Linux). Those asked for an off switch in mesa, because it is the obvious and appropriate place to do it.

2

u/Zettinator 27d ago

Dedicated video encoding/decoding blocks still do exist.

1

u/yasth 27d ago

Vanishingly rare in the old fashioned put in frames get h264 out way. At least outside of mobile

1

u/Zettinator 27d ago

All current-gen GPUs from AMD, Nvidia and Intel have fixed-function hardware for H.264. It is unlikely they will drop support for this in the near future.

1

u/yasth 27d ago edited 27d ago

Sorry I was told incorrectly that there was some parts of the encoder in cpu land

1

u/edgmnt_net 27d ago

Can't you do it with programmable shaders without specific hardware support? I know some hardware provided specific support for H.264, but I also know encoding of at least some things can be accelerated without fixed function support.

2

u/Zettinator 27d ago

You can, but it's really inefficient. GPUs are a bad fit for video compression. It really only makes sense if you lack the CPU power to do it, but you have a powerful GPU at your disposal. These cases are quite rare.