The examples described above are related to determining whether to skip the entire BIO process. Instead of skipping the entire BIO process, the horizontal optical flow vx and the vertical optical flow vy may be independently skipped. That is, the BIO process in the horizontal direction is skipped by setting vx=0 when the horizontal complexity D1 is less than the threshold T, and the BIO process in the vertical direction is skipped by setting vy=0 when the vertical complexity D5 is less than the threshold T.
The motion compensation device 1000 calculates a horizontal gradient Ix(k) and a vertical gradient Iy(k) for each pixel in the first reference block and the second reference block (S1310). Then, d1 and d5 are calculated using Equation 15, horizontal complexity D1 is calculated using d1, and vertical complexity D5 is calculated using d5 (S1320).
Once the horizontal complexity D1 and the vertical complexity D5 are calculated in S1320, an operation of determining whether to skip the horizontal optical flow (S1330) and an operation of determining whether to skip the vertical optical flow (S1340) are performed. While