[theora-dev] Theora Data Dump?
Timothy B. Terriberry
tterribe at email.unc.edu
Sat Feb 20 14:41:32 PST 2010
Tony O'Bryan wrote:
> While writing my decoder, I posted some of the data structures I've read from
> the first 320x240.ogg example file, and which match the numbers read by the
> dump-video program, to the theora mailing list. I can repost them here if
> you'd like to include them in a future appendix.
I was actually thinking more along the lines of going through the
complete decoder process for a very small stream (e.g., a superblock or
two for two frames, to cover intra and inter frames), specifically
designed to exercise most of the features of the bitstream, and showing
the (non-local) values computed by each section of the spec. This is a
bit more work.
> Section 6.4.3 of the specification (Computing a Quantization Matrix) says:
>
> 1. Assign qri the index of a quant range such that
>
> qi >= summation from qrj=0 to qri-1 (QRSIZES[qti][pli ][qrj ])
>
> and
>
> qi <= summation from qrj=0 to qri (QRSIZES[qti ][pli ][qrj ])
>
>
>
> How do I determine which qri to select so that qi will fall between the
> specified value range? Or will a valid Theora file always result in a summation
> that automatically satisfies that requirement, regardless of which qri I
> select?
Work through 6.4.2 step 7(a)iv. It fills in the QRSIZES array until the
sum of all of them is exactly 63 (for a valid stream). qi is also in the
range 0 to 63, so there will be _some_ qri where the sum of the sizes
before is no larger than qi, but adding in the size of that range makes
the sum at least as large as qi. It's not "regardless of which qri", but
there's guaranteed to _a_ qri that works, and you can just step through
them until you find it.
More information about the theora-dev
mailing list