A method for adaptive offset processing of reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data, the method comprising: receiving the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data; selecting a region for the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data; classifying into a class for each of pixels in the region of the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data based on neighboring pixel configuration of said each of the pixels; determining an intensity offset for the class according to the pixels belonging to the class in the region of the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data and respective pixels in a respective region of associated original video data; and compensating the region of the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data by adding the intensity offset for the class to original intensities of the pixels belonging to the class, wherein said classifying into a class for each of pixels in the region comprises selecting and indicating a pixel pattern for the region from pixel patterns, wherein said classifying into a class for each pixel in the region comprises comparing each pixel with neighboring pixels and neighboring pixels of each pixel are determined according to the pixel pattern, characterized in that : the pixel pattern is selected from the four pixel patterns consisting of three pixels or more along one of a vertical line, a horizontal line, a 45° slant line, a 135° slant line, wherein the central pixel of the pixel pattern is a current pixel to classify. receiving the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data; selecting a region for the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data; classifying into a class for each of pixels in the region of the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data based on neighboring pixel configuration of said each of the pixels; determining an intensity offset for the class according to the pixels belonging to the class in the region of the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data and respective pixels in a respective region of associated original video data; and compensating the region of the reconstructed, deblocked reconstructed or deblocked-and-loop filtered reconstructed video data by adding the intensity offset for the class to original intensities of the pixels belonging to the class, wherein said classifying into a class for each of pixels in the region comprises selecting and indicating a pixel pattern for the region from pixel patterns, wherein said classifying into a class for each pixel in the region comprises comparing each pixel with neighboring pixels and neighboring pixels of each pixel are determined according to the pixel pattern, characterized in that : the pixel pattern is selected from the four pixel patterns consisting of three pixels or more along one of a vertical line, a horizontal line, a 45° slant line, a 135° slant line, wherein the central pixel of the pixel pattern is a current pixel to classify. <EOS>