[FFmpeg-trac] #3451(swscale:new): sws_scale crashes in high resolutions when using mmx optimization
FFmpeg
trac at avcodec.org
Wed Mar 12 22:01:12 CET 2014
#3451: sws_scale crashes in high resolutions when using mmx optimization
-------------------------------------+-----------------------------------
Reporter: miro82 | Owner:
Type: defect | Status: new
Priority: normal | Component: swscale
Version: unspecified | Resolution:
Keywords: crash | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-----------------------------------
Comment (by miro82):
I'm not using the ffmpeg application. The crash seems only to occur in OS
X. Tried the same code (x64) in Visual Studio 2013 without any problems. I
have simplified the code for reproducing the problem and attached the
files. In this case I'm only trying to flip, convert and encode a single
3840x2160 frame.
I'm don't have gdb but here is the output from lldb:
{{{
Miroslavs-MacBook-Pro:bin miran46$ lldb mmx_test2
Current executable set to 'mmx_test2' (x86_64).
(lldb) r
Process 78369 launched:
'/Users/miran46/code/projects/FFMpegCapture/mmx_test2_build/bin/mmx_test2'
(x86_64)
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2
FMA3 LZCNT BMI2
x265 [info]: Main profile, Level-5.1 (High tier)
x265 [info]: WPP streams / pool / frames : 34 / 4 / 1
x265 [info]: CU size : 64
x265 [info]: Max RQT depth inter / intra : 1 / 1
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut : 25 / 250 / 40
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / refs : 1 / 1 / 3
x265 [info]: Rate Control / AQ-Strength / CUTree : ABR-104857 kbps / 1.0 /
1
x265 [info]: tools: rect amp rd=3 lft sao-lcu sign-hide
Process 78369 stopped
* thread #1: tid = 0x13ab7f, 0x0000000100fdcab8
libswscale.2.dylib`___lldb_unnamed_function410$$libswscale.2.dylib + 440,
queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1,
address=0x10c203000)
frame #0: 0x0000000100fdcab8
libswscale.2.dylib`___lldb_unnamed_function410$$libswscale.2.dylib + 440
libswscale.2.dylib`___lldb_unnamed_function410$$libswscale.2.dylib + 440:
-> 0x100fdcab8: movd 0x15(%rbx,%rdx), %mm3
0x100fdcabd: punpcklbw %mm7, %mm2
0x100fdcac0: punpcklbw %mm7, %mm3
0x100fdcac3: pmaddwd %mm6, %mm4
(lldb) bt
* thread #1: tid = 0x13ab7f, 0x0000000100fdcab8
libswscale.2.dylib`___lldb_unnamed_function410$$libswscale.2.dylib + 440,
queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1,
address=0x10c203000)
* frame #0: 0x0000000100fdcab8
libswscale.2.dylib`___lldb_unnamed_function410$$libswscale.2.dylib + 440
frame #1: 0x0000000100fc4d49
libswscale.2.dylib`___lldb_unnamed_function303$$libswscale.2.dylib + 137
frame #2: 0x0000000100fc18b7 libswscale.2.dylib`sws_scale + 2919
frame #3: 0x0000000100004694
mmx_test2`Encoder::addFrame(this=0x0000000100005170,
pixels=0x000000010aa48000) + 212 at Encoder.cpp:150
frame #4: 0x00000001000049d9 mmx_test2`main + 345 at main.cpp:21
(lldb) disassemble --pc
libswscale.2.dylib`___lldb_unnamed_function410$$libswscale.2.dylib + 440:
-> 0x100fdcab8: movd 0x15(%rbx,%rdx), %mm3
0x100fdcabd: punpcklbw %mm7, %mm2
0x100fdcac0: punpcklbw %mm7, %mm3
0x100fdcac3: pmaddwd %mm6, %mm4
(lldb) register read --all
General Purpose Registers:
rax = 0xfffffffffffffff8
rbx = 0x000000010c203000
rcx = 0x0000000000000000
rdx = 0xffffffffffffffe8
rdi = 0x000000000000086c
rsi = 0x0000000000000f00
rbp = 0x0000000000000780
rsp = 0x00007fff5fbff8b0
r8 = 0x0000000000000f00
r9 = 0x0000000000002d00
r10 = 0x0000000000000000
r11 = 0x0000000109e6af00
r12 = 0x00000001083beb40
r13 = 0x000000010a653000
r14 = 0xfffffffffffff100
r15 = 0x000000010c200300
rip = 0x0000000100fdcab8
libswscale.2.dylib`___lldb_unnamed_function410$$libswscale.2.dylib + 440
rflags = 0x0000000000010282
cs = 0x000000000000002b
fs = 0x00000000ffff0000
gs = 0x00000000ffff0000
eax = 0xfffffff8
ebx = 0x0c203000
ecx = 0x00000000
edx = 0xffffffe8
edi = 0x0000086c
esi = 0x00000f00
ebp = 0x00000780
esp = 0x5fbff8b0
r8d = 0x00000f00
r9d = 0x00002d00
r10d = 0x00000000
r11d = 0x09e6af00
r12d = 0x083beb40
r13d = 0x0a653000
r14d = 0xfffff100
r15d = 0x0c200300
ax = 0xfff8
bx = 0x3000
cx = 0x0000
dx = 0xffe8
di = 0x086c
si = 0x0f00
bp = 0x0780
sp = 0xf8b0
r8w = 0x0f00
r9w = 0x2d00
r10w = 0x0000
r11w = 0xaf00
r12w = 0xeb40
r13w = 0x3000
r14w = 0xf100
r15w = 0x0300
ah = 0xff
bh = 0x30
ch = 0x00
dh = 0xff
al = 0xf8
bl = 0x00
cl = 0x00
dl = 0xe8
dil = 0x6c
sil = 0x00
bpl = 0x80
spl = 0xb0
r8l = 0x00
r9l = 0x00
r10l = 0x00
r11l = 0x00
r12l = 0x40
r13l = 0x00
r14l = 0x00
r15l = 0x00
Floating Point Registers:
fctrl = 0x037f
fstat = 0x0000
ftag = 0xff
fop = 0x0000
fioff = 0x00000000
fiseg = 0x0000
fooff = 0x00000000
foseg = 0x0000
mxcsr = 0x00001fa0
mxcsrmask = 0x0000ffff
stmm0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff}
stmm1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff}
stmm2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff}
stmm3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff}
stmm4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff}
stmm5 = {0x01 0x00 0x01 0x00 0x01 0x00 0x01 0x00 0xff 0xff}
stmm6 = {0x88 0x0c 0x87 0x40 0xde 0x20 0x00 0x00 0xff 0xff}
stmm7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff}
ymm0 = {0x00 0x0f 0x00 0x00 0x80 0x07 0x00 0x00 0x80 0x07 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm1 = {0x00 0x2d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm2 = {0x00 0x00 0x00 0x00 0x00 0x00 0xe0 0x43 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm3 = {0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x3f 0x03 0x00 0x80 0x00
0x00 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm4 = {0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x3f 0x03 0x00 0x80 0x00
0x00 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm5 = {0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x3f 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm6 = {0xae 0x72 0x46 0xe8 0x8f 0x1d 0xe4 0x3f 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm7 = {0x6b 0xc8 0xb8 0xbe 0xd3 0xb9 0x0b 0x40 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm8 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm9 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm10 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm11 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm12 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm13 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm14 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
ymm15 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00}
xmm0 = {0x00 0x0f 0x00 0x00 0x80 0x07 0x00 0x00 0x80 0x07 0x00 0x00
0x00 0x00 0x00 0x00}
xmm1 = {0x00 0x2d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm2 = {0x00 0x00 0x00 0x00 0x00 0x00 0xe0 0x43 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm3 = {0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x3f 0x03 0x00 0x80 0x00
0x00 0x03 0x00 0x00}
xmm4 = {0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x3f 0x03 0x00 0x80 0x00
0x00 0x03 0x00 0x00}
xmm5 = {0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x3f 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm6 = {0xae 0x72 0x46 0xe8 0x8f 0x1d 0xe4 0x3f 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm7 = {0x6b 0xc8 0xb8 0xbe 0xd3 0xb9 0x0b 0x40 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm8 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm9 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm10 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm11 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm12 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm13 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm14 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
xmm15 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00}
Exception State Registers:
trapno = 0x0000000e
err = 0x00000004
faultvaddr = 0x000000010c203000
(lldb)
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3451#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list