1. An apparatus for decoding video, the apparatus comprising: at least one processor configured to: obtain a size information of a maximum coding unit, from a bitstream; determine the maximum coding unit by splitting a picture, based on the size information of the maximum coding unit, reconstruct encoded image data of the maximum coding unit, determine a direction of an edge of the reconstructed image data of the maximum coding unit, and perform loop filtering for compensating pixel value on a deblocking filtered data of the reconstructed image data of the maximum coding unit based on the direction of the edge, wherein a coding unit among at least one coding unit in the maximum coding unit includes at least one prediction unit to perform prediction on the coding unit, and wherein the coding unit is split into at least one transformation unit independently from the at least one prediction unit.