Hi,
libpng doesn't convert 16-bit samples for any color type to host endianness when decoding to an RGBA 16-bit image, this is true for any 16-bit image. This bug was found with libspng's testsuite (https://gitlab.com/randy408/libspng).
The attached file reads basn0g16.png (www.schaik.com) to an RGBA 16bit image, decompresses the IDAT stream, defilters the first row, converts to host endianness and prints the first row from the RGBA image followed by the gray samples from the first scanline. This bug seems to be limited to RGBA 16-bit(and maybe RGB too) output formats, decoding the same file to a 16-bit grayscale image matches the samples from the scanline.
Nevermind, I forgot to add png_set_swap().