[Theora-dev] Theroa Guess Confirmation

David Barrett dbarrett
Mon Aug 2 14:48:46 PDT 2004


Hi there, is there any document giving a high-level overview of how to
use "libtheora"?  As it stands, I'm scrounging through headers and
example code, and doing a whole lot of guessing.  In the meantime,
could you either confirm or deny the following guesses?

1) Before compressing with Theora, I must unpack my YUY2 data into
three separate arrays (Y, U, and V respectively), and record in a
"yuv_buffer" structure.

2) "yuv_buffer.y_stride" is this the number of bytes in one row of Y
data.  In other words, y_stride*8/y_width = num bits per Y component

3) "theora_encode_header" must be called exactly once, and its output
must be the first packet received by a Theora decoder

4) "theora_encode_comment" need never be called, but can be called at
any time, and its packet can be inserted anwhere

5) "theroa_encode_tables" must be called exactly once, and its output
must be the first non-comment packet after the header

6) "theora_encode_YUVin" must be called once per frame, and its output
added to the stream in a sequential manner

7) Theora can tolerate any number of "dropped packets", so long as the
packet is not "header", "tables", or (perhaps) the first "YUVin".

As you can see, I'm mostly guessing based on what makes sense to me.
Please let me know where my guesses fall far from the mark.  Thanks!

-david


More information about the Theora-dev mailing list