Quantcast Avisynth: Why to use Converttoxxx() Multiple Times - Page 2 - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Avisynth Scripting

Reply
 
LinkBack Thread Tools
  #21  
10-10-2005, 11:25 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Another hint .... do downgrade to avisynth 2.55 stable. Maybe its another bug as its known that 2.56b is quite tricky in its actual state.
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
  #22  
10-10-2005, 11:54 AM
supermule supermule is offline
Free Member
 
Join Date: Sep 2005
Location: Donkeyland
Posts: 210
Thanks: 0
Thanked 0 Times in 0 Posts
The only change that I make is to add the converttoYV12() statement rest remains the same and I can see the speed difference apart from it I only use Lremovedust() and Resize() + Addborders() in the script and the slowness is only for some files.....not all....even though they all show YV12() colorspace.

I have both divx6 and xvid 1.1.0 codecs installed...........can that possibly cause these vague problems ????
Reply With Quote
  #23  
10-10-2005, 05:22 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
If youre still talking about using Lremovedust() in your scripts, then it doesnt matter if your source is already YV12 or even crop(.......,true) was used. The Memory alignment bug comes from a filtercall within LRemovedust. Maybe its CPU Constructionset "build" specific, I dunno.

So do

ImportYourYV12Source()
ColorCache=last
ConvertToYUY2().ConvertToYV12()
LRemovedust(17,x)
MergeChroma(ColorCache)

Also if you first resize and then use LRemovedust(), it often also helps on the speed-issue, as also here the bytes do get realigned.
Reply With Quote
  #24  
10-10-2005, 05:39 PM
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 incredible
Maybe its CPU Constructionset "build" specific, I dunno.
what I can say is that I don't have to use your double colorspace convertion to solve the problem on my SSE2 P4. The Crop(...,true) is enought.
Did you tried ?
Reply With Quote
  #25  
10-10-2005, 11:36 PM
supermule supermule is offline
Free Member
 
Join Date: Sep 2005
Location: Donkeyland
Posts: 210
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
The Memory alignment bug comes from a filtercall within LRemovedust. Maybe its CPU Constructionset "build" specific, I dunno.
I will have to disagree with you in this statement based on pure facts that I have experienced.

the sequence that I follow in the script is :

Code:
converttoYV12()
LRemoveDust_YV12(17,1)
and this does increase the speed, whereas you have stated that its the filtercall within Lremovedust which causes the problem(In that case the converttoYV12() should be ineffective in the speed increase).

Anyways, I will try the crop() as suggested by Boulder\dialhot and see if that helps, instead of converttoYV12().
Reply With Quote
  #26  
10-11-2005, 12:49 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Quote:
Originally Posted by incredible
Maybe its CPU Constructionset "build" specific, I dunno.
what I can say is that I don't have to use your double colorspace convertion to solve the problem on my SSE2 P4. The Crop(...,true) is enought.
Same goes for me.

supermule: if ConverttoYV12() causes some changes in memory alignment, LRemoveDust might benefit from it - even if ConverttoYV12() actually does nothing on the video. It could be that it loads a frame in cache or something like that. In any case, it has to get the source colorspace from somewhere.
Reply With Quote
  #27  
10-11-2005, 01:44 AM
supermule supermule is offline
Free Member
 
Join Date: Sep 2005
Location: Donkeyland
Posts: 210
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
supermule: if ConverttoYV12() causes some changes in memory alignment, LRemoveDust might benefit from it - even if ConverttoYV12() actually does nothing on the video. It could be that it loads a frame in cache or something like that. In any case, it has to get the source colorspace from somewhere.
Are you suggesting that I keep using converttoYV12() since it works for me or I use both crop() and converttoYV12() or I use only crop() ???
Reply With Quote
  #28  
10-11-2005, 02:12 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Try with Crop only, I'm quite positive it'll fix the issue.
Reply With Quote
  #29  
10-11-2005, 02:48 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@ Phil & Boulder

Seems both of you got Intel Pentium SSE2 capable CPUs? Im on AthlonXP, so SSE only.
A simple crop(....,true) doesn't work for me as said above
Reply With Quote
  #30  
10-11-2005, 02:54 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
If the issue is actually framecache-related, the colorspace conversion trick you use will fix it. Apparently realigning is enough on P4's since I've never had to do more than that. And I've only had to do the zero-crop when LRemoveDust has been called immediately after loading the source.
Reply With Quote
  #31  
10-11-2005, 03:30 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 incredible
@ Phil & Boulder

Seems both of you got Intel Pentium SSE2 capable CPUs? Im on AthlonXP, so SSE only.
A simple crop(....,true) doesn't work for me as said above
That's sad. But I understand that it should not be easy for a designer to master all the optimization for all instruction sets (MMX, SSE2, SSE3...). At least you found a workaround.
Reply With Quote
  #32  
10-12-2005, 12:14 AM
fabrice fabrice is offline
Free Member
 
Join Date: Mar 2003
Location: Madrid-Spain
Posts: 515
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I'm also using an AthlonXP, but with avisynth 2.5.5, and with a DVD source, I don't see any speed gain with this change...

I tried with this avi file, and no change: with the convertXXX lines, it's even a bit slower... (because of the conversions)

Salu2
Fabrice
Reply With Quote
  #33  
10-12-2005, 02:25 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@Fabrice

interesting, .... where do you apply the LRemovedust? BEFORE a "resizing" or after? I dont mean only crop() but resizing.
Reply With Quote
  #34  
10-12-2005, 04:37 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 fabrice
I'm also using an AthlonXP, but with avisynth 2.5.5, and with a DVD source, I don't see any speed gain with this change...

I tried with this avi file, and no change: with the convertXXX lines, it's even a bit slower... (because of the conversions)
Okay, but is the convertion damn slow or not ?

Exemple on my PC : with Deen, a conversion takes 5 h, with LRemoveDust it takes 20 h if I do not use any fixing trick, and 5h again if I use one.

Edit : The 2.5.5 is probably not affected by the problem. This can explain that you don't see any diff
Reply With Quote
  #35  
10-12-2005, 08:18 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Exemple on my PC : with Deen, a conversion takes 5 h, with LRemoveDust it takes 20 h if I do not use any fixing trick, and 5h again if I use one.
And what is the trick?
Reply With Quote
  #36  
10-12-2005, 08:26 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 Prodater64
And what is the trick?

Tired Luis ?

There are two tricks that work or not depending the CPU you have :
- Crop(0,0,0,0,true)
- or the "double convert" implemented by Inc.

Read the thread completly, all in there !
Reply With Quote
  #37  
10-12-2005, 03:11 PM
fabrice fabrice is offline
Free Member
 
Join Date: Mar 2003
Location: Madrid-Spain
Posts: 515
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I tried with LRemoveDust just after the mpeg2source or avisource line, and also after resizing, and it last a bit more putting the LRemoveDust before resizing (I mean, for this clip, it last in both case less than 2 minutes without adding border).

And conversions with LRemoveDust last 5/6 h with hc for a 1h30 movie, at 704x576, so I assume that the 2.5.5 version is 'bug' free

Salu2
Fabrice
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Multiple Sources in one script? Bchteam Avisynth Scripting 2 09-19-2003 12:12 AM
Avisynth: Multiple D2V files with Mpeg2Dec3 ? ak47 Avisynth Scripting 0 06-29-2003 11:41 PM
Avisynth: Multiple D2Vs in one script? PyRoMaNiA Avisynth Scripting 2 03-21-2003 11:07 AM
Avisynth: Multiple Avi Sources? urban tec Avisynth Scripting 4 01-16-2003 10:41 PM
Avisynth: Concatenating multiple AVI files? Scav Avisynth Scripting 4 05-20-2002 07:21 AM




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