WO2023208069A1 - 一种解码、编码方法、装置及其设备 - Google Patents
一种解码、编码方法、装置及其设备 Download PDFInfo
- Publication number
- WO2023208069A1 WO2023208069A1 PCT/CN2023/090956 CN2023090956W WO2023208069A1 WO 2023208069 A1 WO2023208069 A1 WO 2023208069A1 CN 2023090956 W CN2023090956 W CN 2023090956W WO 2023208069 A1 WO2023208069 A1 WO 2023208069A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- current image
- image area
- pixel
- adjustment
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/88—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/11—Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/117—Filters, e.g. for pre-processing or post-processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/80—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
- H04N19/82—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/86—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
Definitions
- the present application relates to the field of coding and decoding technology, and in particular to a decoding and coding method, device and equipment.
- Video images are transmitted after encoding.
- Complete video encoding can include prediction, transformation, quantization, entropy coding, filtering and other processes.
- the prediction process can include intra-frame prediction and inter-frame prediction.
- Inter-frame prediction refers to using the correlation in the video temporal domain to predict the current pixel using pixels adjacent to the encoded image to achieve the purpose of effectively reducing video temporal redundancy.
- Intra-frame prediction refers to using the correlation in the video spatial domain to predict the current pixel using the pixels of the encoded block of the current frame image to achieve the purpose of reducing video spatial domain redundancy.
- Shallow coding is an image coding method characterized by simple prediction. Shallow coding is suitable for scenarios with high real-time requirements, small cache, and high parallelism requirements. However, in the encoding process using shallow coding, larger quantization step sizes often result in larger quantization errors, especially in flat areas. The overall deviation will lead to color blocks, resulting in subjective loss.
- this application provides a decoding and encoding method, device and equipment, which improves encoding performance.
- the present application provides a decoding method, which is applied to the decoding end.
- the method includes: determining whether the reconstruction value of the current image area needs to be adjusted based on the characteristic information corresponding to the current image area; if it is determined that the reconstruction value of the current image area needs to be adjusted.
- the reconstruction value adjustment the adjustment parameters corresponding to the current image area are obtained from the code stream corresponding to the current image area; and the reconstruction value of the current image area is adjusted based on the adjustment parameters.
- the present application provides an encoding method, which is applied to the encoding end.
- the method includes: determining whether the reconstruction value of the current image area needs to be adjusted based on the characteristic information corresponding to the current image area; if it is determined that the reconstruction value of the current image area needs to be adjusted.
- the reconstruction value adjustment is to obtain the adjustment parameters corresponding to the current image area, and the adjustment parameters are used to adjust the reconstruction value of the current image area; the code stream corresponding to the current image area is encoded.
- the adjustment parameters corresponding to the current image area includes: determining whether the reconstruction value of the current image area needs to be adjusted based on the characteristic information corresponding to the current image area; if it is determined that the reconstruction value of the current image area needs to be adjusted.
- the reconstruction value adjustment is to obtain the adjustment parameters corresponding to the current image area, and the adjustment parameters are used to adjust the reconstruction value of the current image area; the code stream corresponding to the current image area is encoded.
- the adjustment parameters corresponding to the current image area is to obtain the
- the present application provides a decoding device.
- the decoding device includes: a memory configured to store video data; a decoder configured to: determine whether it is necessary to modify the current image region based on the characteristic information corresponding to the current image region. Perform reconstruction value adjustment; if it is determined that the reconstruction value adjustment needs to be performed on the current image area, obtain the adjustment parameters corresponding to the current image area from the code stream corresponding to the current image area; based on the adjustment parameters, The reconstruction value of the current image area is adjusted.
- the present application provides an encoding device.
- the encoding device includes: a memory configured to store video data; an encoder configured to: determine whether it is necessary to encode the current image area based on characteristic information corresponding to the current image area. Perform reconstruction value adjustment; if it is determined that the reconstruction value adjustment needs to be performed on the current image area, obtain the adjustment parameters corresponding to the current image area, and the adjustment parameters are used to adjust the reconstruction value of the current image area. ; Encoding the adjustment parameter corresponding to the current image area in the code stream corresponding to the current image area.
- the present application provides a decoding end device, including: a processor and a machine-readable storage medium.
- the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is configured to execute the The machine can execute instructions to implement the above decoding method.
- the present application provides a coding end device, including: a processor and a machine-readable storage medium.
- the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the The machine can execute instructions to implement the encoding method described above.
- the present application provides a machine-readable storage medium on which computer instructions are stored.
- the computer instructions are executed by at least one processor, the above-mentioned decoding method or encoding method is implemented.
- a shallow coding method is proposed, which can be applied to real-time
- the reconstruction value of the current image area can also be adjusted, so that the reconstructed pixels can be closer to the original pixels, bringing about better coding performance and Decoding performance improvement.
- the quantization error is reduced, especially in flat areas, and the color block problem caused by the overall deviation can be reduced, which can reduce subjective loss. That is, the shallow coding method can achieve subjective losslessness and simple hardware implementation.
- FIGS 1A to 1C are schematic diagrams of the working principle of intra prediction mode
- Figures 2A to 2D are schematic diagrams of a shallow coding video coding framework
- Figure 3 is a flow chart of an encoding method in an embodiment of the present application.
- Figure 4 is a flow chart of a decoding method in an embodiment of the present application.
- FIGS 5A to 5D are schematic diagrams of the division of image blocks in an embodiment of the present application.
- FIGS 6A to 6J are schematic diagrams of the division of image blocks in an embodiment of the present application.
- Figure 7A is a hardware structure diagram of a decoding terminal device in an embodiment of the present application.
- Figure 7B is a hardware structure diagram of the encoding end device in an embodiment of the present application.
- the first information may also be called second information.
- the second information may also be called first information, depending on the context.
- the word “if” as used may be interpreted as "when,” or "when,” or "in response to determining.”
- Intra prediction Intra prediction
- inter prediction inter prediction
- IBC Intra Block Copy, intra block copy
- Intra-frame prediction refers to using the pixels of the encoded block of the current image to predict the pixels of the current block based on the correlation in the video spatial domain, in order to achieve the purpose of reducing video spatial redundancy.
- Intra-frame prediction specifies a variety of prediction modes, each prediction mode corresponds to a texture direction (except DC (Direct Current, DC) mode). For example, if the image texture is arranged horizontally, the horizontal prediction mode can be better Predict image information.
- DC Direct Current, DC
- Inter-frame prediction refers to, based on the correlation in the video time domain. Since the video sequence contains strong temporal correlation, using the pixels of adjacent encoded images to predict the pixels of the current image can effectively reduce the video temporal redundancy (temporal redundancy). redundancy) purpose.
- the interframe prediction part of the video coding standard adopts block-based motion compensation technology. The main principle is to find the best matching block in the previously encoded image for each pixel block of the current image. This process is called motion estimation (Motion Estimation). ,ME).
- Intra-frame block copy means that same-frame reference is allowed, and the reference data of the current block comes from the same frame.
- the block vector of the current block can be used to obtain the predicted value of the current block. For example, based on the feature that there are a large number of recurring textures in the same frame in the screen content, the block vector is used to obtain the predicted value of the current block. When predicting values, it can improve the compression efficiency of screen content sequences.
- Prediction pixel refers to the pixel value derived from the encoded and decoded pixels.
- the residual is obtained through the difference between the original pixel and the predicted pixel, and then the residual transformation, quantization and coefficient coding are performed.
- Inter-frame predicted pixels refer to the pixel values of the current block derived from the reference frame. Since the pixel positions are discrete, interpolation operations are required to obtain the final predicted pixels. The closer the predicted pixel is to the original pixel, the smaller the residual energy obtained by subtracting the two, and the higher the coding compression performance.
- Intra prediction mode In intra coding, intra prediction mode is used for motion compensation, that is, intra prediction is used The mode obtains the predicted value of the current block.
- the intra prediction mode is a mode that uses the reconstructed value and predicted value of the current frame for prediction.
- the intra prediction mode may include but is not limited to DC mode, bilinear mode, angle prediction mode (such as horizontal angle prediction mode, vertical angle prediction mode, etc.).
- angle prediction mode such as horizontal angle prediction mode, vertical angle prediction mode, etc.
- angle prediction mode There is no limit to the angle prediction mode, and it can be any angle, such as 33 types. Angle mode or 65 angle modes, etc.), IBC mode, ISC (Intra String Copy, intra-frame string copy) mode, Planar mode, point-by-point prediction mode, etc.
- DC mode and angle prediction mode can be seen in Figure 1A.
- DC mode is suitable for large flat areas.
- the average value of the surrounding pixels of the current block is used as the prediction value of the current block.
- the angle prediction mode points to the current block at a certain angle.
- the values of surrounding pixels are used as the predicted values of the current block.
- a) is a schematic diagram of the DC mode, and the average value of the 16 reference pixels on the upper side of "D" is used as the predicted value of "D".
- b) is a schematic diagram of angle prediction mode 1, indicating that the value of the reference pixel pointed by the angle is used as the prediction value of the current block.
- c) is a schematic diagram of angle prediction mode 2
- d) is a schematic diagram of angle prediction mode 3
- e) is a schematic diagram of angle prediction mode 4
- f) is a schematic diagram of angle prediction mode 5
- g) is a schematic diagram of angle prediction mode 6.
- the bilinear mode is the bilinear interpolation mode, as shown in Figure 1B.
- the prediction process of the bilinear mode is as follows: first generate the predicted value of the lower right corner C position (the weighted average of the upper right corner reference pixel A and the lower left corner reference pixel B), and then generate The predicted value of the right boundary AC position (the weighted average of the predicted values of the upper right corner reference pixel A and the lower right corner C position), and then generates the predicted value of the lower boundary BC position (the weighted average of the lower left corner reference pixel B and the lower right corner C position predicted value) ), the remaining predicted values of other internal pixels (such as the predicted value of the X position) are generated by the weighted average of the predicted values produced by horizontal linear prediction and the predicted values produced by vertical linear prediction.
- the predicted value generated by horizontal linear prediction is the weighted average of the predicted value of the reference pixel L at the corresponding position on the left and the position of the right boundary AC;
- the predicted value generated by vertical linear prediction is the weighted average of the predicted value of the reference pixel T at the corresponding position on the upper side and the position of the lower boundary BC. average.
- Planar mode (or Plane mode) is suitable for areas where pixel values change slowly. It uses two linear filters in the horizontal and vertical directions, and uses the average of the pixels in the two directions as the predicted value of the current block pixel. Planar mode is a gradient mode. Planar mode is an intra-frame prediction mode that uses reference pixels at different positions and different weight parameters to obtain predicted values.
- ISC mode is to arrange the pixels in the current block into several one-dimensional pixel groups in a certain scanning order (generally horizontal raster scanning order or vertical raster scanning order), and each pixel group performs a similar motion estimation method to obtain the prediction of the pixel group. value.
- the point-by-point prediction mode is shown in Figure 1C, which is a schematic diagram of four point-by-point prediction modes for a 16*2 pixel block.
- Figure 1C is a schematic diagram of four point-by-point prediction modes for a 16*2 pixel block.
- ⁇ is used to indicate that the predicted value of the current pixel is obtained by averaging the reconstructed values of the pixels on the left and right sides;
- is used to indicate that the predicted value of the current pixel is obtained by averaging the reconstructed values of the pixels on the upper and lower sides;
- > Used to indicate that the reconstructed value of the left pixel is directly used as the predicted value of the current pixel;
- ⁇ is used to indicate that the reconstructed value of the upper pixel is directly used as the predicted value of the current pixel.
- Rate-Distortion Optimization (RDO) principle There are two major indicators to evaluate coding efficiency: code rate and PSNR (Peak Signal to Noise Ratio, Peak Signal to Noise Ratio). The smaller the bit stream, the greater the compression rate. The larger the PSNR, the better the quality of the reconstructed image.
- SAD refers to the sum of the absolute values of the differences between the reconstructed image block and the source image; ⁇ is the Lagrange multiplier. , R is the actual number of bits required for image block coding in this mode, including the total number of bits required for coding mode information, motion information, residuals, etc.
- Code control Controls the stability of the code rate, generally by adjusting the quantization step size to achieve the purpose of code rate stability.
- Shallow coding is an image coding method characterized by simple prediction. Shallow coding is suitable for application scenarios with high real-time requirements, small cache, and high parallelism requirements.
- the compression efficiency of shallow coding is low, intra-frame prediction can be used, and the compression ratio is low (for example, generally less than 10 times). In the implementation process of shallow coding, it is generally required to be subjectively lossless and simple in hardware implementation.
- Shallow coding video coding framework See Figure 2A, which is a schematic diagram of the video coding framework on the coding side. This video coding framework can be used to implement the processing flow of the coding side in the embodiment of the present application, that is, to implement shallow coding.
- the schematic diagram of the video decoding framework on the decoding end is similar to Figure 2A, and will not be repeated here.
- the video decoding framework can be used to implement the decoding end processing flow of the embodiment of the present application.
- the video coding framework may include modules such as block partitioning, prediction, transformation, quantization, code control, entropy encoder, inverse quantization, inverse transformation, and reconstruction.
- the video decoding framework can include modules such as block partitioning, prediction, transformation, quantization, code control, entropy decoder, inverse quantization, inverse transformation, reconstruction, etc.
- the code control module belonging to the encoding end can also act on the decoding end.
- the video decoding framework can include modules such as block partitioning, prediction, transformation, quantization, entropy decoder, inverse quantization, inverse transformation, and reconstruction. In this case, There is no code control module. On the decoding side, through the cooperation between these modules, the decoding side processing flow can be realized.
- the code control technology is applied to a code control unit.
- the code control unit is the scope of code control, which means that code control operations are performed on the range corresponding to the code control unit.
- the code control unit can be several image blocks, or the code control unit can be several pixel rows, or the code control unit can be the entire Slice, or the code control unit can be several pixel blocks inside the Slice, or the code control unit can be are several pixel rows inside Slice, etc.
- the above are just a few examples of the code control unit, and there is no limitation on the code control unit.
- operations such as prediction, transformation, and quantization can be performed on the pixel blocks in each code control unit.
- the mode selection of the prediction part is participated by the code control. After the pixel block is reconstructed, the reconstruction value adjustment operation can be performed.
- the encoding end may include a prediction processing unit, a residual calculation unit, a transformation processing unit, a quantization unit, an encoding processing unit, an inverse quantization unit (which may also be called an inverse quantization unit), and an inverse transform processing unit (which may also be called an inverse quantization unit). It is an inverse transform processing unit), a reconstruction unit (also called a reconstruction unit) and a filter unit.
- the encoding end may also include a buffer and a decoded image buffer, wherein the buffer is used to cache the reconstructed image blocks output by the reconstruction unit, and the decoded image buffer is used to cache the filtered image blocks output by the filter unit. Image block.
- the input of the encoding end can be an image block of an image (which can be called the image to be encoded).
- the image block can also be called the current block or the block to be encoded.
- the encoding end can also include a segmentation unit (in the figure (not shown), the dividing unit is used to divide the image to be encoded into multiple image blocks.
- the encoding end may encode the plurality of image blocks block by block to complete encoding of the image to be encoded, for example, performing an encoding process on each image block.
- the prediction processing unit is used to receive or obtain image blocks (the current image block to be encoded of the current image to be encoded, which can also be called the current block, and the image block can be understood as the true value of the image block) and reconstructed image data, based on the The relevant data in the reconstructed image data is used to predict the current block and a prediction block of the current block is obtained.
- the prediction processing unit may include an inter prediction unit, an intra prediction unit and a mode selection unit.
- the mode selection unit is used to select an intra prediction mode or an inter prediction mode. If the intra prediction mode is selected, the frame The intra prediction unit performs the prediction process, and if the inter prediction mode is selected, the inter prediction unit may perform the prediction process.
- the residual calculation unit is used to calculate the residual between the true value of the image block and the prediction block of the image block to obtain the residual block.
- the residual calculation unit can subtract the prediction block from the pixel value of the image block pixel by pixel. pixel value.
- the transform processing unit is used to transform the residual block, such as discrete cosine transform (DCT) or discrete sine transform (DST), to obtain transform coefficients in the transform domain.
- DCT discrete cosine transform
- DST discrete sine transform
- the transform coefficients can also be called Transform residual coefficients that can represent the residual block in the transform domain.
- the quantization unit is used to quantize the transform coefficients by applying scalar quantization or vector quantization to obtain a quantized transform system. number, the quantized transform coefficients may also be called quantized residual coefficients.
- the quantization process can reduce the bit depth associated with some or all transform coefficients. For example, n-bit transform coefficients may be rounded down to m-bit transform coefficients during quantization, where n is greater than m.
- the degree of quantization can be modified by adjusting the quantization parameter (QP). For example, with scalar quantization, different scales can be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The appropriate quantization step size can be indicated by the quantization parameter.
- the encoding processing unit is used to encode the above-mentioned quantized residual coefficient and a part of the encoding parameters, output the encoded image data (ie, the encoding result of the current image block to be encoded) and the encoded encoding parameters in the form of an encoded bit stream, and then The encoded bitstream is transmitted to the decoder or stored for later transmission to the decoder or for retrieval.
- the encoding processing unit can also be used to encode other syntax elements of the current image block, such as encoding the prediction mode to the code stream.
- Coding algorithms include but are not limited to variable length coding (VLC) algorithm, context adaptive VLC (context adaptive VLC, CAVLC) algorithm, arithmetic coding algorithm, context adaptive binary arithmetic coding (CABAC) ) algorithm, syntax-based context-adaptive binary arithmetic coding (SBAC) algorithm, probability interval partitioning entropy (PIPE) algorithm.
- VLC variable length coding
- CABAC context adaptive binary arithmetic coding
- SBAC syntax-based context-adaptive binary arithmetic coding
- PIPE probability interval partitioning entropy
- the inverse quantization unit is used to inversely quantize the above-mentioned quantized residual coefficient to obtain the inverse-quantized coefficient.
- the inverse quantization is a reverse application of the above-mentioned quantization unit. For example, based on or using the same quantization step size as the quantization unit, the inverse quantization unit is used to obtain the inverse quantization coefficient.
- the inverse quantized coefficients may also be called inverse quantized residual coefficients.
- the inverse transformation processing unit is used to perform inverse transformation on the above-mentioned inverse quantized coefficients. It should be understood that the inverse transformation is a reverse application of the above-mentioned transformation processing unit.
- the inverse transform may include an inverse discrete cosine transform (IDCT) or an inverse discrete sine transform (IDST) to obtain the inverse transform block in the pixel domain (or sample domain).
- the inverse transform block may also be called an inverse transform inverse quantized block or an inverse transform residual block.
- the reconstruction unit is used to add the inverse transform block (ie, the inverse transform residual block) to the prediction block to obtain the reconstructed block in the sample domain.
- the reconstruction unit may be a summer, for example, the samples of the residual block.
- the values i.e. pixel values
- the reconstructed block output by the reconstruction unit can be subsequently used to predict other image blocks, for example, in intra prediction mode.
- the filter unit (or simply "filter”) is used to filter the reconstructed block to obtain the filtered block, thereby smoothly performing pixel conversion or improving image quality.
- the filter unit may be a loop filter unit, intended to represent one or more loop filters, for example, the filter unit may be a deblocking filter, a sample-adaptive offset (SAO) filter Or other filters, such as bilateral filters, adaptive loop filters (ALF), or sharpening or smoothing filters, or collaborative filters.
- the filtered blocks output by the filtering unit can be subsequently used to predict other image blocks, for example, in inter prediction mode, without limitation.
- FIG. 2C a schematic block diagram of a decoding end (which may also be referred to as a decoder) for implementing an embodiment of the present application is shown.
- the decoder is configured to receive encoded image data (ie, an encoded bitstream, e.g., an encoded bitstream including image blocks and associated syntax elements), eg, encoded by the encoder, to obtain a decoded image.
- the decoder includes a decoding unit, an inverse quantization unit, an inverse transform processing unit, a prediction processing unit, a reconstruction unit, and a filter unit.
- the decoder may perform a decoding process that is generally reciprocal to the encoding process described for the encoder of Figure 2B.
- the decoder may further include a buffer and a decoded image buffer, wherein the buffer is used to cache the reconstructed image block output by the reconstruction unit, and the decoded image buffer is used to cache the filtered image block output by the filter unit. Image block.
- the decoding unit is configured to perform decoding on the encoded image data to obtain quantized transform coefficients and/or decoded encoding parameters (for example, the encoding parameters may include inter prediction parameters, intra prediction parameters, filter parameters, and/or other any one or more of the syntax elements).
- the decoding unit is also configured to forward the decoded encoding parameters to the prediction processing unit, so that the prediction processing unit performs a prediction process according to the encoding parameters.
- the inverse quantization unit may have the same function as the inverse quantization unit of the encoder, for inverse quantizing (i.e., inverse quantizing) the quantized transform decoded by the decoding unit coefficient.
- the function of the inverse transform processing unit may be the same as the function of the inverse transform processing unit of the encoder, and is used to inversely transform the above-mentioned quantized transform coefficients (for example, inverse DCT, inverse integer transform, or a conceptually similar inverse transform process), thereby An inverse transform block (also called an inverse transform residual block) is obtained, which is the residual block of the current image block in the pixel domain.
- An inverse transform block also called an inverse transform residual block
- the prediction processing unit is configured to receive or obtain encoded image data (such as the encoded bit stream of the current image block) and reconstructed image data.
- the prediction processing unit may also receive or obtain prediction related parameters and/or information about the decoding unit from, for example, the decoding unit.
- the information of the selected prediction mode ie, the decoded coding parameters
- the current image block is predicted based on the relevant data in the reconstructed image data and the decoded coding parameters to obtain a prediction block of the current image block.
- the prediction processing unit may include an inter prediction unit, an intra prediction unit and a mode selection unit.
- the mode selection unit is used to select an intra prediction mode or an inter prediction mode. If the intra prediction mode is selected, the frame The intra prediction unit performs the prediction process. If the inter prediction mode is selected, the inter prediction unit performs the prediction process.
- the function of the reconstruction unit can be the same as that of the encoder, and the reconstruction unit is used to add the inverse transform block (i.e., the inverse transform residual block) to the prediction block to perform the transformation in the sample domain.
- the reconstructed block is obtained, for example by adding the sample values of the inverse transform residual block and the sample values of the prediction block.
- the filter unit is used to filter the reconstructed block to obtain a filtered block, which is a decoded image block.
- the processing result for a certain link can also be output to the next link after further processing, for example, in interpolation filtering, motion vector derivation or filtering, etc.
- further operations such as Clip or shift are performed on the processing results of the corresponding link.
- Figure 2D is a schematic flow chart of encoding and/or decoding provided by the embodiment of the present application.
- the encoding and decoding implementation includes process 1 to process 5, and the process 1 to process 5 can be executed by the above-mentioned decoder and/or encoder.
- Process 1 Divide a frame of image into one or more parallel coding units that do not overlap with each other. There is no dependency between the one or more parallel coding units, and they can be independently encoded and decoded completely in parallel, such as the parallel coding unit 1 and the parallel coding unit 2 shown in Figure 2D.
- each parallel coding unit it can be divided into one or more independent coding units that do not overlap with each other.
- the independent coding units may not depend on each other, but they can share some parallel coding unit header information.
- the width of an independent coding unit is w_lcu and the height is h_lcu. If the parallel coding unit is divided into an independent coding unit, the size of the independent coding unit is exactly the same as that of the parallel coding unit; otherwise, the width of the independent coding unit should be greater than the height (unless it is an edge area).
- the independent coding unit can be fixed w_lcu ⁇ h_lcu, w_lcu and h_lcu are both 2 to the N power (N ⁇ 0).
- the size of the independent coding unit is: 128 ⁇ 4, 64 ⁇ 4, 32 ⁇ 4, 16 ⁇ 4, 8 ⁇ 4, 32 ⁇ 2, 16 ⁇ 2 or 8 ⁇ 2 etc.
- the independent coding unit may be fixed 128 ⁇ 4. If the size of the parallel coding unit is 256 ⁇ 8, the parallel coding unit can be equally divided into 4 independent coding units; if the size of the parallel coding unit is 288 ⁇ 10, the parallel coding unit can be divided into: first and second lines. Two 128 ⁇ 4+1 32 ⁇ 4 independent coding units; the third row is two 128 ⁇ 2+1 32 ⁇ 2 independent coding units. It is worth noting that the independent coding unit can include three components of brightness Y, chroma Cb, and chroma Cr, or three components of red (red, R), green (green, G), and blue (blue, B). Or the three components of brightness Y, chroma Co, and chroma Cg can also include only one of them. If the independent coding unit contains three components, the sizes of the three components can be exactly the same or different, depending on the input format of the image.
- each independent coding unit it can be divided into one or more coding units that do not overlap with each other.
- Each coding unit within the independent coding unit can depend on each other. For example, multiple coding units can be pre-coded with mutual reference/ decoding.
- the independent coding unit and the independent coding unit have the same size (that is, the independent coding unit is only divided into one coding unit), then Its size can be all the sizes described in process 2.
- the independent coding unit is divided into multiple non-overlapping coding units, examples of feasible divisions include: horizontal division (the height of the coding unit is the same as the independent coding unit, but the width is different, which can be 1/2, 1/4, 1/8, 1/16, etc.), vertically divided (the width of the coding unit is the same as that of the independent coding unit, but the height is different, which can be 1/2, 1/4, 1/8, 1/16, etc.), horizontal and vertical equal division (quadtree division), etc., preferably horizontal equal division.
- the width of the coding unit is w_cu and the height is h_cu. Its width should be greater than its height (unless it is an edge area).
- the coding unit can be a fixed w_cu ⁇ h_cu, w_cu and h_cu are both 2 N powers (N is greater than or equal to 0), such as 16 ⁇ 4, 8 ⁇ 4, 16 ⁇ 2, 8 ⁇ 2, 8 ⁇ 1 , 4 ⁇ 1, etc.
- the coding unit may be fixed 16 ⁇ 4. If the size of the independent coding unit is 64 ⁇ 4, the independent coding unit can be equally divided into 4 coding units; if the size of the independent coding unit is 72 ⁇ 4, the coding unit can be divided into: 4 16 ⁇ 4+1 8 ⁇ 4.
- the coding unit can include three components of brightness Y, chroma Cb, and chroma Cr (or three components of red R, green G, and blue B, or brightness Y, chroma Co, and chroma Cg), You can also include only one component. If it contains three components, the sizes of the components can be exactly the same or different, depending on the image input format.
- process 3 can be an optional step in the encoding and decoding method, and the encoder/decoder can encode/decode the residual coefficients (or residual values) of the independent coding units obtained in process 2.
- PG non-overlapping prediction groups
- PG is also referred to as Group.
- Each PG is encoded and decoded according to the selected prediction mode to obtain PG.
- the predicted value constitutes the predicted value of the entire coding unit.
- the residual value of the coding unit can be obtained based on the predicted value and original value of the coding unit.
- Process 5 Based on the residual value of the coding unit, group the coding units to obtain one or more non-overlapping residual blocks (RB).
- the residual coefficients of each RB are encoded and decoded according to the selected mode. , forming a residual coefficient stream. Specifically, it can be divided into two categories: transforming the residual coefficients and not transforming them.
- the selected mode of the residual coefficient encoding and decoding method in process 5 may include but is not limited to any of the following: semi-fixed length encoding method, exponential Golomb encoding method, Golomb-Rice encoding method, truncated unary code encoding method, run-length encoding method, direct encoding of the original residual value, etc.
- the encoder may directly encode the coefficients within the RB.
- the encoder can also transform the residual block, such as DCT, DST, Hadamard transform, etc., and then encode the transformed coefficients.
- the encoder can directly quantize each coefficient in the RB uniformly, and then perform binary encoding.
- the RB can be further divided into multiple coefficient groups (CG), and then each CG is uniformly quantized and then binary encoded.
- CG coefficient group
- QG quantization group
- the coefficient group and the quantization group may be the same.
- the coefficient group and the quantization group may also be different.
- the maximum value of the absolute value of the residual within an RB block is defined as the modified maximum (mm).
- the number of coded bits of the residual coefficient in the RB block is determined (the number of coded bits of the residual coefficient in the same RB block is consistent). For example, if the critical limit (CL) of the current RB block is 2 and the current residual coefficient is 1, then 2 bits are needed to encode the residual coefficient 1, which is expressed as 01. If the CL of the current RB block is 7, it means encoding an 8-bit residual coefficient and a 1-bit sign bit.
- the determination of CL is to find the minimum T value that satisfies all residuals of the current sub-block to be within the range of [-2 ⁇ (T-1), 2 ⁇ (T-1)]. If there are two boundary values -2 ⁇ (T-1) and 2 ⁇ (T-1) at the same time, T increases by 1, that is, T+1 bits are needed to encode all the residuals of the current RB block; if there is only -2 One of the two boundary values ⁇ (T-1) and 2 ⁇ (T-1), then encode a Trailing bit to determine whether the boundary value is -2 ⁇ (T-1) or 2 ⁇ (T-1); If any of -2 ⁇ (T-1) and 2 ⁇ (T-1) does not exist in all residuals, there is no need to encode the Trailing bit. For some special cases, the encoder can directly encode the original value of the image instead of the residual value.
- shallow coding is an image coding method characterized by simple prediction.
- Shallow coding is suitable for scenarios with high real-time requirements, small cache, and high parallelism requirements.
- larger quantization step sizes often result in larger quantization errors.
- the overall deviation will lead to color blocks, resulting in subjective loss.
- the subjective loss in this application means that the human eye can detect the difference between the reconstructed image and the source image. This can be determined by alternately playing the reconstructed image and the source image at a specific frequency (for example, 8Hz) at a suitable observation distance. .
- the embodiment of this application proposes a shallow coding filtering method, which can be applied to scenarios with high real-time requirements, small cache, and high parallelism requirements.
- the current image After obtaining the reconstruction value of the current image area, the current image can be The reconstruction value of the region is adjusted to make the reconstructed pixels closer to the original pixels, thereby improving the encoding performance and decoding performance.
- the quantization error is reduced, especially in flat areas, and the color block problem caused by the overall deviation is reduced, which can reduce subjective loss and improve subjective performance.
- subjective losslessness and hardware implementation can be achieved Simple.
- Embodiment 1 An encoding method is proposed in the embodiment of this application. See Figure 3, which is a schematic flow chart of the encoding method. The method can be applied to the encoding end (also called a video encoder). The method can include :
- Step 301 Determine whether the reconstruction value of the current image area needs to be adjusted based on the characteristic information corresponding to the current image area.
- an explicit method can be used to determine whether the reconstruction value of the current image area needs to be adjusted.
- the feature information involved in the explicit method is called the first type of feature information.
- the first type of feature information corresponding to the current image area can be obtained. If the first type of feature information corresponding to the current image area meets a specific condition (such as a first specific condition), it is determined whether the reconstruction value of the current image area needs to be adjusted. And based on the determination result, a flag bit corresponding to the adjustment control switch is encoded in the code stream corresponding to the current image area. The flag bit is used to indicate whether the reconstruction value adjustment of the current image area needs to be performed. If the first type of feature information corresponding to the current image area does not meet specific conditions, it is determined that there is no need to adjust the reconstruction value of the current image area, and the mark bit corresponding to the adjustment control switch is not encoded in the code stream corresponding to the current image area.
- a specific condition such as a first specific condition
- the mark bit corresponding to the adjustment control switch is encoded in the code stream corresponding to the current image area, and the mark bit is the third One value
- the first value indicates that the reconstruction value of the current image area needs to be adjusted. If it is determined that there is no need to adjust the reconstruction value of the current image area, the mark bit corresponding to the adjustment control switch is encoded in the code stream corresponding to the current image area, and the mark bit is the second value, and the second value indicates that it is not necessary. Adjust the reconstruction value of the current image area.
- the first value and the second value can be configured according to experience, and there is no restriction on this. For example, the first value is 1 and the second value is 0.
- the current image area may include one image block, or the current image area may include multiple consecutive image blocks.
- the code stream corresponding to the current image area refers to: the code stream related to the current image area, that is, the code stream contains information for processing the current image area. There is no restriction on the code stream corresponding to the current image area.
- the first type of feature information corresponding to the current image area may include but is not limited to at least one of the following: prediction mode; data amount in the code stream buffer; quantization step size. Based on this, if the first type of feature information includes a prediction mode, when the prediction mode corresponding to the current image area is the specified prediction mode, it is determined that the prediction mode satisfies the specific condition; otherwise, it is determined that the prediction mode does not satisfy the specific condition. If the first type of characteristic information includes the amount of data in the code stream buffer, when the amount of data in the code stream buffer is within the preset data amount interval, it is determined that the amount of data in the code stream buffer meets specific conditions; otherwise, it is determined The amount of data in the stream buffer does not meet certain conditions.
- the first type of feature information includes a quantization step size
- the quantization step size corresponding to the current image area is within the preset step size interval, it is determined that the quantization step size satisfies the specific condition; otherwise, it is determined that the quantization step size does not meet the specific condition.
- the prediction mode corresponding to the current image area is determined when the prediction mode meets specific conditions and the amount of data in the code stream buffer also meets specific conditions.
- the first type of feature information satisfies the specific condition; otherwise, it is determined that the first type of feature information corresponding to the current image area does not meet the specific condition.
- the first type of feature information includes the quantization step size and the amount of data in the code stream buffer, then When the step size meets specific conditions and the amount of data in the code stream buffer also meets specific conditions, it is determined that the first type of feature information corresponding to the current image area meets the specific conditions. Otherwise, the first type of feature information corresponding to the current image area is determined.
- the information does not meet certain criteria. Or, if the first type of feature information includes a prediction mode and a quantization step size, then it is determined that the first type of feature information corresponding to the current image area meets the specific conditions only when the prediction mode meets specific conditions and the quantization step size also meets specific conditions. , otherwise, it is determined that the first type of feature information corresponding to the current image area does not meet specific conditions.
- the first type of feature information includes prediction mode, the amount of data in the code stream buffer, and the quantization step size
- the prediction mode meets specific conditions
- the amount of data in the code stream buffer meets specific conditions
- the quantization step size Only when the specific conditions are met, it is determined that the first type of feature information corresponding to the current image area satisfies the specific conditions; otherwise, it is determined that the first type of feature information corresponding to the current image area does not meet the specific conditions.
- this first type of characteristic information is not limited in this embodiment.
- the specified prediction mode may be one or more of the common intra prediction modes.
- the common intra prediction mode includes DC mode; or the common intra prediction mode includes DC mode, horizontal prediction mode and vertical prediction mode; or the common intra prediction mode includes DC mode and angle prediction mode; or the common intra prediction mode Prediction modes include DC mode, angle prediction mode and Planar mode; alternatively, ordinary intra prediction modes include DC mode, angle prediction mode and bilinear mode; alternatively, ordinary intra prediction modes include DC mode, angle prediction mode, Planar mode and bilinear mode model.
- an implicit method can be used to determine whether the reconstruction value of the current image area needs to be adjusted.
- the feature information involved in the implicit method is called the second type of feature information.
- the second type of feature information corresponding to the current image area For example, obtain the second type of feature information corresponding to the current image area. If the second type of feature information corresponding to the current image area satisfies a specific condition (such as a second specific condition), it is determined that the reconstruction value of the current image area needs to be adjusted. If the current If the second type of feature information corresponding to the image area does not meet specific conditions, it is determined that there is no need to adjust the reconstruction value of the current image area.
- a specific condition such as a second specific condition
- Step 302 If it is determined that the reconstruction value of the current image area needs to be adjusted, the adjustment parameters corresponding to the current image area are obtained, where the adjustment parameters are used to adjust the reconstruction value of the current image area.
- Step 303 Encode the adjustment parameters corresponding to the current image area in the code stream corresponding to the current image area.
- the adjustment parameters corresponding to the current image area include multiple adjustment values
- all or part of the adjustment values ie, some of the multiple adjustment values may be encoded in the code stream corresponding to the current image area.
- encoding all the adjustment values or part of the adjustment values in the code stream corresponding to the current image area may include but is not limited to: sorting the multiple adjustment values according to the encoding order of the multiple adjustment values, and sequentially traversing the multiple adjustment values based on the sorting results.
- the adjustment value for the current traversed adjustment value, if after encoding the adjustment value in the code stream corresponding to the current image area, the current code rate is less than the preset code rate value, then the adjustment value will be encoded in the code stream corresponding to the current image area, And continue to traverse the next adjustment value of the adjustment value, that is, use the next adjustment value as the current traversal adjustment value; otherwise, it is prohibited to encode the adjustment value in the code stream corresponding to the current image area, and stop traversing the adjustment value the next adjustment value.
- the current image area may correspond to multiple pixel groups, and the adjustment parameters corresponding to the current image area may include multiple adjustment values.
- the multiple adjustment values may include adjustment values corresponding to K pixel groups, and the K pixel groups may be all pixel groups or part of the pixel groups in multiple pixel groups (that is, all pixel groups in the current image area).
- M adjustment values corresponding to K pixel groups can be encoded in the code stream corresponding to the current image area.
- M can be a positive integer, M can be less than or equal to K, and the M adjustment values can be based on K The adjustment value corresponding to the pixel group is determined.
- adjustment value grouping indication information may also be encoded in the code stream corresponding to the current image area, and the adjustment value grouping indication information is used to indicate the matching relationship between the M adjustment values and the K pixel groups.
- the adjustment value grouping indication information may be a fourth value.
- the fourth value indicates that K pixel groups correspond to the same adjustment value; if K pixel groups correspond to K adjustment values, the adjustment value grouping indication information may be a fifth value, and the fifth value may indicate that K pixel groups correspond to K adjustment values.
- the encoding end can also encode the pixel group indication information corresponding to the K pixel groups in the code stream corresponding to the current image area, indicating the current image area.
- the corresponding code stream carries the adjustment value of the pixel group corresponding to the pixel group indication information.
- the encoding end may not encode the pixel group indication information corresponding to the pixel group in the code stream corresponding to the current image area, indicating that the pixel group indication information carried in the code stream corresponding to the current image area It is the adjustment value of all pixel groups.
- the pixel group indication information is used to distinguish the pixel group of the target category among the pixel groups of all categories, that is, to distinguish the pixel group from all the pixel groups. Out of K pixel groups.
- the adjustment value corresponding to the pixel group may include the adjustment value of multiple channels or a single channel corresponding to the pixel group.
- the multiple channels or A single channel may include at least one of the following channels: Y channel, U channel, V channel, Co channel, Cg channel, R channel, G channel, B channel, alpha channel, IR channel, D channel, W channel.
- multiple channels include Y channel, U channel, V channel, or multiple channels include R channel, G channel, and B channel, or multiple channels include R channel, G channel, B channel, and alpha channel
- the multiple channels may include R channel, G channel, B channel, and IR channel
- the multiple channels may include R channel, G channel, B channel, and W channel
- the multiple channels may include R channel, G channel, B channel.
- channel, IR channel, W channel, or the multiple channels include R channel, G channel, B channel, and D channel
- the multiple channels may include R channel, G channel, B channel, D channel, and W channel.
- RGB color photosensitive channels there may also be IR channels (infrared or near-infrared photosensitive channels), D channels (dark light channels, mainly through infrared light or near-infrared light), and W channels (full-color photosensitive channels).
- the sensors have different channels, for example, the sensor type can be RGB sensor, RGBIR sensor, RGBW sensor, RGBIRW sensor, RGBD sensor, RGBDW sensor, etc.
- the current image area corresponds to multiple pixel groups, which may include but is not limited to the following methods: determine the multiple pixel groups corresponding to the current image area based on the pre-adjusted reconstruction value of each pixel point; or, based on the surrounding pixel points of the pixel point
- the pre-adjusted reconstruction value determines the classification value of the pixel, and determines the multiple pixel groups corresponding to the current image area according to the classification value of each pixel point; or, determines the multiple pixel groups corresponding to the current image area according to the pixel position of each pixel point.
- the number of divisions, filtering areas and division methods of the pixel groups can be determined according to the prediction mode of the current image area; based on the number of divisions, the filtering The area and the division method determine the multiple pixel groups corresponding to the current image area.
- the prediction mode of the current image area is the horizontal prediction mode
- it is determined that the number of divisions of the pixel group is the first division number
- it is determined that the filtering area of the pixel group is the first filtering area
- it is determined that the dividing method is the first size specification
- the prediction mode of the current image area is not the horizontal prediction mode
- it is determined that the number of divisions of the pixel group is the second division number
- the filtering area of the pixel group is determined to be the second filtering area
- the dividing method is determined to be the second size specification.
- the current image area is a 16*2 image block (i.e. one image block)
- the prediction mode of the current image area is the horizontal prediction mode
- the current image area will be All pixels are divided into 4 pixel groups, and the size of each pixel group is 8*1; or, all pixels in the current image area are divided into 2 pixel groups, and the size of each pixel group is 16*1.
- the prediction mode of the current image area is not the horizontal prediction mode, all pixels in the current image area are divided into 4 pixel groups, and the size of each pixel group is 4*2.
- the current image area is a 16*2 image block
- all pixels in the current image area can also be directly divided into 4 pixel groups, and the size of each pixel group is 4*2, regardless of Prediction mode for the current image area.
- the value range of the adjustment value may be determined based on the quantization step size.
- the above execution sequence is only an example given for convenience of description. In actual applications, it can also be changed. There is no restriction on the execution order between the steps. Moreover, in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification, and the method may include more or fewer steps than described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.
- a shallow coding method is proposed, which can be applied to scenarios with high real-time requirements, small cache, and high parallelism requirements.
- After obtaining the reconstruction value of the current image area it can also The reconstruction value of the current image area is adjusted to make the reconstructed pixels closer to the original pixels, which improves the encoding performance and decoding performance.
- the quantization error is reduced, especially in flat areas, and the color block problem caused by the overall deviation can be reduced, which can reduce subjective loss. That is, the shallow coding method can achieve subjective losslessness and simple hardware implementation.
- Embodiment 2 The embodiment of this application proposes a decoding method. See Figure 4, which is a schematic flow chart of the decoding method. The method can be applied to the decoding end (also called a video decoder). The method can include :
- Step 401 Determine whether the reconstruction value of the current image area needs to be adjusted based on the feature information corresponding to the current image area.
- an explicit method can be used to determine whether the reconstruction value of the current image area needs to be adjusted.
- the feature information involved in the explicit method is called the first type of feature information.
- the first type of feature information corresponding to the current image area can be obtained. If the first type of feature information corresponding to the current image area meets a specific condition (such as a first specific condition), the adjustment can be obtained from the code stream corresponding to the current image area. Control the flag bit corresponding to the switch, and determine whether the reconstruction value of the current image area needs to be adjusted based on the flag bit. Wherein, if the flag bit has a first value, it can be determined that the reconstruction value adjustment of the current image area needs to be performed; if the flag bit has a second value, it can be determined that the reconstruction value adjustment of the current image area does not need to be performed.
- a specific condition such as a first specific condition
- the first type of feature information corresponding to the current image area does not meet specific conditions, it can be directly determined that there is no need to adjust the reconstruction value of the current image area, and there is no need to obtain the adjustment control switch correspondence from the code stream corresponding to the current image area. mark bit.
- the current image area may include one image block, or the current image area may include multiple consecutive image blocks.
- the code stream corresponding to the current image area refers to: the code stream related to the current image area, that is, the code stream contains information for processing the current image area. There is no restriction on the code stream corresponding to the current image area.
- the first type of feature information corresponding to the current image area may include but is not limited to at least one of the following: prediction mode; data amount in the code stream buffer; quantization step size. Based on this, if the first type of feature information includes a prediction mode, when the prediction mode corresponding to the current image area is the specified prediction mode, it is determined that the prediction mode satisfies the specific condition; otherwise, it is determined that the prediction mode does not satisfy the specific condition. If the first type of characteristic information includes the amount of data in the code stream buffer, when the amount of data in the code stream buffer is within the preset data amount interval, it is determined that the amount of data in the code stream buffer meets specific conditions; otherwise, it is determined The amount of data in the stream buffer does not meet certain conditions.
- the first type of feature information includes a quantization step size
- the quantization step size corresponding to the current image area is within the preset step size interval, it is determined that the quantization step size satisfies the specific condition; otherwise, it is determined that the quantization step size does not meet the specific condition.
- the specified prediction mode may be one or more of the common intra prediction modes; wherein: the common intra prediction mode includes the DC mode; or the common intra prediction mode includes the DC mode, the horizontal prediction mode and the Vertical prediction mode; Or, the common intra prediction mode includes DC mode and angle prediction mode; Or, the common intra prediction mode includes DC mode, angle prediction mode and Planar mode; Or, the common intra prediction mode includes DC mode, angle prediction mode and bilinear mode; alternatively, common intra prediction modes include DC mode, angle prediction mode, Planar mode and bilinear mode.
- an implicit method can be used to determine whether the reconstruction value of the current image area needs to be adjusted.
- the feature information involved in the implicit method is called the second type of feature information.
- the second type of feature information corresponding to the current image area is obtained. If the second type of feature information corresponding to the current image area meets a specific condition (such as a second specific condition), it is determined that the reconstruction value of the current image area needs to be adjusted, If the second type of feature information corresponding to the current image area does not meet specific conditions, it is determined that there is no need to adjust the reconstruction value of the current image area.
- a specific condition such as a second specific condition
- Step 402 If it is determined that the reconstruction value of the current image area needs to be adjusted, the adjustment parameters corresponding to the current image area are obtained from the code stream corresponding to the current image area, and the adjustment parameters are used to adjust the reconstruction value.
- Step 403 Adjust the reconstruction value of the current image area based on the adjustment parameter.
- the adjustment parameters corresponding to the current image area may include multiple adjustment values
- the current image area may correspond to multiple pixel groups
- the multiple adjustment values may include adjustment values corresponding to K pixel groups.
- a pixel group may be all or part of multiple pixel groups.
- adjusting the reconstruction value of the current image area based on the adjustment parameter may include but is not limited to: adjusting the reconstruction value of the pixel points in the K pixel group based on multiple adjustment values.
- K Can be a positive integer greater than or equal to 1.
- adjusting the reconstruction values of the pixels in the K pixel groups based on multiple adjustment values may include but is not limited to the following methods: for each pixel group in the K pixel groups, if the multiple adjustment values include the pixel The adjustment value corresponding to the pixel group is adjusted based on the adjustment value corresponding to the pixel group, and the reconstruction value of each pixel point in the pixel group is adjusted to obtain the adjusted reconstruction value of each pixel point in the pixel group.
- the decoder can also obtain the pixel group indication information corresponding to the K pixel groups from the code stream corresponding to the current image area; based on the pixel group
- the instruction information selects K pixel groups from all pixel groups and associates multiple adjustment values with the K pixel groups. In this way, the reconstruction values of the pixels in the K pixel groups can be adjusted based on the multiple adjustment values. , that is, only the reconstruction values of pixels within K pixel groups are adjusted.
- the pixel group indication information is used to distinguish the pixel group of the target category among the pixel groups of all categories, that is, to distinguish the pixel group from all the pixel groups. Out of K pixel groups.
- the adjustment value corresponding to the pixel group may include the adjustment values of multiple channels corresponding to the pixel group, and the multiple channels may include at least one of the following channels: Y channel, U channel, V channel , R channel, G channel, B channel, alpha channel, IR channel, D channel, W channel.
- multiple channels include Y channel, U channel, and V channel, or multiple channels include R channel, G channel, and B channel, or multiple channels include R channel, G channel, B channel, and alpha channel
- the multiple channels may include R channel, G channel, B channel, and IR channel
- the multiple channels may include R channel, G channel, B channel, and W channel
- the multiple channels may include R channel, G channel , B channel, IR channel, W channel
- the multiple channels may include R channel, G channel, B channel, D channel
- the multiple channels may include R channel, G channel, B channel, D channel, W channel.
- the adjustment value grouping indication information can also be obtained from the code stream corresponding to the current image area.
- the adjustment value grouping indication information is used to indicate the mapping relationship between the adjustment value and the K pixel groups; based on the adjustment value grouping indication information M adjustment values are parsed from the code stream corresponding to the current image area, M is a positive integer, and M is less than or equal to K; the adjustment values corresponding to the K pixel groups can be determined based on the M adjustment values. For example, if the adjustment value grouping indication information is the fourth value, then M is 1. In this case, the decoder can determine that K pixel groups correspond to one adjustment value; if the adjustment value grouping indication information is the fifth value , then M is K. In this case, the decoding end can determine that K pixel groups correspond to K adjustment values.
- parsing the M adjustment values from the code stream corresponding to the current image area may include: for each channel, parsing the code stream corresponding to the channel from the code stream corresponding to the current image area.
- One or more adjustment values may be included in the code stream corresponding to the current image area.
- the current image area corresponds to multiple pixel groups, which may include but is not limited to: determining the multiple pixel groups corresponding to the current image area according to the pre-adjusted reconstruction value of each pixel point; or, based on the adjustment of surrounding pixel points of the pixel point
- the pre-reconstruction value determines the classification value of the pixel, and multiple pixel groups corresponding to the current image area are determined according to the classification value of each pixel point; or, multiple pixel groups corresponding to the current image area are determined according to the pixel position of each pixel point; or , Multiple pixel groups corresponding to the current image area are determined according to the prediction mode of the current image area; or multiple pixel groups corresponding to the current image area are determined according to the scanning order of the current image area.
- the above methods are only examples and are not limited thereto.
- the number of divisions, filtering areas and division methods of the pixel group can be determined according to the prediction mode of the current image area; then, based on the number of divisions, The filter area and the dividing method determine multiple pixel groups corresponding to the current image area.
- determining the division number, filtering area and division method of the pixel group according to the prediction mode of the current image area may include: if the prediction mode of the current image area is the horizontal prediction mode, determining the division number of the pixel group to be the first division number , determine that the filter area of the pixel group is the first filter area, determine the division method is the first size specification; if the prediction mode of the current image area is not the horizontal prediction mode, determine the division number of the pixel group is the second division number, determine the pixel group The filtering area is the second filtering area, and the determined dividing method is the second size specification.
- the current image area is a 16*2 image block (i.e. one image block)
- the prediction mode of the current image area is the horizontal prediction mode
- the current image area will be All pixels are divided into 4 pixel groups, and the size of each pixel group is 8*1; or, all pixels in the current image area are divided into 2 pixel groups, and the size of each pixel group is 16*1.
- the prediction mode of the current image area is not the horizontal prediction mode, all pixels in the current image area are divided into 4 pixel groups, and the size of each pixel group is 4*2.
- the current image area is a 16*2 image block
- all pixels in the current image area can also be directly divided into 4 pixel groups, and the size of each pixel group is 4*2, regardless of Prediction mode for the current image area.
- the value range of the adjustment value may be determined based on the quantization step size.
- a shallow coding method is proposed, which can be applied to scenarios with high real-time requirements, small cache, and high parallelism requirements.
- After obtaining the reconstruction value of the current image area it can also The reconstruction value of the current image area is adjusted to make the reconstructed pixels closer to the original pixels, which improves the encoding performance and decoding performance.
- the quantization error is reduced, especially in flat areas, and the color block problem caused by the overall deviation can be reduced, which can reduce subjective loss. That is, the shallow coding method can achieve subjective losslessness and simple hardware implementation.
- Embodiment 3 For Embodiment 1 and Embodiment 2, it can be determined whether the reconstruction value needs to be adjusted for the current image area. For example, for the encoding end, after encoding the code stream of N encoding blocks (N ⁇ 1), the encoding end can record P encoding blocks (P ⁇ N) among them as the current image area, and can determine whether it is needed. Adjust the reconstruction value of the current image area. For the decoding end, after parsing the code stream of N decoding blocks (N ⁇ 1), the decoding end can record the P decoding blocks (corresponding to the P encoding blocks on the encoding end) as the current image area, and can determine Whether it is necessary to adjust the reconstruction value of the current image area.
- the predicted value of the current image area needs to be adjusted. That is to say, the predicted value of the current image area can be adjusted based on the adjustment parameters corresponding to the current image area.
- the predicted value adjustment process and the reconstruction value adjustment process Similar details will not be described again in this embodiment.
- the residual value adjustment process is the same as the reconstruction. The value adjustment process is similar and will not be described again in this embodiment.
- Explicit syntax method The encoding end encodes the mark bit corresponding to the adjustment control switch in the code stream, and the decoder parses the mark bit corresponding to the adjustment control switch from the code stream, and determines whether the reconstruction value adjustment of the current image area needs to be based on the mark bit. .
- This process may include:
- Step S11 The encoding end determines whether the first type of feature information corresponding to the current image area meets the first specific condition.
- step S12 may be performed, and if yes, step S13 may be performed.
- the first type of feature information corresponding to the current image area may include but is not limited to at least one of the following: prediction mode; data amount in the code stream buffer; quantization step size.
- prediction mode the prediction mode
- data amount in the code stream buffer the quantization step size
- the first type of feature information may include prediction modes.
- the prediction mode corresponding to the current image area is the specified prediction mode, it can be determined that the first type of feature information satisfies the first specific condition; otherwise, when the prediction mode corresponding to the current image area is not the specified prediction mode, it can be determined that the first type of feature information The first specific condition is not met.
- the first type of characteristic information may include the amount of data in the code stream buffer. When the amount of data in the code stream buffer is within the preset data amount interval, it can be determined that the first type of characteristic information satisfies the first specific condition; otherwise, when the amount of data in the code stream buffer is not within the preset data amount interval, It can be determined that the first type of characteristic information does not satisfy the first specific condition.
- the preset data volume interval [a1, a2] can be configured in advance, a1 is used to represent the minimum value of the data volume, and a2 is used to represent the maximum value of the data volume. Both a1 and a2 can be configured based on experience, and there is no restriction on this. .
- the data amount in the code stream buffer is greater than or equal to a1, and the data amount in the code stream buffer is less than or equal to a2, then the data amount in the code stream buffer is within the preset data amount interval. If the data amount in the code stream buffer is less than a1, or if the data amount in the code stream buffer is greater than a2, the data amount in the code stream buffer is not within the preset data amount range.
- the amount of data in the code stream buffer is within the preset data amount interval, that is, the amount of data in the code stream buffer is less than or equal to a2
- filtering is performed on the current image area (shown in Figure 1
- overflow will not be triggered after adding filter parameters, that is, it will not cause the code stream buffer to exceed the buffer limit.
- the first type of feature information may include quantization step size.
- the quantization step corresponding to the current image area is within the preset step interval, it can be determined that the first type of feature information satisfies the first specific condition; otherwise, when the quantization step corresponding to the current image area is not within the preset step interval, It can be determined that the first type of characteristic information does not satisfy the first specific condition.
- the preset step interval [b1, b2] can be configured in advance, b1 is used to represent the minimum value of the step, and b2 is used to represent the maximum value of the step. Both b1 and b2 can be configured based on experience, and there is no restriction on this. . If the quantization step corresponding to the current image area is greater than or equal to b1, and the quantization step corresponding to the current image area is less than or equal to b2, then the quantization step corresponding to the current image area is located in the preset step interval. If the quantization step corresponding to the current image area is less than b1, or if the quantization step corresponding to the current image area is greater than b2, then the quantization step corresponding to the current image area is not within the preset step interval.
- the preset step interval can ensure that it does not affect the The subjective quantization step size is not adjusted.
- b1 when configuring the value of b1, b1 can be configured based on experience, and there is no restriction on this.
- b1 can be determined based on the input bit width of the current image area. The greater the input bit width of the current image area, the greater the value of b1. For example, when the input bit width of the current image area is 8 bits, the value of b1 can be 16. When the input bit width of the current image area is 10 bits, the value of b1 can be 24. When the input bit width of the current image area is 10 bits, the value of b1 can be 24. When it is 12bit, the value of b1 can be 32.
- the above is just an example of the relationship between the input bit width and the minimum step size b1, and there is no limit to the minimum step size b1.
- the quantization step size is greater than or equal to b1, that is, it meets the minimum value requirement of the preset step interval: for 8bit, QP ⁇ 16; for 10bit, QP ⁇ 24; for 12bit, QP ⁇ 32.
- b2 when configuring the value of b2, b2 can be configured based on experience, and there is no restriction on this.
- b2 can be an infinite value; b2 can also be a fixed value, such as 48, 60, 76, etc.
- the first type of feature information may include the prediction mode and the amount of data in the code stream buffer.
- the prediction mode corresponding to the current image area is the specified prediction mode and the data amount in the code stream buffer is within the preset data amount interval. It can be determined that the first type of feature information satisfies the first specific condition; otherwise, when the prediction mode corresponding to the current image area is not the specified prediction mode, and/or the data amount in the code stream buffer is not within the preset data amount interval, it is determined The first type of characteristic information does not satisfy the first specific condition.
- the first type of feature information may include prediction mode and quantization step size.
- the prediction mode corresponding to the current image area is the specified prediction mode, and the quantization step corresponding to the current image area is within the preset step interval, it can be determined that the first type of feature information satisfies the first specific condition; otherwise, the corresponding quantization step of the current image area is The prediction mode is not the specified prediction mode, and/or, when the quantization step size corresponding to the current image area is not within the preset step size interval, it is determined that the first type of feature information does not meet the first specific condition.
- the first type of feature information may include the quantization step size and the amount of data in the code stream buffer.
- the quantization step corresponding to the current image area is within the preset step interval, and the data amount in the code stream buffer is within the preset data amount interval, it is determined that the first type of feature information satisfies the first specific condition; otherwise, in the current image
- the quantization step corresponding to the region is not within the preset step interval, and/or the data amount in the code stream buffer is not within the preset data amount interval, it is determined that the first type of characteristic information does not meet the first specific condition.
- the first type of feature information may include the prediction mode, the amount of data in the code stream buffer and the quantization step size.
- the prediction mode corresponding to the current image area is the specified prediction mode
- the data amount in the code stream buffer is within the preset data amount interval
- the quantization step corresponding to the current image area is within the preset step interval
- the first type is determined
- the feature information satisfies the first specific condition; otherwise, the prediction mode corresponding to the current image area is not the specified prediction mode, and/or, the data amount in the code stream buffer is not within the preset data amount interval, and/or, the current image area
- the corresponding quantization step size is not within the preset step size interval
- it is determined that the first type of feature information does not meet the first specific condition, that is, as long as one of the features does not satisfy it, it is determined that the first type of feature information does not meet the first specific condition.
- the specified prediction mode may be one or more of the common intra prediction modes.
- the specified prediction mode may also be a point-by-point prediction mode.
- the normal intra prediction mode and the point-by-point prediction mode are just examples and are not limited thereto.
- the preset step interval can also be set based on the specified prediction mode, such as setting the minimum value of the preset step interval based on the specified prediction mode.
- the ordinary intra prediction mode can correspond to the first minimum value of the preset step interval, that is, the value of b1 can be the first minimum value
- the point-by-point prediction mode can correspond to the second minimum value of the preset step interval, That is, the value of b1 can be the second minimum value.
- the first minimum value can be greater than the second minimum value, and the first minimum value can also be less than the second minimum value.
- the minimum value of the preset step interval can be related to the specified prediction mode.
- Normal intra prediction modes may include DC modes.
- the normal intra prediction mode may include DC mode, horizontal prediction mode, and vertical prediction mode.
- the normal intra prediction mode may include DC mode and angle prediction modes (such as horizontal prediction mode, vertical prediction mode and other angle prediction modes).
- the normal intra prediction mode may include DC mode, angle prediction mode, and Planar mode.
- the normal intra prediction mode may include DC mode, angle prediction mode, and bilinear mode.
- the common intra prediction mode may include DC mode, angle prediction mode, Planar mode, and bilinear mode.
- the above are just examples of common intra prediction modes, and are not limited thereto. Based on each of the above common intra prediction modes, other types of intra prediction modes can also be used as common intra prediction modes.
- Step S12 If the first type of feature information does not meet the first specific condition, the encoding end determines that there is no need to adjust the reconstruction value of the current image area, and does not encode the mark bit corresponding to the adjustment control switch in the code stream corresponding to the current image area.
- Step S13 If the first type of feature information meets the first specific condition, the encoding end determines whether the reconstruction value needs to be adjusted for the current image area, and encodes the mark corresponding to the adjustment control switch in the code stream corresponding to the current image area. Bit.
- the encoding end may determine whether the reconstruction value of the current image area needs to be adjusted, and there is no limit to the determination method. For example, the encoding end calculates the cost value of starting the reconstruction value adjustment of the current image area, recorded as the first-generation value, and calculates the cost value of turning off the reconstruction value adjustment of the current image area, recorded as the second-generation value. On this basis, if the first-generation value is less than the second-generation value, the encoding end determines that the reconstruction value adjustment of the current image area needs to be performed; otherwise, the encoding end determines that the reconstruction value adjustment of the current image area does not need to be performed.
- the encoding end may encode the flag bit corresponding to the adjustment control switch in the code stream corresponding to the current image area. For example, if it is determined that the reconstruction value of the current image area needs to be adjusted, the flag bit may be a first value, and the first value indicates that the reconstruction value of the current image area needs to be adjusted. If it is determined that there is no need to adjust the reconstruction value of the current image area, the flag bit may be a second value, and the second value indicates that there is no need to adjust the reconstruction value of the current image area. Both the first value and the second value can be configured based on experience, for example, the first value is 0 and the second value is 1, or the first value is 1 and the second value is 0.
- Step S14 The decoder determines whether the first type of feature information corresponding to the current image area satisfies the first specific condition.
- step S15 may be performed, and if yes, step S16 may be performed.
- step S14 is similar to step S11 and will not be repeated here.
- Step S15 If the first type of feature information does not meet the first specific condition, the decoder determines that there is no need to adjust the reconstruction value of the current image area, nor does it need to decode the mark corresponding to the adjustment control switch from the code stream corresponding to the current image area. Bit.
- Step S16 If the first type of feature information meets the first specific condition, the decoding end obtains the flag bit corresponding to the adjustment control switch from the code stream corresponding to the current image area, and determines whether the current image area needs to be reconstructed based on the flag bit. value adjustment. Among them, if the flag bit is the first value, the decoder can determine that the reconstruction value of the current image area needs to be adjusted; if the flag bit is the second value, the decoder can determine that the current image area does not need to be reconstructed. value adjustment.
- both the encoding end and the decoding end can determine whether the reconstruction value adjustment needs to be performed on the current image area, and the conclusion of the reconstruction value adjustment can be applied to the current image area. If the reconstruction value of the current image area needs to be adjusted, for the encoding side, the reconstruction values of N coding blocks need to be adjusted, and for the decoding side, the reconstruction values of N decoding blocks need to be adjusted. If there is no need to adjust the reconstruction values of the current image area, for the encoding side, there is no need to adjust the reconstruction values of the N coding blocks, and for the decoding side, there is no need to adjust the reconstruction values of the N decoding blocks.
- Embodiment 4 For Embodiment 1 and Embodiment 2, it can be determined whether the reconstruction value needs to be adjusted for the current image area. For example, for the encoding end, after encoding the code stream of N encoding blocks (N ⁇ 1), the encoding end can record the N encoding blocks as the current image area, and can determine whether the current image area needs to be reconstructed. Adjustment. For the decoding end, after parsing the code stream of N decoding blocks (N ⁇ 1), the decoding end can record the N decoding blocks (corresponding to the N encoding blocks on the encoding end) as the current image area, and can determine whether it is needed. Adjust the reconstruction value of the current image area.
- Implicit export method The encoding end can implicitly derive whether the reconstruction value of the current image area needs to be adjusted based on the second type of feature information corresponding to the current image area.
- the decoder can also implicitly derive based on the second type of feature information corresponding to the current image area. Whether the export requires reconstruction value adjustment for the current image area.
- the process may include:
- Step S21 The encoding end determines whether the second type of feature information corresponding to the current image area meets the second specific condition.
- step S22 may be performed, and if yes, step S23 may be performed.
- the second type of feature information corresponding to the current image area may include but is not limited to at least one of code-controlled overflow and underflow indication information, quantization parameters, reconstructed pixel features, and block positions.
- Code-controlled overflow and underflow indication information Can
- the quantization parameter may include but not limited to the quantization step size.
- the current code rate is used to represent the average code rate of all code control units before the code control unit where the current image area is located;
- the block position is the block position of the image block in the current image area, such as any image block in the current image area
- the block position is used to represent the position of the image block in the current frame.
- the current code rate, quantization parameters, reconstructed pixel features and block positions are just a few examples of the second type of feature information.
- the second type of feature information There is no limit to this second type of feature information. Whether the second type of feature information meets the second specific condition can be including but not limited to:
- the second type of feature information corresponding to the current image area may include the current code rate corresponding to the current image area.
- the current code rate is also the code control information, that is, the overflow and underflow indication information of the code control. If the current code rate is less than the first code rate rate value, it is determined that the second type of characteristic information satisfies the second specific condition; otherwise, it is determined that the second type of characteristic information does not satisfy the second specific condition.
- the first code rate value may be a code rate value configured based on experience. There is no restriction on the first code rate value. When the current code rate is less than the first code rate value, it may indicate that the code control information indicates the resource pool. (For example, the code stream buffer used to store bit streams) is sufficient.
- a target upper limit code rate can be configured in advance.
- the current code rate is close to the target upper limit code rate, it means that the code control information indicates that the resource pool is normal.
- the code control information indicates that the resource pool is normal.
- the sum of the thresholds it means that the code control information indicates that the resource pool is insufficient.
- the target upper limit can be The difference between the code rate and the preset threshold is used as the first code rate value.
- the second type of feature information corresponding to the current image area may include the block position corresponding to the current image area. If the block position corresponding to the current image area is located at the specified position, it is determined that the second type of feature information satisfies the second specific condition, Otherwise, if the block position corresponding to the current image area is not located at the specified position, it is determined that the second type of feature information does not meet the second specific condition.
- the specified position can be the last L image blocks (L can be a positive integer greater than or equal to 1) of the current code control unit (that is, the code control unit where the current image area is located), or the specified position can be the current code control unit.
- L can be a positive integer greater than or equal to 1
- the specified position can be the current code control unit.
- the specified position may be the Slice boundary position within the current frame. If the block position belongs to the Slice boundary position within the current frame, it is determined that the block position is located at the specified position; otherwise, it is determined that the block position is not located at the specified position.
- the specified position can be the last L image blocks of the current code control unit and the Slice boundary position inside the current frame. If the block position belongs to the last L image blocks of the current code control unit, or the block position belongs to the inside of the current frame. Slice boundary position, then it is determined that the block position is at the specified position. If the block position does not belong to the last L image blocks of the current code control unit, and the block position does not belong to the Slice boundary position within the current frame, it is determined that the block position is not located at the specified position.
- the second type of feature information corresponding to the current image area may include the quantization step size corresponding to the current image area. If the quantization step size is greater than the step size threshold, it is determined that the second type of feature information satisfies the second specific condition; otherwise, If the quantization step size is not greater than the step size threshold, it is determined that the second type of feature information does not meet the second specific condition.
- the second type of feature information corresponding to the current image area may include the current code rate corresponding to the current image area and the block position corresponding to the current image area. On this basis, if the current code rate is less than the first code rate value, and the If the block position is located at the specified position, it is determined that the second type of feature information satisfies the second specific condition; otherwise, it is determined that the second type of feature information does not satisfy the second specific condition.
- the second type of feature information corresponding to the current image area may include the current code rate corresponding to the current image area and the block position corresponding to the current image area. If the current code rate is less than the first code rate value, or the block position is located at the specified location, it is determined that the second type of characteristic information satisfies the second specific condition; otherwise, it is determined that the second type of characteristic information does not satisfy the second specific condition.
- the second type of feature information corresponding to the current image area may include the current code corresponding to the current image area. rate and the quantization step corresponding to the current image area. If the current code rate is less than the first code rate value and the quantization step is greater than the step threshold, it is determined that the second type of feature information satisfies the second specific condition; otherwise, it is determined that the second type of feature information satisfies the second specific condition. The second type of feature information does not satisfy the second specific condition.
- the second type of feature information corresponding to the current image area may include the current code rate corresponding to the current image area and the quantization step size corresponding to the current image area. If the current code rate is less than the first code rate value, or the quantization step size is greater than the step size threshold, it is determined that the second type of feature information satisfies the second specific condition; otherwise, it is determined that the second type of feature information does not meet the second specific condition.
- the second type of feature information corresponding to the current image area may include the block position corresponding to the current image area and the quantization step size corresponding to the current image area. On this basis, if the block position is located at the specified position and the quantization step size is greater than the step size threshold, it is determined that the second type of feature information satisfies the second specific condition; otherwise, it is determined that the second type of feature information does not meet the second specific condition.
- the second type of feature information corresponding to the current image area may include the block position corresponding to the current image area and the quantization step corresponding to the current image area, if the block position is located at a specified position, or the quantization step is greater than the step threshold , then it is determined that the second type of characteristic information satisfies the second specific condition; otherwise, it is determined that the second type of characteristic information does not satisfy the second specific condition.
- the rate is less than the first code rate value, and the block position is at the specified position, and the quantization step is greater than the step threshold, then it can be determined that the second type of feature information satisfies the second specific condition, otherwise, it can be determined that the second type of feature information satisfies the second specific condition. The information does not satisfy the second specific condition.
- the second type of feature information corresponding to the current image area may include the current code rate corresponding to the current image area, the block position corresponding to the current image area, and the quantization step corresponding to the current image area.
- the current code rate is less than the first code rate value, or the block position is at a specified position, or the quantization step is greater than the step threshold, then it can be determined that the second type of feature information satisfies the second specific condition, otherwise, it can be determined that the second type of feature information satisfies the second specific condition.
- the class characteristic information does not satisfy the second specific condition.
- the second type of feature information corresponding to the current image area may include reconstructed pixel features corresponding to the current image area. On this basis, if the reconstructed pixel features indicate that the complexity of the current image area is simple, it can be determined that the The second type of characteristic information satisfies the second specific condition. Otherwise, it can be determined that the second type of characteristic information does not satisfy the second specific condition.
- the reconstructed pixel feature can be the complexity (such as gradient) of the current image area calculated from the reconstructed pixels.
- the Sobel operator can be used to evaluate the complexity of the current pixel area, and we get The complexity of the current image area; you can also transform the reconstructed pixel values of the current image area, and obtain the complexity of the current image area based on the characteristics of the transformation domain, such as the frequency domain; you can also calculate the horizontal and vertical gradients of the current image area, based on The horizontal and vertical gradients get the complexity of the current image area.
- the above are just a few examples, as long as the reconstructed pixel features can be obtained, and the reconstructed pixel features can represent the complexity of the current image area.
- the reconstructed pixel feature when the reconstructed pixel feature indicates that the complexity of the current image area is simple, it means that the reconstruction value of the current image area can be adjusted to reduce image loss. Therefore, it can be determined that the second type of feature information satisfies the second specific conditions.
- the reconstructed pixel feature can be a complexity value.
- the complexity value is greater than a preset threshold
- the reconstructed pixel feature can indicate that the complexity of the current image area is complex. Otherwise, the complexity of the current image area is Simple.
- there is no limit to the complexity of the current image area For example, when the complexity value is less than a preset threshold, the reconstructed pixel features can represent the complexity of the current image area as simple. Otherwise, the complexity of the current image area is simple. , the complexity of the current image area is complex.
- the second type of feature information corresponding to the current image area may include reconstructed information corresponding to the current image area. Pixel features.
- the second type of feature information corresponding to the current image area also includes at least one of the current code rate, block position and quantization step size. For convenience of description, it includes the current code rate, block position and quantization step at the same time. Taking the step size as an example, the implementation in other cases is similar.
- the pixel feature indicates that the complexity of the current image area is simple, it can be determined that the second type of feature information satisfies the second specific condition; otherwise, it can be determined that the second type of feature information does not meet the second specific condition.
- the second type of feature information corresponding to the current image area includes the reconstructed pixel features corresponding to the current image area.
- the second type of feature information corresponding to the current image area also includes the current code rate, block position and quantization step. At least one of the length. For convenience of description, take the current code rate, block position and quantization step size as an example. The implementation in other cases is similar.
- the current code rate is less than the first code rate value, or , the block position is at the specified position, or the quantization step is greater than the step threshold, or the reconstructed pixel feature represents the complexity of the current image area as simple, then it can be determined that the second type of feature information satisfies the second specific condition , otherwise, it can be determined that the second type of feature information does not satisfy the second specific condition.
- Step S22 The encoding end determines that there is no need to adjust the reconstruction value of the current image area.
- Step S23 The encoding end determines that the reconstruction value of the current image area needs to be adjusted.
- Step S24 The decoding end determines whether the second type of feature information corresponding to the current image area meets the second specific condition.
- step S25 may be performed, and if yes, step S26 may be performed.
- step S24 is similar to step S21, and will not be repeated here.
- Step S25 The decoding end determines that there is no need to adjust the reconstruction value of the current image area.
- Step S26 The decoder determines that the reconstruction value of the current image area needs to be adjusted.
- Embodiment 5 For Embodiment 1 and Embodiment 2, it can be determined whether the reconstruction value adjustment of the current image area is required. For example, for the encoding end, after encoding the code stream of N encoding blocks (N ⁇ 1), the encoding end can record the N encoding blocks as the current image area, and can determine whether the current image area needs to be reconstructed. Adjustment. For the decoding end, after parsing the code stream of N decoding blocks (N ⁇ 1), the decoding end can record the N decoding blocks (corresponding to the N encoding blocks on the encoding end) as the current image area, and can determine whether it is needed. Adjust the reconstruction value of the current image area.
- the combined implementation method is the implementation method of explicit syntax + implicit export. For example, after the encoding end obtains the mark bit of the adjustment control switch corresponding to the current image area (see Embodiment 3), if the mark bit of the adjustment control switch is consistent with the target image area (such as the previous image area of the current image area, or If the mark bits of the adjustment control switches corresponding to a specified image area, or a default image area, etc.) are the same, the encoding end may not encode the mark bits of the adjustment control switches in the code stream corresponding to the current image area.
- the decoder When the decoder learns that the code stream corresponding to the current image area does not carry the mark bit of the adjustment control switch, it can use the mark bit of the adjustment control switch corresponding to the target image area as the mark bit of the adjustment control switch corresponding to the current image area, and then determine Whether to adjust the reconstruction value of the current image area.
- the encoding end After the encoding end obtains the mark bit of the adjustment control switch corresponding to the current image area, if the mark bit of the adjustment control switch is different from the mark bit of the adjustment control switch corresponding to the target image area, the encoding end can set the mark bit of the adjustment control switch corresponding to the current image area.
- the decoding end can analyze the flag bit of the adjustment control switch corresponding to the current image area from the code stream, and determine whether to adjust the reconstruction value of the current image area based on the flag bit.
- Embodiment 6 Regarding Embodiment 1 to Embodiment 5, after determining whether to perform reconstruction value adjustment on the current image area, if it is determined to perform reconstruction value adjustment on the current image area, the adjustment parameters corresponding to the current image area can be obtained.
- This adjustment parameter can be used to adjust the reconstruction value of the current image area, that is, to adjust the reconstruction value (or prediction value, or residual value, etc.) of N image blocks in the current image area.
- the current image area The domain can include N coding blocks, and the adjustment parameters can be used to adjust the reconstruction values of the N coding blocks.
- the current image area can include N decoding blocks, and the adjustment parameters can be used to adjust the N decoding blocks.
- the reconstruction value is adjusted.
- the adjustment parameters corresponding to the current image area can be determined based on the original value of the current image area and the reconstructed value of the current image area.
- the adjustment parameter is used to adjust the reconstruction value of the current image area so that the adjusted reconstruction value is close to the original value of the current image area. This embodiment does not limit the acquisition process of this adjustment parameter.
- the adjustment parameters corresponding to the current image area may include multiple adjustment values, and the current image area may correspond to multiple pixel groups, that is, all pixels in the current image area may be divided into multiple pixel groups.
- multiple The adjustment values may include adjustment values corresponding to K pixel groups, and the K pixel groups may be all pixel groups or part of the pixel groups among multiple pixel groups.
- all pixels in the current image area can be divided into 32 pixel groups, and K pixel groups can be selected from the 32 pixel groups, such as 4 pixel groups, 8 pixel groups, 16 pixel groups, 32 pixel groups, etc. Pixel groups, etc., there is no limit to the value of K.
- the encoding end obtains the adjustment parameters corresponding to the K pixel groups, that is, the adjustment parameters can include the adjustment values corresponding to the K pixel groups, and the adjustment value corresponding to each pixel group is used to adjust each pixel point in the pixel group.
- the reconstruction value is adjusted. For example, assuming that the K pixel groups are pixel group 1 and pixel group 2, the encoding end can obtain the adjustment value corresponding to pixel group 1 and the adjustment value corresponding to pixel group 2.
- the adjustment value corresponding to pixel group 1 is used to adjust the pixel group.
- the reconstruction value of each pixel in pixel group 1 is adjusted, and the adjustment value corresponding to pixel group 2 is used to adjust the reconstruction value of each pixel in pixel group 2.
- the adjustment value corresponding to the pixel group may include the adjustment value of multiple channels or a single channel corresponding to the pixel group.
- multiple channels may include Y channel, U channel, and V channel, or multiple channels may include R channel, G channel, and B channel, or multiple channels may include R channel, G channel, B channel, alpha channel, or the plurality of channels may include R channel, G channel, B channel, IR channel, or the plurality of channels may include R channel, G channel, B channel, W channel, or the plurality of channels may include the R channel , G channel, B channel, IR channel, W channel, or the multiple channels may include R channel, G channel, B channel, D channel, or the multiple channels may include R channel, G channel, B channel, D channel , W channel.
- a single channel can be any of the above channels. Of course, these are just a few examples.
- two or more of the above channels can also use the same adjustment value.
- the U channel and V channel can use the same adjustment value, or the R channel and G channel can use the same adjustment value. value, there is no limit on this.
- the adjustment values corresponding to pixel group 1 include Y channel adjustment value 1, U channel adjustment value 1 and V channel adjustment value 1.
- Y channel adjustment value 1 is used to reconstruct the Y channel value of each pixel in pixel group 1.
- U channel adjustment value 1 is used to adjust the U channel reconstruction value of each pixel in pixel group 1.
- V channel adjustment value 1 is used to adjust the V channel reconstruction value of each pixel in pixel group 1.
- the adjustment values corresponding to pixel group 2 include Y channel adjustment value 2, U channel adjustment value 2 and V channel adjustment value 2.
- Y channel adjustment value 2 is used to adjust the Y channel reconstruction value of each pixel in pixel group 2.
- U channel adjustment value 2 is used to adjust the U channel reconstruction value of each pixel in pixel group 2
- V channel adjustment value 2 is used to adjust the V channel reconstruction value of each pixel in pixel group 2.
- the adjustment values of each channel corresponding to the pixel group may be different, may be the same, or may be partially the same and partially different.
- the encoding end can also encode the adjustment parameters corresponding to the current image area in the code stream corresponding to the current image area.
- the adjustment parameters may include adjustment values corresponding to K pixel groups. Therefore, the adjustment values corresponding to K pixel groups may be encoded in the code stream corresponding to the current image area.
- the adjustment parameters corresponding to the current image area can be obtained from the code stream corresponding to the current image area.
- the adjustment parameters are used to adjust the reconstruction value of the current image area so that the adjusted reconstruction value is close to the current image.
- the original value of the area After obtaining the adjustment parameters, the reconstruction value of the current image area can be adjusted based on the adjustment parameters.
- the adjustment parameters corresponding to the current image area may include multiple adjustment values. All pixels in the current image area may be divided into multiple pixel groups. On this basis, the multiple adjustment values may include K pixel groups corresponding to Adjustment value, K pixel groups can be all pixel groups or part of pixel groups in multiple pixel groups.
- the decoding end can obtain the adjustment parameters corresponding to the K pixel groups from the code stream, that is, the adjustment parameters can include the adjustment values corresponding to the K pixel groups.
- the decoder can adjust the reconstruction value of each pixel in the pixel group based on the adjustment value corresponding to the pixel group.
- the decoding end can obtain the adjustment value corresponding to pixel group 1 and the adjustment value corresponding to pixel group 2, and the decoding end adjusts the pixels based on the adjustment value corresponding to pixel group 1.
- the reconstruction value of each pixel in group 1 is adjusted, and the decoder adjusts the reconstruction value of each pixel in pixel group 2 based on the adjustment value corresponding to pixel group 2.
- the adjustment value corresponding to the pixel group may include the adjustment value of multiple channels or a single channel corresponding to the pixel group.
- the multiple channels may include Y channel, U channel, V channel, or , the multiple channels may include R channel, G channel, B channel, or the multiple channels may include R channel, G channel, B channel, alpha channel, or the multiple channels may include R channel, G channel, B channel , IR channel, or the multiple channels may include R channel, G channel, B channel, W channel, or the multiple channels may include R channel, G channel, B channel, IR channel, W channel, or multiple channels It may include an R channel, a G channel, a B channel, and a D channel, or the plurality of channels may include an R channel, a G channel, a B channel, a D channel, and a W channel.
- a single channel can be any of the above channels. Of course, the above are just a few examples and are not limiting.
- the decoder adjusts the reconstruction value of each pixel in the pixel group to obtain the adjusted reconstruction value of each pixel in the pixel group. For example, if the multiple adjustment values obtained from the code stream include Y channel adjustment value 1, U channel adjustment value 1 and V channel adjustment value 1 corresponding to pixel group 1, then pixel group 1 can be adjusted based on Y channel adjustment value 1. The Y channel reconstruction value of each pixel in pixel group 1 is adjusted based on the U channel adjustment value 1. The U channel reconstruction value of each pixel in pixel group 1 is adjusted based on the V channel adjustment value 1.
- Each pixel in pixel group 1 is adjusted based on the V channel adjustment value 1.
- the V channel reconstruction value of the point is adjusted. For another example, if the multiple adjustment values obtained from the code stream only include the Y channel adjustment value 1 corresponding to pixel group 1, but do not include the U channel adjustment value 1 and V channel adjustment value 1 corresponding to pixel group 1, then the decoding end The Y channel reconstruction value of each pixel in pixel group 1 can be adjusted based on the Y channel adjustment value 1.
- the encoding end may not encode the K pixel groups in the code stream corresponding to the current image area.
- the decoding end does not need to parse the pixel group indication information corresponding to K pixel groups from the code stream corresponding to the current image area.
- the decoding end can learn that the adjustment parameters carried in the code stream are Adjustment value for all pixel groups (such as 32 pixel groups).
- the encoding end can encode the pixel group indication information corresponding to the K pixel groups in the code stream corresponding to the current image area, indicating that the pixel group is carried in the code stream. Adjustment values of the K pixel groups corresponding to the indication information.
- the decoder can parse the pixel group indication information corresponding to the K pixel groups from the code stream corresponding to the current image area, and learn that the adjustment parameters carried in the code stream are the adjustment values of the K pixel groups corresponding to the pixel group indication information.
- the pixel group indication information includes index values of K pixel groups.
- the index value indicates which pixel group the pixel group is among all pixel groups.
- the K pixel groups include pixel group 1, pixel group 2, and pixel group.
- the pixel group indication information may include the index value of pixel group 1 (the index value is used to indicate which pixel group pixel group 1 is among all pixel groups), the index of pixel group 2 value, the index value of pixel group 3 and the index value of pixel group 4.
- the pixel group indication information is used to distinguish the pixel group of the target category among the pixel groups of all categories, that is, to distinguish the K pixel groups from all the pixel groups.
- Pixel group, pixel group indication information can realize the classification function.
- the pixel group indication information may include K pixel groups
- the index value of the middle pixel group, and the index value of the remaining pixel group can be derived implicitly.
- the pixel group indication information may only include the index value of pixel group 1. Since the K pixel groups are continuous pixel groups, therefore , the index value of pixel group 2, the index value of pixel group 3, and the index value of pixel group 4 can be derived implicitly.
- the display method can be used to indicate the index values of the K pixel groups, or the display method can be used to indicate the index values of some pixel groups among the K pixel groups, and the indexes of the remaining pixel groups can be derived implicitly. value, there is no restriction on this in this embodiment, as long as the decoding end can obtain the index values of K pixel groups.
- the K pixel groups are part of all pixel groups, and the K pixel groups are K pixel groups at the default position, for example, the K pixel groups are fixed to the first 4 pixel groups, or K The pixel group is fixed to the 1st, 3rd, 5th, and 7th pixel groups, or the K pixel groups are fixed to the next 4 pixel groups. Then, the encoding end does not need to encode the K pixel groups corresponding to the code stream corresponding to the current image area. Pixel group indication information, the decoding end does not need to parse the pixel group indication information corresponding to K pixel groups from the code stream corresponding to the current image area.
- the decoding end learns that the adjustment parameters carried in the code stream are in the default position Adjustment values of K pixel groups, for example, the adjustment parameter is the adjustment value of the first 4 pixel groups, or the adjustment parameter is the adjustment value of the 1st, 3rd, 5th, and 7th pixel groups, or the adjustment parameter is the next 4 pixel groups adjustment value.
- the adjustment parameters corresponding to the current image area include adjustment values corresponding to K pixel groups.
- the adjustment parameters may include multiple adjustment values.
- all or part of the adjustment values may be encoded in the code stream corresponding to the current image area. For example, take the adjustment value corresponding to a pixel group including the adjustment value of a single channel corresponding to the pixel group.
- the K pixel groups are 12 pixel groups, among which the adjustment values of 4 pixel groups are the Y channel adjustment values, The adjustment value of the 4 pixel groups is the U channel adjustment value, and the adjustment value of the 4 pixel group is the V channel adjustment value.
- the adjustment parameters corresponding to the current image area can include 12 adjustment values.
- the 12 adjustment values can be encoded in the code stream corresponding to the current image area, or some of the 12 adjustment values can be encoded in the code stream corresponding to the current image area.
- the decoding end when obtaining the adjustment parameters from the code stream corresponding to the current image area, if the encoding end encodes all the adjustment values corresponding to the K pixel groups, the decoding end can obtain them from the code stream corresponding to the current image area. All adjustment values corresponding to K pixel groups. If the encoding end encodes the partial adjustment values corresponding to the K pixel groups, the decoding end can obtain the partial adjustment values corresponding to the K pixel groups from the code stream corresponding to the current image area.
- the decoding end For example, if the decoding end obtains the Y channel adjustment value, but does not obtain the U channel adjustment value and V channel adjustment value, the decoding end only reconstructs the Y channel reconstruction value of each pixel in the corresponding pixel group based on the Y channel adjustment value. Make adjustments without adjusting the U channel reconstruction value and V channel reconstruction value of each pixel in the pixel group. In addition, if the decoding end does not obtain the adjustment value of a certain pixel group among the K pixel groups, the decoding end will no longer adjust the reconstruction value of each pixel point in the pixel group.
- the encoding end encodes all or part of the adjustment values in the code stream corresponding to the current image area, which may include but is not limited to the following steps:
- Step S31 Sort the plurality of adjustment values according to their encoding order.
- the adjustment values of 4 pixel groups are Y channel adjustment values
- the adjustment values of 4 pixel groups are U channel adjustment values
- the adjustment values of 4 pixel groups are Taking the V channel adjustment value as an example, the current image area corresponds to 12 adjustment values, and the encoding order of the 12 adjustment values can be determined.
- the coding order of each pixel group can be determined. For example, when dividing multiple pixel groups according to the reconstructed value of each pixel point, the coding order of each pixel group can be determined according to the value range of each pixel group, such as according to the value range from small to large. Sort in order of large value, or sort in order of value range from large to small. Taking the order of value ranges from small to large as an example, assume that the value range corresponding to pixel group 1 is the smallest, the value range corresponding to pixel group 2 is the second smallest, and so on, the value range corresponding to pixel group 11 is the second largest, and the value range corresponding to pixel group 1 is the second largest. The value range corresponding to group 12 is the largest, that is, the value ranges from pixel group 1 to pixel group 12 increase sequentially. Then, the encoding order of each pixel group may be from pixel group 1 to pixel group 12.
- the gradient value range of each pixel group can be used (that is, the gradient value result corresponding to each pixel group, such as the above-mentioned absolute value below 10 and other value ranges) Determine each pixel group encoding order. For example, sort according to the gradient value range from small to large, or sort according to the gradient value range from large to small.
- the gradient value range corresponding to pixel group 1 is the smallest
- the gradient value range corresponding to pixel group 2 is the second smallest
- the gradient value corresponding to pixel group 11 The value range is the second largest
- the gradient value range corresponding to pixel group 12 is the largest. That is, the corresponding gradient values from pixel group 1 to pixel group 12 increase in sequence.
- the encoding order of each pixel group can be from pixel group 1 Up to pixel group 12 are encoded sequentially.
- the coding order of each pixel group can be determined according to the block order corresponding to each pixel group. Taking the order of sorting from front to back in block order as an example, assume that the sub-region corresponding to pixel group 1 is the first block of the current image area, and the sub-region corresponding to pixel group 2 is the second block of the current image area. In this way, the sub-region corresponding to pixel group 11 is the eleventh block of the current image area, and the sub-region corresponding to pixel group 12 is the 12th block of the current image area. Then, the encoding order of each pixel group is from pixel group 1 Up to pixel group 12 are encoded sequentially.
- the above methods are just a few examples of determining the encoding order of each channel, and there is no restriction on this.
- the encoding order of each channel can be planned arbitrarily.
- the encoding order of the multiple adjustment values may be determined based on the encoding order of each pixel group and the encoding order of each channel.
- the coding order of the pixel group can be mainly used, and the coding order of each channel can be used as a supplement to determine the coding order of multiple adjustment values.
- K pixel groups are 4 pixel groups, and each pixel group corresponds to 3 The adjustment value of the channel.
- the encoding order of each pixel group is pixel group 1, pixel group 2, pixel group 3 and pixel group 4.
- the encoding order of each channel is Y channel, U channel, V channel. For example, there are 12 adjustment values.
- the encoding sequence can be: Y channel adjustment value, U channel adjustment value and V channel adjustment value of pixel group 1, Y channel adjustment value, U channel adjustment value and V channel adjustment value of pixel group 2, Y channel of pixel group 3 Adjustment value, U channel adjustment value and V channel adjustment value, Y channel adjustment value, U channel adjustment value and V channel adjustment value of pixel group 4.
- the coding order of multiple adjustment values can be determined based on the coding order of each channel and the coding order of the pixel group as a supplement.
- the coding order of the above 12 adjustment values can be: Y channel adjustment of pixel group 1 value, Y channel adjustment value of pixel group 2, Y channel adjustment value of pixel group 3, Y channel adjustment value of pixel group 4, U channel adjustment value of pixel group 1, U channel adjustment value of pixel group 2, pixel group 3 U channel adjustment value, U channel adjustment value of pixel group 4, V channel adjustment value of pixel group 1, V channel adjustment value of pixel group 2, V channel adjustment value of pixel group 3, V channel adjustment value of pixel group 4 .
- the above are just two examples of the encoding order of multiple adjustment values. This embodiment does not limit the encoding order of multiple adjustment values, and the encoding order of multiple adjustment values can be configured arbitrarily.
- Step S32 Traverse multiple adjustment values in sequence based on the sorting results.
- the adjustment value of pixel group 1 is traversed for the first time, and the adjustment value of pixel group 2 is traversed for the second time.
- Adjustment value the adjustment value of pixel group 3 is traversed for the third time, and the adjustment value of pixel group 4 is traversed for the fourth time; for the adjustment value of multiple channels corresponding to the pixel group, pixel group 1 is traversed for the first time.
- the Y channel adjustment value is traversed for the second time, the U channel adjustment value of pixel group 1 is traversed, the V channel adjustment value of pixel group 1 is traversed for the third time, and the Y channel adjustment value of pixel group 2 is traversed for the fourth time.
- Channel adjustment value is a pixel group corresponding to a single channel.
- the traversal can also be performed according to the order of each channel. Taking the order of each channel as Y channel, U channel, and V channel as an example, the adjustment value of the Y channel is traversed during the first traversal.
- each pixel group and each pixel channel may also have other orderings. The above are just examples of the traversal order, and this application does not limit this.
- Step S33 For the currently traversed adjustment value, if after encoding the adjustment value in the code stream corresponding to the current image area, the current code rate is less than the second code rate value, then encode the adjustment value in the code stream corresponding to the current image area. , and continue to traverse the next adjustment value of this adjustment value, using the next adjustment value as the current traversed adjustment value.
- the second code rate value may be configured based on experience, and there is no restriction on this.
- the current code rate is less than the second code rate value, it means that the code control information indicates that the resource pool is sufficient.
- a target upper limit code rate can be configured in advance.
- the current code rate is close to the target upper limit code rate, it means that the code control information indicates that the resource pool is normal; when the current code rate is greater than the target upper limit code rate and the preset upper limit code rate, the code control information indicates that the resource pool is normal.
- the code control information indicates that the resource pool is insufficient; when the current code rate is less than the difference between the target upper limit code rate and the preset threshold, it means that the code control information indicates that the resource pool is sufficient.
- the difference between the target upper limit code rate and the preset threshold can be used as the second code rate value.
- the second code rate value may be the same as the above-mentioned first code rate value, or may be different.
- Step S34 For the currently traversed adjustment value, if after encoding the adjustment value in the code stream corresponding to the current image area, the current code rate is not less than the second code rate value, encoding in the code stream corresponding to the current image area may be prohibited. the adjustment value, and stops traversing the next adjustment value of the adjustment value, that is, ending the traversal process of multiple adjustment values.
- the multiple adjustment values can be traversed in sequence. For the currently traversed adjustment value, if after encoding the adjustment value in the code stream, the current code rate is less than the second code rate value, then the adjustment value is encoded in the code stream, and the next adjustment value of the adjustment value is continued to be traversed; If the current code rate is not less than the second code rate value, the adjustment value is not encoded in the code stream, and the traversal of the next adjustment value of the adjustment value is stopped.
- Embodiment 8 During the process of transferring adjustment parameters, the status of the code control will also be updated synchronously. After the coding adjustment parameters, if the code control is still in the underflow state (less than 0, such as when the current code rate is less than the second code rate value , indicating that the code control is still in the underflow state), then continue to code and adjust parameters. In case one, the adjustment parameters are gradually transferred in the form of channels, such as Y channel, U channel, V channel, R channel, G channel, B channel, alpha channel (some channels can also be shared, such as UV channel sharing), etc., if the code control status If it is an underflow, the parameters will be adjusted according to the order of encoding (parsing on the decoding end).
- channels such as Y channel, U channel, V channel, R channel, G channel, B channel, alpha channel (some channels can also be shared, such as UV channel sharing), etc.
- the adjustment parameters are gradually transferred in the form of pixel groups (at least one pixel), that is, according to a certain scanning order and grouping, the adjustment parameters are transferred one by one. For example, according to the Y channel first, then the U channel and then the V channel, each channel is processed vertically. Four groups of directions (such as 4 pixel groups), and then transfer the adjustment parameters group by group to gradually update the code control status.
- the adjustment parameters express the adjustment of a certain type or multiple types of reconstruction values in N coding blocks (ie, the current image area).
- the certain type or multiple types of reconstruction values can be passed through syntax or exported. Determined by the method, for example: unified agreement on the codec end; derived based on encoded information (such as mode information, reconstruction value information, etc.).
- Embodiment 9 Regarding Embodiment 1 to Embodiment 8, for the encoding end and the decoding end, the current image area can correspond to multiple pixel groups. For example, all pixel points in the current image area are divided into multiple pixel groups, that is, all pixel points are divided into multiple pixel groups. Pixel points are classified. In this embodiment, the following method can be used to divide all pixels in the current image area into multiple pixel groups:
- Method 1 Divide all pixels in the current image area into multiple pixel groups according to the pre-adjustment reconstruction value of each pixel, that is, you can use the pre-adjustment reconstruction value of each pixel (the subsequent reconstruction values used for grouping refer to the adjustment (pre-reconstruction value) is classified to obtain multiple pixel groups.
- the value range of the reconstructed value can be divided into A pixel groups on average, and the pixel group is determined according to the range of the reconstructed value.
- the reconstructed value with a bit width of 8 bits (value range 0 to 255) is divided into 16 pixel groups.
- the 16 pixel groups range from 0 to 15, 16 to 31, 32 to 47, 48 to 63, ..., 240 to 255.
- the pixel is divided into the first pixel group. If the reconstructed value of the pixel is in the range 16 to 31, the pixel is divided into the second pixel group. If the reconstructed value of the pixel is in the range 32 to 47, the pixel is divided into the third pixel group. If the reconstructed value of the pixel is in the range 48 to 63, the pixel is divided into the fourth pixel group.
- the reconstruction value of a pixel is in the range of 240 to 255, the pixel is divided into the 16th pixel group.
- all pixels in the current image area are divided into multiple pixels according to the reconstruction value of each pixel.
- it can also be divided channel by channel. For example, taking the Y channel, U channel, and V channel as an example, if the Y channel reconstruction value of a pixel is in the range 0 to 15, then the Y channel reconstruction value of the pixel is divided into the first pixel group. Based on this, The Y channel reconstruction value of the pixel can be adjusted based on the Y channel adjustment value corresponding to the first pixel group. If the U channel reconstruction value of a pixel is in the range of 16 to 31, the U channel reconstruction value of the pixel is divided into the second pixel group.
- the U channel adjustment value corresponding to the second pixel group can be used to adjust the U channel reconstruction value.
- the U channel reconstruction value of the pixel is adjusted. If the V channel reconstruction value of a pixel is in the range of 16 to 31, the V channel reconstruction value of the pixel is divided into the second pixel group. Based on this, the V channel adjustment value corresponding to the second pixel group can be The V channel reconstruction value of the pixel is adjusted.
- Method 2 Determine the classification value of the pixel based on the pre-adjustment reconstruction value of the surrounding pixels (the subsequent reconstruction values used for grouping refer to the pre-adjustment reconstruction value), and classify the current image according to the classification value of each pixel. All pixels in the area are divided into multiple pixel groups. For example, multiple pixel groups can be obtained by classifying according to the gradient value of each pixel.
- a pixel can be classified according to the reconstructed values of the surrounding pixels. For example, using gradient information, the reconstructed values of the upper adjacent pixels of the pixel can be compared with the reconstructed values of the adjacent pixels on the left side of the pixel. The reconstructed value is subtracted to obtain the gradient value of the pixel. Pixels whose absolute value of the gradient value result is within a certain range can be defined as the same category. For example, those with absolute values below 10 are classified as the first category, those with absolute values between 10 and 30 are classified as the second category, and those with absolute values greater than 30 are classified as the second category. Category III.
- the pixel is divided into the first pixel group. If the absolute value of the gradient value of the pixel is below 10 to 30, then the pixel is divided into the second pixel group. If the absolute value of the gradient value of the pixel is above 30, the pixel is divided into the third pixel group.
- Method 3 Divide all pixels in the current image area into multiple pixel groups according to the pixel position of each pixel, that is, you can classify according to the pixel position of each pixel to obtain multiple pixel groups. For example, classification can be based on pixel positions, such as dividing the 16*2 current image area into four 4*2 sub-regions, and each 4*2 sub-region is divided into one category. On this basis, for a certain pixel, if the pixel is in the first 4*2 sub-area, the pixel can be divided into the first pixel group. If the pixel is in the second If the pixel is in the third 4*2 sub-area, the pixel can be divided into the second pixel group. If the pixel is in the third 4*2 sub-area, the pixel can be divided into the third pixel group. If the pixel is in the fourth 4*2 sub-region, the pixel can be divided into the fourth pixel group.
- Each pixel can be divided into a pixel group, that is, each pixel is a pixel group, and different pixels correspond to different pixel groups. It can be understood that a pixel group includes one pixel.
- the current image area can correspond to multiple pixel groups. For example, all pixel points in the current image area are divided into multiple pixel groups, that is, All pixels are classified.
- the following method can be used to determine multiple pixel groups corresponding to the current image area: multiple pixel groups corresponding to the current image area are determined according to the prediction mode of the current image area. That is to say, the division of pixel groups can be based on the current image area. related to the regional prediction model. For example, the division attribute of the pixel group can be determined according to the prediction mode of the current image area, and multiple pixel groups corresponding to the current image area can be determined based on the division attribute.
- the division attribute may include at least one of division number, filtering area, and division method. If the division attributes include the number of divisions, filter areas and division methods, the number of divisions, filter areas and division methods of the pixel group are determined based on the prediction mode of the current image area, and the corresponding number of the current image area is determined based on the number of divisions, filter areas and division methods. of multiple pixel groups. If the division attribute includes the number of divisions and the division method, the number of divisions and the division method of the pixel group are determined according to the prediction mode of the current image area, and the multiple pixel groups corresponding to the current image area are determined based on the number of divisions and the division method. Regarding the combination of other division attributes, the implementation methods are similar and will not be described again in this embodiment.
- the number of divisions is used to indicate how many pixel groups the current image area is divided into
- the filter area is used to indicate which part of the current image area is divided into multiple pixel groups
- the division method is used to indicate the size specifications of each pixel group.
- the filter area may mean dividing the entire current image area into multiple pixel groups, or it may mean dividing a part of the current image area into multiple pixel groups. If the division attribute does not include the filter area, it means that the entire area of the current image area is divided into multiple pixel groups.
- the prediction mode of the current image area can be distinguished into a horizontal prediction mode and a non-horizontal prediction mode. If the prediction mode of the current image area is a horizontal prediction mode, it can be determined that the number of divisions of the pixel group is the first division number, and it is determined The filter area of the pixel group is the first filter area, and the division method is determined to be the first size specification; if the prediction mode of the current image area is not the horizontal prediction mode, it can be determined that the division number of the pixel group is the second division number, and the division number of the pixel group is determined. The filtering area is the second filtering area, and the determination method of dividing is the second size specification.
- the prediction mode of the current image area is the horizontal prediction mode, it can be determined that the number of divisions of the pixel group is the first division number, and the division method is the first size specification; if the prediction mode of the current image area is not the horizontal prediction mode, then It can be determined that the number of divisions of the pixel group is the second division number, and the division method is determined to be the second size specification.
- the prediction mode of the current image area can be divided into a vertical prediction mode and a non-vertical prediction mode. If the prediction mode of the current image area is the vertical prediction mode, it can be determined that the number of divisions of the pixel group is the third division number, and the number of divisions of the pixel group can be determined.
- the filter area of the group is the third filter area, and the division method is determined to be the third size specification; if the prediction mode of the current image area is not the vertical prediction mode, it can be determined that the number of divisions of the pixel group is the fourth division number, and the filtering of the pixel group is determined
- the area is the fourth filtering area, and the determination method of dividing is the fourth size specification.
- the prediction mode of the current image area is the vertical prediction mode
- the ways of distinguishing the horizontal prediction mode and the non-horizontal prediction mode, and the ways of distinguishing the vertical prediction mode and the non-vertical prediction mode are just two examples and are not limited thereto.
- the prediction mode of the current image area can be divided into a first prediction mode and a non-first prediction mode.
- the first prediction mode corresponds to the first division attribute (number of divisions, filtering area and division method)
- the non-first prediction mode Corresponds to the second division attribute (number of divisions, filtering area and division method).
- the prediction mode of the current image area can be distinguished into a first prediction mode, a second prediction mode, and a non-first and non-second prediction mode.
- the first prediction mode corresponds to the first division attribute (number of divisions, filter area and division method)
- the second prediction mode corresponds to the second division attribute (number of divisions, filtering area, and division method)
- the non-first and non-second prediction modes correspond to the third division attribute (number of divisions, filtering area, and division method).
- the prediction mode of the current image area can be divided into a first prediction mode and a second prediction mode.
- the first prediction mode corresponds to the first division attribute (number of divisions, filtering area and division method)
- the second prediction mode corresponds to the first division attribute. Two types of division attributes (number of divisions, filter area and division method), and so on.
- the prediction mode of the current image area is divided into a horizontal prediction mode and a non-horizontal prediction mode as an example. If the prediction mode of the current image area is the horizontal prediction mode, it is determined that the number of divisions of the pixel group is the first division number, the filtering area of the pixel group is determined to be the first filtering area, and the dividing method is determined to be the first size specification; if the current image area The prediction mode is not the horizontal prediction mode, then it is determined that the number of divisions of the pixel group is the second division number, it is determined that the filtering area of the pixel group is the second filtering area, and it is determined that the dividing method is the second size specification.
- the number of first divisions can be configured according to experience, for example, it can be 2, 4, 6, 8, 16, etc., and there is no limit to this.
- the first filtering area it may be the entire area of the current image area, or it may be a part of the current image area, and there is no limitation on this.
- the first size specification it can be configured based on experience.
- the first size specification can include width and height.
- the width can be 2, 4, 6, 8, 12, 16, etc. There is no limit to this.
- the height can be 1, 2, 16, etc. 4, 6, 8, 12, 16, etc., there is no limit to this.
- the number of second divisions can be configured based on experience, for example, it can be 2, 4, 6, 8, 16, etc., without limitation.
- the second filtering area it may be the entire area of the current image area, or it may be a partial area of the current image area, and there is no limitation on this.
- the second size specification it can be configured based on experience.
- the second size specification can include width and height.
- the width can be 2, 4, 6, 8, 12, 16, etc. There is no limit on this.
- the height can be 1, 2, 4, 6, 8, 12, 16, etc., there is no restriction on this.
- the current image area is a 16*2 image block
- all pixels in the current image area can be divided into 4 pixel groups, and each pixel group
- the size is 8*1; in this case, the first division number is 4, the first filter area is the entire area of the current image area, and the first size specification is 8*1, as shown in Figure 5A, which is 16*2
- the image block is divided into four 8*1 pixel groups.
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 16*1; in this case, the first division number is 2, and the first filter area is the current image area. For all areas, the first size specification is 16*1. As shown in Figure 5B, the 16*2 image block is divided into two 16*1 pixel groups.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 4*2; in this case, the first division number is 4, and the first filter area is the current image area. For all areas, the first size specification is 4*2. As shown in Figure 5C, the 16*2 image block is divided into four 4*2 pixel groups.
- all pixels in the current image area can be divided into 8 pixel groups, and the size of each pixel group is 2*2; in this case, the first division number is 8, and the first filter area is the current image area. For all areas, the first size specification is 2*2. As shown in Figure 5D, the 16*2 image block is divided into eight 2*2 pixel groups.
- the current image area is a 16*2 image block
- the prediction mode of the current image area is not the horizontal prediction mode
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 4*2.
- the second division number is 4,
- the second filter area is the entire area of the current image area, and the second size specification is 4*2.
- the 16*2 image block is divided into 4 A 4*2 pixel group.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 8*1; in this case, the second division number is 4, and the second filter area is the current image area. For all areas, the second size specification is 8*1. As shown in Figure 5A, the 16*2 image block is divided into four 8*1 pixel groups.
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 16*1; in this case, the second division number is 2, and the second filter area is the current image area. For all areas, the second size specification is 16*1. As shown in Figure 5B, the 16*2 image block is divided into two 16*1 pixel groups.
- all pixels in the current image area can be divided into 8 pixel groups, and the size of each pixel group is 2*2; in this case, the second division number is 8, and the second filter area is the current image area. For all areas, the second size specification is 2*2. As shown in Figure 5D, the 16*2 image block is divided into eight 2*2 pixel groups.
- the current image area is an 8*2 image block
- all pixels in the current image area can be divided into 2 pixel groups, and each pixel group The size is 4*2; in this case, the first division number is 2, the first filter area is the entire area of the current image area, and the first size specification is 4*2.
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 8*1; in this case, the first division number is 2, and the first filter area is the current image area. In all areas, the first size specification is 8*1.
- all pixels in the current image area can be divided into 1 pixel group, and the size of each pixel group is 8*2; in this case, the first division number is 1, and the first filter area is the current image area. In all areas, the first size specification is 8*2.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 2*2; in this case, the first division number is 4, and the first filter area is the current image area. In all areas, the first size specification is 2*2.
- the above are just a few examples of division in horizontal prediction mode, and there is no limitation on this.
- the current image area is an 8*2 image block
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 4*2; in this case, the second division number is 2, the second filter area is the entire area of the current image area, and the second size specification is 4*2.
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 8*1; in this case, the second division number is 2, and the second filter area is the current image area. For all areas, the second size specification is 8*1.
- the second division number is 1, the second filter area is the entire area of the current image area, and the second size specification is 8*2.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 2*2; in this case, the second division number is 4, and the second filter area is the current image area. In all areas, the second size specification is 2*2.
- the above are just a few examples of division in non-horizontal prediction mode, and are not limiting.
- the current image area is a 16*1 image block
- all pixels in the current image area can be divided into 2 pixel groups, and each pixel group The size is 8*1; in this case, the first division number is 2, the first filter area is the entire area of the current image area, and the first size specification is 8*1.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 4*1; in this case, the first division number is 4, and the first filter area is the current image area. In all areas, the first size specification is 4*1.
- all pixels in the current image area can be divided into 1 pixel group, and the size of each pixel group is 16*1; in this case, the first division number is 1, and the first filter area is the current image area. In all areas, the first size specification is 16*1.
- all pixels in the current image area can be divided into 8 pixel groups, and the size of each pixel group is 2*1; in this case, the first division number is 8, and the first filter area is the current image area. In all areas, the first size specification is 2*1.
- the above are just a few examples of division in horizontal prediction mode, and there is no limitation on this.
- the current image area is a 16*1 image block
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 8*1; in this case, the second division number is 2, the second filter area is the entire area of the current image area, and the second size specification is 8*1.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 4*1; in this case, the second division number is 4, and the second filter area is the current image area. In all areas, the second size specification is 4*1.
- all pixels in the current image area can be divided into 1 pixel group, and the size of each pixel group is 16*1; in this case, the second division number is 1, and the second filter area is the current image area.
- the second size specification is 16*1.
- all pixels in the current image area can be divided into 8 pixel groups, and the size of each pixel group is 2*1; in this case, the second division number is 8, and the second filter area is the current image area. In all areas, the second size specification is 2*1.
- the above are just a few examples of division in non-horizontal prediction mode, and are not limiting.
- the current image area is an 8*1 image block
- all pixels in the current image area can be divided into 2 pixel groups, and each pixel group The size is 4*1; in this case, the first division number is 2, the first filter area is the entire area of the current image area, and the first size specification is 4*1.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 2*1; in this case, the first division number is 4, and the first filter area is the current image area. In all areas, the first size specification is 2*1.
- all pixels in the current image area can be divided into 1 pixel group, and the size of each pixel group is 8*1; in this case, the first division number is 1, and the first filter area is the current image area. In all areas, the first size specification is 8*1.
- the above are just a few examples of division in horizontal prediction mode, and there is no limitation on this.
- the current image area is an 8*1 image block
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 4*1; in this case, the second division number is 2, the second filter area is the entire area of the current image area, and the second size specification is 4*1.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 2*1; in this case, the second division number is 4, and the second filter area is the current image area. In all areas, the second size specification is 2*1.
- all pixels in the current image area can be divided into 1 pixel group, and the size of each pixel group is 8*1; in this case, the second division number is 1, and the second filter area is the current image area. For all areas, the second size specification is 8*1.
- the above are just a few examples of division in non-horizontal prediction mode, and are not limiting.
- the current image area can correspond to multiple pixel groups. For example, all pixel points in the current image area are divided into multiple pixel groups, that is, All pixels are classified.
- the following method may be used to determine multiple pixel groups corresponding to the current image area: using a default strategy to determine multiple pixel groups corresponding to the current image area.
- a default strategy can be used to determine the division attributes of the pixel group, and multiple pixel groups corresponding to the current image area are determined based on the division attributes.
- the division attribute may include at least one of division number, filter area and division method.
- the division attribute includes division number, filter area and division method, determine the division number, filter area and division method of the pixel group. , and determine multiple pixel groups corresponding to the current image area based on the number of divisions, filtering areas and division methods. If the division attribute includes the division number and the division method, the division number and division method of the pixel group are determined, and multiple pixel groups corresponding to the current image area are determined based on the division number and the division method. Among them, the number of divisions is used to indicate how many pixel groups the current image area is divided into, the filter area is used to indicate which part of the current image area is divided into multiple pixel groups, and the division method is used to indicate the size specifications of each pixel group. .
- the number of divisions, the filtering area and the dividing method can all be specified based on the default policy.
- the specified number of divisions is the first division number
- the filtering area is the first filtering area
- the dividing method is the first size specification.
- specify The division number is the second division number
- the filter area is the second filter area
- the division method is the second size specification.
- the number of divisions can be configured according to experience, for example, it can be 2, 4, 6, 8, 16, etc., and there is no limit to this.
- the filtering area can be the entire area of the current image area, or it can be a part of the current image area, and there is no limit to this.
- the size specifications corresponding to the division method can be configured based on experience.
- the size specifications can include width and height.
- the width can be 2, 4, 6, 8, 12, 16, etc. There is no limit to this.
- the height can be 1, 2, 4, 6, 8, 12, 16, etc., there is no limit to this.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 8*1.
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 16*1.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 4*2.
- all pixels in the current image area can be divided into 8 pixel groups, and the size of each pixel group is 2*2.
- the above are just a few examples and are not limiting.
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 4*2.
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 8*1.
- all pixels in the current image area can be divided into 1 pixel group, and the size of each pixel group is 8*2.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 2*2.
- the above are just a few examples and are not limiting.
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 8*1.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 4*1.
- all pixels in the current image area can be divided into 1 pixel group, and the size of each pixel group is 16*1.
- all pixels in the current image area can be divided into 8 pixel groups, and the size of each pixel group is 2*1.
- the above are just a few examples and are not limiting.
- the current image area is an 8*1 image block
- all pixels in the current image area can be divided into 2 pixel groups, and the size of each pixel group is 4*1.
- all pixels in the current image area can be divided into 4 pixel groups, and the size of each pixel group is 2*1.
- all pixels in the current image area can be divided into 1 pixel group, and the size of each pixel group is 8*1.
- the above are just a few examples and are not limiting.
- Embodiment 12 Regarding Embodiment 1 to Embodiment 8, for the encoding end and the decoding end, the current image area can correspond to multiple pixel groups. For example, all pixel points in the current image area are divided into multiple pixel groups, that is, All pixels are classified.
- the following method can be used to determine multiple pixel groups corresponding to the current image area: multiple pixel groups corresponding to the current image area are determined according to the scanning order of the current image area. That is to say, the division of pixel groups can be the same as that of the current image area.
- This method can be understood as: using the scanning order of the current image area, rearrange all pixels in the current image area into one dimension, and then divide the current image area into pixel groups.
- the scanning order of the current image area can be understood at the encoding end as the order in which the residual coefficients are encoded into the code stream. Therefore, when determining the multiple pixel groups corresponding to the current image area based on the scanning order of the current image area, the order of the multiple pixel groups is consistent with the order in which the residual coefficients are encoded into the code stream. For each pixel in the pixel group When the reconstruction value is adjusted, the waiting time can be reduced, thereby improving the hardware processing performance of the encoding side. On the decoding end, it can be understood as the order of parsing the residual coefficients from the code stream.
- the order of the multiple pixel groups is consistent with the residual
- the parsing order of the coefficients is consistent.
- the scanning order of the current image area may be a raster scanning order, such as a raster scanning order for sub-blocks of the current image area and a raster scanning order for the current image area.
- a raster scanning order such as a raster scanning order for sub-blocks of the current image area and a raster scanning order for the current image area.
- the 16*2 image block can be divided into 4 4*2 sub-blocks.
- the 16*2 image block can also be divided into two 8*2 sub-blocks, or it can also be divided into sub-blocks of other sizes. There is no restriction on this.
- the current image area can be divided into four 4*2 pixel groups.
- the raster scanning sequence is to scan the pixels of the first sub-block first, then scan the pixels of the second sub-block, then scan the pixels of the third sub-block, and then scan the pixels of the fourth sub-block. Therefore, as shown in Figure 6B, each pixel point of the first sub-block can be divided into the first pixel group, each pixel point of the second sub-block can be divided into the second pixel group, and each pixel point of the third sub-block can be divided into The pixels are divided into the third pixel group, and each pixel of the fourth sub-block is divided into the fourth pixel group.
- the current image area can be divided into two 8*2 pixel groups.
- FIG. 6E it is a raster scanning sequence for the current image area (that is, the entire current image area).
- the current image area can be divided into four pixel groups of 8*1, as shown in Figure 6F; the current image area can also be divided into four 8*1 pixel groups.
- the image area is divided into two pixel groups of 16*1, as shown in Figure 6G.
- the raster scanning sequence in Figure 6E is to first scan the 16 pixels in the first row, and then scan the 16 pixels in the second row. Therefore, the division method of Figure 6F or Figure 6G can be used.
- the scanning order of the current image area can be interlaced scanning. Taking the current image area as an image block of 16*2 as an example, see Figure 6H, which is the scanning order for the current image area, that is, the first block is scanned first. The first pixel of row 1 is scanned, then the first pixel of row 2 is scanned, then the third pixel of row 1 is scanned, and so on.
- the current image area can be divided into four 4*2 pixel groups, see Figure 6I, or the current image area can be divided into two 8*2 pixel groups, see Figure Shown in 6J.
- the pixels in columns 1, 3, 5, and 7 can be combined into a pixel group
- the pixels in columns 2, 4, 6, and 8 can be combined into a pixel group
- the pixels in columns 15 form a pixel group
- the pixels in columns 10, 12, 14, and 16 form a pixel group.
- the pixels in columns 1, 3, 5, 7, 9, 11, 13, and 15 can be combined into a pixel group
- the pixels in columns 2, 4, 6, 8, 10, 12, 14, and 16 can be combined into one pixel group.
- the pixels form a pixel group.
- Embodiment 13 Regarding Embodiment 1 to Embodiment 12, for the encoding end and the decoding end, the reconstruction value of the pixel point can be adjusted based on the adjustment value.
- the value range of the adjustment value it can be [-7,7].
- the value range of [-7,7] is just an example, and there is no limit to this.
- the value range of the adjustment value can be [-4] ,4],[-5,5],[-6,6], [-8,8], the adjustment value range can also be [-4,6], [-6,5], [-6,8], [-8,4].
- the adjustment value range The value range can be set arbitrarily.
- the value range of the adjustment value can also be determined based on the quantization step size. That is to say, the value range of the adjustment value can be related to the quantization step size. For example, when the quantization step size is 8, the maximum quantization error is 4, then the range of the adjustment value can be [-4, 4]. In this case, the adjustment value less than -4 or greater than 4 is It won't happen. Obviously, as shown in Table 2, the binarization shown in Table 1 can be adjusted. Of course, in practical applications, different adjustment value ranges can be configured for different quantization step sizes, and there is no limit to this value range. For another example, when the quantization step size is 10, the range of the adjustment value can be [-5, 5], etc., and so on.
- different quantization step sizes may correspond to different value ranges of the adjustment values, and the number of values within the value ranges of the adjustment values is the same, but there may be a value interval between two adjacent values.
- the value range corresponding to the quantization step A is [-3, 3], and there are a total of 7 values, such as -3, -2, -1, 0, 1, 2, 3, while the quantization step B ( Quantization step size B can be larger than quantization step size A)
- the corresponding value range is [-6, 6], but there are only 7 values, such as -6, -4, -2, 0, 2, 4, 6, quantization
- the corresponding value range of step size C (quantization step size C can be greater than quantization step size B) is [-9, 9], but there are only 7 values, such as -9, -6, -3, 0, 3, 6 , 9, and so on.
- Embodiment 14 Due to hardware limitations, in one possible implementation, the filtered reconstruction value of the current image area cannot be used as a reference for other image blocks in the same row, but can only be used for other images in the next row. Block reference. For other image blocks in the same row as the current image area, only the pre-filtered reconstruction value of the current image area can be referred to.
- Embodiment 15 For Embodiment 1 to Embodiment 13, the code stream sent from the encoding end to the decoding end needs to carry the following content:
- the adjustment parameter may include multiple adjustment values.
- the adjustment parameter may include one adjustment value for the channel, or may include at least two adjustment values for the channel.
- one channel is used as example.
- the current image area may correspond to multiple pixel groups.
- the code stream corresponding to the current image area only includes adjustment values corresponding to K pixel groups, and the K pixel groups are part or all of the multiple pixel groups. Pixel group.
- M can be a positive integer, and M can be less than or equal to K. That is to say, M is greater than or equal to 1, and less than or equal to K. .
- K pixel groups correspond to the same adjustment value, such as adjustment value A
- the code stream corresponding to the current image area can only include 1 adjustment value, that is, adjustment value A. Therefore, M adjustment values are 1 Adjustment value.
- the code stream corresponding to the current image area can include 2 adjustments. values, namely adjustment value A and adjustment value B. Therefore, M adjustment values are 2 adjustment values.
- the code stream corresponding to the current image area may include four adjustment values, namely adjustment value A corresponding to pixel group 1, adjustment value A corresponding to pixel group 2, adjustment value B corresponding to pixel group 3, and adjustment value B corresponding to pixel group 4. Adjustment value B, therefore, M adjustment values are 4 adjustment values.
- K pixel groups correspond to K adjustment values, such as pixel group 1 corresponds to adjustment value A, pixel group 2 corresponds to adjustment value B, pixel group 3 corresponds to adjustment value C, and pixel group 4 corresponds to adjustment value D, then the current image area corresponds to
- the code stream can include 4 adjustment values, namely adjustment value A, adjustment value B, adjustment value C and adjustment value D. Therefore, M adjustment values are 4 adjustment values.
- Pixel group indication information When the current image area corresponds to multiple pixel groups (such as 32 pixel groups), the pixel group indication information can be used to indicate K pixel groups in all pixel groups, indicating that the code stream carries the adjustments corresponding to these K pixel groups. value. Obviously, if K pixel groups are all pixel groups, then there is no need to carry pixel group indication information in the code stream, and the decoder can know that K pixel groups are all pixel groups (such as 32 pixel groups). If the K pixel groups are part of the total pixel groups, the decoder needs to know which pixel groups the K pixel groups are. In this case, the following method can be used:
- Display mode When the encoding end sends the code stream corresponding to the current image area to the decoder, the code stream corresponding to the current image area carries the pixel group indication information, indicating that the code stream carries the adjustment of the pixel group corresponding to the pixel group indication information. value.
- the decoder can parse the pixel group indication information corresponding to the K pixel groups from the code stream corresponding to the current image area, and learn that the adjustment parameters carried in the code stream are the adjustment values of the K pixel groups corresponding to the pixel group indication information.
- the pixel group indication information includes index values of K pixel groups. These index values indicate which pixel group the pixel group is among all pixel groups.
- the K pixel groups include pixel group 1, pixel group 2, and pixel group. Taking 3 and pixel group 4 as an example, the pixel group indication information may include the index value of pixel group 1, the index value of pixel group 2, the index value of pixel group 3, and the index value of pixel group 4.
- the pixel group indication information may include index values of some pixel groups in the K pixel groups, and the index values of the remaining pixel groups may be implicitly derived.
- the pixel group indication information may only include the index value of pixel group 1. Since the K pixel groups are continuous pixel groups, therefore , the index value of pixel group 2, the index value of pixel group 3, and the index value of pixel group 4 can be derived implicitly.
- Implicit method If the K pixel groups are part of all pixel groups, and the K pixel groups are K pixel groups at the default position, for example, the K pixel groups are fixed to the first 4 pixel groups, or K The pixel group is fixed to the 1st, 3rd, 5th, and 7th pixel groups, or the K pixel groups are fixed to the next 4 pixel groups. Then, the encoding end does not need to encode the K pixel groups corresponding to the code stream corresponding to the current image area. For the pixel group indication information, the decoder does not need to parse the pixel group indication information corresponding to the K pixel groups from the code stream corresponding to the current image area.
- the decoder can learn that the adjustment parameters carried in the code stream are the adjustment values of the K pixel groups at the default position.
- the adjustment parameters are the adjustment values of the first 4 pixel groups, or the adjustment parameters are the 1st and 3rd pixel groups. , 5, 7 pixel group adjustment values, or adjust The parameter is the adjustment value of the next 4 pixel groups.
- Adjust value grouping indication information When the code stream corresponding to the current image area carries M adjustment values corresponding to K pixel groups, the adjustment value grouping indication information is used to indicate the matching relationship between the M adjustment values and the K pixel groups.
- the adjustment value grouping indication information may be a flag bit, that is, the adjustment value grouping indication information only has the fourth value and The fifth value.
- the adjustment value grouping indication information may be a fourth value, and the fourth value represents the K pixels. Groups correspond to the same adjustment value.
- the decoder parses the adjustment value group indication information from the code stream, if it learns that the adjustment value group indication information is the fourth value, it can only parse out one adjustment value (such as adjustment value A) from the code stream, and use this The adjustment value is used as the adjustment value corresponding to the K pixel group.
- K pixel groups correspond to K adjustment values
- K pixel groups correspond to adjustment value A, adjustment value B, adjustment value C and adjustment value D in sequence (or correspond to adjustment value A, adjustment value A, adjustment value B and adjustment value in sequence).
- value B the adjustment value grouping indication information may be a fifth value, and the fifth value indicates that K pixel groups correspond to K adjustment values.
- the decoder parses the adjustment value group indication information from the code stream, if it learns that the adjustment value group indication information is the fifth value, it needs to parse out K adjustment values from the code stream. For example, the adjustment value A, adjustment value A, and adjustment value A must be parsed out in sequence.
- the first parsed adjustment value A corresponds to the first pixel group (for example, pixel group 1)
- the second parsed adjustment value B corresponds to the second pixel group (for example, pixel group 2)
- the second parsed adjustment value B corresponds to the second pixel group (for example, pixel group 2).
- the three parsed adjustment values C correspond to the third pixel group (eg pixel group 3)
- the fourth parsed adjustment value D corresponds to the fourth pixel group (eg pixel group 4).
- same_offset_flag represents adjustment value grouping indication information. If the value of same_offset_flag is the fourth value (such as 1), the decoder needs to parse an adjustment value from the code stream. If the value of same_offset_flag is the fourth value, Five values (such as 0), the decoder needs to parse out K adjustment values from the code stream in sequence.
- same_offset_flag is a flag bit that determines whether it is a unified compensation value. If same_offset_flag is the fourth value, it indicates a unified compensation value, that is, it is determined that K pixel groups correspond to the same adjustment value (this article The adjustment value can also be called the compensation value). At this time, only one adjustment value needs to be parsed. If same_offset_flag is the fifth value, it represents a non-uniform compensation value, that is, it is determined that K pixel groups correspond to K adjustment values. At this time, K adjustment values need to be parsed.
- the adjustment value grouping indication information may have multiple values.
- the adjustment value grouping indication information may be a fourth value, and the fourth value indicates that the K pixel groups correspond to the same adjustment value.
- the decoding end obtains After knowing that the adjustment value grouping indication information is the fourth value, it can be learned that K pixel groups correspond to the same adjustment value.
- the adjustment value grouping indication information may be a fifth value, which indicates that the first pixel group and the second pixel group correspond to one adjustment value, and the third pixel group and the fourth pixel group correspond to another adjustment value. Adjustment value.
- the adjustment value group indication information is the fifth value, it determines that the first pixel group and the second pixel group correspond to one adjustment value, and the third pixel group and the fourth pixel group correspond to another an adjustment value.
- the adjustment value group The indication information may be a third value.
- the decoder learns that the adjustment value group indication information is the third value, it determines that the first pixel group and the fourth pixel group correspond to one adjustment value, and the second pixel group and the third pixel group correspond to another an adjustment value.
- each value of the adjustment value grouping indication information corresponds to a mapping relationship, which can represent the matching relationship between M adjustment values and K pixel groups.
- the correspondence between the value and the mapping relationship can be agreed on the encoding side and the decoding side, and there is no restriction on this.
- the adjustment value grouping indication information is used to indicate the matching relationship between M adjustment values and K pixel groups.
- the decoder parses the adjustment value grouping indication information from the code stream, it can parse M adjustment values from the code stream corresponding to the current image area based on the adjustment value grouping indication information, and determine K pixels based on the M adjustment values.
- the adjustment value corresponding to the group is to determine the adjustment value corresponding to the K pixel group based on the matching relationship between the M adjustment values and the K pixel group.
- each of the above embodiments can be implemented individually or in combination.
- each embodiment in Embodiment 1 to Embodiment 15 can be implemented individually, and at least two of Embodiments 1 to 15 can be implemented individually.
- the embodiments can be implemented in combination.
- the content on the encoding side can also be applied to the decoding side, that is, the decoding side can be processed in the same way, and the content on the decoding side can also be applied to the encoding side, that is, the encoding side can be processed in the same way.
- Embodiment 16 Based on the same application concept as the above method, an embodiment of the present application also proposes a decoding device, which is applied to the decoding end.
- the decoding device includes: a memory configured to store video data; A decoder configured to implement the decoding method in the above-mentioned Embodiment 1 to Embodiment 15, that is, the processing flow of the decoding end.
- a decoder is configured to:
- the adjustment parameters corresponding to the current image area are obtained from the code stream corresponding to the current image area;
- the reconstruction value of the current image area is adjusted based on the adjustment parameter.
- the embodiment of the present application also proposes an encoding device, which is applied to the encoding end.
- the encoding device includes: a memory configured to store video data; an encoder, which It is configured to implement the encoding method in the above-mentioned Embodiment 1 to Embodiment 15, that is, the processing flow of the encoding end.
- an encoder is configured to:
- the adjustment parameters corresponding to the current image area are obtained, and the adjustment parameters are used to adjust the reconstruction value of the current image area;
- the adjustment parameters corresponding to the current image area are encoded in the code stream corresponding to the current image area.
- the decoding end device (which may also be called a video decoder) provided by the embodiment of the present application, from a hardware level, its hardware architecture schematic diagram can be seen in FIG. 7A .
- It includes: a processor 711 and a machine-readable storage medium 712.
- the machine-readable storage medium 712 stores machine-executable instructions that can be executed by the processor 711; the processor 711 is used to execute the machine-executable instructions to implement the above implementation of the present application. Decoding methods for Examples 1 to 15.
- the encoding end device (which may also be called a video encoder) provided by the embodiment of the present application, from a hardware level, its hardware architecture schematic diagram can be seen in Figure 7B. It includes: a processor 721 and a machine-readable storage medium 722.
- the machine-readable storage medium 722 stores machine-executable instructions that can be executed by the processor 721; the processor 721 is used to execute machine-executable instructions to implement the above implementation of the present application. Coding methods for Examples 1 to 15.
- embodiments of the present application also provide a machine-readable storage medium.
- Several computer instructions are stored on the machine-readable storage medium.
- the present invention can be realized. Apply the methods disclosed in the above examples, such as the decoding method or encoding method in the above embodiments.
- embodiments of this application also provide a computer application program.
- the computer application program When the computer application program is executed by a processor, it can implement the decoding method or encoding method disclosed in the above examples of this application.
- the embodiment of the present application also proposes a decoding device.
- the decoding device is applied to the decoding end.
- the decoding device includes: a determination module for determining based on the characteristic information corresponding to the current image area. Whether it is necessary to adjust the reconstruction value of the current image area; the acquisition module is used to, if it is determined that the reconstruction value of the current image area needs to be adjusted, obtain the code stream corresponding to the current image area from the code stream corresponding to the current image area. Adjustment parameters; an adjustment module, configured to adjust the reconstruction value of the current image area based on the adjustment parameters.
- the feature information includes the first type of feature information
- the determination module is specifically used to determine whether the reconstruction value of the current image region needs to be adjusted based on the feature information corresponding to the current image region: if the current image region corresponds to The first type of feature information satisfies the first specific condition, then obtain the mark bit corresponding to the adjustment control switch from the code stream corresponding to the current image area, and determine whether the current image area needs to be reconstructed based on the mark bit. Adjustment; wherein, if the flag bit is the first value, it is determined that the reconstruction value of the current image area needs to be adjusted; if the flag bit is the second value, it is determined that the current image area does not need to be reconstructed. value adjustment.
- the determination module determines whether the reconstruction value of the current image area needs to be adjusted based on the characteristic information corresponding to the current image area, it is specifically used: if the first type of characteristic information corresponding to the current image area does not satisfy the first specific condition, it is determined that there is no need to adjust the reconstruction value of the current image area.
- the feature information includes the second type of feature information
- the determination module is specifically used to determine whether the reconstruction value of the current image region needs to be adjusted based on the feature information corresponding to the current image region: if the current image region corresponds to If the second type of feature information satisfies the second specific condition, it is determined that the reconstruction value adjustment of the current image area needs to be performed; if the second type of feature information corresponding to the current image area does not meet the second specific condition, it is determined that it is not necessary Adjust the reconstruction value of the current image area.
- the adjustment parameters corresponding to the current image area include multiple adjustment values
- the current image area corresponds to multiple pixel groups
- the multiple adjustment values include adjustment values corresponding to K pixel groups
- the K pixel groups are all pixel groups or part of the pixel groups in the plurality of pixel groups
- the adjustment module adjusts the reconstruction value of the current image area based on the adjustment parameter, it is specifically used to: for each of the K pixel groups A pixel group, if the plurality of adjustment values include an adjustment value corresponding to the pixel group, then the reconstruction value of the pixel point in the pixel group is adjusted based on the adjustment value corresponding to the pixel group.
- the acquisition module is also used to obtain adjustment value grouping indication information from the code stream corresponding to the current image area; the adjustment value grouping indication information is used to indicate the adjustment value and the K pixel groups.
- the adjustment values determine the adjustment values corresponding to the K pixel groups.
- the determination module is also configured to determine multiple pixel groups corresponding to the current image area in a determining manner: determine multiple pixel groups corresponding to the current image area according to the pre-adjusted reconstruction value of each pixel point; or, based on The pre-adjusted reconstruction values of the surrounding pixels of the pixel determine the classification value of the pixel, and the multiple pixel groups corresponding to the current image area are determined according to the classification value of each pixel; or, the pixel position of each pixel is determined according to the pixel position of each pixel.
- Pixel group Describe the current picture Multiple pixel groups corresponding to the image area; or, determine multiple pixel groups corresponding to the current image area according to the prediction mode of the current image area; or determine multiple pixel groups corresponding to the current image area according to the scanning order of the current image area. Pixel group.
- the determination module determines multiple pixel groups corresponding to the current image area according to the prediction mode of the current image area, it is specifically used to: determine the number of divisions of the pixel group and the filter area according to the prediction mode of the current image area. and a dividing method; determining a plurality of pixel groups corresponding to the current image area based on the number of divisions, the filtering area and the dividing method.
- the determination module determines the division number, filtering area and division method of the pixel group according to the prediction mode of the current image area, it is specifically used to: if the prediction mode of the current image area is a horizontal prediction mode, determine the division of the pixel group.
- the number is the first division number, it is determined that the filter area of the pixel group is the first filter area, and the division method is determined to be the first size specification; if the prediction mode of the current image area is not a horizontal prediction mode, it is determined that the number of divisions of the pixel group is The second division number determines that the filter area of the pixel group is the second filter area, and determines the division method is the second size specification.
- the embodiment of the present application also proposes a coding device.
- the coding device is applied to the coding end.
- the coding device includes: a determination module for determining based on the characteristic information corresponding to the current image area. Whether it is necessary to adjust the reconstruction value of the current image area; the acquisition module is used to obtain the adjustment parameters corresponding to the current image area if it is determined that the reconstruction value of the current image area needs to be adjusted, and the adjustment parameters are used to adjust the reconstruction value of the current image area.
- the reconstruction value of the current image area is adjusted; an encoding module is used to encode the adjustment parameters corresponding to the current image area in the code stream corresponding to the current image area.
- the feature information includes the first type of feature information
- the determination module is specifically used to determine whether the reconstruction value of the current image region needs to be adjusted based on the feature information corresponding to the current image region: if the third image region corresponding to the current image region If a type of feature information meets the first specific condition, it is determined whether the reconstruction value of the current image area needs to be adjusted, and the mark bit corresponding to the adjustment control switch is encoded in the code stream corresponding to the current image area; wherein, The flag bit is used to indicate whether the reconstruction value adjustment of the current image area needs to be performed; if the first type of feature information corresponding to the current image area does not meet the first specific condition, it is determined that the reconstruction value adjustment of the current image area does not need to be performed. .
- the current image area corresponds to multiple pixel groups
- the adjustment parameters corresponding to the current image area include multiple adjustment values
- the multiple adjustment values include adjustment values corresponding to K pixel groups
- the K The pixel group is all pixel groups or part of the pixel groups in the plurality of pixel groups; when the encoding module encodes the adjustment parameters corresponding to the current image area in the code stream corresponding to the current image area, it is specifically used to: M adjustment values corresponding to the K pixel groups are encoded in the code stream corresponding to the current image area, M is a positive integer, and M is less than or equal to K; wherein the M adjustment values are based on the K The adjustment value corresponding to the pixel group is determined; the encoding module is also used to encode adjustment value grouping indication information in the code stream corresponding to the current image area, and the adjustment value grouping indication information is used to indicate the M adjustment values and the matching relationship between the K pixel groups.
- the determination module is further configured to determine multiple pixel groups corresponding to the current image area in the following manner: determine multiple pixel groups corresponding to the current image area according to the pre-adjusted reconstruction value of each pixel point; or , determine the classification value of the pixel based on the pre-adjusted reconstruction values of the surrounding pixels, and determine multiple pixel groups corresponding to the current image area according to the classification value of each pixel; or, according to the pixel position of each pixel Determine multiple pixel groups corresponding to the current image area; or determine multiple pixel groups corresponding to the current image area according to the prediction mode of the current image area; or determine the current image area according to the scanning order of the current image area Corresponding multiple pixel groups.
- the determination module determines multiple pixel groups corresponding to the current image area according to the prediction mode of the current image area, it is specifically used to: determine the number of divisions of the pixel group and the filter area according to the prediction mode of the current image area. and a dividing method; determining a plurality of pixel groups corresponding to the current image area based on the number of divisions, the filtering area and the dividing method.
- the determination module determines the division number, filtering area and division method of the pixel group according to the prediction mode of the current image area, it is specifically used to: if the prediction mode of the current image area is a horizontal prediction mode, determine the division of the pixel group.
- the number is the first division number, and the filter area that determines the pixel group is the first
- the division method is the first size specification
- the prediction mode of the current image area is not the horizontal prediction mode
- it is determined that the number of divisions of the pixel group is the second division number
- it is determined that the filter area of the pixel group is the second filter area , determine the division method is the second size specification.
- embodiments of the present application may be provided as methods, systems, or computer program products.
- the application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects.
- Embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) embodying computer-usable program code.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
Description
Claims (24)
- 一种解码方法,其特征在于,应用于解码端,所述方法包括:基于当前图像区域对应的特征信息确定是否需要对所述当前图像区域进行重建值调整;若确定需要对所述当前图像区域进行所述重建值调整,则从所述当前图像区域对应的码流中获取所述当前图像区域对应的调整参数;基于所述调整参数对所述当前图像区域的重建值进行调整。
- 根据权利要求1所述的方法,其特征在于,所述特征信息包括第一类特征信息,所述基于当前图像区域对应的特征信息确定是否需要对所述当前图像区域进行所述重建值调整,包括:若所述当前图像区域对应的所述第一类特征信息满足第一特定条件,则从所述当前图像区域对应的码流中获取调整控制开关对应的标记位,基于所述标记位确定是否需要对所述当前图像区域进行重建值调整;其中,若所述标记位为第一取值,确定需要对所述当前图像区域进行所述重建值调整;若所述标记位为第二取值,确定不需要对所述当前图像区域进行所述重建值调整。
- 根据权利要求2所述的方法,其特征在于,所述基于当前图像区域对应的特征信息确定是否需要对所述当前图像区域进行所述重建值调整,包括:若所述当前图像区域对应的所述第一类特征信息不满足所述第一特定条件,则确定不需要对所述当前图像区域进行所述重建值调整。
- 根据权利要求2或3所述的方法,其特征在于,所述第一类特征信息包括以下至少一种:预测模式,码流缓冲区内的数据量,量化步长;其中,若所述第一类特征信息包括所述预测模式,在所述预测模式是指定预测模式时,确定所述预测模式满足所述第一特定条件,否则,确定所述预测模式不满足所述第一特定条件。
- 根据权利要求4所述的方法,其特征在于,所述指定预测模式是普通帧内预测模式。
- 根据权利要求1所述的方法,其特征在于,所述当前图像区域对应的调整参数包括多个调整值,所述当前图像区域对应多个像素组,所述多个调整值包括K个像素组对应的调整值,所述K个像素组是所述多个像素组中的全部像素组或部分像素组;所述基于所述调整参数对所述当前图像区域的重建值进行调整,包括:针对所述K个像素组中的每个像素组,若所述多个调整值包括该像素组对应的调整值,则基于该像素组对应的调整值对该像素组内的像素点的所述重建值进行调整,其中,K为大于或等于1的整数。
- 根据权利要求6所述的方法,其特征在于,若所述K个像素组是所述多个像素组中的部分像素组,所述方法还包括:从所述当前图像区域对应的所述码流中获取所述K个像素组对应的像素组指示信息;基于所述像素组指示信息从所有像素组中选取所述K个像素组;其中,所述像素组指示信息用于区分所有类别的像素组中的目标类别的像素组。
- 根据权利要求6所述的方法,其特征在于,所述当前图像区域对应多个像素组包括:按照所述当前图像区域的各所述像素点的像素位置确定所述当前图像区域对应的所述多个像素组;或者,根据所述当前图像区域的预测模式确定所述当前图像区域对应的所述多个像素组。
- 根据权利要求8所述的方法,其特征在于,所述根据所述当前图像区域的预测 模式确定所述当前图像区域对应的所述多个像素组,包括:根据所述当前图像区域的所述预测模式确定像素组的划分数量、滤波区域和划分方式;基于所述划分数量、所述滤波区域和所述划分方式确定所述当前图像区域对应的所述多个像素组。
- 根据权利要求9所述的方法,其特征在于,所述根据所述当前图像区域的所述预测模式确定像素组的划分数量、滤波区域和划分方式,包括:若所述当前图像区域的所述预测模式是水平预测模式,则确定所述像素组的所述划分数量是第一划分数量,确定所述像素组的所述滤波区域是第一滤波区域,确定所述划分方式是第一尺寸规格;若所述当前图像区域的所述预测模式不是所述水平预测模式,则确定所述像素组的所述划分数量是第二划分数量,确定所述像素组的所述滤波区域是第二滤波区域,确定所述划分方式是第二尺寸规格。
- 根据权利要求8或9所述的方法,其特征在于,若所述当前图像区域是16*2的图像块,所述根据所述当前图像区域的预测模式确定所述当前图像区域对应的所述多个像素组,包括:若所述当前图像区域的所述预测模式是水平预测模式,则将所述当前图像区域的所有所述像素点划分至4个像素组,每个所述像素组的尺寸是8*1;若所述当前图像区域的所述预测模式不是所述水平预测模式,则将所述当前图像区域的所有所述像素点划分至4个像素组,每个所述像素组的尺寸是4*2。
- 一种编码方法,其特征在于,应用于编码端,所述方法包括:基于当前图像区域对应的特征信息确定是否需要对所述当前图像区域进行重建值调整;若确定需要对所述当前图像区域进行所述重建值调整,则获取所述当前图像区域对应的调整参数,所述调整参数用于对所述当前图像区域的重建值进行调整;在所述当前图像区域对应的码流中编码所述当前图像区域对应的所述调整参数。
- 根据权利要求12所述的方法,其特征在于,所述特征信息包括第一类特征信息,所述基于当前图像区域对应的特征信息确定是否需要对所述当前图像区域进行所述重建值调整,包括:若所述当前图像区域对应的所述第一类特征信息满足第一特定条件,则确定是否需要对所述当前图像区域进行所述重建值调整,并在所述当前图像区域对应的所述码流中编码调整控制开关对应的标记位,其中,所述标记位用于指示是否需要对所述当前图像区域进行所述重建值调整;若所述当前图像区域对应的所述第一类特征信息不满足所述第一特定条件,则确定不需要对所述当前图像区域进行所述重建值调整。
- 根据权利要求13所述的方法,其特征在于,所述第一类特征信息包括以下至少一种:预测模式,码流缓冲区内的数据量,量化步长;其中,若所述第一类特征信息包括所述预测模式,在所述预测模式是指定预测模式时,确定所述预测模式满足所述第一特定条件,否则,确定所述预测模式不满足所述第一特定条件。
- 根据权利要求12所述的方法,其特征在于,所述当前图像区域对应多个像素组,所述当前图像区域对应的所述调整参数包括多个调整值,所述多个调整值包括K个像素组对应的调整值,所述K个像素组是所述多个像素组中的全部像素组或部分像素组。
- 根据权利要求15所述的方法,其特征在于,所述当前图像区域对应多个像素组包括:按照所述当前图像区域的各所述像素点的像素位置确定所述当前图像区域对应的所述多个像素组;或者,根据所述当前图像区域的预测模式确定所述当前图像区域对应的所述多个像素组。
- 根据权利要求16所述的方法,其特征在于,所述根据所述当前图像区域的预测模式确定所述当前图像区域对应的所述多个像素组,包括:根据所述当前图像区域的所述预测模式确定像素组的划分数量、滤波区域和划分方式;基于所述划分数量、所述滤波区域和所述划分方式确定所述当前图像区域对应的所述多个像素组。
- 根据权利要求17所述的方法,其特征在于,所述根据所述当前图像区域的所述预测模式确定像素组的划分数量、滤波区域和划分方式,包括:若所述当前图像区域的所述预测模式是水平预测模式,则确定所述像素组的所述划分数量是第一划分数量,确定所述像素组的所述滤波区域是第一滤波区域,确定所述划分方式是第一尺寸规格;若所述当前图像区域的所述预测模式不是所述水平预测模式,则确定所述像素组的所述划分数量是第二划分数量,确定所述像素组的所述滤波区域是第二滤波区域,确定所述划分方式是第二尺寸规格。
- 一种解码装置,其特征在于,所述解码装置包括:存储器,其经配置以存储视频数据;解码器,其经配置以实现:基于当前图像区域对应的特征信息确定是否需要对所述当前图像区域进行重建值调整;若确定需要对所述当前图像区域进行所述重建值调整,则从所述当前图像区域对应的码流中获取所述当前图像区域对应的调整参数;基于所述调整参数对所述当前图像区域的重建值进行调整。
- 一种编码装置,其特征在于,所述编码装置包括:存储器,其经配置以存储视频数据;编码器,其经配置以实现:基于当前图像区域对应的特征信息确定是否需要对所述当前图像区域进行重建值调整;若确定需要对所述当前图像区域进行所述重建值调整,则获取所述当前图像区域对应的调整参数,所述调整参数用于对所述当前图像区域的重建值进行调整;在所述当前图像区域对应的码流中编码所述当前图像区域对应的所述调整参数。
- 一种解码端设备,其特征在于,包括:处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;所述处理器用于执行所述机器可执行指令,以实现权利要求1至11任一项所述的方法。
- 一种编码端设备,其特征在于,包括:处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;所述处理器用于执行所述机器可执行指令,以实现权利要求12至18任一项所述的方法。
- 一种机器可读存储介质,其特征在于,所述机器可读存储介质上存储有计算机指令,所述计算机指令被至少一个处理器执行时,实现权利要求1至11任一项所述的方法。
- 一种机器可读存储介质,其特征在于,所述机器可读存储介质上存储有计算机指令,所述计算机指令被至少一个处理器执行时,实现权利要求12至18任一项所述的方法。
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23795501.8A EP4518312A4 (en) | 2022-04-27 | 2023-04-26 | DECODING METHOD AND APPARATUS, ENCODING METHOD AND APPARATUS, AND RELATED DEVICES |
| US18/860,278 US20250301176A1 (en) | 2022-04-27 | 2023-04-26 | Decoding method and apparatus, encoding method and apparatus, and devices therefor |
| JP2024563448A JP2025514248A (ja) | 2022-04-27 | 2023-04-26 | 復号、符号化方法、装置及びそのデバイス |
| KR1020247037644A KR20250002469A (ko) | 2022-04-27 | 2023-04-26 | 디코딩 방법, 인코딩 방법, 장치 및 이의 기기 |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210458047.7 | 2022-04-27 | ||
| CN202210458047.7A CN116095307B (zh) | 2022-04-27 | 2022-04-27 | 一种解码、编码方法、装置及其设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023208069A1 true WO2023208069A1 (zh) | 2023-11-02 |
Family
ID=86208885
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/090956 Ceased WO2023208069A1 (zh) | 2022-04-27 | 2023-04-26 | 一种解码、编码方法、装置及其设备 |
Country Status (7)
| Country | Link |
|---|---|
| US (1) | US20250301176A1 (zh) |
| EP (1) | EP4518312A4 (zh) |
| JP (1) | JP2025514248A (zh) |
| KR (1) | KR20250002469A (zh) |
| CN (2) | CN116506619B (zh) |
| TW (1) | TWI834547B (zh) |
| WO (1) | WO2023208069A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119893120B (zh) * | 2023-10-25 | 2025-11-07 | 杭州海康威视数字技术股份有限公司 | 一种解码、编码方法、装置及其设备 |
| CN119788873B (zh) * | 2024-11-15 | 2025-12-09 | 北京大学 | 屏幕图像的后处理增强方法及设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090316797A1 (en) * | 2008-06-23 | 2009-12-24 | Sungkyunkwan University Foundation For Corporate Collaboration | Distributed coded video decoding apparatus and method capable of successively improving side information on the basis of reliability of reconstructed data |
| CN102215389A (zh) * | 2010-04-09 | 2011-10-12 | 华为技术有限公司 | 一种局部亮度补偿的视频编解码方法及装置 |
| CN104012095A (zh) * | 2011-12-22 | 2014-08-27 | 三星电子株式会社 | 使用根据按最大编码单元的像素分类的偏移调整的视频编码方法及其设备,和视频解码方法及其设备 |
| CN107852493A (zh) * | 2015-05-12 | 2018-03-27 | 三星电子株式会社 | 用于样点值补偿的图像编码方法和装置以及用于样点值补偿的图像解码方法和装置 |
| US20200349677A1 (en) * | 2019-05-03 | 2020-11-05 | Samsung Electronics Co., Ltd. | Image processing apparatus and image processing method thereof |
Family Cites Families (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105376573A (zh) * | 2006-11-08 | 2016-03-02 | 汤姆逊许可证公司 | 用于环内去伪影滤波的方法和设备 |
| TWI359617B (en) * | 2008-07-03 | 2012-03-01 | Univ Nat Taiwan | Low-complexity and high-quality error concealment |
| EP2584781A4 (en) * | 2010-06-17 | 2016-03-09 | Sharp Kk | PILOT FILING DEVICE, DECOMPOSITION DEVICE, ENCRYPTION DEVICE AND DATA STRUCTURE |
| CN106165417A (zh) * | 2014-04-23 | 2016-11-23 | 索尼公司 | 图像处理设备和图像处理方法 |
| CN116347074A (zh) * | 2018-03-09 | 2023-06-27 | 韩国电子通信研究院 | 使用样点滤波的图像编码/解码方法和设备 |
| KR20190115426A (ko) * | 2018-04-02 | 2019-10-11 | 세종대학교산학협력단 | 영상 부호화/복호화 방법 및 장치 |
| TWI764015B (zh) * | 2018-07-13 | 2022-05-11 | 弗勞恩霍夫爾協會 | 分區框內寫碼技術 |
| CN111989925B (zh) * | 2019-03-22 | 2024-04-26 | 罗斯德尔动力有限责任公司 | 基于dmvr和bdof的帧间预测方法及其设备 |
| US11039150B2 (en) * | 2019-04-19 | 2021-06-15 | Tencent America LLC | Method and apparatus for video coding |
| CN115022639B (zh) * | 2019-09-05 | 2024-10-25 | 杭州海康威视数字技术股份有限公司 | 一种编解码方法、装置及其设备 |
| CN114079791A (zh) * | 2020-08-21 | 2022-02-22 | Oppo广东移动通信有限公司 | 编码方法、解码方法及相关装置 |
| CN116095309B (zh) * | 2022-01-19 | 2024-10-25 | 杭州海康威视数字技术股份有限公司 | 一种解码、编码方法、装置及其设备 |
-
2022
- 2022-04-27 CN CN202310492994.2A patent/CN116506619B/zh active Active
- 2022-04-27 CN CN202210458047.7A patent/CN116095307B/zh active Active
-
2023
- 2023-04-26 JP JP2024563448A patent/JP2025514248A/ja active Pending
- 2023-04-26 WO PCT/CN2023/090956 patent/WO2023208069A1/zh not_active Ceased
- 2023-04-26 KR KR1020247037644A patent/KR20250002469A/ko active Pending
- 2023-04-26 EP EP23795501.8A patent/EP4518312A4/en active Pending
- 2023-04-26 US US18/860,278 patent/US20250301176A1/en active Pending
- 2023-04-27 TW TW112115704A patent/TWI834547B/zh active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090316797A1 (en) * | 2008-06-23 | 2009-12-24 | Sungkyunkwan University Foundation For Corporate Collaboration | Distributed coded video decoding apparatus and method capable of successively improving side information on the basis of reliability of reconstructed data |
| CN102215389A (zh) * | 2010-04-09 | 2011-10-12 | 华为技术有限公司 | 一种局部亮度补偿的视频编解码方法及装置 |
| CN104012095A (zh) * | 2011-12-22 | 2014-08-27 | 三星电子株式会社 | 使用根据按最大编码单元的像素分类的偏移调整的视频编码方法及其设备,和视频解码方法及其设备 |
| CN107852493A (zh) * | 2015-05-12 | 2018-03-27 | 三星电子株式会社 | 用于样点值补偿的图像编码方法和装置以及用于样点值补偿的图像解码方法和装置 |
| US20200349677A1 (en) * | 2019-05-03 | 2020-11-05 | Samsung Electronics Co., Ltd. | Image processing apparatus and image processing method thereof |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4518312A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| TWI834547B (zh) | 2024-03-01 |
| CN116095307A (zh) | 2023-05-09 |
| CN116506619B (zh) | 2024-10-29 |
| EP4518312A1 (en) | 2025-03-05 |
| KR20250002469A (ko) | 2025-01-07 |
| CN116095307B (zh) | 2024-10-25 |
| EP4518312A4 (en) | 2025-09-24 |
| US20250301176A1 (en) | 2025-09-25 |
| JP2025514248A (ja) | 2025-05-02 |
| TW202344046A (zh) | 2023-11-01 |
| CN116506619A (zh) | 2023-07-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102874861B1 (ko) | 매트릭스 기반 인트라 예측 및 2차 변환 코어 선택을 조화시키는 인코더, 디코더 및 대응 방법 | |
| US20090296812A1 (en) | Fast encoding method and system using adaptive intra prediction | |
| CN103338371A (zh) | 一种快速高效率视频编码帧内模式判决方法 | |
| CN115053524B (zh) | 用于视频压缩的低复杂度自适应量化 | |
| TW201904300A (zh) | 在計算設備中實現的方法 | |
| TWI834547B (zh) | 一種解碼、編碼方法、裝置及其設備 | |
| CN114598873B (zh) | 量化参数的解码方法和装置 | |
| WO2023138562A1 (zh) | 图像解码方法、图像编码方法及相应的装置 | |
| WO2022166462A1 (zh) | 编码、解码方法和相关设备 | |
| WO2024093994A1 (zh) | 编解码方法和装置 | |
| CN116647673B (zh) | 一种视频编解码方法及装置 | |
| CN113766227B (zh) | 用于图像编码和解码的量化和反量化方法及装置 | |
| CN116095309B (zh) | 一种解码、编码方法、装置及其设备 | |
| WO2023272533A1 (zh) | 编解码方法、编码器、解码器以及存储介质 | |
| TWI885844B (zh) | 一種編解碼方法、裝置及其設備 | |
| WO2021164014A1 (zh) | 视频编码方法及装置 | |
| HK40092393A (zh) | 一种解码、编码方法、装置及其设备 | |
| HK40092393B (zh) | 一种解码、编码方法、装置及其设备 | |
| HK40092391B (zh) | 一种解码、编码方法、装置及其设备 | |
| HK40092391A (zh) | 一种解码、编码方法、装置及其设备 | |
| CN119967161A (zh) | 一种编解码方法、装置及其设备 | |
| WO2024188102A1 (zh) | 编解码方法和装置 | |
| WO2024012474A1 (zh) | 一种基于神经网络的图像解码、编码方法、装置及其设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23795501 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2024563448 Country of ref document: JP Ref document number: 18860278 Country of ref document: US |
|
| ENP | Entry into the national phase |
Ref document number: 20247037644 Country of ref document: KR Kind code of ref document: A |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 1020247037644 Country of ref document: KR |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023795501 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2023795501 Country of ref document: EP Effective date: 20241127 |
|
| WWP | Wipo information: published in national office |
Ref document number: 18860278 Country of ref document: US |