First add a bit of helper functions to aid in the clipping duties (those patches were already posted a long time ago) and then utilize them to properly clip the video sprites to the pipe dimensions. I also threw in a few small cleanup patches dealing with the sprite code.