how to control the compress ratio of jpeg_encode?

I have tried the jpeg_encode with some 5M pixel gray scale pictures. The result jpg file is about 600-800KB, so the compress ratio is about 8:1, but as I know, some photo process software can compress the jpg file to 1/20 only of original BMP file if choose the quality to 70%. so,How can I control this parameter in jpeg_encode to achieve this compress ratio? thanks a lot!

Hi ericbin, do you use tegra_multimedia_api or gstreamer?

yes, what I use is tegra_multimedia_api

Is there any idea?

Please refer to [url]Missing header file in building hardware-accelerated gstjpeg from source - Jetson TX2 - NVIDIA Developer Forums