[OpenJPEG] MJ2 binaries revisited in branch15

25 views
Skip to first unread message

szuk...@arcor.de

unread,
Apr 18, 2012, 3:25:12 PM4/18/12
to open...@googlegroups.com

1. wrap_j2k_in_mj2 input/from_[0:n-1].j2k FROM_J2K.mj2
======================================================
enumcs: either ENUMCS_SRGB or ENUMCS_GRAY.

1.1. mj2_to_frames FROM_J2K.mj2 FROM_J2K.yuv
===========================================
The input file should be refused because the enumcs is not SYCC
but SRGB or GRAY.

Currently BMP files are created using all three components.


1.2. extract_j2k_from_mj2 FROM_J2K.mj2 output/FROM_J2K_[0:n-1]
=========================================================
OK: enumcs SYCC is correct.


2. frames_to_mj2 -i FROM_YUV.yuv -o FROM_YUV.mj2
====================================================
enumcs: ENUMCS_SYCC.

2.1. mj2_to_frames FROM_YUV.mj2 FROM_YUV.yuv
===========================================
OK: enumcs SYCC is correct.

2.2. extract_j2k_from_mj2 FROM_YUV.mj2 output/FROM_YUV
==================================================
The input file should be refused because the enumcs is SYCC
instead of SRGB or GRAY.

Currently J2K files are created.

Using one of these J2K files, e.g. FROM_YUV_00000.j2k:

j2k_to_image -i FROM_YUV_00000.j2k -o FROM_YUV_00000.bmp

The BMP file uses component[0] only.

j2k_to_image -i FROM_YUV_00000.j2k -o FROM_YUV_00000.pnm

For each component a PNM file is created.

j2k_to_image -i FROM_YUV_00000.j2k -o FROM_YUV_00000.png

Refused.

j2k_to_image -i FROM_YUV_00000.j2k -o FROM_YUV_00000.tga

Refused.

j2k_to_image -i FROM_YUV_00000.j2k -o FROM_YUV_00000.tif

Refused.


The attached patch corrects the code in the mj2 directory.

As the values for ENUMCS_GRAY and ENUMCS_SRGB are wrong, I have
put the three values into openjpeg.h: one file, one change.

The correct values are:

#define ENUMCS_SRGB 16
#define ENUMCS_GRAY 17
#define ENUMCS_SYCC 18

winfried

openjpeg-branch15-r1626-2-MJ2.dif.gz

Mathieu Malaterre

unread,
Apr 23, 2012, 9:23:59 AM4/23/12
to open...@googlegroups.com
Applied:

http://code.google.com/p/openjpeg/source/detail?r=1640

Thanks
> --
> You are subscribed to the mailing-list of the OpenJPEG project (www.openjpeg.org)
> To post: email to open...@googlegroups.com
> To unsubscribe: email to openjpeg+u...@googlegroups.com
> For more options: visit http://groups.google.com/group/openjpeg
> For more info about OpenJPEG main partners : visit  www.tele.ucl.ac.be (UCL) and www.intopix.com



--
Mathieu
Reply all
Reply to author
Forward
0 new messages