开启neon编译iOS版X264

我的测试环境 Xcode 4.6 iPod Touch 4

Touch-future:~ root# uname -a
Darwin Touch-future 11.0.0 Darwin Kernel Version 11.0.0: Sun Apr  8 21:51:26 PDT 2012; root:xnu-1878.11.10~1/RELEASE_ARM_S5L8930X iPod4,1 arm N81AP Darwin

设置环境变量

export CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
export AS='gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc'
export CFLAGS='-arch armv7'
export LDFLAGS='-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system/ -arch armv7'

配置

./configure --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/ --host=arm-apple-darwin  --enable-static --enable-strip --disable-avs --chroma-format=420 --enable-pic --disable-opencl

编译

make -j4

签名应用程序
http://danqingdani.blog.163.com/blog/static/186094195201332210447261/

执行结果,与Android版的x264测试使用相同的文件和配置

Touch-future:~ root# ./x264 -o test.264 akiyo_qcif.y4m
y4m [info]: 176x144p 128:117 @ 30000/1001 fps (cfr)
x264 [info]: using SAR=128/117
x264 [info]: using cpu capabilities: ARMv6 NEON
x264 [info]: profile High, level 1.1
x264 [info]: frame I:2     Avg QP:19.56  size:  4765
x264 [info]: frame P:102   Avg QP:23.74  size:   284
x264 [info]: frame B:196   Avg QP:30.46  size:    30
x264 [info]: consecutive B-frames: 12.7%  0.0%  2.0% 85.3%
x264 [info]: mb I  I16..4:  1.5% 36.4% 62.1%
x264 [info]: mb P  I16..4:  0.0%  0.0%  0.0%  P16..4: 11.4%  8.8%  7.7%  0.0%  0.0%    skip:72.0%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  8.2%  1.1%  0.3%  direct: 0.3%  skip:90.1%  L0:28.6% L1:63.1% BI: 8.3%
x264 [info]: 8x8 transform intra:36.4% inter:35.5%
x264 [info]: coded y,uvDC,uvAC intra: 91.0% 89.9% 79.3% inter: 3.9% 2.0% 0.7%
x264 [info]: i16 v,h,dc,p: 100%  0%  0%  0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 30% 15%  3%  3%  8%  3%  4%  7%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 21%  8%  6%  5%  8%  6%  9%  6%
x264 [info]: i8c dc,h,v,p: 39% 23% 29%  9%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 73.4% 13.7%  8.5%  4.3%
x264 [info]: ref B L0: 91.5%  6.6%  1.8%
x264 [info]: ref B L1: 95.6%  4.4%
x264 [info]: kb/s:35.48

encoded 300 frames, 69.14 fps, 35.48 kb/s

X264性能调优,请看Android,IOS平台上x264编码实时视频参数设置与优化

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: 开启neon编译iOS版X264

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据