Opened 8 years ago

Last modified 12 months ago

#5802 open defect

Conversion from JPEG-SOF3(lossless) fails

Reported by: SteffenKnoll Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: ljpeg
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

How to reproduce:

ffmpeg -y -i C:\Users\sknoll\Desktop\big.sof3 -vcodec jpegls -q:v 0 test.jls
ffmpeg version N-81342-gb93e223 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 51.102 / 57. 51.102
  libavformat    57. 46.101 / 57. 46.101
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 51.100 /  6. 51.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, jpeg_pipe, from 'C:\Users\sknoll\Desktop\big.sof3':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, gray16le(bt470bg/unknown/unknown), 512x512, lossless, 25 tbr, 25 tbn, 25 tbc
[image2 @ 00000000006a5600] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, image2, to 'test.jls':
  Metadata:
    encoder         : Lavf57.46.101
    Stream #0:0: Video: jpegls, gray16le, 512x512, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.51.102 jpegls
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> jpegls (native))
Press [q] to stop, [?] for help
[mjpeg @ 00000000006a7060] mjpeg_decode_dc: bad vlc: 0:0 (00000000006a4f20)
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed= 8.8x
video:5kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown 

See attachments for samples.

Attachments (1)

big.sof3 (118.7 KB ) - added by SteffenKnoll 8 years ago.
Original SOF-3 Jpeg

Download all attachments as: .zip

Change History (5)

by SteffenKnoll, 8 years ago

Attachment: big.sof3 added

Original SOF-3 Jpeg

comment:1 by Carl Eugen Hoyos, 8 years ago

Component: ffmpegavcodec
Keywords: ljpeg added; JPEG lossless removed
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

For future tickets: Please do not upload output files unless specifically asked, they often lead to confusion.

Can be decoded with the reference decoder.

comment:2 by Carl Eugen Hoyos, 8 years ago

Summary: Ffmpeg conversion from JPEG-SOF3(lossless) to JPEG-LS(lossless) cuts the image after some kBConversion from JPEG-SOF3(lossless) fails

comment:3 by Balling, 3 years ago

Also with SOF3 here: https://github.com/MediaArea/MediaInfoLib/issues/1252

000002 FFC3 - SOF3 - Lossless (sequential) (Huffman) (13 bytes)
000002  Header (4 bytes)
000002   Marker:                               65475 (0xFFC3)
000004   Fl - Frame header length:             11 (0x000B)
000006  P - Sample precision:                  12 (0x0C)
000007  Y - Number of lines:                   4664 (0x1238)
000009  X - Number of samples per line:        3064 (0x0BF8)
00000B  Nf - Number of image components in frame: 1 (0x01)
00000C  Component - 1 (0x1) - 1 (0x1) - 1 (0x1) (3 bytes)
00000C   Ci - Component identifier:            1 (0x01)
00000D   Hi - Horizontal sampling factor:      1 (0x1) - (4 bits)
00000D   Vi - Vertical sampling factor:        1 (0x1) - (4 bits)
00000E   Tqi - Quantization table destination selector: 0 (0x00)

What is the reference decoder here? This one: https://github.com/thorfdbg/libjpeg ?

Last edited 3 years ago by Balling (previous) (diff)

comment:4 by Balling, 12 months ago

This now prints [mjpeg @ 0000022cd6767400] mjpeg_decode_dc: bad vlc: 0:0 (0000022cd6767a48)

Note: See TracTickets for help on using tickets.