Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th June 2019, 18:39   #1  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
AutoLevels v0.10

AutoLevels v0.10 (avs v2.58, avs/+ v2.6 x86 & x64)
Req VS 2008 Runtimes.
8 Bit Only.

This thread continued from thread in Avisynth Development forum, here:-
http://forum.doom9.org/showthread.ph...11#post1876311

AutoLevels only has thread in devs forum, and probably a good idea that it has one in Usage forum, so posting this here.

Includes 3 dll's, + source + Full VS2008 project files for easy rebuild.

See HOSTED directory @ MediaFire in sig below this post.

Now looks like this. Top line shows Frame number: and averaging range start and end frames
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 11th June 2019 at 18:45. Reason: Update
StainlessS is offline   Reply With Quote
Old 11th June 2019, 17:19   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
AutoLevels() v0.10, update see above post.

BugFix
Code:
// 11/06/2019   Ver  0.10    + Oops, limited gamma max in adjust to 1.0 instead of 10.0 (so only ever reduced gamma, never increased).
//                             Mods to debug output, shows output Y frame average.
Below in BLUE was 1.0
Code:
  gamma = min(max(gamma,0.1f),10.0f);   										// ssS: Added sane range limiting (& avoid div by zero on gamma)
I dont thinkg AutoLevels works as well as it could, but I'm just too stupid to fix it properley.

As it stands it calcs input midpoint relative 0->255, and output midpoint same 0->255 (after input coring if required, and before output coring).

I think it would produce better results if we could figure out a way to calc required gamma based on input and output ranges,
any maths geniuses (or should that be genii) knocking about round here ?
I cant even figure out how to do it disregarding coring, and if coring then even bigger problem.

Here source.
Code:
    // use user specified input high/low points, if specified.
    // if coring is specified but input high/low aren't specified,
    // we must do the inverse mapping to counteract the mapping that
    // gets done inside adjust().
    double in_low  = (force_input_low)  ? double(input_low)
                   : (do_coring)        ? inv_coring_func(ymin_avg)
                                        : ymin_avg;
    double in_high = (force_input_high) ? double(input_high)
                   : (do_coring)        ? inv_coring_func(ymax_avg)
                                        : ymax_avg;

    // pick a gamma curve
    double do_gamma = (autogamma) ? log(ymean_avg/255.0)    / log(gamma_midpoint) : gamma;
//  double do_gamma = (autogamma) ? log((ymean_avg-ymin_avg) / (in_high-in_low) )  /  log(gamma_midpoint) : gamma;
                // IDEALLY GAMMA MIDPIOINT COMPUTED FOR INPUT RANGE (REQUIRES MORE WEIRD METHOD WHERE CORING)
                // NEED ALSO ALLOW FOR SETTING MIDPOINT RELATIVE OUTPUT RANGE (WELL WEIRD WHERE CORING)
                // HOW ???

    // use levels() code to do remapping
    adjust(frame,dst, int(in_low+0.5), float(do_gamma), int(in_high+0.5),int(output_low+0.5), int(output_high+0.5), do_coring);

////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////


void Autolevels::adjust( PVideoFrame &frame, PVideoFrame &dst,
             int in_min, float gamma, int in_max, int out_min, int out_max,
             bool coring)
{

  BYTE map[256], mapchroma[256];

  // ----- this section is taken from: ------
  //Levels::Levels( PClip _child, int in_min, double gamma, int in_max, int out_min, int out_max, bool coring,
  //                IScriptEnvironment* env )


  gamma = min(max(gamma,0.1f),10.0f);                                           // ssS: Added sane range limiting (& avoid div by zero on gamma)

  gamma = 1/gamma;
  int divisor = (in_max == in_min) ? 1 : (in_max - in_min);                     // avoid zero divide

  if (vi.IsYUV())
  {
    for (int i=0; i<256; ++i)
    {
      float p;

      if (coring)
        p = ((i-16)*(255.0f/219.0f) - in_min) / divisor;
      else
        p = float(i - in_min) / divisor;                                        // range 0.0 -> 1.0 of input range

      p = pow(min(max(p, 0.0f), 1.0f), gamma);                                  // gamma
      p = p * (out_max - out_min) + out_min;                                    // output range with out_min offset
      int pp;

      if (coring)
        pp = int(p*(219.0f/255.0f)+16.5f);
      else
        pp = int(p+0.5f);                                                       // round to nearest luma level

      map[i] = min(max(pp, (coring) ? 16 : 0), (coring) ? 235 : 255);

      int q = ((i-128) * (out_max-out_min) + (divisor>>1)) / divisor + 128;
      mapchroma[i] = min(max(q, (coring) ? 16 : 0), (coring) ? 240 : 255);
    }
  } else if (vi.IsRGB()) {
    for (int i=0; i<256; ++i)
    {
        float p = float(i - in_min) / divisor;
        p = pow(min(max(p, 0.0f), 1.0f), gamma);
        p = p * (out_max - out_min) + out_min;
        int z=int(p+0.5f);
        map[i] = (z < 0) ? 0 : (z>255) ? 255 : z;
    }
  }
}
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 11th June 2019, 17:42   #3  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 208
I would convert the code values to float, then convert gamma to linear then determine the midpoint and put it all back to the original gamma.

You might want to add an input gamma parameter (Rec.709 2.2, Rec.709 2.4, etc) to determine how to convert to linear and scale the float values to limited or data as required if the output range is different. I would at least have an option to have a float32 in and out as opposed to 8-bit only.

Last edited by Cary Knoop; 11th June 2019 at 17:54.
Cary Knoop is offline   Reply With Quote
Old 11th June 2019, 18:12   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
Thankyou Mr Knoop, now I just have to figure out how to do that.

It would seem easiest (if not the only way [it did not even remotely occur to me]).

I had intended (If Pinterf did not just jump in) to attempt 10, 12 14, 16 bit source, not sure that I would bother with Float, but I guess that would now make sense too.

Not gonna attempt just yet, would like to apply stuff from this mod to GamMac, soon.


Again, thanx, you be a superstar.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 11th June 2019 at 18:14.
StainlessS is offline   Reply With Quote
Old 12th June 2019, 20:08   #5  |  Link
SnillorZ
Registered User
 
Join Date: Jan 2019
Location: Lake District UK
Posts: 48
Quote:
Originally Posted by StainlessS View Post
Not gonna attempt just yet, would like to apply stuff from this mod to GamMac, soon.
Ohh Mr StainlessS, your a tease

What are your thoughts on how you would classify the next version of GamMac - bugfix / performance improvements release / Quality of results release ?

Are you able to give rough timescales?

........[lie]Asking the above for a friend[/lie] (who's a serial procrastinator and needs to stop p*$$ing about waiting to see what the next best version of plugin might bring and actually get on with something productive and process some actual footage to use.)
SnillorZ is offline   Reply With Quote
Old 12th June 2019, 20:18   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
Is gonna be Exploratory, timescale, Hmm, When all the lights go out in the Universe.
I would prefer if somebody else did it, you game ?

Also, just twigged I think, for the AutoLevels thing, would need convert to RGB, then linear, then do midpoint, and then back pedel to original colorspace.
Not that easy (for me) really.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 12th June 2019, 20:32   #7  |  Link
SnillorZ
Registered User
 
Join Date: Jan 2019
Location: Lake District UK
Posts: 48
Quote:
Originally Posted by StainlessS View Post
When all the lights go out in the Universe.
I would prefer if somebody else did it, you game ?
Now that would be a long wait.

All good though, I can get on with some proper work.
SnillorZ is offline   Reply With Quote
Old 8th July 2019, 08:16   #8  |  Link
fenomeno83
Registered User
 
Join Date: Aug 2006
Posts: 336
Hi. Thanks! I use a lot autolevels 0.7. What are your improvements? Thanks
fenomeno83 is offline   Reply With Quote
Old 8th July 2019, 15:48   #9  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
Some bug fixes[crashes, access violations], Avs v2,60 colorspaces, and x64 bit.

I found a file that shows lots of flickering (head bobbing back and forth in front of a small sun lit window), so am currently
trying to improve that. Same clip also fades to black at end and where very dark almost black, is amped so much that
it looks awful [still not managed to find fix for that]. (autogamma=true).

Will try up a v0.11 test dll, say if any better than 0.7.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 8th July 2019, 17:41   #10  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
Here v0.011Beta (Beta really as two new args that may or may not survive as is to next update).
See MediaFire in sig below this post, HOSTED folder.


Code:
// 01-09-2010   Ver. 0.6     + added support for the "coring" flag
// Jim Battle                + revised/improved the readme document
//
// StainlessS
// 31/05/2019   Ver  0.7     + Convert for avs v2.6/+ x86 and x64. revised a bit.
// 06/05/2019   Ver  0.9     + Switch off debugging in v0.8, oops.
// 11/06/2019   Ver  0.10    + Oops, limited gamma max in adjust to 1.0 instead of 10.0 (so only ever reduced gamma, never increased).
//                             Mods to debug output, shows output Y frame average.
// 08/07/2019   Ver  0.11Beta1    + Basic scene change detect also now takes into account diffLumaMean((n,n-1))>=(sceneChgThresh*0.5), as well as min and max luma diff.
//                           + Added sc2Th=8, and sc2Perc=33.33, a check and possible override to sceneChgThresh detected scene change.
//                           + Changed default filterRadius from 5 to 7.
Only avialable doc for diffs is this

Code:
AviSource(".\ALTEST.AVI").Trim(74,11154).crop(0,46,0,-46)
######################
ORG=Last
AUTOGAMMA=True
DEBUG=true
# DEFAULT
SCENECHGTHRESH=20    # SC if diff of min or max Y to prev frame is more than this : NEW additional SC if DiffMeanY(n,n-1) is more than 1/2 this. [If either, recheck for override to non SC via SC2 stuff]
# NON DEFAULT
MIDPOINT=0.42        # Default stays 0.5
# NEW, If Scene change detected via SceneChgThresh, then re-check and override to NOT SC if not at least SC2PERC(33.33%) of luma pixels differ by more than SC2TH(8) when compared with prev frame.
SC2TH=8
SC2PERC=33.33
######################
A=AutoLevels(autogamma=AUTOGAMMA,midpoint=MIDPOINT,debug=true, sceneChgThresh=sceneChgThresh,FilterRadius=5,sc2Th=256)                        # Nearly same as 0.7. sc2Th=256 switch off new sc overrides [still does 1/2 mean SC chk]
B=AutoLevels(autogamma=AUTOGAMMA,midpoint=MIDPOINT,debug=DEBUG,sceneChgThresh=sceneChgThresh,FilterRadius=7,sc2Th=SC2TH,sc2Perc=SC2PERC)      # New Settings
LFT=StackVertical(ORG,A)
RGT=StackVertical(ORG,B)
StackHorizontal(LFT,RGT)
EDIT: Ignore debug info on bottom of frame when DEBUG, is really just debug and of no use to you.

EDIT:
From above source docs
Code:
// 11/06/2019   Ver  0.10    + Oops, limited gamma max in adjust to 1.0 instead of 10.0 (so only ever reduced gamma, never increased).
Maybe upwards, or downwards gamma limiting might be a pretty good user arg to add. [it worked pretty good when above bug existed, bug prevented upwards 'overkill']
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 8th July 2019 at 17:48.
StainlessS is offline   Reply With Quote
Old 8th July 2019, 19:46   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
V0.11Beta2, In sig below this post, HOSTED folder.
Code:
// 08/07/2019   Ver  0.11Beta1    + Basic scene change detect also now takes into account diffLumaMean((n,n-1))>=(sceneChgThresh*0.5), as well as min and max luma diff.
//							 + Added sc2Th=8, and sc2Perc=33.33, a check and possible override to sceneChgThresh detected scene change.
//							 + Changed default filterRadius from 5 to 7.
// 08/07/2019   Ver  0.11Beta2 + Added GamMax, GamMin.
Earlier (today Beta) version removed, this considerably more stable (than ALL prev versions) where autolevels(autogamma=true)
[Allowing Gamma max of 10.0 a bit monsterous, most clips require nothing at all like that, even current default of 1.01 is a lot of correction allowed [together with min/max corrections].


Code:

AviSource(".\ALTEST.AVI").Trim(74,11154).crop(0,46,0,-46)
######################
ORG=Last
AUTOGAMMA=True
DEBUG=true
# DEFAULT
SCENECHGTHRESH=20    # SC if diff of min or max Y to prev frame is more than this : NEW additional SC if DiffMeanY(n,n-1) is more than 1/2 this. [If either, recheck for override to non SC via SC2 stuff]
# NON DEFAULT
MIDPOINT=0.45        # Default stays 0.5
# NEW, If Scene change detected via SceneChgThresh, then re-check and override to NOT SC if not at least SC2PERC(33.33%) of luma pixels differ by more than SC2TH(8) when compared with prev frame.
SC2TH=8
SC2PERC=33.33
# NEW NEW
GAMMAX = 1.01        # Default 1.01,      : 1.0      <= GamMax <=  10.0 : Limit upwards   Gamma corrections
GAMMIN = 1.0/GAMMAX  # Default 1.0/GAMMAX : 1.0/10.0 <= GamMim <=  1.0  : Limit Downwards gamma corrections
######################
# Nearly same as 0.7. sc2Th=256 switch off new sc overrides [still does 1/2 mean SC chk] : GammMax Unrestricted (well max 10.0)
A=AutoLevels(autogamma=AUTOGAMMA,midpoint=MIDPOINT,debug=true, sceneChgThresh=sceneChgThresh,FilterRadius=5,sc2Th=256,Gammax=10.0)
# New Settings
B=AutoLevels(autogamma=AUTOGAMMA,midpoint=MIDPOINT,debug=DEBUG,sceneChgThresh=sceneChgThresh,FilterRadius=7,sc2Th=SC2TH,sc2Perc=SC2PERC,gammax=GAMMAX,gammin=GAMMIN)
######################
LFT=StackVertical(ORG,A)
RGT=StackVertical(ORG,B)
StackHorizontal(LFT,RGT)
Still prob with fade to black, but much better with autogamma limited stuff.

"And I commend this budget to the House".
[Come on Wonkey, explain it to me again - EDIT: no that was " I refer the honourable gentleman to the reply I gave some moments ago" thing].

EDIT: For AutoLevels and similar, scenechange detect is really whether or not colors change much rather than real scene cut.

EDIT: Perhaps for AutoGamma(autolevels=false) we need not limit gamma corrections, but for the moment I'm just playing with autoLeves(AutoGamma=true),
exact same code just diff args submitted.

EDIT: The two step Scenchange stuff is because 1st step is pretty fast and almost insignificant to speed, 2nd test a check on whether or not 1st test got it right, a bit slower but not often occurs.

EDIT: Also, default Ignore is 1.0/256, suggest better 1.0/512, ie half a luma level rather than a whole one. [I will not change default for that], but suggest may be better.

EDIT: Maybe I was a bit cautious, perhaps more sane GamMax would be eg 1.05 or 1.1 rather than 1.01, clip I'm testing with has wildly changing levels,
some frames with lots of white, others with almost none.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 9th July 2019 at 07:14.
StainlessS is offline   Reply With Quote
Old 11th July 2019, 17:19   #12  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
V0.12Beta3, In sig below this post, HOSTED folder. [v2.58, avs/+ x86 & x64]

Code:
// 11/07/2019 Ver  0.12Beta_3 + Changes to debug metrics.
Code:
AviSource("D:\Parade.AVI")
#AviSource(".\ALTEST.AVI").Trim(74,11154).crop(0,46,0,-46)
#AviSource(".\ALTEST2.avi")
#convertToRGB32
#ConvertToY8
ORG=Last
######################
TITLES  = True
DEBUG_A = true
DEBUG_B = true
DEBUG_C = true
# DEFAULT
SCENECHGTHRESH=20       # SC if diff of min or max Y to prev frame is more than this : NEW additional SC if DiffMeanY(n,n-1) is more than 1/2 this. [If either, recheck for override to non SC via SC2 stuff]
#
MIDPOINT = 0.42         # Default stays 0.5
IGNORE_A = 1.0/256      # 1.0/256 # OLD Default
IGNORE_B = 1.0/512      # 1.0/512 # NEW Default
IGNORE_C = 1.0/512      # 1.0/512 # NEW Default
# If Scene change detected via SceneChgThresh, then re-check and override to NOT SC if not at least SC2PERC(33.33%) of luma pixels differ by more than SC2TH(8) when compared with prev frame.
SC2TH=12                # 12 Default
SC2PERC=33.33           # 33.33 Default
# NEW NEW
GAMMAX_A = 10.0         # OLD Default for AutoLevels(AutoGamma=true)
GAMMIN_A = 1.0/GAMMAX_A # OLD Default for AutoLevels(AutoGamma=true)
GAMMAX_B = 1.5          # Default 1.5,       : 1.0      <= GamMax <=  10.0 : Limit upwards   Gamma corrections
GAMMIN_B = 1.0/GAMMAX_B # Default 1.0/GAMMAX : 1.0/10.0 <= GamMim <=  1.0  : Limit Downwards Gamma corrections
GAMMAX_C = 1.25         #
GAMMIN_C = 1.0/GAMMAX_C #
######################
MINRNG_B=100            # Default 100  : Input Y range less than this will hae corrections reduced.
MINRNG_C=100            # Default 100
######################
# A, Nearly same as 0.7. sc2Th=256 switch off new sc overrides [still does 1/2 mean SC chk], also switch off MinRng : GammMax Unrestricted (well 10.0)
A=AutoLevels(autogamma=true,midpoint=MIDPOINT,sceneChgThresh=sceneChgThresh,ignore=IGNORE_A,debug=DEBUG_A,FilterRadius=5,gammax=GAMMAX_A,gammin=GAMMIN_A,sc2Th=256,MinRng=0)
B=AutoLevels(autogamma=true,midpoint=MIDPOINT,sceneChgThresh=sceneChgThresh,ignore=IGNORE_B,debug=DEBUG_B,FilterRadius=7,gammax=GAMMAX_B,gammin=GAMMIN_B,sc2Th=SC2TH,sc2Perc=SC2PERC,MinRng=MINRNG_B)
C=AutoLevels(autogamma=true,midpoint=MIDPOINT,sceneChgThresh=sceneChgThresh,ignore=IGNORE_C,debug=DEBUG_C,FilterRadius=7,gammax=GAMMAX_C,gammin=GAMMIN_C,sc2Th=SC2TH,sc2Perc=SC2PERC,MinRng=MINRNG_C)
######################
ORG=TITLES?ORG.TSub("ORG",True):ORG
A  =TITLES?A.TSub("A: "+String(GAMMAX_A," Gammax=%.3f")+String(IGNORE_A," Ignore=%.3f")+" SC2=OFF MinRNG=OFF"):A
B  =TITLES?B.TSub("B: "+String(GAMMAX_B," Gammax=%.3f")+String(IGNORE_B," Ignore=%.3f")+String(MINRNG_B," MinRng=%.3f")):B
C  =TITLES?C.TSub("C: "+String(GAMMAX_C," Gammax=%.3f")+String(IGNORE_C," Ignore=%.3f")+String(MINRNG_C," MinRng=%.3f")):C
RGT=StackVertical(A,C)
LFT=StackVertical(ORG,B)
Return StackHorizontal(LFT,RGT)

# Stack Overhead Subtitle Text, with optional FrameNumber shown.
Function TSub(clip c,string Tit,Bool "ShowFrameNo",Int "Col"){
    c.BlankClip(height=20,Color=Default(Col,0))
    (Default(ShowFrameNo,False))?ScriptClip("""Subtitle(String(current_frame,"%.f] """+Tit+""""))"""):Trim(0,-1).Subtitle(Tit)
    Return StackVertical(c).AudioDubEx(c)
}
Code:
    GamMax,   1.0->10.0. Default 1.5 where AutoLevels(AutoGamma=true) and Default 10.0 Where AutoGamma(). Limits amount of gamma correction, maybe only want to darken clip sor something.
    GamMin,   0.1->1.0.  Default 1.0/GammMax. Darken Limit for gamma.
    Sc2th,    Default 12. 0->256. 256=OFF. Secondary scene change detection, a check and possible override to primary detector which is quick but not so good.
    Sc2Perc,  Default 33.33. Range 0.0 <= Sc2Perc < 100.0. Secong arg to secondary scene change detector.
              If Scene change detected via SceneChgThresh, then re-check and override to NOT SC if not at least Sc2PErc(33.33%) of luma pixels differ by more than Sc2Th(12) when compared with prev frame.
    MinRng,   Default 100. 64->128 and also 0=OFF. If luma range less than this, then amount of autolevel/autogamma is reduced, more so where range approaches 0. [avoid horrible fade to black autolevels]

    Debug
        226:224,233] LHG+sSF : sc2=38.8%
        ymin=  3   ymin_avg =  3.5 {  3.5}
        ymax=217   ymax_avg =224.2 {224.2}
        mean= 79.7 ymean_avg= 82.2
        gamm=1.250 out_mean =105.80(0.41)

        Top line.
            226:224,233] ... Current frame: Frames sample range, limited by arg FilterRadius and detected Scene Changes.

            Flags, 'LHG+sSF', where hi-lited:
                L ... Low input to levels adjustment is changed from that of ymin.
                H ... High input to levels adjustment is changed from that of ymax.
                G ... Gamma to levels adjustment is not 1.0.
                + ... (Actually a single character with '+' appearing above '-'), Gamma levels adjustment is limited by GamMin, GamMax or low range fading.
                s ... Scene change detection via primary scene change detector arg sceneChgThresh.
                S ... Scene change detection via secondary scene change detector args sc2Th and sc2Perc. [Only hilited if primary detector also fired]
                F ... Low Luma Range detected via arg MinRng, levels inputs of ymin, ymax and gamma are adjusted to have lesser effect [F=Fade].

            sc2=38.8%
                Secondary detector percentage of luma pixel difference greater than arg Sc2th (WRT corresponding pixels of prev frame).

        ymin=3,          Luma Minimum of current frame ignoring at most arg ignore_low extreme (noise) pixels [as for YPlaneMin(threshold)].
        ymax=217,        Luma Maximum of current frame ignoring at most arg ignore_high extreme (noise) pixels [as for YPlaneMax(threshold)].
        mean=1.250       AverageLuma of current frame.
        ymin_avg=3.5,    Average of all luma ymin values of the current range of frames (range limited by FilterRadius and scene change detection).
                         { 3.5}, in this case same as ymin_avg, but will be hilited & different if levelling strength reduction due to arg MinRng.
        ymax_avg=224.2,  Average of all luma ymax values of the current range of frames.
                         {224.2}, in this case same as ymax_avg, but will be hilited & different if levelling strength reduction due to arg MinRng.
        ymean_avg=82.2,  Average of all AverageLuma values of the current range of frames.
        Gamm=12.250,     Gamma input to levels adjustment.
        out_mean=105.80, Resulting AverageLuma, on current frame after levelling.
                         (0.41), in this case 105.80/255.0, ie equivalent to the full PC levels range midpoint.
                                 At some future stage, will be implemented as eg (out_mean-out_min)/(out_max-out_min).
EDIT: Now looks like this.
EDIT: The below hi-lited flag +/- symbol indicates that Gamma has been restricted by the GamMax arg [in this case 1.25].
Also, the sc2=38.8% in status line, indicates that number of pixels with a difference greater than Sc2Th(12) is 38.8%, which is greater than arg Sc2Perc(33.33),
but as primary scene change detector is not fired, is not a scene change.(neither s nor S flag is hi-lited) [The scene is panning]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 11th July 2019 at 17:52.
StainlessS is offline   Reply With Quote
Old 11th July 2019, 18:21   #13  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,212
Here a demo of the arg MinRng fade effect on movie intro

The effect reductions shown via orange hi-lited values in metrics of lower two images.


Nuther one


And another random pick (just because I liked it)


EDIT: That whole PAL format movie is a bit horrible, very dark, probably to hide the appalling blending and
other problems that it has.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 12th July 2019 at 13:40.
StainlessS is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.