common: move clip templates to common.h
common: combine duplicate ClipY and ClipC templates, return pixel type

and fix some hungarian prefixes I encountered
move buffer outside parenthesis