View Full Version : Deinterlace vc-1 or not?


phate89
26th September 2013, 17:30
Hi. I'm dealing for the first time with a interlaced bluray.
To be exact the us version of Doctor who specials bluray.
eac3to regognise it as 60i/1001 vc1 but when i load it in avisynth (remuxed in mkv with dss) it gave me 29.970 (30i).
At start i also found had problems to load it, i had to install windows decoder and use dss2 to open it (ffms doesn't work, dgdecnv needs nvidia card).
To decide if it needs to deinterlace or not i tried to follow this simple tip from neuron2 website:
http://neuron2.net/faq.html#analysis
but when i follow that script i get a strange sequence of frame, something like this:
aabbbccddeeeff
It doesn't fit in any cases.
So i tried to encode like if it was telecined (tfm.tdecimate) and i didn't found signs of interlace left but it seems to stutter (maybe it only appears to me).
Here's a small sample of the video (1 min) of the bluray untouched.
http://www.putlocker.com/file/9E385397F8E3A53D
http://www.putlocker.com/file/5BCE1648F4692736

Can someone help me to understand how to properly deinterlace it?

wonkey_monkey
26th September 2013, 18:38
You've so asked in the right place. I wrote a little essay (http://horman.net/doctorwho/specials.php) on these exact discs. The "US version" is, annoyingly, the only version.

What you've (mostly) got here is 25p progressive video field-repeated directly up to 59.97i, with the added fun of blended chroma. It is possible (apart from a few shots which had some interlaced post-processing) to untangle it mathematically. In fact, give me a few days (I'm moving house) and I should be able to send you the plugin and scripts I developed specifically to fix it.

Planet of the Dead is a different story, and your best bet is to use QTGMC and srestore. I wrote a plugin to compare it with the PAL DVD to restore it perfectly.

David

PS I don't know what difference using dss2 will make, as I have an Nvidia card and used DGDecNV.

phate89
26th September 2013, 18:56
You've so asked in the right place. I wrote a little essay (http://horman.net/doctorwho/specials.php) on these exact discs. The "US version" is, annoyingly, the only version.

What you've (mostly) got here is 25p progressive video field-repeated directly up to 59.97i, with the added fun of blended chroma. It is possible (apart from a few shots which had some interlaced post-processing) to untangle it mathematically. In fact, give me a few days (I'm moving house) and I should be able to send you the plugin and scripts I developed specifically to fix it.

Planet of the Dead is a different story, and your best bet is to use QTGMC and srestore. I wrote a plugin to compare it with the PAL DVD to restore it perfectly.

David

PS I don't know what difference using dss2 will make, as I have an Nvidia card and used DGDecNV.

Interesting reading... Let's hope the new bd version of series 1 to 7 will be mastered better..
Thanks i'll wait your scripts to try it!

wonkey_monkey
27th September 2013, 08:45
Series 5 onward - at least, the UK versions - are properly mastered. Series 1 to 4 weren't shot in HD so probably won't see a BD release (which is a bit of a shame, because the upscale job on The Next Doctor was actually pretty good, and it benefitted from the higher bitrate).

phate89
27th September 2013, 10:54
Series 5 onward - at least, the UK versions - are properly mastered. Series 1 to 4 weren't shot in HD so probably won't see a BD release (which is a bit of a shame, because the upscale job on The Next Doctor was actually pretty good, and it benefitted from the higher bitrate).

So you're not updated :)
http://www.ign.com/articles/2013/09/05/bbc-announces-doctor-who-series-1-7-blu-ray-gift-set

wonkey_monkey
27th September 2013, 15:24
Dammit! Anyone want to buy a series 1 TARDIS boxset and a series 1-4 DVD boxset? ;)

Actually, I wonder if any of those will be shoddy conversions again...

Oh dear. There are some very confused people on Amazon complaining that we in the UK are only getting 1080i, not 1080p...

phate89
27th September 2013, 15:53
Dammit! Anyone want to buy a series 1 TARDIS boxset and a series 1-4 DVD boxset? ;)

Actually, I wonder if any of those will be shoddy conversions again...

Oh dear. There are some very confused people on Amazon complaining that we in the UK are only getting 1080i, not 1080p...

Let's hope not. it's year that bbc is working on remastering and saving dr who ( even the original series).
hey're also talking about 1080p in the press release...

gyth
28th September 2013, 01:48
Oh dear. There are some very confused people on Amazon complaining that we in the UK are only getting 1080i, not 1080p...
I'm confused as well.
Sure, they should be identical, but based on your experience with NTSC, is it not reasonable to prefer frames to fields?

phate89
28th September 2013, 02:22
I'm confused as well.
Sure, they should be identical, but based on your experience with NTSC, is it not reasonable to prefer frames to fields?

if all it's done properly in this case it is better 1080i because it's the only way you can keep it with the original speed (25p/50i) without stretch the audio (bluray doesn't support 1080 25p so if you want 24p you have to slow down everything).
Of course if you want both (interlaced and ntsc standard) like in the specials you have to be creative (in a very bad way).
The other seasons are ok because they're simply 50i created from 25p original

wonkey_monkey
28th September 2013, 21:03
Let's hope not.

You hope we're not getting 1080i? But as you say in your later post, the DVDs are just 25p wrapped in 50i, and that's what we'll (hopefully) get on the blu-rays. It still is 1080p, really.

Sure, they should be identical, but based on your experience with NTSC, is it not reasonable to prefer frames to fields?

Frames are made up of fields. Aside from the very, very minor difference in chroma encoding, 1080i50 will look identical to 1080p25.

David

phate89
28th September 2013, 21:32
You hope we're not getting 1080i? But as you say in your later post, the DVDs are just 25p wrapped in 50i, and that's what we'll (hopefully) get on the blu-rays. It still is 1080p, really.





I was referring at that ugly interlaced 60i. 50i is like 25p (you also loose a little bit of efficiency).
You have the 7th series? I read it is progressive bluray from a review. Is it stretched or what?

2Bdecided
1st October 2013, 12:27
I bet you all wish you'd just recorded the original free-to-air HD broadcasts? ;)

Cheers,
David.

wonkey_monkey
2nd October 2013, 08:11
Nope. My way was much more interesting (also higher bitrate!)

phate89
3rd October 2013, 15:30
In the mean time i found this discussion as a possible solution for this pulldown:
http://forum.doom9.org/showthread.php?t=163769
Is it like yours? (tfm() .tdecimate(cycle=30,cycleR=5))

wonkey_monkey
3rd October 2013, 15:35
I don't really know anything about tdecimate or tfm - they'll probably do a good enough job (though I'm wary of the parameters there, since the framerate is actually 29.97fps, and dropping 5 out of every 30 frames seems like it would put you at a nominal 24.975fps, not 25fps). I wanted to be absolutely frame accurate, which is why I went to the lengths I did.

David

phate89
3rd October 2013, 15:40
I don't really know anything about tdecimate or tfm - they'll probably do a good enough job (though I'm wary of the parameters there, since the framerate is actually 29.97fps, and dropping 5 out of every 30 frames seems like it would put you at a nominal 24.975fps, not 25fps). I wanted to be absolutely frame accurate, which is why I went to the lengths I did.

David

Reading what didee said in that thread it depends on how they did it. There are 2 methods and one is to slow down a little bit to 24.975 fps and then apply this pulldown..
Of course if you get absolutely frame accurate result this is not the case and it's second option (direct pulldown from 25 to 60i).
How did you handle the problem?

wonkey_monkey
4th October 2013, 10:37
I can't remember the details, but I first assumed (and was later proved correct) that it was a very simple pulldown from 25 to 60i, and that the contributing PAL* frames for every NTSC* frame had been calculated with something like:

n(top) =floor(n*50/59.97)
n(bottom)=floor((n+0.5)*50/59.97)


plus or minus a constant. I made a spreadsheet and charted my observations of the actual video (e.g., NTSC frame 24 is made up of both fields of frame 20, NTSC frame 25 is made up of fields from PAL frames 20 and 21) and then compared that to my calculations, adjusting the offset until I got a match. From that I made a reverse look-up table (ideally I should have worked out the formula the other way, but by this point my head was starting to hurt, and with some PAL fields being repeated it would have been a one-to-many relationship) which could tell me where the constituent fields of each original frame could be found.

Then I wrote a filter to undo the pulldown, and tested it by differencing the fields of the output - so if a frame was still made up of different fields, it would stick out and I could adjust the offset.

As long as your input filter returns the same frames as DGDecNV did - and also exhibits the same chroma blending, which I've never been sure isn't down to DGDecNV, but probably isn't - then, when I finally get round to sending it to you, my filter and scripts should recover it all back - except for the titles of The Next Doctor, all the credits, and all of Planet of the Dead, for which QTGMC/srestore is your best option.

David

*not actually PAL/NTSC but you know what I mean.

wonkey_monkey
11th October 2013, 18:56
Sorry for the delay, but here, at last, is the plugin (horman.net/specials.zip) (an old version was actually already at this URL).

It implements a few functions, but the one you need is called palrestore. The others are for Planet of the Dead and require the PAL DVD for comparison tests.

In the snippets below, it's assumed you've already loaded your input video and it is the implicit last.


########################################
# The Next Doctor
src=trim(0,30)+trim(30,239)+trim(241,0) # remove a duplicate frame

a=src.palrestore(-0.345)
b=src.palrestore(-0.175)
c=src.palrestore(0.1646)

pal=a.trim(0,149)+b.trim(150,199)+c.trim(200,0)
pal=pal.trim(0,23)+pal.trim(23,23)+pal.trim(25,0) # fix dodgy frame 24

########################################
# Planet of the Dead - try srestore

########################################
# Waters of Mars
palrestore(0.4915,3) # some residual interlacing around frames 78150, 78350, 78600

########################################
# End of Time, part 1
palrestore(0.489)

########################################
# End of Time, part 2
palrestore(0.4935,4) # some residual interlacing/chroma problems around frame 106420


Hopefully it'll work, though as I've said it requires that your source filter returns exactly the same frames as mine (I used dgsource). In all cases the first active frame of your unfiltered video should be frame 30.

David

phate89
12th October 2013, 01:27
Sorry for the delay, but here, at last, is the plugin (horman.net/specials.zip) (an old version was actually already at this URL).

It implements a few functions, but the one you need is called palrestore. The others are for Planet of the Dead and require the PAL DVD for comparison tests.

In the snippets below, it's assumed you've already loaded your input video and it is the implicit last.


########################################
# The Next Doctor
src=trim(0,30)+trim(30,239)+trim(241,0) # remove a duplicate frame

a=src.palrestore(-0.345)
b=src.palrestore(-0.175)
c=src.palrestore(0.1646)

pal=a.trim(0,149)+b.trim(150,199)+c.trim(200,0)
pal=pal.trim(0,23)+pal.trim(23,23)+pal.trim(25,0) # fix dodgy frame 24

########################################
# Planet of the Dead - try srestore

########################################
# Waters of Mars
palrestore(0.4915,3) # some residual interlacing around frames 78150, 78350, 78600

########################################
# End of Time, part 1
palrestore(0.489)

########################################
# End of Time, part 2
palrestore(0.4935,4) # some residual interlacing/chroma problems around frame 106420


Hopefully it'll work, though as I've said it requires that your source filter returns exactly the same frames as mine (I used dgsource). In all cases the first active frame of your unfiltered video should be frame 30.

David

Is it a plugin? Because if i try to use loadplugin i get an error (0x7e) and with import unother error...

StainlessS
12th October 2013, 15:23
Requires, MSVCR100.DLL from Microsoft Visual C++ 2010 Redistributable Package

32bit
http://www.microsoft.com/en-us/download/details.aspx?id=5555

64bit
http://www.microsoft.com/en-us/download/details.aspx?id=14632

wonkey_monkey
12th October 2013, 17:14
Thanks StainlesS. I've never got the hang of all that stuff :stupid:

Does this version (http://horman.net/specials-nodeps.zip) remove the dependency?

phate89
12th October 2013, 18:33
Thanks StainlesS. I've never got the hang of all that stuff :stupid:

Does this version (http://horman.net/specials-nodeps.zip) remove the dependency?

No it still give that error. Instead installing vs 2010 red. package solved the error.. Now i'm going to try the script ;)

StainlessS
12th October 2013, 19:48
Dependencies

ADVAPI32.DLL
AVIFIL32.DLL
AVISYNTH.DLL
COMCTL32.DLL
DEVIL.DLL
GDI32.DLL
KERNEL32.DLL
MSACM32.DLL
MSVCRT.DLL
MSVFW32.DLL
NTDLL.DLL
OLE32.DLL
RPCRT4.DLL
SECUR32.DLL
SHELL32.DLL
SHLWAPI.DLL
SPECIALS.DLL
USER32.DLL
WINMM.DLL


Looks to me like it no longer depends upon VC10 runtimes.
Try this David, its the one MS supplies with Visual Studio
http://www.dependencywalker.com/

IanB
12th October 2013, 21:46
WtF! Why is Avisynth.dll in the dependency list :confused: (circular dependencies are really evil :devil: )

I assume DevIL.dll is a sub-dependency of Avisynth.dll

And why does it depend on itself, special.dll (or is this quirk of dependencywalker).

StainlessS
12th October 2013, 23:47
Sorry guys, I just copied entire list of modules in use, thats why SPECIALS.DLL is mentioned in list.

However, this is list of modules in use in RT_stats26.dll


ADVAPI32.DLL
COMCTL32.DLL
COMDLG32.DLL
GDI32.DLL
KERNEL32.DLL
MSVCRT.DLL
NTDLL.DLL
RPCRT4.DLL
RT_STATS26.DLL
SECUR32.DLL
SHELL32.DLL
SHLWAPI.DLL
USER32.DLL


where RT_Stats26.dll is also in list, but Avisynth.dll is not.

Specials.dll comes up as directly dependent upon both Avisynth.dll and Kernel32.dll,
with Avisynth.dll depending upon all other modules (excluding Specials.dll) including Kernel32.dll.

RT_Stats26.dll is directly dependent upon KERNEL32.DLL, USER32.DLL, COMDLG32.DLL, SHELL32.DLL,
I think COMDLG32.DLL is used for the File Selector type function dialog boxes.

RoboCrop26.dll comes up as dependent upon only KERNEL32.DLL, which in turn is dependent upon NTDLL.DLL,
I think toolkit 3 removes references to unused dll's.

EDIT:
David, here is list of VS6 default libs in "Project Setting/Win 32 Release/Link",
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

heisenberg
12th July 2019, 20:42
You've so asked in the right place. I wrote a little essay (http://horman.net/doctorwho/specials.php) on these exact discs. The "US version" is, annoyingly, the only version.


The above was written on 26th September 2013. On 13 November 2013, the Polyband German box set was released, which is in original/native 25fps for all 5 episodes.

In that box set, The Next Doctor is delivered as a DVD, as it should be, and the remaining as BD. Hilariously, the top rated Amazon comment is complaining that he paid for BD but is upset that he received 4BD + 1DVD and Polyband was too cheap to produce TND as an upscaled BD!!! LOL.

I know this is now 5.5 years later, but all the info on the interwebs repeats this info, that there is no correct home release of the specials. Thanks to this very outdated information, I have now triple-dipped on this set! For a set of shows that I'm unlikely to watch more than 3 times again ...

Hopefully, it doesn't take another 5 years for the updated info to propagate. This thread is actually quite hard to find. All of the easily found info is in the form of blogs or plain web pages, usually without contact info. This will have to do.