Quantcast Avisynth: Motion Adaptive Filtering Now Possible? - Page 6 - digitalFAQ.com Forums [Archives]
  #101  
05-29-2003, 07:01 AM
DKruskie DKruskie is offline
Free Member
 
Join Date: May 2003
Location: Michigan
Posts: 147
Thanks: 0
Thanked 0 Times in 0 Posts
I have to agree with jellygoose..It's awesome!!..Great job Kwag

David
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
  #102  
05-29-2003, 07:24 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Back again...
Ok this new filter chain just throws me off my chair... The CQ value actually didn't raise too much, for me (by 1.6 points), but it seemed to be a lot sharper throughout the movie...
I'm currently testing "TemporalCleaner" against "TemporalSoften", while I'm using a very low y-Threshold, and a rather high c-Threshold!
I'll let you know the results!
__________________
j3llyG0053
Reply With Quote
  #103  
05-29-2003, 08:14 AM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@All,

Kawg wrote:
Quote:
Here you go guys
www.kvcd.net/small-adaptive-sampler.mpg (10 second clip)
That's what the complete movie looks like on one CD-R
That movie is 96 minutes long, and it was encoded at 528x480 and @CQ=71.2 with the current script ( For AviSynth 2.5x )

-kwag
I enjoyed the small clip, but the link to the full clip won't work. I'll
try to load avisynth 2.51 this evening and see if I have problems.
I stayed away from this because of 2.51, but this too good to
ignor. It would be very nice to have this as avisynth v2.08
Wonder what BV shows against a video using adapative vs the
way it's done now. Maybe a comparison of frames showing
how targeting has really improved picture quality There's a lot
to discover here

-bp
Reply With Quote
  #104  
05-29-2003, 08:37 AM
DorvalCS DorvalCS is offline
Free Member
 
Join Date: Dec 2002
Location: Montreal, Canada
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to DorvalCS
Hi Friends! Need Some help.

I have loaded AviSynth 2.5 (latest version)
Created a Script using Kwag's latest.

But when I try to load in Tmpgenc, it tells me that my file is not supported. When I load the script in VirtualDub I get this error message:
"Couldn't locate decompressor for format YV12"

Here is a copy of my Script:

LoadPlugin("C:\Filters2_5\MPEG2Dec3.dll")
LoadPlugin("C:\Filters2_5\STMedianFilter.dll")
LoadPlugin("C:\Filters2_5\UnFilter.dll")

Mpeg2Source("C:\My Documents\My Videos\movie.d2v")

MaxThreshold=1.58

UnFilter(50, 50)
BicubicResize(496, 334, 1/3, 1/3, 4, 0, 712, 480)
STMedianFilter(8, 32, 0, 0 )
TemporalSoften(2,7,7,3,2)
mergechroma(blur(1.50))
## Dynamic linear adaptive filtering ##
ScriptClip("val=YDifferenceFromPrevious()/14.55" + "val > MaxThreshold ? MergeLuma(blur(MaxThreshold)) : MergeLuma(blur( val ))")
##
AddBorders(16, 73, 16, 73)
Limiter()

What am I doing wrong?

Thanks for your help... I can't wait to try this new script...
__________________
DorvalCS
Reply With Quote
  #105  
05-29-2003, 08:48 AM
bman bman is offline
Free Member
 
Join Date: Apr 2002
Posts: 356
Thanks: 0
Thanked 0 Times in 0 Posts
@ All
I see all of us are impressed with adaptive filtering method
According my quest KWAG implement this method on 2 filters MergeLuma and BlockBuster .
Thanx him for that !!!
I didn't made tests yet and can't say how much compression new filter can add to mpg but IF IT'S RIGHT and it helps to get higher compression then - WHY DON'T try adaptive on WHOLE SCRIPT( I mean without resizing and SUBS ) .
If its working on 2 filters then maybe it could be accomplish on all others in the script
What do u think ? It could be worked out KWAG
Just an idea (maybe a stupid one )
bman
Reply With Quote
  #106  
05-29-2003, 09:04 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts

i need some help ,

please, a full script posted here will be great....
i got errors like DorvalCS.

thanks in advance!
Reply With Quote
  #107  
05-29-2003, 09:42 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
Quote:
Originally Posted by bman
I didn't made tests yet and can't say how much compression new filter can add to mpg but IF IT'S RIGHT and it helps to get higher compression then - WHY DON'T try adaptive on WHOLE SCRIPT( I mean without resizing and SUBS ) .
Hi bman,

Yes, I mentioned this earlier in the thread, to incude filters that we can "plug" for different conditions. Some filters will need "static" values ( like temporal filters ) throughout the movie, unless sh0dan gives us a function similar to YDifferencefromPrevious, that instead of reporting a value change for activity, gives us a value change for "noise" activity per frame ( Hello sh0dan )
Another thing I thought of last night was that instead of reporting the activity on a per-frame basis, divide the frame in a 16x16 array or so, and then the difference from previous frames would return a quadrant of information Then when adaptive filtering is used, it can also be applied selectively to each "quadrant". For example, you are watching a scene where the top half of the picture is a still sharp backgroung, and the bottom half is cars driving by (fast action). Right now, there would be an average of blur added to the complete frame, because it's the average applied from the value returned by the motion. With the quadrant approach, the blur would apply ONLY to the bottom area of the scene, and leave the top part untouched So imaging that with this method, we could apply say a hight mergeluma to the bottom half of the screen, then the right top quadrants if it was pitch dark, we could apply some level of BlockBuster noise and if the left top quadrant doesn't need any filters, then that area is left alone. So we would have "Hybrid Adaptive Filtering"
Maybe I'm asking too much, but if the function hooks are developed in AviSynth, then it's just a matter of plugging our filters either on a "frame level" or on a "quadrant level" per frame. The possibilities we could get with this would be just amazing

@sh0dan,
Comments on this

-kwag
Reply With Quote
  #108  
05-29-2003, 09:58 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Kwag, I thought about the exact same thing this morning...
I thought this would be a lot to complicated in a way...
Am I right, that this procedure of analyzing every square in a frame would take a LOT of time?
However, it sounds extremely good, and I'm definately looking forward to further developments...
Well you're right about the TemporalFilters, but STMedianFilter as a Spatial Filter (at least that's how WE use it) can still be adjusted to the amount of motion in a frame right?
__________________
j3llyG0053
Reply With Quote
  #109  
05-29-2003, 10:02 AM
ARnet_tenRA ARnet_tenRA is offline
Free Member
 
Join Date: Jan 2003
Location: Illinois, USA
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Another thing I thought of last night was that instead of reporting the activity on a per-frame basis, divide the frame in a 16x16 array or so, and then the difference from previous frames would return a quadrant of information Then when adaptive filtering is used, it can also be applied selectively to each "quadrant".
Here is a way to do it Kwag. I am sure you can optimize it more. I have added the GreyScale filter to show how each section is getting a different filter. Of course you can filter any way you want.
Code:
AviSource(" -Your movie here.- ")

aa=Crop(0*width/4,0*height/4,1*width/4,1*height/4).GreyScale()
ab=Crop(1*width/4,0*height/4,1*width/4,1*height/4)
ac=Crop(2*width/4,0*height/4,1*width/4,1*height/4).GreyScale()
ad=Crop(3*width/4,0*height/4,1*width/4,1*height/4)
ba=Crop(0*width/4,1*height/4,1*width/4,1*height/4)
bb=Crop(1*width/4,1*height/4,1*width/4,1*height/4).GreyScale()
bc=Crop(2*width/4,1*height/4,1*width/4,1*height/4)
bd=Crop(3*width/4,1*height/4,1*width/4,1*height/4).GreyScale()
ca=Crop(0*width/4,2*height/4,1*width/4,1*height/4).GreyScale()
cb=Crop(1*width/4,2*height/4,1*width/4,1*height/4)
cc=Crop(2*width/4,2*height/4,1*width/4,1*height/4).GreyScale()
cd=Crop(3*width/4,2*height/4,1*width/4,1*height/4)
da=Crop(0*width/4,3*height/4,1*width/4,1*height/4)
db=Crop(1*width/4,3*height/4,1*width/4,1*height/4).GreyScale()
dc=Crop(2*width/4,3*height/4,1*width/4,1*height/4)
dd=Crop(3*width/4,3*height/4,1*width/4,1*height/4).GreyScale()

StackVertical(StackHorizontal(aa,ab,ac,ad),StackHorizontal(ba,bb,bc,bd),StackHorizontal(ca,cb,cc,cd),StackHorizontal(da,db,dc,dd))
Regards, Tenra
Reply With Quote
  #110  
05-29-2003, 10:17 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
Thanks Tenra,

That will sure divide the picture in slices fine, but we still need activity "per slice" from previous frames
That would be the only way to apply selective filtering on a "slice", based on activity from the previous "slices" on prior frames.

-kwag
Reply With Quote
  #111  
05-29-2003, 10:37 AM
bman bman is offline
Free Member
 
Join Date: Apr 2002
Posts: 356
Thanks: 0
Thanked 0 Times in 0 Posts
@ KWAG , @ Tenra
What a BEAUTIFUL MIND , man , BEAUTIFUL MIND !!!!
It's just me or somebody else can smell something extraordinary is cooking here ??!!!
I have no patience to wait and see what will grow up from this
bman
Reply With Quote
  #112  
05-29-2003, 10:49 AM
ARnet_tenRA ARnet_tenRA is offline
Free Member
 
Join Date: Jan 2003
Location: Illinois, USA
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Thanks Tenra,

That will sure divide the picture in slices fine, but we still need activity "per slice" from previous frames
That would be the only way to apply selective filtering on a "slice", based on activity from the previous "slices" on prior frames.

-kwag
I know. I am working on just that. I thought I would put this out there to get everyone's creative juices flowing.

Regards, Tenra
Reply With Quote
  #113  
05-29-2003, 11:01 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
Quote:
Originally Posted by ARnet_tenRA
I know. I am working on just that. I thought I would put this out there to get everyone's creative juices flowing.
Oh yes , we're all peeing on our pants right now Can't contain our emotions

-kwag
Reply With Quote
  #114  
05-29-2003, 11:04 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
Quote:
Originally Posted by bman
It's just me or somebody else can smell something extraordinary is cooking here ??!!!
No, it's not only you , my oven (memory) is in "broil" right now

-kwag
Reply With Quote
  #115  
05-29-2003, 11:10 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
I can't believe no one of us had this kind of idea earlier...
It sounds so simple and logical to me...
brilliant
__________________
j3llyG0053
Reply With Quote
  #116  
05-29-2003, 11:13 AM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Quote:
Originally Posted by jorel

i need some help ,

please, a full script posted here will be great....
i got errors like DorvalCS.

thanks in advance!
@ kwag, You guy are almost in California and we still here in florida.
can you post a sample script that is ready to cut and paste so we can have a better idea more or less how this works, I know What the Linear Adaptive Script is suppose to do, i just dont know how it works I dont have a programmer's mentallity so it will take 4 me more time to understand.
sorry to be a pain in the a..

thanks again

## Dynamic linear adaptive filtering ##
ScriptClip("val=YDifferenceFromPrevious()/14.55" + "val > MaxThreshold ? MergeLuma(blur(MaxThreshold)) : MergeLuma(blur( val ))")
##
Reply With Quote
  #117  
05-29-2003, 11:17 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
One of the BEST things I like of this, is that there are virtually no blocks on high speed motion
Because of the heavy blur on high speed pannings, what the encoder "sees" is a a frame with no sharp edges at all, and the result is that there are barely any visible blocks seen This brings me to another question: Maybe we don't need 2,300Kbps for MAX bitrate
Maybe we can drop the MAX to ~2000Kbps, and increase our play time per media
I'll have to try this

-kwag
Reply With Quote
  #118  
05-29-2003, 11:24 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
Here's the script I used for the sample:

Code:
LoadPlugin("C:\Filters25\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\STMedianFilter.dll")
LoadPlugin("C:\Filters25\UnFilter.dll")
LoadPlugin("C:\Filters25\BlockBuster.dll")

Mpeg2Source("K:\VIDEO_TS\project.d2v")

MaxThreshold=1.58

UnFilter(50, 50)
BicubicResize(528, 368, 0, 0.6, 16, 0, 688, 480)
STMedianFilter(8, 32, 0, 0 )
TemporalSoften(2,7,7,3,2)
mergechroma(blur(1.50))

### Dynamic Adaptive Filtering ###
val=0 # Initialize our motion variable.
N="noise"

FrameEvaluate("val=YDifferenceFromPrevious()/14.55") # Assign "val" with difference between current frame and last frame.
ScriptClip("val > MaxThreshold ? MergeLuma(blur(MaxThreshold)) : MergeLuma(blur( val )) ") # Adaptive mergeluma.
AddBorders(0, 56, 0, 56)
LetterBox(16, 16, 16, 16)
Limiter()
Reply With Quote
  #119  
05-29-2003, 11:34 AM
sbin sbin is offline
Free Member
 
Join Date: May 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Man, I go away for a couple of days and you guys just tear everything up.
Reply With Quote
  #120  
05-29-2003, 12:18 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
I'm going nowhere fast!

"Blockbuster.dll is not an Avisynth 2.5 plugin"
"STMedianFilter.dll is not an Avisynth 2.5 plugin"
"I don't know what subblur means"
"Unfilter.dll is not an Avisynth 2.5 plugin"

i installed Avisynth 2.51 build May 21, 2003
and the filters are for 2.5x

help!!
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Dynamic Linear Adaptive Filtering and Scene Change Detection supermule Avisynth Scripting 3 09-15-2006 01:45 AM
Avisynth: Message from linear motion adaptive filtering? holgerschlegel Avisynth Scripting 7 08-27-2003 04:08 AM
Avisynth: Help with Linear Motion Adaptive Filtering pitoman Avisynth Scripting 2 08-05-2003 12:51 PM
Avisynth: Motion adaptive filtering good enough? bicho_visacoso Avisynth Scripting 6 06-15-2003 06:30 AM
Avisynth: AVS 2.5x Script, Motion Adaptive Filtering problems? Bchteam Avisynth Scripting 15 05-31-2003 12:38 PM

Thread Tools



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