hevc: refactor qpel c template functions