Log in

View Full Version : AR Calculator (AVS Optimizer)


Sniffer
13th November 2003, 23:58
1 - Thanks for your help on this

I use AR Calculator, wich i find a great tool, so i have used all the options crop, size...etc and save the avs,

but in here we have other options, one of them is the avs optimizer, so i use it, wait to pass all my movie and give me something like this:

#########################################################
# Script Generado por AR Calculator #
# #
# http://www.canalxvid.com #
#########################################################

LoadPlugin("E:\ARCALC~1\mpeg2dec3.dll")

Mpeg2Source("G:\SEGUND~1\SEGUND~1.D2V")

Crop(10,2,-10,-2)
a=trim(0,917).LanczosResize(656,368)
b=trim(918,1119).blur(0.1,0.1).LanczosResize(656,368)
c=trim(1120,1319).LanczosResize(656,368)
d=trim(1320,1349).blur(0.1,0.1).LanczosResize(656,368)
e=trim(1350,1446).LanczosResize(656,368)
f=trim(1447,1474).blur(0.1,0.1).LanczosResize(656,368)
g=trim(1475,1614).LanczosResize(656,368)
h=trim(1615,1864).blur(0.1,0.1).LanczosResize(656,368)
i=trim(1865,3013).LanczosResize(656,368)
j=trim(3014,3179).blur(0.2,0.2).LanczosResize(656,368)
k=trim(3180,3229).blur(0.3,0.3).LanczosResize(656,368)
l=trim(3230,3373).blur(0.2,0.2).LanczosResize(656,368)
m=trim(3374,3472).blur(0.1,0.1).LanczosResize(656,368)
n=trim(3473,3681).LanczosResize(656,368)
o=trim(3682,3715).blur(0.1,0.1).LanczosResize(656,368)
p=trim(3716,6389).LanczosResize(656,368)
q=trim(6390,6460).blur(0.1,0.1).LanczosResize(656,368)
r=trim(6461,6649).LanczosResize(656,368)
s=trim(6650,6679).blur(0.3,0.3).LanczosResize(656,368)
t=trim(6680,13822).LanczosResize(656,368)
u=trim(13823,14018).blur(0.1,0.1).LanczosResize(656,368)
v=trim(14019,26954).LanczosResize(656,368)
w=trim(26955,27002).blur(0.1,0.1).LanczosResize(656,368)
x=trim(27003,27050).blur(0.2,0.2).LanczosResize(656,368)
y=trim(27051,27173).blur(0.1,0.1).LanczosResize(656,368)
z=trim(27174,29729).LanczosResize(656,368)
aa=trim(29730,29776).blur(0.1,0.1).LanczosResize(656,368)
ab=trim(29777,30054).LanczosResize(656,368)
ac=trim(30055,30081).blur(0.2,0.2).LanczosResize(656,368)
ad=trim(30082,30225).blur(0.1,0.1).LanczosResize(656,368)
ae=trim(30226,30328).LanczosResize(656,368)
af=trim(30329,30375).blur(0.1,0.1).LanczosResize(656,368)
ag=trim(30376,31508).LanczosResize(656,368)
ah=trim(31509,31565).blur(0.1,0.1).LanczosResize(656,368)
ai=trim(31566,32478).LanczosResize(656,368)
aj=trim(32479,32530).blur(0.1,0.1).LanczosResize(656,368)
ak=trim(32531,33237).LanczosResize(656,368)
al=trim(33238,33307).blur(0.1,0.1).LanczosResize(656,368)
am=trim(33308,34346).LanczosResize(656,368)
an=trim(34347,34445).blur(0.1,0.1).LanczosResize(656,368)
ao=trim(34446,38284).LanczosResize(656,368)
ap=trim(38285,38329).blur(0.1,0.1).LanczosResize(656,368)
aq=trim(38330,38817).LanczosResize(656,368)
ar=trim(38818,38846).blur(0.2,0.2).LanczosResize(656,368)
as=trim(38847,39610).LanczosResize(656,368)
at=trim(39611,39642).blur(0.1,0.1).LanczosResize(656,368)
au=trim(39643,39748).LanczosResize(656,368)
av=trim(39749,39873).blur(0.2,0.2).LanczosResize(656,368)
aw=trim(39874,41778).LanczosResize(656,368)
ax=trim(41779,41823).blur(0.1,0.1).LanczosResize(656,368)
ay=trim(41824,42068).LanczosResize(656,368)
az=trim(42069,42139).blur(0.1,0.1).LanczosResize(656,368)
ba=trim(42140,42252).LanczosResize(656,368)
bb=trim(42253,42427).blur(0.1,0.1).LanczosResize(656,368)
bc=trim(42428,42865).LanczosResize(656,368)
bd=trim(42866,42912).blur(0.1,0.1).LanczosResize(656,368)
be=trim(42913,44362).LanczosResize(656,368)
bf=trim(44363,44435).blur(0.1,0.1).LanczosResize(656,368)
bg=trim(44436,44465).LanczosResize(656,368)
bh=trim(44466,44505).blur(0.1,0.1).LanczosResize(656,368)
bi=trim(44506,51402).LanczosResize(656,368)
bj=trim(51403,51450).blur(0.2,0.2).LanczosResize(656,368)
bk=trim(51451,56517).LanczosResize(656,368)
bl=trim(56518,56616).blur(0.1,0.1).LanczosResize(656,368)
bm=trim(56617,60634).LanczosResize(656,368)
bn=trim(60635,60720).blur(0.1,0.1).LanczosResize(656,368)
bo=trim(60721,70703).LanczosResize(656,368)
bp=trim(70704,70733).blur(0.1,0.1).LanczosResize(656,368)
bq=trim(70734,71010).LanczosResize(656,368)
br=trim(71011,71065).blur(0.2,0.2).LanczosResize(656,368)
bs=trim(71066,71183).blur(0.1,0.1).LanczosResize(656,368)
bt=trim(71184,71382).blur(0.3,0.3).LanczosResize(656,368)
bu=trim(71383,71423).blur(0.2,0.2).LanczosResize(656,368)
bv=trim(71424,73040).LanczosResize(656,368)
bw=trim(73041,73068).blur(0.1,0.1).LanczosResize(656,368)
bx=trim(73069,81915).LanczosResize(656,368)
by=trim(81916,81982).blur(0.2,0.2).LanczosResize(656,368)
bz=trim(81983,82117).LanczosResize(656,368)
ca=trim(82118,82172).blur(0.1,0.1).LanczosResize(656,368)
cb=trim(82173,82296).LanczosResize(656,368)
cc=trim(82297,82356).blur(0.1,0.1).LanczosResize(656,368)
cd=trim(82357,82483).LanczosResize(656,368)
ce=trim(82484,82515).blur(0.1,0.1).LanczosResize(656,368)
cf=trim(82516,85276).LanczosResize(656,368)
cg=trim(85277,85323).blur(0.1,0.1).LanczosResize(656,368)
ch=trim(85324,86978).LanczosResize(656,368)
ci=trim(86979,87100).blur(0.1,0.1).LanczosResize(656,368)
cj=trim(87101,87176).blur(0.2,0.2).LanczosResize(656,368)
ck=trim(87177,88375).LanczosResize(656,368)
cl=trim(88376,88408).blur(0.1,0.1).LanczosResize(656,368)
cm=trim(88409,88552).LanczosResize(656,368)
cn=trim(88553,88692).blur(0.1,0.1).LanczosResize(656,368)
co=trim(88693,89751).LanczosResize(656,368)
cp=trim(89752,89799).blur(0.3,0.3).LanczosResize(656,368)
cq=trim(89800,89922).blur(0.1,0.1).LanczosResize(656,368)
cr=trim(89923,90087).blur(0.2,0.2).LanczosResize(656,368)
cs=trim(90088,90113).blur(0.1,0.1).LanczosResize(656,368)
ct=trim(90114,115277).LanczosResize(656,368)
cu=trim(115278,115321).blur(0.1,0.1).LanczosResize(656,368)
cv=trim(115322,116739).LanczosResize(656,368)
cw=trim(116740,116768).blur(0.1,0.1).LanczosResize(656,368)
cx=trim(116769,118248).LanczosResize(656,368)
cy=trim(118249,118278).blur(0.1,0.1).LanczosResize(656,368)
cz=trim(118279,122615).LanczosResize(656,368)
da=trim(122616,122668).blur(0.2,0.2).LanczosResize(656,368)
db=trim(122669,124664).LanczosResize(656,368)
dc=trim(124665,124717).blur(0.1,0.1).LanczosResize(656,368)
dd=trim(124718,125141).LanczosResize(656,368)
de=trim(125142,125311).blur(0.1,0.1).LanczosResize(656,368)
df=trim(125312,127985).LanczosResize(656,368)
dg=trim(127986,128013).blur(0.1,0.1).LanczosResize(656,368)
dh=trim(128014,128313).LanczosResize(656,368)
di=trim(128314,128340).blur(0.1,0.1).LanczosResize(656,368)
dj=trim(128341,129134).LanczosResize(656,368)
dk=trim(129135,129186).blur(0.1,0.1).LanczosResize(656,368)
dl=trim(129187,130524).LanczosResize(656,368)
dm=trim(130525,130784).blur(0.1,0.1).LanczosResize(656,368)
a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+aa+ab+ac+ad+ae+af+ag+ah+ai+aj+ak+al+am+an+ao+ap+aq+ar+as+at+au+av+aw+ax+ay+az+ba+bb+bc+bd+be+bf+bg+bh+bi+bj+bk+bl+bm+bn+bo+bp+bq+br+bs+bt+bu+bv+bw+bx+by+bz+ca+cb+cc+cd+ce+cf+cg+ch+ci+cj+ck+cl+cm+cn+co+cp+cq+cr+cs+ct+cu+cv+cw+cx+cy+cz+da+db+dc+dd+de+df+dg+dh+di+dj+dk+dl+dm


Som what i ask is? to all with enough knowledge on quality matters, doing this is good, it will improve my script as well the final quality of my movie or i shouldn't bother in using avs optimizer??

Best Regards
Sniff;)

cipher
14th November 2003, 02:17
Man...what an ugly script!:D

It could simply put

Crop(10,2,-10,-2).LanczosResize(656,368)

and save all those, crazily way too many, exactly the same, "Lanczosresize"s.

Moreover, how could you know every script it writes is really optimized? I mean, like, does this:

a=trim(0,917).LanczosResize(656,368)
b=trim(918,1119).blur(0.1,0.1).LanczosResize(656,368)
c=trim(1120,1319).LanczosResize(656,368)

really produce better quality than something like

trim(0, 1319).MipSmooth(preset="movieHQ")
?

Well, doing even per frame avisynth editing is encouraged, but this avs optimizer seems to have gone beyond the bottom line. :D

(I know I'm lazy and tired, but maybe this little cute avs optimizer could really produce some decent stuff:D...I don't know...:))

It didn't tweak too much anyway, if it can do something like:

a=trim(0,1000).mftoon().awarpsharp()
b=trim(1001,2000).MipSmooth().2dcleaner()
c=trim(2001,3000).Convolution3d().mftoon().Temporalcleaner()
return a+b+c

And that's exactly what I want or much better than what i can figure out, then I'll be damn happy to use it.
:D

Manao
14th November 2003, 07:44
Sniffer :

For optimizing reasons, you should first write :clip = Mpeg2Source("G:\SEGUND~1\SEGUND~1.D2V")
strength0 = clip.Crop(10,2,-10,-2).LanczosResize(656,368)
strength1 = clip.Crop(10,2,-10,-2).blur(0.1,0.1)LanczosResize(656,368)
...
strengthn = clip.Crop(10,2,-10,-2).blur(0.n,0.n).LanczosResize(656,368)And then, replace each line like thisj=trim(3014,3179).blur(0.2,0.2).LanczosResize(656,368)
replaced by
j = strength2.trim(3014,3179)It will lower the memory usage during the processing, and VDub will load the clip faster.

Now, speaking of quality, since AVSOptimizer is in its first steps of developments, the developers only use blur at different strength levels to treat the different complexity cases of compression. But you can adapt yourself the filtering for each of the complexity cases ( using your eyes to set properly the level of filtering, and knowing that when strength1 - strengthn are used, it often means that the motion is high, and that you can heavily filter )

In the next versions of AVSOptimizer, developers'll try to optimize PSNR with a different filter's chain for each complexity case.

@cipher : wait for the next version, or just use avsoptimizer to calculate the values of the trim, and then optimize yourself specifically the filtering. But it really a very interesting tool, since it's the first one to adapt the filtering to the codec itself.

Sniffer
15th November 2003, 00:06
Many thanks for the tips.

So afterall using avs optimizer is a good thing regarding avisynth scripts.

I will follow your tips, :) Thanks again.