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,
and never-launched

id=133828" style="text-decoration:none">MacVDA).

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
    V4L2VEA

  • Android: 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 视频播放硬件加速的更多相关文章

  1. Chrome/Chromium HTML5 video 视频播放硬件加速

    Chromium站点上有个大致的框图.描写叙述了Chromium的video在各个平台 - 包含Android - 上是怎样使用硬件资源来做视频编解码加速的: 而依据Android Kitkat上的C ...

  2. HTML5 Video(视频)

    HTML5 Video(视频) 很多站点都会使用到视频. HTML5 提供了展示视频的标准. 检测您的浏览器是否支持 HTML5 视频: 检测 Web站点上的视频 直到现在,仍然不存在一项旨在网页上显 ...

  3. HTML5: HTML5 Video(视频)

    ylbtech-HTML5: HTML5 Video(视频) 1.返回顶部 1. HTML5 Video(视频) 很多站点都会使用到视频. HTML5 提供了展示视频的标准. 检测您的浏览器是否支持 ...

  4. 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 ...

  5. use html5 video tag with MSE for h264 live streaming

    本编博客记录桌面虚拟化移动端预研. 完整demo: https://github.com/MarkRepo/wfs.js 常见的直播方案有RTMP RTSP HLS 等等, 由于这些流都需要先传输到服 ...

  6. 网页视频不能自动播放?HTML5 video报错Uncaught (in promise) DOMException解决方法

    话说发哥四年前写了一个网页,如上图效果,实际网址http://pano.z01.com ,话说做好时是正常的,突然某一天,客户说你这个网站动画不见了,这是什么原因? 结果检查脚本一切正常. 其实也不是 ...

  7. HTML5 <video> - 使用 DOM 进行控制

    HTML5 <video> 元素同样拥有方法.属性和事件. 其中的方法用于播放.暂停以及加载等.其中的属性(比如时长.音量等)可以被读取或设置.其中的 DOM 事件能够通知您,比方说,&l ...

  8. 有关HTML5 Video对象的ontimeupdate事件的问题

    日前在做一个视频播放的页面,其中用到了HTML5的Video对象,这个是HTML5中新增的一个对象,支持多种不同格式的视频在线播放,功能比较强大,而且还扩展了许多事件,可以通过JavaScript脚本 ...

  9. 移动端HTML5<video>视频播放优化实践

    遇到的挑战 移动端HTML5使用原生<video>标签播放视频,要做到两个基本原则,速度快和体验佳,先来分析一下这两个问题. 下载速度 以一个8s短视频为例,wifi环境下提供的高清视频达 ...

随机推荐

  1. 云计算与虚拟化以及IaaS, PaaS和SaaS

    概述: 包括:服务器虚拟化.桌面虚拟化.应用虚拟化: 云计算只是用到了虚拟化的技术: soa dubbo结构,阿里巴巴的开源架构: netstat -ntlp; 云服务”现在已经快成了一个家喻户晓的词 ...

  2. BZOJ 3631: [JLOI2014]松鼠的新家( 树链剖分 )

    裸树链剖分... ------------------------------------------------------------------- #include<bits/stdc++ ...

  3. awk 的逻辑运算字符

    既然有需要用到 "条件" 的类别,自然就需要一些逻辑运算啰-例如底下这些:运算单元代表意义> 大于小于>= 大于或等于小于或等于== 等于!= 不等于值得注意的是那个 ...

  4. 关于 Swift

    摘自:http://numbbbbb.gitbooks.io/-the-swift-programming-language-/chapter1/01_swift.html Swift 是一种新的编程 ...

  5. 18-UIKit(Core Animation、广播设计模式)

    目录: 一.Core Animation 二.广播设计模式 回到顶部 一.Core Animation 1.  是什么? 底层的动画框架 2.  框架对比 UIKit           UI     ...

  6. or1200构建sopc系统之软件环境搭建

    使用预先编译好的工具链 下载: ftp://ocuser:oc@195.67.9.12/toolchain/or32-elf-linux-x86.tar.bz2 解压 tar xjf or32-elf ...

  7. 【E2LSH源代码分析】p稳定分布LSH算法初探

    上一节,我们分析了LSH算法的通用框架,主要是建立索引结构和查询近似近期邻.这一小节,我们从p稳定分布LSH(p-Stable LSH)入手,逐渐深入学习LSH的精髓,进而灵活应用到解决大规模数据的检 ...

  8. android 中webview调用js

    1.android中利用webview调用网页上的js代码. Android 中可以通过webview来实现和js的交互,在程序中调用js代码,只需要将webview控件的支持js的属性设置为true ...

  9. BZOJ 3357: [Usaco2004]等差数列( dp )

    dp(x, p) 表示序列中第x个数, 上一个数是p构成的等差数列的最长. 转移时从[1, x)中枚举p = seq[] 就行了.时间复杂度O(n²logn) -------------------- ...

  10. log4net学习目录

    log4net是用来记录日志的,日志是用来帮助我们排除错误和异常的.这是我们编写软件必须要用到的东西,前面总结了一些有关日志和log4net的文章,在这整理个目录东大家参考. C#日志工具汇总 log ...