1. An image coding apparatus which codes a current image using motion estimation, said image coding apparatus comprising: a processor; a non-transitory memory having stored thereon executable instructions which, when executed by said processor, cause said image coding apparatus to perform: setting, as a search range for use in motion estimation, a search range that requires a transfer amount smaller than a first threshold value indicating a predetermined amount of data, the transfer amount being an amount of data of a reference image and is to be transferred for use in motion compensation in decoding the coded image; obtaining, in the motion estimation, pixel data of pixels within the set search range from a memory configured to store the reference image, the reference image including the pixels having the pixel data; and performing the motion estimation using the obtained pixel data and pixel data of current pixels to be coded, wherein in the motion compensation in decoding the coded image, the data of the reference image is transferred by transferring, one or more times, image data based on an access unit which is a minimum data amount by which the image data can be read by one-time access, from a decoder-side memory used to store the reference image, and the data of the reference image is used in the motion compensation, and wherein, in said setting, the transfer amount of the data of the reference image is calculated according to a determination as to whether or not the reference image includes a boundary determined by access units in the decoder-side memory, the determination being made based on the boundary, a position of the reference image indicated by the motion vector, and a size of the reference image.