OggYUV: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
(deleted notes and "Needs" section)
(removed extranious note at the bottom)
Line 42: Line 42:
  32  [int]  Framerate Numerator
  32  [int]  Framerate Numerator
  32  [int]  Framerate Denominator
  32  [int]  Framerate Denominator

Line 49: Line 48:
  24  "RGB"      Codec identifier, pads data to 32-bits
  24  "RGB"      Codec identifier, pads data to 32-bits
  ..  [data]    variable length packed [a]rgb frame
  ..  [data]    variable length packed [a]rgb frame
* bits per channel (typically 8:8:8, does this ever differ?)

Revision as of 23:56, 8 November 2005

What is it

OggYUV is an uncompressed YUV (YCbCr) video codec for Ogg. It's a simple way to store and transfer uncompressed video within an Ogg container.

Why is it

The purpose of OggYUV is as a raw video interchange format within OggStream and other media frameworks. The format design is to be simple, complete, and efficient enough to be reasonably used to export decoded video to a media player for display.

It can also replace our dependence on yuv4mpeg2 for lossless video storage, which Ogg Theora originally used as an encoding source. The main advantage over yuv4mpeg2 files is that, within an Ogg container, it can be time-synced with OggPCM in a much more reliable way than yuv4mpeg2 + wav audio.


Packets are processed as per the value of their first byte. Packets of unknown ID should be silently ignored, providing a convient way to add future expandability which does not break the data format. Additional data in packet 0 (the header packet) must also be silently ignored.

Packet 0, BOS, 24 bytes
 8  0x00   Header Packet ID
24  "YUV"  Codec identifier 
 8  0x01   Version Major (breaks backwards compatability to increment)
 8  0x00   Version Minor (backwards compatable, ie, via extended header)
 1  [flg]  Interlaced
 1  [flg]  Packed (False = Planar)
 2  [int]  Number of Chroma/Luna (1, 2, 4, or 8)
 1  [flg]  Horizontal Staggered Chroma
 1  [flg]  Verticle Staggered Chroma
 1  [flg]  Staggered Chroma
 1  [flg]  Horizontal Stagger
 8  [nil]  Padding to bring to 32-bit border
 8  [int]  Alpha channel bpp
 8  [int]  Luma channel bpp
 8  [int]  Chroma channels bpp
 8  [int]  Colorspace (same as in theora)
24  [int]  Frame Width
24  [int]  Frame Height
24  [int]  Aspect Numerator
24  [int]  Aspect Denominator
32  [int]  Framerate Numerator
32  [int]  Framerate Denominator

Data Packet
 8  0xFF       Data Packet ID
24  "RGB"      Codec identifier, pads data to 32-bits
..  [data]     variable length packed [a]rgb frame