ISO 14496-10(视频)-Advanced Video Coding(AVC) 简明介绍

本文详细介绍了AVC/H.264技术,包括多种Profile(如最低Profile、主要Profile等)、编/解码器功能改进(如CAVLC/CABAC、Loop/DeblockingFilter等)、存在的问题及未来趋势。
作者:bond     译者:dgwxx(译)    来源:Dreamland

  译者序
一 直以来都没有找到一个较全面的AVC 介绍。于是,译者就将DOOM9 论坛上的bond大人发表的《MPEG-4 Information》中的AVC 介绍的部分翻译出来,提供给和我一样想了解这方面知识的朋友。《MPEG-4 Information》中关于AVC 的介绍包含6 个部分,分别是AVC/H.264 Profiles、编/解码器简介、SAMPLE 简介、AVC 当前的问题、AVC 相关硬件设备、更多文档链接。其中编/解码器部分、SAMPLE 简介和硬件介绍译者没有翻译。因为编/解码器在nemolus 大大写的《AVC/H.264/AAC 专题 - 软件篇》中有更详细的介绍,SAMPLE 简介都是图片,字不多,而且译者看内容也不是很重要,于是就偷懒没有翻~呵呵~想看这三部分的朋友直接阅读原文即可。

由于译者也是刚刚接触AVC,再加上英语水平有限,所以翻译出来的东西可能不能准确表达作者的原意,甚至会误解作者的意思,在这里先惭愧一下。
如果有问题,欢迎通过下面方法与译者取得联系:
网站:http://nmm.dns0755.net 
Email:dgwxx@vip.sina.com
MSN:zjworks@163.com(请不要向这个邮箱里面发送邮件,因为这个邮箱已经报废了)
因为这篇文章的结构比较复杂,考虑到WEB 页发布的多种不便,因此决定不发布WEB版,只发布PDF 版。
最后,感谢原作者bond 的辛勤工作,是他们让我们能够看到这个优秀的技术文章。当然,还要感谢您的支持!
原文: http://forum.doom9.org/showthread.php?threadid=73022

ISO 14496-10 (Video) - Advanced Video Coding (AVC)

简介
AVC/H.264 是MPEG-4 标准所定义的最新,同时也是技术含量最高、代表最新技术水平的视频编码格式之一。
AVC/H.264 视频编码由ISO 的MPEG 和ITU 的VCEG 两个组织于2003 年最终定稿。
而AVC/H.264 标准本身则是由包括来自MPEG 和VCEG 专家的Joint Video Team(JVT)开发。

译注:
ISO(International Organization for Standardization) 国际标准组织, 发展国际生产和质量标准的组织;
MPEG (Moving Pictures Experts Group) 运动图象专家组;
ITU(International Telecommunication Union) 国际电传视讯联盟;
VCEG(Video Coding Experts Group) 视频编码专家组,联合国的子机构之一,制定了现在广泛应用于视频会议软件中的H.263 格式。


从MPEG 的角度来说,这个标准叫做MPEG-4 Part10(ISO 14496-10),从ITU 的角度来说,这个标准叫做H.264(ITU 文档编号)。作为这个标准的“官方名称”,Advanced Video Coding(AVC)是MPEG 由Advanced Audio Coding(AAC)这个音频格式的视频副本确定的。
AVC/H.264 Profiles
AVC/H.264 规定了多种不同的Profile:最低Profile、主要Profile、扩展Profile、高端Profile(这些Profile 本身还要划分数个等级)。
-最低Profile,也叫做底线Profile(Baseline Profile)支持I/P 帧,只支持无交错(Progressive)和CAVLC;
-扩展Profile(Extended Profile)支持I/P/B/SP/SI 帧,只支持无交错(Progressive)和CAVLC;
-主要Profile(Main Profile)提供I/P/B 帧,支持无交错(Progressive)和交错(Interlaced),同样提供对于CAVLC 和CABAC 的支持;
-高端Profile(High Profile,也叫FRExt)在主要Profile 的基础上增加了8x8 内部预测、自定义量化、无损视频编码和更多的YUV 格式(如4:4:4)。
或许只有在将来才能知道哪些Profile 或哪些功能会成为DVDRIP 的主流,但是我猜想会是Main 或是High Profile,包含下面的一些功能:

CAVLC/CABAC

AVC/H.264 为熵编码(entropy coding)规定了两个比MPEG-4 ASP 更加进步的功能,Context-Adaptive Variable Length Coding(CAVLC, 前后自适应可变长度编码) 和Context-Adaptive Binary Arithmetic Coding (CABAC,前后自适应二进制算术编码)。CABAC 是AVC/H.264 的默认模式,与CAVLC(也叫UVLC)相比,CABAC 是一个更加强有力的压缩方式,可以将码率在降低10-15%(特别是在高码率情况下)。CABAC (CAVLC 也同样)是一个不会损伤画面的无损编码,但是会降低编码和解码的速度。

Loop/Deblocking Filter
与 预处理(比如通过avisynth,作用于输入端)和后处理(通过解码器,作用于最终输出)不同,LoopFiltering 在编码处理过程中起作用。它作用于每个帧编码之后,但是在这之前,它会被用作后面帧的参考。这样处理可以尽量避免色块的出现,特别是低码率状况下。 但是这样会降低编码和解码的速度。

Variable Block Sizes/Macroblock Partitions (可变区块尺寸/ 微块分割)
与MPEG-4 ASP(只使用Inter4V/4MV,区块大小可以在16x16 和8x8 之间变化)不同,AVC/H.264 将动态搜寻的精度增加到了4x4(中间包括类似8x4 等的的步长)。而且区块大小是自适应且可变的,一个优秀的编码器会聪明地为每个微块选择最有效的区块大小。

Multiple Reference Frames (多重参照帧)
与MPEG-4 ASP(只能选择前一帧进行参照)不同,AVC/H.264 可以选择不止一个帧进行内部动作搜寻,也就是说,编码器可以自行选择前一帧(像MPEG-4 ASP 那样),或是加上更前面的帧进行参照。正是由于这样(比如P 帧可能会参照最后一个I 帧之前的帧),一
种新类型的帧随之产生——IDR 帧,我们可以将其理解为不允许后面的帧向前面进行参照的I 帧。如果使用多重参照帧的话,编码和解码的速度都会减慢,而且编码、解码、剪切只能从IDR 帧开始。

译注:
按照原文恐怕不太容易理解,这里译者以自己的理解来讲解一下IDR 帧。举个例子,在一段视频中, 存在以下帧:I P B P B P B B P I P B…
如果这段视频应用了多重参照帧,那么蓝色的P 帧在参照他前面的I 帧(红色)的同时,还可能会参照I 帧之前的P 帧(绿色),由于I帧前后的场景可能会有很大的反差甚至根本不同,所以此时P 帧参考I 帧之前的帧不但会没有意义,反而会造成很多问题。
所 以一种新型的帧被引入,那就是IDR 帧。如果这段视频应用了多重参考帧的同时采用了IDR 帧,那么帧的顺序就会变成这样:I P B P B P B B P IDR P B… 由于IDR 帧禁止后面的帧向自己前面的帧参照,所以这回那个蓝色的P 帧就不会参照绿色的P 帧了。


Weighted Prediction (权重预测)
使 用权重预测,就是在参考帧上施加权重。这么说恐怕不太明白,但是向下看就会明白多了。在渐变场景(比如画面逐渐变黑),后面的帧除了比前面的帧要暗一些, 其他地方都很相似,那么权重预测就在这些地方发挥作用了。需要注意的是,权重预测对于交叉渐变(比如从一个场景渐变到另一个场景)不会有作用。

Rate Distortion Optimisation (RDO ,评价变化优化)
RDO 使编码器遇到多种不同的选择的时候,选择最有效的编码方式。RDO 并不是由AVC/H.264 专家制定的功能,但它是最先由H.264 参考软件所用到的一种决定方法。其他的编码器也可以采用RDO,比如XviD 的VHQ 模式已经运用了RDO。

当前AVC/H.264 的问题
如果你对现有的AVC 工具嗤之以鼻,你肯定发现了AVC 的一些问题:
-兼容性:目前不同的AVC 工具支持不同的容器(Container):
.mp4:mp4 是MPGE-4 标准(ISO 14496-15)指定的AVC 容器。目前支持它的编码器有Nero、Sorenson、Envivio 和Moonlight。
.mpg:mpg 是MPEG-2 标准(ISO 13818-1,AMD3)指定的AVC 容器。目前支持它的编码器有:Mainconcept 和Moonlight。(蓝光BD-ROM 也会使用这种容器,具体请参见 http://www.blu-ray.com
.avi: 使用AVI 作为容器是不标准的,并且会造成不兼容的问题。使用AVI 可能妨碍AVC 的一些功能的发挥,也可能会损伤回放的质量,或者降低解码速度。目前支持avi 的编码器有VSS、x264(mencoder 和x264 的vfw 都支持)、mpegable。
.264/.h264:通常是参考编码器输出的作为例子的源图像。(mencoder 中的x264 也可以输出.264,mp4creator 可以从.mp4 种Demux 出来)

-速度:当前一些编码器的速度很慢(大多是商业预览版)。尽管x264 和NeroDigital’s AVC看起来提供了不错的速度和后质量,但是它们仍然改变不了AVC 在一些较老的CPU 上极为耗时的事实。

更多文档
如果你想了解更多关于AVC 的信息,就看看: http://www.vcodex.com/h264.html。这里不但有更详细的介绍,更包含了一些技术层面的东西。
一些总结性的信息可以在 http://www.moonlight.co.il/tech_h264.phphttp://www.dspr.com/www/technology/technology.htm 找到。
AVC 测试结果可以在 http://www.chiariglione.org/mpeg/working_documents/mpeg-04/avc/avc_vt.ziphttp://82.2.167.24/Uploaded_Files/Doom9_Forum_files/AVC_Verification_Test_Results(mht).zip 找到(HTML 版本)

全部AVC 工程设计书可以在这里下载到:
http://www.dspr.com/www/technology/JVT-G050.pdf
蓝光光盘的技术信息可以在这里找到:
http://www.blu-raydisc.com/Section-13628/Index.html
Contents Page 0 Introduction.............................................................................................................................................................. xiv 0.1 Prologue............................................................................................................................................................. xiv 0.2 Purpose .............................................................................................................................................................. xiv 0.3 Applications ....................................................................................................................................................... xiv 0.4 Publication and versions of this International Standard..................................................................................... xiv 0.5 Profiles and levels............................................................................................................................................... xv 0.6 Overview of the design characteristics ............................................................................................................... xv 0.6.1 Predictive coding ........................................................................................................................................ xv 0.6.2 Coding of progressive and interlaced video............................................................................................... xvi 0.6.3 Picture partitioning into macroblocks and smaller partitions..................................................................... xvi 0.6.4 Spatial redundancy reduction..................................................................................................................... xvi 0.7 How to read this specification............................................................................................................................ xvi 1 Scope ............................................................................................................................................................................ 1 2 Normative references.................................................................................................................................................. 1 3 Definitions.................................................................................................................................................................... 1 4 Abbreviations .............................................................................................................................................................. 9 5 Conventions ............................................................................................................................................................... 10 5.1 Arithmetic operators ........................................................................................................................................... 10 5.2 Logical operators ................................................................................................................................................ 10 5.3 Relational operators ............................................................................................................................................ 11 5.4 Bit-wise operators ............................................................................................................................................... 11 5.5 Assignment operators.......................................................................................................................................... 11 5.6 Range notation .................................................................................................................................................... 11 5.7 Mathematical functions....................................................................................................................................... 11 5.8 Variables, syntax elements, and tables................................................................................................................ 12 5.9 Text description of logical operations................................................................................................................. 13 5.10 Processes............................................................................................................................................................. 14 6 Source, coded, decoded and output data formats, scanning processes, and neighbouring relationships.......... 14 6.1 Bitstream formats................................................................................................................................................ 14 6.2 Source, decoded, and output picture formats ...................................................................................................... 15 6.3 Spatial subdivision of pictures and slices............................................................................................................ 20 6.4 Inverse scanning processes and derivation processes for neighbours ................................................................. 20 6.4.1 Inverse macroblock scanning process......................................................................................................... 21 6.4.2 Inverse macroblock partition and sub-macroblock partition scanning process........................................... 21 6.4.2.1 Inverse macroblock partition scanning process....................................................................................... 22 6.4.2.2 Inverse sub-macroblock partition scanning process................................................................................ 22 6.4.3 Inverse 4x4 luma block scanning process ................................................................................................... 23 6.4.4 Inverse 8x8 luma block scanning process ................................................................................................... 23 6.4.5 Derivation process of the availability for macroblock addresses................................................................ 23 6.4.6 Derivation process for neighbouring macroblock addresses and their availability..................................... 24 6.4.7 Derivation process for neighbouring macroblock addresses and their availability in MBAFF frames....... 24 6.4.8 Derivation processes for neighbouring macroblocks, blocks, and partitions .............................................. 25 6.4.8.1 Derivation process for neighbouring macroblocks ................................................................................. 26 6.4.8.2 Derivation process for neighbouring 8x8 luma block ............................................................................. 26 6.4.8.3 Derivation process for neighbouring 4x4 luma blocks............................................................................ 27 6.4.8.4 Derivation process for neighbouring 4x4 chroma blocks........................................................................ 28 6.4.8.5 Derivation process for neighbouring partitions....................................................................................... 28 6.4.9 Derivation process for neighbouring locations ........................................................................................... 30 6.4.9.1 Specification for neighbouring locations in fields and non-MBAFF frames .......................................... 30 6.4.9.2 Specification for neighbouring locations in MBAFF frames .................................................................. 31 NEN-ISO/IEC 14496-10:2006-09 Dit document is door NEN onder licentie verstrekt aan: / This document has been supplied under license by NEN to: Irdeto Access . 2006/10/30 ISO/IEC 14496-10:2005(E) iv © ISO/IEC 2005 – All rights reserved 7 Syntax and semantics................................................................................................................................................33 7.1 Method of describing syntax in tabular form ......................................................................................................33 7.2 Specification of syntax functions, categories, and descriptors............................................................................34 7.3 Syntax in tabular form.........................................................................................................................................36 7.3.1 NAL unit syntax..........................................................................................................................................36 7.3.2 Raw byte sequence payloads and RBSP trailing bits syntax.......................................................................37 7.3.2.1 Sequence parameter set RBSP syntax .....................................................................................................37 7.3.2.1.1 Scaling list syntax.............................................................................................................................38 7.3.2.1.2 Sequence parameter set extension RBSP syntax ..............................................................................39 7.3.2.2 Picture parameter set RBSP syntax .........................................................................................................39 7.3.2.3 Supplemental enhancement information RBSP syntax ...........................................................................40 7.3.2.3.1 Supplemental enhancement information message syntax.................................................................41 7.3.2.4 Access unit delimiter RBSP syntax.........................................................................................................41 7.3.2.5 End of sequence RBSP syntax ................................................................................................................41 7.3.2.6 End of stream RBSP syntax ....................................................................................................................41 7.3.2.7 Filler data RBSP syntax ..........................................................................................................................42 7.3.2.8 Slice layer without partitioning RBSP syntax .........................................................................................42 7.3.2.9 Slice data partition RBSP syntax.............................................................................................................42 7.3.2.9.1 Slice data partition A RBSP syntax..................................................................................................42 7.3.2.9.2 Slice data partition B RBSP syntax ..................................................................................................42 7.3.2.9.3 Slice data partition C RBSP syntax ..................................................................................................43 7.3.2.10 RBSP slice trailing bits syntax ..............................................................................................................43 7.3.2.11 RBSP trailing bits syntax.......................................................................................................................43 7.3.3 Slice header syntax......................................................................................................................................44 7.3.3.1 Reference picture list reordering syntax..................................................................................................45 7.3.3.2 Prediction weight table syntax ................................................................................................................46 7.3.3.3 Decoded reference picture marking syntax .............................................................................................47 7.3.4 Slice data syntax..........................................................................................................................................48 7.3.5 Macroblock layer syntax .............................................................................................................................49 7.3.5.1 Macroblock prediction syntax .................................................................................................................50 7.3.5.2 Sub-macroblock prediction syntax..........................................................................................................51 7.3.5.3 Residual data syntax................................................................................................................................52 7.3.5.3.1 Residual block CAVLC syntax ........................................................................................................53 7.3.5.3.2 Residual block CABAC syntax ........................................................................................................55 7.4 Semantics ............................................................................................................................................................56 7.4.1 NAL unit semantics.....................................................................................................................................56 7.4.1.1 Encapsulation of an SODB within an RBSP (informative).....................................................................58 7.4.1.2 Order of NAL units and association to coded pictures, access units, and video sequences ....................59 7.4.1.2.1 Order of sequence and picture parameter set RBSPs and their activation........................................59 7.4.1.2.2 Order of access units and association to coded video sequences......................................................60 7.4.1.2.3 Order of NAL units and coded pictures and association to access units ..........................................61 7.4.1.2.4 Detection of the first VCL NAL unit of a primary coded picture.....................................................62 7.4.1.2.5 Order of VCL NAL units and association to coded pictures ............................................................63 7.4.2 Raw byte sequence payloads and RBSP trailing bits semantics..................................................................63 7.4.2.1 Sequence parameter set RBSP semantics................................................................................................63 7.4.2.1.1 Scaling list semantics .......................................................................................................................68 7.4.2.1.2 Sequence parameter set extension RBSP semantics.........................................................................69 7.4.2.2 Picture parameter set RBSP semantics....................................................................................................70 7.4.2.3 Supplemental enhancement information RBSP semantics......................................................................73 7.4.2.3.1 Supplemental enhancement information message semantics ...........................................................73 7.4.2.4 Access unit delimiter RBSP semantics....................................................................................................73 7.4.2.5 End of sequence RBSP semantics ...........................................................................................................73 7.4.2.6 End of stream RBSP semantics ...............................................................................................................74 7.4.2.7 Filler data RBSP semantics .....................................................................................................................74 7.4.2.8 Slice layer without partitioning RBSP semantics....................................................................................74 7.4.2.9 Slice data partition RBSP semantics .......................................................................................................74 7.4.2.9.1 Slice data partition A RBSP semantics.............................................................................................74 7.4.2.9.2 Slice data partition B RBSP semantics.............................................................................................74 7.4.2.9.3 Slice data partition C RBSP semantics.............................................................................................74 NEN-ISO/IEC 14496-10:2006-09 Dit document is door NEN onder licentie verstrekt aan: / This document has been supplied under license by NEN to: Irdeto Access . 2006/10/30 ISO/IEC 14496-10:2005(E) © ISO/IEC 2005 – All rights reserved v 7.4.2.10 RBSP slice trailing bits semantics......................................................................................................... 75 7.4.2.11 RBSP trailing bits semantics ................................................................................................................. 75 7.4.3 Slice header semantics ................................................................................................................................ 75 7.4.3.1 Reference picture list reordering semantics ............................................................................................ 81 7.4.3.2 Prediction weight table semantics........................................................................................................... 82 7.4.3.3 Decoded reference picture marking semantics........................................................................................ 82 7.4.4 Slice data semantics .................................................................................................................................... 85 7.4.5 Macroblock layer semantics........................................................................................................................ 86 7.4.5.1 Macroblock prediction semantics ........................................................................................................... 93 7.4.5.2 Sub-macroblock prediction semantics .................................................................................................... 94 7.4.5.3 Residual data semantics .......................................................................................................................... 96 7.4.5.3.1 Residual block CAVLC semantics................................................................................................... 97 7.4.5.3.2 Residual block CABAC semantics................................................................................................... 97 8 Decoding process....................................................................................................................................................... 98 8.1 NAL unit decoding process................................................................................................................................. 99 8.2 Slice decoding process........................................................................................................................................ 99 8.2.1 Decoding process for picture order count ................................................................................................... 99 8.2.1.1 Decoding process for picture order count type 0 .................................................................................. 101 8.2.1.2 Decoding process for picture order count type 1 .................................................................................. 102 8.2.1.3 Decoding process for picture order count type 2 .................................................................................. 103 8.2.2 Decoding process for macroblock to slice group map .............................................................................. 104 8.2.2.1 Specification for interleaved slice group map type ............................................................................... 105 8.2.2.2 Specification for dispersed slice group map type.................................................................................. 105 8.2.2.3 Specification for foreground with left-over slice group map type ........................................................ 105 8.2.2.4 Specification for box-out slice group map types................................................................................... 106 8.2.2.5 Specification for raster scan slice group map types .............................................................................. 106 8.2.2.6 Specification for wipe slice group map types ....................................................................................... 106 8.2.2.7 Specification for explicit slice group map type..................................................................................... 107 8.2.2.8 Specification for conversion of map unit to slice group map to macroblock to slice group map ......... 107 8.2.3 Decoding process for slice data partitioning ............................................................................................. 107 8.2.4 Decoding process for reference picture lists construction......................................................................... 108 8.2.4.1 Decoding process for picture numbers.................................................................................................. 108 8.2.4.2 Initialisation process for reference picture lists..................................................................................... 109 8.2.4.2.1 Initialisation process for the reference picture list for P and SP slices in frames........................... 109 8.2.4.2.2 Initialisation process for the reference picture list for P and SP slices in fields............................. 110 8.2.4.2.3 Initialisation process for reference picture lists for B slices in frames........................................... 110 8.2.4.2.4 Initialisation process for reference picture lists for B slices in fields............................................. 111 8.2.4.2.5 Initialisation process for reference picture lists in fields ................................................................ 112 8.2.4.3 Reordering process for reference picture lists....................................................................................... 113 8.2.4.3.1 Reordering process of reference picture lists for short-term reference pictures............................. 113 8.2.4.3.2 Reordering process of reference picture lists for long-term reference pictures.............................. 114 8.2.5 Decoded reference picture marking process ............................................................................................. 114 8.2.5.1 Sequence of operations for decoded reference picture marking process............................................... 115 8.2.5.2 Decoding process for gaps in frame_num............................................................................................. 115 8.2.5.3 Sliding window decoded reference picture marking process ................................................................ 116 8.2.5.4 Adaptive memory control decoded reference picture marking process ................................................ 116 8.2.5.4.1 Marking process of a short-term reference picture as “unused for reference............................... 116 8.2.5.4.2 Marking process of a long-term reference picture as “unused for reference................................ 117 8.2.5.4.3 Assignment process of a LongTermFrameIdx to a short-term reference picture ........................... 117 8.2.5.4.4 Decoding process for MaxLongTermFrameIdx ............................................................................. 117 8.2.5.4.5 Marking process of all reference pictures as “unused for reference” and setting MaxLongTermFrameIdx to “no long-term frame indices”............................................................................... 118 8.2.5.4.6 Process for assigning a long-term frame index to the current picture ............................................ 118 8.3 Intra prediction process..................................................................................................................................... 118 8.3.1 Intra_4x4 prediction process for luma samples......................................................................................... 119 8.3.1.1 Derivation process for the Intra4x4PredMode ...................................................................................... 119 8.3.1.2 Intra_4x4 sample prediction.................................................................................................................. 121 8.3.1.2.1 Specification of Intra_4x4_Vertical prediction mode .................................................................... 122 8.3.1.2.2 Specification of Intra_4x4_Horizontal prediction mode ................................................................ 122 8.3.1.2.3 Specification of Intra_4x4_DC prediction mode............................................................................ 122 NEN-ISO/IEC 14496-10:2006-09 Dit document is door NEN onder licentie verstrekt aan: / This document has been supplied under license by NEN to: Irdeto Access . 2006/10/30 ISO/IEC 14496-10:2005(E) vi © ISO/IEC 2005 – All rights reserved 8.3.1.2.4 Specification of Intra_4x4_Diagonal_Down_Left prediction mode ..............................................123 8.3.1.2.5 Specification of Intra_4x4_Diagonal_Down_Right prediction mode ............................................123 8.3.1.2.6 Specification of Intra_4x4_Vertical_Right prediction mode..........................................................123 8.3.1.2.7 Specification of Intra_4x4_Horizontal_Down prediction mode.....................................................124 8.3.1.2.8 Specification of Intra_4x4_Vertical_Left prediction mode............................................................124 8.3.1.2.9 Specification of Intra_4x4_Horizontal_Up prediction mode..........................................................124 8.3.2 Intra_8x8 prediction process for luma samples.........................................................................................125 8.3.2.1 Derivation process for Intra8x8PredMode ............................................................................................125 8.3.2.2 Intra_8x8 sample prediction..................................................................................................................127 8.3.2.2.1 Reference sample filtering process for Intra_8x8 sample prediction .............................................128 8.3.2.2.2 Specification of Intra_8x8_Vertical prediction mode.....................................................................129 8.3.2.2.3 Specification of Intra_8x8_Horizontal prediction mode ................................................................129 8.3.2.2.4 Specification of Intra_8x8_DC prediction mode............................................................................129 8.3.2.2.5 Specification of Intra_8x8_Diagonal_Down_Left prediction mode ..............................................130 8.3.2.2.6 Specification of Intra_8x8_Diagonal_Down_Right prediction mode ............................................130 8.3.2.2.7 Specification of Intra_8x8_Vertical_Right prediction mode..........................................................130 8.3.2.2.8 Specification of Intra_8x8_Horizontal_Down prediction mode.....................................................131 8.3.2.2.9 Specification of Intra_8x8_Vertical_Left prediction mode............................................................131 8.3.2.2.10 Specification of Intra_8x8_Horizontal_Up prediction mode........................................................131 8.3.3 Intra_16x16 prediction process for luma samples.....................................................................................132 8.3.3.1 Specification of Intra_16x16_Vertical prediction mode .......................................................................133 8.3.3.2 Specification of Intra_16x16_Horizontal prediction mode ...................................................................133 8.3.3.3 Specification of Intra_16x16_DC prediction mode...............................................................................133 8.3.3.4 Specification of Intra_16x16_Plane prediction mode ...........................................................................133 8.3.4 Intra prediction process for chroma samples.............................................................................................134 8.3.4.1 Specification of Intra_Chroma_DC prediction mode............................................................................134 8.3.4.2 Specification of Intra_Chroma_Horizontal prediction mode ................................................................136 8.3.4.3 Specification of Intra_Chroma_Vertical prediction mode ....................................................................136 8.3.4.4 Specification of Intra_Chroma_Plane prediction mode ........................................................................136 8.3.5 Sample construction process for I_PCM macroblocks..............................................................................137 8.4 Inter prediction process .....................................................................................................................................137 8.4.1 Derivation process for motion vector components and reference indices .................................................139 8.4.1.1 Derivation process for luma motion vectors for skipped macroblocks in P and SP slices ....................140 8.4.1.2 Derivation process for luma motion vectors for B_Skip, B_Direct_16x16, and B_Direct_8x8 ...........141 8.4.1.2.1 Derivation process for the co-located 4x4 sub-macroblock partitions............................................141 8.4.1.2.2 Derivation process for spatial direct luma motion vector and reference index prediction mode....144 8.4.1.2.3 Derivation process for temporal direct luma motion vector and reference index prediction mode 146 8.4.1.3 Derivation process for luma motion vector prediction..........................................................................148 8.4.1.3.1 Derivation process for median luma motion vector prediction.......................................................149 8.4.1.3.2 Derivation process for motion data of neighbouring partitions ......................................................150 8.4.1.4 Derivation process for chroma motion vectors......................................................................................151 8.4.2 Decoding process for Inter prediction samples .........................................................................................151 8.4.2.1 Reference picture selection process.......................................................................................................152 8.4.2.2 Fractional sample interpolation process ................................................................................................153 8.4.2.2.1 Luma sample interpolation process ................................................................................................154 8.4.2.2.2 Chroma sample interpolation process.............................................................................................157 8.4.2.3 Weighted sample prediction process.....................................................................................................158 8.4.2.3.1 Default weighted sample prediction process ..................................................................................158 8.4.2.3.2 Weighted sample prediction process ..............................................................................................159 8.5 Transform coefficient decoding process and picture construction process prior to deblocking filter process ..161 8.5.1 Specification of transform decoding process for 4x4 luma residual blocks ..............................................162 8.5.2 Specification of transform decoding process for luma samples of Intra_16x16 macroblock prediction mode 162 8.5.3 Specification of transform decoding process for 8x8 luma residual blocks ..............................................163 8.5.4 Specification of transform decoding process for chroma samples ............................................................164 8.5.5 Inverse scanning process for transform coefficients .................................................................................166 8.5.6 Inverse scanning process for 8x8 luma transform coefficients .................................................................167 8.5.7 Derivation process for the chroma quantisation parameters and scaling function ....................................169 NEN-ISO/IEC 14496-10:2006-09 Dit document is door NEN onder licentie verstrekt aan: / This document has been supplied under license by NEN to: Irdeto Access . 2006/10/30 ISO/IEC 14496-10:2005(E) © ISO/IEC 2005 – All rights reserved vii 8.5.8 Scaling and transformation process for luma DC transform coefficients for Intra_16x16 macroblock type ........................................................................................................................................................... 171 8.5.9 Scaling and transformation process for chroma DC transform coefficients.............................................. 171 8.5.10 Scaling and transformation process for residual 4x4 blocks ..................................................................... 173 8.5.11 Scaling and transformation process for residual 8x8 luma blocks ............................................................ 175 8.5.12 Picture construction process prior to deblocking filter process................................................................. 178 8.5.13 Residual colour transform process ............................................................................................................ 179 8.6 Decoding process for P macroblocks in SP slices or SI macroblocks............................................................... 179 8.6.1 SP decoding process for non-switching pictures....................................................................................... 180 8.6.1.1 Luma transform coefficient decoding process ...................................................................................... 180 8.6.1.2 Chroma transform coefficient decoding process................................................................................... 181 8.6.2 SP and SI slice decoding process for switching pictures .......................................................................... 182 8.6.2.1 Luma transform coefficient decoding process ...................................................................................... 183 8.6.2.2 Chroma transform coefficient decoding process................................................................................... 183 8.7 Deblocking filter process .................................................................................................................................. 184 8.7.1 Filtering process for block edges .............................................................................................................. 188 8.7.2 Filtering process for a set of samples across a horizontal or vertical block edge...................................... 189 8.7.2.1 Derivation process for the luma content dependent boundary filtering strength................................... 190 8.7.2.2 Derivation process for the thresholds for each block edge.................................................................... 191 8.7.2.3 Filtering process for edges with bS less than 4 ..................................................................................... 193 8.7.2.4 Filtering process for edges for bS equal to 4......................................................................................... 194 9 Parsing process........................................................................................................................................................ 195 9.1 Parsing process for Exp-Golomb codes ............................................................................................................ 195 9.1.1 Mapping process for signed Exp-Golomb codes ...................................................................................... 197 9.1.2 Mapping process for coded block pattern ................................................................................................. 197 9.2 CAVLC parsing process for transform coefficient levels ................................................................................. 200 9.2.1 Parsing process for total number of transform coefficient levels and trailing ones .................................. 201 9.2.2 Parsing process for level information ....................................................................................................... 205 9.2.2.1 Parsing process for level_prefix............................................................................................................ 206 9.2.3 Parsing process for run information.......................................................................................................... 206 9.2.4 Combining level and run information ....................................................................................................... 209 9.3 CABAC parsing process for slice data.............................................................................................................. 209 9.3.1 Initialisation process ................................................................................................................................. 210 9.3.1.1 Initialisation process for context variables............................................................................................ 211 9.3.1.2 Initialisation process for the arithmetic decoding engine...................................................................... 222 9.3.2 Binarization process.................................................................................................................................. 222 9.3.2.1 Unary (U) binarization process ............................................................................................................. 224 9.3.2.2 Truncated unary (TU) binarization process........................................................................................... 224 9.3.2.3 Concatenated unary/ k-th order Exp-Golomb (UEGk) binarization process......................................... 225 9.3.2.4 Fixed-length (FL) binarization process................................................................................................. 225 9.3.2.5 Binarization process for macroblock type and sub-macroblock type.................................................... 226 9.3.2.6 Binarization process for coded block pattern........................................................................................ 229 9.3.2.7 Binarization process for mb_qp_delta................................................................................................... 229 9.3.3 Decoding process flow.............................................................................................................................. 230 9.3.3.1 Derivation process for ctxIdx................................................................................................................ 230 9.3.3.1.1 Assignment process of ctxIdxInc using neighbouring syntax elements ......................................... 232 9.3.3.1.1.1 Derivation process of ctxIdxInc for the syntax element mb_skip_flag ................................... 232 9.3.3.1.1.2 Derivation process of ctxIdxInc for the syntax element mb_field_decoding_flag.................. 232 9.3.3.1.1.3 Derivation process of ctxIdxInc for the syntax element mb_type ........................................... 233 9.3.3.1.1.4 Derivation process of ctxIdxInc for the syntax element coded_block_pattern........................ 233 9.3.3.1.1.5 Derivation process of ctxIdxInc for the syntax element mb_qp_delta .................................... 234 9.3.3.1.1.6 Derivation process of ctxIdxInc for the syntax elements ref_idx_l0 and ref_idx_l1............... 234 9.3.3.1.1.7 Derivation process of ctxIdxInc for the syntax elements mvd_l0 and mvd_l1 ....................... 235 9.3.3.1.1.8 Derivation process of ctxIdxInc for the syntax element intra_chroma_pred_mode................ 237 9.3.3.1.1.9 Derivation process of ctxIdxInc for the syntax element coded_block_flag ............................ 237 9.3.3.1.1.10 Derivation process of ctxIdxInc for the syntax element transform_size_8x8_flag ............... 238 9.3.3.1.2 Assignment process of ctxIdxInc using prior decoded bin values.................................................. 239 9.3.3.1.3 Assignment process of ctxIdxInc for syntax elements significant_coeff_flag, last_significant_coeff_flag, and coeff_abs_level_minus1 ................................................................................ 239 9.3.3.2 Arithmetic decoding process................................................................................................................. 242 NEN-ISO/IEC 14496-10:2006-09 Dit document is door NEN onder licentie verstrekt aan: / This document has been supplied under license by NEN to: Irdeto Access . 2006/10/30 ISO/IEC 14496-10:2005(E) viii © ISO/IEC 2005 – All rights reserved 9.3.3.2.1 Arithmetic decoding process for a binary decision ........................................................................243 9.3.3.2.1.1 State transition process ............................................................................................................243 9.3.3.2.2 Renormalization process in the arithmetic decoding engine ..........................................................246 9.3.3.2.3 Bypass decoding process for binary decisions ...............................................................................247 9.3.3.2.4 Decoding process for binary decisions before termination.............................................................247 9.3.4 Arithmetic encoding process (informative)...............................................................................................248 9.3.4.1 Initialisation process for the arithmetic encoding engine (informative)................................................248 9.3.4.2 Encoding process for a binary decision (informative)...........................................................................248 9.3.4.3 Renormalization process in the arithmetic encoding engine (informative)...........................................249 9.3.4.4 Bypass encoding process for binary decisions (informative) ................................................................251 9.3.4.5 Encoding process for a binary decision before termination (informative) ............................................252 9.3.4.6 Byte stuffing process (informative).......................................................................................................254 Annex A Profiles and levels............................................................................................................................................255 A.1 Requirements on video decoder capability........................................................................................................255 A.2 Profiles ..............................................................................................................................................................255 A.2.1 Baseline profile .........................................................................................................................................255 A.2.2 Main profile...............................................................................................................................................256 A.2.3 Extended profile ........................................................................................................................................256 A.2.4 High profile ...............................................................................................................................................256 A.2.5 High 10 profile ..........................................................................................................................................257 A.2.6 High 4:2:2 profile......................................................................................................................................257 A.2.7 High 4:4:4 profile......................................................................................................................................258 A.3 Levels................................................................................................................................................................258 A.3.1 Level limits common to the Baseline, Main, and Extended profiles.........................................................258 A.3.2 Level limits common to the High, High 10, High 4:2:2, and High 4:4:4 profiles.....................................260 A.3.3 Profile-specific level limits .......................................................................................................................261 A.3.3.1 Baseline profile limits...........................................................................................................................262 A.3.3.2 Main, High, High 10, High 4:2:2, or High 4:4:4 profile limits.............................................................263 A.3.3.3 Extended Profile Limits........................................................................................................................264 A.3.4 Effect of level limits on frame rate (informative)......................................................................................266 Annex B Byte stream format..........................................................................................................................................269 B.1 Byte stream NAL unit syntax and semantics ....................................................................................................269 B.1.1 Byte stream NAL unit syntax....................................................................................................................269 B.1.2 Byte stream NAL unit semantics...............................................................................................................269 B.2 Byte stream NAL unit decoding process...........................................................................................................270 B.3 Decoder byte-alignment recovery (informative) ...............................................................................................270 Annex C Hypothetical reference decoder .....................................................................................................................272 C.1 Operation of coded picture buffer (CPB) ..........................................................................................................274 C.1.1 Timing of bitstream arrival .......................................................................................................................274 C.1.2 Timing of coded picture removal ..............................................................................................................275 C.2 Operation of the decoded picture buffer (DPB) ................................................................................................276 C.2.1 Decoding of gaps in frame_num and storage of "non-existing" frames....................................................276 C.2.2 Picture decoding and output......................................................................................................................276 C.2.3 Removal of pictures from the DPB before possible insertion of the current picture.................................277 C.2.4 Current decoded picture marking and storage...........................................................................................277 C.2.4.1 Marking and storage of a reference decoded picture into the DPB.......................................................277 C.2.4.2 Storage of a non-reference picture into the DPB ..................................................................................277
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值