CADI.Common.LogicalTarget.JPEG2000.Decode
Interface Decoder

All Known Implementing Classes:
MQDecoder, RawDecoder

public interface Decoder

This interface defines the methods that a decoder must contain.

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

Method Summary
 boolean decodeBit()
          Decode a bit without taking into account context probabilities in an artihmetic like coder.
 boolean decodeBit(int context)
          Decode a bit taking into account context probabilities in an artihmetic like coder.
 void reset()
          Reset the context probabilities of the decoder, if any.
 void restart()
          Restart the internal variables of the decoder.
 void swapInputByteStream(ByteStream inputByteStream)
          Swaps the current inputByteStream.
 

Method Detail

decodeBit

boolean decodeBit(int context)
                  throws ErrorException
Decode a bit taking into account context probabilities in an artihmetic like coder.

Parameters:
context - context the bit
Returns:
a boolean indicating the decoded bit
Throws:
ErrorException - when some problem with the manipulation of the ByteStream happens

decodeBit

boolean decodeBit()
                  throws ErrorException
Decode a bit without taking into account context probabilities in an artihmetic like coder.

Returns:
a boolean indicating the decoded bit
Throws:
ErrorException - when some problem with the manipulation of the ByteStream happens

swapInputByteStream

void swapInputByteStream(ByteStream inputByteStream)
Swaps the current inputByteStream. After calling this function and continue using the decoder you should restart the decoder with the function restart.

Parameters:
inputByteStream - ByteStream from where the byte are got

restart

void restart()
             throws ErrorException
Restart the internal variables of the decoder.

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

reset

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



CADI - Copyright (C) 2007
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) (contact)