openjpeg
openjpeg copied to clipboard
ojp_compress result has same compression ratio despite providing different -r parameters
For parameters
-n 6 -b 64,64 -c [256,256],[256,256],[128,128],[128,128],[128,128],[128,128] -t 1024,1024 -p RPCL -M 1 -TP R -I -r 10,10,10,9,9,8,8,7,6,5,3,1
-n 6 -b 64,64 -c [256,256],[256,256],[128,128],[128,128],[128,128],[128,128] -t 1024,1024 -p RPCL -M 1 -TP R -I -r 20,19,18,17,16,15,14,13,11,9,6,1
and even
-n 6 -b 64,64 -c [256,256],[256,256],[128,128],[128,128],[128,128],[128,128] -t 4096,4096 -p RPCL -SOP -EPH -M 1 -TP R -r 1
I get the same compression ratio of <compressionRatio>1.43</compressionRatio>. Filesize differs a tiny bit but nowhere near that I would expect from lossy vs lossless and 20:1 vs 10:1. Am I doing something wrong?
as you include 1 in your compression ratios, it means that the last layer will include all remaining bits to achieve "lossless" compression (as much as it can when irreversible DWT is used). So what you observe is expected. You'd probably want to use just -r 10 or -r 20 to achieve 20:1 and 10:1 compression.
ah I see, but I also need 12 (logarithmic) quality layers, which is why I used scale like 20,19,18,17,16,15,14,13,11,9,6,1
.