←back to thread

361 points Tomte | 5 comments | | HN request time: 0.203s | source
Show context
Scaevolus ◴[] No.43584261[source]
Ultimately, RAW formats aren't that complex, and camera firmware is mostly developed in countries that don't have strong open source software traditions.

Look at the decoders for each format that darktable supports here: https://github.com/darktable-org/rawspeed/tree/develop/src/l...

It's some binary parsing, reading metadata, maybe doing some decompression-- a thousand lines of C++ on average for each format. These aren't complex codecs like HEVC and only reach JPEG complexity by embedding them as thumbnails!

Cameras absolutely could emit DNG instead, but that would require more development friction: coordination (with Adobe), potentially a language barrier, and potentially making it harder to do experimental features.

Photographers rarely care, so it doesn't appreciably impact sales. Raw processing software packages have generally good support available soon after new cameras are released.

replies(12): >>43607682 #>>43608468 #>>43609020 #>>43609118 #>>43609169 #>>43609799 #>>43612739 #>>43612940 #>>43615274 #>>43615505 #>>43617505 #>>43624875 #
buildbot ◴[] No.43607682[source]
I think that might be why a lot of camera makers don't care to use DNG - it's easier to make their own format and easy enough for others to reverse engineer it.

One thing that open source libraries do tend to miss is that very important extra metadata - for example, Phase One IIQ files have an embedded sensor profile or full on black frame that is not yet encoded into the raw data like it typically is for a NEF or DNG from many cameras. It does seem rawspeed handles this from a quick scan of the code.

It can get more tricky - Sinar digital backs have an extra dark frame file (and flat frame!) that is not part of the RAW files, and that is not handled by any open source library to my knowledge - though I did write a basic converter myself to handle it: https://github.com/mgolub2/iatodng_rs

I'm not sure how DNG would be able to handle having both a dark and flat frame without resorting to applying them to the raw data and saving only the processed (still unbayered) data.

replies(3): >>43608510 #>>43609830 #>>43616321 #
Aaargh20318 ◴[] No.43609830[source]
> One thing that open source libraries do tend to miss is that very important extra metadata - for example, Phase One IIQ files have an embedded sensor profile or full on black frame that is not yet encoded into the raw data like it typically is for a NEF or DNG from many cameras.

In astronomy/astrophotography the FITS format[1] is commonly used, which supports all these things and is, as the name suggests, extremely flexible. I wonder why it never caught on in regular photography.

1: https://en.wikipedia.org/wiki/FITS

replies(1): >>43612816 #
1. buildbot ◴[] No.43612816[source]
Oh interesting! This seems like it would be a good fit ;)

Especially for really old setups that had RGB color wheels and multiple exposures, exactly like a multispectral astro image might. Phase one also has a multispectral capture system for cultural heritage, which just shoots individual IIQs to my knowledge… It would work great too for multiple pixel shift shots.

Possibly, the engineers just didn’t know about it when they were asked to write the firmware? It’s funny, I think most RAW formats are just weird TIFFs to some degree, so why not use this instead.

replies(2): >>43614026 #>>43619007 #
2. davidkwast ◴[] No.43614026[source]
Yes. TIFF would "fit the bil" here. It deals with multspectral satellite images. It supports 32 and 64 bits floats and 16bits integers.
replies(1): >>43614888 #
3. buildbot ◴[] No.43614888[source]
Oh nice, I didn't know that TIFF could handle that as well!
replies(1): >>43627550 #
4. 9dev ◴[] No.43619007[source]
> Possibly, the engineers just didn’t know about it when they were asked to write the firmware?

Considering how often I witnessed engineers trying to build something to solve a problem instead of sitting down and researching if someone else did that already, and likely better, I really wouldn’t be surprised if that is the answer to most questions in this thread.

5. davidkwast ◴[] No.43627550{3}[source]
TIFF is almost an multidimensional array serialization format. Obviously is centered on images but it can have many layers. Usualy RGBA but they can be have other interpretations. It supports some level of streamed writting and random access over HTTP or other ranged protocols.