Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th December 2005, 23:26   #441  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Chainmax
Ok, so how do I do that?
My way:

eedi2() # 160x112 -> 160x224
lanczosresize(320,256) # -> 320x256

Quote:
Would mg262's method work?
What he gave is not complete. I suppose he's just saying that you can resize the width by turning. But he still has to get from 224 vertical to your required 256. So maybe he means this:

turnright().eedi2().turnleft() # 160x112 -> 320x112
eedi2() # -> 320x224
lanczosresize(320,256) -> 320x256

Last edited by Guest; 6th December 2005 at 23:29.
Guest is offline   Reply With Quote
Old 6th December 2005, 23:41   #442  |  Link
mg262
Clouded
 
mg262's Avatar
 
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
Quote:
I suppose he's just saying that you can resize the width by turning.
Yes, that's all I meant. Sorry if I was too brief -- I was posting in a hurry. I would also try both variants:

turnright().eedi2().turnleft() # 160x112 -> 320x112
eedi2() # -> 320x224
lanczosresize(320,256) #-> 320x256

eedi2() # 160x112 -> 320x112
turnright().eedi2().turnleft() #-> 320x224
lanczosresize(320,256) #-> 320x256

There probably won't be a difference, but it's hard to be certain without knowing exactly how the filter works... and it doesn't take long to try both. For general resolutions, I would also try overshooting the target resolution and then downsampling... but in this case, 224 and 256 are so close that I don't think it's worth trying.
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed.

Last edited by mg262; 6th December 2005 at 23:46.
mg262 is offline   Reply With Quote
Old 6th December 2005, 23:54   #443  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Ok, which one of these three you prefer:



?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 6th December 2005, 23:59   #444  |  Link
mg262
Clouded
 
mg262's Avatar
 
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
Definitely not the second -- horribly blocky. There's not much between the first and the third, but I think I prefer the third. But both emphasise vertical features more than I would like.
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed.
mg262 is offline   Reply With Quote
Old 7th December 2005, 00:07   #445  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
What do you mean by that?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 7th December 2005, 00:10   #446  |  Link
mg262
Clouded
 
mg262's Avatar
 
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
It looks like everything has been painted by someone who only understood how to make vertical strokes. That may just be a feature of the scene, of course.
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed.
mg262 is offline   Reply With Quote
Old 7th December 2005, 00:15   #447  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Well, the second picture is the source with just lanczos and addborders, does it show that issue as well?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 7th December 2005, 00:17   #448  |  Link
mg262
Clouded
 
mg262's Avatar
 
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
Now that you mention it, looking again, I think it does.
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed.
mg262 is offline   Reply With Quote
Old 7th December 2005, 01:14   #449  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
The size is not 320x256 as you said you required. Why are you changing the game?
Guest is offline   Reply With Quote
Old 7th December 2005, 02:04   #450  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
The actual picture size is 320x256, I'm just adding borders to reach a DVD compliant resolution.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 8th December 2005, 05:29   #451  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
@tritical

OK, first time I'm using Tdeint()...

You wrote:

Quote:
That means TDeint could use EEDI2 in the following way (assuming clip is TFF):

interp = separatefields().selecteven().EEDI2(field=1)
tdeint(edeint=interp)
I wanted to try this adaptive use of eedi2(). I had a BFF wedding DV clip. So I did this first:

interp = separatefields().selectodd().EEDI2(field=0)
return interp

The result is nice:



Then I tried this:

interp = separatefields().selectodd().EEDI2(field=0)
tdeint(order=0,edeint=interp)

But the result is not so nice (note aliased diagonals):



Can you set me straight, please? Thank you.
Guest is offline   Reply With Quote
Old 8th December 2005, 07:28   #452  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
I stated things incorrectly and oversimplified into two scenarios when there are actually four same framerate deinterlacing cases that need specific handling. The configurations should be:

1.) bff clip, keep bottom field, interpolate top field:

interp = separatefields().selecteven().EEDI2(field=0)
tdeint(order=0,field=0,edeint=interp)

2.) bff clip, keep top field, interpolate bottom field:

interp = separatefields().selectodd().EEDI2(field=1)
tdeint(order=0,field=1,edeint=interp)

3.) tff clip, keep bottom field, interpolate top field:

interp = separatefields().selectodd().EEDI2(field=0)
tdeint(order=1,field=0,edeint=interp)

4.) tff clip, keep top field, interpolate bottom field:

interp = separatefields().selecteven().EEDI2(field=1)
tdeint(order=1,field=1,edeint=interp)


The settings you tried should be changed to either case 1 (just change selectodd to selecteven) or case 2.

There are also the configs for bobbing, but atm the edeint option is broken for bobbed output so I'll post those later when it is working.

Last edited by tritical; 9th December 2005 at 03:19.
tritical is offline   Reply With Quote
Old 8th December 2005, 15:11   #453  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Thank you for the clarification. I tried case 1. But the result is not as satisfying as I hoped. Please compare the sharp diagonals to the pure eedi2() picture in my previous post (especially over Ben's right shoulder). Is there anything I can do, perhaps lower the threshold?

EDIT: Even with thresholds at 0, it's not improved. Apparently it is the alternating of passed through content with interp'ed content, as can be seen via the map option, that causes this. I think we need to determine the combed areas and then use the interp'ed data on all scan lines within that area. What do you think?

case 1:


Last edited by Guest; 8th December 2005 at 15:18.
Guest is offline   Reply With Quote
Old 8th December 2005, 21:53   #454  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
@neuron2
Any way that I could get that part of the clip for testing? Also, how fast is the background moving in that sequence? If you set the motion thresholds to -1 do those areas look as they do in the interp clip?

Quote:
I think we need to determine the combed areas and then use the interp'ed data on all scan lines within that area. What do you think?
Expanding the motion map that way would probably help in this case, but I can't say for sure without seeing which pixels it is weaving and why.

@All
I was thinking last night about making an edeint type option for the motion map that would allow TDeint to take a motion map from another filter. I've realized that I don't want to reimplement all of the options and features of TDeint in TDeint2 (and the code in TDeint is so big and ugly that if I did I would rewrite it all) when the only real changes would be EEDI2 type interpolation, which can already be used in TDeint, and the new motion mapping. So instead, I am going to add an "emap" parameter to TDeint. Luckily, I already have my new motion mapping implemented in another filter . The downside to doing everything in separate filters is it is slightly slower than if it was integrated and it makes it more complicated to use. On the plus side, allowing everything to be done externally opens up more possibilities and makes it easier to implement new ideas.
tritical is offline   Reply With Quote
Old 8th December 2005, 22:11   #455  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Thanks, tritical. I'll upload the clip when I get home tonight. Right now, I'm busy finding out how crappy all the H.264 tools are. How about this: a "Pro" transport multiplexer that won't let you set the PIDs or the transport mux rate (heck, it won't even tell you what rate it ends up with, so you have no way to know what rate to inject it at!).
Guest is offline   Reply With Quote
Old 9th December 2005, 00:33   #456  |  Link
DarkNite
Almost Silent Member
 
DarkNite's Avatar
 
Join Date: Jun 2002
Location: Purgatory
Posts: 273
I wouldn't worry about integration until you had both the time and desire to do so. Things aren't so complicated for those of us who know the lost art of "how to rtfm".
__________________
Rethinking the "Why?" chromosome.
DarkNite is offline   Reply With Quote
Old 9th December 2005, 01:34   #457  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by tritical
Any way that I could get that part of the clip for testing?
Here it is:

http://neuron2.net/misc/short.zip

It's BFF DV. I've been using Cedocida. The snapshots are from frame 0.

Thank you for taking a look at this. I still think the motion areas need to use all the scan lines. I mean, how could that be wrong, since it would be copying whole areas of the good full interp'ed clip, which we know looks fine? I concede that it may not be necessary, but let's see if you find a weaving issue.

Quote:
If you set the motion thresholds to -1 do those areas look as they do in the interp clip?
No, it's fully combed! That suggests that your case 1 is set up wrong, or there is a weaving bug.

Last edited by Guest; 9th December 2005 at 02:06.
Guest is offline   Reply With Quote
Old 9th December 2005, 02:11   #458  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
OK, I solved it. You need the field parameter on Tdeint() for case 1!

interp = separatefields().selecteven().EEDI2(field=0)
tdeint(order=0,field=0,edeint=interp)

It makes a very sweet adaptive deinterlacer. This results in the best deinterlacing I have ever seen under Avisynth. It blows away LeakKernelDeint(). And it's tolerably fast on my 64FX-55. Bravo, tritical!

Would it be possible for you to update your four cases above with the right field settings for Tdeint(), as this will serve as a reference for use of this outstanding method?

Sweet (who needs Faroudja?):


Last edited by Guest; 9th December 2005 at 02:35.
Guest is offline   Reply With Quote
Old 9th December 2005, 02:46   #459  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Interestingly, you can get comparable results with my VirtualDub filter. My code is a lot more naive so will produce more artifacts. But it still looks pretty good. Here are the settings:


Last edited by Guest; 9th December 2005 at 03:28.
Guest is offline   Reply With Quote
Old 9th December 2005, 03:18   #460  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Thanks, I'll update the settings... it is quite funny that I can't keep the parameters right for my own plugins. I was assuming field got set to the same value as order by default (field=-1) in TDeint since that is how it works in TIVTC, but that is not true (it uses field=1 by default)... I should read the readme sometime . Now I am wondering how many times I have made that mistake when giving settings before.

Last edited by tritical; 9th December 2005 at 03:24.
tritical is offline   Reply With Quote
Reply

Tags
tdeint, tivtc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.