View Full Version : ffdshow deblocking vs. DeHalo_alpha


FredThompson
2nd April 2006, 23:20
Has anyone successfully used the DScaler deblocking filter in ffdshow to reduce compression artifacts inside an Avisynth script a la DeHalo_alpha?

If so, how did you do it so the artifacts are removed while keeping the original luma and chroma characteristics? (ffdshow defaults mess with that.)

Didée
3rd April 2006, 01:16
Ermh,

>> the DScaler deblocking filter ... to reduce compression artifacts ... a la DeHalo_alpha

Please clarify your point? What has a block removal filter to do with halo removal?

FredThompson
3rd April 2006, 02:09
Low quality MPEG21 source but look just above the heads and at the text on the banner.

Chainmax
3rd April 2006, 20:18
I haven't looked at the picture, but I second what Didée said. Besides, DeHalo_Alpha is an Avisynth function and not an ffdshow filter. In any case, to use ffdshow filters just enable them using the "video decoder configuration" and add ffdshow("default") somewhere in your script. Tune the settings within ffdshow until they satisfy you.

FredThompson
3rd April 2006, 22:23
@Chainmax, read the OP again and look at the image. Compare the right and left sides.

Chainmax
3rd April 2006, 23:02
You are still comparing a deblocker to a halo remover and an ffdshow filter to an avisynth function, both of which are inaccuracies. Anyway, to answer your question, the only thing I can think of is tweaking the filter within ffdshow and/or use mergeluma/mergechroma.

Soulhunter
3rd April 2006, 23:23
@ FredThompson

Perhaps you mean DeRinging and not DeBlocking?

Coz DeHalo_alpha removes also some ringing...


Bye

FredThompson
4th April 2006, 00:36
@Chainmax, are you trying to be argumentive?

@Soulhunter, I was pretty sure it was a DScaler deblocker but now that I check with Celtic Druid's 11-03-2005 build of ffdshow I see it's the decoding postprocessing setting for deblocking. Yes, the result I'm looking for is deringing but the name of the setting is deblocking.

Chainmax
4th April 2006, 03:12
@Chainmax, are you trying to be argumentive?

I just pointed out what I understood as being inaccuracies. I didn't mean to be appear confrontational, and it it came out that way then I apologize. Did you try using mergeluma/mergechroma?


[edit]Come to think about it, doesn't deringing affect luma? If so, then I don't think you can return to the original luma after it.

FredThompson
4th April 2006, 03:29
Apology accepted. Thanks.

No, I haven't tested merging.

Enlarge the still image and you'll see what I meant. Yes, I suppose there will always be a slight change in the luma and chroma with any filtering. I haven't played with all the settings in the postprocessing options. Maybe the change I see was from auto-optimizing, similar to that annoying default in PowerDVD.

The idea of using ffdshow to dehalo came when I was watching this low-quality MPEG1 stream. Given this filter is compiled, not interpreted, there should be a very nice speed increase compared to DeHalo_alpha is it can be configured properly By that, I mean all the settings set with a call from an AviSynth script and no major changes to the chroma and luma to "help" the image. The desired operation is only removal of mosqutios...

FredThompson
9th April 2006, 04:13
A little digging brought up this thread about the SPP deblocking:

http://www.hydrogenaudio.org/forums/index.php?showtopic=19578

There are some references in the AVS forum and a brief mention Celtic Druid's bloggish board but that's about it. What happened with this, anyhow? There hasn't been a new Celtic Druid build in quite a while.

foxyshadis
9th April 2006, 04:46
http://forum.doom9.org/showthread.php?p=809044#post809044

FredThompson
8th June 2006, 07:59
How's this for an example. The source is NTSC DV. Decoders are MainConcept and ffdshow with SPP deblocking. Anybody here know Trevlac? How about poking at him to make a VirtualDub filter to pipe through this? I'm now working on testing as a DeHalo_Alpha replacement. (Don't get me wrong, DeHalo_Alpha is nice but real time has a niceness all its own :)

edit: Grrrr...attachment limit is TOO SMALL for a D1 png!!! Is this a video site or a smartphone site?!?! GRRROWWWLLLL!!!!

The images are attached here: http://www.dealdatabase.com/forum/showthread.php?t=49815

Whoa, I just noticed that SPP is also bringing out detail without the typical light outlines of sharpeners. This is great! (Use Firefox to launch the attachments to the DealDatabase post and you can easily flip between the images to see this. Holy cow, this is wonderful!

Didée
8th June 2006, 08:24
The images are attached here: http://www.dealdatabase.com/forum/showthread.php?t=49815
Gives me a "you're not logged in..." when trying to view attachments. Cool.
Did something happen to Imageshack (http://imageshack.us/) lately? ;)

Whoa, I just noticed that SPP is also bringing out detail without the typical light outlines of sharpeners. This is great!
Strange. Apart from speed, the only complaint I've ever heard about ffdshow's SPP is that "it's killing too much detail". This is the first time that SPP is said to "bring out detail". Are we on the other side of the mirror today?

FredThompson
8th June 2006, 08:58
Sigh...the things I do for you people...

http://img102.imageshack.us/img102/8274/dvframewithstandarddecoding9ps.png
http://img80.imageshack.us/img80/7096/dvframewithffdshowsppdeblockin.png

Nope, no mirror over here, just me and a cheshire cat.

Crap. You're right. Some details are showing up more but it's smoothing out too much stuff. Darn it. I was so hoping there was a great way to dering quickly. This is the first frame of the clip. It looks fine but there seems to be some mushiness that shows up later. It does look like an over-smoothing.

Didée
8th June 2006, 09:24
Ooops. Interesting result! Does this hold up during the clip, or is it just the first frame that benefits so much ...
Well, if you don't want to use ffdshow, have a look at this thread (http://forum.doom9.org/showthread.php?t=111526), where Redfordxx is kind of reinventing SPP (to my understanding). The script currently runs at 4spf or so, and doesn't like interlaced input.

Sigh...the things I do for you people... Thanks for the superhuman effort. :D

FredThompson
8th June 2006, 10:05
Dry wit. I like that.

Turns out this isn't ffdshow at all. I was playing around with the ffvdub filter and confused myself.

Something inside VirtualDub is doing this magic. If you go into its preferences for AVI and set it for internal decoder for MJPEG and DV, the artifacts go away. The screenshots I show are mild but you can see details in the bolts and small holes. Look at these shots. They're even more impressive when enlargened. With MainConcept or ffdshow, the edge artifacts are horrible. With VirtualDub's internal decoder, they're almost non-existant. Maybe there's something really nice in Avery's code. I noticed VirtualDub-MPEG2 doesn't have the same deringing. No change to the detail, chroma or luma character. The junk goes away and it's fast.

http://img82.imageshack.us/img82/5360/mainconceptdecoder3oj.png
http://img82.imageshack.us/img82/5376/virtualdubdecoder5oo.png

foxyshadis
8th June 2006, 19:08
DCT artifacts that horrifying getting fixed won't be due to an amazing deringer, it has to come from an incompatibility or a bug in the mainconcept/ffdshow decoders. What created this file? Most likely vdub speaks its particular dialect while the others don't.

FredThompson
9th June 2006, 00:06
That's possible. It's camcorder footage. Unfortunately, I don't have any PAL DV now. I've converted all that to 422 MPEG2 to save space. I wasn't thinking of it so much as deringing, more a deringing effect of the decoding. Maybe that's what I get for thinking late at night. Ivo would say that's what I get for thinking.