[Bug 783625] typefinding: add support for jpc or j2c
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Jun 12 14:51:08 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=783625
--- Comment #4 from Aaron Boxer <boxerab at gmail.com> ---
Right. Just to summarize the different formats:
JP2 boxes are in the format
L T BBBBBBBBBBBBBBBBBBBBBBBBB
where :
L is a 4 byte number storing the length of the box, including L,
T is a 4 byte type,
BBBBBBBBBBBBBBBBBBBBBBBBBb are the bytes in the box.
0) JPC is the raw jpeg 2000 code stream, starting with the SOC code stream
marker : magic bytes 0xFF4FFF51
1) JP2 has the JP2 signature at the beginning of the file
/* jp2 signature */
if (memcmp (data, "\000\000\000\014jP \015\012\207\012", 12) != 0)
return;
JP2 also contains a contiguous codestream box of type T = "jp2c", and length L
= 8;
It also contains a JPC file inside (raw code stream)
2) J2C format is identical to JPC except that it has a contiguous codestream
box at the beginning, but unlike in JP2, the length L equals the length of the
entire frame.
So, to find J2C, we can search for XXXX MAKE_FOURCC("jp2c") 0xFF4FFF51
where XXXX match any bytes.
And to find JPC, we need to just search for 0xFF4FFF51. Not sure if this is
enough to be unique.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list