Hacker News new | ask | show | jobs
by femto 6 days ago
It's worth noting that most communications specifications that involve an encoder/decoder pair communicating over a channel only specify the encoder. Standards purposely leave the decoder open to allow systems to progress as technology develops and to allow competition between implementations. This also makes a standard simpler, as a decoder is usually more complex than an encoder since it has to deal with noise and other effects introduced by the channel. Consequently, implementing a competitive standards compliant decoder involves R&D and is not a case of following a predefined path.

I've always seen Bellard as an engineer who programs rather than a pure programmer.

1 comments

It is exactly the opposite for MPEG, which only specifies the decoder (i.e. how frames should be decoded).
The concept is similar, in that with MPEG it is the encoder that is the harder of the two, since it has to deal with the noise and real-world effects in the source image.

What I should have written is that the "hard" part, which is generally left unspecified, is the part that removes redundancy. An MPEG encoder removes redundancy whilst its decoder adds redundancy. An FEC/communications encoder adds redundancy whilst its decoder removes redundancy.

It's not really about difficulty (although encoding is definitely far more difficult), it's about there being multiple valid encodings.

If you have two red boxes on a black background in one frame, and a single red box in the middle on the next, UIUI there are at least two ways to encode this: "left box moved right a bit; right box disappears" and "right box mounts left a bit; let box disappears".

In a complex scene, there is a huge space of possible ways to encode a frame that give identical outputs, and even more that are lossy. Choosing one that compresses well but is visually similar (and not too slow to find) is a quality issue for the codec. It wouldn't make sense to specify the algorithm for that in the spec.

I agree. We are in danger of arguing about semantics/language, despite the effects of the words we are using being the same. I guess that's why Information Theorists use mathematics over words.
Maybe they meant encoding, the file format.
But that only specifies the decoder.

The format for all modern video codecs is not the kind of format where any specific piece of uncompressed input should always be encoded the same way, but more like a very restricted programming language that gives the encoder a lot of tools to compress the video, and which tools they use and how they use them are up to them.

I think it's neither the encoder nor the decoder that's specified but rather the encoding ie the bitstream format. At least for video streams building a competitive encoder is far more difficult than the corresponding decoder.