Generalized Lifting (GL) has been studied for lossy image compression in [2,3]. It has been demonstrated that the method leads to a significant reduction of the wavelet coefficients energy and entropy. The definition of the GL relies on an estimation of the pdf of the pixel to encode conditioned to a surrounding context. The objective of this paper is to present an improved method for the estimation of the pdf at the local level. Rather than assuming that the local pdf is monomodal, symmetric, and centered at the central value of the best context match within a neighborhood, as in [3], we follow the idea of self similarity proposed in [1] for denoising, and propose to estimate the pdf using all the causal contexts within a window. Therefore, all the available knowledge about the neighborhood is incorporated. No assumptions about the characteristics of the pdf are made. A generalized lifting operator that minimizes the energy is applied to each context during the encoding process. Experimental results show an important increment in the energy and entropy gains when compared to previous strategies [2,3].