paviko, this is very nice work. A little sluggish
, but results are really impressing!
It reminded me of the fact that in one of my postponed scripting projects, there is some code gathering dust for half a year now, that tries to do something rather similar. (Namely: the "contrast booster" feature of "LimitedSharpen-EX".)
The principle of operation is less sophisticated and precise (general limitations of AviSynth scripting). In exchange, it runs somewhat faster than HDRAGC() ... 10 times, or more.
Result when feeding the "lowlight" JPEG from above as input, via imagereader:
If someone is interested in the (unfinished) AVS code, drop a line here. Basically, an ultra-wide gaussian blur is done, then the difference to the original is square-rooted, and fed into a modified multiplication/hardlight routine.
(Should I think about writing PDF whitepapers ...)