[FFmpeg-devel] JPEG2000 multiple SOC and SIZ

Anton Novikov random.plant at gmail.com
Sun Jun 30 15:04:38 EEST 2019


When I truncate the packet at next SOC, I get:
[jpeg2000 @ 0x55ce0298aa40] SIZ
[jpeg2000 @ 0x55ce0298aa40] SIZ width=2056 height=2168 tile_width=2056
tile_height=2168 tile_offset_x=0 tile_offset_y=0 xtiles=1 ytiles=1
[jpeg2000 @ 0x55ce0298aa40] SIZ Rsiz=0x8040 2056 2168
[jpeg2000 @ 0x55ce0298aa40] POC
[jpeg2000 @ 0x55ce0298aa40] unsupported marker 0xFF79 at pos 0x70
[jpeg2000 @ 0x55ce0298aa40] COD
[jpeg2000 @ 0x55ce0298aa40] extra cblk styles E
[jpeg2000 @ 0x55ce0298aa40] QCD
[jpeg2000 @ 0x55ce0298aa40] SOT
    Last message repeated 3 times
[jpeg2000 @ 0x55ce0298aa40] Psot 1451180 too big
[jpeg2000 @ 0x55ce0298aa40] error during processing marker segment ff90

Moreover, in both SIZes, tile offsets are 0, I can't get the idea how the
file should be handled correctly.
file: https://www.file-up.org/niuxrl31dyij
fmpeg commits are attached

вс, 30 июн. 2019 г. в 15:17, Paul B Mahol <onemda at gmail.com>:

> On 6/30/19, Anton Novikov <random.plant at gmail.com> wrote:
> > Hi everyone,
> > I'm reversing the recent version of r3d file format, and have
> encountered a
> > JPEG2000-related thing.
> > I've got a memory dump of something that seems to be JPEG2000, and
> modified
> > ffmpeg to consume it. The log follows:
> > [r3d @ 0x558d304077c0] test
> > [r3d @ 0x558d304077c0] error reading end atom
> > Input #0, r3d, from '/home/anek/src/red/frame2.without0.r3d':
> >   Duration: N/A, bitrate: N/A
> >     Stream #0:0: Video: jpeg2000, bayer_rggb16le, 8192x4320, 24 fps, 24
> > tbr, 134286336 tbn, 134286336 tbc
> >     Metadata:
> >       filename        : ?
> > File 'frame.jpg' already exists. Overwrite ? [y/N] y
> > Stream mapping:
> >   Stream #0:0 -> #0:0 (jpeg2000 (native) -> mjpeg (native))
> > Press [q] to stop, [?] for help
> > Truncating packet of size 9496960 to 7595371
> > /home/anek/src/red/frame2.without0.r3d: corrupt input packet in stream 0
> > /home/anek/src/red/frame2.without0.r3d: Operation not permitted
> > [jpeg2000 @ 0x558d3041c280] SIZ
> > [jpeg2000 @ 0x558d3041c280] SIZ Rsiz=0x8040 2056 2168
> > [jpeg2000 @ 0x558d3041c280] POC
> > [jpeg2000 @ 0x558d3041c280] unsupported marker 0xFF79 at pos 0x70
> > [jpeg2000 @ 0x558d3041c280] COD
> > [jpeg2000 @ 0x558d3041c280] extra cblk styles E
> > [jpeg2000 @ 0x558d3041c280] QCD
> > [jpeg2000 @ 0x558d3041c280] SOT
> >     Last message repeated 3 times
> > [jpeg2000 @ 0x558d3041c280] Duplicate SOC at 3821997=0x3A51AD
> > [jpeg2000 @ 0x558d3041c280] SIZ
> > [jpeg2000 @ 0x558d3041c280] SIZ Rsiz=0x8040 2056 2168
> > [jpeg2000 @ 0x558d3041c280] POC
> > [jpeg2000 @ 0x558d3041c280] unsupported marker 0xFF79 at pos 0x3A5203
> > [jpeg2000 @ 0x558d3041c280] COD
> > [jpeg2000 @ 0x558d3041c280] extra cblk styles E
> > [jpeg2000 @ 0x558d3041c280] QCD
> > [jpeg2000 @ 0x558d3041c280] SOT
> >     Last message repeated 3 times
> > [jpeg2000 @ 0x558d3041c280] Progression order RPCL
> >     Last message repeated 3 times
> > [swscaler @ 0x558d30425900] deprecated pixel format used, make sure you
> did
> > set range correctly
> > [mjpeg @ 0x558d3040e780] removing common factors from framerate
> > Output #0, image2, to 'frame.jpg':
> >   Metadata:
> >     encoder         : Lavf58.27.103
> >     Stream #0:0: Video: mjpeg, yuvj444p(pc), 2056x2168, q=2-31, 200 kb/s,
> > 24 fps, 24 tbn, 24 tbc
> >     Metadata:
> >       filename        : ?
> >       encoder         : Lavc58.52.102 mjpeg
> >     Side data:
> >       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
> > [image2 @ 0x558d3040abc0] Application provided invalid, non monotonically
> > increasing dts to muxer in stream 0: 101000 >= 0
> > /home/anek/src/red/frame2.without0.r3d: Operation not permitted
> > frame=    1 fps=0.4 q=2.9 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=
> > 0x
> > video:96kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> > muxing overhead: unknown
> >
> > picture dimensions are 8192x4320, but in JPEG2000 bytestream there are 2
> > SOC and SIZ markers with SIZ mentioning 2056x2168. The image is decoded,
> > but colors and area are wrong. What can I do?
>
> Make sure it uses tiles (each jpeg2000 is special tile) and that your
> packet is trimmed.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-jpeg2000-decoding-dbginfo.patch
Type: text/x-patch
Size: 3999 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190630/31546334/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-some_picture.patch
Type: text/x-patch
Size: 11019 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190630/31546334/attachment-0001.bin>


More information about the ffmpeg-devel mailing list