#5303(avcodec:new): Support float in tiff
#5303: Support float in tiff ---------------------------------------+--------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Keywords: tif Blocked By: | Blocking: Reproduced by developer: 0 | Analyzed by developer: 0 ---------------------------------------+--------------------------------- http://samples.ffmpeg.org/image-samples/building.tif http://thread.gmane.org/gmane.comp.video.ffmpeg.libav.user/15090/focus=15110 Gonzalo kindly provided a tiff image containing floating point values. Depends on ticket #3657 {{{ $ ffmpeg -i building.tif ffmpeg version 3.0.git-dev-dev-486-g6f5048f Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 55. 19.100 / 55. 19.100 libavcodec 57. 27.101 / 57. 27.101 libavformat 57. 28.100 / 57. 28.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 39.100 / 6. 39.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 [tiff @ 0x3d19820] This format is not supported (bpp=128, 4 components) [tiff_pipe @ 0x3d18280] decoding for stream 0 failed [tiff_pipe @ 0x3d18280] Could not find codec parameters for stream 0 (Video: tiff, none): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options building.tif: could not find codec parameters Input #0, tiff_pipe, from 'building.tif': Duration: N/A, bitrate: N/A Stream #0:0: Video: tiff, none, 25 tbr, 25 tbn, 25 tbc At least one output file must be specified }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by ami_stuff): I have some samples here which I created in the past (decodes fine with Photoshop). "32bits_channel_16_bit_half.tif" decodes with ffmpeg, but not correctly. http://www.datafilehost.com/d/db481cd0 -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by ami_stuff): * cc: ami_stuff@… (added) -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by ami_stuff): Also here are some unsupported pbm files by ffmpeg (probably not float): http://www.datafilehost.com/d/0da82b02 -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by Balling): * status: new => open Comment: Is the quality of float formats in ffmpeg (which are still much worse than in gimp) enough to implement this? Also, if it decodes at all, does it mean the fix is just to recognise it is float? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by richardpl): float is float, quality is better than gimp. If you go from float to float you lose nothing. fixed to float and float to fixed is different story. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Balling): Replying to [comment:5 richardpl]:
fixed to float and float to fixed is different story.
Okay, I did not test quality in GIMP, but if you will go to the comment on the patch (that was accepted in version two 453004fde6fdfeb5506947d253ec768dae1115b8) and you will see it has improved precision of float to fixed IN 16 times, Paul (!), but still looks bad for Mark) https://patchwork.ffmpeg.org/comment/58418/ BTW, some further tiff float samples in Eye of Gnome: https://gitlab.gnome.org/GNOME/eog/-/issues/55 -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by richardpl): You are mistaken. If you can reproduce problem with current head version of ffmpeg than report issue here. Otherwise you are making false conclusions by selectively picking and interpreting information you found on web. Once more I will tell you that float to float is working perfectly. It is just fixed to float and inverse of that may have some issues due to nature of different data storage, and that is just because float have more bits to hold data. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by pdr0): Regarding "support float in tiff" - "float_pattern000_ae.tiff" in the attached 7zip archive is a RGB float (no alpha) 620x240 pattern made of 5* 128x240 patches, -2,-1,0,1,2 ie. RGB (-2,-2,-2) , (-1,-1,-1) , (0,0,0) , (1,1,1), (2,2,2) gimp imports correctly ("gimp pointer" correctly identifies -2,-1,0,1,2 patches) Open source programs such as natron, vapoursynth import correctly. Commercial programs, such as ae, ps, nuke,... also import correctly {{{ ffmpeg -i "float_pattern000_ae.tiff" ffmpeg version N-101185-g029e3c1c70 Copyright (c) 2000-2021 the FFmpeg developer s built with gcc 9.3-win32 (GCC) 20200320 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-conf ig=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target- os=mingw 32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable- pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable- libfreetype --en able-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable- opencl - -enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable- libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enab le-cuda-llvm --disable-libglslang --enable-libass --enable-libbluray --enable-li bmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable- libwebp -- disable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable- libopencore-amrw b --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable- schanne l --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-lib twolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable- libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra- cflags=-DLIBTWOLAME _STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp libavutil 56. 65.100 / 56. 65.100 libavcodec 58.124.100 / 58.124.100 libavformat 58. 67.100 / 58. 67.100 libavdevice 58. 12.100 / 58. 12.100 libavfilter 7.107.100 / 7.107.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 [tiff @ 000000f2d3966f00] This format is not supported (bpp=96, 3 components) [tiff_pipe @ 000000f2d3954900] decoding for stream 0 failed [tiff_pipe @ 000000f2d3954900] Could not find codec parameters for stream 0 (Vid eo: tiff, none): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (500 0000) options Input #0, tiff_pipe, from 'float_pattern000_ae.tiff': Duration: N/A, bitrate: N/A Stream #0:0: Video: tiff, none, 25 fps, 25 tbr, 25 tbn, 25 tbc At least one output file must be specified }}} according to exiftool, and mediainfo - this is big endian - specifying the input pix_fmt does not work either ffmpeg -pix_fmt gbrpf32be -i "float_pattern000_ae.tiff" -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by pdr0): * Attachment "float_pattern000_ae.7z" added. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Balling):
Once more I will tell you that float to float is working perfectly.
That is what I said too, but I was talking about float to fixed and back, sorry for not being clear. That is what also is present in GIMP. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by richardpl): And you claim something without any proof or what? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Balling): Replying to [comment:10 richardpl]:
And you claim something without any proof or what?
I assumed you will convert to quantised values, quality of roundtrip float --> quantised --> float is rather bad still. I never played with float to float. There is a comment that "I am asking that because some of the numbers in some of the code (i dont remember which) where tuned to give more accurate overall results" on that patch, which may be the last blocking issue there. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by cehoyos): * Attachment "float_pattern000_ae.tiff" added. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+------------------------------------- Reporter: Carl Eugen | Owner: (none) Hoyos | Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Balling): I just learned that float TIFF is used for GeoTIFF including for EGM (Earth Gravitational Models, nice). For it to work the precision of float to int should be perfect, but of course best programs just use float. EGM is needed to calculate GNSS (GPS, for example) coordinates for your altitude. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:12> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+------------------------------------- Reporter: Carl Eugen | Owner: (none) Hoyos | Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Balling): Another sample: https://github.com/Beep6581/RawTherapee/issues/6575#issue-1362028852 https://github.com/Beep6581/RawTherapee/files/9490364/float32deflate.zip -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:13> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+------------------------------------- Reporter: Carl Eugen | Owner: (none) Hoyos | Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Balling): https://patchwork.ffmpeg.org/project/ffmpeg/patch/20221001230512.271-1-mindm... -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:14> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+------------------------------------- Reporter: Carl Eugen | Owner: (none) Hoyos | Type: enhancement | Status: closed Priority: wish | Component: avcodec Version: git-master | Resolution: fixed Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Elon Musk): * status: open => closed * resolution: => fixed -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:15> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5303: Support float in tiff -------------------------------------+------------------------------------- Reporter: Carl Eugen | Owner: (none) Hoyos | Type: enhancement | Status: reopened Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Balling): * status: closed => reopened * resolution: fixed => Comment: [tiff @ 000001d1e0f4eb00] This format is not supported (bpp=32, bppcount=1) Still not supported. https://github.com/Beep6581/RawTherapee/files/9490364/float32deflate.zip -- Ticket URL: <https://trac.ffmpeg.org/ticket/5303#comment:16> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg