📄 wpc1.comp.dwpt.1d.lib
字号:
WPC1 - routines for compress a single seismic trace using wavelet packets wpc1Compress compress a single tracewpc1Uncompress uncompress and generate a single tracewpc1Numsmp obtain the # of sampleswpc1Size length of the compressed bit streamwpc1Free free up the space for the compressed datawpc1Write write the compressed data to a filewpc1Read read compressed data from a file Function Prototypes:void *wpc1Compress(float *f, int n1, float error, int *nbytes);int wpc1Uncompress(void *w1, float *f);int wpc1Numsmp(void *wpc1);int wpc1Size(void *wpc1);void wpc1Free(void *wpc1);void wpc1Write (void *wpc1, FILE *fp);void *wpc1Read (FILE *fp);wpc1Compress:Input:f pointer to the tracen1 # of samples in the traceerror relative RMS error tolerable during compressionOutput:nbytes # of bytes after compression Return: pointer to the compressed datawpc1Uncompress:Input:w1 pointer to the compressed traceOutput:f pointer to the uncompressed traceReturn: consistency flag, 1 if wpc1Compressed data, 0 otherwisewpc1Numsmp:Input:wpc1 pointer to the compressed dataReturn: # of samples per tracewpc1Size:Input:wpc1 pointer to the compressed dataReturn: # of bytes after compressionwpc1Free:Input:wpc pointer to the compressed datawpc1Write:Input:wpc1 pointer to the compressed datafp file pointer to which to writewpc1Read:Input:fp file pointer to which to writeReturn: pointer to the compressed datawpc1Compress:Notes:The compression here is done block by block, so the data is tiled first. For a single trace, to reduce the overhead, the shape gainsof each block are also quantized, but using 16bit, to maintain theaccuracy. Also, to reduce overhead, the last block (non-regularblock) is NOT transformed at all if it is shorter than halfof the tile size. If it is longer than half of the tile size, zeropadding is performed. An upgrade to the mixed-radixversion is expected soon. The size of the tiling is set in the routine wpcInitConfig. Those numbers are obtained empirically. Since we cannot determine the size of the output before compression,memory is allocated within this routine, and adjusted after thecompression. Author: Tong Chen, 08/04/94
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -