CN110944188A - Method, device and system for sample adaptive compensation - Google Patents

Method, device and system for sample adaptive compensation Download PDF

Info

Publication number
CN110944188A
CN110944188A CN201811109926.9A CN201811109926A CN110944188A CN 110944188 A CN110944188 A CN 110944188A CN 201811109926 A CN201811109926 A CN 201811109926A CN 110944188 A CN110944188 A CN 110944188A
Authority
CN
China
Prior art keywords
image block
sao
parameter
current image
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811109926.9A
Other languages
Chinese (zh)
Other versions
CN110944188B (en
Inventor
方树清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201811109926.9A priority Critical patent/CN110944188B/en
Publication of CN110944188A publication Critical patent/CN110944188A/en
Application granted granted Critical
Publication of CN110944188B publication Critical patent/CN110944188B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods 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/176Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods 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/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The disclosure relates to a method, a device and a system for sample adaptive compensation, belonging to the technical field of video coding and decoding. The method comprises the following steps: receiving an encoded stream from an encoding end; when determining that SAO parameters of appointed candidate image blocks are selected from an SAO parameter candidate list of the current image block to perform SAO compensation on the current image block according to the coding stream, establishing an SAO parameter candidate list of the current image block, wherein the SAO parameter candidate list comprises first SAO parameters of first candidate image blocks, and the first candidate image blocks are image blocks in a coded image frame before the current image frame where the current image block is located; acquiring an SAO parameter of an appointed candidate image block according to a position index of the SAO parameter of the appointed candidate image block carried in a coded stream in an SAO parameter candidate list; and carrying out SAO compensation on the current image block. With the present disclosure, the code rate may be reduced by multiplexing the first SAO parameter of the first candidate image block.

Description

Method, device and system for sample adaptive compensation
Technical Field
The present disclosure relates to the field of video encoding and decoding technologies, and in particular, to a method, an apparatus, and a system for sample adaptive compensation.
Background
With the development of science and technology, the video encoding and decoding technology is also continuously improved. In general, processes such as prediction, transformation, quantization, inverse transformation, reconstruction, filtering, and entropy encoding may be performed in the encoding process, and processes such as entropy decoding, inverse quantization, inverse transformation, reconstruction, and filtering may be performed in the decoding process. Wherein, for a strong edge of an image, a reconstructed image generates a moire phenomenon around the edge due to quantization distortion of a high-frequency alternating current coefficient, and the distortion is called a ringing effect.
In order to solve the above problems, a Sample Adaptive Offset (SAO) technique in High Efficiency Video Coding (HEVC) is proposed, in which a certain compensation may be performed on a reconstructed frame to reduce or even remove a ripple phenomenon occurring in the reconstructed frame. In order to slow down and even remove the ripple phenomenon in the reconstructed frame, inverse quantization, inverse transformation and reconstruction can be carried out at the encoding end to obtain the reconstructed frame, the reconstructed frame is further divided according to the preset size to obtain a plurality of image units, and then the SAO parameter corresponding to each image unit is determined. The encoding end needs to send the SAO parameter corresponding to each image unit to the decoding end, so that the decoding end can compensate the data to be compensated of the corresponding image unit through the received SAO parameter, and further can slow down or even remove the ripple phenomenon occurring in the reconstructed frame.
In carrying out the present disclosure, the inventors found that at least the following problems exist:
since the encoding end needs to send the SAO parameter corresponding to each image unit to the decoding end, the data amount sent by the encoding end to the decoding end may be increased, and then the network overhead is increased.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides the following technical solutions:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for adaptive sample compensation, the method including:
establishing an SAO parameter candidate list of a current image block, wherein the SAO parameter candidate list comprises a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter which participate in SAO compensation of the current image block;
when it is determined that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on current image blocks, carrying position indexes of the specified candidate image blocks in the SAO parameter candidate list in an encoding stream, wherein rate distortion cost corresponding to the SAO parameters of the specified candidate image blocks in the SAO parameter candidate list is minimum;
and sending the coded stream carrying the position index to a decoding end.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for adaptive sample compensation, the method comprising:
establishing an SAO parameter candidate list of a current image block, wherein the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameters include a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter that do not fully participate in SAO compensation for the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation for the current image block;
when it is determined that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on current image blocks, carrying position indexes of the specified candidate image blocks in the SAO parameter candidate list in an encoding stream, wherein rate distortion cost corresponding to the SAO parameters of the specified candidate image blocks in the SAO parameter candidate list is minimum;
and sending the coded stream carrying the position index to a decoding end.
According to a third aspect of the embodiments of the present disclosure, there is provided a method for adaptive sample compensation, the method including:
receiving an encoded stream from an encoding end;
when determining that SAO parameters of appointed candidate image blocks are selected from an SAO parameter candidate list of the current image block to perform SAO compensation on the current image block according to the coding stream, establishing an SAO parameter candidate list of the current image block, wherein the SAO parameter candidate list comprises first SAO parameters of at least one first candidate image block, and the first candidate image block is an image block in a coded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter of SAO compensation of the current image block;
acquiring the SAO parameters of the appointed candidate image blocks according to the position indexes of the SAO parameters of the appointed candidate image blocks carried in the coding stream in the SAO parameter candidate list;
and carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a method for adaptive sample compensation, the method including:
receiving an encoded stream from an encoding end;
when the SAO parameter of the appointed candidate image block is selected from an SAO parameter candidate list of the current image block to perform SAO compensation on the current image block according to the coding stream, establishing an SAO parameter candidate list of the current image block, wherein the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block which is adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of SAO compensation of the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation of the current image block;
acquiring an SAO parameter of the specified candidate image block according to a position index of the specified candidate image block carried in the coding stream in the SAO parameter candidate list; wherein, in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum;
and carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an apparatus for adaptive sample compensation, the apparatus comprising:
the image processing device comprises an establishing module, a processing module and a processing module, wherein the establishing module is used for establishing an SAO parameter candidate list of a current image block, the SAO parameter candidate list comprises a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter which participate in SAO compensation of the current image block;
an adding module, configured to carry a position index of a specified candidate image block in an SAO parameter candidate list in an encoding stream when it is determined that SAO parameters of the specified candidate image block are selected from the SAO parameter candidate list to perform SAO compensation on a current image block, where a rate-distortion cost corresponding to the SAO parameters of the specified candidate image block is minimum in the SAO parameter candidate list;
and the sending module is used for sending the coding stream carrying the position index to a decoding end.
According to a sixth aspect of the embodiments of the present disclosure, there is provided an apparatus for adaptive sample compensation, the apparatus comprising:
the image processing device comprises an establishing module, a searching module and a processing module, wherein the establishing module is used for establishing an SAO parameter candidate list of a current image block, the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block which is adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameters include a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter that do not fully participate in SAO compensation for the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation for the current image block;
an adding module, configured to carry a position index of a specified candidate image block in an SAO parameter candidate list in an encoding stream when it is determined that SAO parameters of the specified candidate image block are selected from the SAO parameter candidate list to perform SAO compensation on a current image block, where a rate-distortion cost corresponding to the SAO parameters of the specified candidate image block is minimum in the SAO parameter candidate list;
and the sending module is used for sending the coding stream carrying the position index to a decoding end.
According to a seventh aspect of the embodiments of the present disclosure, there is provided an apparatus for adaptive sample compensation, the apparatus including:
a receiving module, configured to receive an encoded stream from an encoding end;
the establishing module is used for establishing an SAO parameter candidate list of the current image block when the SAO parameter of the appointed candidate image block is determined to be selected from the SAO parameter candidate list of the current image block for SAO compensation of the current image block according to the coding stream, wherein the SAO parameter candidate list comprises at least one first SAO parameter of a first candidate image block, and the first candidate image block is an image block in a coded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter of SAO compensation of the current image block;
an obtaining module, configured to obtain an SAO parameter of the specified candidate image block according to a position index, in the SAO parameter candidate list, of an SAO parameter of the specified candidate image block carried in the encoded stream;
and the compensation module is used for carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
According to an eighth aspect of the embodiments of the present disclosure, there is provided an apparatus for adaptive sample compensation, the apparatus comprising:
a receiving module, configured to receive an encoded stream from an encoding end;
the establishing module is used for establishing an SAO parameter candidate list of the current image block when the SAO parameter of the appointed candidate image block is determined to be selected from the SAO parameter candidate list of the current image block for SAO compensation of the current image block according to the coding stream, wherein the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block which is adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of SAO compensation of the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation of the current image block;
an obtaining module, configured to obtain an SAO parameter of the specified candidate image block according to a position index, in the SAO parameter candidate list, of the specified candidate image block carried in the encoded stream; wherein, in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum;
and the compensation module is used for carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
According to a ninth aspect of the embodiments of the present disclosure, there is provided a system for adaptive sample compensation, the system comprising an encoding side and a decoding side, wherein:
the encoding end is configured to execute the method provided by the first aspect of the embodiments of the present disclosure;
the decoding end is configured to perform the method provided in the third aspect of the embodiments of the present disclosure.
According to a tenth aspect of the embodiments of the present disclosure, there is provided a system for adaptive sample compensation, the system comprising an encoding side and a decoding side, wherein:
the encoding end is configured to execute the method provided by the second aspect of the embodiments of the present disclosure;
the decoding end is configured to perform the method provided in the fourth aspect of the embodiments of the present disclosure.
According to an eleventh aspect of the embodiments of the present disclosure, there is provided an encoding end, the encoding end comprising a processor, a communication interface, a memory and a communication bus, wherein:
the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is used for executing the program stored in the memory so as to realize the method for sample adaptive compensation.
According to a twelfth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having a computer program stored therein, the computer program, when executed by a processor, implementing the above-mentioned method for adaptive sample point compensation.
According to a thirteenth aspect of the embodiments of the present disclosure, there is provided a decoding end comprising a processor, a communication interface, a memory and a communication bus, wherein:
the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is used for executing the program stored in the memory so as to realize the method for sample adaptive compensation.
According to a fourteenth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having a computer program stored therein, the computer program, when executed by a processor, implementing the above-mentioned method for adaptive sample point compensation.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
by the method provided by the present disclosure, by multiplexing the first SAO parameter of the first candidate image block, the encoded stream may only carry the position index of the first SAO parameter of the multiplexed first candidate image block, instead of the first SAO parameter of the first candidate image block, and the data amount received by the decoding end may be reduced, thereby reducing the network overhead. In addition, the first candidate image block may be an image block in an encoded image frame before the current image frame where the current image block is located, and the first candidate image block has an association with the current image block, so that the code rate may be reduced by multiplexing the first SAO parameter of the first candidate image block.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. In the drawings:
FIG. 1 is a block diagram illustrating an encoding side according to an exemplary embodiment;
FIG. 2 is a block diagram illustrating a decoding side according to an exemplary embodiment;
FIG. 3 is a flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating a first candidate image block according to an exemplary embodiment;
FIG. 5 is a schematic flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 6 is a schematic flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 7 is a flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 8 is a schematic diagram illustrating a second candidate image block in accordance with an exemplary embodiment;
FIG. 9 is a schematic flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 10 is a schematic flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 11 is a schematic flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 12 is a schematic flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 13 is a schematic flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 14 is a schematic flow chart diagram illustrating a method of adaptive compensation of samples in accordance with an exemplary embodiment;
FIG. 15 is a block diagram illustrating an apparatus for adaptive sample compensation according to an exemplary embodiment;
FIG. 16 is a block diagram illustrating an apparatus for adaptive compensation of samples according to an exemplary embodiment;
FIG. 17 is a block diagram illustrating an apparatus for adaptive sample compensation in accordance with an exemplary embodiment;
FIG. 18 is a block diagram illustrating an apparatus for adaptive compensation of samples according to an exemplary embodiment;
FIG. 19 is a block diagram illustrating a computer device, according to an example embodiment.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The embodiment of the disclosure provides a method for sample adaptive compensation, which can be realized by a decoding end and also can be realized by the cooperation of a coding end.
First, the structure of the encoding end will be briefly described. In the encoding end, the original video frame is processed as follows: prediction, transformation, quantization, entropy coding, inverse quantization, inverse transformation, reconstruction, filtering, etc. Corresponding to these processes, as shown in fig. 1, the encoding end may include an encoding intra-frame prediction module, an encoding inter-frame prediction module, a transformation module, a quantization module, an entropy encoding module, an inverse quantization module, an inverse transformation module, a reconstruction module, a filtering module, and a reference image caching module.
In fig. 1, the encoding intra prediction module and the encoding inter prediction module may determine intra prediction data, intra prediction related information, inter prediction data, and inter prediction related information, respectively, based on the undistorted frame image. And the switch connected with the coding intra-frame prediction module and the coding inter-frame prediction module is used for selecting whether the coding intra-frame prediction module or the coding inter-frame prediction module is used, and the selected module provides intra-frame prediction data or inter-frame prediction data to the adder. And obtaining a prediction residual after the intra-frame prediction data or the inter-frame prediction data passes through a subtracter. And transforming and quantizing the prediction residual error to obtain a quantization coefficient. The quantization coefficients, the intra-frame prediction related information, the inter-frame prediction related information, and the like are input into an entropy encoder to be entropy encoded, and finally, an encoded stream for sending to a decoding end is obtained.
The structure of the decoding side will be briefly described below. In the decoding end, as shown in fig. 2, the decoding end may include a decoding intra-frame prediction module, a decoding inter-frame prediction module, an entropy decoding module, an inverse quantization module, an inverse transformation module, a reconstruction module, a filtering module, a reference image caching module, and a video playing caching module.
The video frame image that is undistorted in the decoding end may be obtained by: and carrying out entropy decoding on the coded stream to obtain a quantization coefficient. And performing inverse quantization and inverse transformation on the quantized coefficients to restore the prediction residual. And in the reconstruction module, the prediction residual is added back to the corresponding intra-frame prediction data and inter-frame prediction data to obtain a frame image to be filtered. The frame image to be filtered is a distorted video frame image, and in the process of transformation and quantization in the encoding end, certain information of the original video frame image, such as high-frequency component information in the original video frame image, is lost, so that a distortion phenomenon exists between the frame image to be filtered and the original video frame image. Therefore, the frame image to be filtered needs to be correspondingly processed, so as to reduce the distortion phenomenon between the frame image to be filtered and the original video frame image. Specifically, the frame image to be filtered may be subjected to filtering processing, and the filtering processing may include deblocking filtering processing, SAO compensation processing, and the like. After the SAO compensation processing is performed on the frame image to be filtered, the ripple phenomenon caused by the ringing effect in the frame image to be filtered can be reduced or even removed.
An exemplary embodiment of the present disclosure provides a method for adaptive sample compensation, as shown in fig. 3, a processing flow of the method may include the following steps:
step S310, the decoding end receives the coding stream from the coding end, and when determining to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for SAO compensation of the current image block according to the coding stream, an SAO parameter candidate list of the current image block is established.
The SAO parameter candidate list may include a first SAO parameter of at least one first candidate image block, where the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located. The first SAO parameters include SAO compensated luma component parameters, first chroma component parameters, and second chroma component parameters of the current image block.
In implementation, the decoding end may receive the encoded stream sent by the encoding end, and perform a decoding operation on the current image frame. The decoding end may perform SAO compensation in units of tiles, where a tile may be a CTU (Coding Tree Unit) or a Unit with other sizes. The CTU has a size of 64 × 64.
As shown in fig. 4, the first candidate image block may be an image block in an encoded image frame that is prior to the current image frame where the current image block is located. The current image block is an image block a in the current image frame a ', and the first candidate image block may be an image block B, C, D, E, F in an encoded image frame B ' preceding the current image frame a '. The encoded image frame B 'may be a frame image before the current image frame a', or a preset number of frame images before the current image frame a ', the encoded image frame B' is associated with the current image frame a ', such as an image frame in a GOP (Group of Pictures), and the encoded image frame B' is an encoded image frame.
Since the encoded image frame and the current image frame have a correlation, such as a temporal correlation, and the pictures of the encoded image frame and the current image frame are similar without a large change, when determining the SAO parameter used in the process of compensating the current image block, the current image block may be compensated by multiplexing at least one first SAO parameter of a first candidate image block having a correlation with the current image block.
When compensating for the current image block, the decoding end may determine whether to select the SAO parameters of the specified candidate image block from the SAO parameter candidate list of the current image block for SAO compensation of the current image block. And if the SAO parameters of the appointed candidate image block need to be selected from the SAO parameter candidate list of the current image block for SAO compensation of the current image block, establishing the SAO parameter candidate list of the current image block. The SAO parameter candidate list includes a first SAO parameter of at least one first candidate tile, the first candidate tile being a tile in an encoded image frame prior to a current image frame in which the current tile is located. The first SAO parameters include SAO compensated luma component parameters, first chroma component parameters, and second chroma component parameters of the current image block.
For any image frame, it is composed of three different components, such as a YUV (including Luma, Chroma, a color coding method) image frame, which is composed of a luminance component (Y), a first chrominance component (U) and a second chrominance component (V). Therefore, the SAO parameters may also include three different component parameters, such as a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter, and the first SAO parameter may include the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter that participate in the SAO compensation of the current image block.
In a possible implementation manner, the first candidate image block may specifically include an image block in the encoded image frame before the current frame where the current image block is located, the image block at the same position as the current image block, and an adjacent image block of the image block at the same position as the current image block.
As shown in fig. 4, the first candidate image block may be an image block in an encoded image frame that is prior to the current image frame where the current image block is located. The current image block is an image block a in the current image frame a ', an image block B in the encoded image frame B ' preceding the current image frame a ' in which the current image block a is located, in the same position as the current image block a, and an image block C, D, E, F surrounding the image block B.
In step S320, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the SAO parameter of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
In implementation, when the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, the SAO parameter of the specified candidate image block at the position corresponding to the position index may be obtained from the SAO parameter candidate list according to the position index of the SAO parameter of the specified candidate image block.
The SAO parameter candidate list may include first SAO parameters of at least one first candidate tile, and the first SAO parameters of each first candidate tile have a position index corresponding thereto according to an ordering of the first SAO parameters of the first candidate tiles in the SAO parameter candidate list. For example, the first candidate tile comprises tile B, C, D, E, F in encoded image frame B', having first SAO parameters in the SAO parameter candidate list in order of (1) the first SAO parameter for tile B, (2) the first SAO parameter for tile C, (3) the first SAO parameter for tile D, (4) the first SAO parameter for tile E, and (5) the first SAO parameter for tile F. If the first SAO parameter of tile E is multiplexed, the encoded stream will carry the position index "4" of the first SAO parameter of tile E. When the decoding end determines to select the SAO parameter of the specified candidate image block E from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoding stream, the first SAO parameter of the image block E may be obtained from the SAO parameter candidate list according to the position index "4" of the SAO parameter of the specified candidate image block.
The designated candidate image block is selected from the SAO parameter candidate list by the encoding end, and since the SAO parameter candidate list includes one or even a plurality of first SAO parameters of the first candidate image block, in the case that the SAO parameter candidate list includes the plurality of first SAO parameters of the first candidate image block, the encoding end may select the SAO parameter of the image block having the smallest multiplexing rate distortion cost as the SAO parameter of the designated candidate image block. The encoding end may send the selected position index of the SAO parameter of the designated candidate image block to the decoding end through the encoded stream.
The RDO (Rate-Distortion Optimized) specifies a manner of calculating a Rate-Distortion cost corresponding to a second SAO parameter of each second candidate image block in the SAO parameter candidate list:
j (mode) ═ D + λ × R (formula 1)
Wherein j (mode) represents a rate-distortion cost corresponding to the first SAO parameter of the first candidate image block currently being tried. D represents Distortion, and may be measured by using a Sum of Squared Errors (SSE) index, which is the Sum of the mean square of the differences between the compensated image block and the original image block. λ is the lagrange multiplier. R represents the actual number of bits required to compensate the current image block by the first SAO parameter of the first candidate image block on current trial, and may include the total number of bits required for intra prediction related information, inter prediction related information, motion compensation information, prediction residual, and the like.
The rate-distortion cost is measured for the coded data from two angles of distortion degree and code rate, in general, the higher the distortion degree is, the lower the code rate is, otherwise, the lower the distortion degree is, the higher the code rate is, in the coding process, the lower the expected distortion degree and the code rate are, the better the expected distortion degree and the code rate are, so how to balance the two can be comprehensively considered through the rate-distortion cost.
The SAO parameter candidate list includes first SAO parameters of at least one first candidate image block, the encoding end may calculate a rate distortion cost corresponding to the first SAO parameter of each first candidate image block, the encoding end may send a position index of the SAO parameter of the selected designated candidate image block to the decoding end through an encoding stream, and the decoding end may multiplex the SAO parameter of the image block with the smallest rate distortion cost.
Step S330, the decoding end performs SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
By the method provided by the present disclosure, by multiplexing the first SAO parameter of the first candidate image block, the encoded stream may only carry the position index of the first SAO parameter of the multiplexed first candidate image block, instead of the first SAO parameter of the first candidate image block, and the data amount received by the decoding end may be reduced, thereby reducing the network overhead. In addition, the first candidate image block may be an image block in an encoded image frame that is previous to the current image frame where the current image block is located, and the first candidate image block has an association with the current image block, so that the code rate may be appropriately reduced by multiplexing the first SAO parameter of the first candidate image block.
Based on the same inventive concept as the above embodiments, an exemplary embodiment of the present disclosure provides a method for sample adaptive compensation, which differs from the above embodiments in that in addition to multiplexing the first SAO parameter of the first candidate image block for SAO compensation of the current image block, a preconfigured SAO parameter of the current image block may be used for SAO compensation of the current image block. As shown in fig. 5, the processing flow of the method provided by this embodiment may include the following steps:
step S510, the decoding end receives the encoded stream from the encoding end, and determines to select an SAO parameter of a specified candidate image block from the SAO parameter candidate list of the current image block for SAO compensation of the current image block or to perform SAO compensation of the current image block using a preconfigured SAO parameter of the current image block according to the encoded stream.
In implementation, when determining to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for SAO compensation of the current image block according to the encoded stream, the decoding end performs steps S310 to S330. When the decoding end determines to use the preconfigured SAO parameter of the current image block to perform SAO compensation for the current image block according to the encoded stream, steps S520 to S530 are performed.
Step S310, the decoding end receives the coding stream from the coding end, and when determining to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for SAO compensation of the current image block according to the coding stream, an SAO parameter candidate list of the current image block is established.
Wherein, the SAO parameter candidate list comprises a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located; the first SAO parameters include SAO compensated luma component parameters, first chroma component parameters, and second chroma component parameters of the current image block.
In step S320, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the SAO parameter of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
In an implementation, the SAO parameter candidate list includes a first SAO parameter of at least one first candidate image block, and the first SAO parameter of each first candidate image block has a position index corresponding thereto according to an ordering of the first SAO parameter of the first candidate image block in the SAO parameter candidate list.
Step S330, the decoding end performs SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
Step S520, when the decoding end determines to use the preconfigured SAO parameter of the current image block to perform SAO compensation on the current image block according to the encoded stream, obtaining the preconfigured SAO parameter.
In an implementation, in addition to multiplexing the SAO parameters of the designated candidate image block among the first SAO parameters of the at least one first candidate image block for the SAO compensation of the current image block, the SAO parameters of the current image block may be used for the SAO compensation of the current image block. When determining that the SAO parameter of the current image block is used for SAO compensation of the current image block, the decoding end receives a coded stream carrying a preconfigured SAO parameter of the current image block, and the decoding end may obtain the preconfigured SAO parameter of the current image block.
The preconfigured SAO parameters of the current image block received by the decoding end are pre-calculated by the encoding end, and in the process of calculating the SAO parameters of the current image block itself, the encoding end may attempt to compensate the current image block by using EO (Edge Offset) or BO (Band Offset, sideband compensation), and may correspondingly obtain a plurality of candidate SAO parameters, and among the candidate SAO parameters, the candidate SAO parameter with the smallest rate-distortion cost may be selected as the preconfigured SAO parameters.
Where EO includes 4 compensation modes: horizontal, vertical, 135 ° and 45 ° directions. In any compensation mode, the pixel values of the current pixel points and the pixel values of the pixel points in the corresponding direction are compared, the current pixel points are classified based on the comparison result, and the plurality of pixel points in the same category are compensated by using the uniform compensation value. And the BO divides the pixel value of the pixel point into 32 side bands according to the range of the pixel value according to the size of the pixel value of the pixel point. And selecting pixel points in 4 continuous side bands in the 32 side bands for compensation, wherein each side band in the 4 side bands is compensated by using a uniform compensation value.
Step S530, the decoding end performs SAO compensation on the current image block according to the pre-configured SAO parameter.
In a possible implementation manner, the method provided by the embodiment of the present disclosure may further include: acquiring compensation strategy information of a current image block according to the coding stream; when the compensation strategy information is first strategy information, determining that SAO parameters of specified candidate image blocks are selected from an SAO parameter candidate list to perform SAO compensation on the current image block; and when the compensation strategy information is second strategy information, determining to use the pre-configured SAO parameter to carry out SAO compensation on the current image block.
In implementation, the decoding end may obtain the compensation policy information of the current image block according to the encoded stream. And if the compensation strategy information is the first strategy information, indicating that the SAO parameter of the appointed candidate image block is obtained from the SAO parameter candidate list according to the position index of the SAO parameter of the appointed candidate image block, and carrying out SAO compensation on the current image block based on the SAO parameter of the appointed candidate image block. And if the compensation strategy information is the second strategy information, acquiring a pre-configured SAO parameter in the coding stream, and performing SAO compensation on the current image block based on the pre-configured SAO parameter.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
By the method provided by the present disclosure, by multiplexing the first SAO parameter of the first candidate image block, the encoded stream may only carry the position index of the first SAO parameter of the multiplexed first candidate image block, instead of the first SAO parameter of the first candidate image block, and the data amount received by the decoding end may be reduced, thereby reducing the network overhead. In addition, the first candidate image block may be an image block in an encoded image frame that is previous to the current image frame where the current image block is located, and the first candidate image block has an association with the current image block, so that the code rate may be appropriately reduced by multiplexing the first SAO parameter of the first candidate image block.
Based on the same inventive concept as the method of steps S310-S330, an exemplary embodiment of the present disclosure provides a method for sample adaptive compensation, which differs from the method of steps S310-S330 in that in addition to multiplexing the first SAO parameter of the first candidate image block for SAO compensation of the current image block, the first SAO parameter of the second candidate image block may be multiplexed for SAO compensation of the current image block. As shown in fig. 6, the processing flow of the method provided by this embodiment may include the following steps:
step S610, the decoding end receives the encoded stream from the encoding end, and when it is determined to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, an SAO parameter candidate list of the current image block is established.
The SAO parameter candidate list may include a first SAO parameter of at least one first candidate image block, where the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located. The first SAO parameters include SAO compensated luma component parameters, first chroma component parameters, and second chroma component parameters of the current image block. In addition, the SAO parameter candidate list may further include a first SAO parameter of at least one second candidate image block. The second candidate image block includes an image block adjacent to the current image block in the current image frame where the current image block is located.
In an implementation, in addition to the first SAO parameters of tiles in an encoded image frame that is prior to a current image frame in which the current tile is located, the first SAO parameters of tiles adjacent to the current tile in the current image frame may be multiplexed. As shown in fig. 7, the current image block is an image block AA in the current image frame C ', and the second candidate image block may be image blocks BB and CC in the current image frame C'. In one possible implementation, the second candidate image block may include an image block located on the left side of the current image block, and an image block located above the current image block in the current image frame.
Since adjacent image blocks in the same image frame have correlation, such as spatial correlation, and the color of the current image block and the image blocks adjacent to the current image block in the current image frame generally does not change abruptly, when determining the SAO parameter used in the process of compensating for the current image block, it may be considered to multiplex the first SAO parameter of at least one second candidate image block having correlation with the current image block. In one possible implementation, the second candidate image block may include an image block located on the left side of the current image block, and an image block located above the current image block in the current image frame.
Step S620, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the SAO parameter of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
In an implementation, the SAO parameter candidate list may include a first SAO parameter of at least one first candidate tile and a first SAO parameter of at least one second candidate tile, and the first SAO parameter of each first candidate tile and the first SAO parameter of each second candidate tile have a position index corresponding thereto according to an ordering of the first SAO parameter of the first candidate tile and the first SAO parameter of the second candidate tile in the SAO parameter candidate list.
Step S630, the decoding end performs SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
By the method provided by the present disclosure, by multiplexing the first SAO parameter of the first candidate image block, the encoded stream may only carry the position index of the first SAO parameter of the multiplexed first candidate image block, instead of the first SAO parameter of the first candidate image block, and the data amount received by the decoding end may be reduced, thereby reducing the network overhead. In addition, the first candidate image block may be an image block in an encoded image frame that is previous to the current image frame where the current image block is located, and the first candidate image block has an association with the current image block, so that the distortion of the current image block may be appropriately reduced by multiplexing the first SAO parameter of the first candidate image block.
Based on the same inventive concept as the method of steps S310-S330, an exemplary embodiment of the present disclosure provides a method for sample adaptive compensation, which differs from the method of steps S310-S330 in that in addition to multiplexing a first SAO parameter of a first candidate image block for SAO compensation of a current image block, a second SAO parameter of the first candidate image block may be multiplexed for SAO compensation of the current image block. As shown in fig. 8, a processing flow of a method provided by an embodiment of the present disclosure may include the following steps:
step S810, the decoding end receives the encoded stream from the encoding end, and when it is determined to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, an SAO parameter candidate list of the current image block is established.
The SAO parameter candidate list may include a first SAO parameter of at least one first candidate image block, where the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located. In one possible implementation, the first candidate image block may be an image block in the same position as the current image block in an encoded image frame before the current image frame where the current image block is located, and an adjacent image block to the image block in the same position as the current image block. The first SAO parameters include SAO compensated luma component parameters, first chroma component parameters, and second chroma component parameters of the current image block.
In addition, the SAO parameter candidate list may further include a second SAO parameter of the at least one first candidate image block.
The second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the SAO compensation of the current image block. And configuring OFF indication information in at least one of the brightness component parameter, the first chrominance component parameter and the second chrominance component parameter, wherein the OFF indication information is used for indicating that the parameter does not participate in SAO compensation of the current image block.
In an implementation, for some current image blocks, if all component parameters in the SAO parameters of the first candidate image block are not completely multiplexed, and the current image block is compensated, the code rate remains unchanged, but the distortion is reduced, because the three component parameters of the first candidate image block may not necessarily be well adapted to the three components of the current image block, respectively. Thus, at least one component parameter of the first candidate image block may not be used. For the component parameters that are not used, it may be indicated by the OFF indication information that at least one component parameter does not participate in SAO compensation of the current image block.
For example, (1) the luma component parameter of the first candidate image block is multiplexed, and the first chroma component parameter and the second chroma component parameter of the image block are not multiplexed. (2) The first chrominance component parameter of the first candidate image block is multiplexed, and the luminance component parameter and the second chrominance component parameter of the image block are not multiplexed. (3) The second chroma component of the first candidate image block is multiplexed, and the luma component parameter and the first chroma component parameter of the image block are not multiplexed. (4) The luma component parameter and the first chroma component parameter of the first candidate image block are multiplexed, and the second chroma component parameter of the image block is not multiplexed. (5) And multiplexing the luminance component parameter and the second chrominance component parameter of the first candidate image block, and not multiplexing the first chrominance component parameter of the image block. (6) And multiplexing the first chrominance component parameter and the second chrominance component parameter of the first candidate image block, and not multiplexing the luminance component parameter of the image block.
In a possible implementation manner, the SAO parameter candidate list may further include a second SAO parameter of at least one second candidate image block.
In a possible implementation manner, the SAO parameter candidate list may further include a first SAO parameter of at least one second candidate image block. The second candidate image block may be an image block adjacent to the current image block in the current image frame where the current image block is located.
In step S820, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the SAO parameter of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
In an implementation, the SAO parameter candidate list may include a first SAO parameter of at least one first candidate tile and a second SAO parameter of at least one first candidate tile, and a position index corresponding to the first SAO parameter of each first candidate tile and the second SAO parameter of each first candidate tile exists according to an ordering of the first SAO parameter of the first candidate tile and the second SAO parameter of the first candidate tile in the SAO parameter candidate list.
When the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoding stream, the SAO parameter candidate list of the current image block may be established, and the SAO parameter of the specified candidate image block is obtained from the SAO parameter candidate list. Further, if the SAO parameter of the designated candidate image block is the second SAO parameter of the first candidate image block, there is at least one component parameter configured with the OFF indication information among the second SAO parameters of the first candidate image block. The decoding end may determine a component parameter not participating in SAO compensation of the current picture block and simultaneously determine a component parameter participating in SAO compensation of the current picture block according to at least one component parameter configured with the OFF indication information.
In step S830, the decoding end performs SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to a component parameter participating in SAO compensation of the current image block in the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
In one possible implementation, in addition to multiplexing SAO parameters of other image blocks, the method provided in the embodiment of the present disclosure may further include: when the decoding end determines to use the pre-configured SAO parameter of the current image block to carry out SAO compensation on the current image block according to the coding stream, acquiring the pre-configured SAO parameter; and the decoding end carries out SAO compensation on the current image block according to the pre-configured SAO parameters.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
By the method provided by the present disclosure, by multiplexing the first SAO parameter of the first candidate image block, the encoded stream may only carry the position index of the first SAO parameter of the multiplexed first candidate image block, instead of the first SAO parameter of the first candidate image block, and the data amount received by the decoding end may be reduced, thereby reducing the network overhead. In addition, the first candidate image block may be an image block in an encoded image frame that is previous to the current image frame where the current image block is located, and the first candidate image block has an association with the current image block, so that the distortion of the current image block may be appropriately reduced by multiplexing the first SAO parameter of the first candidate image block.
Based on the same inventive concept as the method of steps S310-S330, an exemplary embodiment of the present disclosure provides a method for sample adaptive compensation, which differs from the method of steps S310-S330 in that in addition to multiplexing the first SAO parameter of the first candidate image block for SAO compensation of the current image block, a second SAO parameter of the second candidate image block for SAO compensation of the current image block may be multiplexed. As shown in fig. 9, a processing flow of a method provided by an embodiment of the present disclosure may include the following steps:
step S910, the decoding end receives the encoded stream from the encoding end, and when it is determined to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, an SAO parameter candidate list of the current image block is established.
The SAO parameter candidate list may include a first SAO parameter of at least one first candidate image block, where the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located. In one possible implementation, the first candidate image block may be an image block in the same position as the current image block in an encoded image frame before the current image frame where the current image block is located, and an adjacent image block to the image block in the same position as the current image block. The first SAO parameters include SAO compensated luma component parameters, first chroma component parameters, and second chroma component parameters of the current image block.
In addition, the SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
The second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the SAO compensation of the current image block. And configuring OFF indication information in at least one of the brightness component parameter, the first chrominance component parameter and the second chrominance component parameter, wherein the OFF indication information is used for indicating that the parameter does not participate in SAO compensation of the current image block.
For example, (1) the luma component parameter of the second candidate image block is multiplexed, and the first chroma component parameter and the second chroma component parameter of the image block are not multiplexed. (2) The first chrominance component parameter of the second candidate image block is multiplexed, and the luminance component parameter and the second chrominance component parameter of the image block are not multiplexed. (3) The second chroma component of the second candidate image block is multiplexed without multiplexing the luma component parameter and the first chroma component parameter of the image block. (4) The luma component parameter and the first chroma component parameter of the second candidate image block are multiplexed, and the second chroma component parameter of the image block is not multiplexed. (5) And multiplexing the luminance component parameter and the second chrominance component parameter of the second candidate image block, and not multiplexing the first chrominance component parameter of the image block. (6) And multiplexing the first chrominance component parameter and the second chrominance component parameter of the second candidate image block, and not multiplexing the luminance component parameter of the image block.
In a possible implementation manner, the SAO parameter candidate list may further include a second SAO parameter of at least one first candidate image block.
In a possible implementation manner, the SAO parameter candidate list may further include a first SAO parameter of at least one second candidate image block. The second candidate image block may be an image block adjacent to the current image block in the current image frame where the current image block is located.
In step S920, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the SAO parameter of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
In an implementation, the SAO parameter candidate list may include a first SAO parameter of at least one first candidate tile and a second SAO parameter of at least one second candidate tile, and a position index corresponding to the first SAO parameter of each first candidate tile and the second SAO parameter of each second candidate tile exists according to an ordering of the first SAO parameter of the first candidate tile and the second SAO parameter of the second candidate tile in the SAO parameter candidate list.
When the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoding stream, the SAO parameter candidate list of the current image block may be established, and the SAO parameter of the specified candidate image block is obtained from the SAO parameter candidate list. Further, if the SAO parameter of the designated candidate image block is a second SAO parameter of the second candidate image block, there is at least one component parameter configured with the OFF indication information among the second SAO parameters of the second candidate image block. The decoding end may determine a component parameter not participating in SAO compensation of the current picture block and simultaneously determine a component parameter participating in SAO compensation of the current picture block according to at least one component parameter configured with the OFF indication information.
In step S930, the decoding end performs SAO compensation on the current image block according to the SAO parameter of the designated candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to a component parameter participating in SAO compensation of the current image block in the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
In one possible implementation, in addition to multiplexing SAO parameters of other image blocks, the method provided in the embodiment of the present disclosure may further include: when the decoding end determines to use the pre-configured SAO parameter of the current image block to carry out SAO compensation on the current image block according to the coding stream, acquiring the pre-configured SAO parameter; and the decoding end carries out SAO compensation on the current image block according to the pre-configured SAO parameters.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
By the method provided by the present disclosure, by multiplexing the first SAO parameter of the first candidate image block, the encoded stream may only carry the position index of the first SAO parameter of the multiplexed first candidate image block, instead of the first SAO parameter of the first candidate image block, and the data amount received by the decoding end may be reduced, thereby reducing the network overhead. In addition, the first candidate image block may be an image block in an encoded image frame that is previous to the current image frame where the current image block is located, and the first candidate image block has an association with the current image block, so that the distortion of the current image block may be appropriately reduced by multiplexing the first SAO parameter of the first candidate image block.
An exemplary embodiment of the present disclosure provides a method for adaptive sample compensation, as shown in fig. 10, a processing flow of the method may include the following steps:
step S1010, the decoding end receives the encoded stream from the encoding end, and when it is determined to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, an SAO parameter candidate list of the current image block is established.
The SAO parameter candidate list may at least include a second SAO parameter of a second candidate image block, where the second candidate image block includes an image block adjacent to the current image block in the current image frame where the current image block is located. In one possible implementation, the second candidate image block may include an image block located on the left side of the current image block, and an image block located above the current image block in the current image frame.
The second SAO parameters include a SAO compensated luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the current image block. And configuring OFF indication information in at least one of the brightness component parameter, the first chrominance component parameter and the second chrominance component parameter, wherein the OFF indication information is used for indicating that the parameter does not participate in SAO compensation of the current image block.
In an implementation, for some current image blocks, if all component parameters in the SAO parameters of the second candidate image block are not completely multiplexed, and the current image block is compensated, the code rate remains unchanged, but the distortion is reduced, because the three component parameters of the second candidate image block may not necessarily be well adapted to the three components of the current image block, respectively. Accordingly, at least one component parameter of the second candidate image block may not be used. For the component parameters that are not used, it may be indicated by the OFF indication information that at least one component parameter does not participate in SAO compensation of the current image block.
For example, (1) the luma component parameter of the second candidate image block is multiplexed, and the first chroma component parameter and the second chroma component parameter of the image block are not multiplexed. (2) The first chrominance component parameter of the second candidate image block is multiplexed, and the luminance component parameter and the second chrominance component parameter of the image block are not multiplexed. (3) The second chroma component of the second candidate image block is multiplexed without multiplexing the luma component parameter and the first chroma component parameter of the image block. (4) The luma component parameter and the first chroma component parameter of the second candidate image block are multiplexed, and the second chroma component parameter of the image block is not multiplexed. (5) And multiplexing the luminance component parameter and the second chrominance component parameter of the second candidate image block, and not multiplexing the first chrominance component parameter of the image block. (6) And multiplexing the first chrominance component parameter and the second chrominance component parameter of the second candidate image block, and not multiplexing the luminance component parameter of the image block.
In a possible implementation, the SAO parameter candidate list may further include a first SAO parameter of at least one second candidate image block, and the first SAO parameter includes an SAO compensated luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the current image block.
Step S1020, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
And in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum.
In implementation, when the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, the SAO parameter of the specified candidate image block at the position corresponding to the position index may be obtained from the SAO parameter candidate list according to the position index of the SAO parameter of the specified candidate image block.
Since the SAO parameter candidate list includes the second SAO parameters of one or even a plurality of second candidate image blocks, the encoding end may select the SAO parameter of the image block with the smallest multiplexing rate distortion cost as the SAO parameter of the designated candidate image block under the condition that the SAO parameter candidate list includes the second SAO parameters of the plurality of second candidate image blocks. The encoding end may send the selected position index of the SAO parameter of the designated candidate image block to the decoding end through the encoded stream.
The RDO specifies a manner of calculating a rate-distortion cost corresponding to the second SAO parameter of each second candidate image block in the SAO parameter candidate list:
j (mode) ═ D + λ × R (formula 2)
Wherein j (mode) represents a rate-distortion cost corresponding to the second SAO parameter of the second candidate image block currently being tried. D represents Distortion, and can be measured by using an SSE index, which is the sum of the mean square differences between the compensated image block and the original image block. λ is the lagrange multiplier. R represents the actual number of bits required to compensate the current image block by the second SAO parameter of the second candidate image block on current trial, and may include the total number of bits required for intra prediction related information, inter prediction related information, motion compensation information, prediction residual, and the like.
The rate-distortion cost is measured for the coded data from two angles of distortion degree and code rate, in general, the higher the distortion degree is, the lower the code rate is, otherwise, the lower the distortion degree is, the higher the code rate is, in the coding process, the lower the expected distortion degree and the code rate are, the better the expected distortion degree and the code rate are, so how to balance the two can be comprehensively considered through the rate-distortion cost.
The SAO parameter candidate list includes a second SAO parameter of at least one second candidate image block, the encoding end may calculate a rate distortion cost corresponding to the second SAO parameter of each second candidate image block, the encoding end may send a position index of the SAO parameter of the selected designated candidate image block to the decoding end through an encoding stream, and the decoding end may multiplex the SAO parameter of the image block with the smallest rate distortion cost.
When the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoding stream, the SAO parameter candidate list of the current image block may be established, and the SAO parameter of the specified candidate image block is obtained from the SAO parameter candidate list. Further, if the SAO parameter of the designated candidate image block is a second SAO parameter of the second candidate image block, there is at least one component parameter configured with the OFF indication information among the second SAO parameters of the second candidate image block. The decoding end may determine a component parameter not participating in SAO compensation of the current picture block and simultaneously determine a component parameter participating in SAO compensation of the current picture block according to at least one component parameter configured with the OFF indication information.
Step S1030, performing SAO compensation on the current image block according to the SAO parameter of the designated candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to a component parameter participating in SAO compensation of the current image block in the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
With the method provided by the present disclosure, the second SAO parameter of the second candidate tile is a parameter in which at least one component parameter does not participate in SAO compensation of the current tile. For some current image blocks, if all component parameters in the SAO parameters of the second candidate image block are not completely multiplexed, when performing SAO compensation on the current image block, the code rate remains unchanged, but the distortion degree is reduced.
Based on the same inventive concept as the above embodiments, an exemplary embodiment of the present disclosure provides a method for sample adaptive compensation, and unlike the methods of steps S1010 to S1030, the second SAO parameter may be of the second candidate image block or of the first candidate image block. As shown in fig. 11, the processing flow of the method provided in this embodiment may include the following steps:
in step S1110, the decoding end receives the encoded stream from the encoding end, and when it is determined that the SAO parameter of the specified candidate image block is selected from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, the SAO parameter candidate list of the current image block is established.
The SAO parameter candidate list may include at least a second SAO parameter of a first candidate image block, where the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located. The second SAO parameters include a SAO compensated luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the current image block. And configuring OFF indication information in at least one of the brightness component parameter, the first chrominance component parameter and the second chrominance component parameter, wherein the OFF indication information is used for indicating that the parameter does not participate in SAO compensation of the current image block.
In an implementation, for some current image blocks, if all component parameters in the SAO parameters of the first candidate image block are not completely multiplexed, and the current image block is compensated, the code rate remains unchanged, but the distortion is reduced, because the three component parameters of the first candidate image block may not necessarily be well adapted to the three components of the current image block, respectively. Thus, at least one component parameter of the first candidate image block may not be used. For the component parameters that are not used, it may be indicated by the OFF indication information that at least one component parameter does not participate in SAO compensation of the current image block.
For example, (1) the luma component parameter of the first candidate image block is multiplexed, and the first chroma component parameter and the second chroma component parameter of the image block are not multiplexed. (2) The first chrominance component parameter of the first candidate image block is multiplexed, and the luminance component parameter and the second chrominance component parameter of the image block are not multiplexed. (3) The second chroma component of the first candidate image block is multiplexed, and the luma component parameter and the first chroma component parameter of the image block are not multiplexed. (4) The luma component parameter and the first chroma component parameter of the first candidate image block are multiplexed, and the second chroma component parameter of the image block is not multiplexed. (5) And multiplexing the luminance component parameter and the second chrominance component parameter of the first candidate image block, and not multiplexing the first chrominance component parameter of the image block. (6) And multiplexing the first chrominance component parameter and the second chrominance component parameter of the first candidate image block, and not multiplexing the luminance component parameter of the image block.
Step S1020, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
And in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum.
In implementation, when the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, the SAO parameter of the specified candidate image block at the position corresponding to the position index may be obtained from the SAO parameter candidate list according to the position index of the SAO parameter of the specified candidate image block.
Since the SAO parameter candidate list includes the second SAO parameters of even a plurality of first candidate image blocks, the encoding end may select the SAO parameter of the image block with the smallest multiplexing rate distortion cost as the SAO parameter of the designated candidate image block under the condition that the SAO parameter candidate list includes the second SAO parameters of the plurality of first candidate image blocks. The encoding end may send the selected position index of the SAO parameter of the designated candidate image block to the decoding end through the encoded stream.
When the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoding stream, the SAO parameter candidate list of the current image block may be established, and the SAO parameter of the specified candidate image block is obtained from the SAO parameter candidate list. Further, if the SAO parameter of the designated candidate image block is the second SAO parameter of the first candidate image block, there is at least one component parameter configured with the OFF indication information among the second SAO parameters of the first candidate image block. The decoding end may determine a component parameter not participating in SAO compensation of the current picture block and simultaneously determine a component parameter participating in SAO compensation of the current picture block according to at least one component parameter configured with the OFF indication information.
Step S1030, performing SAO compensation on the current image block according to the SAO parameter of the designated candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to a component parameter participating in SAO compensation of the current image block in the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
With the method provided by the present disclosure, the second SAO parameter of the first candidate image block is a parameter in which at least one component parameter does not participate in SAO compensation of the current image block. For some current image blocks, if all component parameters in the SAO parameters of the first candidate image block are not completely multiplexed, when performing SAO compensation on the current image block, the code rate remains unchanged, but the distortion degree is reduced.
Based on the same inventive concept as steps S1010-S1030, an exemplary embodiment of the present disclosure provides a method for sample adaptive compensation, which differs from the method of steps S1010-S1030 in that in addition to multiplexing the second SAO parameter of the second candidate image block for SAO compensation of the current image block, a preconfigured SAO parameter of the current image block may be used for SAO compensation of the current image block. As shown in fig. 12, the processing flow of the method provided in this embodiment may include the following steps:
step S1210, the decoding end receives the encoded stream from the encoding end, and determines to select an SAO parameter of a specified candidate image block from the SAO parameter candidate list of the current image block for SAO compensation of the current image block or to perform SAO compensation of the current image block using a preconfigured SAO parameter of the current image block according to the encoded stream.
In implementation, when determining to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for SAO compensation of the current image block according to the encoded stream, the decoding end performs steps S1010 to S1030. When the decoding end determines to use the preconfigured SAO parameter of the current image block for SAO compensation of the current image block according to the encoded stream, steps S1220 to S1230 are performed.
Step S1010, the decoding end receives the encoded stream from the encoding end, and when it is determined to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, an SAO parameter candidate list of the current image block is established.
The SAO parameter candidate list may at least include a second SAO parameter of a second candidate image block, where the second candidate image block includes an image block adjacent to the current image block in the current image frame where the current image block is located. In one possible implementation, the second candidate image block may include an image block located on the left side of the current image block, and an image block located above the current image block in the current image frame.
The second SAO parameters include a SAO compensated luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the current image block. And configuring OFF indication information in at least one of the brightness component parameter, the first chrominance component parameter and the second chrominance component parameter, wherein the OFF indication information is used for indicating that the parameter does not participate in SAO compensation of the current image block.
Step S1020, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
And in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum.
In implementation, when the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, the SAO parameter candidate list of the current image block may be established, and the SAO parameter of the specified candidate image block is obtained from the SAO parameter candidate list. Further, if the SAO parameter of the designated candidate image block is a second SAO parameter of the second candidate image block, there is at least one component parameter configured with the OFF indication information among the second SAO parameters of the second candidate image block. The decoding end may determine a component parameter not participating in SAO compensation of the current picture block and simultaneously determine a component parameter participating in SAO compensation of the current picture block according to at least one component parameter configured with the OFF indication information.
Step S1030, performing SAO compensation on the current image block according to the SAO parameter of the designated candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to a component parameter participating in SAO compensation of the current image block in the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
Step S1220, when the decoding end determines to use the preconfigured SAO parameter of the current image block to perform SAO compensation on the current image block according to the encoded stream, the preconfigured SAO parameter is obtained.
In an implementation, in addition to multiplexing the SAO parameter of the designated candidate image block among the second SAO parameters of the at least one second candidate image block for the SAO compensation of the current image block, the SAO compensation of the current image block using the SAO parameter of the current image block itself may be considered. When determining that the SAO parameter of the current image block is used for SAO compensation of the current image block, the decoding end receives a coded stream carrying a preconfigured SAO parameter of the current image block, and the decoding end may obtain the preconfigured SAO parameter of the current image block.
The pre-configured SAO parameters of the current image block received by the decoding end are pre-calculated by the encoding end, in the process of calculating the SAO parameters of the current image block, the encoding end may try to compensate the current image block by using EO or BO, and may correspondingly obtain a plurality of candidate SAO parameters, and among the candidate SAO parameters, the candidate SAO parameter with the minimum rate-distortion cost may be selected as the pre-configured SAO parameter.
Where EO includes 4 compensation modes: horizontal, vertical, 135 ° and 45 ° directions. In any compensation mode, the pixel values of the current pixel points and the pixel values of the pixel points in the corresponding direction are compared, the current pixel points are classified based on the comparison result, and the plurality of pixel points in the same category are compensated by using the uniform compensation value. And the BO divides the pixel value of the pixel point into 32 side bands according to the range of the pixel value according to the size of the pixel value of the pixel point. And selecting pixel points in 4 continuous side bands in the 32 side bands for compensation, wherein each side band in the 4 side bands is compensated by using a uniform compensation value.
In step S1230, the decoding end performs SAO compensation on the current image block according to the preconfigured SAO parameter.
In a possible implementation manner, the method provided by the embodiment of the present disclosure may further include: acquiring compensation strategy information of a current image block according to the coding stream; when the compensation strategy information is first strategy information, determining that SAO parameters of specified candidate image blocks are selected from an SAO parameter candidate list to perform SAO compensation on the current image block; and when the compensation strategy information is second strategy information, determining to use the pre-configured SAO parameter to carry out SAO compensation on the current image block.
In implementation, the decoding end may obtain the compensation policy information of the current image block according to the encoded stream. And if the compensation strategy information is the first strategy information, indicating that the SAO parameter of the appointed candidate image block is obtained from the SAO parameter candidate list according to the position index of the SAO parameter of the appointed candidate image block, and carrying out SAO compensation on the current image block based on the SAO parameter of the appointed candidate image block. And if the compensation strategy information is the second strategy information, acquiring a pre-configured SAO parameter in the coding stream, and performing SAO compensation on the current image block based on the pre-configured SAO parameter.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
With the method provided by the present disclosure, the second SAO parameter of the first candidate image block is a parameter in which at least one component parameter does not participate in SAO compensation of the current image block. For some current image blocks, if all component parameters in the SAO parameters of the first candidate image block are not completely multiplexed, when performing SAO compensation on the current image block, the code rate remains unchanged, but the distortion degree is reduced.
Based on the same inventive concept as steps S1010-S1030, an exemplary embodiment of the present disclosure provides a method for sample adaptive compensation, which differs from the method of steps S1010-S1030 in that in addition to multiplexing the second SAO parameter of the second candidate image block for SAO compensation of the current image block, the second SAO parameter of the first candidate image block may be multiplexed for SAO compensation of the current image block. As shown in fig. 13, the processing flow of the method provided in this embodiment may include the following steps:
step S1310, the decoding end receives the encoded stream from the encoding end, and when it is determined to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, an SAO parameter candidate list of the current image block is established.
The SAO parameter candidate list may at least include a second SAO parameter of a second candidate image block, where the second candidate image block includes an image block adjacent to the current image block in the current image frame where the current image block is located. In one possible implementation, the second candidate image block may include an image block located on the left side of the current image block, and an image block located above the current image block in the current image frame. In addition, the SAO parameter candidate list may further include a second SAO parameter of at least one first candidate image block, and the first candidate image block may be an image block in an encoded image frame before the current image frame where the current image block is located.
The second SAO parameters include a SAO compensated luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the current image block. And configuring OFF indication information in at least one of the brightness component parameter, the first chrominance component parameter and the second chrominance component parameter, wherein the OFF indication information is used for indicating that the parameter does not participate in SAO compensation of the current image block.
In an implementation, for some current image blocks, if all component parameters in the SAO parameters of the first candidate image block and the second candidate image block are not completely multiplexed, and the current image block is compensated, the code rate remains unchanged, but the distortion degree is reduced, because the three component parameters of the second candidate image block may not be well applied to the three components of the current image block, respectively. Therefore, at least one component parameter of the SAO parameters of the first candidate image block and the second candidate image block may not be used. For the component parameters that are not used, it may be indicated by the OFF indication information that at least one component parameter does not participate in SAO compensation of the current image block.
For example, (1) the luma component parameter of the second candidate image block is multiplexed, and the first chroma component parameter and the second chroma component parameter of the image block are not multiplexed. (2) The first chrominance component parameter of the second candidate image block is multiplexed, and the luminance component parameter and the second chrominance component parameter of the image block are not multiplexed. (3) The second chroma component of the second candidate image block is multiplexed without multiplexing the luma component parameter and the first chroma component parameter of the image block. (4) The luma component parameter and the first chroma component parameter of the second candidate image block are multiplexed, and the second chroma component parameter of the image block is not multiplexed. (5) And multiplexing the luminance component parameter and the second chrominance component parameter of the second candidate image block, and not multiplexing the first chrominance component parameter of the image block. (6) And multiplexing the first chrominance component parameter and the second chrominance component parameter of the second candidate image block, and not multiplexing the luminance component parameter of the image block. (7) The luma component parameter of the first candidate image block is multiplexed, and the first chroma component parameter and the second chroma component parameter of the image block are not multiplexed. (8) The first chrominance component parameter of the first candidate image block is multiplexed, and the luminance component parameter and the second chrominance component parameter of the image block are not multiplexed. (9) The second chroma component of the first candidate image block is multiplexed, and the luma component parameter and the first chroma component parameter of the image block are not multiplexed. (10) The luma component parameter and the first chroma component parameter of the first candidate image block are multiplexed, and the second chroma component parameter of the image block is not multiplexed. (11) And multiplexing the luminance component parameter and the second chrominance component parameter of the first candidate image block, and not multiplexing the first chrominance component parameter of the image block. (12) And multiplexing the first chrominance component parameter and the second chrominance component parameter of the first candidate image block, and not multiplexing the luminance component parameter of the image block.
In step S1320, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
And in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum.
In an implementation, since the SAO parameter candidate list includes the second SAO parameters of even a plurality of second candidate tiles, in a case that the SAO parameter candidate list includes the second SAO parameters of a plurality of second candidate tiles, the encoding end may select the SAO parameter of the tile with the smallest multiplexing rate distortion cost as the SAO parameter of the designated candidate tile. The encoding end may send the selected position index of the SAO parameter of the designated candidate image block to the decoding end through the encoded stream.
When the decoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoding stream, the SAO parameter candidate list of the current image block may be established, and the SAO parameter of the specified candidate image block is obtained from the SAO parameter candidate list. Further, if the SAO parameter of the designated candidate image block is a second SAO parameter of the second candidate image block, there is at least one component parameter configured with the OFF indication information among the second SAO parameters of the second candidate image block. The decoding end may determine a component parameter not participating in SAO compensation of the current picture block and simultaneously determine a component parameter participating in SAO compensation of the current picture block according to at least one component parameter configured with the OFF indication information.
Step S1330, performing SAO compensation on the current image block according to the SAO parameter of the designated candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to a component parameter participating in SAO compensation of the current image block in the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
The processing at the encoding end is similar to that at the decoding end, or is the reverse process of the decoding end, and is not described herein again.
With the method provided by the present disclosure, the second SAO parameter of the second candidate tile is a parameter in which at least one component parameter does not participate in SAO compensation of the current tile. For some current image blocks, if all component parameters in the SAO parameters of the second candidate image block are not completely multiplexed, when performing SAO compensation on the current image block, the code rate remains unchanged, but the distortion degree is reduced.
An exemplary embodiment of the present disclosure provides a method for sample adaptive compensation, where the method provided by the embodiment of the present disclosure may be implemented by a coding end and a decoding end in a video coding and decoding system in a cooperative manner, as shown in fig. 14, a processing flow of the method may include the following steps:
in step S1410, the encoding end establishes an SAO parameter candidate list of the current image block.
The SAO parameter candidate list may include a first SAO parameter of at least one first candidate image block, where the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located; the first SAO parameters include a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter that participate in SAO compensation of the current image block.
In implementation, when determining the SAO parameter used in the compensation of the current image frame, the determination may be performed in units of image units included in the image frame, and the image units may be CTUs or units of other sizes. The CTU has a size of 64 × 64.
In determining the SAO parameter used in compensating for the current tile, a first SAO parameter multiplexing at least one first candidate tile having an association with the current tile may be considered. An SAO parameter candidate list for the current tile may be established based on the first SAO parameters of at least one first candidate tile having an association with the current tile, such that the first SAO parameters of the multiplexed tiles may be selected in the SAO parameter candidate list. As shown in fig. 4, the first candidate image block may be an image block in an encoded image frame that is prior to the current image frame where the current image block is located. The current image block is an image block a in the current image frame a ', and the first candidate image block may be an image block B, C, D, E, F in an encoded image frame B ' preceding the current image frame a '. The encoded image frame B 'may be a frame image before the current image frame a', or a preset number of frame images before the current image frame a ', the encoded image frame B' is associated with the current image frame a ', as an image frame in a GOP, and the encoded image frame B' is an encoded image frame.
Since the encoded image frame and the current image frame have a correlation, such as a temporal correlation, and the pictures of the encoded image frame and the current image frame are similar without a large change, when determining the SAO parameter used in the compensation of the current image block, it may be considered to multiplex a first SAO parameter of at least one first candidate image block having a correlation with the current image block.
In one possible implementation, the first candidate image block may specifically include an image block in the same position as the current image block in an encoded image frame before the current image frame where the current image block is located, and an adjacent image block of an image block in the same position as the current image block.
In an implementation, after moving, an image block at the same position as the current image block in an encoded image frame before the current image frame and a moving object in an adjacent image block to the image block at the same position as the current image block may move to the position of the current image block in the current image frame, so that the current image block in the current image frame is similar to the image of the aforementioned image block without great change, and therefore, when determining the SAO parameter used in the process of compensating the current image block, it may be considered to multiplex the image block at the same position as the current image block in the encoded image frame before the current image frame where the current image block is located and the adjacent image block to the image block at the same position as the current image block.
As shown in fig. 4, the first candidate image block may be an image block in an encoded image frame that is prior to the current image frame where the current image block is located. The current image block is an image block a in the current image frame a ', an image block B in the encoded image frame B ' preceding the current image frame a ' in which the current image block a is located, in the same position as the current image block a, and an image block C, D, E, F surrounding the image block B.
Any image frame is composed of three different components, such as a YUV image frame, composed of a luminance component (Y), a first chrominance component (U) and a second chrominance component (V). Therefore, the SAO parameters may also include three different component parameters, such as a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter, and the first SAO parameter may include the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter that participate in the SAO compensation of the current image block.
Step S1420, when the encoding end determines to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list for the SAO compensation of the current image block, the position index of the specified candidate image block in the SAO parameter candidate list is carried in the encoding stream.
And in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum.
In an implementation, the SAO parameter candidate list includes a first SAO parameter of at least one first candidate image block, and the first SAO parameter of each first candidate image block has a position index corresponding thereto according to an ordering of the first SAO parameter of the first candidate image block in the SAO parameter candidate list. For example, the first candidate tile comprises tile B, C, D, E, F in encoded image frame B', having first SAO parameters in the SAO parameter candidate list in order of (1) the first SAO parameter for tile B, (2) the first SAO parameter for tile C, (3) the first SAO parameter for tile D, (4) the first SAO parameter for tile E, and (5) the first SAO parameter for tile F. If the first SAO parameter of the tile E is multiplexed, a position index of "4" of the first SAO parameter of the tile E may be added to the encoded stream.
Since the SAO parameter candidate list includes the first SAO parameters of even a plurality of first candidate image blocks, in the case that the SAO parameter candidate list includes the first SAO parameters of a plurality of first candidate image blocks, the SAO parameter of the image block with the smallest multiplexing rate distortion cost may be selected as the SAO parameter of the designated candidate image block.
The RDO specifies a way to calculate a rate-distortion cost corresponding to the first SAO parameter of each first candidate image block in the SAO parameter candidate list:
j (mode) ═ D + λ × R (formula 3)
Wherein j (mode) represents a rate-distortion cost corresponding to the first SAO parameter of the first candidate image block currently being tried. D represents Distortion, and can be measured by using an SSE index, which is the sum of the mean square differences between the compensated image block and the original image block. λ is the lagrange multiplier. R represents the actual number of bits required to compensate the current image block by the first SAO parameter of the first candidate image block on current trial, and may include the total number of bits required for intra prediction related information, inter prediction related information, motion compensation information, prediction residual, and the like.
The rate-distortion cost is measured for the coded data from two angles of distortion degree and code rate, in general, the higher the distortion degree is, the lower the code rate is, otherwise, the lower the distortion degree is, the higher the code rate is, in the coding process, the lower the expected distortion degree and the code rate are, the better the expected distortion degree and the code rate are, so how to balance the two can be comprehensively considered through the rate-distortion cost.
The SAO parameter candidate list comprises first SAO parameters of at least one first candidate image block, rate distortion cost corresponding to the first SAO parameters of each first candidate image block can be calculated, the SAO parameter of the image block with the minimum multiplexing rate distortion cost is selected as the SAO parameter of the designated candidate image block, and a position index of the designated candidate image block in the SAO parameter candidate list is carried in an encoding stream.
In a possible implementation manner, the method provided by the embodiment of the present disclosure may further include: and when determining that the pre-configured SAO parameter of the current image block is used for SAO compensation of the current image block, acquiring the pre-configured SAO parameter and carrying the pre-configured SAO parameter in the coding stream.
In an implementation, in addition to considering the SAO parameter of the specified candidate image block among the first SAO parameters for multiplexing the at least one first candidate image block to perform the SAO compensation for the current image block, calculating the SAO parameter of the current image block itself to perform the SAO compensation for the current image block may be considered. When determining to use the SAO parameter of the current image block for the SAO compensation of the current image block, the SAO parameter of the current image block may be added to the encoded stream as a preconfigured SAO parameter.
In the process of calculating the SAO parameters of the current image block, the encoding end may attempt to compensate the current image block by using EO or BO, and may obtain a plurality of candidate SAO parameters correspondingly, and among the candidate SAO parameters, the candidate SAO parameter with the smallest rate-distortion cost may be selected as the preconfigured SAO parameter.
Where EO includes 4 compensation modes: horizontal, vertical, 135 ° and 45 ° directions. In any compensation mode, the pixel values of the current pixel points and the pixel values of the pixel points in the corresponding direction are compared, the current pixel points are classified based on the comparison result, and the plurality of pixel points in the same category are compensated by using the uniform compensation value. And the BO divides the pixel value of the pixel point into 32 side bands according to the range of the pixel value according to the size of the pixel value of the pixel point. And selecting pixel points in 4 continuous side bands in the 32 side bands for compensation, wherein each side band in the 4 side bands is compensated by using a uniform compensation value.
In step S1430, the encoding end sends the encoded stream carrying the position index to the decoding end.
In implementation, if it is determined that the SAO parameter of the specified candidate image block is selected from the SAO parameter candidate list for the SAO compensation of the current image block, the position index of the specified candidate image block in the SAO parameter candidate list is added to the encoded stream, and the encoded stream to which the position index is added is transmitted to the decoding end. And if the pre-configured SAO parameter of the current image block is determined to be used for SAO compensation of the current image block, acquiring the pre-configured SAO parameter, adding the pre-configured SAO parameter into the encoded stream, and sending the encoded stream added with the pre-configured SAO parameter to a decoding end.
If the SAO parameter of the specified candidate image block is multiplexed to perform SAO compensation on the current image block, the bit number required for sending the position index to the decoding end is smaller than the bit number required for sending the pre-configured SAO parameter to the decoding end, so that the code rate can be reduced.
In one possible implementation manner, the method provided by the implementation of the present disclosure may further include: determining compensation strategy information of the current image block according to the minimum rate distortion cost in the rate distortion costs respectively corresponding to all candidate SAO parameters of the current image block; all candidate SAO parameters include preconfigured SAO parameters and respective SAO parameters in a SAO parameter candidate list; when the compensation strategy information is first strategy information, determining that SAO parameters of specified candidate image blocks are selected from an SAO parameter candidate list to perform SAO compensation on the current image block; and when the compensation strategy information is second strategy information, determining to use the pre-configured SAO parameter to carry out SAO compensation on the current image block.
In an implementation, all the candidate SAO parameters of the current tile may include the first SAO parameter of at least one first candidate tile and the SAO parameter of the current tile itself, and rate distortion costs thereof may be respectively calculated, and among the candidate SAO parameters, the SAO parameter corresponding to the minimum rate distortion cost is selected. And when the selected SAO parameter is the SAO parameter of the appointed candidate image block, determining the compensation strategy information as first strategy information for indicating that the SAO parameter of the appointed candidate image block is used for carrying out SAO compensation on the current image block. And when the selected SAO parameter is the pre-configured SAO parameter, determining the compensation strategy information as second strategy information for indicating that the pre-configured SAO parameter is used for SAO compensation of the current image block.
In a possible implementation manner, the step of determining the compensation policy information of the current image block according to a minimum rate-distortion cost among rate-distortion costs respectively corresponding to all candidate SAO parameters of the current image block may include: when the rate distortion cost corresponding to the SAO parameter of the specified candidate image block in the SAO parameter candidate list is the minimum rate distortion cost, determining the compensation strategy information of the current image block as first strategy information; and when the rate distortion cost corresponding to the pre-configured SAO parameter is the minimum rate distortion cost, determining the compensation strategy information of the current image block as second strategy information.
In an implementation, when the selected SAO parameter is the SAO parameter of the designated candidate image block, the compensation policy information is determined to be the first policy information for instructing the SAO compensation of the current image block using the SAO parameter of the designated candidate image block. And when the selected SAO parameter is the pre-configured SAO parameter, determining the compensation strategy information as second strategy information for indicating that the pre-configured SAO parameter is used for SAO compensation of the current image block.
In a possible implementation manner, the method provided by the embodiment of the present disclosure may further include: when the compensation strategy information of the current image block is determined to be first strategy information, carrying the first strategy information in the coding stream; and when the compensation strategy information of the current image block is determined to be the second strategy information, carrying the second strategy information in the coding stream.
In implementation, after determining the compensation policy information of the current image block, the determined compensation policy information may be added to the encoded stream, and the encoded stream to which the determined compensation policy information is added may be transmitted to the decoding end.
In a possible implementation manner, the method provided by the embodiment of the present disclosure may further include: and when the current image block is determined not to need SAO compensation, determining the compensation strategy information of the current image block as third strategy information, adding the third strategy information into the coding stream, and sending the coding stream added with the third strategy information to a decoding end.
In implementation, if it is determined that the corresponding rate-distortion cost is the minimum when the current image block is not subjected to any SAO compensation, the compensation policy information of the current image block is determined to be the third policy information, the third policy information is added to the encoded stream, and the encoded stream to which the third policy information is added is sent to the decoding end.
In addition to the above description that all the candidate SAO parameters of the current image block may include the first SAO parameter of at least one first candidate image block and the SAO parameter of the current image block itself, in a possible implementation manner, the SAO parameter candidate list may further include the first SAO parameter of at least one second candidate image block; the second candidate image block includes an image block adjacent to the current image block in the current image frame where the current image block is located.
In an implementation, in addition to multiplexing the first SAO parameters of tiles in an encoded image frame before a current image frame in which the current tile is located, multiplexing the first SAO parameters of tiles adjacent to the current tile in the current image frame may be considered. As shown in fig. 7, the current image block is an image block AA in the current image frame C ', and the second candidate image block may be image blocks BB and CC in the current image frame C'.
Since adjacent image blocks in the same image frame have correlation, such as spatial correlation, and the color of the current image block and the image blocks adjacent to the current image block in the current image frame generally does not change abruptly, when determining the SAO parameter used in the process of compensating for the current image block, it may be considered to multiplex the first SAO parameter of at least one second candidate image block having correlation with the current image block. In one possible implementation, the second candidate image block may include an image block located on the left side of the current image block, and an image block located above the current image block in the current image frame.
In a possible implementation manner, the SAO parameter candidate list further includes a second SAO parameter of at least one first candidate image block; and the SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
In an implementation, the SAO parameter candidate list may include a first SAO parameter of at least one first candidate tile, a second SAO parameter of at least one first candidate tile, and a second SAO parameter of at least one second candidate tile.
Alternatively, the SAO parameter candidate list may include a first SAO parameter of at least one first candidate tile, a second SAO parameter of at least one second candidate tile, and a first SAO parameter of at least one second candidate tile.
In a possible implementation manner, the SAO parameter candidate list further includes a second SAO parameter of at least one first candidate image block; or, the SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
In an implementation, the SAO parameter candidate list may include a first SAO parameter of the at least one first candidate tile and a second SAO parameter of the at least one first candidate tile.
Alternatively, the SAO parameter candidate list may include a first SAO parameter of at least one first candidate tile and a second SAO parameter of at least one second candidate tile.
Alternatively, the SAO parameter candidate list may include a first SAO parameter of at least one first candidate tile, a first SAO parameter of at least one second candidate tile, and a second SAO parameter of at least one first candidate tile.
Alternatively, the SAO parameter candidate list may include a first SAO parameter of at least one first candidate tile, a first SAO parameter of at least one second candidate tile, and a second SAO parameter of at least one second candidate tile.
In one possible implementation, the second SAO parameter includes an SAO compensated luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the current image block. And configuring OFF indication information in at least one of the brightness component parameter, the first chrominance component parameter and the second chrominance component parameter, wherein the OFF indication information is used for indicating that the parameter does not participate in SAO compensation of the current image block.
In an implementation, for some current tiles, if all component parameters in SAO parameters of other tiles are not completely multiplexed, and the current tile is compensated, the code rate remains unchanged, but the distortion is reduced, because the three component parameters of other tiles are not necessarily well adapted to the three components of the current tile respectively. Thus, it may be chosen not to use at least one component parameter of the other image block. For the component parameters that are not used, it may be indicated by the OFF indication information that at least one component parameter does not participate in SAO compensation of the current image block.
For example, (1) the luminance component parameters of other image blocks are multiplexed, and the first chrominance component parameter and the second chrominance component parameter of the image block are not multiplexed. (2) The first chrominance component parameters of other image blocks are multiplexed, and the luminance component parameters and the second chrominance component parameters of the image block are not multiplexed. (3) And multiplexing the second chrominance components of other image blocks, and not multiplexing the luminance component parameters and the first chrominance component parameters of the image block. (4) The luminance component parameter and the first chrominance component parameter of other image blocks are multiplexed, and the second chrominance component parameter of the image block is not multiplexed. (5) And multiplexing the brightness component parameter and the second chrominance component parameter of other image blocks, and not multiplexing the first chrominance component parameter of the image block. (6) And multiplexing the first chrominance component parameter and the second chrominance component parameter of other image blocks, and not multiplexing the luminance component parameter of the image block.
In step S1440, the decoding end receives the encoded stream from the encoding end, and when it is determined to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoded stream, an SAO parameter candidate list of the current image block is established.
Wherein, the SAO parameter candidate list comprises a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located; the first SAO parameters include SAO compensated luma component parameters, first chroma component parameters, and second chroma component parameters of the current image block.
In an implementation, the decoding end may receive the encoded stream sent by the encoding end, and perform a decoding operation on the current image frame, where when performing compensation on the current image frame, it may be determined whether to select an SAO parameter of a specified candidate image block from the SAO parameter candidate list of the current image block for SAO compensation of the current image block. And if the SAO parameters of the appointed candidate image block are selected from the SAO parameter candidate list of the current image block to carry out SAO compensation on the current image block, establishing the SAO parameter candidate list of the current image block. The SAO parameter candidate list includes a first SAO parameter of at least one first candidate tile, the first candidate tile being a tile in an encoded image frame prior to a current image frame in which the current tile is located. The first SAO parameters include SAO compensated luma component parameters, first chroma component parameters, and second chroma component parameters of the current image block.
In a possible implementation manner, the first candidate image block may specifically include an image block in the encoded image frame before the current frame where the current image block is located, the image block at the same position as the current image block, and an adjacent image block of the image block at the same position as the current image block.
Step S1450, the decoding end obtains the SAO parameter of the specified candidate image block according to the position index of the SAO parameter of the specified candidate image block carried in the encoded stream in the SAO parameter candidate list.
In implementation, when it is determined that the SAO parameter of the specified candidate image block is selected from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block according to the encoding stream, the SAO parameter of the specified candidate image block at a position corresponding to the position index may be obtained from the SAO parameter candidate list according to the position index of the SAO parameter of the specified candidate image block.
In step S1460, the decoding end performs SAO compensation on the current image block according to the SAO parameter of the designated candidate image block.
In implementation, after obtaining the SAO parameter of the specified candidate image block, the decoding end may perform SAO compensation on the current image block according to the SAO parameter of the specified candidate image block, so as to obtain a compensated current image block.
In a possible implementation manner, the method provided by the embodiment of the present disclosure may further include: when determining to use the pre-configured SAO parameter of the current image block to carry out SAO compensation on the current image block according to the coding stream, acquiring the pre-configured SAO parameter; and carrying out SAO compensation on the current image block according to the pre-configured SAO parameter.
In implementation, if it is not necessary to select the SAO parameter of the specified candidate image block from the SAO parameter candidate list of the current image block for the SAO compensation of the current image block, the pre-configured SAO parameter of the current image block should be carried in the coded stream. The decoding end can obtain the pre-configured SAO parameter, and according to the pre-configured SAO parameter, SAO compensation is carried out on the current image block.
In a possible implementation manner, the method provided by the embodiment of the present disclosure may further include: acquiring compensation strategy information of a current image block according to the coding stream; when the compensation strategy information is first strategy information, determining that SAO parameters of specified candidate image blocks are selected from an SAO parameter candidate list to perform SAO compensation on the current image block; and when the compensation strategy information is second strategy information, determining to use the pre-configured SAO parameter to carry out SAO compensation on the current image block.
In implementation, according to the encoded stream, the compensation policy information of the current image block is obtained. And if the compensation strategy information is the first strategy information, indicating that the SAO parameters of the specified candidate image block are selected from the SAO parameter candidate list to perform SAO compensation on the current image block. And if the compensation strategy information is the second strategy information, indicating that the pre-configured SAO parameters are used for SAO compensation of the current image block.
In addition to the first SAO parameter of the at least one first candidate image block, in a possible implementation manner, the SAO parameter candidate list further includes a first SAO parameter of the at least one second candidate image block; the second candidate image block includes an image block adjacent to the current image block in the current image frame where the current image block is located.
In a possible implementation manner, the SAO parameter candidate list further includes a second SAO parameter of at least one first candidate image block; and the SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
In a possible implementation manner, the SAO parameter candidate list further includes a second SAO parameter of at least one first candidate image block; or, the SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
In a possible implementation manner, the second SAO parameter may include an SAO compensated luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the current image block. And configuring OFF indication information in at least one of the brightness component parameter, the first chrominance component parameter and the second chrominance component parameter, wherein the OFF indication information is used for indicating that the parameter does not participate in SAO compensation of the current image block.
By the method provided by the disclosure, the first SAO parameter multiplexing the first candidate image block can be selected, when the coding stream is sent to the decoding end, only the position index of the specified candidate image block in the SAO parameter candidate list needs to be added to the coding stream, and compared with the addition of the pre-configuration SAO parameter, the data volume sent to the decoding end is reduced, and then the network overhead is reduced. Further, the first SAO parameter of the first candidate image block may be added to the SAO parameter candidate list as a candidate in the SAO parameter candidate list. The first candidate image block may be an image block in an encoded image frame before the current image frame where the current image block is located, and there is an association between the first candidate image block and the current image block, so that the first SAO parameter of the first candidate image block may be used to perform SAO compensation on the current image block. The distortion of the current image block may be reduced by attempting to multiplex the first SAO parameter of the first candidate image block.
An exemplary embodiment of the present disclosure provides an apparatus for adaptive sample compensation, as shown in fig. 15, the apparatus including:
an establishing module 1510, configured to establish an SAO parameter candidate list of a current image block, where the SAO parameter candidate list includes a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter which participate in SAO compensation of the current image block;
an adding module 1520, configured to carry, when it is determined that an SAO parameter of an appointed candidate image block is selected from the SAO parameter candidate list for SAO compensation of the current image block, a position index of the appointed candidate image block in the SAO parameter candidate list in an encoding stream, where, in the SAO parameter candidate list, a rate-distortion cost corresponding to the SAO parameter of the appointed candidate image block is minimum;
a sending module 1530, configured to send the encoded stream carrying the position index to a decoding end.
In one possible implementation, the apparatus further includes:
an obtaining module, configured to obtain a preconfigured SAO parameter when determining to use the preconfigured SAO parameter of the current image block to perform SAO compensation for the current image block, and carry the preconfigured SAO parameter in a coding stream;
the sending module 1530 is further configured to send the encoded stream carrying the preconfigured SAO parameter to the decoding end.
In a possible implementation manner, the first candidate image block specifically includes an image block at the same position as the current image block in an encoded image frame before the current image frame where the current image block is located, and an adjacent image block of an image block at the same position as the current image block.
In a possible implementation manner, the SAO parameter candidate list further includes a first SAO parameter of at least one second candidate image block;
the second candidate image block comprises an image block adjacent to the current image block in the current image frame where the current image block is located.
In a possible implementation manner, the SAO parameter candidate list further includes a second SAO parameter of at least one first candidate image block;
and/or
The SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
In a possible implementation manner, the second SAO parameter includes a luma component parameter, a first chroma component parameter, and a second chroma component parameter of SAO compensation for the current image block, where at least one of the luma component parameter, the first chroma component parameter, and the second chroma component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation for the current image block.
In one possible implementation, the apparatus further includes:
the determining module is used for determining compensation strategy information of the current image block according to the minimum rate distortion cost in the rate distortion costs respectively corresponding to all the candidate SAO parameters of the current image block; the all candidate SAO parameters comprise preconfigured SAO parameters and respective SAO parameters in the SAO parameter candidate list;
the determining module is further configured to determine, when the compensation policy information is first policy information, to select an SAO parameter of a specified candidate image block from the SAO parameter candidate list to perform SAO compensation on the current image block;
the determining module is further configured to determine to perform SAO compensation on the current image block using the preconfigured SAO parameter when the compensation policy information is second policy information.
In one possible implementation manner, the determining module is configured to:
when the rate distortion cost corresponding to the SAO parameter of the specified candidate image block in the SAO parameter candidate list is the minimum rate distortion cost, determining compensation strategy information of the current image block as the first strategy information;
and when the rate distortion cost corresponding to the pre-configured SAO parameter is the minimum rate distortion cost, determining the compensation strategy information of the current image block as the second strategy information.
In one possible implementation manner, the adding module 1520 is further configured to:
when the compensation strategy information of the current image block is determined to be the first strategy information, carrying the first strategy information in the coding stream;
and when the compensation strategy information of the current image block is determined to be the second strategy information, carrying the second strategy information in the coding stream.
By the device provided by the disclosure, the first SAO parameter of the first candidate image block can be selected for multiplexing, when the coding stream is sent to the decoding end, only the position index of the specified candidate image block in the SAO parameter candidate list needs to be added into the coding stream, and compared with the addition of the pre-configured SAO parameter, the data volume sent to the decoding end is reduced, and then the network overhead is reduced. Further, the first SAO parameter of the first candidate image block may be added to the SAO parameter candidate list as a candidate in the SAO parameter candidate list. The first candidate image block may be an image block in an encoded image frame before the current image frame where the current image block is located, and there is an association between the first candidate image block and the current image block, so that the first SAO parameter of the first candidate image block may be used to perform SAO compensation on the current image block. The current tile distortion may be reduced by attempting to multiplex the first SAO parameter for the first candidate tile.
An exemplary embodiment of the present disclosure provides an apparatus for adaptive sample compensation, as shown in fig. 16, the apparatus including:
an establishing module 1610, configured to establish an SAO parameter candidate list of a current image block, where the SAO parameter candidate list at least includes a second SAO parameter of a second candidate image block, and the second candidate image block includes an image block adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameters include a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter that do not fully participate in SAO compensation for the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation for the current image block;
an adding module 1620, configured to carry, when it is determined that an SAO parameter of an appointed candidate image block is selected from the SAO parameter candidate list to perform SAO compensation on the current image block, a position index of the appointed candidate image block in the SAO parameter candidate list in an encoding stream, where, in the SAO parameter candidate list, a rate-distortion cost corresponding to the SAO parameter of the appointed candidate image block is minimum;
a sending module 1630, configured to send the encoded stream carrying the position index to a decoding end.
In one possible implementation, the apparatus further includes:
the acquisition module is used for acquiring a pre-configured SAO parameter when determining that the pre-configured SAO parameter of the current image block is used for SAO compensation of the current image block, and carrying the pre-configured SAO parameter in a coding stream;
the sending module 1630 is further configured to send the encoded stream carrying the preconfigured SAO parameter to the decoding end.
In a possible implementation manner, the SAO parameter candidate list further includes a first SAO parameter of at least one second candidate image block, and the first SAO parameter includes an SAO compensated luma component parameter, a first chroma component parameter, and a second chroma component parameter of the current image block.
In one possible implementation, the apparatus further includes:
the determining module is used for determining compensation strategy information of the current image block according to the minimum rate distortion cost in the rate distortion costs respectively corresponding to all the candidate SAO parameters of the current image block; the all candidate SAO parameters comprise pre-configured SAO parameters and SAO parameters of each candidate block in the SAO parameter candidate list;
the determining module is further configured to determine, when the compensation policy information is first policy information, to select an SAO parameter of a specified candidate image block from the SAO parameter candidate list to perform SAO compensation on the current image block;
the determining module is further configured to determine to perform SAO compensation on the current image block using the preconfigured SAO parameter when the compensation policy information is second policy information.
In one possible implementation manner, the determining module is configured to:
when the rate distortion cost corresponding to the SAO parameter of the specified candidate image block in the SAO parameter candidate list is the minimum rate distortion cost, determining compensation strategy information of the current image block as the first strategy information;
and when the rate distortion cost corresponding to the pre-configured SAO parameter is the minimum rate distortion cost, determining the compensation strategy information of the current image block as the second strategy information.
In a possible implementation manner, the adding module 1620 is further configured to:
when the compensation strategy information of the current image block is determined to be the first strategy information, carrying the first strategy information in the coding stream;
and when the compensation strategy information of the current image block is determined to be the second strategy information, carrying the second strategy information in the coding stream.
With the apparatus provided by the present disclosure, the second SAO parameter of the second candidate tile is a parameter in which at least one component parameter does not participate in SAO compensation of the current tile. For some current image blocks, if all component parameters in the SAO parameters of the second candidate image block are not completely multiplexed, when performing SAO compensation on the current image block, the code rate remains unchanged, but the distortion degree may be reduced.
An exemplary embodiment of the present disclosure provides an apparatus for adaptive sample compensation, as shown in fig. 17, the apparatus including:
a receiving module 1710, configured to receive an encoded stream from an encoding end;
an establishing module 1720, configured to establish an SAO parameter candidate list of the current image block when it is determined, according to the encoding stream, that an SAO parameter of a specified candidate image block is selected from an SAO parameter candidate list of the current image block for SAO compensation of the current image block, where the SAO parameter candidate list includes a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter of SAO compensation of the current image block;
an obtaining module 1730, configured to obtain an SAO parameter of the specified candidate image block according to a position index, in the SAO parameter candidate list, of an SAO parameter of the specified candidate image block carried in the encoded stream;
a compensation module 1740, configured to perform SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
In one possible implementation, the apparatus further includes:
a determining module, configured to obtain a preconfigured SAO parameter when determining, according to the encoded stream, that a preconfigured SAO parameter of a current image block is used for SAO compensation of the current image block;
the compensation module 1740 is further configured to perform SAO compensation on the current image block according to the preconfigured SAO parameter.
In a possible implementation manner, the first candidate image block specifically includes an image block at the same position as the current image block in an encoded image frame before the current frame where the current image block is located, and an adjacent image block of an image block at the same position as the current image block.
In a possible implementation manner, the SAO parameter candidate list further includes a first SAO parameter of at least one second candidate image block;
the second candidate image block comprises an image block adjacent to the current image block in the current image frame where the current image block is located.
In a possible implementation manner, the SAO parameter candidate list further includes a second SAO parameter of at least one first candidate image block;
and/or
The SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
In a possible implementation manner, the second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the SAO compensation of the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in the SAO compensation of the current image block.
In a possible implementation manner, the obtaining module 1730 is further configured to obtain compensation policy information of a current image block according to the encoded stream;
the determining module is further configured to determine, when the compensation policy information is first policy information, to select an SAO parameter of a specified candidate image block from the SAO parameter candidate list to perform SAO compensation on the current image block;
the determining module is further configured to determine to perform SAO compensation on the current image block using the preconfigured SAO parameter when the compensation policy information is second policy information.
By the device provided by the disclosure, the first SAO parameter of the first candidate image block can be selected for multiplexing, when the coding stream is sent to the decoding end, only the position index of the specified candidate image block in the SAO parameter candidate list needs to be added into the coding stream, and compared with the addition of the pre-configured SAO parameter, the data volume sent to the decoding end is reduced, and then the network overhead is reduced. Further, the first SAO parameter of the first candidate image block may be added to the SAO parameter candidate list as a candidate in the SAO parameter candidate list. The first candidate image block may be an image block in an encoded image frame before the current image frame where the current image block is located, and there is an association between the first candidate image block and the current image block, so that the first SAO parameter of the first candidate image block may be used to perform SAO compensation on the current image block. The current tile distortion may be reduced by attempting to multiplex the first SAO parameter for the first candidate tile.
An exemplary embodiment of the present disclosure provides an apparatus for adaptive sample compensation, as shown in fig. 18, the apparatus including:
a receiving module 1810, configured to receive an encoded stream from an encoding end;
an establishing module 1820, configured to establish an SAO parameter candidate list of a current image block when it is determined, according to the encoded stream, that an SAO parameter of a specified candidate image block is selected from an SAO parameter candidate list of the current image block for SAO compensation of the current image block, where the SAO parameter candidate list at least includes a second SAO parameter of a second candidate image block, and the second candidate image block includes an image block, which is adjacent to the current image block, in a current image frame where the current image block is located; the second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of SAO compensation of the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation of the current image block;
an obtaining module 1830, configured to obtain an SAO parameter of the specified candidate tile according to a position index of the specified candidate tile in the SAO parameter candidate list, where the specified candidate tile is carried in the encoded stream; wherein, in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum;
a compensation module 1840, configured to perform SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
In one possible implementation, the apparatus further includes:
a determining module, configured to obtain a preconfigured SAO parameter when determining, according to the encoded stream, that a preconfigured SAO parameter of a current image block is used for SAO compensation of the current image block;
the compensation module 1840 is further configured to perform SAO compensation on the current image block according to the preconfigured SAO parameter.
In a possible implementation manner, the SAO parameter candidate list further includes a first SAO parameter of at least one second candidate image block, and the first SAO parameter includes an SAO compensated luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of the current image block.
In a possible implementation manner, the obtaining module 1830 is further configured to obtain compensation policy information of the current image block according to the encoded stream;
the determining module is further configured to determine, when the compensation policy information is first policy information, to select an SAO parameter of a specified candidate image block from the SAO parameter candidate list to perform SAO compensation on the current image block;
the determining module is further configured to determine to perform SAO compensation on the current image block using the preconfigured SAO parameter when the compensation policy information is second policy information.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
With the apparatus provided by the present disclosure, the second SAO parameter of the second candidate tile is a parameter in which at least one component parameter does not participate in SAO compensation of the current tile. For some current image blocks, if all component parameters in the SAO parameters of the second candidate image block are not completely multiplexed, when performing SAO compensation on the current image block, the code rate remains unchanged, but the distortion degree may be reduced.
It should be noted that: in the foregoing embodiment, when performing adaptive sample compensation, the apparatus for adaptive sample compensation is illustrated by only dividing the functional modules, and in practical applications, the function allocation may be completed by different functional modules according to needs, that is, the internal structures of the encoding end and the decoding end are divided into different functional modules, so as to complete all or part of the functions described above. In addition, the sample adaptive compensation apparatus provided in the foregoing embodiment and the sample adaptive compensation method embodiment belong to the same concept, and specific implementation processes thereof are described in the method embodiment and are not described herein again.
Yet another exemplary embodiment of the present disclosure provides a system for adaptive sample compensation, the system including an encoding side and a decoding side, wherein:
the encoding terminal is configured to establish an SAO parameter candidate list of a current image block, where the SAO parameter candidate list includes a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before a current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter which participate in SAO compensation of the current image block; when it is determined that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on current image blocks, carrying position indexes of the specified candidate image blocks in the SAO parameter candidate list in an encoding stream, wherein rate distortion cost corresponding to the SAO parameters of the specified candidate image blocks in the SAO parameter candidate list is minimum; sending the coded stream carrying the position index to the decoding end;
the decoding end is used for receiving the coding stream from the coding end; when determining that SAO parameters of appointed candidate image blocks are selected from an SAO parameter candidate list of the current image block to perform SAO compensation on the current image block according to the coding stream, establishing an SAO parameter candidate list of the current image block, wherein the SAO parameter candidate list comprises first SAO parameters of at least one first candidate image block, and the first candidate image block is an image block in a coded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter of SAO compensation of the current image block; acquiring the SAO parameters of the appointed candidate image blocks according to the position indexes of the SAO parameters of the appointed candidate image blocks carried in the coding stream in the SAO parameter candidate list; and carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
Yet another exemplary embodiment of the present disclosure provides a system for adaptive sample compensation, the system including an encoding side and a decoding side, wherein:
the encoding terminal is configured to establish an SAO parameter candidate list of a current image block, where the SAO parameter candidate list at least includes a second SAO parameter of a second candidate image block, and the second candidate image block includes an image block adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameters include a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter that do not fully participate in SAO compensation for the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation for the current image block; when it is determined that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on current image blocks, carrying position indexes of the specified candidate image blocks in the SAO parameter candidate list in an encoding stream, wherein rate distortion cost corresponding to the SAO parameters of the specified candidate image blocks in the SAO parameter candidate list is minimum; sending the coded stream carrying the position index to the decoding end;
the decoding end is used for receiving the coding stream from the coding end; when the SAO parameter of the appointed candidate image block is selected from an SAO parameter candidate list of the current image block to perform SAO compensation on the current image block according to the coding stream, establishing an SAO parameter candidate list of the current image block, wherein the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block which is adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of SAO compensation of the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation of the current image block; acquiring an SAO parameter of the specified candidate image block according to a position index of the specified candidate image block carried in the coding stream in the SAO parameter candidate list; wherein, in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum; and carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
With regard to the system in the above embodiment, the specific manner in which the encoding side and the decoding side perform operations has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Fig. 19 shows a schematic structural diagram of a computer device 1900 provided in an exemplary embodiment of the present disclosure. The computer device 1900 may be an encoding end or a decoding end in the above embodiments, may generate a large difference due to different configurations or performances, and may include one or more processors (CPUs) 1910 and one or more memories 1920. The memory 1920 stores at least one instruction, which is loaded and executed by the processor 1910, so as to implement the adaptive sample compensation method described in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (30)

1. A method for adaptive sample compensation, the method comprising:
establishing an SAO parameter candidate list of a current image block, wherein the SAO parameter candidate list comprises a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter which participate in SAO compensation of the current image block;
when it is determined that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on current image blocks, carrying position indexes of the specified candidate image blocks in the SAO parameter candidate list in an encoding stream, wherein rate distortion cost corresponding to the SAO parameters of the specified candidate image blocks in the SAO parameter candidate list is minimum;
and sending the coded stream carrying the position index to a decoding end.
2. The method of claim 1, further comprising:
when determining that the preconfigured SAO parameter of the current image block is used for SAO compensation of the current image block, acquiring the preconfigured SAO parameter and carrying the preconfigured SAO parameter in an encoding stream;
and sending the coded stream carrying the pre-configured SAO parameters to the decoding end.
3. The method as claimed in claim 1, wherein the first candidate image block specifically includes an image block at the same position as the current image block in an encoded image frame preceding the current image frame where the current image block is located, and an adjacent image block of an image block at the same position as the current image block.
4. The method of claim 3, wherein the SAO parameter candidate list further comprises a first SAO parameter of at least one second candidate tile;
the second candidate image block comprises an image block adjacent to the current image block in the current image frame where the current image block is located.
5. The method according to any of claims 1-4, wherein the SAO parameter candidate list further comprises a second SAO parameter of at least one first candidate tile;
and/or
The SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
6. The method of claim 5, wherein the second SAO parameters comprise an SAO compensated luma component parameter, a first chroma component parameter, and a second chroma component parameter of the current image block, and wherein at least one of the luma component parameter, the first chroma component parameter, and the second chroma component parameter is configured with OFF indication information for indicating that the parameter does not participate in SAO compensation of the current image block.
7. The method of claim 2, further comprising:
determining compensation strategy information of the current image block according to the minimum rate distortion cost in the rate distortion costs respectively corresponding to all candidate SAO parameters of the current image block; the all candidate SAO parameters comprise preconfigured SAO parameters and respective SAO parameters in the SAO parameter candidate list;
when the compensation strategy information is first strategy information, determining that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on the current image block;
and when the compensation strategy information is second strategy information, determining to use the pre-configured SAO parameter to carry out SAO compensation on the current image block.
8. The method according to claim 7, wherein the determining the compensation policy information of the current image block according to a minimum rate-distortion cost among rate-distortion costs respectively corresponding to all candidate SAO parameters of the current image block includes:
when the rate distortion cost corresponding to the SAO parameter of the specified candidate image block in the SAO parameter candidate list is the minimum rate distortion cost, determining compensation strategy information of the current image block as the first strategy information;
and when the rate distortion cost corresponding to the pre-configured SAO parameter is the minimum rate distortion cost, determining the compensation strategy information of the current image block as the second strategy information.
9. The method of claim 8, further comprising:
when the compensation strategy information of the current image block is determined to be the first strategy information, carrying the first strategy information in the coding stream;
and when the compensation strategy information of the current image block is determined to be the second strategy information, carrying the second strategy information in the coding stream.
10. A method for adaptive sample compensation, the method comprising:
establishing an SAO parameter candidate list of a current image block, wherein the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameters include a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter that do not fully participate in SAO compensation for the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation for the current image block;
when it is determined that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on current image blocks, carrying position indexes of the specified candidate image blocks in the SAO parameter candidate list in an encoding stream, wherein rate distortion cost corresponding to the SAO parameters of the specified candidate image blocks in the SAO parameter candidate list is minimum;
and sending the coded stream carrying the position index to a decoding end.
11. The method of claim 10, further comprising:
when determining that the pre-configured SAO parameter of the current image block is used for SAO compensation of the current image block, acquiring the pre-configured SAO parameter, and carrying the pre-configured SAO parameter in an encoding stream;
and sending the coded stream carrying the pre-configured SAO parameters to the decoding end.
12. The method of claim 10, wherein the SAO parameter candidate list further comprises a first SAO parameter for at least one second candidate tile, and wherein the first SAO parameter comprises an SAO compensated luma component parameter, a first chroma component parameter, and a second chroma component parameter for the current tile.
13. The method of claim 11, further comprising:
determining compensation strategy information of the current image block according to the minimum rate distortion cost in the rate distortion costs respectively corresponding to all candidate SAO parameters of the current image block; the all candidate SAO parameters comprise pre-configured SAO parameters and SAO parameters of each candidate block in the SAO parameter candidate list;
when the compensation strategy information is first strategy information, determining that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on the current image block;
and when the compensation strategy information is second strategy information, determining to use the pre-configured SAO parameter to carry out SAO compensation on the current image block.
14. The method according to claim 13, wherein the determining the compensation policy information of the current image block according to a minimum rate-distortion cost among rate-distortion costs respectively corresponding to all candidate SAO parameters of the current image block includes:
when the rate distortion cost corresponding to the SAO parameter of the specified candidate image block in the SAO parameter candidate list is the minimum rate distortion cost, determining compensation strategy information of the current image block as the first strategy information;
and when the rate distortion cost corresponding to the pre-configured SAO parameter is the minimum rate distortion cost, determining the compensation strategy information of the current image block as the second strategy information.
15. The method of claim 14, further comprising:
when the compensation strategy information of the current image block is determined to be the first strategy information, carrying the first strategy information in the coding stream;
and when the compensation strategy information of the current image block is determined to be the second strategy information, carrying the second strategy information in the coding stream.
16. A method for adaptive sample compensation, the method comprising:
receiving an encoded stream from an encoding end;
when determining that SAO parameters of appointed candidate image blocks are selected from an SAO parameter candidate list of the current image block to perform SAO compensation on the current image block according to the coding stream, establishing an SAO parameter candidate list of the current image block, wherein the SAO parameter candidate list comprises first SAO parameters of at least one first candidate image block, and the first candidate image block is an image block in a coded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter of SAO compensation of the current image block;
acquiring the SAO parameters of the appointed candidate image blocks according to the position indexes of the SAO parameters of the appointed candidate image blocks carried in the coding stream in the SAO parameter candidate list;
and carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
17. The method of claim 16, further comprising:
when determining to use a pre-configured SAO parameter of a current image block to perform SAO compensation on the current image block according to the coding stream, acquiring the pre-configured SAO parameter;
and carrying out SAO compensation on the current image block according to the pre-configured SAO parameter.
18. The method as claimed in claim 16, wherein the first candidate image block specifically includes an image block at the same position as the current image block in an encoded image frame before the current frame where the current image block is located, and an adjacent image block of an image block at the same position as the current image block.
19. The method of claim 18, wherein the SAO parameter candidate list further comprises a first SAO parameter of at least one second candidate tile;
the second candidate image block comprises an image block adjacent to the current image block in the current image frame where the current image block is located.
20. The method according to any of claims 16-19, wherein the SAO parameter candidate list further comprises a second SAO parameter of at least one first candidate tile;
and/or
The SAO parameter candidate list further includes a second SAO parameter of at least one second candidate image block.
21. The method of claim 20, wherein the second SAO parameters comprise a luma component parameter, a first chroma component parameter, and a second chroma component parameter of SAO compensation for the current picture block, wherein at least one of the luma component parameter, the first chroma component parameter, and the second chroma component parameter is configured with OFF indication information indicating that the parameter does not participate in SAO compensation for the current picture block.
22. The method of claim 17, further comprising:
acquiring compensation strategy information of the current image block according to the coding stream;
when the compensation strategy information is first strategy information, determining that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on the current image block;
and when the compensation strategy information is second strategy information, determining to use the pre-configured SAO parameter to carry out SAO compensation on the current image block.
23. A method for adaptive sample compensation, the method comprising:
receiving an encoded stream from an encoding end;
when the SAO parameter of the appointed candidate image block is selected from an SAO parameter candidate list of the current image block to perform SAO compensation on the current image block according to the coding stream, establishing an SAO parameter candidate list of the current image block, wherein the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block which is adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of SAO compensation of the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation of the current image block;
acquiring an SAO parameter of the specified candidate image block according to a position index of the specified candidate image block carried in the coding stream in the SAO parameter candidate list; wherein, in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum;
and carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
24. The method of claim 23, further comprising:
when determining to use a pre-configured SAO parameter of a current image block to perform SAO compensation on the current image block according to the coding stream, acquiring the pre-configured SAO parameter;
and carrying out SAO compensation on the current image block according to the pre-configured SAO parameter.
25. The method of claim 23, wherein the SAO parameter candidate list further comprises a first SAO parameter for at least one second candidate tile, and wherein the first SAO parameter comprises an SAO compensated luma component parameter, a first chroma component parameter, and a second chroma component parameter for the current tile.
26. The method of claim 24, further comprising:
acquiring compensation strategy information of the current image block according to the coding stream;
when the compensation strategy information is first strategy information, determining that SAO parameters of specified candidate image blocks are selected from the SAO parameter candidate list to perform SAO compensation on the current image block;
and when the compensation strategy information is second strategy information, determining to use the pre-configured SAO parameter to carry out SAO compensation on the current image block.
27. An apparatus for adaptive sample compensation, the apparatus comprising:
the image processing device comprises an establishing module, a processing module and a processing module, wherein the establishing module is used for establishing an SAO parameter candidate list of a current image block, the SAO parameter candidate list comprises a first SAO parameter of at least one first candidate image block, and the first candidate image block is an image block in an encoded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter which participate in SAO compensation of the current image block;
an adding module, configured to carry a position index of a specified candidate image block in an SAO parameter candidate list in an encoding stream when it is determined that SAO parameters of the specified candidate image block are selected from the SAO parameter candidate list to perform SAO compensation on a current image block, where a rate-distortion cost corresponding to the SAO parameters of the specified candidate image block is minimum in the SAO parameter candidate list;
and the sending module is used for sending the coding stream carrying the position index to a decoding end.
28. An apparatus for adaptive sample compensation, the apparatus comprising:
the image processing device comprises an establishing module, a searching module and a processing module, wherein the establishing module is used for establishing an SAO parameter candidate list of a current image block, the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block which is adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameters include a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter that do not fully participate in SAO compensation for the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation for the current image block;
an adding module, configured to carry a position index of a specified candidate image block in an SAO parameter candidate list in an encoding stream when it is determined that SAO parameters of the specified candidate image block are selected from the SAO parameter candidate list to perform SAO compensation on a current image block, where a rate-distortion cost corresponding to the SAO parameters of the specified candidate image block is minimum in the SAO parameter candidate list;
and the sending module is used for sending the coding stream carrying the position index to a decoding end.
29. An apparatus for adaptive sample compensation, the apparatus comprising:
a receiving module, configured to receive an encoded stream from an encoding end;
the establishing module is used for establishing an SAO parameter candidate list of the current image block when the SAO parameter of the appointed candidate image block is determined to be selected from the SAO parameter candidate list of the current image block for SAO compensation of the current image block according to the coding stream, wherein the SAO parameter candidate list comprises at least one first SAO parameter of a first candidate image block, and the first candidate image block is an image block in a coded image frame before the current image frame where the current image block is located; the first SAO parameter comprises a brightness component parameter, a first chrominance component parameter and a second chrominance component parameter of SAO compensation of the current image block;
an obtaining module, configured to obtain an SAO parameter of the specified candidate image block according to a position index, in the SAO parameter candidate list, of an SAO parameter of the specified candidate image block carried in the encoded stream;
and the compensation module is used for carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
30. An apparatus for adaptive sample compensation, the apparatus comprising:
a receiving module, configured to receive an encoded stream from an encoding end;
the establishing module is used for establishing an SAO parameter candidate list of the current image block when the SAO parameter of the appointed candidate image block is determined to be selected from the SAO parameter candidate list of the current image block for SAO compensation of the current image block according to the coding stream, wherein the SAO parameter candidate list at least comprises a second SAO parameter of a second candidate image block, and the second candidate image block comprises an image block which is adjacent to the current image block in a current image frame where the current image block is located; the second SAO parameter includes a luminance component parameter, a first chrominance component parameter, and a second chrominance component parameter of SAO compensation of the current image block, where at least one of the luminance component parameter, the first chrominance component parameter, and the second chrominance component parameter is configured with OFF indication information, and the OFF indication information is used to indicate that the parameter does not participate in SAO compensation of the current image block;
an obtaining module, configured to obtain an SAO parameter of the specified candidate image block according to a position index, in the SAO parameter candidate list, of the specified candidate image block carried in the encoded stream; wherein, in the SAO parameter candidate list, the rate distortion cost corresponding to the SAO parameter of the specified candidate image block is minimum;
and the compensation module is used for carrying out SAO compensation on the current image block according to the SAO parameter of the specified candidate image block.
CN201811109926.9A 2018-09-21 2018-09-21 Method, device and system for sample adaptive compensation Active CN110944188B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811109926.9A CN110944188B (en) 2018-09-21 2018-09-21 Method, device and system for sample adaptive compensation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811109926.9A CN110944188B (en) 2018-09-21 2018-09-21 Method, device and system for sample adaptive compensation

Publications (2)

Publication Number Publication Date
CN110944188A true CN110944188A (en) 2020-03-31
CN110944188B CN110944188B (en) 2022-04-08

Family

ID=69905317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811109926.9A Active CN110944188B (en) 2018-09-21 2018-09-21 Method, device and system for sample adaptive compensation

Country Status (1)

Country Link
CN (1) CN110944188B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113099221A (en) * 2021-02-22 2021-07-09 浙江大华技术股份有限公司 Cross-component sample point self-adaptive compensation method, coding method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104335587A (en) * 2012-07-04 2015-02-04 英特尔公司 Inter-view filter parameters re-use for three dimensional video coding
WO2015124108A1 (en) * 2014-02-20 2015-08-27 Mediatek Inc. Method for controlling sample adaptive offset filtering applied to different partial regions in one frame based on different weighting parameters and related sample adaptive offset filter
CN105979262A (en) * 2016-05-06 2016-09-28 西安电子科技大学 Time relevance and in-frame predication direction based SAO optimization method of HEVC
CN106131554A (en) * 2016-07-07 2016-11-16 杭州电子科技大学 The HEVC point self-adapted compensation method of quick sample product based on major side direction
CN107431816A (en) * 2015-03-06 2017-12-01 高通股份有限公司 Low complex degree sample adaptively offsets (SAO) decoding
US20180255303A1 (en) * 2013-07-30 2018-09-06 Texas Instruments Incorporated Method and apparatus for real-time sao parameter estimation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104335587A (en) * 2012-07-04 2015-02-04 英特尔公司 Inter-view filter parameters re-use for three dimensional video coding
US20180255303A1 (en) * 2013-07-30 2018-09-06 Texas Instruments Incorporated Method and apparatus for real-time sao parameter estimation
WO2015124108A1 (en) * 2014-02-20 2015-08-27 Mediatek Inc. Method for controlling sample adaptive offset filtering applied to different partial regions in one frame based on different weighting parameters and related sample adaptive offset filter
CN107431816A (en) * 2015-03-06 2017-12-01 高通股份有限公司 Low complex degree sample adaptively offsets (SAO) decoding
CN105979262A (en) * 2016-05-06 2016-09-28 西安电子科技大学 Time relevance and in-frame predication direction based SAO optimization method of HEVC
CN106131554A (en) * 2016-07-07 2016-11-16 杭州电子科技大学 The HEVC point self-adapted compensation method of quick sample product based on major side direction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113099221A (en) * 2021-02-22 2021-07-09 浙江大华技术股份有限公司 Cross-component sample point self-adaptive compensation method, coding method and related device

Also Published As

Publication number Publication date
CN110944188B (en) 2022-04-08

Similar Documents

Publication Publication Date Title
WO2020221203A1 (en) An encoder, a decoder and corresponding methods of intra prediction
KR20220024817A (en) Encoders, decoders and their methods
US20210377553A1 (en) Virtual pipeline for video encoding and decoding
EP3939291A1 (en) Method and apparatus for video encoding and decoding with subblock based local illumination compensation
CN115104301A (en) Neural network based intra prediction for video encoding or decoding
CN112740674A (en) Method and apparatus for video encoding and decoding using bi-prediction
CN112385212A (en) Syntax element for video encoding or decoding
KR20220127314A (en) Encoders, decoders, and corresponding methods for adaptive loop filtering
CN113302924A (en) Quantization for video encoding and decoding
CN112166607A (en) Method and apparatus for video encoding and decoding using partially shared luma and chroma coding trees
CN110944188B (en) Method, device and system for sample adaptive compensation
CN111937383B (en) Chroma quantization parameter adjustment in video encoding and decoding
CN116033147A (en) Image coding and decoding method and device
CN114026866A (en) Chroma processing for video encoding and decoding
CN114450951A (en) Motion vector prediction in video encoding and decoding
CN113273198A (en) Parameter grouping between multiple coding units for video encoding and decoding
RU2809192C2 (en) Encoder, decoder and related methods of interframe prediction
RU2787885C2 (en) Method and equipment for mutual prediction, bit stream and non-volatile storage carrier
US20230403406A1 (en) Motion coding using a geometrical model for video compression
KR20230170004A (en) Spatial lighting compensation for large areas
KR20230162801A (en) Externally enhanced prediction for video coding
KR20210129180A (en) Encoder, decoder and corresponding method of reducing complexity for intra prediction for planar mode
CN118120228A (en) Chroma prediction for video encoding and decoding based on template matching

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant