CN104320657B - The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method - Google Patents
The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method Download PDFInfo
- Publication number
- CN104320657B CN104320657B CN201410609275.5A CN201410609275A CN104320657B CN 104320657 B CN104320657 B CN 104320657B CN 201410609275 A CN201410609275 A CN 201410609275A CN 104320657 B CN104320657 B CN 104320657B
- Authority
- CN
- China
- Prior art keywords
- bit rate
- intra
- frame
- prediction
- inter
- 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.)
- Active
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明提出一种HEVC无损视频编码的预测模式选择方法及相应的编码方法,所述选择方法首先初始化该视频帧的每个LCU的帧内预测和帧间预测用于RDO的拉格朗日乘数并进行帧内预测和帧间预测,选出最佳模式用于编码,计算编码该帧所需比特率,作为初始的参考比特率,然后改变该帧K个LCU的所述乘数再选出最佳模式用于编码,计算当前比特率,计算当前比特率与参考比特率之间的差值,根据预定的规则接受或拒绝改变后的乘数,并且在接受时将当前比特率作为参考比特率,判断是否无需再改变乘数,当不需要,则结束,否则返回进行迭代。本发明的方法对HEVC原有的编码结构改动很小,消除了原始标准中QP对无损模式编码效率带来的不利影响,编码比特率有很大降低。
The present invention proposes a prediction mode selection method of HEVC lossless video coding and a corresponding coding method. The selection method first initializes the intra-frame prediction and inter-frame prediction of each LCU of the video frame for the Lagrangian multiplication of RDO. and perform intra-frame prediction and inter-frame prediction, select the best mode for encoding, calculate the bit rate required for encoding the frame, and use it as the initial reference bit rate, then change the multipliers of the K LCUs in the frame and select Find the best mode for encoding, calculate the current bit rate, calculate the difference between the current bit rate and the reference bit rate, accept or reject the changed multiplier according to predetermined rules, and use the current bit rate as a reference when accepting Bit rate, judge whether there is no need to change the multiplier, if not, then end, otherwise return to iterate. The method of the invention makes little changes to the original encoding structure of HEVC, eliminates the adverse effect of QP in the original standard on the encoding efficiency of the lossless mode, and greatly reduces the encoding bit rate.
Description
技术领域technical field
本发明涉及视频编码领域,更具体地,涉及HEVC无损视频编码的预测模式选择方法及使基于该方法的视频编码方法。The present invention relates to the field of video coding, and more specifically, to a prediction mode selection method of HEVC lossless video coding and a video coding method based on the method.
背景技术Background technique
近年来,随着通信技术、多媒体技术的不断发展,人们对于视频等多媒体通信的需求也越来越高。然而,视频的数据量巨大,未经过编码压缩的视频数据基本无法在现有信道中传输。为了满足上面的各种要求,国际上先后提出了各种视频编码方案。从上个世纪九十年代以来,国际电信联盟远程通信标准化组织ITU.T和国际标准化组织ISO联合制定了一系列关于视频压缩编解码的国际标准和建议,其中,ITU提出的H.26X系列视频压缩标准和ISO/IEC JTC推出的MPEG系列国际标准影响最大。2013年1月,视频编码标准化组织JCT-VC(Joint Collaborative Team on Video Coding)正式发布最新一代视频编码国际标准——高性能视频标准HEVC(High Efficiency Video Coding),在相同视频主观质量下,其比特率大约为上一代视频编码标准H.264/AVC的50%。In recent years, with the continuous development of communication technology and multimedia technology, people's demand for multimedia communication such as video is also increasing. However, the amount of video data is huge, and video data that has not been encoded and compressed cannot be transmitted in existing channels. In order to meet the above various requirements, various video coding schemes have been proposed in the world. Since the 1990s, ITU.T and ISO have jointly formulated a series of international standards and recommendations on video compression codecs. Among them, the H.26X series video proposed by ITU Compression standards and the MPEG series of international standards introduced by ISO/IEC JTC have the greatest influence. In January 2013, the video coding standardization organization JCT-VC (Joint Collaborative Team on Video Coding) officially released the latest generation of video coding international standards - High Efficiency Video Standard HEVC (High Efficiency Video Coding), under the same subjective video quality, its The bit rate is about 50% of the previous generation video coding standard H.264/AVC.
HEVC的编码基本框架和先前的H.264/AVC标准类似,依然采用混合编码模式。整个编码过程主要分为:预测、变换、量化、熵编码四步。预测部分分为帧内预测和帧间预测两大类。帧内预测利用当前帧已重建像素作为参考像素进行初步预测,帧间预测利用前面或后面帧重建的像素值作为参考。然后将所得的预测值与当前块原始像素值相减,进而得到残差,残差经过变换量化得到变换系数,最后将变换系数经过熵编码而得到最后的码流。不管是帧间预测,还是帧内预测,都需要用到重建图像的信息,因而在编码过程中,还需要将残差图像进行反变换量化,再将该残差图像与预测值相加,最后经过一个环路滤波滤除视频图像中的噪声,同时可避免块效应等视频图像劣化影响。The basic framework of HEVC encoding is similar to the previous H.264/AVC standard, and still adopts the hybrid encoding mode. The entire coding process is mainly divided into four steps: prediction, transformation, quantization, and entropy coding. The prediction part is divided into two categories: intra prediction and inter prediction. Intra-frame prediction uses the reconstructed pixels of the current frame as reference pixels for preliminary prediction, and inter-frame prediction uses the reconstructed pixel values of previous or subsequent frames as reference. Then the obtained prediction value is subtracted from the original pixel value of the current block to obtain the residual. The residual is transformed and quantized to obtain the transform coefficient, and finally the transform coefficient is entropy encoded to obtain the final code stream. Whether it is inter-frame prediction or intra-frame prediction, the information of the reconstructed image needs to be used. Therefore, in the encoding process, the residual image needs to be inversely transformed and quantized, and then the residual image is added to the predicted value, and finally The noise in the video image is filtered out through a loop filter, and at the same time, the degradation of the video image such as block effect can be avoided.
在HEVC标准中,存在有损压缩和无损压缩两大类编码模式。对于互联网中传输的大部分视频,进行适当的有损压缩可以很好地降低比特率,从而提高传输的效率。而对于医学视频、遥感视频、指纹等领域,无损压缩也存在很大的应用。在HEVC标准中,无损压缩作为有损压缩的扩展部分存在。由于量化存在失真,且在HEVC中变换和量化结合在了一起进行,因而其变换过程也存在失真,因而在HEVC无损压缩编码中,将变换量化过程关闭。另外,由于编码前后像素无失真,因而不需要进行环路滤波,HEVC无损压缩操作也因此跳过了环路滤波过程。也就是说,在目前的HEVC无损压缩操作中,仅存在预测和熵编码两部分。可见,预测的好坏将直接影响HEVC无损压缩的性能。In the HEVC standard, there are two types of encoding modes: lossy compression and lossless compression. For most videos transmitted on the Internet, proper lossy compression can reduce the bit rate very well, thereby improving the efficiency of transmission. For medical video, remote sensing video, fingerprint and other fields, lossless compression also has great applications. In the HEVC standard, lossless compression exists as an extension of lossy compression. Since there is distortion in quantization, and transformation and quantization are combined in HEVC, the transformation process also has distortion. Therefore, in HEVC lossless compression coding, the transformation and quantization process is turned off. In addition, because there is no distortion of pixels before and after encoding, loop filtering is not required, and the HEVC lossless compression operation therefore skips the loop filtering process. That is to say, in the current HEVC lossless compression operation, there are only two parts, prediction and entropy coding. It can be seen that the quality of prediction will directly affect the performance of HEVC lossless compression.
如上文提到的,HEVC的预测分为帧内预测和帧间预测。对于帧内预测,预测的方向多达35种模式。其中每一种模式对应着一种帧内预测方向,具体如图1所示。如此精细的模式,便于找到一种最好去除帧内冗余的模式,从而最大化地实现帧内编码性能的提高。在HEVC中,采用率失真优化(rate distortion optimization,RDO)来选择最佳模式,即选择一个具有最小的RD cost(率失真代价,rate distortion cost)的模式作为预测模式。RDcost的计算如公式(1)所示:As mentioned above, the prediction of HEVC is divided into intra prediction and inter prediction. For intra prediction, there are as many as 35 modes of predicted directions. Each mode corresponds to an intra prediction direction, as shown in FIG. 1 . With such a fine mode, it is convenient to find a mode that best removes intra-frame redundancy, so as to maximize the improvement of intra-frame coding performance. In HEVC, rate distortion optimization (RDO) is used to select the best mode, that is, a mode with the smallest RD cost (rate distortion cost, rate distortion cost) is selected as the prediction mode. The calculation of RDcost is shown in formula (1):
RD cost=D+λR (1)RD cost=D+λR (1)
其中,D表示重建图像块与原始图像块的失真度,R表示该模式下编码该预测块所需的比特率(包括编码残差和编码预测模式所需的比特率),而λ为拉格朗日乘数,用于权衡比特率在该RD cost中的权重,可通过计算公式(2)获得:Among them, D represents the degree of distortion between the reconstructed image block and the original image block, R represents the bit rate required to encode the prediction block in this mode (including the coding residual and the bit rate required to code the prediction mode), and λ is Rag The Langer multiplier is used to weigh the weight of the bit rate in the RD cost, which can be obtained by calculating formula (2):
λ=Qpfactor×2(QP-12)/3 (2)λ=Qpfactor×2 (QP-12)/3 (2)
其中,QP为量化参数(quantization parameter),用于指示不同的量化步长,QP越大,则量化步长就越大,即产生的量化失真就越大,Qpfactor为量化系数,在该公式中为一常数,由帧类型等具体编码情况决定。Among them, QP is a quantization parameter (quantization parameter), which is used to indicate different quantization step sizes. The larger the QP, the larger the quantization step size, that is, the larger the quantization distortion generated. Qpfactor is the quantization coefficient. In this formula It is a constant, which is determined by the specific encoding conditions such as the frame type.
由公式(1)可见,每计算一个RD cost,需要计算D和R两部分,特别是计算D时需要对残差图像(预测图像与原始图像之差)进行变换量化、反变换量化,重建得到重建图像块,再计算失真度,其运算量已经很高。而如果在选择最佳模式时,直接对这35种模式一一计算其率失真,其运算量将非常高。为了降低运算量,HEVC先采用粗略的方式计算RD cost来选出几个较好的候选模式,然后再对这几个候选模式进行准确的RD cost计算,以选出最好的模式。所谓粗略的方式是指使用残差图像块的简单Hadamard变换来替代复杂的失真度D的计算,从而有效降低复杂度。It can be seen from formula (1) that for each calculation of an RD cost, two parts D and R need to be calculated, especially when calculating D, it is necessary to transform and quantize the residual image (the difference between the predicted image and the original image), and then reconstruct it to obtain Reconstructing an image block and then calculating the degree of distortion requires a high amount of computation. However, if the rate-distortion of these 35 modes is directly calculated one by one when selecting the best mode, the computation load will be very high. In order to reduce the amount of computation, HEVC first calculates the RD cost in a rough way to select several better candidate modes, and then performs accurate RD cost calculations on these candidate modes to select the best mode. The so-called rough method refers to using the simple Hadamard transformation of the residual image block to replace the calculation of the complex distortion degree D, thereby effectively reducing the complexity.
而对于帧间预测,编码器在参考帧预测块位置的周围寻找与预测块最为相似的图像块。为了找到最匹配的图像块,HEVC中运动矢量的精度达到了1/4像素。同样的,在比较参考帧哪个位置的图像块作为参考块时,也是寻找具有最小RD cost的位置。与帧内预测类似的,如果在64×64的范围内寻找最优图像块,而精度为1/4像素,那将计算16384次的RDcost,其运算量同样非常大。为了减少运算量,在运动搜索时,HEVC使用计算绝对差值和SAD(sum of abstract distortion)方法替代实际失真度的计算进行粗略搜索。For inter-frame prediction, the encoder searches for the image block most similar to the prediction block around the position of the prediction block in the reference frame. In order to find the best matching image block, the precision of the motion vector in HEVC reaches 1/4 pixel. Similarly, when comparing which position of the image block in the reference frame is used as the reference block, the position with the smallest RD cost is also searched for. Similar to intra-frame prediction, if the optimal image block is found within the range of 64×64, and the precision is 1/4 pixel, then RDcost will be calculated 16384 times, and the calculation amount is also very large. In order to reduce the amount of computation, during the motion search, HEVC uses the method of calculating the absolute difference and SAD (sum of abstract distortion) instead of calculating the actual distortion to perform a rough search.
在当前的许多应用中,对视频进行无损压缩的需求越来越大,由于HEVC的无损编码模式可以提供较高的压缩率,其在视频无损压缩编码的应用也将越来越广泛。在HEVC标准的主流应用中,如机顶盒、视频监控等,要求很高的编码效率,因而不得不以产生一些失真作为代价,也就是说,主流应用多为有损压缩。然而,在HEVC有损压缩标准之上,再开发一套全新的编码工具来获得尽可能好的无损编码效率显然不切实际。因此,在进行HEVC无损编码方案设计时,我们应遵循这样的设计原则:尽可能地利用已有的HEVC有损编码结构,提出的无损编码方案对原始的有损编码结构改动尽可能小,同时考虑编码效率和复杂度的平衡。In many current applications, there is an increasing demand for lossless video compression. Since HEVC's lossless coding mode can provide a higher compression rate, its application in video lossless compression coding will become more and more extensive. In the mainstream applications of the HEVC standard, such as set-top boxes, video surveillance, etc., high coding efficiency is required, so it has to be at the cost of some distortion, that is to say, the mainstream applications are mostly lossy compression. However, on top of the HEVC lossy compression standard, it is obviously impractical to develop a new set of encoding tools to obtain the best possible lossless encoding efficiency. Therefore, when designing the HEVC lossless coding scheme, we should follow the following design principles: make use of the existing HEVC lossy coding structure as much as possible, and the proposed lossless coding scheme changes the original lossy coding structure as little as possible, while Consider the balance of coding efficiency and complexity.
由上面的介绍可知,HEVC无损压缩相对有损压缩,仅仅是跳过变换、量化、环路滤波三个部分,而预测和熵编码的策略均保持不变。有损压缩需要均衡重建视频质量和编码比特率进行编码。不同于有损压缩,在无损压缩中,公式(1)中的D最终为零,因而不存在重建视频质量下降的问题,则其编码唯一的目标就是在可允许的编解码复杂度下,尽可能地降低比特率。无损压缩中,若准确计算D,则最后得到的失真D为零,此时,不管λ为多少,最小化RD cost与最小化比特率R是等价的,因而此时的原始有损压缩的策略仍然适用于无损压缩。然而,不管是帧内预测还是帧间预测,都不可能对每个模式精确计算RD cost,必须用到上文提到的粗略选择策略。有损压缩时,经过粗略计算得到的D与实际的D相差不大,而无损压缩时,粗略计算得到的D与实际为零的D相差较大,则此时按照公式(1)、(2)获得的候选模式中不一定包含实际最优模式,因而其最终编码性能就不一定为最优。因而必须重新定义公式(1)、(2),以期待获得更好的无损压缩性能。As can be seen from the above introduction, HEVC lossless compression is relatively lossy compression, only skipping the three parts of transformation, quantization, and loop filtering, while the strategies of prediction and entropy coding remain unchanged. Lossy compression needs to balance reconstruction video quality and encoding bit rate for encoding. Different from lossy compression, in lossless compression, D in formula (1) is finally zero, so there is no problem of degradation of reconstructed video quality, and the only goal of its coding is to achieve as much as possible under the allowable codec complexity. Possibly lower bitrate. In lossless compression, if D is accurately calculated, the final distortion D is zero. At this time, no matter what λ is, minimizing RD cost is equivalent to minimizing bit rate R, so the original lossy compression at this time Strategies still apply to lossless compression. However, whether it is intra prediction or inter prediction, it is impossible to accurately calculate the RD cost for each mode, and the rough selection strategy mentioned above must be used. In lossy compression, the roughly calculated D is not much different from the actual D, but in lossless compression, the roughly calculated D is quite different from the actual zero D, then according to formulas (1), (2 ) may not contain the actual optimal mode, so its final coding performance may not be optimal. Therefore, formulas (1) and (2) must be redefined in order to obtain better lossless compression performance.
另外,在有损压缩时,我们可以通过调节QP获得不同质量和不同比特率的码流,以满足不同应用场景的需求。这是因为,一方面,调整QP可以获得不同λ,从而调节RD cost中比特率和重建图像质量之间的权衡关系。另一方面,也是最重要的一方面,QP越小,量化误差就越小,解码重建的视频图像质量就越好,但是编码产生的码流比特率就越高。所以,在有损压缩中,若其他编码条件一样,比特率随着QP的增加而降低,而视频图像解码重建质量随着QP的增加而降低。但是,在无损压缩中,已经不存在量化,除了调节λ,QP其实已经没有其他作用。图2是无损压缩编码中序列Racehorse比特率随QP变化情况(HM 10.0)的曲线图,由图2可以发现,在无损压缩时,编码码流的比特率与QP呈非单调关系,不管是QP最小时(编码视频为8比特时为0,10比特时为-12)还是最大时(编码视频为8比特时为51,10比特时为39),均无法达到最小比特率。因而对于无损压缩,QP这个编码参数的作用已经不一样,其与λ的对应关系已不再如公式(2)所示那样,需要重新确定。In addition, during lossy compression, we can obtain code streams with different qualities and different bit rates by adjusting QP to meet the needs of different application scenarios. This is because, on the one hand, adjusting QP can obtain different λ, thereby adjusting the trade-off relationship between bit rate and reconstructed image quality in RD cost. On the other hand, and the most important aspect, the smaller the QP, the smaller the quantization error, and the better the quality of the decoded and reconstructed video image, but the higher the bit rate of the code stream generated by encoding. Therefore, in lossy compression, if other encoding conditions are the same, the bit rate decreases with the increase of QP, and the quality of video image decoding and reconstruction decreases with the increase of QP. However, in lossless compression, there is no quantization anymore, and QP has no other role except for adjusting λ. Figure 2 is a graph of the change of the bit rate of the sequence Racehorse with QP (HM 10.0) in lossless compression coding. It can be found from Figure 2 that in lossless compression, the bit rate of the coded stream has a non-monotonic relationship with QP, regardless of QP The minimum bitrate cannot be reached neither at minimum (0 for encoded video at 8 bit, -12 for 10 bit) nor at maximum (51 for encoded video at 8 bit, 39 for 10 bit). Therefore, for lossless compression, the function of the coding parameter QP is different, and its corresponding relationship with λ is no longer as shown in formula (2), and needs to be re-determined.
发明内容Contents of the invention
有鉴于此,本发明的目的在于提供一种用于HEVC无损视频编码的预测模式选择方法,以重新调整编码预测过程中针对众多模式的粗略选择策略,最大程度地降低无损压缩比特率。In view of this, the object of the present invention is to provide a prediction mode selection method for HEVC lossless video coding, to readjust the rough selection strategy for many modes in the coding prediction process, and reduce the lossless compression bit rate to the greatest extent.
为了实现上述目的,本发明提供了1、一种HEVC无损视频编码的预测模式选择方法,包括依次进行的以下步骤:In order to achieve the above object, the present invention provides 1. A prediction mode selection method for HEVC lossless video coding, comprising the following steps in sequence:
S1、对于一个视频帧,将视频帧的每个LCU的帧内预测和帧间预测用于RDO的拉格朗日乘数和初始化,并进行帧内预测和帧间预测,选择最佳帧内预测模式和最佳帧间预测模式,从最佳帧内预测模式和最佳帧间预测模式中选出最佳模式用于编码,计算编码该帧所需比特率,作为初始的参考比特率R0,i、j表示LCU的位置坐标;S2、改变所述视频帧的K个LCU的所述和进行帧内预测和帧间预测,选择最佳帧内预测模式和最佳帧间预测模式,从最佳帧内预测模式和最佳帧间预测模式中选出最佳模式用于编码,计算编码该视频帧所需的比特率,作为当前比特率R′,K为自然数;S3、计算当前比特率与参考比特率之间的差值ΔR,根据预定的规则接受或拒绝改变后的所述和并且在接受时将当前比特率作为参考比特率;S4、判断是否无需再改变所述和当无需再改变时,则将当前的和作为最终的和否则返回步骤S2。S1. For a video frame, use the intra prediction and inter prediction of each LCU of the video frame for the Lagrangian multiplier of RDO with Initialize, perform intra-frame prediction and inter-frame prediction, select the best intra-frame prediction mode and the best inter-frame prediction mode, and select the best mode from the best intra-frame prediction mode and the best inter-frame prediction mode for encoding , calculate the bit rate required for encoding the frame, as the initial reference bit rate R 0 , i, j represent the position coordinates of the LCU; S2, change the K LCUs of the video frame with Perform intra-frame prediction and inter-frame prediction, select the best intra-frame prediction mode and the best inter-frame prediction mode, select the best mode from the best intra-frame prediction mode and the best inter-frame prediction mode for encoding, and calculate the encoding The required bit rate of the video frame is used as the current bit rate R′, K is a natural number; S3, calculating the difference ΔR between the current bit rate and the reference bit rate, accepting or rejecting the changed according to predetermined rules with And when accepting, use the current bit rate as the reference bit rate; S4, judge whether there is no need to change the with When no further changes are required, the current with as the final with Otherwise return to step S2.
优选地,在步骤S1中,所述拉格朗日乘数和初始化为和所述取值范围为[3,8],所述取值范围为[0.5,1.5]。Preferably, in step S1, the Lagrangian multiplier with initialized to with said The value range is [3, 8], the The value range is [0.5, 1.5].
优选地,在步骤S1中,对于帧内预测,使用最小化公式(8)中的代价准则从多种帧内预测模式中选择候选模式,再根据公式(1)从候选模式中选择最佳帧内预测模式,公式如下所示:Preferably, in step S1, for intra prediction, use the minimized formula (8) The cost criterion selects the candidate mode from various intra-frame prediction modes, and then selects the best intra-frame prediction mode from the candidate modes according to the formula (1), the formula is as follows:
RD cost=D+λR (1)RD cost=D+λR (1)
其中,表示帧内预测的粗略率失真代价,Dintra为帧内预测的预测残差失真;Rintra表示帧内预测中编码除残差信息外的其他预测信息所需比特率;λ为拉格朗日乘数;D为帧内预测的实际残差失真,R为实际编码比特率,RD cost表示实际率失真代价。in, Represents the rough rate-distortion cost of intra prediction, D intra is the prediction residual distortion of intra prediction; R intra represents the bit rate required to encode other prediction information except residual information in intra prediction; λ is Lagrangian Multiplier; D is the actual residual distortion of intra prediction, R is the actual coding bit rate, and RD cost is the actual rate-distortion cost.
优选地,在步骤S1中,对于帧间预测,使用最小化公式(9)中的代价准则选取最优MV和对应参考帧,再根据公式(1)从各个帧间模式中选择最佳的帧间预测模式,公式如下所示:Preferably, in step S1, for inter-frame prediction, use the minimized formula (9) The cost criterion selects the optimal MV and the corresponding reference frame, and then selects the best inter-frame prediction mode from each inter-frame mode according to the formula (1), the formula is as follows:
RD cost=D+λR (1)RD cost=D+λR (1)
其中,表示帧间预测的粗略率失真代价,Dinter为帧间预测的预测残差失真,Rinter表示帧间预测中编码除残差信息外的其他预测信息所需比特率,λ为拉格朗日乘数,D为帧内预测的实际残差失真;R为实际编码比特率,RD cost表示实际率失真代价。in, Represents the rough rate-distortion cost of inter-frame prediction, D inter is the prediction residual distortion of inter-frame prediction, R inter represents the bit rate required to encode other prediction information except residual information in inter-frame prediction, λ is Lagrangian Multiplier, D is the actual residual distortion of intra prediction; R is the actual coding bit rate, and RD cost is the actual rate-distortion cost.
优选地,在步骤S2中,K为所述视频帧每一列所含LCU的个数。Preferably, in step S2, K is the number of LCUs contained in each column of the video frame.
优选地,在步骤S3中,若ΔR≤0,则接受改变后的所述和否则以exp(-ΔR/R0)的概率接受所述和 Preferably, in step S3, if ΔR≤0, then accept the changed with Otherwise accept the with
优选地,步骤S3为:记录迭代次数Ti以及迭代过程中连续拒绝所述和的次数Tr,若迭代次数Ti达到一个迭代次数阈值THi,或者连续拒绝次数Tr达到一个连续拒绝次数阈值THr,则将当前的和作为最终的和 Preferably, step S3 is: recording the number of iterations Ti and continuously rejecting the with Tr, if the number of iterations Ti reaches an iteration threshold THi, or the number of consecutive rejections Tr reaches a threshold THr of consecutive rejections, the current with as the final with
优选地,在步骤S1还包括对所述迭代次数Ti和连续拒绝次数Tr初始化为0。Preferably, step S1 further includes initializing the number of iterations Ti and the number of consecutive rejections Tr to 0.
优选地,在步骤S1中,所述THi取值范围为[1,1000],所述THr取值范围为[1,50]。Preferably, in step S1, the value range of THi is [1, 1000], and the value range of THr is [1, 50].
本发明还提出一种HEVC无损视频编码方法,包括前述的HEVC无损视频编码的预测模式选择方法。The present invention also proposes a HEVC lossless video coding method, including the aforementioned HEVC lossless video coding prediction mode selection method.
通过上述技术方案可知,本发明的用于HEVC无损视频编码的预测模式选择方法具有以下优点:对HEVC原有的编码结构改动很小,充分利用了HEVC既有的编码工具;由于HEVC无损编码中跳过了变换、量化,因而,QP这个编码工具在无损压缩中已没有实际意义了,本方法消除了原始标准中QP对编码效率带来的不利影响;相对HM 10.0中无损压缩的方法,本发明的编码比特率有了很大降低,在RA-Main、LDB-Main和LDP-Main三种编码环境下,本发明方法的比特率平均降低了1.2-1.4%,特别是F类测试序列,其获得了平均高达2.5-2.9%的比特率节省。From the above technical solutions, it can be seen that the prediction mode selection method for HEVC lossless video coding of the present invention has the following advantages: the original coding structure of HEVC is changed very little, and the existing coding tools of HEVC are fully utilized; Transformation and quantization are skipped. Therefore, the coding tool QP has no practical significance in lossless compression. This method eliminates the adverse effect of QP on coding efficiency in the original standard; compared with the lossless compression method in HM 10.0, this method The coding bit rate of the invention has been greatly reduced. Under three kinds of coding environments of RA-Main, LDB-Main and LDP-Main, the bit rate of the inventive method has reduced by 1.2-1.4% on average, especially the F class test sequence, It achieves bitrate savings of up to 2.5-2.9% on average.
附图说明Description of drawings
图1是现有技术中各种帧内预测模式对应方向的示意图;FIG. 1 is a schematic diagram of directions corresponding to various intra prediction modes in the prior art;
图2是无损压缩编码中序列Racehorse比特率随QP变化情况(HM10.0)的曲线图;Fig. 2 is a graph of the sequence Racehorse bit rate varying with QP (HM10.0) in lossless compression coding;
图3是每个LCU的帧内预测和帧间预测用于RDO的拉格朗日乘数(图中每个块代表一个LCU)的示意图;Fig. 3 is a schematic diagram of the Lagrangian multipliers (each block in the figure represents an LCU) of intra-frame prediction and inter-frame prediction for RDO of each LCU;
图4是本发明的HEVC无损视频编码的预测模式选择方法的具体流程图。FIG. 4 is a specific flow chart of the prediction mode selection method for HEVC lossless video coding according to the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明作进一步的详细说明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
在HEVC标准中,存在有损压缩和无损压缩两大类编码模式。在无损压缩中,不存在重建失真,因而其唯一目的就是最大程度地降低比特率,即最小化比特率R。由于无损压缩仅仅作为HEVC的一个扩展部分存在,原则上不希望对原始HEVC有太大改动。在进行粗略模式选择时,公式(1)中的变量与精确选择时不同,其中重建图像块与原始图像块的失真度D本质上表示与残差相关的失真函数,即In the HEVC standard, there are two types of encoding modes: lossy compression and lossless compression. In lossless compression, there is no reconstruction distortion, so its only purpose is to minimize the bit rate, ie, minimize the bit rate R. Since lossless compression only exists as an extension of HEVC, in principle, it is not expected to make too many changes to the original HEVC. When performing coarse mode selection, the variables in Equation (1) are different from those for precise selection, where the degree of distortion D between the reconstructed image patch and the original image patch essentially represents the residual-related distortion function, namely
D=f(residue) (3)D=f(residue) (3)
其中residue表示残差。where residue represents the residual.
同样,RpredInfo表示编码该预测模式所需的比特率。进行帧内预测时,RpredInfo表示编码该模式对应方向所需的比特率,进行帧间预测时,RpredInfo表示编码该模式对应运动矢量(MV)信息所需的比特率。由于后续是对残差信息进行熵编码,可以认为,残差越大,后续编码该残差所需的比特率就越大,即Likewise, R predInfo indicates the bitrate required to encode this prediction mode. When intra-frame prediction is performed, R predInfo indicates the bit rate required for encoding the direction corresponding to the mode, and when inter-frame prediction is performed, R predInfo indicates the bit rate required for encoding the motion vector (MV) information corresponding to the mode. Since the entropy encoding of the residual information is performed subsequently, it can be considered that the larger the residual, the greater the bit rate required for subsequent encoding of the residual, namely
Rresidue=αf(residue),α>0 (4)R residue = αf(residue), α > 0 (4)
其中,Rresidue表示编码残差信息实际所需的比特率,α表示比例系数。Among them, R residue represents the bit rate actually required for encoding the residual information, and α represents the proportional coefficient.
则某个模式所需的最终比特率Rtotal为编码残差所需比特率和编码除残差信息外的预测模式信息所需比特率之和,即Then the final bit rate R total required for a certain mode is the sum of the bit rate required for encoding the residual and the bit rate required for encoding the prediction mode information except for the residual information, that is
Rtotal=Rresidue+RpredInfo (5)R total = R residue + R predInfo (5)
由公式(4)、(5)可得:From formulas (4) and (5), we can get:
Rtotal=αf(residue)+RpredInfo=αD+RpredInfo (6)R total =αf(residue)+R predInfo =αD+R predInfo (6)
由于α>0,那么,最小化Rtotal等价于最小化Rtotal/α,即最小化Since α>0, then minimizing R total is equivalent to minimizing R total /α, that is, minimizing
D+RpredInfo/α (7)D+R predInfo /α (7)
对比公式(1)和(7)可以发现,当λ=1/α时,最小化公式(1)中的RD cost与最小化最终比特率Rtotal是一致的。由此,只要找出Rresidue与f(residue)的比例关系α,由此得到λ=1/α,即可在原有有损模式选择的最优化策略基础上,实现无损模式选择的最优化,即无损编码比特率的最小化。Comparing formulas (1) and (7), it can be found that when λ=1/α, minimizing the RD cost in formula (1) is consistent with minimizing the final bit rate R total . Therefore, as long as the proportional relationship α between R residue and f(residue) is found, λ=1/α can be obtained, and the optimization of lossless mode selection can be realized on the basis of the original optimization strategy of lossy mode selection. That is, the lossless coding bit rate minimization.
下面将分析如何得到该比例关系α。How to obtain the proportional relationship α will be analyzed below.
如上文所述,在HEVC无损压缩标准中不存在对残差的变换和量化,因而在获得残差之后,就直接进行熵编码,所以熵编码是影响后续编码残差所需比特率的重要因素。在HEVC标准的残差熵编码中,采用基于上下文自适应二进制算术编码(Context-basedAdaptive Binary Arithmetic Coding,简称CABAC)进行熵编码。HEVC标准的CABAC熵编码中,除了每一帧上下文概率模型的初始化与QP有关外,其他部分均不涉及到QP。由于CABAC中,上下文模型会在编码过程中自适应调整,以达到编码效率的最优化。因而最初的上下文概率模型仅仅影响最开始的极少残差比特位的编码,对于全部残差编码的影响非常小,所以可以认为在熵编码过程中,QP对最终编码效率的影响非常小。因而,可以认为α与QP不存在显著关系。然而,通过公式(2)可知,在有损压缩中,λ=1/α与QP密切相关,这就是HEVC标准预测模式选择中无损压缩与有损压缩的不同之处。As mentioned above, there is no transformation and quantization of the residual in the HEVC lossless compression standard, so after the residual is obtained, entropy coding is performed directly, so entropy coding is an important factor affecting the bit rate required for subsequent coding residuals . In the residual entropy coding of the HEVC standard, entropy coding is performed by using Context-based Adaptive Binary Arithmetic Coding (CABAC for short). In the CABAC entropy coding of the HEVC standard, except that the initialization of the context probability model of each frame is related to QP, other parts do not involve QP. In CABAC, the context model will be adaptively adjusted during the encoding process to optimize the encoding efficiency. Therefore, the initial context probability model only affects the encoding of the first few residual bits, and has very little impact on the entire residual encoding. Therefore, it can be considered that in the process of entropy encoding, QP has very little impact on the final encoding efficiency. Therefore, it can be considered that there is no significant relationship between α and QP. However, it can be seen from formula (2) that in lossy compression, λ=1/α is closely related to QP, which is the difference between lossless compression and lossy compression in HEVC standard prediction mode selection.
因此,本发明提出一个与QP完全无关的λ参数设计方法。Therefore, the present invention proposes a λ parameter design method that is completely independent of QP.
考虑到每个块的残差特性存在差异,下面的方法试图寻找某一帧中各个最大编码单元(largest coding unit,LCU)的最优拉格朗日乘数组合。Considering the differences in the residual characteristics of each block, the following method tries to find the optimal combination of Lagrangian multipliers for each largest coding unit (LCU) in a certain frame.
图3是每个LCU的帧内预测和帧间预测用于RDO的拉格朗日乘数(图中每个块代表一个LCU)的示意图。如图3所示,本发明首先将每个LCU的帧内预测和帧间预测用于RDO的拉格朗日乘数和均初始化为和取值范围为[3,8],取值范围为[0.5,1.5],该取值范围基于文献(F.Bossen,“Common Test Conditions and SoftwareReference Configurations”,JCT-VC document,JCTVC-L 1100,Geneva,Jan.2013)中提供的测试序列和测试条件获得,可根据实际编码条件调整。将连续拒绝次数Tr和迭代次数Ti都设为0,进行该帧的编码后获得当前参数的编码比特率R0,随机改变K个LCU的和再进行编码,K为自然数,计算新拉格朗日乘数下编码该帧所需比特率R′,并计算比特率差值ΔR=R′-R0,若ΔR≤0,则接受该拉格朗日乘数作为新的拉格朗日乘数,否则以exp(-ΔR/R0)的概率接受该拉格朗日乘数设置作为新的拉格朗日乘数。若新拉格朗日乘数被接受,则将连续拒绝次数Tr设置为0,且令R0=R′,否则将连续拒绝次数Tr加1。接着,将迭代次数Ti加1。FIG. 3 is a schematic diagram of the Lagrangian multipliers (each block in the figure represents an LCU) used for RDO by intra-frame prediction and inter-frame prediction of each LCU. As shown in Figure 3, the present invention first uses the intra prediction and inter prediction of each LCU for the Lagrangian multiplier of RDO with are initialized to with The value range is [3, 8], The value range is [0.5, 1.5], which is based on the test provided in the literature (F.Bossen, "Common Test Conditions and SoftwareReference Configurations", JCT-VC document, JCTVC-L 1100, Geneva, Jan.2013) Sequence and test conditions are obtained, which can be adjusted according to actual coding conditions. Set the number of consecutive rejections Tr and the number of iterations Ti to 0, and obtain the encoding bit rate R 0 of the current parameter after encoding the frame, and randomly change the number of K LCUs with Then encode, K is a natural number, calculate the bit rate R' required to encode the frame under the new Lagrangian multiplier, and calculate the bit rate difference ΔR=R'-R 0 , if ΔR≤0, then accept the pull The Lagrangian multiplier is used as the new Lagrangian multiplier, otherwise, the Lagrangian multiplier setting is accepted as the new Lagrange multiplier with the probability of exp(-ΔR/R 0 ). If the new Lagrangian multiplier is accepted, the number of consecutive rejections Tr is set to 0, and R 0 =R′, otherwise, the number of consecutive rejections Tr is increased by 1. Next, the number of iterations Ti is increased by 1.
更新完连续拒绝次数Tr和迭代次数Ti,判断如下两个条件:After updating the number of consecutive rejections Tr and the number of iterations Ti, judge the following two conditions:
(1)连续拒绝次数Tr是否小于阈值THr;(1) Whether the number of consecutive rejections Tr is less than the threshold THr;
(2)迭代次数Ti是否小于阈值THi。(2) Whether the iteration number Ti is smaller than the threshold THi.
其中,THi取值范围为[1,1000],所述THr取值范围为[1,50]。该取值范围基于文献(F.Bossen,“Common Test Conditions and Software Reference Configurations”,JCT-VC document,JCTVC-L 1100,Geneva,Jan.2013)中提供的测试序列和测试条件获得,可根据实际编码条件调整。若这两个条件均满足,则在当前拉格朗日乘数的基础上随机改变K个LCU的和进行下一次编码,再计算新拉格朗日乘数下的编码比特率R′,再次计算ΔR,并根据ΔR采用相同的策略决定是否接收新拉格朗日乘数,更新连续拒绝次数Tr和迭代次数Ti。若上述两个条件中只要有一个不满足,则将最新的拉格朗日乘数作为当前帧的各个LCU帧内预测和帧间预测的拉格朗日乘数的最优设置,至此结束该帧的编码。Wherein, the value range of THi is [1, 1000], and the value range of THr is [1, 50]. This value range is obtained based on the test sequence and test conditions provided in the literature (F.Bossen, "Common Test Conditions and Software Reference Configurations", JCT-VC document, JCTVC-L 1100, Geneva, Jan.2013), and can be obtained according to the actual Coding condition adjustment. If both conditions are met, randomly change the LCUs of K LCUs on the basis of the current Lagrangian multiplier with Carry out the next encoding, then calculate the encoding bit rate R′ under the new Lagrangian multiplier, calculate ΔR again, and use the same strategy to decide whether to accept the new Lagrangian multiplier according to ΔR, and update the number of consecutive rejections Tr and The number of iterations Ti. If only one of the above two conditions is not satisfied, the latest Lagrangian multiplier is used as the optimal setting of the Lagrangian multiplier for each LCU intra prediction and inter prediction of the current frame, so far the end of the The encoding of the frame.
不断重复循环上述步骤直到条件(1)和(2)中有一个不满足时,则将最新的拉格朗日乘数作为当前帧的各个LCU帧内预测和帧间预测的拉格朗日乘数的最优设置。至此结束该帧的编码。Repeat the above steps until one of the conditions (1) and (2) is not satisfied, then use the latest Lagrangian multiplier as the Lagrangian multiplier of each LCU intra prediction and inter prediction of the current frame Optimal settings for numbers. So far, the encoding of this frame ends.
图4为本发明的HEVC无损视频编码的预测模式选择方法的流程图,如图所示,其包括如下步骤:Fig. 4 is the flow chart of the prediction mode selection method of HEVC lossless video coding of the present invention, as shown in the figure, it comprises the following steps:
S1、对于一个视频帧,初始化该视频帧的每个LCU的帧内预测和帧间预测用于RDO的拉格朗日乘数和并进行帧内预测和帧间预测,选择最佳帧内预测模式和最佳帧间预测模式,从最佳帧内预测模式和最佳帧间预测模式选择最佳模式进行编码,计算编码该帧所需比特率,作为初始的参考比特率R0,i、j表示LCU的位置坐标。S1. For a video frame, initialize the intra prediction and inter prediction of each LCU of the video frame for the Lagrangian multiplier of RDO with And perform intra-frame prediction and inter-frame prediction, select the best intra-frame prediction mode and the best inter-frame prediction mode, select the best mode from the best intra-frame prediction mode and the best inter-frame prediction mode for encoding, and calculate and encode the frame The required bit rate is used as an initial reference bit rate R 0 , and i and j represent the location coordinates of the LCU.
并初始化连续拒绝次数Tr和迭代次数Ti。And initialize the number of consecutive rejections Tr and the number of iterations Ti.
例如在一个具体实施例中,将每个LCU的帧内预测和帧间预测用于RDO的拉格朗日乘数和均设置为和和分别设置为5和1。连续拒绝次数Tr和迭代次数Ti均初始化为0。For example, in a specific embodiment, the intra prediction and inter prediction of each LCU are used for the Lagrangian multiplier of RDO with are set to with with Set to 5 and 1 respectively. Both the number of consecutive rejections Tr and the number of iterations Ti are initialized to 0.
接着,在具体实施过程中,本发明提出,对于帧内预测,可使用最小化公式(8)中的代价准则从多种帧内预测模式中选择候选模式,再根据公式(1)从候选模式中选择最佳帧内预测模式;对于帧间预测,使用最小化公式(9)中的代价准则选取最优MV,再根据公式(1)从各个帧间模式中选择最佳帧间预测模式。Next, in the specific implementation process, the present invention proposes that, for intra prediction, the minimized formula (8) can be used The cost criterion selects the candidate mode from various intra-frame prediction modes, and then selects the best intra-frame prediction mode from the candidate modes according to the formula (1); for the inter-frame prediction, use the minimized formula (9) The cost criterion selects the optimal MV, and then selects the best inter prediction mode from each inter mode according to formula (1).
其中,分别表示帧间预测和帧内预测的粗略率失真代价,Dintra和Dinter分别为帧内预测和帧间预测的预测残差失真,可用预测值和原始值绝对差值和表示。Rintra和Dinter分别表示帧内预测和帧间预测中编码除残差信息外的其他预测信息所需比特率。in, Represents the rough rate-distortion cost of inter prediction and intra prediction, respectively, D intra and D inter are the prediction residual distortion of intra prediction and inter prediction, respectively, and can be expressed by the absolute difference between the predicted value and the original value. R intra and D inter respectively represent the bit rates required for coding other prediction information except residual information in intra prediction and inter prediction.
从最佳帧内预测模式和最佳帧内预测模式中选择最佳模式进行预测、熵编码后,获得当前的编码该帧所需比特,作为参考比特率R0。After selecting the best mode from the best intra-frame prediction mode and the best intra-frame prediction mode for prediction and entropy encoding, the current bits required for encoding the frame are obtained as the reference bit rate R 0 .
步骤S2、随改变所述视频帧的K个LCU的所述和进行帧内预测和帧间预测,选择最佳帧内预测模式和最佳帧间预测模式,从该最佳帧内预测模式和最佳帧间预测模式中选出最佳模式用于编码,计算编码该帧所需比特率,作为当前比特率R′,K为自然数。Step S2, changing the K LCUs of the video frame with Perform intra-frame prediction and inter-frame prediction, select the best intra-frame prediction mode and the best inter-frame prediction mode, select the best mode from the best intra-frame prediction mode and the best inter-frame prediction mode for encoding, and calculate The bit rate required to encode the frame is taken as the current bit rate R', and K is a natural number.
在具体实施例中,K的取值不能太小,否则最终无法获得最优参数组合;也不能太大,否则计算的复杂度将非常高。K可为所述视频帧每一列所含LCU的个数。In a specific embodiment, the value of K cannot be too small, otherwise the optimal parameter combination cannot be obtained in the end; nor can it be too large, otherwise the computational complexity will be very high. K may be the number of LCUs contained in each column of the video frame.
步骤S3、计算当前比特率与参考比特率之间的差值ΔR,根据预定的规则接受或拒绝改变后的所述和并且在接受时将当前比特率作为参考比特率。Step S3, calculating the difference ΔR between the current bit rate and the reference bit rate, accepting or rejecting the changed bit rate according to predetermined rules with And take the current bit rate as the reference bit rate when accepting.
具体来说,利用ΔR=R′-R0计算差值ΔR。若ΔR≤0,则接受改变后的所述和否则以exp(-ΔR/R0)的概率接受所述和在接受所述和时,令R0=R′。Specifically, the difference ΔR is calculated using ΔR=R′−R 0 . If ΔR≤0, accept the changed with Otherwise accept the with accepting the said with , let R 0 =R'.
步骤S4、判断是否无需再改变所述和当无需再改变时,则将当前的和作为最终的和否则返回步骤S2。Step S4, judging whether there is no need to change the with When there is no need to change, the current with as the final with Otherwise return to step S2.
一种实施方式是,记录迭代次数Ti以及迭代过程中连续拒绝所述和的次数Tr,若迭代次数Ti达到一个迭代次数阈值,或者连续拒绝次数Tr达到一个连续拒绝次数阈值,则将当前的和作为最终的和在具体实施例中,可以在步骤S1中初始化Ti和Tr为0。在进行迭代时,每次迭代时将迭代次数Ti加1。若所述和被接受,则将连续拒绝次数Tr设置为0,否则将连续拒绝次数Tr加1。所述THi取值范围可以是[1,1000],所述THr取值范围可以是[1,50]。One implementation is to record the number of iterations Ti and continuously reject the with The number of times Tr, if the number of iterations Ti reaches a threshold of iterations, or the number of consecutive rejections Tr reaches a threshold of consecutive rejections, the current with as the final with In a specific embodiment, Ti and Tr may be initialized to 0 in step S1. When performing iterations, the number of iterations Ti is increased by 1 for each iteration. If said with If it is accepted, set the number of consecutive rejections Tr to 0, otherwise add 1 to the number of consecutive rejections Tr. The value range of THi may be [1, 1000], and the value range of THr may be [1, 50].
对于本发明的HEVC无损视频编码方法来说,根据上述预测模式选择方法所选择的和进行无损视频编码。For the HEVC lossless video coding method of the present invention, the selected method according to the above prediction mode selection method with Perform lossless video encoding.
实施例Example
为了验证本发明的有益效果,在最新的HEVC参考代码HM10.0上实现了该方法,并与参考代码中原有的跳过变换、量化、滤波的无损编码方法进行了对比。在仿真对比中,采用文献(F.Bossen,“Common Test Conditions and Software ReferenceConfigurations,”JCT-VC document,JCTVC-L1100,Geneva,Jan.2013)中提供的测试序列和测试条件作为仿真对比环境。其中,我们采用了三个编码环境,即随机接入主文件编码(Random Access Main Profile encoding,RA-Main)、低延时B主文件编码(Lowdelay BMain Profile encoding,LDB-Main)和低延时P主文件编码(Lowdelay P Main Profileencoding,LDP-Main)。我们对A类到F类全部视频序列都进行了测试,其中F类为屏幕录制视频序列,所含序列的分辨率不同,存在1280×720、1024×768和832×480多种分辨率,其他类别的视频序列的分辨率如表1所示。由于参考软件HM10.0中的默认编码方式为有损编码,我们需要将配置文件中指示是否进行无损编码的标志设置为1,即进行无损编码。In order to verify the beneficial effects of the present invention, the method is implemented on the latest HEVC reference code HM10.0, and compared with the original lossless coding method in the reference code that skips transform, quantization, and filtering. In the simulation comparison, the test sequence and test conditions provided in the literature (F.Bossen, "Common Test Conditions and Software Reference Configurations," JCT-VC document, JCTVC-L1100, Geneva, Jan.2013) were used as the simulation comparison environment. Among them, we adopted three encoding environments, namely Random Access Main Profile encoding (RA-Main), Low Delay BMain Profile encoding (LDB-Main) and Low Delay BMain Profile encoding (LDB-Main). P main file encoding (Lowdelay P Main Profile encoding, LDP-Main). We tested all video sequences from category A to category F, where category F is a screen recording video sequence, and the resolutions of the contained sequences are different, there are multiple resolutions of 1280×720, 1024×768 and 832×480. The resolutions of the video sequences of the categories are shown in Table 1. Since the default encoding method in the reference software HM10.0 is lossy encoding, we need to set the flag indicating whether to perform lossless encoding in the configuration file to 1, that is, perform lossless encoding.
表1 各类测试序列Table 1 Various test sequences
表2-4分别给出了在RA-Main、LDB-Main和LDP-Main三种编码环境下,HM 10.0中原有无损编码方法和本发明提出的方法的比特率,其中比特率节省率通过下式获得:Table 2-4 shows the bit rates of the original lossless coding method in HM 10.0 and the method proposed by the present invention under the three coding environments of RA-Main, LDB-Main and LDP-Main, respectively, and the bit rate saving rate is obtained through the following Obtained by:
比特率变化率=100×(本发明比特率-原有方法比特率)/原有方法比特率%。Bit rate change rate = 100 x (bit rate of the present invention - bit rate of the original method) / bit rate of the original method %.
表2RA-Main配置环境下实验结果Table 2 Experimental results in RA-Main configuration environment
表3LDB-Main配置环境下实验结果Table 3 Experimental results in LDB-Main configuration environment
表4LDP-Main配置环境下实验结果Table 4 Experimental results in LDP-Main configuration environment
通过表2-4,我们可以看出,相对HM10.0中无损压缩的方法,本发明的编码比特率有了很大降低。三种编码环境下,本发明方法的比特率平均降低了1.2-1.4%,特别是F类测试序列,其获得了平均高达2.5-2.9%的比特率节省。From Table 2-4, we can see that compared with the lossless compression method in HM10.0, the encoding bit rate of the present invention has been greatly reduced. Under the three encoding environments, the bit rate of the method of the present invention is reduced by 1.2-1.4% on average, especially for the class F test sequence, which obtains an average bit rate saving of 2.5-2.9%.
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention, and are not intended to limit the present invention. Within the spirit and principles of the present invention, any modifications, equivalent replacements, improvements, etc., shall be included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410609275.5A CN104320657B (en) | 2014-10-31 | 2014-10-31 | The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410609275.5A CN104320657B (en) | 2014-10-31 | 2014-10-31 | The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104320657A CN104320657A (en) | 2015-01-28 |
CN104320657B true CN104320657B (en) | 2017-11-03 |
Family
ID=52375818
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410609275.5A Active CN104320657B (en) | 2014-10-31 | 2014-10-31 | The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104320657B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105959611B (en) * | 2016-07-14 | 2018-09-21 | 同观科技(深圳)有限公司 | A kind of the interframe fast transcoding method and device of adaptive slave H264 to HEVC |
CN108347602B (en) * | 2017-01-22 | 2021-07-30 | 上海澜至半导体有限公司 | Method and apparatus for lossless compression of video data |
US10797723B2 (en) | 2017-03-14 | 2020-10-06 | International Business Machines Corporation | Building a context model ensemble in a context mixing compressor |
CN110300310B (en) * | 2018-03-23 | 2021-01-15 | 华为技术有限公司 | Image coding method, device and computer storage medium |
CN110381323B (en) * | 2018-04-12 | 2021-10-26 | 福州瑞芯微电子股份有限公司 | Inter-frame prediction-based lossless compression system and method for assisting frame motion vector information |
CN109547780B (en) * | 2018-10-26 | 2020-06-23 | 武汉天娱动画设计有限公司 | Image coding method and device |
CN109361924B (en) * | 2018-10-26 | 2020-11-10 | 西安科锐盛创新科技有限公司 | Image coding method and device |
CN109660806B (en) * | 2018-12-27 | 2021-01-29 | 上海众源网络有限公司 | Encoding method and device and electronic equipment |
CN112118444B (en) * | 2019-06-20 | 2022-11-25 | 杭州海康威视数字技术股份有限公司 | Encoding method and device |
CN117956186A (en) * | 2019-10-05 | 2024-04-30 | Lg电子株式会社 | Image decoding method, image encoding method, storage medium, and transmission method |
CN111882564A (en) * | 2020-07-27 | 2020-11-03 | 山东大学 | Compression processing method for ultra-high definition medical pathological image |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1708991A (en) * | 2002-11-08 | 2005-12-14 | 苹果电脑有限公司 | Method and apparatus for controlling rate-distortion tradeoff using lagrange multiplier and visual masking |
CN1846446A (en) * | 2003-09-03 | 2006-10-11 | 汤姆森许可贸易公司 | Method and arrangement for encoding video images |
CN101651831A (en) * | 2003-01-08 | 2010-02-17 | 苹果公司 | Method and apparatus for improved coding mode selection |
CN101960466A (en) * | 2007-09-11 | 2011-01-26 | 彩升集团有限公司 | Rate-distortion optimization for inter-mode generation for error-resilient video coding |
CN102625102A (en) * | 2011-12-22 | 2012-08-01 | 北京航空航天大学 | A rate-distortion mode selection method for H.264/SVC MGS coding |
-
2014
- 2014-10-31 CN CN201410609275.5A patent/CN104320657B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1708991A (en) * | 2002-11-08 | 2005-12-14 | 苹果电脑有限公司 | Method and apparatus for controlling rate-distortion tradeoff using lagrange multiplier and visual masking |
CN101651831A (en) * | 2003-01-08 | 2010-02-17 | 苹果公司 | Method and apparatus for improved coding mode selection |
CN1846446A (en) * | 2003-09-03 | 2006-10-11 | 汤姆森许可贸易公司 | Method and arrangement for encoding video images |
CN101960466A (en) * | 2007-09-11 | 2011-01-26 | 彩升集团有限公司 | Rate-distortion optimization for inter-mode generation for error-resilient video coding |
CN102625102A (en) * | 2011-12-22 | 2012-08-01 | 北京航空航天大学 | A rate-distortion mode selection method for H.264/SVC MGS coding |
Also Published As
Publication number | Publication date |
---|---|
CN104320657A (en) | 2015-01-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104320657B (en) | The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method | |
KR100813963B1 (en) | Lossless encoding and decoding method for video | |
CN101390401B (en) | Enhanced image/video quality through artifact evaluation | |
CN103329522B (en) | For the method using dictionary encoding video | |
CA2727149C (en) | Method and device for video encoding using predicted residuals | |
US20120275522A1 (en) | Method and apparatus for motion vector encoding/decoding using spatial division, and method and apparatus for image encoding/decoding using same | |
CN104041048A (en) | Method And Apparatus Video Encoding And Decoding Using Skip Mode | |
KR101621854B1 (en) | Tsm rate-distortion optimizing method, encoding method and device using the same, and apparatus for processing picture | |
US20130235938A1 (en) | Rate-distortion optimized transform and quantization system | |
US20130022118A1 (en) | Inter prediction method and apparatus using adjacent pixels, and image encoding/decoding method and apparatus using same | |
CN108574841A (en) | A coding method and device based on adaptive quantization parameters | |
US8675726B2 (en) | Method and encoder for constrained soft-decision quantization in data compression | |
US20160277767A1 (en) | Methods, systems and apparatus for determining prediction adjustment factors | |
KR102696422B1 (en) | Decoding method, encoding method, device, apparatus and storage medium | |
CN109076248A (en) | The vector quantization of Video coding is carried out by the code book generated by the training signal selected | |
CN105282557B (en) | A kind of H.264 rapid motion estimating method of predicted motion vector | |
CA2732218C (en) | Method and encoder for constrained soft-decision quantization in data compression | |
Huang et al. | Acceleration of rate-distortion optimized quantization for H. 264/AVC | |
CN112243123B (en) | HEVC (high efficiency video coding) rate optimization method based on lossless coding | |
CN118741158A (en) | Video lossless compression method, device and medium in H.264 coding environment | |
CN104320660B (en) | Rate-distortion optimization method and coding method for lossless video encoding | |
CN101931817A (en) | A Transform Base Adaptive Transform Coding Method | |
CN116982262A (en) | State transition for dependent quantization in video coding | |
KR20080013843A (en) | Lossless encoding and decoding method for video | |
US20240406395A1 (en) | Visual quality signalling mechanism |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |