uclouvain / openjpeg

Official repository of the OpenJPEG project
Other
977 stars 457 forks source link

Openjpeg 2.3.1 changes color matrix. #1237

Open Jamaika1 opened 4 years ago

Jamaika1 commented 4 years ago

Openjpeg 2.3.1 changes color matrix. In my opinion codec should not do this. copenjpeg_j2k.exe -i Stationery.yuv -o Stationery_openjpeg.j2k -F 4000,3000,3,8,u@1x1:2x2:2x2 -mct 1 -b 64,64 -c [128,128],[256,256] -p CPRL -r 150 https://imgsli.com/MTIzOTc Unable to convert colorspace unknown to rgb.

Jamaika1 commented 4 years ago

Matrix unknown. For HTJPEG2000 the same settings are correct. cjpegHTJ2K_j2c.exe -i Stationery.yuv -o Stationery_openjph.j2c -dims {4000,3000} -num_comps 3 -signed false -bit_depth 8 -downsamp {1,1},{2,2},{2,2} -block_size {64,64} -precincts {128,128},{256,256} -prog_order CPRL -qstep 0.048 https://imgsli.com/MTIzOTg

Jamaika1 commented 4 years ago

https://www.sendspace.com/file/tna3t1

Jamaika1 commented 3 years ago

It turned out my mistake. I wanted to use RGB-YCoCg {mct} color conversion, which is forbidden for yuv '-F'. Is it possible to import yuv rgb24 or rgba photos. Reportedly an alpha channel is possible for jpeg2000 part16 and is fully compatible with heif/avif. I have not tested if the matrix colors are correct for mct zero