SlideShare a Scribd company logo
1 of 92
视频编码原理简介

 SOHU 视频 - 转码组 - 陈钢
  gangchen@sohu-inc.com
目标

澄清视频编码的一些术语

快速纵览视频编码的世界
PAUSE   SEEK
基本术语
帧
Frame
Frame —— 视频文件的基本单位
fps 29.97 ?


              a frame
a frame
这里有三个帧
这些帧的容器是这个大铁盒子


   fps 29.97 ?
容器       container 

     &

编码       format
容器:文件格式规范

编码:压缩算法

编码器:算法实现
这是一个视频文件?
只是书架是念不到书的
没有书架也有点够呛 . . .
常用的视频容器

     ASF AVI WMV

   MP4 3GP MKV

   FLV F4V

   WebM
常用的视频编码

   MPEG-2 MPEG-4

  H.263 H.264

  Sorenson VP6

  VP8
容器 — — 切割、拼接、混音、加
     元数据、统计时长


编码 — — 去除黑边、加水印、内
     容识别、改变码率
FPS
First-Person Shooter Game( 误 ..)


  Frame Per Second
        帧率
常见帧率

   电影   ——   24
NTSC —— 30
PAL —— 25
FPS 29.97 ?
第一台电影放映机 (1900)




Dickson 1887
1959
隔行 Interlaced
     VS
逐行 Progressive
隔行 Interlaced
逐行 Progressive
广电标准:
  标清 D1-720x576
  高清 >=1280x720p
  举例: 1280x720p,
1920x1080i(FULL-HD),
1920x1080p(FULL-HD)
互联网高清起源:

            土豆网 - 黑豆 - 2008.9

            首次应用 H.264




2010.8 黑豆与土豆合并
互联网高清、超清、标清的标准:
1. 没有标准;
2. 自己说了算,三天两头变;
3. 默认规则:
标清版(或流畅版) : 240p~360p
高清版: 480p
超清版(或超高清版): 576p~720p
源画(或超超清版): 576p~1080p
@ 分辨率很重要
@ 码率很重要
终极目标:图像质量(前提:带宽允许、硬件够牛)
公司   标清 / 流畅     高清     超清
搜狐   480p        480p   576p
优酷   336p        432p   622p
奇异   360p        480p   720p
土豆   256p~360p   480p   576~720p
休息一会?
 问题?
开始编码!
1 、视频数字化
   ( AD )
计算机处理不了这玩意儿
采样 — — 时间 (x) 上的离散
Shannon 采样定理


  Fs≥2Fmax
量化 — — 幅值 (y) 上的离散
量化是信息损失的主要原因

 码率越高,量化越细
2 、编码(压缩)
基本思路,去除以下冗余,

空间冗余   ——   物理相关性
结构冗余   ——   如纹理
熵冗余    ——   编码冗余,可逆编码
动态冗余   ——   时间相关性

知识冗余 — — 已具有的先验知识
视觉冗余 — — 超出人眼能辨别的信息
I 帧、 P 帧、 B 帧
帧决策
帧内压缩
先分块
分块的利弊
和吃蛋糕是一样的
预测编码
理论基石

存储所需要的空间和序列的方差
     呈线形关系
做法

      x = f(x-1 ) + z

   x ——      原序列
    f ——    预测算法
   z ——     误差序列

z 的方差小于 x 的方差,成功!
到此为止,预测编码是无损的
差分脉冲编码调制方法
  ( DPCM )

无损预测压缩 + 量化器
三种典型的量化引起噪音

   1) 斜率过载
   2) 颗粒噪音
  3) 伪轮廓图像
自适应差分脉冲编码调制方法
    ( ADPCM )

  DPCM + 多预测器
目前最酷的量化算法:

  聚类分析
变换编码
理论基石

傅立叶级数展开定理:
只要收敛,就可以展开
4
u= sin t
  π
4       1
u= (sin t+ sin3t )
  π       3
4       1       1
u= (sin t+ sin3t + sin5t )
  π       3       5
4       1       1       1
u= (sin t+ sin3t + sin5t + sin7t )
  π       3       5       7
4       1       1       1       1
u= (sin t+ sin3t + sin5t + sin7t + sin9t )
  π       3       5       7       9




        4       1       1       1
u ( t )= (sin t+ sin3t + sin5t + sin7t +⋯)
        π       3       5       7
                             (−π<t<π,t ≠0)
时域   频域
三种变换方法


1 )FFT 快速傅立叶变换
 2)D CT 离散余弦变换
    3)HT 哈达玛变换
比特分配

区域编码 —— 有最大方差的系数携带着图
       像的大部分信息
阈值编码 —— 值最大的变换系数对重建子
     函数的质量贡献最大
滤波器

1 ) 高通
2) 低通
3) 中值
帧间压缩
效率极高

256 级灰度,超 6 级只有 8%
预测估计

    1 、单、双向
2 、实时编码不使用双向
运动估计

 各种搜索方法
要注意块效应补偿
熵编码

CBABC
编码完成!
就是这样啦!
  问题?
谢谢
休息一会?
 问题?
先进的 H.264 编码
历史


1 、属于 M PEG 家族
2 、 I SO/I EC 组织 2003 年第一版
3 、在文档 I SO/I EC 1 4496 中描述
4 、 2004 、 2007 、 2009 大规模修
缮
5 、最新版 201 0 年 3 月
专利问题


1 、专利由专利组织占有
2 、微软和 Adobe 占有大量股份
3 、互联网终端还可免费使用还有 5
年 4 、有可能再次续期
技术特性一

1 、真正有效的 B 帧
2 、更多可划分的块尺寸
3 、更好的运动补偿
4 、内置反块效应处理
5 、无损编码支持
技术特性二

1 、多设备支持
2 、被多种视频容器支持
3 、高清编码表现由佳
Profile

1 、就是特性集合
2 、共有 1 7 个 Profile 来适应不同环境
3 、 Ba seline — — 解码器简单
4 、 M a — — B 帧、 P 帧权重
        in
5 、 High — — 8x8dct
6 、 Stereo High — — 3D 影片
Level

1 、 1 < level < 5.1
2 、每秒宏块数、每帧宏块数
3 、码率
4 、帧率和分辨率
H.264 最好的开源软件实现

        X264


     1 、没有实现全部特性;
2 、 2009 初超越所有收费软件实现
就是这样啦!
  问题?
谢谢
视频编码原理简介Sohu版
视频编码原理简介Sohu版

More Related Content

Viewers also liked

Family Resource Guide
Family  Resource  GuideFamily  Resource  Guide
Family Resource GuideUSSOCOM
 
Impact of counterfeits on electronics companies
Impact of counterfeits on electronics companiesImpact of counterfeits on electronics companies
Impact of counterfeits on electronics companiesNEW Momentum
 
Shane test 1
Shane test 1Shane test 1
Shane test 1Adam
 
Managing the Multigenerational Library
Managing the Multigenerational LibraryManaging the Multigenerational Library
Managing the Multigenerational LibraryColleen Harris
 
码率选择之殇
码率选择之殇码率选择之殇
码率选择之殇pluschen
 
Mapping, Managing and Improving Staff performance in Access Services
Mapping, Managing and Improving Staff performance in Access ServicesMapping, Managing and Improving Staff performance in Access Services
Mapping, Managing and Improving Staff performance in Access ServicesColleen Harris
 
Tech&Innovation: Commons
Tech&Innovation: CommonsTech&Innovation: Commons
Tech&Innovation: CommonsColleen Harris
 
Impact of counterfeits on electronics companies
Impact of counterfeits on electronics companiesImpact of counterfeits on electronics companies
Impact of counterfeits on electronics companiesNEW Momentum
 
Disney Effects: Building web/mobile castle in OpenGL 2D & 3D
Disney Effects: Building web/mobile castle in OpenGL 2D & 3DDisney Effects: Building web/mobile castle in OpenGL 2D & 3D
Disney Effects: Building web/mobile castle in OpenGL 2D & 3DSVWB
 
Iterative methods for the solution of systems of linear equations
Iterative methods for the solution of systems of linear equationsIterative methods for the solution of systems of linear equations
Iterative methods for the solution of systems of linear equationsNORAIMA
 

Viewers also liked (20)

Open data in France - fossa2011
Open data in France - fossa2011Open data in France - fossa2011
Open data in France - fossa2011
 
Brand Protection
Brand Protection Brand Protection
Brand Protection
 
Family Resource Guide
Family  Resource  GuideFamily  Resource  Guide
Family Resource Guide
 
Impact of counterfeits on electronics companies
Impact of counterfeits on electronics companiesImpact of counterfeits on electronics companies
Impact of counterfeits on electronics companies
 
Shane test 1
Shane test 1Shane test 1
Shane test 1
 
Cloud iaa s-labs- ubuntu canonical- fossa2010
Cloud iaa s-labs- ubuntu canonical- fossa2010Cloud iaa s-labs- ubuntu canonical- fossa2010
Cloud iaa s-labs- ubuntu canonical- fossa2010
 
Managing the Multigenerational Library
Managing the Multigenerational LibraryManaging the Multigenerational Library
Managing the Multigenerational Library
 
Eclipse community management - fossa2010
Eclipse community management - fossa2010Eclipse community management - fossa2010
Eclipse community management - fossa2010
 
Annual Report AJI 2009 : Press in the Midst of Crisis and Threat
Annual Report AJI 2009 :  Press in the Midst of Crisis and ThreatAnnual Report AJI 2009 :  Press in the Midst of Crisis and Threat
Annual Report AJI 2009 : Press in the Midst of Crisis and Threat
 
Cloudbees -Open Source Versus Business - nicolas de loof - fossa2011
Cloudbees -Open Source Versus Business - nicolas de loof - fossa2011Cloudbees -Open Source Versus Business - nicolas de loof - fossa2011
Cloudbees -Open Source Versus Business - nicolas de loof - fossa2011
 
CloudSpurt customer
CloudSpurt customerCloudSpurt customer
CloudSpurt customer
 
码率选择之殇
码率选择之殇码率选择之殇
码率选择之殇
 
Alcohoal
AlcohoalAlcohoal
Alcohoal
 
Mapping, Managing and Improving Staff performance in Access Services
Mapping, Managing and Improving Staff performance in Access ServicesMapping, Managing and Improving Staff performance in Access Services
Mapping, Managing and Improving Staff performance in Access Services
 
Tech&Innovation: Commons
Tech&Innovation: CommonsTech&Innovation: Commons
Tech&Innovation: Commons
 
Laporan Tahunan AJI 2008
Laporan Tahunan AJI 2008Laporan Tahunan AJI 2008
Laporan Tahunan AJI 2008
 
Innovation & Massive data
Innovation & Massive dataInnovation & Massive data
Innovation & Massive data
 
Impact of counterfeits on electronics companies
Impact of counterfeits on electronics companiesImpact of counterfeits on electronics companies
Impact of counterfeits on electronics companies
 
Disney Effects: Building web/mobile castle in OpenGL 2D & 3D
Disney Effects: Building web/mobile castle in OpenGL 2D & 3DDisney Effects: Building web/mobile castle in OpenGL 2D & 3D
Disney Effects: Building web/mobile castle in OpenGL 2D & 3D
 
Iterative methods for the solution of systems of linear equations
Iterative methods for the solution of systems of linear equationsIterative methods for the solution of systems of linear equations
Iterative methods for the solution of systems of linear equations
 

Similar to 视频编码原理简介Sohu版

R 語言教學: 探索性資料分析與文字探勘初探
R 語言教學: 探索性資料分析與文字探勘初探R 語言教學: 探索性資料分析與文字探勘初探
R 語言教學: 探索性資料分析與文字探勘初探Sean Yu
 
uRock @ SITCON 2015
uRock @ SITCON 2015uRock @ SITCON 2015
uRock @ SITCON 2015宗凡 楊
 
嵌入式作業系統設計與實作 - 電吉他調音器
嵌入式作業系統設計與實作 - 電吉他調音器嵌入式作業系統設計與實作 - 電吉他調音器
嵌入式作業系統設計與實作 - 電吉他調音器聖文 鄭
 
我对后端优化的一点想法
我对后端优化的一点想法我对后端优化的一点想法
我对后端优化的一点想法mysqlops
 
搜狐Pv insight(py)技术交流
搜狐Pv insight(py)技术交流搜狐Pv insight(py)技术交流
搜狐Pv insight(py)技术交流jondynet
 
Go语言: 互联网时代的C
Go语言: 互联网时代的CGo语言: 互联网时代的C
Go语言: 互联网时代的CGoogol Lee
 
基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计Hengyi
 
Treelink比赛分享
Treelink比赛分享Treelink比赛分享
Treelink比赛分享failno
 
A True Story of Tanenbaum's Protocol Simulator
A True Story of Tanenbaum's Protocol SimulatorA True Story of Tanenbaum's Protocol Simulator
A True Story of Tanenbaum's Protocol Simulatoronesuper
 
微博实时搜索
微博实时搜索微博实时搜索
微博实时搜索亚军 汪
 
快快樂樂SIMD
快快樂樂SIMD快快樂樂SIMD
快快樂樂SIMDWei-Ta Wang
 
SACC2015 ”互联网+“任重而道远-白金&高春辉
SACC2015 ”互联网+“任重而道远-白金&高春辉SACC2015 ”互联网+“任重而道远-白金&高春辉
SACC2015 ”互联网+“任重而道远-白金&高春辉ptcracker
 
How to transfer the paper to the box ?
How to transfer the paper to the box ?How to transfer the paper to the box ?
How to transfer the paper to the box ?Deloitte Consulting
 
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师Enlight Chen
 
Taobao海量图片存储与cdn系统 v2-系统架构师
Taobao海量图片存储与cdn系统 v2-系统架构师Taobao海量图片存储与cdn系统 v2-系统架构师
Taobao海量图片存储与cdn系统 v2-系统架构师Wensong Zhang
 
Erlang Optimize
Erlang OptimizeErlang Optimize
Erlang OptimizeFeng Yu
 
數位出版2.0 it
數位出版2.0 it數位出版2.0 it
數位出版2.0 it志賢 黃
 

Similar to 视频编码原理简介Sohu版 (20)

多媒體2010
多媒體2010多媒體2010
多媒體2010
 
R 語言教學: 探索性資料分析與文字探勘初探
R 語言教學: 探索性資料分析與文字探勘初探R 語言教學: 探索性資料分析與文字探勘初探
R 語言教學: 探索性資料分析與文字探勘初探
 
uRock @ SITCON 2015
uRock @ SITCON 2015uRock @ SITCON 2015
uRock @ SITCON 2015
 
嵌入式作業系統設計與實作 - 電吉他調音器
嵌入式作業系統設計與實作 - 電吉他調音器嵌入式作業系統設計與實作 - 電吉他調音器
嵌入式作業系統設計與實作 - 電吉他調音器
 
我对后端优化的一点想法
我对后端优化的一点想法我对后端优化的一点想法
我对后端优化的一点想法
 
搜狐Pv insight(py)技术交流
搜狐Pv insight(py)技术交流搜狐Pv insight(py)技术交流
搜狐Pv insight(py)技术交流
 
Dash 介紹
Dash 介紹Dash 介紹
Dash 介紹
 
Go语言: 互联网时代的C
Go语言: 互联网时代的CGo语言: 互联网时代的C
Go语言: 互联网时代的C
 
基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计
 
Treelink比赛分享
Treelink比赛分享Treelink比赛分享
Treelink比赛分享
 
A True Story of Tanenbaum's Protocol Simulator
A True Story of Tanenbaum's Protocol SimulatorA True Story of Tanenbaum's Protocol Simulator
A True Story of Tanenbaum's Protocol Simulator
 
微博实时搜索
微博实时搜索微博实时搜索
微博实时搜索
 
快快樂樂SIMD
快快樂樂SIMD快快樂樂SIMD
快快樂樂SIMD
 
SACC2015 ”互联网+“任重而道远-白金&高春辉
SACC2015 ”互联网+“任重而道远-白金&高春辉SACC2015 ”互联网+“任重而道远-白金&高春辉
SACC2015 ”互联网+“任重而道远-白金&高春辉
 
2016 nas 年會簡報
2016 nas 年會簡報2016 nas 年會簡報
2016 nas 年會簡報
 
How to transfer the paper to the box ?
How to transfer the paper to the box ?How to transfer the paper to the box ?
How to transfer the paper to the box ?
 
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
 
Taobao海量图片存储与cdn系统 v2-系统架构师
Taobao海量图片存储与cdn系统 v2-系统架构师Taobao海量图片存储与cdn系统 v2-系统架构师
Taobao海量图片存储与cdn系统 v2-系统架构师
 
Erlang Optimize
Erlang OptimizeErlang Optimize
Erlang Optimize
 
數位出版2.0 it
數位出版2.0 it數位出版2.0 it
數位出版2.0 it
 

More from pluschen

密码学 & DRM & sgx
密码学 & DRM & sgx密码学 & DRM & sgx
密码学 & DRM & sgxpluschen
 
版本管理的四种工作模式
版本管理的四种工作模式版本管理的四种工作模式
版本管理的四种工作模式pluschen
 
easy elliptic curve(椭圆曲线算法解释)
easy elliptic curve(椭圆曲线算法解释)easy elliptic curve(椭圆曲线算法解释)
easy elliptic curve(椭圆曲线算法解释)pluschen
 
搜索引擎原理略览
搜索引擎原理略览搜索引擎原理略览
搜索引擎原理略览pluschen
 
分布式的七个场景
分布式的七个场景分布式的七个场景
分布式的七个场景pluschen
 
哲学问题的科学解
哲学问题的科学解哲学问题的科学解
哲学问题的科学解pluschen
 
BeijingUbuntuHackathon作品发表
BeijingUbuntuHackathon作品发表BeijingUbuntuHackathon作品发表
BeijingUbuntuHackathon作品发表pluschen
 
产品经理入门
产品经理入门产品经理入门
产品经理入门pluschen
 
编程的糖果
编程的糖果编程的糖果
编程的糖果pluschen
 
视频点播直播新混跑架构
视频点播直播新混跑架构视频点播直播新混跑架构
视频点播直播新混跑架构pluschen
 
分布式和文件系统
分布式和文件系统分布式和文件系统
分布式和文件系统pluschen
 
GPU和视频编解码
GPU和视频编解码GPU和视频编解码
GPU和视频编解码pluschen
 
走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Step走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Steppluschen
 
Colonel转码集群
Colonel转码集群Colonel转码集群
Colonel转码集群pluschen
 
Colonel——视频转码集群程序
Colonel——视频转码集群程序Colonel——视频转码集群程序
Colonel——视频转码集群程序pluschen
 

More from pluschen (16)

密码学 & DRM & sgx
密码学 & DRM & sgx密码学 & DRM & sgx
密码学 & DRM & sgx
 
版本管理的四种工作模式
版本管理的四种工作模式版本管理的四种工作模式
版本管理的四种工作模式
 
easy elliptic curve(椭圆曲线算法解释)
easy elliptic curve(椭圆曲线算法解释)easy elliptic curve(椭圆曲线算法解释)
easy elliptic curve(椭圆曲线算法解释)
 
搜索引擎原理略览
搜索引擎原理略览搜索引擎原理略览
搜索引擎原理略览
 
分布式的七个场景
分布式的七个场景分布式的七个场景
分布式的七个场景
 
哲学问题的科学解
哲学问题的科学解哲学问题的科学解
哲学问题的科学解
 
BeijingUbuntuHackathon作品发表
BeijingUbuntuHackathon作品发表BeijingUbuntuHackathon作品发表
BeijingUbuntuHackathon作品发表
 
产品经理入门
产品经理入门产品经理入门
产品经理入门
 
编程的糖果
编程的糖果编程的糖果
编程的糖果
 
视频点播直播新混跑架构
视频点播直播新混跑架构视频点播直播新混跑架构
视频点播直播新混跑架构
 
分布式和文件系统
分布式和文件系统分布式和文件系统
分布式和文件系统
 
GPU和视频编解码
GPU和视频编解码GPU和视频编解码
GPU和视频编解码
 
走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Step走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Step
 
Colonel转码集群
Colonel转码集群Colonel转码集群
Colonel转码集群
 
Colonel——视频转码集群程序
Colonel——视频转码集群程序Colonel——视频转码集群程序
Colonel——视频转码集群程序
 
Perl 4 sa
Perl 4 saPerl 4 sa
Perl 4 sa
 

视频编码原理简介Sohu版

Editor's Notes

  1. Never The Same Color Perfect At Last
  2. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  3. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  4. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  5. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  6. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  7. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  8. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  9. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  10. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  11. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  12. 巴西使用的 M 广播格式为 525 线, 29.97 帧
  13. 1 、更容易吃下口; 2 、可以几个人一起吃; 3 、但是会损失蛋糕渣