First up is the code profile. You have a little more left than the assumption if you cannot definitively identify bottlenecks.
libjpeg. scale_num scale_denom. dct_method? , DCT_FASTEST . : do_fancy_upsampling, do_block_smoothing, dither_mode, two_pass_quantize .. , , libjpeg ..
, -, . -, , . , RAM, , . ? , , -, . USB ( SD ..) . ( , , .) ( SPI, ..).
- (.. NAND), -, . NAND? , ? , .. , / , .
, , , stackoverflow :
jpeglib-turbo implmentation / < 100?