Patent attributes
A method of visual media processing includes determining, for a conversion between a current video block of visual media data and a bitstream representation of the current video block, a buffer that stores reference samples for prediction in an intra block copy mode; for a sample spatially located at location of the current video block relative to an upper-left position of a coding tree unit including the current video block and having a block vector, computing a corresponding reference in the buffer at a reference location, wherein the reference location is determined using the block vector and the location; and upon determining that the reference location lies outside the buffer, re-computing the reference location based at least in part on a location of the current video block relative to the coding tree unit including the current video block.