Table of Contents

NAME

QccPack - Quantization, compression, and coding libraries and utility programs

DESCRIPTION

QccPack provides a collection of library routines and utility programs for quantization, compression, and coding of data. QccPack has been written to provide very flexible and general implementations of procedures commonly used in coding and compression applications.

The essential component of the QccPack collection is a library of procedures implementing a large variety of compression and coding algorithms. Application programs may make use of the QccPack library routines by linking the application against the library during compilation. Each library function is very general in its implementation so to be useful in a large variety of applications.

Additionally, much of the functionality of the library routines has been provided in the form of stand-alone executable programs. The prime importance these utility programs is probably that they provide examples of how to interface with many of the QccPack library routines. The utility programs could also be called from scripts to simulate the operation of complex coding and compression systems before implementing all the system functionality into one stand-alone program.

QccPack is intended for use in the development of prototypes of coding and compression systems, and in academic research. Its main reason for existence is to obviate the incessant re-implementation of common algorithms for the sake of application-specific details. For example, we don't want to re-implement arithmetic coding every time we change the symbol-alphabet size or the number of contexts in the arithmetic-coder adaptive model. By using QccPack, we use the same implementation of arithmetic coding regardless of our application. The drawback of this library-based approach to development is the fact that the generality required of the library routines leads to a frequent use of dynamic memory allocation which, in turn, implies that the routines execute slower than would a similar implementation that hard-coded application-specific details. For this reason, QccPack is intended for prototyping and proof-of-concept needs rather than for direct use in applications requiring high-speed operation.

MULTITHREAD SUPPORT

QccPack optionally supports use in multithreaded applications. Currently, QccPack does not make use of threads internally; however, if multithread support is enabled when compiling the library, an application program can invoke QccPack functions within multiple threads simultaneously. In order to use QccPack in a multithreaded application, QccPack must have been compiled with thread support enabled and linked against the pthreads library (see the QccPack README file and pthread_create(3) .) This action renders the QccPack library MT-safe, although see QccMathRand(3) for one caveat.

QCCPACK MODULES

Standard Modules

The QccPack library routines and utility programs are partitioned into several modules based on their functionalities. The standard modules, which are available for all installations of QccPack are as follows:
General
See below
Entropy Coding
See QccPackENT(3)
Scalar Quantization
See QccPackSQ(3)
Vector Quantization
See QccPackVQ(3)
Adaptive Vector Quantization
See QccPackAVQ(3)
Image Processing and Manipulation
See QccPackIMG(3)
Wavelets
See QccPackWAV(3)
Video Coding
See QccPackVID(3)
Hyspectral Imagery
See QccPackHYP(3)

Optional Modules

In addition to the standard modules listed above, there are optional modules that may or may not have been installed on your system. These optional modules may have licensing schemes different from GPL/LGPL used for the standard QccPack modules (hence the reason for separating them out to optional modules); refer to the documentation coming with each module for more details.
SPIHT Encoding & Decoding of Images
See QccPackSPIHT(3) , if installed
SPECK Encoding & Decoding of Images
See QccPackSPECK(3) , if installed

QCCPACK GENERAL MODULE

This module provides general-purpose tools for quantization, compression, and coding of data.

DATA TYPES AND FILE FORMAT

QccFilter(3)
generic data structure QccFilter for FIR filtering of signals
QccBitBuffer(3)
generic data structure QccBitBuffer for bitstream packing/unpacking
QccFifo(3)
data structure for bitstream fifo
QccDataset(3)
generic vector data structure QccDataset and corresponding DAT file format.
QccChannel(3)
generic QccChannel structure for channel of channel symbols and corresponding CHN file format.

LIBRARY ROUTINES

Miscellaneous

QccInit(3)
QccPack library initialization
QccExit(3)
normal, non-error program exit
QccFree(3)
free memory
QccGetProgramName(3)
gets the current program name
QccParseParameters(3)
parsing of command-line parameters

String Handling

QccStringMakeNull(3)
makes a null string
QccStringNull(3)
check for a null string
QccConvertToQccString(3)
convert from a character array to QccString
QccStringCopy(3)
copies a QccString
QccStringSprintf(3)
formated print to a QccString

Environment Variables

QccSetEnv(3)
set an environment variable
QccGetEnv(3)
retrieve the value of an environment variable

Library Version

QccSetUserHeader(3)
set a user-defined headr message
QccGetQccPackVersion(3)
retrieve the version and date of the QccPack library
QccCompareQccPackVersions(3)
compare two sets of QccPack versions
QccPrintQccPackVersion(3)
print the version and date of the QccPack library

Time

QccTimeTic(3)
start timer
QccTimeToc(3)
determine elapsed time

Error Handling

QccErrorAddMessage(3)
add a message to the error-message list
QccErrorPrintMessages(3)
print all error messages to stderr
QccErrorClearMessages(3)
clear all messages from message queue
QccErrorExit(3)
print all error messages to stderr and cause program exit with error
QccErrorWarning(3)
print warning message immediately to stderr

Binary Values

QccBinaryCharToInt(3)
convert QccPack's MSB-first value to int
QccBinaryIntToChar(3)
convert int to QccPack's MSB-first value
QccBinaryCharToFloat(3)
convert QccPack's MSB-first value to float
QccBinaryFloatToChar(3)
convert float to QccPack's MSB-first value

File Access

QccFileExists(3)
check for file existence
QccFileGetExtension(3)
get filename extension
QccFileOpen(3)
open file
QccFileDescriptorOpen(3)
open file pointer from file descriptor
QccFileClose(3)
close file
QccFileRemove(3)
remove file
QccFileGetSize(3)
get size of file
QccFileGetModTime(3)
get last modification time of file
QccFileGetRealPath(3)
get real path of file
QccFileGetCurrentPosition(3)
get current position in file stream
QccFileRewind(3)
rewind file to its beginning
QccFileReadChar(3)
read char
QccFileWriteChar(3)
write char
QccFileReadInt(3)
read int
QccFileWriteInt(3)
write int
QccFileReadDouble(3)
read double
QccFileWriteDouble(3)
write double
QccFileReadString(3)
read string
QccFileWriteString(3)
write string
QccFileReadLine(3)
read an entire line
QccFileSkipWhiteSpace(3)
skip over white space and comment lines
QccFileReadMagicNumber(3)
read magic number and version information from file header
QccFileWriteMagicNumber(3)
write magic number and version information to file header
QccFileWriteMagicNumberVersion(3)
write magic number and version information to file header with explicitly specified version
QccFileGetMagicNumber(3)
retrieve magic number from designated file
QccFilePrintFileInfo(3)
print magic number and version information to stdout

File-Path Searching

QccFilePathSearch(3)
searches for a specified filename in a specified path
QccFilePathSearchOpenRead(3)
searches for and opens for reading a specified filename in a specified path

Miscellaneous Mathematics

QccMathMax(3)
maximum of two numbers
QccMathMin(3)
minimum of two numbers
QccMathPercent(3)
percentage of two numbers
QccMathModulus(3)
signed remainder after division of two numbers
QccMathLog2(3)
logarithm base 2
QccMathMedian(3)
median of three values
QccMathRand(3)
uniformly distributed random value
QccMathGaussianDensity(3)
Gaussian-density function
QccMathLaplacianDensity(3)
Laplacian-density function

Transparency

QccAlphaOpaque(3)
evaluate opacity
QccAlphaTransparent(3)
evaluate transparency
QccAlphaTranslucent(3)
evaluate translucency

Vector Mathematics

QccVectorAlloc(3)
allocate vector
QccVectorFree(3)
free vector
QccVectorZero(3)
zero vector
QccVectorResize(3)
resize vector
QccVectorMean(3)
calculate vector mean
QccVectorVariance(3)
calculate vector variance
QccVectorAdd(3)
add two vectors
QccVectorSubtract(3)
subtract one vector from another
QccVectorScalarMult(3)
multiply vector by scalar
QccVectorCopy(3)
vector copy
QccVectorNorm(3)
calculate vector norm
QccVectorNormalize(3)
normalize vector to unit length
QccVectorDotProduct(3)
calculate dot product of two vectors
QccVectorAngle(3)
calculate angle between two vectors
QccVectorSquareDistance(3)
calculate squared Euclidean distance between two vectors
QccVectorSumComponents(3)
sum vector components
QccVectorMaxValue(3)
find maximum component of a vector
QccVectorMinValue(3)
find minimum component of a vector
QccVectorPrint(3)
print vector to stdout
QccVectorSortComponents(3)
quicksort of vector components
QccVectorGetSymbolProbs(3)
calculate probabilities of a list of symbols
QccVectorMoveComponentToFront(3)
move specified component to front of vector
QccVectorSubsample(3)
downsample a vector by a factor of 2
QccVectorUpsample(3)
upsample a vector by a factor of 2
QccVectorDCT(3)
one-dimensional discrete cosine transform (DCT) of a signal vector
QccVectorInverseDCT(3)
one-dimensional inverse discrete cosine transform (IDCT) of a signal vector

Integer-Vector Mathematics

QccVectorIntAlloc(3)
allocate integer vector
QccVectorIntFree(3)
free integer vector
QccVectorIntZero(3)
zero integer vector
QccVectorIntResize(3)
resize integer vector
QccVectorIntMean(3)
calculate integer-vector mean
QccVectorIntVariance(3)
calculate integer-vector variance
QccVectorIntAdd(3)
add two integer vectors
QccVectorIntSubtract(3)
subtract one integer vector from another
QccVectorIntScalarMult(3)
multiply integer vector by scalar
QccVectorIntCopy(3)
integer-vector copy
QccVectorIntNorm(3)
calculate integer-vector norm
QccVectorIntDotProduct(3)
calculate dot product of two integer vectors
QccVectorIntSquareDistance(3)
calculate squared Euclidean distance between two integer vectors
QccVectorIntSumComponents(3)
sum integer-vector components
QccVectorIntMaxValue(3)
find maximum component of a integer vector
QccVectorIntMinValue(3)
find minimum component of a integer vector
QccVectorIntPrint(3)
print integer vector to stdout
QccVectorIntSortComponents(3)
quicksort of integer-vector components
QccVectorIntMoveComponentToFront(3)
move specified component to front of integer vector
QccVectorIntSubsample(3)
downsample a integer vector by a factor of 2
QccVectorIntUpsample(3)
upsample a integer vector by a factor of 2

Matrix Mathematics

QccMatrixAlloc(3)
allocate matrix
QccMatrixFree(3)
free matrix
QccMatrixZero(3)
zero matrix
QccMatrixResize(3)
resize matrix
QccMatrixCopy(3)
copy matrix
QccMatrixMaxValue(3)
find largest element in matrix
QccMatrixMinValue(3)
find smallest element in matrix
QccMatrixPrint(3)
print matrix to stdout
QccMatrixRowExchange(3)
exchange matrix rows
QccMatrixColExchange(3)
exchange matrix columns
QccMatrixIdentity(3)
set to identity matrix
QccMatrixTranspose(3)
transpose matrix
QccMatrixAdd(3)
adds two matrices
QccMatrixSubtract(3)
subtracts one matrix from another
QccMatrixMean(3)
calculate mean of matrix elements
QccMatrixVariance(3)
calculate variance of matrix elements
QccMatrixMaxSignalPower(3)
find the largest squared row-vector norm in matrix
QccMatrixVectorMultiply(3)
multiply matrix on the right by a column vector
QccMatrixMultiply(3)
multiply two matrices
QccMatrixDCT(3)
two-dimensional discrete cosine transform (DCT) of a matrix
QccMatrixInverseDCT(3)
two-dimensional inverse discrete cosine transform (IDCT) of a matrix
QccMatrixAddNoiseToRegion(3)
corrupt region of matrix with random noise
QccMatrixInverse(3)
matrix inverse
QccMatrixSVD(3)
singular value decomposition
QccMatrixOrthogonalize(3)
generate orthonormal basis for range of matrix
QccMatrixNullspace(3)
generate orthonormal basis for nullspace of matrix

Integer-Matrix Mathematics

QccMatrixIntAlloc(3)
allocate integer matrix
QccMatrixIntFree(3)
free integer matrix
QccMatrixIntZero(3)
zero integer matrix
QccMatrixIntCopy(3)
copy integer matrix
QccMatrixIntResize(3)
resize integer matrix
QccMatrixIntMaxValue(3)
find largest element in integer matrix
QccMatrixIntMinValue(3)
find smallest element in integer matrix
QccMatrixIntPrint(3)
print integer matrix to stdout
QccMatrixIntTranspose(3)
transpose integer matrix
QccMatrixIntAdd(3)
adds two matrices
QccMatrixIntSubtract(3)
subtracts one integer matrix from another
QccMatrixIntMean(3)
calculate mean of integer-matrix elements
QccMatrixIntVariance(3)
calculate variance of integer-matrix elements
QccMatrixIntVectorMultiply(3)
multiply integer matrix on the right by a column vector
QccMatrixIntMultiply(3)
multiply two integer matrices

Volume Mathematics

QccVolumeAlloc(3)
allocate volume
QccVolumeFree(3)
free volume
QccVolumeZero(3)
zero volume
QccVolumeResize(3)
resize volume
QccVolumeCopy(3)
copy volume
QccVolumeMaxValue(3)
find largest element in volume
QccVolumeMinValue(3)
find smallest element in volume
QccVolumePrint(3)
print volume to stdout
QccVolumeAdd(3)
adds two volumes
QccVolumeSubtract(3)
subtracts one volume from another
QccVolumeMean(3)
calculate mean of volume elements
QccVolumeVariance(3)
calculate variance of volume elements

Integer-Volume Mathematics

QccVolumeIntAlloc(3)
allocate integer volume
QccVolumeIntFree(3)
free integer volume
QccVolumeIntZero(3)
zero integer volume
QccVolumeIntResize(3)
resize integer volume
QccVolumeIntCopy(3)
copy integer volume
QccVolumeIntMaxValue(3)
find largest element in integer volume
QccVolumeIntMinValue(3)
find smallest element in integer volume
QccVolumeIntPrint(3)
print integer volume to stdout
QccVolumeIntAdd(3)
adds two volumes
QccVolumeIntSubtract(3)
subtracts one integer volume from another
QccVolumeIntMean(3)
calculate mean of integer-volume elements
QccVolumeIntMean(3)
calculate variance of integer-volume elements

Fast Discrete Cosine Transform (DCT)

QccFastDCTInitialize(3)
initialize fast DCT
QccFastDCTCreate(3)
create fast DCT of a certain length
QccFastDCTFree(3)
free fast DCT
QccFastDCTForwardTransform1D(3)
forward 1D fast DCT
QccFastDCTInverseTransform1D(3)
inverse 1D fast DCT
QccFastDCTForwardTransform2D(3)
forward 2D fast DCT
QccFastDCTInverseTransform2D(3)
inverse 2D fast DCT

2D Regular Mesh

QccPointPrint(3)
print 2D point
QccPointCopy(3)
copy 2D point
QccPointAffineTransform(3)
affine-transform 2D point
QccTrianglePrint(3)
print 2D triangle
QccTriangleBoundingBox(3)
find bounding box of 2D triangle
QccTrianglePointInside(3)
determine if point is inside 2D triangle
QccTriangleCreateAffineTransform(3)
create affine transform between two triangles
QccRegularMeshInitialize(3)
initialize 2D regular mesh
QccRegularMeshAlloc(3)
allocate 2D regular mesh
QccRegularMeshFree(3)
free 2D regular mesh
QccRegularMeshGenerate(3)
generate uniformly spaced 2D regular mesh
QccRegularMeshNumTriangles(3)
calculate number of triangles in 2Dregular mesh
QccRegularMeshToTriangles(3)
extract triangles from 2D regular mesh

Signal Filtering

QccFilterInitialize(3)
initialize filter
QccFilterAlloc(3)
allocate filter
QccFilterFree(3)
free filter
QccFilterCopy(3)
copy filter
QccFilterReversal(3)
time-reversal of filter
QccFilterAlternateSignFlip(3)
alternate sign change of filter
QccFilterRead(3)
read filter from file
QccFilterWrite(3)
write filter to file
QccFilterPrint(3)
print filter
QccFilterVector(3)
perform FIR filtering of a one-dimensional signal
QccFilterMultiRateFilterVector(3)
perform FIR filtering of a one-dimensional signal in conjuction with sampling rate change of the signal
QccFilterMatrixSeparable(3)
perform separable FIR filtering of a two-dimensional signal

Bidirectional Linked List

QccListInitialize(3)
initialize list
QccListFreeNode(3)
free list node
QccListFree(3)
free all nodes of list
QccListCreateNode(3)
create new list node
QccListCopyNode(3)
copy list node
QccListCompareNodes(3)
compare two list nodes
QccListFindNode(3)
find a list node within a list
QccListLength(3)
calculate length of a list
QccListAppendNode(3)
append list node to end of list
QccListInsertNode(3)
insert list node into list
QccListSortedInsertNode(3)
insert list node into list maintaining sorted order
QccListRemoveNode(3)
remove list node from list
QccListDeleteNode(3)
remove list node from list and free node
QccListMoveNode(3)
move list node to another list
QccListSort(3)
sort a list
QccListConcatenate(3)
concatenate two lists
QccListPrint(3)
print list

QccBitBuffer Routines

QccBitBufferInitialize(3)
initialize bit buffer
QccBitBufferStart(3)
start read or write to bit buffer
QccBitBufferEnd(3)
end read or write to bit buffer
QccBitBufferFlush(3)
flush bit buffer to file at end of write
QccBitBufferCopy(3)
copies bits from one bit buffer to another
QccBitBufferPutBit(3)
output bit to buffer
QccBitBufferGetBit(3)
input bit from buffer
QccBitBufferPutBits(3)
output bits to buffer
QccBitBufferGetBits(3)
input bits from buffer
QccBitBufferPutChar(3)
output char to buffer
QccBitBufferGetChar(3)
input char from buffer
QccBitBufferPutInt(3)
output int to buffer
QccBitBufferGetInt(3)
input int from buffer
QccBitBufferPutDouble(3)
output double to buffer
QccBitBufferGetDouble(3)
input double from buffer

QccFifo Routines

QccFifoInitialize(3)
initialize fifo
QccFifoStart(3)
start fifo
QccFifoEnd(3)
end fifo
QccFifoFlush(3)
flush fifo
QccFifoRestart(3)
restart fifo

QccDataset Routines

QccDatasetInitialize(3)
initialize dataset
QccDatasetAlloc(3)
allocate dataset
QccDatasetFree(3)
free dataset
QccDatasetGetBlockSize(3)
get block size of dataset
QccDatasetPrint(3)
print dataset
QccDatasetCopy(3)
copy dataset
QccDatasetReadWholefile(3)
read entire dataset
QccDatasetReadHeader(3)
read header of dataset
QccDatasetStartRead(3)
start read of dataset
QccDatasetEndRead(3)
end read of dataset
QccDatasetReadBlock(3)
read a block of data from dataset
QccDatasetReadSlidingBlock(3)
read a sliding block of data from dataset
QccDatasetWriteWholefile(3)
write entire dataset
QccDatasetWriteHeader(3)
write header of dataset
QccDatasetStartWrite(3)
start write of dataset
QccDatasetEndWrite(3)
end write of dataset
QccDatasetWriteBlock(3)
write a block of data to dataset
QccDatasetSetMaxMinValues(3)
set maximum and minimum vector component values for dataset
QccDatasetMSE(3)
calculate mean squared error (MSE) between two datasets
QccDatasetMeanVector(3)
calculate mean of dataset
QccDatasetCovarianceMatrix(3)
calculate covariance matrix of dataset
QccDatasetCalcVectorPowers(3)
calculate the power (squared norm) of the vectors of a dataset

QccChannel Routines

QccChannelInitialize(3)
initialize channel
QccChannelAlloc(3)
allcoated channel
QccChannelFree(3)
free channel
QccChannelGetBlockSize(3)
get block size of channel
QccChannelPrint(3)
print channel
QccChannelReadWholefile(3)
read entire channel
QccChannelReadHeader(3)
read header of channel
QccChannelStartRead(3)
start read of channel
QccChannelEndRead(3)
end read of channel
QccChannelReadBlock(3)
read a block of symbols from channel
QccChannelWriteWholefile(3)
write entire channel
QccChannelWriteHeader(3)
write header of channel
QccChannelStartWrite(3)
start write of channel
QccChannelEndWrite(3)
end write of channel
QccChannelWriteBlock(3)
write a block of symbols to channel
QccChannelNormalize(3)
normalize channel
QccChannelDenormalize(3)
denormalize channel
QccChannelGetNumNullSymbols(3)
count the null symbols in channel
QccChannelRemoveNullSymbols(3)
remove null symbols from channel
QccChannelEntropy(3)
calculate entropy of symbols of channel
QccChannelAddSymbolToChannel(3)
add a symbol to channel

UTILITY PROGRAMS

arithmetic_sequence(1)
output arithmetic sequence of numbers
asciitodat(1)
convert file from ASCII to DAT format
dattoascii(1)
convert file from DAT format to ASCII
chnentropy(1)
calculate entropy of channel
datcat(1)
concatenate DAT-format files
datcut(1)
cut a section from a DAT-format file
datdist(1)
calculate the distortion between two DAT files
geometric_sequence(1)
output geometric sequence of numbers
printfile(1)
print file
spawn(1)
runs a shell script or program in the background

SEE ALSO

QccPackENT(3) , QccPackSQ(3) , QccPackVQ(3) , QccPackAVQ(3) , QccPackIMG(3) , QccPackWAV(3) , QccPackVID(3) QccPackHYP(3)

AUTHOR

Copyright (C) 1997-2016 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads