[XviD-devel] B-frames encoding code committed

Dirk Knop xvid-devel@xvid.org
Fri, 19 Jul 2002 14:09:09 +0200


This is a multi-part message in MIME format.
--------------090209020009030701040500
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi again,

Dirk Knop wrote:

>   thin air". The second time, the crash dump dialog of vdub came up 
> and showed some strange pmXXXX ax,[eax] (just from mind protocol, 
> could have been other registers, and sorry for not remembering that 
> assembler instruction correctly) as crash reason (access violation). 
> Also, those crashes appeared in different places, the first was after 
> 57XX frames, the second after 68XX, so it's nothing that can be 
> reproduced correctly on my side :-/

Ok, with other resizing settings for the movie I get those crashes 
earlier (1st at 192 frames, 2nd at 231 frames), and the instruction 
causing the access violation is always the same:
pavgb mm2, [ebx]

I'll attach the crash dump vdub created, it looks like the problem is in 
a motion estimation loop (well, that's what the codec does, right? ;) ) 
but I don't know why this instruction is wrong, maybe it's of any help 
for you.

Regards,
Dirk





--------------090209020009030701040500
Content-Type: text/plain;
 name="crashinfo.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="crashinfo.txt"

VirtualDub crash report -- build 13870
--------------------------------------

Disassembly:
02a23f00: 4a              dec    edx
02a23f01: 080f            or     [edi], cl
02a23f03: dde8            fucomp st(0)
02a23f05: 01ca            add    edx, ecx
02a23f07: 0fddf1          paddusw mm6, mm1
02a23f0a: 0f6f00          movq   mm0, [eax]
02a23f0d: 0ff602          psadbw mm0, [edx]
02a23f10: 0f6f4808        movq   mm1, [eax+08]
02a23f14: 01c8            add    eax, ecx
02a23f16: 0ff64a08        psadbw mm1, [edx+08]
02a23f1a: 0fdde8          paddusw mm5, mm0
02a23f1d: 01ca            add    edx, ecx
02a23f1f: 0fddf1          paddusw mm6, mm1
02a23f22: 0f6f00          movq   mm0, [eax]
02a23f25: 0ff602          psadbw mm0, [edx]
02a23f28: 0f6f4808        movq   mm1, [eax+08]
02a23f2c: 01c8            add    eax, ecx
02a23f2e: 0ff64a08        psadbw mm1, [edx+08]
02a23f32: 0fdde8          paddusw mm5, mm0
02a23f35: 01ca            add    edx, ecx
02a23f37: 0fddf1          paddusw mm6, mm1
02a23f3a: 0f6f00          movq   mm0, [eax]
02a23f3d: 0ff602          psadbw mm0, [edx]
02a23f40: 0f6f4808        movq   mm1, [eax+08]
02a23f44: 01c8            add    eax, ecx
02a23f46: 0ff64a08        psadbw mm1, [edx+08]
02a23f4a: 0fdde8          paddusw mm5, mm0
02a23f4d: 01ca            add    edx, ecx
02a23f4f: 0fddf1          paddusw mm6, mm1
02a23f52: 0fddf5          paddusw mm6, mm5
02a23f55: 0f7ef0          movd   eax, mm6
02a23f58: c3              ret    
02a23f59: 90              nop    
02a23f5a: 90              nop    
02a23f5b: 90              nop    
02a23f5c: 90              nop    
02a23f5d: 90              nop    
02a23f5e: 90              nop    
02a23f5f: 90              nop    
02a23f60: 53              push   ebx
02a23f61: 8b442408        mov    eax, [esp+08]
02a23f65: 8b54240c        mov    edx, [esp+0c]
02a23f69: 8b5c2410        mov    ebx, [esp+10]
02a23f6d: 8b4c2414        mov    ecx, [esp+14]
02a23f71: 0fefed          pxor   mm5, mm5
02a23f74: 0feff6          pxor   mm6, mm6
02a23f77: 0f6f00          movq   mm0, [eax]
02a23f7a: 0f6f4808        movq   mm1, [eax+08]
02a23f7e: 0f6f12          movq   mm2, [edx]
02a23f81: 0f6f5a08        movq   mm3, [edx+08]
02a23f85: 0fe013          pavgb  mm2, [ebx]      <-- FAULT
02a23f88: 01ca            add    edx, ecx
02a23f8a: 0fe05b08        pavgb  mm3, [ebx+08]
02a23f8e: 01cb            add    ebx, ecx
02a23f90: 0ff6c2          psadbw mm0, mm2
02a23f93: 01c8            add    eax, ecx
02a23f95: 0ff6cb          psadbw mm1, mm3
02a23f98: 0fdde8          paddusw mm5, mm0
02a23f9b: 0fddf1          paddusw mm6, mm1
02a23f9e: 0f6f00          movq   mm0, [eax]
02a23fa1: 0f6f4808        movq   mm1, [eax+08]
02a23fa5: 0f6f12          movq   mm2, [edx]
02a23fa8: 0f6f5a08        movq   mm3, [edx+08]
02a23fac: 0fe013          pavgb  mm2, [ebx]
02a23faf: 01ca            add    edx, ecx
02a23fb1: 0fe05b08        pavgb  mm3, [ebx+08]
02a23fb5: 01cb            add    ebx, ecx
02a23fb7: 0ff6c2          psadbw mm0, mm2
02a23fba: 01c8            add    eax, ecx
02a23fbc: 0ff6cb          psadbw mm1, mm3
02a23fbf: 0fdde8          paddusw mm5, mm0
02a23fc2: 0fddf1          paddusw mm6, mm1
02a23fc5: 0f6f00          movq   mm0, [eax]
02a23fc8: 0f6f4808        movq   mm1, [eax+08]
02a23fcc: 0f6f12          movq   mm2, [edx]
02a23fcf: 0f6f5a08        movq   mm3, [edx+08]
02a23fd3: 0fe013          pavgb  mm2, [ebx]
02a23fd6: 01ca            add    edx, ecx
02a23fd8: 0fe05b08        pavgb  mm3, [ebx+08]
02a23fdc: 01cb            add    ebx, ecx
02a23fde: 0ff6c2          psadbw mm0, mm2
02a23fe1: 01c8            add    eax, ecx
02a23fe3: 0ff6cb          psadbw mm1, mm3
02a23fe6: 0fdde8          paddusw mm5, mm0
02a23fe9: 0fddf1          paddusw mm6, mm1
02a23fec: 0f6f00          movq   mm0, [eax]
02a23fef: 0f6f4808        movq   mm1, [eax+08]
02a23ff3: 0f6f12          movq   mm2, [edx]
02a23ff6: 0f6f5a08        movq   mm3, [edx+08]
02a23ffa: 0fe013          pavgb  mm2, [ebx]
02a23ffd: 01ca            add    edx, ecx
02a23fff: 0f              db     0f

Windows 5.0 (Win2000 build 2195) [Service Pack 2]

EAX = 03b7c930
EBX = 03c967a6
ECX = 000002c0
EDX = 03a6740b
EBP = 03272270
DS:ESI = 0023:00002224
ES:EDI = 0023:00000013
SS:ESP = 0023:0449ef74
CS:EIP = 001b:02a23f85
FS = 003b
GS = 0000
EFLAGS = 00010206

MM0 = a7a8a9a8a8a6a5a5
MM1 = 8c8e9094989ba0a6
MM2 = a4a5a6a6a6a7a7a7
MM3 = 88898d90949a9fa3
MM4 = fffafffdfffffffe
MM5 = 0000000000000000
MM6 = 0000000000000000
MM7 = ae020c0000000000
Crash reason: Access Violation

Thread 000002b8 (Main thread)
	T:\projects\VirtualDub_old\main\Init.cpp(116)
	T:\projects\VirtualDub_old\main\Init.cpp(135)
	T:\projects\VirtualDub_old\main\Init.cpp(153)
	T:\projects\VirtualDub_old\main\Init.cpp(215)
	T:\projects\VirtualDub_old\main\Main.cpp(182)
	T:\projects\VirtualDub_old\main\Main.cpp(205)
	T:\projects\VirtualDub_old\main\FilterSystem.cpp(427)
Thread 00000428 (FastWriteStream)
Thread 00000384 (Processing)
	T:\projects\VirtualDub_old\main\Dub.cpp(3220)
	T:\projects\VirtualDub_old\main\Dub.cpp(2835)
	T:\projects\VirtualDub_old\main\Dub.cpp(2840)
	T:\projects\VirtualDub_old\main\VideoSequenceCompressor.cpp(358)
	T:\projects\VirtualDub_old\main\VideoSequenceCompressor.cpp(371)
	T:\projects\VirtualDub_old\main\Dub.cpp(3022)
	T:\projects\VirtualDub_old\main\Dub.cpp(3220)
	T:\projects\VirtualDub_old\main\Dub.cpp(2835)
	T:\projects\VirtualDub_old\main\Dub.cpp(2840)
	T:\projects\VirtualDub_old\main\VideoSequenceCompressor.cpp(358)
	T:\projects\VirtualDub_old\main\VideoSequenceCompressor.cpp(371)
	T:\projects\VirtualDub_old\main\Dub.cpp(3022)
	T:\projects\VirtualDub_old\main\Dub.cpp(3220)
	T:\projects\VirtualDub_old\main\Dub.cpp(2835)
	T:\projects\VirtualDub_old\main\Dub.cpp(2840)
	T:\projects\VirtualDub_old\main\VideoSequenceCompressor.cpp(358)
Thread 00000534 (I/O processing)


02a23f85: xvid!xvid_init [029e0000+c13c+37e49]
02a11e3f: xvid!xvid_init [029e0000+c13c+25d03]
029f31d2: xvid!xvid_init [029e0000+c13c+7096]
77e8d434: KERNEL32!SetEnvironmentVariableA [77e70000+1d2eb+149]
77e8d4b8: KERNEL32!SetEnvironmentVariableA [77e70000+1d2eb+1cd]
7788f45c: ntdll!wcsncmp [77880000+f32b+131]
7788f3fa: ntdll!wcsncmp [77880000+f32b+cf]
778a0346: ntdll!KiUserExceptionDispatcher [77880000+20338+e]
77e889d1: KERNEL32!RaiseException [77e70000+1899a+37]
77e889d1: KERNEL32!RaiseException [77e70000+1899a+37]
77882dc2: ntdll!RtlReleasePebLock [77880000+2db3+f]
77e76ae4: KERNEL32!MapViewOfFile [77e70000+6a7b+69]
77e77015: KERNEL32!OpenEventW [77e70000+6fad+68]
77e73935: KERNEL32!WriteConsoleA [77e70000+38a7+8e]
77e73b33: KERNEL32!WaitForSingleObjectEx [77e70000+3ad9+5a]
77e73b5b: KERNEL32!WaitForSingleObject [77e70000+3b4c+f]
77e73e84: KERNEL32!ReleaseMutex [77e70000+3e78+c]
77e989fe: KERNEL32!OutputDebugStringW [77e70000+28881+17d]
029f0871: xvid!xvid_init [029e0000+c13c+4735]
029e4f61: xvid!00004f61
029ec123: xvid!xvid_encore [029e0000+c0dc+47]
029e7a8f: xvid!00007a8f
029ebe1d: xvid!DriverProc [029e0000+bbd0+24d]
77e864ba: KERNEL32!TlsSetValue [77e70000+1640e+ac]
778829c0: ntdll!NtQueryPerformanceCounter [77880000+28db+e5]
778cb4b8: ntdll!RtlAllocateHeap [77880000+4b10f+3a9]
778cb4cf: ntdll!RtlAllocateHeap [77880000+4b10f+3c0]
779b83a3: OLEAUT32!VarBstrFromDate [779a0000+16930+1a73]
778cbead: ntdll!RtlSizeHeap [77880000+4b939+574]
778cbcdd: ntdll!RtlSizeHeap [77880000+4b939+3a4]
778cbe33: ntdll!RtlSizeHeap [77880000+4b939+4fa]
778cb5f2: ntdll!RtlAllocateHeap [77880000+4b10f+4e3]
778cb4b8: ntdll!RtlAllocateHeap [77880000+4b10f+3a9]
778cb4cf: ntdll!RtlAllocateHeap [77880000+4b10f+3c0]
778837a6: ntdll!RtlImageDirectoryEntryToData [77880000+3769+3d]
7788aba4: ntdll!NtSetSecurityObject [77880000+ab5d+47]
7788ad46: ntdll!NtSetSecurityObject [77880000+ab5d+1e9]
77886000: ntdll!LdrInitializeThunk [77880000+5f14+ec]
778a0313: ntdll!KiUserApcDispatcher [77880000+2030c+7]
778a031b: ntdll!KiUserApcDispatcher [77880000+2030c+f]
0047fd51: _heap_alloc()
6a7717f8: MSVFW32!ICSendMessage [6a770000+17c4+34]
6a774ea4: MSVFW32!ICCompress [6a770000+4e43+61]
0046e271: VideoSequenceCompressor::packFrame()
0046798f: Dubber::WriteVideoFrame()
77e73b5b: KERNEL32!WaitForSingleObject [77e70000+3b4c+f]
0040b750: AVIPipe::getReadBuffer()
0040b76a: AVIPipe::getReadBuffer()
004683a3: Dubber::ProcessingThread()
0046844f: Dubber::ProcessingThread()
00468316: Dubber::ProcessingThreadKickstart()
004800e8: _threadstart@4()
77e86523: KERNEL32!TlsSetValue [77e70000+1640e+115]

-- End of report

--------------090209020009030701040500--