function x = iQDLifting2D(y, J, dinfo, pinfo, lsi)
% 2D wavelet reconstruction with directional lifting scheme 
% on quincux lattice
%
% USAGE:
%    x = iQDLifting2D(y, J, dinfo, pinfo, lsi)
% 
% INPUT:   
%    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
%    J       - Decomposition levels
%    dinfo   - directional info for each block
%    pinfo   - block partition info
%    lsi  - lifting lattice
% OUTPUT:
%    x    - Reconstructed signal

LL = y{J+1};
for i = J:-1:1
LH = y{i}{1};
HL = y{i}{2};
HH = y{i}{3};
L = iQDLifting_2(LL, LH, dinfo{i}{2}, pinfo{i}{2}, lsi);
lsi53 = {'p', [-0.5 -0.5], [1], [0];'u', [0.25 0.25], [0], [0]; [sqrt(2)], [sqrt(2)/2], [], []};
H = iLifting1D(HL', HH', lsi53);
LL = iQDLifting_1(L, H', dinfo{i}{1}, pinfo{i}{1}, lsi);
end
x = LL;