categories and pixels in each category are offset compensated using an offset value for the
category. The classification may be based on values of the current pixel and its neighboring
pixels before SAO compen sation. Therefore, the SAO compensated pixel cannot be writ ten
back to the current pixel location until the category for all pixels are determined. An
embodiment of the present inven tion stores the relation between the current pixel and said …