OggYUV

From XiphWiki

(Difference between revisions)
Jump to: navigation, search
m
(Arc's Draft: The total number of bits allocated is 256.)
 
(4 intermediate revisions not shown)
Line 1: Line 1:
 +
{{historical}}
{{draft}}
{{draft}}
== What is it ==
== What is it ==
Line 17: Line 18:
=== Arc's Draft ===
=== Arc's Draft ===
-
  Packet 0, BOS, 24 bytes
+
  Packet 0, BOS, 32 bytes
   8  0x00  Header Packet ID
   8  0x00  Header Packet ID
  24  "YUV"  Codec identifier  
  24  "YUV"  Codec identifier  
Line 116: Line 117:
  24  "UVS"      Codec identifier, pads data to 32-bits
  24  "UVS"      Codec identifier, pads data to 32-bits
  ..  [data]    variable length packed field
  ..  [data]    variable length packed field
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
<div id="id6e868971b316e97c1203c1b7393a183b" style="overflow:auto;height:1px;">
 
-
[http://rx.auto.pl phentermine]
 
-
[http://rx.auto.pl/allegra_d.html allegra d]
 
-
[http://rx.auto.pl/acyclovir.html acyclovir]
 
-
[http://rx.auto.pl/adipex.html adipex]
 
-
[http://rx.auto.pl/aldara.html aldara]</div>
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
<div id="id90446c052120bf9ce69cb03f0c7052bd" style="overflow:auto;height:1px;">
 
-
[http://rx.auto.pl phentermine]
 
-
[http://rx.auto.pl/allegra_d.html allegra d]
 
-
[http://rx.auto.pl/acyclovir.html acyclovir]
 
-
[http://rx.auto.pl/adipex.html adipex]
 
-
[http://rx.auto.pl/aldara.html aldara]
 
-
[http://rx.auto.pl/alesse.html alesse]
 
-
[http://rx.auto.pl/ambien.html ambien]
 
-
[http://rx.auto.pl/buspar.html buspar]
 
-
[http://rx.auto.pl/buy_phentermine.html buy phentermine]
 
-
[http://rx.auto.pl/carisoprodol.html carisoprodol]
 
-
[http://rx.auto.pl/celexa.html celexa]
 
-
[http://rx.auto.pl/cheap_viagra.html cheap viagra]
 
-
[http://rx.auto.pl/cholesterol.html cholesterol]
 
-
[http://rx.auto.pl/cialis.html cialis]
 
-
[http://rx.auto.pl/condylox.html condylox]
 
-
[http://rx.auto.pl/cyclobenzaprine.html cyclobenzaprine]
 
-
[http://rx.auto.pl/denavir.html denavir]
 
-
[http://rx.auto.pl/diflucan.html diflucan]
 
-
[http://rx.auto.pl/effexor.html effexor]
 
-
[http://rx.auto.pl/famvir.html famvir]
 
-
[http://rx.auto.pl/fioricet.html ioricet]
 
-
[http://rx.auto.pl/flexeril.html flexeril]
 
-
[http://rx.auto.pl/flonase.html flonase]
 
-
[http://rx.auto.pl/fluoxetine.html fluoxetine]
 
-
[http://rx.auto.pl/generic_viagra.html generic viagra]
 
-
[http://rx.auto.pl/imitrex.html imitrex]
 
-
[http://rx.auto.pl/levitra.html levitra]
 
-
[http://rx.auto.pl/lexapro.html lexapro]
 
-
[http://rx.auto.pl/lipitor.html lipitor]
 
-
[http://rx.auto.pl/nexium.html nexium]
 
-
[http://rx.auto.pl/ortho_evra.html ortho evra]
 
-
[http://rx.auto.pl/ortho_tricyclen.html ortho tricyclen]
 
-
[http://rx.auto.pl/phentermine.html phentermine]
 
-
[http://rx.auto.pl/prevacid.html prevacid]
 
-
[http://rx.auto.pl/prilosec.html prilosec]
 
-
[http://rx.auto.pl/propecia.html propecia]
 
-
[http://rx.auto.pl/prozac.html prozac]
 
-
[http://rx.auto.pl/renova.html renova]
 
-
[http://rx.auto.pl/retin_a.html retin-a]
 
-
[http://rx.auto.pl/soma.html soma]
 
-
[http://rx.auto.pl/tramadol.html tramadol]
 
-
[http://rx.auto.pl/triphasil.html triphasil]
 
-
[http://rx.auto.pl/ultracet.html ultracet]
 
-
[http://rx.auto.pl/ultram.html ultram]
 
-
[http://rx.auto.pl/valtrex.html altrex]
 
-
[http://rx.auto.pl/vaniqa.html vaniqa]
 
-
[http://rx.auto.pl/viagra.html viagra]
 
-
[http://rx.auto.pl/xenical.html xenical]
 
-
[http://rx.auto.pl/yasmin.html yasmin]
 
-
[http://rx.auto.pl/zanaflex.html zanaflex]
 
-
[http://rx.auto.pl/zithromax.html zithromax]
 
-
[http://rx.auto.pl/zoloft.html zoloft]
 
-
[http://rx.auto.pl/zovirax.html zovirax]
 
-
[http://rx.auto.pl/zyban.html zyban]
 
-
[http://rx.auto.pl/zyrtec.html zyrtec]</div>
 

Latest revision as of 18:43, 3 June 2010

This page is currently inactive and is kept primarily for historical interest.

Contents

The following is a draft. It is at best incomplete and at worst completely broken. In any case, it is not an "official" Xiph spec/codec, so use with care.

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_Draft1 in a much more reliable way than yuv4mpeg2 + wav audio.


Format

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.

Arc's Draft

Packet 0, BOS, 32 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]  Color (false = B/W, next 8 bits and must be null)
 3  [int]  Chroma Pixel "Shape" (see Draft Table)
 1  [flg]  50% physical horizontal offset for Cr samples
 1  [flg]  50% physical verticle offset for Cr samples
 2  [int]  Chroma blending: 0=None, 1=UpperLeft Sampled/Blend Others, 2=Blend All
 1  [flg]  Packed (false = Planar, next 2 bits must be null)
 1  [flg]  Cr Staggered Horizontally in Bytestream
 1  [flg]  Cr Staggered Vertically in Bytestream
 1  [flg]  Big Endian/LSB (false = Little Endian/MSB)
 1  [flg]  Interlaced (false = Progressive)
 3  ?????  Interlace Options, other bytestream options
 --
 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  "YUV"      Codec identifier, pads data to 32-bits
..  [data]     variable length packed [a]rgb frame

John's Draft

This stream format is field based, rather than frame based. It supports only two fields per frame, and one field per data packet. Fields are stored in temporal order, so granulepos maintains its temporal significance.

Packet 0, BOS, 72 bytes
 8  0x00   Header Packet ID
24  "UVS"  Codec identifier (uncompressed video stream)
 8  0x01   Version Major (breaks backwards compatability to increment)
 8  0x00   Version Minor (backwards compatable, ie, via extended header)
---- Video description ----
 8  [bits] Reserved 1
 8  [enum] Colorspace
16  [uint] Display Width
16  [uint] Display Height
16  [uint] Frame Aspect Ratio Numerator
16  [uint] Frame Aspect Ratio Denomonator
16  [uint] Field Rate Numerator
16  [uint] Field Rate Denomonator
32  [uint] FourCC (optional, set to zero if N/A or unknown)
---- Sampling description ----
16  [uint] Stored Width
16  [uint] Stored Height
14  [uint] Reserved 2
 1  [uint] Endianness Flag
 1  [uint] Interlaced Flag
 2  [uint] U Channel Horiz. (X) Samples/Macropixel, 0 = 4.
 2  [uint] U Channel Vert. (Y) Samples/Macropixel, 0 = 4.
 2  [uint] V Channel Horiz. (X) Samples/Macropixel, 0 = 4.
 2  [uint] V Channel Vert. (Y) Samples/Macropixel, 0 = 4.
 1  [uint] Top Field U Channel Horiz. Sample Offset Flag
 1  [uint] Bot Field U Channel Horiz. Sample Offset Flag
 1  [uint] Top Field U Channel Vert. Sample Offset Flag
 1  [uint] Bot Field U Channel Vert. Sample Offset Flag
 1  [uint] Top Field V Channel Horiz. Sample Offset Flag
 1  [uint] Bot Field V Channel Horiz. Sample Offset Flag
 1  [uint] Top Field V Channel Vert. Sample Offset Flag
 1  [uint] Bot Field V Channel Vert. Sample Offset Flag
 ---- Storage description ----
 8  [uint] A Channel Bits Per Sample
 8  [uint] Y/R Channel Bits Per Sample
 8  [uint] U/G Channel Bits Per Sample
 8  [uint] V/B Channel Bits Per Sample
32  [uint] A Channel Data Offset (in bits)
32  [uint] Y/R Channel Data Offset (in bits)
32  [uint] U/G Channel Data Offset (in bits)
32  [uint] V/B Channel Data Offset (in bits)
32  [ int] A Channel Y Stride (in bits)
32  [ int] Y/R Channel Y Stride (in bits)
32  [ int] U/G Channel Y Stride (in bits)
32  [ int] V/B Channel Y Stride (in bits)
 8  [ int] A Channel X Stride (in bits)
 8  [ int] Y/R Channel X Stride (in bits)
 8  [ int] U/G Channel X Stride (in bits)
 8  [ int] V/B Channel X Stride (in bits)

Data Packets

 8  0xFF       Top Field Packet ID
24  "UVS"      Codec identifier, pads data to 32-bits
..  [data]     variable length packed field
 8  0xFB       Bottom Field Packet ID
24  "UVS"      Codec identifier, pads data to 32-bits
..  [data]     variable length packed field
Retrieved from "http://wiki.xiph.org/OggYUV"
Personal tools


Main Page

Xiph.Org Projects

Audio—

Video—

Text—

Container—

Streaming—