Fix ticket #151 Reference wraparound bugs
Fixed the padding issue when offset is less than xmargin Replaced the horizontal MV clipping by modulo-wrapping
Fixed the padding issue when offset is less than xmargin Replaced the horizontal MV clipping by modulo-wrapping