rico Offline Upload & Sell: Off
|
p.1 #1 · A1 demo of HEIF vs JPEG | |
HEIF is a storage format that has recently migrated from the motion video world, starting with Canon R5 in 2020. HEIF is actually a container standard (like TIFF) with one file encoding standard of interest to us called HEVC (aka H.265). HEIF in general is hugely complicated, heavily patent encumbered, and video oriented: no surprise that it took forever to show up in our still-photography cameras. Making this possible is standards support for single-frame encoding, combined with advanced hardware for video that now appears in everything including fridges (not kidding). So the A1, for example, can just employ its video circuit to generate a single frame at no extra cost and with super energy efficiency.
Question to myself was whether to switch over to HEIF after almost three decades of JPEG photography. Concerns and motivations: image size on the storage medium, software support, encoding/decoding performance, image quality, DR. For an initial test, I use a fixed scene with continuous house lighting, tripod, and a large range of illumination and colors. A1 settings of interest: ES, low ISO, f/5.6, manual focus, custom color balance. The idea was a reproducible imaging environment with no change except the encoding.
First observation:

Indeed, the JPEG file is 3x the size of HEIF. The claimed superior compression of HEIF is further reinforced by my PNG intermediate files which indicate much more content in the HEIF sourced images. PNG is an image-oriented data format with lossless compression. As we will see below, the extra content is shadow detail.
Here is the scene as rendered by JPEG versus HEIF, both in SOOC appearance and also after boosting brightness. I use a recent version of GIMP with HEIF support, and process the image on a canvas with 32-bit floating-point values per channel per pixel (i.e. 96-bit pixels):

Two interesting and kinda contradictory observations. First, the JPEG image has a green cast that gets worse in the shadows. Second, the JPEG has a superior roll-off into the burned-out highlights. Note that both JPEG and HEIF images are generated by the camera, although probably using different data paths. There is a mention in Wikipedia about conversions between JPEG and YCbCr that produce a green cast due to integer rounding.
Here are two crops, first at 200% scale and second at 100% scale:


JPEG is clearly more grainy, exhibits an objectionable green cast, poorer detail especially in colored areas, and the characteristic JPEG color splotches. From a historical perspective, I'm actually pretty impressed with this JPEG engine (except the cast). Meanwhile, HEIF is superior across the board, and retains impressive detail and color fidelity. The third panel is just for fun: ISO 50 doubles the photon density to the benefit of the shadows while sac'ing highlight protection. This used to be called "expose to the right". No-one cares anymore in this high DR era. I pick up another 1 stop of DR by the 4x stacking. A1 HEIF 4:2:2 is encoded with 10 bits per channel (I believe), so the third panel has 12 bits of DR which is still less than the native sensor capabilty. Sony RAW will obviously win, but that's a different topic.
Side note: HEVC decoding to RGB as used internally by computer software requires no complicated color-space algorithms, so GIMP support is not a suspect in the highlight or color cast issues. In fact, Apple Preview loads both SOOC files and renders them with the same warts. HEVC rendering is not in the same class of challenge as RAW rendering where no two software vendors deliver the same image.
One explanation for the observed JPEG image quality: if highlights are better protected, then the shadow pixels are drawn from the lower-order portion of the response curve where noise levels are higher.
In summary, I will use HEIF but still PP to JPEG for any images that face the public. I do need to investigate the A1 JPEG color cast because JPEG could still serve with its graceful highlight management.
|