fi.helsinki.cs.ohtu.mpeg2.video
Class MotionVector.Predictors

java.lang.Object
  extended by fi.helsinki.cs.ohtu.mpeg2.video.MotionVector.Predictors
Enclosing class:
MotionVector

public static class MotionVector.Predictors
extends java.lang.Object

Preserves that context of previously written motion vectors to determine correct binary encoding when writing motion vectors.


Field Summary
private  int[] predictors
           
 
Constructor Summary
MotionVector.Predictors()
          Constructs a new predictors instance, which is reset immediately.
 
Method Summary
(package private)  int get(int index)
           
 void reset()
          Resets the predictors instance.
(package private)  void set(int index, int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

predictors

private int[] predictors
Constructor Detail

MotionVector.Predictors

public MotionVector.Predictors()
Constructs a new predictors instance, which is reset immediately. This is suitable for use eg. in the start of a slice.

Method Detail

reset

public void reset()
Resets the predictors instance. Predictors need to be reset on various occasions, such as in the start of slices.


get

int get(int index)

set

void set(int index,
         int value)