Change Log:
March 31, 2004
Removed LegalClip and Limiter()
--------------------------------------------------------------------------------
November 21, 2003
Script is now 100% fully linear, with no boundary switching.
Prior versions had a boundary (treshold) that switched between temporal filtering and blurring. Now both filters are active at all times, and work inversely proportional to the activity.
--------------------------------------------------------------------------------
October 24, 2003
Changed STMedian filter values to work on a smaller radius, to clean small noise particles. Also added smallest temporal values to the filter.
---------------------------------------------------------------------------------
July 8, 2003.
Added automatic filter switch treshold calculation, to compensate for different resolutions.
Thanks Fiz

----------------------------------------------------------------------------------
July 6, 2003.
Changed scenechange detect from 0 to 1 and "Mode" from 2 to 1 on TemporalSoften parameters. The old parameters were causing some problems on Anime/Cartoon types of movies.
Changed asharp(2, 4) to asharp(1, 4) and MergeLuma(blur(0.2)) to MergeLuma(blur(0.1))
The previous stronger results are really not needed, because they were set, back when the original non-adaptive script was made. This increases compressibility even more, allowing for a higher CQ value.
----------------------------------------------------------------------------------
July 4, 2003.
Now the "radius" parameter in TemporalSoften is adaptive.
Before, a fixed radius of 4 was used. Now with variable radius, Gibbs effect is even less visible than before.
----------------------------------------------------------------------------------
July 2, 2003:
Script correction by Dialhot.
Changed script to read:
Code:
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften(4, round(1/nf) , round(3/nf) ,0, 2) ")
----------------------------------------------------------------------------------
July 1, 2003.
Changed the: nf > 2 ? To: nf >= 2 ?
Because filter switching wouldn't happen until value was actually 3 or higher.
Now applies if value is 2 or higher.
Changed line:
ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf > 2 ? \
To:
ScriptClip("nf = round(YDifferenceToNext()+1)"+chr(13)+ "nf > 2 ? \
Original line caused "divide by zero" errors.
Changed function:
Code:
function fmin(float f1, float f2) {
return (f1<f2) ? f1 : f2
To:
Code:
function fmin(int f1, int f2) {
return (f1<f2) ? f1 : f2
Which were part of Dialhot's changes. I forgot to update the function parameter types
Code optimization by Dialhot on adaptive script:
Code:
ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf > 2 ? \
unfilter( -(fmin(nf*2, 100)), -(fmin(nf*2, 100)) ) : \
TemporalSoften(4, round(1/nf) , round(3/nf) ,0, 2) ")
Thanks Dialhot
----------------------------------------------------------------------------------
June 29-30, 2003.
Corrected dynamic luma and chroma values.
Previous values were just too strong, and caused bleeding on chroma.
Thanks to all that reported the problem
----------------------------------------------------------------------------------
June 29, 2003.
Small fix.
Had a "0" instead of "1" on scenechange field of TemporalSoften filter. Caused some ghosting on frames before scene changes.
----------------------------------------------------------------------------------
June 29, 2003.
Script is now adaptive in the TemporalSmoother filter too.
Changed the chroma portion of the filter [ round(2/nf)*50 ] to vary 25 times more that the luma part [ round(2/nf)*2 ].
Changed the boundary treshold from 2.5 to 2. This means that the unfilter line will kick in at a slight lower value, and again, we gain compression without any visual loss in quality.
Also with a radius of 4, the Gibbs effect (mosquito noise) is almost completely removed!
----------------------------------------------------------------------------------
June 27, 2003.
Removed "asharp" and changed to "unfilter" in the adaptive portion of the script.
( Thanks Jellygoose )
----------------------------------------------------------------------------------
June 22, 2003.
Removed line:
conditionalfilter( last, asharp(-1,0), last, "nf", ">", "scd_trigger" )
It's not needed, because we already blur a max value of -1.0 on scene changes in the line:
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf > 2.5 ? asharp( -(fmin((nf/30), 1)), 0 ) : \
TemporalSoften(2,7,7,3,2) ")
----------------------------------------------------------------------------------
June 21, 2003:
Changed:
conditionalfilter( last, asharp(-2,0), last, "nf", ">", "scd_trigger" )
To:
conditionalfilter( last, asharp(-1,0), last, "nf", ">", "scd_trigger" )
The -2 value caused a heavy shift on chroma/luma? in the frame after scene change, which actually shifts the picture and instead of saving space, it produces larger encode size and throws off prediction. This was not noticeable while watching a movie. Only if you stepped frame by frame with Vdub, etc.
----------------------------------------------------------------------------------
June 18, 2003:
Small correction:
conditionalfilter( last, asharp(-2,0), last, "nf", ">", "scd_trigger" )
----------------------------------------------------------------------------------
Changed function
From:
ScriptClip("nf > scd_trigger ? asharp( -2,0) : last ")
To:
conditionalfilter(last,sharp,last, "nf",">", "scd_trigger")
(Thanks sh0dan )
----------------------------------------------------------------------------------
June 18, 2003:
Changed function
From:
ScriptClip("nf > scd_trigger ? asharp( -2,0) : asharp(0,0) ")
To:
ScriptClip("nf > scd_trigger ? asharp( -2,0) : last ")
----------------------------------------------------------------------------------
June 16, 2003:
Changed script to use GripFit.
----------------------------------------------------------------------------------
June 14, 2003:
Changed value of scd_trigger to 30 to avoid falsing on glitches, instead of actual scene changes.
----------------------------------------------------------------------------------
-kwag