function [y,dinfo, pinfo]= DLifting2D(x, J, lsi)
% LIFTING 2D wavelet decomposition with directional lifting scheme
%
% USAGE:
%    y = DLifting2D(x, J, lsi)
% 
% INPUT:   
%    x    - input 2D signals
%    J    - Decomposition levels
%    lsi  - lifting lattice
% OUTPUT:
%    y       - Decomposition Coefficients
%    y{J}    - Lower band
%    y{i}{1} - Lower-Higher band
%    y{i}{2} - Higher-Lower band
%    y{i}{3} - Higher-Higher band
LL = x;
for i = 1:J
[L, H, dinfo{i}{1}, pinfo{i}{1}] = DLifting(LL, lsi);
[LL, LH, dinfo{i}{2}, pinfo{i}{2}] = DLifting(L', lsi);
[HL, HH, dinfo{i}{3}, pinfo{i}{3}] = DLifting(H', lsi);
y{i}{1} = LH';
y{i}{2} = HL';
y{i}{3} = HH';
LL = LL';
end
y{J+1} = LL;