Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

IPP UIC convert to jp2 file shows much bigger file size

missing__zlw
Beginner
336 Views

I am using ipp-samples.7.1.1.013 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?

 

0 Kudos
4 Replies
missing__zlw
Beginner
336 Views

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.

0 Kudos
Thomas_Jensen1
Beginner
336 Views

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.

0 Kudos
missing__zlw
Beginner
336 Views

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

0 Kudos
Thomas_Jensen1
Beginner
336 Views

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.

0 Kudos
Reply