一、参考资料
二、交叉编译x265
1. 下载源码
下载x265:https://www.videolan.org/developers/x265.html
Index of /pub/videolan/x265/:http://ftp.videolan.org/pub/videolan/x265/
wget http://ftp.videolan.org/pub/videolan/x265/x265_2.7.tar.gz
tar -xvzf x265_2.7.tar.gz
cd /home/yoyo/360Downloads/x265_2.7/build/arm-linux
2. 安装依赖
sudo apt-get install yasm
3. 修改 crosscompile.cmake
x265_2.7/build/arm-linux/crosscompile.cmake
。
# CMake toolchain file for cross compiling x265 for ARM arch
# This feature is only supported as experimental. Use with caution.
# Please report bugs on bitbucket
# Run cmake with: cmake -DCMAKE_TOOLCHAIN_FILE=crosscompile.cmake -G "Unix Makefiles" ../../source && ccmake ../../source
set(CROSS_COMPILE_ARM 1)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv7l)
# specify the cross compiler
set(CMAKE_C_COMPILER /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)
# specify the target environment
SET(CMAKE_FIND_ROOT_PATH /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
4. 修改 make-Makefiles.bash
#!/bin/bash
# Run this from within a bash shell
cmake -DCMAKE_INSTALL_PREFIX=/home/yoyo/360Downloads/x265_2.7/x265build/ -DCMAKE_TOOLCHAIN_FILE=crosscompile.cmake -G "Unix Makefiles" ../../source && ccmake ../../source
5. 编译安装
cd /home/yoyo/360Downloads/x265_2.7/build/arm-linux
# 修改权限
chmod +x make-Makefiles.bash
# 执行
./make-Makefiles.bash
# 编译
make -j8
# 安装
make install
执行 make-Makefiles.bash
,会弹出一个目录 ,我的配置如下:
BIN_INSTALL_DIR bin
CHECKED_BUILD OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /home/yoyo/360Downloads/x265_2.7/x265build/ (这是本人设置的安装路径,可修改为你需要的安装路径)
DETAILED_CU_STATS OFF
ENABLE_AGGRESSIVE_CHECKS OFF
ENABLE_ASSEMBLY ON
ENABLE_CLI ON
ENABLE_HDR10_PLUS OFF
ENABLE_LIBNUMA ON
ENABLE_PIC OFF
ENABLE_PPA OFF
ENABLE_SHARED ON (这里默认是开启的,生成动态库,根据需要设置)
ENABLE_TESTS OFF
ENABLE_VTUNE OFF
FSANITIZE
LIBDL /home/yoyo/360Downloads/toolchains/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/libdl.so (不要漏了这个库,根据实际路径设置)
LIB_INSTALL_DIR lib
NASM_EXECUTABLE /usr/bin/yasm (yasm文件,在本文开头第一步已经安装好了)
NO_ATOMICS OFF
NUMA_ROOT_DIR NUMA_ROOT_DIR-NOTFOUND
STATIC_LINK_CRT OFF
WARNINGS_AS_ERRORS OFF
设置完成后,按 c
继续,然后按 g
生成配置。
yoyo@yoyo:~/360Downloads/x265_2.7/build/arm-linux$ ./make-Makefiles.bash
-- cmake version 3.31.3
CMake Deprecation Warning at CMakeLists.txt:10 (cmake_policy):
The OLD behavior for policy CMP0025 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at CMakeLists.txt:16 (cmake_policy):
The OLD behavior for policy CMP0054 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Warning (dev) at CMakeLists.txt:19 (project):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:20 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
-- Cross compiling for ARM arch
-- Detected ARM target processor
CMake Warning (dev) at /home/yoyo/360Downloads/cmake-3.31.3-linux-x86_64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:441 (message):
The package name passed to `find_package_handle_standard_args` (NUMA) does
not match the name of the calling package (Numa). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindNuma.cmake:43 (find_package_handle_standard_args)
CMakeLists.txt:94 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Could NOT find NUMA (missing: NUMA_LIBRARY)
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW - Success
-- Performing Test CC_HAS_NO_NARROWING
-- Performing Test CC_HAS_NO_NARROWING - Success
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS - Success
-- Performing Test CC_HAS_FAST_MATH
-- Performing Test CC_HAS_FAST_MATH - Success
-- Performing Test CC_HAS_STACK_REALIGN
-- Performing Test CC_HAS_STACK_REALIGN - Failed
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG - Success
CMake Warning (dev) at /home/yoyo/360Downloads/cmake-3.31.3-linux-x86_64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:441 (message):
The package name passed to `find_package_handle_standard_args` (nasm) does
not match the name of the calling package (Nasm). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindNasm.cmake:23 (find_package_handle_standard_args)
CMakeLists.txt:327 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Could NOT find nasm (missing: NASM_EXECUTABLE)
-- x265 version 2.7
-- Looking for strtok_r
-- Looking for strtok_r - found
-- The ASM compiler identification is GNU
-- Found assembler: /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
-- Looking for include file getopt.h
-- Looking for include file getopt.h - found
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/yoyo/360Downloads/x265_2.7/build/arm-linux
make
编译:
yoyo@yoyo:~/360Downloads/x265_2.7/build/arm-linux$ make -j8
[ 2%] Building CXX object encoder/CMakeFiles/encoder.dir/analysis.cpp.o
[ 2%] Building CXX object common/CMakeFiles/common.dir/primitives.cpp.o
[ 3%] Building CXX object encoder/CMakeFiles/encoder.dir/search.cpp.o
[ 5%] Building CXX object common/CMakeFiles/common.dir/arm/asm-primitives.cpp.o
[ 6%] Building CXX object common/CMakeFiles/common.dir/pixel.cpp.o
[ 7%] Building CXX object common/CMakeFiles/common.dir/dct.cpp.o
[ 8%] Building CXX object common/CMakeFiles/common.dir/lowpassdct.cpp.o
[ 10%] Building CXX object encoder/CMakeFiles/encoder.dir/bitcost.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/slicetype.h:29,
from /home/yoyo/360Downloads/x265_2.7/source/common/pixel.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/cudata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/analysis.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/analysis.h:37,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/analysis.cpp:33:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h: In constructor ‘x265::MotionData::MotionData()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:96:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::MotionData’; use assignment or value-initialization instead [-Wclass-memaccess]
96 | memset(this, 0, sizeof(MotionData));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:84:8: note: ‘struct x265::MotionData’ declared here
84 | struct MotionData
| ^~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h: In constructor ‘x265::MotionData::MotionData()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:96:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::MotionData’; use assignment or value-initialization instead [-Wclass-memaccess]
96 | memset(this, 0, sizeof(MotionData));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:84:8: note: ‘struct x265::MotionData’ declared here
84 | struct MotionData
| ^~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp: In constructor ‘x265::Search::Search()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp:51:11: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::RQTData’; use assignment or value-initialization instead [-Wclass-memaccess]
51 | memset(m_rqt, 0, sizeof(m_rqt));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:63:8: note: ‘struct x265::RQTData’ declared here
63 | struct RQTData
| ^~~~~~~
[ 11%] Building CXX object encoder/CMakeFiles/encoder.dir/motion.cpp.o
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp: In member function ‘void x265::Search::predInterSearch(x265::Mode&, const x265::CUGeom&, bool, uint32_t*)’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp:2143:11: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::Search::MergeData’; use assignment or value-initialization instead [-Wclass-memaccess]
2143 | memset(&merge, 0, sizeof(merge));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:415:12: note: ‘struct x265::Search::MergeData’ declared here
415 | struct MergeData
| ^~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp: In member function ‘void x265::Search::encodeResAndCalcRdInterCU(x265::Mode&, const x265::CUGeom&)’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp:2710:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::Search::TUInfoCache’; use assignment or value-initialization instead [-Wclass-memaccess]
2710 | memset(&m_cacheTU, 0, sizeof(TUInfoCache));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/search.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:389:12: note: ‘struct x265::Search::TUInfoCache’ declared here
389 | struct TUInfoCache
| ^~~~~~~~~~~
[ 12%] Building CXX object common/CMakeFiles/common.dir/ipfilter.cpp.o
[ 13%] Building CXX object common/CMakeFiles/common.dir/intrapred.cpp.o
[ 15%] Building CXX object common/CMakeFiles/common.dir/loopfilter.cpp.o
[ 16%] Building CXX object common/CMakeFiles/common.dir/constants.cpp.o
[ 17%] Building CXX object common/CMakeFiles/common.dir/cpu.cpp.o
[ 18%] Building CXX object common/CMakeFiles/common.dir/version.cpp.o
[ 20%] Building CXX object common/CMakeFiles/common.dir/threading.cpp.o
[ 21%] Building CXX object common/CMakeFiles/common.dir/threadpool.cpp.o
[ 22%] Building CXX object common/CMakeFiles/common.dir/wavefront.cpp.o
[ 24%] Building CXX object common/CMakeFiles/common.dir/md5.cpp.o
[ 25%] Building CXX object encoder/CMakeFiles/encoder.dir/slicetype.cpp.o
[ 26%] Building CXX object encoder/CMakeFiles/encoder.dir/frameencoder.cpp.o
[ 27%] Building CXX object common/CMakeFiles/common.dir/bitstream.cpp.o
[ 29%] Building CXX object common/CMakeFiles/common.dir/yuv.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/slicetype.cpp:27:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 30%] Building CXX object common/CMakeFiles/common.dir/shortyuv.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/analysis.h:37,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h:35,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:33:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h: In constructor ‘x265::MotionData::MotionData()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:96:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::MotionData’; use assignment or value-initialization instead [-Wclass-memaccess]
96 | memset(this, 0, sizeof(MotionData));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:84:8: note: ‘struct x265::MotionData’ declared here
84 | struct MotionData
| ^~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:33:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h: In member function ‘void x265::CTURow::init(x265::Entropy&, unsigned int)’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h:108:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::FrameStats’; use assignment or value-initialization instead [-Wclass-memaccess]
108 | memset(&rowStats, 0, sizeof(rowStats));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:41:8: note: ‘struct x265::FrameStats’ declared here
41 | struct FrameStats
| ^~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp: In constructor ‘x265::FrameEncoder::FrameEncoder()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:64:11: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::RateControlEntry’; use assignment or value-initialization instead [-Wclass-memaccess]
64 | memset(&m_rce, 0, sizeof(RateControlEntry));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h:40,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:33:
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.h:66:8: note: ‘struct x265::RateControlEntry’ declared here
66 | struct RateControlEntry
| ^~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp: In member function ‘void x265::FrameEncoder::compressFrame()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:390:11: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::FrameStats’; use assignment or value-initialization instead [-Wclass-memaccess]
390 | memset(&(m_frame->m_encData->m_frameStats), 0, sizeof(m_frame->m_encData->m_frameStats));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:41:8: note: ‘struct x265::FrameStats’ declared here
41 | struct FrameStats
| ^~~~~~~~~~
[ 31%] Building CXX object common/CMakeFiles/common.dir/picyuv.cpp.o
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp: In member function ‘virtual void x265::FrameEncoder::processRowEncoder(int, x265::ThreadLocalData&)’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:1586:27: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::FrameStats’; use assignment or value-initialization instead [-Wclass-memaccess]
1586 | memset(&curRow.rowStats, 0, sizeof(curRow.rowStats));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:41:8: note: ‘struct x265::FrameStats’ declared here
41 | struct FrameStats
| ^~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:1671:31: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::FrameStats’; use assignment or value-initialization instead [-Wclass-memaccess]
1671 | memset(&stopRow.rowStats, 0, sizeof(stopRow.rowStats));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:41:8: note: ‘struct x265::FrameStats’ declared here
41 | struct FrameStats
| ^~~~~~~~~~
[ 32%] Building CXX object common/CMakeFiles/common.dir/common.cpp.o
[ 34%] Building CXX object encoder/CMakeFiles/encoder.dir/framefilter.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/picyuv.cpp:27:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/common.cpp:25:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 35%] Building CXX object common/CMakeFiles/common.dir/param.cpp.o
[ 36%] Building CXX object common/CMakeFiles/common.dir/frame.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/framefilter.cpp:27:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/analysis.h:37,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h:35,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/framefilter.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h: In constructor ‘x265::MotionData::MotionData()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:96:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::MotionData’; use assignment or value-initialization instead [-Wclass-memaccess]
96 | memset(this, 0, sizeof(MotionData));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:84:8: note: ‘struct x265::MotionData’ declared here
84 | struct MotionData
| ^~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/framefilter.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h: In member function ‘void x265::CTURow::init(x265::Entropy&, unsigned int)’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h:108:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::FrameStats’; use assignment or value-initialization instead [-Wclass-memaccess]
108 | memset(&rowStats, 0, sizeof(rowStats));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/framefilter.cpp:27:
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:41:8: note: ‘struct x265::FrameStats’ declared here
41 | struct FrameStats
| ^~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/param.cpp:26:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/common/frame.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
/home/yoyo/360Downloads/x265_2.7/source/common/frame.cpp: In constructor ‘x265::Frame::Frame()’:
/home/yoyo/360Downloads/x265_2.7/source/common/frame.cpp:47:11: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::Lowres’; use assignment or value-initialization instead [-Wclass-memaccess]
47 | memset(&m_lowres, 0, sizeof(m_lowres));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/frame.h:29,
from /home/yoyo/360Downloads/x265_2.7/source/common/frame.cpp:26:
/home/yoyo/360Downloads/x265_2.7/source/common/lowres.h:107:8: note: ‘struct x265::Lowres’ declared here
107 | struct Lowres : public ReferencePlanes
| ^~~~~~
[ 37%] Building CXX object common/CMakeFiles/common.dir/framedata.cpp.o
[ 39%] Building CXX object common/CMakeFiles/common.dir/cudata.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.cpp:24:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.cpp: In constructor ‘x265::FrameData::FrameData()’:
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.cpp:31:11: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class x265::FrameData’; use assignment or value-initialization instead [-Wclass-memaccess]
31 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.cpp:24:
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:104:7: note: ‘class x265::FrameData’ declared here
104 | class FrameData
| ^~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/common/cudata.cpp:27:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 40%] Building CXX object common/CMakeFiles/common.dir/slice.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/slice.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 41%] Building CXX object encoder/CMakeFiles/encoder.dir/level.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/level.cpp:26:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 43%] Building CXX object encoder/CMakeFiles/encoder.dir/nal.cpp.o
[ 44%] Building CXX object common/CMakeFiles/common.dir/lowres.cpp.o
[ 45%] Building CXX object encoder/CMakeFiles/encoder.dir/sei.cpp.o
[ 46%] Building CXX object common/CMakeFiles/common.dir/piclist.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/sei.cpp:26:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 48%] Building CXX object common/CMakeFiles/common.dir/predict.cpp.o
[ 49%] Building CXX object encoder/CMakeFiles/encoder.dir/sao.cpp.o
[ 50%] Building CXX object encoder/CMakeFiles/encoder.dir/entropy.cpp.o
[ 51%] Building CXX object encoder/CMakeFiles/encoder.dir/dpb.cpp.o
[ 53%] Building CXX object common/CMakeFiles/common.dir/scalinglist.cpp.o
[ 54%] Building CXX object common/CMakeFiles/common.dir/quant.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/predict.cpp:26:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/entropy.cpp:26:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/sao.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/dpb.cpp:27:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/common/quant.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 55%] Building CXX object encoder/CMakeFiles/encoder.dir/ratecontrol.cpp.o
[ 56%] Building CXX object common/CMakeFiles/common.dir/deblock.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:33:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/common/deblock.cpp:27:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 58%] Building CXX object encoder/CMakeFiles/encoder.dir/reference.cpp.o
[ 59%] Building CXX object encoder/CMakeFiles/encoder.dir/encoder.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/reference.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 60%] Building CXX object encoder/CMakeFiles/encoder.dir/api.cpp.o
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/encoder.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/analysis.h:37,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h:35,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/encoder.cpp:36:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h: In constructor ‘x265::MotionData::MotionData()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:96:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::MotionData’; use assignment or value-initialization instead [-Wclass-memaccess]
96 | memset(this, 0, sizeof(MotionData));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/search.h:84:8: note: ‘struct x265::MotionData’ declared here
84 | struct MotionData
| ^~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/encoder.cpp:36:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h: In member function ‘void x265::CTURow::init(x265::Entropy&, unsigned int)’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/frameencoder.h:108:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::FrameStats’; use assignment or value-initialization instead [-Wclass-memaccess]
108 | memset(&rowStats, 0, sizeof(rowStats));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/encoder.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:41:8: note: ‘struct x265::FrameStats’ declared here
41 | struct FrameStats
| ^~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/encoder.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/api.cpp:28:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/encoder.cpp: In member function ‘bool x265::Encoder::computeSPSRPSIndex()’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/encoder.cpp:3991:11: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::RPS’; use assignment or value-initialization instead [-Wclass-memaccess]
3991 | memset(rpsInSPS, 0, sizeof(RPS) * MAX_NUM_SHORT_TERM_RPS);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/common/framedata.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/encoder/encoder.cpp:30:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:45:8: note: ‘struct x265::RPS’ declared here
45 | struct RPS
| ^~~
[ 62%] Building CXX object encoder/CMakeFiles/encoder.dir/weightPrediction.cpp.o
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp: In member function ‘int x265::RateControl::writeRateControlFrameStats(x265::Frame*, x265::RateControlEntry*)’:
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:2833:36: warning: ‘~’ directive writing 1 byte into a region of size between 0 and 127 [-Wformat-overflow=]
2833 | sprintf(deltaPOC, "%s%d~", deltaPOC, rpsWriter->deltaPOC[i]);
| ^
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:2833:20: note: ‘sprintf’ output between 3 and 140 bytes into a destination of size 128
2833 | sprintf(deltaPOC, "%s%d~", deltaPOC, rpsWriter->deltaPOC[i]);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:2833:20: warning: ‘sprintf’ argument 3 overlaps destination object ‘deltaPOC’ [-Wrestrict]
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:2824:14: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
2824 | char deltaPOC[128];
| ^~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:2834:33: warning: ‘~’ directive writing 1 byte into a region of size between 0 and 39 [-Wformat-overflow=]
2834 | sprintf(bUsed, "%s%d~", bUsed, rpsWriter->bUsed[i]);
| ^
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:2834:20: note: ‘sprintf’ output between 3 and 42 bytes into a destination of size 40
2834 | sprintf(bUsed, "%s%d~", bUsed, rpsWriter->bUsed[i]);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:2834:20: warning: ‘sprintf’ argument 3 overlaps destination object ‘bUsed’ [-Wrestrict]
/home/yoyo/360Downloads/x265_2.7/source/encoder/ratecontrol.cpp:2825:14: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
2825 | char bUsed[40];
| ^~~~~
In file included from /home/yoyo/360Downloads/x265_2.7/source/encoder/weightPrediction.cpp:31:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h: In constructor ‘x265::SPS::SPS()’:
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:258:15: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct x265::SPS’; use assignment or value-initialization instead [-Wclass-memaccess]
258 | memset(this, 0, sizeof(*this));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/yoyo/360Downloads/x265_2.7/source/common/slice.h:206:8: note: ‘struct x265::SPS’ declared here
206 | struct SPS
| ^~~
[ 62%] Built target encoder
[ 62%] Built target common
[ 65%] Generating ssd-a.S.o
[ 65%] Generating ssd-a.S.o
[ 65%] Generating asm.S.o
[ 69%] Generating cpu-a.S.o
[ 67%] Generating asm.S.o
[ 69%] Generating blockcopy8.S.o
[ 70%] Generating blockcopy8.S.o
[ 72%] Generating dct-a.S.o
[ 73%] Generating ipfilter8.S.o
[ 74%] Generating cpu-a.S.o
[ 75%] Generating mc-a.S.o
[ 77%] Generating dct-a.S.o
[ 78%] Generating pixel-util.S.o
[ 79%] Generating sad-a.S.o
[ 81%] Generating ipfilter8.S.o
[ 82%] Generating mc-a.S.o
[ 83%] Generating pixel-util.S.o
[ 84%] Linking CXX static library libx265.a
[ 86%] Linking CXX shared library libx265.so
[ 86%] Built target x265-static
[ 87%] Built target x265-shared
[ 88%] Building CXX object CMakeFiles/cli.dir/input/input.cpp.o
[ 89%] Building CXX object CMakeFiles/cli.dir/input/y4m.cpp.o
[ 91%] Building CXX object CMakeFiles/cli.dir/input/yuv.cpp.o
[ 92%] Building CXX object CMakeFiles/cli.dir/output/output.cpp.o
[ 93%] Building CXX object CMakeFiles/cli.dir/output/raw.cpp.o
[ 94%] Building CXX object CMakeFiles/cli.dir/output/reconplay.cpp.o
[ 96%] Building CXX object CMakeFiles/cli.dir/output/y4m.cpp.o
[ 97%] Building CXX object CMakeFiles/cli.dir/output/yuv.cpp.o
[ 98%] Building CXX object CMakeFiles/cli.dir/x265.cpp.o
In file included from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/bits/stl_algo.h:61,
from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/algorithm:62,
from /home/yoyo/360Downloads/x265_2.7/source/common/common.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/x265cli.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/x265.cpp:29:
/home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/bits/stl_heap.h: In function ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >; _Distance = int; _Tp = long long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::less<long long int> >]’:
/home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/bits/stl_heap.h:223:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >’ changed in GCC 7.1
223 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
| ^~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/vector:72,
from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/queue:61,
from /home/yoyo/360Downloads/x265_2.7/source/x265.cpp:47:
/home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]’:
/home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/bits/vector.tcc:431:5: note: parameter passing for argument of type ‘std::vector<long long int, std::allocator<long long int> >::iterator’ changed in GCC 7.1
431 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
In file included from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/vector:67,
from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/queue:61,
from /home/yoyo/360Downloads/x265_2.7/source/x265.cpp:47:
/home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/bits/stl_vector.h: In function ‘int main(int, char**)’:
/home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/bits/stl_vector.h:1198:28: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >’ changed in GCC 7.1
1198 | _M_realloc_insert(end(), __x);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/bits/stl_vector.h:1198:28: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >’ changed in GCC 7.1
1198 | _M_realloc_insert(end(), __x);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
[100%] Linking CXX executable x265
[100%] Built target cli
make install
安装:
yoyo@yoyo:~/360Downloads/x265_2.7/build/arm-linux$ make install
[ 39%] Built target common
[ 62%] Built target encoder
[ 74%] Built target x265-static
[ 87%] Built target x265-shared
[100%] Built target cli
Install the project...
-- Install configuration: "Release"
-- Installing: /home/yoyo/360Downloads/x265_2.7/x265build/lib/libx265.a
-- Installing: /home/yoyo/360Downloads/x265_2.7/x265build/include/x265.h
-- Installing: /home/yoyo/360Downloads/x265_2.7/x265build/include/x265_config.h
-- Installing: /home/yoyo/360Downloads/x265_2.7/x265build/lib/libx265.so.151
-- Installing: /home/yoyo/360Downloads/x265_2.7/x265build/lib/libx265.so
-- Installing: /home/yoyo/360Downloads/x265_2.7/x265build/lib/pkgconfig/x265.pc
-- Installing: /home/yoyo/360Downloads/x265_2.7/x265build/bin/x265
-- Set non-toolchain portion of runtime path of "/home/yoyo/360Downloads/x265_2.7/x265build/bin/x265" to ""
6. 移植到开发板
将编译好的文件,拷贝到开发板。
# 拷贝 include
cp -r ./x265build/include/* /PATH/TO/arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include
# 拷贝lib
cp -r ./x265build/lib/* /PATH/TO/arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib
三、FAQ
Q:arm-linux-gnueabihf/libc/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-soft.h: No such file or directory
Linux 编译应用程序报错:fatal error: gnu/stubs-soft.h: No such file or directory
记录交叉编译时一个错误:fatal error: gnu/stubs-soft.h: No such file or directory
yoyo@yoyo:~/360Downloads/x265_2.7/build/arm-linux$ make -j8
...
[ 10%] Building CXX object common/CMakeFiles/common.dir/dct.cpp.o
In file included from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/features.h:497,
from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/arm-linux-gnueabihf/bits/os_defines.h:39,
from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/arm-linux-gnueabihf/bits/c++config.h:571,
from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/utility:68,
from /home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/11.1.0/algorithm:60,
from /home/yoyo/360Downloads/x265_2.7/source/common/common.h:28,
from /home/yoyo/360Downloads/x265_2.7/source/common/primitives.cpp:24:
/home/yoyo/360Downloads/toolchains/arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-soft.h: No such file or directory
7 | # include <gnu/stubs-soft.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
错误原因:交叉编译工具链版本与目标平台(arm cpu)不兼容。
解决方法:根据arm cpu的版本,修改 x265_2.7/source/CMakeLists.txt
。
# System architecture detection
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC) # 获取arm型号
set(X86_ALIASES x86 i386 i686 x86_64 amd64)
set(ARM_ALIASES armv6l armv7l) # 设置支持的arm型号
list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH) # 是否匹配型号
...
if(ARM AND CROSS_COMPILE_ARM)
# set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
set(ARM_ARGS -march=armv6 -mfloat-abi=hard -mfpu=neon-vfpv4 -marm -fPIC) # 修改
查看arm cpu信息:
cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 14.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
...
技术交流群
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。