Le 12/09/2018 à 12:59, rawfiner a écrit : > Hi Aurélien > > Fist, thank you for showing me this interesting video. > I just compiled your branch. > > My first question is, is it possible to find shift power slope values > that reproduce the result we had before with linear and gamma? > If yes, I think you should compute the new parameters values from the > old ones. > You can take a look at function "legacy_param" in denoiseprofile.c to > see an example. > If that is not possible, we could imagine to have a "mode" selector in > the GUI to switch between "linear and gamma" and "shift power slope". It is not and I will re-integrate the legacy code as soon as I fix some problems. I will definitely add the legacy_param(). > > Considering opencl, I cannot help you here as I have never coded in > opencl and I do not have a GPU. > Yet, even without opencl, code seems already quite fast. Actually, I even wonder if OpenCL is relevant for this as it's a linear operation performed on only one pixel at the time over the flatten array. I wouldn't be surprised if the OpenCL version were slower on some systems than a good SSE2 version. > > Considering the code itself, my only remarks are for this line: > for(size_t k = 1; k < (size_t)ch * roi_out->width * > roi_out->height; k++) > First, is there a reason why you are using a size_t type? int or > unsigned would be fine I think, and you wouldn't need a cast. I took that line from the exposure.c IOP. I think size_t is an explicit array index type so the compiler can do cleverer things with it than just a regular int. > Second, in C, array indexes start at 0, so the red value of the pixel > at the top left corner is not processed by your loop (you can see it > on exported image) > So I guess you want the for loop to be: > for(unsigned k = 0; k < ch * roi_out->width * roi_out->height; k++) That's a copy/paste error from another loop I removed since then. > > I know that C is hard to learn, so congratulations Aurélien! :-) Thanks ! I have posted the first results : https://discuss.pixls.us/t/solving-dynamic-range-problems-in-a-linear-way/9006
> > rawfiner > > > Le mer. 12 sept. 2018 à 14:46, Aurélien Pierre > <rese...@aurelienpierre.com <mailto:rese...@aurelienpierre.com>> a écrit : > > Hi everyone, > > when working with color profiles, the main historic issue was the > non-linearity of the sensors/films. Now, it is rather that the > color profile is performed on a chart having 6-7 EV of dynamic > range while modern cameras have 12-15 EV. Simple gamma corrections > (invented for CRT screens) don't work anymore, and video editors > have invented a new standard able to remap the dynamic range and > to fix the mid-tones at once : > > https://www.youtube.com/watch?v=kVKnhJN-BrQ&index=7&list=PLa1F2ddGya_9XER0wnFS6Mgnp3T-hgSZO > > I have embedded the formula used in Blender > (https://en.wikipedia.org/wiki/ASC_CDL) into the profile > correction module of dt (using the same parameters for each RGB > channel). The result looks more natural than the current version, > without gamut or saturation issues in the highlights. It also > speeds-up the worflow, since all is needed is this module to > adjust the dynamic range, then a tone curve in auto RGB mode > shaped as a stiff S to bring back the contrast. The result is much > better than with the tonemapping modules, with less color fixes. > > I'm a newbie at C and it's the first time I achieve something > inside dt, so I could use some reviews on my code and also some > help on the OpenCL part (the kernel does not load, I don't know > why) : https://github.com/aurelienpierre/darktable/tree/color-grading > > Thanks a lot ! > > Aurélien. > > > > ___________________________________________________________________________ > darktable developer mailing list to unsubscribe send a mail to > darktable-dev+unsubscr...@lists.darktable.org > <mailto:darktable-dev%2bunsubscr...@lists.darktable.org> > > > ___________________________________________________________________________ > darktable developer mailing list to unsubscribe send a mail to > darktable-dev+unsubscr...@lists.darktable.org ___________________________________________________________________________ darktable developer mailing list to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org