HW Video Acceleration in Chrome/Chromium HTML5 video 视频播放硬件加速
Introduction
Video decode (e.g. YouTube playback) and encode (e.g. video
chat applications) are some of the most complex compute operations on the modern web. Moving these operations from software running on general-purpose CPUs to dedicated hardware blocks means lower power consumption, longer battery life, higher quality (e.g.
HD instead of SD), and better interactive performance as the CPU is freed up to work on everything else it needs to do.
Design
media::VideoDecodeAccelerator
(VDA) and media::VideoEncodeAccelerator
(VEA) (with their respective Client subclasses) are the interfaces at the center of all video HW acceleration in Chrome. Each consumer of HW acceleration implements the relevant Client interface and calls an object of the relevant V[DE]A interface.
In general the classes that want to encode or decode video
live in the renderer process (e.g. the <video> player, or WebRTC’s video encoders & decoders) and the HW being utilized is not accessible from within the renderer process, soIPC
is used to bridge the renderer<->GPU process gap.
Implementation Details
The main consumers of the acceleration APIs are: <video> pipeline
(what plays media on the web), WebRTC (enabling plugin-free real-time video chat on the web), and Pepper API (offering HW acceleration to pepper plugins such as Adobe Flash).
The implementations of the acceleration APIs are specific to
the OS (and sometimes HW platform) due to radically different options offered by the OS and drivers/HW present.
(not pictured: obsolete OpenMAX-IL-based id=223194" style="text-decoration:none">OVDA id=133828" style="text-decoration:none">MacVDA
and never-launched
Current Status
New devices are released all the time so this list is likely
already out of date, but as of early June 2014, existing (public) support includes:
Decode
Windows: starting with Windows 7, HW accelerated decode of h.264 is used via DXVAVDA.
CrOS/Intel (everything post-Mario/Alex/ZGB): HW accelerated decode of h.264 is used via VAVDA
CrOS/ARM: HW accelerated decode of VP8 and h.264 is available via V4L2VDA
Android: HW accelerated decode of VP8 is available on N10, N5, some S4’s, and a bunch of other
devices. (note that on Android this only applies to WebRTC, as there is no PPAPI and <video> uses the platform’s player)
Encode
CrOS/ARM: HW accelerated encode of h.264 (everywhere) and VP8 (2014 devices) is available via
V4L2VEAAndroid: HW accelerated encode of VP8 is available on N5.
Results
Generally speaking offloading encode or decode from CPU to specialized HW has shown an overall battery-life extension of 10-25% depending
on the platform, workload, etc
转自
https://docs.google.com/document/d/1LUXNNv1CXkuQRj_2Qg79WUsPDLKfOUboi1IWfX2dyQE/preview#
依据Kitkat上的Chromium代码分析,HTML5 video播放硬件加速。终于是使用MediaCodec.java来利用本地native的硬件资源来做video视频播放加速的。
MediaPlayer的大致框图例如以下:
而Pipeline终于会通过GpuVideoDecoder调用到MediaCodec:
详细的时序图目前尚不清楚。同MediaPlayer作为一个起点,看Chromium该代码是真的蛮困难
HW Video Acceleration in Chrome/Chromium HTML5 video 视频播放硬件加速的更多相关文章
- Chrome/Chromium HTML5 video 视频播放硬件加速
Chromium站点上有个大致的框图.描写叙述了Chromium的video在各个平台 - 包含Android - 上是怎样使用硬件资源来做视频编解码加速的: 而依据Android Kitkat上的C ...
- HTML5 Video(视频)
HTML5 Video(视频) 很多站点都会使用到视频. HTML5 提供了展示视频的标准. 检测您的浏览器是否支持 HTML5 视频: 检测 Web站点上的视频 直到现在,仍然不存在一项旨在网页上显 ...
- HTML5: HTML5 Video(视频)
ylbtech-HTML5: HTML5 Video(视频) 1.返回顶部 1. HTML5 Video(视频) 很多站点都会使用到视频. HTML5 提供了展示视频的标准. 检测您的浏览器是否支持 ...
- Chromium Graphics: HW Video Acceleration in Chrom{e,ium}{,OS}
HW Video Acceleration in Chrom{e,ium}{,OS} Ami Fischman <fischman@chromium.org> Status as of 2 ...
- use html5 video tag with MSE for h264 live streaming
本编博客记录桌面虚拟化移动端预研. 完整demo: https://github.com/MarkRepo/wfs.js 常见的直播方案有RTMP RTSP HLS 等等, 由于这些流都需要先传输到服 ...
- 网页视频不能自动播放?HTML5 video报错Uncaught (in promise) DOMException解决方法
话说发哥四年前写了一个网页,如上图效果,实际网址http://pano.z01.com ,话说做好时是正常的,突然某一天,客户说你这个网站动画不见了,这是什么原因? 结果检查脚本一切正常. 其实也不是 ...
- HTML5 <video> - 使用 DOM 进行控制
HTML5 <video> 元素同样拥有方法.属性和事件. 其中的方法用于播放.暂停以及加载等.其中的属性(比如时长.音量等)可以被读取或设置.其中的 DOM 事件能够通知您,比方说,&l ...
- 有关HTML5 Video对象的ontimeupdate事件的问题
日前在做一个视频播放的页面,其中用到了HTML5的Video对象,这个是HTML5中新增的一个对象,支持多种不同格式的视频在线播放,功能比较强大,而且还扩展了许多事件,可以通过JavaScript脚本 ...
- 移动端HTML5<video>视频播放优化实践
遇到的挑战 移动端HTML5使用原生<video>标签播放视频,要做到两个基本原则,速度快和体验佳,先来分析一下这两个问题. 下载速度 以一个8s短视频为例,wifi环境下提供的高清视频达 ...
随机推荐
- hdu1730 Northcott Game,Nim-sum
题解: 转化成求Nim-sum 每行黑白棋的初始间距作为每堆石子个数 假设当前为P态,则无论当前选手如何操作,下一个选手都能使其操作后的局面又变为P态. Nim-sum = 0,即P态. #inclu ...
- SQL查询重复记录、删除重复记录方法
查找所有重复标题的记录:SELECT * FROM t_info a WHERE ((SELECT COUNT(*) FROM t_info WHERE Title = a.Title) > 1 ...
- TOMCAT的域名配置
链接地址:http://blog.163.com/skk1987@126/blog/static/29303413201051383548377/ 现在很多的公司的网站都是用tomcat作为应用服务区 ...
- DP HDIJ1421 搬宿舍
Problem Description 搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆, ...
- django局域网建一个网站
之前总是运行的python manage.py runserver,用默认的在本机访问的127.0.0.1:8000,如果跟几个同学一起去开发一个网站来玩玩的话,可以这样: python manage ...
- BIRT使用2:安装、一般使用顺序
上篇博客介绍的关于的birt的一些概念和设计器等知识,这篇博客介绍一下安装和一般使用顺序. 安装:安装分为两种,一种是下载已经安装好birt的eclipseIDE环境,配置环境变量之后即可使用,具体方 ...
- SAP 标准单价、移动单价在 AP 中的影响--(详细)
今天我将向大家介绍下SAP中两种单价模式在系统中所产生的影响,先主要讲讲在AP中影响,它主要有两个方面产生影响(物料收货migo,发票校验miro). 演示背景(假设以下都为本位币交易): 库存(单价 ...
- Android-x86 4.4-r5 发布,PC 上的安卓系统
Android x86 即运行于 x86 PC上的Android操作系统,目前已经支持大部分安卓程序. Android X86平台是由Beyounn和Cwhuang主持设计的.项目的主要目的在于为X8 ...
- 终于懂了:WM_PAINT中应该用BeginPaint与EndPaint这两个api,它们的功能正是使无效区域恢复(所以WM_PAINT里即使什么都不做,也必须写上BeginPaint与EndPaint)——Delphi里WM_PAINT消息的三个走向都做到了这一点 good
程序本来是想实现鼠标单击改变背景颜色.可是,程序运行时,为什么没有任何消息触发,背景颜色就一直不断的改变了?WM_PAINT怎么被触发的 #include <windows.h> #inc ...
- 基于visual Studio2013解决面试题之1405归并排序
题目