8 ms·
Support HDR images in your app [video]
- altairprime 3y agoISO/TS 22028-5:2023 Photography and graphic technology — Extended colour encodings for digital image storage, manipulation and interchange — Part 5: High dynamic range and wide colour gamut encoding for still images (HDR/WCG) https://www.iso.org/standard/81863.html https://www.iso.org/standard/81863.html Note that, in this specification’s title, “HDR” refers to luminosity ranges that are broader than sRGB supports, and “WCG” refers to colorspaces that are broader than sRGB supports. Apple’s video is focused on the HDR component of still images, which is relatively new and not yet finalized into any ISO or W3C standards. Support for WCG images is already widespread courtesy of ICC profiles, though many holdouts (such as Slack and Discord) continue to damage WCG images posted to their services. Quoting Apple’s video transcript at this time index: https://developer.apple.com/wwdc23/10181?time=205 https://developer.apple.com/wwdc23/10181?time=205 > This specification, TS22028-5, provides a structure for encoding HDR content into existing still image formats without compromising quality. > The specification requires Hybrid Log-Gamma, HLG, or Perceptual Quantizer, PQ, as the encoding transfer function. These are functionally analogous to the gamma curves used in SDR images. > The color primaries for ISO HDR files are the BT.2020 primaries > HDR images are required to be 10 bits or more per component. This means that some formats, like HEIF, can encode HDR, but some others, like traditional JPEG, are not able to be 22028-5 compliant, as they only support 8 bits per component. PNG only supports 8-bit or 16-bit, making it quite inefficient for 10- and 12-bit HDR. However, JPEG-XL seems to support 10 bits or more per component. This may provide supporting context for why Apple began supporting a new image format this fall. > for required metadata, both traditional ICC profiles and CICP tags are valid.
- the8472 3y agoIsn't that just BT.2100?
- turnsout 3y agoYeah, it does appear to be a reiteration of Rec. 2100 / BT.2100. I wonder if it's because this refers to still images rather than video?
- altairprime 3y agoYes, that’s why: https://stage.color.org/hdr/07-Nicolas_Bonnier.pdf https://stage.color.org/hdr/07-Nicolas_Bonnier.pdf (slide “Motivations”): > Several attempts to use PQ/HLG and BT.2020 for still photography are surfacing > But so far, the digital still imaging industry has not settled on a reference HDR/WCG image encoding for consumers > The purpose of TS 22028-5 is to provide requirements and guidelines for HDR/WCG colour encoding of still images And a bit further down, referring specifically to BT.2100: > Shall use ITU-R BT.2020/2100-2 colour primaries
- pornel 3y agoBTW, the old JPEG is a ~12-bit format. It's widely assumed to be an 8-bit format, because libjpeg by default gives you output truncated to 8 bits. Unfortunately, libjpeg made higher depth outputs an either-or compile-time option that breaks the ABI, so nobody enables that mode.
- altairprime 3y agoTIL, and thanks for pointing that out. Apparently there’s a tiny subset of PNG world that can cope with bit-shifted 12-bit, but apparently like JPEG, support is diminished and ultimately not dependable.
- Night_Thastus 3y agoHDR is such a clusterf*ck right now. Especially with monitors. I am so sick of every monitor with Vesa HDR-400 claiming they're an "HDR" monitor. I'm sorry, but that standard is garbage. It's so bad it's meaningless. Not only is that a pathetic amount of brightness, but the local dimming required is just awful. You can have a screen with a whopping 4 zones that react terribly and slap an HDR label on it. HDR-600 is barely any better, frankly.
- crazygringo 3y agoNot just monitors but video players too. Trying to play HDR content on a regular SDR screen is a mess. If you rip an HDR version of a movie: - VLC does nothing. It shows it as so dark it's unwatchable - IINA shows it as brightness comparable to an SDR version of the movie, but with a weird green tint - QuickTime is weirdly in-between, brighter than VLC but not as bright as an SDR version - Infuse got fixed this year so that it plays HDR content to visually match the SDR version of the same content on a SDR screen (the only player I've found that can on Macs) And if you want to convert your file in ffmpeg, good luck. I still haven't found the magic settings that reverses whatever entertainment studios are doing to translate their SDR into HDR. (The magic settings that Infuse has somehow figured out.) There's no flag or setting for it -- you have to input a bunch of custom values.
- lldb 3y agompv with --tone-mapping=bt.2446a (or whichever you like from https://mpv.io/manual/stable/#options-tone-mapping https://mpv.io/manual/stable/#options-tone-mapping), --hdr-compute-peak=yes, and --target-peak=SDR monitor nits, does the best I've seen yet.
- PaulBGD_ 3y agoPlex does a fairly good conversion too, iirc using ffmpeg.
- zimpenfish 3y agoI can't remember where I found this but it's what I've been using to downscale and convert the occasional 10bit downloads (using the nvenc GPU acceleration.) ffmpeg -hide_banner -y -probesize 100M -i "$file" -map 0:v:0 -c:v h264_nvenc -x264-params b_pyramid=2:ref=4:vbv-maxrate=30000:vbv-bufsize=15000 -refs 4 -crf 17 -preset:v fast -profile:v high -b_strategy 2 -rc-lookahead 900 -level 4.1 -pix_fmt yuv420p -color_range 1 -colorspace 1 -color_primaries bt709 -color_trc bt709 -subq 10 -vf zscale=tin=smpte2084:min=bt2020nc:pin=bt2020:rin=tv:t=smpte2084:m=bt2020nc:p=bt2020:r=tv,zscale=t=linear,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p,zscale=s=1280x720 -c:a copy output.mkv
- chongli 3y agoHas anyone actually used a decent HDR display? I’m really skeptical of the technology. I really don’t want websites and videos to be able to display blindingly bright white and other pure colours on my screen. I like things to be readable and not painful to look at.
- FL410 3y agoYes. The HDR on a recent Macbook Pro is the real deal, and unmistakable when you see it. Same with modern OLED HDR TVs - they can get so bright it hurts.
- Night_Thastus 3y agoWhat OLEDS have decent brightness? OLEDS really struggle with that because of burn in. They can get temporarily bright, or bright in tiny zones, but in less than ideal conditions they crunch it right down.
- deleted 3y ago[deleted]
- astrange 3y agoLEDs have separate backlights, which is good for getting brighter but bad for contrast because they can't get as dark as OLEDs. I think the reason you don't want to drive OLEDs as hard (so there's current limitation/ABL) is more about burn-out than burn-in.
- cwillu 3y ago> they can get so bright it hurts. I regret that hn doesn't have HDR support so as to properly emphasize that <em><blink><pain>THIS IS NOT A FEATURE.</pain></blink></em>
- mort96 3y agoIt would have been a pretty nice feature though, if it could've been used to uniformly make SDR content brighter, to make the laptops more useful in sunlight and with sunglasses. Too bad that's not a feature (I'm guessing because it wear out the screen or something).
- nchase 3y agoNaive question: why is this newsworthy? What are the implications?
- deleted 3y ago[deleted]
- adzm 3y agoHDR and higher bit colors are becoming more popular but are still very much a mess from the consumer and software developer standpoint.
- altairprime 3y agoThe original title referred to Apple’s endorsement of an upcoming ISO standard that defines how to represent HDR images within existing still image file formats such as JPEG-XL and HEIF. It turns out that there isn’t any such finalized standard — unlike, for example, BT.2020 in the moving image file formats space. So, presumably, the existence of a standard under development — and the endorsement of it by a major manufacturer of cameras and displays — was considered newsworthy by the OP.
- janandonly 3y agoOP here. Yes, I'm hoping that the mess that is "HDR" video standards can be prevented in the still images arena. Hopefully, with Apple's weight behind this open standard, other producers will adopt it as well.
- dang 3y agoThe submitted title was "Apple put their weight behind an open HDR standard called “ISO/TS 22028-5”" but that broke the HN guideline against editorializing: "Please use the original title, unless it is misleading or linkbait; don't editorialize." - https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html If you want to say what you think is important about an article, that's fine, but do it by adding a comment to the thread. Then your view will be on a level playing field with everyone else's: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&sort=byDate&type=comment&query=%22level%20playing%20field%22%20by:dang https://hn.algolia.com/?dateRange=all&page=0&prefix=false&so...
- wilg 3y agoI simply wouldn’t have looked at this with the new title. The original title was better. The new title deletes the interesting insight about the format they are using. Now it just looks like a video about general HDR workflow and I don’t know why it’s been posted. The newsworthy element may not be the entire link but some element on the page, especially for longer form content.
- altairprime 3y agoSubmitting a blog post about this would have been much more effective than linking an Apple developer video with a modified title. (And, then I wouldn’t have had to add quotes and context as a comment below.)
- wilg 3y agoArguably, everything worked out fine until the title changed.
- pvg 3y agoIt didn't - one of the main reasons you can't make up your own title is that it acts as a kind of mega-comment over everyone else's comments. If you want to just comment, write a regular comment. If you want your own title with your own commentary, write your own commentary and submit it to HN with your title. What you can't do is use someone else's stuff to make your commentary more important.
- deleted 3y ago[deleted]
- Moldoteck 3y agoIdk if iphones have this problem, but on Android, insta reels are so messed up bc of hdr. I'm watching em at night with low brightness and suddenly a hdr video pops out and it brightens my eyes to oblivion... And this issue is present for years
- altairprime 3y agoI tested and it looks like the iPhone lowers the peak nits based on the brightness slider, so the HDR reels aren’t “max phone brightness” bright, like they’re trying to be. Dunno how that compares, but yes, it’s present to some degree. (Low Power Mode disables EDR, which works around it, but has other effects as well.)
- hulitu 3y agoAndroid had a stoopid setting when it changes the brightness of the screen based on ambient light. When the ambient light is given by the screen ...