📄 contents.m
字号:
% Arithmetic Coding
% Reference :
% [1] Arithmetic Coding For Data Compression
% Ian H.Witten , Radford M.Neal, John G.Cleary
% [2] Embedded Image Coding Using Zerotrees of wavelet coefficients
% Jerome M.Shapiro
% The program is just a conversion from C program given in [1] to MATLAB program.
% ************** THIS CODE IS NOT OPTIMIZED **************
% Although contains some changes, but effectively it is the same program as in [1]
% i.e The input is taken from a file named text.txt
% Almost all the variables in the program are GLOBAL, this makes the program easier
% to understand and few are static to the program and will be specified using PERSISTENT.
% All the variables and function names are same as used in [1].
% Comments have been added to make things easier, in any case user is reffered to [1].
% Please Contact the author for any Criticism or Appreciation :
% Ravi Lakkundi, M.Tech (Digital Electronics)
% SDM College of Engineering and Technology
% Dhavalgiri,Dharwad - 580002
% Karnataka, INDIA
% Ph: 0091-0836-2223037
% E-mail : ravilakkundi@rediffmail.com
% Author : I will be really glad to hear from you a word, just put a mail across.
% This program was written to test Embedded Image Coding [2], although EZW using Arithmetic coding
% will be dealt later.
% FUNCTION NAMES FOR ENCODING
% ******************** Functions for encoding ********************
% 1. main_encode : Main program for encoding
% 2. start_model_fixed : Initializes variables, arrays etc for the use of fixed model
% 2a. start_model_adaptive : Initializes variables, arrays etc for the use of adaptive model
% 3. start_outputting_bits : Outputs the bits after encoding
% 4. start_encoding : Initializes encoding function
% 5. encode_symbol : Encodes the given symbol
% 6. update_model_fixed : Updates the model ( NULL )
% 6a. update_model_adaptive : Updates the model
% 7. done_encoding : Assigns the last two bits
% 8. done_outputting_bits : Refer [1]
% 9. bit_plus_follow : Bits in Range between [1/4,3/4], Refer [1]
% 10. output_bit : Output byte ! (yes), bits in groups of 8 ,to a file compressed.txt
% If user is using fixed models use 'start_model_fixed' with 'update_model_fixed'
% else if adaptive use 'start_model_adaptive' with 'update_model_adaptive'
% In the program enter CHOICE 1 and 2, for fixed and adaptive respectively
% FUNCTION NAME FOR DECODING
% ******************** Functions for decoding ********************
% 1. main_decode : main program for decode
% 2. start_model_fixed : Same as above
% 2a. start_model_adaptive : Same as above
% 3. start_inputting_bits : Gets the initial bits for decoding
% 4. start_decoding : Initializes decoding function
% 5. decode_symbol : Decodes the given bit
% 6. update_model_fixed : Updates the model ( NULL )
% 6b. update_model_adaptive : Updates the model
% 7. input_bit : Get bits in order
% Please report for any BUGS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -