View Full Version : HybridFuPP 0.98a (11/18/2007)


FuPP
18th November 2007, 19:47
Here is a new version of this script :)

Download HybridFuPP 0.98a (http://www.unite-video.com/phpbb/download.php?id=2144)

Including : miscellaneous improvements, dll updates (which enables multithreading...), and a few new concepts related to my will to influate as strongly as possible on codecs behaviour, in order to get the best possible encoded picture.

And this is the reason why I have worked on this "best possible picture" concept (always subjective...), trying a kind of psycho-visual approach : I have tried to isolate what my eyes looked first in a motion picture (an what they looked less) and have included my conclusions in that script. Of course, all of this is purely empirical :)

Some of these concepts are included in preset HybridQ, but you can of course use all of them with other presets, you will have then to add some parameters beside the preset.


New parameters :

auto resizer adjustment : when activated, used resizer will be automatically degraded where the script estimates it is possible : it means for instance that even if you have chosen a lanczos resizer, a bicubic resizer could be possibly applied on some parts of the picture (where the script estimates that only a few details will be lost)

ARadjust = true/false


Edges Enhancement Automatic settings : when used, the script will calculate automatically (according to your source size, target size and type of resizer used) best edges enhancement settings : this enables keeping automatically a sharp picture even when downsizing (ex : 720 * 432 -> 608 * 256)

E_Auto_Str : true / false


Deblocking Motion Only : when you have a medium quality source, you can sometimes see blocks when picture is in motion. This setting enables to deblock only moving parts of the picture. That way, static areas are kept untouched (deblocking causes often softness even where blocks are barely visible)

DB_M_Only = true / false


Skin Processing : when some faces are present on a picture, your eye will give priority to them rather than to the background, for instance. That is the reason why I have implemented a skin detection mask and have enhanced that parts of the picture, forcing the codec to allocate more bits to them. Faces are therefore more detailed.

Skin = true / false
Skin_Type : 0 (=auto, adaptive), 1 (warm colored skins), 2 (cold colored skins) -> depends on the type of light used in the scene


Dark Scenes Enhancer : some codecs (like MPEG4-ASP) are not always efficient on dark scenes ; encoded picture is sometimes abnormally blured. This new function will improve this

DS_Enh_Thr : max luma threshold where effect will be applied


rem 1 : Because of some performance issues, parameter used to control both dark scenes and skin enhancement strength is the same : Enh_Str

rem 2 : Neither Motion Only Deblocking nor Dark Scenes Enhancement are activated by default in presets.

rem 3 : For now, supplied documentation is the 0.92b one.

rem 4 : MT ( SetMTMode(2,0) ) can be used with HybridFuPP : it causes a huge boost in performances for multi cores or processors owners


In summary : if you want to discover latest functionalities, I suggest you to use preset 'HybridQ', without changing parameters for the beginning (excepted if you want to activate Motion Only Deblocking [deblock=true, DB_M_Only=true] or dark scenes enhancer [DS_Enh = true])

Preset HybridQ has been mainly optimised for 2 pass encodes and low bitrates (500 - 700 with XVID, for instance)



Regards,

FuPP


ps : You MUST use supplied dll to get the script working correctly

EDIT : added addgrain.dll in the archive...

buzzqw
18th November 2007, 20:02
:thanks: FuPP!

thanks for let us playing with your script again!

BHH

Adub
18th November 2007, 20:50
You rule FuPP! I can't wait to play with this!

FuPP
19th November 2007, 00:24
So, have both a good play ;)

Terranigma
19th November 2007, 01:05
Thanks a lot for this script/filter. :D
Pure genius. :)

FuPP
20th November 2007, 09:31
Pure genius. :)

I'm afraid I'm definitely not :)

@all : any feedback ? I guess there are probably a few things to tweak a litlle bit...

Spuds
20th November 2007, 20:16
Fupp,

Here are a few thoughts as I look at the script, which is awesome, I keep learning from it each time I look !

Have you considered other than deen for the initial static clip generation, to me deen is difficult to control on details and given you are doing lots of mask work a less destructive denoiser for the initial static clip seems appropriate, like removegrain(mode 4/5/17). Granted you have made it very easy to change :)

I'm a little confused on the D2 mask, probably have not looked at it enough to see how its being used in its full context. Currently its mt_logic(mt_lutf(clip, clip, "avg", "x 75 <= 255 0 ?"), mt_logic(DM(Clip, DS_Enh_Thr),DM(Clip, D_Thr+8), "xor"), "and") I don't think much if anything is going to get through that mt_lutf expression, well maybe some dark reds ... should the x be y or is it defensive by nature?

Function mdenoise, I think mvdegrain1 would do a better job than mvdenoise plus you get idx capability for a performance boost.

In the motion mask creation MM , it has gamma=50. I thought gamma was only 1 or 2 for linear or quadratic, perhaps I've misunderstood.

FuPP
20th November 2007, 23:43
Have you considered other than deen for the initial static clip generation

Yes I did. But did not find time to test extensively other ones (like fft3dfilter or removegrain). Moreover I don't think deen is a bad one. It is quite versatile and, if correctly used, gives good results. You will notice that settings I use are quite conservative (radius = 1, min = 0.1).

Of course some others are probably better (and more sophisticated) but I will include them only after testing and if I am sure that they do not give too much speed penalty.

Of course, you know that you can change the denoiser used in HybridFuPP 'on the fly'

HybridFuPP([width], [height], preset = "[Whatever you like]", N2="fft3dfilter(blah blah blah)")

Or you can use HybridFuPP([width], [height], preset = "[Whatever you like]", N1="fft3dfilter(blah blah blah)", N2="")if you prefer denoising before resizing

given you are doing lots of mask work a less destructive denoiser for the initial static clip seems appropriate

Not sure to get you here... the initially denoised frame is covered by frames sometimes blured, sometimes by non denoised frames, or sometimes by frames with noise added, so what is the problem ? :)

mt_lutf(clip, clip, "avg", "x 75 <= 255 0 ?")

will return sometimes a white frame, sometimes a black one :)


Of course, merged with the entire expression, it will return the mask [mt_logic(DM(Clip, DS_Enh_Thr), DM(Clip, D_Thr+8),"xor")], or not (depending average luma). You can do the same using scriptclip(...averageluma() > 75 ? ....)

Function mdenoise, I think mvdegrain1 would do a better job than mvdenoise plus you get idx capability for a performance boost.

No idea, need to test. Not sure to get the point with idx...

In the motion mask creation MM , it has gamma=50. I thought gamma was only 1 or 2 for linear or quadratic, perhaps I've misunderstood.

the more, the less sensitive to noise (not limited to 2 for me)

FuPP

foxyshadis
21st November 2007, 00:45
Definitely look at MVDegrain; MVDenoise hasn't been worked on in some time and produces artifacts from time to time, and it is slower. The mvtools docs have some good info on how idx is used to speed up subpixel searches.

As for deen, the only filter I know with comprable speed and denoising ability is probably vaguedenoiser, but I think deen does a fine job as used here.

FuPP
21st November 2007, 01:01
Hi,

Will look at MVDegrain. Spuds talks about mvdegrain1. Is it a typo or a different one ?

FuPP

Spuds
21st November 2007, 02:26
Its either MVDeGrain1 or MVDeGrain2 (and if Fizick's comes through a mvdegrain3 some day!).

MVDeGrain1 -- uses one forward and one backward, like what you have now.
MVDeGrain2 -- uses two forward and two backward, better but slower.

The idx parameter is a kind of buffer, prevents the function from having to recompute a vector if it already did it on the previous frame.

Not sure to get you here... the initially denoised frame is covered by frames sometimes blured, sometimes by non denoised frames, or sometimes by frames with noise added, so what is the problem ?
That was my point, I think :) ... why start with a frame that deen kind of smoothed the details out of IMO. I like deen a lot but even with the 'gentile' parameters you set I think it removes to much.

will return sometimes a white frame, sometimes a black one
So its very defensive by nature ... from my limited testing there is not much is getting through that mask, need to try some really dark clips so I better understand.

Thanks!

FuPP
21st November 2007, 18:50
I have included here a few snapshots showing what this new version can do for you :) Encoded with XVID @ ~600 kbps

1 - picture 1 : simple lanczos
2 - picture 1 : HybridFuPP (preset HybridQ)
3 - picture 2 : simple lanczos
4 - picture 2 : HybridFuPP (preset HybridQ)

FuPP

edit : snapshots description

Terranigma
21st November 2007, 20:55
Well right now, they're appending approval. I have a few suggestions if you don't mind. Could you make it so that we could use resolutions divisble by 2 instead of 4 (or is there some sort of admonition preventing this from being possible?) Also, could you possibly add spline16/36 as possible resizing methods?

FuPP
21st November 2007, 22:51
mod 2 should be now possible (If I remember correctly, it was an avisynth limitation, not sure though).

Spline36 is already available : use HybridFuPP(...,...,Resizer=6)

FuPP

Spuds
21st November 2007, 23:33
I think for mod 2 to work you would have to convert out of yv12 colorspace and then back to it in the resizer function.

Also an update the blocksize logic to allow for a %2 option else mvanalyse will not be happy.

There is also the assert statement that would need to allow a %2 to pass.

FuPP
22nd November 2007, 14:02
@Spuds : Thanks for your suggestions : I have never understood what all that lines in the script meant and your guidance could be precious :p (just joking :) )

I'm not a fan of silent conversions (if they are needed) but will think about that.

linx05
22nd November 2007, 15:03
Thank you so much for the update! I'm not too all knowing about avisynth but your script helps me so much!

Spuds
22nd November 2007, 16:24
@Fupp ... Well there are so many lines in the function it was obvious to me that you had forgotten how it worked. Glad I could help you out :p

Honestly I took your 'should now' statement as currently capable not as should now be 'do-able' if that makes sense. I'll stop helping now, don't need another poke in the old eye :)

FuPP
22nd November 2007, 20:36
@Spuds : Any help is always welcome :)

@linx05 : Thanks !

Has anyone tested this new version ? Comments or suggestions would be welcome too !

FuPP

EasyStart
29th December 2007, 14:11
I have a problem when running HybridFupp in multi threaded mode. My avs file displays about half a second of video and then Windows Media Classic closes by itself. Here's my avs statement


mt("""HybridFuPP( preset="HybridQ" )""", threads=4 )


It is fine when I run HybridFupp without mt().

Easystart

FuPP
31st December 2007, 15:11
Hi,

I'm afraid that using MT with HybridFuPP that way is not a good idea. You should rather try :

SetMTMode(2,0)
HybridFuPP(...)

FuPP

Razorholt
30th March 2008, 17:51
What are the parameters that are contributing to the compressiblity? Can someone please give me some examples? I'm running compressibility tests over there: http://forum.doom9.org/showthread.php?t=136363

Thanks,
- Dan

FuPP
31st March 2008, 23:47
Hi,

You could try something like :

HybridFuPP(width,height,preset="HybridQ",E_Auto_Str=false,E_Str_X=35,E_Str_Y=20)
or
HybridFuPP(width,height,preset="HybridQ",skin=false,E_Auto_Str=false,E_Str_X=35,E_Str_Y=20)

reduce E_Str_X and E_Str_Y to get more compression (but get less sharpness)


FuPP

Adub
27th August 2008, 20:27
*puts on necromancer hat*

Yo Fupp!!

I found a small bug in the latest HybridFupp. It occurs when downscaling a 1280x720p video source using the "anime1" preset to 848x480.

It has to do with E_Auto_Str being enabled, and it's calculations result in a pretty high number (199) for E_str_x, which is then passed to unfilter. The result of this is that edges light up like Christmas trees.

Tracking down the bug is as far as I can manage, as I don't understand the mathematics of calculating the respective E_str_x and E_str_y.

*takes off necromancer hat*

rkalwaitis
7th February 2009, 15:18
Will there be any updating of this script? I think it is pretty good and a bit quicker than others I have used.

rkalwaitis
14th February 2009, 08:46
Ive reread all of the write-ups with this script and noticed that it was designed to work with the XVID codec in a bitrate range of 500 to 800. What matrix is recommend for the script and what were the XVID settings?

FuPP
14th February 2009, 10:49
Can't remember having said that... I have simply said that "Preset HybridQ has been mainly optimised for 2 pass encodes and low bitrates (500 - 700 with XVID, for instance)".

HybridFuPP can be used with any kind of codec, with any kind of bitrate range and any settings :)

FuPP

rkalwaitis
14th February 2009, 16:50
Oh my bad, optimized for two pass xvid was the example. I took it to be just for xvid. I must be honest, having read that I tried one of my older movies using your script and xvid at 700kbps. Very nice results. I never had much luck with making really nice xvid products. None of the usual blur and blocks. So far I don't seem to have to worry about what quantization matrix to use. I will of course play more with this. This seems to do the trick, without being miserably slow. (I use VirtualDub of course via avisynth)

What do I need to change to enhance the sharpness just a tad. This---E_Auto_Str=false, E_Str_X=??, E_Str_Y=??. Not sure what X and Y should be. I think the default is x=40 and y = 25. The higher the numbers the sharper the image?

Any chance of a show function that displays before and after images side by side, so the change is much easier to see? Similar to Lato's MCTemporalDenoise.

Awesome script. Thanks for the hard work

Robert

FuPP
16th February 2009, 01:14
E_Str_X and E_Str_Y are used to set horizontal and vertical sharpening strength. The higher, the stronger.

E_Auto_Str normally allows an automatic calculation of E_Str_X and E_Str_Y parameters when set to true. It is broken in HybridFuPP 0.98a (hey, it is alpha...;)).

About show function : there are already a lot of things that can be shown when using HybridFuPP. Simply use show="..." inside the command line (for instance, show="EM" will display Edge mask and Motion)

E : Edges
M : Motion
R : Deringing areas
D : Dark areas
X : Dark scenes enhancement areas
B : Bright areas
S : Skin detected areas
A : Auto-adjusted resizer algorithm areas

P : display all parameters currently used

All of them can be combined...


Any chance of a show function that displays before and after images side by side

But I can do that :)

FuPP
16th February 2009, 11:30
except that source clip and final one will not always have the same size :(

This is then not easy to "stack" them.

FuPP

rkalwaitis
16th February 2009, 22:17
okay ill play with the sharpening aspect of it. Although Im not the best with scripting, perhaps I can come up with something similar to what Lato does with his scripts. If he doesnt mind helping me out a bit. Ill have to ask him.

K

rkalwaitis
16th February 2009, 23:55
Yes your show option is very nice that is what I was thinking about, but stack over the original input or side by side.

FuPP
17th February 2009, 01:06
@rkalwaitis : I did that for you (quickly done, maybe buggy)

use show="-" (ie 'minus') for a vertically stacked comparison
show="|" (ie 'pipe') for a horizontally stacked comparison
show="/" (ie 'slash') for a comparison using interleaved frames

All these modes can be combined with other parameters in command show (ex : show "EM/")

edit : sorry, need to find a way to host the file...

FuPP
17th February 2009, 01:22
here it is : HybridFuPP 0.983a (http://files.filefront.com/HybridFuPPavsi/;13309703;/fileinfo.html)

rkalwaitis
17th February 2009, 07:54
oooh a new toy, thanks FuPP, you rock
Ill play with it and let you know what I think.

K

rkalwaitis
20th February 2009, 08:27
FuPP, messed around with the E_Str_X and E_Str_Y settings a bit. I noticed that the preset of 46,46 used by anime1 and your anime2 seemed to provide the best results even on non anime(I think I read that right). What I did was upped the values to to 55,55 and upped E_Str_N to 9. I also added an edgesmooth fast function after the hybrid call.

My script looked like this. Is this crazy? The edgesmoothfast function needs the sangnom.dll and was not set to hiQ as it seemed to oversmooth a bit although the picture was quite pleasing. Dont worry about the pc2tv function. That is just me playing around.

Import("C:\Users\baba\Desktop\HybridFuPP\HybridFuPP.avsi")
LoadPlugin("C:\Users\baba\Desktop\HybridFuPP\UnFilter.dll")
LoadPlugin("C:\Users\baba\Desktop\HybridFuPP\mvtools.dll")
LoadPlugin("C:\Users\baba\Desktop\HybridFuPP\mt_masktools.dll")
LoadPlugin("C:\Users\baba\Desktop\HybridFuPP\deen.dll")
LoadPlugin("C:\Users\baba\Desktop\HybridFuPP\AddGrain.dll")
LoadPlugin("C:\Users\baba\Desktop\MCTemporalDenoise\SangNom.dll")##needed for edgesmoothfaster
LoadPlugin("C:\Users\baba\Desktop\SeeSaw\MaskTools.dll")##needed for pc2tv
LoadPlugin("C:\Users\baba\Desktop\SeeSaw\RSharpenSSE2.dll")##needed for pc2tv
LoadPlugin("C:\Users\baba\Desktop\SeeSaw\RepairSSE2.dll")##needed for pc2tv
LoadPlugin("C:\Users\baba\Desktop\SeeSaw\RemoveGrainSSE2.dll")##needed for pc2tv
LoadPlugin("C:\Users\baba\Desktop\SeeSaw\DenoiseSharpen.dll")##needed for pc2tv

DGDecode_mpeg2source("C:\Users\baba\Desktop\FuPP\VTS_02_1.d2v", cpu=4, info=3)
ColorMatrix(hints=true, threads=0)

function EdgeSmoothFast(clip clp, int "strength", bool "hiQ", bool "twoway")###a Didee function I ran across
{
str = default( strength, 48 )
hiQ = default( hiQ, false )
twoway = default( twoway, false )

xpos = hiQ ? 0.5 : 0.0
xmul = hiQ ? 2 : 1
ox = clp.width()
oy = clp.height()

clp.pointresize(ox*xmul,oy*2)
sangnom(order=0,aa=str)
twoway ? ( hiQ ? turnleft().sangnom(order=1,aa=str).turnright().bicubicresize(ox,oy, 0.0,0.5, 0.5,0.5,ox*2,oy*2)
\ : bicubicresize(ox,oy, 0.0,0.5, 0,0.5,ox,oy*2).turnleft()
\ .pointresize(oy,ox*2).sangnom(order=0,aa=str).bicubicresize(oy,ox, 0.0,0.5, 0.5,0.5,oy,ox*2).turnright()
\ ) : bicubicresize(ox,oy, 0.0,0.5, 0,0.5,ox*xmul,oy*2)
}


function pc2tv_smooth(clip clp)###a Didee function I ran across
{
pc2tv = clp.coloryuv(levels="PC->TV")
pc2tvd=yv12lutxy(clp,pc2tv,"x y - 4 * 128 +","x y - 4 * 128 +","x y - 4 * 128 +",U=3,V=3)
yv12lutxy(clp,pc2tvd.removegrain(19),"x y 128 - 4 / -","x y 128 - 4 / -","x y 128 - 4 / -",U=3,V=3)
}

HybridFupp(preset="HybridQ",E_Auto_Str=false,E_Str_X=55,E_Str_Y=55,E_Str_N=9).EdgeSmoothFast().pc2tv_smooth()

FuPP
20th February 2009, 12:00
I don't know EdgeSmoothFast() function but I suppose it is a kind of anti-aliasing filter, right ?

As sharpening with HybridFuPP using high strength can cause aliasing, it can be a good idea to use this function after mine (hard to say without being able to see the result, with and without EdgeSmoothFast, though).

Be careful using E_Str_N : il produces grain on edges, forcing the codec (when encoding) to allocate more bits on edges, but can probably cause mosquito noise if too strong. The result will depend on the codec and bitrate used.

E_Str_N is a bit experimental and not useful when bitrate is sufficient.

FuPP

rkalwaitis
20th February 2009, 17:15
Here is the function

function EdgeSmoothFast(clip clp, int "strength", bool "hiQ", bool "twoway")
{
str = default( strength, 48 )
hiQ = default( hiQ, false )
twoway = default( twoway, false )

xpos = hiQ ? 0.5 : 0.0
xmul = hiQ ? 2 : 1
ox = clp.width()
oy = clp.height()

clp.pointresize(ox*xmul,oy*2)
sangnom(order=0,aa=str)
twoway ? ( hiQ ? turnleft().sangnom(order=1,aa=str).turnright().bicubicresize(ox,oy, 0.0,0.5, 0.5,0.5,ox*2,oy*2)
\ : bicubicresize(ox,oy, 0.0,0.5, 0,0.5,ox,oy*2).turnleft()
\ .pointresize(oy,ox*2).sangnom(order=0,aa=str).bicubicresize(oy,ox, 0.0,0.5, 0.5,0.5,oy,ox*2).turnright()
\ ) : bicubicresize(ox,oy, 0.0,0.5, 0,0.5,ox*xmul,oy*2)
}

rkalwaitis
20th February 2009, 17:18
E_Str_N with to high of settings I did not know. Thanks.

How do I keep my resizer or just have hybridfupp simply not resize?

Spline64Resize seems to keep more detail than other resizers. Would this be an option for HQ or Hybrid preset?

Thanks for the help
K

FuPP
20th February 2009, 17:59
HybridFuPP offers a wide choice of resizers. Put width and height in the command line and force resizer if needed

ex : HybridFupp(704,200, preset="HybridQ", resizer = 6, E_Auto_Str=false, E_Str_X=55, E_Str_Y=55, E_Str_N=9)

Resizer = 0 : BilinearResize
Resizer = 1 : BicubicResize(0.333, 0.333)
Resizer = 2 : BicubicResize(0.2, 0.4)
Resizer = 3 : BicubicResize(0, 0.5)
Resizer = 4 : BicubicResize(0, 0.6)
Resizer = 5 : LanczosResize
Resizer = 6 : Spline36Resize

I can add Spline64Resize if you wish.

if you force resizer to something between 3 and 6, you may want to reduce E_Str_X and E_Str_Y strength.

Be aware that using hybridQ, the script will automatically switch to a softer resizer in some areas of the picture (where it estimates it can do it without losing to much details). If you want to disable this behaviour, use ARAdjust = false.

HybridQ is really optimized for low bitrates encodes but you can try it with higher bitrates and see if it fits to you. Other presets (except animes ones) are more conventionnal.

rkalwaitis
20th February 2009, 23:25
AHA that is the trick. I could not figure out how to turn off the switching between resizers. ARAdjust = false. About adding Spline64Resize, I like that resizer. I almost always use it. Is there much of a difference between it and Spline36Resize? Isnt your listing of resizers in order of detail retained. I guess spline36 is next in the line if it how your resizers go. So in short yes please add it so I can monkey around with it.

Thanks
K

FuPP
21st February 2009, 00:41
here it is :

HybridFuPP 0.984a (http://postdownload.filefront.com/13333398//593c354a0e44b04c3de3f5f0a08dc1a0837b2f7832929157c3b54a9d462692e2bdfb280d1f996aba)

Regards,

FuPP

rkalwaitis
21st February 2009, 06:52
okay gonna run a test and compare. Thanks

K

rkalwaitis
21st February 2009, 23:00
I really like being able to use only the spline64resize option throughout the entire movie. It seems (to me) to give a much better picture. I edited my copy of the script to make one of your bicubic resize filters 0,0.75. It was 0,0.66. I assume it was the bicubic sharp resizer. So Ive noticed that the bicubic sharp setting is usually 0.075. I tried to use the N1 and N2 functions with some successes(at least I think so) and some failures. I was trying to LRemoveDust(17,2) or (4,2) and I would get colored bands across the image. Not sure if it was caused by the function itself or by the removegrain package used by those functions. I did have some very good results using degrainmedian and no banding (it was blue lines going horizontally across the image. The were 4 or 5 of them.

rkalwaitis
22nd February 2009, 15:30
I tried to use HybridFupp with my MT dll version of avisynth and it does not allow for spline64resize, just for your info. I dont understand why, but that is the case. Ill look for a plugin.

K

Reuf Toc
22nd February 2009, 16:19
Spline64resize was introduced in avisynth rev 2.58 and IIRC the MT version of avisynth is based on v2.57, that's why it doesn't work

FuPP
22nd February 2009, 19:59
Bicubic resize starts to ring when c is above 0.6 this is the reason why it seems more rational to switch then to lanczos.

About your problems with external denoisers : try first tu use them without HybridFuPP with same settings and same picture size ans see if you get the same or not.

MT : there is a non official 2.5.8 with MT enabled. You should find it easely in the same forum. Fyi, I get sometimes some random crashes when using HybridFuPP with MT (did not test with 2.5.8 MT enabled though).

FuPP

rkalwaitis
22nd February 2009, 20:00
Thanks Reuf Toc. Ill just look for it another way :) FuPP I like the show functions. I like to see the side by side/top and bottom comparison as I change the settings for your script. I use MPC to play the avs file. I suppose I should use AVSEdit.

rkalwaitis
22nd February 2009, 20:51
Okay Ill change the setting back on the resize. Also I did not know about the other 2.5.8 MT Ill check it out.

Ill play with the external renoisers and see what the issues are and try to let you know. Ill try to figure out how to post images on this site so you can see.

thanks FuPP, you are as always great for helping.

K

rkalwaitis
22nd February 2009, 23:11
0.984a is missing skin_type in the function command line. I just added it to the version I have and it worked.

rkalwaitis
22nd February 2009, 23:23
FuPP

I was using the following settings.

HybridFuPP(MP_Mode=2,fast=true,S_str=11,T_str=4,E_Auto_Str=false,Skin_Type=0,Skin=True,E_Str_X=5,E_str_Y=5,preset="medium", ARAdjust=false)

x264 codec 950kbps. I was previewing the output and noticed that there were black dashes in the sky. I removed every command in call until they disappeared. Turns out the culprit is the fast true option. Not one or two little dashes but multiple and very noticeable.

Im still testing stuff.

K

FuPP
22nd February 2009, 23:25
Skin_type should not exist anymore. Did avisynth throw you an error ?

FuPP
22nd February 2009, 23:38
About "dashes", did you edit the script or are you using 0.894a I have posted ?

I would need a piece of your source please.

FuPP

edit : I have tried your chain : can't see any dashes on my test clip...
edit2 : plugins versions, please ?

rkalwaitis
23rd February 2009, 07:21
yes i did use 0.894a. Skin type and using it did not through an error. I will remove it from my function call. Dashes = 0984a. I will try to figure out how to upload the things you need.

Adub
23rd February 2009, 09:18
Fupp,

Did you by chance look into this bug that I reported earlier? http://forum.doom9.org/showthread.php?p=1176145#post1176145

rkalwaitis
23rd February 2009, 10:08
Okay skin doesnt work when i call it now. It helps to remove the autoload earlier version from the directory :(

what site is used to put your photos and files on so I can add them to my posts? Is it free? I like free....it makes me feel warm all over.

FuPP
23rd February 2009, 10:40
@Merlin7777 : yes, I will look at it :)

@rkalwaitis : look at http://uploadhosted.filefront.com/

FuPP
23rd February 2009, 20:30
erm... nice ! But what am I supposed to see ?

Ideally, what I need is a clip (maybe 250 frames of your source) where I can see those "dashes" when using the same parameters than you :)

rkalwaitis
23rd February 2009, 20:59
Im Trying but its not working for me. Im still trying(filefront). But I think I figured out the dashes. I switched to Megui to encode and they are gone there in preview and encoded. The dashes appeared in Virtualdub. So I dont know. Ive been playing with the show functions, very nice. Additionally this whole time I thought I had been using spline64resize(dropped mt avisynth), I turned off the ARA, but forgot to change the default resizer. Im getting better results each time. You were correct the skin option is true or false seems to be off. not throwing any erros, but skin type may be working still? I dont know?

FuPP
23rd February 2009, 21:17
skin_type switch is no more necessary because it is now automatically evaluated. this is the reason why I have removed it from parameters list.

FuPP

rkalwaitis
23rd February 2009, 23:21
ah I understand. One of the older HybridFuPP.avs files required asharp be used. Is this still the case. The only sharp plugin I saw in the script is unfilter. Is this still correct?

FuPP
23rd February 2009, 23:31
I can't remember having ever used asharp :confused:

Maybe you want to talk about msharpen ? It is not necessary anymore.

FuPP

Leak
24th February 2009, 13:16
That was a test of me playing around, so I can learn how show you things im talking about. The next ones will be more constructive.
Before you do ANYTHING else: please test (and learn to use) that "Edit" button on your own posts.

Posting several times in a row instead of editing your last post is considered rude on just about any forum - just extend your last post if you forgot something, and delete your second post if you accidentally post twice in a row (or make an empty post like you did a few posts up).

(Note: it's totally legit to make a second post in a row a few days later since editing won't mark the thread as updated...)

rkalwaitis
24th February 2009, 17:04
Thanks Leak

Thanks Fupp

leiming2006
25th February 2009, 03:37
Fatal error: Call to undefined function: mysql_connect() in /home/mwiprod/unite-video/phpbb/db/mysql4.php on line 48

aNToK
25th February 2009, 08:15
Love to try this one, but I get an invalid call to function "deen" in line 235 according to virtualdub. The first post mentions using the "supplied" .dll, but I'm unable to find it. Would that be in the link at the top of the post? It doesn't seem to be working. (same as above post?)

FuPP
25th February 2009, 08:27
HybridFuPP Plugins and Doc (http://files.filefront.com/HybridFuPP+Plugins+and+Doczip/;13362783;/fileinfo.html)

Doc is 0.92b one. Please read post #1 of this thread to see major improvements and new parameters.

FuPP

rkalwaitis
25th February 2009, 20:36
Fupp is there a way to turn of the preset low, very low, or whatever, but still use the other functions. I want to use The N1 or N2 functions, but when I change them to my specific choices it seems that the preset is still running.

FuPP
25th February 2009, 21:11
Any parameter called in your command line will overwrite default ones, whatever the preset used. Why do you think yours are not taken into account ? Did you check with show="P" ?

Fupp

edit : Oups ! filters chains are not displayed when using 'Show' (this is pure scandal !) If I catch the guy who made that script, I will ask him to add this...

rkalwaitis
26th February 2009, 11:42
I think its still doing my settings and yours. Ill try again.

FuPP
26th February 2009, 15:50
@ rkalwaitis : ok, let me know...

I have put a little bit of magic in E_Auto_Str for Merlin7777 ;), I think (hope) it is ok now.

And I am going to add a show function to display advanced parameters, ie filtering chains.

And, last, I am updating the whole documentation.

rkalwaitis
26th February 2009, 18:47
You are the man, So E_Auto_Str is back to working? I will put in on true. After I have the advanced parameters show function then I will now if both are working at the same time (my filters and HybridFupp) Thanks for humoring me and telling me how to get rid of my unneeded posts.

You rock as always.

what settings do you recommend for old black and white footage. Its the Duke.

Which script has the fix to E_Auto_Str=true

this one here?
HybridFuPP Plugins and Doc

Just checked out your anime settings and all I can say the default for anime1 nailed it first try, very nice Fupp. Only thing I changed is the resizer to 7 and turned off the ARA Adjust (false). You know Im hooked on that spline64resize.

K

FuPP
26th February 2009, 19:18
Which script has the fix to E_Auto_Str=true

Be patient, I have not posted new version yet :)

what settings do you recommend for old black and white footage
Humm. As far as I can remember, I did not process such material. It depends a lot on your source quality though...

About Spline64 : be aware that using a sharp resizer will improve percepted quality before re-encoding, but can degrade the final result after encoding if bitrate used is not sufficient. It is all a matter of trade-offs...

rkalwaitis
26th February 2009, 19:27
hmmm did not know that about Spline 64. I read somewhere maybe mftoon wrote that if I were to supersample my resizer with a sharpener (ie msharpen) it greatly improves the quality. ex. spline64Resize(1440,960).msharpen().spline64resize(720,480). Ill mess with it and see. I have noticed that since you added the resizer=7(spline64) my products are nicer, but I have to put the parameters to a mod to 16 in the script. Once I change away from the DAR and resize on my own or use a suggested resized size, like in MEGUI. My product suffers and becomes blurry.

# Set DAR in encoder to 108 : 79. The following line is for automatic signalling
global MeGUI_darx = 108
global MeGUI_dary = 79
DGDecode_mpeg2source("C:\Users\baba\Desktop\Testfile\VTS_01_1.d2v", cpu=4, info=3)
ColorMatrix(hints=true, threads=0)

It also adds a bit to encoding speed as you had mentioned. It was a worth tip from you and has paid off for me.


http://www.aquilinestudios.org/avsfilters/sharpeners.html#msharpen here is the link to where I read about keeping a sharper image through resizing, using msharpen. He is an anime guy, but something like that should apply to regular video too.

rkalwaitis
26th February 2009, 21:26
http://img516.imageshack.us/img516/2886/detailg.png


Fupp, the processed clip shown by your show command has loss of detail. Any suggestions of how to get some of it back. Also Im not sure if this is computer generated graphics falls under anime. Does it? At least I think its computer generated.

Thanks K

FuPP
26th February 2009, 23:27
I read somewhere maybe mftoon wrote that if I were to supersample my resizer with a sharpener (ie msharpen) it greatly improves the quality
I'm afraid you did not get it : supersampling before sharpening edges is only a way to avoid aliasing (ie "stairs" effect on edges)... at the cost of speed.

HybridFuPP does edge sharpening (but no supersampling here) as msharpen, but gives you control on horizontal and vertical sharpening strength : for instance, as a DVD source is generally anamorphosed, there is more "information" on vertical axis than on horizontal one ; for this reason, when you need to resize it in a more conventional way, you may want to give less sharpening effect on vertical axis than on the horizontal one.

I have noticed that since you added the resizer=7(spline64) my products are nicer
By the way, if you are happy with spline64, just use it :) ! I simply wanted to make you aware that you have to compare things after encoding and not before, because bitrate and codec (and the way the codec allocates bits...) are very important : a clip resized with a very sharp resizer will oblige the codec to allocate more bits to encode while maintening quality. If the bitrate you can give can't grow (because conditioned by final size for instance), the codec will have then to simplify as it can the frames encoded, and may give you at the end rather bad results (ringing, blocks - especially in moving parts...) And all of this, even if the picture semt to be more beautiful at the beginning :)

Fupp, the processed clip shown by your show command has loss of detail
Preset Anime2 has been designed for strong cleaning and is more adapted to "Disney-Like" Animes. You should give a try to anime1 preset and adapt settings if needed.

rkalwaitis
27th February 2009, 06:03
Thanks Fupp I get it now.

rkalwaitis
27th February 2009, 10:07
http://img144.imageshack.us/img144/9312/detail2.png

Fupp following your advise and changed to anime1 and also changing the EM_Mode to 2. It has retained more detail.

thanks.

FuPP
27th February 2009, 10:38
For that kind of material (CG), you may want to give a try to presets 'High' or 'HybridQ'. But once more, make your comparisons after rencoding.

rkalwaitis
27th February 2009, 19:47
Okay, thanks Fupp. The above setting produced a very nice image.

FuPP
3rd March 2009, 01:07
0.985a

- Automatic calculation of edges sharpening strength (E_Auto_Str = true) should work better

- Show=”F” will display used filtering chains

- Dark scenes details enhancer and Skinned areas enhancer have now each their own strength parameter (DS_Enh_Str for dark scenes, S_Enh_Str for Skin processing)


I have updated the whole documentation too.

HybridFuPP 0.895a (http://files.filefront.com/HybridFuPP+0895azip/;13400097;/fileinfo.html)

FuPP

Adub
3rd March 2009, 02:16
Great! Thanks for the fix!

rkalwaitis
3rd March 2009, 06:25
Im gonna play with this Fupp and let you know what I think.

FuPP
3rd March 2009, 07:24
Forgot to say : HybridFuPP requires now avisynth 2.5.8 because of the use of min/max functions (really welcomed :)) and spline64resize.

FuPP

rkalwaitis
3rd March 2009, 21:05
FuPP

A couple of questions. When I use the E_Auto_Str the show function still shows a zero "0". Does the show function show the automatically detemined y and x numbers?

Ive also been playing with the N1 and N2 functions by putting in my own denoisers...whatever..Just playing. The show function shows that nothing has changed ie. N1 and N2 still show the same thing. I know if I show=f I get the filter chain. So I know filters are used. But do the defaults remain on too?

I know how to turn of denoisers for moving areas, MP_mode=0. How do I turn off the static areas? I thought that was the purpose of N1 and N2?

FuPP
3rd March 2009, 23:30
When I use the E_Auto_Str the show function still shows a zero "0". Does the show function show the automatically detemined y and x numbers
When upsizing (or not resizing), E_Auto_Str will disable itself : you will need therefore to specify manually E_Str_X and E_Str_Y (and disable E_Auto_Str).

When downsizing and using E_Auto_Str=true, E_Str_X and E_Str_Y values will be effectively computed (you will be able to check it using show="P" ;)).

This is E_Auto_Str behaviour for now, but I can change it if you convince me :).


Ive also been playing with the N1 and N2 functions by putting in my own denoisers...whatever..Just playing. The show function shows that nothing has changed ie. N1 and N2 still show the same thing. I know if I show=f I get the filter chain. So I know filters are used. But do the defaults remain on too

When you say "N1 and N2 still show the same thing", you probably mean that associated parameters to the default processing chains N1 and N2 are not modified. But as you have (probably) re-defined these chains without using these parameters, what is the problem ?

I mean : default N2 is :

"""Deen("a3d", S_Radius, S_Str, 3*C_Str, T_Str, C_Str, S_Dist, 9)""".
Imagine now you re-define N2 as :

"Levels(0, 1, 255, 255, 0)"
S_Radius, S_Str, C_Str, T_Str, C_Str and S_Dist will be simply ignored because not used anymore !

BUT if you write now :

HybridFuPP(preset="Medium", N2="Levels(0, 1, S_Str, S_Str, 0)")
S_Str default value for preset "medium" will be taken into account to compute levels.

And if you write :

HybridFuPP(preset="Medium", N2="Levels(0, 1, S_Str, S_Str, 0)"=, S_Str=255)
S_Str value you have specified in the command line will be taken into account to evaluate levels function.


These are all stupid examples, only to illustrate :)


How do I turn off the static areas [denoising]?
simply write : N2="" (N1 is not used by default , so equal to "")

A couple of questions (...)
seems to be a few more ;)

FuPP

rkalwaitis
4th March 2009, 08:53
Thanks FuPP back to playing with it using your advise :)

Im sure Ill have more questions to follow, thanks for helping me out as always, you rock.

rkalwaitis
16th March 2009, 19:16
Havent forgotten you Fupp, im back and ready to test. Got hurt working on the car :) But am much better.

FuPP
16th March 2009, 23:55
:scared:

Oh ! I wish you a speedy recovery Robert, and hope there is nothing serious !

FuPP

rkalwaitis
17th March 2009, 19:47
Broken fingers. No biggie. Im having a real hard time with an older video. I will try to upload a shot with my parameters so you can tell me what Im dorking up.

K

rkalwaitis
17th March 2009, 20:12
FuPP how would I add something like the below in the N2 spot of HybridFupp, Of course I would have the appropriate plugins? I would I call a script in the N1 or N2 position?

src = last
super = src.MSuper(pel=2)
bvec = super.MAnalyse(isb=true, overlap=4)
fvec = super.MAnalyse(isb=false, overlap=4)
src.MDegrain1(super, bvec, fvec)

FuPP
18th March 2009, 11:30
Happy to know that it remains you one or two fingers to type on your keyboard ;)

FuPP how would I add something like the below in the N2 spot of HybridFupp, Of course I would have the appropriate plugins? I would I call a script in the N1 or N2 position?


I suppose you should first define a function. Something like :

function MyDenoise(clip src)
{
super = src.MSuper(pel=2)
bvec = super.MAnalyse(isb=true, overlap=4)
fvec = super.MAnalyse(isb=false, overlap=4)
return src.MDegrain1(super, bvec, fvec)
}


and then insert it in your HybridFuPP command line. Use N1 to apply it on the clip before resizing, N2 if you want to apply it after resizing.

If you apply it on N1, disable both N2 and M (ie N2="", M="")

If you apply it on N2, disable M (ie M="")

ex :
HybridFuPP(...., N1="MyDenoise()", N2="", M="")


Rem :

Denoising before or after resizing is all a matter of taste and of tests :). But before is always slower...

'M' has to be disabled because your denoising function is already motion compensated. And moreover, HybridFuPP is probably not compliant with MVTOOLS2. This could be a further improvement :)


FuPP

rkalwaitis
18th March 2009, 13:48
okay ill give it a shot. Thanks Ill let you know what happens.

rkalwaitis
19th March 2009, 21:26
I guess its not compliant with MVTools2. I can not get it to work for me.

Im gonna play around with it more. Are you going to make the auto sharpening unfilter function to work all the time and not only under certain circumstances?

And MVTools2 Compliant. Still trying to understand MVflow for denoising....does it use motion estimation? I think not.

Sagekilla
20th March 2009, 01:02
Unless you have both MVTools 1 and 2 in your plugins directory, you won't be able to mix and match those code snippets that do processing with either MVTools 1 or 2.

To make HybridFuPP MVTools 2 compliant, you find MM and MDenoise then replace them with these updated copies:

Function MM(clip i, int m_th, int scd, int bl_sz)
{
s = i.MSuper()
return mt_Binarize(i.MMask(s, MAnalyse(s, isb=false, lambda=1000, blksize=bl_sz), ml=m_th, Gamma=50, thSCD1=scd, thSCD2=135),\
Upper=False, Threshold=30)
}

Function MDenoise(clip i, int m_th, int scd, int bl_sz)
{
s = i.MSuper()
b1 = s.MAnalyse(isb = true, blksize = bl_sz, lambda = 1000)
f1 = s.MAnalyse(isb = false, blksize = bl_sz, lambda = 1000)
return i.MDenoise(s, b1, f1, tht = m_th, thsad = scd)
}

rkalwaitis
20th March 2009, 07:44
Thanks Sagekilla, Im gonna give it a shot :)

YES! It worked!!

Im gonna play with this and let you guys know what I learned or if I have questions.

rkalwaitis
21st March 2009, 11:30
Fupp

Im very interested in your idea of auto sharpening with the unfilter.dll Im not very script friendly and I think you are using it with an edgemask? I do not know for sure. I can not see any clear cut function. Could you please point it out to me. Inquiring minds want to know.

I was also curious since the use of the mvtools if this would be possible or just me not thinking. mt_edge pulls the edges from the source and holds on to them. (keep them seperate for now) Now denoise with perferred way. Recall the edges intensify the edge mask. (now I have the orginal edge mask and the intesified one) Get the average of those two masks and reapply them to the denoised film. To see what happened.

Sagekilla
21st March 2009, 17:28
This the function you're looking for?


Function AutoStrCalc(float rw, float rh, int ra, string axis)
{
ref = axis == "X" ? rw : rh
return ref == 0 ? 0 : min(60, max(0, int((1-(float(ra)/10-0.2))*(max(rw, rh) == ref ? -360*ref+360 : (-360*max(rw, rh)+360) \
*(min(rw , rh)/max(rw, Rh))))))
}


That's the code for automatically calculating unsharp strength.

rkalwaitis
21st March 2009, 18:20
I played with that but I could not get it to work by itself. ie just use that function alone. It works fine when I use it with Hybridfupp.avs

Sagekilla
21st March 2009, 23:31
You need to feed the appropriate resizer value:


# Resizer values
# Bilinear: 0
# Bicubic: 1-4
# Lanczos: 5
# Spline36: 6
# Spline64: 7

Resizer = 7

x_str = AutoStrCalc(width, height, Resizer, "X")
y_str = AutoStrCalc(width, height, Resizer, "y")

Spline64Resize(src, width, height).Unsharp(x_str, y_str)

rkalwaitis
22nd March 2009, 07:35
Gracias Senor Killa

FuPP
23rd March 2009, 16:01
I'm back. Did I miss anything ? :)

rkalwaitis
23rd March 2009, 16:40
Yeah

teach us old wise one how to use you auto sharpening with the unfilter.dll as an independent function.

Are you gonna update to mvtools2? And are you going to set up the autosharp to always be one regardless of whether or not the resizing is being done?
To be honest, I almost never resize. I usually just crop and then encode. I was informed that resizing isnt as important with x264 as it is with xvid.

I was talking to Sagekilla in search of a way to pull the edges from a source. Hold them as original or slightly enhanced and then placing them back overtop of the denoised source. ??? Just an idea, as you seem to have a good grasp on edges and mvtools.

And yes I am typing with all my fingers, well except for one of them :)

But I just use that one for pointing at things.

FuPP
23rd March 2009, 18:21
Are you gonna update to mvtools2
yes I will.

And are you going to set up the autosharp to always be one regardless of whether or not the resizing is being done
sharpening strength auto-computation has been designed to take care of downsizing (taking into account X and Y axis).

I am not sure of what you would like to do, so develop please.

teach us old wise one how to use you auto sharpening with the unfilter.dll as an independent function.

This function is based on a very simple affine function. Parameters are computed separetely for the X and Y axis of the video. The slope is for now hardcoded but could be input as a parameter.

Not sure that it would be adapted in all cases (as an external function), so tell me please what you want to do :)

search of a way to pull the edges from a source. Hold them as original or slightly enhanced and then placing them back overtop of the denoised source
HybridFuPP already do that : simply set 'Fast=false' :)

When Fast=true, edges enhancement is computed from the denoised frame. When set to False, from the original frame (except if you have activated deblocking, which is then computed before sharpening).

Here is the code in the script :
Def_E1 = "UnFilter(E_Str_X, E_Str_Y).Addgrain(E_Str_N,0,0)"
_input = Deblock && DB_M_Only == false ? input.Deblock(DB_Q, DB_Off_A, DB_Off_B) : input
Static = Eval("_input."+(N1 !="" ? N1 + "." : N1)+"Resizer(width, height, Resizer)"+(N2 !="" ? "." + N2 : N2))
clip = Fast ? Static : _input.Resizer(width, height, Resizer)
Edges = E_process ? Eval("Clip."+ (E1 != "" ? E1 + "." : E1) + "Resizer(width, height, Resizer)"
\ + (E2 !="" ? "." + E2 : E2)) : NOP()
And at the end of the process, after all other masks (except motion processing), sharpening is added :
Final = E_process ? mt_Merge(Final, Edges, EM) : Final

rkalwaitis
23rd March 2009, 20:32
If sharpening strength was developed for down sizing, I can live with that :) Just thought it would be cool if you could make an autosharpener. My lofty goals for you. sorry :)

I did not know that about fast being set to false and deblock off.

Edges = E_process ? Eval("Clip."+ (E1 != "" ? E1 + "." : E1) + "Resizer(width, height, Resizer)"
\ + (E2 !="" ? "." + E2 : E2)) : NOP()

so that line is the culprit is it? Does it have to use unfilter and addgrain? Ive been playing with mvtools trying to figure out how to pull the edge and keep it. Denoise and then put it back. I came up with something like this.

emask = mt_edge()##pull your edge, still no idea how to enhance them once Ive got them :( . SageKilla has helped me a lot with this.

super = MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
denoise = src.MDegrain2(super,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=300)##however you denoise worried about keeping edges for now :)

merged = mt_merge(denoise, src, emask)
return(merged)


Do you know if I put the src in my merged? It does not make sense to put the clip i just cleaned up with my denoised clip and combine them. ????

But looking at your script I could not translate that to mvtools very easily.

hhhhmmmmmmm off to look at this in HFupp, thanks for your help as always.

FuPP
23rd March 2009, 21:24
no idea how to enhance them once Ive got them
unfilter() <HybridFuPP default>
sharpen()
xsharpen()
levels()
...

For what you want to do (in this example, I use Xsharpen() as an edge enhancer :


Function MyDenoising(clip src)
{
super = src.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
return src.MDegrain2(super,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=300)
}

HybridFuPP(your_clip, N2="MyDenoising()", M="", fast=false, E1="xsharpen()")



if you want to do it without HybridFuPP (I would get disappointed though ;)) :

Function MyDenoising(clip src)
{
super = src.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
return src.MDegrain2(super,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=300)
}

return mt_merge(MyDenoising(), xsharpen(), mt_Edge)

rkalwaitis
23rd March 2009, 22:06
But using xsharpen like that, doesnt that sharpen everything? Just not the edges?

and yes ill use them in HybridFupp. :) off to play again with this.

FuPP
24th March 2009, 01:19
when using HybridFuPP, E1 (-> edge filtering chain -> 'Edges') is applied on the clip (denoised one if fast=true, original one if fast=false -> 'Final') and merged to the denoised clip through 'EM' (edge mask)

Remember :
Final = E_process ? mt_Merge(Final, Edges, EM) : Final

This is the same principle in the example I gave you without using HybridFuPP :
mt_merge(MyDenoising(), xsharpen(), mt_Edge)

This will apply clip 'last.xsharpen' on the clip 'last.MyDenoising()', through the clip (mask) last.mt_Edge

FuPP

rkalwaitis
2nd April 2009, 15:05
Fupp how did you change the colors or your masks. For instance your edgemask may show as red, but how do you make it black?

FuPP
2nd April 2009, 15:38
change :

EM_Blank = BlankClip(1, w, h, color=$FF0808, pixel_type="yv12")

to :

EM_Blank = BlankClip(1, w, h, color=$000000, pixel_type="yv12")


and

i = EShow != 0 ? Overlay(i, EM_Blank, Mask=em, Mode="chroma", opacity=0.6) : i

to :

i = EShow != 0 ? Overlay(i, EM_Blank, Mask=em, Mode="blend", opacity=1) : i

FuPP

rkalwaitis
2nd April 2009, 16:21
thanks Fupp how goes the update?

FuPP
2nd April 2009, 16:28
Work in progress...

FuPP

MadRat
5th April 2009, 08:05
Looking forward to the next update.

rkalwaitis
6th April 2009, 08:31
Fupp,

What settings do I need to manipulate to reduce blocking appearing in the sky on my project. Im using HybridQ, dering and deblock to true.

K

FuPP
6th April 2009, 09:27
Here are available parameters (from Deblock.dll doc, I have simply added HybridFuPP's parameters names) :


DB_Q (quant) : the higher the quant, the stronger the deblocking. It can range from 0 to 60.

DB_Off_a (aOffset) : quant modifier to the blocking detector threshold. Setting it higher means than more edges will deblocked.

DB_Off_b (bOffset) : another quant modifier, for block detecting and for deblocking's strength. There again, the higher, the stronger.


Defaults are :

DB_Q (quant) = 25
DB_Off_a (aOffset) = 0
DB_Off_b (bOffset) = 0

If quant + aOffset is inferior to 16, the filter does nothing at all. The same goes for quant + bOffset.


see also this post (http://forum.doom9.org/showthread.php?p=810932#post810932) for more informations about alpha and beta parameters.


FuPP

hartford
7th April 2009, 02:38
I'm getting an error from using v098a. It is in this line (246):

"Invalid arguments to function "Deen"

Def_N2 = """Deen("a3d", S_Radius, S_Str, 3*C_Str, T_Str, C_Str, S_Dist, 9)"""

I am using Deen-b2.dll, mt_masktools_2.0a28.dll, Unfilter-16-01-2003, mvtools-v1.8.5.1, AddGrain 23-06-2003

Input video is YV12.

Would appreciate some advise on how to resolve this problem.

EDIT: Here is my AVS file

Loadplugin("Deen-b2.dll")
Loadplugin("mt_masktools_2.0a28.dll")
Loadplugin("UnFilter.dll")
Loadplugin("mvtools-v1.8.5.1.dll")
Loadplugin("AddGrain.dll")

Import("HybridFuPP_v098a.avsi")


Avisource("13-2.avi")

ConvertToYV12()

HybridFupp()


TIA.

(note: I choose to name all my "import" files avsi because I do no auto import of anything in order to prevent and/or sort-out problems with plugins and scripts.)

FuPP
7th April 2009, 09:27
Hi,

Please try to use dlls provided in HybridFuPP 0.985a package (on page #5 of this thread), and let me know.

FuPP

DarkT
8th April 2009, 12:25
There's a preset - anime2, which is really nice, but I wish It'd be possible to have something in between anime1 and anime2... I tried tweaking the anime2 preset, for an hour or so... I believe I went through every variable... It seems like the filtering chain is not very tweaking-friendly though... Couldn't get it to work the way I wanted to...

FuPP
8th April 2009, 13:27
Hi DarkT,

something in between anime1 and anime2
Couldn't get it to work the way I wanted to
Could you be more precise, please ?

Main differences between both presets are related to denoising (more agressive on anime2) and resizing algorithm.

Parameters you may want to tweak are therefore

- Resizer

and about denoising :

- S_Radius (Spatial radius)
- S_Str (Spatial strength)
- T_Str (Temporal strength)

FuPP

rkalwaitis
9th April 2009, 09:17
Top of the morning FuPP

I added the following to the script so I could use a denoising function as per your help :)


Function MyDenoising(clip src)
{

super = src.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
return src.MDegrain2(super,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=300)
}

and modified the two lines as Sagekilla suggested so that I could use MDegrain2.

here is my line I call:::

HybridFuPP(N2="MyDenoising()", M="", fast=false, E1="msharpen(threshold=9,strength=80,highq=true)", skin=true, S_Enh_Str=1, deblock=true, DS_enh=true, dering=true, show="-F" )

My problem is manipulating the skin (S_Enh_Str) the html with the HybridFupp Package states from what I understand is a setting from 0 through 20 to keep the grain on the faces. Of course I tried negative numbers which worked too. My question is does the ability of the use of a negative number suggest that the function is not necessarily working correctly? I find 0 and 1 to be the best for my source, is 0 the same as off or no change? Anything over 2 really makes the faces look like someone was rolling in sand. :)

Also since we like the skin enhance ideas ( I do, I think it is very interesting), is there away to slightly enhance the colors of the detected faces? Just an idea. Instead of adjusting the whole images colors, just slightly enhancing the skin areas. Just a tad more color. I know the idea is to preserve the features of the face and reduce the washed out look. But putting a bit of color back would also enhance the function.

I am waiting for the update :)

rkalwaitis
9th April 2009, 10:15
Hartford Im using deen 0.1 beta. It works for me.

FuPP
9th April 2009, 16:43
E1="msharpen(threshold=9,strength=80,highq=true)"
This is a wrong choice because both HybridFuPP and msharpen include an edge mask algorithm.

Anything over 2 really makes the faces look like someone was rolling in sand
I have already improved that a lot in the coming release :)

is there away to slightly enhance the colors of the detected faces
Obviously :) But what would be the aim of that (ie increasing color saturation on faces only) ?

I am waiting for the update
You will have to be a bit patient. I have modified a lot of things and I therefore need to do a lot of tests.

Moreover, I would like to test some other denoisers than deen. I like it because of the easy control it gives and his very decent results, but I would like to give a try to some others, especially to FFT3DFilter. But it could require a bit time to test it (or them) extensively...

FuPP

rkalwaitis
9th April 2009, 17:47
okay ill play with something else besides msharpen() :) As far as denoisers go, I like the MVDegrains and FFT3dFilter. You can do a lot with FFT3dfilter from dehalo to sharpen. It is handy. I can do simple little scripts to denoise a clip with them, but nothing as fancy as the options you have. Heck, Im not even sure sometimes the difference between deringing and dehalo :|

As far as the faces go, after I denoise, there seems to be a slight color difference. It could be because of deen. It is not horrible and I can live with it. But I thought it would add still more enhancement to the skin option as the focus usually is on the people in the clip. Its just an opinion.

Thanks again for your patience with my questions.
I patiently await the next edition of FuPP, coming to a forum near me.

FuPP
9th April 2009, 18:48
what settings do you use about deen ? Maybe chroma denoising settings are too heavy...

FuPP

rkalwaitis
9th April 2009, 22:45
I use the settings that are default to Hybridfupp.

FuPP
9th April 2009, 23:28
HybridFuPP's default settings for chroma denoising were... a little bit heavy :D

FuPP

Benus_MinO
16th April 2009, 15:36
I wanna encode BD-ISO to 720p, but the quality of this BD isn't good. So i tested something like this: HybridFuPP(1280,720,preset="anime1",skin=false,E_Auto_Str=false,E_Str_X=30,E_Str_Y=20,Enh_Str=15)

Screens:
http://img411.imageshack.us/img411/980/coin.th.jpg (http://img411.imageshack.us/my.php?image=coin.jpg)
http://img58.imageshack.us/img58/4971/76819240.th.jpg (http://img58.imageshack.us/my.php?image=76819240.jpg)
But the efect is too bad, how i can improve quality of that video?

FuPP
16th April 2009, 20:53
I can see blocking artefacts and bad gradients on these pictures.

use deblock=true for removing blocks.

try to set S_Radius to 2 and see if it helps for gradients. If it blurs too much, set S_Str to something between 1 and 5.

FuPP

Benus_MinO
17th April 2009, 20:57
It look worse than before, but i change some settings and the final version look good.

FuPP
17th April 2009, 22:13
You maybe want to share with us the settings you used ? Could be useful for some other people, you know :thanks:

FuPP

Bexley
8th May 2011, 19:49
Sorry to bump an old thread, but I am having a problem with severe artefacts from using this filter. Every few seconds the image will display severe blocking that only lasts for a single frame. I have verified that I am using all the correct plugin versions that are bundled with the function, and I am not using any SetMTMode calls.

I've tried versions .991b and .98a on every preset and gotten the same result, and the effects are not random - it's always the same frames.

http://img231.imageshack.us/img231/9290/frame2094.th.png (http://img231.imageshack.us/i/frame2094.png/)

http://img194.imageshack.us/img194/7094/frame3276.th.png (http://imageshack.us/photo/my-images/194/frame3276.png/)

Has anyone else seen this effect?

FuPP
10th May 2011, 13:53
Hi Bexley,

Can you provide to me a sample of your source ?


FuPP

TheProfileth
17th May 2011, 01:36
btw are you ever going to release your newest version?
I mean I would be happy to see what you have done even if it is not completely working, or has issues.

FuPP
17th May 2011, 09:39
Profileth,

Latest version, HybridFuPP 0.991b, can be found here (http://forum.doom9.org/showthread.php?p=1278707#post1278707).

I use HybridFuPP myself quite often and I have not experienced any misfunctionment. This is the reason why I have asked a sample, to be sure the problem is related to HybridFuPP.

0.991b could have been '1.0', except I did not get enough feedback when I released it...

FuPP