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)

black prince 11-10-2002 10:59 AM

Hi Kwag,

Kwag wrote:
Quote:

kwag Posted: Sun Nov 10, 2002 11:30 am Post subject:

--------------------------------------------------------------------------------

A high contrast scene, made with KVCDx3, using a CQ_VBR value of 15.5 to save space, using the same filter parameters of the previous post:

http://mpeg.0catch.com/test4-sharp-noise.m1v
http://mpeg.0catch.com/test4-nofilter.m1v

-kwag
I never created a KVCDx3 using CQ_VBR below 25. Your test clips
looked great for CQ = 15.5. I was hoping that by targeting certain
problems using noise, the CQ could be lowered enough to have the
file size still remain small. When there is some layman's explainations
during discussions between you and SansGrip, it's very exciting. :D
The sample with sharp-noise filters are still hard for me to believe
you did this with CQ=15.5. 8O I just hope you have as much success
with mosquito noise as the others. :D

-black prince

kwag 11-10-2002 11:57 AM

Corrections.
 
Correction on the filter syntax I was using:

Blockbuster(method="sharpen", detail_threshold=20, Invert=True, strength=20) # Only sharpen material above 20%.
Blockbuster(method="noise", detail_threshold=20, lv=1.5) # Only apply noise below 20% complexity.

I had the "sharpen" line calling a "lv=2" which is an incorrect parameter name for the "sharpen" method.

Anyone trying out the filters, please make the corrections above.

@black prince,
The cleanup of the mosquitoes and flies is the only thing really missing to make MPEG-1 better than what it is now :D

-kwag

SansGrip 11-10-2002 12:10 PM

Re: Blockbuster sharpen + noise ( Low pass, high pass filter
 
Quote:

Originally Posted by kwag
Quote:

Originally Posted by SansGrip
Bear in mind that increasing the frequency of already high-frequency information will probably result in more mosquito noise. It's not evident in that clip because of the overall low luma levels, but you might want to look for it in day-time sections of the movie.

Exactly. On high luma, the noise filter will not be injecting noise, because the scenes will be above the treshold of 20, so the noise filter will be inactive. But the sharpen filter will be active.

And the sharpening filter will still be increasing the frequency, by amplifying existing detail instead of adding noise. Hence you might see more mosquito noise.

Quote:

Originally Posted by kwag
The lv=10 on the sharpen line

The lv parameter has no effect with the sharpen method -- it controls the variance of the random number generator when using the noise method. To adjust the degree of sharpening, use the "strength" parameter.

I'm about to release a new version with a couple of added features, and it will also check the parameters are correct for the current method.

Quote:

Originally Posted by kwag
Your idea of a MIN and MAX treshold specifier is great, because that would allow a "Dynamic Window" to be adjusted to the frequency domain of the "Mosquito Effect"

Ok, I'll implement that in the new version before I release it.

Quote:

Originally Posted by kwag
the only way to filter that would be to have a king of "Parametric Equalizer" ( similar to what's used on audio equipment ) kind of filter, in order to notch out each block of noise area. What do you think of that :idea:

I think that sounds complicated ;). We'll see whether the min/max idea will be able to target it first...

SansGrip 11-10-2002 01:41 PM

New version
 
I just released 0.4 (and source) with the following changes:

* Added luma_offset and luma_threshold parameters
* Split detail_threshold into detail_min and detail_max
* Removed redundant invert mode

See the documentation for more info.

Have fun :).

kwag 11-10-2002 01:45 PM

Gee thanks SansGrip :D

-kwag

kwag 11-10-2002 02:01 PM

So now it would read something like this:

Blockbuster(method="sharpen", detail_min=60, detail_max=99, strength=20) # Only sharpen material above 60%.
Blockbuster(method="noise", detail_min=1, detail_max=20, lv=1.5) # Only apply noise below 20% complexity.


And that would apply noise to material below ~20%, leave the mid frequencies from ~20% to ~60% unsharpened, and apply sharpenning from ~60% to the highest frequencies :)

And for what I can see, if we can find the frequency of the "Mosquito Effect" maybe a method=blur with a tight min,max focusing on the noise, would blend only the mosquito frequencies :idea:

Excelent work SansGrip :)

-kwag

SansGrip 11-10-2002 02:21 PM

Quote:

Originally Posted by kwag
And that would apply noise to material below ~20%, leave the mid frequencies from ~20% to ~60% unsharpened, and apply sharpenning from ~60% to the highest frequencies :)

Yep :).

Quote:

Originally Posted by kwag
And for what I can see, if we can find the frequency of the "Mosquito Effect" maybe a method=blur with a tight min,max focusing on the noise, would blend only the mosquito frequencies :idea:

Bear in mind that, while it's a close (and fast) approximation, counting the number of unique luma levels in a block is not quite the same as determining the block's frequency. That would require more complicated code (I'd have to do a Fast Fourier Transform on the data just like an encoder does) and is something I'm trying to avoid if this method works just as well.

WRT mosquito noise (otherwise known as the Gibbs Effect, which I learned thanks to the link on artifacts from LadyMiles), it tends to occur at the boundaries between low- and high-frequency areas rather than be associated with a particular level of detail, so my hopes aren't high that this filter will be able to combat it in any targeted manner.

I think the main result of blurring high-detail areas would be, well, loss of detail. If it does reduce mosquito noise that would in my opinion be a side-effect. To carry on the mosquito analogy, it's akin to throwing a bucket of pesticide at a swarm of them. Sure, it'll kill a few (or even most) of them, but has very undesirable consequences for whatever the excess lands on ;).

What I think would be most effective is a seperate filter to blur high-frequency parts only around edges. I'm going to think about it for a while and might add that to my TODO list :).

Incidentally, do you have any clips (say, <20mb) that demonstrate bad mosquito noise? If I can see the worst-case scenario I might be able to pin down a solution more easily.

kwag 11-10-2002 02:37 PM

Quote:

Originally Posted by SansGrip

What I think would be most effective is a seperate filter to blur high-frequency parts only around edges. I'm going to think about it for a while and might add that to my TODO list :).

You've got a strong point there :)
Quote:

Incidentally, do you have any clips (say, <20mb) that demonstrate bad mosquito noise? If I can see the worst-case scenario I might be able to pin down a solution more easily.
I will make one specifically for you and give you a download link :wink:

-kwag

kwag 11-10-2002 03:10 PM

@SansGrip,

Please check your private messages :!:

-kwag

black prince 11-10-2002 04:22 PM

Hi Kwag and SansGrip,

With regards to Gibbs effect will UnDot have this effect:

Quote:

UnDot is a simple median filter for removing dots, that is stray orphan pixels and
mosquito noise. It basicly just clips each pixel value to stay within min and max
of its eight surrounding neigbors.


USAGE - To use it just:

1) Place the UnDot.dll in a directory somewhere. You can get it from
www.trbarry.com/UnDot.zip

2) In your Avisynth file use commands similar to

LoadPlugin("F:\UnDot\UnDot.dll")
Avisource("D:\wherever\myfile.avi")
UnDot()
-black prince

SansGrip 11-10-2002 05:36 PM

Quote:

With regards to Gibbs effect will UnDot have this effect
Well, the author (Tom Barry) says it does and I respect his opinion greatly. He's been writing filters and working with video far longer than I.

However, the question is does he mean existing mosquito noise, or areas of potential mosquito noise? I would imagine he means the former, whereas we want a proactive filter to somehow stop them happening in known trouble spots.

black prince 11-10-2002 06:39 PM

@SansGrip,

SansGrip wrote:
Quote:

Well, the author (Tom Barry) says it does and I respect his opinion greatly. He's been writing filters and working with video far longer than I.

However, the question is does he mean existing mosquito noise, or areas of potential mosquito noise? I would imagine he means the former, whereas we want a proactive filter to somehow stop them happening in known trouble spots.
Yes your right. He mentions in some of his posts about the source
being Divx (avi). I have a feeling this problem is the encoder formulas
that fail to detect this between scene changes. Writting a new encoder is
work. My test so far with the Blockbuster filter settings made by you and
Kwag have produced excellent mpeg-1(LBR) video using only cq = 16. It looks
better than my video without filters at cq = 25. They both suffer from the
same amount of Gibbs noise. Once a solution is found for Gibbs, I can
drop cq even lower. Thanks for your hard work, Kwag and SansGrip.
Your work with this problem is so exciting, I visit this forum 4 and 5
times a day. :D

-black prince

kwag 11-10-2002 07:03 PM

Quote:

Thanks for your hard work, Kwag and SansGrip.
Your work with this problem is so exciting, I visit this forum 4 and 5
times a day. :D

-black prince
Hey black prince,

Don't thank me :D , it's all the work of SansGrip. I only follow his documents, and put them on practice after analyzing and testing. Send him a virtual beer :lol: ( But just one, because too many will get us a blockbuster filter creating Moire patterns and inverted videos on our clean mpegs :lol: )

-kwag

black prince 11-10-2002 07:24 PM

@SansGrip,

This one's for you guy!!! :D Here's a tall imaginary virtual beer coming up.
Ahhhhhh!! that's was smooth. :P And here's another toast for the queen!!
Ooops, I think I am virtually drunk. Let me get out of here
before the virtual cops catch me. :D and put me in virtual jail.

Thankx SansGrip,

-black prince

SansGrip 11-10-2002 07:59 PM

Once a solution is found for Gibbs, I can drop cq even lower.

I've not done any tests, but my gut tells me this won't be as easy as getting rid of DCT blocks. I'm gonna try, though ;).

SansGrip 11-10-2002 08:02 PM

Quote:

Originally Posted by black prince
Here's a tall imaginary virtual beer coming up.

hehehe thanks, but really I wrote this for myself. I didn't realize there were other people out there looking for a solution too ;).

kwag 11-10-2002 08:07 PM

Quote:

Originally Posted by SansGrip
Once a solution is found for Gibbs, I can drop cq even lower.

I've not done any tests, but my gut tells me this won't be as easy as getting rid of DCT blocks. I'm gonna try, though ;).

Yes. That would be dealing at the macro block level, because low CQ is actually bit rate starvation.
Maybe what is needed is something like a "pre motion estimation filter", sort of, for the encoder :idea: If that makes any sense at all. Just a wild guess :roll: Sort of a software Time Base Corrector ahead of the stream :idea: ( Maybe I'm virtually drunk now :lol: )

-kwag

SansGrip 11-10-2002 08:14 PM

Quote:

Originally Posted by kwag
Maybe what is needed is something like a "pre motion estimation filter", sort of, for the encoder

I think the first thing I'm going to try is edge-constrained blurring, sort of like Donald Graft's MSmooth but in reverse :).

kwag 11-10-2002 08:23 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
Maybe what is needed is something like a "pre motion estimation filter", sort of, for the encoder

I think the first thing I'm going to try is edge-constrained blurring, sort of like Donald Graft's MSmooth but in reverse :).

What about 180 degree phase shifting on macro block boundaries? Thus, cancelling the block edges. Is that a crazy idea 8O
Like duplicate the frame, then phase shift the block edges on one copy, and join the two frames again. The result :?: Don't know. Just another crazy idea :idea:
I know in the analog world that would work fine ( phase cancellation, etc. ). Not sure if it would apply to mpeg encoding :roll:

-kwag

SansGrip 11-10-2002 08:33 PM

Quote:

Originally Posted by kwag
What about 180 degree phase shifting on macro block boundaries? Thus, cancelling the block edges.

I'm not quite sure how a phase shift would be accomplished. Do you know any good links to information?

kwag 11-10-2002 10:50 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
What about 180 degree phase shifting on macro block boundaries? Thus, cancelling the block edges.

I'm not quite sure how a phase shift would be accomplished. Do you know any good links to information?

Never mind SansGrip,

After analyzing this scheme again, I believe that there's no way to play with macro block alignment or anything macro block related, because that's a function that we can't controll externally. It really depends on the motion estimation algo that the encoder uses. At a low CQ value, the encoder doesn't have enough bandwidth to analyze and predict frames to keep up with the movement, and blocks will show everywhere. Your original idea of rounding the edges sounds to me very logical. And that will go into the encoder. So maybe a rounding (anti-aliasing?) algo on edges followed by a slight sharpen is the key. Go for that :)

-kwag

GFR 11-11-2002 07:32 AM

Quote:

Originally Posted by black prince
Hi GFR and Kwag,

I found a filter that effects "mosquitoe noise" called UnDot, BUT it
can only work with avisynth 2.5 alpha release. Bummer!! :x This release
is unstable and for developers. Here's the doc file:

- This version only runs on the Avisynth 2.5 alpha release.

UnDot is a simple median filter for removing dots, that is stray orphan pixels and
mosquito noise. It basicly just clips each pixel value to stay within min and max
of its eight surrounding neigbors.

-black prince

Hi, I guess it's intended for existing mosquitoes, not potential mosquitoes :(

If you can't run this, maybe try the virtualdub Cartoon tool (Flaxen?) I guess it works on a similar principle (median filter) only his objective is to thicken the contours in anime.

The mosquito noise, as I understand it, is a combination of the Gibbs effect AND movement. That is, if you have a sharp edge and limit the bandwith, oscillations appear round the edges that then turn into little blocks. These little blocks are not that bad because they're small. If you look at a still from a mosquito infected sequence you'll think it's problably OK. The biggest problem is when the edge is moving and then the little blocks "move" around them, drawing your attention to them!

Animes are problably the worst sources because 1) all edges are sharp; 2) most areas are "flat" - you don't have complex textures near the edges that can "mask" the little blocks.

If you try selective bluring, remember that the low pass filter you use should not introduce its own spurious oscillations or it will CREATE Gibbs effect.

I was thinking, if you take an algorythm like wavelet denoising and instead of "gating" low level noise you CLIP high level detail, you have sort of a non-linear selective edge bluring, cause you are only limiting the "biggest" edges, and keeping "mild" edges and textures intact. If the clipping function is continuous and smooth, it won't introduce any spurious oscillations (so says theory :)) And the clipping level could be independent for each subband.

black prince 11-11-2002 01:15 PM

Hi All,

Would re-encoding LBR (Blockbuster) --> LBR(UnDot only) to remove
Gibbs effect (mosquito noise) cause too much picture loss? I know this
is not a pratical solution for mosquito noise, but I would like to see how
effective any method would have as a test. If this sounds crazy, post me
about your opinions either way. :)

-black prince

kwag 11-11-2002 02:16 PM

Quote:

Originally Posted by black prince
Hi All,

Would re-encoding LBR (Blockbuster) --> LBR(UnDot only) to remove
Gibbs effect (mosquito noise) cause too much picture loss?

Yes, we would loose, because we would be re-encoding an already compressed file.

-kwag

black prince 11-11-2002 04:04 PM

Hey Kwag,

Quote:

Kwag wrote:
Quote:

black prince wrote:
Hi All,

Would re-encoding LBR (Blockbuster) --> LBR(UnDot only) to remove
Gibbs effect (mosquito noise) cause too much picture loss?

Yes, we would loose, because we would be re-encoding an already compressed file.

-kwag
I know better Kwag. :? Re-encoding will always loose picture quality.
Just anxious about results for Gibbs effect, since everything looks
great so far. My last encode using Blockbuster's filters made the
LBR video come closer to KVCDx3. I compared the x3 version with
LBR and it's very close. LBR suffers from mosquito noise big time.
If and when a solution comes for mosquito noise, my next issue
will be file size to fit one CD. 8)

-black prince

kwag 11-11-2002 04:46 PM

Quote:

Originally Posted by black prince
LBR suffers from mosquito noise big time.
If and when a solution comes for mosquito noise, my next issue
will be file size to fit one CD. 8)

-black prince

It depends on the movie. You might want to tighten the GOP more, for your particular film. Try a GOP of ( 1, 10, 2, 1, 10 ) for high contrast movies or Animes. That will make a huge difference. But remember, some things that look like "Mosquito Effect" on the LBR, actually any 352x240 encode, are not really "Mosquito Effect" it's the actual movie, but specially on far away scenes you'll see more, because what you are really seeing is pixel artifacts. The higher resolution you go, the less artifacts, because there are more pixels on the screen. So a lot of things we see on the LBR, are actually pixel artifacts. You can confirm this by making a sample with CQ_VBR=100 and increase the MAX bit rate to 6,000Kbs. You'll still see some pixel artifacts on far away moving objects. There's no way around that. Unless you increase the resolution.

-kwag

black prince 11-11-2002 09:10 PM

Hi Kwag,

Kwag wrote:
Quote:

Quote:

black prince wrote:
LBR suffers from mosquito noise big time.
If and when a solution comes for mosquito noise, my next issue
will be file size to fit one CD.

-black prince

It depends on the movie. You might want to tighten the GOP more, for your particular film. Try a GOP of ( 1, 10, 2, 1, 10 ) for high contrast movies or Animes. That will make a huge difference. But remember, some things that look like "Mosquito Effect" on the LBR, actually any 352x240 encode, are not really "Mosquito Effect" it's the actual movie, but specially on far away scenes you'll see more, because what you are really seeing is pixel artifacts. The higher resolution you go, the less artifacts, because there are more pixels on the screen. So a lot of things we see on the LBR, are actually pixel artifacts. You can confirm this by making a sample with CQ_VBR=100 and increase the MAX bit rate to 6,000Kbs. You'll still see some pixel artifacts on far away moving objects. There's no way around that. Unless you increase the resolution.

-kwag
Your right Kwag. I pushed the CQ to 100 and most of what I thought
was mosquito noise turned out to be artifacts. There was a small amount
of mosquito noise, but from a distance of 3 feet you couldn't tell.
I burned the test mpeg and tested it on 27" TV. Excellent, but the predicted
file size without credits would not fit on one CD (700MB). I am going to try
my 99 min CD's and this should work. It may not play on other DVD
players, but it sure will play on my JVC. 8)

-black prince

LadyMiles 11-12-2002 01:42 AM

Quote:

Your right Kwag. I pushed the CQ to 100 and most of what I thought
was mosquito noise turned out to be artifacts. There was a small amount
of mosquito noise, but from a distance of 3 feet you couldn't tell.
I burned the test mpeg and tested it on 27" TV. Excellent, but the predicted file size without credits would not fit on one CD (700MB).
Okay I am getting all confused again what's the difference between artifacts and mosquito noise ?

Oh btw black prince, I thought you might be interested this thread Sangrip wrote me at doom9 about what exactly is noise.

http://forum.doom9.org/showthread.php?s=&threadid=37395

black prince 11-12-2002 04:28 PM

Thanks LadyMiles,

I actually spotted your post last week on Doom9 and that's why I
sent a PM to you about improving LBR picture quality. Your post
at Doom9 led me to start investigating "AddNoise" by SansGrip
and then when Kwag got involved with SansGrip they begain the
Blockbuster filter which were now using. GFR has a program which
may help the "Gibbs effect" or mosquito noise, so work and testing
are still being done. All this from your post to SansGrip about picture
noise. :D All templates will benifit from BlockBuster and with more
enhancements to come. And you started it. :D :D :D


-black prince

kwag 11-12-2002 04:56 PM

Auto Strength for Blockbuster
 
Here's a new toy to add to your script. It will proportionally adjust the Strength value on the "sharpen" method, depending on your target resolution. So you only have to uncomment one line, and encode :wink:

######## 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 = BB_StrengthConstant / BB_Resolution
Blockbuster( method="noise", detail_min=1, detail_max=3, lv=1.5 ) # Apply noise if complexity is <= 3%.
Blockbuster( method="sharpen", detail_min=4, detail_max=99, strength=StrengthValue ) # Sharpen only if complexity is >= 4%.

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

A little explanation. I had selected a value of 20 for strength on 352x240. So that means that every time I switch a template, I would have to figure out different strength values, because the higher resolutions don't need as much sharpness as lower resolutions. Well, use this script and let it calculate it automatically. The constant 1689600 is based on calculating 352 X 240 X 20. 20 meaning the fixed value I was using on the 352x240 LBR template. So now, every time the resolution increases, the strength value will be lowered proportionally.

Note: For PAL people. Adjust your constant to read "BB_StrengthConstant = 352 X 288 X 20" , and change the lines to read:
BB_Resolution = 352x288
BB_Resolution = 352x576
Etc, etc :)

Have fun :wink:
-kwag

edmund 11-12-2002 07:09 PM

hey kwag.. that script is great.. but where do i insert it exactly.. do i put it after the resizing?? and also.. tmpgenc won't allow my avs file in with the blockbuster line of code it it.. it says there is an error?? i have check to make sure the path to my dll file is correct and it is.. so i don't know what else to do?? please help thanks

kwag 11-12-2002 07:32 PM

Quote:

Originally Posted by edmund
hey kwag.. that script is great.. but where do i insert it exactly.. do i put it after the resizing?? and also.. tmpgenc won't allow my avs file in with the blockbuster line of code it it.. it says there is an error?? i have check to make sure the path to my dll file is correct and it is.. so i don't know what else to do?? please help thanks

Works fine here! Check your blockbuster.dll path. I am using mine after the resizing line.
Here's my working script:

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


######## 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=3, lv=1.5 ) # Apply noise if complexity is <= 3%.
Blockbuster( method="sharpen", detail_min=4, detail_max=99, strength=StrengthValue ) # Sharpen only if complexity is >= 4%.

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

AddBorders(8,24,8,24)


-kwag

christopher 11-12-2002 07:57 PM

strength=StrengthValue - strength can only accept integers, so Kwag you need to round your StrengthValue.

Christopher

kwag 11-12-2002 08:46 PM

Quote:

Originally Posted by christopher
strength=StrengthValue - strength can only accept integers, so Kwag you need to round your StrengthValue.

Christopher


Ahh!, that bit me again :)
Thanks Christopher.
Post edited ;)
Should read: StrengthValue = round (BB_StrengthConstant / BB_Resolution)

-kwag

Daagar 11-12-2002 09:42 PM

For DVD2SVCD
 
If you want to use DVD2SVCD with this, here is a sample (cut & paste this to the bottom of dvd2svcd.ini and then you can access it in the Frameserver tab):

[AVISYNTH_BlockbusterBilinearResize]
0=BilinearResize(^TargetWidth,^TargetHeight)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=LoadPlugin(!Blockbuster.dll)
3=Blockbuster( method="noise", detail_min=1, detail_max=3, lv=1.5 )
4=Blockbuster( method="sharpen", detail_min=4, detail_max=99, strength=^StrengthValue )
!Blockbuster.dll=C:\VideoTools\DVD2SVCD\Blockbuste r\Blockbuster.dll
^StrengthValue=20

Change the path to blockbuster.dll, and adjust your strength value according to Kwag's formulas based on your resolution. I'm not sure if dvd2svcd can handle mathematical expressions in the avs scripts, so I hardcoded the strength value. You can manipulate it via dvd2svcd, however.

kwag 11-13-2002 12:43 AM

@Daagar,
Thanks for that script ;)

@All,

Here's my latest test with Blockbuster AND NoMoSmooth filters, also from SansGrip. @SansGrip, I can't thank you enough ;)
This is an excelent sample showing the removal of DCT blocks on the background. Look carefully at the background wall.

KVCD LBR sample WITH filters: http://www.kvcd.net/test5-sharpen-noise-nomosmooth.m1v
KVCD LBR sample WITHOUT filters: http://www.kvcd.net/test5-nofilter.m1v
Standard VCD. Constant bit rate using TMPEG VCD template: http://www.kvcd.net/test5-standard-cbr-vcd.m1v

Both KVCD samples are less than 1MB. The standard VCD sample is 1.3MB.

Also, look at the file size difference after applying the NoMoSmooth filter. It's a combination of Temporal and Spatial filter. So you may now discard TemporalSmoother and (probably) Convolution3D 8)

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 8)

-kwag

black prince 11-13-2002 11:50 AM

Hi Kwag,

I compared the new settings for “Blockbuster” and “NoMoSmooth”:
Here's my subjective opinions about picture quality. :roll:

For noise-sharpen-nomosmooth - background blockiness has disappeared.
Still a little too sharp looking, but very realistic from a distance. Detail stands
out better with small amount of sharpen.

For noise-sharpen - not much different without NoMoSmooth except
file size is smaller. NoMoSmooth is set for default and needs some
tweaking.

For nofilters – blockiness appears on background wall, picture is slightly
blurry, detail doesn’t standout from distance. File size larger than
noise-sharpen.

These subtle changes are adding up to enhance overall picture quality.
Your getting there, Kwag. :? It’s good to see some file compression back
again with NoMoSmooth. Each update you have posted has increased
the overall picture quality. With the “mosquito noise” reduced, this will
best the best LBR ever. :D


-black prince

Holomatrix 11-13-2002 12:58 PM

Sorry to interject, but why do you use BiLinear resize and not the new Lanczos? so have you guys come to the conclusion that using Blockbuster in conjunction with nomosmooth is the best to use when doing DVD to SVCD conversion?
There are so many avisynth filters out there, I'm just looking for the best quality combination.
Thanks

kwag 11-13-2002 01:31 PM

Hi Holomatrix,

I've tried the Lanczos resize, but it seems that the "ladder" of "jagged" edges on diagonal lines, are more pronounced than with Bilinear resize. At least on 352x240 tests I've done. I have yet to see any filter combination that produces the quality that I've seen with the NoMoSmooth + Blockbuster combination. It's simply amazing. And there are no filters to my knowledge that reduce DCT blocks on dark areas. Only Blockbuster does that. Check the samples that I posted in this thread.

-kwag

black prince 11-13-2002 01:47 PM

Hi Kwag,

Kwag wrote:
Quote:

I've tried the Lanczos resize, but it seems that the "ladder" of "jagged" edges on diagonal lines, are more pronounced than with Bilinear resize. At least on 352x240 tests I've done.
I use lanczosResize and didn't realize this was happening. I am
going to switch to bilinearResize. 8O

-black prince


All times are GMT -5. The time now is 10:09 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.