libyuv编译(各平台)【转】
转自:http://blog.csdn.net/wszawsz33/article/details/51669719
版权声明:本文为博主原创文章,未经博主允许不得转载。
最近用到视频格式转码,发现谷歌的开源库 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
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
苹果AI秀——Core ML强势来袭
前言 最近WWDC2017刚刚过去两周,作为iOS客户端开发的我,看到了苹果高逼格的Core ML,决定花两天研究研究。 其实机器学习在移动端应用已经有了一定的支持了,Caffe2 已经支持iOS、Android移动端上的应了,但今年iOS11中的Core ML将大大降低了机器学习的门槛。因此,写一篇自己的学习笔记,以及分享下关于深度学习相关的理解,如有不足之处,还请大家多多指正。 Core ML简介 iOS 11的Core ML 大大降低了开发者在苹果设备上使用机器学习技术预测模型的门槛和成本。苹果制定了自己的模型文件格式,统一的格式和全新的 API 设计使得 Core ML 支持苹果生态下多个平台。Core ML 的核心是加速在 iPhone、iPad、Apple Watch 上的人工智能任务,支持深度神经网络、循环神经网络、卷积神经网络、支持向量机、树集成、线性模型等 demo演示 示例在模拟器上运行,读取相册图片,使用Core ML 进行图像识别 可以将经过Caffe框架训练后生成的 .caffemodel 使用coremltools转换工具转成 .mlmodel文件.只需要给...
- 下一篇
再看知名应用背后的第三方开源项目【转】
转自http://blog.csdn.net/guojin08/article/details/42222637 http://www.cocoachina.com/iOS/20141017/9955.html iOS第三方开源库的吐槽和备忘》中作者ibireme列举了国内多款知名应用所使用的开源框架并对其中一些框架进行了分析同样国外开发者@iOSCowboy也在博客中给我们列出了国外多款知名应用使用的开源框架。另外txx's blog中详细介绍了Facebook Paper使用的第三方库。 AFNetworking :适用于iOS和OS X的网络框架。 Appirater: 提醒用户打分。 ASIHTTPRequest简单使用CFNetwork API封装进行HTTP网络请求用Objective-C编写可应用在Mac OSX和iOS开发中。 CocoaHTTPServer: 用于Mac OS X和iOS应用程序的轻量级、可嵌入的HTTP服务器框架。 Cocoa Lumberjack:适用于Mac和iOS的日志框架集简单、快速、强大以及灵活于一身。 MBProgressHUD:用多种...
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
-
Docker使用Oracle官方镜像安装(12C,18C,19C)
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- CentOS8编译安装MySQL8.0.19
- Docker快速安装Oracle11G,搭建oracle11g学习环境
- SpringBoot2配置默认Tomcat设置,开启更多高级功能
- MySQL8.0.19开启GTID主从同步CentOS8
- CentOS7,8上快速安装Gitea,搭建Git服务器
- Jdk安装(Linux,MacOS,Windows),包含三大操作系统的最全安装
- SpringBoot2编写第一个Controller,响应你的http请求并返回结果
推荐阅读
最新文章
- Docker使用Oracle官方镜像安装(12C,18C,19C)
- CentOS6,CentOS7官方镜像安装Oracle11G
- SpringBoot2整合Redis,开启缓存,提高访问速度
- Jdk安装(Linux,MacOS,Windows),包含三大操作系统的最全安装
- SpringBoot2配置默认Tomcat设置,开启更多高级功能
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- SpringBoot2整合MyBatis,连接MySql数据库做增删改查操作
- Hadoop3单机部署,实现最简伪集群
- MySQL8.0.19开启GTID主从同步CentOS8
- SpringBoot2编写第一个Controller,响应你的http请求并返回结果