CN104243985B - Sample Adaptive Compensation in HEVC - Google Patents
Sample Adaptive Compensation in HEVC Download PDFInfo
- Publication number
- CN104243985B CN104243985B CN201410510122.5A CN201410510122A CN104243985B CN 104243985 B CN104243985 B CN 104243985B CN 201410510122 A CN201410510122 A CN 201410510122A CN 104243985 B CN104243985 B CN 104243985B
- Authority
- CN
- China
- Prior art keywords
- type
- pixel
- compensation
- value
- sample adaptive
- 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
- 230000003044 adaptive effect Effects 0.000 title claims abstract description 92
- 238000000034 method Methods 0.000 claims description 30
- 230000005540 biological transmission Effects 0.000 claims description 5
- 230000006872 improvement Effects 0.000 abstract description 5
- 230000009466 transformation Effects 0.000 description 20
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 238000005457 optimization Methods 0.000 description 6
- 238000011160 research Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 239000008280 blood Substances 0.000 description 2
- 210000004369 blood Anatomy 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 101001126234 Homo sapiens Phospholipid phosphatase 3 Proteins 0.000 description 1
- 102100030450 Phospholipid phosphatase 3 Human genes 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
对HEVC中的样本自适应补偿进行改进。首先,针对最大编码单元中的各个编码单元的边界像素进行额外的边界补偿。其次,在边缘补偿(EO)类型2和3中加入新的模式:当前像素与左侧相邻像素的像素值相差1,与右侧相邻像素相差3以上,当前像素与左侧相邻像素的像素值相差2,与右侧相邻像素相差6以上。最后,消除了类型2和3中当前像素与相邻像素的差小于等于1的情况。
Improvements to sample adaptive compensation in HEVC. First, additional boundary compensation is performed for boundary pixels of each coding unit in the largest coding unit. Second, add a new mode to edge compensation (EO) types 2 and 3: the pixel value difference between the current pixel and the left adjacent pixel is 1, and the difference between the right adjacent pixel and the right adjacent pixel is more than 3, and the current pixel and the left adjacent pixel The pixel value of is different by 2, and the difference from the adjacent pixel on the right is more than 6. Finally, the cases where the difference between the current pixel and the neighboring pixels is less than or equal to 1 in types 2 and 3 are eliminated.
Description
联合研究joint research
本申请由北方工业大学与北京交通大学信息所联合研究,并得到以下基金资助:国家自然科学基金(No.60903066,No.60972085),北京市自然科学基金(No.4102049),教育部新教师基金(No.20090009120006),北京市属高等学校人才强教深化计划(PHR201008187)。This application is jointly researched by North China University of Technology and Information Institute of Beijing Jiaotong University, and supported by the following funds: National Natural Science Foundation of China (No.60903066, No.60972085), Beijing Natural Science Foundation of China (No.4102049), New Teacher of the Ministry of Education Fund (No.20090009120006), and Beijing Municipal Higher Education Intensification Plan for Talents (PHR201008187).
技术领域technical field
本发明涉及图像处理领域,更具体而言,涉及在HEVC中的优化的样本自适应补偿。The present invention relates to the field of image processing, and more particularly to optimized sample adaptive compensation in HEVC.
背景技术Background technique
2010年4月,两大国际视频编码标准组织VCEG和MPEG成立视频压缩联合小组JCT-VC(Joint collaborative Team on Video Coding),一同开发高效视频编码HEVC(Highefficiency video coding)标准,其也称为H.265。HEVC标准主要目标是与上一代标准H.264/AVC实现大幅度的编码效率的提高,尤其是针对高分辨率视频序列。其目标是在相同视频质量(PSNR)下码率降为H.264标准的50%。In April 2010, the two major international video coding standard organizations VCEG and MPEG established a video compression joint group JCT-VC (Joint collaborative Team on Video Coding) to jointly develop the High Efficiency Video Coding HEVC (High efficiency video coding) standard, which is also known as H .265. The main goal of the HEVC standard is to achieve a substantial improvement in coding efficiency compared with the previous generation standard H.264/AVC, especially for high-resolution video sequences. Its goal is to reduce the bit rate to 50% of the H.264 standard at the same video quality (PSNR).
就目前阶段,HEVC依然沿用H.264就开始采用的混合编码框架。帧间和帧内预测编码:消除时间域和空间域的相关性。变换编码:对残差进行变换编码以消除空间相关性。熵编码:消除统计上的冗余度。HEVC将在混合编码框架内,着力研究新的编码工具或技术,提高视频压缩效率。At the current stage, HEVC still uses the hybrid coding framework adopted by H.264. Inter- and intra-frame predictive coding: De-correlation between temporal and spatial domains. Transform coding: Transform coding is performed on the residual to remove spatial correlation. Entropy coding: remove statistical redundancy. HEVC will focus on researching new coding tools or technologies within the framework of hybrid coding to improve video compression efficiency.
目前,JCT-VC组织的讨论中已经提出的许多编码的新特性,有可能会加入HEVC标准中,各次讨论的具体文献可以从http://wftp3.itu.int获得。At present, many new coding features that have been proposed in the discussion organized by JCT-VC may be added to the HEVC standard. The specific documents of each discussion can be obtained from http://wftp3.itu.int .
HEVC(High Efficiency Video Coding)标准在2013年一月份正式作为国际标准发布。在ITU-T中被称作H.265,而在ISO/IEC中被称作MPEG-H的第二部分。同时,为了使HEVC标准能够支持更多的应用场景,开展了后续的工作,其中包括对高分辨率以及色彩格式的支持,可伸缩编码,3-D/立体/多视角编码。The HEVC (High Efficiency Video Coding) standard was officially released as an international standard in January 2013. It is called H.265 in ITU-T, and it is called the second part of MPEG-H in ISO/IEC. At the same time, in order to enable the HEVC standard to support more application scenarios, follow-up work has been carried out, including support for high resolution and color formats, scalable coding, and 3-D/stereoscopic/multi-view coding.
但是,HEVC仍然不断发展中。样本自适应补偿是HEVC中崭新出现的一个新技术,该技术给HEVC加入了新鲜血液,然而该技术由于是新出现的,还存在着一些不足以及需要补充的地方,具体如下所述。However, HEVC is still evolving. Sample adaptive compensation is a new technology in HEVC, which adds fresh blood to HEVC. However, because this technology is new, there are still some deficiencies and needs to be supplemented, as described below.
在本发明中,我们提出的样本自适应补偿的两种优化算法,从其实验结果中我们可以看出这两种算法都有着不错的效果。In the present invention, we propose two optimization algorithms for sample adaptive compensation. From the experimental results, we can see that these two algorithms have good effects.
在本发明的说明书中,引用了如下文献,在此将其并入本发明作为本发明的公开内容的一部分。In the description of the present invention, the following documents are cited, which are hereby incorporated as part of the disclosure content of the present invention.
[1].G.J.Sullivan,J.R.Ohm,W.J.Han and T.Wiegand.Overview of the HighEfficiency Video Coding(HEVC)Standard,IEEE Transactions on Circuits andSystems for Video Technology,Vol.22,Issue 12,2012,pp.1649-1668.[1].G.J.Sullivan, J.R.Ohm, W.J.Han and T.Wiegand.Overview of the HighEfficiency Video Coding(HEVC)Standard, IEEE Transactions on Circuits and Systems for Video Technology, Vol.22, Issue 12, 2012, pp.1649- 1668.
[2].J.Zhu,D.Zhou,G.He,S.Goto.A combined SAO and de-blocking filterarchitecture for HEVC video decoder,in Proceedings of the Conference on′20thIEEE International Conference on Image Processing(ICIP)’,Melbourne,VIC,15-18Sept.2013,pp.1967-1971.[2].J.Zhu, D.Zhou, G.He, S.Goto.A combined SAO and de-blocking filterarchitecture for HEVC video decoder, in Proceedings of the Conference on '20th IEEE International Conference on Image Processing (ICIP)' , Melbourne, VIC, 15-18Sept.2013, pp.1967-1971.
[3].P.N.Subramanya,R.Adireddy,D.Anand.SAO in CTU decoding loop forHEVC video decoder,in Proceedings of the Conference on′InternationalConference on Signal Processing and Communication(ICSC)’,Noida,12-14Dec.2013,pp.507-511.[3].P.N.Subramanya, R.Adireddy, D.Anand.SAO in CTU decoding loop for HEVC video decoder, in Proceedings of the Conference on'International Conference on Signal Processing and Communication (ICSC)', Noida, 12-14Dec.2013, pp.507-511.
[4].G.B.Praveen,G.B.Praveen.Analysis and approximation of SAOestimation for CTU-level HEVC encoder,in Proceedings of the Conference on′Visual Communications and Image Processing(VCIP)’,Kuching,17-20Nov.2013,pp.1-5.[4].G.B.Praveen, G.B.Praveen.Analysis and approximation of SAOestimation for CTU-level HEVC encoder, in Proceedings of the Conference on'Visual Communications and Image Processing (VCIP)', Kuching, 17-20Nov.2013, pp.1 -5.
[5].W.Kim,J.Sole,Marta.Offset Scaling in SAO for High Bit-depth VideoCoding,in Proceedings of the Conference on′13th Joint Collaborative Team onVideo Coding (JCT-VC)Meeting’,Incheon,KR,18-26Apr.2013,JCTVC-M0335.[5]. W. Kim, J. Sole, Marta. Offset Scaling in SAO for High Bit-depth Video Coding, in Proceedings of the Conference on '13th Joint Collaborative Team on Video Coding (JCT-VC) Meeting', Incheon, KR, 18-26Apr.2013, JCTVC-M0335.
[6].G.Laroche,T.Poirier,C.Gisquet,E.P.Onno.On Inter-Layer SAOfor Base mode,in Proceedings of the Conference on′12th Joint CollaborativeTeam on Video Coding(JCT-VC)Meeting’,Geneva,CH,14-23Jan.2013,JCTVC-L107.[6]. G. Laroche, T. Poirier, C. Gisquet, E. P. Onno. On Inter-Layer SAO for Base mode, in Proceedings of the Conference on '12th Joint Collaborative Team on Video Coding (JCT-VC) Meeting', Geneva, CH, 14-23Jan.2013, JCTVC-L107.
发明内容Contents of the invention
为了解决上述技术问题,本专利对HEVC中的样本自适应补偿进行改进。首先,针对最大编码单元中的各个编码单元的边界像素进行额外的边界补偿。其次,在边缘补偿(EO)类型2和3中加入新的模式:当前像素与左侧相邻像素的像素值相差1,与右侧相邻像素相差3以上,当前像素与左侧相邻像素的像素值相差2,与右侧相邻像素相差6以上。最后,消除了类型2和3中当前像素与相邻像素的差小于等于1的情况。In order to solve the above technical problems, this patent improves the sample adaptive compensation in HEVC. First, additional boundary compensation is performed for boundary pixels of each coding unit in the largest coding unit. Second, add a new mode to edge compensation (EO) types 2 and 3: the pixel value difference between the current pixel and the left adjacent pixel is 1, and the difference between the right adjacent pixel and the right adjacent pixel is more than 3, and the current pixel and the left adjacent pixel The pixel value of is different by 2, and the difference from the adjacent pixel on the right is more than 6. Finally, the cases where the difference between the current pixel and the neighboring pixels is less than or equal to 1 in types 2 and 3 are eliminated.
根据一个方面,一种在HEVC中用于确定解码器端的样本自适应补偿参数的方法,所述方法在编码器中实施,所述方法包括:According to one aspect, a method for determining sample-adaptive compensation parameters at a decoder in HEVC, the method being implemented in an encoder, the method comprising:
从已编码的图像中重建最大编码单元(CU);Reconstruct the largest coding unit (CU) from the encoded image;
分别基于以下样本自适应补偿类型来对重建的最大CU进行样本自适应补偿:像素带补偿(Band offset,BO)类型、边缘补偿(Edge offset,EO)类型1、EO类型2、EO类型3和EO类型4,从而为所述BO类型得到补偿结果,并为EO类型1、EO类型2、EO类型3和EO类型4得到4个补偿结果;Sample adaptive compensation is performed on the reconstructed largest CU based on the following sample adaptive compensation types: pixel band compensation (Band offset, BO) type, edge compensation (Edge offset, EO) type 1, EO type 2, EO type 3, and EO type 4, thereby obtaining compensation results for said BO type, and obtaining 4 compensation results for EO type 1, EO type 2, EO type 3 and EO type 4;
基于所述BO类型的补偿结果和EO类型1、EO类型2、EO类型3和EO类型4的4个补偿结果中的每一个和所述重建的最大CU相对于原始图像的率失真代价值,从BO类型、EO类型0、EO类型1、EO类型2、EO类型3和EO类型4中选出最优样本自适应补偿类型,其中,所述EO类型0表示不进行补偿并由此对应于所述重建的最大CU;Based on the compensation result of the BO type and each of the four compensation results of EO type 1, EO type 2, EO type 3, and EO type 4 and the rate-distortion cost value of the reconstructed maximum CU relative to the original image, Select the optimal sample adaptive compensation type from BO type, EO type 0, EO type 1, EO type 2, EO type 3 and EO type 4, wherein the EO type 0 means no compensation and thus corresponds to the maximum CU of said reconstruction;
确定与所选出的最优样本自适应补偿类型相对应的第一补偿值,其中,所述EO类型0对应的第一补偿值为0;determining a first compensation value corresponding to the selected optimal sample adaptive compensation type, wherein the first compensation value corresponding to the EO type 0 is 0;
基于所选出的最优样本自适应补偿类型确定第二边界补偿值,determining a second boundary compensation value based on the selected optimal sample adaptive compensation type,
将所选出的最优样本自适应补偿类型、所述第一补偿值和所述第二边界补偿值编码至与所述最大CU相关联的编码信息中进行传送;encoding the selected optimal sample adaptive compensation type, the first compensation value and the second boundary compensation value into the encoding information associated with the largest CU for transmission;
其特征在于:It is characterized by:
像素类型2中包含当前像素的像素值比左侧相邻像素的像素值小1,比右侧相邻像素的像素值大3以上的情况,以及当前像素的像素值比左侧相邻像素的像素值小2,比右侧相邻像素的像素值大6以上的情况,Pixel type 2 includes the case where the pixel value of the current pixel is smaller than the pixel value of the left adjacent pixel by 1 and greater than the pixel value of the right adjacent pixel by more than 3, and the pixel value of the current pixel is larger than that of the left adjacent pixel When the pixel value is smaller than 2 and larger than the pixel value of the adjacent pixel on the right by 6 or more,
像素类型3中包含当前像素的像素值比右侧相邻像素的像素值大1,比左侧相邻像素的像素值小3以上的情况,以及当前像素的像素值比右侧相邻像素的像素值大2,比左侧相邻像素的像素值小6以上的情况,Pixel type 3 includes the case where the pixel value of the current pixel is greater than the pixel value of the right adjacent pixel by 1, smaller than the pixel value of the left adjacent pixel by more than 3, and the pixel value of the current pixel is greater than that of the right adjacent pixel When the pixel value is greater than 2 and less than the pixel value of the adjacent pixel on the left by more than 6,
在像素类型2和像素类型3中,如果当前像素的像素值与两个相邻像素的像素值之间差小于等于1,则当前像素不作补偿,In pixel type 2 and pixel type 3, if the difference between the pixel value of the current pixel and the pixel value of two adjacent pixels is less than or equal to 1, the current pixel will not be compensated,
所述确定第二边界补偿值包括:基于所述最优样本自适应补偿类型,计算针对所述最大CU中的各个变换单元的边界像素的多个边界补偿值的多个率失真代价值,并基于所述多个率失真代价值选出一个边界补偿值。The determining a second boundary compensation value includes: calculating a plurality of rate-distortion cost values for a plurality of boundary compensation values of boundary pixels of each transform unit in the largest CU based on the optimal sample adaptive compensation type, and A boundary compensation value is selected based on the plurality of rate-distortion cost values.
在进一步的方面中,基于最优样本自适应补偿类型来设置所述最大CU中的语法元素sao_type_idx和sao_eo_class的值,其中,sao_type_idx的值0、1、2分别表示不进行样本自适应补偿、使用像素带补偿(BO)和边缘补偿(EO),sao_eo_class的值0-3表示EO类型1、EO类型2、EO类型3和EO类型4。In a further aspect, the values of the syntax elements sao_type_idx and sao_eo_class in the largest CU are set based on the optimal sample adaptive compensation type, wherein the values of sao_type_idx are 0, 1, and 2 respectively indicating no sample adaptive compensation, using Pixel band compensation (BO) and edge compensation (EO), the value of sao_eo_class 0-3 means EO type 1, EO type 2, EO type 3 and EO type 4.
在进一步的方面中,所述EO类型1-4分别使用水平线、垂直线、135度角对角线和45度角对角线。In a further aspect, the EO types 1-4 use horizontal lines, vertical lines, 135 degree diagonal lines and 45 degree diagonal lines, respectively.
在进一步的方面中,在所述BO类型中,将全像素范围统一分割为32个像素带,选择其中4个像素带,并确定针对所选出的4个像素带的正补偿或负补偿,其中,使用率失真代价来确定针对所选出的4个像素带的正补偿或负补偿,所述最优样本自适应补偿类型是所述BO类型,所述第一补偿值包括所确定针对所选出的4个像素带的正补偿或负补偿。In a further aspect, in the BO type, the entire pixel range is uniformly divided into 32 pixel bands, 4 of which are selected, and positive compensation or negative compensation for the selected 4 pixel bands is determined, Wherein the rate-distortion cost is used to determine the positive compensation or negative compensation for the selected 4 pixel bands, the optimal sample adaptive compensation type is the BO type, and the first compensation value includes the determined Positive or negative compensation for the selected 4 pixel bands.
在进一步的方面中,在所述EO类型1-4中,所述第一补偿值包括基于与所述EO类型1-4分别对应的补偿函数所确定的补偿值。In a further aspect, in the EO types 1-4, the first compensation value includes compensation values determined based on compensation functions respectively corresponding to the EO types 1-4.
在进一步的方面中,在所述EO类型1-4中,所述第一补偿值包括基于与所述EO类型1-4分别对应的补偿函数所确定的补偿值。In a further aspect, in the EO types 1-4, the first compensation value includes compensation values determined based on compensation functions respectively corresponding to the EO types 1-4.
根据另一方面,一种在HEVC中用于确定解码器端的样本自适应补偿参数的装置,所述装置在编码器中实施,所述装置包括:According to another aspect, an apparatus for determining sample-adaptive compensation parameters at a decoder in HEVC, said apparatus being implemented in an encoder, said apparatus comprising:
用于从已编码的图像中重建最大编码单元(CU)的单元;A unit for reconstructing a largest coding unit (CU) from an encoded image;
用于分别基于以下4种样本自适应补偿类型来对重建的最大CU进行样本自适应补偿:像素带补偿(Band offset,BO)类型、边缘补偿(Edge offset,EO)类型1、EO类型2、EO类型3和EO类型4,从而为所述BO类型得到补偿结果,并为EO类型1、EO类型2、EO类型3和EO类型4得到4个补偿结果的单元;It is used to perform sample adaptive compensation on the reconstructed largest CU based on the following four sample adaptive compensation types: pixel band compensation (Band offset, BO) type, edge compensation (Edge offset, EO) type 1, EO type 2, EO type 3 and EO type 4, thereby obtaining compensation results for said BO type, and obtaining 4 units of compensation results for EO type 1, EO type 2, EO type 3 and EO type 4;
用于基于所述BO类型的补偿结果和EO类型1、EO类型2、EO类型3和EO类型4的4个补偿结果中的每一个和所述重建的最大CU相对于原始图像的率失真代价值,从BO类型、EO类型0、EO类型1、EO类型2、EO类型3和EO类型4中选出最优样本自适应补偿类型,其中,所述EO类型0表示不进行补偿并由此对应于所述重建的最大CU的单元;For each of the 4 compensation results based on the BO type and the 4 compensation results of EO type 1, EO type 2, EO type 3, and EO type 4 and the rate-distortion generation of the reconstructed maximum CU relative to the original image Value, select the optimal sample adaptive compensation type from BO type, EO type 0, EO type 1, EO type 2, EO type 3 and EO type 4, wherein the EO type 0 means no compensation and thus a unit corresponding to the reconstructed largest CU;
用于确定与所选出的最优样本自适应补偿类型相对应的第一补偿值的单元,其中,所述EO类型0对应的第一补偿值为0;A unit for determining a first compensation value corresponding to the selected optimal sample adaptive compensation type, wherein the first compensation value corresponding to the EO type 0 is 0;
用于基于所选出的最优样本自适应补偿类型确定第二边界补偿值的单元,means for determining a second boundary compensation value based on the selected optimal sample adaptive compensation type,
用于将所选出的最优样本自适应补偿类型、所述第一补偿值和所述第二边界补偿值编码至与所述最大CU相关联的编码信息中进行传送的单元;A unit for encoding the selected optimal sample adaptive compensation type, the first compensation value and the second boundary compensation value into the encoding information associated with the largest CU for transmission;
其特征在于:It is characterized by:
像素类型2中包含当前像素的像素值比左侧相邻像素的像素值小1,比右侧相邻像素的像素值大3以上的情况,以及当前像素的像素值比左侧相邻像素的像素值小2,比右侧相邻像素的像素值大6以上的情况,Pixel type 2 includes the case where the pixel value of the current pixel is smaller than the pixel value of the left adjacent pixel by 1 and greater than the pixel value of the right adjacent pixel by more than 3, and the pixel value of the current pixel is larger than that of the left adjacent pixel When the pixel value is smaller than 2 and larger than the pixel value of the adjacent pixel on the right by 6 or more,
像素类型3中包含当前像素的像素值比右侧相邻像素的像素值大1,比左侧相邻像素的像素值小3以上的情况,以及当前像素的像素值比右侧相邻像素的像素值大2,比左侧相邻像素的像素值小6以上的情况,Pixel type 3 includes the case where the pixel value of the current pixel is greater than the pixel value of the right adjacent pixel by 1, smaller than the pixel value of the left adjacent pixel by more than 3, and the pixel value of the current pixel is greater than that of the right adjacent pixel When the pixel value is greater than 2 and less than the pixel value of the adjacent pixel on the left by more than 6,
在像素类型2和像素类型3中,如果当前像素的像素值与两个相邻像素的像素值之间差小于等于1,则当前像素不作补偿,In pixel type 2 and pixel type 3, if the difference between the pixel value of the current pixel and the pixel value of two adjacent pixels is less than or equal to 1, the current pixel will not be compensated,
所述用于确定第二边界补偿值的单元包括:用于基于所述最优样本自适应补偿类型,计算针对所述最大CU中的各个变换单元的边界像素的多个边界补偿值的多个率失真代价值,并基于所述多个率失真代价值选出一个边界补偿值的单元。The unit for determining the second boundary compensation value includes: calculating a plurality of boundary compensation values for boundary pixels of each transform unit in the largest CU based on the optimal sample adaptive compensation type. rate-distortion cost values, and select a unit of boundary compensation value based on the multiple rate-distortion cost values.
根据另一方面,本发明提出了一种计算机程序产品,其包含计算机可读介质,所述计算机可读介质包含程序代码,所述程序代码当由处理器执行时,执行如上所述的方法。According to another aspect, the invention proposes a computer program product comprising a computer readable medium comprising a program code which, when executed by a processor, performs the method as described above.
根据另一方面,本发明提出了一种基于HEVC的编解码器,其用于执行如上所述的视频编码方法。According to another aspect, the present invention proposes an HEVC-based codec for performing the video coding method as described above.
附图说明Description of drawings
图1示出了根据本发明的一个实施例的样本自适应补偿的高级流程图。Figure 1 shows a high-level flowchart of sample adaptive compensation according to one embodiment of the present invention.
图2示出了根据本发明的一个实施例的像素带补偿的示意图。Fig. 2 shows a schematic diagram of pixel band compensation according to an embodiment of the present invention.
图3示出了根据本发明的一个实施例的像素边缘补偿类型判决。Fig. 3 shows the determination of pixel edge compensation type according to an embodiment of the present invention.
图4示出了根据本发明的一个实施例的相似边缘补偿的类型示意图。Fig. 4 shows a schematic diagram of types of similar edge compensation according to an embodiment of the present invention.
图5示出了根据本发明的一个实施例的最大编码单元内部的边缘单元(虚线部分为变换单元边界像素)。FIG. 5 shows edge units inside a LCU according to an embodiment of the present invention (the dotted line part is a transform unit boundary pixel).
图6示出了根据本发明的一个实施例的第二、三类样本自适应补偿的示意图。Fig. 6 shows a schematic diagram of the second and third types of sample adaptive compensation according to an embodiment of the present invention.
图7示出了根据本发明的一个实施例的未进行样本自适应补偿的像素类型的示意图。Fig. 7 shows a schematic diagram of pixel types without sample adaptive compensation according to an embodiment of the present invention.
图8示出了根据本发明的一个实施例的不需要进行样本自适应补偿的请求。FIG. 8 illustrates a request for no sample adaptive compensation according to one embodiment of the present invention.
图9(a)和(b)示出了根据本发明的一个实施例的类型2的补充像素模式。Figures 9(a) and (b) illustrate a Type 2 supplementary pixel pattern according to one embodiment of the present invention.
图9(c)和(d)示出了示出了根据本发明的一个实施例的类型3的补充像素模式。Figures 9(c) and (d) illustrate supplementary pixel patterns showing Type 3 according to one embodiment of the present invention.
图9(e)和(f)示出了示出了根据本发明的一个实施例的需要从类型2和3中剔除的像素模式。Figures 9(e) and (f) show pixel patterns that need to be culled from types 2 and 3 according to one embodiment of the present invention.
图10示出了根据本发明的一个实施例的方法原理图。Fig. 10 shows a schematic diagram of a method according to an embodiment of the present invention.
图11(a)示出了根据本发明的一个实施例的方法流程图。Fig. 11(a) shows a flowchart of a method according to an embodiment of the present invention.
图11(b)示出了根据本发明的一个实施例的装置流程图。Fig. 11(b) shows a flow chart of the apparatus according to one embodiment of the present invention.
图12示出了HEVC编码器的基本原理图。Figure 12 shows the basic schematic diagram of the HEVC encoder.
具体实施方式Detailed ways
现在参考附图来描述各种方案。在以下描述中,为了进行解释,阐述了多个具体细节以便提供对一个或多个方案的透彻理解。然而,显然,在没有这些具体细节的情况下也能够实现这些方案。Various aspects are now described with reference to the figures. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more aspects. It may be evident, however, that such aspects can be practiced without these specific details.
如在本申请中所使用的,术语“组件”、“模块”、“系统”等等旨在指代与计算机相关的实体,例如但不限于,硬件、固件、硬件和软件的组合、软件,或者是执行中的软件。例如,组件可以是但不限于:在处理器上运行的进程、处理器、对象、可执行体(executable)、执行线程、程序、和/或计算机。举例而言,运行在计算设备上的应用程序和该计算设备都可以是组件。一个或多个组件可以位于执行进程和/或者执行线程内,并且组件可以位于一台计算机上和/或者分布在两台或更多台计算机上。另外,这些组件可以从具有存储在其上的各种数据结构的各种计算机可读介质执行。组件可以借助于本地和/或远程进程进行通信,例如根据具有一个或多个数据分组的信号,例如,来自于借助于信号与本地系统、分布式系统中的另一组件交互和/或者与在诸如因特网之类的网络上借助于信号与其他系统交互的一个组件的数据。As used in this application, the terms "component", "module", "system" and the like are intended to refer to a computer-related entity such as, but not limited to, hardware, firmware, a combination of hardware and software, software, Or software in execution. For example, a component may be, but is not limited to being limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. For example, both an application running on a computing device and the computing device can be components. One or more components can reside within a process and/or thread of execution and a component can be localized on one computer and/or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. Components can communicate by means of local and/or remote processes, such as from signals having one or more data packets, for example, from interacting with another component in a local system, a distributed system, and/or with another component in a distributed system by means of a signal. Data of a component on a network such as the Internet that interacts with other systems by means of signals.
图12示出了高效视频编码(HEVC)所实现的视频编码器的大致结构图。HEVC的编码器架构与H.264所使用的编码器架构大致相同,主要是针对各个模块中所使用的算法进行了进一步的研究、改进,尤其是针对高分辨率视频序列,其改进的目标是在相同视频质量(PSNR)下码率降为H.264标准的50%。FIG. 12 shows a schematic structural diagram of a video encoder implemented by High Efficiency Video Coding (HEVC). The encoder architecture of HEVC is roughly the same as the encoder architecture used by H.264, mainly for further research and improvement on the algorithms used in each module, especially for high-resolution video sequences. The goal of the improvement is Under the same video quality (PSNR), the bit rate is reduced to 50% of the H.264 standard.
由于HEVC的编码器架构与H.264所使用的编码器架构大致相同,因此不混淆本发明,本申请中不对图9中的整体架构进行描述。Since the encoder architecture of HEVC is roughly the same as the encoder architecture used by H.264, so as not to confuse the present invention, the overall architecture in FIG. 9 is not described in this application.
在HEVC中,输入的视频首先被分割成一些小块叫做编码树单元(coding treeunits,CTU)。本领域技术人员可以理解,CTU相当于之前标准的宏块(macroblock)的概念。编码单元(CU)是一个拥有一个预测模式(帧内、帧间或者跳过)的正方形的(像素)单元。基于CTU和CU的预测单元分割方式如图1所示。In HEVC, the input video is first divided into small blocks called coding tree units (coding tree units, CTU). Those skilled in the art can understand that a CTU is equivalent to the concept of a previous standard macroblock (macroblock). A coding unit (CU) is a square (pixel) unit with a prediction mode (intra, inter, or skip). The prediction unit division method based on CTU and CU is shown in Fig. 1 .
1.1样本自适应补偿简介1.1 Introduction to Sample Adaptive Compensation
样本自适应补偿是HEVC中崭新出现的一个新技术,该技术给HEVC加入了新鲜血液。Sample adaptive compensation is a new technology emerging in HEVC, which adds fresh blood to HEVC.
HEVC当中采用了新的环路滤波器,包括去块滤波器(Deblocking Filter,DF)和样本自适应补偿(Sample Adaptive Offset,SAO)。样本自适应补偿位于去块滤波器之后,目的是减少区域的平均失真度,样本自适应补偿首先会用选定的分类方法将最大编码单元中的样本进行分类统计,从而得到为各个种类得到一个补偿值,然后将补偿值加到相应种类的像素值中。A new loop filter is used in HEVC, including a deblocking filter (Deblocking Filter, DF) and a sample adaptive offset (Sample Adaptive Offset, SAO). The sample adaptive compensation is located after the deblocking filter, and the purpose is to reduce the average distortion of the region. The sample adaptive compensation first uses the selected classification method to classify and count the samples in the largest coding unit, so as to obtain a Compensation value, and then add the compensation value to the corresponding kind of pixel value.
自适应样本补偿在编码的过程中是位于去块滤波器之后的一个模块,该模块完成的是一个修改解码样本值的一个过程,修改过程是在一定情况下对样本补偿一定的值[1][2]。样本自适应补偿滤波是作用在一定区域上的,每一最大编码单元中都会通过一个sao_type_idx的句法元素来选取该单元的滤波模式,其中“sao”则表示样本自适应补偿(samples adaptive offset)。当sao_type_idx为0是表示该最大编码单元不适用样本自适应补偿,当该值为1和2时相应的表示使用像素带补偿(BO,band offset)和边缘补偿(EO,edge offset)[3][4]。样本自适应补偿流程图如图1所示。Adaptive sample compensation is a module located after the deblocking filter in the encoding process. This module completes a process of modifying the decoded sample value. The modification process is to compensate a certain value for the sample under certain circumstances [1] [2]. The sample adaptive compensation filter is applied to a certain area. In each LCU, a syntax element of sao_type_idx is used to select the filter mode of the unit, where "sao" means samples adaptive offset. When sao_type_idx is 0, it means that the largest coding unit does not apply sample adaptive compensation. When the value is 1 and 2, it means that pixel band compensation (BO, band offset) and edge compensation (EO, edge offset) are used [3] [4]. The flowchart of sample adaptive compensation is shown in Fig.1.
在像素带补偿模式中,选取的补偿值直接依赖于像素的幅度。在这种模式中,全像素的范围被统一的分割成32个部分,也就是分成了32个像素带,如图2所示,像素带模式会选取其中连续的4个像素带,并对这四个像素带中的样本值进行正(向)补偿或负(向)补偿。之所以要选取连续的4个像素带进行补偿是因为带状伪像通常会出现在平滑的区域中,而一个最大编码单元中的像素值趋向于集中在较少的像素带上。同时选取4个补偿值和边缘补偿模式的操作相匹配,因为边缘补偿也是选取了4个补偿值。In Pixel Band Compensation mode, the selected compensation value is directly dependent on the pixel's amplitude. In this mode, the range of all pixels is uniformly divided into 32 parts, that is, divided into 32 pixel bands, as shown in Figure 2, the pixel band mode will select 4 consecutive pixel bands, and The sample values in the four pixel bands are positively (directly) compensated or negatively (directly) compensated. The reason why continuous 4-pixel bands are selected for compensation is that banding artifacts usually appear in smooth areas, and pixel values in a maximum coding unit tend to be concentrated in fewer pixel bands. Selecting 4 compensation values at the same time matches the operation of the edge compensation mode, because the edge compensation also selects 4 compensation values.
在边缘补偿中,句法元素sao_eo_class的值从0到3表示边缘补偿中使用的是水平、垂直、135度角对角线和45度角对角线,如图3所示。最大编码单元中所有的像素值都会被归为如表1和图4所示的5种类型中的一个,其中c代表当前像素值,a和b分别代表相邻的两个像素值。这个归类的依据是已经解码出来的各个像素样本值,所以并不需要额外的信号去传递这个归类结果[5]。依靠在像素样本上的边缘索引分类,通过一个传输到解码端的查找表,我们就可以对相应的样本值加上相应的补偿值。对于种类1和2,补偿值总是正(向)的,而种类3和4的补偿值总是负(向)的,因此边缘滤波所产生的是一个平滑的效果。In edge compensation, the value of the syntax element sao_eo_class from 0 to 3 indicates that horizontal, vertical, 135-degree diagonal lines and 45-degree diagonal lines are used in edge compensation, as shown in Figure 3 . All pixel values in the largest coding unit will be classified as one of the five types shown in Table 1 and Figure 4, where c represents the current pixel value, and a and b represent two adjacent pixel values respectively. The classification is based on the decoded pixel sample values, so no additional signal is needed to convey the classification result [5]. Relying on the edge index classification on the pixel samples, through a lookup table transmitted to the decoder, we can add corresponding compensation values to the corresponding sample values. For types 1 and 2, the compensation value is always positive (towards), while the compensation value of types 3 and 4 is always negative (towards), so edge filtering produces a smooth effect.
在图4中,种类1、2进行的是正向补偿,种类3、4进行的是负向补偿。In Fig. 4, types 1 and 2 perform positive compensation, and types 3 and 4 perform negative compensation.
表1 像素边界补偿分类判决Table 1 Pixel boundary compensation classification decision
综上所述,样本自适应补偿的像素带补偿和边缘补偿都会分别为每个最大编码单元传递4个补偿值的幅度,而对于像素带补偿,补偿的符号(正或负)是需要进行传输的[6]。补偿值和相应的句法元素值的选取,例如sao_type_idx和sao_eo_class,都是通过优化率失真的效果来选取的。同时,当前块的样本自适应补偿参数也可以通过继承左边和上边的最大编码单元的样本自适应补偿参数来获得。总体来说,样本自适应补偿是一个允许进一步改善重建信号的非线性滤波操作,并且他既可以增强平滑区域的信号表达又可以改善边缘部分。In summary, the pixel band compensation and edge compensation of the sample adaptive compensation will respectively transmit the magnitude of 4 compensation values for each maximum coding unit, and for the pixel band compensation, the sign of the compensation (positive or negative) needs to be transmitted of [6]. The selection of compensation values and corresponding syntax element values, such as sao_type_idx and sao_eo_class, are selected by optimizing the effect of rate distortion. Meanwhile, the sample adaptive compensation parameters of the current block may also be obtained by inheriting the sample adaptive compensation parameters of the left and upper LCUs. In general, sample-adaptive compensation is a nonlinear filtering operation that allows further improvement of the reconstructed signal, and it can both enhance the signal expression in smooth regions and improve the edge parts.
2.基于变换单元边界的样本自适应补偿优化2. Sample Adaptive Compensation Optimization Based on Transform Unit Boundary
HEVC中的变换单元(TransformUnit,TU)的大小是从4x4到32x32,而在H.264中变换单元的大小不大于8x8。因为使用离散余弦变换(Discrete Cosine Transform,DCT)会引起变换系数的量化失真,所以更大的变换单元会在变换单元的边缘引起更加明显的环形伪影和更加严重的失真。然而样本自适应补偿实现的是区域的平均失真度的降低,去块滤波器并没有降低失真度的效果,因此对于TU边缘的样本失真并没有得到特别的处理。The size of the transformation unit (TransformUnit, TU) in HEVC is from 4x4 to 32x32, while the size of the transformation unit in H.264 is not larger than 8x8. Because the use of discrete cosine transform (Discrete Cosine Transform, DCT) will cause quantization distortion of transform coefficients, a larger transform unit will cause more obvious ring artifacts and more serious distortion at the edge of the transform unit. However, the sample adaptive compensation achieves the reduction of the average distortion degree of the region, and the deblocking filter does not reduce the distortion degree, so the sample distortion at the edge of the TU has not been specially processed.
优化算法optimization
通过我们的研究发现,即使是经过了去块滤波器之后的变换单元,变换单元边界上的失真也要比变换单元内部大很多。为了有针对性的降低变换单元边界上的失真,我们为样本自适应补偿加入了一种新的模式,即变换单元边缘模式。该模式旨在给变换单元边界一个额外的补偿,从而带来更低的变换单元边界样本失真和更低的比特率。最大编码单元内部变换单元如图5所示,其中的虚线部分为变换单元边界上的像素样本。Through our research, it is found that even for the transformation unit after the deblocking filter, the distortion on the boundary of the transformation unit is much larger than that inside the transformation unit. In order to reduce distortion on TU boundaries in a targeted manner, we add a new mode for sample adaptive compensation, TU edge mode. This mode aims to give an extra compensation to TU boundaries, resulting in lower TU boundary sample distortion and lower bitrate. The transformation unit inside the largest coding unit is shown in Figure 5, where the dotted line part is the pixel sample on the boundary of the transformation unit.
经过统计我们发现变换单元边界处的失真要比变换单元内部大20%左右,为了进一步的得到变换单元边界与变换单元内部所需要补偿的差,我们将变换单元边界样本和变换单元内部样本通过样本自适应补偿。结果显示,对于边缘补偿来说,变换单元边界的平均失真度要大0.45,对于像素带补偿,变换单元边界的平均失真度要大0.4。After statistics, we found that the distortion at the boundary of the transformation unit is about 20% larger than that inside the transformation unit. In order to further obtain the compensation difference between the boundary of the transformation unit and the interior of the transformation unit, we pass the samples at the boundary of the transformation unit and the samples inside the transformation unit through samples Adaptive Compensation. The results show that for edge compensation, the average distortion degree of TU boundary is 0.45 larger, and for pixel band compensation, the average distortion degree of TU boundary is 0.4 larger.
由此,我们提出了如下新颖的补偿方式:Therefore, we propose the following novel compensation method:
a)在对样本进行统计时,将变换单元内部的像素样本和变换单元边界上的样本分别进行统计。a) When counting the samples, count the pixel samples inside the transformation unit and the samples on the boundary of the transformation unit respectively.
b)按照原有的样本自适应补偿计算出最优的补偿模式和补偿值,计算出率失真代价。如表2的类型索引0所示,即不对变换单元边界进行额外的补偿。b) Calculate the optimal compensation mode and compensation value according to the original sample adaptive compensation, and calculate the rate-distortion cost. As shown in the type index 0 in Table 2, that is, no additional compensation is performed on the boundary of the transformation unit.
c)对变换单元的边界进行额外的补偿,遍历表2中类型索引1、2、3的对变换单元边界进行额外补偿的策略,即将变换单元内部补偿值加上表2中的值后再补偿到变换单元的内部。计算出这三种类型所带来的率失真代价。c) Perform additional compensation on the boundary of the transformation unit, and traverse the strategies for performing additional compensation on the boundary of the transformation unit with type indexes 1, 2, and 3 in Table 2, that is, add the internal compensation value of the transformation unit to the value in Table 2 and then compensate to the interior of the transformation unit. Calculate the rate-distortion penalty imposed by these three types.
d)比较上述的四个率失真代价值,选出代价最小的类型最为当前块的补偿类型,并对索引值进行传输。d) Compare the above four rate-distortion cost values, select the type with the smallest cost as the compensation type of the current block, and transmit the index value.
表2 对于变换单元的额外补偿Table 2 Additional compensation for transform units
实验结果表明,本算法相比原算法将BD-rate降低了-0.13,样本自适应补偿算法的性能实现了26%的提升,由此可见本算法对于样本自适应补偿的优化是有一定成效的。The experimental results show that this algorithm reduces the BD-rate by -0.13 compared with the original algorithm, and the performance of the sample adaptive compensation algorithm has been improved by 26%. It can be seen that this algorithm has a certain effect on the optimization of sample adaptive compensation .
3.样本自适应补偿的补偿模式优化3. Compensation mode optimization for sample adaptive compensation
在研究的过程中我们发现,样本自适应补偿对于样本统计的要求是很苛刻的,存在大量的有规律的、需要进行补偿的像素并没有的到相应的补偿。如图6所示,在第二、三类样本自适应补偿中,我们可以看到只有当当前像素必须要和相邻的一个像素的像素值完全相同时才会判断当前像素是否属于第二、三类样本自适应补偿。这样的补偿策略所带来的问题是,存在大量的如图7所示,即像素梯度很大却不能被判断为进行样本自适应补偿的像素,却并没有进行补偿,图7中像素c与像素a或b只相差很小,可是梯度却很大,这种情况完全符合样本自适应补偿使得边缘部分更加平滑的设计初衷,而且图7中像素和图6标准类型的像素差只在1、2个像素值,因此我们基于这一想法,提出了本算法。In the process of research, we found that sample adaptive compensation has very strict requirements on sample statistics, and there are a large number of regular pixels that need to be compensated but have not received corresponding compensation. As shown in Figure 6, in the second and third types of sample adaptive compensation, we can see that only when the current pixel must have exactly the same pixel value as an adjacent pixel will it be judged whether the current pixel belongs to the second, Three types of sample adaptive compensation. The problem caused by such a compensation strategy is that there are a large number of pixels as shown in Figure 7, that is, pixels with a large gradient but cannot be judged as samples for adaptive compensation, but no compensation is performed. In Figure 7, pixel c and The difference between pixel a or b is only small, but the gradient is very large. This situation is completely in line with the original design intention of sample adaptive compensation to make the edge part smoother, and the pixel difference between the pixel in Figure 7 and the standard type in Figure 6 is only 1, 2 pixel values, so we propose this algorithm based on this idea.
与此同时,我们发现样本自适应补偿中还存在着一种不合理的情况。这种情况是:当前像素被判断为第二或第三种类型,然而当前像素值与相邻的像素即使只相差一个或者很少像素值,即像素梯度很小,如图8所示,该位置也会按照第二或第三种类型进行补偿。这显然是不合理的,因为当前的像素已经很平滑了,没有进一步平滑的空间,违背了样本自适应补偿的对边缘进行补偿的初衷。因此,我们也将这一点作为我们研究的内容之一。At the same time, we found that there is an unreasonable situation in the sample adaptive compensation. This situation is: the current pixel is judged as the second or third type, but even if the current pixel value differs from the adjacent pixel by only one or very few pixel values, that is, the pixel gradient is very small, as shown in Figure 8, the The position is also compensated according to the second or third type. This is obviously unreasonable, because the current pixel is already smooth, and there is no room for further smoothing, which violates the original intention of edge compensation in sample adaptive compensation. Therefore, we also take this as one of the contents of our research.
因此,我们提出将如图9所示的a、b、c、d四种模式加入到样本自适应补偿中会将很多需要补充而没有进行补偿的像素样本纳入到样本自适应补偿中,而去除e、f两种模式更加有利于获得更准确的补偿值。Therefore, we propose that adding the four modes a, b, c, and d shown in Figure 9 into the sample adaptive compensation will bring many pixel samples that need to be supplemented but not compensated into the sample adaptive compensation, and remove The e and f modes are more conducive to obtaining more accurate compensation values.
具体而言,如图9(a)中所示的情况是当前像素c与相邻像素a的像素值相差1,而与另一边的相邻像素b的像素值相差3以上;图9(b)中所示的情况是当前像素c与相邻像素a的像素值相差2,而与另一边的像素b的像素值相差6以上;如图9(c)中所示的情况是当前像素c与相邻像素b的像素值相差1,而与另一边的相邻像素a的像素值相差3以上;图9(d)中所示的情况是当前像素c与相邻像素b的像素值相差2,而与另一边的像素a的像素值相差6以上。Specifically, the situation shown in Figure 9(a) is that the pixel value difference between the current pixel c and the adjacent pixel a is 1, and the difference between the pixel value of the adjacent pixel b on the other side is more than 3; Figure 9(b ) is that the pixel value difference between the current pixel c and the adjacent pixel a is 2, and the pixel value difference between the pixel b on the other side is more than 6; the situation shown in Figure 9(c) is that the current pixel c The pixel value of the adjacent pixel b differs by 1, and the pixel value of the adjacent pixel a on the other side differs by more than 3; the situation shown in Figure 9(d) is that the pixel value of the current pixel c is different from the adjacent pixel b 2, and the pixel value of pixel a on the other side differs by more than 6.
我们将图9(a)、(b)的情况纳入到类型2,图9(c)、(d)的情况纳入到类型3中,之后我们将图9(e)、(f)的情况剔除出样本自适应补偿的第2、3类补偿。We include the situation in Figure 9(a) and (b) into Type 2, and the situation in Figure 9(c) and (d) into Type 3, and then we exclude the situation in Figure 9(e) and (f) Types 2 and 3 compensation of sample adaptive compensation.
随后按照样本自适应补偿标准步骤进行统计和率失真优化,选取出当前最大编码单元最优的补偿模式后对当前最大编码单元进行样本自适应补偿。Then perform statistics and rate-distortion optimization according to the standard steps of sample adaptive compensation, select the optimal compensation mode for the current largest coding unit, and perform sample adaptive compensation on the current largest coding unit.
图11(a)示出了根据本发明的一个实施例的一种在HEVC中用于确定解码器端的样本自适应补偿参数的方法的流程图,该方法在编码器中实施。Fig. 11(a) shows a flowchart of a method for determining sample adaptive compensation parameters at the decoder side in HEVC according to an embodiment of the present invention, and the method is implemented in an encoder.
结合图10中所示的示意图可知:Combined with the schematic diagram shown in Figure 10, it can be seen that:
在步骤1101中,在编码器中,从已编码的图像中重建最大编码单元(CU)。In step 1101, in an encoder, a largest coding unit (CU) is reconstructed from an encoded image.
在步骤1102中,分别基于以下4种样本自适应补偿类型来对重建的最大CU进行样本自适应补偿:像素带补偿(Band offset,BO)类型、边缘补偿(Edge offset,EO)类型1、EO类型2、EO类型3和EO类型4,从而为所述BO类型得到补偿结果,并为EO类型1、EO类型2、EO类型3和EO类型4得到4个补偿结果。In step 1102, sample adaptive compensation is performed on the reconstructed largest CU based on the following four types of sample adaptive compensation: pixel band offset (Band offset, BO) type, edge compensation (Edge offset, EO) type 1, EO Type 2, EO Type 3, and EO Type 4, thereby obtaining compensation results for the BO type, and obtaining 4 compensation results for EO Type 1, EO Type 2, EO Type 3, and EO Type 4.
在步骤1103中,基于所述BO类型的补偿结果和EO类型1、EO类型2、EO类型3和EO类型4的4个补偿结果中的每一个和所述重建的最大CU相对于原始图像的率失真代价值,从BO类型、EO类型0、EO类型1、EO类型2、EO类型3和EO类型4中选出最优样本自适应补偿类型,其中,所述EO类型0表示不进行补偿并由此对应于所述重建的最大CU。In step 1103, based on the compensation result of the BO type and each of the four compensation results of EO type 1, EO type 2, EO type 3 and EO type 4 and the maximum CU of the reconstruction relative to the original image Rate-distortion cost value, select the optimal sample adaptive compensation type from BO type, EO type 0, EO type 1, EO type 2, EO type 3 and EO type 4, wherein the EO type 0 means no compensation and thus corresponds to the largest CU of the reconstruction.
在步骤1104中,确定与所选出的最优样本自适应补偿类型相对应的第一补偿值,其中,所述EO类型0对应的第一补偿值为0。In step 1104, a first compensation value corresponding to the selected optimal sample adaptive compensation type is determined, wherein the first compensation value corresponding to the EO type 0 is 0.
在步骤1105中,基于所选出的最优样本自适应补偿类型确定第二边界补偿值。In step 1105, a second boundary compensation value is determined based on the selected optimal sample adaptive compensation type.
在步骤1106中,将所选出的最优样本自适应补偿类型、所述第一补偿值和所述第二边界补偿值编码至与所述最大CU相关联的编码信息中进行传送。In step 1106, the selected optimal sample adaptive compensation type, the first compensation value and the second boundary compensation value are encoded into the encoding information associated with the largest CU for transmission.
在本发明的一个实施例中,在像素2中包含当前像素的像素值比左侧相邻像素的像素值小1,比右侧相邻像素的像素值大3以上的情况,以及当前像素的像素值比左侧相邻像素的像素值小2,比右侧相邻像素的像素值大6以上的情况。In one embodiment of the present invention, pixel 2 includes the case that the pixel value of the current pixel is 1 smaller than the pixel value of the adjacent pixel on the left and greater than the pixel value of the adjacent pixel on the right by more than 3, and the pixel value of the current pixel When the pixel value is 2 smaller than the pixel value of the adjacent pixel on the left and greater than the pixel value of the adjacent pixel on the right by 6 or more.
在本发明的一个实施例中,像素3中包含当前像素的像素值比右侧相邻像素的像素值大1,比左侧相邻像素的像素值小3以上的情况,以及当前像素的像素值比右侧相邻像素的像素值大2,比左侧相邻像素的像素值小6以上的情况。In one embodiment of the present invention, pixel 3 includes the case where the pixel value of the current pixel is greater than the pixel value of the adjacent pixel on the right by 1, and the pixel value of the adjacent pixel on the left is smaller than the pixel value of more than 3, and the pixel value of the current pixel When the value is 2 greater than the pixel value of the adjacent pixel on the right and 6 or more smaller than the pixel value of the adjacent pixel on the left.
在本发明的一个实施例中,在像素类型2和像素类型3中,如果当前像素的像素值与两个相邻像素的像素值之间差小于等于1,则当前像素不作补偿。In one embodiment of the present invention, in pixel type 2 and pixel type 3, if the difference between the pixel value of the current pixel and the pixel values of two adjacent pixels is less than or equal to 1, the current pixel does not perform compensation.
在步骤1105中,确定第二边界补偿值进一步包括:基于所述最优样本自适应补偿类型,计算针对所述最大CU中的各个变换单元的边界像素的多个边界补偿值的多个率失真代价值,并基于所述多个率失真代价值选出一个边界补偿值。In step 1105, determining the second boundary compensation value further includes: based on the optimal sample adaptive compensation type, calculating multiple rate-distortion rates for multiple boundary compensation values of boundary pixels of each transform unit in the largest CU cost, and select a boundary compensation value based on the plurality of rate-distortion cost values.
在本发明的一个优选实施例中,基于最优样本自适应补偿类型来设置所述最大CU中的语法元素sao_type_idx和sao_eo_class的值,其中,sao_type_idx的值0、1、2分别表示不进行样本自适应补偿、使用像素带补偿(BO)和边缘补偿(EO),sao_eo_class的值0-3表示EO类型1、EO类型2、EO类型3和EO类型4。In a preferred embodiment of the present invention, the values of the syntax elements sao_type_idx and sao_eo_class in the largest CU are set based on the optimal sample adaptive compensation type, wherein the values of sao_type_idx are 0, 1, and 2 respectively indicating that no sample self-adaptive compensation is performed. Adaptive compensation, using pixel band compensation (BO) and edge compensation (EO), the value 0-3 of sao_eo_class means EO type 1, EO type 2, EO type 3 and EO type 4.
在本发明的一个优选实施例中,所述EO类型1-4分别使用水平线、垂直线、135度角对角线和45度角对角线。In a preferred embodiment of the present invention, the EO types 1-4 respectively use horizontal lines, vertical lines, 135-degree diagonal lines and 45-degree diagonal lines.
在本发明的一个优选实施例中,在所述BO类型中,将全像素范围统一分割为32个像素带,选择其中4个像素带,并确定针对所选出的4个像素带的正补偿或负补偿,其中,使用率失真代价来确定针对所选出的4个像素带的正补偿或负补偿,所述最优样本自适应补偿类型是所述BO类型,所述第一补偿值包括所确定针对所选出的4个像素带的正补偿或负补偿。In a preferred embodiment of the present invention, in the BO type, the full pixel range is uniformly divided into 32 pixel bands, 4 of which are selected, and the positive compensation for the selected 4 pixel bands is determined or negative compensation, wherein a rate-distortion cost is used to determine positive or negative compensation for the selected 4 pixel bands, the optimal sample adaptive compensation type is the BO type, and the first compensation value includes Positive or negative compensation is determined for the selected 4 pixel bands.
在本发明的一个优选实施例中,在所述EO类型1-4中,所述第一补偿值包括基于与所述EO类型1-4分别对应的补偿函数所确定的补偿值。In a preferred embodiment of the present invention, in the EO types 1-4, the first compensation value includes compensation values determined based on compensation functions respectively corresponding to the EO types 1-4.
在本发明的一个优选实施例中,在所述EO类型1-4中,所述第一补偿值包括基于与所述EO类型1-4分别对应的补偿函数所确定的补偿值。In a preferred embodiment of the present invention, in the EO types 1-4, the first compensation value includes compensation values determined based on compensation functions respectively corresponding to the EO types 1-4.
图11(b)示出了根据本发明的一个实施例的一种在HEVC中用于确定解码器端的样本自适应补偿参数的装置的方框图,该装置在编码器中实施。图11(b)中的各个单元分别对应于图11(a)中的相应方法步骤,因此在此不再赘述。Fig. 11(b) shows a block diagram of an apparatus for determining sample-adaptive compensation parameters at the decoder side in HEVC according to an embodiment of the present invention, and the apparatus is implemented in an encoder. Each unit in FIG. 11( b ) corresponds to the corresponding method steps in FIG. 11( a ), so details are not repeated here.
本发明所公开的方法可以用软件、硬件、固件等来实现。The method disclosed in the present invention can be realized by software, hardware, firmware and so on.
当用硬件实现时,视频编码器可以用通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立门或晶体管逻辑器件、分立硬件组件或者设计为执行本文所述功能的其任意组合,来实现或执行。通用处理器可以是微处理器,但是可替换地,该处理器也可以是任何常规的处理器、控制器、微控制器或者状态机。处理器也可以实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器的组合、一个或多个微处理器与DSP内核的组合或者任何其它此种结构。另外,至少一个处理器可以包括可操作以执行上述的一个或多个步骤和/或操作的一个或多个模块。When implemented in hardware, video encoders can be implemented using general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gates, or transistor logic devices, discrete hardware components, or any combination thereof designed to perform the functions described herein, may be implemented or performed. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, eg, a DSP and a microprocessor, multiple microprocessors, one or more microprocessors with a DSP core, or any other such architecture. Additionally, at least one processor may comprise one or more modules operable to perform one or more of the steps and/or operations described above.
当用ASIC、FPGA等硬件电路来实现视频编码器时,其可以包括被配置为执行各种功能的各种电路块。本领域技术人员可以根据施加在整个系统上的各种约束条件来以各种方式设计和实现这些电路,来实现本发明所公开的各种功能。When a video encoder is implemented with a hardware circuit such as an ASIC, FPGA, it may include various circuit blocks configured to perform various functions. Those skilled in the art can design and implement these circuits in various ways according to various constraints imposed on the entire system, so as to realize various functions disclosed in the present invention.
尽管前述公开文件论述了示例性方案和/或实施例,但应注意,在不背离由权利要求书定义的描述的方案和/或实施例的范围的情况下,可以在此做出许多变化和修改。而且,尽管以单数形式描述或要求的所述方案和/或实施例的要素,但也可以设想复数的情况,除非明确表示了限于单数。另外,任意方案和/或实施例的全部或部分都可以与任意其它方案和/或实施例的全部或部分结合使用,除非表明了有所不同。While the foregoing disclosures discuss exemplary aspects and/or embodiments, it should be noted that many changes and/or changes may be made therein without departing from the scope of the described aspects and/or embodiments as defined by the claims. Revise. Also, although elements of the described aspects and/or embodiments are described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated. In addition, all or part of any aspect and/or embodiment can be used in combination with all or part of any other aspect and/or embodiment, unless a difference is indicated.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410510122.5A CN104243985B (en) | 2014-09-29 | 2014-09-29 | Sample Adaptive Compensation in HEVC |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410510122.5A CN104243985B (en) | 2014-09-29 | 2014-09-29 | Sample Adaptive Compensation in HEVC |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104243985A CN104243985A (en) | 2014-12-24 |
CN104243985B true CN104243985B (en) | 2018-05-08 |
Family
ID=52231207
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410510122.5A Active CN104243985B (en) | 2014-09-29 | 2014-09-29 | Sample Adaptive Compensation in HEVC |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104243985B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9877024B2 (en) * | 2015-03-06 | 2018-01-23 | Qualcomm Incorporated | Low complexity sample adaptive offset (SAO) coding |
CN105306940B (en) * | 2015-10-27 | 2019-10-18 | 中星技术股份有限公司 | A kind of boundary compensation mode treatment method in coding and decoding video sample value migration |
JP6634936B2 (en) * | 2016-04-05 | 2020-01-22 | 富士通株式会社 | Image encoding device, image encoding method, image encoding program, image decoding device, image decoding method, image decoding program, and image transmission system |
CN110855973B (en) * | 2019-11-15 | 2021-10-26 | 北方工业大学 | Video intra-frame fast algorithm based on regional directional dispersion sum |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103209324A (en) * | 2012-01-17 | 2013-07-17 | 张民 | Method of applying edge offset |
KR20130084052A (en) * | 2012-01-16 | 2013-07-24 | 주식회사 케이티 | Sample adaptive offset(sao) diagonal edge offset |
KR20130084054A (en) * | 2012-01-16 | 2013-07-24 | 주식회사 케이티 | Sample adaptive offset (sao) edge offset |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9253482B2 (en) * | 2011-11-08 | 2016-02-02 | Texas Insturments Incorporated | Method and apparatus for sample adaptive offset without sign coding |
-
2014
- 2014-09-29 CN CN201410510122.5A patent/CN104243985B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130084052A (en) * | 2012-01-16 | 2013-07-24 | 주식회사 케이티 | Sample adaptive offset(sao) diagonal edge offset |
KR20130084054A (en) * | 2012-01-16 | 2013-07-24 | 주식회사 케이티 | Sample adaptive offset (sao) edge offset |
CN103209324A (en) * | 2012-01-17 | 2013-07-17 | 张民 | Method of applying edge offset |
Non-Patent Citations (2)
Title |
---|
Low Complexity SAO in HEVC Base on Class Combination,Pre-decision and Merge Separation;Gaoxing Chen;《Proceedings of the 19th International Conference on Digital Signal Processing》;20140823;全文 * |
Sample Adaptive Offset in the HEVC Standard;Chih-Ming Fu;《IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY》;20121212;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN104243985A (en) | 2014-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10924767B2 (en) | Method for encoding and decoding image information | |
US11910013B2 (en) | Image encoding method using a skip mode, and a device using the method | |
AU2019242247B2 (en) | Systems and methods for applying deblocking filters to reconstructed video data | |
KR102814841B1 (en) | Encoder, decoder and corresponding method for intra prediction | |
CN111819854B (en) | Method and apparatus for coordinating multi-sign bit concealment and residual symbol prediction | |
JP7571227B2 (en) | Encoder, decoder, and corresponding method for coordinating matrix-based intra prediction and secondary transform core selection - Patents.com | |
CN113812155B (en) | Interaction between multiple inter-frame coding and decoding methods | |
US10911778B2 (en) | Method and device for intra-prediction | |
CN114586370A (en) | Using Chroma Quantization Parameters in Video Codecs | |
CA3012051A1 (en) | Merging filters for multiple classes of blocks for video coding | |
JP7612778B2 (en) | APPARATUS AND METHOD FOR DEBLOCKING FILTER IN VIDEO CODING - Patent application | |
TW201404160A (en) | Chroma slice-level QP offset and deblocking | |
CN115004697A (en) | Prediction from multiple cross-components | |
JP7562790B2 (en) | Apparatus and method for performing deblocking | |
CN104243985B (en) | Sample Adaptive Compensation in HEVC | |
CN101841722B (en) | Detection method of detection device of filtering boundary strength | |
TW202139703A (en) | Decoding, encoding, encoding and decoding methods, devices and apparatuses | |
WO2020003264A2 (en) | Filtering of zero unit | |
KR20150100355A (en) | Method and apparatus of inter prediction | |
RU2789030C2 (en) | Device and method for deblocking filter in video encoding | |
Subramanya et al. | SAO in CTU decoding loop for HEVC video decoder | |
WO2025145288A1 (en) | Encoding method, decoding method, bitstream, encoder, decoder, and storage medium |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20201104 Address after: Group 1, Shengli Ju, Jiang'an Town, Rugao City, Nantong City, Jiangsu Province, 226500 Patentee after: RUGAO ANRUI ELECTRONIC Co.,Ltd. Address before: 100000 Beijing Haidian District Huayuan Road No. 2 peony building 4 floor 1424 room Patentee before: Beijing Zhonglian Technology Service Co.,Ltd. Effective date of registration: 20201104 Address after: 100000 Beijing Haidian District Huayuan Road No. 2 peony building 4 floor 1424 room Patentee after: Beijing Zhonglian Technology Service Co.,Ltd. Address before: 100144 Beijing City, Shijingshan District Jin Yuan Zhuang Road No. 5, North China University of Technology Patentee before: North China University of Technology |
|
TR01 | Transfer of patent right |