[theora-dev] Bitstream encoded huffman tables always the same

Gabriel TEIXEIRA gabriel_teixeira at sdesigns.eu
Fri Dec 10 08:43:27 PST 2010

On 10/12/2010 17:05, Timothy B. Terriberry wrote:
>> figure myself who is calling it using what parameter. Is that true that
>> libtheora will always set the huffman codes to the same ones? Isn't this
> Unless the user manually overrides them, yes. There is a rehuff example
> in http://svn.xiph.org/trunk/theora-exp/examples/ which can be used to
> compute optimized tables for a specific video file, after encoding. It
> typically saves between 1-2% in file size.
> We have long planned to update the default tables as part of the 1.2
> release, but initial experiments (back in 2007 with the old 1.0 encoder)
> found that using insufficient training data (in that case 4 400-600
> frame 1080p sequences) produces tables that are significantly _worse_,
> on average, when used on files that were not in the training set. Greg
> Maxwell thinks he can do better now, and we have more training data than
> we did then, but improvements have yet to be demonstrated.
> _______________________________________________
> theora-dev mailing list
> theora-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/theora-dev
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. 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.

Thanks for the information

More information about the theora-dev mailing list