Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th June 2010, 17:50   #221  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
2 minutes per frame? Cool. That makes a processing time of only 83 days for one 40-minutes PAL clip.
___

Since that's Anime, it can be assumed the input is not of the category "video"-interlaced. And when it is not, then the number of different motion states (on the field-separated level) is not equal in forward and backward direction. As a consequence of this unsymmetry, the internal motion search of TGMC is not working optimally. (Due to the temporally-symmetric preprocessing.)

TGMC is intended for video-type interlaced sources, and nothing else. In most cases the internal safeguarding is good enough to avoid "obvious" errors when feeding sources with other types of interlacing. But you can't expect an optimal result when using a tool for something it wasn't designed for.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 26th June 2010, 05:10   #222  |  Link
Bi11
Architect
 
Bi11's Avatar
 
Join Date: May 2010
Posts: 57
Quote:
Originally Posted by Gavino View Post
Spline64Resize is also present in Avisynth 2.58, but not in 2.57 or the MT version derived from it.
I am using Avisynth 2.5.8 MT. So I guess it already has Spline64Resize built-in.

Quote:
Originally Posted by Great Dragon View Post
It is slow as hell. It takes 2 mins to process one frame on my Q6600 with all 4 cores loaded for 100%.
Yes, it is impractically slow. Using avs2avi clip.avs -o n, on a Core i5 750 @3.4GHz, with a 720x540 clip gives 0.13fps with setMTmode(2). Using eedi3_ss outside of TGMC gives 0.3fps, again with setMTmode(2).

Have you tried doing only one call to eedi3, like so:
Code:
 \   : (EdiMode=="eedi3")  ? clp.eedi3(field=-2, sclip=clp.nnedi3(field=-2))
It is much faster (10x as fast @1.3fps) and looks close to eedi3_ss, but without connecting "micro" jagged edges.
Scaling that rate, on an overclocked Core i7 860 w/ HT, processing a 40-minute PAL clip with EdiMode="eedi3" in TGMC would take 6.4 hours.

I think it should be possible to get the same effect as eedi3_ss without the supersampling, with only two consecutive calls to eedi3, or maybe first call to nnedi3 then second call to eedi3. The second call would configure eedi3 to be more aggressive at connecting very short lines.
I'll have to keep experimenting...

Update:
After some experimenting, it seems eedi3_rpow2 is entirely responsible for anti-aliasing jagged edged. So nnedi3 could be used for deinterlacing, which would give less artifacts than eedi3, and still look nearly identical to eedi3_ss, like so
Code:
 \   : (EdiMode=="nnedi3+eedi3_ss") ? clp.nnedi3(field=-2,nsize=nsize,nns=nns,qual=qual).eedi3_rpow2(rfactor=2,cshift="spline64resize",fwidth=clp.width,fheight=clp.height)
Runs @0.25fps.

Last edited by Bi11; 27th June 2010 at 08:45. Reason: nnedi3+eedi3_ss
Bi11 is offline   Reply With Quote
Old 26th June 2010, 07:20   #223  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
on DV content is nnedi2 better, so i suppose also on all dvd/blueray also.
for anime you say there nnedi3 wins. anime has a lot of flat areas.
maybee nnedi3 could be optimised - for flat areas use some speedy algoritm, for details current nnedi3. is something like this possible, Tritical?
Terka is offline   Reply With Quote
Old 26th June 2010, 07:39   #224  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Quote:
Originally Posted by Terka View Post
maybee nnedi3 could be optimised - for flat areas use some speedy algoritm, for details current nnedi3. is something like this possible, Tritical?
This feature is already implemented, and used by default. Dive into the readme, and see the "pscrn" parameter.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 26th June 2010, 07:53   #225  |  Link
Great Dragon
Registered User
 
Great Dragon's Avatar
 
Join Date: Feb 2005
Location: Ukraine, Lviv
Posts: 121
Quote:
Originally Posted by Bi11
Have you tried doing only one call to eedi3, like so:
Thanks to your script example I did and I have to say it's MUCH faster and still do the job well. Actually now it's practically useful.

This is still frame in the end of scene where default TGMC fails.

There is no such big difference in visual quality on "normal" frames but with EEDI3+NNEDI3 these looks a little more cleaner/sharper.

TGMC default

EEDI3+NNEDI3 one call
Great Dragon is offline   Reply With Quote
Old 29th June 2010, 12:35   #226  |  Link
D3C0D3R
Registered User
 
Join Date: Mar 2010
Location: Ukraine
Posts: 50
Quote:
Originally Posted by Didée View Post
This feature is already implemented, and used by default. Dive into the readme, and see the "pscrn" parameter.
2 Tritical
can you implement this useful thing for much faster EEDI2 or add speedy option to EEDi3 (ex. using networks of smaller sizes)?
__________________
blendhater
D3C0D3R is offline   Reply With Quote
Old 29th June 2010, 14:29   #227  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Quote:
Originally Posted by Great Dragon View Post
This is still frame in the end of scene where default TGMC fails.
The last frame is always a dud. Obviously, one way to avoid it is to pad the end of the source clip with a few extra frames and excise afterwards.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 29th June 2010 at 14:35.
WorBry is offline   Reply With Quote
Old 30th June 2010, 15:06   #228  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Quote:
Originally Posted by D3C0D3R
can you implement this useful thing for much faster EEDI2 or add speedy option to EEDi3 (ex. using networks of smaller sizes)?
eedi2 already does this, but not using a neural network (it builds an edge mask). I could replace eedi2's edge mask building with nnedi2/nnedi3's prescreener, but I don't really want to work on on eedi2 anymore. Prescreening for eedi3 isn't as useful since it must process entire lines. How each pixel is interpolated is dependent on how every other pixel in the line contributes to the cost function. I could run the prescreener and not process any lines where it detects all pixels can use cubic, but I don't think it will save any significant time. If you want eedi3 to be faster there are really four settings to change from the defaults: mdis/nrad/cost3/ucubic. (ucubic=false,cost3=false,nrad=1,mdis=10) is 4-5x faster than the defaults, but of course the result isn't quite as good (and with mdis=10 lines of very small slope: < 1/10 wont be connected). As for smaller networks, neither eedi2/eedi3 use neural networks so there are none to make smaller. Once I get nsizes 16x4 and 32x4 added to nnedi3 I'm going to work on improving the speed/accuracy of the prescreener. I haven't touched the prescreener since the original nnedi.

The temporal version of nnedi3 is on hold for now.

Last edited by tritical; 30th June 2010 at 15:18.
tritical is offline   Reply With Quote
Old 1st July 2010, 11:16   #229  |  Link
Great Dragon
Registered User
 
Great Dragon's Avatar
 
Join Date: Feb 2005
Location: Ukraine, Lviv
Posts: 121
Quote:
Obviously, one way to avoid it is to pad the end of the source clip with a few extra frames and excise afterwards.
If there are many scenes with such bad frames in a source clip it's a real pain.
Great Dragon is offline   Reply With Quote
Old 1st July 2010, 18:11   #230  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
The 'dud frame' will (should) only occur once at the end of a processed clip, not at (internal) scene changes. Of course, if you are processing each scene separately, it becomes more tedious, but so is splitting and splicing anyway.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 1st July 2010 at 18:21.
WorBry is offline   Reply With Quote
Old 2nd July 2010, 01:00   #231  |  Link
plonk420
amd & h.264 fanboy
 
plonk420's Avatar
 
Join Date: Jun 2002
Location: NTSC
Posts: 420
all i can say is that eedi3+nnedi2 is AMAZING! :O
plonk420 is offline   Reply With Quote
Old 9th July 2010, 04:01   #232  |  Link
hartford
Registered User
 
hartford's Avatar
 
Join Date: Nov 2003
Posts: 324
eedi3 misbehaving

I got an error when trying to load EEDI3 with Avisynth v2.5.7:

The instruction at "0x012198f4" referenced memory at "0x011c3ca8". The memory could not be "read".

So, I updated to Avisynth 2.5.8 and got a simple error:

"LoadPlugin: unable to load "c:\program files\avsplugins\eedi3.dll"
(c:\..\blah.avs, line blah")

I have checked paths and syntax several times.


Script:

loadplugin("c:\program files\avsplugins\nnedi2.dll")
loadplugin("c:\program files\avsplugins\eedi3.dll") # the path is correct

avisource("blah.avi") # the avs file resides in the same directory as the avi

eedi3(sclip=nnedi2())



Any idea about what is causing the error?

Other stuff:

Windows XP sp2
eedi3 v0.9 for Avisynth 2.5x; file version 0.9.0.0; 24Jun10
nnedi2 v1.5 for Avisynth 2.5x; 16May2010
hartford is offline   Reply With Quote
Old 9th July 2010, 05:32   #233  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
I didn't mention it, but since the last version uses openmp, and I compiled it with vs2005, you will need to have the visual studio 2005 redistributable installed (for vcomp.dll).

If you already have the redistributable then I'm not sure.
tritical is offline   Reply With Quote
Old 10th July 2010, 04:05   #234  |  Link
hartford
Registered User
 
hartford's Avatar
 
Join Date: Nov 2003
Posts: 324
I did a search on my harddrive for vcomp.dll and did not find it.

I installed visual studio 2005 redistributable. I did a search for vcomp.dll
and found it in this directory:

c:\windows\x86_Microsoft.VC80.OpenMP_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0ee63867

but I got the same error (LoadPlugin: unable to load "c:\program files\avsplugins\eedi3.dll").

Yes, I did reboot after installing the redistributable from MicroSoft.

Odd thing was that I didn't find it when I did a search of "c:\" but I did find it when I did
a search of "c:\Windows"

I don't know what that means except that paths were not established.

I'm open for suggestions.

I copied the dll to the system32 directory but no joy.


*edit for missing a copy-paste character*

Last edited by hartford; 10th July 2010 at 04:15.
hartford is offline   Reply With Quote
Old 10th July 2010, 04:32   #235  |  Link
Bi11
Architect
 
Bi11's Avatar
 
Join Date: May 2010
Posts: 57
Remove the loadplugin() calls and place eedi3.dll in Avisynth 2.5/plugins folder.

If that doesn't work then:

Do a clean uninstall of AviSynth and clear the plugins directory. Reboot.
Do a default install of SEt's AviSynth MT 2.5.8.
Copy eedi3.dll to the default AviSynth 2.5\plugins directory.

Run the script below (without the loadplugin()) to see if it works :
BlankClip(pixel_type="YV12")
eedi3()
Bi11 is offline   Reply With Quote
Old 11th July 2010, 03:57   #236  |  Link
hartford
Registered User
 
hartford's Avatar
 
Join Date: Nov 2003
Posts: 324
@Bi11

<i>Remove the loadplugin() calls and place eedi3.dll in Avisynth 2.5/plugins folder.</i>

That did not work.

<i>If that doesn't work then:

Do a clean uninstall of AviSynth and clear the plugins directory. Reboot.
Do a default install of SEt's AviSynth MT 2.5.8.
Copy eedi3.dll to the default AviSynth 2.5\plugins directory.</i>

Doesn't work. I get an "Import error."

After putting the AviSynth MT dll in the system32 directory I tried to
register it without success. I get the error:

LoadLibrary("C:\WINDOWS\system32\avisynth.dll") failed - the specified module could not be found.

I'm totally perplexed. I've installed previous versions of avisynth MT with no problem.
I've tried EEDI2 just to see what it could do and had no problem.

So now I have EEDI3 and Avisynth MT not working.

Problems are compounding, but thanks for the suggestions.
hartford is offline   Reply With Quote
Old 11th July 2010, 04:00   #237  |  Link
hartford
Registered User
 
hartford's Avatar
 
Join Date: Nov 2003
Posts: 324
Remove the loadplugin() calls and place eedi3.dll in Avisynth 2.5/plugins folder.

That did not work.

If that doesn't work then:

Do a clean uninstall of AviSynth and clear the plugins directory. Reboot.
Do a default install of SEt's AviSynth MT 2.5.8.
Copy eedi3.dll to the default AviSynth 2.5\plugins directory.


Doesn't work. I get an "Import error."

After putting the AviSynth MT dll in the system32 directory I tried to
register it without success. I get the error:

LoadLibrary("C:\WINDOWS\system32\avisynth.dll") failed - the specified module could not be found.

I'm totally perplexed. I've installed previous versions of avisynth MT with no problem.
I've tried EEDI2 just to see what it could do and had no problem.

So now I have EEDI3 and Avisynth MT not working.

Problems are compounding, but thanks for the suggestions.
hartford is offline   Reply With Quote
Old 13th July 2010, 11:35   #238  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
nnedi2/3 incorrectly handling RGB24

nnedi3 does not interpret the field parameter correctly when the input is RGB24.

With this script:
Code:
b = BlankClip(height=240, pixel_type="RGB24")
w = BlankClip(b, color=color_white)
Interleave(b, w)
AssumeFieldBased().AssumeTFF()
Weave()
nnedi3(field=0) # same rate, keep bottom field
the result should be all-white (bottom field), but in fact an all-black frame is produced.
If pixel_type is changed to "YUY2", a white frame is correctly obtained.
Similar problems occur when dh=true.

I suspect that the implementation does not allow for Avisynth storing RGB frames 'upside-down', so interprets top fields as bottom and vice-versa.

Edit: The same behaviour is also present in nnedi2.

Last edited by Gavino; 13th July 2010 at 17:47. Reason: Also applies to nnedi2
Gavino is offline   Reply With Quote
Old 13th July 2010, 19:04   #239  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Yep. I'll fix it in the next release. Should be in the next few days.

@hartford
Did you ever get things sorted out? I really have no idea what the problem might be.
tritical is offline   Reply With Quote
Old 13th July 2010, 19:43   #240  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by tritical View Post
Yep. I'll fix it in the next release. Should be in the next few days.
Thanks, tritical.

Will this fix also change the behaviour of nnedi2/3_rpow2?
I notice that this produces opposite shifts for RGB and YUY2 when called without the cshift parameter. This isn't necessarily wrong, but seems anomalous.
Gavino is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.