Optimal Partitioning of Video Sequences for MPEG-4 Sprite Encoding