|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.DefaultBlockQuantizer
public abstract class DefaultBlockQuantizer
Default implementation of BlockQuantizer interface.
| Field Summary | |
|---|---|
protected static java.lang.String |
CATEGORY
Object category. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected double[] |
tmpD
Temporary array for intermediate double values. |
protected int[] |
tmpI
Temporary array for intermediate integer values. |
protected int |
variant
Quantizer variant (context). |
| Fields inherited from class cz.cuni.jagrlib.Piece |
|---|
channels, info, pl, plugs, reg, TEMPLATE_TYPE, userBreak |
| Fields inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
| Constructor Summary | |
|---|---|
DefaultBlockQuantizer()
|
|
| Method Summary | |
|---|---|
int |
dequantize(int[] quant,
double[] coef)
Dequantization = reconstruction (floating-point form). |
int |
dequantize(int[] quant,
int[] coef)
Dequantization = reconstruction (integer form). |
boolean |
loadData(byte[] data)
Loads instance parameters from (previously stored) binary data. |
int |
quantize(double[] coef,
int[] quant)
Quantization (floating-point form). |
int |
quantize(int[] coef,
int[] quant)
Quantization (integer form). |
void |
setBlockSize(int width,
int height)
Sets actual block size. |
void |
setData(int[] qtable)
Sets quantization table for the current variant. |
void |
setQuality(float quality)
Sets actual quality coefficient. |
int |
setVariant(int variant)
Set actual quantizer variant (context). |
byte[] |
storeData()
Pack instance parameters into binary format. |
| Methods inherited from class cz.cuni.jagrlib.Piece |
|---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplate, setTemplateDynamic, stop |
| Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
|---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, get, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, set, stringProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
commit, get, set |
| Field Detail |
|---|
protected int[] tmpI
protected double[] tmpD
protected int variant
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
| Constructor Detail |
|---|
public DefaultBlockQuantizer()
| Method Detail |
|---|
public int setVariant(int variant)
setVariant in interface BlockQuantizervariant - Variant number (from 0).
setBlockSize(int, int),
setQuality(float),
setData(int[])
public void setBlockSize(int width,
int height)
setBlockSize in interface BlockQuantizerwidth - Horizontal block size (1D block size).height - Vertical block size (1 for 1D).setVariant(int),
setQuality(float),
setData(int[])public void setQuality(float quality)
0.0f to 1.0f.
setQuality in interface BlockQuantizerquality - New quality coefficient.setVariant(int),
setBlockSize(int, int),
setData(int[])public void setData(int[] qtable)
setData in interface BlockQuantizerqtable - New quantization table.
Should have the correct size and layout (scanline top-first, left-first).setVariant(int),
setQuality(float),
setBlockSize(int, int)
public int quantize(double[] coef,
int[] quant)
quantize in interface BlockQuantizercoef - Source data (coefficients). Size = array size.
Should have the correct size and layout (scanline top-first, left-first).quant - Pre-allocated result array or null if
it's size needs to be determined.
quantize(int[],int[]),
dequantize(int[],double[])
public int quantize(int[] coef,
int[] quant)
quantize in interface BlockQuantizercoef - Source data (coefficients). Size = array size.
Should have the correct size and layout (scanline top-first, left-first).quant - Pre-allocated result array or null if
it's size needs to be determined.
quantize(double[],int[]),
dequantize(int[],int[])
public int dequantize(int[] quant,
double[] coef)
dequantize in interface BlockQuantizerquant - Source data (quantized coefficients). Size = array size.
Should have the correct size and layout (scanline top-first, left-first).coef - Pre-allocated coefficient array or null if
it's size needs to be determined.
dequantize(int[],int[]),
quantize(double[],int[])
public int dequantize(int[] quant,
int[] coef)
dequantize in interface BlockQuantizerquant - Source data (quantized coefficients). Size = array size.
Should have the correct size and layout (scanline top-first, left-first).coef - Pre-allocated coefficient array or null if
it's size needs to be determined.
dequantize(int[],double[]),
quantize(int[],int[])public byte[] storeData()
storeData in interface PersistentParamsBinarynull.
The array can be shared by all method calls.loadData(byte[])public boolean loadData(byte[] data)
loadData in interface PersistentParamsBinarydata - Binary data to be interpreted. Can be null.
true if successful.storeData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||