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 3rd September 2009, 23:01   #41  |  Link
Korben
Registered User
 
Join Date: May 2006
Posts: 11
Nice feature. Why is it not possible to use YUY2? I got an error message:

---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:

This is not an YV12 clip ! Please convert color space to YV12 before using GradFun2DBmod()

(GradFun2DBmod.v1.3.avsi, line 136)
(E:\Capture\Project_107\1tdecimate.avs, line 91)
---------------------------
OK
---------------------------
Korben is offline   Reply With Quote
Old 4th September 2009, 18:15   #42  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,709
It has to due with it's supporting plugins. One(or more) of them do not support YUY2. Simple as that.
Adub is offline   Reply With Quote
Old 18th October 2009, 14:25   #43  |  Link
Benus_MinO
Registered User
 
Join Date: Aug 2008
Posts: 22
LaTo, how I can obtain results like this?:




Here is source:

http://pi.fastbighost.com/~benus/Banding.m2ts
Benus_MinO is offline   Reply With Quote
Old 18th October 2009, 18:57   #44  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Benus_MinO View Post
LaTo, how I can obtain results like this?:




Here is source:

http://pi.fastbighost.com/~benus/Banding.m2ts
Something like this should do the job: GradFun2DBmod(thr=1.6,thrC=1.2,str=0.8,strC=0.4)
LaTo is offline   Reply With Quote
Old 18th October 2009, 19:27   #45  |  Link
Benus_MinO
Registered User
 
Join Date: Aug 2008
Posts: 22
Thank you.
Benus_MinO is offline   Reply With Quote
Old 25th November 2009, 08:24   #46  |  Link
VincAlastor
Registered User
 
Join Date: Sep 2009
Location: Berlin
Posts: 173
very good filter, thank you La To. but for daily using to slow! - is there a direct compute plan?
VincAlastor is offline   Reply With Quote
Old 25th November 2009, 18:26   #47  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Update 2009/11/25

v1.4:
changed "temp" parameter (-1=off)
updated documentation
LaTo is offline   Reply With Quote
Old 25th November 2009, 18:28   #48  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by VincAlastor View Post
very good filter, thank you La To. but for daily using to slow! - is there a direct compute plan?

For faster settings try:

Code:
GradFun2DBmod(adapt=-1,temp=-1)
It should be a big speed up


PS: For realtime processing (viewing) you can also add mask=false.
LaTo is offline   Reply With Quote
Old 15th December 2009, 08:22   #49  |  Link
Dreadkillz
Registered User
 
Join Date: Aug 2009
Posts: 19
Hi, Lato.

Could you explain what "adapt" does? When I set adapt to high values, I see more noise on brighter areas than darker areas. Setting adapt to low values, I see more noise on darker areas than brighter areas.
Dreadkillz is offline   Reply With Quote
Old 15th December 2009, 10:58   #50  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,653
Lato, loving your LSFmod, and am using it in conjunction with deband in ffdshow in most of my scripts. Would the settings you mentioned above be an adequate replacement for deband? Is there a setting that provides in your opinion better image quality with a similar performance impact? Awesome work man.
ryrynz is offline   Reply With Quote
Old 15th December 2009, 11:23   #51  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
LaTo, could you suggest some settings for a deblocking type effect?
markanini is offline   Reply With Quote
Old 15th December 2009, 21:24   #52  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Dreadkillz View Post
Could you explain what "adapt" does? When I set adapt to high values, I see more noise on brighter areas than darker areas. Setting adapt to low values, I see more noise on darker areas than brighter areas.
Yes it's true, this parameter adapts the strength of the grain depending on the brightness.

The goal is to be as close to reality and to reproduce natural film grain.

I think that adapt=64 is a good value, but it also dependent of the source... Pick the best value for your eyes


Quote:
Originally Posted by ryrynz View Post
Would the settings you mentioned above be an adequate replacement for deband? Is there a setting that provides in your opinion better image quality with a similar performance impact? Awesome work man.
GradFun2DBmod is particularly designed for encode to remove and/or prevent banding.

However you can use it in realtime, the quality will be better but it is slower... It's a tradeoff, I think that the ffdshow deband is faster and good enough for only viewing.


Quote:
Originally Posted by markanini View Post
could you suggest some settings for a deblocking type effect?
Never used for deblocking, but set mask=false and increase gradually thr/str parameters until blocks disappear.
LaTo is offline   Reply With Quote
Old 16th December 2009, 13:35   #53  |  Link
rkalwaitis
Robert
 
Join Date: Jan 2008
Location: Stuttgart
Posts: 407
Thanks for the update Lato.
rkalwaitis is offline   Reply With Quote
Old 29th December 2009, 02:16   #54  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,364
The filter only works in certain points of the filter chain. I dont know if Im doing something wrong. Here is an example where it doesnt work for me:

Code:
ffmpegsource("whatever.mp4")

trim(0, 900)

Tweak(sat=1.2, coring=false)
Levels(4, 0.96, 242, 0, 255, coring=false)

tnlmeans(ax=4,ay=4,az=10,sx=2,sy=2,bx=1,by=1,sse=false)
# GradFun2DBmod(thr=1.6,thrC=1.2,str=0,strC=0,radius=3,range=3,mode=2,temp=-1,mask=true,adapt=64) #here it works
Lanczos4Resize(858, 482)

ttempsmooth(maxr=7)
AddBorders(4,2,4,2,color=$000000)
mfToon(strength=0, sharpen=true, cwarp=false, wdepth=15, wblur=1, wthresh=0.5)
LimitedSharpenFaster(Smode=4, strength=20, edgemode=1, soft=-1)
Crop(6, 2, -6, -4)
GradFun2DBmod(thr=1.6,thrC=1.2,str=0,strC=0,radius=3,range=3,mode=2,temp=-1,mask=true,adapt=64) # here it has no effect
Although if I place it just before the resizer it does work. Its strange... And its not only in a certain video, it happens in others as well.
Dogway is offline   Reply With Quote
Old 29th December 2009, 03:41   #55  |  Link
Stephen R. Savage
Registered User
 
Stephen R. Savage's Avatar
 
Join Date: Nov 2009
Posts: 327
GradFun2DB, which is the key filter underlying all of GradFun2DBmod, fails silently if the input width is not divisible by 8. After cropping, you have a width of 846, which is not divisible by 8 (nor by 4). What should be done is that the mirroring stage of GradFun2DBmod be changed to pad to a mod8 width.

Alternatively, you could crop/resize to width 840 or 848 instead of 846.

Edit: I missed the AddBorders call. The width in that script is 860, so the point still stands.

Last edited by Stephen R. Savage; 29th December 2009 at 23:19.
Stephen R. Savage is offline   Reply With Quote
Old 29th December 2009, 08:34   #56  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Stephen R. Savage View Post
GradFun2DB, which is the key filter underlying all of GradFun2DBmod, fails silently if the input width is not divisible by 8. After cropping, you have a width of 846, which is not divisible by 8 (nor by 4). What should be done is that the mirroring stage of GradFun2DBmod be changed to pad to a mod8 width.

Alternatively, you could crop/resize to width 840 or 848 instead of 846.
Arf, I will add a warning in GF2DBmod
LaTo is offline   Reply With Quote
Old 29th December 2009, 09:03   #57  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Update 2009/12/29 (v1.5)

v1.5:
added MOD4 restriction
changed script to accept MOD8 clip
updated documentation



Last edited by LaTo; 30th December 2009 at 10:59.
LaTo is offline   Reply With Quote
Old 29th December 2009, 16:51   #58  |  Link
Stephen R. Savage
Registered User
 
Stephen R. Savage's Avatar
 
Join Date: Nov 2009
Posts: 327
That is unnecessary. Enabling GradFun2DBmod to work on mod2 and mod4 (width) video is as simple as a two line fix. Also, I think GF_Padding is the only edge protection mode necessary. It offers better performance than GF_Mirrors at the corners while still being faster. GF_Borders doesn't actually work (no dithering across sharp black edge), so it doesn't fit either.

Code:
Function GF_Padding(clip clp, float thr, float thrC)
   {
   ow = clp.width
   oh = clp.height
   w = int(round(ow/8.0)*8)  + 32
   h = CLP.height() + 32
   
   RDY   = CLP.pointresize(w,h,-16,-16,w,h)

   LUM = RDY.gradfun2db(thr).Crop(16,16,ow,oh)
   CHR = RDY.gradfun2db(thrC).Crop(16,16,ow,oh)

   GFP = thr==1.0 && thrC==1.0 ? CLP
   \   : thr==thrC             ? LUM
   \   : thr!=1.0 && thrC==1.0 ? LUM.mergechroma(CLP)
   \   : thr==1.0 && thrC!=1.0 ? CLP.mergechroma(CHR)
   \   :                         LUM.mergechroma(CHR)

   Return GFP
   }
I think this can be worked into the other modes, but I'll leave that for you to do.
Stephen R. Savage is offline   Reply With Quote
Old 30th December 2009, 03:43   #59  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,364
Thank you Stephen. I spent a lot of time trying to figure out.

Being mod 8 isn't too strict? limiting to 848 pixels width either messes up the AR, or I have to crop 3 pixels each side.

I normaly prefer pixel to pixel sampling with no scaling involved, I wouldn't mind encoding anamorphic unless desktop divx players respect custom AR(?)(ie. 848x480 vs 720x480)

sorry for the offtopic bit.
Dogway is offline   Reply With Quote
Old 30th December 2009, 11:05   #60  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Stephen R. Savage View Post
That is unnecessary. Enabling GradFun2DBmod to work on mod2 and mod4 (width) video is as simple as a two line fix.
Yes, you're right indeed... So, now it accepts mod4 input.

Quote:
Originally Posted by Stephen R. Savage View Post
Also, I think GF_Padding is the only edge protection mode necessary. It offers better performance than GF_Mirrors at the corners while still being faster. GF_Borders doesn't actually work (no dithering across sharp black edge), so it doesn't fit either.
Yes, it's why GF_Padding (mode=2) is the default mode





/!\ I HAVE UPDATED THE SCRIPT FOR MOD4 INPUT
YOU SHOULD DOWNLOAD AGAIN THE V1.5 /!\
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 03:12.


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