mot-encoder: avoid useless recompression of JPEGs

If the input file is JPEG, the right resolution, and not
too big, use it directly