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. |
18th August 2008, 12:16 | #21 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
I just updated Deblock_QED_MT2 on the wiki.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
18th September 2008, 21:22 | #22 | Link | |
Bruce Wayne
Join Date: Dec 2007
Posts: 283
|
Quote:
Code:
SeparateFields().PointResize(width,height) Deblock_qed().AssumeFrameBased() SeparateFields().SelectOdd().Weave() |
|
18th September 2008, 22:35 | #23 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Nope.
My code was wrong (or: incautious). In fact it works only for BFF interlaced sources, it fails for TFF. Your code is wrong, too. It works only for TFF interlaced sources, it fails for BFF. That post was made in a rush (I remember), and forgot about the fact that AssumeFrameBased() resets clip parity to BFF always, no matter the input. The correct way is (of course) Code:
i = last i.SeparateFields() .PointResize(i.width,i.height) AssumeFrameBased() .Deblock_qed() GetParity(i) ? AssumeTFF() : AssumeBFF() SeparateFields() .SelectEvery(4,0,3) .Weave()
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
19th September 2008, 10:15 | #25 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
I think Avenger007's code works for BFF and fails for TFF just as yours did - because of the PointResize, aren't the two versions equivalent? I think in this context SelectOdd() and SelectEvery(4,0,3) happen to have the same result.
|
19th September 2008, 10:56 | #27 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
I may be wrong, but my point was that because of the PointResize, you have pairs of identical lines. So my thinking was that after the second SeparateFields, in each group of 4, frames 0 and 1 would be identical, as would frames 2 and 3.
|
21st September 2008, 19:47 | #28 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Quote:
Look at a block sniplet after pointresizing one field: Code:
... ... A4t A4b B1t B1b B2t B2b B3t B3b B4t B4b C1t C1b ... ... The clue is that we're not only juggling fields around forth and then back again - funnily, we're doing some processing inbetween. This block now gets processed by the deblocker. After that, we're SelectX()'ing-out the fields again. Now look at the pattern: at the top of block B, we want to get pixel B1t, because that pixel was processed with a pixel from block A as neighbor. We don't want pixel B1b, because this pixel was not in block A's direct neighborhood during processing. At the bottom of block B it's the other way round: we want pixel B4b, since it was in C's neighborhood. We don't want B4t, because it wasn't. Summary: we want B1t and B4b. With SelectEven or SelectOdd, you get either B1t and B4t, or B1b and B4b. One is always wrong. After deblocking, the formerly identical pairs can not be considered identical anymore, easy as that. Generally this would affect any deblocking filter when using SeperateFields.Pointresize as input, though it probably wouldn't be a major issue with most ones. But for Deblock_QED in particular, it is extremely important to choose the 'correct' t/b lines, because of it's "borderline-vs-interiour of a block" distinction. In effect, SelectEven/Odd() would lose almost half of the vertical deblocking work completely, because it would output "borderline" pixels that have been processed while they've been "interiour" pixels.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 21st September 2008 at 19:49. |
|
22nd September 2008, 00:19 | #29 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Didée - Thanks for your (as usual) clear and informative explanation.
Indeed. What had me confused was that Avenger007 said SelectOdd worked for him, and you appeared to agree that it worked (though only for TFF). |
22nd September 2008, 01:06 | #30 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Both of the "wrong" versions would produce field-swapped output when fed with the non-fitting fieldorder. Field-swapped output is utterly wrong, and very obvious.
Agreeing that it "worked" for TFF was in respect to not produce faulty things like swapped fields (note that in #22, the issue reported to be "solved" was field alignment), not in respect to full deblocking efficiency. (Didn't adress that in #23, since my hope was that just posting the always-correct version would let me get away without having to dive into all the bothersome little details.)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
Thread Tools | Search this Thread |
Display Modes | |
|
|