#10057 closed defect (fixed)

wrong bit depth shown in datascope

Reported by: Michael Koch Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Make a test image with 1024 levels of gray:

ffmpeg -f lavfi -i color=black:s=32x32,format=gray10le -lavfi geq=lum='X+32*Y',format=gray10le -frames 1 -y test.png

Analyze this test image with showinfo and datascope:

ffmpeg -i test.png -vf format=rgb48,showinfo,datascope=s=1280x1152:mode=color2:format=hex -y out.png

Although showinfo does correctly report 16-bit depth, datascope shows only 8-bit data with 2-digit hex numbers.

Known workarounds: Datascope does show correct 16-bit data if "rgb48" is replaced by "gbrp16le" or "gray16".

Below is the console output.

C:\Users\astro\Desktop\utz>ffmpeg -i test.png -vf format=rgb48,showinfo,datascope=s=1280x1152:mode=color2:format=hex -y out.png
ffmpeg version N-109088-g52f7adfbde-20221115 Copyright (c) 2000-2022 the FFmpeg developers

built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --disable-avisynth --enable-chromaprint --enable-libdav1d --disable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --disable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --disable-libmfx --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --disable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --disable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --disable-libx264 --disable-libx265 --disable-libxavs2 --disable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20221115
libavutil 57. 42.100 / 57. 42.100
libavcodec 59. 52.102 / 59. 52.102
libavformat 59. 34.101 / 59. 34.101
libavdevice 59. 8.101 / 59. 8.101
libavfilter 8. 50.100 / 8. 50.100
libswscale 6. 8.112 / 6. 8.112
libswresample 4. 9.100 / 4. 9.100

Input #0, png_pipe, from 'test.png':

Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, gray16be(pc), 32x32 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn

Stream mapping:

Stream #0:0 -> #0:0 (png (native) -> png (native))

Press [q] to stop, ? for help
[Parsed_showinfo_1 @ 0000028ccd4a3d00] config in time_base: 1/25, frame_rate: 25/1
[Parsed_showinfo_1 @ 0000028ccd4a3d00] config out time_base: 0/0, frame_rate: 0/0
[Parsed_showinfo_1 @ 0000028ccd4a3d00] n: 0 pts: 0 pts_time:0 duration: 1 duration_time:0.04 pos: 0 fmt:rgb48le sar:1/1 s:32x32 i:P iskey:1 type:I checksum:96FAF4A5 plane_checksum:[96FAF4A5] mean:[32768] stdev:[18937.1]
[Parsed_showinfo_1 @ 0000028ccd4a3d00] color_range:pc color_space:gbr color_primaries:unknown color_trc:unknown
Output #0, image2, to 'out.png':

Metadata:

encoder : Lavf59.34.101

Stream #0:0: Video: png, rgb24(progressive), 1280x1152 [SAR 1:1 DAR 10:9], q=2-31, 200 kb/s, 25 fps, 25 tbn

Metadata:

encoder : Lavc59.52.102 png

[image2 @ 0000028ccb86b540] The specified filename 'out.png' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 0000028ccb86b540] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed= 0x
video:72kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown


Change History (1)

comment:1 by Elon Musk, 17 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.