vkdt dev diary pt 8, windows port

In dt we look for the illuminant closest in temperature to D65, take its matrix, and then chromatically adapt it to D65.

Note that D65 + StdA calibration is only a recommendation by Adobe, so DNG files not having that combo are still perfectly valid, and they don’t have issues per se :wink:

Two remarks/questions:

Since the exif data is copied from the raw, the value of the tag Software is not correct or missing. I would like to correct this value to “vkdt”. If this can be done by adding
-Software=\"vkdt\" to line 119 in o-jpg/main.c, I would like to try to add this to the code.
DateTime is also wrong since it’s also copied from the raw, this should be the export date, but I guess correcting this would be too difficult for me.

Second, I do not find any good documentation about how to use the (parametric) mask module. I guess, it is necessary to create an additional branch in the graph, but how exactly? E.g. I have a photo of a black and orange butterfly on a green background and I only want to sharpen the butterfly and not create any additional noise in the green background.

seems to be exactly the way to do it. i’ll look into hooking up o-jpg to the config file too, so you could put the exiftool command in config.rc like it is for the metadata expander.

yeah there’s interface calls to print the time, should be possible.

there’s really only this: vkdt website and documentation or this vkdt website and documentation but i need to rewrite the whole drawing/masking documentation, it’s not really up to date.

for the wiring i’d start with the dodge.pst or dodge-guided.pst presets and replace the exposure module to taste (by grade or deconv or something) and replace the draw module for hand drawn masks by the mask module (which of course also needs input from a buffer).

for the hand drawn stuff there’s the question if i want to put it before or after crop in the graph, have to think a bit about it and clean the presets + docs.

1 Like

hm yeah i saw that. i’m not super fond of doing much computation on colour matrices before even passing the input to the processing graph. i suppose since applying a matrix per se is kinda broken for more saturated colours this is a useful “best effort” fallback for a default render without an input profile.

you’re right, i’m not aware of such videos. i recorded a few small demo clips to show a gui feature or two but didn’t put into the docs (yet?). the node editor is just this one, i didn’t write it. so i suppose you’ll find generic videos showing how to interact with it in other projects.

hello @hanatos

i recorded a few small demo clips to show a gui feature or two but didn’t put into the docs (yet?)

Please, do so whenever you update the documentation.
Even some short video tutorial without audio could be extremely useful in my opinion.

Thanks a lot!

Disregard please, if this is just noise, but I just tried the windows build from (https://vkdt.org/vkdt-nightly-w64.zip) on my Win 11 desktop, (i5-2400, GTX1650) ready to try out further tomorrow. It starts, but dies as soon as I click a thumbnail. I then started it with -d all -D perf

And got this, from start to stop:

C:\vkdt-0.7.99-165-g6411f83a> vkdt.exe -d all -D perf
[pipe] base directory C:\vkdt-0.7.99-165-g6411f83a
[pipe] home directory C:\Users\User/vkdt/config
[pipe] loaded 76 modules
[gui] glfwGetVersionString() : 3.3.8 Win32 WGL EGL OSMesa MinGW
[gui] monitor [0] LEN D32q-20B at 0 0
[gui] vk extension required by GLFW:
[gui]   VK_KHR_surface
[gui]   VK_KHR_win32_surface
[qvk] dev 0: vendorid 0x10de
[qvk] dev 0: NVIDIA GeForce GTX 1650
[qvk] max number of allocations 4096
[qvk] max image allocation size 32768 x 32768
[qvk] max uniform buffer range 65536
[qvk] num queue families: 4
[qvk] picked device 0 without ray tracing and with float atomics and without coopmat support
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] R8G8B8A8_UNORM
[qvk] R8G8B8A8_SRGB
[qvk] A2B10G10R10_UNORM_PACK32
[qvk] colour space: 0
[gui] no joysticks found
[gui] no display profile file display.LEN D32q-20B, using sRGB!
[gui] no display profile file display.LEN D32q-20B, using sRGB!
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] R8G8B8A8_UNORM
[qvk] R8G8B8A8_SRGB
[qvk] A2B10G10R10_UNORM_PACK32
[qvk] colour space: 0
[db] allocating 1024.0 MB for thumbnails
[mem] images : peak rss 0.000488281 MB vmsize 0.000488281 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.000244141 MB vmsize 0.000244141 MB
[perf] time to load images 0.005s
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.101212 MB vmsize 0.101212 MB
[mem] images : peak rss 0.0507813 MB vmsize 0.0507813 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.0966797 MB vmsize 0.0966797 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.152588 MB vmsize 0.152588 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.152588 MB vmsize 0.152588 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.0703125 MB vmsize 0.0703125 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.0507813 MB vmsize 0.0507813 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.0946045 MB vmsize 0.0946045 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.105286 MB vmsize 0.105286 MB
[mem] images : peak rss 342.313 MB vmsize 362.063 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 46.6872 MB vmsize 46.6872 MB
[mem] images : peak rss 342.313 MB vmsize 362.063 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 46.6872 MB vmsize 46.6872 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[mem] images : peak rss 42.2109 MB vmsize 42.2109 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 39.0896 MB vmsize 39.0896 MB
[mem] images : peak rss 42.0469 MB vmsize 42.0469 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 38.6926 MB vmsize 38.6926 MB
[mem] images : peak rss 0.101563 MB vmsize 0.101563 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.102234 MB vmsize 0.102234 MB
[i-bc1] C:\Users\User/vkdt/cache/90e37d685c871baa.bc1: can't open file!
[i-bc1] C:\Users\User/vkdt/cache/90e37d685c871baa.bc1: wrong magic number or version!
[mem] images : peak rss 41.6016 MB vmsize 41.6016 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 39.0896 MB vmsize 39.0896 MB
[mem] images : peak rss 15.4375 MB vmsize 15.4375 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 12.6833 MB vmsize 12.6833 MB
[mem] images : peak rss 63.0938 MB vmsize 63.0938 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB

C:\vkdt-0.7.99-165-g6411f83a>

Edit: It’s actually stopping by itself, i.e. no input required. My click was coincidental.
Anything I should try?
Edit 2 - Windows is version 21H2, 11 Pro.

OMG this is extremely nerdy

This is not correct, is it?

looks good to me. now you can visualise the mask by plugging the mask output into the display:hist module, say. the blend module will probably have to set the mask mode to inverted or so. though i think that’s upside down and i’ll have to change the parameters around before the next release.

and yes, i’ll probably want to include a preset that does all this wiring for you.

You know you don’t have to do everything for me. If you think it’s easy and I can figure it out myself, let me create more pull requests. Maybe creating presets would even be a good paragraph in my article.

As far as this specific use case is concerned, I think it would be best if deconv/mask were after colour because before white balance the whole image is pretty yellowish and the mask doesn’t work well.

1 Like

My first code pull request in years… I think I have several tiny translations in RawTherapee though because I wrote the article last(?) year.

1 Like

hm sorry i have no really good ideas here… maybe try the nightly package from the github release instead? on unix no news is good news, but on windows it probably means segfault of some kind. really hard to diagnose. the output until then looks all good to me. is it trying to open your Pictures folder there? is there anything in your ${HOME}/vkdt/cache/ directory? i.e. broken thumbnails or something?

1 Like

Recent gdb in msys2/bash on Windows works as well as in ‘native’ Unix, at least for my stuff. Might at least narrow down the region where the spontaneous exit occurs

Thanks for the suggestions - I’ll chase them up later. :slight_smile:

Hello @hanatos

I have added a new issue on github:

Basically, every TIFF (8-16 bit integer) is not displayed correctly on Windows 11 (today’s build).
Other formats (RAWs - JPEGs) work correctly.

thanks for opening the issue!

i think this is because i don’t really have support for tiff like at all. rawspeed just happens to load them somehow, i think rawler doesn’t do it at all. if this is a feature you depend on for whatever reason maybe it’s best if i write a dedicated i-tif input module.

Hello @hanatos

maybe it’s best if i write a dedicated i-tif input module

I was just comparing VKDT with other softwares (mostly RawTherapee, Affinity, Dxo Photolab)
With RawTherapee, for instance, you can open most formats including TIFF

Do you plan to code an inpaint feature as well, in the future?
I suppose it is not available yet…
Currently, GIMP allows to inpaint an image (through G’MIC filters); KRITA has a similar option.
On this computer (12th Gen Intel(R) Core™ i7-12700H (20 CPUs), ~2.7GHz) G’MIC is pretty fast (inpaint > multi-scale filter) even with big TIFF
Darktable and RawTherapee have “only” the clone tool option so far

I have read GEGL has a similar option but, judging from some comments on gitlab, at present, it sucks (no offence here) :slight_smile:

there’s the inpaint module best used with the inpaint.pst preset. it’s not very smart but works to remove some dust or even some cables against a smooth sky.

it’s not very smart

Probably it needs some AI :slight_smile:

Thanks!

Hello @hanatos

In case you are interested…
Just tried to export some RAW (NEF) to DNG with DXO Photolab 7.3
Every DNG does not work with vkdt: same display problem as TIFF (see previous report)
These same DNG work fine with RawTherapee - ART - Windows Photo - Affinity Photo (not tested on darktable)

Here one of them in case you want to download and test it on your side (dropbox link):