Three questions about the use of ‘libnvds_batch_jpegenc.so’ dynamic library interface

Hi,After using ‘libnvds_batch_jpegenc.so’ dynamic library interface to do batch jpeg compression,I have three questions as below:
1.We can use ‘nvds_obj_enc_process’ interface to enqueue many object crops for JPEG encode, but I want to know whether the batch processing interface is parallel processing or serial processing?
2.When I use the ‘nvds_obj_enc_process’ interface in the nvds_obj_encode.h file,I can’t find the interface to set the encode quality for batch jpeg encode.Do you provide the corresponding interface and what is the default quality currently in use?
3.When I use multiple crop regions to test the encode time consumption,I can’t find obvious rules.I’d like to know the factors that affect time-consuming of batch Jpeg encode interface。

Hi,
It might be limitation in the APIs. We will check and update in detail.

Hi,I’d like to know when an updated API library will be available。In addition ,what’s the conclusion of question 1 and question 3?

Hi,

The batch processing interface is parallel processing

At present there is no interface provided for interface to set the encode quality. The default quality is 75.

Time it takes to encode depends on the crop size of the object. For measuring encoding time, you may use gettimeofday utility.

Hi,I‘d like to know if you can provide a software patch package to set the encode quality for batch jpeg encode interface?

Hi,
The request is under evaluation. If there is further progress, will update.

Hi,
Please try the attachment.
DS5_0_1_TEST_set_JPEG_quality.zip (12.2 KB)

  1. Replace the files:
/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_batch_jpegenc.so
/opt/nvidia/deepstream/deepstream-5.0/sources/includes/nvds_obj_encode.h
  1. Set quality value in NvDsObjEncUsrArgs. For example, in pgie_src_pad_buffer_probe() in deepstream-image-meta-test sample, add the setting:
        /* Preset */
        userData.objNum = num_rects;
+       /* Quality value */
+       userData.quality = 90; 
        /*Main Function Call */
        nvds_obj_enc_process (ctx, &userData, ip_surf, obj_meta, frame_meta);

Please backup the original files before the try.

Ok,thank you for your reply,I will do a test.