[xiph-rtp] Chaining Theora codebook changes

David Barrett dbarrett at quinthar.com
Sun May 22 15:35:40 PDT 2005


On Sat, 21 May 2005, Ralph Giles wrote:

> On Fri, May 20, 2005 at 02:44:36AM -0700, David Barrett wrote:
>
> > Finally, if I have a stream that starts with codebook A, switches to
> > B, and then switches back to A, is it assumed that A picks up "where
> > it left off", or do I reset the encoder with codebook A?
>
> Not sure what you mean here. Parsing the codebook does take a little bit
> of time, but should be small compared to frame decode or encode. One can
> also of course cache the parsed codec setup and switch simply by sending
> frames to one context or another.

I'm sorry, let me clarify.  It's my assumption that the codebook is
used to initialize the internal state of the decoder, and then each
frame modifies that internal state.  So, if I switch from codebook 0
to codebook 1, and then back to codebook 0, I have two options:

1) Destroy and recreate a decoder using codebook 0, thereby resetting
its internal state.

2) Reuse the original decoder, thereby continuing on with the internal
state that has already been accumulated.

This is all based on the assumption that there is internal state
accumulated through time.  If the decoder is essentially stateless,
then the above two options are the same (whether I create a new
decoder or reuse the old produces the same result as there is no
internal state being lost).  So if this assumption is correct, which
of the above two options should I choose?  I'm guessing #1, but I'd
like to confirm.

Thanks!

-david


More information about the xiph-rtp mailing list