Encoding method, decoding method, code stream, encoder, decoder, and storage medium
By selectively skipping the transmission of filter coefficients of the loop filter in multifunctional video coding, the problem of bit consumption in the transmission of filter coefficients is solved, and the coding efficiency and compression performance are improved.
Patent Information
- Application Number
- PCT/CN2024/087083
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2025-10-16
AI Technical Summary
In multifunctional video coding, the transmission of filter coefficients of loop filters consumes a large number of bits, resulting in degraded coding performance and low coding and decoding efficiency.
By determining the skip position and skip value of the filter coefficients during the encoding and decoding process, the transmission of some filter coefficients is selectively skipped, and the encoding and decoding of the filter coefficients is controlled by using syntax element identification information.
It improves encoding and decoding efficiency, enhances compression performance, and reduces bit consumption.
Smart Images

Figure CN2024087083_16102025_PF_FP_ABST
Abstract
Description
Coding and decoding method, code stream, encoder, decoder and storage medium TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of image processing, and particularly relate to a coding and decoding method, a code stream, an encoder, a decoder and a storage medium. BACKGROUND
[0002] In the loop filter of the Versatile Video Coding (VVC), there are an Adaptive Loop Filter (ALF) and a Cross Component Adaptive Loop Filter (CCALF). The ALF is a filter designed to minimize the mean square error between the reconstructed image and the original image, and the CCALF is a filter designed to minimize the mean square error between the chroma reconstructed image and the original image by using the luminance information.
[0003] In the implementation process of the filter processing, the filter coefficients need to be transmitted in the code stream, and the transmission of the filter coefficients will consume a large number of bits, greatly limiting the coding performance and reducing the coding and decoding efficiency.
[0004] SUMMARY
[0005] The embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which can effectively improve the coding and decoding efficiency and improve the compression performance.
[0006] The technical scheme of the embodiments of the present application can be implemented as follows:
[0007] In a first aspect, the embodiments of the present application provide a decoding method applied to a decoder, and the method comprises the following steps:
[0008] decoding the code stream to determine first syntax element identification information;
[0009] in a case where the first syntax element identification information indicates that the filter coefficients of the current color component are skipped, determining a skip position of the filter coefficients and a skip value of the filter coefficients corresponding to the current color component;
[0010] determining the filter coefficients corresponding to the current color component according to the skip position of the filter coefficients and the skip value of the filter coefficients;
[0011] determining a reconstructed block of a current block in a current image according to the filter coefficients.
[0012] In a second aspect, an encoding method is provided. The method is applied to an encoder and includes the following steps.
[0013] determining filter coefficients of a current color component of a current image;
[0014] in a case where it is determined to skip filter coefficients according to the filter coefficients of the current color component, determining a skip position and a skip value of the filter coefficients corresponding to the current color component; setting first syntax element identification information of the current image, and writing the first syntax element identification information into a bitstream; wherein the first syntax element identification information is used to determine whether to skip the filter coefficients of the current color component;
[0015] determining a reconstructed block of a current block in the current image according to the filter coefficients.
[0016] In a third aspect, a bitstream is provided. The bitstream is generated by bit-encoding to-be-encoded information. The to-be-encoded information includes at least first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, and fifth syntax element identification information.
[0017] In a fourth aspect, an encoder is provided. The encoder includes a first determining unit, wherein
[0018] the first determining unit is configured to determine filter coefficients of a current color component of a current image; in a case where it is determined to skip filter coefficients according to the filter coefficients of the current color component, determine a skip position and a skip value of the filter coefficients corresponding to the current color component; set first syntax element identification information of the current image, and write the first syntax element identification information into a bitstream; wherein the first syntax element identification information is used to determine whether to skip the filter coefficients of the current color component; and determine a reconstructed block of a current block in the current image according to the filter coefficients.
[0019] In a fifth aspect, an encoder is provided. The encoder includes a first memory and a first processor, wherein
[0020] the first memory is configured to store a computer program capable of running on the first processor;
[0021] the first processor is configured to execute the encoding method as described above when the computer program is running.
[0022] In a sixth aspect, a decoder is provided. The decoder includes a second determining unit, wherein
[0023] The second determining unit is configured to decode a code stream, determine first syntax element identification information, in a case where the first syntax element identification information indicates that the filter coefficients of the current color component are skipped, determine a skip position of the filter coefficients and a skip value of the filter coefficients corresponding to the current color component, determine the filter coefficients corresponding to the current color component according to the skip position of the filter coefficients and the skip value of the filter coefficients, and determine a reconstructed block of a current block in a current image according to the filter coefficients.
[0024] In a seventh aspect, an embodiment of the present application provides a decoder, which comprises a second memory and a second processor, and wherein
[0025] The second memory is configured to store a computer program capable of running on the second processor.
[0026] The second processor is configured to execute the decoding method as described above when the computer program is running.
[0027] In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed to implement the decoding method as described in the first aspect or the encoding method as described in the second aspect.
[0028] The embodiments of the present application provide a coding method, a code stream, an encoder, a decoder and a storage medium. At a decoding end, a code stream is decoded, first syntax element identification information is determined, in a case where the first syntax element identification information indicates that filter coefficients of a current color component are skipped, a skip position of the filter coefficients and a skip value of the filter coefficients corresponding to the current color component are determined, the filter coefficients corresponding to the current color component are determined according to the skip position of the filter coefficients and the skip value of the filter coefficients, and a reconstructed block of a current block in a current image is determined according to the filter coefficients. At an encoding end, filter coefficients of a current color component of a current image are determined, in a case where it is determined to skip the filter coefficients according to the filter coefficients of the current color component, a skip position of the filter coefficients and a skip value of the filter coefficients corresponding to the current color component are determined, first syntax element identification information of the current image is set, and the first syntax element identification information is written into a code stream, wherein the first syntax element identification information is used to determine whether the filter coefficients of the current color component are skipped, and a reconstructed block of a current block in a current image is determined according to the filter coefficients. That is, in the embodiments of the present application, the coder-decoder can select to code the filter coefficients of the current color component by skipping, that is, to select to skip transmission of part of the filter coefficients, so that the coding efficiency can be effectively improved and the compression performance can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0029] FIG. 1 is a schematic diagram of an application of an encoding framework provided by the related art;
[0030] FIG. 2 is a schematic diagram of an application of a loop filter module provided by the related art;
[0031] FIG. 3 is a schematic diagram of a filter template;
[0032] FIG. 4 is a schematic diagram of an application of a filter template;
[0033] FIG. 5 is a schematic diagram of an implementation process of loop filtering;
[0034] FIG. 6 is a schematic diagram of a constituent block of a video encoding system provided by an embodiment of the present application;
[0035] FIG. 7 is a schematic diagram of a constituent block of a video decoding system provided by an embodiment of the present application;
[0036] FIG. 8 is a schematic diagram of a decoding method provided by an embodiment of the present application;
[0037] FIG. 9 is a schematic diagram of a skip position provided by an embodiment of the present application;
[0038] FIG. 10 is a schematic diagram of a skip position provided by an embodiment of the present application;
[0039] FIG. 11 is a schematic diagram of a coding of a skip filter coefficient provided by an embodiment of the present application;
[0040] FIG. 12 is a schematic diagram of an encoding method provided by an embodiment of the present application;
[0041] FIG. 13 is a schematic diagram of a search mode of a filter coefficient provided by an embodiment of the present application;
[0042] FIG. 14 is a schematic diagram of a search mode of a filter coefficient provided by an embodiment of the present application;
[0043] FIG. 15 is a schematic diagram of a search mode of a filter coefficient provided by an embodiment of the present application;
[0044] FIG. 16 is a schematic diagram of a search mode of a filter coefficient provided by an embodiment of the present application;
[0045] FIG. 17 is a schematic diagram of a CCALF luma residual filter template provided by an embodiment of the present application;
[0046] FIG. 18 is a schematic diagram of a constituent structure of an encoder provided by an embodiment of the present application;
[0047] FIG. 19 is a schematic diagram of a specific hardware structure of an encoder provided by an embodiment of the present application;
[0048] FIG. 20 is a schematic diagram of a constituent structure of a decoder provided by an embodiment of the present application;
[0049] Fig. 21 is a specific hardware structure diagram of a decoder according to an embodiment of the present application;
[0050] Fig. 22 is a component structure diagram of a codec system according to an embodiment of the present application. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are only used to explain the related application, but not to limit the application. In addition, it should be pointed out that only the parts related to the application are shown in the drawings for convenience of description.
[0052] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subset of all possible embodiments, and can be combined with each other without conflict. It should be pointed out that the terms "first, second, third" involved in the embodiments of the present application are only used to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first, second, third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0053] Digital video compression technology is mainly to compress large digital video data for transmission and storage. With the surge of Internet video and people's increasing demand for video clarity, although the existing digital video compression standard can save a lot of video data, better digital video compression technology is still needed to reduce the bandwidth and traffic pressure of digital video transmission.
[0054] In the process of digital video encoding, the encoder reads different pixel numbers of the original video sequence of different color formats, including luminance component and chrominance component, that is, the encoder reads a black and white or color image. Then the image is divided into blocks, and the block data is handed over to the encoder for encoding.
[0055] The general-purpose video coding standards are based on a hybrid block-based coding framework. Each frame of a video picture is partitioned into square-shaped largest coding units (LCUs) or coding tree units (CTUs) of the same size (e.g., 128x128, 64x64, etc.), each of which can be further partitioned into rectangular coding units (CUs) according to a rule; and a coding unit can be further partitioned into smaller prediction units (PUs), transform units (TUs), etc.
[0056] FIG. 1 is a schematic diagram of an application of a coding framework provided by the related art. As shown in FIG. 1, the hybrid coding framework can include a prediction module 11, a transform and quantization module 12, an entropy coding module 13, an inverse quantization and inverse transform module 14, a loop filtering module 15, and a decoded picture buffer module 16. The prediction module 11 can include an intra prediction module 11a and an inter prediction module 11b, and the inter prediction module 11b can include a motion estimation module and a motion compensation module. Because there is a strong correlation between adjacent pixels in a frame of a video image, using an intra prediction mode in a video coding technology can eliminate spatial redundancy between adjacent pixels. However, because there is also a strong similarity between adjacent frames in a video image, using an inter prediction mode in a video coding technology can eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency. The basic process of a video codec is as follows: at the encoding end, a frame of an image is divided into blocks, an intra prediction or inter prediction is used for a current block to generate a prediction block of the current block, a residual block is obtained by subtracting the prediction block from the original block of the current block, a transform and quantization are performed on the residual block to obtain a quantized coefficient matrix, and the quantized coefficient matrix is entropy coded and output to a bitstream. At the decoding end, an intra prediction or inter prediction is used for a current block to generate a prediction block of the current block, and on the other hand, a quantized coefficient matrix is obtained by decoding the bitstream, the quantized coefficient matrix is inverse quantized and inverse transformed to obtain a residual block, and the prediction block and the residual block are added to obtain a reconstructed block. The reconstructed block constitutes a reconstructed image, and a decoded image is obtained by performing loop filtering on the reconstructed image on a block basis or on an image basis. The encoding end also needs to perform similar operations to obtain a decoded image. The decoded image can be used as a reference frame for inter prediction of subsequent frames. If necessary, block division information, prediction, transform, quantization, entropy coding, loop filtering, and other mode information or parameter information determined by the encoding end need to be output to the bitstream. The decoding end analyzes and determines the same block division information, prediction, transform, quantization, entropy coding, loop filtering, and other mode information or parameter information as the encoding end, thereby ensuring that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end. The decoded image obtained by the encoding end is usually also called a reconstructed image. When predicting, the current block can be divided into prediction units, and when transforming, the current block can be divided into transform units. The division of the prediction units and the transform units can be different. The above is the basic process of a video codec under a hybrid coding framework based on blocks. With the development of technology, some modules or steps of the framework or process can be optimized. The embodiments of the present application are applicable to the basic process of a video codec under the hybrid coding framework based on blocks, but are not limited to the framework and process.
[0057] It can be understood that, intra prediction only refers to information of the same frame image, predicts pixel information in the current partition block, and is used to eliminate spatial redundancy; inter prediction can refer to image information of different frames, uses motion estimation to search for motion vector information that best matches the current partition block, and is used to eliminate temporal redundancy; transformation converts the predicted image block to a frequency domain, energy is redistributed, and information that is not sensitive to human eyes can be removed in combination with quantization, which is used to eliminate visual redundancy; entropy coding can eliminate character redundancy according to a current context model and probability information of a binary code stream; and loop filtering mainly processes pixels after inverse transformation and inverse quantization, makes up for distortion information, and provides better reference for subsequent coding pixels.
[0058] FIG. 1 is an application schematic diagram of a loop filtering module provided by the related art. As shown in FIG. 2, in a loop filtering module of a Versatile Video Coding (VVC) and a latest Joint Video Exploration Team (JVET) traditional video coding exploration platform reference software test model (Enhanced Compression Model, ECM), mainly includes filter tools such as Luma Mapping with Chroma Scaling (LMCS), DeBlocking Filter (DBF), Sample adaptive Offset (SAO), Adaptive loop filter (ALF), and Cross Component Adaptive Loop Filter (CCALF).
[0059] The adaptive loop filter (ALF) includes a luma ALF and a chroma ALF. The luma ALF is designed by using luma information to minimize the mean square error between a luma reconstructed image and an original image, and the chroma ALF is designed by using chroma information to minimize the mean square error between a chroma reconstructed image and the original image.
[0060] The cross component adaptive loop filter (CCALF) is a filter designed by using luma information to minimize the mean square error between a chroma reconstructed image and an original image.
[0061] The ALF and the CCALF are based on a Wiener filtering principle, a Wiener-Hopf equation is established by using original image information and reconstructed image information to solve a series of filter coefficients with minimum mean square error, and the purpose of reducing decoding error and effectively improving coding performance is achieved.
[0062] In the latest JVET conventional video coding exploration model (ECM), CCALF processes the chroma components Cb and Cr separately, each component has its own filter. Each component is allowed to use up to 16 filters, corresponding to 16 categories respectively.
[0063] CCALF classifies each coding tree unit (CTU) in the same category, which uses the rate-distortion optimization function (RDO) to make decisions. Each pixel in the CTU belongs to the same category. Specifically, when the cost of using a filter of a certain category for the CTU is the smallest, the category of the CTU is the category of the filter. Of course, if the cost of not filtering is less than the cost of using the filter, the CTU is not filtered, and the CTU has no category. Whether the CTU is filtered and the corresponding category information are written into the code stream and transmitted to the decoding end.
[0064] After determining the category of each CTU, the covariance matrix and error vector of all pixels in the same category are accumulated respectively, and then the Wiener-Hopf equation is constructed to calculate the filter coefficients of the category by solving the equation. After determining the filter coefficients, the pixels that need to be filtered are filtered and written into the reconstructed image. For pixels that do not need to be filtered, they are directly written into the reconstructed image. When filtering is needed, the specific filtering process is shown in the following formula:
[0065] Where recC' is the filtered reconstructed pixel value, recC is the reconstructed pixel value of the pixel to be filtered, represents the filter coefficient, recY(*) represents the luminance reconstructed pixel, resY(*) represents the luminance residual pixel, x corresponds to the position of x in the filter shape, i is the pixel at the non-x position, a1-a2 represents the coefficient (index) of the filter template with the luminance reconstructed information as the input, b1-b2 represents the coefficient of the filter template with the luminance residual information as the input, and scale is the scale factor.
[0066] In addition, related syntax elements need to be written into the code stream. For example, the CCALF switch of the current image, whether each CTU is filtered and the corresponding category information, etc. If a new filter is needed, the number of filters and the coefficients of each filter need to be written into the APS. Finally, the APS ID used by the image is written into the slice header or picture header.
[0067] After receiving the bitstream at the VVC decoding end, the CCALF switch of the current image, whether each CTU is filtered, and the corresponding category information are determined. In addition, the APS ID is parsed, the corresponding APS is selected to determine the coefficients of the filter. And the pixels that need to be filtered are filtered and written into the reconstructed image. For pixels that do not need to be filtered, they are directly written into the reconstructed image.
[0068] In the current ECM, the CCALF filter contains two filter templates. As shown in FIG. 3, the two filter templates are a 9x9 template taking the luminance reconstructed information as input, and a 3x3 template taking the luminance residual information as input.
[0069] As shown in FIG. 4, taking the 9x9 filter template taking the luminance reconstructed information as input as an example, the black and white circles in the left drawing of FIG. 4 represent luminance pixels, the gray circles represent the current chroma pixel to be filtered, and the black circle luminance pixels are the input information of the filter. It can be seen that there are 25 luminance pixels in the black circle, and according to their positions in the filter, they correspond to 23 filter coefficients (the coefficients of 0 and 12 are shared by two pixels). Among them, 0, 1, 2, …, 21, x represent the filter coefficient index. It should be noted that the coefficient at x is generally not calculated and is set to 0 by default.
[0070] As for the 5x5 template taking the luminance residual information as input, it contains 22, 23, 24, 25, and 26, a total of 5 filter coefficient indexes. Therefore, the CCALF filter of the current ECM has a total of 28 coefficients.
[0071] As shown in FIG. 5, the specific position of CCALF in loop filtering is shown in FIG. 5. As described above, CCALF needs to take the luminance reconstructed information and the residual information (l0) as input, so CCALF takes the luminance reconstructed information and the luminance residual information output by SAO as input, calculates the filter coefficients to perform filtering processing, and obtains the filtering result ( or ). In addition, the chroma ALF itself also filters the chroma reconstructed information output by SAO to obtain the corresponding filtering result. Finally, the filtering result of CCALF ( or ) and the filtering result of chroma ALF are added to obtain the final chroma filtering result.
[0072] That is to say, in the CCALF of the current ECM, a set of CCALF filter templates has 28 coefficients in common, the number of filter groups can be up to 16, and the filter coefficients need to be encoded and transmitted in the code stream. Therefore, the transmission of the filter coefficients will consume a large number of bits, greatly limiting the coding performance of the cross-channel adaptive loop filter and reducing the coding efficiency.
[0073] To solve the above problems, an embodiment of the present application provides a coding method, a code stream, an encoder, a decoder and a storage medium. At the decoding end, the code stream is decoded, and a first syntax element identification information is determined. In the case that the first syntax element identification information indicates that the filter coefficients of the current color component are skipped, a skip position of the filter coefficients corresponding to the current color component and a skip value of the filter coefficients are determined. The filter coefficients corresponding to the current color component are determined according to the skip position of the filter coefficients and the skip value of the filter coefficients. The reconstruction block of the current block in the current image is determined according to the filter coefficients. At the encoding end, the filter coefficients of the current color component of the current image are determined. In the case that it is determined to skip the filter coefficients according to the filter coefficients of the current color component, a skip position of the filter coefficients corresponding to the current color component and a skip value of the filter coefficients are determined. The first syntax element identification information of the current image is set, and the first syntax element identification information is written into the code stream. The first syntax element identification information is used to determine whether the filter coefficients of the current color component are skipped. The reconstruction block of the current block in the current image is determined according to the filter coefficients. That is to say, in the embodiment of the present application, the encoder can select to skip the coding of the filter coefficients of the current color component, that is, to skip the transmission of part of the filter coefficients, so that the coding efficiency can be effectively improved, and the compression performance can be improved.
[0074] Referring to FIG. 6, an example of a system composition block diagram of an encoder provided by an embodiment of the present application is shown. As shown in FIG. 6, the encoder 10 can include a partition unit 101, a prediction unit 102, a first adder 107, a transform unit 108, a quantization unit 109, an inverse quantization unit 110, an inverse transform unit 111, a second adder 112, a filter unit 113, a decoded picture buffer (DPB) unit 114 and an entropy encoding unit 115. Here, the input of the encoder 10 can be a video composed of a series of pictures or a still picture, and the output of the encoder 10 can be a bit stream (also referred to as a “code stream”) used to represent the compressed version of the input video.
[0075] The partition unit 101 partitions a picture in an input video into one or more Coding Tree Units (CTUs). The partition unit 101 partitions the picture into a plurality of tiles (or tiles), and can further partition a tile into one or more bricks, where a tile or a brick can include one or more complete and / or partial CTUs. In addition, the partition unit 101 can form one or more slices, where a slice can include one or more tiles arranged in raster order in the picture, or cover one or more tiles of a rectangular region in the picture. The partition unit 101 can also form one or more sub-pictures, where a sub-picture can include one or more slices, tiles, or bricks.
[0076] In the encoding process of the encoder 10, the partition unit 101 delivers a CTU to the prediction unit 102. Generally, the prediction unit 102 can be composed of a block partition unit 103, a Motion Estimation (ME) unit 104, a Motion Compensation (MC) unit 105, and an intra-prediction unit 106. Specifically, the block partition unit 103 iteratively partitions an input CTU into smaller Coding Units (CUs) using quad-tree partitioning, binary-tree partitioning, and ternary-tree partitioning. The prediction unit 102 can obtain an inter-predicted block for a CU using the ME unit 104 and the MC unit 105. The intra-prediction unit 106 can obtain an intra-predicted block for a CU using various intra-prediction modes including MIP mode. In an example, rate-distortion optimized motion estimation approaches can be invoked by the ME unit 104 and the MC unit 105 to obtain the inter-predicted block, and rate-distortion optimized mode determination approaches can be invoked by the intra-prediction unit 106 to obtain the intra-predicted block.
[0077] The prediction unit 102 outputs the prediction block of the CU, the first adder 107 calculates the difference between the CU in the output of the partition unit 101 and the prediction block of the CU, i.e. the residual CU. The transform unit 108 reads the residual CU and performs one or more transform operations on the residual CU to obtain coefficients. The quantization unit 109 quantizes the coefficients and outputs quantized coefficients (i.e. levels). The inverse quantization unit 110 performs a scaling operation on the quantized coefficients to output reconstructed coefficients. The inverse transform unit 111 performs one or more inverse transforms corresponding to the transforms in the transform unit 108 and outputs reconstructed residuals. The second adder 112 calculates the reconstructed CU by adding the reconstructed residuals and the prediction block of the CU from the prediction unit 102. The second adder 112 also sends its output to the prediction unit 102 to be used as an intra prediction reference. After all CUs in a picture or sub-picture are reconstructed, the filter unit 113 performs loop filtering on the reconstructed picture or sub-picture. Here, the filter unit 113 contains one or more filters, such as a deblocking filter, a Sample Adaptive Offset (SAO) filter, an Adaptive Loop Filter (ALF), a Luma Mapping with Chroma Scaling (LMCS) filter, and a neural network based filter, etc. Alternatively, when the filter unit 113 determines that a CU is not used as a reference for encoding of other CUs, the filter unit 113 performs loop filtering on one or more target pixels in the CU.
[0078] The output of the filter unit 113 is the decoded picture or sub-picture, which is buffered to the DPB unit 114. The DPB unit 114 outputs the decoded picture or sub-picture according to the timing and control information. Here, the pictures stored in the DPB unit 114 can also be used as a reference for the prediction unit 102 to perform inter prediction or intra prediction. Finally, the entropy encoding unit 115 converts the parameters necessary for decoding the picture from the encoder 10 (such as control parameters and supplemental information, etc.) into binary form, and writes such binary form into the bitstream according to the syntax structure of each data unit, i.e. the encoder 10 finally outputs the bitstream.
[0079] Further, the encoder 10 can be a computing device having a first processor and a first memory recording a computer program. When the first processor reads and runs the computer program, the encoder 10 reads the input video and generates the corresponding bitstream. In addition, the encoder 10 can also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in FIG. 9.
[0080] Referring to FIG. 7, an example of a system composition diagram of a decoder is shown. As shown in FIG. 7, the decoder 20 can include a parsing unit 201, a prediction unit 202, an inverse quantization unit 205, an inverse transform unit 206, an adder 207, a filter unit 208, and a decoded picture buffer unit 209. Here, the input of the decoder 20 is a bitstream representing a compressed version of a video or a still picture, and the output of the decoder 20 can be a decoded video consisting of a series of pictures or a decoded still picture.
[0081] The input bitstream of the decoder 20 can be the bitstream generated by the encoder 10. The parsing unit 201 parses the input bitstream and obtains values of syntax elements from the input bitstream. The parsing unit 201 converts the binary representation of the syntax elements into numeric values and sends the numeric values to the units in the decoder 20 to obtain one or more decoded pictures. The parsing unit 201 can also parse one or more syntax elements from the input bitstream to display the decoded pictures.
[0082] During the decoding process of the decoder 20, the parsing unit 201 sends the values of the syntax elements and one or more variables used to obtain one or more decoded pictures that are set or determined according to the values of the syntax elements to the units in the decoder 20.
[0083] The prediction unit 202 determines a prediction block of a current decoded block (e.g., a CU). Here, the prediction unit 202 can include a motion compensation unit 203 and an intra prediction unit 204. Specifically, when an inter-decoding mode is indicated for decoding the current decoded block, the prediction unit 202 passes the relevant parameters from the parsing unit 201 to the motion compensation unit 203 to obtain an inter-prediction block; when an intra-prediction mode (including the MIP mode indicated based on the MIP mode index value) is indicated for decoding the current decoded block, the prediction unit 202 passes the relevant parameters from the parsing unit 201 to the intra prediction unit 204 to obtain an intra-prediction block.
[0084] The inverse quantization unit 205 has the same function as the inverse quantization unit 110 in the encoder 10. The inverse quantization unit 205 performs a scaling operation on the quantized coefficients (i.e., levels) from the parsing unit 201 to obtain reconstructed coefficients.
[0085] The inverse transform unit 206 has the same function as the inverse transform unit 111 in the encoder 10. The inverse transform unit 206 performs one or more transform operations (i.e., the inverse of the one or more transform operations performed by the inverse transform unit 111 in the encoder 10) to obtain a reconstructed residual.
[0086] The adder 207 performs an addition operation on its inputs (the prediction block from the prediction unit 202 and the reconstructed residual from the inverse transform unit 206) to obtain a reconstructed block of the current decoded block. The reconstructed block is also sent to the prediction unit 202 to be used as a reference for other blocks coded in the intra prediction mode.
[0087] After all CUs in a picture or sub-picture are reconstructed, the filter unit 208 performs loop filtering on the reconstructed picture or sub-picture. The filter unit 208 includes one or more filters, such as a deblocking filter, a sample adaptive offset filter, an adaptive loop filter, a luma mapping and chroma scaling filter, and a neural network based filter, etc. Alternatively, when the filter unit 208 determines that a reconstructed block is not used as a reference for decoding other blocks, the filter unit 208 performs loop filtering on one or more target pixels in the reconstructed block. Here, the output of the filter unit 208 is a decoded picture or sub-picture, which is buffered to the DPB unit 209. The DPB unit 209 outputs the decoded picture or sub-picture according to the timing and control information. The pictures stored in the DPB unit 209 can also be used as a reference for performing inter prediction or intra prediction by the prediction unit 202.
[0088] Further, the decoder 20 can be a computing device with a second processor and a second memory recording a computer program. When the first processor reads and runs the computer program, the decoder 20 reads the input bitstream and generates the corresponding decoded video. In addition, the decoder 20 can also be a computing device with one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in FIG. 7.
[0089] It also needs to be explained that when the embodiments of the present application are applied to the encoder 10, the “current block” specifically refers to a current block to be encoded (which can also be simply referred to as “encoding block”) in a video image; when the embodiments of the present application are applied to the decoder 20, the “current block” specifically refers to a current block to be decoded (which can also be simply referred to as “decoding block”) in a video image.
[0090] Based on FIG. 6, the encoding method in the embodiments of the present application is mainly applied to the “filter unit 113” part in the encoder 10.
[0091] Based on FIG. 7, the decoding method in the embodiments of the present application is mainly applied to the “filter unit 208” part in the decoder 20.
[0092] That is, the encoding and decoding method in the embodiments of the present application can be applied to a video encoding system (referred to as “encoder” for short), and can also be applied to a video decoding system (referred to as “decoder” for short), and can even be applied to a video encoding system and a video decoding system at the same time, but here is not limited in any way.
[0093] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0094] An embodiment of the present application provides a decoding method, which is applied to a decoder and can be used in a scenario of performing filtering processing through CCALF or ALF, or can be applied to any adaptive coefficient transmission scenario. FIG. 8 is a schematic diagram of the decoding method provided by an embodiment of the present application. As shown in FIG. 8, the method of performing decoding processing by the decoder can include the following steps.
[0095] In step 101, a bitstream is decoded to determine first syntax element identification information.
[0096] In an embodiment of the present application, the bitstream is decoded to determine the first syntax element identification information. The first syntax element identification information can be used to determine whether to skip the coding of the filter coefficients of the current color component.
[0097] It should be noted that in an embodiment of the present application, in a video image, a coding block (CB) is generally represented by a first image component, a second image component and a third image component. The three image components are respectively a luminance component, a blue color component and a red color component. Specifically, the luminance component is usually represented by a symbol Y, the blue color component is usually represented by a symbol Cb or U, and the red color component is usually represented by a symbol Cr or V. In this way, the video image can be represented in YCbCr format or YUV format.
[0098] It can be understood that in an embodiment of the present application, the image component of the current image can include a current luminance component or a current color component. The current color component of the current image can be a first color component or a second color component. For example, the current color component can be understood as a blue color component of the current image, and in this case, the current color component can be a U component. The current color component can also be understood as a red color component of the current image, and in this case, the current color component can be a V component. The present application does not make specific limitations.
[0099] Further, in an embodiment of the present application, the first syntax element identification information can be used to determine whether to skip the coding of the filter coefficients of the current color component. In the process of performing the coding of the filter coefficients, part of the filter coefficients or all of the filter coefficients of the current color component can be selected to be skipped, and the present application does not make specific limitations.
[0100] Further, in embodiments of the present application, the first syntax element identification information can be a flag, wherein the first syntax element identification information can be an image-level flag or a filter-level flag. The present application does not make specific limitations.
[0101] Correspondingly, in embodiments of the present application, if the first syntax element identification information is an image-level flag, the representation form of the first syntax element identification information can be a scalar form; if the first syntax element identification information is a filter-level flag, the representation form of the first syntax element identification information can be an array form.
[0102] That is to say, in embodiments of the present application, the representation form of the first syntax element identification information is not limited, for example, the representation form of the first syntax element identification information can include a first representation form and a second representation form. The first representation form can be a scalar form, and the second representation form can be an array form.
[0103] Further, in embodiments of the present application, when the representation form of the first syntax element identification information is the first representation form, the first syntax element identification information can be considered as an image-level flag, and thus whether the current color component of the current image skips the coding of the filter coefficient can be determined according to the first syntax element identification information.
[0104] Further, in embodiments of the present application, when the representation form of the first syntax element identification information is the second representation form, the first syntax element identification information can be considered as a filter-level flag, and thus whether the current filter of the current color component of the current image skips the coding of the filter coefficient can be determined according to the first syntax element identification information.
[0105] It can be understood that, in embodiments of the present application, for CCALF, the current color component of the current image can correspond to a plurality of CTUs divided, wherein for each CTU (current block), 1 set of filter coefficients can be selected from 16 sets of filter coefficients (filter coefficients) as its filter coefficients. When the first syntax element identification information is a scalar, that is, when the first syntax element identification information is an image-level flag, whether the 16 filters corresponding to the current block all skip the coding of the filter coefficients can be determined according to the first syntax element identification information. When the first syntax element identification information is an array, that is, when the first syntax element identification information is a filter-level flag, whether the current filter corresponding to the current block skips the coding of the filter coefficients can be determined according to the first syntax element identification information.
[0106] Further, in the embodiments of the present application, the value of the first syntax element can be used to determine whether to skip the coding of the filter coefficients of the current color component.
[0107] For example, in some embodiments, if the value of the first syntax element is a first value, it is determined to skip the coding of the filter coefficients of the current color component. If the value of the first syntax element is a second value, it is determined not to skip the coding of the filter coefficients of the current color component.
[0108] It should be noted that in the embodiments of the present application, the first syntax element can be used to indicate whether the coding of the filter coefficients of the current color component is skipped. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the first syntax element can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the first syntax element can also be a flag, which is not limited herein.
[0109] It should be further noted that if the first syntax element is a picture-level flag, in one specific example, the first value can be set to 1 and the second value can be set to 0; in another specific example, the first value can also be set to true and the second value can also be set to false; or in yet another specific example, the first value can also be set to 0 and the second value can also be set to 1; or the first value can also be set to false and the second value can also be set to true. The first value and the second value in the embodiments of the present application are not limited.
[0110] Taking 1 as the first value and 0 as the second value as an example, in the embodiments of the present application, if it is determined to skip the coding of the filter coefficients of the current color component, the value of the first syntax element can be set to 1. Otherwise, if it is determined that the coding of the filter coefficients of the current color component is not skipped, the value of the first syntax element can be set to 0.
[0111] For example, in some embodiments, if the current color component of the current picture is a chroma C bIf the value of the alf_cc_cb_skip_signal_flag is 0, it is determined that the coding of the filter coefficient of the current color component of the current image is not skipped, and if the value of the alf_cc_cb_skip_signal_flag is 1, it is determined that the coding of the filter coefficient of the current color component of the current image is skipped.
[0112] Of course, the value of the alf_cc_cb_skip_signal_flag is not limited to 0 and 1, and the present application does not make specific limitations.
[0113] It should be noted that in the embodiments of the present application, the filter coefficient corresponding to the current color component includes the filter coefficient of the CCALF or the filter coefficient of the ALF. That is, the filter coefficient of the current color component can be the filter coefficient of the CCALF filter or the filter coefficient of the ALF filter.
[0114] It can be understood that the coding method proposed in the embodiments of the present application can be applied to CCALF filtering, ALF filtering, and other arbitrary adaptive filtering scenarios, and the present application does not make specific limitations.
[0115] Exemplarily, in some embodiments, for CCALF, it can be selected to skip the coding of at least one of the filter coefficients of the current color component.
[0116] Exemplarily, in some embodiments, for chrominance ALF, it can be selected to skip the coding of at least one of the filter coefficients of the current color component.
[0117] Exemplarily, in some embodiments, for luminance ALF, it can be selected to skip the coding of at least one of the filter coefficients of the current luminance component.
[0118] That is, in the embodiments of the present application, the first syntax element identification information can be used to determine whether to skip the coding of the filter coefficient, wherein the filter coefficient can be at least one filter coefficient of any chrominance component (color component) or at least one filter coefficient of any luminance component. The present application does not make specific limitations.
[0119] In step 102, in a case where the first syntax element identification information indicates that the filter coefficient of the current color component is skipped, the skip position of the filter coefficient corresponding to the current color component and the skip value of the filter coefficient are determined.
[0120] In an embodiment of the present application, after the first syntax element identification information is determined, if it is determined that the filter coefficient of the current color component is skipped based on the first syntax element identification information, the skip position of the filter coefficient corresponding to the current color component and the skip value of the filter coefficient can be further determined.
[0121] It should be noted that, in an embodiment of the present application, the skip position of the filter coefficient can determine the position of at least one filter coefficient which is skipped, or the skip position of the filter coefficient can indicate the index of at least one filter coefficient which is skipped.
[0122] That is, in an embodiment of the present application, the skip position of the filter coefficient can be used to determine which one or more filter coefficients corresponding to the current color component are to be subjected to the skip processing.
[0123] It should be noted that, in an embodiment of the present application, the skip value of the filter coefficient can be used to determine the value of the filter coefficient which is skipped, or the skip value of the filter coefficient can be used to assign the value to the filter coefficient which is skipped.
[0124] Further, in an embodiment of the present application, the determination of the skip position of the filter coefficient can be performed in any manner, which is not specifically limited in the present application.
[0125] It should be noted that, in an embodiment of the present application, if there are multiple skip positions of the filter coefficient, the multiple skip positions of the filter coefficient can be continuous or discontinuous, which is not specifically limited in the present application.
[0126] Further, in an embodiment of the present application, when the skip position of the filter coefficient corresponding to the current color component is determined, the bitstream can be decoded to determine the second syntax element identification information and the third syntax element identification information of the current image; the skip start position of the filter coefficient corresponding to the current color component is determined according to the value of the second syntax element identification information; the skip end position of the filter coefficient corresponding to the current color component is determined according to the value of the third syntax element identification information; and the skip position of the filter coefficient is determined according to the skip start position of the filter coefficient and the skip end position of the filter coefficient.
[0127] It should be noted that in the embodiments of the present application, the determination of the skip position of the filter coefficient can be performed by the information transmitted in the code stream. Wherein, the skip start position of the filter coefficient can be indicated by transmitting the second syntax element identification information, and the skip end position of the filter coefficient can be indicated by transmitting the third syntax element identification information, so that the filter coefficient from the skip start position to the skip end position can be determined as the filter coefficient that needs to be skipped.
[0128] It can be understood that in the embodiments of the present application, the second syntax element identification information can be used to determine the start position of the filter coefficient that needs to be skipped. Wherein, if the current color component of the current image is the chroma C b component, the second syntax element identification information can be represented by the syntax element alf_cc_cb_skip_signal_start. Wherein, the value of alf_cc_cb_skip_signal_start can be determined as the index value of the filter coefficient at the start position of the filter coefficient that needs to be skipped. For example, when the value of alf_cc_cb_skip_signal_start is 27, the filter coefficient with the index value of 27 can be determined as the start position of the filter coefficient that needs to be skipped.
[0129] It can be understood that in the embodiments of the present application, the third syntax element identification information can be used to determine the end position of the filter coefficient that needs to be skipped. Wherein, if the current color component of the current image is the chroma C b component, the third syntax element identification information can be represented by the syntax element alf_cc_cb_skip_signal_end. Wherein, the value of alf_cc_cb_skip_signal_end can be determined as the index value of the filter coefficient at the end position of the filter coefficient that needs to be skipped. For example, when the value of alf_cc_cb_skip_signal_end is 30, the filter coefficient with the index value of 30 can be determined as the end position of the filter coefficient that needs to be skipped.
[0130] Exemplarily, in some embodiments, FIG. 9 is a schematic diagram of the skip position according to the embodiments of the present application, as shown in FIG. 9, assuming that the current color component corresponds to 29 filter coefficients, and the corresponding index values are 0-28 respectively, the skip start position of the filter coefficient is determined as the filter coefficient with the index value of 23 by the second syntax element identification information transmitted in the code stream, and the skip end position of the filter coefficient is determined as the filter coefficient with the index value of 25 according to the third syntax element identification information.
[0131] Further, in the embodiments of the present application, when determining the skip position of the filter coefficient corresponding to the current color component, the skip position of the filter coefficient can be determined according to the preset position.
[0132] It should be noted that, in the embodiments of the present application, the determination of the skip position of the filter coefficient can also be directly performed according to the preset position specified in advance. The preset position can be the position (index value) of at least one filter coefficient.
[0133] That is, in the embodiments of the present application, when the first syntax element identification information indicates that the filter coefficient of the current color component of the current image is skipped, the preset position can be directly determined as the skip position of the filter coefficient.
[0134] Exemplarily, in some embodiments, FIG. 10 is a schematic diagram II of the skip position according to the embodiments of the present application, as shown in FIG. 10, the preset position is the filter coefficient with index values of 22, 23, 25 and 26.
[0135] Further, in the embodiments of the present application, when the current image satisfies the first condition, the preset position can be determined as the skip position of the filter coefficient; wherein the first condition at least includes at least one of the following: the height value of the current image is less than or equal to a first numerical value; the height value of the current image is greater than or equal to a second numerical value; the width value of the current image is less than or equal to a third numerical value; and the width value of the current image is greater than or equal to a fourth numerical value.
[0136] It should be noted that, in the embodiments of the present application, it can be first judged whether the current image satisfies the first condition, and then it can be determined according to the judgment result whether the preset position is determined as the skip position of the filter coefficient.
[0137] It can be understood that, in the embodiments of the present application, the first condition is used to limit the resolution of the image whose filter coefficient is skipped. For example, the first condition can include preset conditions for the height and width of the image.
[0138] It should be noted that, in the embodiments of the present application, the first numerical value, the second numerical value, the third numerical value and the fourth numerical value are all greater than 0.
[0139] Exemplarily, in some embodiments, if the height value of the current image is less than or equal to 720 (the first numerical value) and the width value of the current image is less than or equal to 1280, then the coding of the filter coefficient of the preset position for the current component (for example, the current color component) of the current image can be skipped.
[0140] Further, in the embodiments of the present application, the determination of the skip value of the filter coefficient can be performed in any manner, which is not limited in the present application.
[0141] Further, in the embodiments of the present application, when determining the skip value of the filter coefficient corresponding to the current color component, the code stream can be decoded to determine fourth syntax element identification information of the current image; the absolute value corresponding to the skip value of the filter coefficient is determined according to the value of the fourth syntax element identification information; in the case that the absolute value is 0, the skip value of the filter coefficient is determined as 0.
[0142] Further, in the embodiments of the present application, when determining the skip value of the filter coefficient corresponding to the current color component, the code stream can be decoded to determine fourth syntax element identification information of the current image; the absolute value corresponding to the skip value of the filter coefficient is determined according to the value of the fourth syntax element identification information; in the case that the absolute value is 0, the skip value of the filter coefficient is determined as 0.
[0143] It should be noted that, in the embodiments of the present application, the determination of the skip value of the filter coefficient can be performed by the information transmitted in the code stream. Among them, the absolute value of the skip value of the filter coefficient can be indicated by transmitting the fourth syntax element identification information, and the sign of the skip value of the filter coefficient can be indicated by transmitting the fifth syntax element identification information, so that the value of the corresponding filter coefficient can be determined according to the absolute value of the skip value and the sign of the skip value.
[0144] It can be understood that, in the embodiments of the present application, the fourth syntax element identification information can be used to determine the absolute value of the skip value of the filter coefficient that is skipped from coding. Among them, if the current color component of the current image is the chroma C b component, the fourth syntax element identification information can be represented by the syntax element alf_cc_cb_skip_signal_data_abs. Among them, the value of alf_cc_cb_skip_signal_data_abs can be determined as the absolute value of the skip value of the filter coefficient that is skipped from coding. For example, when the value of alf_cc_cb_skip_signal_data_abs is 2, the absolute value of the skip value of the filter coefficient that is skipped from coding can be determined as 2.
[0145] Exemplarily, in some embodiments, in the case that the value of the fifth syntax element identification information is a first value, the sign of the skip value of the filter coefficient is determined as positive. In the case that the value of the fifth syntax element identification information is a second value, the sign of the skip value of the filter coefficient is determined as negative.
[0146] It should be noted that in the embodiments of the present application, the fifth syntax element identification information can be used to indicate the sign of the skip value of the filter coefficient. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the fifth syntax element identification information can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the fifth syntax element identification information can also be a flag, which is not limited herein.
[0147] It should also be noted that if the fifth syntax element identification information is a picture-level flag, in one specific example, the first value can be set to 1, and the second value can be set to 0; in another specific example, the first value can also be set to true, and the second value can also be set to false; and in yet another specific example, the first value can also be set to 0, and the second value can also be set to 1; or, the first value can also be set to false, and the second value can also be set to true. The first value and the second value in the embodiments of the present application are not limited.
[0148] Taking the first value as 1 and the second value as 0 as an example, in the embodiments of the present application, if the value of the fifth syntax element identification information is 1, the sign of the skip value of the filter coefficient can be determined as positive. Otherwise, if the value of the fifth syntax element identification information is 0, the sign of the skip value of the filter coefficient can be determined as negative.
[0149] Exemplarily, in some embodiments of the present application, if the current color component of the current picture is a chroma C b component, the fifth syntax element identification information can be represented by a syntax element alf_cc_cb_skip_signal_data_sign, that is, alf_cc_cb_skip_signal_data_sign indicates the sign of the skip value of the filter coefficient. If the value of alf_cc_cb_skip_signal_data_sign is 0, the sign of the skip value of the filter coefficient is determined as negative, and if the value of alf_cc_cb_skip_signal_data_sign is 1, the sign of the skip value of the filter coefficient is determined as positive.
[0150] Of course, the value of alf_cc_cb_skip_signal_data_sign is not limited to 0 and 1, and the present application does not make specific limitations.
[0151] It can be understood that in the embodiments of the present application, if the absolute value of the skip value of the filter coefficient is determined to be 0 based on the fourth syntax element identification information, the skip value of the filter coefficient can be directly determined to be 0, and the fifth syntax element identification information is no longer parsed.
[0152] Further, in the embodiments of the present application, when determining the skip value of the filter coefficient corresponding to the current color component, the skip value of the filter coefficient is determined according to a preset value.
[0153] It should be noted that in the embodiments of the present application, the determination of the skip value of the filter coefficient can also be directly performed according to the predetermined preset value. The preset value can be a value of at least one filter coefficient. The present application does not limit the specific value of the preset value.
[0154] It can be understood that in the embodiments of the present application, for a group of filter coefficients that are skipped, the skip values corresponding to the filter coefficients can be the same. For different groups of filter coefficients that are skipped, the skip values corresponding to each two groups can be the same or different.
[0155] Exemplarily, in some embodiments, it is assumed that there is a group of filter coefficients that need to be skipped for the filter coefficients corresponding to the current color component, the skip positions of the filter coefficients in the group are 22, 23, 24, and 25, and the skip values of the filter coefficients corresponding thereto are 0.
[0156] Exemplarily, in some embodiments, it is assumed that there are three groups of filter coefficients that need to be skipped for the filter coefficients corresponding to the current color component, the skip positions of the filter coefficients in the first group are 9, 10, and 11, and the skip values of the filter coefficients corresponding thereto are 1; the skip positions of the filter coefficients in the first group are 22, 23, 24, and 25, and the skip values of the filter coefficients corresponding thereto are 0; and the skip positions of the filter coefficients in the first group are 27, 28, 29, 30, and 31, and the skip values of the filter coefficients corresponding thereto are 0.
[0157] That is, in the embodiments of the present application, when the first syntax element identification information indicates that the filter coefficients of the current color component of the current image are skipped, the preset value can be directly determined as the skip value of the filter coefficient.
[0158] It should be noted that in the embodiments of the present application, the various determination methods of the skip positions of the filter coefficients and the various skip methods of the skip values of the filter coefficients can be used in any combination, and the present application does not make specific limitations.
[0159] For example, in a possible implementation, the skip positions of the filter coefficients can be determined according to the preset positions, and the skip values of the filter coefficients can be determined according to the fourth syntax element identification information and the fifth syntax element identification information. In another possible implementation, the skip positions of the filter coefficients can be determined according to the preset positions, and the skip values of the filter coefficients can be determined according to the preset values. In still another possible implementation, the skip positions of the filter coefficients can be determined according to the second syntax element identification information and the third syntax element identification information, and the skip values of the filter coefficients can be determined according to the preset values. In yet another possible implementation, the skip positions of the filter coefficients can be determined according to the second syntax element identification information and the third syntax element identification information, and the skip values of the filter coefficients can be determined according to the preset values.
[0160] In step 103, the filter coefficients corresponding to the current color component are determined according to the skip positions of the filter coefficients and the skip values of the filter coefficients.
[0161] In the embodiments of the present application, if it is determined to skip the coding of the filter coefficients corresponding to the current color component based on the first syntax element identification information, after the skip positions of the filter coefficients corresponding to the current color component and the skip values of the filter coefficients are determined, the filter coefficients corresponding to the current color component can be further determined according to the skip positions of the filter coefficients and the skip values of the filter coefficients.
[0162] Further, in the embodiments of the present application, when the filter coefficients corresponding to the current color component are determined according to the skip positions of the filter coefficients and the skip values of the filter coefficients, if the position indicated by the filter coefficient index corresponding to the current color component is the same as the skip position of the filter coefficients, the skip value of the filter coefficients is set as the filter coefficient corresponding to the filter coefficient index.
[0163] Further, in the embodiments of the present application, when the filter coefficients corresponding to the current color component are determined according to the skip positions of the filter coefficients and the skip values of the filter coefficients, if the position indicated by the filter coefficient index corresponding to the current color component is different from the skip position of the filter coefficients, the filter coefficients corresponding to the filter coefficient index are determined by decoding the code stream.
[0164] It should be noted that, in the embodiments of the present application, after the skip position of the filter coefficients that need to be skipped in coding is determined, the value of the filter coefficient corresponding to the skip position can be directly determined as the corresponding skip value, so that the filter coefficients of the current color component can be obtained.
[0165] It can be understood that, in the embodiments of the present application, the filter coefficients of the current color component that do not need to be skipped in coding are coded and processed in a conventional manner.
[0166] For example, in some embodiments, if the positions of the skipped coded filter coefficients are continuous, when the serial number (index) position of the filter coefficient is between the start position and the end position of the skipped coded filter coefficients, the filter coefficient can be directly assigned the specific value of the skipped coded filter coefficient. When the serial number is not between the start position and the end position of the skipped coded filter coefficients, the filter coefficient is coded.
[0167] For example, in some embodiments, FIG. 11 is a schematic diagram of the coding of the skipped filter coefficients according to an embodiment of the present application. As shown in FIG. 11, the value K of the filter coefficient that can be skipped coding is specified as 0, and the index (position) of the filter coefficient that can be skipped coding is specified as the four discontinuous positions 22, 23, 25 and 26. Assuming that the search index is a i By traversing the specified indexes 22, 23, 25 and 26, the value F(a i ) of the filter coefficients is equal to 0, and the transmission of these coefficients can be skipped.
[0168] Step 104, determining the reconstructed block of the current block in the current image according to the filter coefficients.
[0169] In an embodiment of the present application, after determining the filter coefficients corresponding to the current color component according to the skip positions of the filter coefficients and the skip values of the filter coefficients, the filter coefficients can be further filtered, so as to determine the reconstructed block of the current block in the current image. The reconstructed block of the current block can be understood as the reconstructed block of the current color component of the current block.
[0170] For example, in some embodiments, taking CCALF as an example, assuming that the filter coefficients are the filter coefficients corresponding to the luminance reconstructed pixels and the filter coefficients corresponding to the luminance residual pixels. When determining the reconstructed block of the current block in the current image according to the filter coefficients, for the current pixel in the current block, the filtered reconstructed value of the current color component of the current pixel is determined according to the luminance reconstructed pixel, the filter coefficient corresponding to the luminance reconstructed pixel, the luminance residual pixel, the filter coefficient corresponding to the luminance residual pixel, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the current color component of the current pixel.
[0171] For example, in some embodiments, the above formula (1) can be used for CCALF filtering processing.
[0172] In summary, by using the decoding method proposed in the above steps 101 to 104, the transmission of part of the filter coefficients is skipped, the adaptive filtering scheme is optimized, and the coding performance is further improved without increasing the coding complexity.
[0173] Exemplarily, in some embodiments, for CCALF, the following is an example of a syntax semantic level change:
[0174] wherein alf_cc_num_coeffs represents the number of CCALF filter coefficients, for example, according to a conventional filter scheme, alf_cc_num_coeffs = 28.
[0175] alf_cc_cb_skip_signal_flag represents whether the coding of the partial filter coefficients of the chroma C b component is skipped.
[0176] When alf_cc_cb_skip_signal_flag = 1, it represents that the coding of the partial filter coefficients of the chroma C b component is skipped; when alf_cc_cb_skip_signal_flag = 0, it represents that the coding of the partial filter coefficients of the chroma C b component is not skipped, i.e., all filter coefficients need to be coded.
[0177] When alf_cc_cb_skip_signal_flag = 1, alf_cc_cb_skip_signal_start and alf_cc_cb_skip_signal_end are further defined, representing the start position and the end position of the partial filter coefficients that need to be skipped, respectively.
[0178] When alf_cc_cb_skip_signal_flag = 1, alf_cc_cb_skip_signal_data_abs is further defined, representing the absolute value of the partial filter coefficients that are skipped. When alf_cc_cb_skip_signal_data_abs is not 0, alf_cc_cb_skip_signal_data_sign is further defined, representing the sign of the partial filter coefficients that are skipped.
[0179] alf_cc_cr_skip_signal_flag represents whether the coding of the partial filter coefficients of the chroma C r component is skipped.
[0180] When alf_cc_cr_skip_signal_flag = 1, it represents that the coding of the partial filter coefficients of the chroma C r component is skipped; when alf_cc_cr_skip_signal_flag = 0, it represents that the coding of the partial filter coefficients of the chroma Cr Encoding of the component not skipping partial filter coefficients.
[0181] When alf_cc_cr_skip_signal_flag = 1, alf_cc_cr_skip_signal_start and alf_cc_cr_skip_signal_end are further defined to represent the start position and end position of the partial filter coefficients to be skipped, respectively.
[0182] When alf_cc_cr_skip_signal_flag = 1, alf_cc_cr_skip_signal_data_abs is further defined to represent the absolute value of the partial filter coefficients to be skipped. When alf_cc_cr_skip_signal_data_abs is not 0, alf_cc_cr_skip_signal_data_sign is further defined to represent the sign of the partial filter coefficients to be skipped.
[0183] Exemplarily, in some embodiments, for CCALF, the following is an example of changes in syntax semantics:
[0184] Wherein, alf_cc_num_coeffs represents the number of CCALF filter coefficients, for example, according to the conventional filter scheme, alf_cc_num_coeffs = 28.
[0185] alf_cc_cb_skip_signal_flag represents the encoding of whether the chrominance C b component skips the filter coefficients with indexes 22, 23, 25, 26 (preset positions).
[0186] When alf_cc_cb_skip_signal_flag = 1, it represents that the chrominance C b component skips the encoding of the filter coefficients with indexes 22, 23, 25, 26; when alf_cc_cb_skip_signal_flag = 0, it represents that the chrominance C b component does not skip the encoding of the filter coefficients with indexes 22, 23, 25, 26, i.e., all the filter coefficients need to be encoded.
[0187] When alf_cc_cb_skip_signal_flag=1, alf_cc_cb_skip_signal_data_abs is further defined to indicate the absolute values of the skipped filter coefficients with indices 22, 23, 25, and 26. When alf_cc_cb_skip_signal_data_abs is not 0, alf_cc_cb_skip_signal_data_sign is further defined to indicate the signs of the skipped filter coefficients with indices 22, 23, 25, and 26.
[0188] alf_cc_cr_skip_signal_flag, indicating chroma C r Whether the component skips encoding of filter coefficients with indices 22, 23, 25, and 26.
[0189] When alf_cc_cr_skip_signal_flag = 1, it indicates chroma C r The component skips the coding of the filter coefficients with indexes 22, 23, 25, and 26; when alf_cc_cr_skip_signal_flag = 0, it means that the chroma C r The component does not skip encoding of filter coefficients with indices 22, 23, 25, and 26.
[0190] When alf_cc_cr_skip_signal_flag=1, alf_cc_cr_skip_signal_data_abs is further defined to indicate the absolute values of the skipped filter coefficients with indices 22, 23, 25, and 26. When alf_cc_cr_skip_signal_data_abs is not 0, alf_cc_cr_skip_signal_data_sign is further defined to indicate the signs of the skipped filter coefficients with indices 22, 23, 25, and 26.
[0191] For example, in some embodiments, the methods proposed in the embodiments of this application were implemented on the reference software ECM-12.0. Under the general test conditions AI, RA, and LD, the general sequences specified by JVET were tested. The comparison anchor was ECM-12.0. During the test, the filter coefficient K for skippable codec was set to 0, and the indexes of the filter coefficients for skippable codec were set to positions 22, 23, 25, and 26. The performance of some sequences was tested, and the results showed that the methods proposed in the embodiments of this application effectively improved coding performance.
[0192] The embodiment of the present application provides a decoding method, and a codec can select to code the filter coefficient of a current color component, that is, can select to skip the transmission of part of the filter coefficient, so that the coding efficiency can be effectively improved, and the compression performance is improved.
[0193] Still another embodiment of the present application provides an encoding method, which is applied to an encoder, can be used in a scenario of performing filter processing through CCALF or ALF, and can also be applied to a transmission scenario of any adaptive coefficient. FIG. 12 is a schematic diagram of the encoding method provided by the embodiment of the present application. As shown in FIG. 12, the method of the encoding processing performed by the encoder can include the following steps.
[0194] Step 201: determining the filter coefficient corresponding to the current color component.
[0195] In the embodiment of the present application, the filter coefficient corresponding to the current color component can be determined first.
[0196] It should be noted that in the embodiment of the present application, in a video image, a first image component, a second image component and a third image component are generally used to represent a coding block CB; the three image components are respectively a luminance component, a blue color component and a red color component. Specifically, the luminance component is usually represented by a symbol Y, the blue color component is usually represented by a symbol Cb or U, and the red color component is usually represented by a symbol Cr or V. In this way, the video image can be represented in a YCbCr format or a YUV format.
[0197] It can be understood that in the embodiment of the present application, the image component of the current image can include a current luminance component or a current color component. The current color component of the current image can be a first color component or a second color component. For example, the current color component can be understood as a blue color component of the current image, and the current color component can be a U component at this time. The current color component can also be understood as a red color component of the current image, and the current color component can be a V component at this time. The present application does not make specific limitation.
[0198] Further, in the embodiment of the present application, for CCALF, when the filter coefficient of the current color component is determined, the covariance matrix and the error vector of the same type of pixel can be accumulated respectively, and then a Wiener-Hopf equation is constructed, and the filter coefficient of the type is calculated by solving the equation.
[0199] Exemplarily, in some embodiments, it is assumed that the number of filter coefficients is 29, and for each pixel, the covariance matrix A is a 29x29 square matrix. Let each element of the matrix A be a i,jwhere i, j ∈ [0, 1, 2, …, 25, 26, 27, 28]. For the error vector B, it is a 29x1 vector. Denote each element in the vector B as bi, where i ∈ [0, 1, 2, …, 25, 26, 27, 28]. After obtaining the covariance matrix A and the error vector B of each pixel, the covariance matrix and the error vector of the same category of pixels in a frame of image are summed up respectively. The Wiener-Hopf equation Ac = B is constructed, where A is the sum of the covariance matrices of the same category of pixels, and B is the sum of the error vectors of the same category of pixels. The coefficient c of this category needs to be solved, where c is a 29x1 vector.
[0200] It should be noted that the filter coefficients solved by the equation are all floating point types. Since the value range of the floating point type is almost not limited, a lot of bits are needed to encode the coefficients. In order to solve this problem, the VVC encoder performs integerization on the filter coefficients. First, the filter coefficients are scaled. Wherein, c i is the filter coefficient solved by the Wiener-Hopf equation, c' i is the scaled value. After obtaining c' i , look up table is performed on c' i . Through comparison, the number closest to c' i in {-64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64} is selected as the integerized coefficient , that is, the corresponding filter coefficient is obtained.
[0201] Step 202, in a case that it is determined to skip the filter coefficients according to the filter coefficients of the current color component, determine a skip position and a skip value of the filter coefficients corresponding to the current color component; set first syntax element identification information of the current image, and write the first syntax element identification information into a bitstream; wherein the first syntax element identification information is used to determine whether to skip the filter coefficients of the current color component.
[0202] In the embodiments of the present application, after determining the filter coefficients of the current color component of the current image, it can be further determined whether to skip part or all of the filter coefficients according to the filter coefficients of the current color component. In a case that it is determined to skip the filter coefficients according to the filter coefficients of the current color component, a skip position and a skip value of the filter coefficients corresponding to the current color component can be determined. At the same time, first syntax element identification information of the current image can also be set, and the first syntax element identification information can be written into a bitstream.
[0203] Further, in the embodiments of the present application, the first syntax element identification information can be used to determine whether to skip the coding of the filter coefficients of the current color component. In the coding of the filter coefficients, the coding of part of the filter coefficients or all of the filter coefficients of the current color component can be skipped, which is not limited in the present application.
[0204] Further, in the embodiments of the present application, the first syntax element identification information can be a flag. The first syntax element identification information can be an image-level flag or a filter-level flag, which is not limited in the present application.
[0205] Correspondingly, in the embodiments of the present application, if the first syntax element identification information is an image-level flag, the representation form of the first syntax element identification information can be a scalar form; if the first syntax element identification information is a filter-level flag, the representation form of the first syntax element identification information can be an array form.
[0206] That is to say, in the embodiments of the present application, the representation form of the first syntax element identification information is not limited, for example, the representation form of the first syntax element identification information can include a first representation form and a second representation form. The first representation form can be a scalar form, and the second representation form can be an array form.
[0207] Further, in the embodiments of the present application, when the representation form of the first syntax element identification information is the first representation form, the first syntax element identification information can be considered as an image-level flag, and thus the first syntax element identification information is used to determine whether to skip the coding of the filter coefficients of the current color component of the current image.
[0208] Further, in the embodiments of the present application, when the representation form of the first syntax element identification information is the second representation form, the first syntax element identification information can be considered as a filter-level flag, and thus the first syntax element identification information is used to determine whether to skip the coding of the filter coefficients of the current filter of the current color component of the current image.
[0209] It can be understood that, in the embodiments of the present application, for the CCALF, the current color component of the current image can correspond to a division into a plurality of CTUs, and for each CTU (current block), one group of filter coefficients can be selected from 16 groups of filter coefficients as the filter coefficients thereof. When the first syntax element identification information is a scalar, i.e., when the first syntax element identification information is an image-level flag, it can be determined according to the first syntax element identification information whether the 16 filters corresponding to the current block all skip the coding of the filter coefficients. When the first syntax element identification information is an array, i.e., when the first syntax element identification information is a filter-level flag, it can be determined according to the first syntax element identification information whether the current filter corresponding to the current block skips the coding of the filter coefficients.
[0210] Further, in the embodiments of the present application, it can be determined whether to skip the coding of the filter coefficients of the current color component according to the value of the first syntax element identification information.
[0211] Exemplarily, in some embodiments, when the value of the first syntax element identification information is a first value, it is determined to skip the coding of the filter coefficients of the current color component. When the value of the first syntax element identification information is a second value, it is determined not to skip the coding of the filter coefficients of the current color component.
[0212] It should be noted that, in the embodiments of the present application, the first syntax element identification information can be used to indicate whether the coding of the filter coefficients of the current color component is skipped. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the first syntax element identification information can be a parameter written in a picture parameter set (PPS), a parameter written in a sequence parameter set (SPS), or a flag, which is not limited herein.
[0213] It should be further noted that, if the first syntax element identification information is an image-level flag, in one specific example, the first value can be set to 1, and the second value can be set to 0; in another specific example, the first value can also be set to true, and the second value can also be set to false; or in yet another specific example, the first value can also be set to 0, and the second value can also be set to 1; or the first value can also be set to false, and the second value can also be set to true. The first value and the second value in the embodiments of the present application are not limited.
[0214] Taking the first value 1 and the second value 0 as an example, in the embodiment of the present application, if the value of the first syntax element identification information is 1, it can be determined that the coding of the filter coefficient of the current color component is skipped. Otherwise, if the value of the first syntax element identification information is 0, it can be determined that the coding of the filter coefficient of the current color component is not skipped.
[0215] Exemplarily, in some embodiments, if the current color component of the current image is a chroma C b component, the first syntax element identification information can be represented by a syntax element alf_cc_cb_skip_signal_flag, that is, the alf_cc_cb_skip_signal_flag indicates whether the coding of the filter coefficient of the current color component of the current image is skipped. If the value of the alf_cc_cb_skip_signal_flag is 0, it is determined that the coding of the filter coefficient of the current color component of the current image is not skipped, and if the value of the alf_cc_cb_skip_signal_flag is 1, it is determined that the coding of the filter coefficient of the current color component of the current image is skipped.
[0216] Of course, the value of the alf_cc_cb_skip_signal_flag is not limited to 0 and 1, and the present application does not make specific limitations.
[0217] It should be noted that in the embodiment of the present application, the filter coefficient corresponding to the current color component includes the filter coefficient of the CCALF or the filter coefficient of the ALF. That is, the filter coefficient of the current color component can be the filter coefficient of the CCALF filter or the filter coefficient of the ALF filter.
[0218] It can be understood that the coding method proposed in the embodiment of the present application can be applied to CCALF filtering, ALF filtering, and other arbitrary adaptive filtering scenarios, and the present application does not make specific limitations.
[0219] Exemplarily, in some embodiments, for CCALF, it can be selected to skip the coding of at least one coefficient in the filter coefficient of the current color component.
[0220] Exemplarily, in some embodiments, for chroma ALF, it can be selected to skip the coding of at least one coefficient in the filter coefficient of the current color component.
[0221] Exemplarily, in some embodiments, for luminance ALF, it can be selected to skip the coding of at least one coefficient in the filter coefficient of the current luminance component.
[0222] That is, in the embodiments of the present application, the first syntax element identification information can be used to determine whether to skip the coding of the filter coefficients, wherein the filter coefficients can be at least one filter coefficient of any chroma component (color component) or at least one filter coefficient of any luma component. The present application does not make specific limitations.
[0223] Further, in the embodiments of the present application, it can be determined first whether to skip part or all of the filter coefficients of the current color component. The determination of whether to skip the coding of the filter coefficients can be performed by various methods, and the present application does not make specific limitations.
[0224] For example, in some embodiments, when there are N filter coefficients with the same value in the filter coefficients of the current color component, and the N positions corresponding to the N filter coefficients are continuous, it can be determined that the filter coefficients are skipped; wherein N is an integer greater than 0.
[0225] It should be noted that in the embodiments of the present application, after determining the filter coefficients of the current color component, the determination of whether to skip the coding of the filter coefficients can be performed by searching for a large number of continuous and same values that can exist in the filter coefficients.
[0226] It can be understood that in the embodiments of the present application, after searching for the filter coefficients, if the values of the N filter coefficients at the N continuous positions are the same, it can be determined that the coding of the N filter coefficients at the N continuous positions is skipped.
[0227] For example, in some embodiments, FIG. 13 is a schematic diagram of a search method of filter coefficients according to an embodiment of the present application, as shown in FIG. 13, the search algorithm according to the embodiment of the present application is used to search by traversing all filter coefficient indexes (0~26) of the existing CCALF. Assuming that the starting position index of the search is a1, find the longest continuous interval N, so that the indexes are from a1~aN, and the values of all filter coefficients F(a1~aN) are the same, for example, equal to K, then the coding of the filter coefficients at a1~aN can be skipped. N i N
[0228] Correspondingly, in the embodiments of the present application, when determining the skip position of the filter coefficients and the skip value of the filter coefficients corresponding to the current color component, the skip position of the filter coefficients can be determined according to the N positions corresponding to the N filter coefficients; and the skip value of the filter coefficients can be determined according to the values of the N filter coefficients.
[0229] That is, in the embodiments of the present application, after the search of the filter coefficients is completed and it is determined that the filter coefficients need to be processed by the skip processing, the skip positions and the skip values of the filter coefficients corresponding to the filter coefficients can be further determined. For example, the determined N continuous positions can be determined as the skip positions of the filter coefficients, and the corresponding N filter coefficient values can be determined as the skip values of the filter coefficients.
[0230] Further, in the embodiments of the present application, when the skip positions of the filter coefficients are determined according to the N positions corresponding to the N filter coefficients, the skip start position of the filter coefficients corresponding to the current color component can be determined according to the start position in the N positions corresponding to the N filter coefficients.
[0231] It should be noted that, in the embodiments of the present application, after the skip start position of the filter coefficients corresponding to the current color component is determined, the second syntax element identification information can be set according to the skip start position, and the second syntax element identification information is written into the code stream.
[0232] Further, in the embodiments of the present application, when the skip positions of the filter coefficients are determined according to the N positions corresponding to the N filter coefficients, the skip end position of the filter coefficients corresponding to the current color component can be determined according to the end position in the N positions corresponding to the N filter coefficients.
[0233] It should be noted that, in the embodiments of the present application, after the skip end position of the filter coefficients corresponding to the current color component is determined, the third syntax element identification information can be set according to the skip end position, and the third syntax element identification information is written into the code stream.
[0234] Further, in the embodiments of the present application, after the skip positions of the filter coefficients corresponding to the current color component are determined, the second syntax element identification information and the third syntax element identification information can be set based on the skip positions; and then the second syntax element identification information and the third syntax element identification information are written into the code stream and transmitted to the decoding end.
[0235] It should be noted that, in the embodiments of the present application, the value of the second syntax element identification information can be set according to the skip start position of the filter coefficients corresponding to the current color component; and the value of the third syntax element identification information can be set according to the skip end position of the filter coefficients corresponding to the current color component.
[0236] That is, in the embodiments of the present application, the indication of the skip position of the filter coefficient can be performed by the information transmitted in the bitstream. Wherein, the skip start position of the filter coefficient can be indicated by transmitting the second syntax element identification information, and the skip end position of the filter coefficient can be indicated by transmitting the third syntax element identification information, so that the filter coefficients from the skip start position to the skip end position can be determined as the filter coefficients that need to be skipped.
[0237] It can be understood that in the embodiments of the present application, the second syntax element identification information can be used to determine the start position of the filter coefficients that are skipped. Wherein, if the current color component of the current image is the chroma C b component, the second syntax element identification information can be represented by the syntax element alf_cc_cb_skip_signal_start. Wherein, the value of alf_cc_cb_skip_signal_start can be determined according to the index value of the filter coefficient at the start position of the filter coefficients that are skipped. For example, when the index value of the filter coefficient at the start position of the filter coefficients that are skipped is 27, the value of alf_cc_cb_skip_signal_start can be set to 27.
[0238] It can be understood that in the embodiments of the present application, the third syntax element identification information can be used to determine the end position of the filter coefficients that are skipped. Wherein, if the current color component of the current image is the chroma C b component, the third syntax element identification information can be represented by the syntax element alf_cc_cb_skip_signal_end. Wherein, the value of alf_cc_cb_skip_signal_end can be determined according to the index value of the filter coefficient at the end position of the filter coefficients that are skipped. For example, when the index value of the filter coefficient at the end position of the filter coefficients that are skipped is 30, the value of alf_cc_cb_skip_signal_end can be set to 30.
[0239] Exemplarily, in some embodiments, as shown in FIG. 9, assuming that the current color component corresponds to 29 filter coefficients, and the corresponding index values are 0-28 respectively, if it is determined that the skip start position of the filter coefficient is the index value of 22, and the skip end position of the filter coefficient is the index value of 25, then the value of the second syntax element identification information can be set to 22, and the value of the third syntax element identification information can be set to 25.
[0240] Further, in the embodiments of the present application, after determining the skip value of the filter coefficient according to the values of the N filter coefficients, in the case that the skip value of the filter coefficient is not 0, the absolute value corresponding to the skip value of the filter coefficient is determined, and the fourth syntax element identification information is set according to the absolute value, and the fourth syntax element identification information is written into the bitstream. Then the sign corresponding to the skip value of the filter coefficient is determined, and the fifth syntax element identification information is set according to the sign, and the fifth syntax element identification information is written into the bitstream.
[0241] Further, in the embodiments of the present application, after determining the skip value of the filter coefficient according to the values of the N filter coefficients, in the case that the skip value of the filter coefficient is 0, the fourth syntax element identification information is set, and the fourth syntax element identification information is written into the bitstream.
[0242] Further, in the embodiments of the present application, after determining the skip value of the filter coefficient corresponding to the current color component, the fourth syntax element identification information can be further set according to the skip value of the filter coefficient, or the fourth syntax element identification information and the fifth syntax element identification information are set, and then the fourth syntax element identification information is written into the bitstream, or the fourth syntax element identification information and the fifth syntax element identification information are written into the bitstream.
[0243] That is, in the embodiments of the present application, the determination of the skip value of the filter coefficient can be performed through the information transmitted in the bitstream. Among them, the absolute value of the skip value of the filter coefficient can be indicated by transmitting the fourth syntax element identification information, and the sign of the skip value of the filter coefficient can also be indicated by transmitting the fifth syntax element identification information.
[0244] It can be understood that in the embodiments of the present application, the fourth syntax element identification information can be used to determine the absolute value of the skip value of the filter coefficient that is skipped from coding. Among them, if the current color component of the current image is the chroma C b component, the fourth syntax element identification information can be represented by the syntax element alf_cc_cb_skip_signal_data_abs. Among them, the value of alf_cc_cb_skip_signal_data_abs can be determined as the absolute value of the skip value of the filter coefficient that is skipped from coding. For example, when the absolute value of the skip value of the filter coefficient that is skipped from coding is 2, the value of alf_cc_cb_skip_signal_data_abs can be set to 2.
[0245] Exemplarily, in some embodiments, the fifth syntax element identifies information whose value is the first value, the sign of the skip value of the filter coefficient is determined as positive. The fifth syntax element identifies information whose value is the second value, the sign of the skip value of the filter coefficient is determined as negative.
[0246] It should be noted that in the embodiments of the present application, the fifth syntax element identifies information which can be used to determine the sign of the skip value of the filter coefficient. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the fifth syntax element identifies information which can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the fifth syntax element identifies information which can also be a flag, which is not limited herein.
[0247] It should be further noted that if the fifth syntax element identifies information which is a picture-level flag, in one specific example, the first value can be set as 1, and the second value can be set as 0; in another specific example, the first value can also be set as true, and the second value can also be set as false; or in yet another specific example, the first value can also be set as 0, and the second value can also be set as 1; or the first value can also be set as false, and the second value can also be set as true. The first value and the second value in the embodiments of the present application are not limited.
[0248] Taking the first value as 1 and the second value as 0 as an example, in the embodiments of the present application, if the sign of the skip value of the filter coefficient is determined as positive, the value of the fifth syntax element identifying information can be set as 1. Otherwise, if the sign of the skip value of the filter coefficient is determined as negative, the value of the fifth syntax element identifying information can be set as 0.
[0249] Exemplarily, in some embodiments of the present application, if the current color component of the current picture is a chroma C b component, the fifth syntax element identifying information can be represented by a syntax element alf_cc_cb_skip_signal_data_sign, that is, alf_cc_cb_skip_signal_data_sign indicates the sign of the skip value of the filter coefficient. If the value of alf_cc_cb_skip_signal_data_sign is 0, the sign of the skip value of the filter coefficient is determined as negative, and if the value of alf_cc_cb_skip_signal_data_sign is 1, the sign of the skip value of the filter coefficient is determined as positive.
[0250] Of course, the value of alf_cc_cb_skip_signal_data_sign is not limited to 0 and 1, and the present application does not make a specific limitation.
[0251] It can be understood that in the embodiments of the present application, if it is determined that the skip value of the filter coefficient is 0, the fourth syntax element identification information can be set to 0, and the fourth syntax element identification information is written into the code stream, and the setting and coding of the fifth syntax element identification information are no longer performed.
[0252] Exemplarily, in some embodiments, in the case that there are N filter coefficients with a preset value in the filter coefficients of the current color component, and the N positions corresponding to the N filter coefficients are continuous, it can be determined that the N filter coefficients are skipped.
[0253] It should be noted that in the embodiments of the present application, after the filter coefficients of the current color component are determined, a large number of continuous filter coefficients with a preset value can be searched to determine whether to skip the coding and decoding of the filter coefficients.
[0254] It can be understood that in the embodiments of the present application, after the search of the filter coefficients, if the values of the N filter coefficients at the N continuous positions are all preset values, it can be determined that the coding and decoding of the N filter coefficients at the N continuous positions are skipped.
[0255] Exemplarily, in some embodiments, FIG. 14 is a schematic diagram of a search method of a filter coefficient according to an embodiment of the present application, as shown in FIG. 14, assuming that the specific value of the filter coefficient that can be skipped in coding and decoding is M (a preset value), and the search algorithm according to the embodiment of the present application is used to search by traversing all filter coefficient indexes (0-26) of the existing CCALF. Assuming that the starting position index of the search is a1, the longest continuous interval N is found, so that the indexes are from a1 to a N , and the values of all filter coefficients F(a i ) are equal to M, then the coding and decoding of the filter coefficients from a1 to a N are skipped.
[0256] Accordingly, in the embodiments of the present application, after the search of the filter coefficients is completed and it is determined that the filter coefficients need to be processed by skipping, the skip positions of the filter coefficients can be further determined according to the N positions corresponding to the N filter coefficients, for example, the corresponding skip start position and skip end position can be determined according to the N positions corresponding to the N filter coefficients, and the second syntax element identification information and the third syntax element identification information can be set according to the skip start position and the skip end position; then the second syntax element identification information and the third syntax element identification information are written into the bitstream and transmitted to the decoding end. At the same time, the skip value of the filter coefficient can be directly determined according to the preset value.
[0257] That is, in the embodiments of the present application, the skip value of the filter coefficient can also be directly determined according to the preset value determined in advance. The preset value can be the value of at least one filter coefficient. The present application does not limit the specific value of the preset value.
[0258] It can be understood that in the embodiments of the present application, for a group of filter coefficients that are skipped and coded, the skip values corresponding to these filter coefficients can be the same. For different groups of filter coefficients that are skipped and coded, the skip values corresponding to each two groups can be the same or different.
[0259] Exemplarily, in some embodiments, it is assumed that there is a group of filter coefficients that need to be skipped and coded in the filter coefficients corresponding to the current color component, the skip positions of the filter coefficients in the group are 22, 23, 24, and 25, and the skip values of the corresponding filter coefficients are 0.
[0260] Exemplarily, in some embodiments, it is assumed that there are three groups of filter coefficients that need to be skipped and coded in the filter coefficients corresponding to the current color component, the skip positions of the filter coefficients in the first group are 9, 10, and 11, the skip values of the corresponding filter coefficients are 1; the skip positions of the filter coefficients in the first group are 22, 23, 24, and 25, the skip values of the corresponding filter coefficients are 0; the skip positions of the filter coefficients in the first group are 27, 28, 29, 30, and 31, and the skip values of the corresponding filter coefficients are 0.
[0261] Exemplarily, in some embodiments, in the case that the filter coefficients corresponding to the preset positions in the filter coefficients of the current color component are all the same, it can be determined that the filter coefficients corresponding to the preset positions are skipped.
[0262] It should be noted that in the embodiments of the present application, after the filter coefficients of the current color component are determined, it can be determined whether the filter coefficients are processed by skipping and coding by searching whether the values of the filter coefficients at the preset positions are the same.
[0263] It can be understood that in the embodiments of the present application, if the values of the filter coefficients at the preset positions are all the same after searching the filter coefficients, it can be determined that the coding and decoding processes of the N filter coefficients at the N continuous positions are skipped.
[0264] Exemplarily, in some embodiments, FIG. 15 is a schematic diagram III of the search manner of the filter coefficients according to the embodiments of the present application. As shown in FIG. 15, by using the search algorithm according to the embodiments of the present application, if the values of the filter coefficients at the four positions corresponding to the indexes ai of 22, 23, 25 and 26 in all the filter coefficient indexes (0-26) of the existing CCALF are all the same, that is, F(a22)=F(a23)=F(a25)=F(a26), then the coding and decoding of the four filter coefficients can be skipped. i
[0265] It should be noted that in the embodiments of the present application, if there are multiple skip positions of the filter coefficients, the multiple skip positions of the filter coefficients can be continuous or discontinuous, which is not limited in the present application.
[0266] Correspondingly, in the embodiments of the present application, after the search of the filter coefficients is completed and the filter coefficients that need to be processed are determined, the preset positions can be further determined as the skip positions of the filter coefficients. Meanwhile, the skip values of the filter coefficients can be determined according to the filter coefficients corresponding to the preset positions, and after the skip values of the filter coefficients corresponding to the current color component are determined, the fourth syntax element identification information can be further set according to the skip values of the filter coefficients, or the fourth syntax element identification information and the fifth syntax element identification information are set, and then the fourth syntax element identification information or the fourth syntax element identification information and the fifth syntax element identification information are written into the bitstream.
[0267] That is, in the embodiments of the present application, when the skip positions of the filter coefficients corresponding to the current color component are determined, the skip positions of the filter coefficients can be determined according to the preset positions.
[0268] It should be noted that in the embodiments of the present application, the skip positions of the filter coefficients can also be directly determined according to the preset positions specified in advance. The preset positions can be the positions (index values) of at least one filter coefficient.
[0269] Exemplarily, in some embodiments, as shown in FIG. 10, the preset positions are the filter coefficients with the index values of 22, 23, 25 and 26.
[0270] Exemplarily, in some embodiments, in the case that the filter coefficients corresponding to the preset positions in the filter coefficients of the current color component are preset values, it is determined to skip the filter coefficients corresponding to the preset positions.
[0271] It should be noted that in the embodiments of the present application, after the filter coefficients of the current color component are determined, it can be judged whether to perform the skip processing of the coding and decoding of the filter coefficients by searching whether the values of the filter coefficients at the preset positions are the preset values.
[0272] It can be understood that in the embodiments of the present application, after the search of the filter coefficients, if the values of the filter coefficients at the preset positions are all equal to the preset values, it can be determined to skip the coding and decoding of the N filter coefficients at the N continuous positions.
[0273] Exemplarily, in some embodiments, FIG. 16 is a schematic diagram four of the search method of the filter coefficients according to the embodiments of the present application, as shown in FIG. 16, assuming that the specific value of the filter coefficients that can be skipped in coding and decoding is K (the preset value), using the search algorithm according to the embodiments of the present application, by traversing the index a of the preset position in all filter coefficient indexes (0-26) of the existing CCALF i , the values of the filter coefficients at the corresponding four positions F(a i ) are all equal to K, then the coding and decoding of the four filter coefficients can be skipped.
[0274] Correspondingly, in the embodiments of the present application, after the search of the filter coefficients is completed and the filter coefficients that need to be processed are determined, the preset position can be further determined as the skip position of the filter coefficients. Meanwhile, the preset value is determined as the skip value of the filter coefficients.
[0275] Further, in the embodiments of the present application, in the case that the current image satisfies the first condition, the preset position can be determined as the skip position of the filter coefficients; wherein the first condition at least includes at least one of the following: the height value of the current image is less than or equal to a first value; the height value of the current image is greater than or equal to a second value; the width value of the current image is less than or equal to a third value; the width value of the current image is greater than or equal to a fourth value.
[0276] It should be noted that in the embodiments of the present application, it can be first judged whether the current image satisfies the first condition, and the preset position is determined as the skip position of the filter coefficients according to the judgment result.
[0277] It can be understood that in the embodiments of the present application, the first condition is used to limit the resolution of the image whose coding and decoding of the filter coefficients are skipped. For example, the first condition can include the preset conditions for the height and width of the image.
[0278] It should be noted that in the embodiments of the present application, the first value, the second value, the third value and the fourth value are all greater than 0.
[0279] Exemplarily, in some embodiments, if the height value of the current picture is less than or equal to 720 (a first numerical value) and the width value of the current picture is less than or equal to 1280, the coding of the preset position filter coefficient of the current component (for example, the current color component) of the current picture can be skipped.
[0280] Further, in the embodiments of the present application, for the filter coefficient corresponding to the current color component, if the position indicated by the filter coefficient index corresponding to the current color component is the same as the skip position of the filter coefficient, the coding of the filter coefficient corresponding to the filter coefficient index is not performed.
[0281] Further, in the embodiments of the present application, for the filter coefficient corresponding to the current color component, if the position indicated by the filter coefficient index corresponding to the current color component is different from the skip position of the filter coefficient, the filter coefficient corresponding to the filter coefficient index is written into the code stream.
[0282] It can be understood that, in the embodiments of the present application, for the filter coefficients of the filter coefficients of the current color component that do not need to be skipped, the coding processing can be performed in a conventional manner.
[0283] Step 203, determining a reconstructed block of the current block in the current picture according to the filter coefficient.
[0284] In the embodiments of the present application, after determining the filter coefficient corresponding to the current color component, the filter coefficient can be further filtered, so that the reconstructed block of the current block in the current picture can be determined. It can be understood that the reconstructed block of the current block is the reconstructed block of the current color component of the current block.
[0285] Exemplarily, in some embodiments, taking CCALF as an example, it is assumed that the filter coefficient is the filter coefficient corresponding to the luminance reconstructed pixel and the filter coefficient corresponding to the luminance residual pixel. When determining the reconstructed block of the current block in the current picture according to the filter coefficient, for the current pixel in the current block, the filtered reconstructed value of the current color component of the current pixel is determined according to the luminance reconstructed pixel, the filter coefficient corresponding to the luminance reconstructed pixel, the luminance residual pixel, the filter coefficient corresponding to the luminance residual pixel, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the current color component of the current pixel.
[0286] Exemplarily, in some embodiments, the above formula (1) can be used for CCALF filtering processing.
[0287] In summary, by the encoding method proposed by the steps 201 to 203, the adaptive filtering scheme is optimized by skipping the transmission of partial filter coefficients, and the encoding performance is further improved without increasing the encoding and decoding complexity.
[0288] Exemplarily, in some embodiments, for CCALF, the following is an example of changes in syntax semantics:
[0289] Wherein, alf_cc_num_coeffs represents the number of CCALF filter coefficients, for example, according to the conventional filtering scheme, alf_cc_num_coeffs = 28.
[0290] alf_cc_cb_skip_signal_flag represents whether the coding of partial filter coefficients of the chroma C b component is skipped.
[0291] When alf_cc_cb_skip_signal_flag = 1, it represents that the coding of partial filter coefficients of the chroma C b component is skipped; when alf_cc_cb_skip_signal_flag = 0, it represents that the coding of partial filter coefficients of the chroma C b component is not skipped, that is, all filter coefficients need to be encoded.
[0292] When alf_cc_cb_skip_signal_flag = 1, alf_cc_cb_skip_signal_start and alf_cc_cb_skip_signal_end are further defined, which respectively represent the starting position and the ending position of the partial filter coefficients that need to be skipped.
[0293] When alf_cc_cb_skip_signal_flag = 1, alf_cc_cb_skip_signal_data_abs is further defined, which represents the absolute value of the skipped partial filter coefficients. When alf_cc_cb_skip_signal_data_abs is not 0, alf_cc_cb_skip_signal_data_sign is further defined, which represents the sign of the skipped partial filter coefficients.
[0294] alf_cc_cr_skip_signal_flag represents whether the coding of partial filter coefficients of the chroma C r component is skipped.
[0295] alf_cc_cr_skip_signal_flag = 1, it means that the chroma C r component skips the encoding of partial filter coefficients; when alf_cc_cr_skip_signal_flag = 0, it means that the chroma C r component does not skip the encoding of partial filter coefficients.
[0296] When alf_cc_cr_skip_signal_flag = 1, it further defines alf_cc_cr_skip_signal_start and alf_cc_cr_skip_signal_end, which respectively represent the start position and the end position of the partial filter coefficients that need to be skipped.
[0297] When alf_cc_cr_skip_signal_flag = 1, it further defines alf_cc_cr_skip_signal_data_abs, which represents the absolute value of the partial filter coefficients that are skipped. When alf_cc_cr_skip_signal_data_abs is not 0, it further defines alf_cc_cr_skip_signal_data_sign, which represents the sign of the partial filter coefficients that are skipped.
[0298] Exemplarily, in some embodiments, for CCALF, the following is an example of changes in the syntax semantics level:
[0299] Wherein, alf_cc_num_coeffs represents the number of CCALF filter coefficients, for example, according to the conventional filter scheme, alf_cc_num_coeffs = 28.
[0300] alf_cc_cb_skip_signal_flag = 1, it means that the chroma C b component skips the encoding of filter coefficients with indexes 22, 23, 25, and 26 (preset positions).
[0301] When alf_cc_cb_skip_signal_flag = 1, it means that the chroma C b component skips the encoding of filter coefficients with indexes 22, 23, 25, and 26; when alf_cc_cb_skip_signal_flag = 0, it means that the chroma C b component does not skip the encoding of filter coefficients with indexes 22, 23, 25, and 26, i.e., all filter coefficients need to be encoded.
[0302] When alf_cc_cb_skip_signal_flag = 1, alf_cc_cb_skip_signal_data_abs is further defined to represent the absolute values of the filtered coefficients with indexes 22, 23, 25, 26 that are skipped. When alf_cc_cb_skip_signal_data_abs is not equal to 0, alf_cc_cb_skip_signal_data_sign is further defined to represent the signs of the filtered coefficients with indexes 22, 23, 25, 26 that are skipped.
[0303] alf_cc_cr_skip_signal_flag is used to represent whether the coding of the filtered coefficients with indexes 22, 23, 25, 26 is skipped for the chrominance C r component.
[0304] When alf_cc_cr_skip_signal_flag = 1, alf_cc_cr_skip_signal_data_abs is further defined to represent the absolute values of the filtered coefficients with indexes 22, 23, 25, 26 that are skipped. When alf_cc_cr_skip_signal_data_abs is not equal to 0, alf_cc_cr_skip_signal_data_sign is further defined to represent the signs of the filtered coefficients with indexes 22, 23, 25, 26 that are skipped. r component. r component.
[0305] When alf_cc_cr_skip_signal_flag = 1, alf_cc_cr_skip_signal_data_abs is further defined to represent the absolute values of the filtered coefficients with indexes 22, 23, 25, 26 that are skipped. When alf_cc_cr_skip_signal_data_abs is not equal to 0, alf_cc_cr_skip_signal_data_sign is further defined to represent the signs of the filtered coefficients with indexes 22, 23, 25, 26 that are skipped.
[0306] Exemplarily, in some embodiments, the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0, and under the general test conditions AI, RA, and LD configuration, the general sequences specified by JVET are tested. Compared with the anchor ECM-12.0, the filtered coefficients K that can be skipped in the coding are set to 0, and the indexes of the filtered coefficients that can be skipped in the coding are set to the four positions of 22, 23, 25, and 26. At present, the performance of part of the sequences is tested, and the results show that the method proposed in the embodiments of the present application effectively improves the coding performance.
[0307] The embodiment of the present application provides a coding method, and a codec can select to code the filter coefficient of a current color component, that is, to select to skip transmission of part of the filter coefficient, so that coding efficiency can be effectively improved, and compression performance is improved.
[0308] Still another embodiment of the present application provides a coding method, which is applied to a codec and can be used in a scenario of performing filter processing through CCALF or ALF, or can be applied to transmission of any adaptive coefficient. For example, for CCALF, the transmission of part of the coefficient is skipped, and the CCALF is optimized, so that coding performance can be further improved without increasing coding complexity.
[0309] Hereinafter, the coding method provided by the present application is exemplarily described by taking CCALF as an example.
[0310] The coding method provided by the embodiment of the present application is a new filter coefficient transmission optimization method, in which a large number of continuous and same values in filter coefficients are searched, marked and skipped from transmission, and coding performance of the cross-channel adaptive loop filter is further improved.
[0311] Specifically, as shown in FIG. 13, it is assumed that the specific value of the filter coefficient that can be skipped from coding is K, and searching is performed by traversing all filter coefficient indexes (0-26) of the existing CCALF. It is assumed that the starting position index of the search is a1, and the longest continuous interval N is found, so that the indexes are from a1 to a1+N-1, and the values of all filter coefficients F(a1) to F(a1+N-1) are equal to K. N i The values of all filter coefficients F(a1) to F(a1+N-1) are equal to K, that is, the best search result, and the value K of the filter coefficient that can be skipped from coding, and the starting position and the ending position of the filter coefficient that can be skipped from coding are written into a bitstream.
[0312] Exemplarily, in some embodiments, at the encoding end, when the encoding end enters a loop filter CCALF module, a current chroma component is processed (taking the Cb component as an example, and the processing process of the Cr component is similar):
[0313] a) The CTU of the current image is classified, the covariance matrix and the error vector of all pixels in the same category are respectively accumulated, then a Wiener-Hopf equation is constructed, and the filter coefficient of the category is calculated by solving the equation. Skip to b).
[0314] b) Analyze the filter coefficient characteristics of the current CCALF, and determine whether to use the technical solution of partial filter coefficient coding skipping in this paper by the search algorithm proposed in this application (specifically introduced in section 2.1). When it is decided that the chroma Cb component does not skip the coding of partial filter coefficients, set alf_cc_cb_skip_signal_flag = 0. When it is decided that the chroma Cb component skips the coding of partial filter coefficients, set alf_cc_cb_skip_signal_flag = 1, and encode the start position alf_cc_cb_skip_signal_start and the end position alf_cc_cb_skip_signal_end of the partial filter coefficients that need to be skipped into the code stream, and encode the absolute value alf_cc_cb_skip_signal_data_abs of the skipped partial filter coefficients and the sign alf_cc_cb_skip_signal_data_sign of the skipped partial filter coefficients into the code stream. Go to c);
[0315] c) After determining the filter coefficients, the pixels that need to be filtered are filtered and written into the reconstructed image. For the pixels that do not need to be filtered, they are directly written into the reconstructed image. Go to d);
[0316] d) If the chroma component Cb of the current image has been processed, load Cr for processing. If all chroma components have been processed, end.
[0317] Exemplarily, in some embodiments, at the decoding end, when the decoding end enters the CCALF module, the current chroma component is processed (take the Cb component as an example, the processing process of the Cr component is similar):
[0318] a) After receiving the code stream at the VVC decoding end, determine the CCALF switch of the current image, whether each CTU is filtered, and the corresponding category information, etc. In addition, the APS ID is parsed, and the corresponding APS is selected to determine the coefficients of the filter.
[0319] Specifically, when decoding the filter coefficients, first parse alf_cc_cb_skip_signal_flag, which indicates whether the chroma Cb component skips the decoding of partial filter coefficients. When alf_cc_cb_skip_signal_flag = 0, it indicates that the chroma Cb component does not skip the decoding of partial filter coefficients, i.e., all filter coefficients need to be decoded. When alf_cc_cb_skip_signal_flag = 1, it indicates that the chroma Cb component skips the decoding of partial filter coefficients, and then further parse alf_cc_cb_skip_signal_start and alf_cc_cb_skip_signal_end, which indicate the start position and the end position of the partial filter coefficients that need to be skipped from decoding, and further parse alf_cc_cb_skip_signal_data_abs, which indicates the absolute value of the skipped partial filter coefficients. When alf_cc_cb_skip_signal_data_abs is not 0, further parse alf_cc_cb_skip_signal_data_sign, which indicates the sign of the skipped partial filter coefficients. Through the absolute value and the sign, the specific value of the filter coefficient that is skipped from coding and decoding can be obtained.
[0320] Finally, the filter coefficients are decoded, and when the serial number position of the filter coefficient is between the start position and the end position of the partial filter coefficients that are skipped from decoding, the filter coefficient is directly assigned to the specific value of the filter coefficient that is skipped from coding and decoding. When the serial number of the filter coefficient is not between the start position and the end position of the partial filter coefficients that are skipped from decoding, the filter coefficient is decoded. Jump to b);
[0321] b) According to the decoded CCALF filter coefficients, filter the pixels that need to be filtered and write them into the reconstructed image. For the pixels that do not need to be filtered, directly write them into the reconstructed image. Jump to c);
[0322] c) If the current chroma component Cb has been processed, load Cr for processing. If all the current chroma components have been processed, end.
[0323] That is, in the embodiments of the present application, the filter coefficient that is continuous and the same as the filter coefficient K that can be skipped from coding and decoding can be obtained by searching, and the filter coefficient K that can be skipped from coding and decoding, and the start position and the end position of the filter coefficient that can be skipped from coding and decoding need to be written into the code stream.
[0324] Further, in the embodiments of the present application, the adaptive loop filter data syntax is defined as follows:
[0325] Further, in the embodiments of the present application, taking the syntax semantic level in the ECM as an example, the following semantics are defined:
[0326] alf_cc_num_coeffs, representing the number of CCALF filter coefficients, for example, according to the conventional filter scheme, alf_cc_num_coeffs = 28.
[0327] alf_cc_cb_skip_signal_flag, representing whether the coding of the partial filter coefficients of the chroma C b component is skipped.
[0328] When alf_cc_cb_skip_signal_flag = 1, it represents that the coding of the partial filter coefficients of the chroma C b component is skipped; when alf_cc_cb_skip_signal_flag = 0, it represents that the coding of the partial filter coefficients of the chroma C b component is not skipped, i.e. the coding of all filter coefficients is needed.
[0329] When alf_cc_cb_skip_signal_flag = 1, alf_cc_cb_skip_signal_start and alf_cc_cb_skip_signal_end are further defined, representing the start position and the end position of the partial filter coefficients that need to be skipped, respectively.
[0330] When alf_cc_cb_skip_signal_flag = 1, alf_cc_cb_skip_signal_data_abs is further defined, representing the absolute value of the partial filter coefficients that are skipped. When alf_cc_cb_skip_signal_data_abs is not 0, alf_cc_cb_skip_signal_data_sign is further defined, representing the sign of the partial filter coefficients that are skipped.
[0331] alf_cc_cr_skip_signal_flag, representing whether the coding of the partial filter coefficients of the chroma C r component is skipped.
[0332] When alf_cc_cr_skip_signal_flag = 1, it represents that the coding of the partial filter coefficients of the chroma C r component is skipped; when alf_cc_cr_skip_signal_flag = 0, it represents that the coding of the partial filter coefficients of the chroma C r component is not skipped.
[0333] When alf_cc_cr_skip_signal_flag = 1, alf_cc_cr_skip_signal_start and alf_cc_cr_skip_signal_end are further defined to represent the start position and the end position of the partial filter coefficients to be skipped, respectively.
[0334] When alf_cc_cr_skip_signal_flag = 1, alf_cc_cr_skip_signal_data_abs is further defined to represent the absolute value of the partial filter coefficients to be skipped. When alf_cc_cr_skip_signal_data_abs is not 0, alf_cc_cr_skip_signal_data_sign is further defined to represent the sign of the partial filter coefficients to be skipped.
[0335] Further, in the embodiments of the present application, the scheme of pre-setting the fixed K value (preset value) of the filter coefficients to be skipped and / or pre-setting the fixed position (preset position) of the filter coefficients to be skipped can also be selected. For example, the K value can be specified as 0 or other fixed number, and the fixed position can be a specific continuous interval or a specific discontinuous position.
[0336] Exemplarily, in some embodiments, FIG. 17 is a schematic diagram of the CCALF luminance residual filter template according to the embodiments of the present application. As shown in FIG. 17, taking the luminance residual filter in CCALF as an example, the filter coefficient K to be skipped is specified as 0, and the indexes of the filter coefficients to be skipped are specified as the discontinuous positions 22, 23, 25 and 26. Then, when the filter coefficient values of the positions 22, 23, 25 and 26 are all 0, the transmission of these coefficients can be skipped. Assuming that the search index is a i , by traversing the specified indexes 22, 23, 25 and 26, the filter coefficient values F(a i ) are all equal to 0, then the transmission of these coefficients can be skipped.
[0337] Exemplarily, in some embodiments, for CCALF, the following is an example of the modification of the syntax semantic level:
[0338] Further, in the embodiments of the present application, taking the syntax semantic level in ECM as an example, the following semantics are defined:
[0339] alf_cc_num_coeffs represents the number of CCALF filter coefficients, for example, according to the conventional filter scheme, alf_cc_num_coeffs = 28.
[0340] alf_cc_cb_skip_signal_flag, indicates whether the chroma C b component skips the coding of the filter coefficients with index 22, 23, 25, 26 (default position).
[0341] alf_cc_cb_skip_signal_flag = 1, indicates that the chroma C b component skips the coding of the filter coefficients with index 22, 23, 25, 26; alf_cc_cb_skip_signal_flag = 0, indicates that the chroma C b component does not skip the coding of the filter coefficients with index 22, 23, 25, 26, i.e. all filter coefficients need to be coded.
[0342] alf_cc_cb_skip_signal_flag = 1, further defines alf_cc_cb_skip_signal_data_abs, indicating the absolute values of the skipped filter coefficients with index 22, 23, 25, 26. When alf_cc_cb_skip_signal_data_abs is not zero, further defines alf_cc_cb_skip_signal_data_sign, indicating the sign of the skipped filter coefficients with index 22, 23, 25, 26.
[0343] alf_cc_cr_skip_signal_flag, indicates whether the chroma C r component skips the coding of the filter coefficients with index 22, 23, 25, 26.
[0344] alf_cc_cr_skip_signal_flag = 1, indicates that the chroma C r component skips the coding of the filter coefficients with index 22, 23, 25, 26; alf_cc_cr_skip_signal_flag = 0, indicates that the chroma C r component does not skip the coding of the filter coefficients with index 22, 23, 25, 26.
[0345] When alf_cc_cr_skip_signal_flag = 1, alf_cc_cr_skip_signal_data_abs is further defined to represent the absolute values of the filter coefficients with indexes 22, 23, 25, 26 being skipped. When alf_cc_cr_skip_signal_data_abs is not 0, alf_cc_cr_skip_signal_data_sign is further defined to represent the signs of the filter coefficients with indexes 22, 23, 25, 26 being skipped.
[0346] Exemplarily, in some embodiments, the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0, and the general sequences specified by JVET are tested under the general test conditions AI, RA, and LD configuration. Compared with the anchor ECM-12.0, the filter coefficients K that can be skipped are set to 0, and the indexes of the filter coefficients that can be skipped are set to 22, 23, 25, and 26. The performance of part of the sequences is tested, and the results show that the method proposed in the embodiments of the present application effectively improves the encoding performance.
[0347] Exemplarily, in some embodiments, the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0, and the general sequences specified by JVET are tested under the general test conditions AI, RA, and LD configuration. Compared with the anchor ECM-12.0, the filter coefficients K that can be skipped are set to 0, and the indexes of the filter coefficients that can be skipped are set to 22, 23, 25, and 26. The performance of part of the sequences is tested, and the results show that the method proposed in the embodiments of the present application effectively improves the encoding performance.
[0348] The embodiments of the present application provide a coding method, and a codec can select to code the filter coefficients of a current color component, that is, the transmission of part of the filter coefficients can be selected to be skipped, so that the coding efficiency can be effectively improved, and the compression performance can be improved.
[0349] In still another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, referring to FIG. 18, a constituent structure schematic diagram of an encoder 100 proposed in the embodiments of the present application is shown. As shown in FIG. 18, the encoder 100 can include a first determining unit 1001; wherein,
[0350] The first determining unit 1001 is configured to determine a filter coefficient of a current color component of a current image; in a case where it is determined to skip the filter coefficient according to the filter coefficient of the current color component, determine a skip position and a skip value of the filter coefficient corresponding to the current color component; set first syntax element identification information of the current image, and write the first syntax element identification information into a bitstream; wherein the first syntax element identification information is used to determine whether to skip the filter coefficient of the current color component; and determine a reconstructed block of a current block in the current image according to the filter coefficient.
[0351] It should be noted that in the embodiments of the present application, the encoder 100 can also be regarded as a data processing mode (or "entropy encoder") for encoding processing the values of the to-be-encoded syntax elements.
[0352] It can be understood that in the embodiments of the present application, the "unit" can be a part of circuit, a part of processor, a part of program or software, and of course can also be a module, and can also be non-modular. Moreover, the components in the embodiments can be integrated in a processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of a software function module.
[0353] The integrated unit, if realized in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in the embodiments. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0354] Therefore, the embodiments of the present application provide a computer readable storage medium applied to the encoder 100, and the computer readable storage medium stores a computer program, and the computer program is executed by a first processor to implement the encoding method in any one of the foregoing embodiments.
[0355] Based on the components of the encoder 100 and the computer readable storage medium, referring to FIG. 19, a specific hardware structure diagram of the encoder 100 is shown. As shown in FIG. 19, the encoder 100 can include a first communication interface 1002, a first memory 1003 and a first processor 1004; each component is coupled together through a first bus system 1005. It can be understood that the first bus system 1005 is used to realize the connection communication between the components. The first bus system 1005 includes a data bus, a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, various buses are marked as the first bus system 1005 in the figure. Among them,
[0356] The first communication interface 1002 is used for receiving and sending signals in the process of transmitting information with other external network elements;
[0357] The first memory 1003 is used for storing computer programs capable of running on the first processor 1004;
[0358] The first processor 1004 is used for determining the filter coefficient of the current color component of the current image when running the computer program; determining the skip position and the skip value of the filter coefficient corresponding to the current color component in the case of determining to skip the filter coefficient according to the filter coefficient of the current color component; setting the first syntax element identification information of the current image, and writing the first syntax element identification information into the code stream; wherein the first syntax element identification information is used to determine whether to skip the filter coefficient of the current color component; and determining the reconstruction block of the current block in the current image according to the filter coefficient.
[0359] It is to be understood that the first memory 1003 in embodiments of this application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. In one embodiment, a non-volatile memory can be a Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically EPROM (EEPROM), or flash memory. A volatile memory can be a Random Access Memory (RAM), used as external cache memory. By way of example, and not limitation, many forms of RAM are available, for example, Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 1003 of the system and method described herein are intended to include, without being limited to, these and any other suitable types of memory.
[0360] The first processor 1004 can be a chip that has a processing capability of signals. In implementation, each step of the above method can be completed by integrated logic circuit of hardware in the first processor 1004 or instructions in the form of software. The first processor 1004 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the first storage 1003, and the first processor 1004 reads the information in the first storage 1003 and combines the hardware to complete the steps of the above method.
[0361] It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be realized in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or a combination thereof. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0362] Optionally, as another embodiment, the first processor 1004 is further configured to, when running the computer program, perform the encoding method in any one of the preceding embodiments.
[0363] The embodiment provides an encoder, and the codec can select to code the filter coefficient of the current color component, that is, can select to skip the transmission of part of the filter coefficient, so that the coding efficiency can be effectively improved, and the compression performance is improved.
[0364] In still another embodiment of the application, based on the same inventive concept as in the preceding embodiments, referring to FIG. 20, a constituent structure schematic diagram of a decoder 200 proposed in the embodiment of the application is shown. As shown in FIG. 20, the decoder 200 can include: a second determining unit 2001; wherein,
[0365] The second determining unit 2001 is configured to decode a code stream, determine first syntax element identification information, in a case where the first syntax element identification information indicates that the filter coefficient of the current color component is skipped, determine a skip position of the filter coefficient and a skip value of the filter coefficient corresponding to the current color component, determine the filter coefficient corresponding to the current color component according to the skip position of the filter coefficient and the skip value of the filter coefficient, and determine a reconstructed block of a current block in a current image according to the filter coefficient.
[0366] It should be noted that in the embodiment of the application, the decoder 200 can also be regarded as a data processing mode (or an entropy decoder) for decoding the value of a to-be-decoded syntax element.
[0367] It can be understood that in the embodiment, the "unit" can be a part of circuit, a part of processor, a part of program or software, and of course can also be a module, and can also be non-modular. Moreover, the constituent parts in the embodiment can be integrated in a processing unit, or can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.
[0368] When the integrated unit is realized in the form of a software function module and is not sold or used as an independent product, the integrated unit can be stored in a computer readable storage medium. Based on such understanding, the embodiment provides a computer readable storage medium applied to the decoder 200, and the computer readable storage medium stores a computer program. The computer program is executed by the second processor to implement the method in any one of the preceding embodiments.
[0369] Based on the components of the decoder 200 and the computer readable storage medium, referring to FIG. 21, a specific hardware structure diagram of the decoder 200 is shown. As shown in FIG. 21, the decoder 200 can include a second communication interface 2002, a second memory 2003 and a second processor 2004; and the components are coupled together through a second bus system 2005. It can be understood that the second bus system 2005 is used to realize the connection communication between the components. The second bus system 2005 includes a data bus, a power bus, a control bus and a state signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the second bus system 2005 in the figure. Among them,
[0370] The second communication interface 2002 is configured to receive and send signals in the information transceiving process between other external network elements.
[0371] The second memory 2003 is configured to store a computer program capable of running on the second processor 2004.
[0372] The second processor 2004 is configured to, when running the computer program, perform: decoding a code stream, determining first syntax element identification information; in the case that the first syntax element identification information indicates that the filter coefficient of the current color component is skipped, determining the skip position of the filter coefficient and the skip value of the filter coefficient corresponding to the current color component; determining the filter coefficient corresponding to the current color component according to the skip position of the filter coefficient and the skip value of the filter coefficient; and determining a reconstruction block of a current block in a current image according to the filter coefficient.
[0373] Optionally, as another embodiment, the second processor 2004 is further configured to, when running the computer program, perform the method in any one of the preceding embodiments.
[0374] It can be understood that the hardware function of the second memory 2003 is similar to that of the first memory 1003, and the hardware function of the second processor 2004 is similar to that of the first processor 1004; and details are not described here.
[0375] The embodiment provides a decoder, and the codec can select to encode and decode the filter coefficient of the current color component, that is, can select to skip the transmission of part of the filter coefficient, so that the encoding and decoding efficiency can be effectively improved, and the compression performance is improved.
[0376] In still another embodiment of the present application, referring to FIG. 22, a component structure diagram of a codec system is shown. As shown in FIG. 22, the codec system 300 can include an encoder 100 and a decoder 200.
[0377] In embodiments of the present application, the encoder 100 can be an encoder as described in any of the foregoing embodiments, and the decoder 200 can be a decoder as described in any of the foregoing embodiments.
[0378] Further, embodiments of the present application also provide a bitstream, wherein the bitstream is generated by bit-encoding to-be-encoded information; wherein the to-be-encoded information at least includes: the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, and the fifth syntax element identification information.
[0379] It should be noted that, in the present application, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles, or apparatuses that comprise a series of elements are not limited to those elements, but also include other elements not explicitly listed, or inherent to such processes, methods, articles, or apparatuses. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0380] The above-mentioned sequence numbers of embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0381] The methods disclosed in the several method embodiments of the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0382] The features disclosed in the several product embodiments of the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0383] The features disclosed in the several method or device embodiments of the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.
[0384] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims. Industrial applicability
[0385] Embodiments of the present application provide a coding method, a bitstream, an encoder, a decoder and a storage medium. At a decoding end, a bitstream is decoded, and a first syntax element identification information is determined. In a case where the first syntax element identification information indicates that a filter coefficient of a current color component is skipped, a skip position of the filter coefficient of the current color component and a skip value of the filter coefficient are determined. The filter coefficient of the current color component is determined according to the skip position of the filter coefficient and the skip value of the filter coefficient. A reconstructed block of a current block in a current image is determined according to the filter coefficient. At an encoding end, a filter coefficient of a current color component of a current image is determined. In a case where it is determined to skip the filter coefficient according to the filter coefficient of the current color component, a skip position of the filter coefficient of the current color component and a skip value of the filter coefficient are determined. A first syntax element identification information of the current image is set, and the first syntax element identification information is written into a bitstream. The first syntax element identification information is used to determine whether the filter coefficient of the current color component is skipped. A reconstructed block of a current block in a current image is determined according to the filter coefficient. That is, in the embodiments of the present application, the encoder and the decoder can select to skip the coding of the filter coefficient of the current color component, that is, to skip the transmission of part of the filter coefficient, so that the coding efficiency and the compression performance can be effectively improved.
Claims
1. A decoding method, applied to a decoder, comprising: Decoding the code stream to determine first syntax element identification information; When the first syntax element identification information indicates that the filter coefficient of the current color component is skipped, determining a skip position and a skip value of the filter coefficient corresponding to the current color component; Determining a filter coefficient corresponding to the current color component according to a skip position of the filter coefficient and a skip value of the filter coefficient; A reconstructed block of a current block in a current image is determined according to the filter coefficients.
2. The method according to claim 1, wherein When the representation form of the first syntax element identification information is the first representation form, determining, according to the first syntax element identification information, whether to skip the filter coefficient of the current color component of the current image; In a case where the representation form of the first syntax element identification information is the second representation form, it is determined whether to skip filtering coefficients of a current filter of the current color component of the current image according to the first syntax element identification information.
3. The method according to claim 2, wherein: The determining a skip position of the filter coefficient corresponding to the current color component includes: Decoding the code stream, and determining second syntax element identification information and third syntax element identification information; Determining a skipping start position of the filter coefficient corresponding to the current color component according to the value of the second syntax element identification information; Determining a skipping end position of the filter coefficient corresponding to the current color component according to the value of the third syntax element identification information; The skipping position of the filter coefficient is determined according to the skipping start position of the filter coefficient and the skipping end position of the filter coefficient.
4. The method according to claim 2, wherein: The determining a skip position of the filter coefficient corresponding to the current color component includes: The skipping position of the filter coefficient is determined according to a preset position.
5. The method according to claim 4, wherein The method further comprises: In a case where the current image satisfies a first condition, determining the preset position as a skip position of the filter coefficient; The first condition includes at least one of the following: The height value of the current image is less than or equal to the first value; The height value of the current image is greater than or equal to a second value; The width of the current image is less than or equal to a third value; The width value of the current image is greater than or equal to a fourth value.
6. The method according to any one of claims 1 to 5, wherein: The determining a skip value of the filter coefficient corresponding to the current color component includes: Decoding the code stream to determine fourth syntax element identification information of the current image; Determining an absolute value corresponding to the skip value of the filter coefficient according to the value of the fourth syntax element identification information; When the absolute value is not 0, determining a fifth syntax element identifier of the current image; Determining a sign corresponding to the skip value of the filter coefficient according to the value of the fifth syntax element identification information; A skip value of the filter coefficient is determined according to the absolute value and the sign.
7. The method according to any one of claims 1 to 5, wherein: The determining a skip value of the filter coefficient corresponding to the current color component includes: Decoding the code stream to determine fourth syntax element identification information of the current image; Determining an absolute value corresponding to the skip value of the filter coefficient according to the value of the fourth syntax element identification information; When the absolute value is 0, the skip value of the filter coefficient is determined to be 0.
8. The method according to any one of claims 1 to 3, wherein: The determining a skip value of the filter coefficient corresponding to the current color component includes: The skip value of the filter coefficient is determined according to a preset value.
9. The method according to claim 1, wherein The determining, according to the skip position of the filter coefficient and the skip value of the filter coefficient, the filter coefficient corresponding to the current color component includes: When the position indicated by the filter coefficient index corresponding to the current color component is the same as the skip position of the filter coefficient, setting the skip value of the filter coefficient to the filter coefficient corresponding to the filter coefficient index; In the case where the position indicated by the filter coefficient index corresponding to the current color component is different from the skip position of the filter coefficient, The code stream is decoded to determine the filter coefficient corresponding to the filter coefficient index.
10. The method according to claim 1, wherein The filter coefficient corresponding to the current color component includes a filter coefficient of a cross-component adaptive loop filter CCALF or a filter coefficient of an adaptive loop filter ALF.
11. A coding method, applied to an encoder, comprising: Determining filter coefficients for a current color component of a current image; In a case where it is determined according to the filter coefficient of the current color component that a filter coefficient is skipped, determining a skip position of the filter coefficient corresponding to the current color component and a skip value of the filter coefficient; Setting first syntax element identification information of the current image, and writing the first syntax element identification information into a bitstream; wherein the first syntax element identification information is used to determine whether to skip the filter coefficient of the current color component; A reconstructed block of a current block in a current image is determined according to the filter coefficients.
12. The method according to claim 11, wherein When the representation form of the first syntax element identification information is the first representation form, the first syntax element identification information is used to determine whether to skip the filter coefficient of the current color component of the current image; In a case where the representation form of the first syntax element identification information is the second representation form, the first syntax element identification information is used to determine whether filtering coefficients of a current filter of the current color component of the current image are skipped.
13. The method according to claim 12, wherein: The method further comprises: When there are N filter coefficients with the same value among the filter coefficients of the current color component and N positions corresponding to the N filter coefficients are continuous, it is determined to skip the filter coefficients; wherein N is an integer greater than 0.
14. The method according to claim 13, wherein The determining of the skip position of the filter coefficient corresponding to the current color component and the skip value of the filter coefficient includes: Determining a skip position of the filter coefficient according to the N positions corresponding to the N filter coefficients; The skip value of the filter coefficient is determined according to the values of the N filter coefficients.
15. The method according to claim 14, wherein The method further comprises: determining a skip start position of the filter coefficient corresponding to the current color component according to a starting position among the N positions corresponding to the N filter coefficients, setting second syntax element identification information according to the skip start position, and writing the second syntax element identification information into a bitstream; Determine a skipping end position of the filter coefficient corresponding to the current color component according to an end position among the N positions corresponding to the N filter coefficients, set third syntax element identification information according to the skipping end position, and write the third syntax element identification information into the bitstream.
16. The method according to claim 14, wherein The method further comprises: When the skip value of the filter coefficient is not 0, determining an absolute value corresponding to the skip value of the filter coefficient, setting fourth syntax element identification information according to the absolute value, and writing the fourth syntax element identification information into a bitstream; A sign corresponding to the skip value of the filter coefficient is determined, fifth syntax element identification information is set according to the sign, and the fifth syntax element identification information is written into a bitstream.
17. The method according to claim 14, wherein: The method further comprises: When the skip value of the filter coefficient is 0, fourth syntax element identification information is set, and the fourth syntax element identification information is written into the bitstream.
18. The method according to claim 15, wherein The method further comprises: When there are N filter coefficients having values equal to preset values among the filter coefficients of the current color component, and N positions corresponding to the N filter coefficients are continuous, it is determined to skip the N filter coefficients.
19. The method according to claim 16 or 17, wherein: The method further comprises: In a case where the filter coefficients corresponding to the preset positions in the filter coefficients of the current color component are all the same, it is determined to skip the filter coefficients corresponding to the preset positions.
20. The method according to claim 19, wherein The determining of the skip position of the filter coefficient corresponding to the current color component and the skip value of the filter coefficient includes: Determining the preset position as the skip position of the filter coefficient; The skip value of the filter coefficient is determined according to the value of the filter coefficient corresponding to the preset position.
21. The method according to claim 19, wherein The method further comprises: When a filter coefficient corresponding to a preset position among the filter coefficients of the current color component is a preset value, it is determined to skip the filter coefficient corresponding to the preset position.
22. The method according to claim 18 or 21, wherein The method further comprises: The skip value of the filter coefficient is determined according to the preset value.
23. The method according to claim 20 or 21, wherein The method further comprises: In a case where the current image satisfies a first condition, determining the preset position as a skip position of the filter coefficient; The first condition includes at least one of the following: The height value of the current image is less than or equal to the first value; The height value of the current image is greater than or equal to a second value; The width of the current image is less than or equal to a third value; The width value of the current image is greater than or equal to a fourth value.
24. The method according to claim 11, wherein The method further comprises: When the position indicated by the filter coefficient index corresponding to the current color component is the same as the skip position of the filter coefficient, encoding the filter coefficient corresponding to the filter coefficient index is not performed; In a case where the position indicated by the filter coefficient index corresponding to the current color component is different from the skip position of the filter coefficient, the filter coefficient corresponding to the filter coefficient index is written into the code stream.
25. The method according to claim 11, wherein The filter coefficient corresponding to the current color component includes a CCALF filter coefficient or an ALF filter coefficient.
26. A code stream, the code stream being generated by bit encoding based on information to be encoded; wherein, The information to be encoded includes at least: first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, and fifth syntax element identification information.
27. An encoder, comprising a first determining unit; wherein: The first determining unit is configured to determine a filter coefficient of a current color component of a current image; and when skipping a filter coefficient is determined based on the filter coefficient of the current color component, determine a skip position and a skip value of the filter coefficient corresponding to the current color component; Setting first syntax element identification information of the current image, and writing the first syntax element identification information into a bitstream; wherein the first syntax element identification information is used to determine whether to skip the filter coefficient of the current color component; A reconstructed block of a current block in a current image is determined according to the filter coefficients.
28. An encoder comprising a first memory and a first processor; wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to perform the method according to any one of claims 10 to 25 when running the computer program.
29. A decoder comprising a second determining unit; wherein: The second determination unit is configured to decode the code stream and determine the first syntax element identification information; when the first syntax element identification information indicates that the filter coefficient of the current color component is skipped, determine the skip position of the filter coefficient corresponding to the current color component and the skip value of the filter coefficient; determine the filter coefficient corresponding to the current color component based on the skip position of the filter coefficient and the skip value of the filter coefficient; and determine a reconstructed block of the current block in the current image based on the filter coefficient.
30. A decoder comprising a second memory and a second processor; wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to perform the method according to any one of claims 1 to 10 when running the computer program.
31. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, which, when executed, implements the method according to any one of claims 1 to 10 or any one of claims 10 to 25.
Citation Information
Patent Citations
Video encoding and decoding method and device, and storage medium
CN114097236A
Point cloud encoding and decoding method, encoder, decoder and computer storage medium
CN117223031A
Encoding and decoding method, code stream, encoder, decoder and storage medium
CN117461315A
Video image encoding method and decoding method
WO2012049876A1