Remix.run Logo
sitkack 8 days ago

You continue to make the same unsubstantiated claims about codecs being hard and expensive. These same tropes were said about every other field, and even if true, we have tens of thousands of folks that would like to participate, but are locked out due to broken IP law.

The firewall of patents exist precisely because digital video is a way to shakedown the route media would have to travel to get to the end user.

Codecs are not, "harder than" compilers, yet the field of compilers was blown completely open by GCC. Capital didn't see the market opportunity because there wasn't the same possibility of being a gatekeeper for so much attention and money.

The patents aren't because it is difficult, the patents are there because they can extract money from the revenue streams.

mike_hearn 8 days ago | parent [-]

Codecs not harder than compilers? Sounds like an unsubstantiated claim!

Modern video codecs are harder than compilers. You have to have good ASIC development expertise to do them right, for example, which you don't need for compilers. It's totally feasible for a single company to develop a leading edge compiler whereas you don't see that in video codecs, historically they've been collaborations.

pornel 8 days ago | parent | next [-]

(I've worked on both codecs and compilers. You may be underestimating the difficulty of implementing sound optimizers).

Hardware vendors don't benefit from the patent pools. They usually get nothing from them, and are burdened by having to pass per-unit licensing costs on to their customers.

It's true that designing an ASIC-friendly codec needs special considerations, and benefits from close collaboration with hardware vendors, but it's not magic. The general constraints are well-known to codec designers (in open-source too). The commercial incentives for collaboration are already there — HW vendors will profit from selling the chipsets or licensing the HW design.

The patent situation is completely broken. The commercial codecs "invent" coding features of dubious utility, mostly unnecessary tweaks on old stuff, because everyone wants to have their patent in the pool. It ends up being a political game, because the engineering goal is to make the simplest most effective codec, but the financial incentive is to approve everyone's patented add-ons regardless of whether they're worth the complexity or not.

Meanwhile everything that isn't explicitly covered by a patent needs to be proven to be 20 years old, and this limits MPEG too. Otherwise nobody can prove that there won't be any submarine patent that could be used to set up a competing patent pool and extort MPEG's customers.

So our latest-and-greatest codecs are built on 20-year-old ideas, with or without some bells and whistles added. The ASICs often don't use the bells and whistles anyway, because the extra coding features may not even be suitable for ASICs, and usually have diminishing returns (like 3x slower encode for 1% better quality/filesize ratio).

mafuy 8 days ago | parent | prev [-]

With all due respect, to say that codecs are more difficult to get right than optimizing compilers is absurd.

The only reason I can think of why you would say this is that nowadays we have good compiler infrastructure that works with many hardware architectures and it has become easy to create or modify compilers. But that's only due to the fact that it was so insanely complicated that it had to be redone from scratch to become generalizible, which led to LLVM and the subsequent direct and indirect benefits everywhere. That's the work of thousands of the smartest people over 30 years.

There is no way that a single company could develop a state of the art compiler without using an existing one. Intel had a good independent compiler and gave up because open source had become superior.

For what it's worth, look at the state of FPGA compilers. They are so difficult that every single one of them that exists is utter shit. I wish it were different.

mike_hearn 8 days ago | parent [-]

> There is no way that a single company could develop a state of the art compiler without using an existing one. Intel had a good independent compiler and gave up because open source had become superior.

Not only can they do it but some companies have done it several times. Look at Oracle: there's HotSpot's C2 compiler, and the Graal compiler. Both state of the art, both developed by one company.

Not unique. Microsoft and Apple have built many compilers alone over their lifespan.

This whole thing is insanely subjective, but that's why I'm making fun of the "unsubstantiated claim" bit. How exactly are you meant to objectively compare this?

mafuy 5 days ago | parent [-]

I've searched for some performance comparisons between Graal and equivalent GCC programs and it seems like Graal is not quite at the same level - unsurprisingly, it is probably more concerned with avoiding boxing than optimal use of SIMD. And as much as I love Roslyn, which is/was a Microsoft thing: it has the same issue. It only recently got serious about competing with C, and that's years after it was open sourced.

mike_hearn 4 days ago | parent [-]

Well, Graal is designed to compile Java and dynamic scripting languages, not C. Its flexibility means it can also compile C (=LLVM bitcode), but that's more of a tech demo than something they invest into.

I don't quite get your point though. Mine was only that it's common for single companies to develop multiple independent state of the art compilers, whereas after the 1990s video codecs tend to be collaborations between many companies. That's a piece of evidence that codecs are harder. But this is all quite subjective and I don't really care. Maybe compilers are actually harder and the trend to collaboration in video is just a cultural quirk of that subfield - doesn't really matter. The starting point of the thread was a belief that if MPEG didn't exist video codecs would have all been 100% free right from day one and I just don't see any evidence for that. The competition to MPEG in the 90s was mostly Sorensen and RealVideo if my fading memories aren't too garbled. Although the last version of Sorensen Spark was apparently a tweaked version of H.263 according to Wikipedia.