IPP UIC convert to jp2 file shows much bigger file size

IPP UIC convert to jp2 file shows much bigger file size

I am using ipp-samples. on linux.

When I convert a image from bmp to jp2 with quality setting as 90, ./uic_transcoder_con -i sample.bmp -q90 sample_90.jp2

the generated file shows much larger size comparing to what I use with imagemagick's convert:

convert -quality 90 sample.bmp sample_90.jp2

Why is that?


5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Also, I found when I set -q 90, or -q100, I got same output file size. I would expect with lower quality number, the file size will decrease.

Generally, when using JPEG2000 encoding, the parameter for compression is expressed as how big do you want to output size to be. The internal factor is actually how many bits the output should be (bit rate). This is totally different compared to JPEG. With JPEG you specify how much truncation you can accept, and this gives various output sizes. Not so with JPEG2000.

Maybe this difference is the reason you get a result different from what you'd expcet.

According to UIC menu: it seems the quality part is the same.

JPEG options:
  -q   quality [1...100]
  -s   sampling, 0 - 444 (default); 1 - 422; 2 - 411
  -j   jpeg encoder mode: b - BASELINE (8-bit lossy); e - EXTENDED (12-bit lossy); p - PROGRESSIVE  (8-bit progressive); l - LOSSLESS (2-16 bit lossless)

  JPEG2K options:
  -q   quality [1...100]
  -l   encoding mode, 0 - lossy encode (default); 1 - lossless encoding

Although I din't inspect the code of UIC for this parameter, I'm certain of one thing, namely that for JPEG2000, you always get the same output size in MB regardless of the pixel values of the input, as long as the number of pixels are the same and the reduction factor is the same.

Possible, UIC maps 1..100 to 1..100% of MB, such that for quality 80, you'd always get exactly 80% MB (20% reduction) regardless of actual pixel values. You can see this simply by encoding at various "quality" values, but if you inspect the jpeg2000 encoder code in UIC, then you also see what I'm talking about.

Leave a Comment

Please sign in to add a comment. Not a member? Join today