[theora-dev] Bitstream encoded huffman tables always the same
Benjamin M. Schwartz
bmschwar at fas.harvard.edu
Fri Dec 10 08:55:21 PST 2010
On 12/10/2010 11:43 AM, Gabriel TEIXEIRA wrote:
> It is shame that Theora can't make use of the full potential of the
> bitstream, but I think that a two pass encoding would do it: the first
> to generate the symbols after fDCT/quantization and generate statistics
> and a second to generate the optimal tables and encode the huffman
> symbols.
This is definitely true (and if you really care you can compile rehuff).
The rationale I have heard for not making this part of the default is that
it breaks concatenation.
Currently, if you take any two videos encoded by the same libtheora, with
the same parameters, those two video can be concatenated into a single
Theora bitstream because they have identical Theora headers. If the
Huffman tables were changed for optimized for each video, this would
prevent such concatenation.
> Since the only way to change those tables is by downloading a
> file from the theora experimental branch and setting by hand the option,
> I think that 99% of the videos in the wild must be using the hard-coded
> tables. This saves me a lot of work.
To be clear: a correct player MUST use the tables provided by the file, or
it will frequently break. This will be even more apparent when libtheora
1.2 is released, as the hardcoded tables are expected to be different from
the tables in 1.1.
--Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20101210/d1ea5148/attachment.pgp
More information about the theora-dev
mailing list