Overview of the High Efficiency Video Coding Standard——Inter-picture prediction(二)

本博客详细解析了HEVC中的帧内预测模式,包括参考像素点的处理、预测模式编码、色度预测模式选择及与亮度预测模式的关系。

G. Intra-picture prediction

6) Reference sample substitution 

The neighboring reference samples are not available at the slice or tile boundaries. In addition, when a loss-resilience feature known as constrained intra prediction is enabled, the neighboring reference samples inside any inter-coded PB are also considered not available in order to avoid letting potentially-corrupted prior decoded picture data propagate errors into the prediction signal. While only Intra_DC prediction mode is allowed for such cases in H.264/MPEG-4 AVC, HEVC allows the use of other intra prediction modes after substituting the non-available reference sample values with the neighboring available reference sample values.  邻近参考像素点在片或者片边界是无效的。此外,当强制帧内预测的丢失恢复功能开启后,为了避免由前面的解码图像造成差错扩散,所有帧间预测PB的相邻参考像素也是无效的;在H.264/MPEG-4 AVC中只有Intra_DC模式可以允许用这功能,HEVC在用邻近有效参考像素值来取代无效参考像素值后用其他帧内模式进行预测。

7) Mode coding 

HEVC supports a total of 33 Intra_Angular prediction modes as well as Intra_Planar and Intra_DC prediction modes for luma intra prediction of all block sizes. Due to the increased number of directions, HEVC considers three “most probable modes” (MPMs) when coding the luma intra prediction mode predictively,rather than the one most probable mode considered in H.264/MPEG-4 AVC. 
	Among the three most probable modes, the first two are initialized by the luma intra prediction modes of the above and left PBs if those PBs are available and are coded using an intra prediction mode. Any unavailable prediction mode is considered to be Intra_DC. The PB above the luma CTB is always considered to be unavailable, in order to avoid the need to store a line buffer of neighboring luma intra prediction modes.

	HEVC亮度帧内预测的所有大小块都支持33种方向预测模式以及Intra_Planar and Intra_DC模式。由于增加的预测方向比较多
,HEVC对亮度帧内预测提出了三种最有可能的模式(MPMS),这个比H.264/MPEG-4 AVC当中一种最可能的模式要有效的多。
	在MPM中,如果上方以及左侧PB有效且是用帧内预测模式,则前两种则采用上方和左方的PB的亮度帧内预测模式来初始化。任意无效的预测模式都视为Intra_DC.为了避免存储相邻亮度预测模式的一行buffer,亮度CTB之上的PB都认为是无效的
 

When the first two most probable modes are not equal, the third most probable mode is set equal to Intra_Planar, Intra_DC or Intra_Angular[ 26 ] (vertical), according to which of these modes, in this order, is not a duplicate of one the first two modes. When the first two most probable modes are the same, if this first mode has the value Intra_Planar or Intra_DC, the second and third most probable modes are assigned as Intra_Planar, Intra_DC, or Intra_Angular[ 26 ], according to which of these modes, in this order, are not duplicates. When he first two most probable modes are the same and the first mode has an Intra_Angular value, the second and third most probable modes are chosen as the two angular prediction modes that are closest to the angle (i.e. the value of k) of the first. 

	当前两种可能模式不相等的情况下,第三种可能模式会设定为 Intra_Planar, Intra_DC or Intra_Angular[ 26 ]垂直)模式中不等于前两种模式的其中一种。
	当前两种模式相同的情况下,如果第一种模式是the value Intra_Planar or Intra_DC,第二种和第三种模式将根据Intra_Planar, Intra_DC, or Intra_Angular[ 26 ]在顺序上不重复的原则设定其中的两个。当前两个最可能模式是相等时且第一个模式的值为Intra_Angular 则将第二个和第三个最可能模式设为和第一个模式在方向最近的预测方向值;



	In the case that the current luma intra prediction mode is one of three MPMs, only the MPM index is transmitted to the decoder. Otherwise, the index of the current luma intra prediction mode excluding the three MPMs is transmitted to the decoder by using a 5-bit fixed length code. 
	For chroma intra prediction, HEVC allows the encoder to select one of five modes: Intra_Planar, Intra_Angular[ 26 ] (vertical), Intra_Angular[ 10 ] (horizontal), Intra_DC, and Intra_Derived. The Intra_Derived mode specifies that the chroma intra prediction uses the same angular direction as the luma intra prediction. With this scheme, all angular modes specified for luma in HEVC can, in principle, also be used in the chroma intra prediction, and a good trade-off is achieved between prediction accuracy and the signaling overhead. The selected chroma intra prediction mode is coded directly (without using an MPM prediction mechanism).

	如果当前的亮度预测模式是三个最可能模式(MPM)中的一种,则只有MPM的索引号被传输给解码器;此外, 除了三个最可能模式外,当前亮度预测模式的索引也要使用5比特的定长码字传输给解码器;
	对于色度帧内预测模式,HEVC允许其选择下面五种模式:
  Intra_Planar,
  Intra_Angular[26](垂直),
  Intra_Angular[10](水平),
  Intra_DC,
  Intra_Derived,
其中,Intra_Derived是将色度预测模式设定为对应亮度块的帧内预测同一个方向;对于这样一种设计, 在原则上,HEVC支持的所有亮度方向预测模式在色度上也同样支持;这样的设计很好地取得了预测精度和信号传输开销间的平衡;被选择的色度预测模式是直接编码的(不用MPM);









                
### 高效视频编码(HEVC)标准概述 #### 一、背景与发展历程 高效视频编码(High Efficiency Video Coding, HEVC),也被称为H.265,是由国际电信联盟电信标准化部门(ITU-T)和ISO/IEC运动图像专家组(MPEG)共同开发的新一代视频压缩技术。相较于前代标准如H.264,在保持甚至提高画质的同时能够显著降低数据量约50%左右[^2]。 #### 、架构组成 同H.264一样,HEVC同样采用了基于块的混合编码框架,内部结构主要分为两大部分: - **视频编码层(VCL)**:负责实际的画面预测与变换量化处理工作; - **网络抽象层(NAL)**:定义了如何将VCL产生的信息打包成适合不同网络环境传输的形式,并提供了必要的控制指令来支持随机访问等功能[^1]。 #### 三、关键技术特性 为了达到更高的压缩效率并适应更广泛的应用场景需求,HEVC引入了一系列创新性的算法和技术手段: - **更大的宏块尺寸**:最大可达64×64像素,允许更加灵活地划分画面区域进行编码优化; - **多方向帧内预测模式**:增加了更多角度的选择范围,使得相邻帧间相似度匹配更为精准; - **自适应环路滤波(ALF)**:通过对重建后的图片边缘部分做额外平滑化操作减少振铃效应; - **样条插值法(SAI)**:改进了亚像素精度下的运动估计准确性; - **分级B切片结构**:增强了时空域联合预测能力,进一步提升了压缩效果; 以上各项措施综合起来不仅提高了压缩率还改善了视觉质量体验。 ```python # Python伪代码展示简单版HEVC编码流程示意 def hevc_encode(frame_sequence): vcl_output = [] for frame in frame_sequence: # 进行帧级预处理... # 执行VCL层面的操作,比如分割CTU单元、执行IPM等过程... coded_ctus = process_vcl_operations(frame) nal_units = pack_into_nal(coded_ctus) vcl_output.extend(nal_units) return vcl_output def unpack_from_nal(bitstream): """模拟NAL解析逻辑""" pass def decode_hevc(compressed_data): frames_recovered = [] while compressed_data: next_frame_bits = extract_next_frame_bits(compressed_data) raw_pixels = reconstruct_raw_image(unpack_from_nal(next_frame_bits)) frames_recovered.append(raw_pixels) return frames_recovered ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值