yuming li , sr application engineer, intel yi yang , sr ... · android * jellybean...

43
在英特尔 ® 架构设备上构建高性能安卓 * 应用程序 SFTS002 Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr Application Engineer, Intel Zhen Zhou , Sr Application Engineer, Intel

Upload: others

Post on 06-Mar-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

在英特尔® 架构设备上构建高性能安卓* 应用程序

SFTS002

Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr Application Engineer, Intel Zhen Zhou , Sr Application Engineer, Intel

Page 2: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

2

Agenda Item 1

议程 • 介绍针对安卓*操作系统的英特尔®系统软件

工具 • 多媒体应用程序调优 • 案例研究:密集型计算优化 • 案例研究:游戏优化

Page 3: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

3

Agenda Item 1

议程 • 介绍针对安卓*操作系统的英特尔®系统软件

工具 • 多媒体应用程序调优 • 案例研究:密集型计算优化 • 案例研究:游戏优化

Page 4: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

4

介绍针对安卓*操作系统的英特尔®系统软件工具

• 旨在帮助原始设备制造商/独立软件供应商(ISV)进行调试,并提高安卓*操作系统中本地二进制文件的性能的一组工具。

• 该工具集包括:

− 英特尔®C++编译器

− 英特尔®图形性能分析器

− 英特尔®VTune™放大器

− 其他(如英特尔®JTAG调试器)

Page 5: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

5

针对安卓*的英特尔®图形性能分析器

数据

实时图 • CPU指标 • 图形接口级指标 • 处理器图形硬件指标 • 功耗指标

安卓*智能手机 在主机系统上运行的英特尔® 图形性能分析器

USB连接

Page 6: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

6

英特尔®VTune™放大器2013 性能和功耗分析工具

• 英特尔®VTune™放大器

– 包含针对功耗和性能分析的图形用户界面

– 包含针对基于文本的功耗和性能分析的命令行

• 针对调优平台性能的基于事件采样

• 英特尔®凌动™微架构的事件(如时钟周期,缓存未命中,浮点协助等)

英特尔Vtune放大器针对运行在英特尔凌动处理器的安卓*系统进行性能和功耗分析!

Page 7: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

7

介绍针对安卓*的英特尔®编译器

• 基于针对Linux*的英特尔® C/C++编译器XE 13.0

• 高性能C/C++编译器

- 英特尔®凌动™处理器优化

- 过程间优化 (IPO)

- 配置向导优化(PGO)

- 循环向量化 -英特尔®数据流单指令多数据扩展指令集 (英特尔® SSE)

Page 8: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

8

Agenda Item 1

议程

• 介绍针对安卓*操作系统的英特尔®系统软件工具

• 多媒体应用程序调优

• 案例研究:密集型计算优化

• 案例研究:游戏优化

Page 9: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

9

Android* Jellybean 将会带来多媒体应用的革新

视频后处理成为可能

使用硬件编码器将节约大量CPU资源

硬件编码器支持 : MediaCodec

Page 10: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

10

在 Medfield平台(使用英特尔® 凌动™ 处理器Z2460 / Z2480 )上使用硬件编解码器

• 如何实现硬件编解码器:

– 可以使用MediaCodec (只有Jelly Bean支持)

– 使用OMX-IL(非Google*原生API),无法保证所有平台的兼容性,只能保证基于英特尔® 凌动™ 处理器的智能手机平台Medfield的兼容性

• 在英特尔® 凌动™ 平台Medfield上使用硬件编解码器 – 在JellyBean之前使用omx-il

(仅限英特尔® 架构)

– 在JellyBean 以及之后版本使用

MediaCodec

(Java* 代码, 平台无关性)

Khronos *版权所有, 截图来自http://www.khronos.org/openmax/il/

Page 11: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

11

Client实时添加视频水印

• 在录制中实时添加视频水印

• 可以降低服务器的转码压力

• 编码尺寸1024*576:

– 预览: 16% CPU占用率

– 软件编码: 73% CPU占用率

– 硬件编码: 27% CPU占用率

注: 不使用Android*

MediaRecorder

视频后处理 (视频水印)

Estimated Results Benchmark Disclaimer: Results have been estimated based on internal Intel analysis and are provided for informational purposes only. Any difference in system hardware or software design or configuration may affect actual performance.

Page 12: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

12

使用硬件编解码器,我们能做什么?

我们能做什么: • 视频后处理: 视频特效, 播放时的视频质量增强

• 图像识别和分析: 手势识别和跟踪

替代原有的软件编解码器

实时视频特效和视频后处理

视觉计算(手势识别,脸部识

别)

Page 13: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

13

如何平滑的过渡到硬件编解码器

• 多数开发者使用FFMPEG软件编解码器

– 使用硬件编解码器替代ffmpeg avcodec (软件编解码器)

– 硬件编解码器支持: AVC(h264), MEPG4, H263

– RMVB, VP8 无硬件编解码器

• 兼容性

– 目前只能保证英特尔® 凌动™ 嵌入式平台的兼容性

Page 14: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

14

怎样延续PC的开发经验到英特尔® 嵌入式平台

传统的PC软件优化方法任然是有效的!

Page 15: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

15

怎样复用原有的汇编代码

• Android* NDK IA编译器无法支持.asm的文件编译 – 只支持 .s 的编译, 但是pc上的代码使用的都是.asm格式汇编

– .asm 通常都包含有SIMD代码(软件加速代码),如果无法编译它将会带来巨大的性能损失

• 提供Android* ndk-r8 版本的补丁,加入了yasm (开源汇编编译器) – 开发者可以使用LOCAL_YASMFLAGS 定义一些汇编文件的宏开关

– 使用此补丁后,可以使用ndk-build编译.asm文件

• 当然大多数开源软件也可以使用交叉编译编译.asm文件

更多细节请访问: http://software.intel.com/en-us/articles/using-yasm-compiler-on-android-ndkbuild

Page 16: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

16

性能对比

性能对比

开源播放器(FFMPEG: 1. 使用 Intel® SSE和MMX™

指令集代码,包括嵌入式汇编和独立的.asm汇编文件

2. 仅仅使用嵌入式汇编

复用传统的汇编代码将获得显著的性能提升

Page 17: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

17

性能对比

• 1080P mp4 软件解码

– 使用yasm 编译汇编可以获得 149.6% 的性能提升

– 如果仅仅使用嵌入式汇编可以获得 43.8% 的性能提升

– YASM(编译.asm) ASM (编译嵌入式汇编,汇编代码在.c,.cpp中)

22761

39501

56821

0

10000

20000

30000

40000

50000

60000

enable yasmenable asm

disable yasmenable asm

disable yasmdisable asm

平均解码时间

149.6% : 56821/22761=2.496 43.8% : 56821/39501=1.438 时间单位: us

Estimated Results Benchmark Disclaimer: Results have been estimated based on internal Intel analysis and are provided for informational purposes only. Any difference in system hardware or software design or configuration may affect actual performance.

Page 18: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

18

软件优化 使用英特尔® SSE以及MMX™ 指令集

Medfield (使用英特尔® 凌动™ 处理器Z2460 / Z2480 同样支持英特尔® SSE以及MMX™ 指令集

• 指令集包括MMX ™, MMXEXT, Intel® SSE, SSE2, SSE3, SSSE3

3040*1824 NV21-rgb888 SWS_BILINEAR SWS_FAST_BILINEAR

不使用 yasm 425ms 158ms 仅使用 yasm 179ms 155ms 使用 (MMX,SSE)改写 27ms 27ms

FFMPEG swscale 不支持 NV21-RGB的软件优化 (实现NV21-RGB的SIMD 软件优化可获得 6~16x 的性能提升)

Estimated Results Benchmark Disclaimer: Results have been estimated based on internal Intel analysis and are provided for informational purposes only. Any difference in system hardware or software design or configuration may affect actual performance.

Page 19: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

19

Agenda Item 1

议程

• 介绍针对安卓*操作系统的英特尔®系统软件工具

• 多媒体应用程序调优

• 案例研究:密集型计算优化

• 案例研究:游戏优化

Page 20: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

20

介绍 针对密集型计算优化的案例研究

• 恒图* 好照片*是一个多功能的图像处理应用程序。针对安卓*

的英特尔® C++编译器被用来重新编译该应用的原生开发套件(NDK)的高动态光照渲染(HDR)功能

• 关键密集模块OpenCV*被英特尔® C++编译器重新编译,其完成性能被提高至~300% (来源请参阅下页)

• 该案例研究介绍: – 为什么性能会提高如此之多?

– 这个应用程序的热点是什么?利用英特尔C ++编译器优化的正确的方式

是什么?

– 为了让高层次的应用程序开发人员从英特尔C ++编译器中得到好处,我

们应该如何做?

– 我们如何能将英特尔C ++编译器的技术提供给在中国的独立软件供应商

(ISV),以加强软件生态系统?

Page 21: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

21

Estimated Results Benchmark Disclaimer: Results have been estimated based on internal Intel analysis and are provided for informational purposes only. Any difference in system hardware or software design or configuration may affect actual performance.

高动态光照渲染(HDR)合并性能的基准

英特尔® C++编译器使性能提高了200%以上 为什么?

0

10000

20000

30000

40000

50000

60000

70000

PR3(before Intel® C++ Compileroptimization)

PR3(after Intel® C++ Compileroptimization)

Time(ms)

Time(ms)

0

50

100

150

200

250

300

Thumbnail Merging Time(s) Completed Photo Processing &Storage Time(s)

PR3(before Intel® C++ Compileroptimization)

PR3(after Intel® C++ Compileroptimization)

P1(before Intel® C++ Compileroptimization)

P1(after Intel® C++ Compileroptimization)

Page 22: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

22

优化基准预览

• 基准测试的重点是缩略图合并和已完成的图片处理/存储(HDR处理的两个主要部分)

− 通过记录这些步骤花费的总时间,这些数据可以与其他数据进行比较

• 性能改善的可能原因包括:

− 原始版本的OpenCV*是由GNU编译器集合(GCC)编译的,它可能与IA有一些模糊的兼容性问题,但使用英特尔®C++编译器就避免了这些问题

− 自动向量化应发挥了主导作用,因为OpenCV中的定位算法(HDR的主要热点)从中受益。

Page 23: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

23

• 因为图像中的稳健特征,提取速度更快

• 函数cvExtractSURF寻找图像中的稳健特征

Estimated Results Benchmark Disclaimer: Results have been estimated based on internal Intel analysis and are provided for informational purposes only. Any difference in system hardware or software design or configuration may affect actual performance.

热点函数是什么?

02000400060008000

10000120001400016000

Total time of main function(ms)

cvExtractSURF() occupiedtime (ms)

With GCC library libopencv.so

With Intel® C++ Compilerlibrary libopencv.so

Page 24: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

24

瓶颈在于libm.so中的数学算法,进程间通信浪费了大量时间来等待。

使用英特尔® VTune™放大器来追踪libOpenCV-GCC的热点

Page 25: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

25

英特尔® 线程构建模块(TBB)发挥作用,并且limb.so中的数学算法被英特尔的数学函数库代替

使用英特尔® VTune™放大器来追踪英特尔® C++编译器中libOpenCV的热点

Page 26: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

26

使用英特尔® GPA 得到的GCC/英特尔® C++编译器版本的CPU负载

英特尔® C++编译器版本的CPU负载

GCC版本的CPU负载

使用英特尔® GPA 来分别获得英特尔® C++编译器版本和GCC版本的CPU负载。 在这里比较两个CPU线程。

Intel® Graphics Performance Analyzers (Intel® GPA)

Page 27: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

27

使用GCC编译OpenCV*的问题

- 在针对Linux*的英特尔®C/ C++编译器XE12.1中,OpenMP* 被移除

- 在OpenCV* (v2.0)中, OpenMP不再被使用

- 当使用默认的GCC编译设置时,英特尔®线程构建模块(英特尔® TBB) 没有发挥作用

- 相比较于英特尔® 的数学内核函数库(英特尔® MKL), libm.so这个数学库在进程间通信(IPC)花费大量额外的时间

Page 28: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

28

由GCC编译的OpenCV* 由英特尔® 编译的OpenCV

VS

里程碑结论

Page 29: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

29

解决问题的另一个方法:英特尔®线程构建模块

• 使用英特尔®线程构建模块(英特尔® TBB),能够开启OpenCV*并行代码

– OpenMP* 不再被使用

– 重要提示:只有 英特尔® TBB 2.2或更高版本有效

• 英特尔® TBB的选项:

– 安装了英特尔®TBB之后,如果需要的话,打开WITH_TBB选项,调整TBB包含和库的路径

– 在CMake的输出中你应该看到以下消息: USE TBB: YES

Page 30: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

30

Agenda Item 1

议程

• 介绍针对安卓*操作系统的英特尔®系统软件工具

• 多媒体应用程序调优

• 案例研究:密集型计算优化

• 案例研究:游戏优化

Page 31: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

31

为游戏撰写高性能的代码

• 案例研究:《最后的防线》*

• 寻找热点 – 通过Intel® VTune™ Amplifier数据来寻找

• 展开深入的性能分析 – 为什么性能低?

– 我们能做些什么?

• 选择多重优化技巧来应用 – 简单快速的方案——通过编译器优化

– 更富成效的方案——Intel® Streaming SIMD Extensions (Intel® SSE)

• 结论 – 新的Intel® VTune™ Amplifier数据对比

– 游戏截屏的对比

Page 32: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

32

案例研究:《最后的防线》*

版权属于WiYun*, 截屏来自http://ld.wiyun.com/

Page 33: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

33

寻找热点

在选择测试的特定场景,最低FPS大约只有30

Intel® VTune™ Amplifier 2011 for Android* 被用来查找该场景中的性能热点

在该情景中,“Matrix4f::mul”函数是第二高的性能热点(第一高的热点属于系统级,暂不讨论),该函数与矩阵乘法相关,在此将被分析和优化。

Estimated Results Benchmark Disclaimer: Results have been estimated based on internal Intel analysis and are provided for informational purposes only. Any difference in system hardware or software design or configuration may affect actual performance.

Page 34: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

34

深入的性能分析

• 为什么原先的“Matrix4f::mul”性能比较低? – 对于3D游戏来说矩阵操作无处不在

– 其中矩阵乘法非常耗时

– 如下所示,在原先的实现中,对矩阵的操作效率不高

• 可以做些什么? – 了解如何在代码中表达矩阵及其有关操作

– 应用Intel® Streaming SIMD Extensions (Intel® SSE)技术来实现矩阵操作并行化

– 学习更多的优化技巧

Page 35: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

35

出发!(1)-了解如何在代码中表达矩阵及其有关的操作

• 列主序的矩阵内存存储 • 被OpenGL*/ES所使用

• 行主序的矩阵内存存储 • 被《最后的防线》引擎

高阶代码所使用

矩阵乘法: 按照 Col-Major(列主序) 和 Row-Major(行主序)

Page 36: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

36

出发!(2)-应用Intel® Streaming SIMD Extensions (Intel® SSE)技术

矩阵操作并行化: 对于英特尔® 凌动™ 处理器, Intel® Streaming SIMD Extensions 3 (Intel® SSE3) 能够被用来加速代码

Page 37: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

37

出发!(3)- Intel® Streaming SIMD Extensions 3 (Intel® SSE3) 示例

基于《最后的防线》*的原先实现,一个Intel® SSE3 Intrinsics的版本呈现出来:

__m128 m1_row_0 = _mm_setr_ps(m1->f[m00], m1->f[m01], m1->f[m02], m1->f[m03]);

__m128 m2_row_0 = _mm_setr_ps(m2->f[m00], m2->f[m01], m2->f[m02], m2->f[m03]);

__m128 out0;

out0 = _mm_mul_ps(m2_row_0, _mm_replicate_x_ps(m1_row_0));

out0 = _mm_madd_ps(m2_row_1, _mm_replicate_y_ps(m1_row_0), out0);

out0 = _mm_madd_ps(m2_row_2, _mm_replicate_z_ps(m1_row_0), out0);

out0 = _mm_madd_ps(m2_row_3, _mm_replicate_w_ps(m1_row_0), out0);

_mm_store_ps(&this->f[0], out0);

Page 38: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

38

出发!(4)可以有更多的优化

• 重新实现矩阵实现:

– 基于OpenGL*/ES 标准,将原先的“行主序”存储格式转换为“列主序”格式

• 使用更高性能的编译器,并结合正确的编译选项

– Intel® C++ Compiler for Android*

– GCC: LOCAL_CFLAGS := -O3 -ffast-math -mtune=atom -msse3 -mfpmath=sse

– Intel® C++ Compiler: LOCAL_CFLAGS := -O3 -xSSSE3_atom -ipo -no-prec-div

• 针对GPU的优化

– 针对实时渲染的高性能shader(渲染器)的实现

– 纹理优化

Page 39: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

39

结论-性能改善

在同一测试场景中,最低FPS达到了39,获取了大约130%的性能提升!

0

10

20

30

40

The Lowest FPS in Same Scene

The Lowest FPSin Same Scene

Estimated Results Benchmark Disclaimer: Results have been estimated based on internal Intel analysis and are provided for informational purposes only. Any difference in system hardware or software design or configuration may affect actual performance.

Page 40: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

40

总结

• 英特尔® 智能手机平台(Medfield)上的多媒体硬件加速器

• 针对汇编文件的YASM模块化汇编编译器

• 使用英特尔®数据流单指令多数据扩展指令集(英特尔®SSE)和针对软件调优的MMX™指令代码

• 使用英特尔® C++编译器对OpenCV*重新编译,实现了高性能

• 使用英特尔® VTune™放大器和英特尔®图形性能分析器(英特尔®GPA)来追踪一个典型案例中的热点和瓶颈

Page 41: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

41

Legal Disclaimer INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. • A "Mission Critical Application" is any application in which failure of the Intel Product could result, directly or indirectly, in

personal injury or death. SHOULD YOU PURCHASE OR USE INTEL'S PRODUCTS FOR ANY SUCH MISSION CRITICAL APPLICATION, YOU SHALL INDEMNIFY AND HOLD INTEL AND ITS SUBSIDIARIES, SUBCONTRACTORS AND AFFILIATES, AND THE DIRECTORS, OFFICERS, AND EMPLOYEES OF EACH, HARMLESS AGAINST ALL CLAIMS COSTS, DAMAGES, AND EXPENSES AND REASONABLE ATTORNEYS' FEES ARISING OUT OF, DIRECTLY OR INDIRECTLY, ANY CLAIM OF PRODUCT LIABILITY, PERSONAL INJURY, OR DEATH ARISING IN ANY WAY OUT OF SUCH MISSION CRITICAL APPLICATION, WHETHER OR NOT INTEL OR ITS SUBCONTRACTOR WAS NEGLIGENT IN THE DESIGN, MANUFACTURE, OR WARNING OF THE INTEL PRODUCT OR ANY OF ITS PARTS.

• Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined". Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.

• The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.

• Intel product plans in this presentation do not constitute Intel plan of record product roadmaps. Please contact your Intel representative to obtain Intel's current plan of record product roadmaps.

• Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. Go to: http://www.intel.com/products/processor_number.

• Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. • Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be

obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm • Medfield and other code names featured are used internally within Intel to identify products that are in development and not yet

publicly announced for release. Customers, licensees and other third parties are not authorized by Intel to use code names in advertising, promotion or marketing of any product or services and any such use of Intel's internal code names is at the sole risk of the user

• Intel, Atom, VTune, Sponsors of Tomorrow and the Intel logo are trademarks of Intel Corporation in the United States and other countries.

• *Other names and brands may be claimed as the property of others. • Copyright ©2013 Intel Corporation.

Page 42: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

42

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804

Page 43: Yuming Li , Sr Application Engineer, Intel Yi Yang , Sr ... · Android * Jellybean 将会带来多媒体应用的革新 视频后处理成为可能 使用硬件编码器将节约大量CPU资源

43

Risk Factors The above statements and any others in this document that refer to plans and expectations for the first quarter, the year and the future are forward-looking statements that involve a number of risks and uncertainties. Words such as “anticipates,” “expects,” “intends,” “plans,” “believes,” “seeks,” “estimates,” “may,” “will,” “should” and their variations identify forward-looking statements. Statements that refer to or are based on projections, uncertain events or assumptions also identify forward-looking statements. Many factors could affect Intel’s actual results, and variances from Intel’s current expectations regarding such factors could cause actual results to differ materially from those expressed in these forward-looking statements. Intel presently considers the following to be the important factors that could cause actual results to differ materially from the company’s expectations. Demand could be different from Intel's expectations due to factors including changes in business and economic conditions; customer acceptance of Intel’s and competitors’ products; supply constraints and other disruptions affecting customers; changes in customer order patterns including order cancellations; and changes in the level of inventory at customers. Uncertainty in global economic and financial conditions poses a risk that consumers and businesses may defer purchases in response to negative financial events, which could negatively affect product demand and other related matters. Intel operates in intensely competitive industries that are characterized by a high percentage of costs that are fixed or difficult to reduce in the short term and product demand that is highly variable and difficult to forecast. Revenue and the gross margin percentage are affected by the timing of Intel product introductions and the demand for and market acceptance of Intel's products; actions taken by Intel's competitors, including product offerings and introductions, marketing programs and pricing pressures and Intel’s response to such actions; and Intel’s ability to respond quickly to technological developments and to incorporate new features into its products. The gross margin percentage could vary significantly from expectations based on capacity utilization; variations in inventory valuation, including variations related to the timing of qualifying products for sale; changes in revenue levels; segment product mix; the timing and execution of the manufacturing ramp and associated costs; start-up costs; excess or obsolete inventory; changes in unit costs; defects or disruptions in the supply of materials or resources; product manufacturing quality/yields; and impairments of long-lived assets, including manufacturing, assembly/test and intangible assets. Intel's results could be affected by adverse economic, social, political and physical/infrastructure conditions in countries where Intel, its customers or its suppliers operate, including military conflict and other security risks, natural disasters, infrastructure disruptions, health concerns and fluctuations in currency exchange rates. Expenses, particularly certain marketing and compensation expenses, as well as restructuring and asset impairment charges, vary depending on the level of demand for Intel's products and the level of revenue and profits. Intel’s results could be affected by the timing of closing of acquisitions and divestitures. Intel’s current chief executive officer plans to retire in May 2013 and the Board of Directors is working to choose a successor. The succession and transition process may have a direct and/or indirect effect on the business and operations of the company. In connection with the appointment of the new CEO, the company will seek to retain our executive management team (some of whom are being considered for the CEO position), and keep employees focused on achieving the company’s strategic goals and objectives. Intel's results could be affected by adverse effects associated with product defects and errata (deviations from published specifications), and by litigation or regulatory matters involving intellectual property, stockholder, consumer, antitrust, disclosure and other issues, such as the litigation and regulatory matters described in Intel's SEC reports. An unfavorable ruling could include monetary damages or an injunction prohibiting Intel from manufacturing or selling one or more products, precluding particular business practices, impacting Intel’s ability to design its products, or requiring other remedies such as compulsory licensing of intellectual property. A detailed discussion of these and other factors that could affect Intel’s results is included in Intel’s SEC filings, including the company’s most recent Form 10-Q, report on Form 10-K and earnings release. Rev. 1/17/13