Patent ID: 7440500

Claim:
An apparatus comprising: a first memory configured to store a plurality of reference samples in a search window to support a motion estimation of a current block beyond a boundary of a picture; a write control circuit configured to control a copying of said reference samples in said search window from said first memory to a shifter circuit, one column of a plurality of columns of said reference samples at a time; a datapath control circuit configured to generate a plurality of signals that control mapping of a plurality of pad samples from said reference samples; said shifter circuit configured to (i) shift said references samples in each of said columns to align said reference samples relative to an edge of a sub-window when said sub-window is at least partially outside of said boundary and (ii) generate said plurality of pad samples in said columns by duplicating some of said reference samples copied from said first memory to spatially append said pad samples to at least one of said reference samples in response to said signals, wherein said shifter circuit comprises (i) a first shifter configured to shift said reference samples, (ii) a second shifter configured to generate a particular pad sample of said pad samples by shifting one of said reference samples and (iii) a plurality of multiplexers each configured to multiplex said particular pad sample and a corresponding one of said reference samples; and a processing circuit configured to generate a plurality of difference values by comparing said current block against (i) said reference samples in said sub-window and (ii) said pad samples in said sub-window.