Strange compression ratio with x265 and jpeg2000 codecs

660 views Asked by At

I've implement a picture encoding software using x265 and libjasper(jasper Jpeg2000) codecs, and I'm having strange ratio compression in lossless compression mode.

My ratio compression is ( 1 - output_stream_size / initial_picture_size).

Most of the studies says that hevc is better than jpeg2000 but in my case, jpeg2000 ratio is better than x265 ratio. I'm also having the same result with jasper software and x265 software.

So I'm thinking maybe my input params for x265 are not correct ...

Normally I'm working with monochroma pictures, 8 bitdepth. but I have done the same test with color picture and I'm getting the same result.

There are same results with colored picture from here (Original Images) http://mmspg.epfl.ch/iqa

x265 --psy-rd 1.0 --lossless --input-res 1280x1600 --input-csp i420 --fps 1 --preset veryslow  --profile mainstillpicture bike_orig.yuv bike_orig.bin

jasper -f bike_orig.ppm -F bike_orig.jp2 -T jp2

Hevc ouput trace: Hevc encoder output trace

Outpute file size :

Original Input : 6144017 bytes

hevc bitstream : 5637967 bytes

jp2 bitstream : 3261791 bytes

Codecs Version :

Japser : 
1.900.1 , libjasper 1.900.1
x265 : 
x265 [info]: HEVC encoder version 2.0
x265 [info]: build info [Linux][GCC 4.4.7][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2

Does anyone have an idea why I'm having such results.

Thanks you.

2

There are 2 answers

0
stuhlo On

JPEG2000 compression ratio is superior to HEVC when considering lossless encoding. Main reason for that seems to be an advantage of the discrete wavelet transformation used in JPEG2000 over the discrete cosine transformation.

See this for further detials. (Evaluation: HEVC, H.264/AVC, JPEG 2000 and JPEG LS)

EDIT: Regarding still picture encoding, JPEG2000 is probably even more superior as HEVC can't take an advantage of inter frame video compression.

1
AudioBubble On

Thanks for your answer. I have already read this paper to justify my results. But I noticed that the article presents results regarding video (moving picture). Can we extend this to still picture. So we can compare Jpeg2000 and HEVC MainStill Picture (MSP)?