For the texture complexity, a local feature detector with a small amount of computation such as a difference from neighboring pixels, a gradient, and a Moravec may be used. In this embodiment, the texture complexity is calculated using the gradient. The gradients for the reference blocks are values used in the BIO process. Accordingly, this embodiment has the advantage that the gradient values calculated in the texture complexity can be directly applied in carrying out the BIO process.
The motion compensation device 1000 according to this embodiment calculates texture complexity using a horizontal gradient and a vertical gradient of each pixel in the first reference block and the second reference block. As one example, the motion compensation device 1000 calculates horizontal complexity using the horizontal gradients of the respective pixels in the first reference block and the second reference block, and calculates vertical complexity using the vertical gradients of the respective pixels in the first reference block and the second reference block. For example, the horizontal complexity and the vertical complexity may be calculated by Equation 14.