HiBut then, of course, it means that it's not easy to find a target that works for the whole chapter. It has to be a compromise.
Anyway, having abrupt changes of target just because there is a bright light in a shot or a flash or an explosion isn't what I was after. Maybe along %FALL we need a minimum duration (in frames) to cancel the change if FALL gets back below the threshold within that amount of time.
For example, if we had a WINDOW value of say 120 frames (5 seconds, adjustable of course), we could avoid the changes everytime there is a brief flash or explosion, but when the changes are for longer, we could change the target instantaneously when the "chapter" starts. This would allow to have a lower %FALL value, so we do have changes when there is a change in each chapter, but we don't have chapters of less than 120 frames.
This might mean that you need two passes: one to define the chapters (and no reset if the change above %FALL is not longer than WINDOW), another to calculate the best target for each chapter (so that we find the target that gives the best balance between highlights and shadow detail), once you have identified them.
Well, I definitely don't like jump either or abrupt change at the wrong time either. That's why I went with a large (10s) rolling avg in the first place.
Then @Neo-XP wanted to see if resetting the target nits at each scene change would improve the global experience and if not, what could we do to improve it.
So, we tried to implement that.
Since flo scene was to jumpy to our taste, we tried to improve upon that.
We thought, for sure, nobody will be happy resetting the target nits at each "original madshi scene definition", so no reason to release a version with only that algo in addition to "Flo".
So to improve, we need to filter the scenes so we would keep only scenes/chapters in between a large change is occurring.
That's what we did in the current chapter definition.
So my thoughts are that your current proposals make a lot of sense to get what we desire as a "target nits" chapter and further filter down and combine the original scenes.
I fully agree with you that we need to introduce even more rules to filter out even more scenes.
I also thought that a minimum chapter time duration was a good idea so we'll try that next.
And then we would need to compare the "avgFALL over a complete chapter" to the next. If this is above a selected threshold, then the 2 chapters would stay separated. If not they would merge into 1.
Or something like that.
I also thought yesterday evening that looking at something called the avgLL (avg low light 0-100nits) to look for Chapter changes might be a good option.
We will probably try that as well.