remove duplicate clip to 8bit function