[OpenJPEG] TRUNK and MJ2

15 views
Skip to first unread message

szuk...@arcor.de

unread,
May 28, 2012, 12:59:22 PM5/28/12
to open...@googlegroups.com
Using the file 'hall.yuv' (YUV420, 352x288, 300 frames)
I have created a file with 4 columns x 4 rows of 'hall.yuv':
'hall-420-1408x1152.yuv'.

This file I have used to create an MJ2 file with '-r 0':
'hall-420-1408x1152-yuv-r00.mj2'.

This MJ2 file I have used in openjpeg-trunk-r1676 with
'mj2_to_frames'.

The NORMAL code

cio = opj_cio_open()
img = opj_decode(()

needs a total of 120.80 s (2.5 fps): 386 .. 415 ticks per frame.

Replacing the NORMAL code with a routine

static opj_image_t *decode_sample_v2(const unsigned char *sample_buf,
unsigned int sample_size)

needs a total of 137.36 s (2.2 fps): 449 .. 469 ticks per frame.

Saving one of the sample files created for

opj_stream_create_default_file_stream()

I found that 'j2k_to_image' fails to decode the file.

I had to add the following code in j2k_to_image:

if(image->color_space != CLRSPC_SYCC
&& image->numcomps == 3
&& image->comps[0].dx == image->comps[0].dy
&& image->comps[1].dx != 1)
image->color_space = CLRSPC_SYCC;

because the 'image->color_space' is returned as
CLRSPC_UNSPECIFIED.

I suppose the change of the 'image->color_space' should be
done in the library.

winfried

Mathieu Malaterre

unread,
May 29, 2012, 9:33:45 AM5/29/12
to open...@googlegroups.com
Could you please submit this as a proper bug report ? Do not forget to
attach the buggy file.

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

szuk...@arcor.de

unread,
May 30, 2012, 8:55:37 PM5/30/12
to open...@googlegroups.com
On Tue, 29 May 2012 15:33:45 +0200, Mathieu wrote:

>Could you please submit this as a proper bug report ? Do not forget to
>attach the buggy file.

I do not see a bug. I wanted to show that V1-decoding
of J2K files seem to be faster than V2-decoding.

The file I can not send: hall-420-1408x1152-yuv-r00.mj2.xz
is 296 MB large.

Even 'hall.yuv.xz' is 24 MB large.

I have attached two files.

1. 'expand-hall-yuv.c.gz' is the C-file used to expand 'hall.yuv'.

2. 'mj2_to_frames.c.dif.gz' shows the code I have used.

'hall.yuv' can be downloaded from

http://trace.eas.asu.edu/yuv/hall_monitor/hall_cif.7z

winfried
expand-hall-yuv.c.gz
mj2_to_frames.c.dif.gz
Reply all
Reply to author
Forward
0 new messages