Evaluating codec freedom

I was recently asked about how free the Vorbis and Theora codecs are, particularly with respect to gratis versus libre. The answer to this question is more complicated than it looks and requires a deeper look into the difference between a specification and an implementation.

Specifications and implementations: definition

Generally codecs (and in fact, all file formats) have both a specification and implementations. Here’s what these terms mean:

The specification is a human-language document which describes what a valid set of bits for the given codec or file format looks like. For example, a section of a specification for the ASCII printable characters might look like this: “A is represented by the seven bits 1000001, B by 1000010, continuing up to Z, represented by 1011010”. Specifications generally do not define how one is supposed to implement them, only what the result of running the implementation should look like.

An implementation is a series of instructions, usually described in a computer language, that when executed will produce or interpret a set of bits compatible with the specification. For example, part of an ASCII reader (decoder) might look like this: “if the set of bits is 1000001, print A; if the set of bits is 1000010, print B”, etc. There are often many implementations of a given specification. However, there is usually only one specification for a given file format or codec to ensure that everyone agrees on what that file format or codec should look like.

Potential legal restrictions on specifications and implementations

Both specifications and implementations are considered copyrightable. Furthermore, implementation details are considered patentable because they may constitute an invention (and most jurisdictions recognize software patents). So there are several ways in which the codec, through its specification and implementations, could be restricted.

How free are Ogg, Theora, and Vorbis?

For Ogg, Theora, and Vorbis, the specifications are released under a mostly free license: “Anyone may freely use and distribute the specification, whether in a private, public or corporate capacity.” (see the Vorbis specification) I say “mostly” because it’s unclear whether derivative works are allowed so a conservative interpretation of the license would liken it to a Creative Commons Attribution-No Derivative Works license. If you don’t consider the ability to make a derivative specification important, then the Ogg, Theora, and Vorbis specifications are free (“libre”) for all intents and purposes. Furthermore, the specifications are available for free on the Xiph.Org web site so they are both “gratis” and “libre” (subject to my previous sentence).

The Xiph.Org Foundation has also released implementations of Ogg, Theora, and Vorbis under a BSD-style license on their web site. So as far as copyright is concerned, at least one implementation of Ogg, Theora, and Vorbis (the Xiph.Org implementation) is free (“gratis” and “libre”).

With respect to patents, the Xiph.Org Ogg, Theora, and Vorbis implementations are about as free as you can get. Xiph.Org has negotiated an irrevocable free license for all patents it knows about that the implementations might use. For more details on why this might not be totally free, see the “Patent system failures” section of The codec dilemma.

The patent distinction and why it’s important

An important difference between specifications and implementations is that you can’t patent a specification itself, you can only patent implementation details that the specification relies on. This is because a specification by itself is not useful to the end user. I can’t watch a Theora video with only the Theora specification just like I can’t use a Robertson screw with only the Robertson screwdriver specification. I need an implementation of the specification (such as a Theora decoder or a Robertson screwdriver) to make it useful to me.

You may wonder why free software developers don’t just implement specifications without using any known patents. That’s because sometimes it’s not possible. In the case of H.264, some parts of the specification must be implemented using known patented techniques because there is no other way to implement them that we know of. As a result, many people refer to the H.264 specification itself as “patented”. This simplification can be useful as a short-hand, but it is technically not quite correct.

H.264 and Theora: different levels of freedom

As an example of how specifications can be more or less free, consider H.264 and Theora. The H.264 specification is available without charge so H.264 is “gratis” in the sense that you can get the spec for free. Also, there are several free software implementations of H.264, including the FFmpeg and x264 implementations, which are “libre” and “gratis” in the sense that the license allows you to redistribute and change them and you can download them for free. However, the patent laws of most countries make this redistribution illegal without paying patent-holders so these implementations are ultimately neither “libre” nor “gratis”. Since the Xiph.Org Theora implementation is not known to violate any patents and is freely released under a libre license, it is both “libre” and “gratis” with respect to its license and with respect to patent laws (as far as we know). Thus we can also consider the Theora specification royalty-free because a free implementation does not violate any patents that we know of.

Conclusion

Determining the level of freedom a particular codec provides is a complicated process. Theora and Vorbis are free (“libre” and “gratis”) in the sense that the specification is freely available and redistributable (though perhaps not entirely “libre” as it might not be freely modifiable), the Xiph.Org implementation is freely available, modifiable, and redistributable, and the Xiph.Org implementation does not violate any patents as far as we know. In general, a codec’s freedom should be evaluated according to the licenses under which its specification and implementations are released, and whether there are legal restrictions such as patent violations that would prevent codec implementations from being used freely.

If you have any questions or concerns about this article, please comment on the post.

2 Responses to “Evaluating codec freedom”


  • Thanks for the detailed explanation. I will keep this for reference when future codec discussions come up.

  • Adam C. Sieracki

    The ultimate solution to this is, when sued for ‘patent infringement’, to CRIMINALLY charge the plaintiff[s] with extortion. Better yet, get a military, or state security/police agency to do this (as open source software users). Lawsuits whither away REAL FAST, when criminal charges come up.

Leave a Reply