sceJpeg(): code cleanup and some additions