亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? huff06.m

?? 算術(shù)編碼
?? M
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
   end;
   [bits1, temp] = EncodeVector(x1, bits1, HL1, Maxx1, Meanx1);
   [bits2, temp] = EncodeVector(x2, bits2, HL2, Maxx2, Meanx2);
   bits=bits1+bits2+1;
else
   bits=bits+1;      % this is how many bits we are going to write
   if Debug
      disp(['EncodeVector: Level=',int2str(Level),'  ',int2str(L),...
            ' sybols stored in ',int2str(bits),' bits.']);
   end
   if Speed
      % advance Byte and BitPos without writing to y
      Byte=Byte+floor(bits/8);
      BitPos=BitPos-mod(bits,8);
      if (BitPos<=0); BitPos=BitPos+8; Byte=Byte+1; end;
   else
      % put the bits into y
      StartPos=Byte*8-BitPos;     % control variable
      PutBit(0);       % indicate that a sequence is coded
      PutVLIC(L);       
      PutHuffTab(HL);
      HK=huffcode(HL);
      for i=1:L;
         n=x(i)+1;    % symbol number (value 0 is first symbol, symbol 1)
         for k=1:HL(n)
            PutBit(HK(n,k));
         end
      end
      % check if one has used as many bits as calculated
      BitsUsed=Byte*8-BitPos-StartPos;
      if (BitsUsed~=bits)
         disp(['L=',int2str(L),'  max(x)=',int2str(max(x)),'  min(x)=',int2str(min(x))]);
         disp(['BitsUsed=',int2str(BitsUsed),'  bits=',int2str(bits)]);
         error(['Huff06-EncodeVector: Logical error, (BitsUsed~=bits).']); 
      end
   end
end
Level = Level + 1;
return    % end of EncodeVector

function x = DecodeVector
global y Byte BitPos
MaxL=50000;      % as in the EncodeVector function (line 216)
if GetBit
   x1=DecodeVector;
   x2=DecodeVector;
   L=length(x1)+length(x2);
   if (L>MaxL)
      x=[x1(:);x2(:)];
   else
      xm=median([x1;x2]);
      x=zeros(L,1);
      x(1)=x2(1);
      i1=0;i2=1;
      for i=2:L
         if (x(i-1) <= xm) 
            i1=i1+1; x(i)=x1(i1);
         else
            i2=i2+1; x(i)=x2(i2);
         end
      end
   end
else
   L=GetVLIC;
   if (L>1)
      x=zeros(L,1);
      HL=GetHuffTab;
      if length(HL)
         Htree=HuffTree(HL);
         root=1;pos=root;     
         l=0;  % number of symbols decoded so far
         while l<L
            if GetBit
               pos=Htree(pos,3);
            else
               pos=Htree(pos,2);
            end
            if Htree(pos,1)           % we have arrived at a leaf
               l=l+1;
               x(l)=Htree(pos,2)-1;   % value is one less than symbol number
               pos=root;              % start at root again
            end
         end
      else     % HL has length 0, that is empty Huffman table
         x=x+GetVLIC;
      end
   elseif L==0
      if GetBit
         % this is a Run + Value coded sequence
         x1=DecodeVector;
         x2=DecodeVector;
         % now build the actual sequence
         I=x1;      % runs  
         I=I+1;
         L=length(I);  % one more than the number of values in x
         for i=2:L;I(i)=I(i-1)+I(i); end;
         x=zeros(I(L)-1,1);
         x(I(1:(L-1)))=x2;  % values
      else
         x=[];    % this was really a length 0 sequence
      end
   elseif L==1
      x=GetVLIC;
   else
      error('DecodeVector: illegal length of sequence.');
   end
end
return    % end of DecodeVector

% Functions to write and read the Huffman Table Information
% The format is defined in HuffTabLen, we repeat it here
% Function assume that the table information is stored in the following format
%        previous symbol is set to the initial value 2, Prev=2
%        Then we have for each symbol a code word to tell its length 
%         '0'             - same length as previous symbol
%         '10'            - increase length by 1, and 17->1
%         '1100'          - decrease length by 1, and 0->16
%         '11010'         - increase length by 2, and 17->1, 18->2
%         '11011'         - One zero, unused symbol (twice for two zeros)
%         '111xxxx'       - set code length to CL=Prev+x (where 3 <= x <= 14)
%                           and if CL>16; CL=CL-16
%        we have 4 unused 7 bit code words, which we give the meaning
%         '1110000'+4bits - 3-18 zeros
%         '1110001'+8bits - 19-274 zeros, zeros do not change previous value
%         '1110010'+4bits - for CL=17,18,...,32, do not change previous value
%         '1111111'       - End Of Table

function PutHuffTab(HL)
global y Byte BitPos

HL=HL(:);
% if (max(HL) > 32) 
%    disp(['PutHuffTab: To large value in HL, max(HL)=',int2str(max(HL))]); 
% end
% if (min(HL) < 0)
%    disp(['PutHuffTab: To small value in HL, min(HL)=',int2str(min(HL))]); 
% end
Prev=2;
ZeroCount=0;
L=length(HL);

for l=1:L
   if HL(l)==0
      ZeroCount=ZeroCount+1;
   else
      while (ZeroCount > 0)
         if ZeroCount<3
            for i=1:ZeroCount
               PutBit(1);PutBit(1);PutBit(0);PutBit(1);PutBit(1);
            end
            ZeroCount=0; 
         elseif ZeroCount<19 
            PutBit(1);PutBit(1);PutBit(1);PutBit(0);PutBit(0);PutBit(0);PutBit(0);
            for (i=4:-1:1); PutBit(bitget(ZeroCount-3,i)); end;
            ZeroCount=0; 
         elseif ZeroCount<275
            PutBit(1);PutBit(1);PutBit(1);PutBit(0);PutBit(0);PutBit(0);PutBit(1);
            for (i=8:-1:1); PutBit(bitget(ZeroCount-19,i)); end;
            ZeroCount=0; 
         else 
            PutBit(1);PutBit(1);PutBit(1);PutBit(0);PutBit(0);PutBit(0);PutBit(1);
            for (i=8:-1:1); PutBit(1); end;
            ZeroCount=ZeroCount-274; 
         end
      end
      if HL(l)>16
         PutBit(1);PutBit(1);PutBit(1);PutBit(0);PutBit(0);PutBit(1);PutBit(0);
         for (i=4:-1:1); PutBit(bitget(HL(l)-17,i)); end;
      else
         Inc=HL(l)-Prev;
         if Inc<0; Inc=Inc+16; end;
         if (Inc==0) 
            PutBit(0);
         elseif (Inc==1) 
            PutBit(1);PutBit(0);
         elseif (Inc==2) 
            PutBit(1);PutBit(1);PutBit(0);PutBit(1);PutBit(0);
         elseif (Inc==15) 
            PutBit(1);PutBit(1);PutBit(0);PutBit(0);
         else 
            PutBit(1);PutBit(1);PutBit(1);
            for (i=4:-1:1); PutBit(bitget(Inc,i)); end;
         end
         Prev=HL(l);
      end
   end
end
for (i=7:-1:1); PutBit(1); end;       % the EOT codeword

return;  % end of PutHuffTab

function HL=GetHuffTab
global y Byte BitPos

Debug=0;
Prev=2;
ZeroCount=0;
HL=zeros(10000,1);
HLi=0;
EndOfTable=0;

while ~EndOfTable
   if GetBit
      if GetBit
         if GetBit
            Inc=0;
            for (i=1:4); Inc=Inc*2+GetBit; end;
            if Inc==0
               ZeroCount=0;
               for (i=1:4); ZeroCount=ZeroCount*2+GetBit; end;
               HLi=HLi+ZeroCount+3;
            elseif Inc==1
               ZeroCount=0;
               for (i=1:8); ZeroCount=ZeroCount*2+GetBit; end;
               HLi=HLi+ZeroCount+19;
            elseif Inc==2           % HL(l) is large, >16
               HLi=HLi+1;
               HL(HLi)=0;
               for (i=1:4); HL(HLi)=HL(HLi)*2+GetBit; end;
               HL(HLi)=HL(HLi)+17;
            elseif Inc==15
               EndOfTable=1;
            else
               Prev=Prev+Inc;
               if Prev>16; Prev=Prev-16; end;
               HLi=HLi+1;HL(HLi)=Prev;
            end
         else
            if GetBit
               if GetBit
                  HLi=HLi+1;
               else
                  Prev=Prev+2;
                  if Prev>16; Prev=Prev-16; end;
                  HLi=HLi+1;HL(HLi)=Prev;
               end
            else
               Prev=Prev-1;
               if Prev<1; Prev=16; end;
               HLi=HLi+1;HL(HLi)=Prev;
            end
         end
      else
         Prev=Prev+1;
         if Prev>16; Prev=1; end;
         HLi=HLi+1;HL(HLi)=Prev;
      end
   else
      HLi=HLi+1;HL(HLi)=Prev;
   end
end
if HLi>0
   HL=HL(1:HLi);
else
   HL=[];
end

if Debug
   % check if this is a valid Huffman table
   temp=sum(2.^(-nonzeros(HL)));
   if temp ~=1
      error(['GetHuffTab: HL table is no good, temp=',num2str(temp)]);
   end
end

return;  % end of GetHuffTab

% Functions to write and read a Variable Length Integer Code word
% This is a way of coding non-negative integers that uses fewer 
% bits for small integers than for large ones. The scheme is:
%   '00'   +  4 bit  - integers from 0 to 15
%   '01'   +  8 bit  - integers from 16 to 271
%   '10'   + 12 bit  - integers from 272 to 4367
%   '110'  + 16 bit  - integers from 4368 to 69903
%   '1110' + 20 bit  - integers from 69940 to 1118479
%   '1111' + 24 bit  - integers from 1118480 to 17895695
%   not supported  - integers >= 17895696 (=2^4+2^8+2^12+2^16+2^20+2^24)
function PutVLIC(N)
global y Byte BitPos
if (N<0)
   error('Huff06-PutVLIC: Number is negative.'); 
elseif (N<16)
   PutBit(0);PutBit(0);
   for (i=4:-1:1); PutBit(bitget(N,i)); end;
elseif (N<272)
   PutBit(0);PutBit(1);
   N=N-16;
   for (i=8:-1:1); PutBit(bitget(N,i)); end;
elseif (N<4368)
   PutBit(1);PutBit(0);
   N=N-272;
   for (i=12:-1:1); PutBit(bitget(N,i)); end;
elseif (N<69940)
   PutBit(1);PutBit(1);PutBit(0);
   N=N-4368;
   for (i=16:-1:1); PutBit(bitget(N,i)); end;
elseif (N<1118480)
   PutBit(1);PutBit(1);PutBit(1);PutBit(0);
   N=N-69940;
   for (i=20:-1:1); PutBit(bitget(N,i)); end;
elseif (N<17895696)
   PutBit(1);PutBit(1);PutBit(1);PutBit(1);
   N=N-1118480;
   for (i=24:-1:1); PutBit(bitget(N,i)); end;
else
   error('Huff06-PutVLIC: Number is too large.'); 
end
return

function N=GetVLIC
global y Byte BitPos
N=0;
if GetBit
   if GetBit
      if GetBit
         if GetBit
            for (i=1:24); N=N*2+GetBit; end;
            N=N+1118480;
         else
            for (i=1:20); N=N*2+GetBit; end;
            N=N+69940;
         end
      else
         for (i=1:16); N=N*2+GetBit; end;
         N=N+4368;
      end
   else
      for (i=1:12); N=N*2+GetBit; end;
      N=N+272;
   end
else
   if GetBit
      for (i=1:8); N=N*2+GetBit; end;
      N=N+16;
   else
      for (i=1:4); N=N*2+GetBit; end;
   end
end
return

% Functions to write and read a Bit
function PutBit(Bit)
global y Byte BitPos
BitPos=BitPos-1;
if (~BitPos); Byte=Byte+1; BitPos=8; end; 
y(Byte) = bitset(y(Byte),BitPos,Bit);
return
   
function Bit=GetBit
global y Byte BitPos
BitPos=BitPos-1;
if (~BitPos); Byte=Byte+1; BitPos=8; end; 
Bit=bitget(y(Byte),BitPos);
return;
   
% this function is a variant of the standard hist function
function Hi=IntHist(W,i1,i2);
W=W(:);
%if (rem(i1,1) | rem(i2,1));   error('Non integers'); end;
L=length(W);
Hi=zeros(i2-i1+1,1);
if (i2-i1)>50
   for l=1:L
      i=W(l)-i1+1;
      Hi(i)=Hi(i)+1;
   end
else
   for i=i1:i2
      I=find(W==i);
      Hi(i-i1+1)=length(I);
   end
end
return;


?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日产欧美一区二区三区| 日韩精品视频网站| 亚洲va天堂va国产va久| 国产一区二区日韩精品| 91久久免费观看| 国产片一区二区| 日本aⅴ精品一区二区三区 | 综合亚洲深深色噜噜狠狠网站| 亚洲成人av在线电影| 成人网在线免费视频| 日韩欧美一级二级| 五月激情综合婷婷| 色哟哟在线观看一区二区三区| 精品久久人人做人人爱| 午夜精品福利一区二区蜜股av| av在线不卡免费看| 欧美国产一区二区| 国产精品77777| 日韩三级视频在线看| 午夜电影网一区| 欧美久久久久久久久中文字幕| 亚洲乱码国产乱码精品精98午夜| 国产精品一级黄| 久久综合九色综合97_久久久| 奇米色一区二区三区四区| 欧洲中文字幕精品| 夜夜嗨av一区二区三区四季av| 成人高清免费观看| 中文字幕高清不卡| 成人视屏免费看| 国产精品日韩成人| 不卡的电视剧免费网站有什么| 久久精品一区八戒影视| 国内精品不卡在线| 日本一区二区在线不卡| 成人h动漫精品一区二| 中文字幕一区二区三区精华液 | 中文字幕欧美激情| 国产精品一区专区| 欧美国产综合一区二区| 成人一区二区三区中文字幕| 中文在线一区二区 | 国产精品三级av| 成人污污视频在线观看| 中文字幕在线观看一区二区| 一本久久精品一区二区| 亚洲一区二区在线观看视频| 欧美在线不卡一区| 另类小说一区二区三区| 久久久综合视频| 91毛片在线观看| 天天色 色综合| 精品第一国产综合精品aⅴ| 国产suv精品一区二区6| 伊人一区二区三区| 欧美日韩激情一区二区| 国产一区999| 亚洲视频中文字幕| 欧美一区二区福利在线| 国产精品一级黄| 亚洲影院久久精品| 日韩精品综合一本久道在线视频| 高清在线不卡av| 天堂在线亚洲视频| 久久久欧美精品sm网站| 欧美艳星brazzers| 国产精品一区二区x88av| 一区二区三区中文字幕精品精品 | 91亚洲永久精品| 日韩电影在线一区二区三区| 国产亚洲美州欧州综合国| 91网页版在线| 久久99精品国产麻豆婷婷| 国产精品美女视频| 欧美电影影音先锋| 99精品久久99久久久久| 久久国产精品99久久人人澡| 亚洲欧美视频在线观看| 欧美精品一区二区精品网| 91久久线看在观草草青青| 国内精品写真在线观看| 五月综合激情日本mⅴ| 国产精品视频一区二区三区不卡| 欧美久久一区二区| 91色九色蝌蚪| 国产精品一级黄| 免费成人在线播放| 亚洲成人av在线电影| 亚洲欧洲av另类| 久久久久久99久久久精品网站| 欧美精品vⅰdeose4hd| 91丨九色丨蝌蚪富婆spa| 国产精品亚洲专一区二区三区| 日韩精品91亚洲二区在线观看 | 欧美在线一区二区三区| 国产成人综合网站| 久久国产剧场电影| 日韩电影免费一区| 亚洲va国产va欧美va观看| 国产精品第五页| 中文乱码免费一区二区| 久久精品男人天堂av| 精品国产乱码久久| 日韩精品一区二| 欧美高清www午色夜在线视频| 欧美伊人久久大香线蕉综合69| 色诱亚洲精品久久久久久| 成人免费看的视频| 成人h精品动漫一区二区三区| 国产成人免费视| 日韩无一区二区| 欧美另类变人与禽xxxxx| 欧美午夜精品免费| 欧美日韩一本到| 欧美日韩精品欧美日韩精品一| 欧美视频一区二区三区| 欧美三级日韩三级| 在线成人小视频| 日韩精品中文字幕在线不卡尤物| 欧美嫩在线观看| 精品免费一区二区三区| 久久亚洲一区二区三区四区| 26uuu国产日韩综合| 国产女主播视频一区二区| 中文成人av在线| 亚洲日穴在线视频| 午夜精品福利在线| 久久精品国产精品青草| 国产精品一级片在线观看| 成人av片在线观看| 在线看不卡av| 欧美一区二区三区在线电影| 欧美精品一区二区不卡| 国产精品成人一区二区三区夜夜夜| 中文字幕一区二区三区视频| 亚洲一区二区三区视频在线播放| 亚洲gay无套男同| 蜜臀av性久久久久蜜臀aⅴ四虎 | 91免费观看视频| 欧美日韩一区二区三区在线| 日韩限制级电影在线观看| 久久九九久久九九| 亚洲精品中文字幕在线观看| 日韩av电影天堂| 国产精品系列在线观看| 色偷偷久久人人79超碰人人澡 | 免费在线观看视频一区| 国产精品自拍一区| 日本韩国精品在线| 欧美sm美女调教| 日韩理论电影院| 久久se这里有精品| 91免费观看国产| 精品国产免费视频| 国产盗摄精品一区二区三区在线| 在线视频你懂得一区二区三区| 日韩三级高清在线| 日韩一区日韩二区| 美女mm1313爽爽久久久蜜臀| 99精品国产一区二区三区不卡| 91麻豆精品91久久久久同性| 日本一二三不卡| 麻豆精品视频在线观看视频| 色综合久久久久久久久久久| 精品久久久久久久一区二区蜜臀| 亚洲欧美日韩国产手机在线| 国产精品影视在线| 91精品国产综合久久久久久漫画| 中文字幕一区二区三区蜜月| 久久99国产精品尤物| 欧美日韩三级视频| 国产精品美女一区二区| 国产真实乱子伦精品视频| 欧美日韩国产一级二级| 国产精品每日更新在线播放网址| 青青青爽久久午夜综合久久午夜| 91免费看`日韩一区二区| 国产欧美一区在线| 久久69国产一区二区蜜臀| 欧美日韩精品一区二区| 亚洲人成网站影音先锋播放| 国产suv精品一区二区三区| 精品国产91久久久久久久妲己| 亚洲成人1区2区| 欧美在线观看禁18| 一区二区三区四区在线| 成人动漫一区二区在线| 国产欧美日韩综合| 精品一区二区影视| 91精品国产色综合久久ai换脸| 亚洲国产精品欧美一二99| 色乱码一区二区三区88| 亚洲人亚洲人成电影网站色| proumb性欧美在线观看| 国产精品你懂的| 97精品久久久久中文字幕| 国产女人18水真多18精品一级做| 国产高清成人在线| 国产亚洲精品aa午夜观看| 懂色av一区二区三区免费观看|