Demosaic working until the last few rows

The boundary has changed and causes a lot of pain. Keep debugging