avqrate reads a channel, channelfile (CHN format), and side information, sideinfofile (SID format), both produced by one of the following AVQ programs: gtrencode(1) , paulencode(1) , or gyencode(1) . It estimates the bit rate, in terms of number of bits per original source symbol, achieved by the algorithm. The calculation of the bit rate varies for each algorithm as described below. avqrate determines which specific calculation to use based on the program_name field specified in the header of sideinfofile. codebook_coder gives the scalar quantizer used to produce the side information.
R = (Nc + Ns)/N/dim
where N is the total number of original source vectors, dim is the vector dimension, Nc is the number of bits used in the VQ channel, and Ns is the total number of bits of side information. Nc is estimated from the first-order entropy of the VQ channel as Nc = Hc*(N - Nr), where Hc is the first-order entropy of the channel and Nr is the number of times the codebook was updated during encoding.
Unless -noent is specified, Ns is estimated as the first-order entropy of the update flags used by the algorithm plus the first-order entropy of the components of the update vectors. If -noent is specified, entropy estimation of side information is disabled; that is, each update flag counted as one bit and a fixed-length block code is assumed for the update-vector components.
avqrate prints R, Nc/N/dim, and Ns/N/dim to stdout, unless option -vo is given, in which case only R is output.
R = (Rc + Rs)/dim
where dim is the vector dimension, Rc is the rate of the VQ channel, and Rs is the rate of side information. Rc is simply the first-order entropy of the VQ channel. Rs is calculated as Rs = Ns / N, where Ns is the number of bits of side information and N is the total number of original source vectors.
Unless -noent is specified, Ns is estimated as the first-order entropy of the update addresses used by the algorithm plus the first-order entropy of the components of the update vectors. If -noent is specified, entropy estimation of side information is disabled; that is, a fixed-length block code is assumed for the both the update addresses and the update-vector components.
avqrate prints R, Rc/dim, and Rs/dim to stdout, unless option -vo is given, in which case only R is output.