Google ?http://dranger.com/ffmpeg/tutorial02.html"But we still need to tell SDL to actually show the data we've given it. We also pass this function a rectangle that says where the movie should go and what width and height it should be scaled to. This way, SDL does the scaling for us, and it can be assisted by your graphics processor for faster scaling:"So...it scaled from SDL. I think this way it's not faster.
You don't need to write one.Here are the bests. Open Source of couse.http://scale2x.sourceforge.net/