A method performed by a High Efficiency Video Coding encoder or a High Efficiency Video Coding decoder for reducing blocking artifacts at a block boundary between a block of multiple pixels (11, 13, 15, 17) and a neighboring block of multiple pixels (21, 23, 25, 27) in a video frame, said method comprising the steps of: calculating a first offset; clipping said first offset to be within an interval of -t C and t C by setting said first offset to be equal to - t C if said first offset is smaller than - t C and by setting said first offset to be equal to t C if said first offset is larger than t C, wherein t C is a threshold value that is dependent on a quantization parameter value assigned to said block; modifying a pixel value p 0 of a pixel closest to said block boundary in a line of pixels (11, 13, 15, 17) in said block, wherein said line of pixels (11, 13, 15, 17) is perpendicular to said block boundary, by adding said first offset to said pixel value p 0 of said pixel closest to said block boundary in said line of pixels (11, 13, 15, 17) to form a modified pixel value p 0' of said pixel closest to said block boundary in said line of pixels (11, 13, 15, 17); and modifying a pixel value q 0 of a pixel closest to said block boundary in a corresponding line of pixels (21, 23, 25, 27) in said neighboring block, wherein said corresponding line of pixels (21, 23, 25, 27) is perpendicular to said block boundary, by subtracting said first offset from said pixel value q 0 of said pixel closest to said block boundary in said corresponding line of pixels (21, 23, 25, 27) to form a modified pixel value q 0' of said pixel closest to said block boundary in said corresponding line of pixels (21, 23, 25, 27), and wherein the method is characterized by the first offset being calculated as equal to (9×( q 0- p 0) - 3×( q 1- p 1)+8)>>4, wherein >> denotes a right shift operation, p 1 denotes a pixel value of a pixel next closest to said block boundary in said line of pixels (11, 13, 15, 17) and q 1 denotes a pixel value of a pixel next closest to said block boundary in said corresponding line of pixels (21, 23, 25, 27). calculating a first offset; clipping said first offset to be within an interval of -t C and t C by setting said first offset to be equal to - t C if said first offset is smaller than - t C and by setting said first offset to be equal to t C if said first offset is larger than t C, wherein t C is a threshold value that is dependent on a quantization parameter value assigned to said block; modifying a pixel value p 0 of a pixel closest to said block boundary in a line of pixels (11, 13, 15, 17) in said block, wherein said line of pixels (11, 13, 15, 17) is perpendicular to said block boundary, by adding said first offset to said pixel value p 0 of said pixel closest to said block boundary in said line of pixels (11, 13, 15, 17) to form a modified pixel value p 0' of said pixel closest to said block boundary in said line of pixels (11, 13, 15, 17); and modifying a pixel value q 0 of a pixel closest to said block boundary in a corresponding line of pixels (21, 23, 25, 27) in said neighboring block, wherein said corresponding line of pixels (21, 23, 25, 27) is perpendicular to said block boundary, by subtracting said first offset from said pixel value q 0 of said pixel closest to said block boundary in said corresponding line of pixels (21, 23, 25, 27) to form a modified pixel value q 0' of said pixel closest to said block boundary in said corresponding line of pixels (21, 23, 25, 27), and wherein the method is characterized by the first offset being calculated as equal to (9×( q 0- p 0) - 3×( q 1- p 1)+8)>>4, wherein >> denotes a right shift operation, p 1 denotes a pixel value of a pixel next closest to said block boundary in said line of pixels (11, 13, 15, 17) and q 1 denotes a pixel value of a pixel next closest to said block boundary in said corresponding line of pixels (21, 23, 25, 27).