Log in

View Full Version : Bug report and related port request


actionman133
14th June 2006, 18:00
Hi,

Those who have been surfing here a little while ago may remember a few script filters I posted (BleachBypass, Glow and Bloom). They all used the ported BoxBlur (v1.4) plugin for VirtualDub. After noticing some mild 'defects' in some new tests with my scripts, I decided to inspect BoxBlur...

As it turns out, the BoxBlur port can't seems to scale white from 255 to 249.

LoadVirtualDubPlugin ("F:\Core\AVISynth Plugins\BoxBlur.vdf", "BoxBlur")
A = BlankClip ()
StackVertical (a, a.invert ()) # original
BoxBlur (48, 3, 1000) # boxblurred


With this script, anyone should be able to reproduce the problem and confirm it in any paint program with an eyedropper.

As a side-topic to this, I was wondering if someone with some spare time would be able to port (a bug-fixed ;) ) version of this filter for AVISynth. I ask this due to my complete incompetence outside a scripting environment.

At the moment, I reluctantly tolerate having to convert to RGB32, trying to avoid loss on the colorspace conversions (all my sources are YV12). To be able to do the boxblur in YUV would simplify the scripts and speed up the filter to the point where real-time preview with my filters might be possible.

If anyone is willing to donate their time, it'd be much appreciated!

Guest
14th June 2006, 18:23
As it turns out, the BoxBlur port can't seems to scale white from 255 to 249. What is the significance of this scaling and why do you think box blur should do it?

With this script, anyone should be able to reproduce the problem and confirm it in any paint program with an eyedropper. What problem are you talking about? What am I supposed to confirm?

actionman133
14th June 2006, 18:44
Bleh, sorry my mistake for not reading my own post before submitting it. :o

What I meant to say was that when given pure white (255), BoxBlur outputs a near-white (249). It's not that it *should* do it, but rather that it *does* do it when it *shouldn't*. There is no reason (that I'm aware of) for white to be scaled or clamped like that.

The sample script I posted was for others to see this effect. Without the boxblur, the white (inverted) blankclip reads as 255 - pure white. With the box blur applied, the 'white' reads as 249.

The significance of this relates to my using the boxblurred output as a mask for Overlay. I know I can use Levels (which is what I'm using now as a temp fix) to correct it, but it still puzzles me a little that it occurs.

PS. I decided to check the original internal filter in VDub... it has the same side effect. So your port isn't wrong, it's the original source.

Guest
14th June 2006, 19:02
Ask Avery about it at forums.virtualdub.org. I just externalized it; I didn't analyze the algorithm. :)

actionman133
15th June 2006, 02:47
Thanks neuron2, I've done so.

Is there still any chance of someone being interested in writing an AVISynth plugin for it?

Guest
15th June 2006, 06:43
Well, sure, but it won't be me. Sorry.