int QccWAVSubbandPyramid3DInitialize(QccWAVSubbandPyramid3D
*subband_pyramid);
int QccWAVSubbandPyramid3DAlloc(QccWAVSubbandPyramid3D
*subband_pyramid);
void QccWAVSubbandPyramid3DFree(QccWAVSubbandPyramid3D
*subband_pyramid);
int QccWAVSubbandPyramid3DNumLevelsToNumSubbandsDyadic(int
num_levels);
int QccWAVSubbandPyramid3DNumLevelsToNumSubbandsPacket(int
temporal_num_levels, int spatial_num_levels);
int QccWAVSubbandPyramid3DNumSubbandsToNumLevelsDyadic(int
num_subbands);
int QccWAVSubbandPyramid3DCalcLevelFromSubbandDyadic(int
subband, int num_levels);
int QccWAVSubbandPyramid3DCalcLevelFromSubbandPacket(int
subband, int temporal_num_levels, int spatial_num_levels, int *temporal_level,
int *spatial_level);
int QccWAVSubbandPyramid3DSubbandSize(const QccWAVSubbandPyramid3D
*subband_pyramid, int subband, int *subband_num_frames, int *subband_num_rows,
int *subband_num_cols);
int QccWAVSubbandPyramid3DSubbandOffsets(const
QccWAVSubbandPyramid3D *subband_pyramid, int subband, int *frame_offset,
int *row_offset, int *col_offset);
int QccWAVSubbandPyramid3DPrint(const
QccWAVSubbandPyramid3D *subband_pyramid);
typedef struct
{
QccString filename;
QccString magic_num;
int major_version;
int minor_version;
int transform_type;
int temporal_num_levels;
int spatial_num_levels;
int num_frames;
int num_rows;
int num_cols;
int origin_frame;
int origin_row;
int origin_col;
int subsample_pattern_frame;
int subsample_pattern_row;
int subsample_pattern_col;
QccVolume volume;
} QccWAVSubbandPyramid3D;
The fields of QccWAVSubbandPyramid3D are as follows:
The SPBT file format consists of the following information:
where SPBT is the magic number, X.X is the version number, <white space> is white space and/or comment lines, T is the transform type (either QCCWAVSUBBANDPYRAMID3D_DYADIC or QCCWAVSUBBANDPYRAMID3D_PACKET), L is the number of levels of temporal decomposition (not present if T is QCCWAVSUBBANDPYRAMID3D_PACKET), S is the number of levels of spatial decomposition, C is the number of columns of the subband-pyramid image cube, R is the number of rows, F is the number of frames, and ikmn is the coefficient for the kth frame, mth row, nth column of the subband-pyramid image cube. T, L, S, C, R, and F are stored in ASCII. The image cube itself, ikmn, is stored as binary floating-point numbers (4 bytes each, MSB first, see QccFileWriteDouble(3) ). The values of L and S give the number of decompositions in the volume of coefficients. If S = 0, (and L = 0 for a wavelet-packet decomposition), the image cube has not been decomposed.SPBTX.X
<white space>
T
[L] S
C R F
i111 i112...
i121 i122...
i211 i212...
.
.
.
filename: NULL string
magic_num: QCCSUBBANDPYRAMID3D_MAGICNUM
major_version, minor_version: initialized to output of QccGetQccPackVersion(3)
transform_type: QCCWAVSUBBANDPYRAMID3D_PACKET
temporal_num_levels: 0
spatial_num_levels: 0
num_frames: 0
num_rows: 0
num_cols: 0
origin_frame 0
origin_row 0
origin_col 0
subsample_pattern_frame: 0
subsample_pattern_row: 0
subsample_pattern_col: 0
volume: NULL
QccWAVSubbandPyramid3DAlloc() allocates storage space for subband_pyramid->volume. If subband_pyramid->volume is not NULL, QccWAVSubbandPyramid3DAlloc() returns immediately without changing the state of any memory allocation. Otherwise, the subband_pyramid->volume array is allocated. The fields subband_pyramid->num_frames, subband_pyramid->num_rows, and subband_pyramid->num_cols must be set prior to calling QccWAVSubbandPyramid3DAlloc().
QccWAVSubbandPyramid3DFree() frees the subband_pyramid->volume array previously allocated by QccWAVSubbandPyramid3DAlloc().
QccWAVSubbandPyramid3DNumLevelsToNumSubbandsDyadic() calculates the number of subbands in a dyadic subband pyramid with num_levels levels. This value is num_levels * 7 + 1.
QccWAVSubbandPyramid3DNumLevelsToNumSubbandsPacket() calculates the number of subbands in a wavelet-packet subband pyramid with temporal_num_levels temporal levels and spatial_num_levels spatial levels. This value is QccWAVSubbandPyramidNumLevelsToNumSubbands( spatial_num_levels) * temporal_num_levels + 1.
QccWAVSubbandPyramid3DNumSubbandsToNumLevelsDyadic() calculates the number of levels in a dyadic subband pyramid with num_subbands subbands.
QccWAVSubbandPyramid3DCalcLevelFromSubbandDyadic() calculates the level of the specified subband in a dyadic subband pyramid with num_levels levels. Here, subband gives the subband number of the subband in the pyramid.
QccWAVSubbandPyramid3DCalcLevelFromSubbandPacket() calculates the levels of the specified subband in a wavelet-packet subband pyramid with temporal_num_levels temporal levels and spatial_num_levels spatial levels. Here, subband gives the subband number of the subband in the pyramid. The temporal level of the specified subband is returned in temporal_level while the spatial level of the subband is returned in spatial_level.
QccWAVSubbandPyramid3DSubbandSize() calculates the size of the specified subband in subband_pyramid. The size of the subband is returned in subband_num_frames, subband_num_rows, and subband_num_cols, which must be allocated prior to calling QccWAVSubbandPyramid3DSubbandSize().
QccWAVSubbandPyramid3DSubbandOffsets() calculates the location in subband_pyramid->volume of the specified subband. The frame, row, and column offsets are returned in frame_offset, row_offset, and col_offset, respectively, which must be allocated prior to calling QccWAVSubbandPyramid3DSubbandOffsets().
QccWAVSubbandPyramid3DPrint() prints the contents of subband_pyramid to stdout.
B.-J. Kim, Z. Xiong, and W. A. Pearlman, "Low Bit-Rate Scalable Video Coding with 3-D Set Partitioning in Hierarchical Trees (3-D SPIHT)," IEEE Transactions on Circuits and Systems for Video Technology, vol. 10, no. 8, pp. 1374-1387, December 2000.
M. Antonini, M. Barlaud, P. Mathieu, and I. Daubechies, "Image Coding Using Wavelet Transform," IEEE Transactions on Image Processing, vol. 1, pp. 205-220, April 1992.