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. |
24th August 2008, 07:58 | #41 | Link |
Registered User
Join Date: Jun 2002
Location: Greece
Posts: 242
|
Does eedi2Bob or nnediBob has similar problem with shift?
Also may i replace the Bob with FixedBob in MCBob function or in yadifmod? s = last interp=s.FixedBob().selecteven() s.yadifmod(mode=0, edeint=interp)
__________________
Greece PAL User... Last edited by Nikos; 24th August 2008 at 09:58. |
24th August 2008, 11:14 | #42 | Link | |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
@florinandrei,
Nit pick 1 :- # Pick one if DirectShow can't decide This implies in some alternate universe DirectShowSource knows something about field order. In this world it has no idea. For interlaced content you always have to work it out and script appropriately. Nit pick 2 :- Your edit to "Elum = " is not universally correct. For other pixel formats these are the Even and Odd complete data. @Gavino, Quote:
In the 2.5 world there is no quick way to spec the resizer luma and chroma offsets independently. One could always razor the code, but it is hardly worth it. In the 2.6 development Sh0dan has added the beginnings of some chroma positioning options. This may allow Bob() to spec the resizer luma and chroma offsets independently. Also there is the Y8 pixel format available so each plane can be independently processed in a user script. Somewhat like this :- Code:
... SeparateFields() Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0) Y = ConvertToY8() # Zero cost Ey = Y.SelectEven().Spline36resize(NewWidth, NewHeight/2, 0, Shift) # Uniplanar Oy = Y.SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0, -Shift) # Uniplanar UV = Interleave(UtoY8(), VtoY8()) # Zero cost Euv = UV.SelectEvery(4, 0,1).Spline36Resize(NewWidth/2, NewHeight/4, 0, Shift) # Uniplanar*2 Ouv = UV.SelectEvery(4, 2,3).Spline36Resize(NewWidth/2, NewHeight/4, 0, -shift) # Uniplanar*2 E = YToUV(SelectEven(Euv), SelectOdd(Euv), Ey) # Blit O = YToUV(SelectEven(Ouv), SelectOdd(Ouv), Oy) # Blit Interleave(E, O) Weave() Might be a little easier for us poor Humans to visualise but the dumb computer couldn't care less. @Nikos, eedi2Bob or nnediBob, we do not know, Tritical is sitting on the source code because they are part of his thesis. Why don't you test and report what you find. It probably does not matter, the actual error here is really quite small. I had trouble building a suitable test pattern to reliably see this error. In normal use the chroma subsampling for interlaced 4:2:2 is severe enough that it out weighs our small displacement problem. |
|
24th August 2008, 19:39 | #43 | Link | |
Registered User
Join Date: Jul 2006
Posts: 120
|
Quote:
|
|
15th September 2008, 15:04 | #44 | Link | |
likes to tinker
Join Date: Jan 2004
Location: girt by sea
Posts: 635
|
Quote:
|
|
15th September 2008, 22:34 | #45 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,182
|
well, interesting discussion!
not directly related, but now i understand, that pelclip in MVTools is not quite correct for chroma. similar is that original points are (should) preverved
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
17th September 2008, 10:03 | #47 | Link | ||
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Quote:
Quote:
@Fizick, As above, I do not believe there is anything significant to worry about. But we are all a little anal about getting this stuff right, so it is good to document where we are wrong and how to eventually fix it. @henryho_hk, Yes, I guess if you are sufficiently motivated you could use UtoY to make a sightly faster version. |
||
19th September 2008, 00:39 | #48 | Link |
Registered User
Join Date: Jul 2006
Posts: 120
|
On my system (AMD Phenom 4 core 9850), the "pure" version is only a little bit slower than the "brute" one. It's 10.3 fps "pure" vs 12.7 fps "brute" when transcoding from 1080i AVCHD (MainConcept decoder via DirectShow) to 480i MPEG2 (HCenc encoder with max quality profile).
|
19th September 2008, 10:15 | #50 | Link | ||
likes to tinker
Join Date: Jan 2004
Location: girt by sea
Posts: 635
|
Quote:
Quote:
|
||
19th September 2008, 10:40 | #51 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,437
|
Quote:
Code:
function IResize(clip Clip, int NewWidth, int NewHeight) { Clip SeparateFields() Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0) E = SelectEven().Spline36resize(NewWidth, NewHeight/2, 0, Shift) O = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0, -Shift) Ec = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0, 2*Shift) Oc = SelectOdd( ).Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift) Interleave(E, O) IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last Weave() } Spline36Resize can be replaced by another resizer if you wish. |
|
20th September 2008, 05:54 | #52 | Link |
likes to tinker
Join Date: Jan 2004
Location: girt by sea
Posts: 635
|
Well, that's floored me, look at the signs on SHIFT in this link http://forum.doom9.org/showthread.ph...81#post1172981
Code:
Function Foo(clip clip, float shift) { Clip Tc=SelectEven().Spline36resize(NewWidth, NewHeight/2, 0, -Shift, Width(), Height()) Bc=SelectOdd().Spline36resize(NewWidth, NewHeight/2, 0, Shift, Width(), Height()) Interleave(Tc, Bc) Weave() } Code:
SeparateFields() Shift = (GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0) Elum = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0, Shift) Olum = SelectOdd() .Spline36Resize(NewWidth, NewHeight/2, 0, -Shift) Echr = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0, 2*Shift) Ochr = SelectOdd() .Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift) Interleave(Elum, Olum) IsYV12() ? MergeChroma(Interleave(Echr, Ochr)) : Last Weave() |
20th September 2008, 10:05 | #53 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,437
|
@halsboss
In the first link, function Foo was part of a test IanB was doing to verify the correct value of the shift, varying shift from -1.0 to +1.0, so on its own it is incomplete. The second link shows one way of expressing the complete 'pure' solution, and is equivalent to what I posted (#51). Last edited by Gavino; 20th September 2008 at 10:07. |
25th September 2018, 17:20 | #55 | Link | |
Registered User
Join Date: Jan 2015
Posts: 1,094
|
This is all fascinating. Regarding bob-deinterlacers and YCbCr colorspaces, I'm afraid I don't understand why such complex solutions are necessary. Couldn't you just write them so they function like this:
Quote:
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. Last edited by Katie Boundary; 26th September 2018 at 06:34. |
|
27th September 2018, 22:01 | #56 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,562
|
For the same reason bob exists in the first place. You wouldn't do separatefields().bicubicresize() on luma, so why would you do it on chroma? There is top field chroma and bottom field chrome just as there is top field luma and bottom field luma. Separatefields "loses" information on their proper positioning.
|
27th September 2018, 23:39 | #57 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,723
|
I think that if you want to do a bob() that can then immediately be recombined to give you exactly what you started with, you use this:
Code:
bob(0.0,1.0) Code:
separatefields().selectevery(4,1,2).weave() |
29th September 2018, 23:34 | #58 | Link |
Registered User
Join Date: Jan 2015
Posts: 1,094
|
Yes but the question is whether or not preserving the original scanlines is a good idea when dealing with YCbCr colorspaces.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
30th September 2018, 00:30 | #59 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
The question whether it's a good idea to preserve the original pixels has been extensively discussed in this thread already. I'm of the opinion that there's no inherent reason as to why doing so would make the image look any better, and many bob-style deinterlacers either don't preserve original pixels at all or does so only by coincidence. Last edited by TheFluff; 30th September 2018 at 00:39. |
|
Tags |
yv12 chroma offset |
Thread Tools | Search this Thread |
Display Modes | |
|
|