How change compressing rations/ quality for encoder from YUV to JPEG (VPU + Linux + Sabre i.mx6q)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How change compressing rations/ quality for encoder from YUV to JPEG (VPU + Linux + Sabre i.mx6q)

928 Views
ievgenshendelya
Contributor I

Hello,

I am programming encoder which take YUV file and make JPEG file. I made simple encoder which based on VPU's example (mxc_vpu_test.out). I need to add settings for change compassing rations/ quality (best quality, medium, best compression ratio). Can I do this by VPU? What I shoulde do? I found in documentation information about struct EncMjpgParam which consist hiffBits and qMatTab. Also I found tables with some data in file vpu_jpegtable.h.

But how it use not clear.  Can you give me some advice or examples?

My platform:

Sabre i.mx6Q - SDP

Linux (standard image from Freescale's packet L3.0.35_4.0.0_130424_images_MX6)

Host machine: Ubuntu 9.04

Thank you!

1 Reply

682 Views
ricardo_ioct
Contributor III

Hello, ievgenshendelyar,

Have you consider the possibility of use gstreamer? Your application could be solved with a very simple pipeline, that could be executed from the command line or from an C application, if you prefer. The JPEG encoder plugin is able to encode YUV frames into JPEG files and provides possibility to change the quality of the encoding and the IDTC algorithm.

I'd give a shot for a gstreamer solution in this case.

Att.,

Ricardo Gurgel.