Quantcast Avisynth Resize vs Gripfit? - digitalFAQ.com Forums [Archives]
  #1  
07-16-2003, 06:32 PM
NismoSX NismoSX is offline
Free Member
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Anyone else noticed that it is way faster to encode with the internal resizing methods in AviSynth, versus using the YV12 version of GripFit. Encodings that before took 3,5 hour to finish, are now over an hour faster when not using GripFit.
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-16-2003, 06:41 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
As Gripfit simply calls internal avs resizing function, the speed is the same for both methods.
(see "resizer" parameter in gripcrop and its use in the code : it's simply a "function pointer", that means a direct call to the original function).

You surely did other thing that slow down your speed (use a convertToYV12() in one case and notin the other preharps ?).
Reply With Quote
  #3  
07-16-2003, 06:56 PM
NismoSX NismoSX is offline
Free Member
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Nope, not doing any conversions. I'm really seeing a difference here in speed. Here's my scripts with and without GripFit.

Code:
## DLL Section ##
#
LoadPlugin("C:\DVD\Filters\2.5\MPEG2Dec3.dll")
LoadPlugin("C:\DVD\Filters\2.5\GripFit_YV12.dll")
LoadPlugin("C:\DVD\Filters\2.5\STMedianFilter.dll")
LoadPlugin("C:\DVD\Filters\2.5\asharp.dll")
LoadPlugin("C:\DVD\Filters\2.5\unfilter.dll")
LoadPlugin("C:\DVD\Filters\2.5\undot.dll")
LoadPlugin("C:\DVD\Filters\2.5\DCTFilter.dll")
LoadPlugin("C:\DVD\Filters\2.5\VSFilter.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#
avisource("c:\media\***.avi")
#
undot()
Limiter()
asharp(1, 4)
GripCrop(480, 480)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")

#
#
#

GripBorders()
TextSub("d:\da1.srt")
Limiter()
DctFilter(1,1,1,1,1,1,.5,0)
LetterBox(0, 0, 16, 16)

# 
# 
## Functions ### 

function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}

# 
####
Code:
## DLL Section ##
#
LoadPlugin("C:\DVD\Filters\2.5\MPEG2Dec3.dll")
LoadPlugin("C:\DVD\Filters\2.5\GripFit_YV12.dll")
LoadPlugin("C:\DVD\Filters\2.5\STMedianFilter.dll")
LoadPlugin("C:\DVD\Filters\2.5\asharp.dll")
LoadPlugin("C:\DVD\Filters\2.5\unfilter.dll")
LoadPlugin("C:\DVD\Filters\2.5\undot.dll")
LoadPlugin("C:\DVD\Filters\2.5\DCTFilter.dll")
LoadPlugin("C:\DVD\Filters\2.5\VSFilter.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#
avisource("c:\media\***.avi")
#
undot()
Limiter()
asharp(1, 4)
BicubicResize(480, 350, 1/3, 1/3, 11, 0, 554, 304)
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")

#
#
#

AddBorders(0, 65, 0, 65)
TextSub("d:\da1.srt")
Limiter()
DctFilter(1,1,1,1,1,1,.5,0)
LetterBox(0, 0, 16, 16)

# 
# 
## Functions ### 

function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}

# 
####
Reply With Quote
  #4  
07-16-2003, 07:01 PM
NismoSX NismoSX is offline
Free Member
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Another thing: Sometimes using GripFit with certain movies causes AviSynth to crash with an error. Especially when running a prediction with Tok. Haven't happened yet using AviSynth resizing.
Reply With Quote
  #5  
07-16-2003, 07:03 PM
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
Maybe GripFit has a function call overhead before it calls the internal resizer, which is not the case when calling BilinearResize directly
Probably on very fast machines, this is not so visible. But on slower machines, it is
I'll have to run a couple of tests to verify this.

-kwag
Reply With Quote
  #6  
07-17-2003, 03:37 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Sorry but there is a big difference between the two scripts !

The source is an avi, so definetly not anamorphic.

Gripfit is used without the parameter "source_anamorphic=false" and thinks it is anamorphic (the default).

The image area won't be the same in the two methods, and there is were the speed difference is, I think.

Nismo, make a test with "source_anamorphic=false" and give us the result please.
Reply With Quote
  #7  
07-17-2003, 09:39 AM
NismoSX NismoSX is offline
Free Member
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
I'll do some more testing later when I get home from work.
Reply With Quote
  #8  
07-17-2003, 05:27 PM
NismoSX NismoSX is offline
Free Member
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Ok, just tested with the "source_anamorphic=false" option, but no change in encoding speed. Even tried with a DVD rip, and AviSynth resize is still much faster. Weird.... No one else tested this?
Reply With Quote
  #9  
07-17-2003, 05:57 PM
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
Hi NismoSX,

What processor do you have ( CPU?, CPU speed? )

-kwag
Reply With Quote
  #10  
07-17-2003, 09:07 PM
NismoSX NismoSX is offline
Free Member
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
AMD XP 2000, VIA KT400 chipset, 256 MB PC2700

Should be fast enough.
Reply With Quote
  #11  
07-17-2003, 09:24 PM
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 NismoSX
AMD XP 2000, VIA KT400 chipset, 256 MB PC2700

Should be fast enough.
You bet it should
But then, maybe GripFit is not optimized to use Athlon's instructions as a P4 using SSE-2, etc.
So on every frame, GripFit functions are called, which then call BilinearResize functions, and there is the small delay. When added up to the sum of thousands of frames, that could be the reason for the time difference.

-kwag
Reply With Quote
  #12  
07-17-2003, 09:33 PM
NismoSX NismoSX is offline
Free Member
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
I think it must have something to do with the YV12 version of GripFit. Didn't have this big speed difference before when I was using the old AVS 2.0x script. And I've encoded well over 100 films with that script.
Now for instance, if doing a file prediction with ToK using GripFit is taking 15 minutes, the same prediction without GripFit is only taking 7-8 minutes.
Reply With Quote
  #13  
07-17-2003, 09:37 PM
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 NismoSX
Now for instance, if doing a file prediction with ToK using GripFit is taking 15 minutes, the same prediction without GripFit is only taking 7-8 minutes.
Then by all means, drop GripFit

-kwag
Reply With Quote
  #14  
07-17-2003, 10:22 PM
NismoSX NismoSX is offline
Free Member
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Already done it, for now anyway...
Maybe there will be a bugfree GripFit_YV12 version in the future...
Reply With Quote
  #15  
07-20-2003, 10:41 AM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by NismoSX
Already done it, for now anyway...
Maybe there will be a bugfree GripFit_YV12 version in the future...
Maybe when I get a DVD burner, since regular KVCDs now look kinda blah on my HDTV .
Reply With Quote
  #16  
07-20-2003, 01:04 PM
ak47 ak47 is offline
Free Member
 
Join Date: Oct 2002
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
Holly crap, SansGrip we haven't heard from you in a while. Nice to see you again (and I think I speak for everyone).
Reply With Quote
  #17  
07-20-2003, 03:23 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by SansGrip
Maybe when I get a DVD burner, since regular KVCDs now look kinda blah on my HDTV
hey SansGrip!

Do kvcd 2 cd movies look ok on the HD tv?

I've been putting all my movies onto two cds and they look great on my 27" standard tv (i'm poor ) Others here have said though that they look great on their HDTVs.

Well maybe by the time I get an hdtv I'll also have a dvd burner and I'll be 79 yrs old

ren
Reply With Quote
  #18  
07-21-2003, 03:16 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
Hey, SansGrip showed up
Glad to see you around
Take a look at the new Motion Adaptive script
Most of my KVCDx3 encodes look sweet on my HDTV, when processed through that script

-kwag
Reply With Quote
  #19  
07-21-2003, 12:56 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ak47
Nice to see you again
heheh thanks .
Reply With Quote
  #20  
07-21-2003, 01:00 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rendalunit
Do kvcd 2 cd movies look ok on the HD tv?
The only 2-disc burn I had lying around was, ahem, a very long movie. I'm going to try putting a shorter movie on 2 discs and see how it looks...

Quote:
I've been putting all my movies onto two cds and they look great on my 27" standard tv (i'm poor )
My encodes looked fantastic on my standard-definition TV. It's amazing what a difference watching them on an HDTV makes... I can see the mosquito noise and DCT blocks in any source, and digital cable is so highly compressed that some channels are barely watchable.

Quote:
Well maybe by the time I get an hdtv I'll also have a dvd burner and I'll be 79 yrs old
heheh yeah, that's when I think I'll have enough money for a DVD burner, too .
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: GripFit? corrupt2k Avisynth Scripting 4 12-06-2004 11:22 AM
Avisynth 2.0 Gripfit.dll is missing? Blubear Avisynth Scripting 2 07-22-2004 03:09 AM
SansGrip Filters: Need an aternative resize to GripFit Zyphon Avisynth Scripting 42 07-02-2004 12:35 PM
Avisynth: Gripfit problems... TKS Avisynth Scripting 1 11-28-2003 05:43 AM
already using gripfit - Will tmpgenc resize it again? jrv331 Video Encoding and Conversion 1 12-07-2002 10:41 PM

Thread Tools



 
All times are GMT -5. The time now is 11:51 AM  —  vBulletin Jelsoft Enterprises Ltd