[Theora] a question about Bitstream Header.

Atsuhiko Yamanaka ymnk at jcraft.com
Mon Nov 1 00:17:47 PST 2004


Hi,

Thank you for prompt reply,

   +-From: Ralph Giles <giles at xiph.org> -----
   |_Date: Sun, 31 Oct 2004 23:56:48 -0800 __
   |
   |Can you be more specific about the difference you found?

I have worried that I have misunderstood how to read that spec.

That spec documentation  says
 >Output parameters:
 >Name Type    Size(bits) Signed? Description and restrictions
 >VMAJ Integer  8         No      The major version number.
 >VMIN Integer  8         No      The minor version number.
 >VREV Integer  8         No      The version revision number.
 >FMBW Integer 16         No      The width of the frame in macro blocks.
 >FMBH Integer 16         No      The height of the frame in macro blocks.
 >NSBS Integer 32         No      The total number of super blocks in a frame.
 >NBS  Integer 36         No      The total number of blocks in a frame.
 >NMBS Integer 32         No      The total number of macro blocks in a frame.
 >PICW Integer 20         No      The width of the picture region in pixels.
 >PICH Integer 20         No      The height of the picture region in pixels.
 >PICX Integer  8         No      The X offset of the picture region in pixels.
 >PICY Integer  8         No      The Y offset of the picture region in pixels.

on the other hand, _theora_unpack_info in SVN says as follows,

 >theora_read(opb,8,&ret); ci->version_major=(unsigned char)ret;
 >theora_read(opb,8,&ret); ci->version_minor=(unsigned char)ret;
 >theora_read(opb,8,&ret); ci->version_subminor=(unsigned char)ret;
 ...
 >theora_read(opb,16,&ret); ci->width=ret<<4;
 >theora_read(opb,16,&ret); ci->height=ret<<4;
 >theora_read(opb,24,&ret); ci->frame_width=ret;
 >theora_read(opb,24,&ret); ci->frame_height=ret;
 >theora_read(opb,8,&ret); ci->offset_x=ret;
 >theora_read(opb,8,&ret); ci->offset_y=ret;

For example, in the implementation, NSBS, NBS, NMBS defined in spec
are not expected in the header.

Thanks,
--
ymnk


More information about the Theora mailing list