WO2021203381A1 - Video encoding and decoding method and apparatus, and computer-readable storage medium - Google Patents

Video encoding and decoding method and apparatus, and computer-readable storage medium Download PDF

Info

Publication number
WO2021203381A1
WO2021203381A1 PCT/CN2020/084047 CN2020084047W WO2021203381A1 WO 2021203381 A1 WO2021203381 A1 WO 2021203381A1 CN 2020084047 W CN2020084047 W CN 2020084047W WO 2021203381 A1 WO2021203381 A1 WO 2021203381A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
chrominance component
filtering
boundary
chrominance
Prior art date
Application number
PCT/CN2020/084047
Other languages
French (fr)
Chinese (zh)
Inventor
马思伟
孟学苇
王苫社
郑萧桢
Original Assignee
北京大学
深圳市大疆创新科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 北京大学, 深圳市大疆创新科技有限公司 filed Critical 北京大学
Priority to CN202080004291.5A priority Critical patent/CN112514382A/en
Priority to PCT/CN2020/084047 priority patent/WO2021203381A1/en
Publication of WO2021203381A1 publication Critical patent/WO2021203381A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Definitions

  • the present disclosure relates to the field of image processing, and in particular, to a video encoding and decoding method, device, and computer-readable storage medium.
  • the encoding end predicts the current image block, and sequentially transforms, quantizes and encodes the residuals between the current image block and the predicted image block into a bit stream, and sends it to the decoding end.
  • the encoding end also performs inverse quantization, inverse transformation, and obtains the reconstruction residual.
  • the reconstructed image block is obtained from the reconstruction residual and the predicted image block, and the reconstructed image block is loop-filtered.
  • the filtered reconstructed image block is used as the reference image for inter-frame prediction. Piece.
  • the decoding end decodes the code stream, performs inverse quantization and inverse transformation to obtain the residual, predicts the current image block to generate a predicted image block, obtains a reconstructed image block from the residual and the predicted image block, and performs loop filtering on the reconstructed image block ,
  • the reconstructed image block after filtering is used as a reference image block for inter-frame prediction, and is output to an external device at the decoding end.
  • One aspect of the present disclosure provides a video encoding and decoding method, including:
  • the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  • Another aspect of the present disclosure also provides a video encoding and decoding device, including:
  • Memory used to store executable instructions
  • the processor is configured to execute the executable instructions stored in the memory to perform the following operations:
  • the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  • a computer-readable storage medium which stores executable instructions, which, when executed by one or more processors, can cause the one or more processing
  • the device executes the above-mentioned video encoding and decoding method.
  • a video encoding and decoding method including:
  • a video encoding and decoding device including:
  • Memory used to store executable instructions
  • the processor is configured to execute the executable instructions stored in the memory to perform the following operations:
  • the luminance component corresponding to the chrominance component uses the luminance component corresponding to the chrominance component to perform cross-component filtering on the chrominance component after filtering, wherein the offset value of the virtual filtering boundary of the chrominance component is equal to the offset of the virtual filtering boundary of the luminance component value.
  • a computer-readable storage medium which stores executable instructions, which, when executed by one or more processors, can cause the one or more processing
  • the device executes the above-mentioned video encoding and decoding method.
  • the chroma component and its corresponding brightness component are on different sides of the virtual filter boundary, it is forbidden to use the brightness component corresponding to the chroma component to perform cross-component filtering on the filtered chroma component, or to use the brightness corresponding to the chroma component
  • the component performs cross-component filtering on the filtered chroma component, where the offset value of the virtual filter boundary of the chroma component is equal to the offset value of the virtual filter boundary of the luminance component.
  • the present disclosure can reduce the cross-component adaptive loop filtering process. Time, improve filtering efficiency and save cache space.
  • Fig. 1 is a schematic diagram of a video encoding process according to an embodiment of the disclosure.
  • Fig. 2 is a schematic diagram of a video decoding process according to an embodiment of the disclosure.
  • Figure 3 shows the offset value of the virtual filter boundary of the luminance component.
  • Figure 4 shows the offset value of the virtual filter boundary of the chrominance component when the image sampling format is 420.
  • Figure 5 shows the offset value of the virtual filter boundary of the chrominance component when the image sampling format is 444 and 422.
  • Figure 6 shows image blocks with image sampling formats of 444, 422, and 420.
  • Figure 7a shows the chrominance component filter of adaptive loop filtering
  • Figure 7b shows the luminance component filter of adaptive loop filtering.
  • Figure 8a shows the processing of the adaptive loop filter at the virtual filter boundary of the luminance component
  • Figure 8b shows the processing of the adaptive loop filter at the virtual filter boundary of the chrominance component.
  • FIG. 9 is a schematic diagram of cross-component adaptive loop filtering according to an embodiment of the disclosure.
  • Fig. 10a is the filter shape of the cross-component adaptive loop filtering
  • Fig. 10b is the position of the filter of the cross-component adaptive loop filtering in the image block.
  • Figure 11 shows when the image sampling format is 420, the sampling ratio of the luminance component and chrominance component in the column direction and the offset value ratio of the virtual filtering boundary of the luminance component and chrominance component in the column direction.
  • Figure 12 shows the sampling ratio of the luminance component and chrominance component in the column direction and the offset value ratio of the virtual filter boundary of the luminance component and chrominance component in the column direction when the image sampling format is 444 and 422.
  • FIG. 13 is a flowchart of a video encoding and decoding method according to an embodiment of the disclosure.
  • Figure 14 shows the positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
  • Figure 15 shows another positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
  • Figure 16 shows another positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
  • Figure 17 shows another positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
  • Figure 18 shows another positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
  • FIG. 19 shows the positional relationship between chrominance components and their corresponding luminance components in a video encoding and decoding method according to another embodiment of the present disclosure.
  • Figure 20 shows the positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the row direction.
  • FIG. 21 is a schematic diagram of a video encoding and decoding device according to an embodiment of the disclosure.
  • FIG. 22 is a flowchart of a video encoding and decoding method according to another embodiment of the present disclosure.
  • FIG. 23 shows the positional relationship between the chrominance components and their corresponding luminance components under the virtual filter boundary in the column direction in the video encoding and decoding method of another embodiment of the present disclosure.
  • FIG. 24 shows the positional relationship between chrominance components and their corresponding luminance components under the virtual filter boundary in the row direction in the video coding and decoding method of another embodiment of the present disclosure.
  • FIG. 25 is a schematic diagram of a video encoding and decoding device according to another embodiment of the present disclosure.
  • the embodiments of this application are applicable to, but not limited to, the international video coding standards H.264/MPEG-AVC, H.265/MEPG-HEVC, the domestic audio and video coding standards AVS2, and the H.266/VVC international standards under development and AVS3 domestic Standards, and other video codec standards that will evolve in the future.
  • a video image generally includes an image frame of three components.
  • the three components include: a luma (Luma) component Y and two chroma (Chroma) components Cb/Cr or Cg/Co.
  • the video encoding process is shown in Figure 1.
  • the original image frame of each component is divided into image blocks, and the current image block is used as the image block to be encoded.
  • the encoding end performs intra prediction (Intra Coding) or inter prediction (Inter Coding) on the current image block based on the reference image block to generate a predicted image block.
  • Transform Transform the residual between the current image block and the predicted image block
  • quantize quantize the transform coefficients
  • quantized coefficients are entropy coded (Entropy Coding) to generate encoded codes Stream
  • the code stream is sent to the decoding end.
  • the encoding end also performs an inverse quantization operation on the quantized coefficients to obtain transform coefficients, and the inverse quantization operation is the inverse operation of the quantization operation.
  • a reconstructed image block (also called a reconstructed image block) is obtained from the reconstruction residual and the predicted image block.
  • the reconstructed image block is used as a reference image block for intra-frame prediction to perform intra-frame prediction on other image blocks.
  • the reconstructed image block also passes through a filter, and the filter performs loop filtering on the reconstructed image block to obtain a filtered reconstructed image block.
  • the filtered reconstructed image block is used as a reference image block for inter-frame prediction to perform inter-frame prediction on other image frames.
  • the prediction mode, intra-frame prediction information, motion compensation information, filter coefficients and other information in the video encoding process are also encoded into the code stream by entropy encoding and sent to the decoding end.
  • the video decoding process is shown in Figure 2.
  • the video decoding process can basically be regarded as the inverse process of the video encoding process.
  • the decoding end performs Entropy Decoding on the code stream to obtain information such as quantization coefficients, prediction modes, intra-frame prediction information, motion compensation information, and filter coefficients.
  • the inverse quantization operation is performed on the quantized coefficient to obtain the transform coefficient, and the inverse quantization operation is the inverse operation of the quantization operation.
  • the decoding end performs intra-frame prediction or inter-frame prediction on the current image block based on the reference image block to generate a predicted image block.
  • the decoding end then obtains the reconstructed image block from the residual and the predicted image block.
  • the reconstructed image block is used as a reference image block for intra-frame prediction to perform intra-frame prediction on other image blocks.
  • the reconstructed image block also passes through a filter, and the filter performs loop filtering on the reconstructed image block to obtain a filtered reconstructed image block.
  • the filtered reconstructed image block is used as a reference image block for inter-frame prediction to perform inter-frame prediction on other image frames.
  • the reference image block can also be composed of the decoded image frame and output to the external device of the decoding end, and the external device can be, for example, a display of the decoding end.
  • loop filtering includes: deblocking filter (DF, Deblocking Filter), adaptive sample compensation filter (SAO, Sample Adaptive Offset) and adaptive loop filter (ALF, Adaptive Loop Filter) ), cross-component adaptive loop filtering (CCALF, Cross-Component ALF).
  • deblocking filtering is mainly used to eliminate blocking effects between images caused by encoding by different processors; SAO, ALF, and CCALF are mainly used to compensate for the distortion of original pixels and reconstructed pixels due to encoding.
  • the difference in encoding parameters between adjacent image blocks may cause blocking artifacts in the encoded reconstructed image.
  • the reconstructed image block is first subjected to deblocking filtering.
  • the deblocking filter corrects the pixel value of the reconstructed image block, especially the pixel value near the boundary of the reconstructed image block, so as to achieve the purpose of eliminating the block effect.
  • the pixel values on both sides of the boundary need to be used, so there is a dependency between two adjacent image blocks on both sides of the boundary.
  • a virtual filter boundary is set in the image block.
  • the virtual filter boundary has an offset value in the first direction relative to the boundary between the coded image blocks.
  • the offset value can also be called offset, misalignment, misalignment value, distance, distance value, etc., refers to the virtual filter boundary
  • the offset value compared to the boundary between coded image blocks. For ease of presentation, all are referred to as offset values below.
  • the offset value represents the number of pixels between the virtual filter boundary and the boundary of the coded image block.
  • the virtual filter boundary may also be referred to as a virtual boundary.
  • the first direction refers to the column direction of the coded image block.
  • the position 4 lines above the CTU boundary of the luminance component is used as the virtual filter boundary, and the position 2 lines above the CTU boundary of the chrominance component is used as the virtual filter boundary, so that the pixels on both sides of a virtual filter boundary are independent of each other. , Can achieve row-level parallelism.
  • FIG. 3 is a schematic diagram of the virtual filtering boundary of the luminance component.
  • the pixels above the virtual filter boundary are represented by open circles, and the pixels between the virtual filter boundary and the boundary between the coded image blocks are represented by gray circles.
  • the offset value of the virtual filter boundary of the luminance component is 4 rows, that is, the distance between the virtual filter boundary of the luminance component and the boundary between the coded image block of the luminance component is 4 rows of pixels.
  • the offset value of the virtual filtering boundary is 2, that is, the distance between the virtual filtering boundary of the chrominance component and the boundary between the coded image block of the chrominance component is 2 rows of pixels.
  • 4 is a schematic diagram of the virtual filter boundary of the chrominance component of the 420 image sampling format, and FIG.
  • FIG. 5 is a schematic diagram of the virtual filter boundary of the chrominance component of the 422 image sampling format.
  • the pixels on both sides of the virtual filter boundary are independent of each other, thereby realizing the parallel operation of the image block at the row level.
  • the foregoing is only an exemplary description, and the first direction may also be other directions, such as the row direction of the coded image block.
  • the 0:0 format has only luminance components and no chrominance components.
  • YUV 4:4:4, YUV 4:2:2, YUV 4:2:0 format is shown in 6, solid dots represent brightness points, hollow circles represent chromaticity points, and the sampling ratio of three components in YUV4:4:4 same.
  • YUV4: 2:2 means that the Y component and the UV component are sampled at a ratio of 2:1. There are 10 Y pixels horizontally, only 5 UV pixels, 10 Y pixels vertically, and 10 UV pixels.
  • the solid dots represent the luminance component pixels
  • the open circles represent the chrominance component pixels.
  • the sampling ratio of the luminance component and the chrominance component in the 444 format is the same.
  • the luminance component and the chrominance component are sampled at a ratio of 2:1 in the row direction, and sampled at a ratio of 1:1 in the column direction.
  • the luminance component and chrominance component of the 420 format are sampled at a ratio of 2:1 in both the row direction and the column direction.
  • the reconstructed image block after deblocking filtering is subjected to adaptive sample compensation filtering.
  • the adaptive sample compensation filter classifies the pixels of the reconstructed image block and adds the same compensation value to each type of pixel, so that the reconstructed image block is closer to the current image block, thereby suppressing the ringing effect.
  • ALF adaptive loop filtering
  • Wiener filter a Wiener filter, which is used to minimize the mean square error between the current image block and the reconstructed image block.
  • the surrounding pixels of the current pixel are multiplied by the corresponding filter coefficients and then summed to obtain the filter value of the current pixel.
  • the filter is a 7 ⁇ 7 diamond, that is, the center pixel is filtered using 7 surrounding pixels.
  • the pixel corresponding to C12 is the pixel to be filtered. Multiply the pixel at the position of C0-C12 by the corresponding filter coefficient, and then add the products to obtain the ALF filtering result of the pixel at the position of C12.
  • the filter coefficients can also be referred to as filter weights.
  • the filter is a 5 ⁇ 5 diamond, that is, the center pixel is filtered using 5 surrounding pixels.
  • the pixel corresponding to C6 is the pixel to be filtered, and the C0-C6 pixels are multiplied by the respective corresponding filter coefficients, and the products are added together to obtain the ALF filtering result of the C6 pixel.
  • the points used in this process are all points in the reconstructed frame obtained before ALF.
  • ALF can classify the pixels of the reconstructed image block, and different types of pixels use different filter coefficients.
  • the luminance component can be classified according to the Laplacian direction, and the chrominance component is not classified.
  • the pixels of the brightness component can be divided into 25 categories, which corresponds to 25 sets of filter coefficients. For pixels belonging to the same category, the filter coefficients corresponding to the category are used for filtering.
  • each 4x4 block in the reconstructed image block is classified according to the Laplacian direction
  • C represents the category of the 4x4 block
  • D represents the direction classification result
  • i,j represent the coordinate position of the 4x4 block in the entire image block;
  • R(k,l) represents the pixel value located at the (k,l) position in the 4x4 block;
  • V k,l represents the 4x4 block located at (i, j) The Laplacian gradient of the pixel of the coordinate in the column direction;
  • H k,l represents the Laplacian gradient of the pixel located at the (i,j) coordinate in the 4x4 block in the row direction;
  • D1 k,l represents the Laplacian gradient of the pixel located in the 4x4 block (i, j) coordinates of pixels in the 135 degree Laplacian gradient;
  • D2 k, l represents the 4x4 block at the (i, j) coordinates of the pixel at 45 degrees Laplacian gradient;
  • g v represents the 4x4 block in the Laplacian gradient Laplacian gradient in the column direction;
  • g h represents the Laplacian gradient of
  • t1 and t2 are preset thresholds.
  • the pixels of the brightness component can be divided into 25 categories, which corresponds to 25 sets of filter coefficients.
  • ALF can be divided into linear adaptive loop filtering and nonlinear adaptive loop filtering.
  • Linear ALF can be expressed by the following formula:
  • I(x+i, y+j) is the pixel value before ALF filtering, that is, the input of the ALF filter;
  • O(x, y) represents the ALF filtered at the position of the reconstructed image block (x, y)
  • the pixel value is the output of the ALF filter;
  • w(i,j) represents the ALF filter coefficient;
  • (i,j) represents the relative position of the pixel in the filter from the pixel to be filtered.
  • linear ALF In order to ensure that all ALF filter coefficients are integers, linear ALF also amplifies all ALF coefficients, that is, amplifies the original ALF filter coefficients by 128 times and then converts them to integers.
  • Linear ALF can also be expressed by the following formula:
  • O(x,y) I(x,y)+ ⁇ (i,j) ⁇ (0,0) w(i,j).(I(x+i,y+j)-I(x,y )).
  • nonlinear ALF introduces a clip operation
  • each set of filter coefficients corresponds to a clip parameter
  • each clip parameter corresponds to an index
  • the index is also encoded into the code stream by entropy coding , And send to the decoder.
  • Non-linear ALF is expressed by the following formula:
  • K (d, b) min (b, max (-b, d) represents the operation of the clip
  • k (i, j) represents the parameters of the clip
  • each ALF filter coefficient corresponds to a parameter of the clip
  • the parameter Choose from the following values:
  • For the luminance component select one from ⁇ 1024, 181, 32, 6 ⁇ ;
  • chrominance components For chrominance components, select one from ⁇ 1024, 161, 25, 4 ⁇ ;
  • Each parameter value may correspond to an index value.
  • the index value of clip parameter 1024 is 0, and the index value of clip parameter 181 is 1.
  • the index value is also encoded into the code stream by entropy coding and sent to the decoding end.
  • ALF cannot filter across virtual filter boundaries.
  • the luminance component as shown in FIG. 8a
  • the pixels on the other side and the pixels at their geometrically symmetric positions are not used to filter C12.
  • the pixel at C0 is located on the other side of the virtual filter boundary, the upper and lower pixels at C0 are not used, and the two pixels at C2 are not used.
  • the filter coefficient is updated to c2+c0, where c2 is the original filter coefficient of the pixel at C2, and c0 is the original filter coefficient of the pixel at C0.
  • c0-c12 represent filter coefficients or filter weights.
  • the chrominance component is processed in a similar way to the luminance component.
  • the pixel C6 to be filtered when the surrounding pixels are on the other side of the virtual filtering boundary, the pixels on the other side and their geometrically symmetrical pixel pairs are not used.
  • C6 performs filtering. For example, if the pixel at C0 is on the other side of the virtual filter boundary, the upper and lower pixels at C0 are not used, and the filter coefficients of the two pixels at C2 are updated to c2+c0, where c2 is the C2 position The original filter coefficient of the pixel, c0 is the original filter coefficient of the pixel at C0.
  • the filter coefficients of the two pixels at C5 are updated to c5+c1+c3
  • the filter coefficients of the two pixels at C6 are updated to c6+2*c2+2*c0.
  • CCALF uses the luminance component to filter the chrominance component to improve the quality of the chrominance component.
  • CCALF uses the luminance component before ALF (that is, the luminance component after SAO) to filter the chrominance component Cr/Cb after ALF, and the filter value of CCALF is used as the chrominance component Cr/Cb.
  • the shape of the CCALF filter is a 3x4 rhombus
  • the chrominance component pixel corresponding to 2 is the pixel to be filtered.
  • Each frame of image can include multiple sets of CCALF filter coefficients, the chrominance components Cb and Cr have their own CCALF filter coefficients, the number of CCALF coefficient sets corresponds to an index, and the index used by each reconstructed image block is also encoded into the code stream by entropy coding and sent To the decoding end.
  • the sampling ratio of the luminance component and the chrominance component in the column direction is 2:1, as shown in Figure 11, the virtual filter boundary of the luminance component and the chrominance component in the column direction
  • the offset value ratio is 4:2, that is, the sampling ratio is the same as the offset value ratio.
  • the corresponding CCALF luminance component pixels are also located on the upper side of the virtual filter boundary, that is, color
  • the degree component and its corresponding luminance component are all located on the same side of the virtual filtering boundary. As shown in Fig.
  • the luminance component pixels of CCALF corresponding to the chrominance component pixels A, B, C, and D are A1, B1, C1, and D1, respectively.
  • a and B are located on the upper side of the virtual filtering boundary of the chrominance component
  • A1 and B1 corresponding to A and B are also located on the upper side of the virtual filtering boundary of the luminance component.
  • the sampling ratio of the luminance component and the chrominance component in the column direction is different from the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the column direction, for example, when the image sampling format is 422 and 444, as shown in Figure 12
  • the sampling ratio of the luminance component and the chrominance component in the column direction is 1:1
  • the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the column direction is 4:2, so that A and B are located at The chrominance component is on the upper side of the virtual filtering boundary, while A1 and B1 corresponding to A and B are located on the lower side of the luminance component virtual filtering boundary, that is, the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary.
  • CCALF can be performed on the two chrominance components A and B only after the luminance component of one row of CTU) has been SAO. This adds extra waiting time in CCALF, reduces the filtering efficiency of CCALF, and increases video codec The time of the process.
  • An embodiment of the present disclosure provides a video encoding and decoding method.
  • the video encoding and decoding method can be applied to a video encoding end or a video decoding end, and can be applied to a device that has both video encoding and video decoding functions.
  • the above-mentioned problems of low filtering efficiency and large buffer space occupation As shown in Figure 13, the video encoding and decoding method includes:
  • Step S1301 filtering the chrominance components.
  • Step S1302 When the chrominance component and its corresponding brightness component are located on different sides of the virtual filtering boundary, it is forbidden to use the brightness component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  • loop filtering, adaptive loop filtering, cross-component adaptive loop filtering, etc. mentioned in the embodiments of this application may also have other names, and this application is only an example and is not limited.
  • the filtering of the chrominance component in step S1301 includes performing one or more of DF, SAO, or ALF on the reconstructed image block of the chrominance component to obtain a filtering result after the chrominance component is filtered.
  • filtering the chrominance component includes: performing ALF on the reconstructed image block of the chrominance component to obtain the filtering result after ALF.
  • step S1302 the chrominance components and their corresponding brightness components are located on different sides of the virtual filtering boundary, and it is forbidden to use the brightness components corresponding to the chrominance components to perform cross-component filtering on the filtered chrominance components.
  • cross-component filtering can be Including cross-component adaptive loop filtering.
  • the chrominance component and its corresponding luminance component are located on different sides of the virtual filter boundary, and may include the sampling ratio of the luminance component and the chrominance component in the first direction and the luminance component and the chrominance component in the first direction.
  • the ratio of the offset value of the virtual filter boundary in the direction is different.
  • the correspondence described in this embodiment may also be referred to as association, reference, mapping, and so on.
  • “Correspondence” can be understood as the luminance component that the chrominance component refers to when performing cross-component adaptive loop filtering, for example, the luminance component at the same position or the same group.
  • the luminance component that the chrominance component refers to when performing cross-component adaptive loop filtering is the luminance component with the same position.
  • the luminance component that the chrominance component refers to when performing cross-component adaptive loop filtering is the luminance component of the same group.
  • A1 is the brightness component of the same group as A
  • B1 is the brightness component of the same group as B.
  • the offset value can also be called offset, misalignment, misalignment value, distance, distance value, etc. It refers to the offset value of the virtual filter boundary compared to the boundary between the coded image blocks, and represents the virtual filter boundary and the coded image block. The number of pixels between the borders.
  • the coded image block may be a coding tree unit (CTU), a coding unit (CU) included in the CTU, a prediction unit (PU) and a transform unit (TU) included in the CU.
  • CTU coding tree unit
  • CU coding unit
  • PU prediction unit
  • TU transform unit
  • the first direction refers to the column direction of the luminance component and the chrominance component. In other examples, the first direction may also refer to other directions of the luminance component and the chrominance component, such as the row direction.
  • the image sampling format includes 420, 422, 444, and any other possible sampling formats, and the sampling ratio can be 1:1, 2:1, and any other possible sampling ratios.
  • the offset value of the virtual filter boundary of the luminance component in the column direction can include 4, and any other possible values, and the offset value of the virtual filter boundary of the chrominance component in the column direction can include 2, and any other possible values.
  • the offset value ratio can be 2:1, and any other possible values.
  • the sampling ratio of the luminance component and the chrominance component in the first direction when the sampling ratio of the luminance component and the chrominance component in the first direction is different from the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction, it includes: the luminance component and the chrominance component in the first direction.
  • the sampling ratio of the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filtering boundary of the luminance component and the chrominance component in the first direction.
  • this embodiment prohibits the use of the brightness component corresponding to the chrominance component to the filtered chrominance component. Proceed to CCALF.
  • prohibiting the use of the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component includes: prohibiting the use of the luminance component that is located on a different side of the virtual filtering boundary from the chrominance component to the filtered chrominance component Perform cross-component filtering.
  • prohibiting the use of luminance components located on a different side of the virtual filtering boundary from the chrominance component to perform cross-component filtering on the filtered chrominance component includes:
  • CCALF is performed on the filtered chrominance component using the luminance component located on the same side of the virtual filtering boundary as the chrominance component.
  • that the chrominance component and its corresponding brightness component are respectively located on different sides of the virtual filtering boundary means that the chrominance component and its corresponding brightness component are located on opposite sides of the virtual filtering boundary. For example, when the chrominance component is located on the upper side of the virtual filtering boundary, its corresponding luminance component is located on the lower side of the virtual filtering boundary; when the chrominance component is located on the lower side of the virtual filtering boundary, its corresponding luminance component is located on the virtual filtering boundary. On the upper side.
  • the image sampling format is 422 and 444
  • the sampling ratio in the column direction is 1:1
  • the offset value of the virtual filter boundary of the luminance component in the column direction is 4
  • the offset value of the virtual filter boundary of the chrominance component in the column direction is 4.
  • the shift value is 2 and the shift value ratio is 2:1 as an example, and this embodiment is further described.
  • performing CCALF on the filtered chrominance component using the luminance component on the same side of the virtual filtering boundary as the chrominance component includes:
  • CCALF is performed on the filtered chrominance component using the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component and is closest to the chrominance component.
  • a luminance component closest to the chrominance component can be used to perform CCALF on the filtered chrominance component.
  • the luminance component that is located on the same side of the virtual filter boundary as A and B and is closest to the chrominance components A and B is used.
  • A1/B1 perform CCALF on A and B after ALF.
  • the distance refers to the number of pixels, and can also be offset, deviation, or misalignment.
  • the first pixel on the upper side of the virtual filter boundary of the luminance component is taken as the pixel closest to the chrominance components A and B, and the luminance component A1/B1 is used to perform CCALF on A and B after ALF.
  • the chrominance can be achieved in the filtering process of the image block of the previous row.
  • the CCALF of the components A and B thus completing the CCALF of all the brightness component pixels on the upper side of the virtual filter boundary, without waiting until the brightness component of the next line of image blocks has been SAO, thus eliminating the above-mentioned extra waiting time in CCALF, Thereby improving the filtering efficiency of CCALF and shortening the time of the video encoding and decoding process.
  • the buffer since there is no waiting process, the buffer does not need to buffer the ALF filter values of A and B, thereby saving the buffer space of the buffer.
  • the chrominance component located on the same side of the virtual filter boundary as the chrominance component and is closest to the chrominance component for CCALF
  • the non-nearest luminance component performs CCALF on the chrominance component.
  • the non-nearest can be, for example, the second closest, the third closest, etc.
  • the luminance components on the same side of the virtual filter boundary as the chrominance component can be sorted according to the distance from the chrominance component from the nearest to the farthest.
  • the third or fourth luminance component performs CCALF on the chrominance component. For example, in FIG.
  • pixels that are not the closest to the chrominance component A/B can be used to perform CCALF on the chrominance component A/B.
  • the pixel A1/B1 with the second order of the distance to the chrominance component A/B can be used to perform CCALF on the chrominance component A/B.
  • multiple luminance components closest to the chrominance component can also be used to perform CCALF on the filtered chrominance component.
  • the number of the plurality of luminance component pixels is equal to the number of pixels of the chrominance component that themselves and their corresponding luminance components are located on different sides of the virtual filter boundary.
  • the number of luminance components located on the same side of the virtual filter boundary as the chrominance component is determined according to the number of pixels of the chrominance component.
  • the two chrominance components of themselves and their corresponding brightness components located on different sides of the virtual filter boundary are A and B. It is determined that there are two brightness components located on the same side of the virtual filter boundary as A and B. Determine the two pixels A1 and B1 closest to the chrominance component.
  • A1 and B1 are the second and first pixels located on the upper side of the virtual filtering boundary, respectively.
  • A1 may be located on the upper side of B1, as shown in FIG. 16; it may also be located on the lower side of B1, as shown in FIG.
  • CCALF is performed on A and B after loop filtering by using A1 and B1 respectively.
  • Performing CCALF on the filtered chrominance components may also include:
  • the CCALF is performed on the filtered chrominance component using the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component and is a preset distance from the chrominance component.
  • a luminance component whose distance from the chrominance component is a preset distance can be used to perform CCALF on the filtered chrominance component.
  • the preset distance refers to the number of pixels.
  • the preset distance may be two, three, or four pixels.
  • the luminance component A1 that is two pixels away from the chrominance component A and on the same side of the virtual filter boundary is used to perform CCALF on the chrominance component A
  • the distance chrominance component is used
  • the luminance component B1 of two pixels B and located on the same side of the virtual filter boundary performs CCALF on the chrominance component B.
  • the filtered chrominance components can also be CCALFed by using multiple luminance components at a preset distance from the chrominance component.
  • the number of the plurality of luminance component pixels is equal to the number of pixels of the chrominance component that themselves and their corresponding luminance components are located on different sides of the virtual filter boundary.
  • the number of luminance components located on the same side of the virtual filter boundary as the chrominance component is determined according to the number of pixels of the chrominance component.
  • the distance to the chrominance component is the brightness component with the same number of pixels of the chrominance component as the preset distance, and use the determined brightness component to perform CCALF on the chrominance component after loop filtering.
  • the two chrominance components of themselves and their corresponding luminance components on different sides of the virtual filter boundary are A and B. It is determined that the luminance components to be selected on the same side of the virtual filter boundary as A and B are Two, determine the two pixels A1 and B1 whose distance to the chrominance component is the preset distance. A1 and B1 are the fourth and second pixels located on the upper side of the virtual filter boundary, respectively. A1 and B1 are used to filter the loop respectively CCALF is performed after A and B.
  • the chrominance component and its corresponding luminance component when the chrominance component and its corresponding luminance component are located on different sides of the virtual filter boundary, the chrominance component that is located on the same side of the virtual filter boundary as the chrominance component and is closest to the chrominance component or preset
  • the luminance component of the distance filters the chrominance component after loop filtering, which eliminates the extra waiting time in CCALF, improves the filtering efficiency of CCALF, shortens the time of the video encoding and decoding process, and saves the buffer space of the buffer.
  • Another embodiment of the present disclosure provides a video encoding and decoding method.
  • content that is the same or similar to the previous embodiment will not be repeated. The following only focuses on the content that is different from the previous embodiment.
  • prohibiting the use of luminance components located on a different side of the virtual filtering boundary from the chrominance component to perform cross-component filtering on the filtered chrominance component includes:
  • the chrominance component is prohibited from using cross-component adaptive loop filtering (CCALF).
  • CCALF cross-component adaptive loop filtering
  • the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary, it may be prohibited to use the luminance component corresponding to the chrominance component to perform CCALF on the filtered chrominance component.
  • the chrominance components A and B are located on the upper side of the virtual filter boundary, while the luminance components A1 and B1 corresponding to the chrominance components A and B are located on the lower side of the virtual filter boundary. In this case, this embodiment CCALF is not performed on chrominance components A and B.
  • the chrominance components C and D and their corresponding luminance components on the lower side of the virtual filtering boundary are all located on the virtual filtering boundary.
  • CCALF is still performed on the four chrominance components on the upper side of A and B, and the chrominance components C and D.
  • the filter value of CCALF is used as the ALF offset of the chrominance component, and the ALF offset is compared with the The ALF filter values are added, and the result of the addition is used as the loop filter result of the above-mentioned chrominance component. Since CCALF is not performed on A and B, the ALF filter values of A and B are directly used as the loop filter result.
  • this embodiment prohibits the use of CCALF for the chroma component when the chroma component and its corresponding brightness component are located on different sides of the virtual filtering boundary, and the chroma can be adjusted during the filtering process of the previous line of image blocks.
  • To complete the CCALF of the image block in the previous row there is no need to wait for the luminance component of the image block in the next row to perform SAO. It can also eliminate the above-mentioned extra waiting time of CCALF, improve the filtering efficiency of CCALF, and shorten the time of the video encoding and decoding process.
  • the buffer since there is no waiting process, the buffer does not need to buffer the ALF filter values of A and B, thereby saving the buffer space of the buffer.
  • the first direction may also refer to other directions of the luminance component and the chrominance component, such as the row direction.
  • the execution process of the video encoding and decoding method is similar, except that the column direction is replaced with the row direction.
  • the chrominance component located on the same side of the virtual filtering boundary can be used.
  • the luminance component (for example, the one located on the same side of the virtual filter boundary and the closest distance) performs the CCALF operation on the chrominance component after loop filtering.
  • the coding image block for example, the boundary between the CTUs is perpendicular to the column direction boundary, and the virtual filter boundary is also perpendicular to the column direction virtual filter boundary.
  • the offset value of the virtual filter boundary can be 4, and any other possible values
  • the offset value of the virtual filter boundary of the chrominance component can include 2, and any other possible values
  • the offset value ratio can be 2: 1, and any other possible values.
  • FIG. 21 Another embodiment of the present disclosure also provides a video encoding and decoding device, as shown in FIG. 21, including:
  • Memory used to store executable instructions
  • the processor is configured to execute the executable instructions stored in the memory to perform the following operations:
  • the chrominance component and its corresponding luminance component are on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  • the video encoding and decoding device in this embodiment may be a device on the video encoding end, or a device on the video decoding end, or a device having both video encoding and video decoding functions.
  • the processor of this embodiment can execute various operations corresponding to the steps of the foregoing embodiment by executing the executable instructions stored in the memory.
  • the processor of this embodiment is further configured to perform the following operation: prohibiting the use of luminance components located on a different side of the virtual filtering boundary from the chrominance component to perform cross-component filtering on the filtered chrominance component.
  • the processor of this embodiment is further configured to perform the following operation: use the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component to perform cross-component filtering on the filtered chrominance component.
  • the processor of this embodiment is further configured to perform the following operation: use the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component and is closest to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  • the processor of this embodiment is further configured to perform the following operation: prohibiting the chrominance component from using cross-component adaptive loop filtering.
  • the chrominance component and its corresponding brightness component are located on different sides of the virtual filter boundary. It is forbidden to use the brightness component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  • cross-component filtering can be Including cross-component adaptive loop filtering.
  • the chrominance component and its corresponding luminance component are located on different sides of the virtual filter boundary, and may include the sampling ratio of the luminance component and the chrominance component in the first direction and the luminance component and the chrominance component in the first direction.
  • the ratio of the offset value of the virtual filter boundary in the direction is different.
  • the offset value is the offset value of the virtual filter boundary compared to the boundary between the coded image blocks.
  • the coded image block includes a coding tree unit CTU.
  • the difference between the sampling ratio of the luminance component and the chrominance component in the first direction and the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction includes: the difference between the luminance component and the chrominance component in the first direction
  • the sampling ratio is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction.
  • the first direction may include columns in the image.
  • the sampling ratio can be 1:1; the offset value ratio can be 2:1.
  • the case where the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction includes: the image sampling format is 422 or 444 sampling format.
  • the processor of this embodiment is further configured to perform the following operations: performing any one or more of deblocking filtering, pixel adaptive compensation, or adaptive loop filtering on the chrominance component.
  • Another embodiment of the present disclosure provides a computer-readable storage medium that stores executable instructions that, when executed by one or more processors, can cause the one or more processors to execute The video encoding and decoding method of the foregoing embodiment.
  • Another embodiment of the present disclosure provides a video encoding and decoding method.
  • content that is the same as or similar to the foregoing embodiment will not be repeated, and the following only focuses on the content that is different from the foregoing embodiment.
  • the video encoding and decoding method of this embodiment can be applied to a video encoding end or a video decoding end, and can be applied to a device having both video encoding and video decoding functions, and can solve the problems of low filtering efficiency and large buffer space occupation.
  • the video encoding and decoding method includes:
  • Step S2201 filtering the chrominance components.
  • Step S2202 Use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component, where the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the virtual filtering boundary of the luminance component.
  • loop filtering, adaptive loop filtering, cross-component adaptive loop filtering, etc. mentioned in the embodiments of this application may also have other names, and this application is only an example and is not limited.
  • the filtering of the chrominance component in step S2201 includes performing one or more of DF, SAO, or ALF on the reconstructed image block of the chrominance component to obtain a filtering result after the chrominance component is filtered.
  • filtering the chrominance component includes: performing ALF on the reconstructed image block of the chrominance component to obtain the filtering result after ALF.
  • the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the filtering boundary of the luminance component, which may include: the sampling ratio of the luminance component and the chrominance component in the first direction and the luminance component and chrominance
  • the luminance components corresponding to the chrominance components are used to perform cross-component filtering on the filtered chrominance components.
  • the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the filtering boundary of the luminance component.
  • the correspondence described in this embodiment refers to the correspondence in cross-component adaptive loop filtering, and may also be referred to as association, reference, mapping, and so on.
  • association, reference, mapping and so on.
  • the corresponding representation is located in the same position in the chrominance component image block and the luminance component image block.
  • the offset value can also be called offset, misalignment, misalignment value, distance, distance value, etc. It refers to the offset value of the virtual filter boundary compared to the boundary between the coded image blocks, and represents the virtual filter boundary and the coded image block. The number of pixels between the borders.
  • the coded image block may be a coding tree unit (CTU), a coding unit (CU) included in the CTU, a prediction unit (PU) and a transform unit (TU) included in the CU.
  • CTU coding tree unit
  • CU coding unit
  • PU prediction unit
  • TU transform unit
  • the first direction refers to the column direction of the luminance component and the chrominance component. In other examples, the first direction may also refer to other directions of the luminance component and the chrominance component, such as the row direction.
  • the image sampling format includes 420, 422, 444, and any other possible sampling formats, and the sampling ratio can be 1:1, 2:1, and any other possible sampling ratios.
  • the offset value of the virtual filter boundary of the luminance component in the column direction can include 4, and any other possible values, and the offset value of the virtual filter boundary of the chrominance component in the column direction can include 2, and any other possible values.
  • the offset value ratio can be 2:1, and any other possible values.
  • the sampling ratio of the luminance component and the chrominance component in the first direction is different from the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction, including: luminance component and chrominance component
  • the sampling ratio in the first direction is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction.
  • the offset value of the virtual filter boundary of the chrominance component in this embodiment is equal to the offset value of the virtual filter boundary of the luminance component, and ALF is performed on the chrominance component and the chrominance is used.
  • the luminance component corresponding to the component performs CCALF on the chrominance component.
  • the image sampling format is 422 and 444, and the sampling ratio is 1:1 as an example to further explain this embodiment.
  • the offset value of the virtual filter boundary of the luminance component in the column direction is 4, and the offset value of the virtual filter boundary of the chrominance component in the column direction is also 4, that is, the luminance component of this embodiment It is the same as the offset value of the virtual filter boundary of the chrominance component. It is equivalent to that the virtual filter boundary of the luminance component shown in FIG. 12 remains unchanged, while the virtual filter boundary of the chrominance component changes from 2 to 4.
  • the chrominance components A and B and their corresponding luminance components A1 and B1 in Figure 12 are changed from being on different sides of the virtual filtering boundary to Figure 23 is located on the same side of the virtual filter boundary, that is, on the upper side of the virtual filter boundary, so that the chrominance components A and B and their corresponding luminance components A1 and B1 belong to one line of image blocks, and the lower side of the virtual filter boundary One line of image blocks.
  • the CCALF of all luminance component pixels on the upper side of the virtual filtering boundary is completed without waiting for the luminance component of the next line of image blocks to perform SAO.
  • the extra waiting time in CCALF is eliminated, the filtering efficiency of CCALF is improved, and the time of the video encoding and decoding process is shortened.
  • the buffer since there is no waiting process, the buffer does not need to buffer the ALF filter value of the chrominance component, thereby saving the buffer space of the buffer.
  • the offset value of the virtual filter boundary of the luminance component and the chrominance component in the column direction is both 4 as an example, and the present embodiment is described, but the present embodiment is not limited to this. In other implementation manners, the offset value of the virtual filter boundary in the column direction of the luminance component and the chrominance component may both be values greater than 4.
  • the first direction is the column direction of the luminance component and the chrominance component as an example, and the above embodiments are described, but the present disclosure is not limited to this.
  • the first direction may also refer to other directions of the luminance component and the chrominance component, such as the row direction.
  • the execution process of the video encoding and decoding method is similar, except that the column direction is replaced with the row direction.
  • the offset value of the virtual filter boundary of the luminance component in the row direction is 4, and the chrominance component is in the row direction.
  • the offset value of the virtual filter boundary is also 4, and the offset value of the virtual filter boundary through the luminance component and the chrominance component remains the same, so that all the luminance on the left side of the virtual filter boundary can be completed through the filtering process of the left row of image blocks
  • the CCALF of the component pixels does not need to wait until the brightness component of the image block on the right row is SAO, which eliminates the extra waiting time in CCALF, improves the filtering efficiency of CCALF, and shortens the time of the video encoding and decoding process.
  • the buffer since there is no waiting process, the buffer does not need to buffer the ALF filter value of the chrominance component, thereby saving the buffer space of the buffer.
  • FIG. 25 Another embodiment of the present disclosure also provides a video encoding and decoding device, as shown in FIG. 25, including:
  • Memory used to store executable instructions
  • the processor is configured to execute the executable instructions stored in the memory to perform the following operations:
  • the luminance component corresponding to the chrominance component is used to perform cross-component filtering on the filtered chrominance component, where the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the virtual filtering boundary of the luminance component.
  • the video encoding and decoding device in this embodiment may be a device on the video encoding end, or a device on the video decoding end, or a device having both video encoding and video decoding functions.
  • the processor of this embodiment can execute various operations corresponding to the steps of the foregoing embodiment by executing the executable instructions stored in the memory.
  • the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the filtering boundary of the luminance component, which may include: the sampling ratio of the luminance component and the chrominance component in the first direction and the luminance component and the chrominance component
  • using the luminance component corresponding to the chrominance component to filter the chrominance component includes: performing CCALF on the chrominance component using the luminance component corresponding to the chrominance component.
  • the offset value of the virtual filter boundary of the chrominance component is equal to the offset value of the virtual filter boundary of the luminance component, including: adaptive loop filtering and cross-component filtering processes for the chrominance component, and virtual filtering of the chrominance component
  • the offset value of the boundary is equal to the offset value of the filtering boundary of the luminance component.
  • the offset value is the offset value of the virtual filter boundary compared to the boundary between the coded image blocks.
  • the coded image block includes a coding tree unit CTU.
  • the difference between the sampling ratio of the luminance component and the chrominance component in the first direction and the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction includes: the difference between the luminance component and the chrominance component in the first direction
  • the sampling ratio is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction.
  • the first direction includes the columns in the image.
  • the sampling ratio can be 1:1; the offset value ratio can be 2:1.
  • the offset value of the virtual filter boundary of the chrominance component and the offset value of the virtual filter boundary of the luminance component may both be 4.
  • the case where the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction includes: the image sampling format is 422 or 444 sampling format.
  • the present disclosure also provides a computer-readable storage medium that stores executable instructions that, when executed by one or more processors, can cause the one or more processors to execute the foregoing embodiments Video encoding and decoding method.
  • the processor of the embodiment of the present disclosure may be an integrated circuit image processing system with signal processing capability.
  • the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Enhanced Synchronous Dynamic Random Access Memory
  • Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory
  • DR RAM Direct Rambus RAM
  • each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor executes the instructions in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

Abstract

A video encoding and decoding method and apparatus, and a computer-readable storage medium. The video encoding and decoding method comprises: filtering a chrominance component; and when the chrominance component and a luminance component corresponding thereto are respectively located at different sides of a virtual filtering boundary, prohibiting performing cross-component filtering on the filtered chrominance component by using the luminance component corresponding to the chrominance component.

Description

一种视频编解码方法、装置以及计算机可读存储介质Video encoding and decoding method, device and computer readable storage medium 技术领域Technical field
本公开涉及图像处理领域,尤其涉及一种视频编解码方法、装置以及计算机可读存储介质。The present disclosure relates to the field of image processing, and in particular, to a video encoding and decoding method, device, and computer-readable storage medium.
背景技术Background technique
在图像处理领域,编码端对当前图像块进行预测,对当前图像块与预测图像块的残差依次进行变换、量化并编码为码流,发送给解码端。编码端还执行反量化、反变换并得到重建残差,由重建残差与预测图像块得到重建图像块,对重建图像块进行环路滤波,滤波后的重建图像块作为帧间预测的参考图像块。解码端对码流进行解码,执行反量化、反变换得到残差,对当前图像块进行预测而生成预测图像块,由残差与预测图像块得到重建图像块,对重建图像块进行环路滤波,滤波后的重建图像块作为帧间预测的参考图像块,并输出至解码端的外部设备。In the field of image processing, the encoding end predicts the current image block, and sequentially transforms, quantizes and encodes the residuals between the current image block and the predicted image block into a bit stream, and sends it to the decoding end. The encoding end also performs inverse quantization, inverse transformation, and obtains the reconstruction residual. The reconstructed image block is obtained from the reconstruction residual and the predicted image block, and the reconstructed image block is loop-filtered. The filtered reconstructed image block is used as the reference image for inter-frame prediction. Piece. The decoding end decodes the code stream, performs inverse quantization and inverse transformation to obtain the residual, predicts the current image block to generate a predicted image block, obtains a reconstructed image block from the residual and the predicted image block, and performs loop filtering on the reconstructed image block , The reconstructed image block after filtering is used as a reference image block for inter-frame prediction, and is output to an external device at the decoding end.
现有视频编解码的效率方面还有可以改善的地方。There is room for improvement in the efficiency of existing video codecs.
发明内容Summary of the invention
本公开的一个方面,提供了一种视频编解码方法,包括:One aspect of the present disclosure provides a video encoding and decoding method, including:
对色度分量进行滤波;Filter the chrominance components;
当所述色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波。When the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
本公开的另一个方面,还提供了一种视频编解码装置,包括:Another aspect of the present disclosure also provides a video encoding and decoding device, including:
存储器,用于存储可执行指令;Memory, used to store executable instructions;
处理器,用于执行所述存储器中存储的所述可执行指令,以执行如下操作:The processor is configured to execute the executable instructions stored in the memory to perform the following operations:
对色度分量进行滤波;Filter the chrominance components;
当所述色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波。When the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
本公开的又一个方面,还提供了一种计算机可读存储介质,其存储有 可执行指令,所述可执行指令在由一个或多个处理器执行时,可以使所述一个或多个处理器执行上述视频编解码方法。In yet another aspect of the present disclosure, there is also provided a computer-readable storage medium, which stores executable instructions, which, when executed by one or more processors, can cause the one or more processing The device executes the above-mentioned video encoding and decoding method.
本公开的再一个方面,还提供了一种视频编解码方法,包括:In another aspect of the present disclosure, a video encoding and decoding method is also provided, including:
对色度分量进行滤波;Filter the chrominance components;
使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波,其中,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的虚拟滤波边界的偏移值。Use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component, wherein the offset value of the virtual filter boundary of the chrominance component is equal to the offset value of the virtual filter boundary of the luminance component. Shift value.
本公开的再一个方面,还提供了一种视频编解码装置,包括:In yet another aspect of the present disclosure, a video encoding and decoding device is also provided, including:
存储器,用于存储可执行指令;Memory, used to store executable instructions;
处理器,用于执行所述存储器中存储的所述可执行指令,以执行如下操作:The processor is configured to execute the executable instructions stored in the memory to perform the following operations:
对色度分量进行滤波;Filter the chrominance components;
使用所述色度分量对应的亮度分量对滤波后所述色度分量进行跨分量滤波,其中,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的虚拟滤波边界的偏移值。Use the luminance component corresponding to the chrominance component to perform cross-component filtering on the chrominance component after filtering, wherein the offset value of the virtual filtering boundary of the chrominance component is equal to the offset of the virtual filtering boundary of the luminance component value.
本公开的再一个方面,还提供了一种计算机可读存储介质,其存储有可执行指令,所述可执行指令在由一个或多个处理器执行时,可以使所述一个或多个处理器执行上述视频编解码方法。In yet another aspect of the present disclosure, there is also provided a computer-readable storage medium, which stores executable instructions, which, when executed by one or more processors, can cause the one or more processing The device executes the above-mentioned video encoding and decoding method.
通过当色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波,或者使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波,其中,色度分量的虚拟滤波边界的偏移值等于亮度分量的虚拟滤波边界的偏移值,本公开可减少跨分量自适应环路滤波过程的时间,提高滤波效率,节省缓存空间。When the chroma component and its corresponding brightness component are on different sides of the virtual filter boundary, it is forbidden to use the brightness component corresponding to the chroma component to perform cross-component filtering on the filtered chroma component, or to use the brightness corresponding to the chroma component The component performs cross-component filtering on the filtered chroma component, where the offset value of the virtual filter boundary of the chroma component is equal to the offset value of the virtual filter boundary of the luminance component. The present disclosure can reduce the cross-component adaptive loop filtering process. Time, improve filtering efficiency and save cache space.
附图说明Description of the drawings
为了更清楚地说明本公开实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the drawings that need to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the application. For those of ordinary skill in the art, without creative labor, other drawings can be obtained from these drawings.
图1为本公开实施例视频编码过程的示意图。Fig. 1 is a schematic diagram of a video encoding process according to an embodiment of the disclosure.
图2为本公开实施例视频解码过程的示意图。Fig. 2 is a schematic diagram of a video decoding process according to an embodiment of the disclosure.
图3显示了亮度分量的虚拟滤波边界的偏移值。Figure 3 shows the offset value of the virtual filter boundary of the luminance component.
图4显示了图像采样格式为420时的色度分量虚拟滤波边界的偏移值。Figure 4 shows the offset value of the virtual filter boundary of the chrominance component when the image sampling format is 420.
图5显示了图像采样格式为444和422时的色度分量虚拟滤波边界的偏移值。Figure 5 shows the offset value of the virtual filter boundary of the chrominance component when the image sampling format is 444 and 422.
图6显示了图像采样格式为444、422、420的图像块。Figure 6 shows image blocks with image sampling formats of 444, 422, and 420.
图7a显示了自适应环路滤波的色度分量滤波器;图7b显示了自适应环路滤波的亮度分量滤波器。Figure 7a shows the chrominance component filter of adaptive loop filtering; Figure 7b shows the luminance component filter of adaptive loop filtering.
图8a显示了自适应环路滤波在亮度分量虚拟滤波边界的处理情况;图8b显示了自适应环路滤波在色度分量虚拟滤波边界的处理情况。Figure 8a shows the processing of the adaptive loop filter at the virtual filter boundary of the luminance component; Figure 8b shows the processing of the adaptive loop filter at the virtual filter boundary of the chrominance component.
图9为本公开实施例跨分量自适应环路滤波示意图。FIG. 9 is a schematic diagram of cross-component adaptive loop filtering according to an embodiment of the disclosure.
图10a为跨分量自适应环路滤波的滤波器形状;图10b为跨分量自适应环路滤波的滤波器在图像块中位置。Fig. 10a is the filter shape of the cross-component adaptive loop filtering; Fig. 10b is the position of the filter of the cross-component adaptive loop filtering in the image block.
图11显示了图像采样格式为420时,亮度分量和色度分量在列方向上的采样比例与亮度分量和色度分量在列方向上的虚拟滤波边界的偏移值比例。Figure 11 shows when the image sampling format is 420, the sampling ratio of the luminance component and chrominance component in the column direction and the offset value ratio of the virtual filtering boundary of the luminance component and chrominance component in the column direction.
图12显示了图像采样格式为444和422时,亮度分量和色度分量在列方向上的采样比例与亮度分量和色度分量在列方向上的虚拟滤波边界的偏移值比例。Figure 12 shows the sampling ratio of the luminance component and chrominance component in the column direction and the offset value ratio of the virtual filter boundary of the luminance component and chrominance component in the column direction when the image sampling format is 444 and 422.
图13为本公开实施例视频编解码方法的流程图。FIG. 13 is a flowchart of a video encoding and decoding method according to an embodiment of the disclosure.
图14显示了列方向的虚拟滤波边界下色度分量及其对应的亮度分量的位置关系。Figure 14 shows the positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
图15显示了列方向的虚拟滤波边界下色度分量及其对应的亮度分量的另一位置关系。Figure 15 shows another positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
图16显示了列方向的虚拟滤波边界下色度分量及其对应的亮度分量的又一位置关系。Figure 16 shows another positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
图17显示了列方向的虚拟滤波边界下色度分量及其对应的亮度分量的又一位置关系。Figure 17 shows another positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
图18显示了列方向的虚拟滤波边界下色度分量及其对应的亮度分量的再一位置关系。Figure 18 shows another positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the column direction.
图19显示了本公开另一实施例视频编解码方法的色度分量及其对应的亮度分量的位置关系。FIG. 19 shows the positional relationship between chrominance components and their corresponding luminance components in a video encoding and decoding method according to another embodiment of the present disclosure.
图20显示了行方向的虚拟滤波边界下色度分量及其对应的亮度分量的位置关系。Figure 20 shows the positional relationship between the chrominance component and its corresponding luminance component under the virtual filter boundary in the row direction.
图21为本公开实施例的视频编解码装置的示意图。FIG. 21 is a schematic diagram of a video encoding and decoding device according to an embodiment of the disclosure.
图22为本公开又一实施例视频编解码方法的流程图。FIG. 22 is a flowchart of a video encoding and decoding method according to another embodiment of the present disclosure.
图23显示了本公开又一实施例视频编解码方法中列方向虚拟滤波边界下的色度分量及其对应的亮度分量的位置关系。FIG. 23 shows the positional relationship between the chrominance components and their corresponding luminance components under the virtual filter boundary in the column direction in the video encoding and decoding method of another embodiment of the present disclosure.
图24显示了本公开又一实施例视频编解码方法中行方向虚拟滤波边界下的色度分量及其对应的亮度分量的位置关系。FIG. 24 shows the positional relationship between chrominance components and their corresponding luminance components under the virtual filter boundary in the row direction in the video coding and decoding method of another embodiment of the present disclosure.
图25为本公开又一实施例的视频编解码装置的示意图。FIG. 25 is a schematic diagram of a video encoding and decoding device according to another embodiment of the present disclosure.
具体实施方式Detailed ways
下面将结合实施例和实施例中的附图,对本公开技术方案进行清楚、完整的描述。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The technical solutions of the present disclosure will be clearly and completely described below in conjunction with the embodiments and the drawings in the embodiments. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present disclosure.
本申请实施例适用于但不限于国际视频编码标准H.264/MPEG-AVC、H.265/MEPG-HEVC、国内音视频编码标准AVS2,以及正在制定的H.266/VVC国际标准和AVS3国内标准,以及未来演进的其他视频编解码标准。The embodiments of this application are applicable to, but not limited to, the international video coding standards H.264/MPEG-AVC, H.265/MEPG-HEVC, the domestic audio and video coding standards AVS2, and the H.266/VVC international standards under development and AVS3 domestic Standards, and other video codec standards that will evolve in the future.
视频图像一般包括三种分量的图像帧,三种分量包括:亮度(Luma)分量Y、以及两个色度(Chroma)分量Cb/Cr或Cg/Co。视频编码过程如图1所示。每种分量的原始图像帧被划分为图像块,当前图像块作为待编码图像块。编码端根据不同的预测模式,基于参考图像块对当前图像块进行帧内预测(Intra Coding)或帧间预测(Inter Coding),生成预测图像块。对当前图像块与预测图像块的残差(Residual)进行变换(Transform)生成变换系数,对变换系数进行量化(Quantization)生成量化系数,量化系数经熵编码(Entropy Coding)后生成编码后的码流,码流发送给解码端。A video image generally includes an image frame of three components. The three components include: a luma (Luma) component Y and two chroma (Chroma) components Cb/Cr or Cg/Co. The video encoding process is shown in Figure 1. The original image frame of each component is divided into image blocks, and the current image block is used as the image block to be encoded. According to different prediction modes, the encoding end performs intra prediction (Intra Coding) or inter prediction (Inter Coding) on the current image block based on the reference image block to generate a predicted image block. Transform the residual between the current image block and the predicted image block (Transform) to generate transform coefficients, quantize the transform coefficients (Quantization) to generate quantized coefficients, and the quantized coefficients are entropy coded (Entropy Coding) to generate encoded codes Stream, the code stream is sent to the decoding end.
在视频编码过程中,编码端还对量化系数进行反量化操作得到变换系数,反量化操作是量化操作的逆操作。对反量化操作得到的变换系数进行 反变换操作,得到重建残差。由重建残差与预测图像块得到重建图像块(又称重构图像块)。重建图像块作为帧内预测的参考图像块,以对其他图像块进行帧内预测。重建图像块还经过滤波器,滤波器对重建图像块进行环路滤波,得到滤波后的重建图像块。滤波后的重建图像块作为帧间预测的参考图像块,以对其他图像帧进行帧间预测。视频编码过程中的预测模式、帧内预测信息、运动补偿信息、滤波系数等信息也经熵编码编入码流,并发送给解码端。In the video encoding process, the encoding end also performs an inverse quantization operation on the quantized coefficients to obtain transform coefficients, and the inverse quantization operation is the inverse operation of the quantization operation. Perform an inverse transform operation on the transform coefficients obtained by the inverse quantization operation to obtain the reconstruction residual. A reconstructed image block (also called a reconstructed image block) is obtained from the reconstruction residual and the predicted image block. The reconstructed image block is used as a reference image block for intra-frame prediction to perform intra-frame prediction on other image blocks. The reconstructed image block also passes through a filter, and the filter performs loop filtering on the reconstructed image block to obtain a filtered reconstructed image block. The filtered reconstructed image block is used as a reference image block for inter-frame prediction to perform inter-frame prediction on other image frames. The prediction mode, intra-frame prediction information, motion compensation information, filter coefficients and other information in the video encoding process are also encoded into the code stream by entropy encoding and sent to the decoding end.
视频解码过程如图2所示,视频解码过程基本上可以看作视频编码过程的逆过程。解码端对码流进行熵解码(Entropy Decoding),得到量化系数、预测模式、帧内预测信息、运动补偿信息、滤波系数等信息。对量化系数进行反量化操作得到变换系数,反量化操作是量化操作的逆操作。对反量化操作得到的变换系数进行反变换操作,得到残差。解码端根据接收到的预测模式,基于参考图像块对当前图像块进行帧内预测或帧间预测,生成预测图像块。解码端再由残差与预测图像块得到重建图像块。重建图像块作为帧内预测的参考图像块,以对其他图像块进行帧内预测。重建图像块还经过滤波器,滤波器对重建图像块进行环路滤波,得到滤波后的重建图像块。滤波后的重建图像块作为帧间预测的参考图像块,以对其他图像帧进行帧间预测。参考图像块还可以组成解码后的图像帧输出至解码端的外部设备,该外部设备例如可以是解码端的显示器。The video decoding process is shown in Figure 2. The video decoding process can basically be regarded as the inverse process of the video encoding process. The decoding end performs Entropy Decoding on the code stream to obtain information such as quantization coefficients, prediction modes, intra-frame prediction information, motion compensation information, and filter coefficients. The inverse quantization operation is performed on the quantized coefficient to obtain the transform coefficient, and the inverse quantization operation is the inverse operation of the quantization operation. Perform an inverse transform operation on the transform coefficients obtained by the inverse quantization operation to obtain the residual. According to the received prediction mode, the decoding end performs intra-frame prediction or inter-frame prediction on the current image block based on the reference image block to generate a predicted image block. The decoding end then obtains the reconstructed image block from the residual and the predicted image block. The reconstructed image block is used as a reference image block for intra-frame prediction to perform intra-frame prediction on other image blocks. The reconstructed image block also passes through a filter, and the filter performs loop filtering on the reconstructed image block to obtain a filtered reconstructed image block. The filtered reconstructed image block is used as a reference image block for inter-frame prediction to perform inter-frame prediction on other image frames. The reference image block can also be composed of the decoded image frame and output to the external device of the decoding end, and the external device can be, for example, a display of the decoding end.
在上述视频编码和视频解码过程中,环路滤波包括:去块滤波(DF,Deblocking Filter)、自适应样值补偿滤波(SAO,Sample Adaptive Offset)和自适应环路滤波(ALF,Adaptive Loop Filter)、跨分量自适应环路滤波(CCALF,Cross-Component ALF)。其中,去块滤波主要用于消除由于不同处理器编码而导致的图像之间的块效应;SAO、ALF和CCALF主要是用于补偿原始像素与重建像素由于编码造成的失真。In the above video encoding and video decoding process, loop filtering includes: deblocking filter (DF, Deblocking Filter), adaptive sample compensation filter (SAO, Sample Adaptive Offset) and adaptive loop filter (ALF, Adaptive Loop Filter) ), cross-component adaptive loop filtering (CCALF, Cross-Component ALF). Among them, deblocking filtering is mainly used to eliminate blocking effects between images caused by encoding by different processors; SAO, ALF, and CCALF are mainly used to compensate for the distortion of original pixels and reconstructed pixels due to encoding.
由于图像帧是分为图像块进行预测和变换量化,相邻图像块之间由于编码参数的不同可能导致编码重建图像出现方块效应(BlockingArtifacts)。为了去除重建图像块的方块效应,首先对重建图像块进行去块滤波。去块滤波通过修正重建图像块的像素值,尤其是重建图像块边界附近的像素值,从而达到消除方块效应的目的。Since the image frame is divided into image blocks for prediction and transform quantization, the difference in encoding parameters between adjacent image blocks may cause blocking artifacts in the encoded reconstructed image. In order to remove the block effect of the reconstructed image block, the reconstructed image block is first subjected to deblocking filtering. The deblocking filter corrects the pixel value of the reconstructed image block, especially the pixel value near the boundary of the reconstructed image block, so as to achieve the purpose of eliminating the block effect.
在去块滤波过程中,在对图像块(如CTU)的边界进行处理时,需要用到该边界两侧的像素值,因此边界两侧的相邻两个图像块之间存在依赖性。为了实现图像块环路滤波的并行操作,需要去除上述依赖性,在图像块中设置了虚拟滤波边界。虚拟滤波边界相对于编码图像块之间的边界在第一方向具有一偏移值,该偏移值也可以称为偏移、错位、错位值、距离、距离值等,指的是虚拟滤波边界相较于编码图像块之间的边界的偏移值。为了表述方便,以下均称为偏移值。偏移值表示虚拟滤波边界与编码图像块边界之间的像素数量。虚拟滤波边界还可以称为虚拟边界。在一个示例中,所述第一方向指编码图像块的列方向。在现有的标准中,将亮度分量CTU边界向上4行的位置作为虚拟滤波边界,色度分量CTU边界向上2行的位置作为虚拟滤波边界,这样一个虚拟滤波边界两侧的像素互相无依赖性,可以实现行级并行。如图3所示,图3为亮度分量的虚拟滤波边界的示意图。虚拟滤波边界以上的像素用空心圆表示,虚拟滤波边界与编码图像块之间的边界之间的像素用灰度圆表示。亮度分量的虚拟滤波边界的偏移值为4行,即亮度分量的虚拟滤波边界与亮度分量的编码图像块之间的边界的相距4行像素。对于色度分量,其虚拟滤波边界的偏移值为2,即色度分量的虚拟滤波边界与色度分量的编码图像块之间的边界的相距2行像素。图4为420图像采样格式的色度分量的虚拟滤波边界的示意图,而图5为422图像采样格式的色度分量的虚拟滤波边界的示意图。通过设置上述虚拟滤波边界,使得虚拟滤波边界两侧的像素互相无依赖性,从而实现了图像块行级的并行操作。以上只是示例性说明,第一方向还可以是其他方向,例如编码图像块的行方向。In the process of deblocking filtering, when processing the boundary of an image block (such as a CTU), the pixel values on both sides of the boundary need to be used, so there is a dependency between two adjacent image blocks on both sides of the boundary. In order to realize the parallel operation of the image block loop filter, the above-mentioned dependency needs to be removed, and a virtual filter boundary is set in the image block. The virtual filter boundary has an offset value in the first direction relative to the boundary between the coded image blocks. The offset value can also be called offset, misalignment, misalignment value, distance, distance value, etc., refers to the virtual filter boundary The offset value compared to the boundary between coded image blocks. For ease of presentation, all are referred to as offset values below. The offset value represents the number of pixels between the virtual filter boundary and the boundary of the coded image block. The virtual filter boundary may also be referred to as a virtual boundary. In an example, the first direction refers to the column direction of the coded image block. In the existing standard, the position 4 lines above the CTU boundary of the luminance component is used as the virtual filter boundary, and the position 2 lines above the CTU boundary of the chrominance component is used as the virtual filter boundary, so that the pixels on both sides of a virtual filter boundary are independent of each other. , Can achieve row-level parallelism. As shown in FIG. 3, FIG. 3 is a schematic diagram of the virtual filtering boundary of the luminance component. The pixels above the virtual filter boundary are represented by open circles, and the pixels between the virtual filter boundary and the boundary between the coded image blocks are represented by gray circles. The offset value of the virtual filter boundary of the luminance component is 4 rows, that is, the distance between the virtual filter boundary of the luminance component and the boundary between the coded image block of the luminance component is 4 rows of pixels. For the chrominance component, the offset value of the virtual filtering boundary is 2, that is, the distance between the virtual filtering boundary of the chrominance component and the boundary between the coded image block of the chrominance component is 2 rows of pixels. 4 is a schematic diagram of the virtual filter boundary of the chrominance component of the 420 image sampling format, and FIG. 5 is a schematic diagram of the virtual filter boundary of the chrominance component of the 422 image sampling format. By setting the above virtual filter boundary, the pixels on both sides of the virtual filter boundary are independent of each other, thereby realizing the parallel operation of the image block at the row level. The foregoing is only an exemplary description, and the first direction may also be other directions, such as the row direction of the coded image block.
现有的标准中支持YUV4:2:0(420)、YUV4:2:2(422)、YUV 4:4:4(444)、YUV 4:0:0(400)几种采样格式,4:0:0格式只有亮度分量没有色度分量。YUV 4:4:4、YUV 4:2:2、YUV 4:2:0格式如6所示,实心点表示亮度点,空心圆表示色度点,YUV4:4:4中三个分量采样比例相同。YUV4:2:2代表Y分量和UV分量按照2∶1比例采样,水平10个Y像素点,只有5个UV像素点,竖直10个Y像素点,10个UV像素点。YUV4:2:0采样,是说水平10个Y分量像素点,5个UV像素点,竖直10个Y像素点,5个UV点。如图6所示,实心点 表示亮度分量像素,空心圆表示色度分量像素点。444格式中的亮度分量和色度分量的采样比例相同。422格式中亮度分量和色度分量在行方向按照2∶1的比例采样,在列方向按照1∶1的比例采样。图6中422格式下,行方向有6个亮度分量像素,只有3个色度分量像素,列方向有5个亮度分量像素,5个色度分量像素。420格式的亮度分量和色度分量在行方向和列方向均按照2∶1的比例采样。图6中420格式下,行方向有6个亮度分量像素,3个色度分量像素,列方向有5个亮度分量像素,2个色度分量像素。The existing standards support several sampling formats of YUV4: 2: 0 (420), YUV 4: 2: 2 (422), YUV 4: 4: 4 (444), and YUV 4: 0:0 (400), 4: The 0:0 format has only luminance components and no chrominance components. YUV 4:4:4, YUV 4:2:2, YUV 4:2:0 format is shown in 6, solid dots represent brightness points, hollow circles represent chromaticity points, and the sampling ratio of three components in YUV4:4:4 same. YUV4: 2:2 means that the Y component and the UV component are sampled at a ratio of 2:1. There are 10 Y pixels horizontally, only 5 UV pixels, 10 Y pixels vertically, and 10 UV pixels. YUV4: 2: 0 sampling means that there are 10 Y component pixels horizontally, 5 UV pixels, 10 Y pixels vertically, and 5 UV points. As shown in Figure 6, the solid dots represent the luminance component pixels, and the open circles represent the chrominance component pixels. The sampling ratio of the luminance component and the chrominance component in the 444 format is the same. In the 422 format, the luminance component and the chrominance component are sampled at a ratio of 2:1 in the row direction, and sampled at a ratio of 1:1 in the column direction. In the 422 format in Figure 6, there are 6 luminance component pixels in the row direction and only 3 chrominance component pixels, and 5 luminance component pixels and 5 chrominance component pixels in the column direction. The luminance component and chrominance component of the 420 format are sampled at a ratio of 2:1 in both the row direction and the column direction. In the 420 format in Figure 6, there are 6 luminance component pixels and 3 chrominance component pixels in the row direction, and 5 luminance component pixels and 2 chrominance component pixels in the column direction.
去块滤波后的重建图像块进行自适应样值补偿滤波。自适应样值补偿滤波通过对重建图像块的像素进行分类,并为每类像素加上相同补偿值,使得重构图像块更接近当前图像块,从而起到抑制振铃效应的作用。The reconstructed image block after deblocking filtering is subjected to adaptive sample compensation filtering. The adaptive sample compensation filter classifies the pixels of the reconstructed image block and adds the same compensation value to each type of pixel, so that the reconstructed image block is closer to the current image block, thereby suppressing the ringing effect.
自适应样值补偿滤波后的重建图像块进行自适应环路滤波(ALF)。ALF是一种维纳滤波,用于最小化当前图像块和重建图像块之间的均方误差,通过将当前像素的周围像素乘以对应的滤波系数再求和,得到当前像素的滤波值。对于亮度分量,如图7b所示,滤波器为7×7菱形,即使用周围7个像素对中心像素进行滤波。C12对应的像素为待滤波像素,使用C0-C12所在位置的像素乘以各自对应的滤波系数,再将乘积加和,即可得到C12所在位置的像素的ALF滤波结果。其中,滤波系数还可称为滤波权重。对于色度分量,如图7a所示,滤波器为5×5菱形,即使用周围5个像素对中心像素进行滤波。C6对应的像素为待滤波像素,使用C0-C6像素乘以各自对应的滤波系数,再将乘积加和,即可得到C6像素的ALF滤波结果。此过程中使用到的点,都是ALF之前拿到的重构帧中的点。The reconstructed image block after adaptive sample compensation filtering is subjected to adaptive loop filtering (ALF). ALF is a Wiener filter, which is used to minimize the mean square error between the current image block and the reconstructed image block. The surrounding pixels of the current pixel are multiplied by the corresponding filter coefficients and then summed to obtain the filter value of the current pixel. For the luminance component, as shown in Figure 7b, the filter is a 7×7 diamond, that is, the center pixel is filtered using 7 surrounding pixels. The pixel corresponding to C12 is the pixel to be filtered. Multiply the pixel at the position of C0-C12 by the corresponding filter coefficient, and then add the products to obtain the ALF filtering result of the pixel at the position of C12. Among them, the filter coefficients can also be referred to as filter weights. For the chrominance component, as shown in Figure 7a, the filter is a 5×5 diamond, that is, the center pixel is filtered using 5 surrounding pixels. The pixel corresponding to C6 is the pixel to be filtered, and the C0-C6 pixels are multiplied by the respective corresponding filter coefficients, and the products are added together to obtain the ALF filtering result of the C6 pixel. The points used in this process are all points in the reconstructed frame obtained before ALF.
当然以上只是示例性说明,对于亮度分量和色度分量还可以采用7×7菱形、5×5菱形之外的其他形状的滤波器。Of course, the above is only an exemplary description. For the luminance component and the chrominance component, filters of other shapes other than 7×7 rhombus and 5×5 rhombus may also be used.
ALF可对重建图像块的像素进行分类,不同类别的像素使用不同的滤波系数。有多种像素分类方式。在一种分类方式中,可根据拉普拉斯方向对亮度分量进行分类,对色度分量不分类。根据拉普拉斯方向可将亮度分量的像素分为25类,从而对应有25套滤波系数。对属于同一类别的像素使用该类别对应的滤波系数滤波。ALF can classify the pixels of the reconstructed image block, and different types of pixels use different filter coefficients. There are many ways to classify pixels. In a classification method, the luminance component can be classified according to the Laplacian direction, and the chrominance component is not classified. According to the Laplace direction, the pixels of the brightness component can be divided into 25 categories, which corresponds to 25 sets of filter coefficients. For pixels belonging to the same category, the filter coefficients corresponding to the category are used for filtering.
具体来说,对重建图像块中的每一个4x4块根据拉普拉斯方向进行分 类Specifically, each 4x4 block in the reconstructed image block is classified according to the Laplacian direction
Figure PCTCN2020084047-appb-000001
Figure PCTCN2020084047-appb-000001
其中,C代表4x4块的所属类别;D表示方向分类结果;
Figure PCTCN2020084047-appb-000002
表示进行方向分类之后的细分类结果。
Among them, C represents the category of the 4x4 block; D represents the direction classification result;
Figure PCTCN2020084047-appb-000002
Indicates the fine classification result after the direction classification.
D的计算方式如下:D is calculated as follows:
Figure PCTCN2020084047-appb-000003
Figure PCTCN2020084047-appb-000003
Figure PCTCN2020084047-appb-000004
Figure PCTCN2020084047-appb-000004
Figure PCTCN2020084047-appb-000005
Figure PCTCN2020084047-appb-000005
Figure PCTCN2020084047-appb-000006
Figure PCTCN2020084047-appb-000006
其中,i,j代表4x4块在整个图像块中的坐标位置;R(k,l)代表4x4块中位于(k,l)位置的像素值;V k,l代表4x4块中位于(i,j)坐标的像素在列方向的拉普拉斯梯度;H k,l代表4x4块中位于(i,j)坐标的像素在行方向拉普拉斯梯度;D1 k,l代表4x4块中位于(i,j)坐标的像素在135度方向拉普拉斯梯度;D2 k,l代表4x4块中位于(i,j)坐标的像素在45度拉普拉斯梯度;g v代表4x4块在列方向的拉普拉斯梯度;g h代表4x4块在行方向的拉普拉斯梯度;g d1代表4x4块在135度方向的拉普拉 斯梯度;g d2代表4x4块在45度方向的拉普拉斯梯度。 Among them, i,j represent the coordinate position of the 4x4 block in the entire image block; R(k,l) represents the pixel value located at the (k,l) position in the 4x4 block; V k,l represents the 4x4 block located at (i, j) The Laplacian gradient of the pixel of the coordinate in the column direction; H k,l represents the Laplacian gradient of the pixel located at the (i,j) coordinate in the 4x4 block in the row direction; D1 k,l represents the Laplacian gradient of the pixel located in the 4x4 block (i, j) coordinates of pixels in the 135 degree Laplacian gradient; D2 k, l represents the 4x4 block at the (i, j) coordinates of the pixel at 45 degrees Laplacian gradient; g v represents the 4x4 block in the Laplacian gradient Laplacian gradient in the column direction; g h represents the Laplacian gradient of the 4x4 block in the row direction; g d1 represents the Laplacian gradient of the 4x4 block in the 135 degree direction; g d2 represents the 4x4 block in the 45 degree direction Laplace gradient.
Figure PCTCN2020084047-appb-000007
Figure PCTCN2020084047-appb-000007
Figure PCTCN2020084047-appb-000008
Figure PCTCN2020084047-appb-000008
Figure PCTCN2020084047-appb-000009
Figure PCTCN2020084047-appb-000009
Figure PCTCN2020084047-appb-000010
Figure PCTCN2020084047-appb-000010
其中,
Figure PCTCN2020084047-appb-000011
代表行、列方向拉普拉斯梯度值的最大值;
Figure PCTCN2020084047-appb-000012
代表行、列方向拉普拉斯梯度值的最小值;
Figure PCTCN2020084047-appb-000013
代表45、135方向拉普拉斯梯度值的最大值;
Figure PCTCN2020084047-appb-000014
代表45、135方向拉普拉斯梯度值的最小值;R h,v代表行、列方向拉普拉斯梯度的比值;R d0,d1代表45、135方向拉普拉斯梯度的比值。
in,
Figure PCTCN2020084047-appb-000011
Represents the maximum value of the Laplacian gradient in the row and column directions;
Figure PCTCN2020084047-appb-000012
Represents the minimum value of the Laplacian gradient in the row and column directions;
Figure PCTCN2020084047-appb-000013
Represents the maximum value of the Laplacian gradient in the 45 and 135 directions;
Figure PCTCN2020084047-appb-000014
Represents the minimum value of the Laplacian gradient in the 45 and 135 directions; R h, v represents the ratio of the Laplacian gradient in the row and column directions; R d0, d1 represents the ratio of the Laplacian gradient in the 45 and 135 directions.
如果
Figure PCTCN2020084047-appb-000015
而且
Figure PCTCN2020084047-appb-000016
D设置为0;
if
Figure PCTCN2020084047-appb-000015
and
Figure PCTCN2020084047-appb-000016
D is set to 0;
如果
Figure PCTCN2020084047-appb-000017
而且
Figure PCTCN2020084047-appb-000018
D设置为1;
if
Figure PCTCN2020084047-appb-000017
and
Figure PCTCN2020084047-appb-000018
D is set to 1;
如果
Figure PCTCN2020084047-appb-000019
而且
Figure PCTCN2020084047-appb-000020
D设置为2;
if
Figure PCTCN2020084047-appb-000019
and
Figure PCTCN2020084047-appb-000020
D is set to 2;
如果
Figure PCTCN2020084047-appb-000021
而且
Figure PCTCN2020084047-appb-000022
D设置为3;
if
Figure PCTCN2020084047-appb-000021
and
Figure PCTCN2020084047-appb-000022
D is set to 3;
如果
Figure PCTCN2020084047-appb-000023
而且
Figure PCTCN2020084047-appb-000024
D设置为4;
if
Figure PCTCN2020084047-appb-000023
and
Figure PCTCN2020084047-appb-000024
D is set to 4;
其中,t1和t2为预设的阈值。Among them, t1 and t2 are preset thresholds.
Figure PCTCN2020084047-appb-000025
的计算方式如下:
Figure PCTCN2020084047-appb-000025
Is calculated as follows:
Figure PCTCN2020084047-appb-000026
Figure PCTCN2020084047-appb-000026
之后将A量化,得到0~4之间的整数,作为
Figure PCTCN2020084047-appb-000027
的值。
Then quantize A to get an integer between 0 and 4, as
Figure PCTCN2020084047-appb-000027
Value.
按照上述方法,可将亮度分量的像素分为25类,从而对应有25套滤波系数。According to the above method, the pixels of the brightness component can be divided into 25 categories, which corresponds to 25 sets of filter coefficients.
ALF可分为线性自适应环路滤波和非线性自适应环路滤波。线性ALF 可以用以下公式来表示:ALF can be divided into linear adaptive loop filtering and nonlinear adaptive loop filtering. Linear ALF can be expressed by the following formula:
Figure PCTCN2020084047-appb-000028
Figure PCTCN2020084047-appb-000028
其中,I(x+i,y+j)是ALF滤波前的像素值,也就是ALF滤波器的输入;O(x,y)代表位于重建图像块(x,y)位置的ALF滤波后的像素值,也就是ALF滤波器的输出;w(i,j)代表ALF滤波系数;(i,j)表示滤波器中的像素距离待滤波像素的相对位置。Among them, I(x+i, y+j) is the pixel value before ALF filtering, that is, the input of the ALF filter; O(x, y) represents the ALF filtered at the position of the reconstructed image block (x, y) The pixel value is the output of the ALF filter; w(i,j) represents the ALF filter coefficient; (i,j) represents the relative position of the pixel in the filter from the pixel to be filtered.
为了保证ALF滤波系数全部为整数,线性ALF还对所有ALF系数进行了放大操作,也就是将原始的ALF滤波系数放大128倍,再转化为整数。In order to ensure that all ALF filter coefficients are integers, linear ALF also amplifies all ALF coefficients, that is, amplifies the original ALF filter coefficients by 128 times and then converts them to integers.
线性ALF还可以用以下公式来表示:Linear ALF can also be expressed by the following formula:
Figure PCTCN2020084047-appb-000029
Figure PCTCN2020084047-appb-000029
其中,L代表ALF滤波器长度;对于7x7菱形,L=7;对于5x5菱形,L=5。Among them, L represents the length of the ALF filter; for a 7x7 diamond, L=7; for a 5x5 diamond, L=5.
由于所有ALF滤波系数加和之后为128,也就是未经放大之前,所有ALF滤波系数加和为1,上述线性ALF的公式可以等价转化为如下形式:Since the sum of all ALF filter coefficients is 128, that is, before the amplification, the sum of all ALF filter coefficients is 1, the above linear ALF formula can be equivalently transformed into the following form:
O(x,y)=I(x,y)+∑ (i,j)≠(0,0)w(i,j).(I(x+i,y+j)-I(x,y))。 O(x,y)=I(x,y)+∑ (i,j)≠(0,0) w(i,j).(I(x+i,y+j)-I(x,y )).
非线性ALF与线性ALF的区别在于,非线性ALF引入了剪切(Clip)操作,每一套滤波系数都对应一个clip参数,每一个clip参数对应一个索引,索引也经熵编码编入码流,并发送给解码端。The difference between nonlinear ALF and linear ALF is that nonlinear ALF introduces a clip operation, each set of filter coefficients corresponds to a clip parameter, and each clip parameter corresponds to an index, and the index is also encoded into the code stream by entropy coding , And send to the decoder.
非线性ALF用以下公式表示:Non-linear ALF is expressed by the following formula:
Figure PCTCN2020084047-appb-000030
Figure PCTCN2020084047-appb-000030
其中,K(d,b)=min(b,max(-b,d)表示clip的操作,k(i,j)代表clip的参数,每一个ALF滤波系数都会对应一个clip的参数,该参数从以下数值中进行选择:Among them, K (d, b) = min (b, max (-b, d) represents the operation of the clip, k (i, j) represents the parameters of the clip, each ALF filter coefficient corresponds to a parameter of the clip, the parameter Choose from the following values:
对于亮度分量,从{1024、181、32、6}中选择一个;For the luminance component, select one from {1024, 181, 32, 6};
对于色度分量,从{1024、161、25、4}中选择一个;For chrominance components, select one from {1024, 161, 25, 4};
每个参数值可以对应一个索引值,例如,clip参数1024的索引值为0,clip参数181的索引值为1。索引值至也经熵编码编入码流,并发送给解码端。Each parameter value may correspond to an index value. For example, the index value of clip parameter 1024 is 0, and the index value of clip parameter 181 is 1. The index value is also encoded into the code stream by entropy coding and sent to the decoding end.
为了图像块的行级并行处理,ALF不可以跨越虚拟滤波边界滤波。对于亮度分量,如图8a所示,对于待滤波像素C12,当周围像素位于虚拟滤波边界另一侧时,不使用位于另一侧的像素及其几何对称位置的像素对C12进行滤波。例如,对于图8a中的第一行的两个附图,C0位置的像素位于虚拟滤波边界的另一侧,则上下两个C0位置的像素都不使用,同时将C2位置的两个像素的滤波系数更新为c2+c0,其中,c2为C2位置像素的原始滤波系数,c0为C0位置像素的原始滤波系数。类似的,对于图8a中的第二行的两个附图,如果C0-C3位置的像素位于虚拟滤波边界的另一侧,则将C5位置的两个像素的滤波系数更新为c5+c1,将C6位置的两个像素的滤波系数更新为c6+c2+c0,将C7位置的两个像素的滤波系数更新为c7+c3。对于图8a中的第三行的两个附图,如果C0-C8位置的像素位于虚拟滤波边界的另一侧,则将C10位置的两个像素的滤波系数更新为c10+c4+c8,将C11位置的两个像素的滤波系数更新为c11+c5+c7+c3+c1,将C12位置的两个像素的滤波系数更新为c12+2*c6+2*c2+2*c0。其中,c0-c12表示滤波系数或滤波权重。For the row-level parallel processing of image blocks, ALF cannot filter across virtual filter boundaries. For the luminance component, as shown in FIG. 8a, for the pixel C12 to be filtered, when the surrounding pixels are on the other side of the virtual filtering boundary, the pixels on the other side and the pixels at their geometrically symmetric positions are not used to filter C12. For example, for the two drawings in the first row in Fig. 8a, the pixel at C0 is located on the other side of the virtual filter boundary, the upper and lower pixels at C0 are not used, and the two pixels at C2 are not used. The filter coefficient is updated to c2+c0, where c2 is the original filter coefficient of the pixel at C2, and c0 is the original filter coefficient of the pixel at C0. Similarly, for the two drawings in the second row of Figure 8a, if the pixel at position C0-C3 is on the other side of the virtual filter boundary, then the filter coefficients of the two pixels at position C5 are updated to c5+c1, The filter coefficients of the two pixels at the C6 position are updated to c6+c2+c0, and the filter coefficients of the two pixels at the C7 position are updated to c7+c3. For the two drawings in the third row of Fig. 8a, if the pixel at position C0-C8 is on the other side of the virtual filter boundary, the filter coefficients of the two pixels at position C10 are updated to c10+c4+c8, and the The filter coefficients of the two pixels at the C11 position are updated to c11+c5+c7+c3+c1, and the filter coefficients of the two pixels at the C12 position are updated to c12+2*c6+2*c2+2*c0. Among them, c0-c12 represent filter coefficients or filter weights.
色度分量与亮度分量处理方式类似,如图8b所示,对于待滤波像素C6,当周围像素位于虚拟滤波边界另一侧时,不使用位于另一侧的像素及其几何对称位置的像素对C6进行滤波。例如,C0位置的像素位于虚拟滤波边界的另一侧,则上下两个C0位置的像素都不使用,同时将C2位置的两个像素的滤波系数更新为c2+c0,其中,c2为C2位置像素的原始滤波系数,c0为C0位置像素的原始滤波系数。类似的,如果C0-C3位置的像素位于虚拟滤波边界的另一侧,则将C5位置的两个像素的滤波系数更新为c5+c1+c3,将C6位置的两个像素的滤波系数更新为c6+2*c2+2*c0。The chrominance component is processed in a similar way to the luminance component. As shown in Figure 8b, for the pixel C6 to be filtered, when the surrounding pixels are on the other side of the virtual filtering boundary, the pixels on the other side and their geometrically symmetrical pixel pairs are not used. C6 performs filtering. For example, if the pixel at C0 is on the other side of the virtual filter boundary, the upper and lower pixels at C0 are not used, and the filter coefficients of the two pixels at C2 are updated to c2+c0, where c2 is the C2 position The original filter coefficient of the pixel, c0 is the original filter coefficient of the pixel at C0. Similarly, if the pixels at C0-C3 are on the other side of the virtual filter boundary, the filter coefficients of the two pixels at C5 are updated to c5+c1+c3, and the filter coefficients of the two pixels at C6 are updated to c6+2*c2+2*c0.
CCALF使用亮度分量对色度分量进行滤波,用于提升色度分量的质量。如图9所示,在ALF之后,CCALF使用ALF前的亮度分量(即SAO 后的亮度分量)对ALF后的色度分量Cr/Cb进行滤波,CCALF的滤波值作为色度分量Cr/Cb的ALF偏移量,并将ALF偏移量与色度分量Cr/Cb的ALF滤波值相加,将相加的结果作为色度分量Cr/Cb的环路滤波结果。CCALF uses the luminance component to filter the chrominance component to improve the quality of the chrominance component. As shown in Figure 9, after ALF, CCALF uses the luminance component before ALF (that is, the luminance component after SAO) to filter the chrominance component Cr/Cb after ALF, and the filter value of CCALF is used as the chrominance component Cr/Cb. ALF offset, and add the ALF offset to the ALF filter value of the chrominance component Cr/Cb, and use the added result as the loop filter result of the chrominance component Cr/Cb.
如图10a和图10b所示,CCALF滤波器的形状为3x4菱形,2对应的色度分量像素为待滤波像素。使用2对应的亮度分量像素和周围的亮度分量像素0-7乘以各自的CCALF滤波系数,再将乘积加和,即可得到2对应的色度分量像素的CCALF滤波结果。每帧图像可以包括多套CCALF滤波系数,色度分量Cb和Cr具有各自的CCALF滤波系数,CCALF系数套数对应有索引,每个重建图像块使用的索引也经熵编码编入码流,并发送给解码端。As shown in Fig. 10a and Fig. 10b, the shape of the CCALF filter is a 3x4 rhombus, and the chrominance component pixel corresponding to 2 is the pixel to be filtered. Use the luminance component pixels corresponding to 2 and the surrounding luminance component pixels 0-7 to multiply their respective CCALF filter coefficients, and then add the products to obtain the CCALF filtering result of the chrominance component pixels corresponding to 2. Each frame of image can include multiple sets of CCALF filter coefficients, the chrominance components Cb and Cr have their own CCALF filter coefficients, the number of CCALF coefficient sets corresponds to an index, and the index used by each reconstructed image block is also encoded into the code stream by entropy coding and sent To the decoding end.
对于CCALF,当图像采样格式为420时,亮度分量和色度分量在列方向上的采样比例为2∶1,如图11所示,亮度分量和色度分量在列方向上的虚拟滤波边界的偏移值比例为4∶2,即采样比例与偏移值比例相同,对于色度分量位于虚拟滤波边界上侧的像素,其对应的CCALF的亮度分量像素也位于虚拟滤波边界上侧,即色度分量及其对应的亮度分量均位于虚拟滤波边界的同一侧。如图11中,色度分量像素A、B、C和D对应的CCALF的亮度分量像素分别为A1、B1、C1和D1。其中,A和B位于色度分量虚拟滤波边界上侧,A和B对应的A1和B1同样位于亮度分量虚拟滤波边界上侧。这样当进行图像块行级(例如CTU行级)的并行操作时,在对上一行图像块(即虚拟滤波边界上侧的一行CTU)进行CCALF滤波时,由于亮度分量的SAO已经完成,从而只通过上一行图像块即可实现对虚拟滤波边界上侧的所有色度分量像素的CCALF。For CCALF, when the image sampling format is 420, the sampling ratio of the luminance component and the chrominance component in the column direction is 2:1, as shown in Figure 11, the virtual filter boundary of the luminance component and the chrominance component in the column direction The offset value ratio is 4:2, that is, the sampling ratio is the same as the offset value ratio. For pixels with chroma components located on the upper side of the virtual filter boundary, the corresponding CCALF luminance component pixels are also located on the upper side of the virtual filter boundary, that is, color The degree component and its corresponding luminance component are all located on the same side of the virtual filtering boundary. As shown in Fig. 11, the luminance component pixels of CCALF corresponding to the chrominance component pixels A, B, C, and D are A1, B1, C1, and D1, respectively. Among them, A and B are located on the upper side of the virtual filtering boundary of the chrominance component, and A1 and B1 corresponding to A and B are also located on the upper side of the virtual filtering boundary of the luminance component. In this way, when performing parallel operations at the image block line level (for example, CTU line level), when performing CCALF filtering on the previous line of image blocks (ie, one line of CTU on the upper side of the virtual filter boundary), the SAO of the luminance component has been completed, so only The CCALF of all the chrominance component pixels on the upper side of the virtual filtering boundary can be realized through the image block in the upper row.
而当亮度分量和色度分量在列方向的采样比例与亮度分量和色度分量在列方向的虚拟滤波边界的偏移值比例不同时,例如,图像采样格式为422和444时,如图12所示,亮度分量和色度分量在列方向上的采样比例为1∶1,亮度分量和色度分量在列方向上的虚拟滤波边界的偏移值比例为4∶2,使得A和B位于色度分量虚拟滤波边界上侧,而A和B对应的A1和B1却位于亮度分量虚拟滤波边界下侧,即色度分量及其对应的亮度分量位于虚拟滤波边界的不同侧。这样在对上一行图像块的色度分量进行CCALF滤波时,由于A和B对应的A1和B1位于亮度分量的虚拟滤波边 界下侧,因此,只有等到下一行图像块(即虚拟滤波边界下侧的一行CTU)的亮度分量进行完SAO后,才能对A和B这两个色度分量进行CCALF,这样就在CCALF中增加了额外的等待时间,降低了CCALF的滤波效率,增加了视频编解码过程的时间。同时,由于要等待下一行图像块的亮度分量完成SAO,在等待的过程中,需要缓存器缓存A和B的ALF滤波值。当下一行图像块的亮度分量完成SAO后,再将缓存器中的A和B的ALF滤波值读出进行CCALF,所以还需要占用缓存器更多的缓存空间。因此,上述的CCALF处理方式存在滤波效率低、占用缓存空间大的缺陷。When the sampling ratio of the luminance component and the chrominance component in the column direction is different from the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the column direction, for example, when the image sampling format is 422 and 444, as shown in Figure 12 As shown, the sampling ratio of the luminance component and the chrominance component in the column direction is 1:1, and the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the column direction is 4:2, so that A and B are located at The chrominance component is on the upper side of the virtual filtering boundary, while A1 and B1 corresponding to A and B are located on the lower side of the luminance component virtual filtering boundary, that is, the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary. In this way, when performing CCALF filtering on the chrominance component of the previous line of image blocks, since A1 and B1 corresponding to A and B are located under the virtual filtering boundary of the luminance component, it is only necessary to wait until the next line of image blocks (ie, the lower side of the virtual filtering boundary). CCALF can be performed on the two chrominance components A and B only after the luminance component of one row of CTU) has been SAO. This adds extra waiting time in CCALF, reduces the filtering efficiency of CCALF, and increases video codec The time of the process. At the same time, since it is necessary to wait for the brightness component of the next line of image blocks to complete the SAO, a buffer is needed to buffer the ALF filter values of A and B during the waiting process. After the brightness component of the next line of image blocks completes the SAO, the ALF filter values of A and B in the buffer are read out for CCALF, so more buffer space of the buffer is needed. Therefore, the above-mentioned CCALF processing method has the defects of low filtering efficiency and large buffer space occupation.
本公开一实施例提供了一种视频编解码方法,该视频编解码方法可以应用在视频编码端,也可以应用在视频解码端,可以应用在同时具有视频编码和视频解码功能的装置,能够解决上述滤波效率低、占用缓存空间大的问题。如图13所示,该视频编解码方法包括:An embodiment of the present disclosure provides a video encoding and decoding method. The video encoding and decoding method can be applied to a video encoding end or a video decoding end, and can be applied to a device that has both video encoding and video decoding functions. The above-mentioned problems of low filtering efficiency and large buffer space occupation. As shown in Figure 13, the video encoding and decoding method includes:
步骤S1301:对色度分量进行滤波。Step S1301: filtering the chrominance components.
步骤S1302:当色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用色度分量对应的亮度分量对所述滤波后的色度分量进行跨分量滤波。Step S1302: When the chrominance component and its corresponding brightness component are located on different sides of the virtual filtering boundary, it is forbidden to use the brightness component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
其中,本申请实施例中提及的环路滤波、自适应环路滤波、跨分量自适应环路滤波等还可以有其他名称,本申请仅作为示例,不作限定。Among them, the loop filtering, adaptive loop filtering, cross-component adaptive loop filtering, etc. mentioned in the embodiments of this application may also have other names, and this application is only an example and is not limited.
步骤S1301中的对色度分量进行滤波,包括对色度分量的重建图像块进行DF、SAO或ALF中的一项或多项,得到色度分量滤波后的滤波结果。例如,对色度分量进行滤波包括:对色度分量的重建图像块进行ALF,得到ALF后的滤波结果。The filtering of the chrominance component in step S1301 includes performing one or more of DF, SAO, or ALF on the reconstructed image block of the chrominance component to obtain a filtering result after the chrominance component is filtered. For example, filtering the chrominance component includes: performing ALF on the reconstructed image block of the chrominance component to obtain the filtering result after ALF.
在步骤S1302中,色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧,禁止使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波,这里,跨分量滤波可以包括跨分量自适应环路滤波。In step S1302, the chrominance components and their corresponding brightness components are located on different sides of the virtual filtering boundary, and it is forbidden to use the brightness components corresponding to the chrominance components to perform cross-component filtering on the filtered chrominance components. Here, cross-component filtering can be Including cross-component adaptive loop filtering.
示例性的,色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧,可以包括亮度分量和色度分量在第一方向上的采样比例与亮度分量和色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同的情况。Exemplarily, the chrominance component and its corresponding luminance component are located on different sides of the virtual filter boundary, and may include the sampling ratio of the luminance component and the chrominance component in the first direction and the luminance component and the chrominance component in the first direction. When the ratio of the offset value of the virtual filter boundary in the direction is different.
示例性的,本实施例所述的对应,也可称为关联、参考、映射等。“对应”可以理解为,色度分量在进行跨分量自适应环路滤波时所参考的亮度 分量,例如是相同位置或者同一组的亮度分量。例如,当图像采样格式为444或422时,色度分量在进行跨分量自适应环路滤波时所参考的亮度分量是与之位置相同的亮度分量。对于420时,色度分量在进行跨分量自适应环路滤波时所参考的亮度分量是与之为同一组的亮度分量。例如,在图11中,A1是与A同一组的亮度分量,B1是与B同一组的亮度分量。Exemplarily, the correspondence described in this embodiment may also be referred to as association, reference, mapping, and so on. "Correspondence" can be understood as the luminance component that the chrominance component refers to when performing cross-component adaptive loop filtering, for example, the luminance component at the same position or the same group. For example, when the image sampling format is 444 or 422, the luminance component that the chrominance component refers to when performing cross-component adaptive loop filtering is the luminance component with the same position. For 420, the luminance component that the chrominance component refers to when performing cross-component adaptive loop filtering is the luminance component of the same group. For example, in FIG. 11, A1 is the brightness component of the same group as A, and B1 is the brightness component of the same group as B.
偏移值也可以称为偏移、错位、错位值、距离、距离值等,指的是虚拟滤波边界相较于编码图像块之间的边界的偏移值,表示虚拟滤波边界与编码图像块边界之间的像素数量。编码图像块可以是编码树单元(CTU),还可以是CTU包含的编码单元(Coding Unit,CU)、CU包含的预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU)。例如,在图像列方向,针对亮度分量,虚拟滤波边界的偏移值为4,即4行像素,也是亮度分量的虚拟滤波边界相较于CTU边界错位了4行像素。The offset value can also be called offset, misalignment, misalignment value, distance, distance value, etc. It refers to the offset value of the virtual filter boundary compared to the boundary between the coded image blocks, and represents the virtual filter boundary and the coded image block. The number of pixels between the borders. The coded image block may be a coding tree unit (CTU), a coding unit (CU) included in the CTU, a prediction unit (PU) and a transform unit (TU) included in the CU. For example, in the image column direction, for the luminance component, the offset value of the virtual filter boundary is 4, that is, 4 rows of pixels, and the virtual filter boundary of the luminance component is shifted by 4 rows of pixels compared to the CTU boundary.
在一个示例中,所述第一方向指的是亮度分量和色度分量的列方向。在其他示例中,所述第一方向还可以指亮度分量和色度分量的其他方向,例如行方向。In an example, the first direction refers to the column direction of the luminance component and the chrominance component. In other examples, the first direction may also refer to other directions of the luminance component and the chrominance component, such as the row direction.
图像采样格式包括420、422、444以及任何其他可能的采样格式,采样比例可以是1∶1、2∶1以及任何其他可能的采样比例。亮度分量在列方向上的虚拟滤波边界的偏移值可以包括4、以及任何其他可能的值,色度分量在列方向上的虚拟滤波边界的偏移值可以包括2、以及任何其他可能的值,偏移值比例可以是2∶1、以及任何其他可能的值。The image sampling format includes 420, 422, 444, and any other possible sampling formats, and the sampling ratio can be 1:1, 2:1, and any other possible sampling ratios. The offset value of the virtual filter boundary of the luminance component in the column direction can include 4, and any other possible values, and the offset value of the virtual filter boundary of the chrominance component in the column direction can include 2, and any other possible values. , The offset value ratio can be 2:1, and any other possible values.
在本实施例中,当亮度分量与色度分量在第一方向上的采样比例与亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同包括:亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例。只要上述采样比例小于偏移值比例,当色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,本实施例就禁止使用色度分量对应的亮度分量对滤波后的色度分量进行CCALF。In this embodiment, when the sampling ratio of the luminance component and the chrominance component in the first direction is different from the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction, it includes: the luminance component and the chrominance component in the first direction. The sampling ratio of the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filtering boundary of the luminance component and the chrominance component in the first direction. As long as the above sampling ratio is less than the offset value ratio, when the chrominance component and its corresponding brightness component are located on different sides of the virtual filtering boundary, this embodiment prohibits the use of the brightness component corresponding to the chrominance component to the filtered chrominance component. Proceed to CCALF.
本实施例中,禁止使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波包括:禁止使用与色度分量位于虚拟滤波边界的不同侧的亮度分量对滤波后的色度分量进行跨分量滤波。In this embodiment, prohibiting the use of the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component includes: prohibiting the use of the luminance component that is located on a different side of the virtual filtering boundary from the chrominance component to the filtered chrominance component Perform cross-component filtering.
作为一个示例,禁止使用与色度分量位于虚拟滤波边界的不同侧的亮度分量对滤波后的色度分量进行跨分量滤波包括:As an example, prohibiting the use of luminance components located on a different side of the virtual filtering boundary from the chrominance component to perform cross-component filtering on the filtered chrominance component includes:
使用与色度分量位于虚拟滤波边界的同一侧的亮度分量对滤波后的色度分量进行CCALF。CCALF is performed on the filtered chrominance component using the luminance component located on the same side of the virtual filtering boundary as the chrominance component.
本实施例中,色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧是指,色度分量及其对应的亮度分量分别位于虚拟滤波边界的相对两侧。例如,当色度分量位于虚拟滤波边界的上侧时,其对应的亮度分量位于虚拟滤波边界的下侧;当色度分量位于虚拟滤波边界的下侧时,其对应的亮度分量位于虚拟滤波边界的上侧。In this embodiment, that the chrominance component and its corresponding brightness component are respectively located on different sides of the virtual filtering boundary means that the chrominance component and its corresponding brightness component are located on opposite sides of the virtual filtering boundary. For example, when the chrominance component is located on the upper side of the virtual filtering boundary, its corresponding luminance component is located on the lower side of the virtual filtering boundary; when the chrominance component is located on the lower side of the virtual filtering boundary, its corresponding luminance component is located on the virtual filtering boundary. On the upper side.
以下以图像采样格式为422和444、列方向的采样比例为1∶1,亮度分量在列方向上的虚拟滤波边界的偏移值为4、色度分量在列方向上的虚拟滤波边界的偏移值为2、偏移值比例为2∶1为例,对本实施例做进一步的说明。In the following, the image sampling format is 422 and 444, the sampling ratio in the column direction is 1:1, the offset value of the virtual filter boundary of the luminance component in the column direction is 4, and the offset value of the virtual filter boundary of the chrominance component in the column direction is 4. The shift value is 2 and the shift value ratio is 2:1 as an example, and this embodiment is further described.
本领域技术人员可以根据实际情况按照距离远近为色度分量选择亮度分量。在一个示例中,使用与色度分量位于虚拟滤波边界的同一侧的亮度分量对滤波后的色度分量进行CCALF包括:Those skilled in the art can select the luminance component for the chrominance component according to the distance according to the actual situation. In an example, performing CCALF on the filtered chrominance component using the luminance component on the same side of the virtual filtering boundary as the chrominance component includes:
使用与色度分量位于虚拟滤波边界的同一侧的且距离色度分量最近的亮度分量对滤波后的色度分量进行CCALF。CCALF is performed on the filtered chrominance component using the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component and is closest to the chrominance component.
当自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的色度分量为多个时,可使用距离色度分量最近的一个亮度分量对滤波后的色度分量进行CCALF。When there are multiple chrominance components that are located on different sides of the virtual filtering boundary by themselves and their corresponding luminance components, a luminance component closest to the chrominance component can be used to perform CCALF on the filtered chrominance component.
如图14所示,由于A和B及其对应的A1和B1位于虚拟滤波边界的不同侧,使用与A和B位于虚拟滤波边界的同一侧、且距离色度分量A和B最近的亮度分量A1/B1,对ALF后的A和B进行CCALF。所述距离指的是像素数量,也可以成为偏移、偏差、错位。将亮度分量虚拟滤波边界上侧的第一个像素作为距离色度分量A和B最近的像素,使用亮度分量A1/B1对ALF后的A和B进行CCALF。这样,在对上一行图像块进行CCALF滤波时,对于色度分量的A和B来说,由于亮度分量A1/B1的SAO已经完成,在上一行图像块的滤波过程中即可实现对色度分量的A和B的CCALF,从而完成虚拟滤波边界上侧的所有亮度分量像素的 CCALF,而无需等到下一行图像块的亮度分量进行完SAO后,这样就消除了CCALF中的上述额外等待时间,从而提高了CCALF的滤波效率,缩短了视频编解码过程的时间。同时,由于无需等待过程,所以缓存器也无需缓存A和B的ALF滤波值,从而节省了缓存器的缓存空间。As shown in Figure 14, since A and B and their corresponding A1 and B1 are located on different sides of the virtual filter boundary, the luminance component that is located on the same side of the virtual filter boundary as A and B and is closest to the chrominance components A and B is used. A1/B1, perform CCALF on A and B after ALF. The distance refers to the number of pixels, and can also be offset, deviation, or misalignment. The first pixel on the upper side of the virtual filter boundary of the luminance component is taken as the pixel closest to the chrominance components A and B, and the luminance component A1/B1 is used to perform CCALF on A and B after ALF. In this way, when performing CCALF filtering on the image block of the previous row, for the chrominance components A and B, since the SAO of the luminance component A1/B1 has been completed, the chrominance can be achieved in the filtering process of the image block of the previous row. The CCALF of the components A and B, thus completing the CCALF of all the brightness component pixels on the upper side of the virtual filter boundary, without waiting until the brightness component of the next line of image blocks has been SAO, thus eliminating the above-mentioned extra waiting time in CCALF, Thereby improving the filtering efficiency of CCALF and shortening the time of the video encoding and decoding process. At the same time, since there is no waiting process, the buffer does not need to buffer the ALF filter values of A and B, thereby saving the buffer space of the buffer.
除了可以使用与色度分量位于虚拟滤波边界的同一侧且距离色度分量最近的亮度分量对色度分量进行CCALF以外,还可以使用与色度分量位于虚拟滤波边界的同一侧且距离色度分量非最近的亮度分量对色度分量进行CCALF。非最近例如可以是第二近、第三近等,可以将与色度分量位于虚拟滤波边界的同一侧的亮度分量按照与色度分量的距离由近及远进行排序,使用排序第二或第三或第四的亮度分量对色度分量进行CCALF。例如图14中,可以使用距离色度分量A/B距离非最近(按照距离由近及远进行排序,排序第二或第三或第四)的像素对色度分量A/B进行CCALF。例如图15中,可以使用距离色度分量A/B距离排序第二的像素A1/B1对色度分量A/B进行CCALF。In addition to using the luminance component that is located on the same side of the virtual filter boundary as the chrominance component and is closest to the chrominance component for CCALF, you can also use the chrominance component located on the same side of the virtual filter boundary and away from the chrominance component. The non-nearest luminance component performs CCALF on the chrominance component. The non-nearest can be, for example, the second closest, the third closest, etc. The luminance components on the same side of the virtual filter boundary as the chrominance component can be sorted according to the distance from the chrominance component from the nearest to the farthest. The third or fourth luminance component performs CCALF on the chrominance component. For example, in FIG. 14, pixels that are not the closest to the chrominance component A/B (sorted according to the distance from near to far, second or third or fourth) can be used to perform CCALF on the chrominance component A/B. For example, in FIG. 15, the pixel A1/B1 with the second order of the distance to the chrominance component A/B can be used to perform CCALF on the chrominance component A/B.
当自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的色度分量为多个时,还可使用与距离色度分量最近的多个亮度分量对滤波后的色度分量进行CCALF。这多个亮度分量像素的数量等于自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的色度分量的像素数量。When there are multiple chrominance components that are respectively located on different sides of the virtual filter boundary and their corresponding luminance components, multiple luminance components closest to the chrominance component can also be used to perform CCALF on the filtered chrominance component. The number of the plurality of luminance component pixels is equal to the number of pixels of the chrominance component that themselves and their corresponding luminance components are located on different sides of the virtual filter boundary.
首先确定自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的色度分量的像素数量。First, determine the number of pixels of the chrominance component of itself and its corresponding luminance component on different sides of the virtual filter boundary.
然后根据上述色度分量的像素数量确定与色度分量位于虚拟滤波边界的同一侧的亮度分量的数量。Then, the number of luminance components located on the same side of the virtual filter boundary as the chrominance component is determined according to the number of pixels of the chrominance component.
再确定距离色度分量最近的、与上述色度分量像素数量相同的亮度分量,并利用确定的亮度分量对滤波后的色度分量进行CCALF。Then determine the brightness component that is closest to the chrominance component and have the same number of pixels as the chrominance component, and use the determined brightness component to perform CCALF on the filtered chrominance component.
例如在图16中,自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的两个色度分量为A和B,确定与A和B位于虚拟滤波边界的同一侧的亮度分量为两个,确定距离色度分量最近的两个像素A1和B1,A1和B1分别是位于虚拟滤波边界上侧的第二个和第一个像素。本实施例中,A1可以位于B1的上侧,如图16所示;也可以位于B1的下侧,如图17所示。分别利用A1和B1对环路滤波后的A和B进行CCALF。For example, in Figure 16, the two chrominance components of themselves and their corresponding brightness components located on different sides of the virtual filter boundary are A and B. It is determined that there are two brightness components located on the same side of the virtual filter boundary as A and B. Determine the two pixels A1 and B1 closest to the chrominance component. A1 and B1 are the second and first pixels located on the upper side of the virtual filtering boundary, respectively. In this embodiment, A1 may be located on the upper side of B1, as shown in FIG. 16; it may also be located on the lower side of B1, as shown in FIG. CCALF is performed on A and B after loop filtering by using A1 and B1 respectively.
以上只是示例性的说明,除了可以使用图14中的“距离色度分量最近的亮度分量”A1/B1以外,在另一个示例中,使用与色度分量位于虚拟滤波边界的同一侧的亮度分量对滤波后的色度分量进行CCALF还可以包括:The above is only an exemplary description. In addition to the "luminance component closest to the chrominance component" A1/B1 in FIG. 14 can be used, in another example, the luminance component located on the same side of the virtual filter boundary as the chrominance component is used. Performing CCALF on the filtered chrominance components may also include:
使用与色度分量位于虚拟滤波边界的同一侧的、且距离色度分量为预设距离的亮度分量对滤波后的色度分量进行CCALF。The CCALF is performed on the filtered chrominance component using the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component and is a preset distance from the chrominance component.
当自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的色度分量为多个时,可使用距离色度分量为预设距离的一个亮度分量对滤波后的色度分量进行CCALF。When there are multiple chrominance components that are located on different sides of the virtual filter boundary with their corresponding luminance components, a luminance component whose distance from the chrominance component is a preset distance can be used to perform CCALF on the filtered chrominance component.
示例性的,预设距离指的是像素数量。例如,预设距离可以是两个、三个或四个像素。以预设距离为两个像素为例,如图16所示,使用距离色度分量A两个像素且位于虚拟滤波边界同一侧的亮度分量A1对色度分量A进行CCALF,使用距离色度分量B两个像素且位于虚拟滤波边界同一侧的亮度分量B1对色度分量B进行CCALF。Exemplarily, the preset distance refers to the number of pixels. For example, the preset distance may be two, three, or four pixels. Taking the preset distance of two pixels as an example, as shown in Figure 16, the luminance component A1 that is two pixels away from the chrominance component A and on the same side of the virtual filter boundary is used to perform CCALF on the chrominance component A, and the distance chrominance component is used The luminance component B1 of two pixels B and located on the same side of the virtual filter boundary performs CCALF on the chrominance component B.
当自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的色度分量为多个时,还可使用与距离色度分量为预设距离的多个亮度分量对滤波后的色度分量进行CCALF。这多个亮度分量像素的数量等于自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的色度分量的像素数量。When there are multiple chrominance components that are located on different sides of the virtual filter boundary by themselves and their corresponding luminance components, the filtered chrominance components can also be CCALFed by using multiple luminance components at a preset distance from the chrominance component. . The number of the plurality of luminance component pixels is equal to the number of pixels of the chrominance component that themselves and their corresponding luminance components are located on different sides of the virtual filter boundary.
首先确定自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的色度分量的像素数量。First, determine the number of pixels of the chrominance component of itself and its corresponding luminance component on different sides of the virtual filter boundary.
然后根据上述色度分量的像素数量确定与色度分量位于虚拟滤波边界的同一侧的亮度分量的数量。Then, the number of luminance components located on the same side of the virtual filter boundary as the chrominance component is determined according to the number of pixels of the chrominance component.
再确定距离色度分量为预设距离的、与上述色度分量像素数量相同的亮度分量,并利用确定的亮度分量对环路滤波后的色度分量进行CCALF。Then determine that the distance to the chrominance component is the brightness component with the same number of pixels of the chrominance component as the preset distance, and use the determined brightness component to perform CCALF on the chrominance component after loop filtering.
例如在图18中,自身及其对应的亮度分量分别位于虚拟滤波边界不同侧的两个色度分量为A和B,确定待选择的与A和B位于虚拟滤波边界的同一侧的亮度分量为两个,确定距离色度分量为预设距离的两个像素A1和B1,A1和B1分别是位于虚拟滤波边界上侧的第四个和第二个像素,分别利用A1和B1对环路滤波后的A和B进行CCALF。For example, in Figure 18, the two chrominance components of themselves and their corresponding luminance components on different sides of the virtual filter boundary are A and B. It is determined that the luminance components to be selected on the same side of the virtual filter boundary as A and B are Two, determine the two pixels A1 and B1 whose distance to the chrominance component is the preset distance. A1 and B1 are the fourth and second pixels located on the upper side of the virtual filter boundary, respectively. A1 and B1 are used to filter the loop respectively CCALF is performed after A and B.
由此可见,本实施例通过当色度分量及其对应的亮度分量分别位于虚 拟滤波边界的不同侧时,使用与色度分量位于虚拟滤波边界的同一侧的且距离色度分量最近或预设距离的亮度分量对环路滤波后的色度分量进行滤波,消除了CCALF中的额外等待时间,提高了CCALF的滤波效率,缩短了视频编解码过程的时间,并节省了缓存器的缓存空间。It can be seen that, in this embodiment, when the chrominance component and its corresponding luminance component are located on different sides of the virtual filter boundary, the chrominance component that is located on the same side of the virtual filter boundary as the chrominance component and is closest to the chrominance component or preset The luminance component of the distance filters the chrominance component after loop filtering, which eliminates the extra waiting time in CCALF, improves the filtering efficiency of CCALF, shortens the time of the video encoding and decoding process, and saves the buffer space of the buffer.
本公开另一实施例提供了一种视频编解码方法,为了简要起见,与上一实施例相同或相似的内容不再赘述,以下仅重点描述不同于上一实施例的内容。Another embodiment of the present disclosure provides a video encoding and decoding method. For the sake of brevity, content that is the same or similar to the previous embodiment will not be repeated. The following only focuses on the content that is different from the previous embodiment.
在本实施例中,禁止使用与色度分量位于虚拟滤波边界的不同侧的亮度分量对滤波后的色度分量进行跨分量滤波包括:In this embodiment, prohibiting the use of luminance components located on a different side of the virtual filtering boundary from the chrominance component to perform cross-component filtering on the filtered chrominance component includes:
禁止色度分量使用跨分量自适应环路滤波(CCALF)。The chrominance component is prohibited from using cross-component adaptive loop filtering (CCALF).
当色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,可以禁止使用色度分量对应的亮度分量对滤波后的色度分量进行CCALF。如图19所示,色度分量A和B位于虚拟滤波边界上侧,而色度分量A和B对应的亮度分量A1和B1却位于虚拟滤波边界下侧,在这种情况下,本实施例不对色度分量A和B进行CCALF。When the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary, it may be prohibited to use the luminance component corresponding to the chrominance component to perform CCALF on the filtered chrominance component. As shown in Figure 19, the chrominance components A and B are located on the upper side of the virtual filter boundary, while the luminance components A1 and B1 corresponding to the chrominance components A and B are located on the lower side of the virtual filter boundary. In this case, this embodiment CCALF is not performed on chrominance components A and B.
由于A和B上侧的四个色度分量像素及其对应的亮度分量均位于虚拟滤波边界上侧,虚拟滤波边界下侧的色度分量C和D及其对应的亮度分量均位于虚拟滤波边界下侧,所以仍然对A和B上侧的四个色度分量、以及色度分量C和D进行CCALF。对上述色度分量像素,使用SAO后的亮度分量对ALF后的上述色度分量进行滤波,CCALF的滤波值作为上述色度分量的ALF偏移量,并将ALF偏移量与色度分量的ALF滤波值相加,将相加的结果作为上述色度分量的环路滤波结果。由于不对A和B进行CCALF,将A和B的ALF滤波值直接作为环路滤波结果。Since the four chrominance component pixels on the upper side of A and B and their corresponding luminance components are all located on the upper side of the virtual filtering boundary, the chrominance components C and D and their corresponding luminance components on the lower side of the virtual filtering boundary are all located on the virtual filtering boundary. On the lower side, CCALF is still performed on the four chrominance components on the upper side of A and B, and the chrominance components C and D. For the aforementioned chrominance component pixels, use the luminance component after SAO to filter the aforementioned chrominance component after ALF, the filter value of CCALF is used as the ALF offset of the chrominance component, and the ALF offset is compared with the The ALF filter values are added, and the result of the addition is used as the loop filter result of the above-mentioned chrominance component. Since CCALF is not performed on A and B, the ALF filter values of A and B are directly used as the loop filter result.
由此可见,本实施例通过当色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止色度分量使用CCALF,在上一行图像块的滤波过程中即可实现对色度分量的CCALF,从而完成上一行图像块的CCALF,也无需等待下一行图像块的亮度分量进行SAO。同样可以消除CCALF的上述额外等待时间,提高CCALF的滤波效率,缩短视频编解码过程的时间。同时,由于无需等待过程,所以缓存器也无需缓存A和B的ALF滤波值,从而节省了缓存器的缓存空间。It can be seen that this embodiment prohibits the use of CCALF for the chroma component when the chroma component and its corresponding brightness component are located on different sides of the virtual filtering boundary, and the chroma can be adjusted during the filtering process of the previous line of image blocks. To complete the CCALF of the image block in the previous row, there is no need to wait for the luminance component of the image block in the next row to perform SAO. It can also eliminate the above-mentioned extra waiting time of CCALF, improve the filtering efficiency of CCALF, and shorten the time of the video encoding and decoding process. At the same time, since there is no waiting process, the buffer does not need to buffer the ALF filter values of A and B, thereby saving the buffer space of the buffer.
以上两个实施例以所述第一方向为亮度分量和色度分量的列方向为例,对本公开进行了说明,但本公开并不限于此。在其他示例中,所述第一方向还可以指亮度分量和色度分量的其他方向,例如行方向。当所述第一方向为亮度分量和色度分量的行方向时,视频编解码方法的执行过程时类似的,只是将列方向替换行方向而已。The above two embodiments described the present disclosure by taking the first direction as the column direction of the luminance component and the chrominance component as an example, but the present disclosure is not limited to this. In other examples, the first direction may also refer to other directions of the luminance component and the chrominance component, such as the row direction. When the first direction is the row direction of the luminance component and the chrominance component, the execution process of the video encoding and decoding method is similar, except that the column direction is replaced with the row direction.
例如,对于当所述第一方向为亮度分量和色度分量的行方向时,当自身及其对应的亮度分量分别位于虚拟滤波边界不同侧时,可使用与色度分量位于虚拟滤波边界同一侧的(例如位于虚拟滤波边界同一侧且距离最近的)亮度分量对环路滤波后的色度分量进行CCALF的操作,如图20所示,当所述第一方向为亮度分量和色度分量的行方向时,编码图像块,例如CTU之间的边界与列方向的边界垂直,虚拟滤波边界与列方向的虚拟滤波边界也垂直。针对亮度分量,虚拟滤波边界的偏移值可以为4、以及任何其他可能的值,色度分量的虚拟滤波边界的偏移值可以包括2、以及任何其他可能的值,偏移值比例可以是2∶1、以及任何其他可能的值。For example, when the first direction is the row direction of the luminance component and the chrominance component, when the luminance component itself and its corresponding luminance component are located on different sides of the virtual filtering boundary, the chrominance component located on the same side of the virtual filtering boundary can be used. The luminance component (for example, the one located on the same side of the virtual filter boundary and the closest distance) performs the CCALF operation on the chrominance component after loop filtering. As shown in FIG. 20, when the first direction is the luminance component and the chrominance component In the row direction, the coding image block, for example, the boundary between the CTUs is perpendicular to the column direction boundary, and the virtual filter boundary is also perpendicular to the column direction virtual filter boundary. For the luminance component, the offset value of the virtual filter boundary can be 4, and any other possible values, the offset value of the virtual filter boundary of the chrominance component can include 2, and any other possible values, and the offset value ratio can be 2: 1, and any other possible values.
在图20中,由于A和B位于色度分量的虚拟滤波边界的左侧,而对应的亮度分量像素位于亮度分量的虚拟滤波边界的右侧,因此,使用位于虚拟滤波边界左侧的、且距离色度分量A和B最近的亮度分量A1/B1,对ALF后的A和B进行CCALF。这样,在对左一行图像块,例如CTU,进行CCALF滤波时,对于色度分量的A和B来说,由于亮度分量A1/B1的SAO已经完成,在左一行图像块的滤波过程中即可实现对色度分量的A和B的CCALF,从而完成虚拟滤波边界左侧的所有亮度分量像素的CCALF,而无需等到右一行图像块的亮度分量进行完SAO后,这样就消除了CCALF中的额外等待时间,从而提高了CCALF的滤波效率,缩短了视频编解码过程的时间。同时,由于无需等待过程,所以缓存器也无需缓存A和B的ALF滤波值,从而节省了缓存器的缓存空间。In FIG. 20, since A and B are located on the left side of the virtual filter boundary of the chrominance component, and the corresponding luminance component pixel is located on the right side of the virtual filter boundary of the luminance component, the and The luminance component A1/B1 closest to the chrominance components A and B is CCALF performed on A and B after ALF. In this way, when performing CCALF filtering on the image block on the left row, such as CTU, for the chrominance components A and B, since the SAO of the luminance component A1/B1 has been completed, the filtering process of the image block on the left row is sufficient. Realize the CCALF of the chrominance components A and B, thereby completing the CCALF of all the luminance component pixels on the left side of the virtual filter boundary, without waiting for the luminance component of the right row of image blocks to finish SAO, thus eliminating the extra in CCALF Waiting time, thereby improving the filtering efficiency of CCALF and shortening the time of the video encoding and decoding process. At the same time, since there is no waiting process, the buffer does not need to buffer the ALF filter values of A and B, thereby saving the buffer space of the buffer.
本公开又一实施例还提供了一种视频编解码装置,如图21所示,包括:Another embodiment of the present disclosure also provides a video encoding and decoding device, as shown in FIG. 21, including:
存储器,用于存储可执行指令;Memory, used to store executable instructions;
处理器,用于执行所述存储器中存储的所述可执行指令,以执行如下操作:The processor is configured to execute the executable instructions stored in the memory to perform the following operations:
对色度分量进行滤波;Filter the chrominance components;
当色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波。When the chrominance component and its corresponding luminance component are on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
本实施例的视频编解码装置可以是视频编码端的装置,也可以是视频解码端的装置,也可以是同时具有视频编码和视频解码功能的装置。本实施例的处理器通过执行所述存储器中存储的所述可执行指令,能够执行与上述实施例的步骤所对应的各种操作。The video encoding and decoding device in this embodiment may be a device on the video encoding end, or a device on the video decoding end, or a device having both video encoding and video decoding functions. The processor of this embodiment can execute various operations corresponding to the steps of the foregoing embodiment by executing the executable instructions stored in the memory.
本实施例的处理器还用于执行以下操作:禁止使用与色度分量位于虚拟滤波边界的不同侧的亮度分量对滤波后的色度分量进行跨分量滤波。The processor of this embodiment is further configured to perform the following operation: prohibiting the use of luminance components located on a different side of the virtual filtering boundary from the chrominance component to perform cross-component filtering on the filtered chrominance component.
本实施例的处理器还用于执行以下操作:使用与色度分量位于虚拟滤波边界的同一侧的亮度分量对滤波后的色度分量进行跨分量滤波。The processor of this embodiment is further configured to perform the following operation: use the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component to perform cross-component filtering on the filtered chrominance component.
本实施例的处理器还用于执行以下操作:使用与色度分量位于虚拟滤波边界的同一侧的且距离色度分量最近的亮度分量对滤波后的色度分量进行跨分量滤波。The processor of this embodiment is further configured to perform the following operation: use the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component and is closest to the chrominance component to perform cross-component filtering on the filtered chrominance component.
本实施例的处理器还用于执行以下操作:禁止色度分量使用跨分量自适应环路滤波。The processor of this embodiment is further configured to perform the following operation: prohibiting the chrominance component from using cross-component adaptive loop filtering.
本实施例中,色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧,禁止使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波,这里,跨分量滤波可以包括跨分量自适应环路滤波。In this embodiment, the chrominance component and its corresponding brightness component are located on different sides of the virtual filter boundary. It is forbidden to use the brightness component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component. Here, cross-component filtering can be Including cross-component adaptive loop filtering.
示例性的,色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧,可以包括亮度分量和色度分量在第一方向上的采样比例与亮度分量和色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同的情况。Exemplarily, the chrominance component and its corresponding luminance component are located on different sides of the virtual filter boundary, and may include the sampling ratio of the luminance component and the chrominance component in the first direction and the luminance component and the chrominance component in the first direction. When the ratio of the offset value of the virtual filter boundary in the direction is different.
偏移值为虚拟滤波边界相较于编码图像块之间的边界的偏移值。编码图像块包括编码树单元CTU。The offset value is the offset value of the virtual filter boundary compared to the boundary between the coded image blocks. The coded image block includes a coding tree unit CTU.
亮度分量与色度分量在第一方向上的采样比例与亮度分量与色度分量在第一方向上的虚拟滤波边界的偏移值比例不同包括:亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在第一方向上的虚拟滤波边界的偏移值比例。The difference between the sampling ratio of the luminance component and the chrominance component in the first direction and the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction includes: the difference between the luminance component and the chrominance component in the first direction The sampling ratio is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction.
第一方向可以包括图像中的列。采样比例可以为1∶1;偏移值比例可以为2∶1。The first direction may include columns in the image. The sampling ratio can be 1:1; the offset value ratio can be 2:1.
亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在第一方向上的虚拟滤波边界的偏移值比例的情况包括:图像采样格式为422或444采样格式。The case where the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction includes: the image sampling format is 422 or 444 sampling format.
本实施例的处理器还用于执行以下操作:对色度分量进行去块滤波、像素自适应补偿或自适应环路滤波中的任意一项或多项。The processor of this embodiment is further configured to perform the following operations: performing any one or more of deblocking filtering, pixel adaptive compensation, or adaptive loop filtering on the chrominance component.
本公开又一实施例提供了一种计算机可读存储介质,其存储有可执行指令,所述可执行指令在由一个或多个处理器执行时,可以使所述一个或多个处理器执行上述实施例的视频编解码方法。Another embodiment of the present disclosure provides a computer-readable storage medium that stores executable instructions that, when executed by one or more processors, can cause the one or more processors to execute The video encoding and decoding method of the foregoing embodiment.
本公开又一实施例提供了一种视频编解码方法,为了简要起见,与上述实施例相同或相似的内容不再赘述,以下仅重点描述不同于上述实施例的内容。Another embodiment of the present disclosure provides a video encoding and decoding method. For the sake of brevity, content that is the same as or similar to the foregoing embodiment will not be repeated, and the following only focuses on the content that is different from the foregoing embodiment.
本实施例的视频编解码方法可以应用在视频编码端,也可以应用在视频解码端,可以应用在同时具有视频编码和视频解码功能的装置,能够解决滤波效率低、占用缓存空间大的问题。如22所示,该视频编解码方法包括:The video encoding and decoding method of this embodiment can be applied to a video encoding end or a video decoding end, and can be applied to a device having both video encoding and video decoding functions, and can solve the problems of low filtering efficiency and large buffer space occupation. As shown in 22, the video encoding and decoding method includes:
步骤S2201:对色度分量进行滤波。Step S2201: filtering the chrominance components.
步骤S2202:使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波,其中,色度分量的虚拟滤波边界的偏移值等于亮度分量的虚拟滤波边界的偏移值。Step S2202: Use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component, where the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the virtual filtering boundary of the luminance component.
其中,本申请实施例中提及的环路滤波、自适应环路滤波、跨分量自适应环路滤波等还可以有其他名称,本申请仅作为示例,不作限定。Among them, the loop filtering, adaptive loop filtering, cross-component adaptive loop filtering, etc. mentioned in the embodiments of this application may also have other names, and this application is only an example and is not limited.
步骤S2201中的对色度分量进行滤波,包括对色度分量的重建图像块进行DF、SAO或ALF中的一项或多项,得到色度分量滤波后的滤波结果。例如,对色度分量进行滤波包括:对色度分量的重建图像块进行ALF,得到ALF后的滤波结果。The filtering of the chrominance component in step S2201 includes performing one or more of DF, SAO, or ALF on the reconstructed image block of the chrominance component to obtain a filtering result after the chrominance component is filtered. For example, filtering the chrominance component includes: performing ALF on the reconstructed image block of the chrominance component to obtain the filtering result after ALF.
示例性的,色度分量的虚拟滤波边界的偏移值等于亮度分量的滤波边界的偏移值,可以包括:针对亮度分量和色度分量在第一方向上的采样比例与亮度分量和色度分量在第一方向上的虚拟滤波边界的偏移值比例不同的情况,使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波。Exemplarily, the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the filtering boundary of the luminance component, which may include: the sampling ratio of the luminance component and the chrominance component in the first direction and the luminance component and chrominance When the components have different ratios of the offset values of the virtual filter boundary in the first direction, the luminance components corresponding to the chrominance components are used to perform cross-component filtering on the filtered chrominance components.
示例性的,对于色度分量的自适应环路滤波和跨分量滤波过程,色度分量的虚拟滤波边界的偏移值等于亮度分量的滤波边界的偏移值。Exemplarily, for the adaptive loop filtering and cross-component filtering processes of the chrominance component, the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the filtering boundary of the luminance component.
示例性的,本实施例所述的对应,指的是跨分量自适应环路滤波中的对应,也可称为关联、参考、映射等。例如,当图像采样格式为444时,对应表示位于色度分量图像块和亮度分量图像块中的相同位置。Exemplarily, the correspondence described in this embodiment refers to the correspondence in cross-component adaptive loop filtering, and may also be referred to as association, reference, mapping, and so on. For example, when the image sampling format is 444, the corresponding representation is located in the same position in the chrominance component image block and the luminance component image block.
偏移值也可以称为偏移、错位、错位值、距离、距离值等,指的是虚拟滤波边界相较于编码图像块之间的边界的偏移值,表示虚拟滤波边界与编码图像块边界之间的像素数量。编码图像块可以是编码树单元(CTU),还可以是CTU包含的编码单元(Coding Unit,CU)、CU包含的预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU)。例如,在图像列方向,针对亮度分量,虚拟滤波边界的偏移值为4,即4行像素,也是亮度分量的虚拟滤波边界相较于CTU边界错位了4行像素。The offset value can also be called offset, misalignment, misalignment value, distance, distance value, etc. It refers to the offset value of the virtual filter boundary compared to the boundary between the coded image blocks, and represents the virtual filter boundary and the coded image block. The number of pixels between the borders. The coded image block may be a coding tree unit (CTU), a coding unit (CU) included in the CTU, a prediction unit (PU) and a transform unit (TU) included in the CU. For example, in the image column direction, for the luminance component, the offset value of the virtual filter boundary is 4, that is, 4 rows of pixels, and the virtual filter boundary of the luminance component is shifted by 4 rows of pixels compared to the CTU boundary.
在一个示例中,所述第一方向指的是亮度分量和色度分量的列方向。在其他示例中,所述第一方向还可以指亮度分量和色度分量的其他方向,例如行方向。In an example, the first direction refers to the column direction of the luminance component and the chrominance component. In other examples, the first direction may also refer to other directions of the luminance component and the chrominance component, such as the row direction.
图像采样格式包括420、422、444以及任何其他可能的采样格式,采样比例可以是1∶1、2∶1以及任何其他可能的采样比例。亮度分量在列方向上的虚拟滤波边界的偏移值可以包括4、以及任何其他可能的值,色度分量在列方向上的虚拟滤波边界的偏移值可以包括2、以及任何其他可能的值,偏移值比例可以是2∶1、以及任何其他可能的值。The image sampling format includes 420, 422, 444, and any other possible sampling formats, and the sampling ratio can be 1:1, 2:1, and any other possible sampling ratios. The offset value of the virtual filter boundary of the luminance component in the column direction can include 4, and any other possible values, and the offset value of the virtual filter boundary of the chrominance component in the column direction can include 2, and any other possible values. , The offset value ratio can be 2:1, and any other possible values.
在本实施例中,亮度分量与色度分量在第一方向上的采样比例与亮度分量与色度分量在第一方向上的虚拟滤波边界的偏移值比例不同包括:亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在第一方向上的虚拟滤波边界的偏移值比例。In this embodiment, the sampling ratio of the luminance component and the chrominance component in the first direction is different from the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction, including: luminance component and chrominance component The sampling ratio in the first direction is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction.
只要上述采样比例小于偏移值比例,本实施例的色度分量的虚拟滤波边界的偏移值就等于亮度分量的虚拟滤波边界的偏移值,并对色度分量进行ALF、以及使用色度分量对应的亮度分量对色度分量进行CCALF。As long as the above sampling ratio is less than the offset value ratio, the offset value of the virtual filter boundary of the chrominance component in this embodiment is equal to the offset value of the virtual filter boundary of the luminance component, and ALF is performed on the chrominance component and the chrominance is used. The luminance component corresponding to the component performs CCALF on the chrominance component.
以下以图像采样格式为422和444、采样比例为1∶1为例,对本实施例做进一步的说明。In the following, the image sampling format is 422 and 444, and the sampling ratio is 1:1 as an example to further explain this embodiment.
如图23所示,亮度分量在列方向上的虚拟滤波边界的偏移值为4,而 色度分量在列方向上的虚拟滤波边界的偏移值同样为4,即本实施例的亮度分量和色度分量的虚拟滤波边界的偏移值相同。相当于图12所示的亮度分量虚拟滤波边界保持不变,而色度分量虚拟滤波边界由2变为4。通过亮度分量和色度分量的虚拟滤波边界的偏移值保持一致,使得图12中的色度分量A和B及其对应的亮度分量A1和B1由位于虚拟滤波边界的不同侧,变为如图23所示的位于虚拟滤波边界的同一侧,即虚拟滤波边界的上侧,使得色度分量A和B及其对应的亮度分量A1和B1同属于一行图像块,虚拟滤波边界下侧的下一行图像块。这样,在对上一行图像块进行CCALF滤波时,由于不存在像图12那样的对应的亮度分量与自身处于虚拟滤波边界不同侧的色度分量,因此上一行图像块的滤波过程中即可完成虚拟滤波边界上侧的所有亮度分量像素的CCALF,而无需等到下一行图像块的亮度分量进行SAO。同样,在对下一行图像块进行CCALF滤波时,由于也不存在像图12那样的对应的亮度分量与自身处于虚拟滤波边界不同侧的色度分量,因此下一行图像块的滤波过程中即可完成虚拟滤波边界上侧的所有亮度分量像素的CCALF,而无需等到再下一行图像块的亮度分量进行SAO。这样就消除了CCALF中的额外等待时间,提高了CCALF的滤波效率,缩短了视频编解码过程的时间。同时,由于无需等待过程,所以缓存器也无需缓存色度分量的ALF滤波值,从而节省了缓存器的缓存空间。As shown in Figure 23, the offset value of the virtual filter boundary of the luminance component in the column direction is 4, and the offset value of the virtual filter boundary of the chrominance component in the column direction is also 4, that is, the luminance component of this embodiment It is the same as the offset value of the virtual filter boundary of the chrominance component. It is equivalent to that the virtual filter boundary of the luminance component shown in FIG. 12 remains unchanged, while the virtual filter boundary of the chrominance component changes from 2 to 4. By keeping the offset values of the virtual filter boundary of the luminance component and the chrominance component consistent, the chrominance components A and B and their corresponding luminance components A1 and B1 in Figure 12 are changed from being on different sides of the virtual filtering boundary to Figure 23 is located on the same side of the virtual filter boundary, that is, on the upper side of the virtual filter boundary, so that the chrominance components A and B and their corresponding luminance components A1 and B1 belong to one line of image blocks, and the lower side of the virtual filter boundary One line of image blocks. In this way, when CCALF filtering is performed on the image block of the previous row, since there is no chrominance component that is on the different side of the virtual filter boundary from the corresponding brightness component as shown in Figure 12, the filtering process of the image block of the previous row can be completed. The CCALF of all the luminance component pixels on the upper side of the virtual filter boundary without waiting for the luminance component of the next row of image blocks to perform SAO. Similarly, when performing CCALF filtering on the next row of image blocks, since there is no corresponding chrominance component that is on the different side of the virtual filter boundary as shown in Figure 12, the filtering process of the next row of image blocks is sufficient. The CCALF of all luminance component pixels on the upper side of the virtual filtering boundary is completed without waiting for the luminance component of the next line of image blocks to perform SAO. In this way, the extra waiting time in CCALF is eliminated, the filtering efficiency of CCALF is improved, and the time of the video encoding and decoding process is shortened. At the same time, since there is no waiting process, the buffer does not need to buffer the ALF filter value of the chrominance component, thereby saving the buffer space of the buffer.
以上以亮度分量和色度分量在列方向上的虚拟滤波边界的偏移值均为4为例,对本实施例进行了说明,但本实施例并不限于此。在其他的实现方式中,亮度分量和色度分量在列方向上的虚拟滤波边界的偏移值也可以均为大于4的值。In the above, the offset value of the virtual filter boundary of the luminance component and the chrominance component in the column direction is both 4 as an example, and the present embodiment is described, but the present embodiment is not limited to this. In other implementation manners, the offset value of the virtual filter boundary in the column direction of the luminance component and the chrominance component may both be values greater than 4.
以上两个实施例以所述第一方向为亮度分量和色度分量的列方向为例,对上述实施例进行了说明,但本公开并不限于此。在其他示例中,所述第一方向还可以指亮度分量和色度分量的其他方向,例如行方向。当所述第一方向为亮度分量和色度分量的行方向时,视频编解码方法的执行过程时类似的,只是将列方向替换行方向而已。In the above two embodiments, the first direction is the column direction of the luminance component and the chrominance component as an example, and the above embodiments are described, but the present disclosure is not limited to this. In other examples, the first direction may also refer to other directions of the luminance component and the chrominance component, such as the row direction. When the first direction is the row direction of the luminance component and the chrominance component, the execution process of the video encoding and decoding method is similar, except that the column direction is replaced with the row direction.
例如,对于当所述第一方向为亮度分量和色度分量的行方向时,如图24所示,亮度分量在行方向上的虚拟滤波边界的偏移值为4,而色度分量 在行方向上的虚拟滤波边界的偏移值同样为4,通过亮度分量和色度分量的虚拟滤波边界的偏移值保持一致,使得通过左一行图像块的滤波过程即可完成虚拟滤波边界左侧的所有亮度分量像素的CCALF,而无需等到右一行图像块的亮度分量进行SAO,这样就消除了CCALF中的额外等待时间,提高了CCALF的滤波效率,缩短了视频编解码过程的时间。同时,由于无需等待过程,所以缓存器也无需缓存色度分量的ALF滤波值,从而节省了缓存器的缓存空间。For example, when the first direction is the row direction of the luminance component and the chrominance component, as shown in FIG. 24, the offset value of the virtual filter boundary of the luminance component in the row direction is 4, and the chrominance component is in the row direction. The offset value of the virtual filter boundary is also 4, and the offset value of the virtual filter boundary through the luminance component and the chrominance component remains the same, so that all the luminance on the left side of the virtual filter boundary can be completed through the filtering process of the left row of image blocks The CCALF of the component pixels does not need to wait until the brightness component of the image block on the right row is SAO, which eliminates the extra waiting time in CCALF, improves the filtering efficiency of CCALF, and shortens the time of the video encoding and decoding process. At the same time, since there is no waiting process, the buffer does not need to buffer the ALF filter value of the chrominance component, thereby saving the buffer space of the buffer.
本公开又一实施例还提供了一种视频编解码装置,如图25所示,包括:Another embodiment of the present disclosure also provides a video encoding and decoding device, as shown in FIG. 25, including:
存储器,用于存储可执行指令;Memory, used to store executable instructions;
处理器,用于执行所述存储器中存储的所述可执行指令,以执行如下操作:The processor is configured to execute the executable instructions stored in the memory to perform the following operations:
对色度分量进行滤波;Filter the chrominance components;
使用色度分量对应的亮度分量对滤波后的色度分量进行跨分量滤波,其中,色度分量的虚拟滤波边界的偏移值等于亮度分量的虚拟滤波边界的偏移值。The luminance component corresponding to the chrominance component is used to perform cross-component filtering on the filtered chrominance component, where the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the virtual filtering boundary of the luminance component.
本实施例的视频编解码装置可以是视频编码端的装置,也可以是视频解码端的装置,也可以是同时具有视频编码和视频解码功能的装置。本实施例的处理器通过执行所述存储器中存储的所述可执行指令,能够执行与上述实施例的步骤所对应的各种操作。The video encoding and decoding device in this embodiment may be a device on the video encoding end, or a device on the video decoding end, or a device having both video encoding and video decoding functions. The processor of this embodiment can execute various operations corresponding to the steps of the foregoing embodiment by executing the executable instructions stored in the memory.
示例性的,色度分量的虚拟滤波边界的偏移值等于亮度分量的滤波边界的偏移值,可以包括:亮度分量和色度分量在第一方向上的采样比例与亮度分量和色度分量在第一方向上的虚拟滤波边界的偏移值比例不同的情况,使用色度分量对应的亮度分量对色度分量进行滤波包括:使用色度分量对应的亮度分量对色度分量进行CCALF。Exemplarily, the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the filtering boundary of the luminance component, which may include: the sampling ratio of the luminance component and the chrominance component in the first direction and the luminance component and the chrominance component In the case where the ratios of the offset values of the virtual filter boundary in the first direction are different, using the luminance component corresponding to the chrominance component to filter the chrominance component includes: performing CCALF on the chrominance component using the luminance component corresponding to the chrominance component.
本实施例色度分量的虚拟滤波边界的偏移值等于亮度分量的虚拟滤波边界的偏移值,包括:对于色度分量的自适应环路滤波和跨分量滤波过程,色度分量的虚拟滤波边界的偏移值等于亮度分量的滤波边界的偏移值。偏移值为虚拟滤波边界相较于编码图像块之间的边界的偏移值。编码图像块包括编码树单元CTU。In this embodiment, the offset value of the virtual filter boundary of the chrominance component is equal to the offset value of the virtual filter boundary of the luminance component, including: adaptive loop filtering and cross-component filtering processes for the chrominance component, and virtual filtering of the chrominance component The offset value of the boundary is equal to the offset value of the filtering boundary of the luminance component. The offset value is the offset value of the virtual filter boundary compared to the boundary between the coded image blocks. The coded image block includes a coding tree unit CTU.
亮度分量与色度分量在第一方向上的采样比例与亮度分量与色度分量在第一方向上的虚拟滤波边界的偏移值比例不同包括:亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在第一方向上的虚拟滤波边界的偏移值比例。第一方向包括图像中的列。采样比例可以为1∶1;偏移值比例可以为2∶1。色度分量的虚拟滤波边界的偏移值和亮度分量的虚拟滤波边界的偏移值可以均为4。The difference between the sampling ratio of the luminance component and the chrominance component in the first direction and the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction includes: the difference between the luminance component and the chrominance component in the first direction The sampling ratio is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction. The first direction includes the columns in the image. The sampling ratio can be 1:1; the offset value ratio can be 2:1. The offset value of the virtual filter boundary of the chrominance component and the offset value of the virtual filter boundary of the luminance component may both be 4.
亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在第一方向上的虚拟滤波边界的偏移值比例的情况包括:图像采样格式为422或444采样格式。The case where the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filter boundary of the luminance component and the chrominance component in the first direction includes: the image sampling format is 422 or 444 sampling format.
本公开还提供了一种计算机可读存储介质,其存储有可执行指令,所述可执行指令在由一个或多个处理器执行时,可以使所述一个或多个处理器执行上述实施例的视频编解码方法。The present disclosure also provides a computer-readable storage medium that stores executable instructions that, when executed by one or more processors, can cause the one or more processors to execute the foregoing embodiments Video encoding and decoding method.
应理解,本公开实施例的处理器可能是一种集成电路图像处理系统,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。It should be understood that the processor of the embodiment of the present disclosure may be an integrated circuit image processing system with signal processing capability. In the implementation process, the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存 取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache. By way of exemplary but not restrictive description, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Synchlink DRAM, SLDRAM) ) And Direct Rambus RAM (DR RAM). It should be noted that the memories of the systems and methods described herein are intended to include, but are not limited to, these and any other suitable types of memories.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers. The storage medium is located in the memory, and the processor executes the instructions in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
还应理解,上文对本申请实施例的描述着重于强调各个实施例之间的不同之处,未提到的相同或相似之处可以互相参考,为了简洁,这里不再赘述。It should also be understood that the above description of the embodiments of the present application focuses on emphasizing the differences between the various embodiments, and the same or similarities that are not mentioned can be referred to each other, and for the sake of brevity, they will not be repeated here.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。The above are only specific implementations of the present disclosure, but the protection scope of the present disclosure is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (50)

  1. 一种视频编解码方法,其特征在于,包括:A video encoding and decoding method, characterized in that it comprises:
    对色度分量进行滤波;Filter the chrominance components;
    当所述色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用所述色度分量对应的亮度分量对所述滤波后的所述色度分量进行跨分量滤波。When the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary, it is prohibited to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  2. 如权利要求1所述的视频编解码方法,其特征在于,所述禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波包括:The video encoding and decoding method according to claim 1, wherein the prohibiting the use of the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component comprises:
    禁止使用与所述色度分量位于所述虚拟滤波边界的不同侧的亮度分量对滤波后的所述色度分量进行跨分量滤波。It is forbidden to perform cross-component filtering on the filtered chrominance component using a luminance component located on a different side of the virtual filtering boundary from the chrominance component.
  3. 如权利要求1或2所述的视频编解码方法,其特征在于,所述禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波包括:The video encoding and decoding method according to claim 1 or 2, wherein the prohibiting the use of the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component comprises:
    使用与所述色度分量位于所述虚拟滤波边界的同一侧的亮度分量对滤波后的所述色度分量进行跨分量滤波。Cross-component filtering is performed on the filtered chrominance component using the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component.
  4. 如权利要求3所述的视频编解码方法,其特征在于,所述使用与所述色度分量位于所述虚拟滤波边界的同一侧的亮度分量对滤波后的所述色度分量进行跨分量滤波包括:The video encoding and decoding method according to claim 3, wherein the chrominance component is used to perform cross-component filtering on the filtered chrominance component using a luminance component that is located on the same side of the virtual filtering boundary as the chrominance component include:
    使用与所述色度分量位于所述虚拟滤波边界的同一侧的且距离所述色度分量最近的亮度分量对滤波后的所述色度分量进行跨分量滤波。Cross-component filtering is performed on the filtered chrominance component using the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component and is closest to the chrominance component.
  5. 如权利要求1或2所述的视频编解码方法,其特征在于,所述禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波包括:The video encoding and decoding method according to claim 1 or 2, wherein the prohibiting the use of the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component comprises:
    禁止所述色度分量使用跨分量自适应环路滤波。The chrominance component is prohibited from using cross-component adaptive loop filtering.
  6. 如权利要求1至5任一项所述的视频编解码方法,其特征在于,当所述色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波包括:The video encoding and decoding method according to any one of claims 1 to 5, wherein when the chrominance component and its corresponding luminance component are located on different sides of the virtual filter boundary, the use of the chrominance component is prohibited Cross-component filtering of the filtered chrominance component by the corresponding luminance component includes:
    针对亮度分量和色度分量在第一方向上的采样比例与亮度分量和色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同的情况,当所述色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波。For the case where the sampling ratio of the luminance component and the chrominance component in the first direction is different from the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction, when the chrominance component and its When the corresponding luminance components are located on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  7. 如权利要求6所述的视频编解码方法,其特征在于,所述偏移值为虚拟滤波边界相较于编码图像块之间的边界的偏移值。7. The video encoding and decoding method of claim 6, wherein the offset value is an offset value of the virtual filter boundary compared to the boundary between the coded image blocks.
  8. 如权利要求7所述的视频编解码方法,其特征在于,所述编码图像块包括编码树单元CTU。8. The video coding and decoding method according to claim 7, wherein the coded image block comprises a coding tree unit CTU.
  9. 如权利要求6所述的视频编解码方法,其特征在于,所述亮度分量与色度分量在第一方向上的采样比例与亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同包括亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例。The video encoding and decoding method according to claim 6, wherein the sampling ratio of the luminance component and the chrominance component in the first direction and the virtual filtering boundary of the luminance component and the chrominance component in the first direction The difference in the ratio of the offset value includes that the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filtering boundary of the luminance component and the chrominance component in the first direction.
  10. 如权利要求6或9所述的视频编解码方法,其特征在于,所述第一方向包括图像中的列。The video encoding and decoding method according to claim 6 or 9, wherein the first direction includes columns in the image.
  11. 如权利要求10所述的视频编解码方法,其特征在于,所述采样比例为1∶1;所述偏移值比例为2∶1。The video encoding and decoding method of claim 10, wherein the sampling ratio is 1:1; and the offset value ratio is 2:1.
  12. 如权利要求10或11所述的视频编解码方法,其特征在于,所述亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量 在所述第一方向上的虚拟滤波边界的偏移值比例的情况包括图像采样格式为422或444采样格式。The video encoding and decoding method according to claim 10 or 11, wherein the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the virtual value of the luminance component and the chrominance component in the first direction. The ratio of the offset value of the filter boundary includes that the image sampling format is 422 or 444 sampling format.
  13. 如权利要求1至12任一项所述的视频编解码方法,其特征在于,所述对色度分量进行滤波,包括:The video encoding and decoding method according to any one of claims 1 to 12, wherein the filtering of the chrominance component comprises:
    对所述色度分量进行去块滤波、像素自适应补偿或自适应环路滤波中的任意一项或多项。Any one or more of deblocking filtering, pixel adaptive compensation, or adaptive loop filtering is performed on the chrominance component.
  14. 一种视频编解码装置,其特征在于,包括:A video coding and decoding device, characterized in that it comprises:
    存储器,用于存储可执行指令;Memory, used to store executable instructions;
    处理器,用于执行所述存储器中存储的所述可执行指令,以执行如下操作:The processor is configured to execute the executable instructions stored in the memory to perform the following operations:
    对色度分量进行滤波;Filter the chrominance components;
    当所述色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波。When the chrominance component and its corresponding luminance component are located on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  15. 如权利要求14所述的视频编解码装置,其特征在于,所述处理器还用于执行以下操作:The video encoding and decoding device according to claim 14, wherein the processor is further configured to perform the following operations:
    禁止使用与所述色度分量位于所述虚拟滤波边界的不同侧的亮度分量对滤波后的所述色度分量进行跨分量滤波。It is forbidden to perform cross-component filtering on the filtered chrominance component using a luminance component located on a different side of the virtual filtering boundary from the chrominance component.
  16. 如权利要求14或15所述的视频编解码装置,其特征在于,所述处理器还用于执行以下操作:The video encoding and decoding device according to claim 14 or 15, wherein the processor is further configured to perform the following operations:
    使用与所述色度分量位于所述虚拟滤波边界的同一侧的亮度分量对滤波后的所述色度分量进行跨分量滤波。Cross-component filtering is performed on the filtered chrominance component using the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component.
  17. 如权利要求16所述的视频编解码装置,其特征在于,所述处理器还用于执行以下操作:The video encoding and decoding device of claim 16, wherein the processor is further configured to perform the following operations:
    使用与所述色度分量位于所述虚拟滤波边界的同一侧的且距离所述 色度分量最近的亮度分量对滤波后的所述色度分量进行跨分量滤波。Cross-component filtering is performed on the filtered chrominance component using the luminance component that is located on the same side of the virtual filtering boundary as the chrominance component and is closest to the chrominance component.
  18. 如权利要求14或15所述的视频编解码装置,其特征在于,所述处理器还用于执行以下操作:The video encoding and decoding device according to claim 14 or 15, wherein the processor is further configured to perform the following operations:
    禁止所述色度分量使用跨分量自适应环路滤波。The chrominance component is prohibited from using cross-component adaptive loop filtering.
  19. 如权利要求14至18任一项所述的视频编解码装置,其特征在于,所述处理器还用于执行以下操作:The video encoding and decoding device according to any one of claims 14 to 18, wherein the processor is further configured to perform the following operations:
    针对亮度分量和色度分量在第一方向上的采样比例与亮度分量和色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同的情况,当所述色度分量及其对应的亮度分量分别位于虚拟滤波边界的不同侧时,禁止使用所述色度分量对应的亮度分量对滤波后的所述色度分量进行跨分量滤波。For the case where the sampling ratio of the luminance component and the chrominance component in the first direction is different from the offset value ratio of the virtual filter boundary of the luminance component and the chrominance component in the first direction, when the chrominance component and its When the corresponding luminance components are located on different sides of the virtual filtering boundary, it is forbidden to use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component.
  20. 如权利要求19所述的视频编解码装置,其特征在于,所述偏移值为虚拟滤波边界相较于编码图像块之间的边界的偏移值。19. The video encoding and decoding device of claim 19, wherein the offset value is an offset value of the virtual filter boundary compared to the boundary between the coded image blocks.
  21. 如权利要求20所述的视频编解码装置,其特征在于,所述编码图像块包括编码树单元CTU。The video coding and decoding device according to claim 20, wherein the coded image block comprises a coding tree unit (CTU).
  22. 如权利要求19所述的视频编解码装置,其特征在于,所述亮度分量与色度分量在第一方向上的采样比例与亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同包括亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例。The video encoding and decoding device according to claim 19, wherein the sampling ratio of the luminance component and the chrominance component in the first direction and the virtual filtering boundary of the luminance component and the chrominance component in the first direction The difference in the ratio of the offset value includes that the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filtering boundary of the luminance component and the chrominance component in the first direction.
  23. 如权利要求19或22所述的视频编解码装置,其特征在于,所述第一方向包括图像中的列。The video encoding and decoding device according to claim 19 or 22, wherein the first direction includes a column in the image.
  24. 如权利要求23所述的视频编解码装置,其特征在于,所述采样 比例为1∶1;所述偏移值比例为2∶1。The video encoding and decoding device according to claim 23, wherein the sampling ratio is 1:1; and the offset value ratio is 2:1.
  25. 如权利要求23或24所述的视频编解码装置,其特征在于,所述亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例的情况包括图像采样格式为422或444采样格式。The video encoding and decoding device according to claim 23 or 24, wherein the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the virtual value of the luminance component and the chrominance component in the first direction. The ratio of the offset value of the filter boundary includes that the image sampling format is 422 or 444 sampling format.
  26. 如权利要求23或24所述的视频编解码装置,其特征在于,所述处理器还用于执行以下操作:The video encoding and decoding device according to claim 23 or 24, wherein the processor is further configured to perform the following operations:
    对所述色度分量进行去块滤波、像素自适应补偿或自适应环路滤波中的任意一项或多项。Any one or more of deblocking filtering, pixel adaptive compensation, or adaptive loop filtering is performed on the chrominance component.
  27. 一种计算机可读存储介质,其特征在于,其存储有可执行指令,所述可执行指令在由一个或多个处理器执行时,可以使所述一个或多个处理器执行如权利要求1至13中任一项权利要求所述的视频编解码方法。A computer-readable storage medium, characterized in that it stores executable instructions that, when executed by one or more processors, can cause the one or more processors to execute as claimed in claim 1. The video encoding and decoding method according to any one of claims to 13.
  28. 一种视频编解码方法,其特征在于,包括:A video encoding and decoding method, characterized in that it comprises:
    对色度分量进行滤波;Filter the chrominance components;
    使用所述色度分量对应的亮度分量对所述滤波后色度分量进行跨分量滤波,其中,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的虚拟滤波边界的偏移值。Use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component, wherein the offset value of the virtual filtering boundary of the chrominance component is equal to the offset of the virtual filtering boundary of the luminance component value.
  29. 如权利要求28所述的视频编解码方法,其特征在于,针对亮度分量和色度分量在第一方向上的采样比例与亮度分量和色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同的情况,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的虚拟滤波边界的偏移值。The video encoding and decoding method according to claim 28, wherein the sampling ratio of the luminance component and the chrominance component in the first direction and the virtual filter boundary of the luminance component and the chrominance component in the first direction are determined. In the case of different offset value ratios, the offset value of the virtual filter boundary of the chrominance component is equal to the offset value of the virtual filter boundary of the luminance component.
  30. 如权利要求28或29所述的视频编解码方法,其特征在于,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的虚拟滤波边界的偏移值,包括:对于所述色度分量的自适应环路滤波和跨分量滤波过程, 所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的滤波边界的偏移值。The video encoding and decoding method according to claim 28 or 29, wherein the offset value of the virtual filter boundary of the chrominance component is equal to the offset value of the virtual filter boundary of the luminance component, including: In the process of adaptive loop filtering and cross-component filtering of the chrominance component, the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the filtering boundary of the luminance component.
  31. 如权利要求28-30任一项所述的视频编解码方法,其特征在于,所述偏移值为虚拟滤波边界相较于编码图像块之间的边界的偏移值。The video encoding and decoding method according to any one of claims 28-30, wherein the offset value is an offset value of the virtual filter boundary compared to the boundary between the coded image blocks.
  32. 如权利要求31所述的视频编解码方法,其特征在于,所述编码图像块包括编码树单元CTU。The video coding and decoding method according to claim 31, wherein the coded image block comprises a coding tree unit CTU.
  33. 如权利要求29所述的视频编解码方法,其特征在于,所述亮度分量与色度分量在第一方向上的采样比例与亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同包括亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例。The video encoding and decoding method according to claim 29, wherein the sampling ratio of the luminance component and the chrominance component in the first direction and the virtual filtering boundary of the luminance component and the chrominance component in the first direction The difference in the ratio of the offset value includes that the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filtering boundary of the luminance component and the chrominance component in the first direction.
  34. 如权利要求29或33所述的视频编解码方法,其特征在于,所述第一方向包括图像中的列。The video encoding and decoding method according to claim 29 or 33, wherein the first direction includes columns in the image.
  35. 如权利要求34所述的视频编解码方法,其特征在于,所述采样比例为1∶1;所述偏移值比例为2∶1。The video encoding and decoding method of claim 34, wherein the sampling ratio is 1:1; and the offset value ratio is 2:1.
  36. 如权利要求34或35所述的视频编解码方法,其特征在于,所述亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例的情况包括图像采样格式为422或444采样格式。The video encoding and decoding method according to claim 34 or 35, wherein the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the virtual value of the luminance component and the chrominance component in the first direction. The ratio of the offset value of the filter boundary includes that the image sampling format is 422 or 444 sampling format.
  37. 如权利要求28至36任一项所述的视频编解码方法,其特征在于,所述色度分量的虚拟滤波边界的偏移值和所述亮度分量的虚拟滤波边界的偏移值均为4。The video encoding and decoding method according to any one of claims 28 to 36, wherein the offset value of the virtual filter boundary of the chrominance component and the offset value of the virtual filter boundary of the luminance component are both 4 .
  38. 如权利要求28至37任一项所述的视频编解码方法,其特征在于,所述对色度分量进行滤波,包括:The video encoding and decoding method according to any one of claims 28 to 37, wherein the filtering of the chrominance component comprises:
    对所述色度分量进行去块滤波、像素自适应补偿或自适应环路滤波中的任意一项或多项。Any one or more of deblocking filtering, pixel adaptive compensation, or adaptive loop filtering is performed on the chrominance component.
  39. 一种视频编解码装置,其特征在于,包括:A video coding and decoding device, characterized in that it comprises:
    存储器,用于存储可执行指令;Memory, used to store executable instructions;
    处理器,用于执行所述存储器中存储的所述可执行指令,以执行如下操作:The processor is configured to execute the executable instructions stored in the memory to perform the following operations:
    对色度分量进行滤波;Filter the chrominance components;
    使用所述色度分量对应的亮度分量对所述滤波后的色度分量进行跨分量滤波,其中,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的虚拟滤波边界的偏移值。Use the luminance component corresponding to the chrominance component to perform cross-component filtering on the filtered chrominance component, wherein the offset value of the virtual filter boundary of the chrominance component is equal to the offset value of the virtual filter boundary of the luminance component. Shift value.
  40. 如权利要求39所述的视频编解码装置,其特征在于,针对亮度分量和色度分量在第一方向上的采样比例与亮度分量和色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同的情况,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的虚拟滤波边界的偏移值。The video encoding and decoding device according to claim 39, wherein the sampling ratio of the luminance component and the chrominance component in the first direction and the virtual filter boundary of the luminance component and the chrominance component in the first direction are In the case of different offset value ratios, the offset value of the virtual filter boundary of the chrominance component is equal to the offset value of the virtual filter boundary of the luminance component.
  41. 如权利要求39或40所述的视频编解码装置,其特征在于,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的虚拟滤波边界的偏移值,包括:对于所述色度分量的自适应环路滤波和跨分量滤波过程,所述色度分量的虚拟滤波边界的偏移值等于所述亮度分量的滤波边界的偏移值。The video encoding and decoding device according to claim 39 or 40, wherein the offset value of the virtual filter boundary of the chrominance component is equal to the offset value of the virtual filter boundary of the luminance component, comprising: In the process of adaptive loop filtering and cross-component filtering of the chrominance component, the offset value of the virtual filtering boundary of the chrominance component is equal to the offset value of the filtering boundary of the luminance component.
  42. 如权利要求39-41任一项所述的视频编解码装置,其特征在于,所述偏移值为虚拟滤波边界相较于编码图像块之间的边界的偏移值。The video encoding and decoding device according to any one of claims 39-41, wherein the offset value is an offset value of a virtual filter boundary compared to a boundary between coded image blocks.
  43. 如权利要求42所述的视频编解码装置,其特征在于,所述编码图像块包括编码树单元CTU。The video coding and decoding device according to claim 42, wherein the coded image block comprises a coding tree unit CTU.
  44. 如权利要求40所述的视频编解码装置,其特征在于,所述亮度分量与色度分量在第一方向上的采样比例与亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例不同包括亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例。The video encoding and decoding device of claim 40, wherein the sampling ratio of the luminance component and the chrominance component in the first direction and the virtual filtering boundary of the luminance component and the chrominance component in the first direction The difference in the ratio of the offset value includes that the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the ratio of the offset value of the virtual filtering boundary of the luminance component and the chrominance component in the first direction.
  45. 如权利要求40或44所述的视频编解码装置,其特征在于,所述第一方向包括图像中的列。The video encoding and decoding device according to claim 40 or 44, wherein the first direction includes a column in the image.
  46. 如权利要求45所述的视频编解码装置,其特征在于,所述采样比例为1∶1;所述偏移值比例为2∶1。The video encoding and decoding device of claim 45, wherein the sampling ratio is 1:1; and the offset value ratio is 2:1.
  47. 如权利要求45或46所述的视频编解码装置,其特征在于,所述亮度分量与色度分量在第一方向上的采样比例小于亮度分量与色度分量在所述第一方向上的虚拟滤波边界的偏移值比例的情况包括图像采样格式为422或444采样格式。The video encoding and decoding device according to claim 45 or 46, wherein the sampling ratio of the luminance component and the chrominance component in the first direction is smaller than the virtual value of the luminance component and the chrominance component in the first direction. The ratio of the offset value of the filter boundary includes that the image sampling format is 422 or 444 sampling format.
  48. 如权利要求39至47任一项所述的视频编解码装置,其特征在于,所述色度分量的虚拟滤波边界的偏移值和所述亮度分量的虚拟滤波边界的偏移值均为4。The video encoding and decoding device according to any one of claims 39 to 47, wherein the offset value of the virtual filter boundary of the chrominance component and the offset value of the virtual filter boundary of the luminance component are both 4 .
  49. 如权利要求39至48任一项所述的视频编解码装置,其特征在于,所述处理器还用于执行以下操作:The video encoding and decoding device according to any one of claims 39 to 48, wherein the processor is further configured to perform the following operations:
    对所述色度分量进行去块滤波、像素自适应补偿或自适应环路滤波中的任意一项或多项。Any one or more of deblocking filtering, pixel adaptive compensation, or adaptive loop filtering is performed on the chrominance component.
  50. 一种计算机可读存储介质,其特征在于,其存储有可执行指令,所述可执行指令在由一个或多个处理器执行时,可以使所述一个或多个处理器执行如权利要求28至38中任一项权利要求所述的视频编解码方法。A computer-readable storage medium, characterized in that it stores executable instructions that, when executed by one or more processors, can cause the one or more processors to execute as claimed in claim 28 The video encoding and decoding method according to any one of claims to 38.
PCT/CN2020/084047 2020-04-09 2020-04-09 Video encoding and decoding method and apparatus, and computer-readable storage medium WO2021203381A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080004291.5A CN112514382A (en) 2020-04-09 2020-04-09 Video encoding and decoding method and device and computer readable storage medium
PCT/CN2020/084047 WO2021203381A1 (en) 2020-04-09 2020-04-09 Video encoding and decoding method and apparatus, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/084047 WO2021203381A1 (en) 2020-04-09 2020-04-09 Video encoding and decoding method and apparatus, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2021203381A1 true WO2021203381A1 (en) 2021-10-14

Family

ID=74953136

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/084047 WO2021203381A1 (en) 2020-04-09 2020-04-09 Video encoding and decoding method and apparatus, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN112514382A (en)
WO (1) WO2021203381A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023274370A1 (en) * 2021-07-01 2023-01-05 Beijing Bytedance Network Technology Co., Ltd. Advanced bilateral filter in video coding

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130272624A1 (en) * 2012-04-11 2013-10-17 Texas Instruments Incorporated Virtual Boundary Processing Simplification for Adaptive Loop Filtering (ALF) in Video Coding
CN104702963A (en) * 2015-02-13 2015-06-10 北京大学 Boundary treatment method and device for adaptive loop filter
CN109600611A (en) * 2018-11-09 2019-04-09 北京达佳互联信息技术有限公司 Loop circuit filtering method, loop filter, electronic equipment and readable medium
WO2020043192A1 (en) * 2018-08-31 2020-03-05 Mediatek Inc. Method and apparatus of in-loop filtering for virtual boundaries in video coding

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150382016A1 (en) * 2014-06-27 2015-12-31 Mitsubishi Electric Research Laboratories, Inc. Method for Processing Multi-Component Video and Images
US10419757B2 (en) * 2016-08-31 2019-09-17 Qualcomm Incorporated Cross-component filter
EP3685585A1 (en) * 2017-09-20 2020-07-29 Vid Scale, Inc. Handling face discontinuities in 360-degree video coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130272624A1 (en) * 2012-04-11 2013-10-17 Texas Instruments Incorporated Virtual Boundary Processing Simplification for Adaptive Loop Filtering (ALF) in Video Coding
CN104702963A (en) * 2015-02-13 2015-06-10 北京大学 Boundary treatment method and device for adaptive loop filter
WO2020043192A1 (en) * 2018-08-31 2020-03-05 Mediatek Inc. Method and apparatus of in-loop filtering for virtual boundaries in video coding
CN109600611A (en) * 2018-11-09 2019-04-09 北京达佳互联信息技术有限公司 Loop circuit filtering method, loop filter, electronic equipment and readable medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
C.-Y. CHEN, T.-D. CHUANG, C.-Y. LAI, Z.-Y. LIN, Y.-W. HUANG, S.-M. LEI (MEDIATEK): "CE5-1: Adaptive loop filter with virtual boundary processing", 14. JVET MEETING; 20190319 - 20190327; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-N0088, 13 March 2019 (2019-03-13), XP030202813 *
Y. WANG (BYTEDANCE), H. LIU (BYTEDANCE), L. ZHANG (BYTEDANCE), K. ZHANG (BYTEDANCE), Z. DENG, Y. WANG (BYTEDANCE): "Non-CE5: On CC-ALF padding for ALF virtual boundaries", 17. JVET MEETING; 20200107 - 20200117; BRUSSELS; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-Q0311 ; m51906, 1 January 2020 (2020-01-01), XP030223130 *

Also Published As

Publication number Publication date
CN112514382A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
JP7405865B2 (en) Temporal prediction of parameters in nonlinear adaptive loop filters
CN113632490B (en) Nonlinear adaptive loop filtering in video processing
JP7291846B2 (en) Sample decision for adaptive loop filtering
TWI737137B (en) Method and apparatus for non-linear adaptive loop filtering in video coding
JP7350082B2 (en) Loop filtering method, apparatus and computer storage medium
US11627342B2 (en) Loop filtering implementation method and apparatus, and computer storage medium
CN113068025B (en) Decoding prediction method, device and computer storage medium
US20220021905A1 (en) Filtering method and device, encoder and computer storage medium
WO2021203381A1 (en) Video encoding and decoding method and apparatus, and computer-readable storage medium
CN113132740A (en) Method, system and storage medium for reconstructing frames based on adaptive loop filtering
US20230388550A1 (en) Method and apparatus for adaptively processing video samples in a video signal frame
US11917144B2 (en) Efficient in-loop filtering for video coding
WO2021196234A1 (en) Video encoding and decoding method and device, and storage medium
WO2020140214A1 (en) Prediction decoding method, device and computer storage medium
WO2024007116A1 (en) Decoding method, encoding method, decoder, and encoder
WO2023193253A1 (en) Decoding method, coding method, decoder and encoder
WO2023193254A1 (en) Decoding method, encoding method, decoder, and encoder
US11245896B1 (en) Deblocking filter level decision method

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: 20930635

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: 20930635

Country of ref document: EP

Kind code of ref document: A1