A method of filtering a decoded block of video data, the method comprising: decoding (160, 140) a current block of a current picture of the video data; selecting (162, 144) a filter to be used to filter at least one pixel of the current block wherein f ( k,l) represents the selected filter, and R(i, j) represents a pixel at position (i, j) of the current picture; selecting a geometric transform to be performed on one of a filter support region or coefficients of the selected filter, wherein the geometric transform comprises one of a rotation transform, a diagonal flip transform, or a vertical flip, and wherein selecting the geometric transform comprises: calculating a horizontal gradient g h according to: g h = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 H k, l, where H k,l = |2 R ( k,l) - R(k - 1, l) - R ( k + 1, l)|; calculating a vertical gradient g v according to: g v = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 V k, l, where V k,l = |2 R ( k,l) - R ( k,l -1) - R ( k,l + 1)|; calculating a first diagonal gradient g d1 according to: g d 1 = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 D 1 k, l, where D1 k,l = |2 R ( k,l) - R ( k -1, l -1) -R ( k + 1, l + 1)|; calculating a second diagonal gradient g d2 according to: g d 2 = ∑ k = i − M i + N + M − 1 ∑ j = j − M j + N + M − 1 D 2 k, l, where D 2 k,l = |2 R ( k,l) - R ( k -1, l +1) - R ( k + 1, l -1)|; selecting the diagonal flip transform when g d 2 < g d 1 and g v < g h; selecting the vertical flip transform when g d 1 < g d 2 and g h < g v; or selecting the rotation transform when g d 1 < g d 2 and g v < g h; performing (166, 148) the geometric transform on either the filter support region or the coefficients of the selected filter; and filtering (168, 150) the at least one pixel of the current block using the selected filter after performing the geometric transform. decoding (160, 140) a current block of a current picture of the video data; selecting (162, 144) a filter to be used to filter at least one pixel of the current block wherein f ( k,l) represents the selected filter, and R(i, j) represents a pixel at position (i, j) of the current picture; selecting a geometric transform to be performed on one of a filter support region or coefficients of the selected filter, wherein the geometric transform comprises one of a rotation transform, a diagonal flip transform, or a vertical flip, and wherein selecting the geometric transform comprises: calculating a horizontal gradient g h according to: g h = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 H k, l, where H k,l = |2 R ( k,l) - R(k - 1, l) - R ( k + 1, l)|; calculating a vertical gradient g v according to: g v = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 V k, l, where V k,l = |2 R ( k,l) - R ( k,l -1) - R ( k,l + 1)|; calculating a first diagonal gradient g d1 according to: g d 1 = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 D 1 k, l, where D1 k,l = |2 R ( k,l) - R ( k -1, l -1) -R ( k + 1, l + 1)|; calculating a second diagonal gradient g d2 according to: g d 2 = ∑ k = i − M i + N + M − 1 ∑ j = j − M j + N + M − 1 D 2 k, l, where D 2 k,l = |2 R ( k,l) - R ( k -1, l +1) - R ( k + 1, l -1)|; selecting the diagonal flip transform when g d 2 < g d 1 and g v < g h; selecting the vertical flip transform when g d 1 < g d 2 and g h < g v; or selecting the rotation transform when g d 1 < g d 2 and g v < g h; calculating a horizontal gradient g h according to: g h = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 H k, l, where H k,l = |2 R ( k,l) - R(k - 1, l) - R ( k + 1, l)|; calculating a vertical gradient g v according to: g v = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 V k, l, where V k,l = |2 R ( k,l) - R ( k,l -1) - R ( k,l + 1)|; calculating a first diagonal gradient g d1 according to: g d 1 = ∑ k = i − M i + N + M − 1 ∑ i = j − M j + N + M − 1 D 1 k, l, where D1 k,l = |2 R ( k,l) - R ( k -1, l -1) -R ( k + 1, l + 1)|; calculating a second diagonal gradient g d2 according to: g d 2 = ∑ k = i − M i + N + M − 1 ∑ j = j − M j + N + M − 1 D 2 k, l, where D 2 k,l = |2 R ( k,l) - R ( k -1, l +1) - R ( k + 1, l -1)|; selecting the diagonal flip transform when g d 2 < g d 1 and g v < g h; selecting the vertical flip transform when g d 1 < g d 2 and g h < g v; or selecting the rotation transform when g d 1 < g d 2 and g v < g h; performing (166, 148) the geometric transform on either the filter support region or the coefficients of the selected filter; and filtering (168, 150) the at least one pixel of the current block using the selected filter after performing the geometric transform.