A computerized method for generating a second prediction pattern for spatial sub-sampling for images from an initial prediction pattern based on a partition of the image in texture and motion classes, the method comprising: applying an adaptive area of influence filter to samples in an initial pattern of samples, wherein the samples in the initial pattern correspond to pixels to be predicted, and applying the filter comprises: computing sample cells for all samples by receiving motion and texture class data for a current pixel data set, and defining the sample cells such that the sample cell for a sample contains pixels closest to that sample in terms of a pixel-to-sample distance and having the same texture and motion class; computing pixel cells and prediction filters for each pixel to be predicted; and locally varying the sample cell shapes by using coefficients of the prediction filters to determine lowest prediction errors; wherein the pixel-to-sample distance dist k ( x) is defined as dis t k x → = γ k x 1 − x 1 k 2 + β k x 2 − x 2 k 2 where x = ( x 1, x 2) is a pixel in the image, k is a sample with position x ( k) = ( x 1 ( k), x 2 ( k)), and y k and β k are parameters varying the shape of the sample cell; varying a level value of each sample, wherein the level value corresponds to a predictive strength of the sample in relation to the pixels to be predicted; generating a first prediction pattern from the samples; performing a sample movement process on a current sample in the first prediction pattern to change a current position of the current sample in the first prediction pattern; updating a local prediction of pixels influenced by the current sample if the current position of the current sample is changed; performing a sample removal process on the current sample in the first prediction pattern to remove the current sample from the first prediction pattern if a criteria on density and prediction error is satisfied; updating a local prediction of pixels influenced by the current sample if the current sample is removed; generating a second prediction pattern from the samples remaining in the first prediction pattern; and outputting the second prediction pattern. applying an adaptive area of influence filter to samples in an initial pattern of samples, wherein the samples in the initial pattern correspond to pixels to be predicted, and applying the filter comprises: computing sample cells for all samples by receiving motion and texture class data for a current pixel data set, and defining the sample cells such that the sample cell for a sample contains pixels closest to that sample in terms of a pixel-to-sample distance and having the same texture and motion class; computing pixel cells and prediction filters for each pixel to be predicted; and locally varying the sample cell shapes by using coefficients of the prediction filters to determine lowest prediction errors; wherein the pixel-to-sample distance dist k ( x) is defined as dis t k x → = γ k x 1 − x 1 k 2 + β k x 2 − x 2 k 2 computing sample cells for all samples by receiving motion and texture class data for a current pixel data set, and defining the sample cells such that the sample cell for a sample contains pixels closest to that sample in terms of a pixel-to-sample distance and having the same texture and motion class; computing pixel cells and prediction filters for each pixel to be predicted; and locally varying the sample cell shapes by using coefficients of the prediction filters to determine lowest prediction errors; wherein the pixel-to-sample distance dist k ( x) is defined as dis t k x → = γ k x 1 − x 1 k 2 + β k x 2 − x 2 k 2 where x = ( x 1, x 2) is a pixel in the image, k is a sample with position x ( k) = ( x 1 ( k), x 2 ( k)), and y k and β k are parameters varying the shape of the sample cell; varying a level value of each sample, wherein the level value corresponds to a predictive strength of the sample in relation to the pixels to be predicted; generating a first prediction pattern from the samples; performing a sample movement process on a current sample in the first prediction pattern to change a current position of the current sample in the first prediction pattern; updating a local prediction of pixels influenced by the current sample if the current position of the current sample is changed; performing a sample removal process on the current sample in the first prediction pattern to remove the current sample from the first prediction pattern if a criteria on density and prediction error is satisfied; updating a local prediction of pixels influenced by the current sample if the current sample is removed; generating a second prediction pattern from the samples remaining in the first prediction pattern; and outputting the second prediction pattern.