1. A method of prediction weights determination, said method comprising the steps of: (a) determining indexes of best predictions for already processed positions adjacent to a current position; (b) determining a current prediction context as a combination of the indexes determined in step (a) using a predefined context formation rule based on application-specific conditions; (c) using stored statistical information, determining for each prediction a number of times this specific prediction was the best prediction in the current prediction context determined in step (b) in past predictions; (d) using the results of step (c) as prediction weights for corresponding predictions; (e) determining an index of best prediction for the current position; and (f) updating statistical information for the current prediction context determined in step (b) and the index determined in step (e).