wpc.comp.dwpt.2d.lib

来自「su 的源代码库」· LIB 代码 · 共 78 行

LIB
78
字号
WPC - routines for compress a 2D seismic section using wavelet packets wpcCompress	compress a 2D sectionwpcUncompress	uncompress and generate a 2D sectionwpcN1		obtain the # of samples in the fast dimensionwpcN2		obtain the # of samples in the slow dimensionwpcSize		length of the compressed bit streamwpcFree		free up the space for the compressed datawpcWrite	write the compressed data to a filewpcRead		read compressed data from a file Function Prototypes:void *wpcCompress(float *f, int n1, int n2, float error, int *nbytes);int wpcUncompress(void *w, float *f);int wpcN1(void *wpc);int wpcN2(void *wpc);int wpcSize(void *wpc);void wpcFree(void *wpc);wpcCompress:Input:f	pointer to the 2D sectionn1	# of samples in the fast dimensionn2	# of samples in the slow dimensionerror	relative RMS error tolerable during compressionOutput:nbytes	# of bytes after compression Return:	pointer to the compressed datawpcUncompress:Input:w	pointer to the compressed dataOutput:f	pointer to the uncompress 2D sectionReturn:	consistency flag, 1 if wpcCompressed data, 0 otherwisewpcN1:Input:wpc	pointer to the compressed dataReturn:	# of samples in the fast dimension	wpcN2:Input:wpc	pointer to the compressed dataReturn:	# of samples in the slow dimension	wpcSize:Input:wpc	pointer to the compressed dataReturn:	# of bytes after compressionwpcFree:Input:wpc	pointer to the compressed datawpcWrite:Input:wpc	pointer to the compressed datafp	file pointer to which to writewpcRead:Input:fp	file pointer to which to writeReturn:	pointer to the compressed datawpcCompress:Notes:The compression is done block by block, so the data is tiled first.The size of the tiling is set in the routine wpcInitConfig. Those numbers are obtained empirically. To support upgrading, the numbers and the filter parameters are stored as the header.	Since we cannot determine the size of the output before compression,memory is allocated within this routine, and adjusted after thecompression.  Author:		Tong Chen, 07/27/94

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?