No BSD License  

Highlights from
Scalable MPEG compression based on DCT coefficients

Scalable MPEG compression based on DCT coefficients

by

 

15 Nov 2006 (Updated )

This application makes 2 layers base Layer and enhancement layer from quantized coefficients

mergeLayer(DC,BaseLayer,EnhansLayer)
function frame = mergeLayer(DC,BaseLayer,EnhansLayer)
Blimit=6;
Elimit=57;
Zero=[];
% ee=size(EnhansLayer);
% if ee(2)>Elimit
%     EL(1:ee(1,1),1:Elimit)=EnhansLayer(1:ee(1,1),1:Elimit);
% else
%     EL=EnhansLayer;
%     ee=size(EL);
%     numZero=abs(Elimit-ee(2));
%     Zero=zeros(1,numZero);
% end
EL(1:1024,1:Elimit)=zeros(1024,Elimit);
ee=size(EL);

bbZero=[];
bb=size(BaseLayer);
if bb(2) > Blimit
    BL(1:bb(1,1),1:Blimit)=BaseLayer(1:bb(1,1),1:Blimit);
else
    BL=BaseLayer;
    bb=size(BL);
    numZero=abs(Blimit-bb(2));
    bbZero=zeros(1,numZero);
end

bb=size(BL);


%vSize=size(v);
for i=1:bb(1,1)
    bLayer(i,1)=DC(i);
    
    tempBase=BL(i,1:bb(2));
    tempDeBaseLayer=[tempBase bbZero];
    size(tempDeBaseLayer);
    bLayer(i,2:Blimit+1)=tempDeBaseLayer;
    
    
    tempEnhans=EL(i,1:ee(2));
    tempDeEnhansLayer=[tempEnhans Zero];
    eLayer(i,1:Elimit)=tempDeEnhansLayer;
    
    Layer(i,1:Blimit+1)=bLayer(i,1:Blimit+1);
    Layer(i,Blimit+2:64)=eLayer(i,1:Elimit);    
end

v=0;
for i=1:8:256
    for j=1:8:256
        v=v+1;
        frame(i:i+7,j:j+7)=deZigzag(Layer(v,1:64));
    end
end

Contact us