14 Replies Latest reply on Apr 20, 2014 2:50 AM by Alexey Danilchenko

    Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support

    Alexey Danilchenko

      Hi

       

      I posted this as a support request here (not sure if that is a correct place) with technical details of my debugging the CameraRaw module. Basically, it appears that Lightroom/ACR do not handle the raw files from Kodak DCS SLR/n, SLR/c and 14n(x) cameras correctly. It appears that Lightroom/ACR skips the tonal expansion curve in these raw files and uses the compressed 10bit raw values (with expansion curve applied properly the raw files are 12bit and a curve itself looks very much like Sony ARW one). I provided all the technical details in that referenced post and it should be really easy to fix so I would appreciate if this is passed onto CameraRaw development team.

       

      Thanks

        • 1. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
          Level 5

          The ACR team is fairly active here.  They should read your post fairly quickly if they haven't done so already.

          • 2. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
            Alexey Danilchenko Level 1

            More technical details about tonal curve compression used in Kodak SLR/n, SLR/c and 14n(x) .DCR is provided here (in English).

             

            From ACR/Lightroom prospective the fix is simple - the maximum value needs to be taken from the size of the expansion curve (TIFF tag 2317 from .DCR file) which is either 1024 or 4096 short integers instead of being hardcoded to 1023 as it is now.

             

            It would be great to hear from someone from ACR team on this matter...

            • 3. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
              ssprengel Adobe Community Professional & MVP

              I would suggest adding a link to example files so Adobe can verify what you're describing as an issue, and perhaps some analysis from the exact raw files you've linked, including numeric and visual differences between Adobe and Kodak processing.

              • 4. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                Alexey Danilchenko Level 1

                Have you read those referenced posts? I did say I can provide the raw files but if screen shots somehow work better I can do those.

                 

                I also already did analysis for them (in Kodak firmware, and debugging ACR  and Photodesk so I sort of know what I am talking about even if a little bit). And at last - Dave Coffin dcraw sources do show the way that works properly since 2004. What else is needed?

                • 5. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                  Alexey Danilchenko Level 1

                  As suggested above adding some screenshots. All defaults with + negative exposure correction + highlights recovery.

                   

                  The raw file for download used in these comparisons (as it is from the camera)

                   

                  Kodak Photodesk:

                  Photodesk.jpg

                   

                  Lightroom 5.3 (notice the unrecoverable blown up area on TV):

                  Lightroom.jpg

                   

                  And at last a clincher - if I copy this raw and  change camera name from SLR/n to Kodak Proback (with ExifTool or even hex editor replacing string in a binary), then open both files in Lightroom with the same settings applied - the difference is clear as night and day (the one on the left with highlights blown up - is original from SLR/n, the one in the right - with EXIF modified to state its from Kodak Proback):

                   

                  12bit-ACR.jpg

                   

                  No highlights recovery or exposure tweaking can recover them in the left shot (as seen on a standalone screenshot above in Lightroom).

                  • 6. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                    ssprengel Adobe Community Professional & MVP

                    My suggestion was to provide both raw files and screenshots to demonstrate the problem.  I looked at the feedback thread and saw no raw files.  I looked at the livejournal link and saw no raw files.  Use something like dropbox.com to host the files and post a public download link to them in a message, here.  The feedback link might also be a place to put links.

                     

                    And providing a JPG conversion from the Kodak software might also help.  As I understand the problem, the issue is that Adobe software clips these files because it assumes a maximum value that is too low.  If experimenting with the raw file in Adobe software always clips the highlights more than the default Kodak processing that would demonstrate something is wrong, and also give someone at Adobe concrete data to test with without having to go get a Kodak camera to shoot their own samples with.

                    • 7. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                      Alexey Danilchenko Level 1

                      I've added the raw file as well.

                       

                      What purposue would JPEG achieve in raw conversion? The problem is that max value is hardcoded and it value depends in the camera name tag in ACR (as I posted if you read it, I run ACR under debugger and saw it use the hardcoded constant - even specified what function it was done in according to log messages I found in ACR binary). The fact is that there is an opensource dcraw with the clear as day code that uses that very curve to deduce the maxvalue and does it correctly - what other examples are needed? And last  - this meant to attract attention of software developers (those that work on ACR code) not photographers. Sorry if that was not clear.

                      • 8. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                        ssprengel Adobe Community Professional & MVP

                        Adobe has an almost 31-billion-dollar market cap at the moment, so there are likely layers to their intake process, between the users and the engineers.  What I've suggested providing allows a first-level person at Adobe to demonstrate the clipping of the Adobe conversion relative to Kodak software, without having to get a Kodak camera and Kodak software nor know how to debug a program.  A JPG (converted from the same raw file using Kodak software) provides a Kodak reference image for someone to compare to Adobe processing.

                         

                        I am another user like yourself, and someone who was a double-major in computer-science and math before Macs and PCs were invented so can appreciate your analysis, and definitely believe what you're saying is occurring, I'm not questioning that, I'm just suggesting providing enough inputs for a customer-advocate-level person, who likely is the one who reads the forums and feedback site, initially, to demonstrate to themselves what is occurring that results in poor image conversions, so that the information can get into the hands of more technical people that do have ways to look at the code and authority procure cameras as needed to test and fix things.  A lower-level Adobe employee won't have access to the camera to create their own test images and may reside in a different country on the opposite side of the world from those with a debugger.  Even if an engineer did see this thread without it being routed to them via a customer-advocate, if they didn't have a Kodak camera in hand, then it might be too much work at the end of the day or at home at night to start the internal bureaucracy to have one delivered to their office some where in the world, and there might be multiple-levels of sign-off before that occurred, or if they request a loaner from Kodak there could be delays.  Once you see something from Eric Chan, then you know an engineer has taken an interest in this thread, and/or the one on the feedback site.

                         

                        If you are just passing on the information from others and don't have your own camera to produce your own raws, then fine, I was assuming you did have the camera in hand based on the detailed analysis you've provided.

                        • 9. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                          Alexey Danilchenko Level 1

                          The data + sample raw + screenshots to illustrate it are all there. That is enough information for support to pick it up. Now I would really appreciate an Adobe comment - this chat as helpful as it is just clouding the issue.

                          • 10. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                            ssprengel Adobe Community Professional & MVP

                            Ok, I see the raw file, linked above.  I skipped over it to look a the screenshots. 

                            • 11. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                              Level 1

                              Adobe Photoshop Lightroom is not a easy work. You finish faster.

                              • 12. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                                Alexey Danilchenko Level 1

                                > Adobe Photoshop Lightroom is not a easy work. You finish faster.

                                 

                                Sorry - do not understand this. What am I supposed to finish faster? If you referring to me doing a patch then I don't think just changing the limit from 1023 will work (and this is the only thing you can easily patch in a binary - not even saying about finding all the places where it needs to be done). The limit needs to be taken from the size of the tone mapping curve in a raw file (and it is present in each Kodak .DCR raw file - even Proback where it is linear), so if that size is 1024 words then the limit is 1023 and is it is as for Proback or uncompressed .DCR 4096 words it needs to be 4095.

                                • 13. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                                  Alexey Danilchenko Level 1

                                  Hmm - I have tried to create a patched version of CameraRaw.dll in my Lightroom  installation and it works. Literaly replacing one byte to up the limit from 1023 to 4095. It seems to work correctly for 10bit compressed files and 12 bit uncompressed files. The fix should be really easy for Adobe to do so it would be nice to see it done in the product.

                                  • 14. Re: Camera Raw/Lightroom: Kodak DCS SLR/n/c cameras missing Tone Curve support
                                    Alexey Danilchenko Level 1

                                    I have created a patcher that changes one byte bringing the limit to 4095 from 1023 and it works quite nicely. In a process of sitting there with debugger and breaking my head over these binaries, it looks as though this limit setting is happening in one function all the time (in DNG Converter, Camera Raw plugin and Lightroom CameraRaw component) - the function referred to in error message as ReadKodakDCR() and this error message is produced in a log if the file is defective or has invalid/unknown format. This fix seems to work nicely with 10 bit and 12 bit files and my Lightroom displays and handles both of them properly.

                                     

                                    It would be very good if this limit setting could actually be implemented in a product (it is literally a constant changing).