According to an embodiment, to obtain the affine parameter group candidates, the first motion vector and a first motion vector extraction location may be determined from a first adjacent block decoded in an affine mode, the first adjacent block being discovered first in a scan process of scanning the adjacent blocks of the current block according to a first scan order from an adjacent block adjacent to the upper left coordinate of the current block. The second motion vector and a second motion vector extraction location may be determined from a second adjacent block decoded in an affine mode, the second adjacent block being first discovered in a scan process of scanning the adjacent blocks of the current block according to a second scan order from an adjacent block adjacent to the upper right coordinate of the current block.