[theora-dev] Bitstream encoded huffman tables always the same
gabriel_teixeira at sdesigns.eu
Fri Dec 10 09:00:22 PST 2010
On 10/12/2010 17:55, Benjamin M. Schwartz wrote:
> 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
> 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.
By hand, I mean, is to use the the tool separately in order to obtain
the optimal encoding, and not automatically by libtheora. This is just a
sugestion of feature for libtheora for the future.
And, don't be afraid of not implementing the parsing of the tables, they
will be developed, but not by me ;-)
More information about the theora-dev