I have come across a very strange tearing/frame shifting during IPIPEing. It does not happen on every frame. But it does happen quite frequently and only when downsizing a frame.

There is a tearing in the frame. This frame was captured at 1280x960 (Bayer) resolution and than was resized by IPIPE to 640 by 480 and JPEGed. Some times it gets processed without tearing, sometimes with tearing. However, if I do not resize the frame but IPIPE it to the same resolution, no tearing is observed.
Also, if I capture a bayer frame at 640x480 resolution and IPIPE it without resizing, frame comes out looking fine every time.
In the example above, the frame has one step. However, I have seen frames where shifting increases in steps (see below). No frame division is used.

The problem occurs only when I am trying to downsize (divide by 2) the frame. I have trying reducing IPIPE clock (use divide by 32) with the same result. In my case, the data is read from RAM and written back into RAM. It is unlikely that the problem is due to memory bandwidth since processing without downsizing produces no tearing.
Thank you.