libyuv编译(各平台)【转】
转自:http://blog.csdn.net/wszawsz33/article/details/51669719
版权声明:本文为博主原创文章,未经博主允许不得转载。
- Getting Started
- Pre-requisites
- Getting the Code
- Building the Library and Unittests
- Building the Library with make
- Building the Library with cmake
- Running Unittests
- CPU Emulator tools
- Memory tools
- Running Dr Memory memcheck for Windows
- Running UBSan
- Running Valgrind memcheck
- Running Thread Sanitizer TSan
- Running Address Sanitizer ASan
- Benchmarking
- Making a change
最近用到视频格式转码,发现谷歌的开源库 libyuv 很好用,所以记录下编译过程
直接贴 官网的编译流程
https://chromium.googlesource.com/libyuv/libyuv/+/master/docs/getting_started.md
不过我得吐槽一下,我特么就想编译个libyuv 你特么非要让我把chrome项目check 下来是几个意思。。。。如果没猜错 应该是好几个g
Getting Started
How to get and build the libyuv code.
Pre-requisites
You'll need to have depot tools installed: https://www.chromium.org/developers/how-tos/install-depot-tools Refer
to chromium instructions for each platform for other prerequisites.
说明:依赖工具,谷歌的这套东西还是比较好用的,首先要安装depottools 这点不多说,命令行就行,最重要的是在下载完成之后要有
export PATH=`pwd`/depot_tools:"$PATH" 命令使能这个工具
Getting
the Code
Create a working directory, enter it, and run:
说明:设置与同步代码,里面自带脚本,关于代码如何同步的就无需关心了。
Then you'll get a .gclient file like:
solutions = [
{ "name" : "libyuv",
"url" : "https://chromium.googlesource.com/libyuv/libyuv",
"deps_file" : "DEPS",
"managed" : True,
"custom_deps" : {
},
"safesync_url": "",
},
];
For iOS add ios'];
to your OSX .gclient and run Browse the Git reprository: https://chromium.googlesource.com/libyuv/libyuv/+/master
Android
For Android add android'];
to your Linux .gclient
solutions = [
{ "name" : "libyuv",
"url" : "https://chromium.googlesource.com/libyuv/libyuv",
"deps_file" : "DEPS",
"managed" : True,
"custom_deps" : {
},
"safesync_url": "",
},
];
target_os = ["android", "unix"];
Then run:
Caveat: Theres an error with Google Play services updates. If you get
the error “Your version of the Google Play services library is not up to
date”, run the following: cd chromium/src
./build/android/play_services/update.py download cd ../..
For Windows the gclient sync must be done from an Administrator command prompt.
The sync will generate native build files for your environment using gyp (Windows: Visual Studio, OSX: XCode, linux: make). This generation can also be forced manually: To get just the source (not buildable): git clone https://chromium.googlesource.com/libyuv/libyuv
Building the Library and Unittests
Windows
Building
with clangcl
OSX
Clang 64 bit shown. Remove clang=1
for GCC and change x64 to ia32 for 32 bit.
iOS
http://www.chromium.org/developers/how-tos/build-instructions-ios
Add to .gclient last line: target_os=['ios'];
armv7
arm64
both armv7 and arm64 (fat)
simulator
Android
https://code.google.com/p/chromium/wiki/AndroidBuildInstructions
Add to .gclient last line: target_os=['android'];
armv7
arm64
ia32
mipsel
arm32 disassembly:
arm64 disassembly:
Running tests:
Running test as benchmark:
Running test with C code:
Building
with GN
Building
Offical with GN
Linux
CentOS
On CentOS 32 bit the following work around allows a sync:
Windows
Shared Library
Modify libyuv.gyp from ‘static_library’ to ‘shared_library’, and add ‘LIBYUV_BUILDING_SHARED_LIBRARY’ to ‘defines’.
After this command follow the building the library instructions above.
If you get a compile error for atlthunk.lib on Windows, read http://www.chromium.org/developers/how-tos/build-instructions-windows
Build targets
Building
the Library with make
Linux
Building
the Library with cmake
Install cmake: http://www.cmake.org/
Default debug build:
Release build/install
Windows
8 Phone
Pre-requisite:
- Install Visual Studio 2012 and Arm to your environment.
Then:
or with Visual Studio 2013:
Windows
Shared Library
Modify libyuv.gyp from ‘static_library’ to ‘shared_library’, and add ‘LIBYUV_BUILDING_SHARED_LIBRARY’ to ‘defines’. Then run this.
After this command follow the building the library instructions above.
If you get a compile error for atlthunk.lib on Windows, read http://www.chromium.org/developers/how-tos/build-instructions-windows
64 bit Windows
ARM
Linux
export GYP_DEFINES="target_arch=arm"
export CROSSTOOL=`<path>`/arm-none-linux-gnueabi
export CXX=$CROSSTOOL-g++
export CC=$CROSSTOOL-gcc
export AR=$CROSSTOOL-ar
export AS=$CROSSTOOL-as
export RANLIB=$CROSSTOOL-ranlib
gclient runhooks
Running Unittests
Windows
OSX
Linux
Replace --gtest_filter=“*” with specific unittest to run. May include wildcards. e.g.
CPU
Emulator tools
Intel SDE (Software Development Emulator)
Pre-requisite: Install IntelSDE for Windows: http://software.intel.com/en-us/articles/intel-software-development-emulator
Then run:
Memory
tools
Running Dr Memory memcheck for Windows
Pre-requisite: Install Dr Memory for Windows and add it to your path: http://www.drmemory.org/docs/page_install_windows.html
Running
UBSan
See Chromium instructions for sanitizers: https://www.chromium.org/developers/testing/undefinedbehaviorsanitizer
Sanitizers available: TSan, MSan, ASan, UBSan, LSan
Running
Valgrind memcheck
Memory errors and race conditions can be found by running tests under special memory tools. [Valgrind] 1 is an instrumentation framework for building dynamic analysis tools. Various tests and profilers are built upon it to find memory handling errors and memory leaks, for instance.
Then run:
For more information, see http://www.chromium.org/developers/how-tos/using-valgrind
Running Thread Sanitizer (TSan)
For more info, see http://www.chromium.org/developers/how-tos/using-valgrind/threadsanitizer
Running Address Sanitizer (ASan)
For more info, see http://dev.chromium.org/developers/testing/addresssanitizer
Benchmarking
The unittests can be used to benchmark.
Windows
Linux
and Mac
Indicates 0.547 ms/frame for 1280 x 720.
Making a change
gclient sync
git checkout -b mycl -t origin/master
git pull
<edit files>
git add -u
git commit -m "my change"
git cl lint
git cl try
git cl upload -r a-reviewer@chomium.org -s
<once approved..>
git cl land
libyuv编译(各平台)【转】的更多相关文章
- IOS 之 PJSIP 笔记(一) 编译多平台支持的静态库
好久没有写博客了,这也算是我步入新工作后的第一篇技术博文吧.在进入新公司前,早就有了技术层进入下一个迭代的准备,但很多事情是意想不到的,就像我以 C# 程序员的身份面试入职的,而今却是一个全职的 IO ...
- 实战FFmpeg--编译iOS平台使用的FFmpeg库(支持arm64的FFmpeg2.6.2)
编译环境:Mac OS X 10.10.2 ,Xcode 6.3 iOS SDK 8.3 FFmpeg库的下载地址是 http://www.ffmpeg.org/releases/ . ...
- .NET程序集的编译目标平台:X86 &AnyCPU &X64
在我们测试平台上发布客户端组件,经常会碰到因为build的版本是x86还是anycpu而引起的application error的问题.借此,研究了一下X86,X64,AnyCPU的区别. 使用.ne ...
- libyuv 编译for ios
这里有编译好的库 https://bintray.com/yarr/ios/libyuv-ios# lipo -info libyuv.a Architectures in the fat file ...
- Linux下编译静态MinGW环境,编译windows平台Qt程序(使用MXE)
参考链接: MXE.>大多数程序都是在windows平台下开发的程序.windows 在现实中也是绕不过的一个系统平台,做为受过几年VC,MFC”虐待”的程序员,在做为一个程序员之前是一位Lin ...
- libyuv编译【转】
转自:http://blog.csdn.net/kl222/article/details/41309541 版权声明:本文为博主原创文章,未经博主允许不得转载. 下载代码(要FQ): git clo ...
- FFmpeg编译:mac下编译iOS平台的FFmpeg库(支持armv7, arm64, i386, x86_64)
环境:FFmpeg 3.4.6Xcode 10.3macOS 10.14.6iOS SDK 12.4 一.准备工作 1. 下载FFmpeg我这里使用的是3.4.6版本的FFmpeg,可以从FFmpeg ...
- jpeg库编译 - windows平台
一.准备: 下载最新的jpeg库源码:http://www.ijg.org/files/jpegsr9a.zip二.编译 1. 解压到指定目录 2. 打开VS2010命令行窗口(为了得到VS2010的 ...
- qt5.4.0在windows,32位下的编译, vs2010平台
假设源代码入在D:\3DFrame\qt-everywhere-opensource-src-5.4.0\qt-everywhere-opensource-src-5.4.0 1:首先从官方网站下载源 ...
随机推荐
- TouTiao开源项目 分析笔记13 最后一个订阅号的实现主页面
1.实现订阅号的基础类 1.1.本地订阅号的Bean类==>MediaChannelBean public class MediaChannelBean implements Parcelabl ...
- web在线调试
xx <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta h ...
- 什么时候会报unrecognized selector的异常?
当调用该对象上某个方法,而该对象上没有实现这个方法的时候, 可以通过“消息转发”进行解决,如果还是不行就会报unrecognized selector异常 objc是动态语言,每个方法在运行时会被动态 ...
- 【Soft-Margin Support Vector Machine】林轩田机器学习技术
Hard-Margin的约束太强了:要求必须把所有点都分开.这样就可能带来overfiiting,把noise也当成正确的样本点了. Hard-Margin有些“学习洁癖”,如何克服这种学习洁癖呢? ...
- jmeter之录制控制器与代理的使用
1. 先启动jmeter,在测试计划中添加线程组 2. 选中线程组右键添加,在配置元件中点击HTTP请求默认值 3. 选中线程组右键添加,在逻辑控制器中点击录制控制 ...
- 调整CodeIgniter错误报告级别
修改位置:CI根目录 index.php 为开发环境与生产环境定义错误报告级别 if (defined('ENVIRONMENT')) { switch (ENVIRONMENT) { case 'd ...
- 服务器tomcat配置教程
2018年上学期期末课程设计做了一个留言板,但是我需要把这个Jave Web弄到我的服务器上 首先我们可以安装jdk tomcat在启动时,会读取环境变量的信息,需要一个CATALINA_HOME 与 ...
- php设计模式 工厂模式和单例
1.单例模式//让该类在外界无法造对象//让外界可以造一个对象,做一个静态方法返回对象//在类里面通过让静态变量控制返回对象只能是一个. class cat{ public $name; privat ...
- HDU 4288 Coder ( 离散化 + 离线 + 线段树 )
这题跟ZOJ 3606的解题思路很相似. 题意:有3中操作:1.向集合中增加一个数x(1≤x≤1e9):2.从集合中删去一个数x(保证这个数存在):3.查询集合中所有位置满足i%5==3的数a[i]的 ...
- 团队项目-第七次scrum 会议
时间:11.3 时长:30分钟 地点:F楼1039教室 工作情况 团队成员 已完成任务 待完成任务 解小锐 学习cocos creator样例 修复员工招聘时bug 陈鑫 完成fire()与UI的对接 ...