For the following code:
>*startPt = *ext1 + (leftExtend * extStep1) + numChannels;
is this something like?
>*startPt = *ext1 + (topExtend * extStep1) + numChannels*leftExternd;
I do not find much other problem? If you have some runable code, that may be helpful to reproduce the problem easily.
(Not sure if I have attached files correctly)