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 20th April 2013, 15:04   #41  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Reel.Deel View Post
Hi LaTo, congratulations on your advancement.

One odd thing though, the 2.6 version worked since beta8 but it does not with v1.00. I tried both MSVC and ICL, x86 only and the same error.


Here's the script:
Code:
LoadPlugin("AutoGain.dll")

# NTSC DVD Source
DGSource("X:\test.dgi")

AutoGain()
I'm using SEt's 2.6.0.3 MT 2012.05.16. I have not tried it with the official or MT 2.6.0.4. Unfortunately I have to go to work right now . When I get some time I will try it out and report back.
Hi!

AutoGain now uses the new interface from alpha4, so it will not work anymore with older versions.
LaTo is offline   Reply With Quote
Old 29th April 2013, 15:54   #42  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Reel.Deel View Post
Hi LaTo, congratulations on your advancement.

One odd thing though, the 2.6 version worked since beta8 but it does not with v1.00. I tried both MSVC and ICL, x86 only and the same error.


Here's the script:
Code:
LoadPlugin("AutoGain.dll")

# NTSC DVD Source
DGSource("X:\test.dgi")

AutoGain()
I'm using SEt's 2.6.0.3 MT 2012.05.16. I have not tried it with the official or MT 2.6.0.4. Unfortunately I have to go to work right now . When I get some time I will try it out and report back.
So finally, does it work?

I am waiting after this answer to do the same update for SmoothAdjust...
LaTo is offline   Reply With Quote
Old 29th April 2013, 18:17   #43  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,115
Quote:
Originally Posted by LaTo View Post
So finally, does it work?

I am waiting after this answer to do the same update for SmoothAdjust...
Whoops had no idea you where waiting on my answer, I assumed you had tried it with Avisynth alpha 4. Sorry.
But yes it works correctly with the SEt's latest MT alpha 4.
Reel.Deel is offline   Reply With Quote
Old 29th April 2013, 20:23   #44  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Reel.Deel View Post
Whoops had no idea you where waiting on my answer, I assumed you had tried it with Avisynth alpha 4. Sorry.
But yes it works correctly with the SEt's latest MT alpha 4.
Np that's great, so I will update SmoothAdjust
LaTo is offline   Reply With Quote
Old 3rd May 2013, 09:07   #45  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Is "Avisynth 2.6 alpha4" a mandatory for AutoGain?
Given that I was asked the question elsewhere, I will answer here too: yes and no

You can use the builds inside "avs-2.5.x" for Avisynth 2.5.8 without problem, but if you use builds inside "avs-2.6.x" you need at least the new 2.6 alpha4 version.
LaTo is offline   Reply With Quote
Old 14th July 2013, 18:17   #46  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Update 2013/07/15

New version:
Quote:
v1.02:
fixed minor things & bugs
dropped ICL builds support
LaTo is offline   Reply With Quote
Old 24th July 2013, 07:42   #47  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
LaTo!
Last version very good and fast. I note this great work at fade in and out (source VHS capture).
Only one problem this slow down my script
see http://forum.doom9.org/showthread.ph...65#post1623465
I replace
ColorYUV(autogain=true, autowhite=true)
to
AutoGain(adjust_mode=1).ColorYUV(autogain=false, autowhite=true)
and speed drop from 8 fps to 2 fps.
I am add threads_count=1 the same issue.
When I tryt autogain separately speed will be O'k.
Please advice.
yup.
yup is offline   Reply With Quote
Old 8th August 2013, 17:24   #48  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by yup View Post
LaTo!
Last version very good and fast. I note this great work at fade in and out (source VHS capture).
Only one problem this slow down my script
see http://forum.doom9.org/showthread.ph...65#post1623465
I replace
ColorYUV(autogain=true, autowhite=true)
to
AutoGain(adjust_mode=1).ColorYUV(autogain=false, autowhite=true)
and speed drop from 8 fps to 2 fps.
I am add threads_count=1 the same issue.
When I tryt autogain separately speed will be O'k.
Please advice.
yup.
AutoGain is slower than ColorYUV... but not that much (4 times slower here), try increasing cache_size because you're using a lot of temporal filters.
LaTo is offline   Reply With Quote
Old 25th August 2013, 15:26   #49  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Update 2013/08/25

Quote:
v1.40:
used new C++11 features
rewritten multi-threading (native)
speed optimization (10% faster)
exception-safe code
added a high quality interpolation mode
improved core algorithm
fixed various little things
Big update

Please feel free to report any bugs and problems...
LaTo is offline   Reply With Quote
Old 27th August 2013, 11:01   #50  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Hi Lato!

Thanks for update. I try new release.
Script1
Code:
SetMemoryMax(3072)
AVISource("cap1.avi")
AssumeTFF()
ConverttoYV12(interlaced=true)
Crop(16,12,-16,-12)
s=nnedi(field=-2,threads=0)
s.AutoGain(adjust_mode=1,threads_count=0,cache_size=60)
Stackvertical(last,s)
give speed rendering 30-70 fps.
Script 2
Code:
SetMemoryMax(3072)
setMTMode(3)
AVISource("cap1.avi")
setMTMode(2)
AssumeTFF()
ConverttoYV12(interlaced=true)
Crop(16,12,-16,-12)
s=nnedi(field=-2,threads=1)
s.AutoGain(adjust_mode=1,threads_count=1,cache_size=60)
Stackvertical(last,s)
give speed rendering 8-20 fps.
Aisynth 2.6 Set last version.
Strange behavior.
I try plugin from tritical with the same approach and do not see big difference in fps.
I try change cache_size up to 480 without success.
yup.
yup is offline   Reply With Quote
Old 14th September 2013, 16:23   #51  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by yup View Post
Hi Lato!

Thanks for update. I try new release.
Script1
Code:
SetMemoryMax(3072)
AVISource("cap1.avi")
AssumeTFF()
ConverttoYV12(interlaced=true)
Crop(16,12,-16,-12)
s=nnedi(field=-2,threads=0)
s.AutoGain(adjust_mode=1,threads_count=0,cache_size=60)
Stackvertical(last,s)
give speed rendering 30-70 fps.
Script 2
Code:
SetMemoryMax(3072)
setMTMode(3)
AVISource("cap1.avi")
setMTMode(2)
AssumeTFF()
ConverttoYV12(interlaced=true)
Crop(16,12,-16,-12)
s=nnedi(field=-2,threads=1)
s.AutoGain(adjust_mode=1,threads_count=1,cache_size=60)
Stackvertical(last,s)
give speed rendering 8-20 fps.
Aisynth 2.6 Set last version.
Strange behavior.
I try plugin from tritical with the same approach and do not see big difference in fps.
I try change cache_size up to 480 without success.
yup.
External MT with AutoGain is not a good idea, simply because it need the full video frame to do statistics computation.
And moreover, it is not stable and a bit borked. Always use internal MT when provided by plugin's author.
LaTo is offline   Reply With Quote
Old 19th September 2013, 13:37   #52  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Update 2013/09/19

v1.45:
fixed bugs inside multi-threading code
removed user32 dependency
added AVX2 detection (for future opt)
LaTo is offline   Reply With Quote
Old 19th September 2013, 17:23   #53  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
LaTo!

Now work fine with Set build.
yup.
yup is offline   Reply With Quote
Old 23rd September 2013, 10:33   #54  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Hi Lato!
I am testing new version with Avsmeter.
script without MT
Code:
AVISource("cap1.avi").Trim(10000,11000)
AssumeTFF()
ConvertToYV12(interlaced=true)
b=nnedi3(field=-2)
b.AutoGain(b.Crop(16,12,-16,-12),adjust_mode=1)
AVSMeter log
Code:
Active MT Mode: 0

Number of frames:                  2002
Length (hhh:mm:ss.ms):    000:00:40.040
Frame width:                        720
Frame height:                       576
Framerate:                       50.000 (50/1)
Colorspace:                        YV12

Frames processed:                2002 (0 - 2001)
FPS (min | max | average):       4.35 | 433.48 | 146.10
CPU usage (average):             60%
Thread count:                    44
Physical Memory usage (peak):    171 MB
Virtual Memory usage (peak):     172 MB
Time (elapsed):                  000:00:13.703
Script with MT mode
Code:
SetMTMode(3,8)
AVISource("cap1.avi").Trim(10000,11000)
SetMTMode(2,8)
AssumeTFF()
ConvertToYV12(interlaced=true)
b=nnedi3(field=-2)
b.AutoGain(b.Crop(16,12,-16,-12),adjust_mode=1,threads_count=1)
AVSMeter log
Code:
Active MT Mode: 2

Number of frames:                  2002
Length (hhh:mm:ss.ms):    000:00:40.040
Frame width:                        720
Frame height:                       576
Framerate:                       50.000 (50/1)
Colorspace:                        YV12

Frames processed:                2002 (0 - 2001)
FPS (min | max | average):       33.12 | 870.27 | 139.33
CPU usage (average):             93%
Thread count:                    152
Physical Memory usage (peak):    588 MB
Virtual Memory usage (peak):     599 MB
Time (elapsed):                  000:00:14.368
We can see that in both mode CPU using practically the same. For short chain filter all work fine.
Interesting thing if using autogain after complex filter like QTGMC
script
Code:
SetMemoryMax(3072)
SetMTMode(3,8)
AVISource("cap1.avi").Trim(10000,11000)
SetMTMode(2,8)
AssumeTFF()
ConvertToYV12(interlaced=true)
QTGMC()
AutoGain(adjust_mode=1, threads_count=1,temporal_radius=X)
for X=0
AVSMeter log
Code:
Active MT Mode: 2

Number of frames:                  2002
Length (hhh:mm:ss.ms):    000:00:40.040
Frame width:                        720
Frame height:                       576
Framerate:                       50.000 (50/1)
Colorspace:                        YV12

Frames processed:                2002 (0 - 2001)
FPS (min | max | average):       5.05 | 383151.02 | 40.73
CPU usage (average):             69%
Thread count:                    90
Physical Memory usage (peak):    646 MB
Virtual Memory usage (peak):     683 MB
Time (elapsed):                  000:00:49.147
for X=1
Code:
Active MT Mode: 2

Number of frames:                  2002
Length (hhh:mm:ss.ms):    000:00:40.040
Frame width:                        720
Frame height:                       576
Framerate:                       50.000 (50/1)
Colorspace:                        YV12

Frames processed:                2002 (0 - 2001)
FPS (min | max | average):       4.96 | 287363.25 | 34.43
CPU usage (average):             49%
Thread count:                    94
Physical Memory usage (peak):    642 MB
Virtual Memory usage (peak):     683 MB
Time (elapsed):                  000:00:58.142
for X=2
Code:
Active MT Mode: 2

Number of frames:                  2002
Length (hhh:mm:ss.ms):    000:00:40.040
Frame width:                        720
Frame height:                       576
Framerate:                       50.000 (50/1)
Colorspace:                        YV12

Frames processed:                2002 (0 - 2001)
FPS (min | max | average):       4.84 | 156743.59 | 22.68
CPU usage (average):             26%
Thread count:                    92
Physical Memory usage (peak):    639 MB
Virtual Memory usage (peak):     683 MB
Time (elapsed):                  000:01:28.263
We can see how fps decrease with increasing temporal_radius.
For default setting temporal_radius=20 speed drastically drop to 1.5 fps.
yup.
yup is offline   Reply With Quote
Old 23rd September 2013, 11:35   #55  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 610
QTGMC is not exactly a lightweight filter. I guess you’re facing a cache issue and for some reason the frames requested from the QTGMC filter graph are recalculated again and again instead of being cleverly stored in cache.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r19 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 23rd September 2013, 11:46   #56  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Quote:
Originally Posted by cretindesalpes View Post
I guess you’re facing a cache issue and for some reason the frames requested from the QTGMC filter graph are recalculated again and again instead of being cleverly stored in cache.
This issue solved in last IanB build? And we need waiting from SeT?
Please precise.
yup.
yup is offline   Reply With Quote
Old 23rd September 2013, 18:15   #57  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Hi all!
I change order for filters
Code:
SetMemoryMax(3072)
SetMTMode(3,8)
AVISource("cap1.avi").Trim(10000,11000)
SetMTMode(2,8)
AssumeTFF()
ConvertToYV12(interlaced=true)
SeparateFields()
AutoGain(adjust_mode=1, threads_count=1,temporal_radius=20)
Weave()
QTGMC()
#AutoGain(adjust_mode=1, threads_count=1,temporal_radius=3)
And now all work with full speed.
yup.
yup is offline   Reply With Quote
Old 27th October 2013, 07:53   #58  |  Link
nhope
partially-informed layman
 
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 309
I have a lot of footage from Sony cameras where the blacks are at about 20 and the whites are at 255. I would like an "auto" way to get the blacks to 16 and the whites to 235 for general footage with a high dynamic range.

Using AutoGain(adjust_mode=1,dark_exclude=0.00,bright_exclude=0.00) as suggested previously, the blacks come out at about 16, which is where I want them, but I can't find a setting to roll the whites off to 235. The highlights remain at or close to 255 so they clip and a little detail is lost. Is there a setting that can roll off the white to 235 or should I look at a different filter? This is probably similar to what PDyksma and Dogway were asking, but I want to be sure.
nhope is offline   Reply With Quote
Old 27th October 2013, 08:28   #59  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by nhope View Post
I have a lot of footage from Sony cameras where the blacks are at about 20 and the whites are at 255. I would like an "auto" way to get the blacks to 16 and the whites to 235 for general footage with a high dynamic range.

Using AutoGain(adjust_mode=1,dark_exclude=0.00,bright_exclude=0.00) as suggested previously, the blacks come out at about 16, which is where I want them, but I can't find a setting to roll the whites off to 235. The highlights remain at or close to 255 so they clip and a little detail is lost. Is there a setting that can roll off the white to 235 or should I look at a different filter? This is probably similar to what PDyksma and Dogway were asking, but I want to be sure.
I will add another option later for this (AutoGain doesn't allow to compress range).

Last edited by LaTo; 27th October 2013 at 14:02.
LaTo is offline   Reply With Quote
Old 31st October 2013, 16:03   #60  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Update 2013/10/31

v1.60:
split 'tv_range' into 'input_tv' & 'output_tv'
fixed possible freeze in MT code
added explicit error messages
LaTo 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 10:26.


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