WO2016131270A1 - Error concealment method and apparatus - Google Patents
Error concealment method and apparatus Download PDFInfo
- Publication number
- WO2016131270A1 WO2016131270A1 PCT/CN2015/090813 CN2015090813W WO2016131270A1 WO 2016131270 A1 WO2016131270 A1 WO 2016131270A1 CN 2015090813 W CN2015090813 W CN 2015090813W WO 2016131270 A1 WO2016131270 A1 WO 2016131270A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- block
- error
- adjacent
- current error
- ctu
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/89—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving methods or arrangements for detection of transmission errors at the decoder
- H04N19/895—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving methods or arrangements for detection of transmission errors at the decoder in combination with error concealment
Definitions
- This document refers to, but is not limited to, the field of video, and specifically relates to methods and apparatus for error concealment.
- the error concealment technique recovers the damaged image approximately by using the correlation between the correctly decoded video information and the corrupted data after detecting the video error at the decoding end.
- the error concealment technique can be divided into spatial domain error concealment and time domain error concealment according to the spatial and temporal correlation between available data and error data.
- the spatial error concealment mainly utilizes the spatial correlation of the video image, and the data of the damaged region can be reconstructed by interpolating the correct data adjacent in the frame.
- BI Bi-linear Interpolation
- DI Directional Interpolation
- the time domain error concealment mainly utilizes the temporal correlation of the video image, that is, the erroneous data in the current image is estimated using the image data that has been correctly decoded in the reference image.
- a representative method is BMA (Boundary Matching Algorithm).
- the basic idea of the algorithm is to extract the motion vector from the correct receiving block around the damaged block as the candidate motion vector of the current damaged block according to the principle of motion consistency between adjacent blocks, and then select the motion-compensated macroblock boundary.
- the motion difference vector between the pixel and the missing macroblock boundary pixel and the smallest (Sum of Absolute Difference, SAD) is used as the motion vector of the current lost macroblock, and then motion compensation is performed to repair the damaged macroblock.
- the error concealment technique combined with specific coding characteristics has a better effect. Therefore, there is an error concealment technique in the art that combines the above-mentioned spatial error concealment method and time domain error concealment method with the H.264 coding standard, and the error concealment technique is also true. Brought an updated error concealment effect.
- HEVC High Efficiency Video Coding
- the error concealment method combined with the H264 coding standard is difficult to obtain satisfactory video quality for HEVC video, and the damaged CTU (Coding TreeUnit, coding) in the HEVC standard.
- the size of the tree unit is much larger than the size of the macroblock in the H.264 standard.
- the variable coding unit size, multi-angle intra prediction and advanced motion vector prediction methods and H.264 coding standards in the HEVC standard are larger. the difference. Therefore, it is necessary to find a error concealment technique suitable for HEVC video.
- Embodiments of the present invention provide a method and apparatus for error concealment to solve the technical problem that it is difficult to obtain satisfactory video quality in HEVC video.
- the embodiment of the invention provides a method for error concealing, the method comprising:
- Each error block in the current error coding tree unit CTU is sequentially taken as the current error block
- the spatial domain interpolation error concealment is performed; if the spatial domain correlation of the current error block is not greater than the preset intensity threshold, the time domain error concealment is performed.
- the method further includes:
- intra prediction error concealment is performed on the current error block.
- the comparison of the time domain and the airspace correlation includes:
- m is the size of the current error block
- i, j is the pixel coordinate of the current error block
- n is the image number
- P(n, 0, 0) is the pixel value of the upper left corner of the current error block.
- the performing spatial domain interpolation error concealment includes:
- i, j is the pixel coordinate of the current error block
- P'(0, 0) is the pixel value of the upper left corner of the current error block.
- the performing time domain error concealment includes:
- the current error block is divided into 4 error sub-blocks; when the difference between the same components of any two MVs is less than or equal to a predetermined threshold
- the current error block as a whole is regarded as one error sub-block;
- each candidate recovery block of the erroneous sub-block is obtained according to each MV of the erroneous sub-block;
- a candidate restoration block having the smallest boundary matching difference in each candidate restoration block is taken as the restored pixel block of the current error block.
- the performing intra prediction error concealment on the current error block includes:
- the step of using each error block in the current error coding tree unit CTU as the current error block in advance includes:
- the current error is caused when any of the neighboring CTUs in the airspace of the current erroneous CTU, the neighboring CTUs in the airspace, the left neighboring CTUs in the airspace, the right neighboring CTUs in the airspace, and the neighboring CTUs in the time domain are divided.
- the CTU is divided into 4 error blocks;
- the current error CTU is taken as a whole. 1 error block.
- the embodiment of the invention further provides a device for error concealment, the device comprising:
- the configuration module is set to sequentially make each error block in the current error coding tree unit CTU Is the current error block;
- An information acquiring module configured to determine a spatial neighboring block of the current error block and a neighboring block on the airspace, where the left adjacent block of the airspace and the adjacent block on the airspace are adjacent to the error block on the airspace;
- a judging module configured to perform time domain and spatial domain correlation comparison when the left adjacent block of the spatial domain of the current error block and the adjacent block of the air domain are available and are not intra prediction blocks;
- a hidden processing module configured to: if the spatial correlation of the current error block is greater than a preset intensity threshold, performing spatial domain interpolation error concealment; if the spatial correlation of the current error block is not greater than a preset intensity threshold, proceeding Time domain error is hidden.
- the hidden module is further configured to perform intra prediction error concealment on the current error block when both the left adjacent block of the spatial domain and the adjacent block on the spatial domain are available and both are intra prediction blocks.
- the determining module is configured to perform time domain and spatial domain correlation when the left adjacent block of the spatial error block and the adjacent block on the air domain are available and are not intra prediction blocks. :
- m is the size of the current error block
- i, j is the pixel coordinate of the current error block
- n is the image number
- P(n, 0, 0) is the pixel value of the upper left corner of the current error block.
- the hidden processing module is configured to perform spatial interpolation error concealment by:
- i, j is the pixel coordinate of the current error block
- P'(0, 0) is the pixel value of the upper left corner of the current error block.
- the hidden processing module is configured to implement time domain error concealment by:
- the current error block is divided into 4 error sub-blocks; when the difference between any two MV identical components is less than or equal to a predetermined threshold, the current The error block as a whole is an error sub-block;
- each candidate recovery block of the erroneous sub-block is obtained according to each MV of the erroneous sub-block;
- a candidate restoration block having the smallest boundary matching difference in each candidate restoration block is taken as the restored pixel block of the current error block.
- the hidden processing module is configured to perform intra prediction error concealment on the current error block by:
- the device further includes:
- a dividing module configured to divide any one of a neighboring CTU, an adjacent CTU in the airspace, a left neighboring CTU in the airspace, a right neighboring CTU in the airspace, and a neighboring CTU in the time domain in the airspace of the current erroneous CTU, Dividing the current error CTU into 4 error blocks; when the current error CTU is in the airspace, the adjacent CTU, the airspace adjacent CTU, the airspace left adjacent CTU, the airspace right adjacent CTU, and the time domain neighboring CTU If the division is not performed, the current error CTU as a whole is taken as one error block.
- the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
- the above scheme combines the coding characteristics of HEVC video, repairs the damaged image by using the correlation between the error block data and the spatial domain adjacent data, and has a good repair effect on the damaged HEVC video code stream.
- FIG. 1 is a flow chart of a method of error concealment in an embodiment of the present invention
- FIG. 2 is a schematic diagram showing the position of adjacent blocks of an error block in the embodiment of the present invention.
- FIG. 3 is a block diagram showing a comparison of spatial and temporal correlations in an embodiment of the present invention.
- FIG. 4 is a schematic diagram of spatial domain interpolation in an embodiment of the present invention.
- FIG. 5 is a schematic diagram of a pixel used for calculating a boundary matching difference in an embodiment of the present invention
- FIG. 6 is a schematic structural diagram of an apparatus for error concealment in an embodiment of the present invention.
- the technical solution of the embodiment of the present invention combines the HEVC video coding feature to utilize the damaged image region. Correlation with decoded image information to repair damaged images to solve the problem that HEVC video is difficult to obtain satisfactory video quality.
- an embodiment of the present invention provides a method for error concealing, where the method includes:
- Step S101 sequentially use each error block in the current error coding tree unit CTU as the current error block;
- Step S103 determining a left adjacent block of the airspace of the current error block and a neighboring block on the airspace;
- the left adjacent block of the airspace and the adjacent block on the airspace are adjacent to the error block on the airspace;
- Step S105 when the spatial neighboring left neighboring block of the current error block and the adjacent blocks on the airspace are available and are not intra prediction blocks, go to step S107;
- Step S107 performing time domain and airspace correlation comparison
- Step S109 If the spatial correlation of the current error block is greater than the preset intensity threshold, then go to step S110; if the spatial correlation of the current error block is not greater than the preset intensity threshold, then go to step S111;
- Step S110 performing spatial domain interpolation error concealment; and proceeding to step S101 to determine the next current error block.
- Step S111 Perform time domain error concealment; go to S101 to determine the next current error block.
- each current error block sequentially performs the operation, that is, steps S101 to S111.
- steps S101 to S111 After a current error block has finished error concealment processing, it continues to find the next error block as the current error and performs corresponding error concealment processing.
- the next error CTU is searched for the corresponding error concealment processing until all the error CTUs complete the error concealment processing.
- the method further includes:
- Step S106 When the left adjacent block of the spatial domain and the adjacent block on the air domain are available and both are intra prediction blocks, intra prediction error concealment is performed on the current error block.
- the method further includes:
- Step S100 when the adjacent CTU in the airspace of the current error CTU, the adjacent CTU in the air domain, the left adjacent CTU in the airspace, the right adjacent CTU in the airspace, and the adjacent CTU in the time domain are divided,
- the current error CTU is divided into 4 error blocks;
- the current error CTU is taken as a whole. 1 error block.
- step S107 and step S106 do not limit the sequence. In other embodiments, step S106 may also be performed first. Further, step S110 and step S111 do not limit the order.
- the upper adjacent block of the error block is a pixel (x).
- , y-1) is the PU (prediction unit); the left adjacent block is the PU where the pixel (x-1, y) is located; the lower adjacent block is the PU where the pixel (x, y+w) is located; The right adjacent block is the PU where the pixel (x+w, y) is located; the lower left adjacent block is the PU where the pixel (x-1, y+w) is located; the upper right adjacent block is the pixel (x+w, y-1) The PU where it is located;
- the time domain neighboring block is a pixel (x+w/2-1, y+w/2-1) in the decoded image that is smaller than the current image POC and has the closest POC (Picture Order Count). ) The PU where it is located.
- steps S105 and S106 when a neighboring block satisfies the following two conditions at the same time, the neighboring block is considered to be usable; when a neighboring block cannot satisfy the following two conditions at the same time, the neighboring block is considered to be unavailable. use:
- the adjacent block is correctly decoded, or has undergone error concealment processing.
- the error concealment processing referred to herein means that the error concealment method described in the embodiment of the present invention has been restored.
- the comparison of the time domain and the airspace correlation in step S105 includes:
- the left neighboring block B(n, x-1, y) and the upper neighboring block B(n, x, y-1) with the current error block B(n, x, y) are found, Finding the time domain neighboring block B(n-1, x, y) of the current error block and the left neighboring block B(n-1, x-1, y) of the time domain neighboring block and the upper neighboring block B (n-1, x, y-1).
- n represents the image number
- x represents the horizontal coordinate of the pixel in the upper left corner of the block
- y represents the vertical coordinate of the pixel in the upper left corner of the block.
- the searching for the time domain neighboring block of the current error block includes: because the POC of the time domain neighboring block of the current error block is smaller than the POC of the current image, optionally, selecting the time domain neighboring block of the current error block is located.
- the image sequence number is the image number of the previous frame, that is, n-1; the PU where the pixel coordinates (x, y) of the upper left corner of the current error block is located is the time domain neighboring block of the current error block.
- m is the size of the current error block
- i, j is the pixel coordinate of the current error block
- n is the image number
- P(n, 0, 0) is the pixel value of the upper left corner of the current error block.
- Performing spatial interpolation error concealment in step S109 includes:
- the predicted pixel P'(i, j) of the current error block is calculated according to the spatial neighboring block of the current error block.
- a column of pixels and a spatial domain of the left adjacent block boundary of the spatial domain may be utilized.
- a row of pixels adjacent to the block boundary is interpolated to obtain the predicted pixel of the current erroneous block.
- i, j is the pixel coordinate of the current error block;
- P'(0, 0) represents the pixel value of the upper left corner of the current error block.
- Performing intra prediction error concealing on the current error block in step S106 includes:
- the boundary matching difference can be calculated by the following formula 1:
- + ⁇ i 0, m - 1
- m is the size of the current error block
- i, j is the pixel coordinate of the current error block
- P(0, 0) is the pixel value of the upper left corner of the current error block.
- Performing time domain error concealing in step S110 includes:
- the current error block is divided into 4 error sub-blocks; when the difference between any two MV identical components is less than or equal to a predetermined threshold, the current The error block as a whole is an error sub-block;
- each candidate recovery block of the erroneous sub-block is obtained according to each MV of the erroneous sub-block;
- a candidate recovery block having the smallest boundary matching difference in each candidate recovery block is used as a restored pixel block of the current error block, and the MV corresponding to the restored pixel block is used as the MV of the current error block.
- calculating the boundary matching difference can be calculated according to the method of the above formula 1.
- the predetermined threshold may be set to 4, and then the current error block is divided into 4 errors when the formula 2 is satisfied.
- Equation 2 is
- i denotes the horizontal or vertical component of the MV
- m denotes the number difference of the two MVs, m ⁇ [1, j].
- the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
- an embodiment of the present invention further provides a device for error concealment, where the device includes:
- the configuration module 11 is configured to sequentially use each error block in the current error coding tree unit CTU as the current error block;
- the information obtaining module 12 is configured to determine a spatial neighboring block and a neighboring block on the airspace of the current error block, where the left neighboring block and the adjacent block on the airspace are adjacent to the error block in the airspace;
- the determining module 13 is configured to perform time domain and spatial domain correlation comparison when the spatial neighboring left neighboring block of the current error block and the neighboring block on the airspace are both available and are not intra prediction blocks;
- the hiding processing module 14 is configured to perform spatial domain interpolation error concealment if the spatial domain correlation of the current error block is greater than a preset intensity threshold; if the spatial domain correlation of the current error block is not greater than a preset intensity threshold, then Time domain error concealment.
- the hidden module 14 is further configured to perform intra prediction error concealment on the current error block when both the left adjacent block of the spatial domain and the adjacent block on the spatial domain are available and both are intra prediction blocks.
- the judging module 13 is configured to perform time domain and airspace correlation when the spatial neighboring left neighboring block of the current erroneous block and the neighboring block in the airspace are both available and are not intra prediction blocks.
- m is the size of the current error block
- i, j is the pixel coordinate of the current error block
- n is the image number
- P(n, 0, 0) is the pixel value of the upper left corner of the current error block.
- the hidden processing module 14 is configured to perform spatial interpolation error concealment by:
- i, j is the pixel coordinate of the current error block
- P'(0, 0) is the pixel value of the upper left corner of the current error block.
- the hidden processing module 14 is configured to implement time domain error concealment by:
- the current error block is divided into 4 error sub-blocks; when the difference between any two MV identical components is less than or equal to a predetermined threshold, the current The error block as a whole is an error sub-block;
- each candidate recovery block of the erroneous sub-block is obtained according to each MV of the erroneous sub-block;
- a candidate restoration block having the smallest boundary matching difference in each candidate restoration block is taken as the restored pixel block of the current error block.
- the hiding processing module 14 is configured to perform intra prediction error concealment on the current error block by:
- the device further includes:
- the dividing module 15 is configured to divide any one of a neighboring CTU, an adjacent CTU in the airspace, a left neighboring CTU in the airspace, a right neighboring CTU in the airspace, and a neighboring CTU in the time domain in the airspace of the current faulty CTU, And dividing the current error CTU into 4 error blocks; adjacent CTUs in the airspace of the current error CTU, adjacent CTUs in the air domain, left adjacent CTUs in the airspace, right adjacent CTUs in the airspace, and time-domain neighboring CTUs If the division is not performed, the current error CTU as a whole is regarded as one error block.
- all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
- the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
- each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
- the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
- the above technical solution has a good repair effect on the damaged HEVC video code stream.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本文涉及但不限于视频领域,具体涉及错误隐藏的方法和装置。This document refers to, but is not limited to, the field of video, and specifically relates to methods and apparatus for error concealment.
网络技术和视频编码技术的巨大进步使得广播电视、网络视频和视频通讯日益普及。不可避免的移动信道衰落和网络拥塞,必然造成视频数据在传输过程中受到损伤。在解码端对视频进行错误隐藏,是提高用户体验的重要方法。The tremendous advances in network technology and video coding technology have made radio, television, and video communications increasingly popular. Inevitable mobile channel fading and network congestion will inevitably cause video data to be damaged during transmission. Error hiding the video at the decoding end is an important method to improve the user experience.
错误隐藏技术在解码端检测到视频错误后,利用已正确解码的视频信息与受损数据的相关性,近似地恢复受损图像。错误隐藏技术根据可用数据与错误数据的空间和时间相关性,可以分为空域错误隐藏和时域错误隐藏。The error concealment technique recovers the damaged image approximately by using the correlation between the correctly decoded video information and the corrupted data after detecting the video error at the decoding end. The error concealment technique can be divided into spatial domain error concealment and time domain error concealment according to the spatial and temporal correlation between available data and error data.
空域错误隐藏主要利用视频图像的空间相关性,受损区域的数据可由帧内相邻的正确数据作内插来重构。相关技术中,空域错误隐藏方法中有代表性的主要有两种:BI(Bi-linear Interpolation,双线性插值算法)和DI(Directional Interpolation,方向插值算法)。The spatial error concealment mainly utilizes the spatial correlation of the video image, and the data of the damaged region can be reconstructed by interpolating the correct data adjacent in the frame. In the related art, there are two main types of spatial error concealment methods: BI (Bi-linear Interpolation) and DI (Directional Interpolation).
时域错误隐藏主要利用视频图像的时间相关性,即利用参考图像中已正确解码的图像数据来估计当前图像中的错误数据。有代表性的方法是BMA(Boundary Matching Algorithm,边界匹配算法)。该算法的基本思想是根据相邻块之间的运动一致性原则,从受损块周围正确接收块中提取运动矢量作为当前受损块的候选运动矢量,然后选取使得运动补偿后的宏块边界像素与丢失宏块边界像素的绝对差值和(Sum of Absolute Difference,SAD)最小的运动矢量作为当前丢失宏块的运动矢量,再做运动补偿来修复受损宏块。The time domain error concealment mainly utilizes the temporal correlation of the video image, that is, the erroneous data in the current image is estimated using the image data that has been correctly decoded in the reference image. A representative method is BMA (Boundary Matching Algorithm). The basic idea of the algorithm is to extract the motion vector from the correct receiving block around the damaged block as the candidate motion vector of the current damaged block according to the principle of motion consistency between adjacent blocks, and then select the motion-compensated macroblock boundary. The motion difference vector between the pixel and the missing macroblock boundary pixel and the smallest (Sum of Absolute Difference, SAD) is used as the motion vector of the current lost macroblock, and then motion compensation is performed to repair the damaged macroblock.
因为要利用数据间的相关性,所以通常结合具体编码特性的错误隐藏技术有更好的效果。因此,本领域出现了将上述空域错误隐藏方法和时域错误隐藏方法与H.264编码标准结合的错误隐藏技术,所述错误隐藏技术也确实 带来了更新的错误隐藏效果。但是随着高效率视频编码(High Efficiency VideoCoding,HEVC)标准的出现,与H264编码标准结合的错误隐藏方法用于HEVC视频难以得到满意的视频质量,HEVC标准中受损的CTU(Coding TreeUnit,编码树单元)尺寸远大于H.264标准中宏块的尺寸,此外,HEVC标准中可变的编码单元尺寸、多角度的帧内预测和高级运动矢量预测方法与H.264编码标准均有较大区别。因此,寻找一种适用于HEVC视频的错误隐藏技术变得非常必要。Because of the correlation between data, the error concealment technique combined with specific coding characteristics has a better effect. Therefore, there is an error concealment technique in the art that combines the above-mentioned spatial error concealment method and time domain error concealment method with the H.264 coding standard, and the error concealment technique is also true. Brought an updated error concealment effect. However, with the emergence of the High Efficiency Video Coding (HEVC) standard, the error concealment method combined with the H264 coding standard is difficult to obtain satisfactory video quality for HEVC video, and the damaged CTU (Coding TreeUnit, coding) in the HEVC standard. The size of the tree unit is much larger than the size of the macroblock in the H.264 standard. In addition, the variable coding unit size, multi-angle intra prediction and advanced motion vector prediction methods and H.264 coding standards in the HEVC standard are larger. the difference. Therefore, it is necessary to find a error concealment technique suitable for HEVC video.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种错误隐藏的方法和装置,以解决HEVC视频难以得到满意的视频质量的技术问题。Embodiments of the present invention provide a method and apparatus for error concealment to solve the technical problem that it is difficult to obtain satisfactory video quality in HEVC video.
本发明实施例提供一种错误隐藏的方法,所述方法包括:The embodiment of the invention provides a method for error concealing, the method comprising:
将当前错误编码树单元CTU中的每个错误块依次作为当前错误块;Each error block in the current error coding tree unit CTU is sequentially taken as the current error block;
确定所述当前错误块的空域左相邻块和空域上相邻块,所述空域左相邻块和空域上相邻块与所述错误块在空域上相邻;Determining a left-space neighboring block of the current error block and a neighboring block on the air domain, wherein the left adjacent block of the spatial domain and the adjacent block on the airspace are adjacent to the error block on the airspace;
当所述当前错误块的所述空域左相邻块和空域上相邻块都可用且都不为帧内预测块时,进行时域和空域相关性比较;When the left adjacent block of the spatial domain of the current error block and the adjacent block on the air domain are available and are not intra prediction blocks, time domain and spatial domain correlation are compared;
如果所述当前错误块的空域相关性大于预设强度阈值时,则进行空域插值错误隐藏;如果所述当前错误块的空域相关性不大于预设强度阈值时,则进行时域错误隐藏。If the spatial domain correlation of the current error block is greater than the preset intensity threshold, the spatial domain interpolation error concealment is performed; if the spatial domain correlation of the current error block is not greater than the preset intensity threshold, the time domain error concealment is performed.
可选地,所述方法还包括:Optionally, the method further includes:
当所述空域左相邻块和空域上相邻块都可用且都为帧内预测块时,对所述当前错误块进行帧内预测错误隐藏。When the left adjacent block of the spatial domain and the adjacent block on the air domain are available and both are intra prediction blocks, intra prediction error concealment is performed on the current error block.
可选地,Optionally,
所述进行时域和空域相关性比较包括: The comparison of the time domain and the airspace correlation includes:
当SADS小于(SADT1+SADT2)/3时,所述当前错误块的空域相关性强;When the SADS is less than (SADT1+SADT2)/3, the spatial correlation of the current error block is strong;
当SADS大于或等于(SADT1+SADT2)/3时,所述当前错误块的时域相关性强;When the SADS is greater than or equal to (SADT1+SADT2)/3, the time domain correlation of the current error block is strong;
其中:among them:
其中,m为当前错误块的尺寸,i、j为当前错误块的像素坐标,n为图像序号,P(n,0,0)为当前错误块的左上角像素值。Where m is the size of the current error block, i, j is the pixel coordinate of the current error block, n is the image number, and P(n, 0, 0) is the pixel value of the upper left corner of the current error block.
可选地,Optionally,
所述进行空域插值错误隐藏包括:The performing spatial domain interpolation error concealment includes:
根据所述当前错误块的空域左相邻块计算所述当前错误块的预测像素P′(i,j);Calculating a predicted pixel P'(i,j) of the current error block according to a spatial neighboring block of the current error block;
其中,i,j为当前错误块的像素坐标;P′(0,0)为当前错误块的左上角像素值。Where i, j is the pixel coordinate of the current error block; P'(0, 0) is the pixel value of the upper left corner of the current error block.
可选地,Optionally,
所述进行时域错误隐藏包括:The performing time domain error concealment includes:
获取所述当前错误块的空域左相邻块、空域上相邻块、空域左下相邻块以及空域右上相邻块中的运动矢量MV;Obtaining a motion vector MV in the left adjacent block of the current error block, the adjacent block on the air domain, the lower left adjacent block in the spatial domain, and the upper right adjacent block in the spatial domain;
当任意两个MV相同分量的差值大于预定阈值时,将所述当前错误块划分为4个错误子块;当任意两个MV相同分量的差值小于或等于预定阈值 时,将所述当前错误块整体作为1个错误子块;When the difference between the same components of any two MVs is greater than a predetermined threshold, the current error block is divided into 4 error sub-blocks; when the difference between the same components of any two MVs is less than or equal to a predetermined threshold The current error block as a whole is regarded as one error sub-block;
对于每个错误子块依次进行以下操作:Do the following for each error sub-block:
将错误子块的空域左相邻子块、空域上相邻子块、空域右相邻子块、空域下相邻子块和时域相邻子块中可用的MV以及零运动MV作为所述错误子块的MV,根据所述错误子块的每个MV获取所述错误子块的每个候选恢复块;The MV and the zero motion MV available in the spatially left adjacent subblock of the erroneous subblock, the adjacent subblock on the spatial domain, the right adjacent subspace of the spatial domain, the adjacent subspace in the spatial domain, and the adjacent subblock in the time domain are used as the MV of the erroneous sub-block, each candidate recovery block of the erroneous sub-block is obtained according to each MV of the erroneous sub-block;
将每个候选恢复块中边界匹配差最小的候选恢复块作为所述当前错误块的恢复像素块。A candidate restoration block having the smallest boundary matching difference in each candidate restoration block is taken as the restored pixel block of the current error block.
可选地,Optionally,
所述对所述当前错误块进行帧内预测错误隐藏包括:The performing intra prediction error concealment on the current error block includes:
将所述空域左相邻块和空域上相邻块的预测模式分别作为所述当前错误块的候选预测模式;Determining a prediction mode of the left adjacent block of the spatial domain and the adjacent block of the spatial domain as a candidate prediction mode of the current error block;
根据每个候选预测模式获取所述当前错误块的每个候选恢复块;将每个候选恢复块中边界匹配差最小的候选恢复块作为所述当前错误块的恢复像素块。Obtaining each candidate recovery block of the current erroneous block according to each candidate prediction mode; using a candidate restoration block having the smallest boundary matching difference in each candidate recovery block as the restored pixel block of the current erroneous block.
可选地,Optionally,
所述将当前错误编码树单元CTU中的每个错误块依次作为当前错误块前还包括:The step of using each error block in the current error coding tree unit CTU as the current error block in advance includes:
当所述当前错误CTU的空域上相邻CTU、空域下相邻CTU、空域左相邻CTU、空域右相邻CTU以及时域相邻CTU中任一项进行过划分,则将所述当前错误CTU划分为4个错误块;The current error is caused when any of the neighboring CTUs in the airspace of the current erroneous CTU, the neighboring CTUs in the airspace, the left neighboring CTUs in the airspace, the right neighboring CTUs in the airspace, and the neighboring CTUs in the time domain are divided. The CTU is divided into 4 error blocks;
当所述当前错误CTU的空域上相邻CTU、空域下相邻CTU、空域左相邻CTU、空域右相邻CTU以及时域相邻CTU都未进行划分,则将所述当前错误CTU整体作为1个错误块。When the adjacent CTU in the airspace of the current erroneous CTU, the adjacent CTU in the airspace, the left neighboring CTU in the airspace, the right neighboring CTU in the airspace, and the neighboring CTU in the time domain are not divided, the current error CTU is taken as a whole. 1 error block.
本发明实施例还提供一种错误隐藏的装置,所述装置包括:The embodiment of the invention further provides a device for error concealment, the device comprising:
配置模块,设置为将当前错误编码树单元CTU中的每个错误块依次作 为当前错误块;The configuration module is set to sequentially make each error block in the current error coding tree unit CTU Is the current error block;
信息获取模块,设置为确定所述当前错误块的空域左相邻块和空域上相邻块,所述空域左相邻块和空域上相邻块与所述错误块在空域上相邻;An information acquiring module, configured to determine a spatial neighboring block of the current error block and a neighboring block on the airspace, where the left adjacent block of the airspace and the adjacent block on the airspace are adjacent to the error block on the airspace;
判断模块,设置为当所述当前错误块的所述空域左相邻块和空域上相邻块都可用且都不为帧内预测块时,进行时域和空域相关性比较;a judging module, configured to perform time domain and spatial domain correlation comparison when the left adjacent block of the spatial domain of the current error block and the adjacent block of the air domain are available and are not intra prediction blocks;
隐藏处理模块,设置为如果所述当前错误块的空域相关性大于预设强度阈值时,则进行空域插值错误隐藏;如果所述当前错误块的空域相关性不大于预设强度阈值时,则进行时域错误隐藏。a hidden processing module, configured to: if the spatial correlation of the current error block is greater than a preset intensity threshold, performing spatial domain interpolation error concealment; if the spatial correlation of the current error block is not greater than a preset intensity threshold, proceeding Time domain error is hidden.
可选地,Optionally,
所述隐藏处里模块还设置为当所述空域左相邻块和空域上相邻块都可用且都为帧内预测块时,对所述当前错误块进行帧内预测错误隐藏。The hidden module is further configured to perform intra prediction error concealment on the current error block when both the left adjacent block of the spatial domain and the adjacent block on the spatial domain are available and both are intra prediction blocks.
可选地,Optionally,
所述判断模块是设置为通过如下方式实现当所述当前错误块的所述空域左相邻块和空域上相邻块都可用且都不为帧内预测块时,进行时域和空域相关性:The determining module is configured to perform time domain and spatial domain correlation when the left adjacent block of the spatial error block and the adjacent block on the air domain are available and are not intra prediction blocks. :
当SADS<(SADT1+SADT2)/3时,所述当前错误块的空域相关性强;其中:When SADS<(SADT1+SADT2)/3, the spatial domain correlation of the current error block is strong;
其中,m为当前错误块的尺寸,i、j为当前错误块的像素坐标,n为图像序号,P(n,0,0)为当前错误块的左上角像素值。Where m is the size of the current error block, i, j is the pixel coordinate of the current error block, n is the image number, and P(n, 0, 0) is the pixel value of the upper left corner of the current error block.
可选地,Optionally,
所述隐藏处理模块是设置为通过如下方式实现进行空域插值错误隐藏:The hidden processing module is configured to perform spatial interpolation error concealment by:
根据所述当前错误块的空域左相邻块计算所述当前错误块的预测像素P′ (i,j);Calculating a predicted pixel P′ of the current error block according to a spatial neighboring block of the current error block (i,j);
其中,i,j为当前错误块的像素坐标;P′(0,0)为当前错误块的左上角像素值。Where i, j is the pixel coordinate of the current error block; P'(0, 0) is the pixel value of the upper left corner of the current error block.
可选地,Optionally,
所述隐藏处理模块是设置为通过如下方式实现进行时域错误隐藏:The hidden processing module is configured to implement time domain error concealment by:
获取所述当前错误块的空域左相邻块、空域上相邻块、空域左下相邻块以及空域右上相邻块中的运动矢量MV;Obtaining a motion vector MV in the left adjacent block of the current error block, the adjacent block on the air domain, the lower left adjacent block in the spatial domain, and the upper right adjacent block in the spatial domain;
当任意两个MV相同分量的差值大于预定阈值时,将所述当前错误块划分为4个错误子块;当任意两个MV相同分量的差值小于或等于预定阈值时,将所述当前错误块整体作为1个错误子块;When the difference between the same components of any two MVs is greater than a predetermined threshold, the current error block is divided into 4 error sub-blocks; when the difference between any two MV identical components is less than or equal to a predetermined threshold, the current The error block as a whole is an error sub-block;
对于每个错误子块依次进行以下操作:Do the following for each error sub-block:
将错误子块的空域左相邻子块、空域上相邻子块、空域右相邻子块、空域下相邻子块和时域相邻子块中可用的MV以及零运动MV作为所述错误子块的MV,根据所述错误子块的每个MV获取所述错误子块的每个候选恢复块;The MV and the zero motion MV available in the spatially left adjacent subblock of the erroneous subblock, the adjacent subblock on the spatial domain, the right adjacent subspace of the spatial domain, the adjacent subspace in the spatial domain, and the adjacent subblock in the time domain are used as the MV of the erroneous sub-block, each candidate recovery block of the erroneous sub-block is obtained according to each MV of the erroneous sub-block;
将每个候选恢复块中边界匹配差最小的候选恢复块作为所述当前错误块的恢复像素块。A candidate restoration block having the smallest boundary matching difference in each candidate restoration block is taken as the restored pixel block of the current error block.
可选地,Optionally,
所述隐藏处理模块是设置为通过如下方式实现对所述当前错误块进行帧内预测错误隐藏:The hidden processing module is configured to perform intra prediction error concealment on the current error block by:
将所述空域左相邻块和空域上相邻块的预测模式分别作为所述当前错误块的候选预测模式;Determining a prediction mode of the left adjacent block of the spatial domain and the adjacent block of the spatial domain as a candidate prediction mode of the current error block;
根据每个候选预测模式获取所述当前错误块的每个候选恢复块;将每个候选恢复块中边界匹配差最小的候选恢复块作为所述当前错误块的恢复像素块。 Obtaining each candidate recovery block of the current erroneous block according to each candidate prediction mode; using a candidate restoration block having the smallest boundary matching difference in each candidate recovery block as the restored pixel block of the current erroneous block.
可选地,所述装置还包括:Optionally, the device further includes:
划分模块,设置为当所述当前错误CTU的空域上相邻CTU、空域下相邻CTU、空域左相邻CTU、空域右相邻CTU以及时域相邻CTU中任一项进行过划分,则将所述当前错误CTU划分为4个错误块;当所述当前错误CTU的空域上相邻CTU、空域下相邻CTU、空域左相邻CTU、空域右相邻CTU以及时域相邻CTU都未进行划分,则将所述当前错误CTU整体作为1个错误块。a dividing module, configured to divide any one of a neighboring CTU, an adjacent CTU in the airspace, a left neighboring CTU in the airspace, a right neighboring CTU in the airspace, and a neighboring CTU in the time domain in the airspace of the current erroneous CTU, Dividing the current error CTU into 4 error blocks; when the current error CTU is in the airspace, the adjacent CTU, the airspace adjacent CTU, the airspace left adjacent CTU, the airspace right adjacent CTU, and the time domain neighboring CTU If the division is not performed, the current error CTU as a whole is taken as one error block.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
上述方案结合HEVC视频的编码特性,利用错误块数据与空域时域相邻数据的相关性修复受损图像,对受损的HEVC视频码流有良好的修复效果。The above scheme combines the coding characteristics of HEVC video, repairs the damaged image by using the correlation between the error block data and the spatial domain adjacent data, and has a good repair effect on the damaged HEVC video code stream.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1是本发明实施例中的错误隐藏的方法的流程图;1 is a flow chart of a method of error concealment in an embodiment of the present invention;
图2是本发明实施例中的错误块的相邻块位置示意图;2 is a schematic diagram showing the position of adjacent blocks of an error block in the embodiment of the present invention;
图3是本发明实施例中的空域和时域相关性比较的块位置示意图;3 is a block diagram showing a comparison of spatial and temporal correlations in an embodiment of the present invention;
图4是本发明实施例中的空域插值示意图;4 is a schematic diagram of spatial domain interpolation in an embodiment of the present invention;
图5是本发明实施例中的计算边界匹配差用到像素示意图;FIG. 5 is a schematic diagram of a pixel used for calculating a boundary matching difference in an embodiment of the present invention; FIG.
图6是本发明实施例中的错误隐藏的装置的结构示意图。FIG. 6 is a schematic structural diagram of an apparatus for error concealment in an embodiment of the present invention.
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
本发明实施例的技术方案结合HEVC视频编码特性,利用受损图像区域 与已解码图像信息的相关性来修复受损图像,以解决HEVC视频难以得到满意的视频质量的问题。The technical solution of the embodiment of the present invention combines the HEVC video coding feature to utilize the damaged image region. Correlation with decoded image information to repair damaged images to solve the problem that HEVC video is difficult to obtain satisfactory video quality.
下面结合附图对本发明实施例技术方案作进一步的说明。The technical solutions of the embodiments of the present invention are further described below with reference to the accompanying drawings.
如图1所示,本发明实施例提供一种错误隐藏的方法,所述方法包括:As shown in FIG. 1 , an embodiment of the present invention provides a method for error concealing, where the method includes:
步骤S101:将当前错误编码树单元CTU中的每个错误块依次作为当前错误块;Step S101: sequentially use each error block in the current error coding tree unit CTU as the current error block;
步骤S103:确定所述当前错误块的空域左相邻块和空域上相邻块;Step S103: determining a left adjacent block of the airspace of the current error block and a neighboring block on the airspace;
所述空域左相邻块和空域上相邻块与所述错误块在空域上相邻;The left adjacent block of the airspace and the adjacent block on the airspace are adjacent to the error block on the airspace;
步骤S105:当所述当前错误块的所述空域左相邻块和空域上相邻块都可用且都不为帧内预测块时,转步骤S107;Step S105: when the spatial neighboring left neighboring block of the current error block and the adjacent blocks on the airspace are available and are not intra prediction blocks, go to step S107;
步骤S107:进行时域和空域相关性比较;Step S107: performing time domain and airspace correlation comparison;
步骤S109:如果所述当前错误块的空域相关性大于预设强度阈值时,则转步骤S110;如果所述当前错误块的空域相关性不大于预设强度阈值时,则转步骤S111;Step S109: If the spatial correlation of the current error block is greater than the preset intensity threshold, then go to step S110; if the spatial correlation of the current error block is not greater than the preset intensity threshold, then go to step S111;
步骤S110:进行空域插值错误隐藏;转步骤S101确定下一个当前错误块。Step S110: performing spatial domain interpolation error concealment; and proceeding to step S101 to determine the next current error block.
步骤S111:进行时域错误隐藏;转S101确定下一个当前错误块。Step S111: Perform time domain error concealment; go to S101 to determine the next current error block.
需要说明的是,本实施例所提供的执行流程对于每一个当前错误块均相同,一个错误CTU中的每个错误块依次执行该操作,即步骤S101至步骤S111。当一个当前错误块进行完错误隐藏处理后,继续查找下一个错误块作为当前错误,并进行相应的错误隐藏处理。当一个错误CTU内包含的所有错误块都完成错误隐藏处理后,则查找下一个错误CTU进行相应的错误隐藏处理,直到所有错误CTU全部完成错误隐藏处理。It should be noted that the execution flow provided by this embodiment is the same for each current error block, and each error block in an error CTU sequentially performs the operation, that is, steps S101 to S111. After a current error block has finished error concealment processing, it continues to find the next error block as the current error and performs corresponding error concealment processing. When all the error blocks included in an error CTU complete the error concealment processing, the next error CTU is searched for the corresponding error concealment processing until all the error CTUs complete the error concealment processing.
可选地,所述方法还包括:Optionally, the method further includes:
步骤S106:当所述空域左相邻块和空域上相邻块都可用且都为帧内预测块时,对所述当前错误块进行帧内预测错误隐藏。Step S106: When the left adjacent block of the spatial domain and the adjacent block on the air domain are available and both are intra prediction blocks, intra prediction error concealment is performed on the current error block.
可选地,所述方法还包括: Optionally, the method further includes:
步骤S100:当所述当前错误CTU的空域上相邻CTU、空域下相邻CTU、空域左相邻CTU、空域右相邻CTU以及时域相邻CTU中任一项进行过划分,则将所述当前错误CTU划分为4个错误块;Step S100: when the adjacent CTU in the airspace of the current error CTU, the adjacent CTU in the air domain, the left adjacent CTU in the airspace, the right adjacent CTU in the airspace, and the adjacent CTU in the time domain are divided, The current error CTU is divided into 4 error blocks;
当所述当前错误CTU的空域上相邻CTU、空域下相邻CTU、空域左相邻CTU、空域右相邻CTU以及时域相邻CTU都未进行划分,则将所述当前错误CTU整体作为1个错误块。When the adjacent CTU in the airspace of the current erroneous CTU, the adjacent CTU in the airspace, the left neighboring CTU in the airspace, the right neighboring CTU in the airspace, and the neighboring CTU in the time domain are not divided, the current error CTU is taken as a whole. 1 error block.
需要说明的是,步骤S107和步骤S106不限定先后顺序,在其它实施例中,也可以先执行步骤S106。此外,步骤S110和步骤S111也不限定先后顺序。It should be noted that step S107 and step S106 do not limit the sequence. In other embodiments, step S106 may also be performed first. Further, step S110 and step S111 do not limit the order.
下面对上述步骤做进一步的解释和说明:The above steps are further explained and explained below:
如图2所示,在本实施例中,对于一个错误块,假设错误块的左上角像素坐标为(x,y),尺寸为w像素,那么该错误块的上相邻块是像素(x,y-1)所在的PU(prediction Unit,预测单元);左相邻块是像素(x-1,y)所在的PU;下相邻块是像素(x,y+w)所在的PU;右相邻块是像素(x+w,y)所在的PU;左下相邻块是像素(x-1,y+w)所在的PU;右上相邻块是像素(x+w,y-1)所在的PU;As shown in FIG. 2, in the present embodiment, for an error block, assuming that the pixel coordinates of the upper left corner of the error block are (x, y) and the size is w pixels, the upper adjacent block of the error block is a pixel (x). , y-1) is the PU (prediction unit); the left adjacent block is the PU where the pixel (x-1, y) is located; the lower adjacent block is the PU where the pixel (x, y+w) is located; The right adjacent block is the PU where the pixel (x+w, y) is located; the lower left adjacent block is the PU where the pixel (x-1, y+w) is located; the upper right adjacent block is the pixel (x+w, y-1) The PU where it is located;
在本实施例中,时域相邻块是POC(Picture Order Count,图像序号)比当前图像POC小且距离最近的解码图像中像素(x+w/2-1,y+w/2-1)所在的PU。In this embodiment, the time domain neighboring block is a pixel (x+w/2-1, y+w/2-1) in the decoded image that is smaller than the current image POC and has the closest POC (Picture Order Count). ) The PU where it is located.
在步骤S105和S106中,当一个相邻块同时满足以下两个条件时,认为该相邻块是可用的;当一个相邻块不能同时满足以下两个条件时,认为该相邻块是不可用的:In steps S105 and S106, when a neighboring block satisfies the following two conditions at the same time, the neighboring block is considered to be usable; when a neighboring block cannot satisfy the following two conditions at the same time, the neighboring block is considered to be unavailable. use:
条件一、相邻块没有超出图像边界,即在图像内部;
条件二、相邻块被正确解码,或经过了错误隐藏处理。这里所说的经过了错误隐藏处理是指已经经过本发明实施例描述的错误隐藏方法进行了恢复。 Condition 2, the adjacent block is correctly decoded, or has undergone error concealment processing. The error concealment processing referred to herein means that the error concealment method described in the embodiment of the present invention has been restored.
步骤S105中进行时域和空域相关性比较包括:The comparison of the time domain and the airspace correlation in step S105 includes:
如图3所示,找到与当前错误块B(n,x,y)的左相邻块B(n,x-1,y)和上相邻块B(n,x,y-1),找到当前错误块的时域相邻块B(n-1,x,y)及该时域相邻块的左相邻块B(n-1,x-1,y)和上相邻块B(n-1,x,y-1)。这里的n表示图像序号,x表示块左上角像素的水平坐标,y表示块左上角像素的垂直坐标。As shown in FIG. 3, the left neighboring block B(n, x-1, y) and the upper neighboring block B(n, x, y-1) with the current error block B(n, x, y) are found, Finding the time domain neighboring block B(n-1, x, y) of the current error block and the left neighboring block B(n-1, x-1, y) of the time domain neighboring block and the upper neighboring block B (n-1, x, y-1). Here, n represents the image number, x represents the horizontal coordinate of the pixel in the upper left corner of the block, and y represents the vertical coordinate of the pixel in the upper left corner of the block.
所述寻找当前错误块的时域相邻块,包括:由于当前错误块的时域相邻块的POC比当前图像的POC小,可选的,选择当前错误块的时域相邻块所在的图像序号为前一帧图像序号,即n-1;选择当前错误块的左上角像素坐标(x,y)所在的PU为当前错误块的时域相邻块。The searching for the time domain neighboring block of the current error block includes: because the POC of the time domain neighboring block of the current error block is smaller than the POC of the current image, optionally, selecting the time domain neighboring block of the current error block is located. The image sequence number is the image number of the previous frame, that is, n-1; the PU where the pixel coordinates (x, y) of the upper left corner of the current error block is located is the time domain neighboring block of the current error block.
计算相邻块B(n,x-1,y)和B(n,x,y-1)之间的SADS;再分别计算B(n,x-1,y)和B(n-1,x-1,y)的SADT1,以及B(n,x,y-1)和B(n-1,x,y-1)的SADT2。Calculate SAD S between adjacent blocks B(n,x-1,y) and B(n,x,y-1); then calculate B(n,x-1,y) and B(n-1, respectively , AD-1, y) of SAD T1 , and B(n, x, y-1) and B(n-1, x, y-1) of SAD T2 .
当SADS小于(SADT1+SADT2)/3时,所述当前错误块的空域相关性强;When SAD S is less than (SAD T1 +SAD T2 )/3, the spatial correlation of the current error block is strong;
当SADS大于或等于(SADT1+SADT2)/3时,所述当前错误块的时域相关性强;When SAD S is greater than or equal to (SAD T1 +SAD T2 )/3, the time domain correlation of the current error block is strong;
其中:among them:
其中,m为当前错误块的尺寸,i、j为当前错误块的像素坐标,n为图像序号,P(n,0,0)为当前错误块的左上角像素值。Where m is the size of the current error block, i, j is the pixel coordinate of the current error block, n is the image number, and P(n, 0, 0) is the pixel value of the upper left corner of the current error block.
步骤S109中进行空域插值错误隐藏包括:Performing spatial interpolation error concealment in step S109 includes:
如图4所示,根据当前错误块的空域左相邻块计算当前错误块的预测像素P′(i,j),可选的,可利用空域左相邻块边界的一列像素和空域上相邻块边界的一行像素,进行内插得到当前错误块的预测像素。 As shown in FIG. 4, the predicted pixel P'(i, j) of the current error block is calculated according to the spatial neighboring block of the current error block. Alternatively, a column of pixels and a spatial domain of the left adjacent block boundary of the spatial domain may be utilized. A row of pixels adjacent to the block boundary is interpolated to obtain the predicted pixel of the current erroneous block.
其中,i,j为当前错误块的像素坐标;P′(0,0)表示当前错误块的左上角像素值。Where i, j is the pixel coordinate of the current error block; P'(0, 0) represents the pixel value of the upper left corner of the current error block.
步骤S106中对所述当前错误块进行帧内预测错误隐藏包括:Performing intra prediction error concealing on the current error block in step S106 includes:
将所述空域左相邻块和空域上相邻块的预测模式分别作为所述当前错误块的候选预测模式;Determining a prediction mode of the left adjacent block of the spatial domain and the adjacent block of the spatial domain as a candidate prediction mode of the current error block;
根据每个候选预测模式获取所述当前错误块的每个候选恢复块;将每个候选恢复块中边界匹配差最小的候选恢复块作为所述当前错误块的恢复像素块。Obtaining each candidate recovery block of the current erroneous block according to each candidate prediction mode; using a candidate restoration block having the smallest boundary matching difference in each candidate recovery block as the restored pixel block of the current erroneous block.
如图5所示,在计算每个候选恢复块的边界匹配差时,根据候选恢复块内边界上的一圈像素以及相邻块中的邻近像素计算。As shown in FIG. 5, when calculating the boundary matching difference of each candidate recovery block, it is calculated according to a circle of pixels on the inner boundary of the candidate recovery block and neighboring pixels in the adjacent block.
边界匹配差可以采用下述公式1计算:The boundary matching difference can be calculated by the following formula 1:
公式1:SADE=Σ0≤i<m||P(i,j)-P(i,j-1)||+Σi=0,m-1||P(i,j)-P(i-1,j)||Equation 1: SAD E = Σ 0 ≤ i < m | | P (i, j) - P (i, j - 1) | | + Σ i = 0, m - 1 | | P (i, j) - P (i-1,j)||
其中,m为当前错误块的尺寸;i,j为当前错误块的像素坐标;P(0,0)为当前错误块的左上角像素值。Where m is the size of the current error block; i, j is the pixel coordinate of the current error block; P(0, 0) is the pixel value of the upper left corner of the current error block.
步骤S110中进行时域错误隐藏包括:Performing time domain error concealing in step S110 includes:
获取所述当前错误块的空域左相邻块、空域上相邻块、空域左下相邻块以及空域右上相邻块中的运动矢量MV;Obtaining a motion vector MV in the left adjacent block of the current error block, the adjacent block on the air domain, the lower left adjacent block in the spatial domain, and the upper right adjacent block in the spatial domain;
当任意两个MV相同分量的差值大于预定阈值时,将所述当前错误块划分为4个错误子块;当任意两个MV相同分量的差值小于或等于预定阈值时,将所述当前错误块整体作为1个错误子块;When the difference between the same components of any two MVs is greater than a predetermined threshold, the current error block is divided into 4 error sub-blocks; when the difference between any two MV identical components is less than or equal to a predetermined threshold, the current The error block as a whole is an error sub-block;
对于每个错误子块依次进行以下操作:Do the following for each error sub-block:
将错误子块的空域左相邻子块、空域上相邻子块、空域右相邻子块、空域下相邻子块和时域相邻子块中可用的MV以及零运动MV作为所述错误子 块的MV,根据所述错误子块的每个MV获取所述错误子块的每个候选恢复块;The MV and the zero motion MV available in the spatially left adjacent subblock of the erroneous subblock, the adjacent subblock on the spatial domain, the right adjacent subspace of the spatial domain, the adjacent subspace in the spatial domain, and the adjacent subblock in the time domain are used as the Error An MV of the block, each candidate recovery block of the erroneous sub-block is obtained according to each MV of the erroneous sub-block;
将每个候选恢复块中边界匹配差最小的候选恢复块作为所述当前错误块的恢复像素块,该恢复像素块对应的MV作为当前错误块的MV。A candidate recovery block having the smallest boundary matching difference in each candidate recovery block is used as a restored pixel block of the current error block, and the MV corresponding to the restored pixel block is used as the MV of the current error block.
其中,计算边界匹配差可以按照上述公式1的方法计算获得。同时该步骤中需要判断每个MV中任意两个MV相同分量的差值是否大于预定阈值,例如可以将预定阈值设为4,那么当满足公式2时将所述当前错误块划分为4个错误子块;Wherein, calculating the boundary matching difference can be calculated according to the method of the
公式2为|MVi(j)-MVi(j-m)|>4。Equation 2 is |MV i (j)-MV i (jm)|>4.
其中,i表示MV的水平或垂直分量;j表示可用MV的编号,j=1,2,3;m表示两个MV的编号差值,m∈[1,j]。Where i denotes the horizontal or vertical component of the MV; j denotes the number of available MVs, j = 1, 2, 3; m denotes the number difference of the two MVs, m ∈ [1, j].
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
如图6所示,本发明实施例还提供一种错误隐藏的装置,所述装置包括:As shown in FIG. 6, an embodiment of the present invention further provides a device for error concealment, where the device includes:
配置模块11,设置为将当前错误编码树单元CTU中的每个错误块依次作为当前错误块;The configuration module 11 is configured to sequentially use each error block in the current error coding tree unit CTU as the current error block;
信息获取模块12,设置为确定所述当前错误块的空域左相邻块和空域上相邻块,所述空域左相邻块和空域上相邻块与所述错误块在空域上相邻;The
判断模块13,设置为当所述当前错误块的所述空域左相邻块和空域上相邻块都可用且都不为帧内预测块时,进行时域和空域相关性比较;The determining module 13 is configured to perform time domain and spatial domain correlation comparison when the spatial neighboring left neighboring block of the current error block and the neighboring block on the airspace are both available and are not intra prediction blocks;
隐藏处理模块14,设置为如果所述当前错误块的空域相关性大于预设强度阈值时,则进行空域插值错误隐藏;如果所述当前错误块的空域相关性不大于预设强度阈值时,则进行时域错误隐藏。The
可选地, Optionally,
所述隐藏处里模块14还设置为当所述空域左相邻块和空域上相邻块都可用且都为帧内预测块时,对所述当前错误块进行帧内预测错误隐藏。The hidden
可选地,Optionally,
所述判断模块13是设置为通过如下方式实现当所述当前错误块的所述空域左相邻块和空域上相邻块都可用且都不为帧内预测块时,进行时域和空域相关性:The judging module 13 is configured to perform time domain and airspace correlation when the spatial neighboring left neighboring block of the current erroneous block and the neighboring block in the airspace are both available and are not intra prediction blocks. Sex:
当SADS<(SADT1+SADT2)/3时,所述当前错误块的空域相关性强;其中:When SAD S <(SAD T1 +SAD T2 )/3, the spatial correlation of the current error block is strong; wherein:
其中,m为当前错误块的尺寸,i、j为当前错误块的像素坐标,n为图像序号,P(n,0,0)为当前错误块的左上角像素值。Where m is the size of the current error block, i, j is the pixel coordinate of the current error block, n is the image number, and P(n, 0, 0) is the pixel value of the upper left corner of the current error block.
可选地,Optionally,
所述隐藏处理模块14是设置为通过如下方式实现进行空域插值错误隐藏:The hidden processing module 14 is configured to perform spatial interpolation error concealment by:
根据所述当前错误块的空域左相邻块计算所述当前错误块的预测像素P′(i,j);Calculating a predicted pixel P'(i,j) of the current error block according to a spatial neighboring block of the current error block;
其中,i,j为当前错误块的像素坐标;P′(0,0)为当前错误块的左上角像素值。Where i, j is the pixel coordinate of the current error block; P'(0, 0) is the pixel value of the upper left corner of the current error block.
可选地,Optionally,
所述隐藏处理模块14是设置为通过如下方式实现进行时域错误隐藏:The hidden
获取所述当前错误块的空域左相邻块、空域上相邻块、空域左下相邻块 以及空域右上相邻块中的运动矢量MV;Obtaining the left adjacent block of the airspace of the current error block, the adjacent block on the airspace, and the lower left adjacent block of the airspace And a motion vector MV in the upper right adjacent block of the airspace;
当任意两个MV相同分量的差值大于预定阈值时,将所述当前错误块划分为4个错误子块;当任意两个MV相同分量的差值小于或等于预定阈值时,将所述当前错误块整体作为1个错误子块;When the difference between the same components of any two MVs is greater than a predetermined threshold, the current error block is divided into 4 error sub-blocks; when the difference between any two MV identical components is less than or equal to a predetermined threshold, the current The error block as a whole is an error sub-block;
对于每个错误子块依次进行以下操作:Do the following for each error sub-block:
将错误子块的空域左相邻子块、空域上相邻子块、空域右相邻子块、空域下相邻子块和时域相邻子块中可用的MV以及零运动MV作为所述错误子块的MV,根据所述错误子块的每个MV获取所述错误子块的每个候选恢复块;The MV and the zero motion MV available in the spatially left adjacent subblock of the erroneous subblock, the adjacent subblock on the spatial domain, the right adjacent subspace of the spatial domain, the adjacent subspace in the spatial domain, and the adjacent subblock in the time domain are used as the MV of the erroneous sub-block, each candidate recovery block of the erroneous sub-block is obtained according to each MV of the erroneous sub-block;
将每个候选恢复块中边界匹配差最小的候选恢复块作为所述当前错误块的恢复像素块。A candidate restoration block having the smallest boundary matching difference in each candidate restoration block is taken as the restored pixel block of the current error block.
可选地,Optionally,
所述隐藏处理模块14是设置为通过如下方式实现对所述当前错误块进行帧内预测错误隐藏:The
将所述空域左相邻块和空域上相邻块的预测模式分别作为所述当前错误块的候选预测模式;Determining a prediction mode of the left adjacent block of the spatial domain and the adjacent block of the spatial domain as a candidate prediction mode of the current error block;
根据每个候选预测模式获取所述当前错误块的每个候选恢复块;将每个候选恢复块中边界匹配差最小的候选恢复块作为所述当前错误块的恢复像素块。Obtaining each candidate recovery block of the current erroneous block according to each candidate prediction mode; using a candidate restoration block having the smallest boundary matching difference in each candidate recovery block as the restored pixel block of the current erroneous block.
可选地,所述装置还包括:Optionally, the device further includes:
划分模块15,设置为当所述当前错误CTU的空域上相邻CTU、空域下相邻CTU、空域左相邻CTU、空域右相邻CTU以及时域相邻CTU中任一项进行过划分,则将所述当前错误CTU划分为4个错误块;当所述当前错误CTU的空域上相邻CTU、空域下相邻CTU、空域左相邻CTU、空域右相邻CTU以及时域相邻CTU都未进行划分,则将所述当前错误CTU整体作为1个错误块。 The dividing module 15 is configured to divide any one of a neighboring CTU, an adjacent CTU in the airspace, a left neighboring CTU in the airspace, a right neighboring CTU in the airspace, and a neighboring CTU in the time domain in the airspace of the current faulty CTU, And dividing the current error CTU into 4 error blocks; adjacent CTUs in the airspace of the current error CTU, adjacent CTUs in the air domain, left adjacent CTUs in the airspace, right adjacent CTUs in the airspace, and time-domain neighboring CTUs If the division is not performed, the current error CTU as a whole is regarded as one error block.
每个每个以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。Each of the above is a further detailed description of the present invention in connection with the specific embodiments, and the specific implementation of the invention is not limited to the description.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
上述技术方案对受损的HEVC视频码流有良好的修复效果。 The above technical solution has a good repair effect on the damaged HEVC video code stream.
Claims (15)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510086369.3A CN105992012B (en) | 2015-02-17 | 2015-02-17 | A method and apparatus for error concealment |
| CN201510086369.3 | 2015-02-17 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016131270A1 true WO2016131270A1 (en) | 2016-08-25 |
Family
ID=56691977
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/090813 Ceased WO2016131270A1 (en) | 2015-02-17 | 2015-09-25 | Error concealment method and apparatus |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105992012B (en) |
| WO (1) | WO2016131270A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111770346A (en) * | 2020-06-10 | 2020-10-13 | 杭州电子科技大学 | A saliency-based error concealment method for stereoscopic 3D video |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107277549B (en) * | 2017-06-07 | 2020-05-12 | 南京邮电大学 | A frame error concealment method for HEVC intra-frame coding based on texture angle prediction mode |
| CN107241609A (en) * | 2017-07-21 | 2017-10-10 | 东华大学 | Spatial Error Concealment Method Based on Gradient Feature Statistics and Non-iterative Shrink Filling |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101163250A (en) * | 2006-10-09 | 2008-04-16 | 北京航空航天大学 | Boundary gradient based video stream fault tolerance method |
| CN102104782A (en) * | 2011-03-30 | 2011-06-22 | 武汉大学 | Decoding end error concealment method suitable for AVS-P2 (Audio Video Standard-P2) video encoding standard |
| CN102111622A (en) * | 2009-12-23 | 2011-06-29 | 中兴通讯股份有限公司 | Method and device for concealing time domain errors of video images |
| CN103313064A (en) * | 2013-06-07 | 2013-09-18 | 国家广播电影电视总局广播科学研究院 | Method for concealing time-domain errors on basis of inter-frame modes and movement repair |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1214636C (en) * | 2002-05-28 | 2005-08-10 | 华为技术有限公司 | Method for shielding errors happening in video signal |
| US7738561B2 (en) * | 2004-11-16 | 2010-06-15 | Industrial Technology Research Institute | MPEG-4 streaming system with adaptive error concealment |
| CN1964497A (en) * | 2005-11-09 | 2007-05-16 | 上海乐金广电电子有限公司 | A method for error concealment in the case of motive video decoding |
| CN101304538B (en) * | 2008-06-19 | 2010-07-28 | 宁波中科集成电路设计中心有限公司 | Method for detecting and shielding error of AVS video decode |
| CN102307304B (en) * | 2011-09-16 | 2013-04-03 | 北京航空航天大学 | Image segmentation based error concealment method for entire right frame loss in stereoscopic video |
-
2015
- 2015-02-17 CN CN201510086369.3A patent/CN105992012B/en active Active
- 2015-09-25 WO PCT/CN2015/090813 patent/WO2016131270A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101163250A (en) * | 2006-10-09 | 2008-04-16 | 北京航空航天大学 | Boundary gradient based video stream fault tolerance method |
| CN102111622A (en) * | 2009-12-23 | 2011-06-29 | 中兴通讯股份有限公司 | Method and device for concealing time domain errors of video images |
| CN102104782A (en) * | 2011-03-30 | 2011-06-22 | 武汉大学 | Decoding end error concealment method suitable for AVS-P2 (Audio Video Standard-P2) video encoding standard |
| CN103313064A (en) * | 2013-06-07 | 2013-09-18 | 国家广播电影电视总局广播科学研究院 | Method for concealing time-domain errors on basis of inter-frame modes and movement repair |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111770346A (en) * | 2020-06-10 | 2020-10-13 | 杭州电子科技大学 | A saliency-based error concealment method for stereoscopic 3D video |
| CN111770346B (en) * | 2020-06-10 | 2022-09-30 | 杭州电子科技大学 | Three-dimensional video error concealment method based on significance |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105992012A (en) | 2016-10-05 |
| CN105992012B (en) | 2020-09-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12348759B2 (en) | Concept of interweaved prediction | |
| TWI617185B (en) | Method and apparatus of video coding with affine motion compensation | |
| CN110741640B (en) | Optical flow estimation for motion compensated prediction in video coding | |
| US9060177B2 (en) | System and method to process motion vectors of video data | |
| CN106254885B (en) | Data processing system, method of performing motion estimation | |
| US11546601B2 (en) | Utilization of non-sub block spatial-temporal motion vector prediction in inter mode | |
| US20100201870A1 (en) | System and method for frame interpolation for a compressed video bitstream | |
| US20060062304A1 (en) | Apparatus and method for error concealment | |
| JP6394876B2 (en) | Encoding circuit and encoding method | |
| CN101573984A (en) | Method and apparatus for estimating motion vector using multiple motion vector predictors, encoder, decoder, and decoding method | |
| US20100002771A1 (en) | Seamless Wireless Video Transmission For Multimedia Applications | |
| US8611423B2 (en) | Determination of optimal frame types in video encoding | |
| KR100640498B1 (en) | Apparatus and method for concealing error of frame | |
| CN106303545B (en) | Data processing system and method for performing motion estimation in a sequence of frames | |
| WO2016131270A1 (en) | Error concealment method and apparatus | |
| US20240073447A1 (en) | Encoding and decoding method and apparatus, and devices therefor | |
| KR101709894B1 (en) | Method for frame rate up-conversion considering the direction and magnitude of motion vectors and apparatus using the same | |
| JP6390275B2 (en) | Encoding circuit and encoding method | |
| WO2020049447A1 (en) | Fast encoding methods for interweaved prediction | |
| CN104918052A (en) | Error tracking and mitigation for motion compensation-based video compression | |
| KR20190015120A (en) | Motion estimation method and apparatus for a plurality of frames | |
| KR101624422B1 (en) | Reference frame and inter-mode selection method and apparatus | |
| US10075691B2 (en) | Multiview video coding method using non-referenced view video group | |
| JP5788952B2 (en) | Video decoding method | |
| Radmehr et al. | Content-adaptive Gradient-based Error Concealment Scheme for H. 264/AVC |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15882409 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15882409 Country of ref document: EP Kind code of ref document: A1 |