Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775155 - media-libs/libpng-1.6.37-r2 broken rendering of Rec. 2020 PQ colorspace
Summary: media-libs/libpng-1.6.37-r2 broken rendering of Rec. 2020 PQ colorspace
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-09 22:25 UTC by Thomas Groman
Modified: 2024-02-03 18:00 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Groman 2021-03-09 22:25:51 UTC
media-libs/libpng-1.6.37-r2 does not display images encoded with a Rec. 2020 PQ colorspace (High Dynamic Range) correctly, instead making the image incredibly dark and hard to view. This effects all dependent software, including libQt5
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-09 22:29:07 UTC
Compared to what?

* -r2 fixed a broken symlink over -r1
* -r1 just bumped EAPI

Could you give some more information please? And emerge --info?
Comment 2 Thomas Groman 2021-03-09 23:05:23 UTC
Portage 3.0.13 (python 3.7.9-final-0, default/linux/amd64/17.1/desktop, gcc-9.3.0, glibc-2.32-r3, 5.10.11-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.10.11-gentoo-x86_64-Intel-R-_Core-TM-_i5-6500_CPU_@_3.20GHz-with-gentoo-2.7
KiB Mem:    16374940 total,    229764 free
KiB Swap:    6291452 total,   5446908 free
Timestamp of repository gentoo: Mon, 08 Mar 2021 04:30:01 +0000
Head commit of repository gentoo: 75204d1fd4c4e1d6464d0eca88be8a4335a2acc6
Head commit of repository trinity: f994447b579414ca7d6ee4881195b4b14443312b

sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.12 [disabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r4::gentoo, 3.7.9::gentoo, 3.8.6::gentoo, 3.9.0::gentoo
dev-util/ccache:          3.7.12::gentoo
dev-util/cmake:           3.17.4-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.2-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes

localrepo
    location: /home/tom/Documents/localrepo
    masters: gentoo

trinity
    location: /usr/local/overlay/trinity
    sync-type: git
    sync-uri: https://github.com/Fat-Zer/trinity.git
    masters: gentoo

rion
    location: /var/lib/layman/rion
    masters: gentoo
    priority: 50

Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE freedist free-noncomm linux-firmware linux-fw-redistributable NPSL WidePix"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=skylake"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/i2pd/certificates"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=skylake"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://mirror.usu.edu/mirrors/gentoo/ http://gentoo.mirrors.tds.net/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb branding brotli bzip2 cairo caps cdda cdr cli color-management crypt cups custom-modes dbus dmenu dri dts dvb dvd dvdr elogind emboss encode exif fat ffmpeg flac fortran ftdi fuse g726 g729 gdbm gif gnutls gpm gsm gtk gtk2 gui http2 iconv icu imlib ipv6 ithreads jack java jpeg kdrive lcms libglvnd liblockfile libnotify libsamplerate libtirpc lm-sensors lmdb mad mbox mng mp3 mp4 mpeg multilib ncurses nftables nonfree nova nptl nsplugin ntfs offensive offlinehelp ogg opencl opengl openmp opus pam pango pcre pdf png ppds qt5 rav1e readline rtlsdr sasl sdl seccomp sndfile socks5 speex spell split-usr ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vc video vim-syntax vorbis vpx webp webrtc wxwidgets x x264 x265 xattr xcb xephyr xinerama xml xscreensaver xtables xv xvid zenmap zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="gnutls" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_8 python2_7 python3_7" QEMU_SOFTMMU_TARGETS="x86_64 arm aarch64 mips" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

media-libs/libpng-1.6.37-r2::gentoo was built with the following:
USE="apng -static-libs" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse"
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-09 23:28:34 UTC
How about the rest? :)
Comment 4 Thomas Groman 2021-03-09 23:41:55 UTC
(In reply to Sam James from comment #3)
> How about the rest? :)

I'm not sure exactly what your asking for. Do you want a side by side comparison of the raw source image in the editor, srgb encoded image in view, and rec. 2020 PQ encoded image in a viewer?
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-09 23:44:16 UTC
(In reply to Thomas Groman from comment #4)
> (In reply to Sam James from comment #3)
> > How about the rest? :)
> 
> I'm not sure exactly what your asking for. Do you want a side by side
> comparison of the raw source image in the editor, srgb encoded image in
> view, and rec. 2020 PQ encoded image in a viewer?

"Compared to what?

* -r2 fixed a broken symlink over -r1
* -r1 just bumped EAPI"

So, 1.6.37-r2 is broken. But what worked?
Comment 6 Thomas Groman 2021-03-09 23:49:10 UTC
(In reply to Sam James from comment #5)
> So, 1.6.37-r2 is broken. But what worked?

Oh, I'm not aware of any previous version that worked correctly. I just noticed some contacts in my XMPP roster had very dark icons, then a few weeks later I made some art in Krita and curiously enabled the 'Rec. 2020 PQ' option in PNG export, and noticed the same exact over-darkness happened to the exported png and this did not happen when that option was left disabled.
Comment 7 Thomas Groman 2021-03-09 23:50:39 UTC
(In reply to Thomas Groman from comment #6)
> (In reply to Sam James from comment #5)
> > So, 1.6.37-r2 is broken. But what worked?
> 
> Oh, I'm not aware of any previous version that worked correctly. I just
> noticed some contacts in my XMPP roster had very dark icons, then a few
> weeks later I made some art in Krita and curiously enabled the 'Rec. 2020
> PQ' option in PNG export, and noticed the same exact over-darkness happened
> to the exported png and this did not happen when that option was left
> disabled.

I contacted the developer in the XMPP client and they said it just uses what libQt5 uses for png support, which a quick ldd on libQt5.so reported that was libpng
Comment 8 John Bowler 2024-02-03 18:00:23 UTC
Thomas: can you append the test image to this PR?

There's no information in the PNG format that records PQ is being used.  There is a proposal for PNG v3 in the W3C working group but it requires a new chunk (cICP) and supporting that chunk *inside* libpng will require a significant amount of software development.  This is unlikely to happen unless the W3C working group provides a complete patch; indeed it's not clear how to do it given the traditional RGB interface of libpng.