Added support for 3-channels, changed CCOEFF