编译配置选项
for armv4
./configure \ --enable-memalign-hack \ --target-os=mingw32ce \ --arch=arm \ --cpu=armv4 \ --enable-cross-compile \ --cross-prefix=arm-wince-mingw32ce- \ --enable-small \ --disable-static \ --enable-shared \ --disable-devices \ --disable-doc \ --disable-ffplay \ --disable-ffmpeg \ --disable-ffprobe \ --disable-ffserver \ --disable-encoders \ --disable-network \ --disable-muxers \ --disable-protocols \ --enable-protocol=file \ --prefix=armv4 \ >armv4.txt
for armv6
./configure \ --enable-memalign-hack \ --target-os=mingw32ce \ --arch=arm \ --cpu=armv6 \ --enable-cross-compile \ --cross-prefix=arm-wince-mingw32ce- \ --disable-armv5te \ --enable-small \ --disable-static \ --enable-shared \ --disable-devices \ --disable-doc \ --disable-ffplay \ --disable-ffmpeg \ --disable-ffprobe \ --disable-ffserver \ --disable-encoders \ --disable-network \ --disable-muxers \ --disable-protocols \ --enable-protocol=file \ --prefix=armv6 \ >armv6.txt
编译问题:
1.将bx lr 替换成
#if defined(__ARM_ARCH_2__) || defined(__ARM_ARCH_3__) || defined(__ARM_ARCH_3M__) || defined(__ARM_ARCH_4__) mov pc, lr #else bx lr #endif
软件问题:
1.对应armv6版本,很多汇编指令均抛出异常,在wince 6.0系统中ldr、str系列指令均不支持非对齐访问
修改办法参考:
static av_always_inline uint16_t AV_RN16(const void *p) { uint16_t v; //__asm__ ("ldrh %0, %1" : "=r"(v) : "m"(*(const uint16_t *)p)); __asm__ ("ldrb %0, %2 \n\t" "ldrb %1, %3 \n\t" : "=&r"(*(uint8_t*)(&v)),"=&r"(*((uint8_t*)&v+1)) : "m"(*(const uint8_t*)p), "m"(*((const uint8_t*)p+1))); return v; }
usat、ssat等armv6指令也会抛出异常,需要修改。
wince 6.0 OS没有使用armv6架构的指令,只能运行于armv4指令系统。armv6兼容armv4指令。
2. ffmpeg 0.6 for armv4版本,对asf文件头不是总能正确解析,弄错性差,0.8版本相比0.6版本有很大的提高,对使用ffmpeg做流媒体程序,最好选择0.8版本。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有