# Wavelet synthesis boundary conditions

I am interested in discrete wavelet decomposition using the D4 wavelet and am having issues understanding how the boundaries are handled during the synthesis step. Say I want to use a smooth boundary condition (where the boundary is approximated beyond the given data using a first order derivative approximation) to extend the signal. During the analysis step, if I have a 2d input array of size 16x16, I can extend the array to 18x18 using the first order approximation on the border. After analysis the produced decomposed output signal is of size 16x16. However, if I want to reconstruct the signal, how do I approximate the coefficients beyond the boundary like I did the function values during the analysis step? It seems like most boundary conditions result in a reduction of the output signal by something proportional to the radius of the wavelet stencil used.