support for multiple passes with only two transposes
improve test: test grayscale and rgba with same cases
Do not use lineOut buffer if source and destination are different.