code_blocs.m
来自「用matlab实现的JPEG算法」· M 代码 · 共 44 行
M
44 行
% --------------------------------------------------------
% nom : code_blocs.m
% utilisation :
%-------------
%
% [paquet] = code_blocs(M_sb,txcb,tycb,type_sb) ;
%
% codage en par blocs d'une sous-bande M_sb
%
% txcb : largeur d'un bloc
% tycb : hauteur d'un bloc
% type_sb : type de sous-bande:
% - LL = 0
% - LH = 1
% - HL = 2
% - HH = 3
%
%
% -------voir aussi 'decode_blocs' 'jp1_get_sb' 'jp1_add_sb'
function [paquet] = code_blocs(M_sb,ntxcb,ntycb,type_sb)
% typage et appel de la routine C,
% permet d'avoir une aide sous MATLAB
if ntxcb > 64
ntxcb= 32 ;
end
if ntycb > 64
ntycb= 32 ;
end
if ntxcb < 4
ntxcb = 4 ;
end
if ntycb < 4
ntycb = 4 ;
end
txcb = uint16(ntxcb);
tycb = uint16(ntycb);
type_sb = uint16(type_sb);
[paquet]=fct_code_blocs(M_sb,txcb,tycb,type_sb) ;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?