Diff of /comp/comp_iwpfbt.m [7c7a96] .. [3deeb5] Maximize Restore

  Switch to unified view

a/comp/comp_iwpfbt.m b/comp/comp_iwpfbt.m
1
function f=comp_iwpfbt(c,wtNodes,pOutIdxs,chOutIdxs,Ls,ext)
1
function f=comp_iwpfbt(c,wtNodes,pOutIdxs,chOutIdxs,Ls,ext,do_scale)
2
%COMP_IWFBT Compute Inverse Wavelet Packet Filter-Bank Tree
2
%COMP_IWFBT Compute Inverse Wavelet Packet Filter-Bank Tree
3
%   Usage:  f=comp_iwpfbt(c,wtNodes,pOutIdxs,chOutIdxs,Ls,ext)
3
%   Usage:  f=comp_iwpfbt(c,wtNodes,pOutIdxs,chOutIdxs,Ls,ext)
4
%
4
%
5
%   Input parameters:
5
%   Input parameters:
6
%         c          : Coefficients stored in cell array.
6
%         c          : Coefficients stored in cell array.
...
...
32
    end
32
    end
33
    
33
    
34
    if(pOutIdxs(jj))
34
    if(pOutIdxs(jj))
35
       % Run filterbank and add to the existing subband.
35
       % Run filterbank and add to the existing subband.
36
       ctmp = comp_ifilterbank_td(c(chOutIdxs{jj}),gCell,a,size(c{pOutIdxs(jj)},1),offset,ext);
36
       ctmp = comp_ifilterbank_td(c(chOutIdxs{jj}),gCell,a,size(c{pOutIdxs(jj)},1),offset,ext);
37
       c{pOutIdxs(jj)} = c{pOutIdxs(jj)}+ctmp;
38
       if do_scale
37
       c{pOutIdxs(jj)} = (1/sqrt(2))*(c{pOutIdxs(jj)}+ctmp);
39
           c{pOutIdxs(jj)} = (1/sqrt(2))*c{pOutIdxs(jj)};
40
       end
38
    else
41
    else
39
       % We are at the root.
42
       % We are at the root.
40
       f = comp_ifilterbank_td(c(chOutIdxs{jj}),gCell,a,Ls,offset,ext);
43
       f = comp_ifilterbank_td(c(chOutIdxs{jj}),gCell,a,Ls,offset,ext);
41
    end
44
    end
42
 end
45
 end