|
|
| fccHandler |
| Posted: Oct 8 2007, 02:21 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Phaeron: Thank you for all your work on this.
As far as breaking the plugin, the fix was pretty simple. (Either that, or I'm misunderstanding the whole concept, which is quite probable...) Anyway, I uploaded a new build:
http://fcchandler.home.comcast.net/Plugins/MPEG2
In the case of the MPEG-2 plugin, a "reconstructed" frame (one with the RFF flag set) is never actually available in any buffer. Instead, it will be laced together when requested, if "is_preroll" is false. The workaround for DecodeFrame() being sent -1 was simply:
if (streamFrame < 0) streamFrame = targetFrame;
In other words, the decoder maintains enough state in itself to figure out if the target frame is present in its buffers, or needs to be decoded, or needs to be laced. Thus the interface it aims to present to the host (and must present) is one in which each frame is one sample, all of them in display order.
BTW, making the WMV plugin was so much easier because I could simply use the default I/P decoding model. That thing is a godsend.
-------------------- May the FOURCC be with you... |
 |
| phaeron |
| Posted: Oct 8 2007, 02:47 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
Nope, you got it right. In fact, that's similar to the fix I made for the internal MPEG-1 driver.
As for the default I/P driver, that's surprising since the implementation in the host is only about a page long. It's the I/P/B case that I worry about, because that's rather challenging to get right. I couldn't think of a straightforward default model that would be general enough.
|
 |
| heustess |
| Posted: Oct 8 2007, 03:01 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 67
Member No.: 21872
Joined: 5-August 07

|
For future reference: fccHandler was right again! For a wmv to play audio from the WMV plugin and VirtualDub in Vista with WMP11 you need to obtain msaud32.acm and install it in C:\Windows\System32.
If you can't view or hear WMVs with VirtualDub, this solved my problem:
1. Download and install http://download.microsoft.com/download/9/8...mv9VCMsetup.exe 2. Download but don't install http://download.microsoft.com/download/4/6...ef/wmp6cdcs.exe 3. Extract from wmp6cdcs.exe only msaud.inf and msaud32.acm. (I use WinRAR to do this.) 4. Right click msaud.inf and select install.
Thanks again for all your help!
-------------------- http://heustess.com/ |
 |
| fccHandler |
| Posted: Oct 8 2007, 04:28 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
I'm seeing a reproducible hang in the filter preview of the latest test version, with the WMV plugin. To repro, open any WMV. Add the brightness/contrast filter and click preview. In the preview window, move the slider about a minute into the movie. Now switch to another maximized application which covers VirtualDub's window, then switch back to VirtualDub. When I do this, it hangs for a period of time which depends on how far I moved the slider, as if it's decoding ALL of the frames up to the preview frame...
It doesn't happen with the MPEG-2 plugin, perhaps because it uses a custom decoder model?
MOCRAP and FLIC seem broken in the filter preview also, but maybe that's because of the changes in the API.
Anyway, I'll keep messing with the plugin code; maybe it's something I'm doing wrong...
Update: It must be a bug in the default I/P decoding model. When I implemented a custom decoding model, the problem disappeared. I've uploaded version 1.2 as a temporary fix:
http://fcchandler.home.comcast.net/Plugins/WMV/
-------------------- May the FOURCC be with you... |
 |
| phaeron |
| Posted: Oct 8 2007, 05:48 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
Fixed: http://www.virtualdub.org/beta/VirtualDub-...1.7.6-test7.zip http://www.virtualdub.org/beta/VirtualDub-...test7-AMD64.zip http://www.virtualdub.org/beta/VirtualDub-....6-test7-src.7z |
 |
| fccHandler |
| Posted: Oct 8 2007, 06:20 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (phaeron @ Oct 8 2007, 01:48 AM) | | Fixed |
Thanks!
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Oct 8 2007, 07:20 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Another bug, sorry. 
To repro, open some WMV (e.g., the "birthdayblues1.wmv" which heustess posted), and jump to some position near the middle. If you start "input playback" from that position, audio and video are in sync. If you start "output playback" from that same position, audio and video are not in sync.
FWIW, this happens regardless of whether I use the default I/P decoding model or not. I'm guessing it's a flaw in the VBR audio support.
EDIT: Clicking the system menu [X] in the File Information dialogs doesn't work in my plugins. I'll fix that in the next releases.
-------------------- May the FOURCC be with you... |
 |
| Moitah |
| Posted: Oct 8 2007, 10:09 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 210
Member No.: 8955
Joined: 20-February 04

|
Avery, I saw a few things in the documentation that I suspect may be mistakes.
In Video decoder model:
next_sample = nearest_key(desired_frame);
Shouldn't that be next_frame?
In Autodetect:
Each pair matches only if the bits in the file byte match those in the mask byte, for all bits set in the mask byte.
Shouldn't that be match byte?
I'm not done reading it all yet but I'll let you know if I spot anything else. |
 |
| phaeron |
| Posted: Oct 9 2007, 06:57 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
@fccHandler: Oh no, that's quite alright. Actually, this is a bug that I had thought I'd seen but wasn't able to reproduce.
http://www.virtualdub.org/beta/VirtualDub-...1.7.6-test8.zip http://www.virtualdub.org/beta/VirtualDub-...test8-AMD64.zip http://www.virtualdub.org/beta/VirtualDub-....6-test8-src.7z
@Moitah: Both are erroneous, but in the first case, it's actually that all of the parts that say "frame" should actually say "sample." |
 |
| pintcat |
| Posted: Oct 9 2007, 08:18 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 142
Member No.: 18182
Joined: 19-February 06

|
I think I've found a small but very strange bug and it might be that I'm the only user who's having this one. Here's what happens: I open a custom mpeg file (no matter if mpeg1 or 2) with the latest releases of VirtualDub 1.7.6 & MPEG2 plug-in. Then I configure XviD for the 1st pass and start the process with the 'Run video analysis pass' option. Until now everything works great and the pass file is written correctly. But then when finishing the pass, VirtualDub crashes every time! The strange thing is that this happens only if I use 'Run video analysis pass" in conjunction with XviD. If I do the 1st pass with 'Save as AVI...' everything works. Also, if I use another codec which offers 2 pass encoding, no crash occurs. Btw for XviD I'm using Koepi's XviD build v1.2.127. Never tested another build till now. I know this crash isn't very important because the pass is already finished at the time VDub crashes; it's just a bit annoying. At last I have this crashreport - I hope it will help a little bit...
VirtualDub crash report -- build 28280 (release) --------------------------------------
Disassembly: 10001920: f1 db 0f1h 10001921: 1800 sbb [eax], al 10001923: 10cb adc bl, cl 10001925: 16 push ss 10001926: 0010 add [eax], dl 10001928: 90 nop 10001929: 90 nop 1000192a: 90 nop 1000192b: 90 nop 1000192c: 90 nop 1000192d: 90 nop 1000192e: 90 nop 1000192f: 90 nop 10001930: 56 push esi 10001931: 8b742408 mov esi, [esp+08h] 10001935: 8b460c mov eax, [esi+0ch] 10001938: 85c0 test eax, eax 1000193a: 7506 jnz 10001942 1000193c: 33c0 xor eax, eax 1000193e: 5e pop esi 1000193f: c22000 ret 0020 10001942: 8b44241c mov eax, [esp+1ch] 10001946: 53 push ebx 10001947: 55 push ebp 10001948: 57 push edi 10001949: 85c0 test eax, eax 1000194b: 7f18 jg 10001965 1000194d: 7c08 jl 10001957 1000194f: 8b6c2424 mov ebp, [esp+24h] 10001953: 85ed test ebp, ebp 10001955: 7312 jnc 10001969 10001957: 8b442430 mov eax, [esp+30h] 1000195b: 8b6c242c mov ebp, [esp+2ch] 1000195f: 89442428 mov [esp+28h], eax 10001963: eb04 jmp 10001969 10001965: 8b6c2424 mov ebp, [esp+24h] 10001969: 8b4e08 mov ecx, [esi+08h] 1000196c: 8b9190100000 mov edx, [ecx+1090] 10001972: 8b4204 mov eax, [edx+04h] 10001975: 50 push eax 10001976: 8b08 mov ecx, [eax] 10001978: ff510c call dword ptr [ecx+0ch] 1000197b: 8b4e0c mov ecx, [esi+0ch] 1000197e: 8bf8 mov edi, eax 10001980: c1e802 shr eax, 02h 10001983: 8b11 mov edx, [ecx] 10001985: 2401 and al, 01h 10001987: 50 push eax 10001988: ff522c call dword ptr [edx+2ch] 1000198b: 8b4e0c mov ecx, [esi+0ch] 1000198e: 8bc7 mov eax, edi 10001990: c1e803 shr eax, 03h 10001993: 8b11 mov edx, [ecx] 10001995: 2401 and al, 01h 10001997: 50 push eax 10001998: ff5230 call dword ptr [edx+30h] 1000199b: 8b4608 mov eax, [esi+08h] 1000199e: 8b4e0c mov ecx, [esi+0ch] 100019a1: 8a4075 mov al, [eax+75h] 100019a4: 8b11 mov edx, [ecx] 100019a6: 50 push eax 100019a7: ff5228 call dword ptr [edx+28h] 100019aa: 8b4e08 mov ecx, [esi+08h] 100019ad: 8b5160 mov edx, [ecx+60h] 100019b0: 8b1caa mov ebx, [edx+ebp*4] <-- FAULT 100019b3: 8d04aa lea eax, [edx+ebp*4] 100019b6: 8a542420 mov dl, [esp+20h] 100019ba: 84d2 test dl, dl 100019bc: 0f84f3000000 jz 10001ab5 100019c2: f6c301 test bl, 01h 100019c5: 0f8487000000 jz 10001a52 100019cb: 8b542428 mov edx, [esp+28h] 100019cf: 85d2 test edx, edx 100019d1: 7c7f jl 10001a52 100019d3: 7f04 jg 100019d9 100019d5: 85ed test ebp, ebp 100019d7: 7679 jbe 10001a52 100019d9: 8b40fc mov eax, [eax-04h] 100019dc: 8b4910 mov ecx, [ecx+10h] 100019df: d1fb sar ebx, 1 100019e1: d1f8 sar eax, 1 100019e3: 8bfb mov edi, ebx 100019e5: 53 push ebx 100019e6: c1e004 shl eax, 04h 100019e9: c1e704 shl edi, 04h 100019ec: 03c1 add eax, ecx 100019ee: 03f9 add edi, ecx 100019f0: 8b4e0c mov ecx, [esi+0ch] 100019f3: 89442424 mov [esp+24h], eax 100019f7: 8b01 mov eax, [ecx] 100019f9: ff5010 call dword ptr [eax+10h] 100019fc: 8be8 mov ebp, eax 100019fe: 8a470c mov al, [edi+0ch] 10001a01: 3c03 cmp al, 03h 10001a03: 0f8424040000 jz 10001e2d 10001a09: 83fd01 cmp ebp, 01h 10001a0c: 0f841b040000 jz 10001e2d 10001a12: 8b4e0c mov ecx, [esi+0ch] 10001a15: 6a01 push 01h 10001a17: 6a02 push 02h 10001a19: 8b11 mov edx, [ecx] 10001a1b: ff521c call dword ptr [edx+1ch] 10001a1e: 83 db 83h 10001a1f: fd std
Built on KOS-MOS on Mon Oct 08 23:30:35 2007 using compiler version 1400
Windows 5.1 (Windows XP x86 build 2600) [Service Pack 1]
EAX = 014e3600 EBX = 00bfae48 ECX = 014e3628 EDX = 014e47c8 EBP = 406d1388 ESI = 01d72040 EDI = 0000003f ESP = 02fbfc84 EIP = 100019b0 EFLAGS = 00010206 FPUCW = ffff027f FPUTW = ffffffff
Crash reason: Access Violation
Crash context: An out-of-bounds memory access (access violation) occurred in module 'MPEG2'...
...reading address 030295E8...
...while running thread "Processing" (thread.cpp:152).
Pointer dumps:
EAX 014e3600: 00000000 00000000 01010003 00080100 014e4718 01d6fc30 00000010 000041cd EBX 00bfae48: 005c11c4 005c11c8 000001ec 0000023c 005c11c0 0012fa50 00bfb11c 3f800000 ECX 014e3628: 1001f6b8 00000001 00004bb0 01d72c78 01df0048 01db4950 01dbb4c8 000041cc EDX 014e47c8: 00000000 00000002 00000004 00000006 00000008 0000000a 0000000c 0000000e ESI 01d72040: 1001f410 00000001 014e3628 01d72098 00001d03 00000000 01cf97b0 00000000 ESP 02fbfc80: 00000000 00bfc8f0 02fbfdc8 00bfae48 00bfc8f0 004db054 01d72040 00000000 02fbfca0: 00000000 00000000 ffffffff 00000000 406d1388 00000000 00bfc8f0 001689d8 02fbfcc0: 00bf7448 005ceaec 0000021c 02fbfdbc 005adfc0 00000000 00473ebd 005b7afe 02fbfce0: 00000000 00000000 ffffffff ffffffff 406d1388 00000000 02fbfe78 00bfae48
Thread call stack: 100019b0: MPEG2!000019b0 004db054: VDVideoSourcePlugin::streamGetFrame() 00473ebd: VDDubProcessThread::WriteVideoFrame() 0046c705: Dubber::Init() 77f431b7: ntdll!wcschr [77f40000+307c+13b] 77e5a65f: kernel32!WaitForSingleObjectEx [77e40000+1a5a2+bd] 77e5a652: kernel32!WaitForSingleObjectEx [77e40000+1a5a2+b0] 77e55e43: kernel32!SetEvent [77e40000+15e37+c] 00474a77: VDDubProcessThread::ThreadRun() 77f4119a: ntdll!RtlNtStatusToDosError [77f40000+116b+2f] 77f4119f: ntdll!RtlNtStatusToDosError [77f40000+116b+34] 77e5f02b: kernel32!DuplicateHandle [77e40000+1efb6+75] 77e5f02b: kernel32!DuplicateHandle [77e40000+1efb6+75] 00463b1a: VDThreadInitHandler() 00454502: ?$VDProtectedAutoScope1::?$VDProtectedAutoScope1() 0050e247: VDThread::StaticThreadStart() 00590708: _callthreadstartex() 005907ad: _threadstartex@4() 77e5d33b: kernel32!RegisterWaitForInputIdle [77e40000+1d2f8+43]
-- End of report |
 |
| fccHandler |
| Posted: Oct 9 2007, 11:24 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
I believe it crashed in my DecodeFrame() function because "streamFrame" was way out of bounds. I can guard against that in the next release, and it's good that you posted this because I was just about to upload it.
The original cause lies elsewhere, though, and I wasn't able to reproduce your crash. However, I am using a different build of Xvid (1.1.3) which I compiled myself.
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Oct 10 2007, 03:21 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
My FTP is broken tonight, so I can't update my plugins online. Bummer. 
In other news, I found that VirtualDub 1.7.6 test8 crashes if any plugin returns false in IVDXInputFile::GetVideoSource().
-------------------- May the FOURCC be with you... |
 |
| Moitah |
| Posted: Oct 10 2007, 04:51 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 210
Member No.: 8955
Joined: 20-February 04

|
I have very basic FLV support working :

Need to fix it up a lot before it's ready for release. |
 |
| phaeron |
| Posted: Oct 10 2007, 05:20 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
Yeah, your website was a bit Comcastic when I tried to grab the latest plugins. Fortunately, I was able to figure out what happened anyway. The XviD codec is significant, but what's missing is that it has to be in B-frame mode.
http://www.virtualdub.org/beta/VirtualDub-...1.7.6-test9.zip http://www.virtualdub.org/beta/VirtualDub-...test9-AMD64.zip http://www.virtualdub.org/beta/VirtualDub-....6-test9-src.7z
I had the no-video crash already fixed in the 1.7.6+N branch, but I went ahead and backported it since it's such a simple fix. |
 |
| fccHandler |
| Posted: Oct 10 2007, 06:03 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
MPEG-2 plugin v1.3 is up now. To the end user, not much has changed, but I found an awful lot of lurking bugs in the code, and I'm sure they would have bitten me someday...
http://fcchandler.home.comcast.net/Plugins/MPEG2/
| QUOTE (phaeron @ Oct 10 2007, 01:20 AM) | | The XviD codec is significant, but what's missing is that it has to be in B-frame mode. |
Good call! I usually have B-frames disabled, and I didn't think to enable them. Thank you for test9.
| QUOTE (Moitah @ Oct 10 2007, 12:51 AM) | | I have very basic FLV support working |
Wow. That's gonna be cool.
-------------------- May the FOURCC be with you... |
 |