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. |
29th March 2003, 13:43 | #1 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
PFR - Progressive Frame Restorer
I've finally ported my Progressive Framer Restorer to Avisynth.
It's useful (well I use it anyway ) for trying to restore film originated material thats had special effects added, converted to 30 fps NTSC, sent across the water, converted to PAL 25fps, broadcast and then captured. [EDIT]Revised V1.0a (corrects silly NPThresh default value )[/EDIT] available here regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html Last edited by Si; 30th March 2003 at 18:04. |
11th April 2003, 23:21 | #2 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
V1.1 available
[EDIT]V1.1a[/EDIT] available here
Its now been fully converted to properly use the Avisynth enviroment. regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html Last edited by Si; 13th April 2003 at 01:09. |
12th April 2003, 03:51 | #3 | Link |
Banned
Join Date: Aug 2002
Location: Croatia [local name:Hrvatska]
Posts: 551
|
is this an exampe of that concept of yours to
restore progr. if possible (or better,to put fields where and when they belong),and to make video TFF for tv-out (matrox..hehe) if impossible? hmmm,wouldn't work for me,as tv-tool didn't make my bt869 to output interlaced stuff as it should (i get random field order problems_jerks back forth from time to time....no,it's not the source...) i think 2%(or less) people use tv-out to display interlaced,but your concept is good in teh way it tries to preserve both progr. and interlaced... (you didn't put some deinterlacer behind it,right?) |
12th April 2003, 08:48 | #4 | Link | ||
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
Quote:
It might actually give acceptable results for those watching (not single stepping) a programme on a progressive display using Xvid/DivX but YMMV Quote:
regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
||
12th April 2003, 22:25 | #6 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
Yes -I'm afraid so if your source isn't YUY2.
Are you looking for it to handle YV12 or RGB? regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
13th April 2003, 22:01 | #8 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
I'll get on with it then
regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
24th April 2003, 23:57 | #9 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
V1.2 available here
Now works with YV12 as well as YUY2 colourspace I consider the YV12 code as alpha at the moment as I simply keep the U and V information from the current frame regardless of whether the filter decides to use the Y info from the bottom field of the current or previous frame. This might be good/right or it might be bad/wrong - time will tell Any comments/bug reports welcomed. regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
25th April 2003, 00:20 | #10 | Link | |
Guest
Join Date: Jan 2002
Posts: 21,901
|
Quote:
Why would you do that? May I point you to Telecide.cpp to see how to do it good and right? Last edited by Guest; 25th April 2003 at 00:23. |
|
25th April 2003, 00:52 | #11 | Link | |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
Quote:
AFAICT there are a number of issues such as was the source treated as interlaced or progressive when it was MPEGed and therefore does the 1st U/V plane line contain info about Y plane lines 1 or 2 or 1 and 3 etc So my brain was hurting and it looked OK on my setup so I decided to publish and be dammed (which you've so kindly done regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
|
25th April 2003, 04:40 | #12 | Link |
Guest
Join Date: Jan 2002
Posts: 21,901
|
You'll be mixing chroma from one picture with the luma of a different picture in some cases, won't you?
It seems to me that it doesn't matter which chroma sampling scheme was used. Putting matching fields back together fixes up the frame either way. Interestingly, examination of the MPEG syntax for DVD VOB rips shows almost invariably that they are encoded with chroma_420_type set to 0, which means interlaced sampling. This is true even for 3:2 material. I don't have any PAL DVDs to look at. It makes sense because DVD players did interlaced upsampling (prior to more intelligent upsampling approaches based on the flags). I agree that YV12 can get very confusing. I mean just think what happens when you SeparateFields() on a YV12 progressive sampled clip. The chroma assignments get mangled. But if you Weave() things get OK again. I think that may be the key to your dilemma. OK, where did I go wrong? Last edited by Guest; 25th April 2003 at 04:43. |
27th April 2003, 19:40 | #13 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
V1.3 available here
Now swaps the UV data from bottom field as well as Y (as per Obiwan Graft's request/suggestion/demand -I'm not going to own up to design errors next time ) I also changed/corrected the logo exclusion region co-ords to make them refer to pixel positions and not bytes along a line If anyone (apart from me) actually uses the filter - please feel free to send me any comments here, PM or email me direct. regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
3rd August 2003, 23:47 | #14 | Link |
Unbeliever
Join Date: Sep 2002
Location: Greece
Posts: 111
|
I finally found some time to try it out properly. It seems to me that pfr() does not simply rearrange fields to recover progressive frames.
I tried it with a short test sequence, taken from a pal clip, transformed from a mixed film&video NTSC source in the usual way that produces blended fields. Any obviously blended fields seem to have magically disappeared... What does pfr() do exactly anyway? sapient |
4th August 2003, 10:52 | #15 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
PFR (like other De-combers) trys to restore original progressive material thats ended up being split over 2 frames.
It decides whether to pass a frame through untouched or whether the top field of the current frame should be matched instead with the bottom field of the previous frame. The filter works on TFF material. BUT on a transition from from processing state to the other, it does a simple interpolation of the bottom field from the top field so that any errors in making descisions are hopefully masked. These interpolated frames only last for a few frames and are less visually disturbing than getting fields in the wrong temporal order when watching the output on a TV via an SVCD or DVD encoded disc. So if your blended fields are bottom ones - then the blends will dissapear occasionally. I recommend trying the filter with the diagnostic settings enabled to see what is happening. I'd recommend PFR(ShowShift=16) and a quick read of the filters web page on what the colours all mean. Let me know if any of this is confusing - its a very simple filter really. Then - name the polish required (inside joke from another place) regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
4th August 2003, 12:31 | #16 | Link |
Unbeliever
Join Date: Sep 2002
Location: Greece
Posts: 111
|
The problem is that this "interpolation" effectively cuts vertical resolution to half. And in bad PAL material from mixed NTSC, pfr keeps switching form one mode to the other, resulting in LOTS of... orange (i.e. interpolation).
So I would be looking for a polish color that would tone down all that orange Also some damn post deinterlacing for the rest of us who like to watch on their monitors would be welcome. You might have noticed my frustration in the matter in another thread. sapient |
4th August 2003, 17:25 | #17 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
Just so you know - I'm more into DS9 and Voyager which don't have anywhere near as much mixed 30fps video in them but change field order every other scene change.
But back to your problem, the interpolation isn't complusory Try using NPPIF=0 to switch off interpolation when my filter thinks the video is progresssive. This is completely non-destructive and maybe should be the default. And then try using PNPIF=0 if you want to completely switch off any interpolation. Setting PNPIF to 0 has the most adverse effect if my filter picks the wrong pair of fields and you are watching on an TV. You end up with the wrong field order being output which is very very bad I'm pretty certain that Telecide is the filter of choice to use if you are watching on a progressive display. I'm thinking of implementing Telecide type hints so that KernelDeint can be used as a post processor but I've not come up with a good strategy on when to drop a hint Anyway - try the 0 interpolation settings or maybe try using 1 instead of 0 and see what you think. regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
4th August 2003, 18:04 | #18 | Link |
Unbeliever
Join Date: Sep 2002
Location: Greece
Posts: 111
|
He waves his wand and ...ta-da... the blended fields re-appear...
Thanks for the hint. As you SHOULD have read in another post of mine int that "other place" telecide is not an option for these clips, it always gets the field order horribly wrong. As for star trek, I am actually testing this with something different for the momment (the making of animatrix). The point is though that the problems with both this one and TNG DVDs are not so much in the video part as in the film part! Since there is so much video, the "brilliant" guys at paramount used the famous blending technique of reducing the framerate throughout the movie/episode, WITHOUT first aplying some IVTC on the film parts! The results as you can imagine or probably see for yourself are horrible, where they could have been almost perfect. The same goes for most making-of featurettes, like the one I am using. |
5th August 2003, 09:37 | #19 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
...
And the best part is, those guys expect us to pay (a lot of) money for that technical crap!! Actually, if you live in PAL country, and want to have a near-clean, localized version of any Star Trek stuff, you have to - get the NTSC version - get your very localized PAL version - build everything together by your own hands! I fear my English skills leave me here, to describe my disappointment, frustration and anger about this topic. Grrr! - Didée
__________________
- 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!) |
13th August 2003, 01:32 | #20 | Link |
Simply me
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
|
PFR 1.4 with postprocessing available
PFR 1.4 with postprocessing is now available here using neuron2's inter-filter hinting system.
I've added a parameter called EnablePP (true/false - default false). This enables you to use KernelDeint instead of the internal field interpolation. regards Simon
__________________
http://www.geocities.com/siwalters_uk/fnews.html |
|
|