Log in

View Full Version : DeBlocking and Other Artifacts


EpheMeroN
3rd July 2008, 22:17
Source is transport stream wanting to encode to DVD.

Do interlaced sources need to be bobbed for deblocking filters to be used? If yes, is TDeint still a good bobber? I was using TDeint(1,1) for this source.
Where in script should deblocker be applied?
If also denoising, example being RemoveGrain, would this be used before/after deblocking?
What deblocker for this source? Many of the blocks appear to come from the cable's compression and show mostly during motion and panning.
What denoiser to use? Can't tell what type of noise there is.


http://img359.imageshack.us/img359/6175/18023831jf0.th.png (http://img359.imageshack.us/my.php?image=18023831jf0.png) http://img359.imageshack.us/img359/2684/97604221xs6.th.png (http://img359.imageshack.us/my.php?image=97604221xs6.png) http://img394.imageshack.us/img394/6756/83420036so0.th.png (http://img394.imageshack.us/my.php?image=83420036so0.png) http://img357.imageshack.us/img357/7864/93611930mt7.th.png (http://img357.imageshack.us/my.php?image=93611930mt7.png) http://img357.imageshack.us/img357/70/47003175ys8.th.png (http://img357.imageshack.us/my.php?image=47003175ys8.png) http://img114.imageshack.us/img114/6303/81501739zp5.th.png (http://img114.imageshack.us/my.php?image=81501739zp5.png)

AVIL
3rd July 2008, 22:52
Hi,

Try this script from Didée:

http://forum.doom9.org/showpost.php?p=1154269&postcount=106

It does a very good bobbing and simultaneous denoise.

EpheMeroN
4th July 2008, 01:23
I've tried for the last hour to get that TempGaussMC_beta script to work and I can't. The errors happen with VariableBlur.dll. It says it cannot find the filter when loading. So I found out that it's an old plugin, but when I try to load LoadPlugEx2.dll before VariableBlur.dll it says LoadPluginEx2.dll is unable to load. And if I comment out both VariableBlur.dll and LoadPluginEx2.dll from loading it says "there is no function called binomialblur."

LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\DGDecode.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\mt_masktools.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\MVTools.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\EEDI2.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\RemoveGrainSSE3.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\RepairSSE3.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\LoadPluginEx2.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\VariableBlur.dll")
Import("C:\Multimedia\Avisynth 2.5\Plugins\TempGaussMC_beta.avs")

MPEG2Source("C:\Users\User1\Desktop\ccp08.d2v")

FadeIn0(10).FadeOut0(10)

Crop(4,4,-4,-4)

TempGaussMC_beta()

Didée
4th July 2008, 01:31
You surely have v0.40 from here (http://avisynth.org/tsp/)? It's for Avisynth 2.5, and works without problems for me.

EpheMeroN
4th July 2008, 02:40
You surely have v0.40 from here (http://avisynth.org/tsp/)? It's for Avisynth 2.5, and works without problems for me.
Yes. It's the same version as the one from your link.

Is there anything I can do to troubleshoot this? I'm on Vista Home Premium... don't know if that could be an issue.

EpheMeroN
4th July 2008, 05:23
I can't seem to get MCBob to work as a bobber now.

Here's the error and script:

http://img74.imageshack.us/img74/7226/17261306ln0.jpg

LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\DGDecode.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\mt_masktools.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\MVTools.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\EEDI2.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\RemoveGrainSSE3.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\RepairSSE3.dll")
Import("C:\Multimedia\Avisynth 2.5\Plugins\mcbob_0.3.avs")

MPEG2Source("C:\Users\User1\Desktop\ccp08.d2v")

FadeIn0(10).FadeOut0(10)

Crop(4,4,-4,-4)

MCBob()

#Denoiser-to-be-determined()

SeparateFields().SelectEvery(4,0,3).Weave()

AddBorders(4,4,4,4)

Dark Shikari
4th July 2008, 06:30
Make sure you have the latest version of MVTools.

EpheMeroN
4th July 2008, 07:24
Make sure you have the latest version of MVTools.

I got MVTools from the first post of this thread: http://forum.doom9.org/showthread.php?t=84770

Didée
4th July 2008, 07:34
That's v0.9.8, a very ancient version. Get the one from here (http://www.avisynth.org.ru/mvtools/mvtools.html). Download is at the very bottom. Note the length of the changelog right above.

BTW, does the load behaviour of VariableBlur change when you load it before RemoveGrainSSE3 and RepairSSE3? - The SSE3 versions are suspicious anyway, several people had problems with them. Rather use the ~SSE2 versions of those plugins. (Their speed is the same.)

EpheMeroN
4th July 2008, 08:49
That's v0.9.8, a very ancient version. Get the one from here (http://www.avisynth.org.ru/mvtools/mvtools.html). Download is at the very bottom. Note the length of the changelog right above.
Thanks! MCBob() now loads successfully. Also, what you said about RemoveGrainSSE3.dll was true. My script was crashing trying to load MCBob() until I replaced RemoveGrainSSE3.dll and RepairSSE3.dll with the SSE2 versions.

BTW, does the load behaviour of VariableBlur change when you load it before RemoveGrainSSE3 and RepairSSE3? - The SSE3 versions are suspicious anyway, several people had problems with them. Rather use the ~SSE2 versions of those plugins. (Their speed is the same.)
No it does not. VDub still says it's unable to load VariableBlur.dll.

Didée
4th July 2008, 08:58
Well, regarding VariableBlur I'm out of ideas then. Perhaps it's an issue with Vista ... can't tell, I don't have a Vista System on which I could test.

Mystery Keeper
4th July 2008, 09:33
I have Vista and I had problem with VariableBlur, but then I found it somewhere and it worked. But I don't remember where =(

Didée
4th July 2008, 09:37
What about putting your version of variableblur up somewhere so that EpheMeroN can test if it works for him?

Mystery Keeper
4th July 2008, 10:34
VariableBlur 0.4
http://www.mediafire.com/?zmhmpz4gmmo

Didée
4th July 2008, 10:47
That's exactly the version from tsp's site.

Mystery Keeper
4th July 2008, 12:42
It works.

EpheMeroN
4th July 2008, 17:57
Trying the new VariableBlur link (appears to be same as ver I already had though) with following error:

http://img398.imageshack.us/img398/1035/27946081yz3.jpg

EpheMeroN
5th July 2008, 17:49
Still can't get VariableBlur to load properly. Might try updating to latest alpha/beta of AviSynth later and see if that has any success.

Btw, how does TDeint's bobber compare to MCBob? I ask because MCBob is super super super slow... add that with a deblocker, denoiser, and 2-3 pass encoding for dvd and it's unbearable even on my Core 2 Duo laptop.

Mystery Keeper
6th July 2008, 14:39
Reinstalled my system, and variable blur stopped working. Remembered that it requires fft3w.dll in system folder. After I placed it there it worked.

EpheMeroN
8th July 2008, 05:43
Reinstalled my system, and variable blur stopped working. Remembered that it requires fft3w.dll in system folder. After I placed it there it worked.
I already had fft3w.dll in my "C:\Windows\System32" dir and it won't load on this Vista laptop for whatever reason.

Blue_MiSfit
8th July 2008, 06:11
Are you running Vista x64?

If so the fft dll has to go into sysWOW64. system32 is for 64 bit exe's and dll's...

:rolleyes:

WELL DONE MICROSOFT!

Why they didn't name it System32 (for 32 bit stuff) and System64 (for 64 bit stuff) is UTTERLY beyond me...

EpheMeroN
8th July 2008, 08:10
Are you running Vista x64?

If so the fft dll has to go into sysWOW64. system32 is for 64 bit exe's and dll's...

:rolleyes:

WELL DONE MICROSOFT!

Why they didn't name it System32 (for 32 bit stuff) and System64 (for 64 bit stuff) is UTTERLY beyond me...
Nope. I'm running Windows Vista Home Premium 32-bit.

EpheMeroN
9th July 2008, 02:00
Does anyone have any insight on deblocking this source?

So far, the best I have come up with is DeBlock(quant=30, aOffset=0, bOffset=0) but in heavy motion areas the blocking still gets unbearable.

I tried combating that with TNLMeans with very low settings, but it is so slow that CCE's encoding speed was literally at 0.00.

As of right now this is my current script:

LoadPlugin("C:\Multimedia\AviSynth 2.5\Plugins\DGDecode.dll")
LoadPlugin("C:\Multimedia\AviSynth 2.5\Plugins\NicAudio.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\TDeint.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\DeBlock.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\FFT3DFilter.dll")

Video1 = MPEG2Source("C:\Users\User1\Desktop\cc08p.d2v")
\ .Crop(8,8,-8,-8).TDeint(1,1).DeBlock(quant=30, aOffset=0, bOffset=0).AddBorders(8,8,8,8)
\ .FFT3DFilter(sigma=1.8, bt=5, bw=32, bh=32, ow=16, oh=16, ncpu=2)
\ .SeparateFields().SelectEvery(4,0,3).Weave()

Audio1 = NicAC3Source("C:\Users\User1\Desktop\cc08p T80 2_0ch 128Kbps DELAY 0ms.ac3")
\ .Normalize(0.95)

AV2 = AudioDub(Video1,Audio1).Trim(0,40046).FadeIn0(10).FadeOut0(5)

AV3 = AudioDub(Video1,Audio1).Trim(40047,69376).FadeIn0(5).FadeOut0(5)

AV4 = AudioDub(Video1,Audio1).Trim(69382,99140).FadeIn0(5).FadeOut0(5)

AV5 = AudioDub(Video1,Audio1).Trim(99144,128743).FadeIn0(8).FadeOut0(5)

AV6 = AudioDub(Video1,Audio1).Trim(128745,150836).FadeIn0(5).FadeOut0(5)

Blank1 = BlankClip(AV2).Trim(0,59).Amplify(0.0)

Blank2 = BlankClip(AV2).Trim(0,26).Amplify(0.0)

AlignedSplice(Blank1,AV2,Blank2,AV3,Blank2,AV4,Blank2,AV5,Blank2,AV6,Blank1)

Dark Shikari
9th July 2008, 02:07
If all else fails, dfttest eliminates blocking pretty much without fail.

EpheMeroN
9th July 2008, 03:46
If all else fails, dfttest eliminates blocking pretty much without fail.
I tried dfttest and although it did remove all blocking, it killed all detail by oversmoothing. Got any recommended low low settings for dfttest to just remove blocking?

AVIL
9th July 2008, 07:47
Hi:

You can try this VirtualDub's plugin:

http://www.compression.ru/video/deblocking/smartdeblocking_en.html

The effect is gentle but RGB24 conversion is mandatory.

In the same site there is another VirtualDub's plugin:

http://www.compression.ru/video/deblocking/index_en.html

but is not as gentle.

Good luck

EpheMeroN
9th July 2008, 08:20
Hi:

You can try this VirtualDub's plugin:

http://www.compression.ru/video/deblocking/smartdeblocking_en.html

The effect is gentle but RGB24 conversion is mandatory.
Won't going from YV12>RGB24>YV12 create more quality loss? I've never done that before, but "wow" at the samples for that Smart Deblocker. Shame no one has ported it for AviSynth yet!

This leads me to yet another question: Should I be deblocking BEFORE denoising? Or vice versa?

Dark Shikari
9th July 2008, 12:05
I tried dfttest and although it did remove all blocking, it killed all detail by oversmoothing. Got any recommended low low settings for dfttest to just remove blocking?Lower the sigma until you're happy.

If you want a more subtle deblocker that retains detail, use SmoothDeblock.

AVIL
9th July 2008, 14:12
Won't going from YV12>RGB24>YV12 create more quality loss? I've never done that before, but "wow" at the samples for that Smart Deblocker. Shame no one has ported it for AviSynth yet!

1. Generally is preferable to avoid such conversions. I use matrix="PC.601" in both conversions. No noticeable degradation in my case. But other could be different. You can after recall original chroma with mergechroma.

2. The samples are author's samples ...

3. Certainly a good deblocking plugin will be wellcome.

More...

After this filter I use fft3dfilter with "wings" clips (clips generated by motion compensation, forward and backward), bt=3 and high sigma, medium sigma2 and low both sigma3 and sigma4.

Good luck

EpheMeroN
9th July 2008, 21:04
If you want a more subtle deblocker that retains detail, use SmoothDeblock.
I was able to download 4/5 needed filters for SmoothDeblock to work. I cannot find this "Average" filter. Links to it off SmoothDeblock thread are dead, and it's not on the WarpEnterprises collection site.

Dark Shikari
9th July 2008, 21:14
Average filter (http://www.mediafire.com/?zn22vmeeogm).

EpheMeroN
9th July 2008, 22:08
Average filter (http://www.mediafire.com/?zn22vmeeogm).
Thanks! I'll test this out later today.