Added in low-quality demosaicing for speed, as well as added discarding of matrices after their last use in case of non-interactive processing.