These libraries were created to allow me to run my own personal experiments
with Theora.
They are not currently part of the official Theora distribution.
Although they are based upon the VP3.2 and Theora source, which as of the time
of this writing serve as the only complete documentation of the VP3 and Theora
formats, they were written from scratch.
Decoder:
The decoder here is feature-complete, up to and including all planned bitstream
features for the initial Theora release.
Some of these are not yet present even in the reference decoder. This decoder
is strictly better than the reference decoder - it is both more complete, more
secure, and faster.
These include:
- Support for non-VP3 style quantization matrices (i.e., complete support for
the additional flexibility added to the quantization matrix specification).
- Support for additional pixel formats: 4:4:4 and 4:2:2 (in addition to the
4:2:0 format supported by VP3).
- Support for block-level qi values.
Additional features of the new library design:
- Improved API design.
Internal structures are hidden better, making it easier to upgrade the
library and maintain binary compatibility.
Generic ioctl-style API allows some encoder and decoder parameters to be
modified on the fly, and provides a route of future extensibility.
Additional minor improvements.
- The decoder library is completely separated from the encoder library, so
applications need only link against the portions they use.
- Hardened against invalid video data.
Special attention has been paid to eliminate possible buffer overflows and
access violations when receiving invalid video data, for better security.
- A backwards-compatibility API wrapper, for applications that use the older
libtheora API.
Algorithmic optimizations:
- DCT token and motion vector decoding have been optimized to use fewer calls
to oggpackB_read().
- All DCT tokens are decoded in an initial pass.
This allows us to buffer the tokens, instead of the complete set of DCT
coefficients, yielding a reduced memory footprint and increased cache
coherency.
- Striped decoding API.
After the tokens are decoded, the remaining steps are pipelined and clients
receive decoded frame data as soon as it is available, while it is still in
cache.
Currently missing features:
- Advanced buffering API: Client-specified buffers.
Clients could provide external buffers to decode into when out-of-loop
post-processing is enabled (if it isn't enabled, a copy has to be done
anyway).
Encoder:
The encoder is highly experimental.
It currently generates bitstreams using ALL of the decoder features supported
above.
There are still a few outstanding bugs, and the HVS model is very experimental.
The encoder is not built by default.
Compatibility Layer:
theora-exp comes with a compatibility layer for libtheora so it can be used
as a drop in replacement(only decoding right now). To do so, just change your
pkg-config call from "theora" to "theoracompat"
Building:
On Unix or Cygwin, building through automake is now supported.
On a fresh checkout, run:
./autogen.sh --enable-encode
From a distribution tarball, run:
./configure --enable-encode
Then run:
make
make install
For Windows, MSVC++ 6 project files are provided.
A simple GNU Makefile is also provided.
Edit to taste.
This will likely disappear in a future version.