Fine-grain watermarking for intellectual property protection