TER.TERcoder.SegmentCoder
Interface ArithmeticCoder


public interface ArithmeticCoder

This interface defines the methods that a coder must contain.

Version:
1.0
Author:
Group on Interactive Coding of Images (GICI)

Method Summary
 void codeBit(boolean bit)
          Code a bit without taking into account context probabilities in an artihmetic like coder.
 void codeBit(boolean bit, int context)
          Code a bit taking into account context probabilities in an artihmetic like coder.
 void reset()
          Reset the context probabilities of the coder, if any.
 void restart()
          Restart the internal variables of the coder.
 void swapOutputByteStream(ByteStream outputByteStream)
          Swaps the current outputByteStream.
 void terminate()
          Finishes the outputByteStream, if needed.
 

Method Detail

codeBit

void codeBit(boolean bit,
             int context)
Code a bit taking into account context probabilities in an artihmetic like coder.

Parameters:
bit - bit to encode
context - context the bit
Throws:
WarningException - when some problem with the manipulation of the ByteStream happens

codeBit

void codeBit(boolean bit)
Code a bit without taking into account context probabilities in an artihmetic like coder.

Parameters:
bit - bit to encode
Throws:
WarningException - when some problem with the manipulation of the ByteStream happens

swapOutputByteStream

void swapOutputByteStream(ByteStream outputByteStream)
Swaps the current outputByteStream. Before to call this function you should terminate the last ByteStream with the function terminate.

Parameters:
outputByteStream - ByteStream where the byte are flushed

terminate

void terminate()
               throws WarningException
Finishes the outputByteStream, if needed.

Throws:
WarningException - when some problem with the manipulation of the ByteStream happens

restart

void restart()
Restart the internal variables of the coder.


reset

void reset()
Reset the context probabilities of the coder, if any.



TER - Copyright (C) 2006
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Group on Interactive Coding of Images (GICI) - UAB (Spain)