Quantization Techniques in JM/KTA – Part 2

本文介绍H.264/AVC标准中的正常量化方案原理,包括标量死区量化过程,量化参数对信号重建的影响,以及如何通过调整参数减少量化误差。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

2. Principle of H.264/AVC Normal Quantization Scheme

2.1. Scalar dead-zone quantization

In this section the principle of H.264/AVC normal quantization scheme is described in a generalized form.

A scalar quantizer for input signal W can be decomposed into a function Z=C[W] called a classification rule that selects an integer-valued class identifier called the quantization index at the encoder, and a reconstruction rule that produces a real-valued output W'=R[Z] at the decoder. Video encoder applies entropy coding to the quantization indices and communicates to the decoder. Although H.264/AVC JM reference software implements some classification functions, only reconstruction function is standardized.

In the quantization step of the encoder, the transform coefficients of the prediction error are quantized. This quantization is used to reduce the precision of the coefficients. Furthermore, the quantizer is designed to map insignificant coefficient values to zero whilst retaining a reduced number of significant, non-zero coefficients. The output of a quantizer is typically a 'sparse' array of quantized coefficients, mainly containing zeros.

This uniform quantization can be expressed with equation (1), which describes the quantization step and with equation (2), which describes the inverse quantization step.

                                                                                 (1)

In this equation, the input signal W is mapped to a so called quantization level Z. Therefore, the quantization step-size  and the rounding control parameter f is used. The function floor() rounds to the nearest integer towards minus infinity and sign() returns the sign of the input signal. Figure 1 shows the dead-zone plus uniform threshold quantization, where  is the interval size except dead-zone, 2(-f) is the interval size of dead-zone, and f is the rounding offset.

Figure 1. Dead-zone with uniform threshold quantization

The mapping of the quantization level Z to the signal W' is described in the inverse quantization step that is given by

                                                                                                         (2)

Note that in (2), the parameter f is not considered. In the following the influence of the rounding control parameter f is analyzed.

2.1 Influence of rounding control parameter f

By modifying f, the rounding behaviour can be controlled. For example, in Figure 2, a rounding control of f=/2, leads to values W' of the inverse quantized (reconstructed) signal that are located in the centre of a quantization interval, and the range /2<W<=3/2 is quantized to W'= .

Figure 2. Dead-zone quantization with f=/2

If f is changed, the reconstructed values W' are no longer located in the centre of the corresponding quantization interval. For example, in Figure 3, a quantizer for a rounding control parameter f=/4 is chosen.

Figure 3. Dead-zone quantization with f=/4

The parameter f=/4 has two effects:

  1. Compared to f=/2, the quantization interval around zero is increased, and the range -3/4<W<3/4 is quantized to W'=0.
  2. The values of the quantized signal for W'!=0 are no longer located in the center of a quantization interval. The range 3/4<W<=7/4 is quantized to W'=, etc.

Observed from the above examples, we can find that rounding offset f controls two aspects:

  1. Size of dead-zone, 2(-f)
    Decrease f, dead-zone increases
  2. Location of the reconstruction point relative to the quantization interval:
    - Decrease f, all the intervals would be shifted away from zero

2.2 How to calculate the rounding offset f?

To minimize mean-squared quantization error, W' should be the centroid (conditional mean) in the interval with respect to the probability distribution function (p.d.f.) of W, i.e., W' = m = E[ W | a ≤ W ≤ a + Δ], or

                                                              (3)

where a is one value of the set [-f, 2-f, 3-f,…]and P(W) is the p.d.f of W.

For general distribution, the conditional means m could be at different distance from the lower threshold, for each interval, as conditional p.d.f. is different for different interval. Fortunately, for Laplacian distribution, the conditional means are at the same distance from the lower thresholds, for all intervals. Since DCT coefficients can be modeled by Laplacian distribution, this justifies using the same f for all intervals in H.264/AVC.

The non-uniform probability distribution inside a quantization interval can be approximated by a Laplacian distribution, which is shown in Figure 4.

Figure 4: Probability distribution of transform coefficients W inside a quantization interval.

Suppose that a Laplacian p.d.f. has standard derivation λ, or P(w)= (λ/2)exp(-λ|w|), the optimal f which minimize the distortion can be determined analytically for Laplacian distribution, which decreases with increasing λ (i.e., decreasing standard derivation),

                                                                                          (4)

Due to this distribution, the mean value of W inside a quantization interval is not located in the centre of corresponding interval. In order to reduce the quantization error, this effect is considered by using a rounding control parameter of f</2. Such a rounding control parameter leads to smaller values of the quantized signal W', which are not located in the centre of a quantization interval.

Figure 5 shows the monotonic property between optimal f and Laplacian standard derivation λ.

Figure 5. The monotonic property between optimal f and Laplacian standard derivation λ

In the reference model of H.264/AVC, the probability distribution varies between Intra and Inter mode, thus different rounding control parameters are used. The rounding control parameter for Intra is f=/3 and for Inter it is f=/6. Therefore, the values of the quantized signal W' tend to be smaller than the value of the centre of the corresponding quantization interval. This behaviour is utilized to have a quantization that better fits to a non-uniform probability distribution of the input signal inside a quantization interval.

参考:http://www.h265.net/2009/06/quantization-techniques-in-jmkta-part-2.html

内容概要:本文探讨了在MATLAB/SimuLink环境中进行三相STATCOM(静态同步补偿器)无功补偿的技术方法及其仿真过程。首先介绍了STATCOM作为无功功率补偿装置的工作原理,即通过调节交流电压的幅值和相位来实现对无功功率的有效管理。接着详细描述了在MATLAB/SimuLink平台下构建三相STATCOM仿真模型的具体步骤,包括创建新模型、添加电源和负载、搭建主电路、加入控制模块以及完成整个电路的连接。然后阐述了如何通过对STATCOM输出电压和电流的精确调控达到无功补偿的目的,并展示了具体的仿真结果分析方法,如读取仿真数据、提取关键参数、绘制无功功率变化曲线等。最后指出,这种技术可以显著提升电力系统的稳定性与电能质量,展望了STATCOM在未来的发展潜力。 适合人群:电气工程专业学生、从事电力系统相关工作的技术人员、希望深入了解无功补偿技术的研究人员。 使用场景及目标:适用于想要掌握MATLAB/SimuLink软件操作技能的人群,特别是那些专注于电力电子领域的从业者;旨在帮助他们学会建立复杂的电力系统仿真模型,以便更好地理解STATCOM的工作机制,进而优化实际项目中的无功补偿方案。 其他说明:文中提供的实例代码可以帮助读者直观地了解如何从零开始构建一个完整的三相STATCOM仿真环境,并通过图形化的方式展示无功补偿的效果,便于进一步的学习与研究。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值