Diff of /blockproc/blockana.m [76dce7] .. [89ea83]  Maximize  Restore

  Switch to unified view

a/blockproc/blockana.m b/blockproc/blockana.m
...
...
73
                   error('%s: Minimum block length is %i.',upper(mfilename),a^J);
73
                   error('%s: Minimum block length is %i.',upper(mfilename),a^J);
74
                end
74
                end
75
                rred = (a^J-1)/(a-1)*(m-a);
75
                rred = (a^J-1)/(a-1)*(m-a);
76
                Sbolen = rred + mod(Sb,a^J);
76
                Sbolen = rred + mod(Sb,a^J);
77
                nextSbolen = rred + mod(nextSb,a^J);
77
                nextSbolen = rred + mod(nextSb,a^J);
78
             case {'dgtreal','dgt'}
78
             case {'dgtreal','dgt','dwilt','wmdct'}
79
                a = F.a; 
79
                a = F.a; 
80
                Sbolen = ceil((Lw-1)/a)*a + mod(Sb,a);
80
                Sbolen = ceil((Lw-1)/a)*a + mod(Sb,a);
81
                nextSbolen = ceil((Lw-1)/a)*a + mod(nextSb,a);
81
                nextSbolen = ceil((Lw-1)/a)*a + mod(nextSb,a);
82
             case {'filterbank','filterbankreal','ufilterbank','ufilterbankreal'}
82
             case {'filterbank','filterbankreal','ufilterbank','ufilterbankreal'}
83
                a = F.lcma;
83
                a = F.lcma;
...
...
111
          c = F.frana(fwin);
111
          c = F.frana(fwin);
112
       else
112
       else
113
          switch(F.type)
113
          switch(F.type)
114
             case 'fwt'
114
             case 'fwt'
115
                c = block_fwt(fext,w,J);
115
                c = block_fwt(fext,w,J);
116
             case {'dgtreal','dgt'}
116
             case {'dgtreal','dgt','dwilt','wmdct'}
117
                Lwl = floor(Lw/2);
117
                Lwl = floor(Lw/2);
118
                Lext = Sbolen + Lb - nextSbolen + Lwl;
118
                Lext = Sbolen + Lb - nextSbolen + Lwl;
119
                startc = ceil(Lwl/a)+1;
119
                startc = ceil(Lwl/a)+1;
120
                endc = ceil((Lext)/a);
120
                endc = ceil((Lext)/a);
121
                % Pad with zeros to comply with the frame requirements
121
                % Pad with zeros to comply with the frame requirements
...
...
123
                c = F.frana(fext(1:F.L,:));
123
                c = F.frana(fext(1:F.L,:));
124
                % Pick just valid coefficients
124
                % Pick just valid coefficients
125
                cc = F.coef2native(c,size(c));
125
                cc = F.coef2native(c,size(c));
126
                cc = cc(:,startc:endc,:);
126
                cc = cc(:,startc:endc,:);
127
                c = F.native2coef(cc);
127
                c = F.native2coef(cc);
128
             case {'filterbank','filterbankreal','ufilterbank','ufilterbankreal'}
128
             case {'filterbank','filterbankreal'}
129
                % Subsampling factors
129
                a = F.a(:,1);
130
                a = F.a(:,1);
130
                Lwl = floor(Lw/2);
131
                % Filter lengths
132
                gl = F.g_info.gl;
133
                % Filter offsets
134
                Lwl = max(-F.g_info.offset);
131
                Lext = Sbolen + Lb - nextSbolen + Lwl;
135
                Lext = Sbolen + Lb - nextSbolen + Lwl;
132
                startc = ceil(Lwl./a)+1;
136
                startc = ceil(Lwl./a)+1;
133
                endc = ceil((Lext)./a);
137
                endc = ceil((Lext)./a);
138
                
134
                fext = [fext; zeros(F.L-size(fext,1),size(fext,2))];
139
                fext = [fext; zeros(F.L-size(fext,1),size(fext,2))];
135
                c = F.frana(fext(1:F.L,:));
140
                c = F.frana(fext(1:F.L,:));
136
                cc = F.coef2native(c,size(c));
141
                cc = F.coef2native(c,size(c));
137
                cc = cellfun(@(cEl,sEl,eEl) cEl(sEl:eEl,:),cc,num2cell(startc),num2cell(endc),'UniformOutput',0);
142
                cc = cellfun(@(cEl,sEl,eEl) cEl(sEl:eEl,:),cc,num2cell(startc),num2cell(endc),'UniformOutput',0);
138
                c = F.native2coef(cc);
143
                c = F.native2coef(cc);

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks