Log in

View Full Version : HybridFuPP : new 0.84b


Pages : 1 2 [3] 4 5

Yoda900
21st February 2004, 02:20
I tried this with vdub, vdubmod, nandub even. Still no luck :(

New and improved version sounds nice though ^_^

FuPP
21st February 2004, 02:42
Will post probably tomorrow. I have finished but need to change the doc.

You can though post your script now, I will have look !

FuPP

wh00t
21st February 2004, 03:05
hm..

Yoda900, well script is working for the most, so it probably might be sth wrong on your side. I personally have no probs loading it into vdub/-mod/nandub myself.. maybe you could give us a look on your settings (like FuPP suggested)

FuPP
21st February 2004, 23:59
New version (see post #1 for downloading)

You must load mpeg2dec3, unfilter, undot, fluxsmooth, msharpen (new, since 0.6b) and masktools (v 1.4.9) in your main script (or have them in your avisynth plugin directory)

0.6b :

- resizing algorithm and settings can be now selected for picture parts displaying no motion nor edges
- edge detection algorithm changed (uses Msharpen now)
- default values have been changed
- presets have been changed
- it is now possible to override parameters included in a preset
- spatial filtering has been removed when processing motion (offered a very weak compressibility gain)
- general picture quality improvements
- speed improvement

Enjoy !

Cheers,

FuPP

echo-kk
22nd February 2004, 20:26
@FuPP
I cannot download 0.6b -> I get a 'site is not accessible' (my french isn't very good) error.

If you could provide an alternative url I'd be glad to test the newest version.

echo

FuPP
22nd February 2004, 20:44
click RIGHT on link and save target ;)

Regards,

FuPP

FuPP
22nd February 2004, 20:47
@echo (and all...)

I've included english and french readme in latest version. It could be a good start to learn french :D

FuPP

FuPP
22nd February 2004, 23:34
One thing : people that would wish to copy and paste some lines from the doc could encounter some issues : because I did not use double-quotes, which is the correct syntax for string type variables, as preset for instance, but two simple quotes (because of typos problems). I'm going to fix that very soon and will include the corrected doc in the package.

Regards,
FuPP

toliman
26th February 2004, 04:46
ive looked at the results so far, it's very smooth in terms of CPU usage, and it balances the sharpen + motion which is good for my current project of turning average quality ~700kbit xvid to dvd.

the speed is very decent. instead of having to perform variations of undot / Blockbuster / fluxsmooth / Convolution3D over the entire video, i like the idea of using a mask. reading futher and seeing mf's (infamous) scripts for artifact removal, there's a lot of scope for the future, in detecting and analysing video that i never expected.

not being a guru, it seems to me, this filter seems the ideal way to remove most blur/motion artifacts that won't encode well, IMHO making it ideal for that hallowed position of all-industrious all-purpose generic filter for mpeg-2/4 compressibility.

or another discussion on why one needs a veritable carpenter's toolchest of fine, akward tools instead of a dremel (cough).

is there a way to modify the script it so that it doesnt require manually entering the target height/width variables, (by default, detecting them from the input clip) for integrating better with other common avs filters, ... e.g. autoGK or FACAR ?

koszopal
26th February 2004, 08:12
here's my comp. with SharpResize/IIP/Hypp (http://koszopal.fm.interia.pl/movie/comp.htm) :)
koszopal

FuPP
26th February 2004, 12:39
Originally posted by toliman

is there a way to modify the script it so that it doesnt require manually entering the target height/width variables, (by default, detecting them from the input clip) for integrating better with other common avs filters, ... e.g. autoGK or FACAR ?

Could you develop please as I don't use the tools you quote

FuPP

FuPP
26th February 2004, 12:43
Originally posted by koszopal
here's my comp. with SharpResize/IIP/Hypp (http://koszopal.fm.interia.pl/movie/comp.htm) :)
koszopal

Hi,

What settings did you use for HybridFuPP ?

Btw, I'm not sure that HybridFuPP plays in the same category than Didée's one (awesome picture, Didée !). If you want to be sure, add speed and compressibility tests when comparing all these tools.

regards,
FuPP

Didée
26th February 2004, 13:26
Originally posted by FuPP
Originally posted by toliman

is there a way to modify the script it so that it doesnt require manually entering the target height/width variables, (by default, detecting them from the input clip) for integrating better with other common avs filters, ... e.g. autoGK or FACAR ?
Could you develop please as I don't use the tools you quote

FuPP
Not needed. He's asking for something like

# only pseudo-code here

function foo(clip input, ...)
{
orig_width = input.width
orig_height = input.height

... function's work ...

Resize(orig_width,orig_height)
}

Loose comment:

>> Btw, I'm not sure that HybridFuPP plays in the same category than Didée's one

For sure they don't. iip & me will loose every possible race! ;)

- Didée

koszopal
26th February 2004, 19:07
@fupp
just simple
hybridfupp(640, 352)

FuPP
26th February 2004, 19:56
Koszopal,

Thanks a lot for your answer. Please, if you have little time, try with preset = "high", and have a look on compressibility too, when comparing to other filters.

acrespo
26th February 2004, 20:03
@FuPP

I am not sure about one thing: Are presets about source quality or output quality?
For example, if I have a video with low analog quality it's mean preset="low" (because I have a low quality video) or preset="high" (because I want a high quality final video)?

FuPP
26th February 2004, 20:26
Originally posted by acrespo
@FuPP

I am not sure about one thing: Are presets about source quality or output quality?


Very good question ! They are about output quality. Because filtering in HybridFuPP is more to gain compressibility rather than remove efficiently visible noise ("low" means : more compressible), except maybe dering which both remove ringing artefacts and helps compressibility.

But I could add in the future filters that are more efficient for removing noise (as an option, of course). But be aware it will then impact speed...

Regards,

FuPP

FuPP
27th February 2004, 00:21
Originally posted by toliman
is there a way to modify the script it so that it doesnt require manually entering the target height/width variables, (by default, detecting them from the input clip) for integrating better with other common avs filters, ... e.g. autoGK or FACAR ?

Done (but not sure it will be usefull...) Will be available when next version will be released

Thanks for using HybridFuPP !

toliman
27th February 2004, 05:28
well, i worked on it a little myself.
in a hack kind of way.

i tried to use FACAR for automating overscan borders/filters, but it is too wieldy + inaccurate... so instead, i'm going to rebuild a compact HyFuPP avs script for a DVD2SVCD frameserver, using GripCrop/Resize/Borders to add the overscan borders for tv/dvd-output.

i stripped/modified the presets, and dering/chroma from the existing script, so it would adapt to !mod16 sources. if i spend more time working in, rather than around avisynth, i'll put the mod16 detect/workaround code back in.

i'll keep my eyes peeled for the next update.

koszopal
27th February 2004, 08:35
@fupp
here a simple comp :
resizer bytes comp
1)bicubic 43343872 0,881539487
2)blinear 42426363 0,862878939
3)lancosz 49168384 1
4)sharp 56518656 1,149491836
5)hypp 41986048 0,853923692
6)iip 50640896 1,029948351
koszopal
PS xvid rc2 1pass const quant 2
PPS i'll try with present=high

FuPP
27th February 2004, 12:50
Originally posted by toliman
well, i worked on it a little myself.
in a hack kind of way.

i tried to use FACAR for automating overscan borders/filters, but it is too wieldy + inaccurate... so instead, i'm going to rebuild a compact HyFuPP avs script for a DVD2SVCD frameserver, using GripCrop/Resize/Borders to add the overscan borders for tv/dvd-output.

i stripped/modified the presets, and dering/chroma from the existing script, so it would adapt to !mod16 sources. if i spend more time working in, rather than around avisynth, i'll put the mod16 detect/workaround code back in.

i'll keep my eyes peeled for the next update.

ok, I think I did not get you last time and what I did is not what you want. I think now you want something that automatically crop and so on. I'm not very familiar with this (as I don't use Gripxxx). I will though have a look. Stay tuned...

FuPP

FuPP
29th February 2004, 11:47
New version 0.7b See post #1 for download

0.7b :
- special processing of dark areas (experimental), ie soft resizing + strong filtering (optional). Compressibility : up to 12% more
- It is now possible to choose resizing algorithm for edges
- motion spatial filtering has been re-introduced (because of users request)
- a little bit less speed if dark areas processing is used (activated by default), a little bit more than 0.6b if it is not used

NB : Toliman request has not been (yet) taken into acccount in this version.

FuPP

bond
29th February 2004, 14:45
lo fupp

nice idea with the dark area handling but i think that maybe the value of 60 (binarize) is too high, meaning too many parts of the frame will be blindpp'ed
maybe something like 40 would better in my sample

also what do you think about merging the edgesmask after the darkmask? that way it would be avoided that too many details in medium-dark areas (detected as darkness) get lost?


also i saw that you now use ColorYUV(off_y = 3) to reduce the darkening of unfilter and not lumafilter anymore
again the same as with lumafilter i get different results than you with coloyuv, for me a value of 1 would match the source better. i think this value is pretty much depending on the source :(

also i got a message from trbarry that he is busy at the moment and will not be able to fix unfilters darkening behaviour soon :(


btw: was there a special reason why you replaced inflate with expand in the motionmask?

FuPP
29th February 2004, 17:04
Hi Bond,

binarize threshold depends a lot of the source : a parameter will be therefore added.

about place of dark parts processing, I have to test more...

inflate/expand : I have recently done a lot of tests with another motion detection engine, maybe Expand comes frome these tests. I will have a look !

Regards,

FuPP

Manao
29th February 2004, 17:10
I guess the expand / inflate inversion comes from the bug you found in inflate(), and from the remark that inflate / expand were swapped in the documentation.

FuPP
29th February 2004, 17:24
parameter added : special_Thr (will be renamed later). Default = 40, instead of 60 as previously.

Find unofficial 0.71b here (http://fupp.chez.tiscali.fr/HybridFuPP/HybridFuPP_071_b.zip)

@manao : I really can't remember : too much testing !!!

FuPP

bond
29th February 2004, 17:57
/me is confused now :D

1) is now inflate or expand more usable to make the mask on which it is used bigger?
2) what bug in inflate?
3) i dont really get what binarize does?
i thought it divides the picture into two parts: dark and bright, but my tests show it doesnt :D
it seems more to somehow higher/lower the indensity of the used processing on the whole frame...

edit: ok reading the whole doc is a good idea :D
it seems that by default binarize processes the everything except the dark areas, with "upper=true" only the dark ones are used

can someone plz clarify this and excuse my dumbness ;)

Manao
29th February 2004, 18:05
The first and last line were not properly computed in inflate. Expand and inflate are still usable to make the mask bigger, but now inflate will also make it bigger on the first and last rows.

Binarize behavior is simple : with upper = false, all the pixels under the threshold are set to 0, and over to 255. With upper = true, it's the contrary.

In the first case, the higher the threshold, the lesser the number of pixels set to 255. In the second case, it's the contrary.

bond
29th February 2004, 18:12
Originally posted by Manao
The first and last line were not properly computed in inflate. Expand and inflate are still usable to make the mask bigger, but now inflate will also make it bigger on the first and last rows.so expand doesnt handle the first/last rows?

Binarize behavior is simple : with upper = false, all the pixels under the threshold are set to 0, and over to 255. With upper = true, it's the contrary.

In the first case, the higher the threshold, the lesser the number of pixels set to 255. In the second case, it's the contrary.yep thanks i figured out that i had to use "upper=true" already

bond
29th February 2004, 18:19
hm there seems to be a bug with binarize (ok i know i have to be carefull with bugreports :D )

i use RGBAdjust(5, 1, 1, 1) to color the darkmask
now when i load the avs (upper=true) in vdm the whole first two frames are colored red whereas from the third one on this changes and only the dark areas are red (as it should be)

Manao
29th February 2004, 18:33
What I said wasn't clear. Expand was already working fine, but inflate didn't. Now both work fine. However, if both can be used to enlarge a mask, they have different behavior :

Expand will give a pixel the value of it's higher neighbour ( including itself ), whereas Inflate will give the value of the mean of the surrounding pixels, if that mean is higher than the original pixel ( else it left it untouched ).

For the bugreport, I'm going to a party right now, so could you please meanwhile post an avs script, because I didn't understand what you're doing. And also, consider that MaskedMerge merge each channel independently, and that by default, U and V are left untouched, and that in Binarize, all planes are processed by default ( In fact, I strongly suspect (Edit : read "I strongly doubt there is" )a bug in binarize, the function is too simple for that, however the behavior of MaskedMerge is really tricky )

bond
29th February 2004, 18:48
i uploaded samples showing the behaviour here (http://8ung.at/bond/red.zip)

1.png shows how frame #1 and 2 look like
2.png shows frame #3+

(btw how can i color the black parts, as i assume they are also treated like the visible red colored parts?)

this is the used testing script:

LoadPlugin("C:\...\mpegdecoder.dll")
LoadPlugin("C:\...\MaskTools.dll")
LoadPlugin("C:\...\SimpleResizeYV12.dll")

mpegsource("C:\...\movie.d2v")
trim(136757,145073)
crop(2,82,716,416)
HybridFupp(640,256,255)

function HybridFupp(clip input, int width, int height, int "sharpness")

{
resizemask = input.SimpleResize(width,height).edgemask(2,2,255,255,"sobel",y=3,u=1,v=1).inflate().ConvertToRGB32()
MoMask = input.SimpleResize(width,height).motionmask(25,25,255,255,22,y=3,u=1,v=1).inflate().converttorgb32()
DarkMasked = input.SimpleResize(width,height).Binarize(threshold=35,upper=true).Deflate().converttorgb32()

soft = input.SimpleResize(width, height).ConvertToRGB32()
MEdgesharp = Mask(input.SimpleResize(width, height).ConvertToRGB32(), resizemask)
MMotionblur = Mask(input.SimpleResize(width, height).ConvertToRGB32(), MoMask)
Dark = Mask(input.SimpleResize(width,height).ConvertToRGB32().RGBAdjust(5, 1, 1, 1), DarkMasked)

Addedgedsharp = Layer(soft, MEdgesharp, "add", sharpness)
AddMotionblur = Layer(Addedgedsharp , MMotionblur, "add", 255)
AddDarkblur = Layer(AddMotionblur , Dark, "add", 255)
return AddDarkblur
}

Originally posted by Manao
What I said wasn't clear. Expand was already working fine, but inflate didn't. Now both work fine. However, if both can be used to enlarge a mask, they have different behavior :

Expand will give a pixel the value of it's higher neighbour ( including itself ), whereas Inflate will give the value of the mean of the surrounding pixels, if that mean is higher than the original pixel ( else it left it untouched )ok i see, there is a big difference between inflate and expand
expand enlarges the mask _a lot_ more than inflate, too much for my taste (even if i lower the sharpening thresold) inflate with lower threshold seems somehow more accurate imho

btw hope you enjoyed the party ;)

FuPP
29th February 2004, 22:46
You seem to have a very strange version of HybridFuPP... ;)

Manao
1st March 2004, 01:20
I did enjoy it :)

For your issue : from my tests, the error do not come from Binarize. It comes from :
- deflate / inflate, used with default parameters ( which means that u = v = 1, so U and V planes are unpredictable )
- the combo converttorgb32 / mask, which seems not to put the luma of the mask into the alpha of the clip.

But it's late, I may be wrong. We'll see tomorrow.

Manao
1st March 2004, 10:20
At last, I found the what was happening.

It's not in the masktools however, it's in greyscale(), which doesn't have the same behavior in RGB32 and in YV12. By that, I mean the following ( input is a YV12 clip )input.binarize(upper=true,threshold=1).greyscale()
is totally identical to
input.binarize(upper=true,threshold=1,u=-128).greyscale()
but not to
input.binarize(upper=true,threshold=1).converttorgb32().greyscale()
and neither to
input.binarize(upper=true,threshold=1,u=-128).converttorgb32().greyscale()
which also differs from third one.
It's not a bug, it's just that switching from one color space to another is not a lossless operation, not only in regards to rounding.

So what was happening for you was that after the inflate(), you could not know what was in the U and V planes. It happened to have non zero value, which disturbed the creation of the Mask( which is a greyscale put in the alpha plane ). Hence, your mask was greyish, not black and white, hence all your picture was sometime redish.

You can avoid that by specifying inside the inflate / deflate, either u=-0 and v=-0, or u=3 and v=3 ( the first one is faster )

Edit : And, BTW, did you know that :mask = input.createmask().converttorgb32()
soft = input.blur(1).converttorgb32()
maskedclip = Mask(soft,mask)
return Layer(input.converttorgb32(),maskedclip,"add",255)is (almost) equivalent tomask = input.createmask()
soft = input.blur(1)
return input.MaskedMerge(soft,mask,y=3,u=3,v=3)Except for the rounding approximations ? But it's a lot faster, because there are no color conversions

m0rtal
1st March 2004, 10:30
link to the 0.71b leads to Error 403 page:

Le site demandé n'est pas accessible par cette url.
Le webmaster du site n'a pas nommé correctement sa page d'accueil.

Translate:

The required site is not accessible by this URL.
The webmaster of the site did not name its banner page correctly.

Manao
1st March 2004, 10:33
Right clic on the link, save as. Also, purge your browser's cache because it'll still remember that the link leads to error.htm.

m0rtal
1st March 2004, 10:38
Manao
done, thanks for help! :thanks:

bond
1st March 2004, 16:05
Originally posted by Manao
You can avoid that by specifying inside the inflate / deflate, either u=-0 and v=-0, or u=3 and v=3 ( the first one is faster ) hm when using .Deflate(u=-0,v=-0) or with u,v=3 i the all frames are red :(

And, BTW, did you know that... yes, i only use layer() for testing cause i cant use .RGBAdjust(5, 1, 1, 1) with maskedmerge(), which requires YV12 input...

do you know a nice way to color the masks with YV12?

Manao
1st March 2004, 17:27
Sorry for the u = v = -0, it was u = v = -128. With u = v = -0, the mask ( after converttorgb32().greyscale() is not black & white, but dark grey & light grey ), that's why you still were getting a redish clip.

To color a mask in YV12, there are afaik no other solutions than converting to rgb32 and then going back to yv12. But you can do it that way : red = input.converttorgb32().rgbadjust(5,1,1,1).converttoyv12()
mask = input.createmask()
return input.MaskedMerge(red,mask,y=3,u=3,v=3)It will still be faster than doing all the operation in RGB32, because data are easier to manipulate, also because there are twice less data to handle, and because you're converting only one clip to rgb.

bond
1st March 2004, 17:43
Originally posted by Manao
Sorry for the u = v = -0, it was u = v = -128. With u = v = -0, the mask ( after converttorgb32().greyscale() is not black & white, but dark grey & light grey ), that's why you still were getting a redish clip.worked, thanks :)

hm last question: is this problem only there because i did the color conversion and therefore will not happen with yv12 only or should i use .Deflate(u=-128,v=-128) also with YV12/maskedmerge?

Manao
1st March 2004, 17:53
It is due to color conversions. In YV12, MaskedMerge is a lot more powerful than Layer, since it allows three different masks, one for each planes, and you can choose the ones being considered. So you don't have to care about u and v parameters of previous filters in the chain if in MaskedMerge, you keep these two planes intact.

bond
1st March 2004, 18:07
ok thanks

to sum it up: simply deflate() is enough for hybridfupp

FuPP
1st March 2004, 19:58
@Bond

Why are you still using conversions ? I don't use them anymore since 0.2b !

About greyscale : it seems to me that you had asked why I used it, and I had answered you it was not necessary (I used it formerly to visualize mask during tests, and I had forgotten to remove it). Is there any specific reason you still use it ?

Regards,
FuPP

bond
1st March 2004, 22:19
Originally posted by FuPP
Why are you still using conversions ? I don't use them anymore since 0.2b ! as i said simply to be able to mark he different masks with adjustrgb
with the final script i will use maskmerge() of course

About greyscale : it seems to me that you had asked why I used it, and I had answered you it was not necessary (I used it formerly to visualize mask during tests, and I had forgotten to remove it). Is there any specific reason you still use it ?hm, where do i use it?

FuPP
2nd March 2004, 00:56
hum, it seems I have read the posts too quickly (I was in a hurry when I did) : I missed your explanations about RGBadjust and have been confused by Manao explanation :

It's not in the masktools however, it's in greyscale(), which doesn't have the same behavior in RGB32 and in YV12.

Sorry for that ;)

Regards,
FuPP

bond
5th March 2004, 21:39
i played now with the filtering of dark scenes (via binarize()) and it seems to work fine

for testing i choose unfilter(-150,-150), i didnt try blindpp() cause i dont use mpeg2dec3, but mpegdecoder (fupp, is there a special reason why you chose blindpp for dark mask filtering?)

my results with this unfilter setting, binarize(threshold=35) and putting the darkmask on top of/after the edge and motion mask i got a compressibility increase of about 6%
when comparing the script output with the one not using darkmasking its of course seeable that some dark parts are strongly smoothed but i wonder if these details could be seen anyways? also if these details are somewhere in the background...

hope some people do testing and report their findings (any other opinions how to best filter dark areas?) as i think this masking stuff and hybridfupp is simply great :)

kwag
6th March 2004, 03:24
@FuPP,

Please take a look at my second post here: http://www.kvcd.net/forum/viewtopic.php?t=9063&postdays=0&postorder=asc&start=64


-kwag

Manao
6th March 2004, 09:37
@all : I think he is currently in holidays, so you'll have to wait a little.

bond
6th March 2004, 10:18
lo kwag

maybe i am blind, but i dont see what you see on these screenshots :confused:
can you plz describe a little bit better what you mean :)

but from your description i think you mean a ghosting effect, which can be due to some too strong temporal filtering (too high fluxsmooth values, which shouldnt be the case with the "high" preset tough)

also troubles can happen with scene changes if the scene change value is not right set to detect the scene change:
the lower the scene change value the more often scene changes are detected/the less (high-)motion is detected as motion but as scene change (meaning you get lower compressibility)
if the value is too high every high-motion is detected as motion and therefore blurred as it should be, but also the scene changes are detected as high-motion and not as scene changes and therefore the scene change frame is blurred strongly
you see its a trade-off :(

in the latest script fupp uses by default 33 as scenechange threshold, which is pretty strong (meaning high-motion is detected correctly, but scene changes are not)
i use a value of 22