В блоке
x264
common/cpu.c
https://github.com/jesselegg/x264/blob/master/common/cpu.c#L248
if( family == 6 )
{
/* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and 6/14 (core1 "yonah")
* theoretically support sse2, but it's significantly slower than mmx for
* almost all of x264's functions, so let's just pretend they don't. */
if( model == 9 || model == 13 || model == 14 )
{
cpu &= ~(X264_CPU_SSE2|X264_CPU_SSE3);
assert(!(cpu&(X264_CPU_SSSE3|X264_CPU_SSE4)));
}
/* Detect Atom CPU */
else if( model == 28 )
{
cpu |= X264_CPU_SLOW_ATOM;
cpu |= X264_CPU_SLOW_CTZ;
cpu |= X264_CPU_SLOW_PSHUFB;
}
/* Conroe has a slow shuffle unit. Check the model number to make sure not
* to include crippled low-end Penryns and Nehalems that don't have SSE4. */
else if( (cpu&X264_CPU_SSSE3) && !(cpu&X264_CPU_SSE4) && model < 23 )
cpu |= X264_CPU_SLOW_SHUFFLE;
}
}
B блоке
cpu &= ~(X264_CPU_SSE2|X264_CPU_SSE3);
assert(!(cpu&(X264_CPU_SSSE3|X264_CPU_SSE4)));
происходит исключение при наличии следующих инструкций в процессоре QEMU Virtual CPU version (cpu64-rhel6)
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb lm nopl pni fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 invpcid
Правильно ли я понимаю, что при наличии SSSE3 или SSE4 правильное поведение ffmpeg при конвертации c использованием x264-- аварийный останов?
Вот, что имеем
ffmpeg: common/cpu.c:248: x264_cpu_detect: Assertion `!(cpu&(0x0000040|0x0000080))' failed.
Именно при обработке видео:
[user@machine]# ffmpeg -i superpuper -s 640x640 -vcodec \
libx264 -acodec aac -ar 44100 -preset:v fast -r 25 -threads 1 \
-f mp4 -pix_fmt yuv420p -movflags faststart -metadata:s:v:0 \
rotate=0 -bufsize 512k -strict -2 tmp00000001.out
ffmpeg version 2.6.5 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --enable-libfaac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --enable-avisynth --enable-fontconfig --enable-ladspa --enable-libbluray --enable-libcaca --enable-libilbc --enable-libmodplug --enable-libssh --enable-libtwolame --enable-libwavpack --enable-libzvbi --enable-openssl --enable-libfdk-aac --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, avi, from 'superpuper':
Metadata:
encoder : Lavf54.42.100
Duration: 01:47:39.32, start: 0.000000, bitrate: 458 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (xvid / 0x64697678), yuv420p, 320x176 [SAR 33:32 DAR 15:8], 389 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 56 kb/s
File 'tmp00000001.out' already exists. Overwrite ? [y/N] y
ffmpeg: common/cpu.c:248: x264_cpu_detect: Assertion `!(cpu&(0x0000040|0x0000080))' failed.
Aborted
Процессор:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : QEMU Virtual CPU version (cpu64-rhel6)
stepping : 3
microcode : 0x1
cpu MHz : 1999.998
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 7
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb lm nopl pni fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 invpcid
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : QEMU Virtual CPU version (cpu64-rhel6)
stepping : 3
microcode : 0x1
cpu MHz : 1999.998
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 7
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb lm nopl pni fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 invpcid
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management: