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 Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th August 2003, 21:41   #21  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
PFR 1.5 - with internal kernel deinterlacing

PFR() V1.5 avaiable here

I've replaced the interpolation code with my interpretation of the kernel deinterlacing algorithim (AFAICT its give exactly the same results as using Donald's KernelDeint132(order=1,threshold=0) i.e - the full treatment.

This has two advantages

1. I can exclude a logo region within my own code. :-)

2. You can use the real KernelDeint (with default threshold settings or even higher) as a true postprocessor to remove any slight residual combing (i.e in moving mouth sequences)

e.g

PFR()
KernelDeint(order=1)

What happens now is that the internal deinterlacer is used in transition frames instead of the original simple interpolation method. If you set EnablePP=true, then my filter will hint to KernelDeint when its already deinterlaced the frames and KernelDeint will ignore those frames.

This is the opposite of V1.4 when my filter told KernelDeint when to come in - now it tells it when to step out of the way

E.g. - given this source field sequence where lower case==source top fields, upper case==bottom fields

Code:
a b c d e f g h i j k l m n o p q r s t u v w 
A B C E F G H I J K L M N O P Q R S T U V W X
then after PFR() you'll get

Code:
a b c d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s t u v w 
A B C d' e' f' g' h' i' j' k' l' m' n' o' p' q' r' S T U V W
(where a ' indicates full internal deinterlacing.)

If you then use KernelDeInt() after this then you'll get

Code:
a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w 
A% B% C% d' e' f' g' h' i' j' k' l' m' n' o' p' q' r' S% T% U% V% W%
(with the % indicating the lighter touch of Don's filter)

regards
Simon
PS I really , really hope there no tipos in the above
Si is offline   Reply With Quote
Old 29th August 2003, 05:28   #22  |  Link
BlueCup
Registered User
 
Join Date: Jan 2003
Posts: 66
Re: PFR 1.5 - with internal kernel deinterlacing

Testing the filter out in VDub seems to crash VDub if you move too fast. Has anyone else encountered this error?

Quote:
Originally posted by siwalters
PS I really , really hope there no tipos in the above
No tipos, but one typo
BlueCup is offline   Reply With Quote
Old 31st August 2003, 20:16   #23  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Whats your exact script (and VirtualDub version) please?

regards
Simon
PS
Si is offline   Reply With Quote
Old 1st September 2003, 20:04   #24  |  Link
BlueCup
Registered User
 
Join Date: Jan 2003
Posts: 66
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\PFR.dll")
mpeg2source("01.d2v")
PFR()
ResampleAudio(44100)

VirtualDub crash report -- build 16297 (release)
--------------------------------------

Disassembly:
77f83a60: ff894d147409 dec dword ptr [ecx+974144d]
77f83a66: 83f904 cmp ecx, 04
77f83a69: 7604 jbe 77f83a6f
77f83a6b: 836d1404 sub dword ptr [ebp+14], 04
77f83a6f: 68eefeeefe push feeefeee
77f83a74: ff7514 push dword ptr [ebp+14]
77f83a77: 8d4610 lea eax, [esi+10]
77f83a7a: 50 push eax
77f83a7b: e8a0d50200 call 77fb1020
77f83a80: 3b4514 cmp eax, [ebp+14]
77f83a83: 89450c mov [ebp+0c], eax
77f83a86: 7439 jz 77f83ac1
77f83a88: 64a118000000 mov eax, fs:[00000018]
77f83a8e: 8b4030 mov eax, [eax+30]
77f83a91: 8b400c mov eax, [eax+0c]
77f83a94: 8b400c mov eax, [eax+0c]
77f83a97: 83c02c add eax, 2c
77f83a9a: 50 push eax
77f83a9b: 686637f877 push 77f83766
77f83aa0: e88622ffff call 77f75d2b
77f83aa5: 8b450c mov eax, [ebp+0c]
77f83aa8: 8d443010 lea eax, [eax+esi+10]
77f83aac: 50 push eax
77f83aad: 56 push esi
77f83aae: 687237f877 push 77f83772
77f83ab3: e87322ffff call 77f75d2b
77f83ab8: 83c414 add esp, 14
77f83abb: 56 push esi
77f83abc: e879900100 call 77f9cb3a
77f83ac1: 0fb706 movzx eax, word ptr [esi]
77f83ac4: 294328 sub [ebx+28], eax
77f83ac7: 8a4705 mov al, [edi+05]
77f83aca: 2410 and al, 10
77f83acc: a810 test al, 10
77f83ace: 884605 mov [esi+05], al
77f83ad1: 740b jz 77f83ade
77f83ad3: 0fb64604 movzx eax, byte ptr [esi+04]
77f83ad7: 8b448358 mov eax, [ebx+eax*4+58]
77f83adb: 897038 mov [eax+38], esi
77f83ade: 57 push edi
77f83adf: 53 push ebx
77f83ae0: e894f4ffff call 77f82f79
77f83ae5: 8b4708 mov eax, [edi+08]
77f83ae8: 8b4f0c mov ecx, [edi+0c]
77f83aeb: 3bc1 cmp eax, ecx
77f83aed: 8901 mov [ecx], eax
77f83aef: 894804 mov [eax+04], ecx <-- FAULT
77f83af2: 7521 jnz 77f83b15
77f83af4: 668b07 mov ax, [edi]
77f83af7: 663d8000 cmp ax, 0080
77f83afb: 7318 jnc 77f83b15
77f83afd: 0fb7c8 movzx ecx, al
77f83b00: 8bc1 mov eax, ecx
77f83b02: 83e107 and ecx, 07
77f83b05: b201 mov dl, 01
77f83b07: c1e803 shr eax, 03
77f83b0a: d2e2 shl dl, cl
77f83b0c: 8d841858010000 lea eax, [eax+ebx+158]
77f83b13: 3010 xor [eax], dl
77f83b15: 8a4705 mov al, [edi+05]
77f83b18: a804 test al, 04
77f83b1a: 746c jz 77f83b88
77f83b1c: a802 test al, 02
77f83b1e: 0fb70f movzx ecx, word ptr [edi]
77f83b21: 8d0ccdf0ffffff lea ecx, [ecx*8+fffffff0]
77f83b28: 894d14 mov [ebp+14], ecx
77f83b2b: 7409 jz 77f83b36
77f83b2d: 83f904 cmp ecx, 04
77f83b30: 7604 jbe 77f83b36
77f83b32: 836d1404 sub dword ptr [ebp+14], 04
77f83b36: 68eefeeefe push feeefeee
77f83b3b: ff7514 push dword ptr [ebp+14]
77f83b3e: 8d4710 lea eax, [edi+10]
77f83b41: 50 push eax
77f83b42: e8d9d40200 call 77fb1020
77f83b47: 3b4514 cmp eax, [ebp+14]
77f83b4a: 89450c mov [ebp+0c], eax
77f83b4d: 7439 jz 77f83b88
77f83b4f: 64a118000000 mov eax, fs:[00000018]
77f83b55: 8b4030 mov eax, [eax+30]
77f83b58: 8b400c mov eax, [eax+0c]
77f83b5b: 8b400c mov eax, [eax+0c]
77f83b5e: 83 db 83
77f83b5f: c0 db c0

Windows 5.1 (Windows XP build 2600) [Service Pack 1]

EAX = 0356d950
EBX = 009e0000
ECX = 0366b950
EDX = 035ec948
EBP = 0012fc00
DS:ESI = 0023:0356e000
ES:EDI = 0023:035ec948
SS:ESP = 0023:0012fbf4
CS:EIP = 001b:77f83aef
FS = 003b
GS = 0000
EFLAGS = 00010287
FPUCW = ffff027f
FPUTW = ffffffff

MM0 = ade0000000000000
MM1 = 81a0000000000000
MM2 = c900000000000000
MM3 = d0e6666666666800
MM4 = cd0cccccccccd000
MM5 = 8000000000000000
MM6 = 8000000000000000
MM7 = 8000000000000000

Crash reason: Access Violation

Crash context:
An out-of-bounds memory access (access violation) occurred in module 'ntdll'.

Thread traces:

Thread 00000678 (Main thread)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Main.cpp(519)
C:\p4root\dev\VirtualDub\source\Init.cpp(375)
C:\p4root\dev\VirtualDub\source\FilterSystem.cpp(560)
C:\p4root\dev\VirtualDub\source\Init.cpp(381)
C:\p4root\dev\VirtualDub\source\Init.cpp(387)
C:\p4root\dev\VirtualDub\source\Init.cpp(391)

Thread call stack:77f83aef: ntdll!RtlSizeHeap [77f50000+33316+7d9]
77f58cca: ntdll!RtlFreeHeap [77f50000+8a3e+28c]
77f59037: ntdll!RtlFreeHeap [77f50000+8a3e+5f9]
77c2ab2e: msvcrt!free [77c10000+1aa6b+c3]
77c2ab33: msvcrt!free [77c10000+1aa6b+c8]
77c2ab2e: msvcrt!free [77c10000+1aa6b+c3]
77c2ab33: msvcrt!free [77c10000+1aa6b+c8]
10079ff1: AviSynth!DllCanUnloadNow [10000000+e100+6bef1]
10079ff1: AviSynth!DllCanUnloadNow [10000000+e100+6bef1]
1000a05b: AviSynth!0000a05b
77c2ab33: msvcrt!free [77c10000+1aa6b+c8]
10009fc8: AviSynth!00009fc8
1000e6c3: AviSynth!DllCanUnloadNow [10000000+e100+5c3]
1000e4aa: AviSynth!DllCanUnloadNow [10000000+e100+3aa]
73b552d5: AVIFIL32!AVIFileRelease [73b50000+52cb+a]
004121b0: AVIReadHandler::_destruct()
00412283: AVIReadHandler::Release()
00475a83: InputFileAVI::~InputFileAVI()
00477049: InputFileAVI:special)()
004619e3: CloseAVI()
004750fa: Deinit()
0047ac51: WinMain@16()
70a71a29: SHLWAPI!StrCpyW [70a70000+19cb+5e]
70a71a29: SHLWAPI!StrCpyW [70a70000+19cb+5e]
004b5f1b: _msize()
77f59baa: ntdll!RtlAcquirePebLock [77f50000+9b82+28]
77f59bb3: ntdll!RtlAcquirePebLock [77f50000+9b82+31]
70a71a29: SHLWAPI!StrCpyW [70a70000+19cb+5e]
77f59bf9: ntdll!RtlReleasePebLock [77f50000+9bea+f]
77e61a57: kernel32!GetStartupInfoA [77e60000+177e+2d9]
004b001a: WinMainCRTStartup()
70a71a29: SHLWAPI!StrCpyW [70a70000+19cb+5e]
77e814c7: kernel32!GetCurrentDirectoryW [77e60000+21483+44]
70a71a29: SHLWAPI!StrCpyW [70a70000+19cb+5e]

-- End of report
BlueCup is offline   Reply With Quote
Old 1st September 2003, 20:33   #25  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
Re: PFR 1.5 - with internal kernel deinterlacing

Quote:
Originally posted by siwalters
then after PFR() you'll get
Code:
a b c d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s t u v w 
A B C d' e' f' g' h' i' j' k' l' m' n' o' p' q' r' S T U V W
(where a ' indicates full internal deinterlacing.)
Hmmm... for some reason, I had always assumed PFR looked at the previous and next fields to determine the best match; that is, I expected:
Code:
a b c d  e f g h i j k l m n o p q r s t u v w X'
A B C d' E F G H I J K L M N O P Q R S T U V W X
So are E, F, ..., X totally discarded?

Last edited by stickboy; 1st September 2003 at 20:37.
stickboy is offline   Reply With Quote
Old 1st September 2003, 22:42   #26  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
@stickboy
I just use current frame and previous frame info (I think so anyway )

The reason all the frames are discarded (I prefer the term - modified but your right really ) is that PFR defaults to using a 15 frame transistion period going from N to P processing mode.

This is in case the material isn't field shifted progressive but turns out to be true video. If its true video, it'll probably flop back to N mode (no processing).

The main diff between my field order corrector and others (notably Telecide) is that maintenance of field order is paramount - a bit of deinterlacing for a few frames is very much preferred as its intended for SVCD/CVD playback on standalone DVD player connected to interlaced TV.

DVD's can afford to be encoded 2 field interlaced but SVCD/CVDs need all the bits they can to just encode a single frame


Telecide is my recommended filter for watching stuff on PC's.

regards
Simon
Si is offline   Reply With Quote
Old 2nd September 2003, 00:02   #27  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Code:
LoadPlugin("C:\av\avisynth\oldplugins\MPEG2Dec3.dll")
LoadPlugin("C:\av\avisynth\myplugins\PFR.dll")
mpeg2source("d:\CONTACT_16X9LB_PAL_DISC1\Video_ts\contact.d2v")
PFR()
ResampleAudio(44100)
I tried the script above (the .d2v) is the 1st vob of my PAL Contact DVD.

I use VirtualDub 1.4.13 on Win98SE, Avisynth 20th Aug build.

Couldn't make anything crash (I gave it a good go)

Sorry.
What's the ReSampleAudio(44100) there for?
I don't get audio out of a .d2v file (or am I missing something? )

regards
Simon
Si is offline   Reply With Quote
Old 3rd September 2003, 03:37   #28  |  Link
BlueCup
Registered User
 
Join Date: Jan 2003
Posts: 66
Even if I do remove the resampleaudio it will still crash my VDub. Maybe it's my source material, I don't know.
BlueCup is offline   Reply With Quote
Old 3rd September 2003, 19:52   #29  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Could you try previous versions of PFR to see if is my filter?
regards
Simon
Si is offline   Reply With Quote
Old 4th September 2003, 20:12   #30  |  Link
BlueCup
Registered User
 
Join Date: Jan 2003
Posts: 66
I just tried every version and had the same result. Vdub crashes after seeking.

It seems to crash after the 3rd frame I view. I could post a very small section of the VOB if you would like to test it on your machine.

Last edited by BlueCup; 4th September 2003 at 20:14.
BlueCup is offline   Reply With Quote
Old 4th September 2003, 22:34   #31  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Yes please
Si is offline   Reply With Quote
Old 8th November 2003, 15:51   #32  |  Link
sapient
Unbeliever
 
Join Date: Sep 2002
Location: Greece
Posts: 111
@simon

I have tried the latest version of pfr and found it to be buggy too. I have noticed the same bug as others, i.e. virtual dub reporting an error while seeking. Playback of the avs with media player also comes to a crash stop after a few frames.
Have you made any progress in resolving this?

sapient
sapient is offline   Reply With Quote
Old 8th November 2003, 23:00   #33  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
I'll look into it.

Since the 1st report said it happened with all versions - I assumed it was his setup

Can you load an old version and tell me what happens then?

regards
Simon
Si is offline   Reply With Quote
Old 9th November 2003, 16:06   #34  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Well - I got one error once (in about 10 attempts) and I was wildy moving backwards and forwards in VirtualDubMod 1.4.13.

That's about normal for using anything in Avisynth/VirutalDubMod on my system

I cannot induce anything with just a straight play of an .avs in MS MPlayer2.

My script
Code:
LoadPlugin("c:\av\avisynth\myplugins\PFR.dll")
AVISource("d:\Huffyuv.00.avi")
PFR()
return last
As said , I use VirtualDubMod 1.4.13 and currently on Avisynth Nov3 release. (Win98SE if that makes any diff)

What's your setup and exact script that fails?

regards
Simon
Si is offline   Reply With Quote
Old 1st January 2004, 23:26   #35  |  Link
Dermir
Registered User
 
Dermir's Avatar
 
Join Date: Jun 2002
Posts: 15
I am using Avisynth 2.53, Win2kPro SP4, Mobo ViaKT133A, Duron1300, 512mb RAM, Geforce2 (32mb), Sblive1024

tested with Vdubmod 1.4.13 and 1.5.10.1
tested with pfr 1.5, 1.4, 1.3, 1.2

Code:
avisource("e:\capture.avi")
pfr()
Avisynth read error each time on Frame 41 when using the script above
Avisynth read error each time on Frame 42 when using pfr(npif=0)
Avisynth read error each time on Frame 70 when adding reversefielddominance() (what would be wrong) before pfr.

Source is yuy2 huffyuv 2.1.1 ccesp patch 0.2.3, tff, plugins are autoloaded. Tested also with loadplugin - still the error.
Tested on completely progressive content with no blends - no errors (maybe because the filter does nothing there).

Last edited by Dermir; 1st January 2004 at 23:30.
Dermir is offline   Reply With Quote
Old 3rd January 2004, 23:59   #36  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Can you make the 1st 50 frames of your file available for me to download?

regards
Simon
Si is offline   Reply With Quote
Old 4th January 2004, 03:31   #37  |  Link
Dermir
Registered User
 
Dermir's Avatar
 
Join Date: Jun 2002
Posts: 15
Ok, as I am writing the 19,3mb file is being uploaded.
Please check you pm for the link, Simon.

BTW the original capture is no longer on my harddisk, but with this capture (same series, same intro) the error appears everytime on the 5fth or 6th? frame.
I don't remember atm how much traffic is allowed on my site, fifty people should be able to download it without problems, but since this thread has >2000 views... , everyone who wants to try it can post here/pm me and I will pm him/her the link.

Last edited by Dermir; 4th January 2004 at 03:43.
Dermir is offline   Reply With Quote
Old 4th January 2004, 14:54   #38  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Simon,

bad report from me, too:

PFR has never ever worked for me, regardless of its version number, or the version of AviSynth. It tried it on Huffyuv AVIs, on VBLE AVIs, and on mpeg2-captures served through DVD2AVI1.76/mpeg2dec3.
The famous "AviSynth read error" appears either on the very first frame, or very early after that. I was never able to get more than a dozen frames out of it before the read error occured.
Running WinXP Pro w/o SP on an Athlon XP 1800.
Where to start bug hunting

- 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!)
Didée is offline   Reply With Quote
Old 4th January 2004, 18:17   #39  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Well this script
Code:
LoadPlugin("c:\av\avisynth\myplugins\PFR.dll")
AVISource("d:\vtest\sample.avi")
PFR()
return last
Works flawlessly on my setup

The only commmon thing is that all 3 of you that report errors are running Win2K or WinXP and I have Win98SE.

The only time I get errors is if I change the script within VirtualDubMod and then reload by pressing F5. I get then get an error while scrubbing the timeline.

If I exit VirtualDubMod and start again - no problems.

If I load the avs into mplayer2 - no problems.
Maybe it does someting "dirty" that Win98SE lets pass but Win2000+ doesn't let pass

regards
Simon
Si is offline   Reply With Quote
Old 4th January 2004, 18:28   #40  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
I've also tried PFR some time ago and never experienced errors while running it.
I am using 98lite (Win98SE)
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Reply


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 10:48.


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