View Full Version : Convolution3D
-h
30th August 2002, 00:32
I love it. It's the best. The greatest. Brilliant. Amazing.
That is all.
-h
ACClarke
30th August 2002, 01:24
It's french :D
TheUnforgiven
30th August 2002, 02:29
i love it too, thanx vlad
Bulletproof
30th August 2002, 07:45
It's got me a bit confused ;)
Convolution3D does Spatial and Temporal smoothing together right?
But how does that make it different from just manually adding a seperate Spatial filter into the chain and then a Temporal one?
Does it do special Dynamic things that make it benefit from doing both at once?
vlad59
30th August 2002, 07:47
@all
Wahoooo, too much thanks, I should be dreaming ;) ;) ;)
Let's wake up :D :D
@ACClarke
In fact, it's more an international project :
idea comes from Germany (bb)
coding comes from France (I don't know who ;) )
testing comes from Turkey, Germany, ... (iago, Koepi, ...)
hosting comes from USA (Defiler)
@-h
I hope all the Xvid problems will stop as soon as possible.
I hope this weekend I could add some buffering to release v1.0.
Thanks again.
-h
30th August 2002, 07:57
vlad, I just noticed the Tao avatar! I take it you're a MCoG fan?
I wish they'd play the english run of it again in the USA. Someone. On any station. Or just release the damn tapes. Ah well, can't have everything.
Oh and yes, I'm hoping for the XviD problems to stop ASAP as well ;)
-h
vlad59
30th August 2002, 08:35
Originally posted by Bulletproof
It's got me a bit confused ;)
Convolution3D does Spatial and Temporal smoothing together right?
But how does that make it different from just manually adding a seperate Spatial filter into the chain and then a Temporal one?
Does it do special Dynamic things that make it benefit from doing both at once?
I'm afraid I have no 100% sure answer to make.
I think the point is here :
if you use the following script :
Temporal (...)
Spacial (...)
Spacial will always process already filtered frames so if the scene has no motion at all :
-> Temporal will smooth a little
-> Spacial will smooth a little more causing maybe some blurring.
if there has heavy motion :
-> Temporal can cause ghosting
-> Spacial will smooth the ghosting
The problem is that one of the filter will work with already filtered frame.
That's why Marc FD created MAM to apply Temporal to the source, apply Spacial to the source. And mix them to produce the result.
Convolution3D work with unfiltered source, apply the treshold check to ALL surrounding pixels (spacial and temporal) and calc the new pixel value.
That's maybe why, but I'm afraid I can be wrong or unclear.
@-h
Yes I'm a fan of MCoG.
We are more lucky than you in France. We have tapes and DVD. But the DVDs are crap : only french audio, no bonus, macroblock on the video.
bb
30th August 2002, 09:58
Just wanted to add that Convolution3D is the best filter I ever tried for noisy TV captures or noisy low-light DV shots. Best noise removal while keeping detail as much as possible. And believe me - I tried a lot of different filters, and none of them could reach Convolution3D's quality.
bb
P.S.: I like the full 1 matrix best.
Antti
30th August 2002, 10:43
I agree! I mostly deal with DV material (I rip dvd:s very rarely), and new cameras produce quite detailed but very noisy picture in low-light conditions. So far I have got best results with C3D. Sometimes I even add a light temporalsmoother filtering after it. But I wonder if just tweaking C3D parameters would do the same (maybe even better).
wotef
30th August 2002, 11:05
hear, hear! the mother of all noise filters for analogue caps -
thank you vlad and bb
- hmm, as i said previously, i think it's ready to go on doom9's download page - those folks in the "capturing video" forum would be all over it, if they knew it existed
iago
30th August 2002, 12:08
@vlad59 and everybody
I can say nothing else than I really appreciate this great work of vlad59 too. However, I'm trying it on only DVD rips ;), hoping to find some reasonable settings to use, especially in cases of long and really hard-to-compress movies, in order to fit them on 1CD or 1XCD with better compressibility and without losing many details.
Maybe the settings (1,3,4,2,3,2.8,0) and (1,4,5,3,4,2.8,0)
discussed by wing1 and bb in the other thread, which I will try asap, help to achieve this.
kind regards to all,
iago
-h
30th August 2002, 18:09
I guess I should say I've been using it for dark DV footage too.. somtimes up to Convolution3d(1, 18, 250, 20, 80, 40, 0) (!).
The results are far better than any combination of spatial/temporal I found previously. How do people think it compares to "commercial quality" filters, like you'd see in Premiere/Ulead/MC Pro?
-h
vlad59
30th August 2002, 18:32
Originally posted by -h
I guess I should say I've been using it for dark DV footage too.. somtimes up to Convolution3d(1, 18, 250, 20, 80, 40, 0) (!).
-h
Wahoo, That's strong settings.
I personnaly never exceeded :
Convolution3d(1, 12, 30, 10, 10, 10, 0)
But I only used it on DVD sources wich will never be noisier than DV or analog sources.
ACClarke
30th August 2002, 22:26
Originally posted by vlad59
@-h
Yes I'm a fan of MCoG.
We are more lucky than you in France. We have tapes and DVD. But the DVDs are crap : only french audio, no bonus, macroblock on the video.
there is two version, one expensive and very bad (macroblocks....)made by sony if i remenber well.....
and a cheap one, 21 euros (22 dollars) for the 4 dvd, this release is better.
bill_baroud
1st September 2002, 15:46
if i remember well, the cheapest ones, which are better, were only in half-Pal ... 352x576 , what a _great_ resolution for a DVD.
but the first release was worse :/ ... keep with the WHS ^^
vidiot
1st September 2002, 18:07
Originally posted by -h
I guess I should say I've been using it for dark DV footage too.. somtimes up to Convolution3d(1, 18, 250, 20, 80, 40, 0) (!).
The results are far better than any combination of spatial/temporal I found previously. How do people think it compares to "commercial quality" filters, like you'd see in Premiere/Ulead/MC Pro?
-h
Yes, depending on the quality of your camcorder.
If you try to capture dark scenes it often looks like salt and pepper.
So I think I´ve to try Conv3D for some of my DV footage, too.
Thanx
Harald
HarryM
1st September 2002, 20:40
Convolution3d is great filter (I use it), but I am looking specially for filter, which
a) for unmoving parts of frame using temporal filtering
b) for moving parts of frame using spacial filtering
Do you know something, please?
ronnylov
1st September 2002, 21:00
MAM can be used to apply temporal filter on low motion parts and spatial filter on high motion parts.
iago
1st September 2002, 21:32
@Acaila and drizztcanrender,
Any fresh news about your filtering/convolution3d tests with your "DVD rips"? ;)
best regards,
iago
^^-+I4004+-^^
2nd September 2002, 00:06
>hear, hear! the mother of all noise filters for analogue caps -
thank you vlad and bb
- hmm, as i said previously, i think it's ready to go on doom9's download page - those folks in the "capturing video" forum would be all over it, if they knew it existed
_have you all lost your mind??????????[here goes one "folk" from capturing video forum]
this filter is nothing but ANOTHER DNR....(by results it gives..)
& boy ohh boy did i tried it!
i've tried about 20(!) different combinations(especially for temporal part) & found that IT CANNOT REMOVE NOISE IN NON-MOVING-CAMERA scenes
(i've come up to "200"(!!!)& more for temporal part of the filter:noise was still there!!!just as with any other vdub's DNR filter....)
video was noisy,but no more than i ecounter every day& filter it nice with temp.smoother:still scenes on output have NO NOISE with t.s_.....convolution(what's this name anyway????) CANNOT stack to vdub's tsmoother!
HarryM said this:"Convolution3d is great filter (I use it), but I am looking specially for filter, which
a) for unmoving parts of frame using temporal filtering
b) for moving parts of frame using spacial filtering
Do you know something, please?"
_&wasn't this objective for c3d?to merge 2 filters in one?
also someone else mentioned "why not use 2 separate filters"-->it seems we'll have to until someone does real hard-core t/s smoothing filter!
but again_nothing wrong with using 2 filters is it...?
or is it just that ALL the poeple on this forum take dvd as a source /which already doesn't have any noise to start with/ & then denoise that....(this is NOT what denoiser's are ment to be used with!)-what's the point in sending "TESTS" with "SCREENSHOTS" when
dvd was the source???(i've dloaded 2 of these:nothing to see on them_nothing that would interest capturers...DENOISERS should BE for capturers...)
by your results i see that no one of you dealt with noisy vhs source,so this filter cannot be even mentioned in capturing context!
[so please mention it NOT in that context no more!]
bb
2nd September 2002, 07:09
@^^-+I4004+-^^:
I use Convolution3D for TV caps and low light DV footage with excellent results.
Could you please post your AviSynth script and some screenshots to prove what you said?
bb
vlad59
2nd September 2002, 08:59
Originally posted by ^^-+I4004+-^^
>this filter is nothing but ANOTHER DNR....(by results it gives..)
& boy ohh boy did i tried it!
i've tried about 20(!) different combinations(especially for temporal part) & found that IT CANNOT REMOVE NOISE IN NON-MOVING-CAMERA scenes
(i've come up to "200"(!!!)& more for temporal part of the filter:noise was still there!!!just as with any other vdub's DNR filter....)
Wahoo please don't rush me. Let's talk first.
Of course there is no miracle solution to remove noise and I didn't build a wavelet noise reducer so Convolution3D can be DNR : i agree on that.
I build this filter with lots of parameters so you can tweak to have the output you want.
If you want ghosting and blur on edges just put 255 at both temporal and spacial tresholds and 10 at temporal influence : you'll get pure 3x3x3 convolution with no treshold but with ghosting and blurring.
If your video is very noisy : it can be better.
video was noisy,but no more than i ecounter every day& filter it nice with temp.smoother:still scenes on output have NO NOISE with t.s_.....convolution(what's this name anyway????) CANNOT stack to vdub's tsmoother!
I agree that Temporal smoother make a better job on still scene but you forgot to say that TemporalSmoother (5) for example lose a lot of details, does a bad job in scene change (ghosting) and a very bad job in fadein or fade out.
That's a matter of taste : with Convolution3d you can tweak better.
_&wasn't this objective for c3d?to merge 2 filters in one?
also someone else mentioned "why not use 2 separate filters"-->it seems we'll have to until someone does real hard-core t/s smoothing filter!
but again_nothing wrong with using 2 filters is it...?
The objective of Convolution3d was to apply a 3x3x3 convolution to a video.
So I only use 3 frames (previous, current and next) : TemporalSmoother use more frames.
And use a max of 3x3 spacial matrix (SmoothHiq can use more).
So we are not speaking of the same thing.
Use MAM you want to use TemporalSmoother & SmoothHiq, it does a very good job.
or is it just that ALL the poeple on this forum take dvd as a source /which already doesn't have any noise to start with/ & then denoise that....(this is NOT what denoiser's are ment to be used with!)-what's the point in sending "TESTS" with "SCREENSHOTS" when
dvd was the source???(i've dloaded 2 of these:nothing to see on them_nothing that would interest capturers...DENOISERS should BE for capturers...)
by your results i see that no one of you dealt with noisy vhs source,so this filter cannot be even mentioned in capturing context!
[so please mention it NOT in that context no more!]
My first test was on a DVD (so you're right) but with really bad quality (bad VHS quality with noise and scratch).
With this video I've used high tresholds.
For normal DVD quality, Convolution3d can be used with very low tresholds to increase compressability. Personnaly I prefer no filtering at all in this case but everybody can use it freely.
You make a search and you'll find that the very first tests of bb and Wilbert were from analog sources.
^^-+I4004+-^^
2nd September 2002, 10:07
>Use MAM you want to use TemporalSmoother & SmoothHiq, it does a very good job.
ok,but then what's the use your (poor) DNR replica????
i guess you guys angered me very much:i'm in RAGE!!!
take lousy vhs,capture it,test it,test it,test it again-->then release it
DON'T release it for the dvd-conversion scene:they shouldn't need it anyhow(neither do we capturers need filters of such poor noise removal)
i JUST can't see what's the HYPE???
&i'm here to put you back to the ground (vlad59)you've floated away a bit on this "success".....
no justifications(use MAM,use this,use that) are needed!
you've made denoise filter,i doesn't work for real hardcore denoising&
that's just IT!if the denoise filter doesn't denoise than why all this?
however:it's not my intention to bury any such (filter) project,just it seemed to me that everyone took this over-overwhelmingly...
[but i can understand asynth users:they didn't had any good denoising filters anyhow_except for those copied from vdub counterparts.....also:asynth's built in softeners are much slower&worse than vdub's smoothers....]
i'm sending you all some examples(YES they do have NOISE!!!especially c3d ones...hehehe) judge for yourself!
additional notes in the archive itself....
notice the curtains in the back of scene.....c3d cannot cope with it!
sorry if i offended anyone,but still:it's NOT ok to say "REVOLUTION" when we've already seen this(& few times....)
Koepi
2nd September 2002, 10:22
^^^6487487^24387^^^^^^:
Play nice.
Just because YOU are incapable of using the filter correctly doesn't mean you can insult the people who spend their time in coding such nie stuff.
Striked for rudeness.
dividee
2nd September 2002, 10:27
@ 404
You have the right to disagree but your tone is just insulting.
Calm down please.
edit: Koepi was faster...
wotef
2nd September 2002, 10:30
"by your results i see that no one of you dealt with noisy vhs source,so this filter cannot be even mentioned in capturing context"
ahem, matey, i'm doing nothing but vhs caps; i completely disagree with your view that convolution3d <= dnr
P.M. me if you want me to show you the results I got denoising non-moving areas using convolution3d - it spanks everything else I've tried
vlad59
2nd September 2002, 10:42
First I don't understand why you are in RAGE. if this filter don't work correctly for your analog captures then simply don't use it.
I should be in RAGE because you're flaming me and I stay cool so let's continue like gentlemen.
I'll explain you the story of this filter :
I've bought a old anime DVD : it should have been remastered but in fact it's not at all (noise, scratch and so on).
Then I read bb post about smoothing in time and space (3x3x3 matrix).
It's was a great idea, I had time so I coded it and I was impressed by the results : it was slow but good.
As the idea was not mine and I wanted to share it (I'm not egoist), I answered to bb and attached the first Convolution3d.
Due to the feedbacks I've been updating and optimizing it during the last weeks.
So say me where I was wrong ?
You say I'm floating on this success : just find a single post when I say Convolution3d is the best and I'll make public apologize.
About MAM, I just say that
Convolution3d was not a mix between TemporalMsoother and SmoothHIQ and if you wanted that : MAM can help you.
I'm waiting for your examples.
EDIT : got your attachment, I'll test and report here
HarryM
2nd September 2002, 11:43
I think, that the best filtering method is method combinated with MPEG-4 encoding process ('smart' preprocessing)...
ronnylov
2nd September 2002, 15:39
I agree with vlad59 that if you don't like the filter then don't use it. I am happy that there is a free choice to use whatever I find useful and sometimes one filter suits your needs better than another and it's also possible to combine parameters and filters in (almost) unlimited combinations. I am very thankful that people take their time to create tools that we can use free! Why get angry when you don't need to pay for it and don't must use it either.
I find the Convolution3D filter very useful as a basic good quality cleaning filter. If I need heavier filtering I combine it with other filters. To clean up interlaced DV and TV captures I use something like this after converting to 50 fps with TomsMoComp.
cnr2().temporalsoften(3,8,0)
Convolution3D(1,10,20,10,10,6,0)
It's a little bit slow combined with TMPGEnc but I like the results!
There's not that much ghosting after increasing the framerate to 50 fps so that's why I use a little bit stronger temporal filters. Afterwards I convert it back to 25 fps (PAL) interlaced and encode to interlaced DVD-format. I think I would use the same method also if I am deinterlacing because of the possibility to use stronger temporal filters with less ghosting. I can use SelectEven to get 25 fps progressive. But this method is slower than normal filtering at 25 fps.
baz00ie
2nd September 2002, 18:40
I've been following the progress of the "C3D" filter since Vlad59 first introduced it and I can say that it can do wonders for a noisy video... (thanks Vlad59)
However, it's not the only filter I use when de-noising a video capture (live-action, VHS). I use "C3D" as a starting point, then finish up with MAM6 + my favourite smoothers... (thanks MarkFD)
Both of these filters are quite good, each in their own right, but when combined, they can produce astonishing results. I have come across no filter or combination of filters that can compare to the above.
(My next hope is for a VERY kind person to work on optimizing "SmoothHiQ") :)
Anyway, Vlad59, i'm here to encourage you and anyone else who offers such fine and useful tools.
And for ^^-+I4004+-^^, this is for you:
http://www.people.virginia.edu/~rdf7d/banana.swf
Later all
baz
sh0dan
2nd September 2002, 20:03
@baz00ie:
(My next hope is for a VERY kind person to work on optimizing "SmoothHiQ") :)
Don't pick on my bad conscience - I'm on it, but it just got heavily tired of it - it's immensely complex, and I'm only half-way through ;)
Hope to finish it within a month, but I'd much rather work on AviSynth itself.
'Nuff hijacking for now. Back to work ;)
PS. the banana rocks!!! <It's peanut butter jelly time><It's peanut butter jelly time>
vidiot
2nd September 2002, 20:36
@^^-+I4004+-^^:
Sorry for you:
You´re right about heavy "noised" VHS Video.
I tried by myself to capture an vhs video (Rudolf the red-nosed reindeer) which has been watched > 30 times (!) (don´t count me on that).
It is kind of disorted now, but since it is a nice movie, which will be watched around christmas several... (don´t want to bore you)
Definetley C3D removes some noise, but even with very hard setting
(Convolution3d (1, 10, 22, 8, 8, 3, 0))
it is not enough to get a visable cleaner video.
(But i must admitt - I haven´t tried real hard)
On the other hand, my tv caps looks much better with it (although without much tweaking, just suggested settings from this thread).
So all I can say is:
Thankyou "Buffy Slayer" for that piece of work.
Now I´m going to learn to tweak it a little more...
Harald
Metalazzo
2nd September 2002, 22:06
all i have to say is thx vlad for this filter :)
and thx also to Tom and neuron and the others :)
you all make my life easier with your filters ;)
Marc FD
2nd September 2002, 22:48
Originally posted by HarryM
I think, that the best filtering method is method combinated with MPEG-4 encoding process ('smart' preprocessing)...
that exactly what i was thinking before.
but MPEG encoding use fdct-quant-idct relative frames.
(it's why XviD is not 100% effective with CopySame)
so the "smart" preprocessing is somehow blind.
it is of course the best way to do _hard_ denoising, but for soft HQ denoising, it wouldn't match a avisynth filter.
Guest
3rd September 2002, 04:34
@Metalazzo
I edited your post to remove a gratuitous personal attack. We do not want that tone here. Thank you for your understanding, and please let's not start any debates. :)
Oh, I also want to thank you for your kind words to the filter developers.
Gant
3rd September 2002, 10:48
well i agree with neuron... this is not a battle forum... we're all friends here... and this is the way it shold continue... when i say friends.. i mean friendly people :D
Well.. now my question... where can i leech that beauty filter?
Domo.
Belgabor
3rd September 2002, 12:55
Its somewhere hidden in the 'Smooth in Time and Space' (http://forum.doom9.org/showthread.php?s=&threadid=29829) thread.
Cheers
Belgabor
WarpEnterprises
3rd September 2002, 14:15
It is available at
http://hellninjacommando.com/con3d
ohliuv
3rd September 2002, 15:19
can anyone please summarize the difference between using the '1'-matrix, and the original one? I mean the first parameter - Convolution3d(X,x,x,x,x,x,x)
Any gain in speed and/or loss of quality in the resulting frame?
Dali Lama
3rd September 2002, 16:44
@ohliuv
Hi, I have noticed that a setting of 1 produces more artifact removing at the cost of more blurring. I find that more useful in Anime (cartoon) encoding. A setting of 0 is IMO better suited towards movies.
Also, if you are trying to clean a movie try these settings:
Convolution3d(0,4,4,8,8,3,0)
That followed by a Neutral Bicubic Resize works very well for me encoding a noisy Hong Kong Jackie Chan Film: Young Master.
@all
I have found that Convolution3d(0,8,8,8,8,3,0) suggested by Iago and others to remove too much detail on faces in regular movies (so I agree with Koepi). However, if the quality of the film is poor to some extent, I feel that lowering the spatial thresholds to 4 doesn't produce that problem.
Take Care,
Dali
iago
3rd September 2002, 19:23
I have found that Convolution3d(0,8,8,8,8,3,0) suggested by Iago and others to remove too much detail on faces in regular movies (so I agree with Koepi). @Dali Lama
"Iago and others" didn't "suggest" this setting but only "tried and tested" it to reach a conclusion on whether it can be used for regular movies or not ;).
And, based on these test results, it had already been generally agreed upon (for a long while) that Convolution3d(0,8,8,8,8,3,0) is too strong for normal movies and sweeps off too many details.
So currently I'm "testing", not "suggesting", (1,4,5,3,4,2.8,0) on a rather long movie (3hr-10min) to increase compressibility without removing too many details (seeking a sort of acceptable/decent compromise between these two) aiming for 1 XCD.
But as I said before, these are only "test settings" and not suggested values.
best regards,
iago
MaTTeR
3rd September 2002, 19:56
I just tested C3D with one of the noisest movies on the planet:D The movie is True Blue and has an unbelieveable amount of grainy FX. Just for the heck of it I tried using Convolution3d(0,8,8,8,8,3,0) which was mentioned as being to strong for general movies. Well for this movie the results was great compared to my tests with TemporalSoften, TemporalSmoother and SmoothHiQ. This movie wouldnt be the "norm" that we usually see but C3D really does it great. Going to try lowering the values now and continue testing. Thx for the nice work Vlad:)
Shayne
4th September 2002, 01:12
Thanks for this work, for me it has replaced vdub DNR2 and put me back to fast recompress ,,,,,,,,,,,,, dam logos
good work Vlad
iago
4th September 2002, 18:35
Hello everybody,
In terms of testing the advantage it would provide with compressibility, I tested convolution3d(1,4,5,3,4,2.8,0) -before resizing and using SimpleResize- on a "normal" but rather long movie (3hr-8min), with XviD Koepi's build 30082002-1.
Below are the firstpass results (aiming for 730000kb video size):
normal encode:
1stPass file size: 2183mb -> compression ratio: 3.093:1
convolution3d(1,4,5,3,4,2.8,0):
1stPass file size: 2029mb -> compression ratio: 2.875:1
speed: normal encode is ~3x faster than convolution3d(1,4,5,3,4,2.8,0) applied before resizing.
best regards,
iago
EDIT: Clearly, the above setting provided only a "minor" increase in compressibility, which suggests that for DVD rips of normal movies a bit higher values can be tried with matrix 1 too.
Metalazzo
4th September 2002, 21:31
Originally posted by neuron2
@Metalazzo
I edited your post to remove a gratuitous personal attack. We do not want that tone here. Thank you for your understanding, and please let's not start any debates. :)
Oh, I also want to thank you for your kind words to the filter developers.
np for the edit
i am sorry but i was quite angry against the croatia guy to flame up(?) vlad's work
that's all :)
and no needs to thank me (it's only natural ;))
vlad59
4th September 2002, 22:31
I'm back (I've been during the last two days away from Internet because of work)
first, thanks all for all your kind words.
@Dali Lama
You're right about the difference of the weigthed matrix and the full-1 matrix :
Matrix 1 shouldn't be used in normal movie (or only noisy movies with low tresholds, I have no such samples).
Matrix 1 is better for anime to smooth a little more.
@^^-+I4004+-^^
I tested with your samples and have some good values for you to test.
As the sample have no scene change, I used high temporal tresholds. If you have ghosting problems, I will help you if you provide me some more samples.
So my suggested settings are
Convolution3D (0, 32, 128, 32, 128, 10, 0) : smoother
or
Convolution3D (0, 28, 100, 28, 100, 10, 0) : with a little more details
Let's explain the parameters :
Matrix 0 is used because the full-1 matrix blur a little more the video.
I used the same values for temporal and spacial tresholds to deal with coherent informations (If you give me scene change sample with the Vdub (with DNR + SmoothHiq) version, I can do more tests).
In your test you have only increased the temporal tresholds : that's why noise was still very important.
And finally : a temporal inflence of 10 to be sure to use the 3x3x3 matrix everytime to keep quality.
I'll update the readme this weekend to explain that a little better.
^^-+I4004+-^^
5th September 2002, 01:08
vlad59>I tested with your samples and have some good values for you to test.
As the sample have no scene change, I used high temporal tresholds. If you have ghosting problems, I will help you if you provide me some more samples.
So my suggested settings are
Convolution3D (0, 32, 128, 32, 128, 10, 0) : smoother
or
Convolution3D (0, 28, 100, 28, 100, 10, 0) : with a little more details
_ok,i'll test this(seems you emphasized spatial component (chroma)
i tend to avoid this(don't like too much bluring in space)-but for chroma alone it might work.......)
but off course:not all(or bettter:two?) filters are the same so what i came to expect from "smshiq" cannot be expected here...
i'll report here...(will edit my previous post to rectify if need be)
btw.anyone there willing to send me a copy of MAM,to test that too?
seems that on marc's site it's the only UNdownloadable filter....
(or just point me to thread if there's one in forums....)
cheers_
ps.off course i can provide you with the samples(or PM you for details...)if problems occur:yes ,after the "no scene change" detail comes one with moving camera
pitty though admins lowered allowed att's size...
(but i think screenshots woudn't be enough for this case)
ohliuv
6th September 2002, 13:06
I wonder, anyone tried Convolution3D on SPR or Waterworld already? Remember long discussions in the Doom9 forums on the first one ...
MaTTeR
6th September 2002, 14:11
Originally posted by ohliuv
I wonder, anyone tried Convolution3D on SPR or Waterworld already?
I just finally broke down and bought the DTS version of SPR yesterday and already ripped the first 2 chapters for some testing. I'll play around a bit and post results later on.
theReal
6th September 2002, 14:30
I tested C3D(1,8,8,8,8,0) and C3D(0,8,8,8,8,0) on "Kundun" (the Scorsese movie about the Dalai Lama's life).
I used the filter before neutral bicubic resizing and I made a 2CD rip with Divx5 pro (bitrate around 1400)
I found matrix 1 was better than matrix 0, but that was probably because the film is relatively noisy and the DVD already shows some little filtering artefacts (=very smooth faces, for example) and sometimes even a little blockieness with chroma-shifts around the edges.
(Interestingly the DVD doesn't look that bad on the first glance, but you'll notice when you look closer).
I found that matrix 1 was able to remove some of the chroma-irregularities better than matrix 0. A reduction of details wasn't much noticeable with both matrices because as I said, the DVD already shows exactly such remainders of filtering. C3D didn't make this any worse (but it improved compressibility and made the result look more pleasant!)
Sigmatador
6th September 2002, 19:51
Tested on matrix:
MAM(Convolution3d(1,4,8,4,8,3,0),Convolution3d(0,8,8,8,8,3,0))
Very good results, very detailled (just the faces have little smoothing, very little) and more compressible
But tested on the planet of the apes --> very very ugly with the skin face of the apes (smoothissimo ^^ specialy the slaves' seller)
i used MAM(Convolution3d(1,2,4,2,4,3,0),Convolution3d(0,8,8,8,8,3,0))
then it seems good but less compressible
vlad59
6th September 2002, 22:11
@Matter, ohliuv and TheReal
I'm afraid I've none of this hard to compress DVD to make test.
I'll watch some DVD tomorrow but not for the story, only looking for noise or grain ;) ;)
I think I'll release the v1.0 of Convolution3d tomorrow : the biggest change will be some buffering so you can gain some speed or even more speed if don't care about some ghosting. Dividee's bug report will also be solved.
Let's sleep now .... :)
MaTTeR
6th September 2002, 23:13
vlad59,
Speed isn't an issue at all for me, quality comes first. Would it be possible to turn the buffer off/on with a C3D argument? I'm not a coder so just thought I'd ask;)
My SPR testing is just starting so I expect to post my thoughts and results later this weekend. Thx again for the nice work.
Edit: Sleep? Whats that?:)
vlad59
7th September 2002, 08:11
Originally posted by MaTTeR
vlad59,
Speed isn't an issue at all for me, quality comes first. Would it be possible to turn the buffer off/on with a C3D argument? I'm not a coder so just thought I'd ask;)
Edit: Sleep? Whats that?:)
Don't be afraid I have the bad (or good) habit to make everything tweakable so you'll be able to use/not use the buffering.
Sleep, Huuuum, Sleep, don't tell me I'll remember ;) ;)
iago
7th September 2002, 11:48
Originally posted by vlad59
I think I'll release the v1.0 of Convolution3d tomorrow : the biggest change will be some buffering so you can gain some speed or even more speed if don't care about some ghosting.Good news vlad59, looking forward to try it ;).
kindest regards,
iago
Shayne
7th September 2002, 16:19
Great filter play with it constantly. Maybe you could also update the readme a little in the next release with a little more detail on what the arguments do, max min .................
Not pushn do as u will
Thankz for the toy
vlad59
7th September 2002, 21:23
@Shayne
Yes, I'll try to update the readme (it's already done for some part like tresholds).
@all
Sorry but next version of C3d will be a little late. I found a new way to use my buffers to gain even more speed so you will have to wait ;)
I'll also look for some docs about pthread lib to maybe add SMP support (it will take some time (I can be dumb sometimes) so please don't rush me).
MaTTeR
8th September 2002, 00:45
Originally posted by vlad59
I'll also look for some docs about pthread lib to maybe add SMP support (it will take some time (I can be dumb sometimes) so please don't rush me).
SMP support...oh that would be so sweeeeet:) I'll be more than happy to help test it for ya.
drizztcanrender
8th September 2002, 15:36
Guys first of all i would like to say i'm sorry to the guys testing this filter and vlad59.I had promised to make whole movie encoding tests with conv3d but unfortunately my pc failed on me.After struggling with it for about two weeks now it's going to the shop for a total fix :(
That damn power supply screwd everything up then.
I just tested conv3d on my sister's pc and i found that these values give very good results inm an animation(not anime) movie i've been trying to encode for so long(applied before resizing):
convolution3d(1,4,6,3,5,2.8,0)
No artifacts whatsoever and better looking picture i could say.
Sorry again and thanks for the great filter vlad59 :)
WarpEnterprises
8th September 2002, 20:59
I have made a test on interlaced video captured from Hi8 and the results are REALLY IMPRESSING (using parameters 0, 8,10, 8,10, 3,0).
Is it correct to use
SeparateFields()
Convolution3d(0, 8,10, 8,10, 3,0)
Weave()
on Interlaced material? (I'm thinking of the temporal direction of the convolution matrix).
vlad59
9th September 2002, 10:09
@WarpEnterprises
Yes I think it's correct.
I remember a month ago, I proposed the same script to someone (I don't remember who). But his source had problem because of displacement between odd and even fields (frames) : odd frames were one line higher than even frames. So he was obliged to use :
SeparateFields()
SelectOdd.Convolution3d(..)
SelectEven.Convolution3d(..)
But with pure interlaced material, your script should work without any problem (of course if your field order is good).
iago
14th September 2002, 12:30
@vlad59
First of all, recently I've been trying convolution3d(0,4,4,4,4,3,0) to increase compressibility in some of my test encodes, with pretty good results for regular/normal movies, where ColorYUY2(Levels="TV->PC") is also used.
(Please take a look at XviD forum, "lumi masking" thread.)
Second, I have a question: I'm considering to use convolution3d(0,4,4,4,4,3,0) with a hybrid source (Baraka - NTSC1) using the following script:
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\convolution3d.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\colorYUY2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
mpeg2source("C:\BARAKA\BARAKA.d2v")
crop(4,4,704,472)
Telecide()
Decimate(mode=1,threshold=50)
convolution3d(0,4,4,4,4,3,0)
ColorYUY2(Levels="TV->PC")
SimpleResize(512,384)
What's your opinion please? Considering the long encoding time it will take, I just would like to learn beforehand if convolution3d with decomb using the above parameters for a hybrid source would cause any problems ;).
Thanks a lot,
iago
(P.S.: -Off/Topic- Regarding the lanczos3 resize tests; it's no problem man, glad they've provided some help to you! ;))
Dark-Cracker
14th September 2002, 12:44
it's perhaps a silly comments but i am not sure your filters are in the right order, it seems to me :
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\convolution3d.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\colorYUY2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
mpeg2source("C:\BARAKA\BARAKA.d2v")
Telecide()
Decimate(mode=1,threshold=50)
crop(4,4,704,472)
SimpleResize(512,384)
ColorYUY2(Levels="TV->PC")
convolution3d(0,4,4,4,4,3,0)
will be better because decomb need the order of the field to deinterlace or ivtc a frame. and i think putting the color and convolution after the resize will speed the encode because less the frame size (height & width) was important and more speed were the color & convolution processing.
i think i was right but perhaps can confirm this ?
PS :u could use
Telecide(blend=false)
Decimate(guide=1,threshold=50)
to have a better result with decomb
PS2: sorry my english sux.
iago
14th September 2002, 13:13
@Dark-Cracker
Thanks a lot for your reply. Since I've mostly dealed with progressive PAL sources so far, IVTC still seems a mystery to me ;).
best regards,
iago
vlad59
14th September 2002, 13:29
@iago
Unfortunately IVTC is also a mystery for me (thanks to PAL).
But in theory your settings must be correct.
The most important thing is to use Convolution3d after Telecide and Decimate to avoid blurring the fields.
I don't know what ColorYUY2 exactly do ???
Is it only usefull to cap luma between 16 and 240 (IIRC) ??
Another thing you should try is to lower a little the temporal influence to 2.8 or 2.6 : this will lower a little (only a little) the compressibility but you'll gain speed.
I had a look (very fast) to the Xvid thread : lumi masking. You found some interesting results. I'll have a closer look this afternoon.
@Dark Cracker
I don't think cropping before using telecide is a bad thing.
In addition Iago is using even numbers so there shouldn't be any problem when cropping first (and he'll gain some speed).
I got your PM. I'll check that this weekend.
iago
14th September 2002, 13:39
@vlad59
Thanks a lot for your reply. If cropping before telecide (with the correct numbers) wouldn't cause a problem, I'd prefer that.
ColorYUY2 is being discussed for a while in lumi masking thread in detail, which is offered mainly as a solution for blocks in dark/black areas, though also darkens the movie in general considerably.
And OK, I'll try 2.8 and 2.6 for temporal influence too ;).
kindest regards,
iago
Also, regarding dark-cracker's reply:
Telecide()
Decimate(mode=1,threshold=50) - for hybrid sources
or
Telecide(blend=false)
Decimate(guide=1,threshold=50) - as Dark-Cracker suggested ???
(Vdub gives the error message that "decimate" does not have a named argument "guide")
Thanks,
iago
meleth
14th September 2002, 13:45
Telecide(guide=1) is where it belongs :P
iago
14th September 2002, 14:32
Well, thanks again ;).
As a result of all these, now I'm going with:
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\convolution3d.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\colorYUY2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
mpeg2source("C:\BARAKA\BARAKA.d2v")
crop(4,4,704,472)
Telecide()
Decimate(mode=1,threshold=50)
convolution3d(0,4,4,4,4,2.8,0)
ColorYUY2(Levels="TV->PC")
SimpleResize(512,384)
which is almost non-modified, except trying 2.8 instead of 3 for temporal influence in convolution3d ;)...
best regards,
iago
vlad59
14th September 2002, 21:24
@all
Sorry for being late but sometimes life is not fair (or I'm not m
smart enought ;) ) :
- I had added some buffering to Convolution3D (it took me 2 or 3 hours of coding + 1 hour to test) -> the results are disapointing : yes I gain 2 or 3 fps but it produce little artefacts at scene change. As I'm looking for quality first, this version goes directly to bin.
- I was trying to add some threading in C3D : it spend 2 hours trying to link until I think about reading the manual......
I must be too tired or too dumb this weekend. :( :(
sorry for this off-topic post, but I feel better now.
Metalazzo
15th September 2002, 01:28
ganbate vlad59 ;)
jarthel
15th September 2002, 12:28
has anyone tried this filter with anime DVDs? both noisy and good sources? feedback please. :)
Thanks :)
Jayel
iago
15th September 2002, 17:32
@vlad59 (and all),
A small test on the *possibility* of using convolution3d(0,4,4,4,4,3,0) with normal movies (a compressibility and visuals test):
* Matrix Chapter 3 (very dark content) / 640*272
* Encoding parameters (for all tests):
XviD 2-pass / Koepi's 04092002-1 build and Statsreader 1.7 / externalCC / 6.UltraHigh / MPEG-MPEG / No Lumi / target size: 13650kb ~ 625 kBit/s
* ColorYUY2 filter is also applied in all tests
Compressibility (first pass sizes):
-----------------------------------
Lanczos3Resize -> 29 mb
SimpleResize -> 27 mb
BilinearResize -> 24 mb
Lanczos3Resize with Convolution3d(0,4,4,4,4,3,0) -> 21 mb
Visuals:
--------
PNG images (zipped in pairs) are attached for visual comparison, but unfortunately in two posts due to filesize restriction. Sorry.
regards,
iago
iago
15th September 2002, 17:39
BilinearResize and Lanczos3Resize with convolution3d(0,4,4,4,4,3,0) images:
iago
15th September 2002, 17:43
Lanczos3Resize and SimpleResize images:
Metalazzo
15th September 2002, 19:05
it looks good :devil:
damn i must try with the game :)
MaTTeR
16th September 2002, 02:01
iago and vlad,
So sorry for the delay on my testing. Unfortunately I've not got any hard evidence on very noise sources such as SPR yet due to a lack of time. I'm still looking for a generic setting that works for most DVD films. Right now I'm starting to like Convolution3D(1,4,5,3,4,2.7,0) for general films with moderate mosquito noise. Movies with heavy noise(eg. SPR or Inferno) seem to respond well to (1,5,8,8,8,3,0) though I still need to do more tests to be conclusive. Compressibility has increased about 10-13% on average using C3D:D
At the moment, I'm averaging about 12-15FPS with Lanczos reszing at 640 resolution. If multi-threading is added this will be great news. Keep up the good work Vlad!
Dual AMD XP 1600s @ 138FSB
512MB DDR RAM (agressively tweaked)
WinXP (SP1)
vlad59
16th September 2002, 08:18
@MaTTer
SMP is less easy than I first thought (my first test was 12 times slower !!!!!!).
But anyway it's a good challenge. I'll carry on.
When I encoded Excalibur I found that using Matrix 1 produce too much blurring (at least for my eyes) so I used :
Convolution3D(0,4,4,4,4,2.5,0)
But I used BilinearResize so maybe
Little Blur + Little Blur = Too much blur
I really need to test Lanczos3 more seriously.
MaTTeR
16th September 2002, 12:21
Vlad,
In regards to the multi-threaded coding, I believe fu2k is pretty knowledgable in this field. He is the author of FairUse and might be able to offer some guidance here if his time allows. A few months ago I had a look at the OpenMP docs but not being a coder, I was completely overwhelmed:D
For your testing, Bilinear might have been the blurry culprit. I only use it for encoding credits personally. Perhaps using SimpleResize or Lanczos would have kept it a little sharper.
meleth
16th September 2002, 15:37
Well the best thing would be if avisynth supported smp and handled all that transparently to the filter.
Infact what would be even better is distributed encoding. Most rendering programs support this and being able to distribute the encoding over a network would just rock. Ofcourse this would have to be done on the nandub side and not avisynth.
int 21h
16th September 2002, 16:32
Originally posted by meleth
Well the best thing would be if avisynth supported smp and handled all that transparently to the filter.
Infact what would be even better is distributed encoding. Most rendering programs support this and being able to distribute the encoding over a network would just rock. Ofcourse this would have to be done on the nandub side and not avisynth.
No.. this would have to be done on the codec side, not the encoder side. Since the codec is doing all of the calculations, not the encoder.
MaTTeR
16th September 2002, 17:46
Int 21h is right which is all the more reason for me to use XviD besides it's other obvious benefits;)
Is AVS multithreaded? I assume it is but how much I'm not sure. Multi-threaded filters should help speed a bit. Right now running C3D, my CPU usage is averaging 60% where as when running without filters both CPUs will average around 90-95%. Use to be only about 3 of us dualie users on this board a few years ago but now I see several people...this is a good thing.
trbarry
16th September 2002, 18:03
I could be very wrong here but I think Avisynth is not multi-threaded but Virtualdub splits off the encoding and decoding into 2 threads. So Avisynth would be in the decoding thread and Xvid the encoding. But if this is true and they are fairly balanced then it still gives a 2 processor advantage.
- Tom
kilg0r3
16th September 2002, 19:00
i understand that there is no download page for this filter so i humbly ask permission to test this great software. :)
Swede
16th September 2002, 19:10
WarpEnterprises does host one version (as found by using a search ;)) : http://hellninjacommando.com/con3d/
vlad59
16th September 2002, 19:11
Originally posted by kilg0r3
i understand that there is no download page for this filter so i humbly ask permission to test this great software. :)
False ;) ;)
There is one (since Defiler kindly offered me some webspace) :
http://hellninjacommando.com/con3d/
EDIT : Swede was faster. But I confirm Defiler host me
kilg0r3
16th September 2002, 19:25
o.k. it shows :stupid:
anyway, thank you very much.
meleth
17th September 2002, 09:06
Originally posted by int 21h
No.. this would have to be done on the codec side, not the encoder side. Since the codec is doing all of the calculations, not the encoder.
Actually you are wrong, distributed renedering works by you having a master computer and a couple of rendering slaves. The master feeds the slaves with frames which they encode and then return the result which the master puts back where they belong.
Doing this in the codec, even if it might be possible would be highly ineffectual. Not to mention it would only work for just that codec. Frankly i don't even think it is possible to incorporate this into any codec and even if it was, it would be stupid.
kilg0r3
17th September 2002, 09:33
vidomi does that afaik
Koepi
17th September 2002, 09:48
In this dispatcher scenario you won't get any speed improvements in encoding (the case where one computer sends out the frames and collects the compressed images).
Usually you'll find 100mbit topologies as LANs.
So the disatcher sends out the uncompressed images for compression:
640x272x2 (16 bits for YUV colour space = 2 byte) = 348160 bytes per frame.
let's say, ideally you have no collisions etc, so you can use 7MB of bandwidth for encoding:
7340032 / 348160 ~= 21 fps.
This scenario doesn't include the stream backwards, delays, congestions,...
So with a single fast computer you achieve more speed than that.
I hope this helps,
regards,
Koepi
meleth
17th September 2002, 10:21
Well I do get around 20-25fps when i'm not using any filters. But when you are using heavy filtering the fps drops to around 5 so in those cases that would help speed up the encoding alot.
This is also how commercial rendering programs like lightwave etc. works. Unless they've changed it since the last time i used it. Had 1 alpha 500 and 2 alpha 533mhz as rendering slaves.
Ofcourse this was like hrm 4-5 years ago.
ronnylov
17th September 2002, 10:30
What you can do is to copy your source files to a secondary harddrive mounted in a HD-casette and put that one in your second computer (or copy it over the LAN if your'e encoding from a DVD rip that is not that big in filesize compared to raw capture) and encode the first half of the movie in one computer and the second half in the other computer from the local harddrives. After the encodings are completed you merge the 2 encoded parts into one file. But if you are doing 2-pass encoding and let's say the first half is low motion and the second part has action scenes then you would miss the bitrate allocation from the part of the movie encoded in the other computer.
It's better to encode one movie in the first computer and another one in the second computer at the same time.
Well I think this is starting to be off-topic now. Isn't this thread about the Convolution3D filter?
bb
17th September 2002, 10:35
Originally posted by meleth
Actually you are wrong, distributed renedering works by you having a master computer and a couple of rendering slaves. The master feeds the slaves with frames which they encode and then return the result which the master puts back where they belong.
Doing this in the codec, even if it might be possible would be highly ineffectual. Not to mention it would only work for just that codec. Frankly i don't even think it is possible to incorporate this into any codec and even if it was, it would be stupid.
You have to distinguish SMP (symmetric multiprocessing) on a single computer and distributed computing in a rendering farm. int 21h's statement is correct regarding SMP.
bb
meleth
17th September 2002, 11:35
Originally posted by bb
You have to distinguish SMP (symmetric multiprocessing) on a single computer and distributed computing in a rendering farm. int 21h's statement is correct regarding SMP.
bb
Yes but I were talking about distributed computing and not SMP. Sinc e he quoted me one can only assume that his answer was in response to distributed computing. So if anyone has to distinguish SMP and distributed computing it's him, not me.
bb
17th September 2002, 12:35
@meleth:
I just wanted to point out the difference in order to avoid confusion. I did not want to accuse anybody of anything. The "You" in my post was meant to be impersonal.
In fact your post referred to both, SMP and distributed computing. I guess that caused a misunderstanding, as I believe that int 21h knows very well what he's talking about.
bb
meleth
17th September 2002, 12:54
Originally posted by bb
@meleth:
I just wanted to point out the difference in order to avoid confusion. I did not want to accuse anybody of anything. The "You" in my post was meant to be impersonal.
In fact your post referred to both, SMP and distributed computing. I guess that caused a misunderstanding, as I believe that int 21h knows very well what he's talking about.
bb
True, but in order to fully use SMP it would have to be supported by both the codec and avisynth, since avisynth and not the codec handles all the filtering. Of course if either could do load balancing it would only be neccesary to fix one of them. And then it would be better if it was avisynth that handled it, as it would be codec independent.
MaTTeR
17th September 2002, 13:40
@meleth
Maybe you missed my post above but XviD is multi-threaded for SMP. The SMP build can be found on uManiac's page-
http://xvid.hopto.org/
I only know of a few people who have tested it as of yet so your more than welcome to help us;) It is alpha state software, so now your warned.
It certainly would be great to parallelize AVS for better effeciency on multi-CPU systems. I wish I could offer some suggestions but from a basic standpoint I've been told that ICL and/or M$VS offers very basic parallel compiling options. Has anyone attempted this yet? I might try to squeeze a few minutes in this weekend to see what happens.
meleth
17th September 2002, 13:52
@Matter:
Unfourtunally i don't own a dual cpu machine myself and the only multi threaded program i've ever done was in perl so that don't help much.
You must however think about ALOT more stuff when doing multithreaded stuff, you get race conditions really really easy.
sh0dan
17th September 2002, 13:56
SMP is not something that can be achieved by changing compiler options. It would have to be coded into AviSynth.
On the other hand it should be possible, by making Avisynth process several frames in parallel. So when the client requests frame x, CPU 0 generates frame x, and CPU 1 begins to generate x+1 (and so on).
The cache would have to be modified, so frames could be marked "in progress", when another CPU is already working on this frame. Not sure how this completely should be implemented. The cache will be the only thing linking the threads together.
But all filters would have to be thread-safe, which I don't think they all are by now.
int 21h
17th September 2002, 13:57
Originally posted by meleth
Actually you are wrong, distributed renedering works by you having a master computer and a couple of rendering slaves. The master feeds the slaves with frames which they encode and then return the result which the master puts back where they belong.
Doing this in the codec, even if it might be possible would be highly ineffectual. Not to mention it would only work for just that codec. Frankly i don't even think it is possible to incorporate this into any codec and even if it was, it would be stupid.
In Lightwave, with distributed rendering, you setup computational slaves that render raw scenes, they don't compress anything, then depending on your destination format (i.e. AVI, Graphics, etc) the rendered frame is sent back to the master computer to be stored in whatever format you choose. Rendering frames is somewhat less complex than compressing video (on the task-list side, not the pure mathematical computation side). When you're compressing video with a codec, there's always reference to previous frames (i.e. delta frames are calculated off of each other, even this is a rather simplistic view), however, when you're rendering video in a program such as Lightwave, only the current frame needs to be taken into account since the environment has already computated everything from the previous and future frames (motion vectors, etc.). So when you render a scene of animation on Lightwave or Cinema4d or any other distributed rendering environment, the data is generated in the rendering farm (the frames are rendered, objects are drawn, lights are mapped, etc), sent back to the master, which then takes that data and does whatever you specified with it. If you specified a XviD AVI for instance, the master would do all of the generation of the AVI from the frames already generated on the 'slave' machines.
In our application however, our frames aren't rendered. They are decompressed. This takes a fraction of the computational power that rendering a scene takes. So if you wanted to model an encoder this way, all of your 'slave' computers would be decoding Mpeg2, applying filtering (Decomb, C3D) and sending frames back to the 'master' computer for compression. It becomes quite apparent, that this would be inefficient towards our application, because if your specific filter needs to look ahead or behind in the queue of frames, the amount of data you begin to sling around becomes gargantuan.
The faux distributed encoding you are talking about, is already implemented in a program called Vidomi (http://www.vidomi.com). Vidomi can split up the encoding of two CD compression instances (the last time I inquired, it did not function on 1 CD encodes), encoding one CD on one machine, and another CD on the other machine. However, as ronnylov pointed out, its impossible to accurately distribute bits in a situation as this because the renderer or compressor in our case, is totally unaware of bits being used on one half of the movie. Therefore, to be a truly 'distributed' application, the codec itself has to be aware of all encoding taking place, so that it can include all bits used and unused in the bitrate curve scaling and allocation.
With all of this in mind...as Koepi pointed out, currently we are at the wall of diminished returns. To make a truly distributed environment, the codec and the decoding and rendering mechanism (Avisynth, and all its filters in this case) would have to be aware of other instances on your 'slave' machines, unless of course you meant 'decoding and rendering' and not 'encoding' in your original post, and wanted your master machine to do all of the actual compression.
SMP of course is a totally different animal, but some of the same principles apply. All of the basic groundwork for that is already done in XviD, it currently just needs to be refined and tested. SMP doesn't play a major role for most users currently, but with the release of 'Hyper-threading', multiple CPU emulation, whatever you want to call it (and whoever's marketing bullcrap you're listening to), that may change.
meleth
17th September 2002, 14:25
When you're compressing video with a codec, there's always reference to previous frames (i.e. delta frames are calculated off of each other, even this is a rather simplistic view)
You're right totally forgot about this.
The faux distributed encoding you are talking about, is already implemented in a program called Vidomi (http://www.vidomi.com). Vidomi can split up the encoding of two CD compression instances (the last time I inquired, it did not function on 1 CD encodes), encoding one CD on one machine, and another CD on the other machine.
This is nothing like what I am talking about. I am talking about blocks of frames being distributed to slaves that compress them and then send the compressed frames back to the master server. (I thought Vidomi was a player:P)
int 21h
17th September 2002, 14:42
http://www.vidomi.com/docs.php?myfaq=yes&id_cat=13&categories=Encoder+-+Network+Options
This does encode 'blocks' of frames on the slave machines...
meleth
17th September 2002, 14:47
As i understand it, that one just makes 1job/cd and then encodes that job on a diffrent computer.
int 21h
17th September 2002, 14:54
Yea, 'faux' distributed encoding :p
meleth
17th September 2002, 15:03
When i talked about blocks of frames i meant more along the lines of 1000frames or however the user configures it.
The conclusion i've reached is that if this was to get implemented it would have to get done in both the codec (as you pointed out) but also in the encoder program. Atleast imo it would be best to keep as much as possible of the code in the encoder to make it easier for codec developers.
I just thought of one thing that should be doable without any changes to a codec though. When you do 2pass encoding you should be able to do them at almost the same time via a distributed solution.
Acaila
17th September 2002, 19:18
Actually 2-pass mode is the least efficient one if you want to do that over a network. This is because the first pass has to be done on a single computer, leaving you with a minimum encoding time of 50% compared to a normal encoding (if the 2nd pass were to be completed instantly through a network).
Then you have the problem if you give each computer in the network an equally large piece it will slow down encoding to the speed of the slowest computer. Unless you make a test first to determine the encoding speed of each computer and base the block size on this, which in turn greatly complicates writing a program that can do that.
This whole distributed-encoding-thing has been discussed many times before, it's just too much of a hassle with too few benefits. Even if implemented correctly it will not save you a lot of time on an encode, and the amount of things that can be implemented wrongly is simply too great (if you still want to keep optimum quality that is, which Vidomi does not do).
SMP encoding on the other hand can be much more rewarding (because you don't have to break the movie up into several pieces, and thus keep optimum quality), but this is also quite hard to code.
int 21h
17th September 2002, 19:28
If you went to a lower level in the codec, you could run whatever pass or mode you wanted to distributively, because, ideally, the distributed nature would be linked to raw calculations, and not frames or what not. (Similar to the currently in use distributed projects by Intel (i.e. cancer research, genes, anthrax resesarch, etc))
Even SMP isn't a silver bullet, because most people are only on two processors, so you've already got two very clear cut processes going on. Decompression, Compression.
WarpEnterprises
17th September 2002, 23:32
Back to Convolution3D:
I notice a red hue after using C3D - anybody else affected?
(Applying it 10x and I see it VERY easy...)
MaTTeR
17th September 2002, 23:37
Actually in my latest C3D tests I'm seeing a green hue in parts of the images but then they disappear. I don't know for sure if this is for sure an issue with C3D or possibly ffdshow though. I need to investigate further.
Edit- Sorry, false alarm from my side. The nasty green hue I'm seeing has been narrowed down to an ffdshow problem.
manono
18th September 2002, 01:46
Yeah Warp-
I've noticed the slight red hue also-I used C3D twice once and it was a bit more noticeable. Faces sometimes seem a bit flushed.
sh0dan
18th September 2002, 18:33
Yes - C3D has a rounding bug - use compare() to see the hard numbers.
vlad59
18th September 2002, 19:00
Oooops. I thought I've fixed most of them.
I already fixed (it's not released yet) a rounding bug on the temporal blur done on first and last line. But there could be other bugs.
@ShOdan
Can you explain me how do you check that with compare ?
Thanks advance.
EDIT : fixed some typos
sh0dan
18th September 2002, 19:13
@vlad: This was the script I used:
avisource("d:\video\leo\leo-2d-samlet-2.avi")
convertbacktoyuy2()
c3d=Convolution3d(0,8,8,8,8,3,0)
c3d=Convolution3d(c3d,0,8,8,8,8,3,0)
c3d=Convolution3d(c3d,0,8,8,8,8,3,0)
c3d=Convolution3d(c3d,0,8,8,8,8,3,0)
compare(c3d)
Mean abs dev. (Mean absolute deviation) shows the average difference between the original and your filter - not of much use, when your filter changes the image (as yours). It does X = sum_of_all( abs(pixel - org_pixel)) / pixels
Mean dev. Shows the difference WITHOUT using an absolute value. This shows if there is a bias toward rounding up/down - if rounding is correct, this value will be close to 0, since statistically half the pixels are rounded down, and the other half is rounded up.
It does X = sum_of_all(pixel - org_pixel) / pixels - (can't remember if pixel and org_pixel have to be switched).
vlad59
18th September 2002, 20:03
Yep
Got it !!
Already found it : this rounding bug only exists with matrix 0 and it's due to multiple pavgb use.
It will be release tomorrow. I need some time to test it before.
Thanks a lot for this script sh0dan
Defiler
19th September 2002, 17:31
Don't forget to hook me up with a copy so that I can host it. :)
vlad59
20th September 2002, 08:02
@Defiler
Don't worry, you'll receive a mail. ;)
@all
I'll be a little late. Next version of Convolution3d will be released tonight.
Yesterday I thought I could have time to fix the rounding bug (it's done) and to finalize the small improvements I began (done but not enought testing). But to be sure to have no (too much) bugs. I'll make two releases.
Sorry again
vlad59
21st September 2002, 14:03
I'm again a little late. but I fixed all the rounding bugs of convolution3d. So the beta4 is only a bugfix release, you'll have to wait for the 1.0 to have new functionality.
The beta4 will be available at http://hellninjacommando.com/con3d/ as soon as Defiler has time to update the page.
I've also attached the beta4 to this post.
Defiler
21st September 2002, 18:12
OK. The site is updated, at the URL that Vlad just mentioned.
iago
21st September 2002, 20:27
@vlad59,
[...] for normal film : Convolution3d (0, 8, 8, 8, 8, 3, 0) or
Convolution3d (1, 8, 8, 8, 8, 3, 0) are way better if you don't want to huge blur on characters faces. [...]
from the readme file
Imho it would be better to update these lines in the readme file as well, since (0/1, 8, 8, 8, 8, 3, 0) also seems to go too harsh and sweep away too many details (together with the noise) for normal and clean films.
According to the latest tests, perhaps it's more proper to say:
values such as (0/1,4,4,4,4,2.8,0) can be more suitable for normal and clean movies.
kindest regards and thanks for the new release,
iago
vlad59
21st September 2002, 20:35
@iago
Ooooops, you're right iago. I followed all your test and agreed on your conclusion.
This will be fixed in next release.
Thanks for reporting ;)
Regards
MaTTeR
21st September 2002, 21:11
Think I would have to go along with that also guys. In fact (0,4,4,4,4,2.6,0) even seems to be a bit harsh on my eyes for some movies. I'm still struggling trying to find a setting I like on clean progressive DVD sources but it just seems to blur details a bit much. Guess it's more suitable for "dirty" sources or anime in general.
Defiler
21st September 2002, 22:27
vlad: I'd be happy to update the readme on the website, if you can tell me which settings are now recommended for various types of sources.
vlad59
24th September 2002, 08:02
Ooops haven't seen your post Defiler. I'll update my readme and mail you today.
Thanks
unplugged
8th October 2002, 00:53
I have made some (comparison) tests using beta4 Convolution3d and it seems to me that Matrix 1 is somewhat more precise than 0 with temporal jobs like Convolution3d(1,0,0,4,4,3,0).
What I point is that matrix 1 isn't so worst than 0 for low-noise content, with temporal intervention matrix 1 can be more precise than 0 (I think due to nature of its matrix coefficients), of course with lower thresholds.
I have considered many times a specific C3D setup oriented for static noise removal (with 0,0 spatial thresholds) by finding good temporal values, there are several movies with noise and lot of detail at same time, these are hard cases and need perfect compromise! ;)
vlad59
8th October 2002, 12:18
In fact, I never thought of using convolution3d by keeping only Temporal thresholds ;).
It's normal that matrix 0 produce worse results with your parameters :
If you use 0, 0 as spacial thresholds then
Current Frame weight = ComputedPixel * 32
And NewPixelValue = PreviousFrameWeight + NextFrameWeight + ComputedPixel * 32 / 64
So in this case the original value of the pixel has a lot of influence.
With Matrix 1 :
Current Frame weight = ComputedPixel * 9
And NewPixelValue = PreviousFrameWeight + NextFrameWeight + ComputedPixel * 9 / 27
So here the original pixel has less influence.
If my explaination are not clear enought (in about 95% of time ;)), you can have a look at the beginning of the thread named Smooth in time and space. I've explained with an example how work Convolution3d.
If you want I can build a test version with no use at all of the current frame to use pure temporal informations.
theReal
8th October 2002, 12:44
The last movie I encoded using convolution3d was Cruel Intensions (PAL, region 2) - I only wanted to improve the looks because the compressibility of this movie is really good.
For this special case I found that using a relatively strong setting (1,6,8,6,8,2.8,0) together with a little sharper resizing (bicubicresize(640,352,0,0.6)) gave very good results. The details were kept, but the movie's annoying artefacts were filtered away.
Another movie that I could improve with convolution3d recently was Sixth Sense (also PAL, region 2). This movie also shows annoying artefacts even when encoded with quant 2. Convolution3d(1,3,5,2,4,2.8,0) helped a lot and made the result look better without blurring too much.
I think the best settings depend a lot on how the source movie has been pre-filtered, edge-enhanced (or not) and so on.
What I think is great is that C3D is the first filter that I can use to visually improve even quant 2 encodings.
Thanks again for that great tool!
bb
8th October 2002, 13:18
Originally posted by vlad59
In fact, I never thought of using convolution3d by keeping only Temporal thresholds ;).
That's exactly what I thought when I read unplugged's post. For this purpose you'd better use a dedicated temporal filter (should be faster).
bb
vlad59
8th October 2002, 18:38
@TheReal
Yep that's exactly the way I'm using Convolution3d. As I mainly encode/test animes I use the following script :
Convolution3d (1, 8, 16, 8, 8, 2.5, 0)
LanczosResize (XXX, XXX)
MSharpen () -- if necessary
With I don't gain a lot in compressibility (roughtly 5 - 15% depending of the strength of C3D), but the result is often good (I mean clean and sharp enought at least for my taste ;)). I have to test a little more warpsharp to see if it can help.
I have never encoded "the Sixth Sense". I own this DVD, so I'll make a test just for curiosity.
@bb and unplugged
I remember a thread some weeks ago about using only temporal data if motion is small. I think Siwalters made a test filter and it wasn't very effective.
But as always I may be totally wrong :( . So please excuse me in advance if so :rolleyes:
unplugged
9th October 2002, 00:51
thanks, really I hadn't tried TemporalSoften or TemporalSmoother ... for some stupid reason I have fastly speculated that the last arrived (C3D) was less worst of the group... sorry for previous post
Now, by trying in this right moment TemporalSoften (AVS 2.06) I believe to have found a very good balance point with parameters: it satisfies me a lot.
What interest to me firstly is to remove noise fluctuation and secondly to grab the (little) bitrate gain; I don't like blur minimally 2D detail not even if it mainly applies to motion (but this is not the case of anime content, of course animes usually need heavy 3D smoothing).
Noise firstly irritates me :), apart the bitrate eat problem it brings the encoder to generate even more annoying macroblock fluctuations.
Plus, in these cases with XviD I always use H.263 q. matrix, with not clean content MPEG tends to emphasize artifacts...
[Edit]
P.S.: Any experience about results/diff. between TemporalSoften and TemporalSmoother?
When someone talks about TemporalSmoother, is it intended the one contained in MPEG2DEC.DLL ?
SansGrip
9th October 2002, 02:51
unplugged: Now, by trying in this right moment TemporalSoften (AVS 2.06) I believe to have found a very good balance point with parameters: it satisfies me a lot.
For noisy sources (e.g. captures from VHS) I use a combination of Cnr2(), TemporalSoften(x, x, 0) and MSharpen(x, x) before Lanczos resizing to 352x240. I've found this gives me the best compromise between reducing noise and maintaining detail and results in a fairly sharp image.
unplugged: P.S.: Any experience about results/diff. between TemporalSoften and TemporalSmoother?
In my experience TemporalSoften() gives comparable results and is slightly faster, but I could be missing something.
unplugged: When someone talks about TemporalSmoother, is it intended the one contained in MPEG2DEC.DLL ?
That's the only one I know of.
Piper
9th October 2002, 16:27
First, thank you all for providing these filters...this is really great stuff.
@vlad59
>Yep that's exactly the way I'm using Convolution3d. As I mainly encode/test animes I use the following script :
Convolution3d (1, 8, 16, 8, 8, 2.5, 0)
LanczosResize (XXX, XXX)
MSharpen () -- if necessary
Thinking aloud....
That's precisely the same method I've started using with my encodes, though I'm still fiddling around with my settings (aren't we all?).
For tv caps, I'm currently using:
Convolution3d(0,4,4,4,4,2.8,0)
LanczosResize(384,288) <--From 720x480
MSharpen(threshold=15,strength=50)
C3D gives good results and is faster than combining 2D Cleaner and Temporal Smoother filters. The trailing effect from the Temporal filter (even with very light settings) seems to be a thing of the past. I don't pretend to understand the the C3D settings however. These settings are used from piecing together the results from other posts. If there are other Howto's on the subject beyond the .txt provided with the fitler....post please?
I'm having very good success with LanczosResize and I particularly like it's tendancy to sharpen the image, esp since DivX tends to have the opposite effect. :-)
I've only started to use MSharpen and so far I like what I see. There's some fine tuning to be done with the threshold, but I'll get there. Up until now, I've been using UnSharp Mask but have been dissapointed with it's tendancy (combined with BiCubic resize) to emphasize (if not create) halo's (aliasing?) around sharp edges.
Again, thanks for the filters, my encodes keep getting better and better as a result.
jarthel
10th October 2002, 12:45
body=mpeg2source("d:\dvdrips\lodoss14\lodoss14.d2v").trim(0,40176).Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Decimate(cycle=5).crop(14,4,692,472).temporalsmoother(5).Convolution3d (0, 8, 16, 8, 8, 3, 0).lanczosresize(640,480)
return body
-----------------
Tested that script last night on Record of Lodoss War. Very messy anime, lots of interlacing and quite noisy. Results are quite good and comparable to SSHiQ. And much much faster than SSHiQ! It save around 30 minutes/pass. Thank you Vlad.
jayel
bb
10th October 2002, 13:46
Originally posted by jarthel
body=mpeg2source("d:\dvdrips\lodoss14\lodoss14.d2v").trim(0,40176).Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Decimate(cycle=5).crop(14,4,692,472).temporalsmoother(5).Convolution3d (0, 8, 16, 8, 8, 3, 0).lanczosresize(640,480)
return body
What if you skip the temporalsmoother?
bb
JohnMK
11th October 2002, 08:26
Can you guys recommend a decent commandline for The Simpsons, NTSC? :)
HarryM
10th November 2002, 17:29
@vlad59:
I have special question at Convolution3D_YV12.
You present, that Convolution3D works at matrix 3x3x3 pixels.
Luma filtering is 3x3x3 pixels (logicaly).
But what chroma filtering? At YV12 is 1 logical chroma pixel = 2x2 physical pixels, right?
Chroma filtering is
a) 3x3x3 physical pixels too or
b) 3x3x3 logical pixels (6x6x3 physical pixels)???
When it a), can you make on b) for speed-up filtering?
theReal
10th November 2002, 18:19
What if you skip the temporalsmoother?
For very noisy sources, temporalsmoother before C3D is quite good. I've done that recently on a tv-capture and the result was great. In my experience, C3D alone is not perfect for removal of very strong noise - temporalsmoother's smoothing effect is much stronger (which can be good or bad, depending on the source quality)
I've repeatedly said I very much like C3D to encode mediocre DVDs to 'perfect' Divx - but for my Simpsons tv captures I'm still using this filter chain (avisynth 2.06):
temporalsmoother(4,1)
spatialsoften(2,5,7)
temporalsmoother(4)
This is much too strong for anything else than cartoons, but for exactly that it's more effective than C3D.
Shayne
11th November 2002, 03:12
Been playing with this filter for some time now and i am getting fantasic results on my 720x480 mpeg2 tv caps with
Convolution3D (0, 10, 17, 10, 13, 2.8, 0)
unfilter(+#,+#)
Wario
16th November 2002, 06:23
Originally posted by theReal
For very noisy sources, temporalsmoother before C3D is quite good. I've done that recently on a tv-capture and the result was great. In my experience, C3D alone is not perfect for removal of very strong noise - temporalsmoother's smoothing effect is much stronger (which can be good or bad, depending on the source quality)
I've repeatedly said I very much like C3D to encode mediocre DVDs to 'perfect' Divx - but for my Simpsons tv captures I'm still using this filter chain (avisynth 2.06):
temporalsmoother(4,1)
spatialsoften(2,5,7)
temporalsmoother(4)
This is much too strong for anything else than cartoons, but for exactly that it's more effective than C3D.
Agree with TheReal because my Capture video (music clip) have NOISE and Convolution3d remove the noise but not perfectly, TemporalSoften remove more...
jarthel
16th November 2002, 12:46
Originally posted by bb
What if you skip the temporalsmoother?
bb
sorry for the late reply.
It's not as good and the I've realized since that temporalsmoother(5) makes a video more compressible.
jayel
Holomatrix
3rd December 2002, 16:43
sorry to bud in, but would you recommend this 3d filter with low bitrate DVD encodes? or just stick with TemporalSmoother? I'm doing some test's encodeing DVD to a 900 bitrate just to see what are the best filters do yeid acceptable quality with no macroblocks. Thanks
serbersan
3rd December 2002, 17:00
@vlad59
What about a new (another) preset for credits treatment??? I mean a very agressive one.
Not only, HQanime, LQmovie... besides for credits.
Thanks.
Didée
3rd December 2002, 17:17
Holomatrix,
when aiming for low bitrate encodings, I would definetly give Convolution3D a try. You can achieve much better results than with temporalsmoother alone - though you might have to wait a little longer for the C3D encoding to finish ...
For the macroblocks -
the more compressable you make the source by smoothing and/or removing details, the higher the risk is that you get macroblocks. Since some areas may become too "flat" by the smoothing filters, the codec might decide "to pull out its biggest hammer" on these areas - that's more or less by mpeg-4's design.
Perhaps you might be interested in this thread (http://forum.doom9.org/showthread.php?s=&threadid=37135). The discussion there is about fighting mpeg macroblocks and - are you sitting firmly - adding noise to the source.
Just for curiosity, a few days ago I tried to put LOTR extended version (~ 3h 20min) on 1 CD, pulling out most of my filtering knowledge. It turned out that the result looks *astonishingly* good on my 34" TV-set (but for viewing on CRT, of course I prefer my 2CD backup).
Remark: I OWN this DVD box ;)
Holomatrix
3rd December 2002, 18:33
Ok, thanks for the info. Do you mind posting the script you used? and I'll read that thread.
Thanks
vlad59
3rd December 2002, 19:46
@Holomatrix
I don't really recommend anything as I don't have enought time to encode a lot :( .
But I created Convolution3D exactly for this problem a very noisy low quality anime on DVD.
With Convolution3D you don't remove all the noise if the source is really noisy (other filters are way better for this : PeachSmoother for example) but you soften enought the source to remove most of combing artefacts and source macroblocks and you make your source more compressible.
With anime source I really want to smooth a lot you can use msoften in addition (it really does a good job).
Later, thanks to iago, we found that it helps compressibility even on hi quality movie source without losing too much details.
@serbersan
I plan to make another YUV2 version of Convolution3D soon to synch with the alpha version I did for Avisynth 2.5.
I'll add that.
iago
3rd December 2002, 22:07
Originally posted by vlad59
[...]Later, thanks to iago, we found that it helps compressibility even on hi quality movie source with losing too much details.[...]@All Convolution3D users!
Do not panic! Despite the fact that Vlad, the author of this great filter, tries to misinform and mislead you from time to time, though I don't know why, Convolution3D is absolutely one of the best in keeping details! :D
With his above claim, Vlad is absolutely sabotaging this amazing filter; don't believe his lies! Believe me! :D
The truth is as below:
[...]Later, thanks to iago, we found that it helps compressibility even on hi quality movie source without losing too much details.[...]
regards ;),
iago
vlad59
3rd December 2002, 22:12
@iago
Ooooops, I really should reread my posts more often.
Thank you very much for fixing this big typo ;) ;) ;)
I've edited the previous post .... :rolleyes:
It's a really good thing you was here iago.
Take care.
iago
3rd December 2002, 22:14
Vlad,
Thanks are for you, man, for your outstanding filter! ;) Keep up your great work! ;)
best regards,
iago
mikeson
3rd December 2002, 22:56
I just cannot stand away when there is so much flattering here ;)
Vlad, I have to say that your C3D is so outstanding filter, I use it almost in every script (to be honest, in every :D ), because all DVD I've got on my HDD are noisy (some less, some more, but it is always there).
Keep up good work! :)
dvd2svcd
4th December 2002, 10:04
This filter so good that it makes Blair Witch Project look like it was shot with regular studio cameras :D
Marc FD
4th December 2002, 14:47
if i could only choose one denoiser, it would be c3d ^^
for MPEG-4 blocking, it'll always look better with c3d than without.
if you still think you get MORE blocking with c3d, add a bit AC noise, it's the best way to add noise on movie encodes. i don't use it, because i only encode anime.
HarryM
4th December 2002, 15:06
Yes.
For Avisynth exists many good temporal/spatial filters, but Convolution3D is the best!
Convolution3D is NUMBER ONE for me.
I vote for implementing Convolution3D direct into Avisynth.:D
vlad59
4th December 2002, 16:13
Thanks all for your kind words :D :D :D
As soon as C3D YV12 beta 3 seems to be stable enought. I'll ask Sh0dan to add it in avisynth 2.5 and maybe to have CVS access.
Satlover
4th December 2002, 22:54
Sorry I have to ask this but can some one help me where can I find the
C3D YV12 beta 3?
avisynth 2.5 ?
At the moment I am using avisynth 2.07
Dreassica
4th December 2002, 22:59
Check the YV12 FAQ topic which is Sticky at the top of this forum section. There u wil find all the links u will need.
Satlover
4th December 2002, 23:40
I have got my script to work, Not sure about the following for a 3CD rip (752x432)
1) Which filters? the MPEG2Dec3.dll or MPEG2Dec3 YV12.dll
2) Convolution3D.dll or Convolution3D_YUV12.dll
(what settings?)
3) Lanczos3 resize or bicubicresize ?
LoadPlugin("C:\DVD\AviSynth2\plugins\MPEG2Dec3 YV12.dll")
LoadPlugin("C:\DVD\AviSynth2\plugins\Lanczos3.dll")
LoadPlugin("C:\DVD\AviSynth2\plugins\Convolution3DYV12.dll")
vid=mpeg2source("F:\video.d2v")
#vid=LumaFilter(vid) #(for iago :-) same as lumaoff=-2
vid=Crop(vid,1,70,-1,-70) #(keep even crop values, at least horizontally)
vid=lanczosResize(vid,752,432) #keep as multiples of 16
#vid=bicubicresize(vid,752,432,0,0.5) #you might like this
Return vid
Any inputs would help a begginner
Thanks
cult
5th December 2002, 16:48
LoadPlugin("C:\DVD\AviSynth2\plugins\MPEG2Dec3 YV12.dll")
LoadPlugin("C:\DVD\AviSynth2\plugins\Convolution3DYV12.dll")
mpeg2source("F:\video.d2v")
LumaFilter()
Crop(vid,1,70,-1,-70)
Convolution3d (preset="movieHQ")
bicubicresize(752,432,0,0.5)
you dont need to load lanczos as it is implented in avisynth.you can replace bicubicresize(752,432,0,0.5) with LanczosResize(752,432)
Satlover
5th December 2002, 18:34
Thanks allot cult, strange I got an error message. No function named lumafilter. Guess I'ts a dll I need.
mikeson
5th December 2002, 18:59
@Satlover:
vid=lanczosResize(vid,752,432)
What is the original video resolution?
If your source is DVD I believe it is 720x576, so why are you extending to something like 752x432? You gain nothing but bigger picture without detail increase, so overall quality will be worse, because codec has to spend more bitrate. ;)
mikeson
5th December 2002, 19:10
@Satlover:
strange I got an error message. No function named lumafilter. Guess I'ts a dll I need.
It's really weird, because LumaFilter is MPEG2Dec3YV12 function.
Are you sure you've got latest version?
Satlover
5th December 2002, 19:25
Yes you are right, 720x576 is correct. So now I have 720x432 if I use 720x576 the screen widens. Thanks for pointing that out!
Satlover
5th December 2002, 19:29
I am now getting great results with this. Thanks for all the help, comments are welcome :-)
LoadPlugin("C:\DVD\AviSynth2\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\DVD\AviSynth2\plugins\Convolution3DYV12.dll")
mpeg2source("F:\1.d2v")
Sharpen(0.5)
LumaFilter(-2, 1.02)
Crop(2,70,-2,-70)
Convolution3d (preset="movieHQ")
LanczosResize(720,432)
mikeson
5th December 2002, 19:41
@Satlover
Yes you are right, 720x576 is correct. So now I have 720x432 if I use 720x576 the screen widens. Thanks for pointing that out!
I'm glad to help. ;)
Sharpen(0.5)
Consider using trbarry's UnFilter. I think it is great filter IMHO. ;)
Marc FD
8th December 2002, 17:40
hi ^^
i coded a conv2d filter for my XviD DFD-optimised prefilter,
and i decided to do 3d with (when you have 2d, 3d is easy),
and i coded 3 hours today to finish it. it's a 3d convolution
with 27 real checkpoints per pixel and 111/121 matrix.
speed behaviour is _very_ strange.
so i've three questions :
@vlad
1) is convolution3d doing 27 REAL checks per pixel ??
2) is convolution3d a release build ??
2) is convolution3d really MMX optimised ??
3) can i use "c3d" or "conv3d" or something like that in the name of my filter ??
@all
4) i dunno how to name my filter... "c3d"(2?) ? or "convolution3d(2)" ? or something like that. i'm opened to any suggestion.
(at this rate i'll name my filters noname1,noname2,... ^^)
i could release it now, but i don't have a name (current is "c3d")
vlad59
8th December 2002, 19:38
Originally posted by Marc FD
@vlad
1) is convolution3d doing 27 REAL checks per pixel ??
2) is convolution3d a release build ??
2) is convolution3d really MMX optimised ??
3) can i use "c3d" or "conv3d" or something like that in the name of my filter ??
@all
4) i dunno how to name my filter... "c3d"(2?) ? or "convolution3d(2)" ? or something like that. i'm opened to any suggestion.
(at this rate i'll name my filters noname1,noname2,... ^^)
i could release it now, but i don't have a name (current is "c3d")
For the question :
1) Yes
2) It should be, I hope.
2) Yes
3) I would prefer another name to avoid some misunderstanding but I have no idea for this (I'm really bad in choosing filters name).
What do you mean but strange speed behaviour ?
Marc FD
8th December 2002, 19:58
>3) I would prefer another name to avoid some misunderstanding but I have >no idea for this (I'm really bad in choosing filters name).
okay.. it's very close to convolution3d, but it's definitively not the same filter, because i coded it from scratch and i never taked a deep look into convolution3d source (that's why i don't know how it works)
>What do you mean but strange speed behaviour ?
it's very strange, i'd like to be sure it's not a dumb error....
i'll explain later... i need to fix something, and to find the name.
vlad59
8th December 2002, 21:17
@Marc
I forgot I was mainly talking about Convolution3D for avisynth 2.5 (YV12). The YUV2 version is also optimized but the code is crappier.
The YV12 version is also still optimizable (don't know if it's good english ... :p ), I gained +2~3 % this weekend just by switching some MMX instruction order.
I'm eagerly waiting for your filter.
Marc FD
8th December 2002, 21:57
...
i lost 1 hour to debug something really dumb, but now it works VERY well.
i'll try to package a preview ^^
Marc FD
8th December 2002, 22:08
(attached "tiya3dd.zip")
@all
try this stuff : that's how i do 3d filtering in 6 hours coding.
enjoy.
Marc FD
8th December 2002, 22:23
another questions, vlad :
- so you didn't separated the matrix at all ??
- when you do your 27 checks, are you always using the center pixel as reference ??
Guest
8th December 2002, 22:42
Marc, can you please start a separate thread for your filter? It is considered bad form to hijack threads. Thanks!
vlad59
9th December 2002, 06:49
Originally posted by Marc FD
another questions, vlad :
- so you didn't separated the matrix at all ??
- when you do your 27 checks, are you always using the center pixel as reference ??
1) I don't understand your question ???????????
2) Yes 27 real check always with center pixel.
EDIT : When I use your filter I have a non empty FPU state error (emms missing) in Vdub !!!! Am I the only one ?
Marc FD
9th December 2002, 13:04
EDIT : When I use your filter I have a non empty FPU state error (emms missing) in Vdub !!!! Am I the only one ?
yes i forgot the emms at the end. in fact i didn't forgot it, it was just a preview and it was working, so...
@don
you're right. (but i missed a name. found one myself finally ^^)
i apologize, i'll do a new thread with a stable version with readable readme ^^
CruNcher
9th December 2002, 22:28
I experienced a problem with Vlads convolution which i have not with the filter from Marc after using Convolution YV12 1 Right Line gets Cutted away and some wierd White lines appear in this black region at playing the Xvid really strange effect also 1 white dot above this black region and 1 below this black region are encoded
this affect is not appearing wiht Marcs Filter so i think its a convolution error ?
vlad59
9th December 2002, 22:36
Strange effect .....
Are you using beta 3
Can you post your avs script (because the width constraint was only removed with beta3 so I may have forgot something).
And expect more speed in beta4, I really made some bad code in beta3 ....
CruNcher
9th December 2002, 22:45
LoadPlugin("MPEG2Dec3YV12.dll")
LoadPlugin("DecombYV12.dll")
LoadPlugin("tiya3dd.dll")
LoadPlugin("avsmon25a.dll")
MPEG2Source("test.d2v",idct=5,iPP=true,cpu=5)
crop(10,1,698,572)
FieldDeinterlace(full=true,chroma=true,blend=true)
#tiya3dd(1,10,10,30)
Convolution3d(preset="vhsBQ")
LanczosResize(512,384)
MonitorFilter
thats the avs i used every filter is the newest version i hope
1.0.0.3 Version number of your filter YV12 & SMP Build
PS: Yes i know that are very aggresive settings but i want maximum compressability and for everyone who wants to know this is running @
4 Fps on my P4 1.8 :D
The Edge
9th December 2002, 23:10
I'm also having a problem with Vlad's convolution3D.
I notice if I use it before resize, I get a fuzzy line top and bottem of image and a white dot on the bottem left corner.
If I then put convolution AFTER the resize, no problems.
Same with simple, sharp or Lanczos Resize. No other AviSynth features in use.
Not a codec issue as when avs is opened in VDub, i notice this fuzzy line. I can post a screen shoot if you wish.
Also, does not matter what settings I choose with C3D.
Edge
CruNcher
10th December 2002, 00:43
Jep can confirm thats a solution :)
The Edge
10th December 2002, 00:54
P.S.
My 1CD encodes of "Minorty Report" and "Vanilla Sky" look great thanks to Convolution3D.
Thanks Vlad :)
Edge
kilg0r3
10th December 2002, 10:12
@The Edge :)
i know this is not the place, yet could you post your script and codec settings for these movies?
JimiK
10th December 2002, 13:05
As you all may know, sometimes filters have problems when you feed them with an uneven number of lines. That could be a reason that it works after resize and not before. My solution for this problem is the following: Of course you want to crop before using filters to gain speed. And you want to get rid of every part of the black bars. So you crop them and get an uneven number of lines. To gain some speed and still feed an even number into the filters you could to try it this way.
crop(8,64,0,-72) #dividable by 8
filters...
crop(1,5,-2,-2) #no more black bars
resize
Even if there are black bars after the first crop, you threw away lots of unused stuff. The picture size is dividable by 8 and the second crop cuts of the last black bars before resize.
Best regards,
JimiK
kilg0r3
10th December 2002, 13:43
1. I'd suggest to simply crop to even numbers. i even always crop to mod8, especially when not resizing my 2cd rips
2. The problem seems to occur when c3d is used before the _resizer_. are there people resizing to uneven values???
[Southern Germanan reproval] erscht läse donn schraiwe. s'negschte mol, gell. [/Southern Germanan reproval]
The Edge
10th December 2002, 21:46
Convolution3D used before resize.
LoadPlugin("C:\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\GORDIA~1\Convolution3d.dll")
mpeg2source("D:\VOBs\ALI\project.d2v")
crop(11,75,700,427)
Convolution3D (0, 3, 4, 3, 4, 2.8, 0)
LanczosResize(512,208)
The Edge
10th December 2002, 22:28
Convolution3D used after resize.
LoadPlugin("C:\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\GORDIA~1\Convolution3d.dll")
mpeg2source("D:\VOBs\ALI\project.d2v")
crop(11,75,700,427)
LanczosResize(512,208)
Convolution3D (0, 3, 4, 3, 4, 2.8, 0)
The Edge
10th December 2002, 22:35
Having alot of difficultly posting today.
It is much more easier to see this effect with a sample .avi
@kilg0r3
Don't know if I have them still saved on my hdd but I'll have a look.;)
Edge
JimiK
10th December 2002, 23:09
@kilg0r3
What do you mean with "first read then write"? After it's written in german I think you mean me. First I have to say that just cropping to even numbers is absolutely required if you don't resize, because most codecs don't like und uneven input.
"The problem seems to occur when c3d is used before the _resizer_": I don't think anybody would resize to an uneven number of lines. I just wanted to present a solution for people that want to use filters after crop, but before resize. I'm one of the persons that are convinced that the quality is better when using filters before resize.
Best regards,
JimiK
vlad59
11th December 2002, 08:44
I think that with C3D v1.01 and C3DYV12 beta 3 the width has to be mod-2.
@the Edge
I think you're using the YUV2 version of C3D ..... And I was checking with the YV12 -> gonna recheck tonight.
sh0dan
27th December 2002, 12:09
@vlad: I hope you haven't left us - haven't seen you around in a while.
Anyway, I have been thinking about how to improve the speed of your filter, and something stroke me.
If you are game for a wild experiment I think we could speed up your filter very much. It would also simplify your filter very much.
The key to success ;) lies in preparing your data prior to processing it. By that I basicly mean repacking your data for much faster (and non-branching) access.
You are processing up to 27 pixels to produce one pixel - these pixels are scattered all around both spatial and temporal.
If you instead started your filter out by putting these 27 pixels in a row you wouldn't have to change your read pointers all the time.
For cache efficiency you should process one line at the time.
Create an array sized (32*rowsize) (8 byte aligned) [called a1]
Create an arrray of 32 bytes (this is for your thresholds) [a2]
Create an arrray of 32 bytes (this is for your weights) [a3]
Creare an array to store your data.
Then copy the pixels from the source images into array a1 - you can safely use plan C here - I don't think you'll get much of a speedup here.
Now place the appropriate thresholds in a2 and the weights in a3.
As you can see now you have all your data aligned up properly, and you can do all your processing in one pass. Actually you can safely do 8 pixels in parallel. (and don't mind the extra 5 pixels processed, just set threshold to 0)
If you need to look up the final pixel value, store the accumulated data in the destination array, and do the final lookup in C, when the entire line has been processed. Make your lookup table as small as possible!
If you are _really_ clever - you even try not adding the cases where threshold=0 to a1,a2 and a3. However I'm not sure how much you would gain, since your algorithm would become more complex. Only do so if you are sure you can save 8 or 16 bytes.
ps. please do an isse implementation when doing min/max functions - it's so much faster ;)
pps. this could also be an excellent excuse for you to change PlugInInit to PlugInInit2 and remove the case sensitive presets :)
edit: only planar makes it possible :)
Marc FD
29th December 2002, 22:46
arhg XD..
i don't understand anything...
say me if it gives more than a +50% speedup (that's what i get with my c3d implementation), i'm interessed ^^
sh0dan
29th December 2002, 23:37
In temporalsoften it provided a speedup of several hundred percent, using a quite similar approach (single line / multiple pass processing), and (depending on your current implementation), it'll probably give at least a 100% speedup.
Marc FD
30th December 2002, 00:10
strange, i don't get it.
my c3d implementation is very simple (10x less code than vlad) but gives (sometimes) the same results than vlad's one.
i don't use any max/min, what's the use of these ?
why do you unpack the pixels ?? i keep vectorized acces, and i unpack only internally for accumumation. maybe creating a unpacked array will speedup the whole thing, but i'm not sure at all, because i would need to fetch 300% more data, it may be a too big overhead.
maybe it'ld be good to prepare a interleaved work area ? but it'll be 27x bigger than a single line, and preparing it will need a lot of time...
i think i don't understand your suggestion. maybe i should look deeper in the temporalsoften code ^^.
sh0dan
30th December 2002, 00:24
It's very hard to say, without seeing your code.
What I'd _imagine_ is that you are spending a lot of time rearranging data for your spatial blur. Either you are getting many misaligned reads (not doing 8-byte aligned movq's or not doing 4 byte aligned movd). Otherwise you are probably shifting a lot around.
This method will allow you to do all your processing without unpacking/moving or shifting any data before you have to do the accumulation.
Regairding the data size - it'll actually reduce data load. If you process _one line at the time_, and overwrite the unpacked data, it'll remain in cache as long as your code runs - so there will be no memory usage between load/store - all inbetween will be caught by the cache, if you read/write your data aligned.
bb
30th December 2002, 00:27
Actually, sh0dan's ideas for optimization reflect what I proposed a long time ago... I'm really curious how this will work out. I guess Convolution3D is one of the most used filters, so your efforts will be much appreciated. Keep up the good work.
bb
Marc FD
30th December 2002, 01:40
>It's very hard to say, without seeing your code.
sure.
>What I'd _imagine_ is that you are spending a lot of time rearranging >data for your spatial blur. Either you are getting many misaligned >reads (not doing 8-byte aligned movq's or not doing 4 byte aligned >movd). Otherwise you are probably shifting a lot around.
right. misaligned movq's. 18 unaligned and 9 aligned per loop (8 pixels/loop).
>This method will allow you to do all your processing without >unpacking/moving or shifting any data before you have to do the >accumulation.
? i don't care, i do it in the same time than accumulation anyway.
>Regairding the data size - it'll actually reduce data load. If you
>process _one line at the time_, and overwrite the unpacked data, it'll
> remain in cache as long as your code runs - so there will be no
>memory usage between load/store - all inbetween will be caught by the
>cache, if you read/write your data aligned.
okay, but you'll spend a lot of time to interleave... i don't see why it would be faster to do it before.
>Actually, sh0dan's ideas for optimization reflect what I proposed a
>long time ago... I'm really curious how this will work out.
me too. but i'd like to understand it first ^^
vlad59
3rd January 2003, 18:29
@Sh0dan
As you can see in another C3D thread I made a new release of C3D, it includes the min/max function and 8 bytes in parallel instead of 4 before.
I'm surprised about your request about case non-sensitive presets, it should have been fixed in beta3
I also added a fast mode with 11 checks instead of 27 for more speed.
As I'm getting a little more time, I reread your post and I really don't know if it will give a major speedup (but I'll test it anyway). I would have helped a lot un yuv2 but not in yv12.
Strange I'll have to test it.
Another strange thing with C3D is as soon as I try to add a __declspec(align(8)) to have aligned const -> my dll crash ..... really strange :confused:
Anyway happy to be back and thanks for helping me to update C3D
N_F
11th March 2003, 10:28
@vlad59
Quick question: Do you consider C3D finished or are you still working on it?
Ewi
11th March 2003, 17:13
Another question: I can't find any recent usage experiences. Is this Beta for most people rather stable? As it is perhaps one of the most used filters this seems to be interesting and perhaps this is an important factor for a wider usage of AviSynth 2.5, cause many people want 'their' beloved filters.
How far is MarcFD implementation of C3D? Is it almost at the same level or perhaps already more stable?
Thank you in advance...
vlad59
11th March 2003, 18:00
Hi all,
It's been a long time.
I'm very very busy and I think I'll be away for a long time. For me C3D was always under heavy developpement. But as I've no more to spend on it, I will make a public release of the version I was working on. And let's hope someone will continue my work.
IIRC MarcFD's Deen was not as precise as C3D during the threshold check but it was faster, but I have to admit that I never used it or any avisynth filter for the last 2 months :( .
Bye to all and thanks you for all the good time I spend reading and writing in this forum.
bilu
11th March 2003, 18:02
@Ewi
There is already an implementation of C3D for AVS 2.5 .
In AVS 2.07 I preferred Fluxsmooth over C3D mainly for speed reasons but in AVS 2.5 C3D is faster, and works very well. :)
Vlad, you posted first. :)
Best regards,
Bilu
Ewi
11th March 2003, 20:21
Really sad to here that, Vlad... C3D is so far the external filter I used mostly. I don't really know you but I think it was always the fact that you were never arrogant to people not knowing the basics and you were always open for suggestions and help from others.... So, although I'm not really one of the Doom9-important-persons, I would like to say, that I hope we will see you again here...
Thank you...
Marc FD
16th March 2003, 20:22
>IIRC MarcFD's Deen was not as precise as C3D during the threshold
>check but it was faster,
well, AFAIK, precision in Deen is as high as it could ever be ^^.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.