fixed
Implemented derivative pair canceling, memory and parameter optimizatio, invalid pixel masking