|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BlockCodec
Codec for integer block data.
In coding mode external EntropyCodec
module is feeded by linearized data.
In decoding mode input is read from EntropyCodec
and converted back to integer
matrix.
Field Summary |
---|
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Method Summary | |
---|---|
int |
decode(int[] data,
int[][] predict)
Block decoding. |
void |
encode(int[] data,
int[][] predict)
Block coding. |
void |
init()
Prepares the underlying EntropyCodec . |
void |
setBlockSize(int width,
int height)
Sets actual block size. |
int |
setVariant(int variant)
Set actual codec variant (context). |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit, get, set |
Methods inherited from interface cz.cuni.jagrlib.iface.PersistentParamsBinary |
---|
loadData, storeData |
Method Detail |
---|
void init() throws java.io.IOException
EntropyCodec
.
Should be called before any of encode(int[], int[][])
s or decode(int[], int[][])
s.
java.io.IOException
int setVariant(int variant)
EntropyCodec
too.
variant
- Variant number (from 0).
setBlockSize(int, int)
void setBlockSize(int width, int height) throws java.io.IOException
width
- Horizontal block size (1D block size).height
- Vertical block size (1 for 1D).
java.io.IOException
setVariant(int)
void encode(int[] data, int[][] predict) throws java.io.IOException
EntropyCodec
input.
Connected EntropyCodec
module will be feeded by them.
data
- Source data to be encoded.predict
- Pre-allocated array used for predicition passing.
predict[1] will be used as source, predict[0] is filled with
prediction for the next block[s]. Can be null.
java.io.IOException
decode(int[], int[][])
int decode(int[] data, int[][] predict) throws java.io.IOException
EntropyCodec
and converts them back into
given integer matrix.
data
- Target data array (pre-allocated to sufficient size).predict
- Pre-allocated array used for predicition passing.
predict[1] will be used as source, predict[0] is filled with
prediction for the next block[s]. Can be null.
java.io.IOException
encode(int[], int[][])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |