|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp2codec.codestream.reader.PktDecoder
public class PktDecoder
This class is used to read packet's head and body. All the members must be re-initialized at the beginning of each tile thanks to the restart() method.
Field Summary | |
---|---|
int |
cbIdx
|
Fields inherited from interface jp2codec.entropy.StdEntropyCoderOptions |
---|
FIRST_BYPASS_PASS_IDX, MAX_CB_AREA, MAX_CB_DIM, MIN_CB_DIM, NUM_EMPTY_PASSES_IN_MS_BP, NUM_NON_BYPASS_MS_BP, NUM_PASSES, OPT_BYPASS, OPT_ER_TERM, OPT_REG_TERM, OPT_RESET_MQ, OPT_SEG_MARKERS, OPT_VERT_STR_CAUSAL, STRIPE_HEIGHT |
Constructor Summary | |
---|---|
PktDecoder(DecoderSpecs decSpec,
HeaderDecoder hd,
javax.imageio.stream.ImageInputStream ehs,
BitstreamReaderAgent src,
boolean isTruncMode)
Create an empty PktDecoder object associated with given decoder specifications and HeaderDecoder. |
Method Summary | |
---|---|
Coord |
getIncArray(int c,
int r)
Returns the 'incArray' for the specified component and resolution level. |
Coord |
getIncArrayMax(int c)
Returns the 'incArrayMax' for the specified component. |
int |
getNumPrecinct(int c,
int r)
Get the number of precinct in given component and resolution. |
int |
getPPX(int t,
int c,
int r)
Returns the precinct partition width for the specified component, resolution level and tile. |
int |
getPPY(int t,
int c,
int rl)
Returns the precinct partition height for the specified component, resolution level and tile. |
Coord[] |
getSotEotArray(int c,
int r)
Returns the 'sotEotArray' for the specified component and resolution level. |
Coord[] |
getSotEotArrayMax(int c)
Returns the 'sotEotArrayMax' for the specified component. |
void |
readEPHMarker(jp2codec.codestream.reader.PktHeaderBitReader bin)
Try to read an EPH marker. |
boolean |
readPktBody(int l,
int r,
int c,
int p,
CBlkInfo[][][] cbI,
int[] nb)
Reads specificied packet body in order to find offset of each code-block's piece of codeword. |
boolean |
readPktHead(int l,
int r,
int c,
int p,
CBlkInfo[][][] cbI,
int[] nb)
Read specified packet head and found length of each code-block's piece of codewords as well as number of skipped most significant bit-planes. |
boolean |
readSOPMarker(int[] nBytes,
int p,
int c,
int r)
Try to read a SOP marker and check that its sequence number if not out of sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int cbIdx
Constructor Detail |
---|
public PktDecoder(DecoderSpecs decSpec, HeaderDecoder hd, javax.imageio.stream.ImageInputStream ehs, BitstreamReaderAgent src, boolean isTruncMode)
decSpec
- The decoder specificationshd
- The HeaderDecoder instanceehs
- The stream where to read data fromsrc
- The bit stream reader agentisTruncMode
- Whether or not truncation mode is usedMethod Detail |
---|
public int getNumPrecinct(int c, int r)
c
- Component indexr
- Resolution indexpublic boolean readPktHead(int l, int r, int c, int p, CBlkInfo[][][] cbI, int[] nb) throws java.io.IOException
l
- layer indexr
- Resolution level indexc
- Component indexp
- Precinct indexcbI
- CBlkInfo array of relevant component and resolution
level.nb
- The number of bytes to read in each tile before reaching
output rate (used by truncation mode)
java.io.IOException
public boolean readPktBody(int l, int r, int c, int p, CBlkInfo[][][] cbI, int[] nb) throws java.io.IOException
l
- layer indexr
- Resolution level indexc
- Component indexp
- Precinct indexcbI
- CBlkInfo array of relevant component and resolution
level.nb
- The remainding number of bytes to read from the bit stream in
each tile before reaching the decoding rate (in truncation mode)
java.io.IOException
public final int getPPX(int t, int c, int r)
t
- the tile indexc
- The index of the component (between 0 and C-1)r
- The resolution level, from 0 to L.
public final int getPPY(int t, int c, int rl)
t
- the tile indexc
- The index of the component (between 0 and C-1)rl
- The resolution level, from 0 to L.
public boolean readSOPMarker(int[] nBytes, int p, int c, int r) throws java.io.IOException
nBytes
- The number of bytes left to read from each tilep
- Precinct indexr
- Resolution level indexc
- Component index
java.io.IOException
public void readEPHMarker(jp2codec.codestream.reader.PktHeaderBitReader bin) throws java.io.IOException
bin
- The packet header reader to read the EPH marker from
java.io.IOException
public Coord[] getSotEotArray(int c, int r)
c
- The componentr
- The resolution levelpublic Coord[] getSotEotArrayMax(int c)
c
- The componentpublic Coord getIncArray(int c, int r)
c
- The componentr
- The resolution levelpublic Coord getIncArrayMax(int c)
c
- The component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |