#11486: Half Float EXR with PIZ compression decode with artifacts
-------------------------------------+-------------------------------------
             Reporter:  groucho86    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avcodec      |                  Version:  7.1
             Keywords:  piz exr      |               Blocked By:
  decode_block                       |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 Certain 16bit EXRs with PIZ compression are decoded with horizontal black
 lines.
 Uncompressed and ZIP1 versions of this EXR work fine. I have tried re-
 compressing PIZ via Resolve, Baselight and OpenImageIO -- the artifact
 remains.

 How to reproduce:
 {{{
 ffmpeg started on 2025-02-27 at 09:58:04
 Report written to "ffmpeg-20250227-095804.log"
 Log level: 99
 Command line:
 ffmpeg -v 9 -loglevel 99 -report -i ffmpeg_piz_decompress_issue_250227.exr
 "tif_%04d.tiff"
 ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers
   built with Apple clang version 16.0.0 (clang-1600.0.26.4)
   configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1_3 --enable-
 shared --enable-pthreads --enable-version3 --cc=clang --host-cflags=
 --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-
 gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-
 libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame
 --enable-libopus --enable-librav1e --enable-librist --enable-librubberband
 --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1
 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-
 libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
 libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma
 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-
 libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
 libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-
 libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
 --enable-audiotoolbox --enable-neon
   libavutil      59. 39.100 / 59. 39.100
   libavcodec     61. 19.100 / 61. 19.100
   libavformat    61.  7.100 / 61.  7.100
   libavdevice    61.  3.100 / 61.  3.100
   libavfilter    10.  4.100 / 10.  4.100
   libswscale      8.  3.100 /  8.  3.100
   libswresample   5.  3.100 /  5.  3.100
   libpostproc    58.  3.100 / 58.  3.100
 Splitting the commandline.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '9'.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-report' ... matched as option 'report' (generate a
 report) with argument '1'.
 Reading option '-i' ... matched as input url with argument
 'ffmpeg_piz_decompress_issue_250227.exr'.
 Reading option 'tif_%04d.tiff' ... matched as output url.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option v (set logging level) with argument 9.
 Applying option loglevel (set logging level) with argument 99.
 Applying option report (generate a report) with argument 1.
 Successfully parsed a group of options.
 Parsing a group of options: input url
 ffmpeg_piz_decompress_issue_250227.exr.
 Successfully parsed a group of options.
 Opening an input file: ffmpeg_piz_decompress_issue_250227.exr.
 [AVFormatContext @ 0x15a804fc0] Opening
 'ffmpeg_piz_decompress_issue_250227.exr' for reading
 [file @ 0x600001770000] Setting default whitelist 'file,crypto,data'
 Probing image2 score:50 size:2048
 Probing mp3 score:1 size:2048
 Probing exr_pipe score:51 size:2048
 [exr_pipe @ 0x15a804fc0] Format exr_pipe probed with size=2048 and
 score=51
 [exr_pipe @ 0x15a804fc0] Before avformat_find_stream_info() pos: 0 bytes
 read:32768 seeks:0 nb_streams:1
 [exr_pipe @ 0x15a804fc0] parser not found for codec exr, packets or times
 may be invalid.
 [exr_pipe @ 0x15a804fc0] parser not found for codec exr, packets or times
 may be invalid.
 [exr @ 0x15a8055a0] line order: 0.
 [exr_pipe @ 0x15a804fc0] Probe buffer size limit of 5000000 bytes reached
 [exr_pipe @ 0x15a804fc0] stream 0: start_time: NOPTS duration: NOPTS
 [exr_pipe @ 0x15a804fc0] format: start_time: NOPTS duration: NOPTS
 (estimate from bit rate) bitrate=0 kb/s
 [exr_pipe @ 0x15a804fc0] After avformat_find_stream_info() pos: 65688832
 bytes read:65688832 seeks:0 frames:1
 Input #0, exr_pipe, from 'ffmpeg_piz_decompress_issue_250227.exr':
   Duration: N/A, bitrate: N/A
   Stream #0:0, 1, 1/25: Video: exr, 1 reference frame,
 gbrpf32le(unknown/unknown/linear), 4608x3164 [SAR 1:1 DAR 1152:791], 0/1,
 25 fps, 25 tbr, 25 tbn
 Successfully opened the file.
 Parsing a group of options: output url tif_%04d.tiff.
 Successfully parsed a group of options.
 Opening an output file: tif_%04d.tiff.
 [out#0/image2 @ 0x6000010783c0] No explicit maps, mapping streams
 automatically...
 [vost#0:0/tiff @ 0x159e05e40] Created video stream from input stream 0:0
 detected 10 logical cores
 Successfully opened the file.
 Stream mapping:
   Stream #0:0 -> #0:0 (exr (native) -> tiff (native))
 [vost#0:0/tiff @ 0x159e05e40] Starting thread...
 [vf#0:0 @ 0x600001479040] Starting thread...
 [vist#0:0/exr @ 0x159e05250] [dec:exr @ 0x159e07450] Starting thread...
 [in#0/exr_pipe @ 0x60000197c100] Starting thread...
 Press [q] to stop, [?] for help
 [exr @ 0x159e081d0] line order: 0.
 [in#0/exr_pipe @ 0x60000197c100] EOF while reading input
 [in#0/exr_pipe @ 0x60000197c100] Terminating thread with return code 0
 (success)
 [vist#0:0/exr @ 0x159e05250] [dec:exr @ 0x159e07450] Decoder thread
 received EOF packet
 strange codes is not implemented. Update your FFmpeg version to the newest
 one from Git. If the problem still occurs, it means that your file has a
 feature which has not been implemented.
 If you want to help, upload a sample of this file to
 https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing
 list. (ffmpeg-de...@ffmpeg.org)
 [exr @ 0x159e081d0] decode_block() failed.
 [vist#0:0/exr @ 0x159e05250] [dec:exr @ 0x159e07450] Decoder returned EOF,
 finishing
 [vist#0:0/exr @ 0x159e05250] [dec:exr @ 0x159e07450] Terminating thread
 with return code 0 (success)
 [graph -1 input from stream 0:0 @ 0x60000127c420] Setting 'video_size' to
 value '4608x3164'
 [graph -1 input from stream 0:0 @ 0x60000127c420] Setting 'pix_fmt' to
 value '175'
 [graph -1 input from stream 0:0 @ 0x60000127c420] Setting 'time_base' to
 value '1/25'
 [graph -1 input from stream 0:0 @ 0x60000127c420] Setting 'pixel_aspect'
 to value '1/1'
 [graph -1 input from stream 0:0 @ 0x60000127c420] Setting 'colorspace' to
 value '2'
 [graph -1 input from stream 0:0 @ 0x60000127c420] Setting 'range' to value
 '0'
 [graph -1 input from stream 0:0 @ 0x60000127c420] Setting 'frame_rate' to
 value '25/1'
 [graph -1 input from stream 0:0 @ 0x60000127c420] w:4608 h:3164
 pixfmt:gbrpf32le tb:1/25 fr:25/1 sar:1/1 csp:unknown range:unknown
 [format @ 0x60000127c580] Setting 'pix_fmts' to value
 
'rgb24|rgb48le|pal8|rgba|rgba64le|gray|ya8|gray16le|ya16le|monob|monow|yuv420p|yuv422p|yuv440p|yuv444p|yuv410p|yuv411p'
 [format @ 0x60000127c580] Setting 'color_ranges' to value 'tv'
 [auto_scale_0 @ 0x60000127c630] w:iw h:ih flags:'' interl:0
 [format @ 0x60000127c580] auto-inserting filter 'auto_scale_0' between the
 filter 'Parsed_null_0' and the filter 'format'
 [AVFilterGraph @ 0x600000e70380] query_formats: 4 queried, 6 merged, 3
 already done, 0 delayed
 [auto_scale_0 @ 0x60000127c630] picking rgb48le out of 17 ref:gbrpf32le
 alpha:0
 [swscaler @ 0x160408000] [swscaler @ 0x160418000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x1604e8000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x1605d8000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x1606c8000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x1607b8000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x1608a8000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x160998000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x160a88000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x160b78000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x160c68000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [swscaler @ 0x160408000] [swscaler @ 0x160d58000] Forcing full internal H
 chroma due to input having non subsampled chroma
 [auto_scale_0 @ 0x60000127c630] w:4608 h:3164 fmt:gbrpf32le csp:gbr
 range:unknown sar:1/1 -> w:4608 h:3164 fmt:rgb48le csp:gbr range:pc
 sar:1/1 flags:0x00000004
 [auto_scale_0 @ 0x60000127c630] [framesync @ 0x15a805a48] Selected 1/25
 time base
 [auto_scale_0 @ 0x60000127c630] [framesync @ 0x15a805a48] Sync level 1
 [graph -1 input from stream 0:0 @ 0x60000127c420] video frame properties
 congruent with link at pts_time: 0
 Output #0, image2, to 'tif_%04d.tiff':
   Metadata:
     encoder         : Lavf61.7.100
   Stream #0:0, 0, 1/25: Video: tiff, 1 reference frame, rgb48le(pc,
 gbr/unknown/linear, progressive), 4608x3164 [SAR 1:1 DAR 1152:791], 0/1,
 q=2-31, 200 kb/s, 25 fps, 25 tbn
       Metadata:
         encoder         : Lavc61.19.100 tiff
 [out#0/image2 @ 0x6000010783c0] Starting thread...
 [auto_scale_0 @ 0x60000127c630] [framesync @ 0x15a805a48] Sync level 0
 [out_#0:0 @ 0x60000127c4d0] EOF on sink link out_#0:0:default.
 [vf#0:0 @ 0x600001479040] Filtergraph returned EOF, finishing
 [vf#0:0 @ 0x600001479040] All consumers returned EOF
 [vost#0:0/tiff @ 0x159e05e40] Encoder thread received EOF
 [vf#0:0 @ 0x600001479040] Terminating thread with return code 0 (success)
 [vost#0:0/tiff @ 0x159e05e40] Terminating thread with return code 0
 (success)
 [image2 @ 0x159e05770] Opening 'tif_0001.tiff' for writing
 [file @ 0x600000e68000] Setting default whitelist 'file,crypto,data'
 [AVIOContext @ 0x103004080] Statistics: 80777146 bytes written, 0 seeks,
 309 writeouts
 [out#0/image2 @ 0x6000010783c0] All streams finished
 [out#0/image2 @ 0x6000010783c0] Terminating thread with return code 0
 (success)
 [out#0/image2 @ 0x6000010783c0] Output file #0 (tif_%04d.tiff):
 [out#0/image2 @ 0x6000010783c0]   Output stream #0:0 (video): 1 frames
 encoded; 1 packets muxed (80777146 bytes);
 [out#0/image2 @ 0x6000010783c0]   Total: 1 packets (80777146 bytes) muxed
 [out#0/image2 @ 0x6000010783c0] video:78884KiB audio:0KiB subtitle:0KiB
 other streams:0KiB global headers:0KiB muxing overhead: unknown
 frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
 speed=0.0413x
 [in#0/exr_pipe @ 0x60000197c100] Input file #0
 (ffmpeg_piz_decompress_issue_250227.exr):
 [in#0/exr_pipe @ 0x60000197c100]   Input stream #0:0 (video): 1 packets
 read (65688832 bytes); 1 frames decoded; 0 decode errors;
 [in#0/exr_pipe @ 0x60000197c100]   Total: 1 packets (65688832 bytes)
 demuxed
 [AVIOContext @ 0x159e05130] Statistics: 65688832 bytes read, 0 seeks

 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11486>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to