海思Hi3536交叉编译x264库

一、交叉编译x264库

到https://www.videolan.org/developers/x264.html下载源代码。

配置生成Makefile,默认是开启NEON的

./configure --prefix=`pwd`/_inatall --host=arm-hisiv400-linux --cross-prefix=arm-hisiv400-linux- --enable-static --bit-depth=8

可以看到config.mak:

default@default:~/work/other/x264-master$ cat config.mak 
SRCPATH=.
prefix=/home/default/work/other/x264-master/_inatall
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
libdir=${exec_prefix}/lib
includedir=${prefix}/include
SYS_ARCH=ARM
SYS=LINUX
CC=arm-hisiv400-linux-gcc
CFLAGS=-Wno-maybe-uninitialized -Wshadow -O3 -ffast-math  -Wall -I. -I$(SRCPATH) -std=gnu99 -D_GNU_SOURCE -mcpu=cortex-a8 -mfpu=neon -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
CFLAGSSO= -DX264_API_EXPORTS
CFLAGSCLI=
COMPILER=GNU
COMPILER_STYLE=GNU
DEPMM=-MM -g0
DEPMT=-MT
LD=arm-hisiv400-linux-gcc -o 
LDFLAGS= -lm -lpthread -lrt -ldl
LDFLAGSCLI=-ldl 
LIBX264=libx264.a
CLI_LIBX264=$(LIBX264)
AR=arm-hisiv400-linux-ar rc 
RANLIB=arm-hisiv400-linux-ranlib
STRIP=arm-hisiv400-linux-strip
INSTALL=install
AS=arm-hisiv400-linux-gcc
ASFLAGS= -I. -I$(SRCPATH) -c -DSTACK_ALIGNMENT=4
RC=
RCFLAGS=
EXE=
HAVE_GETOPT_LONG=1
DEVNULL=/dev/null
PROF_GEN_CC=-fprofile-generate
PROF_GEN_LD=-fprofile-generate
PROF_USE_CC=-fprofile-use
PROF_USE_LD=-fprofile-use
HAVE_OPENCL=yes
CC_O=-o $@
default: cli
install: install-cli
default: lib-static
install: install-lib-static

最后,make && make install

生成_install目录和库

二、编写demo测试

VI (yuv422)-> X264->file

三、使用Hi3536 gpu加速

你可能感兴趣的:(x264,海思,海思视频处理器)