资源简介
matlab 算术编码的实现(编解码)
有编解码的举例。内容详细。由国外的 Karl Skretting编写

代码片段和文件信息
function varargout = Arith06(xC)
% 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(21); 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.
% The actual coding algorithm is practical identical it is a translation
% from C code to MatLab code but some differences have been made.
% The system model T keep record of the symbols that have been encoded.
% based on this table the probabiltity of each symbol is estimated. Probability
% for symbol m is: (T(m+1)-T(m+2))/T(1)
% The symbols are 01...M and Escape (M+1) Escape is used to indicate an
% unused symbol which is then coded by another table the Tu table.
% POSSIBLE IMPROVEMENTS
% - better decision wether to split a sequence or not
% - for long sequences update frequency table T=floor(T*a) (ex: 0.2 < a < 0.9)
% and do this for every La samples (ex: 100 < La < 5000)
% We must not set any non-zero probabilities to zero during this adaption!!
% - Display some information (so users know something is happening)
%----------------------------------------------------------------------
% Copyright (c) 1999-2001. Karl Skretting. All rights reserved.
% Hogskolen in Stavanger (Stavanger University) Signal Processing Group
% Mail: karl.skretting@tn.his.no Homepage: http://www.ux.his.no/~karlsk/
%
% HISTORY:
% Ver. 1.0 1
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 19115 2012-09-22 10:43 matlab 算术编码及解码的实现\Arith06.m
I.A.... 30008 2012-09-22 10:43 matlab 算术编码及解码的实现\Arith07.m
目录 0 2012-09-22 10:45 matlab 算术编码及解码的实现
----------- --------- ---------- ----- ----
49123 3
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论