Resizing is not wired at all! ;-)
a) Almost every DVD Source I do keep at Full PAL, just cropping from 720 to 704 as it makes sense. On long Movies like 3h ones I sometimes choose letterboxing (Anamorph :arrow: 4:3 incl. Borders) to gain from better compression.
b) When Overscanning I like to choose Overlayed Overscan as many movies do come in 2.35:1 which means when using resized overscan, the moviearea even would get smaller on a regular Tv. So Overlayed is the best choice in case of DVD Movie sources.
c) And for shure I do crop the orig black borders before so the filtering affects only the main movie area, means better detection for some type of filters and for shure more speed as the effective movie area in a border cropped state is cropped effectively!
You can easely enter the script and add your own mods:
Code:
function ADS (clip c, int "To", int "Bo", Int "Ov", Bool "Lb" ) {
To=default(To,0)
Bo=default(Bo,0)
Ov=default(Ov,0)
Lb=default(Lb,false)
Here you see the parameter determination and the variables out of the commands/syntax and the determining of the defaults IF no parameters are set at like just "ADS()".
Code:
Ov=Ov*8
W=width(c)
H=height(c)
Ov is Overscan taken as 0 or 1 or 2, but we want real pixels to use with the follwing cropper, so we just multiply it by 8, so in case of Overscan =2 the result is 2*8 = 16px on each side .
We do parse the sources ORIG width and Height and set them to W and H.
Code:
cr=(W==720) ? 8 : 0
c= (To <= Ov && Bo <= Ov) ? crop(c,Ov+cr,Ov,-(Ov+cr),-Ov) : crop(c,Ov+cr,To,-(Ov+cr),-Bo)
The first line checks if W (orig width) is 720, if yes an extra cropping of 8 at each side is determined as cr=8, if not then cr=0. Followed by the cropping job using Crop(...)
Code:
c= ScriptClip(c,"nf = YDifferenceToNext()"+chr(13)+\
"m=masktools_EdgeMask(thY1 = 2, thY2 = 5, thC1 = 1, thC2 = 5, type= "+chr(34)+\
"roberts"+chr(34)+")"+chr(13)+\
"m=m.blur(0.2)"+chr(13)+\
Here we do set the edgemask and finally we do blur it so little details wont begin shimmring cause of to hard edge masked.
(The nf=Ydiff..... line Ill delet as its useless ;-) )
Code:
"f1=removegrain(8).RemoveDirt(mthreshold=125,cthreshold=30,pthreshold=20)"+chr(13)+\
f1 is the first filter job. It includes The spatial softening job Removedirt and Removegrain. Removedirt wont harm edges now as it will ONLY be performed on plain areas - cause of the edgemask ;-)
Code:
"f2=unfilter(0,80)"+chr(13)+\
The Second filter Job is f2 where Unfilter does enhance the edges in the movie
Code:
"masktools_MaskedMerge (f1,last,m)"+chr(13)+\
"masktools_MaskedMerge (last,f2,m) ")
Here we do apply the filtered areas to the original image depending on the mask, while the second merge is inverse last,f2,m instead of f1,last,m
Code:
c= (Lb == true) ? Lanczosresize(c,width(c)-cr*2,round(height(c)*0.75)) : c
Here I do check if the Lb boolean variable out of the command ADS() is set to true, if yes a anamorph to non anamorph resizing will be performed, if not, then leave the image as it is.
Code:
Addborders(c,(round(W-width(c)-cr*2)/2),(round(H-height(c))/2), \
(round(W-width(c)-cr*2)/2),(round(H-height(c))/2))
}
Finally I do check how much borders are needed to fit the final active movie area "centered" to the ORIGINAL size of the beginning inlc. respecting the cropping from 720 to 704.
So finally the borders will be added.
END.
You can for instance
"f1=removegrain(8).RemoveDirt(mthreshold=125,cthre shold=30,pthreshold=20)"
To
"f1=SpatialFilter(.......).TemporalFilter(.......) "
And
"f2=unfilter(0,80)"
To
"f2=SharpeningFilter()"
But be shure you use YV12 supporting filters, if not you need to perform colorspace changes which do let drop the color quality and for shure more cpu power is needed ;-)