View Full Version : "accurate deblocking" in avisynth?
Hironimo
20th June 2007, 11:48
Hi there.
I am trying to work with an avi file that has serious blocks in some scenes, however the standard deblocking filter deblock() is not satisfatory to me.
I found that there is a very good deblocking algorithm called "accurate deblocking", apparently coming from mplayer that was integrated into the ffdshow filters.
This gives much better results, and it would be great if it is possible to use that in AviSynth.
Anyone has suggestions if that is possible and how?
Here some comparison screenshots:
original:
http://www.morkeleb.net/images/original.PNG
standard avisynth deblocking:
http://www.morkeleb.net/images/standard_deblocking.PNG
accurate mplayer deblocking:
http://www.morkeleb.net/images/accurate_deblocking.PNG
Hironimo
Hironimo
20th June 2007, 12:03
I just realized it is not that simple.
Windows has a part in this too apparently.
The first two screenshots are from VirtualDub,
the last from windows media player.
Additional smoothing is done by windows media player.
Do you know anything about this, and if it cann be added
to the avisynth process? I Windows smoothing doesnt help
me because I reencode the video straight on to mpeg2
and burn it on dvd - the dvd player it self dont have any or no good deblocking.
wonkey_monkey
20th June 2007, 13:55
You may have VirtualDub set to display in 16-bit. Go to Options->Preferences and make sure your Output colour depth is set to 24-bit.
David
Hironimo
20th June 2007, 14:08
You may have VirtualDub set to display in 16-bit. Go to Options->Preferences and make sure your Output colour depth is set to 24-bit.
David
It was set to 24 bit already.
I found that it is possible to call ffdshow filters using
LoadCPlugin("C:\Program Files\AviSynth 2.5\plugins\ffavisynth.dll")
ffdshow("default")
It will then use the current default settings of ffdshow (http://avisynth.org.ru/docs/english/externalfilters/ffavisynth.htm).
For some strange reason it seemes to ignore postprocessing.
Maybe I'm doing somwthing wrong? - picture properties settings work however (I just checked
if its not working in general or not).
I used the latest ffdshow version from here (http://www.free-codecs.com/download/FFDShow.htm).
Leak
20th June 2007, 14:11
Hi there.
Servus! :)
This gives much better results, and it would be great if it is possible to use that in AviSynth.
Anyone has suggestions if that is possible and how?
Set up ffdshow's VfW settings to decode the format your file is in (Codecs page in the VfW configuration), adjust the post-processing options to your liking and use AviSource to open the file.
Or use DirectShowSource to open the file exactly like your media player does - AviSource has more accurate seeking, though, but this shouldn't matter in case you're not Trim-ing your source.
Hironimo
20th June 2007, 14:36
Set up ffdshow's VfW settings to decode the format your file is in (Codecs page in the VfW configuration), adjust the post-processing options to your liking and use AviSource to open the file.
I tried both changing the normal and VfW ffdshow settings.
Only if I change setting in the normal one (a window called "ffdshow video decoder configuration" with a red icon) it works, and then only for other filters - postprocessing is ignored.
What I did is opening an .avs file containing above mentioned code (among other lines to open the video and doing a LimitedSharpenFaster) in the latest version of VirtualDub.
Or use DirectShowSource to open the file exactly like your media player does - AviSource has more accurate seeking, though, but this shouldn't matter in case you're not Trim-ing your source.
When I use DirectShowSource instead of AviSource it works.
I would have preferred AviSource however.
Maybe this is a bug in the ffavisynth plugin?
The resulting quality still does not live up to the final version show above,
but I still suspect windows media player to adding some additonal filters.
When using DirectShowSource it makes no sense to use the ffavisynth plugin, btw,
it would just filter again.
Here's the result:
http://www.morkeleb.net/images/accurate_deblocking_vd.PNG
Leak
20th June 2007, 14:47
What I did is opening an .avs file containing above mentioned code (among other lines to open the video and doing a LimitedSharpenFaster) in the latest version of VirtualDub.
Try opening your AVI file in VirtualDub directly and look under "File > File Information" which codec is used.
If it says XviD (assuming it's an XviD file), you need to go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32 in your registry and change the "vidc.XVID" entry to read "ff_vfw.dll" - or change the fourcc of your AVI file to "ffds"... :(
EDIT: Scratch that, adding using AviSource("...",fourCC="ffds") should do the trick.
(Yes, VfW is a total mess...)
Hironimo
20th June 2007, 15:01
[QUOTE=Leak;1016973]EDIT: Scratch that, adding using AviSource("...",fourCC="ffds") should do the trick.[QUOTE]
That helps for the VfW ffdshow to be used, but postprocessing (deblocking) is still ignored.
Until that is fixed (if it is a bug), DirectShowSource it is.
foxyshadis
20th June 2007, 15:03
Post-processing settings have always been ignored in vfw mode as well, unless this is a recent change. I've always left them that way since until recently I didn't know if I was the only one who wanted them on; I figured milan had a good reason for disabling them.
Hironimo
20th June 2007, 15:19
Post-processing settings have always been ignored in vfw mode as well, unless this is a recent change. I've always left them that way since until recently I didn't know if I was the only one who wanted them on; I figured milan had a good reason for disabling them.
So it is possible to enable use of post-processing?
Hironimo
21st June 2007, 12:11
CCE has problems with the directshowsource apparently, it will crash as soon as the first pass is done and starts reading again from the start.
The only option I saw was to save it to another file first.
I used huffyuv for that, but the resulting file is soo large (40gb) and cce cannot even read it directly without errors, only putting avisynth between helped.
Are there other codecs suitable for that that encode/decode fast, loose no or very little detail and dont result in such large files?
Fizick
22nd June 2007, 04:42
When you find such ideal codec, please tell us about it.
:)
Hironimo
22nd June 2007, 11:04
When you find such ideal codec, please tell us about it.
:)
Maybe you understood it a bit different. I'm not talking of a codec that can store as good as h.264 and still is as fast as huffyuv. I was talking about something in-between.
Something like this (http://www.pegasusimaging.com/picvideomjpeg.htm) maybe - i'll give it a try.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.