Quote:
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 |
Quote:
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. |
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 |
Quote:
-kwag |
Hey Kwag,
Quote:
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 |
Quote:
-kwag |
Hi Kwag,
Kwag wrote: Quote:
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 |
Quote:
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 |
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 |
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 |
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
|
Quote:
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 |
strength=StrengthValue - strength can only accept integers, so Kwag you need to round your StrengthValue.
Christopher |
Quote:
Ahh!, that bit me again :) Thanks Christopher. Post edited ;) Should read: StrengthValue = round (BB_StrengthConstant / BB_Resolution) -kwag |
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. |
@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 |
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 |
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 |
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 |
Hi Kwag,
Kwag wrote: Quote:
going to switch to bilinearResize. 8O -black prince |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.