(JPEG) Source now common for the decoder and encoder, more clean up on
encoder