Log in

View Full Version : Proposal: Median Upscaler


Pages : 1 [2]

StainlessS
26th August 2016, 03:25
Thank you sensei, hope you dont get into the Fluffy habit of the exercise thing, that dang whatsitsname does it a lot. :)

EDIT: Oooh dear, I see him watching. :)

pbristow
1st September 2016, 10:42
*SIGH* Thanks to job schedules, I've still not had a chance to sit down and try getting C# set-up. =:o(

Would either davidhorman or MysteryX be willing to do any/all of the following?

1. Run MedianUpscaler on a zone plate (preferably the one produced by VirtualDub, so that I can easily duplicate the test with other resizers for comparison);

2. Run it on some moving video (a second's worth will do) featuring, say, some window blinds or other long linear features, *not* neatly aligned with the video frame (i.e. effectively diagonal), and with the camera moving. This is the kind of scenario where I find stair effects most annoying, as they appear to ripple or slide along the linear features as they move w.r.t. the camera. (I can supply a suitable test clip, if you wish.)

3. Supply a compiled plugin of their implementation of MedianUpscaler, so I can run my own tests. (I'm using Avisynth 2.6).

Sorry to be a pest. =:o\

wonkey_monkey
2nd September 2016, 16:13
1. http://i.imgur.com/Ve0OCTj.png (interestingly it enhances it some of the moire circles)
2. supply test clip please :) (or don't, and use step 3 to do it yourself)
3. You'll need rgba_rpn 0.2 (http://horman.net/avisynth/download/rgba_rpn0.2beta.zip). Then this is the function:

function median_double(clip c) {
c.pointresize(c.width*2,c.height*2)

rgba_rpn(last,"
x 1 and y 1 and + 2 == ?:

[c0(-1,-1)] ** @A [c0(-1,1)] ** @B [c0(1,-1)] ** @C [c0(1,1)] ** @D + + +
A B C D max max max -
A B C D min min min -

0.5 * sqrt

: [c0] .
")

rgba_rpn(last,"
x 1 and y 1 and + 1 == ?:

[c0(-1,0)] ** @A [c0(1,0)] ** @B [c0(0,-1)] ** @C [c0(0,1)] ** @D + + +
A B C D max max max -
A B C D min min min -

0.5 * sqrt

: [c0] .
")

}


If you supply a YUV clip (YV12, YV24, YUY2, etc) it'll only upscale and return the Y channel. RGB clips will be full colour (with the channels upscaled independently).

Edit: actually it just doesn't work at all with YUV clips. Change rgba_rpn to y8_rpn if you want to do so.