ylb11 / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

how to compress a yuv420 raw data using opj_compress #357

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I using the command : "opj_compress -i 1920x540_i420.raw -o image.j2k -F 
1920,540,3,8,u@1x1:2x2:2x2" to compress a yuv420 raw data, buf failed.
How can I do...

What is the expected output? What do you see instead?

I got this error:
[INFO] tile number 1 / 1
*** glibc detected *** opj_compress: munmap_chunk(): invalid pointer: 
0xb61c7008 ***

What version of the product are you using? On what operating system?

my version is openjpeg-2.1.0, OS is ubuntu12.04

Original issue reported on code.google.com by dhz6...@gmail.com on 19 Jun 2014 at 8:10

GoogleCodeExporter commented 9 years ago
I got the answer, the cmd is 
"opj_compress -i 1920x540_i420.raw -o image.j2k -F 1920,540,3,8,u@1x1:2x2:2x2 
-mct 0"

but the result is also wrong, the color is all red! I don't know Why.

Original comment by dhz6...@gmail.com on 19 Jun 2014 at 10:41

Attachments:

GoogleCodeExporter commented 9 years ago
I have found the correct way, the format *.jp2 is ok, like this:
"opj_compress -i 1920x540_i420.raw -o image.jp2 -F 1920,540,3,8,u@1x1:2x2:2x2 
-mct 0",
the color is all right now.

I have found a little error in convert.c when compress yuv422 raw data, and I 
put it in file convert.diff.

Original comment by dhz6...@gmail.com on 24 Jun 2014 at 7:51

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed by revision #2873.
MCT is automatically disabled when subsampling is detected (this is also true 
when the library is used without opj_compress).

Bug in convert.c has also been fixed.

Thanks for having spotted this.

Original comment by antonin on 3 Jul 2014 at 9:19