comp - List of m-files, with initial comments lines, from...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: List of m-files, with initial comments lines, from f:\matlab\Comp\*.m . This list was printed 21-Feb-2011 09:29:38 by the MakeTex.m function. contents.m 981 bytes 21-feb-2011 09:26:00 % Text describing the m-files in directory f:\matlab\Comp % File generated by mkcontnt.m 21-Feb-2011 09:25:59 % % Arith06 Arithmetic encoder or decoder % Arith07 Arithmetic encoder or decoder % entropy Function returns first order entropy of a source. % eob3 End Of Block Encoding (or decoding) into (from) three sequences % Huff06 Huffman encoder/decoder with (or without) recursive splitting % HuffCode Based on the codeword lengths this function find the Huffman codewords % HuffLen Find the lengths of the Huffman code words % HuffTabLen Find how many bits we need to store the Huffman Table information % HuffTree Make the Huffman-tree from the lengths of the Huffman codes % Mat2Vec Convert an integer matrix to a cell array of vectors, % TestArith Test and example of how to use Arith06 and Arith07 % TestHuff Test and example of how to use Huff06 % uniquant Uniform scalar quantizer (or inverse quantizer) with threshold Arith06.m 19115 bytes 28-jun-2001 20:54:02 % Arith06 Arithmetic encoder or decoder % Vectors of integers are arithmetic encoded, % these vectors are collected in a cell array, xC. % If first argument is a cell array the function do encoding, % else decoding is done. % [y, Res] = Arith06(xC); % encoding % y = Arith06(xC); % encoding % xC = Arith06(y); % decoding % ------------------------------------------------------------------ % Arguments: % y a column vector of non-negative integers (bytes) representing % the code, 0 <= y(i) <= 255. % Res a matrix that sum up the results, size is (NumOfX+1)x4 % one line for each of the input sequences, the columns are % Res(:,1) - number of elements in the sequence % Res(:,2) - unused (=0) % Res(:,3) - bits needed to code the sequence % Res(:,4) - bit rate for the sequence, Res(:,3)/Res(:,1) % Then the last line is total (which include bits needed to store NumOfX) % xC a cell array of column vectors of integers representing the % symbol sequences. (should not be to large integers) % If only one sequence is to be coded, we must make the cell array % like: xC=cell(2,1); xC{1}=x; % where x is the sequence % ------------------------------------------------------------------ % Note: this routine is extremely slow since it is all Matlab code % This function do recursive encoding like Huff06. % An alternative (a perhaps better) aritmethic coder is Arith07, % which is a more "pure" arithmetic coder % SOME NOTES ON THE FUNCTION % The descrition of the encoding algorithm is in % chapter 5 of "The Data Compression Book" by Mark Nelson....
View Full Document

Page1 / 8

comp - List of m-files, with initial comments lines, from...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online