A deblocking filtering method, by a video decoding apparatus, the method comprising: deriving a boundary of a deblocking filtering unit block (810, 910) which is a block of a reconstructed picture for which deblocking filtering is performed; (S320; S1710) setting a boundary strength bS of a boundary (610, 620) of a bS setting unit block, wherein the bS setting unit block is a 4x4 sub-block of a deblocking filtering unit block, wherein the step (S320; S1710) of setting the bS includes setting the bS for a target boundary which is the boundary of a deblocking filtering unit block that is matching the boundary of the bS setting unit block; and (S330; S1720) applying deblocking filtering on the boundary of the deblocking filtering unit block based on the bS, characterized in that the deblocking filtering unit block corresponds to a transform block, a prediction block or an 8x8 pixel block, wherein the deblocking filtering unit block corresponds to the 8x8 pixel block when the transform block and the prediction block are smaller than the 8x8 pixel block; the bS is set to a value among 0, 1 and 2 (S1410; S1430; S1450), wherein when at least one of two blocks which are adjacent the target boundary is coded with intra prediction mode, the bS is set to the value 2; otherwise, when at least one of the two blocks includes a transform coefficient other than 0, or the two blocks have different reference pictures, or have different motion vectors, the bS is set to the value 1 (S1440, S1450); otherwise, the bS is set to the value 0; wherein when the bS is equal to the value 0 or when the bS is greater than the value 0 and the sum of differences of filtering target samples, in the two blocks adjacent to the target boundary, is equal to or greater than a threshold value, the deblocking filtering is not applied, otherwise when the bS is greater than the value 0, the deblocking filtering is applied to a luma sample. deriving a boundary of a deblocking filtering unit block (810, 910) which is a block of a reconstructed picture for which deblocking filtering is performed; (S320; S1710) setting a boundary strength bS of a boundary (610, 620) of a bS setting unit block, wherein the bS setting unit block is a 4x4 sub-block of a deblocking filtering unit block, wherein the step (S320; S1710) of setting the bS includes setting the bS for a target boundary which is the boundary of a deblocking filtering unit block that is matching the boundary of the bS setting unit block; and (S330; S1720) applying deblocking filtering on the boundary of the deblocking filtering unit block based on the bS, characterized in that the deblocking filtering unit block corresponds to a transform block, a prediction block or an 8x8 pixel block, wherein the deblocking filtering unit block corresponds to the 8x8 pixel block when the transform block and the prediction block are smaller than the 8x8 pixel block; the bS is set to a value among 0, 1 and 2 (S1410; S1430; S1450), wherein when at least one of two blocks which are adjacent the target boundary is coded with intra prediction mode, the bS is set to the value 2; otherwise, when at least one of the two blocks includes a transform coefficient other than 0, or the two blocks have different reference pictures, or have different motion vectors, the bS is set to the value 1 (S1440, S1450); otherwise, the bS is set to the value 0; when at least one of two blocks which are adjacent the target boundary is coded with intra prediction mode, the bS is set to the value 2; otherwise, when at least one of the two blocks includes a transform coefficient other than 0, or the two blocks have different reference pictures, or have different motion vectors, the bS is set to the value 1 (S1440, S1450); otherwise, the bS is set to the value 0; wherein when the bS is equal to the value 0 or when the bS is greater than the value 0 and the sum of differences of filtering target samples, in the two blocks adjacent to the target boundary, is equal to or greater than a threshold value, the deblocking filtering is not applied, otherwise when the bS is greater than the value 0, the deblocking filtering is applied to a luma sample. when the bS is equal to the value 0 or when the bS is greater than the value 0 and the sum of differences of filtering target samples, in the two blocks adjacent to the target boundary, is equal to or greater than a threshold value, the deblocking filtering is not applied, otherwise when the bS is greater than the value 0, the deblocking filtering is applied to a luma sample.