adding debayer functionality.