资源简介
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
相关资源
- LDA的matlab版本Latent Dirichlet Allocation
- 小脑神经网络进行正弦函数拟合的m
- 多输入多输出RBF神经网络MATLAB程序
- 灰色关联度matlab程序
- 几个典型混沌系统的Matlab仿真实现
- 基于Matlab实现的指纹图像细节特征提
- 灰度图像 伪彩色处理 matlab
-
matlab 语音信号处理 enfr
ame.m - Matlab调用NI数据采集卡采集两路型号
- DFT计算相位差MATLAB程序
- matlab ode45使用方法
- 用chebyshev方法求e^x的三次最佳逼近
- 元胞自动机matlab仿真程序
- HOG方向梯度直方图matlab源程序
- NSGA-II matlab程序+by Aravind Seshadri
- SVD算法的MATLAB实现代码
- FCM聚类算法,可直接matlab运行
- HMM的Matlab代码
- GM11模型matlab程序
- 机械优化设计之二次插值法matlab
- matlab GUI计算器设计
- 通过matlab读取同一路径下多个txt或者
- 无线定位基本算法Matlab
- 转差频率控制的的电机仿真模型
- Rossler_混沌系统Lyapunov指数Matlab实现代
- 基于matlab的医学脑部分割
- 基于MATLAB的语音信号处理课程设计
- Matlab基于全局阈值处理的图像二值分
- matlab仿真PID控制系统
- 使用遗传算法优化BP神经网络权值 的
评论
共有 条评论