public class BPEDecoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Decoder |
blockDecoder
Decoder to read from the inputByteStream.
|
private ClientJPEG2KBlock |
blockObj |
private float[][] |
blockSamples
Definition in
Pyrenees.Coder.Code.BPECoder#blockSamples |
private byte[][] |
contextMap
Definition in
Pyrenees.Coder.Code.BPECoder#contextMap |
private CPByteStream |
CPByteStreams |
private int |
currentBitPlane
Definition in
Pyrenees.Coder.Code.BPECoder#currentBitPlane |
private int |
currentCodingPass
Definition in
Pyrenees.Coder.Code.BPECoder#currentCodingPass |
private int |
currentMaskBitPlane
Definition in
Pyrenees.Coder.Code.BPECoder#currentMaskBitPlane |
private int |
maskBitPlaneBefore
Mask of the currentBitPlane - 1.
|
private int |
MSBPlane
Definition in
Pyrenees.Coder.Code.BPECoder#MSBPlane |
private int |
numBitPlanes |
private int |
numBitsRunModeBreak
Definition in
Pyrenees.Coder.Code.BPECoder#numBitsRunModeBreak |
private int |
numCodingPasses |
private int |
stripeHeight
Definition in
Pyrenees.Coder.Code.BPECoder#stripeHeight |
private int |
subband
Definition in
Pyrenees.Coder.Code.BPECoder#subband |
private int |
xSize
Definition in
Pyrenees.Coder.Code.BPECoder#xSize |
private int |
ySize
Definition in
Pyrenees.Coder.Code.BPECoder#ySize |
Constructor and Description |
---|
BPEDecoder()
Constructor that does not receive anything.
|
BPEDecoder(ClientJPEG2KBlock blockObj,
float[][] blockSamples)
Constructor that receives block coded bit streams, block sizes, most significant bit plane and block subband.
|
Modifier and Type | Method and Description |
---|---|
private void |
cleanupPass()
Same function as
Pyrenees.Coder.Code.BPECoder#cleanupPass
Minor changes due to differences between coding and decoding. |
void |
decodeNextCodingPass()
Decodes the next coding pass.
|
float[][] |
getBlockSamples() |
void |
list(java.io.PrintStream out)
Prints this Block Decode out to the specified output stream.
|
private void |
magnitudeRefinementPass()
Same function as
Pyrenees.Coder.Code.BPECoder#magnitudeRefinementPass
Minor changes due to differences between coding and decoding. |
void |
runAll()
Decode the image samples (all bit planes).
|
private void |
signDecode(int x,
int y)
Same function as
Pyrenees.Coder.Code.BPECoder#signEncode |
private void |
significancePropagationPass()
Same function as
Pyrenees.Coder.Code.BPECoder#significancePropagationPass
Minor changes due to differences between coding and decoding. |
void |
swapCodeBlock(ClientJPEG2KBlock blockObj,
float[][] blockSamples)
Swaps the code-block decoded by this class.
|
java.lang.String |
toString() |
private void |
updateMap(int x,
int y,
boolean CP)
Turn neighbourhoods map samples of (x,y) from 0 to 1 if they can be visited in the current scan.
|
private ClientJPEG2KBlock blockObj
private float[][] blockSamples
Pyrenees.Coder.Code.BPECoder#blockSamples
private CPByteStream CPByteStreams
private int ySize
Pyrenees.Coder.Code.BPECoder#ySize
private int xSize
Pyrenees.Coder.Code.BPECoder#xSize
private int subband
Pyrenees.Coder.Code.BPECoder#subband
private int MSBPlane
Pyrenees.Coder.Code.BPECoder#MSBPlane
private byte[][] contextMap
Pyrenees.Coder.Code.BPECoder#contextMap
private int currentBitPlane
Pyrenees.Coder.Code.BPECoder#currentBitPlane
private int currentCodingPass
Pyrenees.Coder.Code.BPECoder#currentCodingPass
private int currentMaskBitPlane
Pyrenees.Coder.Code.BPECoder#currentMaskBitPlane
private int maskBitPlaneBefore
The content is 2^(currentBitPlane-1)
private Decoder blockDecoder
This Decoder must be compatible with the abstract class Decoder.
private final int stripeHeight
Pyrenees.Coder.Code.BPECoder#stripeHeight
private final int numBitsRunModeBreak
Pyrenees.Coder.Code.BPECoder#numBitsRunModeBreak
private int numBitPlanes
private int numCodingPasses
public BPEDecoder()
public BPEDecoder(ClientJPEG2KBlock blockObj, float[][] blockSamples) throws ErrorException
blockObj
- definition in blockObj
.blockSamples
- definition in blockSamples
.ErrorException
- problems with the inputByteStreampublic void swapCodeBlock(ClientJPEG2KBlock blockObj, float[][] blockSamples) throws ErrorException
blockObj
- definition in blockObj
.blockSamples
- definition in blockSamples
.ErrorException
- problems with the inputByteStreampublic void runAll() throws WarningException, ErrorException
WarningException
- when reached the last coding passErrorException
- problems with the inputByteStreampublic void decodeNextCodingPass() throws WarningException, ErrorException
WarningException
- when reached the last coding passErrorException
- problems with the inputByteStreampublic float[][] getBlockSamples()
blockSamples
public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.private void signDecode(int x, int y) throws ErrorException
Pyrenees.Coder.Code.BPECoder#signEncode
ErrorException
- when end of bitstream is reachedprivate void significancePropagationPass() throws ErrorException
Pyrenees.Coder.Code.BPECoder#significancePropagationPass
Minor changes due to differences between coding and decoding.ErrorException
- when end of bitstream reachedprivate void magnitudeRefinementPass() throws ErrorException
Pyrenees.Coder.Code.BPECoder#magnitudeRefinementPass
Minor changes due to differences between coding and decoding.ErrorException
- when end of bitstream reachedprivate void cleanupPass() throws ErrorException
Pyrenees.Coder.Code.BPECoder#cleanupPass
Minor changes due to differences between coding and decoding.ErrorException
- when end of bitstream reachedprivate void updateMap(int x, int y, boolean CP)
x
- x position of the sampley
- y position of the sampleCP
- indicates if the updating is performed by the Cleanup Pass (true, otherwise false)
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)