CN105681814A - Deblocking filtering manner determination method and apparatus - Google Patents
Deblocking filtering manner determination method and apparatus Download PDFInfo
- Publication number
- CN105681814A CN105681814A CN201410677989.XA CN201410677989A CN105681814A CN 105681814 A CN105681814 A CN 105681814A CN 201410677989 A CN201410677989 A CN 201410677989A CN 105681814 A CN105681814 A CN 105681814A
- Authority
- CN
- China
- Prior art keywords
- block
- sub
- formula
- determining
- blocks
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000001914 filtration Methods 0.000 title claims abstract description 99
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000009466 transformation Effects 0.000 claims description 8
- 230000006835 compression Effects 0.000 abstract description 11
- 238000007906 compression Methods 0.000 abstract description 11
- 230000008569 process Effects 0.000 description 9
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000010008 shearing Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013139 quantization Methods 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention discloses a deblocking filtering manner determination method, aiming to solve the technical problem of low coding compression ratio of coding of a video with a lot of repeated information. The method comprises the steps of when deblocking filtering is performed on a block obtained by dividing a maximum coding unit forming a video frame, determining whether block boundaries of two sub-blocks forming the block are the boundaries of a prediction unit or a change unit, wherein a size of the maximum coding unit is a first size, and the first size is greater than 64*64; if the block boundaries of the two sub-blocks forming the block are the boundaries of the prediction unit or the change unit, determining whether the boundary intensity of the two sub-blocks is equal to 2; and if the boundary intensity of the two sub-blocks is equal to 2, determining to perform deblocking filtering on the block, and determining the deblocking filtering manner of the block according to pixel values of pixels in the block. The present invention also discloses a corresponding apparatus.
Description
Technical Field
The present invention relates to the field of video coding technologies, and in particular, to a method and an apparatus for determining a deblocking filtering mode.
Background
HEVC (high efficiency video coding) is a new video compression standard, and can replace the h.264/AVC (video coding standard) coding standard to some extent.
HEVC can improve compression efficiency of 1080P video by about 50% during compression, which means that the quality of video will increase greatly, and a large amount of network bandwidth can be saved, and consumers can enjoy higher-quality video content.
However, many applications such as remote desktop access, remote gaming, cloud computing, etc. have become common in the art, and an important feature of such applications is the mixing of information such as text and computer-generated images in natural video. Information such as text and computer-generated images may often repeatedly appear in certain patterns (e.g., certain characters, icons, and lines), such as Printed Circuit Boards (PCBs) that are drawn by a computer, with a large number of repeated horizontal and vertical lines. Compared with a natural video sequence, the image generated by a computer has more textures, and a large amount of high-frequency information is considered to be contained in video coding, and the effect is not good when HEVC is adopted to code the video coding.
Because such videos with a large amount of repeated information often have repeated information in spatially neighboring regions and often have consecutive regions encoded in the same pattern in temporally neighboring regions, this means that the spatial and temporal correlation of such videos is strong. However, in HEVC, the conventional block division mode cannot well remove the correlation during encoding, resulting in a lower encoding compression ratio and a poorer encoding quality.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining a deblocking filtering mode, which are used for solving the technical problem of low compression ratio when a video with a large amount of repeated information is coded.
A method for determining a deblocking filtering mode comprises the following steps:
when a block obtained by dividing the maximum coding unit constituting a video frame is subjected to deblocking filtering, judging whether the block boundary of two sub-blocks constituting the block is the boundary of a prediction unit or a transformation unit; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64;
if yes, judging whether the boundary strength of the two sub-blocks is equal to 2;
and if the pixel value is equal to 2, determining to perform deblocking filtering on the block, and determining a deblocking filtering mode of the block according to the pixel values of the pixels in the block.
Optionally, determining whether the boundary strength of the two sub-blocks is equal to 2 includes: judging whether the coding mode of one sub-block is an intra mode and the coding mode of the other sub-block is an intra _ BC mode in the two sub-blocks; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Optionally, determining whether the boundary strength of the two sub-blocks is equal to 2 includes: judging whether the coding modes of the two sub-blocks are both intra modes; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Optionally, if equal to 2, determining to perform deblocking filtering on the block, including:
if the pixel value is equal to 2, judging whether the first formula is established or not according to the pixel values of the pixel points in the block;
and if so, determining to perform deblocking filtering on the block.
Optionally, the first formula is:
|p2,0-2p1,0+p0,0|+|p2,3-2p1,3+p0,3|+|q2,0-2q1,0+q0,0|+|q2,3-2q1,3+q0,3|>β;
wherein, P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, and beta is a constant.
Optionally, determining a deblocking filtering method of the block according to pixel values of pixel points in the block includes:
judging whether the second formula, the third formula and the fourth formula are satisfied;
if the second formula, the third formula and the fourth formula are all established, determining that the deblocking filtering mode of the block is a strong deblocking filtering mode;
and if at least one of the second formula, the third formula and the fourth formula is not satisfied, determining that the deblocking filtering mode of the block is a common deblocking filtering mode.
Alternatively to this, the first and second parts may,
the second formula is: | p2,i-2p1,i+p0,i|+|q2,i-2q1,i+q0,i|<β/8;
The third formula is: | p3,i-p0,i|+|q0,i-q3,i|<β/8;
The fourth formula is: | p0,i-q0,i|<2.5tC;
Wherein P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, β is a constant, tCIs a threshold coefficient.
An apparatus for determining a deblocking filtering mode, comprising:
a first judgment module, configured to judge whether a block boundary of two sub-blocks constituting a block is a boundary of a prediction unit or a transform unit when a deblocking filter is performed on the block divided by a maximum coding unit constituting a video frame; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64;
the second judgment module is used for judging whether the boundary strength of the two sub-blocks is equal to 2 or not if the boundary strength of the two sub-blocks is equal to 2;
and the determining module is used for determining to carry out the deblocking filtering on the block if the pixel value is equal to 2, and determining the deblocking filtering mode of the block according to the pixel values of the pixels in the block.
Optionally, the second determining module is specifically configured to: judging whether the coding mode of one sub-block is an intra mode and the coding mode of the other sub-block is an intra _ BC mode in the two sub-blocks; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Optionally, the second determining module is specifically configured to: judging whether the boundary strength of the two sub-blocks is equal to 2 or not, including: judging whether the coding modes of the two sub-blocks are both intra modes; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Optionally, the determining module is configured to determine to perform deblocking filtering on the block if the number of the blocks is equal to 2, and specifically:
if the pixel value is equal to 2, judging whether the first formula is established or not according to the pixel values of the pixel points in the block;
and if so, determining to perform deblocking filtering on the block.
Optionally, the first formula is:
|p2,0-2p1,0+p0,0|+|p2,3-2p1,3+p0,3|+|q2,0-2q1,0+q0,0|+|q2,3-2q1,3+q0,3|>β;
wherein, P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, and beta is a constant.
Optionally, the determining module is configured to determine a deblocking filtering method of the block according to pixel values of pixel points in the block, and includes:
judging whether the second formula, the third formula and the fourth formula are satisfied;
if the second formula, the third formula and the fourth formula are all established, determining that the deblocking filtering mode of the block is a strong deblocking filtering mode;
and if at least one of the second formula, the third formula and the fourth formula is not satisfied, determining that the deblocking filtering mode of the block is a common deblocking filtering mode.
Alternatively to this, the first and second parts may,
the second formula is: | p2,i-2p1,i+p0,i|+|q2,i-2q1,i+q0,i|<β/8;
The third formula is: | p3,i-p0,i|+|q0,i-q3,i|<β/8;
The fourth formula is: | p0,i-q0,i|<2.5tC;
Wherein P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, β is a constant, tCIs a threshold coefficient.
The embodiment of the invention provides a method for determining a deblocking filtering mode, wherein the size of a maximum coding unit is enlarged from 64 x 64 in the prior art, and the size of the maximum coding unit is larger than 64 x 64, so that when a video frame is divided, the size of the maximum block which can be divided is larger than 64 x 64 in the prior art, when a video with a large amount of repeated information is coded, the video can be divided into larger blocks for coding, thus, the correlation can be effectively removed, the repeated part is put into one block to be coded once, the repeated part is not required to be divided into a plurality of blocks for coding respectively, and the coding quality is improved. Moreover, since the size of the maximum coding unit is increased, the number of blocks that may be divided when dividing a video frame is reduced, and the number of syntax elements used in encoding is correspondingly reduced, for example, when encoding a large block, only one syntax element is used, and when encoding four small blocks, four syntax elements are used (the numbers here are only examples and do not represent actual numbers), and then the number of bits used by the resulting encoded compressed file is significantly reduced, and the volume of the encoded compressed file is smaller, so that the compression ratio is significantly improved.
Drawings
FIG. 1 is a flowchart illustrating a method for determining a deblocking filter according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating pixels included in a block according to an embodiment of the present invention;
fig. 3 is a block diagram of the main structure of the deblocking filter determination apparatus according to the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method for determining a deblocking filtering mode, which comprises the following steps: when a block obtained by dividing the maximum coding unit constituting a video frame is subjected to deblocking filtering, judging whether the block boundary of two sub-blocks constituting the block is the boundary of a prediction unit or a transformation unit; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64; if yes, judging whether the boundary strength of the two sub-blocks is equal to 2; and if the pixel value is equal to 2, determining to perform deblocking filtering on the block, and determining a deblocking filtering mode of the block according to the pixel values of the pixels in the block.
The embodiment of the invention provides a method for determining a deblocking filtering mode, wherein the size of a maximum coding unit is enlarged from 64 x 64 in the prior art, and the size of the maximum coding unit is larger than 64 x 64, so that when a video frame is divided, the size of the maximum block which can be divided is larger than 64 x 64 in the prior art, when a video with a large amount of repeated information is coded, the video can be divided into larger blocks for coding, thus, the correlation can be effectively removed, the repeated part is put into one block to be coded once, the repeated part is not required to be divided into a plurality of blocks for coding respectively, and the coding quality is improved. Moreover, since the size of the maximum coding unit is increased, the number of blocks that may be divided when dividing a video frame is reduced, and the number of syntax elements used in encoding is correspondingly reduced, for example, when encoding a large block, only one syntax element is used, and when encoding four small blocks, four syntax elements are used (the numbers here are only examples and do not represent actual numbers), and then the number of bits used by the resulting encoded compressed file is significantly reduced, and the volume of the encoded compressed file is smaller, so that the compression ratio is significantly improved.
For videos containing a large amount of high-frequency information, a plan for formulating a hevcc (high efficiency video coding screen content coding) standard is proposed by JCT-VC (joint collaborative video coding) organization, so as to improve HEVC to increase the compression ratio of such videos. However, in HEVC scc, the block division still extends to the division in HEVC, which is obviously not favorable for processing such videos.
Therefore, for such video with large amount of high frequency information and/or higher resolution, the embodiment of the present invention proposes to increase the size of the Largest Coding Unit (LCU) from the original 64 × 64 to the first size, where the first size is larger than 64 × 64, for example, the first size may be 128 × 128, or 256 × 256, or larger. Therefore, when the video with a large amount of repeated information and simple texture is coded, the video can be divided into larger blocks for coding, so that the correlation can be effectively removed, repeated parts are put into one block to be coded at one time as much as possible, and the repeated parts do not need to be divided into a plurality of blocks for respective coding, thereby improving the coding quality. Moreover, because the size of the maximum coding unit is increased, when a video frame is divided, the number of LCU blocks that may be divided is reduced for the same video frame, and the number of syntax elements used in encoding is correspondingly reduced, for example, when a large block is encoded, only one syntax element is used, and when four small blocks are encoded, four syntax elements are used (the numbers here are only examples and do not represent actual numbers), so that the number of bits used in the final encoded compressed file is significantly reduced, the size of the encoded compressed file is small, and the compression ratio is significantly improved.
Of course, the technical solution in the embodiment of the present invention may be applied to not only standards such as HEVC and hevcc, but also existing video coding and decoding standards or video coding and decoding standards that will appear in the future, and as long as a video frame targeted by a video coding and decoding standard is a video frame having a large amount of high-frequency information, or a video frame targeted by a video coding standard is a video frame having a resolution greater than the preset resolution, or a video frame targeted by a video coding standard is a video frame having a large amount of high-frequency information and a resolution greater than the preset resolution, the technical solution in the embodiment of the present invention may be applied to the video coding and decoding standards.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship, unless otherwise specified.
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the invention provides a method for determining a deblocking filtering method, and a main flow of the method is described as follows.
Step 101: when a block obtained by dividing the maximum coding unit constituting a video frame is subjected to deblocking filtering, judging whether the block boundary of two sub-blocks constituting the block is the boundary of a prediction unit or a transformation unit; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64.
In an embodiment of the invention, for example, the DBF process is performed by a DBF unit, which is to complete the DBF. In the embodiment of the present invention, the size of the maximum coding unit is increased compared to the prior art, and therefore, the size of the DBF unit should also be increased to adapt to the size of the maximum coding unit in the embodiment of the present invention.
In the framework of block-based video coding, since the entire video frame is divided into blocks of different sizes for prediction, transformation and quantization, discontinuities, known as blockiness, may occur at the block boundaries of the reconstructed image. Blocking artifacts can be removed as much as possible by deblocking filtering (DBF).
In HEVC, DBF is applied to the boundary of a block of size 8 × 8, and when DBF is performed, it is performed for each boundary of 4 pixels in the block of 8 × 8.
The size of the block is 8 × 8, the block may be regarded as being composed of two sub-blocks of 4 × 4, for example, the two sub-blocks may be referred to as a first sub-block and a second sub-block, respectively. Then, when the DBF is performed on the block, it is first determined whether a boundary of the first sub-block and the second sub-block is a boundary of a Prediction Unit (PU) or a boundary of a Transform Unit (TU).
Step 102: and if so, judging whether the boundary strength of the two sub-blocks is equal to 2 or not.
If the Boundary Strength (BS) of the first sub-block and the second sub-block is less than 2, e.g., 0 or 1, then it is determined that DBF is not needed for the block and the process ends.
If the boundary strength of the first sub-block and the second sub-block is equal to 2, proceeding to the subsequent steps.
The relationship between the value of BS and the condition to be satisfied is shown in table 1:
TABLE 1
Taking the block as an example, it can be seen from table 1 that:
if the coding mode of the first sub-block is Intra (a coding mode) and the coding mode of the second sub-block is Intra _ BC (a coding mode), the value of the BS corresponding to the first sub-block and the second sub-block is 2, or if the coding modes of the first sub-block and the second sub-block are both Intra, the value of the BS corresponding to the first sub-block and the second sub-block is also 2;
if at least one of the first sub-block and the second sub-block has a non-zero coding residual error coefficient and the boundary is a transformation boundary, the value of the BS corresponding to the first sub-block and the second sub-block is 1; or, if the absolute difference between the corresponding spatial motion vector components of the first sub-block and the second sub-block is greater than or equal to 1 integer pixel unit, the value of the BS corresponding to the first sub-block and the second sub-block is 1; or, if the motion compensated prediction of the first sub-block and the second sub-block involves different reference pictures or a large number of motion vectors in the first sub-block and the second sub-block are different, the value of BS corresponding to the first sub-block and the second sub-block is 1;
and if the first sub-block and the second sub-block do not belong to the condition and belong to other conditions, the value of the BS corresponding to the first sub-block and the second sub-block is 0.
Of course, the value of BS given in table 1 is 2 at most, and if the value of BS increases, step 102 may also be to determine whether the boundary strength of two sub-blocks is greater than or equal to 2.
From table 1, it can be seen that:
optionally, determining whether the boundary strength of the two sub-blocks is equal to 2 includes: judging whether the coding mode of one sub-block is an intra mode and the coding mode of the other sub-block is an intra _ BC mode in the two sub-blocks; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Or, optionally, determining whether the boundary strength of the two sub-blocks is equal to 2 includes: judging whether the coding modes of the two sub-blocks are both intra modes; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Are judged according to the conditions given in table 1.
Step 103: and if the pixel value is equal to 2, determining to perform deblocking filtering on the block, and determining a deblocking filtering mode of the block according to the pixel values of the pixels in the block.
Optionally, in this embodiment of the present invention, if the number is equal to 2, determining to perform deblocking filtering on the block, where the determining includes:
if the pixel value is equal to 2, judging whether the first formula is established or not according to the pixel values of the pixel points in the block;
and if so, determining to perform deblocking filtering on the block.
Wherein the first formula is:
|p2,0-2p1,0+p0,0|+|p2,3-2p1,3+p0,3|+|q2,0-2q1,0+q0,0|+|q2,3-2q1,3+q0,3|>β(1)
wherein, P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, and beta is a constant. Specifically, β is a constant dependent on QP (quantization parameter), and β can be generated from a table of piecewise linear dependent QP values.
For example, referring to fig. 2, a schematic diagram of the pixels included in the block is shown, wherein p represents the pixels in the first sub-block, q represents the pixels in the second sub-block, a first subscript of p and q represents the column number of the pixels, and a second subscript represents the row number of the pixels, e.g., p2,0It represents the second column, row 0 pixel in the first sub-block.
Optionally, in the embodiment of the present invention, determining a deblocking filtering method of the block according to pixel values of pixel points in the block includes:
judging whether the second formula, the third formula and the fourth formula are satisfied;
if the second formula, the third formula and the fourth formula are all true, determining that the deblocking filter mode of the block is a strong deblocking filter mode (strongfilter);
if at least one of the second formula, the third formula and the fourth formula is not satisfied, determining that the deblocking filtering mode of the block is a normal deblocking filtering mode (normalfiltilter).
Wherein the second formula is:
|p2,i-2p1,i+p0,i|+|q2,i-2q1,i+q0,i|<β/8(2)
the second formula is:
|p3,i-p0,i|+|q0,i-q3,i|<β/8(3)
the fourth formula is:
|p0,i-q0,i|<2.5tC(4)
p, q and β are defined by the same formula (1) as in formulas (2), (3) and (4), e.g. p0,iIt represents the pixel of the 0 th column and the ith row in the first sub-block, i is an integer less than or equal to 3 and greater than or equal to 0. t is tCIs a threshold coefficient, also depends on QP.
The normalfiltilter and strongfilter are described below.
First, normalfilter.
The normalfilter is also divided into two modes, and when it is determined to use the normalfilter for the block, which of the normalfilters is specifically used may be determined by:
judging whether the fifth formula is established;
if the fifth formula is established, continuously judging whether the sixth formula and the seventh formula are established;
and if both the sixth formula and the seventh formula are true, determining to adopt a first filtering mode, and if at least one of the sixth formula and the seventh formula is false, determining to adopt a second filtering mode.
If the fifth formula is not satisfied, the DBF is not performed on the block, and the process ends.
Wherein the fifth formula is:
|0|<10tC(5)
the sixth formula is:
|p2,0-2p1,0+p0,0|+|p2,3-2p1,3+p0,3|<3/16β(6)
the seventh formula is:
|q2,0-2q1,0+q0,0|+|q2,3-2q1,3+q0,3|<3/16β(7)
wherein,0is a constant.
The first filtering mode is that: modifying p0、q0、p1And q is1A value of (d); the second filtering mode is that: modifying p0And q is0The value of (c).
Wherein p can be modified according to an eighth formula0Modifying q according to the ninth formula0Modifying p according to the tenth formula1And, modifying q according to the eleventh formula1。
The eighth formula is:
p'0=p0+Δ0(8)
the ninth formula is:
q'0=q0-Δ0(9)
the tenth formula is:
the eleventh formula is:
wherein, Delta0Is to0Obtained by performing a shearing operation (clip).0A twelfth formula is satisfied, the twelfth formula being:
0=(9(q0-p0)-3(q1-p1)+8>>4(12)
is toObtained by performing a shearing operation (clip).Satisfying a thirteenth formula, which is:
is toObtained by performing a shearing operation (clip).Satisfy a fourteenth formula, the fourteenth formula is:
second, strongfilter.
strongfilter modifies more pixel values on both sides of the block boundary, the modification of three pixels on each side is similar to that in h.264. Will deviate by an amount Δ0s、Δ1sAnd Δ2sRespectively adding to p0、p1And p2In this way, modified p is obtained0、p1And p2。
Wherein, Delta0s、Δ1sAnd Δ2sAre respectively through pairs0s、1sAnd2sobtained by performing clip operation.
0sSatisfies a fifteenth formula, which is:
0s=(p2+2p1-6p0+2q0+q1+4)>>3(15)
1ssatisfy a sixteenth formula, the sixteenth formula is:
1s=(p2-3p1+p0+q0+2)>>2(16)
2ssatisfy seventeenth formula, the seventeenth formula is:
2s=(2p3-5p2+p1+p0+q0+4)>>3(17)
in the embodiment of the present invention, if p and q carry only one subscript, it indicates that the row label is removed, and one subscript represents the number of columns, which also indicates that similar operations are performed on p and q of each row.
Referring to fig. 3, based on the same inventive concept, an embodiment of the present invention provides an apparatus for determining a deblocking filtering method, including a first determining module 301, a second determining module 302, and a determining module 303.
A first determining module 301, configured to determine whether a block boundary of two sub-blocks constituting a block is a boundary of a prediction unit or a transform unit when performing deblocking filtering on the block divided by a maximum coding unit constituting a video frame; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64;
a second determining module 302, configured to determine whether the boundary strength of the two sub-blocks is equal to 2 if yes;
a determining module 303, configured to determine to perform deblocking filtering on the block if the number of pixels in the block is equal to 2, and determine a deblocking filtering mode of the block according to pixel values of pixels in the block.
Optionally, in this embodiment of the present invention, the second determining module 302 is specifically configured to: judging whether the coding mode of one sub-block is an intra mode and the coding mode of the other sub-block is an intra _ BC mode in the two sub-blocks; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Optionally, in this embodiment of the present invention, the second determining module 302 is specifically configured to: judging whether the boundary strength of the two sub-blocks is equal to 2 or not, including: judging whether the coding modes of the two sub-blocks are both intra modes; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Optionally, in this embodiment of the present invention, the determining module 303 is configured to determine to perform deblocking filtering on the block if the number of the blocks is equal to 2, specifically:
if the pixel value is equal to 2, judging whether the first formula is established or not according to the pixel values of the pixel points in the block;
and if so, determining to perform deblocking filtering on the block.
Optionally, in the embodiment of the present invention, the first formula is the formula (1) described above.
Optionally, in this embodiment of the present invention, the determining module 303 is configured to determine a deblocking filtering method of the block according to pixel values of pixel points in the block, where the method includes:
judging whether the second formula, the third formula and the fourth formula are satisfied;
if the second formula, the third formula and the fourth formula are all established, determining that the deblocking filtering mode of the block is a strong deblocking filtering mode;
and if at least one of the second formula, the third formula and the fourth formula is not satisfied, determining that the deblocking filtering mode of the block is a common deblocking filtering mode.
Optionally, in the embodiment of the present invention, the second formula is the formula (2) described above, the third formula is the formula (3) described above, and the fourth formula is the formula (4) described above.
The embodiment of the invention provides a method for determining a deblocking filtering mode, which comprises the following steps: when a block obtained by dividing the maximum coding unit constituting a video frame is subjected to deblocking filtering, judging whether the block boundary of two sub-blocks constituting the block is the boundary of a prediction unit or a transformation unit; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64; if yes, judging whether the boundary strength of the two sub-blocks is equal to 2; and if the pixel value is equal to 2, determining to perform deblocking filtering on the block, and determining a deblocking filtering mode of the block according to the pixel values of the pixels in the block.
The embodiment of the invention provides a method for determining a deblocking filtering mode, wherein the size of a maximum coding unit is enlarged from 64 x 64 in the prior art, and the size of the maximum coding unit is larger than 64 x 64, so that when a video frame is divided, the size of the maximum block which can be divided is larger than 64 x 64 in the prior art, when a video with a large amount of repeated information is coded, the video can be divided into larger blocks for coding, thus, the correlation can be effectively removed, the repeated part is put into one block to be coded once, the repeated part is not required to be divided into a plurality of blocks for coding respectively, and the coding quality is improved. Moreover, since the size of the maximum coding unit is increased, the number of blocks that may be divided when dividing a video frame is reduced, and the number of syntax elements used in encoding is correspondingly reduced, for example, when encoding a large block, only one syntax element is used, and when encoding four small blocks, four syntax elements are used (the numbers here are only examples and do not represent actual numbers), and then the number of bits used by the resulting encoded compressed file is significantly reduced, and the volume of the encoded compressed file is smaller, so that the compression ratio is significantly improved.
In the embodiment of the invention, no matter in a luminance unit or a chrominance unit, only the boundary of BS-2 is subjected to deblocking filtering. Therefore, the number of boundaries needing deblocking filtering is reduced, the complexity is reduced, and meanwhile, distortion caused by forced filtering without filtering is avoided.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Specifically, the computer program instructions corresponding to the determination method of the deblocking filter mode in the embodiment of the present application may be stored on a storage medium such as an optical disc, a hard disc, or a usb disk, and when the computer program instructions corresponding to the determination method of the deblocking filter mode in the storage medium are read or executed by an electronic device, the method includes the following steps:
when a block obtained by dividing the maximum coding unit constituting a video frame is subjected to deblocking filtering, judging whether the block boundary of two sub-blocks constituting the block is the boundary of a prediction unit or a transformation unit; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64;
if yes, judging whether the boundary strength of the two sub-blocks is equal to 2;
and if the pixel value is equal to 2, determining to perform deblocking filtering on the block, and determining a deblocking filtering mode of the block according to the pixel values of the pixels in the block.
Optionally, the step of storing in the storage medium: judging whether the boundary strength of the two sub-blocks is equal to 2, wherein the corresponding computer instructions specifically comprise, in the process of being specifically executed:
judging whether the coding mode of one sub-block is an intra mode and the coding mode of the other sub-block is an intra _ BC mode in the two sub-blocks; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Optionally, the step of storing in the storage medium: judging whether the boundary strength of the two sub-blocks is equal to 2, wherein the corresponding computer instructions specifically comprise, in the process of being specifically executed:
judging whether the coding modes of the two sub-blocks are both intra modes; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
Optionally, the step of storing in the storage medium: if the number is equal to 2, determining to perform deblocking filtering on the block, where the corresponding computer instructions, in a specific executed process, specifically include:
if the pixel value is equal to 2, judging whether the first formula is established or not according to the pixel values of the pixel points in the block;
and if so, determining to perform deblocking filtering on the block.
Optionally, the first formula is:
|p2,0-2p1,0+p0,0|+|p2,3-2p1,3+p0,3|+|q2,0-2q1,0+q0,0|+|q2,3-2q1,3+q0,3|>β;
wherein, P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, and beta is a constant.
Optionally, the step of storing in the storage medium: determining a deblocking filtering mode of the block according to pixel values of pixel points in the block, wherein a corresponding computer instruction specifically comprises, in a specific executed process:
judging whether the second formula, the third formula and the fourth formula are satisfied;
if the second formula, the third formula and the fourth formula are all established, determining that the deblocking filtering mode of the block is a strong deblocking filtering mode;
and if at least one of the second formula, the third formula and the fourth formula is not satisfied, determining that the deblocking filtering mode of the block is a common deblocking filtering mode.
Optionally, the second formula is: | p2,i-2p1,i+p0,i|+|q2,i-2q1,i+q0,i|<β/8;
The third formula is: | p3,i-p0,i|+|q0,i-q3,i|<β/8;
The fourth formula is: | p0,i-q0,i|<2.5tC;
Wherein P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, β is a constant, tCIs a threshold coefficient.
The above embodiments are only used to describe the technical solutions of the present application in detail, but the above embodiments are only used to help understanding the method and the core idea of the present invention, and should not be construed as limiting the present invention. Those skilled in the art should also appreciate that they can easily conceive of various changes and substitutions within the technical scope of the present disclosure.
Claims (14)
1. A method for determining a deblocking filtering mode comprises the following steps:
when a block obtained by dividing the maximum coding unit constituting a video frame is subjected to deblocking filtering, judging whether the block boundary of two sub-blocks constituting the block is the boundary of a prediction unit or a transformation unit; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64;
if yes, judging whether the boundary strength of the two sub-blocks is equal to 2;
and if the pixel value is equal to 2, determining to perform deblocking filtering on the block, and determining a deblocking filtering mode of the block according to the pixel values of the pixels in the block.
2. The method of claim 1, wherein determining whether the boundary strength of the two sub-blocks is equal to 2 comprises: judging whether the coding mode of one sub-block is an intra mode and the coding mode of the other sub-block is an intra _ BC mode in the two sub-blocks; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
3. The method of claim 1, wherein determining whether the boundary strength of the two sub-blocks is equal to 2 comprises: judging whether the coding modes of the two sub-blocks are both intra modes; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
4. The method of any of claims 1-3, wherein determining to deblock filter the block if equal to 2 comprises:
if the pixel value is equal to 2, judging whether the first formula is established or not according to the pixel values of the pixel points in the block;
and if so, determining to perform deblocking filtering on the block.
5. The method of claim 4, wherein the first formula is:
|p2,0-2p1,0+p0,0|+|p2,3-2p1,3+p0,3|+|q2,0-2q1,0+q0,0|+|q2,3-2q1,3+q0,3|>β;
wherein, P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, and beta is a constant.
6. The method of claim 5, wherein determining the manner of deblocking filtering of the block based on pixel values of pixels in the block comprises:
judging whether the second formula, the third formula and the fourth formula are satisfied;
if the second formula, the third formula and the fourth formula are all established, determining that the deblocking filtering mode of the block is a strong deblocking filtering mode;
and if at least one of the second formula, the third formula and the fourth formula is not satisfied, determining that the deblocking filtering mode of the block is a common deblocking filtering mode.
7. The method of claim 6,
the second formula is: | p2,i-2p1,i+p0,i|+|q2,i-2q1,i+q0,i|<β/8;
The third formula is: | p3,i-p0,i|+|q0,i-q3,i|<β/8;
The fourth formula is: | p0,i-q0,i|<2.5tC;
Wherein P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, β is a constant, tCIs a threshold coefficient.
8. An apparatus for determining a deblocking filtering mode, comprising:
a first judgment module, configured to judge whether a block boundary of two sub-blocks constituting a block is a boundary of a prediction unit or a transform unit when a deblocking filter is performed on the block divided by a maximum coding unit constituting a video frame; wherein the size of the largest coding unit is a first size, and the first size is larger than 64 x 64;
the second judgment module is used for judging whether the boundary strength of the two sub-blocks is equal to 2 or not if the boundary strength of the two sub-blocks is equal to 2;
and the determining module is used for determining to carry out the deblocking filtering on the block if the pixel value is equal to 2, and determining the deblocking filtering mode of the block according to the pixel values of the pixels in the block.
9. The apparatus of claim 8, wherein the second determination module is specifically configured to: judging whether the coding mode of one sub-block is an intra mode and the coding mode of the other sub-block is an intra _ BC mode in the two sub-blocks; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
10. The apparatus of claim 8, wherein the second determination module is specifically configured to: judging whether the boundary strength of the two sub-blocks is equal to 2 or not, including: judging whether the coding modes of the two sub-blocks are both intra modes; and if so, determining that the boundary strength of the two sub-blocks is equal to 2.
11. The apparatus according to any of claims 8-10, wherein the determining module is configured to determine to perform deblocking filtering on the block if the number equals 2, specifically:
if the pixel value is equal to 2, judging whether the first formula is established or not according to the pixel values of the pixel points in the block;
and if so, determining to perform deblocking filtering on the block.
12. The apparatus of claim 11, wherein the first formula is:
|p2,0-2p1,0+p0,0|+|p2,3-2p1,3+p0,3|+|q2,0-2q1,0+q0,0|+|q2,3-2q1,3+q0,3|>β;
wherein, P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, and beta is a constant.
13. The apparatus of claim 12, wherein the determining module is configured to determine the deblocking filtering of the block according to pixel values of pixels in the block, comprising:
judging whether the second formula, the third formula and the fourth formula are satisfied;
if the second formula, the third formula and the fourth formula are all established, determining that the deblocking filtering mode of the block is a strong deblocking filtering mode;
and if at least one of the second formula, the third formula and the fourth formula is not satisfied, determining that the deblocking filtering mode of the block is a common deblocking filtering mode.
14. The apparatus of claim 13,
the second formula is: | p2,i-2p1,i+p0,i|+|q2,i-2q1,i+q0,i|<β/8;
The third formula is: | p3,i-p0,i|+|q0,i-q3,i|<β/8;
The fourth formula is: | p0,i-q0,i|<2.5tC;
Wherein P is the pixel point in one of the sub-blocks, q is the pixel point in the other sub-block, β is a constant, tCIs a threshold coefficient.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410677989.XA CN105681814B (en) | 2014-11-21 | 2014-11-21 | A kind of determination method and device of block-eliminating effect filtering mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410677989.XA CN105681814B (en) | 2014-11-21 | 2014-11-21 | A kind of determination method and device of block-eliminating effect filtering mode |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105681814A true CN105681814A (en) | 2016-06-15 |
CN105681814B CN105681814B (en) | 2019-03-29 |
Family
ID=56957635
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410677989.XA Active CN105681814B (en) | 2014-11-21 | 2014-11-21 | A kind of determination method and device of block-eliminating effect filtering mode |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105681814B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106604039A (en) * | 2016-12-28 | 2017-04-26 | 北京奇艺世纪科技有限公司 | Filter method and device |
WO2020030192A1 (en) * | 2018-08-10 | 2020-02-13 | Huawei Technologies Co., Ltd. | Apparatus and method for performing deblocking |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1535019A (en) * | 2004-01-14 | 2004-10-06 | 华中科技大学 | Loop filtering method and loop filter |
EP1777967A1 (en) * | 2005-10-04 | 2007-04-25 | Samsung Electronics Co., Ltd. | Filtering apparatus, method, and medium for multi-format codec |
CN1988663A (en) * | 2005-12-21 | 2007-06-27 | 株式会社东芝 | Image processing apparatus, control method, and program |
CN104025601A (en) * | 2011-12-30 | 2014-09-03 | 数码士有限公司 | Method And Device For Encoding Three-Dimensional Image, And Decoding Method And Device |
-
2014
- 2014-11-21 CN CN201410677989.XA patent/CN105681814B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1535019A (en) * | 2004-01-14 | 2004-10-06 | 华中科技大学 | Loop filtering method and loop filter |
EP1777967A1 (en) * | 2005-10-04 | 2007-04-25 | Samsung Electronics Co., Ltd. | Filtering apparatus, method, and medium for multi-format codec |
CN1988663A (en) * | 2005-12-21 | 2007-06-27 | 株式会社东芝 | Image processing apparatus, control method, and program |
CN104025601A (en) * | 2011-12-30 | 2014-09-03 | 数码士有限公司 | Method And Device For Encoding Three-Dimensional Image, And Decoding Method And Device |
Non-Patent Citations (3)
Title |
---|
ANDREY NORKIN ET AL: "HEVC Deblocking Filter", 《IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY》 * |
孟胜彬: "可伸缩视频编码SVC与高性能视频编码HEVC", 《2012国际传输与覆盖研讨会》 * |
郭颖: "高效视频编码的环路去块效应滤波技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106604039A (en) * | 2016-12-28 | 2017-04-26 | 北京奇艺世纪科技有限公司 | Filter method and device |
CN106604039B (en) * | 2016-12-28 | 2020-07-31 | 北京奇艺世纪科技有限公司 | Filtering method and device |
WO2020030192A1 (en) * | 2018-08-10 | 2020-02-13 | Huawei Technologies Co., Ltd. | Apparatus and method for performing deblocking |
US11140389B2 (en) | 2018-08-10 | 2021-10-05 | Huawei Technologies Co., Ltd. | Apparatus and method for performing deblocking |
US12015771B2 (en) | 2018-08-10 | 2024-06-18 | Huawei Technologies Co., Ltd. | Apparatus and method for performing deblocking |
Also Published As
Publication number | Publication date |
---|---|
CN105681814B (en) | 2019-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11627316B2 (en) | Encoding and decoding apparatuses including CNN-based in-loop filter | |
US11838509B2 (en) | Video coding method and apparatus | |
US11272175B2 (en) | Deringing filter for video coding | |
CN104255033B (en) | Reduced look-up-table for LM mode computations | |
RU2653244C2 (en) | Deblock filtering control | |
CN107071411B (en) | Intra-frame prediction method executed by decoding device and encoding device | |
CN105530518B (en) | A kind of Video coding, coding/decoding method and device | |
US11122263B2 (en) | Deringing filter for video coding | |
CN116233423A (en) | Loop filtering method based on self-adaptive pixel classification reference | |
EP3068134B1 (en) | Method and device for image compression | |
EP3089453A1 (en) | Image coding and decoding methods and devices | |
JP6784836B2 (en) | Equipment and methods for video coding | |
WO2012138568A1 (en) | System and method for encoding and decoding anti-aliased video data | |
CN104581177A (en) | Image compression method and device combining block matching with string matching | |
CN117834922A (en) | Method for decoding or encoding video and method for transmitting data | |
CN105635732A (en) | Adaptive sampling point compensation coding method and device, and method and device for decoding video code stream | |
US20220060754A1 (en) | Apparatus and method for de-blocking filtering | |
US20240040143A1 (en) | Method and apparatus for decoding image using interpicture prediction | |
CN105681814A (en) | Deblocking filtering manner determination method and apparatus | |
WO2021206699A1 (en) | Bicriteria block splitting heuristic for lossy compression | |
KR102585236B1 (en) | Video encoding and decoding methods and devices | |
CN115720269A (en) | Video encoding method and video decoding method | |
EP4413729A1 (en) | Combining deblock filtering and another filtering for video encoding and/or decoding | |
JP2022108634A (en) | Encoder and program | |
KR20170032598A (en) | Memory management method and apparatus for screen contents coding |
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 |