Coder Social home page Coder Social logo

Specify Output Bit Depth about dnglab HOT 4 CLOSED

jedypod avatar jedypod commented on July 16, 2024
Specify Output Bit Depth

from dnglab.

Comments (4)

kmilos avatar kmilos commented on July 16, 2024 2

If I did though, it currently would be unusable because the bit depth is being resampled to 16bit from whatever the source is (most cinema dngs i have are 12bit, most stills are 14bit).

A bug report for the above

This is not a bug per se, but how it works in a simplest implementation. Uncompressed samples >8b must be stored as at least 2 bytes (16bits). They are not "resampled" in any way, just easiest to be stored that way (LSB aligned with some MSBs wasted/zeroes). One could do some bit packing to avoid wastage when this is then no longer true, but this is not mandatory (although it is recommended by the TIFF spec, so this could be reported as a feature request/enhancement).

It's the WhiteLevel tag that determines the actual bit depth of the sample after it is loaded as a uint16.

I'm pretty sure such files work ok w/ any Adobe SW, LibRaw-based SW (e.g. ART, rawpy, etc.), and RawSpeed-based SW (e.g. darktable), or vkdt using rawler. For any other apps not working with these simplest uncompressed files, there should be a bug filed with them.

from dnglab.

cytrinox avatar cytrinox commented on July 16, 2024

As lossless compression in DNG is widely supported, I'v not implemented any optimization for uncompressed output. Do you have a usecase where lossless compression is unusable for you?

from dnglab.

jedypod avatar jedypod commented on July 16, 2024

I don't really have a use-case where I would want to be outputting uncompressed dngs. If I did though, it currently would be unusable because the bit depth is being resampled to 16bit from whatever the source is (most cinema dngs i have are 12bit, most stills are 14bit).

So I guess my rambling post above is twofold:

  1. A bug report for the above
  2. A request to specify the output bit depth. This would actually be quite useful for me I think. Taking a 12bit uncompressed dng source and re-encoding to 10bit dng with lj92 compression as 10bit with a nonlinear transfer function would be very useful. Currently I don't believe that is possible with dnglab?

Hopefully that clarifies things.

from dnglab.

cytrinox avatar cytrinox commented on July 16, 2024

If lossless compression is selected, output bit depth is usually matches source bit depth (with few exceptions).
For uncompressed output, dnglab only supports 16 bit unpacked data for now.

Bit depth may change if source contains a linearization table - as linearization is applied during decoding process.

from dnglab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.