1. A method of determining a blockiness level of an image, comprising: receiving an input image having pixels; receiving a binary block map corresponding to the input image, the binary block map having indicators corresponding to a pixel in the input image, each indicator signaling whether a block edge is present at a location of the corresponding pixel in the input image; receiving block locations indicative of a block edge location in the input image; for each considered pixel, in a selected area of the input image, aligned to the block edge location and, having an indicator signaling the presence of the block edge, calculating a flatness measurement indicative of a flatness of the pixel values of the adjacent pixels to said each considered pixel based on a sign change count of the adjacent pixel value from a mean calculated for all the pixel values in a set; and averaging calculated flatness measurements to determine a Q-value, the Q-value indicative of the blockiness level of the input image selected area, for deblocking the input image.