📄 vqencode.3
字号:
.\" Copyright (c) 1987 Entropic Speech, Inc.; All rights reserved.\" @(#)vqencode.3 1.6 11 Aug 1991 ESI.TH VQENCODE 3\-ESPSsp 11 Aug 1991.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..SH NAMEvqencode \- vector quantize a single feature vector using a full-search codebook.SH SYNOPSIS.ft B.nflongvqencode(fea, fea_dim, codebook, cbk_size, cbk_dim, dist_val, distort, dist_err)float *fea; \fI/*feature vector to be encoded*/\fPlong fea_dim; \fI/*dimension of feature vector*/\fPfloat **codebook; \fI/*the full search vq codebook*/\fPlong cbk_size; \fI/*number of codewords in codebook*/\fPlong cbk_dim; \fI/*dimension of each codeword*/\fPdouble *dist_val; \fI/*distortion between fea and selected codeword*/\fPdouble (*distort)(); \fI/*routine to compute distortions*/\fPint *dist_err; \fI/*for passing back errors from distort*/\fP.fi.ft.SH DESCRIPTION.PP.I vqencodetakes a feature vector.I feaof length .I fea_dimand searches the full-search vector quantization codebook .I codebookfor the closest codeword. The index of the closest codeword isreturned as the function value. Thus if .I indis the return value from .I vqencode,then \fIcodebook\fR[\fIind\fR] is a pointer to the closest codeword. The distortion value between .I feaand this codeword is returned via the parameter.I dist_val. .PPThe.I codebookparameter is interpreted as a pointer to a matrix of floats containing.I cbk_sizerows of .I cbk_dimencolumns each. Space for this matrix must be allocated by the calling program \- such a pointer can be assigned bymeans of .I f_mat_alloc(3\-ESPSu). Such codebook matrices correspond to the .I codebookelement of the struct vqcbk (see .I vqdesign(3\-ESPSsp)). .PPThe distortion measure used in searching .I codebookis passed to .I vqencodeas the function pointer.I distort. If \fIdistort\fR == NULL, a mean-square-error distortion is used, inwhich case \fIvqencode\fP requires that \fIfea_dim\fP and\fIcbk_dim\fP be the same (it exits with an assertion violation ifthis is not the case). Otherwise, the indicated function is called tocompute distortions. For the required synopsis of.I distort,see .I vqdesign(3\-ESPSsp). Valid distortion functions include in their synopsis an error return value, and this value is passed back to the caller of .I vqencodevia the parameter.I dist_err. Thus, if .I *dist_erris non-zero after .I vqencodereturns, then an error was detected when.I vqencodecalled .I distort. .SH EXAMPLE.SH BUGSNone known..SH SEE ALSO.PPvqdesign(3\-ESPSsp), f_mat_alloc (3\-ESPSu), vqdes(1\-ESPS), vq(1\-ESPS).SH REFERENCES.PPSee.I vqdesign(3\-ESPSsp).SH AUTHORManual page and program by John Shore.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -