Video compression algorithms typically represent visual information by a combination of motion and texture data. Motion data describes the temporal relationship between the content of a frame and that of a previous frame. This invention describes a method and apparatus for efficiently encoding motion data, particularly in the presence of horizontal and/or vertical motion boundaries.