Last modified: 2008-08-21 16:49:06 UTC
Created attachment 5159 [details] Proposed patch to implement quantization-matrices setup according to Theora spec The current incarnation of jheora, the Java Theora decoder used in Cortado, is hardcoded to only support the quantization setup as seen in the VP3-subset of the Theora spec. It e.g. doesn't interpolate between matrices. I rewrote much of the quant-setup code (Quant.java) according to the Theora spec. Each step is documented by the fitting part of the Theora spec. This is an extensive (but inevitable) change to the decoder code. It's a prerequisite for implementing more specification features to enable Cortado to play back streams encoded with more advanced encoders. Some testing has been done to determine if it breaks existing content. More testing welcome.
Any chance of a differential fuzz test? That is, a program that can feed random input to two decoders, presumably your one and a reference decoder like libtheora, and compare the outputs for any differences? When done correctly, it can be a very sensitive test for the correctness of both decoders, as long as they were written independently.
As jheora is known to not implement the whole spec (after applying the patch it'll "just" implement a bit more) I see little value into fuzz-testing right now - jheora for sure won't match the reference encoder. What may make sense would be a "batch decoding" setup that ensures a given set of test files decodes without e.g. the decoder terminating due to encountered errors.
FWIW this patch doesn't seem to be quite enough to render the thusnelda encoder test output downloadable from http://xiphmont.livejournal.com/35363.html :(
This is a known problem. The proposed patch is supposed to prepare the codebase for further changes, it won't by itself enable playback of real-life content the old unpatched decoder wouldn't decode as well.
It's a big change in a region of code that none of us at Wikimedia are familiar with. Could you add some decoder features that we can test, to give us some confidence that you know what you're doing?
Okay, I'll try to extend the patch so it includes support for the Thusnelda encoder and then resubmit. That way the risk of breaking things at least has the prospect of adding something immediately useful.
Created attachment 5183 [details] Version 2 of the patch, makes jheora decode Thusnelda clips Newly attached patch includes the changes of the first proposed patch and additionally enables playback of content encoded with the experimental Thusnelda encoder.
Patch committed. Closing this bug.
Woohoo! :D Thanks!