Log in

View Full Version : Informations about HorizontalReduceBy2 filter


glabousky
10th March 2014, 12:39
Hi everybody,

I a mtrying to make a 3D Half Side-by-side video using avisynth.
I have two AVI sources (1080p) and I use the filter "HorizontalReduceBy2" in order to have two 960x1080 videos, and then I will stack them.
I would like to know how this filter works exactly. Does this filter take one filter over two ? The informations I have on the wiki don't help me a lot (I don't understand how the filter kernel (1/4,1/2,1/4) is used).
Moreover, is this filter a good solution for a 3D (anaglyphe) visualisation ?

Thank you for your consideration ^^

wonkey_monkey
10th March 2014, 17:20
(I don't understand how the filter kernel (1/4,1/2,1/4) is used).

It means that each pixel is made of a weighted mix of the three pixels above it. For example, if ABCDEF are the original pixels:

ABCDEFGH
a b c d

Then:

a=1/4A+1/2A+1/4B (as we are at the edge, A gets counted twice)
b=1/4B+1/2C+1/4D
c=1/4D+1/2E+1/4F
d=1/4F+1/2G+1/2H

In this way, all of the original pixels are equally represented (at half weight) in the output - either in a single pixel, or spread across two neighbouring pixels.

David

glabousky
11th March 2014, 09:58
Thank you David, this is exactly what I needed and really clear.
I hope this filter will give a good 3D result.

You're the doctor (Doctor ? Doctor Who ? ^^)

Anthony