The present invention relates to an image processing device and method, and program, wherein compression efficiency can be improved.
With regard to a luminance block AY of 4×4 pixels, motion prediction and compensation processing is performed on the luminance signals using a template region BY which is configured of decoded pixels and is adjacent to the block AY, thereby obtaining motion vector information VY. a color difference TP motion prediction/compensation unit performs motion prediction on a 2×2 pixel color difference block AC regarding color difference signals Cb and Cr, using a template region BC which is configured of decoded pixels and is adjacent to a luminance block AC, with a range E, centered on motion vector information VY′ obtained by scaling the motion vector information VY, as the range of searching. The present invention can be applied to an image encoding device which performs encoding with the H.264/AVC format, for example.