fi.helsinki.cs.ohtu.mpeg2.video
Enum SequenceExtensionHeader.ChromaFormat

java.lang.Object
  extended by java.lang.Enum<SequenceExtensionHeader.ChromaFormat>
      extended by fi.helsinki.cs.ohtu.mpeg2.video.SequenceExtensionHeader.ChromaFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SequenceExtensionHeader.ChromaFormat>
Enclosing class:
SequenceExtensionHeader

public static enum SequenceExtensionHeader.ChromaFormat
extends java.lang.Enum<SequenceExtensionHeader.ChromaFormat>

Represents the allowed values for the chroma format field.


Enum Constant Summary
YCBCR_420
          Y:Cb:Cr 4:2:0 (subsampling of both Cb and Cr to 50% in both directions)
YCBCR_422
          Y:Cb:Cr 4:2:2 (subsampling of both Cb and Cr to 50% in the horizontal direction)
YCBCR_444
          Y:Cb:Cr 4:4:4 (no subsampling - full chroma resolution)
 
Field Summary
private  UnsignedIntegerField field
           
 
Method Summary
static SequenceExtensionHeader.ChromaFormat valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SequenceExtensionHeader.ChromaFormat[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 void writeTo(BitOutputStream stream)
          Writes the value to a bit stream.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

YCBCR_420

public static final SequenceExtensionHeader.ChromaFormat YCBCR_420
Y:Cb:Cr 4:2:0 (subsampling of both Cb and Cr to 50% in both directions)


YCBCR_422

public static final SequenceExtensionHeader.ChromaFormat YCBCR_422
Y:Cb:Cr 4:2:2 (subsampling of both Cb and Cr to 50% in the horizontal direction)


YCBCR_444

public static final SequenceExtensionHeader.ChromaFormat YCBCR_444
Y:Cb:Cr 4:4:4 (no subsampling - full chroma resolution)

Field Detail

field

private UnsignedIntegerField field
Method Detail

values

public static SequenceExtensionHeader.ChromaFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SequenceExtensionHeader.ChromaFormat c : SequenceExtensionHeader.ChromaFormat.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SequenceExtensionHeader.ChromaFormat valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

writeTo

public void writeTo(BitOutputStream stream)
             throws java.io.IOException
Writes the value to a bit stream.

Parameters:
stream - The stream to write to.
Throws:
java.io.IOException - Propagated from the stream write.