[theora] alghorithm of working encoder in libtheora
Benjamin M. Schwartz
bmschwar at fas.harvard.edu
Fri Mar 18 13:15:54 PDT 2011
On 03/18/2011 01:44 PM, digital design wrote:
> Now i implement next stages of encoder^
> 1) RGB->YUV
> 2) DCT of 16X16 blocks (pixel format 4:2:0)
> 3) zig-zag in eatch 8*8 block from previous step and push it to bufer memory.
> i push 16X16 blocks to BLOCK1 using raster order (i'm right?)
> Now i'm confused - so much types of ordering. What i must do after DCT?
> What is order for pass blocks to Huffman block?
In Theora terminology, a 16x16 unit spanning all 3 color planes (8x8 in U
and V) is called a "macroblock". To encode the contents of a macroblock,
you must separate out the different color planes, and form "superblocks"
in each color plane. The DC coefficients of each block are then coded in
"raster order", while the AC coefficients are coded in "coded order".
These orders are described in sections 2.3 and 2.4 of the Theora bitstream
The ordering of coefficients is
Y plane DC coefficients in raster order (whole plane)
Y plane AC coefficient 1 in coded order (whole plane)
Y plane AC coefficient 2 in coded order ...
Same for U plane
Same for V plane
For future questions please use Reply-All so that more people can help you.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/theora/attachments/20110318/a2136d79/attachment.pgp
More information about the theora