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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? func_spiht_enc.m

?? 實現3D-SPIHT的壓縮功能
?? M
字號:
function out = func_SPIHT_Enc(M, max_bits, level)
%
% Matlab implementation of 3D - SPIHT (without Arithmatic coding stage)
%
% Encoder
%
% input:    M : input video in wavelet domain
%           max_bits : maximum bits can be used
%           level : wavelet decomposition level
%
% output:   out : bit stream
%
% This code is based on the implementation of the 2D-SPIHT by Jing Tian. It
% extends the code in order to handle video sequences (3D-SPIHT). Small changes have
% been also made to the 2D-SPIHT code.
% 
%
% Athanasopoulos Dionysios 
% Postgraduate Student
% Computer Engineering and Informatics Dept.
% University of Patras, Greece
%

%-----------   Initialization  -----------------
bitctr = 0;
out = 2*ones(1,max_bits - 14);
n_max = floor(log2(abs(max(max(max(M))))));

sum(sum(sum(floor(log2(abs(M(M~=0)))))))
Bits_Header = 0;
Bits_LSP = 0;
Bits_LIP = 0;
Bits_LIS = 0;

%-----------   output bit stream header   ----------------
% image size, number of bit plane, wavelet decomposition level should be
% written as bit stream header.
out(1,[1 2 3]) = [size(M,1) n_max level]; bitctr = bitctr + 24;
index = 4;
Bits_Header = Bits_Header + 24;

%-----------   Initialize LIP, LSP, LIS   ----------------

temp = [];
% bandsize1 = round (2.^(log2(size(M, 1)) - level + 1));
% bandsize2 = round (2.^(log2(size(M, 2)) - level + 1));
bandsize1 = 2;
bandsize2 = 2;
temp1 = 1 : bandsize1;
for i = 1 : bandsize2
    temp = [temp; temp1];
end
LIP(:, 1) = temp(:);
temp = [];
temp1 = 1 : bandsize2;
for i = 1 : bandsize1
    temp = [temp; temp1];
end
temp = temp';
LIP(:, 2) = temp(:);
len = size(LIP,1);
LIP(:,3) = ones(len,1);

LIS = LIP;
pstart = 1;
pend = bandsize2 / 2;
for i = 1 : bandsize1 / 2
    LIS(pstart : pend, :) = [];
    pdel = pend - pstart + 1;
    pstart = pstart + bandsize2 - pdel;
    pend = pend + bandsize2 - pdel;
end


len2 = size(LIS,1);
tLIP=LIP; 
tLIS=LIS;
for i=1:size(M,3)-1 
    LIP=[LIP;tLIP]; 
    LIP(i*len+1:(i+1)*len,3) = (i+1)*ones(len,1);   
end 
for i=1:size(M,3)/2-1 
    LIS=[LIS;tLIS]; 
    LIS(i*len2+1:(i+1)*len2,3) = (i+1)*ones(len2,1);   
end 
LIS(:, 4) = zeros(size(M,3)/2*len2, 1);

LSP = [];

n = n_max;

%-----------   CODING   ----------------
while(bitctr < max_bits)
        
    % Sorting Pass
     LIPtemp = LIP;temp = 0;
    for i = 1:size(LIPtemp,1)
        temp = temp+1;
        if (bitctr + 1) >= max_bits
            if (bitctr < max_bits)
                out(length(out))=[];
            end
            return
        end
    
        if abs(M(LIPtemp(i,1),LIPtemp(i,2),LIPtemp(i,3))) >= 2^n 
            out(index) = 1; bitctr = bitctr + 1;
            index = index +1; Bits_LIP = Bits_LIP + 1;
            sgn = M(LIPtemp(i,1),LIPtemp(i,2),LIPtemp(i,3))>=0;
            out(index) = sgn; bitctr = bitctr + 1;
            index = index +1; Bits_LIP = Bits_LIP + 1;
            LSP = [LSP; LIPtemp(i,:)];
            LIP(temp,:) = []; temp = temp - 1;
        else
            out(index) = 0; bitctr = bitctr + 1;
            index = index +1;
            Bits_LIP = Bits_LIP + 1;
        end
    end
    
    LIStemp = LIS; temp = 0; i = 1;
    while ( i <= size(LIStemp,1))
        temp = temp + 1;
        if LIStemp(i,4) == 0
            if bitctr >= max_bits
                return
            end
            max_d = func_Descendant(LIStemp(i,1),LIStemp(i,2),LIStemp(i,3),LIStemp(i,4),M);
            if max_d >= 2^n
                out(index) = 1; bitctr = bitctr + 1;
                index = index +1; Bits_LIS = Bits_LIS + 1;
                x = LIStemp(i,1); y = LIStemp(i,2);
                z = LIStemp(i,3); 
                if (bitctr + 1) >= max_bits
                    if (bitctr < max_bits)
                        out(length(out))=[];
                    end
                    return
                end
                if abs(M(2*x-1,2*y-1,2*z-1)) >= 2^n
                    LSP = [LSP; 2*x-1 2*y-1 2*z-1];
                    out(index) = 1; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    sgn = M(2*x-1,2*y-1,2*z-1)>=0;
                    out(index) = sgn; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                else
                    out(index) = 0; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    LIP = [LIP; 2*x-1 2*y-1 2*z-1];
                end
                
                if (bitctr + 1) >= max_bits
                    if (bitctr < max_bits)
                        out(length(out))=[];
                    end
                    return
                end
                if abs(M(2*x-1,2*y,2*z-1)) >= 2^n
                    LSP = [LSP; 2*x-1 2*y 2*z-1];
                    out(index) = 1; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    sgn = M(2*x-1,2*y,2*z-1)>=0;
                    out(index) = sgn; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                else
                    out(index) = 0; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    LIP = [LIP; 2*x-1 2*y 2*z-1];
                end
                
                if (bitctr + 1) >= max_bits
                    if (bitctr < max_bits)
                        out(length(out))=[];
                    end
                    return
                end
                if abs(M(2*x,2*y-1,2*z-1)) >= 2^n
                    LSP = [LSP; 2*x 2*y-1 2*z-1];
                    out(index) = 1; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    sgn = M(2*x,2*y-1,2*z-1)>=0;
                    out(index) = sgn; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                else
                    out(index) = 0; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    LIP = [LIP; 2*x 2*y-1 2*z-1];
                end
                
                if (bitctr + 1) >= max_bits
                    if (bitctr < max_bits)
                        out(length(out))=[];
                    end
                    return
                end
                if abs(M(2*x,2*y,2*z-1)) >= 2^n
                    LSP = [LSP; 2*x 2*y 2*z-1];
                    out(index) = 1; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    sgn = M(2*x,2*y,2*z-1)>=0;
                    out(index) = sgn; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                else
                    out(index) = 0; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    LIP = [LIP; 2*x 2*y 2*z-1];
                end

                if (bitctr + 1) >= max_bits
                    if (bitctr < max_bits)
                        out(length(out))=[];
                    end
                    return
                end
                if abs(M(2*x-1,2*y-1,2*z)) >= 2^n
                    LSP = [LSP; 2*x-1 2*y-1 2*z];
                    out(index) = 1; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    sgn = M(2*x-1,2*y-1,2*z)>=0;
                    out(index) = sgn; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                else
                    out(index) = 0; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    LIP = [LIP; 2*x-1 2*y-1 2*z];
                end
                
                if (bitctr + 1) >= max_bits
                    if (bitctr < max_bits)
                        out(length(out))=[];
                    end
                    return
                end
                if abs(M(2*x-1,2*y,2*z)) >= 2^n
                    LSP = [LSP; 2*x-1 2*y 2*z];
                    out(index) = 1; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    sgn = M(2*x-1,2*y,2*z)>=0;
                    out(index) = sgn; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                else
                    out(index) = 0; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    LIP = [LIP; 2*x-1 2*y 2*z];
                end
                
                if (bitctr + 1) >= max_bits
                    if (bitctr < max_bits)
                        out(length(out))=[];
                    end
                    return
                end
                if abs(M(2*x,2*y-1,2*z)) >= 2^n
                    LSP = [LSP; 2*x 2*y-1 2*z];
                    out(index) = 1; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    sgn = M(2*x,2*y-1,2*z)>=0;
                    out(index) = sgn; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                else
                    out(index) = 0; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    LIP = [LIP; 2*x 2*y-1 2*z];
                end
                
                if (bitctr + 1) >= max_bits
                    if (bitctr < max_bits)
                        out(length(out))=[];
                    end
                    return
                end
                if abs(M(2*x,2*y,2*z)) >= 2^n
                    LSP = [LSP; 2*x 2*y 2*z];
                    out(index) = 1; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    sgn = M(2*x,2*y,2*z)>=0;
                    out(index) = sgn; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                else
                    out(index) = 0; bitctr = bitctr + 1;
                    index = index +1; Bits_LIS = Bits_LIS + 1;
                    LIP = [LIP; 2*x 2*y 2*z];
                end
  
                if ((2*(2*x)-1) < size(M,1) & (2*(2*y)-1) < size(M,2) & (2*(2*z)-1) < size(M,3))
                    LIS = [LIS; LIStemp(i,1) LIStemp(i,2) LIStemp(i,3) 1];
                    LIStemp = [LIStemp; LIStemp(i,1) LIStemp(i,2) LIStemp(i,3) 1];
                end
                LIS(temp,:) = []; temp = temp-1;
                
            else
                out(index) = 0; bitctr = bitctr + 1;
                index = index +1; Bits_LIS = Bits_LIS + 1;
            end
        else
            if bitctr >= max_bits
                return
            end
            max_d = func_Descendant(LIStemp(i,1),LIStemp(i,2),LIStemp(i,3),LIStemp(i,4),M);
            if max_d >= 2^n
                out(index) = 1; bitctr = bitctr + 1;
                index = index +1;
                x = LIStemp(i,1); y = LIStemp(i,2); z = LIStemp(i,3);
                LIS = [LIS; 2*x-1 2*y-1 2*z-1 0; 2*x-1 2*y 2*z-1 0; 2*x 2*y-1 2*z-1 0; 2*x 2*y 2*z-1 0;2*x-1 2*y-1 2*z 0; 2*x-1 2*y 2*z 0; 2*x 2*y-1 2*z 0; 2*x 2*y 2*z 0];
                LIStemp = [LIStemp; 2*x-1 2*y-1 2*z-1 0; 2*x-1 2*y 2*z-1 0; 2*x 2*y-1 2*z-1 0; 2*x 2*y 2*z-1 0;2*x-1 2*y-1 2*z 0; 2*x-1 2*y 2*z 0; 2*x 2*y-1 2*z 0; 2*x 2*y 2*z 0];
                LIS(temp,:) = []; temp = temp - 1;
            else
                out(index) = 0; bitctr = bitctr + 1;
                index = index +1; Bits_LIS = Bits_LIS + 1;
            end
        end
        i = i+1;
    end
    
    % Refinement Pass
    temp = 1;
    value = floor(abs(2^(n_max-n+1)*M(LSP(temp,1),LSP(temp,2),LSP(temp,3))));
    while (value >= 2^(n_max+2) & (temp <= size(LSP,1)))
        if bitctr >= max_bits
            return
        end
        s = bitget(value,n_max+2);
        out(index) = s; bitctr = bitctr + 1;
        index = index +1; Bits_LSP = Bits_LSP + 1;
        temp = temp + 1;
        if temp <= size(LSP,1)
            value = floor(abs(2^(n_max-n+1)*M(LSP(temp,1),LSP(temp,2),LSP(temp,3))));
        end
    end
    
    n = n - 1;
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久先锋资源网| 日韩亚洲欧美一区二区三区| 狠狠色丁香久久婷婷综合丁香| 亚洲二区在线视频| 亚洲 欧美综合在线网络| 亚洲国产精品尤物yw在线观看| 亚洲品质自拍视频| 一个色综合av| 日韩av电影免费观看高清完整版 | 成人教育av在线| 国产宾馆实践打屁股91| 成人综合婷婷国产精品久久蜜臀 | 激情久久五月天| 国产一区二区视频在线| 国产一区二区h| 成人免费电影视频| 欧美无人高清视频在线观看| 91麻豆精品国产91久久久久久久久 | 精品无人码麻豆乱码1区2区| 久久国产剧场电影| 国产成人在线网站| 在线一区二区三区四区五区 | 欧美性生活久久| 日韩一级片网站| 久久久天堂av| 一区二区欧美国产| 热久久免费视频| 国产suv精品一区二区三区| 在线视频一区二区免费| 欧美xingq一区二区| 亚洲免费观看高清| 精品制服美女丁香| 在线精品视频免费播放| 久久久久一区二区三区四区| 亚洲国产精品尤物yw在线观看| 韩国成人精品a∨在线观看| 色菇凉天天综合网| 日韩精品一区二区三区蜜臀| 一区二区三区在线观看国产| 国产一区二区在线观看免费| 精品视频全国免费看| 国产精品视频一二三| 国产一区二区三区在线看麻豆| 99视频热这里只有精品免费| 日韩一级视频免费观看在线| 一区二区三区四区亚洲| 国产成人av电影在线播放| 91精品综合久久久久久| 亚洲精品videosex极品| 精品在线播放免费| 91麻豆精品国产91| 亚洲在线中文字幕| av影院午夜一区| 国产网红主播福利一区二区| 蜜乳av一区二区| 欧美日韩大陆在线| 玉足女爽爽91| 99精品视频一区二区三区| 久久亚洲一级片| 久久成人免费日本黄色| 欧美一级日韩免费不卡| 丝袜亚洲精品中文字幕一区| 在线精品视频小说1| 亚洲精品免费看| 91丨porny丨蝌蚪视频| 国产精品免费久久久久| 国产成人免费av在线| 亚洲精品在线观看网站| 琪琪久久久久日韩精品| 制服丝袜国产精品| 日本在线不卡一区| 日韩西西人体444www| 日韩国产高清影视| 欧美不卡视频一区| 精久久久久久久久久久| 国产午夜精品一区二区三区嫩草 | 欧美三级日韩三级国产三级| 亚洲综合精品自拍| 色综合久久久久| 一区二区三区免费网站| 欧美视频精品在线观看| 日韩专区一卡二卡| 日韩一区二区精品葵司在线| 五月天欧美精品| 精品国产一区二区国模嫣然| 国产九色精品成人porny| 国产色91在线| 91同城在线观看| 亚洲一区二区三区国产| 欧美一区三区四区| 精品一区二区在线播放| 欧美激情在线一区二区三区| 色综合天天综合色综合av| 一区二区三区 在线观看视频| 在线播放欧美女士性生活| 久久99国产精品免费网站| 国产精品三级久久久久三级| 日本精品一区二区三区四区的功能| 亚洲成a人v欧美综合天堂| 欧美精品一区二区在线播放| 白白色亚洲国产精品| 一区二区三区欧美| 亚洲一区在线观看视频| 日韩一级大片在线| 99re这里只有精品6| 五月婷婷久久丁香| 国产精品私人影院| 欧美二区三区91| a亚洲天堂av| 免费av成人在线| 亚洲欧洲av一区二区三区久久| 欧美日韩电影在线| 懂色av一区二区夜夜嗨| 五月天网站亚洲| 国产精品欧美久久久久无广告 | 精品免费国产二区三区| 97久久久精品综合88久久| 麻豆91小视频| 夜色激情一区二区| 久久精品欧美日韩| 91精品国产综合久久久久久| 一本到一区二区三区| 国产一区二区不卡| 日韩激情中文字幕| 日韩理论在线观看| 久久精品欧美一区二区三区不卡| 6080yy午夜一二三区久久| av在线不卡电影| 丁香婷婷综合五月| 黄色精品一二区| 全国精品久久少妇| 亚洲福利电影网| 亚洲综合无码一区二区| 国产精品蜜臀av| 国产清纯在线一区二区www| 欧美一二三四区在线| 欧美日韩一区不卡| 日本久久精品电影| 色婷婷综合久久久中文一区二区| 成人综合婷婷国产精品久久| 国产精品系列在线播放| 麻豆91在线看| 精一区二区三区| 美女网站在线免费欧美精品| 免费观看久久久4p| 美女视频一区二区三区| 蜜臀av一区二区在线观看| 三级欧美在线一区| 亚洲成人精品一区二区| 亚洲国产日产av| 亚洲成a人在线观看| 亚洲图片自拍偷拍| 婷婷综合在线观看| 日本亚洲免费观看| 国产主播一区二区三区| 国产精品资源站在线| 国产丶欧美丶日本不卡视频| 大尺度一区二区| 色视频欧美一区二区三区| 欧美性猛交xxxxxxxx| 欧美精品xxxxbbbb| 日韩欧美国产电影| 久久精品视频在线看| 国产精品区一区二区三| 自拍偷拍亚洲综合| 亚洲妇女屁股眼交7| 欧美aaa在线| 国产精品18久久久久久久久久久久| 国产成人免费视频网站| 91免费在线播放| 欧美放荡的少妇| 国产亚洲va综合人人澡精品| 亚洲欧美另类综合偷拍| 五月激情综合网| 粉嫩aⅴ一区二区三区四区五区| 91亚洲午夜精品久久久久久| 国产日韩欧美不卡在线| 中文字幕制服丝袜成人av| 一区二区三区国产豹纹内裤在线| 石原莉奈一区二区三区在线观看| 国产精品91一区二区| 一本一道久久a久久精品 | 美日韩一区二区三区| 国产成人欧美日韩在线电影| 日本精品视频一区二区| 日韩一区二区三区四区| 国产精品久久久久7777按摩| 五月综合激情网| 成人精品一区二区三区四区| 欧美最新大片在线看| 国产亚洲制服色| 日韩精品亚洲一区| av不卡免费电影| 亚洲精品一区二区三区香蕉| 亚洲精品免费电影| 国产精品香蕉一区二区三区| 欧美久久久久久久久中文字幕| 国产精品美女久久久久久久| 男男gaygay亚洲| 欧美综合天天夜夜久久|