Video coding and decoding method and device, and storage medium
By setting an independent identifier for each chroma component to indicate the ALF filter, the problem of insufficient encoding efficiency and flexibility caused by the integration of chroma component filter control switches in the existing technology is solved, thereby improving the flexibility and efficiency of video encoding and decoding.
Patent Information
- Application Number
- CN202511627971.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-03
- Publication Date
- 2026-01-09
AI Technical Summary
In existing video coding technologies, the filtering control switches for each chroma component are combined into one, which affects the efficiency and flexibility of the coding process, resulting in insufficient consistency and readability of the video coding.
During video encoding, an independent identifier is set for each chroma component to indicate whether an adaptive loop filter (ALF) is used for filtering, simplifying the process of writing encoder syntax elements and reading decoder syntax elements.
It improves the flexibility and efficiency of video encoding and decoding, reduces redundancy, and enhances the consistency and readability of the encoding process.
Smart Images

Figure CN121309831A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed on April 3, 2020, with application number 202080005555.9 and invention title "A video encoding, decoding method, device and storage medium". Technical Field
[0002] This invention relates to the field of video encoding technology, and in particular to a video encoding and decoding method, device, and storage medium. Background Technology
[0003] Adaptive Loop Filter (ALF) is a crucial technology in video encoding and decoding. This technique encodes filter coefficients to filter the reconstructed image at the decoding stage, reducing compression distortion and providing a high-quality prediction reference image for subsequent encoding and decoding, thereby further improving compression efficiency.
[0004] In existing adaptive loop filtering techniques, each chroma component of the image corresponds to a filter control switch, and this single switch controls each chroma component. This approach, which integrates the filter control switches for each chroma component, affects the consistency and readability of the chroma components during the encoding process, thus impacting the efficiency and flexibility of video coding. Therefore, improving the efficiency and flexibility of video coding has become a key research focus. Summary of the Invention
[0005] This invention provides a video encoding and decoding method, device, and storage medium that simplifies the process of writing encoder syntax elements and reading decoder syntax elements, thereby improving the flexibility and efficiency of video encoding / decoding.
[0006] In a first aspect, embodiments of the present invention provide a video encoding method, including:
[0007] A bitstream of an image sequence is generated, wherein a first strip-level syntax element indicates whether the first chroma component of the two chroma components is filtered using an adaptive loop filter (ALF), and a second strip-level syntax element indicates whether the second chroma component of the two chroma components is filtered using an adaptive loop filter (ALF).
[0008] Secondly, embodiments of the present invention provide a video decoding method, including:
[0009] A bitstream of an image sequence is obtained, wherein a first band-level syntax element indicates whether the first chroma component of the two chroma components is filtered by an adaptive loop filter (ALF), and a second band-level syntax element indicates whether the second chroma component of the two chroma components is filtered by an adaptive loop filter (ALF).
[0010] The first and second stripe-level syntax elements corresponding to the two chroma components of the current image are parsed from the bitstream.
[0011] Based on the first and second stripe-level syntax elements, determine whether to use ALF to filter the two chroma components of the reconstructed image of the current image.
[0012] Thirdly, embodiments of the present invention provide a video encoding device, including: a memory and a processor;
[0013] The memory is used to store programs;
[0014] The processor is used to invoke the program, and when the program is executed, it is used to perform the following operations:
[0015] A bitstream of an image sequence is generated, wherein a first strip-level syntax element indicates whether the first chroma component of the two chroma components is filtered using an adaptive loop filter (ALF), and a second strip-level syntax element indicates whether the second chroma component of the two chroma components is filtered using an adaptive loop filter (ALF).
[0016] Fourthly, embodiments of the present invention provide a video decoding device, including: a memory and a processor;
[0017] The memory is used to store programs;
[0018] The processor is used to invoke the program, and when the program is executed, it is used to perform the following operations:
[0019] A bitstream of an image sequence is obtained, wherein a first band-level syntax element indicates whether the first chroma component of the two chroma components is filtered by an adaptive loop filter (ALF), and a second band-level syntax element indicates whether the second chroma component of the two chroma components is filtered by an adaptive loop filter (ALF).
[0020] The first and second stripe-level syntax elements corresponding to the two chroma components of the current image are parsed from the bitstream.
[0021] Based on the first and second stripe-level syntax elements, determine whether to use ALF to filter the two chroma components of the reconstructed image of the current image.
[0022] Fifthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first or second aspect above.
[0023] Sixthly, embodiments of the present invention provide a method for generating a bitstream, comprising:
[0024] A bitstream of an image sequence is generated, wherein a first strip-level syntax element indicates whether the first chroma component of the two chroma components is filtered using an adaptive loop filter (ALF), and a second strip-level syntax element indicates whether the second chroma component of the two chroma components is filtered using an adaptive loop filter (ALF).
[0025] In this embodiment of the invention, the first band-level syntax element in the bitstream indicates whether the first chroma component of the two chroma components is filtered using an Adaptive Loop Filter (ALF), and the second band-level syntax element indicates whether the second chroma component of the two chroma components is filtered using an ALF. This simplifies the process of writing syntax elements for the encoder and reading syntax elements for the decoder, improving the flexibility and efficiency of video encoding / decoding. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the Wiener filtering principle;
[0028] Figure 2 This is a schematic diagram of an adaptive loop filter shape;
[0029] Figure 3 This is a schematic diagram of a cross-component adaptive loop filter.
[0030] Figure 4 This is a schematic diagram of the filter shape for a cross-component adaptive loop filter;
[0031] Figure 5 This is a flowchart illustrating a video encoding method provided in an embodiment of the present invention;
[0032] Figure 6 This is a flowchart illustrating a video decoding method provided in an embodiment of the present invention;
[0033] Figure 7 This is a flowchart illustrating another video encoding method provided in an embodiment of the present invention;
[0034] Figure 8 This is a flowchart illustrating another video decoding method provided in an embodiment of the present invention;
[0035] Figure 9 This is a schematic diagram of the structure of a video encoding device provided in an embodiment of the present invention;
[0036] Figure 10 This is a schematic diagram of the structure of a video decoding device provided in an embodiment of the present invention;
[0037] Figure 11 This is a schematic diagram of another video encoding device provided in an embodiment of the present invention;
[0038] Figure 12 This is a schematic diagram of another video decoding device provided in an embodiment of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0041] The video encoding method proposed in this invention can be applied to video encoding devices, which can be installed on smart terminals (such as mobile phones, tablets, etc.). In some embodiments, this invention can be applied to aircraft (such as drones), and in other embodiments, it can also be applied to other mobile platforms (such as unmanned ships, unmanned vehicles, robots, etc.). This invention does not impose specific limitations.
[0042] This invention relates to an adaptive loop filter (ALF) technique for in-loop filtering in Versatile Video Coding (VVC) video coding standards. It primarily optimizes adaptive loop filtering techniques and Cross-Component ALF (CCALF) techniques, removing redundancy and making their design more rational. Its main application is in codecs conforming to international video coding standards such as H.264, High Efficiency Video Coding (HEVC), and the Chinese AVS2 standard. It can improve the quality of compressed video and is of great significance for the compression processing of broadcast television, video conferencing, and online video.
[0043] Before introducing the embodiments of the present invention, the adaptive loop filtering technology ALF will be explained.
[0044] Loop filtering is a crucial part of the video encoding / decoding framework, primarily used to reduce compression distortions such as blocking and ringing artifacts during encoding. In one example, three loop filtering techniques are used: deblocking filtering, adaptive sample compensation filtering, and adaptive loop filtering. Deblocking and adaptive sample compensation filtering follow the methods used in HEVC. Deblocking filtering is applied to the boundaries of prediction and transform units, using a trained low-pass filter to non-linearly weight boundary pixels, thereby reducing blocking artifacts. Adaptive sample compensation filtering classifies pixels within image blocks and applies the same compensation value to each class of pixels, making the reconstructed image closer to the original image, thus suppressing ringing artifacts.
[0045] In one embodiment, adaptive loop filtering is a Wiener filter primarily used to minimize the mean square error between the original and reconstructed images. The adaptive loop filter is the mean square optimal filter calculated based on the original signal and the encoded distortion signal; essentially, it is a Wiener filter. Figure 1 As shown, Figure 1 This is a schematic diagram of the Wiener filter principle, such as... Figure 1 In this diagram, X represents the original signal, e represents noise or distortion, and Y represents the distorted signal. It is the filtered signal.
[0046] In one embodiment, in an example ALF, a weighted average of the surrounding pixels is used to obtain the filtered result for the current point. The positions of the neighboring pixels used are as follows: Figure 2 As shown, Figure 2 This is a schematic diagram of an adaptive loop filter shape. (Example) Figure 2As shown, there are 5x5 and 7x7 rhombuses. Assuming the point corresponding to C12 is the point to be filtered, the filtering process uses... Figure 2 The filter coefficients are obtained by weighted averaging of all points in the dataset. There are 13 filter coefficients, C0 to C12, representing the weights of each point. The final filtering process is as follows: Figure 2 The product of each point and its corresponding filter coefficient is then summed. The points used in this process are all points from the reconstructed frames previously obtained by ALF.
[0047] In one embodiment, CCALF adjusts the chroma component by using the value of the luminance component to improve the quality of the chroma component. In some embodiments, CCALF is a linear ALF. In other embodiments, CCALF only processes the chroma component and does not modify the value of the luminance component.
[0048] In some embodiments, CCALF uses the luminance component before ALF to filter the chrominance component after ALF. CCALF jointly calculates the filtering coefficients using the luminance and chrominance components, and then uses the calculated filtering coefficients to filter the chrominance component. The overall flowchart of CCALF filtering is shown below. Figure 3 As shown, Figure 3 This is a flowchart of a cross-component adaptive loop filtering process. First, ALF is used to filter the image's luminance (Luma), chrominance (Cb), and Cr. Then, CCALF is used to filter the image's chrominance (Cb) and Cr. Finally, based on the results obtained from filtering the image's chrominance (Cb) and Cr using CCALF and ALF respectively, the filtered chrominance (Cb) and Cr are determined.
[0049] In one embodiment, the shape of the CCALF filter is as follows: Figure 4 As shown, Figure 4 This is a schematic diagram of the filter shape for a cross-component adaptive loop filter, such as... Figure 4 As shown, the CCALF filter can be a 3x4 rhombus with a total of 8 coefficients. Assuming that the position of 2 is the current Cb or Cr component pixel, the result of filtering the pixel at the position of 2 can be obtained by weighted averaging of the 7 points around 2.
[0050] Currently, when using ALF to filter two chroma components, the generated image sequence bitstream uses the same identifier for both chroma components to indicate whether the corresponding chroma component has been filtered using ALF.
[0051] In one embodiment, the bitstream uses the same identifier in the image-level syntax element to indicate whether the two chroma components are filtered using ALF. For example, the bitstream uses the same identifier ph_alf_chroma_idc in the image-level syntax element to indicate whether the two chroma components are filtered using ALF, where ph_alf_chroma_idc = 0 indicates that neither Cb nor Cr chroma components are filtered using ALF; ph_alf_chroma_idc = 1 indicates that the Cb chroma component is filtered using ALF, and the Cr chroma component is not filtered using ALF; ph_alf_chroma_idc = 2 indicates that the Cb chroma component is not filtered using ALF, and the Cr chroma component is filtered using ALF; ph_alf_chroma_idc = 3 indicates that both Cb and Cr chroma components are filtered using ALF.
[0052] In one embodiment, the bitstream uses the same identifier in the image-level syntax element to indicate whether the two chroma components are filtered using ALF. For example, the bitstream uses the same identifier `slice_alf_chroma_idc` in the image-level syntax element to indicate whether the two chroma components are filtered using ALF. Specifically, `slice_alf_chroma_idc` being 0 indicates that neither Cb nor Cr chroma components are filtered using ALF; `slice_alf_chroma_idc` being 1 indicates that the Cb chroma component is filtered using ALF, and the Cr chroma component is not filtered using ALF; `slice_alf_chroma_idc` being 2 indicates that the Cb chroma component is not filtered using ALF, and the Cr chroma component is filtered using ALF; and `slice_alf_chroma_idc` being 3 indicates that both Cb and Cr chroma components are filtered using ALF.
[0053] In one embodiment, in the bitstream, the image block-level syntax elements for the two chroma components use `alf_ctb_cc_cb_idc` to indicate whether chroma component Cb is filtered using CCALF, and `alf_ctb_cc_cr_idc` to indicate whether chroma component Cr is filtered using CCALF. Taking `alf_ctb_cc_cb_idc` as an example, if `alf_ctb_cc_cb_idc` is 0, it indicates that the Cb chroma component is not filtered using CCALF; if `alf_ctb_cc_cb_idc` is greater than 0, it indicates that the Cb chroma component is filtered using CCALF.
[0054] It is evident that using the same identifier to indicate whether the Adaptive Loop Filter (ALF) is used for filtering increases redundancy and affects the consistency and readability of the encoded chroma components.
[0055] To address the aforementioned issues, this invention removes the unified identifier used for each chroma component in traditional ALF and redesigns the syntax elements. Each chroma component in ALF is assigned a unique identifier to indicate whether the corresponding chroma component is filtered using ALF. This simplifies the process of writing syntax elements for the encoder and reading syntax elements for the decoder, thereby improving the flexibility and efficiency of video encoding / decoding.
[0056] In one embodiment, for the chroma components of image-level ALF, the present invention removes ph_alf_chroma_idc, uses ph_alf_cb_enabled_flag to indicate whether the Cb chroma component is filtered by ALF, and uses ph_alf_cr_enabled_flag to indicate whether the Cr chroma component is filtered by ALF.
[0057] In one embodiment, for the chroma components of slice-level ALF, the present invention removes slice_alf_chroma_idc, and uses slice_alf_cb_enabled_flag to indicate whether the Cb chroma component is filtered by ALF, and uses slice_alf_cr_enabled_flag to indicate whether the Cr chroma component is filtered by ALF.
[0058] In one embodiment, for the chromaticity components of a CTU-level ALF filter, this embodiment uses two flags, alf_ctb_cc_cb_flag and alf_ctb_cc_cb_idx, to indicate whether the Cb chromaticity components are filtered using CCALF. The alf_ctb_cc_cb_flag flag indicates whether CCALF is used for the Cb chromaticity components; if so, the alf_ctb_cc_cb_idx flag further indicates the index of the CCALF filter used for the Cb chromaticity components. Similarly, this embodiment uses two flags, alf_ctb_cc_cr_flag and alf_ctb_cc_cr_idx, to indicate whether the Cr chromaticity components are filtered using CCALF. The alf_ctb_cc_cr_flag flag indicates whether CCALF is used for the Cr chromaticity components; if so, the alf_ctb_cc_cr_idx flag further indicates the index of the CCALF filter used for the Cr chromaticity components.
[0059] As can be seen, this implementation method of the present invention can reduce redundancy, simplify the process of writing encoder syntax elements and reading decoder syntax elements, and improve the flexibility and efficiency of video encoding / decoding.
[0060] The following is in conjunction with the appendix Figure 5-8 The video encoding and video decoding methods provided in the embodiments of the present invention will be illustrated.
[0061] Please see details. Figure 5 , Figure 5 This is a flowchart illustrating a video encoding method provided by an embodiment of the present invention. The method can be applied to a video encoding device, which can be installed on a smart terminal. Specifically, the method of this embodiment includes the following steps.
[0062] S501: Obtain the color components of the image sequence, wherein the color components include two chromaticity components.
[0063] In this embodiment of the invention, the video encoding device can acquire the color components of an image sequence, wherein the color components include two chromaticity components. In some embodiments, the two chromaticity components include Cb and Cr chromaticity components.
[0064] S502: Adaptive loop filtering technology is used to filter the reconstructed blocks of color components of at least a portion of the images in the image sequence.
[0065] In this embodiment of the invention, the video encoding device may use adaptive loop filtering technology to filter the reconstructed blocks of color components of at least a portion of the image sequence.
[0066] In one embodiment, when the video encoding device applies adaptive loop filtering technology to the reconstructed blocks of the color components of at least a portion of the image sequence, it can obtain the pixel value of each pixel in the reconstructed blocks of the color components of at least a portion of the image sequence, determine the filtering coefficient of each pixel in the reconstructed block, and use the filtering coefficient of each pixel as a weight to accumulate the product of the pixel value of each pixel and its corresponding filtering coefficient to obtain the filtered result.
[0067] In one embodiment, the filtering coefficients are determined by classifying pixels according to their categories, wherein pixels of the same category correspond to the same set of filtering coefficients. Figure 2 Taking a 5x5 rhombus as an example, there are 7 filter coefficients C0 to C6 in the reconstructed block, and the pixels corresponding to the same filter coefficient belong to the same type.
[0068] In some embodiments, there are multiple ways to classify pixels. The present invention does not limit the specific methods. Taking an existing classification method as an example, the prior art only classifies the luminance Y component and does not classify the chrominance U and V components. The Y component can be divided into 25 categories, while the U and V components each have only one category. This means that for a frame of image, the Y component can have up to 25 sets of filters, while the U and V components each have only one set.
[0069] In one embodiment, each 4x4 block is classified according to the Laplace direction:
[0070] (1)
[0071] Where C represents the category to which the pixel block belongs. It is the result of further subcategorization after classification. There are multiple ways to obtain the value; this only represents the result of the sub-classification. D represents the direction, and the direction D is calculated as follows:
[0072] (2)
[0073] Where (i,j) represents the coordinate position of the current 4x4 block in the entire image, and R(k,l) represents the pixel value at position (k,l) in the 4x4 block; This represents the vertical Laplacian gradient of the pixel located at coordinate (i,j) in the 4x4 block. This represents the horizontal Laplacian gradient of the pixel located at coordinate (i,j) in the 4x4 block. This represents the Laplacian gradient of the pixel located at coordinate (i,j) in the 4x4 block at a 135-degree angle. The Laplacian gradient at 45 degrees represents the pixel located at coordinate (i,j) in the 4x4 block. This represents the Laplace gradient of a 4x4 block in the vertical direction; This represents the Laplace gradient of a 4x4 block in the horizontal direction; This represents the Laplace gradient of a 4x4 block at 135 degrees. This represents the Laplacian gradient of the 4x4 block at a 45-degree angle; i and j are the coordinates of the top-left pixel of the 4x4 block. Represents the coordinates The reconstructed pixel values. The calculation method for D is as follows:
[0074] (3)
[0075] in, This represents the maximum value of the Laplacian gradient in the horizontal and vertical directions; This represents the minimum value of the Laplace gradient in the horizontal and vertical directions; This represents the maximum value of the Laplace gradient in the 45° and 135° directions; This represents the minimum value of the Laplace gradient in the 45° and 135° directions; The ratio representing the horizontal and vertical Laplace gradients; This represents the ratio of the Laplace gradients in the 45° and 135° directions.
[0076] if and If, then D is set to 0; if and If, then D is set to 1; if and If, then D is set to 2; if and D is set to 3; if and If t1 and t2 represent the pre-set thresholds, then D is set to 4.
[0077] The calculation method is as follows:
[0078] (4)
[0079] Quantize A to obtain integers between 0 and 4, thus obtaining .
[0080] S503: Generate the bitstream of the image sequence, wherein the bitstream uses different identifiers in the image-level syntax elements for the two chroma components to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0081] In this embodiment of the invention, the video encoding device can generate a bitstream of the image sequence, wherein the bitstream uses different identifiers in the image-level syntax elements for the two chroma components to indicate whether the corresponding chroma components are filtered by an adaptive loop filter (ALF).
[0082] In one embodiment, the chroma component Cb in the bitstream can be identified by ph_alf_cb_enabled_flag in the image-level syntax element, which indicates whether the chroma component Cb is filtered by the Adaptive Loop Filter (ALF).
[0083] In one embodiment, the chrominance component Cr in the bitstream can be identified using ph_alf_cr_enabled_flag in the image-level syntax element, which indicates whether the chrominance component Cr is filtered by the adaptive loop filter ALF.
[0084] The representations of the chromaticity components Cb and Cr in the image-level syntax elements are shown in Table 1 below:
[0085] Table 1
[0086]
[0087] In one embodiment, the two chroma components in the bitstream are identified by different identifiers in the syntax elements of the slice level to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0088] In one embodiment, the chroma component Cb in the bitstream can be identified by slice_alf_cb_enabled_flag in the slice-level syntax element, which indicates whether the chroma component Cb is filtered by the adaptive loop filter ALF.
[0089] In one embodiment, the chroma component Cr in the bitstream can be identified using slice_alf_cr_enabled_flag in the slice-level syntax element, which indicates whether the chroma component Cr is filtered by the adaptive loop filter ALF.
[0090] The representations of the chromaticity components Cb and Cr in the slice-level syntax elements are shown in Table 2 below:
[0091] Table 2
[0092]
[0093] In one embodiment, for each of the two chroma components in the bitstream, a first identifier is used in the image block-level syntax elements to indicate whether the chroma component is filtered using ALF (Adaptive Cross-Component Filtering), and when the first identifier indicates that the chroma component is filtered using ALF, a second identifier is used to indicate the ALF filter used by the chroma component. In some embodiments, the ALF filter is a cross-component adaptive loop filter (CCALF). In some embodiments, the image block level is at the coding tree unit (CTU) level, wherein a CTU includes a luma coding tree block (CTB), two chroma coding tree blocks (CTBs), and syntax elements.
[0094] In one embodiment, the chroma component Cb in the bitstream can use alf_ctb_cc_cb_flag as a first identifier in the image block-level syntax element to indicate whether the chroma component Cb is filtered by the adaptive loop filter CCALF. If the adaptive loop filter CCALF is used, then alf_ctb_cc_cb__idx is further used as a second identifier to identify the index of the CCALF filter used by the chroma component Cb.
[0095] In one embodiment, the chroma component Cr in the bitstream can use `alf_ctb_cc_cr_flag` as a first identifier in the image block-level syntax element to indicate whether the chroma component Cr is filtered using the adaptive loop filter CCALF. If the adaptive loop filter CCALF is used, then `alf_ctb_cc_cr__idx` is further used as a second identifier to identify the index of the CCALF filter used for the chroma component Cr. In some embodiments, the second identifier is calculated based on the first identifier. In some embodiments, when it is determined that the chroma component is filtered using CCALF in the image block-level syntax element, the second identifier can be determined based on the difference between the first identifier and 1.
[0096] The representations of the chromaticity components Cb and Cr at the image block level syntax elements are shown in Table 3 below:
[0097] Table 3
[0098]
[0099]
[0100] In this embodiment of the invention, a video encoding device can acquire color components of an image sequence, including two chroma components, and apply adaptive loop filtering (ALF) technology to the reconstructed blocks of the color components of at least a portion of the image sequence, and generate a bitstream of the image sequence. In the bitstream, different identifiers are used in the image-level syntax elements to indicate whether the corresponding chroma components are filtered using the ALF. This implementation simplifies the encoder syntax element writing process by utilizing different identifiers during ALF filtering, improving the efficiency and flexibility of video encoding.
[0101] Please see Figure 6 , Figure 6This is a flowchart illustrating a video decoding method provided in an embodiment of the present invention. The method can be applied to a video decoding device, which can be installed on a smart terminal (such as a mobile phone, tablet computer, etc.). Specifically, the method of this embodiment includes the following steps.
[0102] S601: Obtain the bitstream of the image sequence, wherein the image in the image sequence includes two chroma components, and the bitstream uses different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered by ALF.
[0103] In this embodiment of the invention, the video decoding device can acquire the bitstream of an image sequence, wherein the image in the image sequence includes two chroma components, and the bitstream uses different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered using ALF.
[0104] In one embodiment, the two chroma components in the bitstream are identified by different identifiers in the stripe-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0105] In one embodiment, for each of the two chroma components in the bitstream, a first identifier is used in the image block-level syntax elements to indicate whether the chroma component is filtered using ALF (Adaptive Cross-Component Filtering), and when the first identifier indicates that the chroma component is filtered using ALF, a second identifier is used to indicate the ALF filter used for the chroma component. In some embodiments, the ALF filter is a cross-component adaptive loop filter (CCALF). In some embodiments, the image block level is at the coding tree unit (CTU) level.
[0106] S602: Parse the identifiers corresponding to the two chromaticity components of the current image from the bitstream.
[0107] In this embodiment of the invention, the video decoding device can parse the identifiers corresponding to the two chroma components of the current image from the bitstream.
[0108] In one embodiment, the video decoding device may use a contextual approach to parse the first identifiers corresponding to the two chroma components of the current image from the bitstream; and / or use a truncated unary code approach to parse the second identifiers corresponding to the two chroma components of the current image from the bitstream.
[0109] S603: Determine whether to use ALF to filter the reconstructed blocks of the two chromaticity components of the current image based on the identifiers corresponding to the two chromaticity components respectively.
[0110] In this embodiment of the invention, the video decoding device can determine whether to use ALF to filter the reconstructed blocks of the two chroma components of the current image based on the identifiers corresponding to the two chroma components respectively.
[0111] In this embodiment of the invention, the video decoding device can acquire a bitstream of an image sequence, wherein the images in the image sequence include two chroma components. The bitstream uses different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered using ALF (Alternating Current Filtering). The device parses the identifiers corresponding to the two chroma components of the current image from the bitstream, thereby determining whether to use ALF to filter the reconstructed blocks of the two chroma components of the current image based on these identifiers. This implementation simplifies the decoder syntax element reading process during ALF filtering by using different identifiers, improving the efficiency and flexibility of video decoding.
[0112] Please see Figure 7 , Figure 7 This is a flowchart illustrating another video encoding method provided by an embodiment of the present invention. The method can be applied to video encoding devices, wherein the video decoding device can be installed on a smart terminal (such as a mobile phone, tablet computer, etc.). Specifically, the method of this embodiment includes the following steps.
[0113] S701: Obtain the color components of the image sequence, wherein the color components include two chromaticity components.
[0114] In this embodiment of the invention, the video encoding device can acquire the color components of an image sequence, wherein the color components include two chroma components.
[0115] S702: The reconstructed blocks of color components of at least a portion of the images in the image sequence are filtered using ALF.
[0116] In this embodiment of the invention, the video encoding device may apply ALF filtering to the reconstructed blocks of the color components of at least a portion of the images in the image sequence. In some embodiments, the process of the video encoding device applying ALF filtering to the reconstructed blocks of the color components of at least a portion of the images in the image sequence is as described above, and will not be repeated here.
[0117] S703: Generate the bitstream of the image sequence, wherein, for each of the two chroma components, the bitstream uses a first identifier in the image block-level syntax element to indicate whether the chroma component is filtered using ALF, and when the first identifier indicates that the chroma component is filtered using ALF, a second identifier is used to indicate the ALF filter used by the chroma component.
[0118] In this embodiment of the invention, the video encoding device can generate a bitstream of the image sequence. For each of the two chroma components, the bitstream uses a first identifier in the image block-level syntax elements to indicate whether the chroma component is filtered using ALF (Alternating Current Filter). When the first identifier indicates that the chroma component is filtered using ALF, a second identifier indicates the ALF filter used for the chroma component. In some embodiments, the ALF filter includes a CCALF filter. In some embodiments, the image block level is a Coding Tree Unit (CTU) level.
[0119] In one embodiment, the first identifier is encoded using a contextual approach; and / or, the second identifier is encoded using a truncated unary code approach.
[0120] In one embodiment, the two chroma components in the bitstream are identified by different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0121] In one embodiment, the two chroma components in the bitstream are identified by different identifiers in the stripe-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0122] In this embodiment of the invention, a video encoding device can acquire color components of an image sequence, including two chroma components, and apply ALF filtering to the reconstructed blocks of the color components of at least a portion of the images in the image sequence to generate a bitstream of the image sequence. For each of the two chroma components, a first identifier in the image block-level syntax elements of the bitstream indicates whether the chroma component is filtered using ALF. When the first identifier indicates that the chroma component is filtered using ALF, a second identifier indicates the ALF filter used for the chroma component. This implementation simplifies the encoder syntax element writing process by utilizing the first and second identifiers during CCALF filtering, improving the efficiency and flexibility of video encoding.
[0123] Please see Figure 8 , Figure 8 This is a flowchart illustrating another video decoding method provided by an embodiment of the present invention. The method can be applied to a video decoding device, which can be installed on a smart terminal (such as a mobile phone, tablet computer, etc.). Specifically, the method of this embodiment includes the following steps.
[0124] S801: Obtain the bitstream of the image sequence, wherein the image in the image sequence includes two chroma components, and for each of the two chroma components, the bitstream uses a first identifier in the image block-level syntax element to indicate whether the chroma component is filtered by ALF, and uses a second identifier to indicate the ALF filter used by the chroma component.
[0125] In this embodiment of the invention, the video decoding device can acquire a bitstream of an image sequence, wherein the image in the image sequence includes two chroma components. For each of the two chroma components, the bitstream uses a first identifier in the image block-level syntax elements to indicate whether the chroma component is filtered using ALF, and uses a second identifier to indicate the ALF filter used for the chroma component. In some embodiments, the ALF filter is a cross-component adaptive loop filter (CCALF), and the image block level is a coding tree unit (CTU) level.
[0126] In one embodiment, the two chroma components in the bitstream are identified by different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0127] In one embodiment, the two chroma components in the bitstream are identified by different identifiers in the stripe-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0128] S802: Parse the first identifier and the second identifier corresponding to the two chromaticity components of the current image from the bitstream.
[0129] In this embodiment of the invention, the video decoding device can parse the first identifier and the second identifier corresponding to the two chroma components of the current image from the bitstream.
[0130] In one embodiment, the video decoding device may use a contextual approach to parse the first identifiers corresponding to the two chroma components of the current image from the bitstream; and use a truncated unary code approach to parse the second identifiers corresponding to the two chroma components of the current image from the bitstream.
[0131] S803: For each chroma component of the current image block, determine whether to use ALF to filter the reconstructed block of the chroma component according to the first identifier corresponding to the chroma component. When it is determined to use ALF, determine the corresponding ALF filter to filter the reconstructed block of the chroma component according to the second identifier.
[0132] In this embodiment of the invention, the video decoding device can determine whether to use ALF to filter the reconstructed block of the chroma component for each chroma component of the current image block according to the first identifier corresponding to the chroma component. When it is determined to use ALF, the corresponding ALF filter is determined according to the second identifier to filter the reconstructed block of the chroma component.
[0133] In this embodiment of the invention, a video decoding device can acquire a bitstream of an image sequence, wherein the image in the image sequence includes two chroma components. For each of the two chroma components, the bitstream uses a first identifier in the image block-level syntax elements to indicate whether the chroma component is filtered using ALF, and uses a second identifier to indicate the ALF filter used for the chroma component. The device parses the first and second identifiers corresponding to the two chroma components of the current image from the bitstream, and for each chroma component of the current image block, determines whether to use ALF to filter the reconstructed block of the chroma component based on the first identifier corresponding to the chroma component. When it is determined that ALF is used, the corresponding ALF filter is determined based on the second identifier to filter the reconstructed block of the chroma component. Through this implementation, the first and second identifiers can be used to simplify the decoder syntax element reading process during CCALF filtering, improving the efficiency and flexibility of video decoding.
[0134] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a video encoding device provided in an embodiment of the present invention. Specifically, the video encoding device includes: a memory 901, a processor 902, and a data interface 903.
[0135] The memory 901 may include volatile memory; the memory 901 may also include non-volatile memory; the memory 901 may also include a combination of the above types of memory. The processor 902 may be a central processing unit (CPU). The processor 902 may further include hardware video encoding equipment. The aforementioned hardware video encoding equipment may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. Specifically, it may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
[0136] Furthermore, the memory 901 is used to store programs. When the program is executed, the processor 902 can call the program stored in the memory 901 to perform the following steps:
[0137] Obtain the color components of the image sequence, wherein the color components include two chromaticity components;
[0138] An adaptive loop filtering technique is used to filter the reconstructed color components of at least a portion of the images in the image sequence;
[0139] Generate a bitstream of the image sequence, wherein the bitstream uses different identifiers in the image-level syntax elements for the two chroma components to indicate whether the corresponding chroma components are filtered by an adaptive loop filter (ALF).
[0140] Furthermore, in the bitstream, different identifiers are used in the strip-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0141] Furthermore, in the bitstream, for each of the two chroma components, the bitstream uses a first identifier in the image block-level syntax element to indicate whether the chroma component is filtered using ALF, and when the first identifier indicates that the chroma component is filtered using ALF, a second identifier is used to indicate the ALF filter used by the chroma component.
[0142] Furthermore, the ALF filter is a cross-component adaptive loop filter (CCALF filter).
[0143] Furthermore, the image block level is the coding tree unit (CTU) level.
[0144] Furthermore, the first identifier is encoded using a contextual approach; and / or,
[0145] The second identifier is encoded using a truncated unary code.
[0146] In this embodiment of the invention, a video encoding device can acquire color components of an image sequence, including two chroma components, and apply adaptive loop filtering (ALF) technology to the reconstructed blocks of the color components of at least a portion of the image sequence, and generate a bitstream of the image sequence. In the bitstream, different identifiers are used in the image-level syntax elements to indicate whether the corresponding chroma components are filtered using the ALF. This implementation simplifies the encoder syntax element writing process by utilizing different identifiers during ALF filtering, improving the efficiency and flexibility of video encoding.
[0147] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a video decoding device provided in an embodiment of the present invention. Specifically, the video decoding device includes: a memory 1001, a processor 1002, and a data interface 1003.
[0148] The memory 1001 may include volatile memory; the memory 1001 may also include non-volatile memory; the memory 1001 may also include a combination of the above types of memory. The processor 1002 may be a central processing unit (CPU). The processor 1002 may further include a hardware video decoding device. The aforementioned hardware video decoding device may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. Specifically, it may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
[0149] Furthermore, the memory 1001 is used to store programs. When a program is executed, the processor 1002 can call the program stored in the memory 1001 to perform the following steps:
[0150] Obtain the bitstream of an image sequence, wherein the images in the image sequence include two chroma components, and the bitstream uses different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered by ALF respectively;
[0151] The identifiers corresponding to the two chroma components of the current image are parsed from the bitstream.
[0152] Whether to use ALF to filter the reconstructed blocks of the two chromaticity components of the current image is determined based on the identifiers corresponding to the two chromaticity components.
[0153] Furthermore, in the bitstream, different identifiers are used in the strip-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0154] Furthermore, in the bitstream, for each of the two chroma components, the bitstream uses a first identifier in the image block-level syntax element to indicate whether the chroma component is filtered using ALF, and when the first identifier indicates that the chroma component is filtered using ALF, a second identifier is used to indicate the ALF filter used by the chroma component.
[0155] Furthermore, the ALF filter is a cross-component adaptive loop filter (CCALF filter).
[0156] Furthermore, when the processor 1002 parses the identifiers corresponding to the two chroma components of the current image from the bitstream, it is specifically used for:
[0157] The first identifiers corresponding to the two chroma components of the current image are parsed from the bitstream using a context-sensitive approach; and / or,
[0158] The second identifiers corresponding to the two chromaticity components of the current image are parsed from the bitstream by using a truncated unary code method.
[0159] Furthermore, the image block level is the coding tree unit (CTU) level.
[0160] In this embodiment of the invention, the video decoding device can acquire a bitstream of an image sequence, wherein the images in the image sequence include two chroma components. The bitstream uses different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered using ALF (Alternating Current Filtering). The device parses the identifiers corresponding to the two chroma components of the current image from the bitstream, thereby determining whether to use ALF to filter the reconstructed blocks of the two chroma components of the current image based on these identifiers. This implementation simplifies the decoder syntax element reading process during ALF filtering by using different identifiers, improving the efficiency and flexibility of video decoding.
[0161] Please see Figure 11 , Figure 11 This is a schematic diagram of another video encoding device provided in an embodiment of the present invention. Specifically, the video encoding device includes: a memory 1101, a processor 1102, and a data interface 1103.
[0162] The memory 1101 may include volatile memory; the memory 1101 may also include non-volatile memory; the memory 1101 may also include a combination of the above types of memory. The processor 1102 may be a central processing unit (CPU). The processor 1102 may further include hardware video encoding equipment. The aforementioned hardware video encoding equipment may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. Specifically, it may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
[0163] Furthermore, the memory 1101 is used to store programs. When the program is executed, the processor 1102 can call the program stored in the memory 1101 to perform the following steps:
[0164] Obtain the color components of the image sequence, wherein the color components include two chromaticity components;
[0165] The reconstructed blocks of color components of at least a portion of the images in the image sequence are filtered using ALF;
[0166] A bitstream of the image sequence is generated, wherein, for each of the two chroma components, a first identifier is used in the image block-level syntax element of the bitstream to indicate whether the chroma component is filtered by ALF, and when the first identifier indicates that the chroma component is filtered by ALF, a second identifier is used to indicate the ALF filter used by the chroma component.
[0167] Furthermore, the ALF filter is a cross-component adaptive loop filter (CCALF filter).
[0168] Furthermore, the image block level is the coding tree unit (CTU) level.
[0169] Furthermore, the first identifier is encoded using a contextual approach; and / or,
[0170] The second identifier is encoded using a truncated unary code.
[0171] Furthermore, in the bitstream, the two chroma components are identified by different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0172] Furthermore, in the bitstream, different identifiers are used in the strip-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0173] In this embodiment of the invention, a video encoding device can acquire color components of an image sequence, including two chroma components, and apply ALF filtering to the reconstructed blocks of the color components of at least a portion of the images in the image sequence to generate a bitstream of the image sequence. For each of the two chroma components, a first identifier in the image block-level syntax elements of the bitstream indicates whether the chroma component is filtered using ALF. When the first identifier indicates that the chroma component is filtered using ALF, a second identifier indicates the ALF filter used for the chroma component. This implementation simplifies the encoder syntax element writing process by utilizing the first and second identifiers during CCALF filtering, improving the efficiency and flexibility of video encoding.
[0174] Please see Figure 12 , Figure 12 This is a schematic diagram of another video decoding device provided in an embodiment of the present invention. Specifically, the video decoding device includes: a memory 1201, a processor 1202, and a data interface 1203.
[0175] The memory 1201 may include volatile memory; the memory 1201 may also include non-volatile memory; the memory 1201 may also include a combination of the above types of memory. The processor 1202 may be a central processing unit (CPU). The processor 1202 may further include a hardware video decoding device. The aforementioned hardware video decoding device may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. Specifically, it may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
[0176] Furthermore, the memory 1201 is used to store programs. When the program is executed, the processor 1002 can call the program stored in the memory 1201 to perform the following steps:
[0177] Obtain the bitstream of an image sequence, wherein the image in the image sequence includes two chroma components. For each of the two chroma components, the bitstream uses a first identifier in the image block-level syntax element to indicate whether the chroma component is filtered by ALF, and uses a second identifier to indicate the ALF filter used by the chroma component.
[0178] The first identifier and the second identifier corresponding to the two chroma components of the current image are parsed from the bitstream;
[0179] For each chroma component of the current image block, determine whether to use ALF to filter the reconstructed block of the chroma component based on the first identifier corresponding to the chroma component. When it is determined to use ALF, determine the corresponding ALF filter to filter the reconstructed block of the chroma component based on the second identifier.
[0180] Furthermore, the ALF filter is a cross-component adaptive loop filter (CCALF filter).
[0181] Furthermore, the image block level is the coding tree unit (CTU) level.
[0182] Furthermore, when the processor 1002 parses the first identifier and the second identifier corresponding to the two chroma components of the current image from the bitstream, it is specifically used for:
[0183] The first identifiers corresponding to the two chroma components of the current image are parsed from the bitstream using a context-sensitive approach; and,
[0184] The second identifiers corresponding to the two chromaticity components of the current image are parsed from the bitstream by using a truncated unary code method.
[0185] Furthermore, in the bitstream, the two chroma components are identified by different identifiers in the image-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0186] Furthermore, in the bitstream, different identifiers are used in the strip-level syntax elements to indicate whether the corresponding chroma components are filtered by the Adaptive Loop Filter (ALF).
[0187] In this embodiment of the invention, the video decoding device can determine whether to use ALF to filter the reconstructed block of the chroma component for each chroma component of the current image block according to the first identifier corresponding to the chroma component. When it is determined to use ALF, the corresponding ALF filter is determined according to the second identifier to filter the reconstructed block of the chroma component.
[0188] In an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the embodiments of the present invention. Figure 5 or Figure 7 The video encoding method described herein can also be used to implement the embodiments of the present invention. Figure 6 or Figure 8 The video decoding method described in [the document] can also be implemented. Figure 9 or Figure 11 The video encoding device described in the corresponding embodiment of the present invention can also achieve... Figure 10 or Figure 12 The video decoding device corresponding to the embodiment of the present invention will not be described in detail here.
[0189] The computer-readable storage medium can be an internal storage unit of the device described in any of the foregoing embodiments, such as the device's hard drive or memory. The computer-readable storage medium can also be an external storage device of the device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the device. Further, the computer-readable storage medium may include both internal and external storage units of the device. The computer-readable storage medium is used to store the computer program and other programs and data required by the device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0190] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0191] The above-disclosed embodiments are merely some examples of the present invention and should not be construed as limiting the scope of the present invention. Therefore, any equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A video encoding method, characterized in that, include: A bitstream of an image sequence is generated, wherein a first strip-level syntax element indicates whether the first chroma component of the two chroma components is filtered using an adaptive loop filter (ALF), and a second strip-level syntax element indicates whether the second chroma component of the two chroma components is filtered using an adaptive loop filter (ALF).
2. The method according to claim 1, characterized in that, In the bitstream, a first image-level syntax element indicates whether the first chroma component is filtered using an adaptive loop filter (ALF), and a second image-level element indicates whether the second chroma component is filtered using an adaptive loop filter (ALF).
3. The method according to claim 1 or 2, characterized in that, In the bitstream, a first image block-level syntax element indicates whether the first chroma component is filtered using ALF, and when the first image block-level syntax element indicates that the first chroma component is filtered using ALF, a second image block-level syntax element indicates the ALF filter used for the first chroma component. In the bitstream, a third image block-level syntax element indicates whether the second chroma component is filtered using ALF, and when the third image block-level syntax element indicates that the second chroma component is filtered using ALF, a fourth image block-level syntax element indicates the ALF filter used by the second chroma component.
4. The method according to claim 3, characterized in that, The ALF filter is a cross-component adaptive loop filter (CCALF filter).
5. The method according to claim 3, characterized in that, The image block level is the Coding Tree Unit (CTU) level.
6. The method according to claim 3, characterized in that, The first image block-level syntax element and the third image block-level syntax element are encoded in a context-sensitive manner; and / or, The second image block-level syntax element and the fourth image block-level syntax element are encoded using truncated unary codes.
7. A video decoding method, characterized in that, include: A bitstream of an image sequence is obtained, wherein a first band-level syntax element indicates whether the first chroma component of the two chroma components is filtered by an adaptive loop filter (ALF), and a second band-level syntax element indicates whether the second chroma component of the two chroma components is filtered by an adaptive loop filter (ALF). The first and second stripe-level syntax elements corresponding to the two chroma components of the current image are parsed from the bitstream. Based on the first and second stripe-level syntax elements, determine whether to use ALF to filter the two chroma components of the reconstructed image of the current image.
8. A video encoding device, characterized in that, Including memory and processor; The memory is used to store programs; The processor is used to invoke the program, and when the program is executed, it is used to perform the following operations: A bitstream of an image sequence is generated, wherein a first strip-level syntax element indicates whether the first chroma component of the two chroma components is filtered using an adaptive loop filter (ALF), and a second strip-level syntax element indicates whether the second chroma component of the two chroma components is filtered using an adaptive loop filter (ALF).
9. A video decoding device, characterized in that, Including memory and processor; The memory is used to store programs; The processor is used to invoke the program, and when the program is executed, it is used to perform the following operations: A bitstream of an image sequence is obtained, wherein a first band-level syntax element indicates whether the first chroma component of the two chroma components is filtered by an adaptive loop filter (ALF), and a second band-level syntax element indicates whether the second chroma component of the two chroma components is filtered by an adaptive loop filter (ALF). The first and second stripe-level syntax elements corresponding to the two chroma components of the current image are parsed from the bitstream. Based on the first and second stripe-level syntax elements, determine whether to use ALF to filter the two chroma components of the reconstructed image of the current image.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.
11. A method for generating a bitstream, characterized in that, include: A bitstream of an image sequence is generated, wherein a first strip-level syntax element indicates whether the first chroma component of the two chroma components is filtered using an adaptive loop filter (ALF), and a second strip-level syntax element indicates whether the second chroma component of the two chroma components is filtered using an adaptive loop filter (ALF).