fi.helsinki.cs.ohtu.mpeg2.video
Class NonIntraBlock

java.lang.Object
  extended by fi.helsinki.cs.ohtu.mpeg2.video.NonIntraBlock
All Implemented Interfaces:
Block

public class NonIntraBlock
extends java.lang.Object
implements Block

Represents a block in a P- or B-type macroblock.


Field Summary
private  int[] coefficients
           
 
Constructor Summary
NonIntraBlock(int[] coefficients)
          Constructs a new non-intra block with the specified coefficients.
 
Method Summary
 int[] getCoefficients()
          Returns the coefficients in this block.
 void setCoefficients(int[] coefficients)
          Sets the coefficients to use in this block.
 void writeTo(BitOutputStream stream)
          Writes the block to a stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coefficients

private int[] coefficients
Constructor Detail

NonIntraBlock

public NonIntraBlock(int[] coefficients)
Constructs a new non-intra block with the specified coefficients.

Parameters:
coefficients - The coefficients for this block.
Method Detail

getCoefficients

public int[] getCoefficients()
Returns the coefficients in this block.

Returns:
This block's coefficients.

setCoefficients

public void setCoefficients(int[] coefficients)
Sets the coefficients to use in this block.

Parameters:
coefficients - The new coefficients. Must be 64 elements long.

writeTo

public void writeTo(BitOutputStream stream)
             throws java.io.IOException
Description copied from interface: Block
Writes the block to a stream.

Specified by:
writeTo in interface Block
Parameters:
stream - The stream to write to.
Throws:
java.io.IOException - Exception from the stream.