天天看点

海思Hi3559A编译x264

1、交叉编译工具

aarch64-himix100-linux-gcc

2、下载x264源码

 # git clone git://git.videolan.org/x264.git

3、编译 

  • 配置选项  ./configure --enable-pthread --enable-static --disable-shared --host=arm-linux --disable-asm
  • 修改config.mak

                      添加一个新变量名HITOOLS,正常编译为空即可直接使用gcc

          HITOOLS=aarch64-himix100-linux-

                      CC=${HITOOLS}gcc

                      LD=${HITOOLS}gcc -o 

                      AR=${HITOOLS}ar rc 

                      RANLIB=${HITOOLS}ranlib

                      STRIP=${HITOOLS}strip

  • make;make install 

4、编译问题:

  • 编译找不到:X264_VERSION

       解决方法:由于该定义没有在x264_config.h中,可以使用脚本version.sh >>x264_config.h即可。

继续阅读