Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to compress a yuv420 raw data using opj_compress #357

Closed
gcode-importer opened this issue Jun 19, 2014 · 3 comments
Closed

how to compress a yuv420 raw data using opj_compress #357

gcode-importer opened this issue Jun 19, 2014 · 3 comments

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 357

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



Reported by dhz6110 on 2014-06-19 08:10:48

@gcode-importer
Copy link
Author

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.

Reported by dhz6110 on 2014-06-19 10:41:00


- _Attachment: [image.j2k](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-357/comment-1/image.j2k)_

@gcode-importer
Copy link
Author

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.

Reported by dhz6110 on 2014-06-24 07:51:19


- _Attachment: [1920x540_i420yuv.raw](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-357/comment-2/1920x540_i420yuv.raw)_ - _Attachment: [420.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-357/comment-2/420.jp2)_ - _Attachment: [1920x540_i422yuv.raw](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-357/comment-2/1920x540_i422yuv.raw)_ - _Attachment: [422.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-357/comment-2/422.jp2)_ - _Attachment: [convert.diff](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-357/comment-2/convert.diff)_

@gcode-importer
Copy link
Author

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.

Reported by detonin on 2014-07-03 09:19:42

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant