CN1489391A - Novel Spatial Prediction Method and Device for Video Coding - Google Patents
Novel Spatial Prediction Method and Device for Video Coding Download PDFInfo
- Publication number
- CN1489391A CN1489391A CNA021308330A CN02130833A CN1489391A CN 1489391 A CN1489391 A CN 1489391A CN A021308330 A CNA021308330 A CN A021308330A CN 02130833 A CN02130833 A CN 02130833A CN 1489391 A CN1489391 A CN 1489391A
- Authority
- CN
- China
- Prior art keywords
- frequency domain
- module
- image
- residual
- coefficients
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 238000013139 quantization Methods 0.000 claims abstract description 90
- 230000009466 transformation Effects 0.000 claims abstract description 35
- 238000004364 calculation method Methods 0.000 claims abstract description 7
- 239000011159 matrix material Substances 0.000 claims description 69
- 230000008569 process Effects 0.000 claims description 26
- 238000012545 processing Methods 0.000 claims description 25
- 230000000694 effects Effects 0.000 claims description 18
- 238000001914 filtration Methods 0.000 claims description 9
- 238000003672 processing method Methods 0.000 claims description 2
- 230000007547 defect Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 12
- 238000005516 engineering process Methods 0.000 description 11
- 238000011426 transformation method Methods 0.000 description 6
- 230000006835 compression Effects 0.000 description 4
- 238000007906 compression Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 241000023320 Luma <angiosperm> Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
一种用于视频编码的新型空间预测方法及其装置,对码流编码时,把预测图像变换到频域作频域量化后再作为预测图像;解码时对预测图像作频域量化,然后补偿到解码出的残差图像上。该装置至少设有编码模块和解码模块;编码模块设有预测模块、计算残差系数模块、扫描模块和熵编码模块;解码模块设有:熵解码模块、补偿模块、反量化模块、反变换模块和变换量化模块。本发明克服了基于多方向空间预测的视频编码方法在应用于连续I帧编码时,产生闪烁现象的缺陷,提高了多方向空间预测的视频编码方法的编码效率;提供了抗闪烁的连续I帧编码方案,和基于模式的残差系数扫描方案,还进一步保证了编码效率;提供了实现上述方法的具体系统结构。
A new spatial prediction method and device for video coding. When encoding a code stream, the predicted image is transformed into the frequency domain for frequency domain quantization and then used as a predicted image; when decoding, the predicted image is quantized in the frequency domain and then compensated. onto the decoded residual image. The device is at least provided with an encoding module and a decoding module; the encoding module is provided with a prediction module, a residual coefficient calculation module, a scanning module and an entropy encoding module; the decoding module is provided with: an entropy decoding module, a compensation module, an inverse quantization module, and an inverse transformation module and transform quantization modules. The invention overcomes the defect of flicker phenomenon when the video coding method based on multi-directional spatial prediction is applied to the coding of continuous I frames, improves the coding efficiency of the video coding method of multi-directional spatial prediction; and provides continuous I frames with anti-flickering The encoding scheme and the pattern-based residual coefficient scanning scheme further ensure the encoding efficiency; a specific system structure for realizing the above method is provided.
Description
技术领域: Technical field :
本发明涉及一种用于视频编码的新型空间预测方法及其装置,具体是指一种基于JVT标准的视频编解码技术中,对于全帧内(I帧)编码视频流所产生的闪烁进行消除补偿,并进一步提高编解码效率的新型空间预测方法及其实现该方法的装置;属于数字视频处理技术领域。The present invention relates to a novel spatial prediction method and device for video coding, specifically refers to the elimination of flicker generated by a full intra-frame (I frame) coded video stream in a video coding and decoding technology based on the JVT standard The invention relates to a novel space prediction method and a device for realizing the method for further improving codec efficiency and compensation; it belongs to the technical field of digital video processing.
背景技术: Background technology :
高效的视频编解码技术是实现多媒体数据存储与传输的关键,而先进的视频编解码技术通常以标准的形式存在。目前典型的视频压缩标准有国际标准化组织(ISO)下设的运动图像专家组(Moving Picture ExpertGroup,简称MPEG)推出的MPEG系列国际标准;国际电信联盟(ITU)提出的H.26x系列视频压缩标准,以及ISO和ITU建立的联合视频工作组(Joint Video Team,简称JVT)正在制定的JVT视频编码标准等。JVT标准采用的是一种新型的编码技术,它比现存的任何一种编码标准的压缩效率都要高的多。JVT标准在ISO中的正式名称是MPEG-4标准的第十部分,在ITU中的正式名称是H.264标准。Efficient video codec technology is the key to realizing multimedia data storage and transmission, and advanced video codec technology usually exists in the form of standards. At present, the typical video compression standards include the MPEG series of international standards launched by the Moving Picture Expert Group (MPEG) under the International Organization for Standardization (ISO) and the H.26x series of video compression standards proposed by the International Telecommunication Union (ITU). , and the JVT video coding standard being developed by the Joint Video Team (JVT for short) established by ISO and ITU. The JVT standard adopts a new type of coding technology, which has much higher compression efficiency than any existing coding standard. The official name of the JVT standard in the ISO is the tenth part of the MPEG-4 standard, and the official name in the ITU is the H.264 standard.
视频编码过程就是对视频序列的每一帧图像进行编码的过程。JVT视频编码标准中,每一帧图像的编码以宏块为基本单元。在编码每一帧图像时,又可以分为帧内(I帧)编码、预测(P帧)编码和双向预测(B帧)编码等情况。I帧编码的特点是在编解码时不需要参考其它帧。一般来说:编码时,I帧、P帧和B帧编码是穿插进行的,例如:按照IBBPBBP的顺序进行。但是,对于一些特殊的应用,例如:要求低运算复杂度、低存储容量或要求实时压缩等应用,可以只使用I帧进行编码。此外,全I帧编码的视频还具有便于编辑的特点。在I帧编码中,宏块内的冗余是通过正交变换消除的,如离散余弦变换(DCT)、小波变换等。而传统的视频编码算法在消除宏块间的冗余时,通常采用正交变换的系数域上的预测方法。然而,这种预测只能在直流分量上进行,因此效率不高。The video encoding process is the process of encoding each frame of the video sequence. In the JVT video coding standard, the coding of each frame of image takes macroblock as the basic unit. When coding each frame of image, it can be divided into intra-frame (I frame) coding, predictive (P frame) coding and bidirectional predictive (B frame) coding and so on. The characteristic of I frame coding is that it does not need to refer to other frames when encoding and decoding. Generally speaking: during encoding, I frame, P frame and B frame encoding are interspersed, for example: in the order of IBBPBBP. However, for some special applications, such as applications that require low computational complexity, low storage capacity, or real-time compression, only I frames can be used for encoding. In addition, full I-frame encoded video is also easy to edit. In I-frame coding, the redundancy in the macroblock is eliminated by orthogonal transformation, such as discrete cosine transformation (DCT), wavelet transformation and so on. However, when traditional video coding algorithms eliminate the redundancy between macroblocks, they usually use the prediction method in the coefficient domain of orthogonal transformation. However, this prediction can only be done on the DC component, so it is not efficient.
在I帧编码中,采用多方向的空间预测是目前研究的主流,并获得了很好的效果。帧内的空间预测是指:在进行I帧编码和解码时,首先按一定模式,由(解码端可以获得的)帧内的信息(比如:相邻的已经重构的块)生成当前块的预测;然后,用实际要编码的块减去预测出来的块,得到残差,再对残差进行编码。In I-frame coding, multi-directional spatial prediction is the mainstream of current research, and good results have been obtained. Intra-frame spatial prediction means: when performing I-frame encoding and decoding, first of all, according to a certain mode, the information in the frame (obtainable by the decoding end) (for example: adjacent reconstructed blocks) is used to generate the current block Prediction; then, subtract the predicted block from the actual block to be encoded to obtain a residual, and then encode the residual.
多方向的空间预测技术在视频编码中得到了很好的应用。JVT视频编码标准就采用了这种技术。然而,现有的多方向空间预测技术还存在两个主要的缺点:其一是现有的技术应用于连续I帧编码时会产生严重的闪烁现象,影响视觉效果;另一个是:多方向空间预测改变了残差图像在系数域上的概率分布,而现有的方法仍然采用固定的变换系数zigzag扫描顺序,参见图4,该zigzag扫描指的是在视频编码方案中,对变换量化后的块的系数的编码顺序,该顺序对编码效率有很大的影响。目前的编码系统(jpeg,mpeg等)中,对于相同大小的块,普遍采用了这种固定的扫描顺序,因此编码效率没有达到最优。JVT是目前正在制定当中的一种高效的视频编码标准。它首先由ITU(国际电信联盟,InternationalTelecommunications Union)制定,进而被ISO/IEC国际标准组织采纳,作为ISO/IEC 14496(MPEG4)的第十部分。Multi-directional spatial prediction technology has been well applied in video coding. The JVT video coding standard adopts this technology. However, there are still two main shortcomings in the existing multi-directional spatial prediction technology: one is that when the existing technology is applied to continuous I-frame coding, it will produce serious flickering phenomenon, which affects the visual effect; the other is: the multi-directional spatial Prediction changes the probability distribution of the residual image in the coefficient domain, while the existing methods still use a fixed zigzag scan order of the transform coefficients, see Figure 4, the zigzag scan refers to the transformation quantized in the video coding scheme The coding order of the coefficients of the block has a great influence on the coding efficiency. In current encoding systems (jpeg, mpeg, etc.), this fixed scanning order is generally adopted for blocks of the same size, so the encoding efficiency is not optimal. JVT is an efficient video coding standard currently being formulated. It was first formulated by the ITU (International Telecommunications Union, International Telecommunications Union), and then adopted by the ISO/IEC International Standards Organization as the tenth part of ISO/IEC 14496 (MPEG4).
但是,采用JVT做全I帧编码时,重构图像在回放时会有闪烁的现象。经过分析和验证,认为主要是由于编码时块大小可变和帧内预测的相对随机性引起的。However, when JVT is used for full I-frame encoding, the reconstructed image will flicker during playback. After analysis and verification, it is considered that it is mainly caused by the variable block size and the relative randomness of intra-frame prediction during encoding.
块大小可变指的是:一个被编码的宏块,可以按编码模式细分成更小的子块。分割模式不同,则分成的子块的大小也不同。块大小可变引起闪烁,主要的原因是:前一帧和后一帧的相同位置并且内容基本没有变化的块,编码时采用了不同的分割方式,导致重构结果有很大的不同。这部分通过适当修改编码器的编码策略就可以避免,而不需要修改解码器。参见图1,其为对JVT中宏块细分为各种细块的示意图。A variable block size means that a coded macroblock can be subdivided into smaller sub-blocks according to the coding mode. Different division modes have different sizes of sub-blocks. The variable block size causes flickering. The main reason is that the block with the same position in the previous frame and the next frame and the content basically does not change. Different segmentation methods are used during encoding, resulting in very different reconstruction results. This part can be avoided by appropriately modifying the encoding strategy of the encoder without modifying the decoder. Referring to FIG. 1 , it is a schematic diagram of subdividing a macroblock into various fine blocks in the JVT.
普通编码方案一般只有帧间预测,用于消除时间上的冗余,空间上的冗余则由各种变换来消除。JVT则提出了帧内预测,与变换编码一起用于消除空间上的冗余,进而大大提高了编码效率。具体有Intra4×4模式和Intra16×16模式等两种(Intra4×4模式和Intra16×16模式是两种宏块的划分模式,Intra4×4模式下有9种预测模式,Intra16×16下有4种预测模式)。参见图2,在Intra4×4模式下,将对一个宏块里的每一个子块进行帧内的预测。每个4×4的小块的中像素将通过邻块中已经解码的17个像素进行预测。Ordinary coding schemes generally only have inter-frame prediction, which is used to eliminate temporal redundancy, and spatial redundancy is eliminated by various transformations. JVT proposes intra-frame prediction, which is used together with transform coding to eliminate spatial redundancy, thereby greatly improving coding efficiency. Specifically, there are two types of Intra4×4 mode and Intra16×16 mode (Intra4×4 mode and Intra16×16 mode are two macroblock division modes, Intra4×4 mode has 9 prediction modes, Intra16×16 has 4 a predictive model). Referring to FIG. 2 , in the Intra4×4 mode, intra-frame prediction is performed on each sub-block in a macroblock. The middle pixel of each 4×4 small block will be predicted by the decoded 17 pixels in the adjacent block.
参见图3,帧内的预测模式分为9种(模式0到模式8),其中模式2即为MPEG-4标准中的DC预测。Referring to FIG. 3 , intra-frame prediction modes are divided into nine types (mode 0 to mode 8), wherein mode 2 is the DC prediction in the MPEG-4 standard.
在Intra16×16模式中,假设要被预测的块的像素用P(x,y)表示,In the Intra16×16 mode, it is assumed that the pixels of the block to be predicted are represented by P(x, y),
其中,x,y=0...15,Among them, x, y=0...15,
被预测块左临界块像素P(-1,y),y=0..15,Left critical block pixel P(-1, y) of the predicted block, y=0..15,
被预测块上临界块像素P(x,-1),x=0..15。Critical block pixels P(x, -1) on the predicted block, x=0..15.
定义4种预测模式,分别为:垂直预测、水平预测、DC预测和平面预测。色度块的预测模式也有四种,与亮度块基本类似。Four prediction modes are defined, namely: vertical prediction, horizontal prediction, DC prediction and planar prediction. There are also four prediction modes for chroma blocks, which are basically similar to luma blocks.
帧内预测的相对随机性是指:由于用来生成预测的帧内的信息的不同以及预测模式的不同,前后两帧的相同位置并且内容基本没有变化的块,他们的预测值一般来说却不相同。对于没有帧内预测的系统进行连续I帧编码时,前后两对应块的细小差别会被变换域的量化操作去除掉。对英德宏块越相似,这一差别被去掉的概率也越大。如果两块完全相同,则重构图像也完全相同。然而对于有帧内预测的系统来说,重构图像由两部分相加构成:预测图像和重构的残差图像。重构的残差由于频率域的量化过程,它的频域系数满足量化步长的整数倍;而预测图像由于没有这一过程,它的频域系数刚好满足量化步长的整数倍的可能性很小,实际上如果用它的频域系数除以量化步长,得到的系数的小数部分可以认为是0-1之间的随机数(在量化步长不是很大的时候),即等于0-1之间(包括0)任何数的概率是相等的。The relative randomness of intra-frame prediction means that due to the difference in the information in the frame used to generate the prediction and the difference in the prediction mode, the blocks with the same position and basically no change in the content of the two frames before and after the two frames generally have a lower prediction value. Are not the same. When continuous I-frame coding is performed for a system without intra-frame prediction, the small difference between the two corresponding blocks before and after will be removed by the quantization operation in the transform domain. The more similar the British and German macroblocks are, the greater the probability that this difference will be removed. If two patches are identical, the reconstructed image is also identical. However, for systems with intra prediction, the reconstructed image consists of the addition of two parts: the predicted image and the reconstructed residual image. Due to the quantization process in the frequency domain, the reconstructed residual has a frequency domain coefficient that satisfies an integer multiple of the quantization step size; and because the predicted image does not have this process, its frequency domain coefficient just satisfies the possibility of an integer multiple of the quantization step size Very small, in fact, if its frequency domain coefficient is divided by the quantization step size, the fractional part of the obtained coefficient can be considered as a random number between 0-1 (when the quantization step size is not very large), that is, it is equal to 0 The probability of any number between -1 (including 0) is equal.
由于重构图像由这样的两部分构成,所以用它的频域系数除以量化步长得到的系数的小数部分也同样可以认为是0-1之间的随机数。对于像素值比较接近的前后两对应块来说,由于重构图像在频域上的相对随机性,与没有帧内预测的系统不同,它们的重构图像的相似程度与它们本身的相似程度的关系并不十分密切。即使它们本身完全相同,重构图像完全相同的概率也很小。Since the reconstructed image is composed of such two parts, the fractional part of the coefficient obtained by dividing its frequency domain coefficient by the quantization step size can also be regarded as a random number between 0-1. For two corresponding blocks with similar pixel values, due to the relative randomness of the reconstructed image in the frequency domain, unlike the system without intra-frame prediction, the similarity of their reconstructed images is equal to their own similarity The relationship is not very close. Even if they are identical themselves, the probability that the reconstructed images are identical is very small.
参见图5、6,现有的编码过程为:重构图像在模式选择模块的控制下,由预测模块处理,输出预测图像,该预测图像和当前编码图像经过计算残差系数模块的处理后,再经过扫描模块和熵编码的处理,最终输出编码码流。Referring to Figures 5 and 6, the existing encoding process is as follows: the reconstructed image is processed by the prediction module under the control of the mode selection module, and the predicted image is output. After the predicted image and the current encoded image are processed by the residual coefficient calculation module, After processing by the scanning module and entropy coding, the coded stream is finally output.
参见图7,现有技术中多方向空间预测编码系统解码部分的信号流程为:被解码的码流经过熵解码、反量化以及反变换后再经过预测图像的补偿后作为视频流输出。Referring to FIG. 7 , the signal flow of the decoding part of the multi-directional spatial predictive coding system in the prior art is as follows: the decoded code stream is subjected to entropy decoding, inverse quantization and inverse transformation, and then compensated by the predicted image before being output as a video stream.
上述的编/解码过程无法克服基于多方向空间预测的视频编码方法在应用于连续I帧编码时产生的闪烁现象,由于采用固定的扫描方式,无法提高多方向空间预测的视频编码方法的编码效率。The above encoding/decoding process cannot overcome the flickering phenomenon when the video coding method based on multi-directional spatial prediction is applied to continuous I frame coding, and the coding efficiency of the video coding method based on multi-directional spatial prediction cannot be improved due to the fixed scanning method .
发明内容Contents of the invention
本发明的主要目的是提供一种用于视频编码的新型空间预测方法,克服基于多方向空间预测的视频编码方法在应用于连续I帧编码时产生闪烁现象的缺陷,以及提高多方向空间预测的视频编码方法的编码效率,为基于多方向空间预测的视频编码技术提供抗闪烁的连续I帧编码方案和基于模式的残差系数扫描方案,在减轻闪烁现象的同时,保证编码效率。The main purpose of the present invention is to provide a novel spatial prediction method for video coding, to overcome the defect that the video coding method based on multi-directional spatial prediction produces flickering phenomenon when it is applied to continuous I frame coding, and to improve the performance of multi-directional spatial prediction. The coding efficiency of the video coding method provides a flicker-resistant continuous I-frame coding scheme and a pattern-based residual coefficient scanning scheme for the video coding technology based on multi-directional spatial prediction, which ensures coding efficiency while reducing flicker.
本发明的另一目的是提供一种用于视频编码的新型空间预测方法,以JVT标准作为实施案例,为JVT标准提供解决连续I帧编码闪烁问题并提高编码效率的具体技术手段。Another object of the present invention is to provide a novel spatial prediction method for video coding, using the JVT standard as an implementation example, to provide the JVT standard with specific technical means to solve the problem of continuous I-frame coding flicker and improve coding efficiency.
本发明的又一目的是提供一种用于视频编码的新型空间预测装置,提供实现上述方法的具体装置。Another object of the present invention is to provide a novel spatial prediction device for video coding, and provide a specific device for realizing the above method.
本发明的目的是通过如下的技术方案实现的:The purpose of the present invention is achieved through the following technical solutions:
一种用于视频编码的新型空间预测方法,在对码流编码时,用与处理残差图像时采用的变换方法把预测图像也变换到频域,并用相同的量化系数作量化,然后再作为预测图像;解码时对该预测图像采用与编码时相同的处理方法对预测图像作频域量化,然后补偿到解码出的残差图像上。A new spatial prediction method for video coding. When encoding the code stream, the prediction image is also transformed into the frequency domain by the transformation method used when processing the residual image, and quantized with the same quantization coefficient, and then used as Predicted image; when decoding, the predicted image is quantized in the frequency domain using the same processing method as that used during encoding, and then compensated to the decoded residual image.
所述的编码过程具体为:The encoding process is specifically:
步骤100:根据选定的预测模式,由当前编码块的临近块的解码图像生成预测图像;Step 100: According to the selected prediction mode, a predicted image is generated from the decoded images of adjacent blocks of the current coding block;
步骤101:把预测图像变换到频域;Step 101: Transform the predicted image into the frequency domain;
步骤102:量化预测图像的频域系数,其中,量化系数与处理残差图像时采用的量化系数相同;且设量化后的频域系数的矩阵满足如下的公式:Step 102: Quantize the frequency domain coefficients of the predicted image, wherein the quantization coefficients are the same as the quantization coefficients used when processing the residual image; and the matrix of the quantized frequency domain coefficients satisfies the following formula:
Z=Q(Y)=(Y×Quant(Qp)+Qconst(Qp))>>Q_bit(Qp)Z=Q(Y)=(Y×Quant(Qp)+Qconst(Qp))>>Q_bit(Qp)
其中,in,
Z为量化后的频域系数矩阵,Z is the quantized frequency domain coefficient matrix,
Y为频域系数矩阵,Y is the frequency domain coefficient matrix,
Qp为量化参数,Qp is the quantization parameter,
Quant(Qp)、Qconst(Qp)、Q_bit(Qp)为由JVT定义的量化时的函数;Quant(Qp), Qconst(Qp), Q_bit(Qp) are quantization functions defined by JVT;
步骤103:依据如下的公式对步骤102获得的频域系数的矩阵进行反量化;Step 103: Dequantize the matrix of frequency domain coefficients obtained in step 102 according to the following formula;
W=DQ(Z)=(Z×DQuant(Qp)+DQconst(Qp))>>Q_per(Qp)W=DQ(Z)=(Z×DQuant(Qp)+DQconst(Qp))>>Q_per(Qp)
DQuant(Qp)×DQconst(Qp)≈2Q_per(Qp)×Q_bit(Qp) DQuant(Qp)×DQconst(Qp)≈2 Q_per(Qp)×Q_bit(Qp)
其中,in,
W为反量化后的频域系数矩阵,W is the frequency domain coefficient matrix after inverse quantization,
Z为量化后反量化前的频域系数矩阵,Z is the frequency domain coefficient matrix before inverse quantization after quantization,
Qp为量化参数,Qp is the quantization parameter,
DQuant(Qp)、DQconst(Qp)、Q_bit(Qp)、Q_per(Qp)为由JVT定义的量化时的函数;DQuant(Qp), DQconst(Qp), Q_bit(Qp), Q_per(Qp) are quantization functions defined by JVT;
步骤104:根据步骤100-103的方法,将被编码的当前块变换到频域,得到频域图像;Step 104: according to the method of steps 100-103, transform the encoded current block into the frequency domain to obtain a frequency domain image;
步骤105:频域图像减去反量化后的频域系数矩阵直接得到频域残差图像;Step 105: subtracting the dequantized frequency domain coefficient matrix from the frequency domain image to directly obtain the frequency domain residual image;
步骤106:量化频域残差图像得到量化后的频域残差系数,公式同步骤102;Step 106: Quantize the frequency domain residual image to obtain the quantized frequency domain residual coefficient, the formula is the same as step 102;
步骤107:对频域残差系数做系数扫描,熵编码得到码流;Step 107: Perform coefficient scanning on the residual coefficients in the frequency domain, and entropy coding to obtain a code stream;
步骤108:按照如下的公式,把频域系数矩阵补偿到频域残差系数上;Step 108: Compensate the frequency domain coefficient matrix to the frequency domain residual coefficient according to the following formula;
C=C+Z;C=C+Z;
其中,in,
C为频域残差系数,C is the frequency domain residual coefficient,
Z为频域系数矩阵;Z is the frequency domain coefficient matrix;
步骤109:用JVT的公式反量化频域残差系数;Step 109: dequantize the residual coefficient in the frequency domain with the formula of JVT;
步骤110:按照块的大小和模式反变换频域残差系数,得到初步的重构图像;Step 110: Inversely transform the residual coefficients in the frequency domain according to the size and mode of the block to obtain a preliminary reconstructed image;
步骤111:对重构图像做去除块效应的滤波,得到当前块的输出图像。Step 111: Filter the reconstructed image to remove block effects to obtain an output image of the current block.
在上述的编码之前,还进一步包括基于预测模式决定扫描顺序的处理,具体的过程为:分别统计每种模式下残差图像每个频率的系数非0的概率,按照该概率的值,从大到小的顺序生成扫描顺序表,用以代替单一的zigzag扫描表。该zigzag扫描指的是在视频编码方案中,对变换量化后的块的系数的编码顺序,该顺序对编码效率有很大的影响。参见图4,目前的编码系统(jpeg,mpeg等)中,对于相同大小的块,普遍采用了固定的扫描顺序。Before the above encoding, it further includes the processing of determining the scanning order based on the prediction mode. The specific process is: respectively counting the probability of non-zero coefficients of each frequency of the residual image in each mode, and according to the value of the probability, from large to large Generate a scan order table in order to replace a single zigzag scan table. The zigzag scanning refers to the encoding order of coefficients of transformed and quantized blocks in a video encoding scheme, and the order has a great influence on encoding efficiency. Referring to FIG. 4 , in current encoding systems (jpeg, mpeg, etc.), a fixed scanning order is generally adopted for blocks of the same size.
在编码扫描时,根据选定的模式顺序查阅扫描顺序表,并按查得的位置的顺序对残差系数进行扫描。When coding and scanning, the scan order table is consulted according to the selected mode order, and the residual coefficients are scanned in the order of the found positions.
所述的解码过程为:The described decoding process is:
步骤200:通过熵解码得到预测模式和频域残差系数;Step 200: Obtain the prediction mode and frequency domain residual coefficients through entropy decoding;
步骤201:根据熵解码得到的预测模式;由当前解码块的临近块的解码图像生成预测图像;Step 201: According to the prediction mode obtained by entropy decoding; generate a prediction image from the decoded image of the adjacent block of the currently decoded block;
步骤202:把预测图像变换到频域;Step 202: Transform the predicted image into the frequency domain;
步骤203:量化预测图像的频域系数,得到频域系数矩阵;Step 203: Quantize the frequency-domain coefficients of the predicted image to obtain a frequency-domain coefficient matrix;
步骤204:按照如下的公式,把频域系数矩阵补偿到频域残差系数上,Step 204: Compensate the frequency domain coefficient matrix to the frequency domain residual coefficient according to the following formula,
C=C+ZC=C+Z
其中,in,
C为频域残差系数,C is the frequency domain residual coefficient,
Z为频域系数矩阵;Z is the frequency domain coefficient matrix;
步骤205:反量化频域残差系数;Step 205: dequantize the residual coefficient in the frequency domain;
步骤206:按照块大小和模式,反变换频域残差系数得到初步的重构图像;Step 206: According to the block size and mode, inversely transform the residual coefficients in the frequency domain to obtain a preliminary reconstructed image;
步骤207:对重构图像做去除块效应的滤波,得到当前块的输出图像。Step 207: Filter the reconstructed image to remove block effects to obtain an output image of the current block.
所述的解码过程还可以为:The decoding process can also be:
步骤210:通过熵解码得到预测模式和频域残差系数;Step 210: Obtain the prediction mode and frequency domain residual coefficient through entropy decoding;
步骤211:根据熵解码得到的预测模式;由当前解码块的临近块的解码图像生成预测图像;Step 211: According to the prediction mode obtained by entropy decoding; generate a prediction image from the decoded image of the adjacent block of the currently decoded block;
步骤212:把预测图像变换到频域;Step 212: Transform the predicted image into the frequency domain;
步骤213:量化预测图像的频域系数,得到频域系数的矩阵;Step 213: Quantize the frequency-domain coefficients of the predicted image to obtain a matrix of frequency-domain coefficients;
步骤214:分别反量化频域系数和频域残差系数;Step 214: dequantize the frequency domain coefficient and the frequency domain residual coefficient respectively;
步骤215:把经过反量化的频域系数矩阵补偿到经过反量化的频域残差系数上;Step 215: Compensate the dequantized frequency domain coefficient matrix to the dequantized frequency domain residual coefficient;
步骤216:按照块大小和模式,反变换频域残差系数得到初步的重构图像;Step 216: According to the block size and mode, inversely transform the residual coefficients in the frequency domain to obtain a preliminary reconstructed image;
步骤217:对重构图像做去除块效应的滤波,得到当前块的输出图像。Step 217: Filter the reconstructed image to remove block effects to obtain an output image of the current block.
所述的解码过程又可以为:Described decoding process can be again:
步骤220:通过熵解码得到预测模式和频域残差系数;Step 220: Obtain the prediction mode and frequency-domain residual coefficients through entropy decoding;
步骤221:根据熵解码得到的预测模式;由当前解码块的临近块的解码图像生成预测图像;Step 221: According to the prediction mode obtained by entropy decoding; generate a prediction image from the decoded image of the adjacent block of the currently decoded block;
步骤222:把预测图像变换到频域;Step 222: Transform the predicted image into the frequency domain;
步骤223:量化预测图像的频域系数,得到频域系数的矩阵;Step 223: Quantize the frequency-domain coefficients of the predicted image to obtain a matrix of frequency-domain coefficients;
步骤224:分别反量化频域系数和频域残差系数;Step 224: Dequantize the frequency domain coefficient and the frequency domain residual coefficient respectively;
步骤225:分别按照块大小和模式,反变换频域系数和频域残差系数;Step 225: Inversely transform the frequency domain coefficients and frequency domain residual coefficients according to the block size and mode respectively;
步骤226:把经过反量化和反变换的频域系数矩阵补偿到频域残差系数上,得到初步的重构图像;Step 226: Compensate the dequantized and inversely transformed frequency-domain coefficient matrix to the frequency-domain residual coefficients to obtain a preliminary reconstructed image;
步骤227:对重构图像做去除块效应的滤波,得到当前块的输出图像。Step 227: Filter the reconstructed image to remove block effects to obtain an output image of the current block.
在上述的解码扫描时,根据选定的模式顺序查阅扫描顺序表,并按查得的位置的顺序对残差系数进行扫描。During the decoding and scanning described above, the scan order table is consulted according to the selected mode order, and the residual coefficients are scanned in the order of the found positions.
一种用于视频编码的新型空间预测装置,它至少包括编码模块和解码模块;其中,A novel spatial prediction device for video encoding, which at least includes an encoding module and a decoding module; wherein,
该编码模块至少设有:预测模块、计算残差系数模块、扫描模块和熵编码模块;该预测模块将输入的重构图像进行处理,得到预测图像,该预测图像经过计算残差系数模块处理后对当前编码图像进行补偿,然后,该补偿后的码流经过扫描模块处理后,再由熵编码模块进行编码输出;The encoding module is at least provided with: a prediction module, a module for calculating residual coefficients, a scanning module and an entropy encoding module; the prediction module processes the input reconstructed image to obtain a predicted image, and the predicted image is processed by the module for calculating residual coefficients Compensate the current encoded image, and then, after the compensated code stream is processed by the scanning module, it is encoded and output by the entropy encoding module;
该解码模块至少设有:熵解码模块、补偿模块、反量化模块、反变换模块和变换量化模块;依次对输入的码流信号进行熵解码、反量化和反变换;变换量化模块对预测图像进行处理,获得解码过程中的补偿信息。The decoding module is at least provided with: an entropy decoding module, a compensation module, an inverse quantization module, an inverse transformation module, and a transformation and quantization module; entropy decoding, inverse quantization, and inverse transformation are performed on the input code stream signal in turn; the transformation and quantization module performs prediction on the image Processing to obtain compensation information in the decoding process.
该编码模块和/或解码模块中还设有基于预测模式决定扫描顺序的模式选择模块,用于控制预测模块和扫描模块中的方式选择,提高编码和/或解码效率;该扫描模块分别统计每种模式下残差图像每个频率的系数非0的概率,并按照该概率的值,从大到小的顺序生成扫描顺序表,用以代替单一的zigzag扫描表。The encoding module and/or decoding module is also provided with a mode selection module that determines the scanning order based on the prediction mode, which is used to control the mode selection in the prediction module and the scanning module, and improve the encoding and/or decoding efficiency; the scanning module counts each In this mode, the probability that the coefficient of each frequency of the residual image is non-zero, and according to the value of the probability, a scanning sequence table is generated in descending order to replace a single zigzag scanning table.
所述的编码具体为:The codes described are specifically:
预测模块根据模式选择模块选定的预测模式,由当前编码块的临近块的解码图像生成预测图像;The prediction module generates a prediction image from the decoded images of adjacent blocks of the current coding block according to the prediction mode selected by the mode selection module;
计算残差系数模块把预测图像变换到频域,并量化预测图像的频域系数,其中,量化系数与处理残差图像时采用的量化系数相同;且量化后的频域系数的矩阵满足如下的公式:The module for calculating residual coefficients transforms the predicted image into the frequency domain, and quantizes the frequency domain coefficients of the predicted image, wherein the quantized coefficients are the same as the quantized coefficients used when processing the residual image; and the matrix of the quantized frequency domain coefficients satisfies the following formula:
Z=Q(Y)=(Y×Quant(Qp)+Qconst(Qp))>>Q_bit(Qp)Z=Q(Y)=(Y×Quant(Qp)+Qconst(Qp))>>Q_bit(Qp)
其中,in,
Z为量化后的频域系数矩阵;Z is the quantized frequency domain coefficient matrix;
Y为频域系数矩阵;Y is the frequency domain coefficient matrix;
Qp为量化参数Qp is the quantization parameter
Quant(Qp)、Qconst(Qp)、Q_bit(Qp)为由JVT定义的量化时的函数;Quant(Qp), Qconst(Qp), Q_bit(Qp) are quantization functions defined by JVT;
计算残差系数模块依据如下的公式对获得的频域系数的矩阵进行反量化;The residual coefficient calculation module dequantizes the matrix of obtained frequency domain coefficients according to the following formula;
W=DQ(Z)=(Z×DQuant(Qp)+DQconst(Qp))>>Q_per(Qp)W=DQ(Z)=(Z×DQuant(Qp)+DQconst(Qp))>>Q_per(Qp)
DQuant(Qp)×DQconst(Qp)≈2Q_per(Qp)×Q_bit(Qp) DQuant(Qp)×DQconst(Qp)≈2 Q_per(Qp)×Q_bit(Qp)
其中,in,
W为反量化后的频域系数矩阵,W is the frequency domain coefficient matrix after inverse quantization,
Z为量化后反量化前的频域系数矩阵,Z is the frequency domain coefficient matrix before inverse quantization after quantization,
Qp为量化参数,Qp is the quantization parameter,
DQuant(Qp)、DQconst(Qp)、Q_bit(Qp)、Q_per(Qp)为由JVT定义的量化时的函数;DQuant(Qp), DQconst(Qp), Q_bit(Qp), Q_per(Qp) are quantization functions defined by JVT;
计算残差系数模块采用上述的方法将被编码的当前块变换到频域,得到频域图像;并进一步减去频域系数矩阵直接得到频域残差图像;再对频域残差图像进行量化,得到量化后的频域残差系数;The calculation residual coefficient module adopts the above method to transform the encoded current block into the frequency domain to obtain a frequency domain image; further subtract the frequency domain coefficient matrix to directly obtain the frequency domain residual image; then quantize the frequency domain residual image , to obtain the quantized frequency domain residual coefficient;
扫描模块对频域残差系数做系数扫描;该熵编码模块对扫描后的信息进行编码得到码流;The scanning module performs coefficient scanning on the residual coefficients in the frequency domain; the entropy encoding module encodes the scanned information to obtain a code stream;
补偿模块按照如下的公式,把频域系数矩阵补偿到频域残差系数上;The compensation module compensates the frequency domain coefficient matrix to the frequency domain residual coefficient according to the following formula;
C=C+Z,C=C+Z,
其中,in,
C为频域残差系数;C is the frequency domain residual coefficient;
Z为频域系数矩阵;Z is the frequency domain coefficient matrix;
反量化模块根据JVT的公式对频域残差系数反量化;反变换模块按照块的大小和模式对频域残差系数反变换,得到初步的重构图像;滤波模块对重构图像做去除块效应的滤波,得到当前块的输出图像。The inverse quantization module dequantizes the residual coefficients in the frequency domain according to the JVT formula; the inverse transformation module inversely transforms the residual coefficients in the frequency domain according to the block size and mode to obtain a preliminary reconstructed image; the filtering module removes blocks from the reconstructed image Effect filtering to get the output image of the current block.
所述的解码具体为:The decoding is specifically:
熵解码模块对输入的码流进行解码得到预测模式和频域残差系数;然后根据熵解码得到的预测模式;由当前解码块的临近块的解码图像生成预测图像;The entropy decoding module decodes the input code stream to obtain the prediction mode and the residual coefficient in the frequency domain; then according to the prediction mode obtained by entropy decoding; the prediction image is generated from the decoded image of the adjacent block of the current decoding block;
变换量化模块把预测图像变换到频域,并且量化预测图像的频域系数,得到频域系数矩阵;The transformation and quantization module transforms the predicted image into the frequency domain, and quantizes the frequency domain coefficients of the predicted image to obtain a frequency domain coefficient matrix;
补偿模块按照如下的公式,把频域系数矩阵补偿到频域残差系数上,The compensation module compensates the frequency domain coefficient matrix to the frequency domain residual coefficient according to the following formula,
C=C+ZC=C+Z
其中,in,
C为频域残差系数;C is the frequency domain residual coefficient;
Z为频域系数矩阵;Z is the frequency domain coefficient matrix;
反量化模块对频域残差系数进行反量化处理;The inverse quantization module performs inverse quantization processing on the frequency domain residual coefficient;
反变换模块按照块的大小和模式,对频域残差系数进行反变换,得到初步的重构图像;最后滤波模块对重构图像做去除块效应的滤波,得到当前块的输出图像。The inverse transform module inversely transforms the residual coefficients in the frequency domain according to the size and mode of the block to obtain a preliminary reconstructed image; finally, the filtering module filters the reconstructed image to remove the block effect to obtain the output image of the current block.
所述的解码具体还可以为:Described decoding can specifically also be:
熵解码模块对输入的码流进行解码得到预测模式和频域残差系数;然后根据熵解码得到的预测模式;由当前解码块的临近块的解码图像生成预测图像;The entropy decoding module decodes the input code stream to obtain the prediction mode and the residual coefficient in the frequency domain; then according to the prediction mode obtained by entropy decoding; the prediction image is generated from the decoded image of the adjacent block of the current decoding block;
变换量化模块把预测图像变换到频域,并且量化预测图像的频域系数,得到频域系数矩阵;The transformation and quantization module transforms the predicted image into the frequency domain, and quantizes the frequency domain coefficients of the predicted image to obtain a frequency domain coefficient matrix;
分别位于熵解码模块和变换量化模块之后的反量化模块,分别反量化频域系数和频域残差系数;An inverse quantization module located after the entropy decoding module and the transform quantization module respectively, respectively dequantizes frequency domain coefficients and frequency domain residual coefficients;
补偿模块把经过反量化的频域系数矩阵补偿到经过反量化的频域残差系数上;The compensation module compensates the dequantized frequency domain coefficient matrix to the dequantized frequency domain residual coefficient;
反变换模块按照块的大小和模式,反变换频域残差系数得到初步的重构图像;最后,对重构图像做去除块效应的滤波,得到当前块的输出图像。The inverse transformation module inversely transforms the residual coefficients in the frequency domain according to the size and mode of the block to obtain a preliminary reconstructed image; finally, filters the reconstructed image to remove the block effect to obtain the output image of the current block.
所述的解码具体又可以为:The decoding can be specifically described as:
熵解码模块对输入的码流进行解码得到预测模式和频域残差系数;然后根据熵解码得到的预测模式;由当前解码块的临近块的解码图像生成预测图像;The entropy decoding module decodes the input code stream to obtain the prediction mode and the residual coefficient in the frequency domain; then according to the prediction mode obtained by entropy decoding; the prediction image is generated from the decoded image of the adjacent block of the current decoding block;
变换量化模块把预测图像变换到频域,并且量化预测图像的频域系数,得到频域系数矩阵;The transformation and quantization module transforms the predicted image into the frequency domain, and quantizes the frequency domain coefficients of the predicted image to obtain a frequency domain coefficient matrix;
分别位于熵解码模块和变换量化模块之后的反量化模块,分别反量化频域系数和频域残差系数;An inverse quantization module located after the entropy decoding module and the transform quantization module respectively, respectively dequantizes frequency domain coefficients and frequency domain residual coefficients;
位于反量化模块之后的反变换模块分别按照块大小和模式,反变换频域系数和频域残差系数;The inverse transformation module located after the inverse quantization module inversely transforms the frequency domain coefficients and the frequency domain residual coefficients according to the block size and mode, respectively;
补偿模块把经过反量化和反变换的频域系数矩阵补偿到频域残差系数上,得到初步的重构图像;最后,对重构图像做去除块效应的滤波,得到当前块的输出图像。The compensation module compensates the dequantized and inversely transformed frequency-domain coefficient matrix to the frequency-domain residual coefficients to obtain a preliminary reconstructed image; finally, filters the reconstructed image to remove block effects to obtain the output image of the current block.
解码模块在解码时,还根据选定的模式顺序查阅扫描顺序表,并按查得的位置的顺序对残差系数进行扫描。When decoding, the decoding module also consults the scan order table according to the selected mode order, and scans the residual coefficients in the order of the found positions.
通过对以上技术方案的分析,本发明具有以下的优点:By analyzing the above technical solutions, the present invention has the following advantages:
1、通过上述用于视频编码的新型空间预测方法,克服了基于多方向空间预测的视频编码方法在应用于连续I帧编码时,产生闪烁现象的缺陷,提高了多方向空间预测的视频编码方法的编码效率,为基于多方向空间预测的视频编码技术提供了抗闪烁的连续I帧编码方案,和基于模式的残差系数扫描方案,在减轻闪烁现象的同时,还进一步保证了编码效率。1. Through the above-mentioned new spatial prediction method for video coding, it overcomes the defect that the video coding method based on multi-directional spatial prediction produces flicker when it is applied to continuous I frame coding, and improves the video coding method of multi-directional spatial prediction The coding efficiency provides a flicker-resistant continuous I-frame coding scheme and a pattern-based residual coefficient scanning scheme for the video coding technology based on multi-directional spatial prediction, which further ensures the coding efficiency while reducing the flickering phenomenon.
2、本发明以JVT标准作为实施案例,为JVT标准提供了解决连续I帧编码闪烁问题,并为提高该标准的编码效率提供了具体的技术手段。2. The present invention takes the JVT standard as an implementation example, provides a solution to the problem of continuous I-frame coding flicker for the JVT standard, and provides specific technical means for improving the coding efficiency of the standard.
3、本发明提供的装置提供了实现上述方法的具体系统结构,和实现该系统的硬件模块及其组合方案。3. The device provided by the present invention provides a specific system structure for realizing the above method, and a hardware module and a combination scheme for realizing the system.
附图说明: Description of drawings :
图1为JVT中宏块细分的示意图。FIG. 1 is a schematic diagram of macroblock subdivision in JVT.
图2为Intra4×4模式下,每4×4的小块中像素的预测示意图。FIG. 2 is a schematic diagram of prediction of pixels in each 4×4 small block in the Intra4×4 mode.
图3为帧内预测模式的预测方向示意图。FIG. 3 is a schematic diagram of a prediction direction of an intra prediction mode.
图4为目前的编码系统中普遍采用的固定扫描顺序示意图。FIG. 4 is a schematic diagram of a fixed scanning sequence commonly used in current coding systems.
图5为现有技术的编码过程示意图。FIG. 5 is a schematic diagram of an encoding process in the prior art.
图6为现有技术的编码装置示意图。Fig. 6 is a schematic diagram of an encoding device in the prior art.
图7为现有技术中多方向空间预测编码系统解码部分的信号流程图。FIG. 7 is a signal flow diagram of the decoding part of the multi-directional spatial predictive coding system in the prior art.
图8为本发明新的扫描方式的流程图。Fig. 8 is a flow chart of the new scanning mode of the present invention.
图9为本发明一具有新扫描方式实施例的编码示意图。FIG. 9 is a schematic diagram of encoding in an embodiment of a new scanning mode of the present invention.
图10为本发明抗闪烁解码端流程图。FIG. 10 is a flowchart of the anti-flicker decoding terminal of the present invention.
图11为本发明一实施例的解码部分的框图。FIG. 11 is a block diagram of a decoding portion of an embodiment of the present invention.
图12为本发明另一实施例的解码部分的框图。Fig. 12 is a block diagram of a decoding section of another embodiment of the present invention.
图13为本发明又一实施例的解码部分的框图。Fig. 13 is a block diagram of the decoding part of still another embodiment of the present invention.
具体实施方式Detailed ways
以下结合具体的实施例对本发明做进一步详细的说明:Below in conjunction with specific embodiment the present invention is described in further detail:
本发明提供了一种用于视频编码的新型空间预测方法及其装置,其目的在于有效减轻基于多方向空间预测的视频编码方法,在连续I帧编码时产生的闪烁现象;并根据预测模式来决定扫描的顺序,用于有效提高基于多方向空间预测的视频编码方法的编码效率。The present invention provides a novel spatial prediction method and device for video coding, the purpose of which is to effectively alleviate the flickering phenomenon generated during continuous I-frame coding in a video coding method based on multi-directional spatial prediction; and according to the prediction mode The order of scanning is determined, which is used to effectively improve the coding efficiency of the video coding method based on multi-directional spatial prediction.
在JVT编码标准中,本发明的一实施例中采用了如下的步骤实现抗闪烁处理:In the JVT coding standard, the following steps are adopted in an embodiment of the present invention to realize anti-flicker processing:
参见图8、图9,See Figure 8, Figure 9,
编码端的处理:Processing on the encoding side:
1、生成预测图像:根据选定的预测模式,由当前编码块的临近块的解码图像生成预测图像;这一步与JVT原有步骤相同;1. Generate a predicted image: according to the selected prediction mode, generate a predicted image from the decoded image of the adjacent block of the current coding block; this step is the same as the original step of JVT;
2、把预测图像变换到频域,变换的方法与JVT中处理残差图像时采用的变换方法相同;例如,对于4×4的块,设输入为X,则输出Y为:2. Transform the predicted image to the frequency domain, and the transformation method is the same as the transformation method used when processing the residual image in JVT; for example, for a 4×4 block, if the input is X, the output Y is:
其中,Y为预测图像的频域系数,X为预测图像;Among them, Y is the frequency domain coefficient of the predicted image, and X is the predicted image;
3、量化预测图像的频域系数Y;量化系数Qp与处理残差图像时采用的Qp相同,设量化后的频域系数的矩阵为Z;则量化公式为:3. Quantize the frequency domain coefficient Y of the predicted image; the quantization coefficient Qp is the same as the Qp used when processing the residual image, and the matrix of the quantized frequency domain coefficient is set to Z; then the quantization formula is:
Z=Q(Y)=(Y×Quant(Qp)+Qconst(Qp))>>Q_bit(Qp)Z=Q(Y)=(Y×Quant(Qp)+Qconst(Qp))>>Q_bit(Qp)
4、对频域系数的矩阵Z反量化得到W;这里的反量化与JVT中的反量化有区别:JVT中的反量化与量化的尺度并不一样,4. Dequantize the matrix Z of the frequency domain coefficients to obtain W; the dequantization here is different from the dequantization in JVT: the dequantization in JVT is not the same as the quantization scale,
在JVT中,其反量化公式为:In JVT, its dequantization formula is:
W=DQ(Z)=(Z×DQuant(Qp)+DQconst(Qp))>>Q_per(Qp)W=DQ(Z)=(Z×DQuant(Qp)+DQconst(Qp))>>Q_per(Qp)
为了使量化后的系数恢复到量化前的尺度,就必须重新设计反量化公式:本发明的反量化公式为:In order to restore the quantized coefficient to the scale before quantization, the inverse quantization formula must be redesigned: the inverse quantization formula of the present invention is:
W=DQ’(Z)=(Z×DQuant’(Qp)+DQcons t’(Qp))>>Q_per’(Qp)W=DQ’(Z)=(Z×DQuant’(Qp)+DQcons t’(Qp))>>Q_per’(Qp)
并且,新的公式须满足:And, the new formula must satisfy:
DQuant’(Qp)×Quant(Qp)近似等于2Q_per’(Qp)×Q_bit(Qp) DQuant'(Qp)×Quant(Qp) is approximately equal to 2 Q_per'(Qp)×Q_bit(Qp)
5、把要编码的当前块I变换到频域得到频域图像F;方法同上;5. Transform the current block I to be encoded into the frequency domain to obtain a frequency domain image F; the method is the same as above;
6、频域图像F减去W直接得到频域残差图像S;6. Subtract W from the frequency domain image F to directly obtain the frequency domain residual image S;
7、量化频域残差图像S得到量化后的频域残差系数C,公式同上;7. Quantize the frequency domain residual image S to obtain the quantized frequency domain residual coefficient C, the formula is the same as above;
8、对频域残差系数C做系数扫描,熵编码得到码流;8. Perform coefficient scanning on the residual coefficient C in the frequency domain, and entropy coding to obtain the code stream;
9、把Z补偿到频域残差系数C上;即C=C+Z;9. Compensate Z to the frequency domain residual coefficient C; that is, C=C+Z;
10、反量化频域残差系数C,用JVT的公式;10. Dequantize the residual coefficient C in the frequency domain, using the formula of JVT;
11、反变换频域残差系数C得到初步的重构图像B,按照块大小和模式用JVT原有的反变换方法;11. Inversely transform the residual coefficient C in the frequency domain to obtain a preliminary reconstructed image B, and use the original inverse transformation method of JVT according to the block size and mode;
12、对重构图像B做去除块效应的滤波,得到当前块的输出图像0。12. Perform filtering to remove the block effect on the reconstructed image B to obtain an output image 0 of the current block.
参见图10、图11See Figure 10, Figure 11
解码端的处理之一:One of the processing on the decoding end:
1、熵解码得到预测模式和频域残差系数C;1. Entropy decoding to obtain the prediction mode and frequency domain residual coefficient C;
2、生成预测图像:根据熵解码得到的预测模式,由当前解码块的临近块的解码图像生成预测图像。这一步与JVT原有步骤相同;2. Generating a predicted image: According to the prediction mode obtained by entropy decoding, a predicted image is generated from the decoded images of adjacent blocks of the currently decoded block. This step is the same as the original step of JVT;
3、把预测图像变换到频域,变换的方法与JVT中处理残差图像时采用的变换方法相同,这一步与编码时的第2步骤相同;3. Transform the predicted image to the frequency domain, the method of transformation is the same as the transformation method adopted when processing the residual image in JVT, and this step is the same as the second step during encoding;
4、量化预测图像的频域系数Y,得到频域系数的矩阵Z,这一步与编码时的第3步骤相同;4. Quantize the frequency domain coefficient Y of the predicted image to obtain the matrix Z of the frequency domain coefficients. This step is the same as the third step during encoding;
5、把频域系数的矩阵Z补偿到频域残差系数C上;即C=C+Z;同编码流程的步骤9;5. Compensate the matrix Z of frequency domain coefficients to the frequency domain residual coefficient C; that is, C=C+Z; the same as step 9 of the encoding process;
6、量化频域残差系数C,用JVT的公式;同编码流程的步骤10;6. Quantize the residual coefficient C in the frequency domain, using the formula of JVT; the same as step 10 of the encoding process;
7、反变换频域残差系数C得到初步的重构图像B;按照块大小和模式用JVT原有的反变换方法;与编码流程的第11步骤相同;7. Inversely transform the residual coefficient C in the frequency domain to obtain a preliminary reconstructed image B; use the original inverse transformation method of JVT according to the block size and mode; it is the same as the eleventh step of the encoding process;
8、对重构图像B做去除块效应的滤波,得到当前块的输出图像0;与编码流程的第12步骤相同;8. Perform filtering to remove the block effect on the reconstructed image B to obtain the output image 0 of the current block; it is the same as the twelfth step of the encoding process;
参见图12、图13,本发明解码端的处理之二、之三:与上述的解码端的处理之一基本相同,不同的是:解码端的处理之一直接在量化后补偿,解码端的处理之二为做完反量化再补偿,解码端的处理之三则是做完反变换后补偿。Referring to Fig. 12 and Fig. 13, the second and third processing of the decoding end of the present invention are basically the same as one of the above-mentioned processing of the decoding end, the difference is that one of the processing of the decoding end is directly compensated after quantization, and the second processing of the decoding end is Compensation after inverse quantization is done, and the third processing at the decoding end is compensation after inverse transformation.
上述的方案二、三与方案一类似,只是补偿的位置不同,按补偿位置的不同,还要对量化后的预测图像做反量化和反变换。The above schemes 2 and 3 are similar to scheme 1, except that the position of compensation is different. According to the difference of compensation position, inverse quantization and inverse transformation should be performed on the quantized predicted image.
本发明的基于预测模式决定扫描顺序的方法则可以有效提高基于多方向空间预测的视频编码方法的编码效率。在JVT编码标准中,采用如下步骤实现基于预测模式的扫描模块:The method for determining the scanning order based on the prediction mode of the present invention can effectively improve the coding efficiency of the video coding method based on multi-directional spatial prediction. In the JVT coding standard, the following steps are used to realize the scanning module based on the prediction mode:
在设计阶段:首先,分别统计每种模式下残差图像每个频率的系数非0的概率;然后,按照概率从大到小的顺序生成扫描顺序表(例如:以变量矩阵T(m,i)表示;即:第m模式下第i个扫描的系数的位置为T(m,i))。代替单一的zigzag扫描表Z(i)。In the design stage: first, the probability of non-zero coefficients of each frequency of the residual image in each mode is counted separately; then, the scan order table is generated in order of probability from large to small (for example: with variable matrix T(m, i ) means; that is, the position of the coefficient of the i-th scan in the m-th mode is T(m, i)). Instead of a single zigzag scan table Z(i).
在编解码阶段:In the codec stage:
当进行扫描时,根据选定的模式m,并按i的递增的顺序查扫描顺序表T,按查得的位置的顺序对残差系数进行扫描。When scanning, according to the selected mode m, look up the scanning sequence table T in the increasing order of i, and scan the residual coefficients in the order of the found positions.
参见图9,本发明的装置中的编码模块在现有技术的装置基础上,于计算残差系数模块和熵编码模块之间还设有新的扫描模块,该新的扫描模块根据模式选择模块的控制,选择预定的扫描顺序,从而提高处理的效率。Referring to Fig. 9, the coding module in the device of the present invention is based on the device of the prior art, and a new scanning module is also provided between the calculation residual coefficient module and the entropy coding module, and the new scanning module is based on the mode selection module control, select a predetermined scan sequence, thereby improving the efficiency of processing.
参见图11、12、13,本发明的装置中的解码模块,均增设有变换量化模块,并且包括熵解码模块、反量化模块、反变换模块和预测补偿模块,所不同的是:在不同的实施例中,预测补偿模块的位置可以分别设置在熵解码模块之后,或反量化模块之后,或反变换模块之后。以图11为例,具体的解码过程包括:对码流进行熵解码之后。经过变换量化模块处理的预测图像和经过熵解码的码流信息在预测补偿模块中进行补偿处理,然后依次经过反量化模块和反变换模块处理后输出。与图11不同的是:图12、13所示的预测补偿位置分别位于反量化模块或反变换模块之后。Referring to Figures 11, 12, and 13, the decoding modules in the device of the present invention are all equipped with a transform and quantization module, and include an entropy decoding module, an inverse quantization module, an inverse transformation module, and a prediction compensation module. The difference is that in different In an embodiment, the position of the prediction compensation module may be respectively set after the entropy decoding module, or after the inverse quantization module, or after the inverse transformation module. Taking Fig. 11 as an example, the specific decoding process includes: after performing entropy decoding on the code stream. The predicted image processed by the transform and quantization module and the entropy-decoded code stream information are compensated in the prediction compensation module, and then processed by the inverse quantization module and the inverse transformation module in turn before being output. The difference from FIG. 11 is that the prediction and compensation positions shown in FIGS. 12 and 13 are respectively located after the inverse quantization module or the inverse transformation module.
最后应说明的是:以上实施例仅用以说明本发明而非限制,尽管参照上述公开的较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解:依然可以对本发明进行修改或者等同替换;而不脱离本发明所记载的精神和范围的所有技术方案,其均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that: the above embodiments are only used to illustrate the present invention without limitation, although the present invention has been described in detail with reference to the preferred embodiments disclosed above, those of ordinary skill in the art should understand that: the present invention can still be modified Or an equivalent replacement; all technical solutions that do not depart from the spirit and scope of the present invention shall be covered by the scope of the claims of the present invention.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN02130833.0A CN1225126C (en) | 2002-10-09 | 2002-10-09 | Space predicting method and apparatus for video encoding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN02130833.0A CN1225126C (en) | 2002-10-09 | 2002-10-09 | Space predicting method and apparatus for video encoding |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1489391A true CN1489391A (en) | 2004-04-14 |
CN1225126C CN1225126C (en) | 2005-10-26 |
Family
ID=34144647
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN02130833.0A Expired - Fee Related CN1225126C (en) | 2002-10-09 | 2002-10-09 | Space predicting method and apparatus for video encoding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1225126C (en) |
Cited By (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100405848C (en) * | 2005-09-16 | 2008-07-23 | 宁波大学 | A Quantization Method Used in Video Image Coding Process |
CN101677405A (en) * | 2008-09-19 | 2010-03-24 | 香港科技大学 | Transcoding-based robust streaming media techniques and systems for compressed video |
CN101228797B (en) * | 2005-07-21 | 2010-05-19 | 三星电子株式会社 | Method and apparatus for encoding and decoding video signal according to extending directional intra prediction |
CN101147401B (en) * | 2005-03-25 | 2010-06-16 | 三星电子株式会社 | Video coding and decoding method using weighted prediction and apparatus for the same |
CN101895757A (en) * | 2010-07-15 | 2010-11-24 | 北京大学 | Method and system for reordering and inversely reordering predicted residual blocks |
CN101895756A (en) * | 2010-07-15 | 2010-11-24 | 北京大学 | Method and system for coding, decoding and reconstructing video image blocks |
CN101288313B (en) * | 2005-10-14 | 2011-09-14 | 日本电气株式会社 | Image encoding method, device using the same |
WO2011137814A1 (en) * | 2010-09-30 | 2011-11-10 | 华为技术有限公司 | Scanning method and device, reverse scanning method and device |
WO2011150805A1 (en) * | 2010-09-30 | 2011-12-08 | 华为技术有限公司 | Method, apparatus and system for processing image residual block |
CN101091393B (en) * | 2004-12-28 | 2012-03-07 | 日本电气株式会社 | Moving picture encoding method, device using the same |
CN101742323B (en) * | 2008-11-05 | 2013-05-01 | 上海天荷电子信息有限公司 | Method and device for coding and decoding re-loss-free video |
CN101335893B (en) * | 2007-05-25 | 2013-05-22 | 辉达公司 | Efficient encoding/decoding of a sequence of data frames |
US8660380B2 (en) | 2006-08-25 | 2014-02-25 | Nvidia Corporation | Method and system for performing two-dimensional transform on data value array with reduced power consumption |
US8660182B2 (en) | 2003-06-09 | 2014-02-25 | Nvidia Corporation | MPEG motion estimation based on dual start points |
US8666181B2 (en) | 2008-12-10 | 2014-03-04 | Nvidia Corporation | Adaptive multiple engine image motion detection system and method |
CN101933331B (en) * | 2007-09-06 | 2014-04-09 | 日本电气株式会社 | Video encoding device, video decoding method and video encoding method |
US8724702B1 (en) | 2006-03-29 | 2014-05-13 | Nvidia Corporation | Methods and systems for motion estimation used in video coding |
US8731071B1 (en) | 2005-12-15 | 2014-05-20 | Nvidia Corporation | System for performing finite input response (FIR) filtering in motion estimation |
US8873625B2 (en) | 2007-07-18 | 2014-10-28 | Nvidia Corporation | Enhanced compression in representing non-frame-edge blocks of image frames |
US9118927B2 (en) | 2007-06-13 | 2015-08-25 | Nvidia Corporation | Sub-pixel interpolation and its application in motion compensated encoding of a video signal |
CN104885453A (en) * | 2012-11-29 | 2015-09-02 | Lg电子株式会社 | Method and device for encoding/ decoding image supporting plurality of layers |
US9330060B1 (en) | 2003-04-15 | 2016-05-03 | Nvidia Corporation | Method and device for encoding and decoding video image data |
CN105847845A (en) * | 2010-07-19 | 2016-08-10 | Sk电信有限公司 | Video decoding method |
CN106105047A (en) * | 2014-03-14 | 2016-11-09 | 夏普株式会社 | There is the video compress of color space scalability |
CN106341689A (en) * | 2016-09-07 | 2017-01-18 | 中山大学 | Method and system for optimizing AVS2 quantization module and inverse quantization module |
CN106454345A (en) * | 2011-03-07 | 2017-02-22 | 杜比国际公司 | Method of coding and decoding images, coding and decoding device |
CN108156457A (en) * | 2017-12-27 | 2018-06-12 | 郑州云海信息技术有限公司 | A kind of JPEG turns the method for encoding images and device of WebP |
CN109769104A (en) * | 2018-10-26 | 2019-05-17 | 西安科锐盛创新科技有限公司 | Unmanned plane panoramic picture transmission method and device |
CN114449241A (en) * | 2022-02-18 | 2022-05-06 | 复旦大学 | Color space conversion algorithm suitable for image compression |
-
2002
- 2002-10-09 CN CN02130833.0A patent/CN1225126C/en not_active Expired - Fee Related
Cited By (44)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9330060B1 (en) | 2003-04-15 | 2016-05-03 | Nvidia Corporation | Method and device for encoding and decoding video image data |
US8660182B2 (en) | 2003-06-09 | 2014-02-25 | Nvidia Corporation | MPEG motion estimation based on dual start points |
CN101091393B (en) * | 2004-12-28 | 2012-03-07 | 日本电气株式会社 | Moving picture encoding method, device using the same |
CN101147401B (en) * | 2005-03-25 | 2010-06-16 | 三星电子株式会社 | Video coding and decoding method using weighted prediction and apparatus for the same |
CN101228796B (en) * | 2005-07-21 | 2010-06-16 | 三星电子株式会社 | Method and apparatus for encoding and decoding video signal according to directional intra-residual prediction |
CN101228797B (en) * | 2005-07-21 | 2010-05-19 | 三星电子株式会社 | Method and apparatus for encoding and decoding video signal according to extending directional intra prediction |
CN100405848C (en) * | 2005-09-16 | 2008-07-23 | 宁波大学 | A Quantization Method Used in Video Image Coding Process |
CN101288313B (en) * | 2005-10-14 | 2011-09-14 | 日本电气株式会社 | Image encoding method, device using the same |
US8731071B1 (en) | 2005-12-15 | 2014-05-20 | Nvidia Corporation | System for performing finite input response (FIR) filtering in motion estimation |
US8724702B1 (en) | 2006-03-29 | 2014-05-13 | Nvidia Corporation | Methods and systems for motion estimation used in video coding |
US8660380B2 (en) | 2006-08-25 | 2014-02-25 | Nvidia Corporation | Method and system for performing two-dimensional transform on data value array with reduced power consumption |
US8666166B2 (en) | 2006-08-25 | 2014-03-04 | Nvidia Corporation | Method and system for performing two-dimensional transform on data value array with reduced power consumption |
US8756482B2 (en) | 2007-05-25 | 2014-06-17 | Nvidia Corporation | Efficient encoding/decoding of a sequence of data frames |
CN101335893B (en) * | 2007-05-25 | 2013-05-22 | 辉达公司 | Efficient encoding/decoding of a sequence of data frames |
US9118927B2 (en) | 2007-06-13 | 2015-08-25 | Nvidia Corporation | Sub-pixel interpolation and its application in motion compensated encoding of a video signal |
US8873625B2 (en) | 2007-07-18 | 2014-10-28 | Nvidia Corporation | Enhanced compression in representing non-frame-edge blocks of image frames |
CN101933331B (en) * | 2007-09-06 | 2014-04-09 | 日本电气株式会社 | Video encoding device, video decoding method and video encoding method |
CN101677405B (en) * | 2008-09-19 | 2013-10-16 | 香港科技大学 | Transcoding-based robust streaming technology and system for compressed video |
CN101677405A (en) * | 2008-09-19 | 2010-03-24 | 香港科技大学 | Transcoding-based robust streaming media techniques and systems for compressed video |
CN101742323B (en) * | 2008-11-05 | 2013-05-01 | 上海天荷电子信息有限公司 | Method and device for coding and decoding re-loss-free video |
US8666181B2 (en) | 2008-12-10 | 2014-03-04 | Nvidia Corporation | Adaptive multiple engine image motion detection system and method |
CN101895756B (en) * | 2010-07-15 | 2012-10-31 | 北京大学 | Method and system for encoding, decoding and reconstructing video image blocks |
CN101895756A (en) * | 2010-07-15 | 2010-11-24 | 北京大学 | Method and system for coding, decoding and reconstructing video image blocks |
CN101895757A (en) * | 2010-07-15 | 2010-11-24 | 北京大学 | Method and system for reordering and inversely reordering predicted residual blocks |
CN105847845A (en) * | 2010-07-19 | 2016-08-10 | Sk电信有限公司 | Video decoding method |
WO2011137814A1 (en) * | 2010-09-30 | 2011-11-10 | 华为技术有限公司 | Scanning method and device, reverse scanning method and device |
WO2011150805A1 (en) * | 2010-09-30 | 2011-12-08 | 华为技术有限公司 | Method, apparatus and system for processing image residual block |
US9137531B2 (en) | 2010-09-30 | 2015-09-15 | Huawei Technologies Co., Ltd. | Scanning method and device, and reverse scanning method and device |
CN106454345A (en) * | 2011-03-07 | 2017-02-22 | 杜比国际公司 | Method of coding and decoding images, coding and decoding device |
US11343535B2 (en) | 2011-03-07 | 2022-05-24 | Dolby International Ab | Method of coding and decoding images, coding and decoding device and computer programs corresponding thereto |
CN106454345B (en) * | 2011-03-07 | 2019-07-12 | 杜比国际公司 | Code and decode method, the coding and decoding equipment of image |
US11736723B2 (en) | 2011-03-07 | 2023-08-22 | Dolby International Ab | Method of coding and decoding images, coding and decoding device and computer programs corresponding thereto |
US12177478B2 (en) | 2011-03-07 | 2024-12-24 | Dolby International Ab | Method of coding and decoding images, coding and decoding device and computer programs corresponding thereto |
CN104885453A (en) * | 2012-11-29 | 2015-09-02 | Lg电子株式会社 | Method and device for encoding/ decoding image supporting plurality of layers |
CN104885453B (en) * | 2012-11-29 | 2018-11-02 | Lg 电子株式会社 | Support multiple layers of the method and apparatus for encoding/decoding image |
CN106105047A (en) * | 2014-03-14 | 2016-11-09 | 夏普株式会社 | There is the video compress of color space scalability |
CN106341689A (en) * | 2016-09-07 | 2017-01-18 | 中山大学 | Method and system for optimizing AVS2 quantization module and inverse quantization module |
CN106341689B (en) * | 2016-09-07 | 2019-04-23 | 中山大学 | A kind of optimization method and system of AVS2 quantization module and inverse quantization module |
CN108156457A (en) * | 2017-12-27 | 2018-06-12 | 郑州云海信息技术有限公司 | A kind of JPEG turns the method for encoding images and device of WebP |
CN108156457B (en) * | 2017-12-27 | 2021-10-15 | 郑州云海信息技术有限公司 | Image coding method and device for converting JPEG (Joint photographic experts group) into WebP (Web WebP) |
CN109769104B (en) * | 2018-10-26 | 2021-02-05 | 江苏四友信息技术有限公司 | Unmanned aerial vehicle panoramic image transmission method and device |
CN109769104A (en) * | 2018-10-26 | 2019-05-17 | 西安科锐盛创新科技有限公司 | Unmanned plane panoramic picture transmission method and device |
CN114449241A (en) * | 2022-02-18 | 2022-05-06 | 复旦大学 | Color space conversion algorithm suitable for image compression |
CN114449241B (en) * | 2022-02-18 | 2024-04-02 | 复旦大学 | Color space conversion algorithm suitable for image compression |
Also Published As
Publication number | Publication date |
---|---|
CN1225126C (en) | 2005-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1225126C (en) | Space predicting method and apparatus for video encoding | |
CN1274158C (en) | Method for encoding and decoding video information, motion compensated video encoder and corresponding decoder | |
CN1207897C (en) | Image processing method and device, computer program and storage medium | |
CN1163077C (en) | Video image signal encoding method and device for predicting macroblock code length | |
CN1535027A (en) | A Method of Intra-frame Prediction for Video Coding | |
CN1155259C (en) | Bit rate variable coding device and method, coding program recording medium | |
CN1347620A (en) | Method and architecture for converting MPE G-2 4:2:2-profile bitstreams into main-profile bitstreams | |
CN1694537A (en) | Adaptive Deblocking Filter Device and Method for Video Decoder of Moving Picture Experts Group | |
CN1679342A (en) | Method and device for intracoding video data | |
CN1703096A (en) | Prediction encoder/decoder, prediction encoding/decoding method, and recording medium | |
CN1132978A (en) | Method of reducing quantization noise generated during decoding process of image data and device for decoding image data | |
CN1240226C (en) | Video transcoder with drift compensation | |
CN1575546A (en) | Implementation of a transform and of a subsequent quantization | |
CN1578477A (en) | Video encoding/decoding apparatus and method for color image | |
CN1574968A (en) | Moving image decoding apparatus and moving image decoding method | |
CN1197359C (en) | Device and method for video signal with lowered resolution ratio of strengthened decode | |
CN1225919C (en) | Image information encoding method and encoder, and image information decoding method decoder | |
CN1867075A (en) | Loop filtering method in image coding processing | |
CN1705375A (en) | Method of forecasting encoder/decoder and forecasting coding/decoding | |
CN1842164A (en) | Decoder of decode video data and system | |
CN1520184A (en) | Decoding device and method, encoding device and method, image processing system and method | |
CN1455600A (en) | Interframe predicting method based on adjacent pixel prediction | |
CN1320825C (en) | Image decoding method, image decoding apparatus | |
CN101043633A (en) | Quantization matrix selecting method, apparatus of coding and coding/decoding method and system | |
CN1216495C (en) | Video image sub-picture-element interpolation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
ASS | Succession or assignment of patent right |
Owner name: UNITED XINYUAN DIGITAL AUDIO-VIDEO TECHNOLOGY (BE Free format text: FORMER OWNER: INST. OF COMPUTING TECHN. ACADEMIA SINICA Effective date: 20080328 |
|
C41 | Transfer of patent application or patent right or utility model | ||
TR01 | Transfer of patent right |
Effective date of registration: 20080328 Address after: Beijing city Haidian District East Road No. 1 Yingchuang power building block A room 701 Patentee after: UNITED XINYUAN DIGITAL AUDIO V Address before: Digital room (Institute of Physics), Institute of computing, Chinese Academy of Sciences, South Road, Zhongguancun, Haidian District, Beijing 6, China Patentee before: Institute of Computing Technology, Chinese Academy of Sciences |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20051026 Termination date: 20211009 |