digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   SansGrip Filters: Improve picture quality using "AddNoise" Filter (http://www.digitalfaq.com/archives/avisynth/1510-sansgrip-filters-improve.html)

SansGrip 11-13-2002 01:49 PM

Quote:

Originally Posted by kwag
Here's my latest test with Blockbuster AND NoMoSmooth filters, also from SansGrip. @SansGrip, I can't thank you enough ;)

And I in turn am very grateful for your extensive testing. I'm glad you're playing with NoMoSmooth now -- I think it's got great potential, even though I've not had much feedback on Doom9.

Quote:

Originally Posted by kwag
This is an excelent sample showing the removal of DCT blocks on the background. Look carefully at the background wall.

Yes, the filtered version is much better. I still find it a little too sharp on my monitor, but I'm guessing it's much less noticible when viewed on a TV. I'm going to have to burn a disc with these test clips of yours :).

Quote:

Originally Posted by kwag
Also, look at the file size difference after applying the NoMoSmooth filter.

In future tests would you be able to do one more encode, with just NoMoSmooth and no Blockbuster? I'm very curious to know how much NoMoSmooth helps compression.

Quote:

Originally Posted by kwag
It's a combination of Temporal and Spatial filter. So you may now discard TemporalSmoother and (probably) Convolution3D 8)

I've not used either since, though NoMoSmooth still has a way to go and needs a lot of testing to get it as good as possible with really useful parameters. It has its own Doom9 thread, in case people want to check it out.

Quote:

Originally Posted by kwag
I made some changes ( Expect many changes, until I find the optimal settings, but we're close ;) )

You'll want to play with the NoMoSmooth parameters some. Since it's received such little testing I don't even know how much the motion threshold needs to be varied from source to source, but I'm fairly sure the temporal_* and spatial_* parameters will need to be changed depending on the noise level of the source material.

I'm hoping that a set of "standard" values will be agreed upon which can then be incorporated into a C3D-style preset parameter.

Quote:

Originally Posted by kwag
I also used the default value of 1 for luminance, instead of 1.5, as I had posted before.

From the latest clip I'd say this is still a tiny bit too much, since there's still quite a bit of movement in the wall. I've found that with very careful tweaking of the variances one can eliminate the DCT blocks while minimizing noticible movement. But obviously this is something that depends very much on the source material.

Quote:

Originally Posted by kwag
Feedback welcome 8)

Very impressive stuff. I had no idea Blockbuster would be this effective when I started writing it :D.

Thanks again for your persistence. Testers like yourself really make it easier for the developer to improve the code, and knowing someone is testing the limits of the filter makes one actually want to stare at the source for a dozen more hours improving it :).

SansGrip 11-13-2002 01:57 PM

Quote:

Originally Posted by Holomatrix
Sorry to interject, but why do you use BiLinear resize and not the new Lanczos?

You might be interested in this post on Doom9, in which I compare the range compression of various resizers. These results suggest that it might be best always to use Lanczos then achieve the desired softening through a separate filter.

On the other hand I respect Kwag's opinion greatly, and I tend to believe him when he suggests that perceived quality is superior with bilinear and a selective sharpen.

Holomatrix 11-13-2002 01:58 PM

Ok, thanks. This is the script I am going to try in DVD2SVCD:
[AVISYNTH_BlockbusterBilinearResizeNoMoSmooth]
0=BilinearResize(^TargetWidth,^TargetHeight)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=LoadPlugin(!Blockbuster.dll)
3=LoadPlugin(!NoMoSmooth.dll)
4=Blockbuster( method="noise", detail_min=1, detail_max=3, lv=1.5 )
5=Blockbuster( method="sharpen", detail_min=4, detail_max=99,
strength=^StrengthValue )
6=NoMoSmooth()
!Blockbuster.dll=C:\Program Files\DVD2SVCD\Blockbuster\Blockbuster.dll
^StrengthValue=20
!NoMoSmooth.dll=C:\Program Files\DVD2SVCD\NoMoSmooth\NoMoSmooth.dll

Should I put some values in for NoMoSmooth or just leave as is?
Thanks

SansGrip 11-13-2002 02:01 PM

Quote:

Originally Posted by black prince
I use lanczosResize and didn't realize this was happening. I am going to switch to bilinearResize. 8O

Lanczos provides the same kind of sharpness achieved with a bicubic 0/0.75 but mostly without the sometimes very evident artifacts. That said it can still be too much on occasion, especially when the source is very sharp to begin with.

You might also want to try a compromise, such as bicubic 0/0.5 or 0.33/0.33. The latter was declared "most preferred" after tests conducted by the algorithm designers on human subjects ;).

black prince 11-13-2002 02:47 PM

Hi SansGrip,

SansGrip wrote:
Quote:

Lanczos provides the same kind of sharpness achieved with a bicubic 0/0.75 but mostly without the sometimes very evident artifacts. That said it can still be too much on occasion, especially when the source is very sharp to begin with.

You might also want to try a compromise, such as bicubic 0/0.5 or 0.33/0.33. The latter was declared "most preferred" after tests conducted by the algorithm designers on human subjects .
My encodes with lanczosresize and blockbuster-noise-sharpen may be why
my picture quality seems too sharp. Since I encode from DVD source
720x480 shouldn't I use bilinearResize going to 352x240? I believe
bilinearResize and Blockbuster-noise-sharpen produce a more pleasing
picture image in my opinion. :) NoMoSmooth is using default settings, so
I'll wait for Kwag to tweak this filter. 8)

-black prince

Holomatrix 11-13-2002 03:05 PM

Ok, ran my test clip, looks good but I see to much Mosquito noise, should I make a change to my script? or add the UnDot filter?
Thanks

kwag 11-13-2002 03:55 PM

Quote:

Originally Posted by Holomatrix
Ok, ran my test clip, looks good but I see to much Mosquito noise, should I make a change to my script? or add the UnDot filter?
Thanks

What template did you use? What resolution? CQ_VBR value?

-kwag

Holomatrix 11-13-2002 05:45 PM

Shoot, sorry, I ran it through DVD2SVCD and used CCE, forgot to change the encoder to TMPEG. I will set it up using your LBR 352 X 480 (CVD) template settings and see how it goes. By the way would these settings work with your 1 CD 704 X 480 settings? I loved the sharpness and crispness I got with this template but ofcourse lots of blocks. Would these filters remove the blocks but keep the sharpness at this resoulution?
Thanks

kwag 11-13-2002 06:11 PM

Quote:

Originally Posted by Holomatrix
Shoot, sorry, I ran it through DVD2SVCD and used CCE, forgot to change the encoder to TMPEG. I will set it up using your LBR 352 X 480 (CVD) template settings and see how it goes. By the way would these settings work with your 1 CD 704 X 480 settings? I loved the sharpness and crispness I got with this template but ofcourse lots of blocks. Would these filters remove the blocks but keep the sharpness at this resoulution?
Thanks

You'll see blocks only on high speed scenes on the 704x480, depending on your source. But with the filter, it works a lot better. If your DVD player supports bitrates around 3,000Kbps, go ahead and change the MAX bitrate to 3,000-3,500 and you'll get a blockless picture. Maybe a tweak on the spatial parameters on the NoMoSmooth filter would help to blurr high speed motion, and make the blocks unnoticeable :idea:
I'm playing with that as we speak ;)

-kwag

jorel 11-13-2002 09:28 PM

@ Kwag:

Kwag wrote:

Here's the script I used for the sample:

LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\nomosmooth.dll")
LoadPlugin("C:\encoding\blockbuster.dll")
mpeg2source("K:\TEST\VIDEO_TS\movie.d2v")
BilinearResize(336,192,45,0,630,480)

NoMoSmooth()

######## Auto Strength, proportional strength depending on resolution #####
## Remove only one "#" on front of the resolution that matches your encoding.


BB_Resolution = 352*240
#BB_Resolution = 352*480
#BB_Resolution = 528*480
#BB_Resolution = 544*480
#BB_Resolution = 704*480

BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)
Blockbuster( method="noise", detail_min=1, detail_max=10, lv=1 ) # Apply noise if complexity is <= 10%.
Blockbuster( method="sharpen", detail_min=20, detail_max=90, strength=StrengthValue) # Sharpen only if complexity is >= 20% AND <=90%.

##
################## End Auto Strength ####################

AddBorders(8,24,8,24)


I made some changes ( Expect many changes, until I find the optimal settings, but we're close )
If you look at the script, I changed the "noise" method to feed noise up to a complexity level of 10. I also used the default value of 1 for luminance, instead of 1.5, as I had posted before. Then I changed the "sharpen" method to start at a complexity level of 20. Why?, because we don't want to sharpen low lit things close to the boundaries of the DCT blocks on dark scenes. So I started the sharpen filter from 20 up to 90, and left the last ~10% ( 91 to 99 ) untouched. Why?, so that the sharpest edges, highest frequencies, don't get sharpened at all. So this should kill some high frequency "Mosquito Effect"

Feedback welcome


how can i "turn" this to load in dvd2s(K)vcd?
and
how can i load the new templates in dvd2s(K)vcd?

:?
thanks in advance! :wink:

kwag 11-13-2002 10:03 PM

Quote:

Originally Posted by jorel
how can i "turn" this to load in dvd2s(K)vcd?
and
how can i load the new templates in dvd2s(K)vcd?

:?
thanks in advance! :wink:

Not sure if DVD2SVCD can do computations, like in avisynth. You're going to have to edit the "dvd2svcd.ini" file, and add a section for your filters.

-kwag

LadyMiles 11-13-2002 10:42 PM

For some reason I haven't been able to download your test samples. I keep getting bad link errors i.e. "The page cannot be displayed"

In any case are you using your monitor as the quality standard ? With one of your old scripts from yesterday, fiddler on the roof looked okay on my monitor but great on my tv, except in a few dark areas (a lot of blocks on a sun rising scene) . Also that annoying periodic speed up or slow down thing with my dvd player stopped, is that due to the new GOP structure ?
I think I am going to try your new filters on crouching tiger hidden dragon.

kwag 11-13-2002 10:49 PM

Hi LadyMiles,

Are you trying to download the samples from this thread? http://www.kvcd.net/forum/viewtopic....r=asc&start=30

I just tried, with "Right Click, save as..." on a link, and it works.

-kwag

jorel 11-13-2002 11:12 PM

Quote:

Originally Posted by kwag
Quote:

Originally Posted by jorel
how can i "turn" this to load in dvd2s(K)vcd?
and
how can i load the new templates in dvd2s(K)vcd?

:?
thanks in advance! :wink:

Not sure if DVD2SVCD can do computations, like in avisynth. You're going to have to edit the "dvd2svcd.ini" file, and add a section for your filters.

-kwag

ok Kwag ,but
this script i can't make.
it's confuse for me.

VILLA21 11-14-2002 02:52 AM

jorel
"...ok Kwag ,but
this script i can't make.
it's confuse for me..."

It"s already posted by Dagaar on page 5 of this thread. Have a look there... :)

jorel 11-14-2002 06:02 AM

Quote:

Originally Posted by VILLA21
jorel
"...ok Kwag ,but
this script i can't make.
it's confuse for me..."

It"s already posted by Dagaar on page 5 of this thread. Have a look there... :)


ok,thanks,
but what about this posted by Kwag?

BB_Resolution = 352*240
#BB_Resolution = 352*480
#BB_Resolution = 528*480
#BB_Resolution = 544*480
#BB_Resolution = 704*480
BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)
Blockbuster( method="noise", detail_min=1, detail_max=10, lv=1 ) # Apply noise if complexity is <= 10%.
Blockbuster( method="sharpen", detail_min=20, detail_max=90, strength=StrengthValue) # Sharpen only if complexity is >= 20% AND <=90%.


how can i put this it in the script?
it's possible?
thanks in advance! :wink:

VILLA21 11-14-2002 08:31 AM

jorel,
BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)

The above 2 lines calculate the right Strength value for a given resolution.
Eg for 352x240 it"s 20.
Calculate this value manually for your resolution and set it in the Frameserver tab.

LadyMiles 11-14-2002 05:05 PM

anime
 
Is blockbuster good for anime ? If not what filters should be used.

SansGrip 11-14-2002 06:47 PM

Re: anime
 
Quote:

Originally Posted by LadyMiles
Is blockbuster good for anime ? If not what filters should be used.

I've never encoded anime, but my tentative guess is if there's blocks in the encode it might work -- maybe with different settings.

I have a pretty strong hunch it would work well on solid-colour cartoons, though.

Holomatrix 11-14-2002 11:08 PM

Quote:

Originally Posted by VILLA21
jorel,
BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)

The above 2 lines calculate the right Strength value for a given resolution.
Eg for 352x240 it"s 20.
Calculate this value manually for your resolution and set it in the Frameserver tab.

How do I Calculate the value? What would my script look like, using that whole script, for a 352 X 480 resolution?


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.