Quantcast Avisynth: Reason for Gripcrop and Gripsize Location in Optimal Script? - digitalFAQ.com Forums [Archives]
  #1  
07-07-2003, 12:38 AM
FredThompson FredThompson is offline
Free Member
 
Join Date: Jun 2003
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Is there a specific reason the GripCrop and GripSize lines are in the middle of image processing in the optimal script?

My assumption is the filtering after them is to reduce visible artifacts from resizing. Is that true?
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
07-07-2003, 12:48 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by FredThompson
Is there a specific reason the GripCrop and GripSize lines are in the middle of image processing in the optimal script?

My assumption is the filtering after them is to reduce visible artifacts from resizing. Is that true?
There are three filters on top of it:
undot()
Limiter()
asharp(1, 4)

The reason is this. undot cleans the source somewhat. Limiter truncates (limits) the chroma/luma levels. Then asharp is applied to over emphasize detalis. Then resizing happens, followed by spatial filtering (STMedian) and heavy MergeChroma to kill the over emphasized details that asharp produced. Then further softening by mergeluma, which kills almost all visible mosquitoes left
After that, the adaptive filters do their act on what's left

-kwag
Reply With Quote
  #3  
07-27-2003, 08:07 PM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Quote:
Originally Posted by FredThompson
Is there a specific reason the GripCrop and GripSize lines are in the middle of image processing in the optimal script?

My assumption is the filtering after them is to reduce visible artifacts from resizing. Is that true?
There are three filters on top of it:
undot()
Limiter()
asharp(1, 4)

The reason is this. undot cleans the source somewhat. Limiter truncates (limits) the chroma/luma levels. Then asharp is applied to over emphasize detalis. Then resizing happens, followed by spatial filtering (STMedian) and heavy MergeChroma to kill the over emphasized details that asharp produced. Then further softening by mergeluma, which kills almost all visible mosquitoes left
After that, the adaptive filters do their act on what's left

-kwag
1) "Then asharp is applied to over emphasize detalis"
2) "heavy MergeChroma to kill the over emphasized details that asharp produced"

Then why use asharp at all? There is no need for Undot if the source is already clean, right?

3) "which kills almost all visible mosquitoes left"

Isn't this where Undot should be then?
Reply With Quote
  #4  
07-27-2003, 08:15 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Holomatrix,
is easy to know why use asharp and MergeChroma.
encode a sample with the MA script and
another removing asharp and mergeluma using the same source.
compare the results, the answer is there.
you will see big differences

about undot:
if your source is very clean, just remove it from the script
cos it don't will work in very clean sources.

Reply With Quote
  #5  
07-27-2003, 09:21 PM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
I didn't see any difference removing Undot and Asharp from the begining. I did select the 'Output as YUV data....' in TMPEG and noticed a little difference.

Import("D:\MOVIEE~3\RESAMP~1.AVS")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg 2dec\MPEG2D~1.DLL")
mpeg2source("D:\MOVIEE~3\DVD2AV~1.D2V")
nf=0
Limiter()
GripCrop(480,480,overscan=1,source_anamorphic=fals e)
GripSize(resizer="LanczosResize")
Levels(0,1.3,255,0,255)
STMedianFilter(8,32,0,0)
MergeChroma(blur(1.5)
MergeLuma(blur(0.1))
SwitchThreshold=(Width<=352)?4Width<=480)?3:2
ScriptClip("nf=round(YDifferenceToNext())"+chr(13) +"nf>=SwitchThreshold?unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))):TemporalCleaner(6+nf,11+nf)")
GripBorders()
Limiter()
function fmin(int f1,int f2){return(f1<f2)?f1:f2}
Deen()
Reply With Quote
  #6  
07-28-2003, 04:01 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
You won't see any difference in anything by using "deen" at the end of the script : deen removes everything, including details !
Reply With Quote
  #7  
07-28-2003, 08:22 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
I realized that just now. Can I replace STMedianFilter(8,32,0,0) with Deen() ? I want to keep Deen because of the great compression it gives which allows for increased Q. Can I use Undot() at the end? I still see artifacts, seems like mosquito, around peoples heads in distance.
Thanks
Reply With Quote
  #8  
07-28-2003, 08:41 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
as i told you my friend Holomatrix
nothing is better than tests.

the MA script posted is the result of the evolution from months of our tests.
deen can encrease the CQ but maybe don't give the same quality.
i like deen and mipsmoother too, great filters but too slow!

do some tests,your eyes will choose the best!

see the best scripts:

http://www.kvcd.net/forum/viewtopic.php?t=3483

Phil change temporalsoften to temporalcleaner as posted.
choose what is better for you.

Reply With Quote
  #9  
07-28-2003, 09:14 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Ok, thanks, back to the testing board What problems will increasing the Max Average bitrate do? I'm thinking that if, since I'm going to leave well enough alone and go back to the MA Script and gain Q points, then will increasing the Max Av bitrate help?
Reply With Quote
  #10  
07-28-2003, 09:26 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
"What problems will increasing the Max Average bitrate do?"

maybe you got errors in your dvd player.
need tests too,some player works another don't works.
encode little samples and burn in cdrw, test in your player but
MAX 2000 to 2500 for mpeg1 is cool,no need more!
Reply With Quote
  #11  
07-28-2003, 09:29 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
For answering all your questions :

1/ yes you can use Deen insteed of STMedianFilter
2/ you can use Undot at the end, but I would try FluxSmooth (that is not the same family of filter, I know, but... just try).
3/ You can raise the Bitrate. The only problem is that the file prediction becomes more complicated (the more is the Min-MAx range, the more a sample encoding gives random file size).
Reply With Quote
  #12  
07-28-2003, 09:50 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
For answering all your questions :

1/ yes you can use Deen insteed of STMedianFilter
2/ you can use Undot at the end, but I would try FluxSmooth (that is not the same family of filter, I know, but... just try).
3/ You can raise the Bitrate. The only problem is that the file prediction becomes more complicated (the more is the Min-MAx range, the more a sample encoding gives random file size).
I used to use Fluxsmooth and Liked it, will try again.
Ok, I'll just leave Max Av bitrate at 1150 because I find the file size prediction very good the way it is.

@jorel - are you talking Max or Max Average bitrate?
Reply With Quote
  #13  
07-28-2003, 10:09 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
I'm responding for Jorel : we are talking about MAX bitrate. Max Average isn't relevent in CQ mode. It's only for 2 pass VBR. I've misundertood your previous question.
Reply With Quote
  #14  
07-28-2003, 10:13 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
encreasing Max AV Bitrate too much,maybe will encrease the file size too
and Max bitrate2000 to 2500 to mpeg1 is good Holomatrix,
more than 2500 can give problems in your player!
sorry for my incomplete or confused answer.


@ Phil:
you i can change STMedianFilter to Deen,
what parameters i choose in Deen to do some samples and compare?

Reply With Quote
  #15  
07-28-2003, 10:49 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jorel
you i can change STMedianFilter to Deen,
what parameters i choose in Deen to do some samples and compare?

The only tests I did with deen were when someone talk about it weeks ago, using "a3d" matrix as paremeter. I took exactky the same ones.

The thread is there :

http://www.kvcd.net/forum/viewtopic....ight=a3d#28134
Reply With Quote
  #16  
07-28-2003, 11:42 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
oh thanks Phil,
i remember that link and did some test too but
i don't did tests using Deen in the MA script.

Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
documentation for GripCrop(), GripSize(), and GripBorders()? sking1001 Avisynth Scripting 2 09-13-2004 02:31 PM
Gripcrop, gripsize, gripborders, info zagor Convertire e Codifica dei Video (Italiano) 8 03-04-2004 08:13 AM
Why no GripCrop/GripSize in new Avisynth script? Grantman Avisynth Scripting 9 06-19-2003 05:26 AM
KVCD: Hypotetical question! GripCrop vs GripSize? CheronAph Video Encoding and Conversion 7 03-02-2003 06:21 AM
SansGrip Filters: Trying to find the GripFIt, GripCrop and GripSize filters Bud Avisynth Scripting 4 01-19-2003 06:40 PM

Thread Tools



 
All times are GMT -5. The time now is 04:08 PM  —  vBulletin © Jelsoft Enterprises Ltd