CN114125445A - Decoding method, device, equipment and machine readable storage medium - Google Patents

Decoding method, device, equipment and machine readable storage medium Download PDF

Info

Publication number
CN114125445A
CN114125445A CN202111628844.7A CN202111628844A CN114125445A CN 114125445 A CN114125445 A CN 114125445A CN 202111628844 A CN202111628844 A CN 202111628844A CN 114125445 A CN114125445 A CN 114125445A
Authority
CN
China
Prior art keywords
current
reconstruction
pixel
block
pixel point
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
CN202111628844.7A
Other languages
Chinese (zh)
Other versions
CN114125445B (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 CN202111628844.7A priority Critical patent/CN114125445B/en
Priority claimed from CN202110739453.6A external-priority patent/CN114640847B/en
Publication of CN114125445A publication Critical patent/CN114125445A/en
Application granted granted Critical
Publication of CN114125445B publication Critical patent/CN114125445B/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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation

Landscapes

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

Abstract

The application provides a coding and decoding method, a device and equipment thereof, wherein the method can comprise the following steps: acquiring a first brightness reconstruction block corresponding to a current brightness block; performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; performing horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; performing SAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; and performing ALF filtering on the sixth luminance reconstruction block to obtain a seventh luminance reconstruction block. By the technical scheme, the coding performance can be improved.

Description

Decoding method, device, equipment and machine readable storage medium
Technical Field
The present application relates to the field of encoding and decoding technologies, and in particular, to a decoding method, apparatus, device, and machine-readable storage medium.
Background
In order to achieve the purpose of saving space, video images are transmitted after being coded, and the complete video coding method can comprise the processes of prediction, transformation, quantization, entropy coding, filtering and the like. The predictive coding may include intra-frame coding and inter-frame coding, among others. Further, inter-frame coding uses the correlation of the video time domain and uses the pixels of the adjacent coded images to predict the current pixel, so as to achieve the purpose of effectively removing the video time domain redundancy. The intra-frame coding means that the current pixel is predicted by using the pixel of the coded block of the current frame image by utilizing the correlation of a video spatial domain so as to achieve the purpose of removing the video spatial domain redundancy.
Commonly used filtering techniques include DBF (DeBlocking filtering) technique, SAO (Sample Adaptive Offset) technique, and ALF (Adaptive Loop Filter) technique. The DBF technique is used to remove block boundary effects generated by block coding. The SAO technique makes a reconstructed image closer to an original image by classifying based on pixel values of samples and gradient values of surrounding blocks, adding different compensation values to the pixel values of each class. The ALF technology filters the reconstructed image through a wiener filter, so that the reconstructed image is closer to the original image.
However, how to implement filtering based on DBF, SAO, ALF, and the like, the related art has no reasonable filtering manner, and all have the problems of poor filtering effect, poor coding performance, and the like. For example, after filtering the current block based on DBF, SAO, ALF, and the like, a filtering phenomenon may occur, that is, a pixel value after filtering is far larger or far smaller than a pixel value before filtering.
Disclosure of Invention
The application provides a coding and decoding method, device and equipment thereof, which can improve coding performance.
The application provides a coding and decoding method, which comprises the following steps:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
The present application provides a decoding apparatus, the decoding apparatus including:
a memory configured to store video data;
a decoder configured to implement:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
The present application provides an encoding apparatus, including:
a memory configured to store video data;
an encoder configured to implement:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
The application provides a decoding side device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine executable instructions to perform the steps of:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
The application provides a coding end device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine executable instructions to perform the steps of:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
As can be seen from the above technical solutions, in the embodiment of the present application, if the current luma block enables the DBF mode, the first luma reconstruction block is subjected to vertical DBF filtering to obtain a second luma reconstruction block, if the current luma block enables the vertical DBR mode, the second luma reconstruction block is subjected to vertical DBR filtering to obtain a third luma reconstruction block, if the current luma block enables the DBF mode, the third luma reconstruction block is subjected to horizontal DBF filtering to obtain a fourth luma reconstruction block, if the current luma block enables the horizontal DBR mode, the fourth luma reconstruction block is subjected to horizontal DBR filtering to obtain a fifth luma reconstruction block, if the current luma block enables the ESAO mode, the fifth luma reconstruction block is subjected to ESAO filtering to obtain a sixth luma reconstruction block (or if the current luma block enables the SAO mode, the fifth luma reconstruction block is subjected to SAO filtering to obtain a sixth luma reconstruction block), if the current luma block enables the ALF mode, then the sixth luminance reconstruction block is subject to ALF filtering to obtain a seventh luminance reconstruction block. In summary, it can be seen that filtering processes such as vertical DBF filtering, vertical DBR filtering, horizontal DBF filtering, horizontal DBR filtering, ESAO filtering (or SAO filtering), and ALF filtering can be performed on a current luma block in sequence, so that a reasonable filtering manner is proposed, problems such as poor filtering effect and poor coding performance are avoided, i.e., the filtering effect can be improved, the coding performance can be improved, and a filtering phenomenon cannot occur, i.e., a pixel value after filtering is not much larger or much smaller than a pixel value before filtering.
Drawings
FIG. 1 is a schematic diagram of a codec framework according to an embodiment of the present application;
FIGS. 2A and 2B are schematic diagrams of block partitioning in one embodiment of the present application;
FIG. 3 is a flow chart of a method of encoding and decoding in one embodiment of the present application;
FIGS. 4A-4D are schematic diagrams of vertical and horizontal boundaries in one embodiment of the present application;
fig. 5 is a schematic diagram illustrating a process of processing a current luma block and a current chroma block according to an embodiment of the present application; a
Fig. 6A and 6B are schematic diagrams of the shape of the filter coefficients in an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples and claims of this application, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items. It should also be understood that although the terms first, second, third, etc. may be used herein to describe various information in embodiments of the present application, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the embodiments of the present application. Depending on the context, moreover, the word "if" may be used is interpreted as "at … …," or "when … …," or "in response to a determination.
In order to make the technical solutions of the present application better understood by those skilled in the art, the following briefly describes technical terms.
The video coding framework comprises the following steps: referring to fig. 1, a video encoding frame may be used to implement the encoding-side processing flow in the embodiment of the present application, a schematic diagram of a video decoding frame may be similar to that in fig. 1, and details are not repeated here, and a video decoding frame may be used to implement the decoding-side processing flow in the embodiment of the present application. In the video encoding and decoding frameworks, there may be included, but not limited to: prediction (e.g., intra prediction and inter prediction), motion estimation/motion compensation, reference picture buffer, in-loop filtering, reconstruction, transformation, quantization, inverse transformation, inverse quantization, entropy coder, and so on. At the encoding end, the processing flow of the encoding end is realized through the cooperation of the modules, and at the decoding end, the processing flow of the decoding end is realized through the cooperation of the modules.
The loop filter is used for reducing the problems of image block effect or poor image effect and the like, can improve the image quality, and can comprise three filters of DBF, SAO, ALF and the like. DBF is deblocking filtering for removing block boundary effects generated by block coding. SAO is a sample adaptive compensation filter for making a reconstructed image closer to an original image by classifying based on pixel values of samples and gradient values of surrounding blocks, adding different compensation values to the pixel values of each class. The ALF is self-adaptive loop filtering, namely, the reconstructed image is subjected to enhancement filtering through a wiener filter, so that the reconstructed image is closer to the original image.
In the video encoding and decoding process, the prediction process may include intra-frame prediction and inter-frame prediction, where the intra-frame prediction considers that there is a strong spatial correlation between adjacent blocks, and uses surrounding reconstructed pixels as reference pixels to predict a current uncoded block, and only needs to perform subsequent encoding processing on a residual value instead of encoding an original value, thereby effectively removing redundancy in a spatial domain and greatly improving compression efficiency. Inter-frame prediction is to use the correlation of video time domain and use the pixels of adjacent coded images to predict the pixels of the current image, so as to achieve the purpose of removing the video time domain redundancy.
For example, in a video encoding and decoding process, transformation refers to converting an image described in the form of pixels in a spatial domain into an image in a transform domain, and representing the image in the form of transform coefficients. Most images contain more flat areas and slowly-changing areas, so that the image energy can be distributed in a spatial domain in a dispersed manner in a proper conversion process and converted into relatively concentrated distribution in a conversion domain, thereby removing the frequency domain correlation among signals and effectively compressing a code stream in cooperation with a quantization process.
For example, entropy coding refers to a method of lossless coding according to the principle of information entropy, and is performed in a last processing module of video compression to convert a series of element symbols used for representing a video sequence into a binary code stream for transmission or storage, where the input symbols may include quantized transform coefficients, motion vector information, prediction mode information, transform quantization related syntax, and the like, and the output data of the entropy coding module is the final code stream of the original video compression. Entropy coding can effectively remove the statistical redundancy of the video element symbols, and is one of the important tools for ensuring the compression efficiency of video coding.
Illustratively, the loop filter is used to reduce the blocking effect or poor image effect of the image, and is used to improve the image quality, and may include, but is not limited to, DBF, SAO, ALF, and the like. For example, in a video image, the boundaries of image blocks are not continuous, the compressed and reconstructed image has obvious blocking effect and seriously affects the image quality, and the DBF technology can be adopted to carry out deblocking filtering on the boundaries. Performing deblocking filtering on the boundaries of all Prediction Units (PUs) and Transform Units (TUs), wherein the deblocking filtering includes filtering decision and filtering operation, and in the filtering decision process, obtaining boundary strength (such as no filtering, weak filtering or strong filtering) and filtering parameters. During the filtering operation, the pixels are modified according to the boundary strength and the filtering parameters, for example, when the boundary is filtered, strong filtering or weak filtering is performed, and taps with different lengths are used for filtering.
SAO filtering: for eliminating ringing effects. The ringing effect is a phenomenon that ripples are generated around edges after decoding due to quantization distortion of high-frequency alternating current coefficients, and the ringing effect is more obvious when a transform block size is larger. The basic principle of SAO is to compensate for peak pixels plus negative values and for valley pixels plus positive values in the reconstructed curve. SAO is a Coding Tree Unit (CTU) as a basic Unit, and may include two major compensation types: edge Offset (EO for short) and sideband Offset (BO for short), and a parameter fusion technique is introduced.
And (3) ALF filtering: the optimal filter in the mean square sense, namely the wiener filter, can be obtained by calculation according to the original signal and the distorted signal. Filters for ALF may include, but are not limited to: a 7 x 7 diamond filter or a 5 x 5 diamond filter, a 7 x 7 cross plus 3 x3 square centrosymmetric filter, or a 7 x 7 cross plus 5 x 5 square centrosymmetric filter.
Flag coding: in video coding, there are many modes. One of the modes may be used for a certain block. To indicate which mode is used, each block needs to be marked by encoding the corresponding flag bit. For example, for the encoding end, the value of the flag bit is determined through the decision of the encoding end, and then the value of the flag bit is encoded and transmitted to the decoding end. For the decoding end, whether the corresponding mode is enabled or not is determined by analyzing the value of the flag bit.
In the encoding process of the flag bit, the encoding of the flag bit can be realized by a high level syntax, and the high level syntax can be used for indicating whether to enable a certain mode, namely to enable the certain mode by the high level syntax, or to forbid the enabling of the certain mode.
Illustratively, the high level syntax may be a sequence header high level syntax, or a picture parameter set level high level syntax, or a slice header level high level syntax, or a picture header level high level syntax, etc., and the high level syntax is not limited.
For the high level syntax of the sequence header, there is a flag bit that determines whether certain modes (tools/methods) are allowed to switch in the entire video sequence (i.e., multiple frames of video pictures). For example, if the flag bit takes a value a (e.g., a value of 1), the video sequence may allow the mode corresponding to the flag bit to be enabled; alternatively, if the flag bit takes the value B (e.g., the value 0, etc.), the video sequence may not allow the mode corresponding to the flag bit to be enabled. Illustratively, a video sequence is the highest level syntax structure of a bitstream, the video sequence starting with the first sequence header, and the sequence end code or video editing code indicating the end of a video sequence. The sequence head between the first sequence head of a video sequence to the first occurring sequence end code or video editing code is a repeating sequence head, each sequence head being followed by one or more encoded pictures, each picture being preceded by a picture head.
For the high level syntax of Picture Parameter Set (PPS), there is a flag that determines whether certain mode (tool/method) switches are allowed in a certain picture (e.g., video picture). If the flag bit is value A, the video image allows to start the mode corresponding to the flag bit; and if the flag bit is the value B, the video image is not allowed to start the mode corresponding to the flag bit.
For the high level syntax of a picture header, there is a flag bit in a picture header whether certain mode (tool/method) switches are allowed. If the flag bit is value A, the image head allows to start the mode corresponding to the flag bit; if the flag bit is set to value B, the image header does not allow the mode corresponding to the flag bit to be enabled. Illustratively, the header holds common information only for the current picture, e.g., when the picture contains multiple slices, the multiple slices can share the information in the header.
For the high level syntax of Slice header, there is a flag bit in a Slice whether certain mode (tool/method) switches are allowed. If the flag bit is the value A, the slice allows the mode corresponding to the flag bit to be started; if the flag bit is the value B, the slice does not allow the mode corresponding to the flag bit to be started. For example, a frame of image may contain 1 Slice or multiple slices, and the high level syntax for Slice header (Slice header) is configured for each Slice.
High level syntax: indicating whether enabling of certain tools (methods) is allowed, i.e. enabled by a high level syntax, or disabled. For example, referring to the above description, the high level syntax may be a sequence header high level syntax, or a picture parameter set level high level syntax, or a slice header level high level syntax, or a picture header level high level syntax, and the high level syntax is not limited as long as the above functions can be implemented.
Rate-Distortion principle (Rate-Distortion Optimized): there are two major indicators for evaluating coding efficiency: code rate and Peak Signal to Noise Ratio (PSNR), the smaller the bit stream, the larger the compression rate, and the larger the PSNR, the better the reconstructed image quality, and in the mode selection, the discrimination formula is essentially the comprehensive evaluation of the two. For example, for the Rate-Distortion Cost (Rate-Distortion Cost), the formula of the Rate-Distortion Cost is: j (mode) ═ D + λ R. Wherein D represents Distortion, which can be generally measured by using SSE index, wherein SSE refers to the sum of the mean square of the difference values between the reconstructed image block and the source image; and λ is a lagrange multiplier, and R is the actual number of bits required for encoding the image block in the mode, including the sum of bits required for encoding mode information, motion information, residual error, and the like, for example, R is the number of bits required for encoding all filter coefficients. When selecting the mode, if the RDO principle is used to make a comparison decision on the coding mode, the best coding performance can be ensured.
The block division technology comprises the following steps: a Coding Tree Unit (CTU) is recursively divided into CUs using a quadtree. It is determined at the leaf node CU level whether to use intra-coding or inter-coding. A CU may be divided into two or four Prediction Units (PUs), and the same Prediction information is used in the same PU. After residual information is obtained after prediction is completed, a CU may be four-way divided into a plurality of Transform Units (TUs). For example, the current image block in this application is a PU. The block partitioning technique may also be changed, for example, by using a partition structure mixed with binary tree/ternary tree/quadtree instead of the original partitioning mode, canceling the concept of CU, PU, TU, and supporting a more flexible partitioning manner for the CU. A CU may be a square or rectangular partition. The CTU first performs the partition of the quadtree, and then leaf nodes of the quadtree partition may perform the partition of the binary tree and the ternary tree. Referring to fig. 2A, a CU has five partition types, which are quadtree partition, horizontal binary tree partition, vertical binary tree partition, horizontal ternary tree partition, and vertical ternary tree partition, respectively, and referring to fig. 2B, the CU partition in the CTU may be any combination of the above five partition types, and different partition manners are known from the above, so that the shapes of the PUs are different, such as rectangles and squares with different sizes.
In the related art, although the DBF, SAO, ALF technologies and the like can implement filtering, how to implement filtering based on the DBF, SAO, ALF and the like does not have a reasonable filtering manner in the related art, and all the related technologies have the problems of poor filtering effect, poor coding performance and the like. For example, after filtering the current block based on DBF, SAO, ALF, and the like, a filtering phenomenon may occur, that is, a pixel value after filtering is far larger or far smaller than a pixel value before filtering.
In view of the above findings, the present application provides a coding and decoding method, which achieves the purpose of flexibly controlling each filtering technology by designing control methods of multiple filters, and is a multi-mode filtering control method. For example, filtering processes such as vertical DBF filtering, vertical DBR filtering, horizontal DBF filtering, horizontal DBR filtering, ESAO filtering (or SAO filtering), and ALF filtering are sequentially performed on the current luma block, so that a reasonable filtering manner is proposed, the filtering effect is improved, and the coding performance is improved.
The following describes the encoding and decoding method in the embodiments of the present application in detail with reference to specific embodiments.
Example 1: an embodiment of the present application provides a coding and decoding method, which may be applied to an encoding end or a decoding end, and is shown in fig. 3, and is a flow diagram of the coding and decoding method, where the method may include:
step 301, obtaining a first luminance reconstruction block corresponding to the current luminance block, that is, an original luminance reconstruction block before filtering.
Illustratively, the current luma block may also be referred to as a current luma component, i.e., a luma component of the current block. For each pixel point in the current luminance block, the current pixel point can be called as a current pixel point, that is, the current pixel point is the current luminance pixel point.
Step 302, if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, the second luma reconstruction block is determined based on the first luma reconstruction block, that is, if the DBF mode is not enabled for the current luma block, the first luma reconstruction block may be directly used as the second luma reconstruction block.
In a possible implementation manner, the first luminance reconstruction block may include first luminance reconstruction pixel values of a plurality of pixel points, the second luminance reconstruction block may include second luminance reconstruction pixel values of a plurality of pixel points, and the pixel points in the first luminance reconstruction block correspond to the pixel points in the second luminance reconstruction block one to one. Based on this, the vertical DBF filtering process may include:
step S11, for each current pixel point in the first luminance reconstruction block (i.e., each pixel point in the first luminance reconstruction block is used as a current pixel point), if the current pixel point meets the pixel level enabling condition of the vertical boundary filtering in the DBF mode, determining a second luminance reconstruction pixel value of the current pixel point based on the first luminance reconstruction pixel value of the current pixel point and the first luminance reconstruction pixel values of the surrounding pixel points of the current pixel point. And if the current pixel point does not meet the pixel level starting condition of the vertical boundary filtering in the DBF mode, determining a second brightness reconstruction pixel value of the current pixel point based on the first brightness reconstruction pixel value of the current pixel point, namely, taking the first brightness reconstruction pixel value of the current pixel point as the second brightness reconstruction pixel value of the current pixel point.
For example, the surrounding pixels of the current pixel may be pixels surrounding the vertical boundary of the current pixel. For example, say thatThe peripheral pixels of the current pixel can be adjacent pixels of the vertical boundary of the current pixel and can also be non-adjacent pixels of the vertical boundary of the current pixel. The peripheral pixels of the current pixel can be pixels in the current brightness block or pixels in an adjacent brightness block of the current brightness block. The surrounding pixels of the current pixel can be pixels on the left side of the current pixel and pixels on the right side of the current pixel, and the positions of the surrounding pixels of the current pixel are not limited. Referring to fig. 4A, which is a schematic diagram of a vertical boundary of a current pixel point, it is obvious that the vertical boundary of the current pixel point is a boundary of one pixel point and is a boundary of a line where the current pixel point is located. If the current pixel point is p in the current brightness block0Then the surrounding pixels of the current pixel can be q in the adjacent luminance block at the right side of the current luminance block0. Alternatively, the surrounding pixels of the current pixel may include p1、p2、p3、q0、q1、q2、q3At least one of (a).
Exemplarily, the second luminance reconstruction pixel value of the current pixel point can be determined based on the first luminance reconstruction pixel value of the current pixel point and the first luminance reconstruction pixel values of the surrounding pixel points of the current pixel point, the determination method is not limited, a DBF filtering implementation method can be adopted, and the DBF filtering implementation method can be referred to in the following embodiments.
Illustratively, on the basis that the DBF mode is enabled in the current luminance block, it is further necessary to determine whether the current pixel point meets a pixel-level enabling condition of vertical boundary filtering in the DBF mode for each current pixel point in the first luminance reconstruction block. The pixel-level enabling condition that the current pixel point satisfies the vertical boundary filtering in the DBF mode may include, but is not limited to: the vertical boundary of the current luminance block allows DBF filtering, and the boundary strength (i.e., BS) of the vertical boundary of the current pixel point is greater than 0. For example, it may be determined whether the vertical boundary of the current luminance block allows DBF filtering, if the vertical boundary of the current luminance block does not allow DBF filtering, it may be determined that the current pixel does not satisfy the pixel level enabling condition of the vertical boundary filtering in the DBF mode, and if the vertical boundary of the current luminance block allows DBF filtering, the boundary strength of the vertical boundary of the current pixel may be determined. If the boundary strength is greater than 0, determining that the current pixel point meets the pixel level enabling condition of the vertical boundary filtering in the DBF mode, and if the boundary strength is equal to 0, determining that the current pixel point does not meet the pixel level enabling condition of the vertical boundary filtering in the DBF mode.
As shown in fig. 4A, a schematic diagram of a vertical boundary of a current pixel point, and as shown in fig. 4B, a schematic diagram of a vertical boundary of a current luminance block, it is obvious that the vertical boundary of the current luminance block includes the vertical boundary of the current pixel point, that is, the vertical boundary of the current pixel point is a boundary of a line where the current pixel point is located, the vertical boundary of the current luminance block includes boundaries of all lines of the current luminance block, and the boundaries of all lines of the current luminance block correspond to a same vertical line boundary.
Illustratively, the vertical boundary of the current luminance block that satisfies one of the following conditions does not require filtering, i.e., the vertical boundary of the current luminance block does not allow DBF filtering: if the vertical boundary to be filtered (i.e., the vertical boundary of the current luma block) is an image boundary, then the vertical boundary does not need to be filtered. If the vertical boundary to be filtered is a slice boundary and the cross-slice loop filtering enable flag is 0, then the vertical boundary does not need to be filtered. If the vertical boundary to be filtered is a luma filter boundary that is not the boundary of a luma coding block or a luma transform block, then the vertical boundary does not need filtering. If the vertical boundary to be filtered is a luminance filtering boundary, the sub-block transform flag of the coding unit where the luminance filtering boundary is located is 1, and the luminance filtering boundary is not the boundary of a luminance coding block, the vertical boundary does not need filtering. If the string copy intra prediction mode flag of the coding unit where the vertical boundary to be filtered is located is 1, then the vertical boundary does not need to be filtered.
Step S12, determining a second luminance reconstruction block based on the second luminance reconstruction pixel value of each current pixel point.
For example, after obtaining the second luminance reconstruction pixel values of all current pixel points for each current pixel point in the first luminance reconstruction block, the second luminance reconstruction pixel values of all current pixel points may be combined into a second luminance reconstruction block.
Step S13, if the current pixel point meets the pixel level enabling condition of the vertical boundary filtering in the DBF mode, determining a reference pixel point corresponding to the current pixel point from the neighboring luminance block of the vertical boundary of the current pixel point.
For example, the reference pixel point may be a pixel point adjacent to the current pixel point in the adjacent luminance block, the reference pixel point may also be a pixel point not adjacent to the current pixel point in the adjacent luminance block, and the reference pixel point may also be a pixel point symmetric to the current pixel point in the adjacent luminance block, which is not limited herein. Referring to fig. 4A, it is a schematic diagram of a vertical boundary of a current pixel point, if the current pixel point is p in a current luminance block0Then the reference pixel point can be q in the adjacent luminance block0If the current pixel point is p in the current brightness block1Then the reference pixel point can be q in the adjacent luminance block1And so on.
Step S14, determining a second luminance reconstruction pixel value of the reference pixel point based on the first luminance reconstruction pixel value of the reference pixel point in the adjacent luminance block and the first luminance reconstruction pixel values of the surrounding pixel points of the reference pixel point.
For example, the surrounding pixels of the reference pixel may be pixels surrounding the vertical boundary of the current pixel (i.e., the vertical boundary of the reference pixel). For example, the peripheral pixels of the reference pixel may be the neighboring pixels of the vertical boundary of the reference pixel, or may be the non-neighboring pixels of the vertical boundary of the reference pixel. The peripheral pixels of the reference pixel may be pixels located in an adjacent luminance block, or pixels located in a current luminance block. The peripheral pixels of the reference pixel may be pixels on the left side of the reference pixel, or pixels on the right side of the reference pixel, and are not limited to this. FIG. 4A is a schematic diagram of the vertical boundary of the current pixel/reference pixel if the reference pixel is an adjacent bright pixelQ in degree block0Then the surrounding pixels of the reference pixel can be p in the current luminance block0. Alternatively, the surrounding pixels of the reference pixel may include p0、p1、p2、p3、q1、q2、q3At least one of (a).
For example, based on the first luminance reconstruction pixel value of the reference pixel and the first luminance reconstruction pixel values of the surrounding pixels of the reference pixel, the second luminance reconstruction pixel value of the reference pixel may be determined, and this determination method is not limited, and a DBF filtering implementation may be adopted, which may be referred to in the following embodiments.
Step 303, if the vertical DBR mode is enabled for the current luminance block, performing vertical DBR filtering on the second luminance reconstruction block to obtain a third luminance reconstruction block; otherwise, a third luma reconstruction block is determined based on the second luma reconstruction block, that is, the second luma reconstruction block may be regarded as the third luma reconstruction block if the vertical DBR mode is not enabled for the current luma block.
Illustratively, the DBR mode may be a DeBlocking filtering (DeBlocking reference) mode.
In a possible implementation manner, the second luminance reconstruction block may include second luminance reconstruction pixel values of a plurality of pixel points, the third luminance reconstruction block may include third luminance reconstruction pixel values of a plurality of pixel points, and the pixel points in the second luminance reconstruction block correspond to the pixel points in the third luminance reconstruction block one to one. Based on this, the vertical DBR filtering process may include:
step S21, for each current pixel point in the second luminance reconstruction block (i.e., each pixel point in the second luminance reconstruction block is used as a current pixel point), if the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode in the vertical DBR mode, determining a third luminance reconstruction pixel value of the current pixel point based on the second luminance reconstruction pixel value of the current pixel point and the first luminance reconstruction pixel value of the current pixel point. And if the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, determining the gradient value of the current pixel point based on the second brightness reconstruction pixel value of the current pixel point and the second brightness reconstruction pixel values of surrounding pixel points of the current pixel point, and determining the third brightness reconstruction pixel value of the current pixel point based on the gradient value of the current pixel point and the second brightness reconstruction pixel value of the current pixel point. And if the current pixel point does not meet the pixel level starting condition of the vertical DBR mode, determining a third brightness reconstruction pixel value of the current pixel point based on the second brightness reconstruction pixel value of the current pixel point, namely taking the second brightness reconstruction pixel value of the current pixel point as the third brightness reconstruction pixel value of the current pixel point.
Illustratively, on the basis that the vertical DBR mode is enabled for the current luminance block, it is further necessary to determine whether the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode of the vertical DBR mode for each current pixel point in the second luminance reconstruction block. If so, the third brightness reconstruction pixel value of the current pixel point can be determined by adopting the first condition. If not, whether the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode needs to be judged. And if so, determining a third brightness reconstruction pixel value of the current pixel point by adopting the second condition. And if not, directly taking the second brightness reconstruction pixel value of the current pixel point as the third brightness reconstruction pixel value of the current pixel point, and not executing the first condition and the second condition.
In case one, if the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode in the vertical DBR mode, the third luminance reconstruction pixel value of the current pixel point may be determined based on the second luminance reconstruction pixel value of the current pixel point, the first luminance reconstruction pixel value of the current pixel point, the vertical adjustment threshold value of the deblocking filtering adjustment mode, the first vertical adjustment offset value of the deblocking filtering adjustment mode, and the second vertical adjustment offset value of the deblocking filtering adjustment mode.
For example, the pixel level enabling condition that the current pixel point satisfies the deblocking filtering adjustment mode of the vertical DBR mode may include, but is not limited to: the vertical boundary of the current luma block allows vertical DBR filtering; the boundary strength (i.e., BS) of the vertical boundary of the current pixel point is greater than 0. For example, whether vertical DBR filtering is allowed for the vertical boundary of the current luminance block is determined, if the vertical boundary of the current luminance block does not allow vertical DBR filtering, it is determined that the current pixel point does not satisfy the pixel level enabling condition of the deblocking filtering adjustment mode of the vertical DBR mode, and if the vertical boundary of the current luminance block allows vertical DBR filtering, the boundary strength of the vertical boundary of the current pixel point is determined. If the boundary strength is greater than 0, determining that the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode of the vertical DBR mode, and if the boundary strength is equal to 0, determining that the current pixel point does not meet the pixel level enabling condition of the deblocking filtering adjustment mode of the vertical DBR mode. As for the vertical boundary of the current pixel and the vertical boundary of the current luminance block, as shown in fig. 4A and 4B, the vertical boundary of the current pixel is the boundary of a line where the current pixel is located, the vertical boundary of the current luminance block includes the boundaries of all lines of the current luminance block, and the boundaries of all lines of the current luminance block correspond to the same vertical line boundary.
Illustratively, the vertical boundary of the current luma block that satisfies one of the following conditions does not require filtering, i.e., the vertical boundary of the current luma block does not allow vertical DBR filtering: if the vertical boundary to be filtered (i.e., the vertical boundary of the current luma block) is an image boundary, then the vertical boundary does not need to be filtered. If the vertical boundary to be filtered is a slice boundary and the cross-slice loop filtering enable flag is 0, then the vertical boundary does not need to be filtered. If the vertical boundary to be filtered is a luma filter boundary that is not the boundary of a luma coding block or a luma transform block, then the vertical boundary does not need filtering. If the vertical boundary to be filtered is a luminance filtering boundary, the sub-block transform flag of the coding unit where the luminance filtering boundary is located is 1, and the luminance filtering boundary is not the boundary of a luminance coding block, the vertical boundary does not need filtering. If the string copy intra prediction mode flag of the coding unit where the vertical boundary to be filtered is located is 1, then the vertical boundary does not need to be filtered.
For example, the first vertical adjustment threshold and the second vertical adjustment threshold may be determined based on the vertical adjustment threshold, the first vertical adjustment threshold and the vertical adjustment threshold may be the same, and the second vertical adjustment threshold and the vertical adjustment threshold may be opposite numbers, that is, the first vertical adjustment threshold and the second vertical adjustment threshold are opposite numbers. Based on the first brightness reconstruction pixel value of the current pixel point, the second brightness reconstruction pixel value of the current pixel point, the first vertical adjustment threshold value, the second vertical adjustment threshold value, the first vertical adjustment offset value and the second vertical adjustment offset value, the third brightness reconstruction pixel value of the current pixel point is determined.
For example, if a difference between a first luminance reconstruction pixel value of a current pixel and a second luminance reconstruction pixel value of the current pixel is greater than a first vertical adjustment threshold, a third luminance reconstruction pixel value of the current pixel is determined based on the first luminance reconstruction pixel value of the current pixel, the second luminance reconstruction pixel value of the current pixel, and the first vertical adjustment offset value, as shown in the following formula: if p isi>Pi+ DbrThreshold, then Pi’=Clip1((Pi+pi+1)>>1+DbrOffset0)。piA first luminance reconstructed pixel value, P, representing a current pixel pointiRepresents the second luminance reconstructed pixel value of the current pixel point, "+ DbrThreshold" represents the first vertical adjustment threshold, Pi' represents a third luma reconstructed pixel value of the current pixel point, dbrafset 0 represents a first vertical adjustment offset value,>>indicating a right shift. Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, such as can be 8, 10, 12, etc.
For another example, if a difference between a first luminance reconstruction pixel value of the current pixel point and a second luminance reconstruction pixel value of the current pixel point is smaller than a second vertical adjustment threshold, a third luminance reconstruction pixel value of the current pixel point is determined based on the first luminance reconstruction pixel value of the current pixel point, the second luminance reconstruction pixel value of the current pixel point, and the second vertical adjustment offset value, as shown in the following formula: if p isi<PiDbrThreshold, then Pi’=Clip1((Pi+pi+1)>>1+DbrOffset1)。piA first luminance reconstructed pixel value, P, representing a current pixel pointiRepresenting a second luma reconstructed pixel value of the current pixel point, "-DbrThreshold" representing a second vertical adjustment threshold, Pi' represents a third luma reconstructed pixel value of the current pixel point, dbrofset 1 represents a second vertical adjustment offset value,>>indicating a right shift. Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, such as can be 8, 10, 12, etc.
For another example, if the difference between the first luminance reconstruction pixel value of the current pixel point and the second luminance reconstruction pixel value of the current pixel point is not greater than the first vertical adjustment threshold, and the difference between the first luminance reconstruction pixel value of the current pixel point and the second luminance reconstruction pixel value of the current pixel point is not less than the second vertical adjustment threshold, the third luminance reconstruction pixel value of the current pixel point is determined based on the second luminance reconstruction pixel value of the current pixel point, that is, the second luminance reconstruction pixel value is used as the third luminance reconstruction pixel value.
And secondly, if the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, determining the gradient value of the current pixel point based on the second brightness reconstruction pixel value of the current pixel point and the second brightness reconstruction pixel values of surrounding pixel points of the current pixel point, and determining the third brightness reconstruction pixel value of the current pixel point based on the gradient value of the current pixel point and the second brightness reconstruction pixel value of the current pixel point. For example, the third luma reconstructed pixel value of the current pixel point may be determined based on the gradient value of the current pixel point, the second luma reconstructed pixel value of the current pixel point, the vertical adjustment threshold of the enhanced deblocking filtering adjustment mode, the first enhanced vertical adjustment offset of the enhanced deblocking filtering adjustment mode, and the second enhanced vertical adjustment offset of the enhanced deblocking filtering adjustment mode.
For example, the pixel level enabling condition that the current pixel point satisfies the enhanced deblocking filtering adjustment mode of the vertical DBR mode may include, but is not limited to: the vertical boundary of the current luma block allows vertical DBR filtering; the boundary strength (i.e., BS) of the vertical boundary of the current pixel point is equal to 0. For example, whether vertical DBR filtering is allowed for the vertical boundary of the current luminance block is determined, if the vertical boundary of the current luminance block does not allow vertical DBR filtering, it is determined that the current pixel point does not satisfy the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, and if the vertical boundary of the current luminance block allows vertical DBR filtering, the boundary strength of the vertical boundary of the current pixel point is determined. And if the boundary strength is equal to 0, determining that the current pixel point meets the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, and if the boundary strength is greater than 0, determining that the current pixel point does not meet the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode. As for the vertical boundary of the current pixel and the vertical boundary of the current luminance block, as shown in fig. 4A and 4B, the vertical boundary of the current pixel is the boundary of a line where the current pixel is located, the vertical boundary of the current luminance block includes the boundaries of all lines of the current luminance block, and the boundaries of all lines of the current luminance block correspond to the same vertical line boundary.
For example, determining the gradient value of the current pixel point based on the second luminance reconstructed pixel value of the current pixel point and the second luminance reconstructed pixel values of the surrounding pixels of the current pixel point may include, but is not limited to: determining the gradient value of the current pixel point based on the following formula: DPi=(qi–pi+2)>>2。DPiRepresenting the gradient value, q, of the current pixel pointiA second luminance reconstructed pixel value, p, representing surrounding pixels of the current pixeliA second luma reconstructed pixel value representing the current pixel point,>>indicating a right shift.
In summary, it can be seen that the gradient value of the current pixel point can be determined based on a difference between the second luminance reconstruction pixel value of the current pixel point and the second luminance reconstruction pixel values of the surrounding pixel points, and the determination manner of the gradient value is not limited.
The surrounding pixels of the current pixel may be pixels around the vertical boundary of the current pixel, for example, the surrounding pixels of the current pixel may be adjacent pixels of the vertical boundary of the current pixel, or the current imageNon-adjacent pixel points of the vertical boundary of the pixel points. The peripheral pixels of the current pixel may be pixels located in the current luminance block, or pixels located in an adjacent luminance block of the current luminance block, such as pixels symmetric to the current pixel in the adjacent luminance block of the current luminance block. Referring to fig. 4A, it is a schematic diagram of a vertical boundary of a current pixel point, if the current pixel point is p in a current luminance block0Then the surrounding pixels of the current pixel can be q in the adjacent luminance block at the right side of the current luminance block0. If the current pixel point is p in the current brightness block1Then the surrounding pixels of the current pixel can be q in the adjacent luminance block1
In a possible implementation manner, in the process of determining the third luma reconstructed pixel value of the current pixel point, the third luma reconstructed pixel value of the current pixel point may be determined based on the gradient value of the current pixel point, the second luma reconstructed pixel value of the current pixel point, the vertical adjustment threshold of the enhanced deblocking filtering adjustment mode, the first enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode, and the second enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode.
For example, the first vertical adjustment threshold and the second vertical adjustment threshold may be determined based on the vertical adjustment threshold, the first vertical adjustment threshold and the vertical adjustment threshold may be the same, and the second vertical adjustment threshold and the vertical adjustment threshold may be opposite numbers, that is, the first vertical adjustment threshold and the second vertical adjustment threshold are opposite numbers. Based on the first luminance reconstruction pixel value, the second luminance reconstruction pixel value, the first vertical adjustment threshold value, the second vertical adjustment threshold value, the first enhanced vertical adjustment offset value and the second enhanced vertical adjustment offset value, the third luminance reconstruction pixel value of the current pixel point can be determined based on the gradient value of the current pixel point, the second luminance reconstruction pixel value of the current pixel point, the first vertical adjustment threshold value, the second vertical adjustment threshold value, the first enhanced vertical adjustment offset value and the second enhanced vertical adjustment offset value.
For example, if the gradient value of the current pixel point is smaller than the second vertical adjustment threshold, the third luminance reconstruction pixel value of the current pixel point may be determined based on the second luminance reconstruction pixel value of the current pixel point and the first enhanced vertical adjustment offset value, for example, as shown in the following formula:DPi=(qi–pi+2)>>2 if DPi<DbrThreshold, then Pi=Clip1(pi+ DbrAltOffset 0). In the above formula, DPiRepresenting the gradient value of the current pixel point, "-DbrThreshold" representing a second vertical adjustment threshold, PiThird luminance reconstructed pixel value, p, representing current pixel pointiRepresenting the second luma reconstructed pixel value for the current pixel point and DbrAltOffset0 representing the first enhanced vertical adjustment offset value. Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, such as can be 8, 10, 12, etc.
For another example, if the gradient value of the current pixel point is greater than the first vertical adjustment threshold, the third luminance reconstruction pixel value of the current pixel point may be determined based on the second luminance reconstruction pixel value of the current pixel point and the second enhanced vertical adjustment offset value, for example, as shown in the following formula: DPi=(qi–pi+2)>>2 if DPi>DbrThreshold, then Pi=Clip1(pi+ DbrAltOffset 1). In the above formula, DPiRepresenting the gradient value of the current pixel, "DbrThreshold" representing the first vertical adjustment threshold, PiThird luminance reconstructed pixel value, p, representing current pixel pointiIndicating a second luma reconstructed pixel value for the current pixel point and DbrAltOffset1 indicating a second enhanced vertical adjustment offset value. Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, such as can be 8, 10, 12, etc.
For another example, if the gradient value of the current pixel point is not less than the second vertical adjustment threshold and the gradient value of the current pixel point is not greater than the first vertical adjustment threshold, the third luminance reconstruction pixel value of the current pixel point is determined based on the second luminance reconstruction pixel value of the current pixel point, that is, the second luminance reconstruction pixel value of the current pixel point is used as the third luminance reconstruction pixel value of the current pixel point.
And step S22, determining a third brightness reconstruction block based on the third brightness reconstruction pixel value of each current pixel point.
For example, after obtaining the third luminance reconstruction pixel values of all current pixel points for each current pixel point in the second luminance reconstruction block, the third luminance reconstruction pixel values of all current pixel points may be combined into a third luminance reconstruction block.
Step S23, if the current pixel meets the pixel level enabling condition of the deblocking filtering adjustment mode in the vertical DBR mode, a reference pixel corresponding to the current pixel may also be determined from the neighboring luminance blocks of the vertical boundary of the current pixel, and a third luminance reconstruction pixel value of the reference pixel may be determined based on the second luminance reconstruction pixel value of the reference pixel and the first luminance reconstruction pixel value of the reference pixel. For example, a third luma reconstructed pixel value of the reference pixel point is determined based on the second luma reconstructed pixel value of the reference pixel point, the first luma reconstructed pixel value of the reference pixel point, the vertical adjustment threshold of the deblocking filtering adjustment mode, the first vertical adjustment offset of the deblocking filtering adjustment mode, and the second vertical adjustment offset of the deblocking filtering adjustment mode.
For example, the reference pixel point may be a pixel point adjacent to the current pixel point in the adjacent luminance block, the reference pixel point may also be a pixel point not adjacent to the current pixel point in the adjacent luminance block, and the reference pixel point may also be a pixel point symmetric to the current pixel point in the adjacent luminance block, which is not limited thereto. Referring to fig. 4A, it is a schematic diagram of a vertical boundary of a current pixel point, if the current pixel point is p in a current luminance block0Then the reference pixel point can be q in the adjacent luminance block0If the current pixel point is p in the current brightness block1Then the reference pixel point can be q in the adjacent luminance block1And so on.
For example, the first vertical adjustment threshold and the second vertical adjustment threshold may be determined based on the vertical adjustment threshold, the first vertical adjustment threshold and the vertical adjustment threshold may be the same, and the second vertical adjustment threshold and the vertical adjustment threshold may be opposite numbers, that is, the first vertical adjustment threshold and the second vertical adjustment threshold are opposite numbers. Based on the first luminance reconstruction pixel value of the reference pixel point, the second luminance reconstruction pixel value of the reference pixel point, the first vertical adjustment threshold value, the second vertical adjustment threshold value, the first vertical adjustment offset value and the second vertical adjustment offset value, a third luminance reconstruction pixel value of the reference pixel point is determined.
For example, if a difference between a first luminance reconstruction pixel value of a reference pixel and a second luminance reconstruction pixel value of the reference pixel is greater than a first vertical adjustment threshold, a third luminance reconstruction pixel value of the reference pixel is determined based on the first luminance reconstruction pixel value of the reference pixel, the second luminance reconstruction pixel value of the reference pixel, and the first vertical adjustment offset value, as shown in the following formula: if q isi>Qi+ DbrThreshold, then Qi’=Clip1((Qi+qi+1)>>1+DbrOffset0)。qiFirst luminance reconstructed pixel value, Q, representing a reference pixel pointiA second luma reconstructed pixel value representing a reference pixel point, "+ DbrThreshold" represents a first vertical adjustment threshold, Qi' denotes a third luma reconstructed pixel value of the reference pixel point, dbrofset 0 denotes a first vertical adjustment offset value,>>indicating a right shift. Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, such as can be 8, 10, 12, etc.
For another example, if the difference between the first luminance reconstruction pixel value of the reference pixel point and the second luminance reconstruction pixel value of the reference pixel point is smaller than the second vertical adjustment threshold, the third luminance reconstruction pixel value of the reference pixel point is determined based on the first luminance reconstruction pixel value of the reference pixel point, the second luminance reconstruction pixel value of the reference pixel point, and the second vertical adjustment offset value, as shown in the following formula: if q isi<Qi-DbrThreshold, then Qi’=Clip1((Qi+qi+1)>>1+DbrOffset1)。qiFirst luminance reconstructed pixel value, Q, representing a reference pixel pointiA second luma reconstructed pixel value representing a reference pixel point, "-DbrThreshold" representing a second vertical adjustment threshold, Qi' third luminance of reference pixelPixel-value-built, dbrafset 1 represents a second vertical adjustment offset value,>>indicating a right shift. Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, such as can be 8, 10, 12, etc.
For another example, if the difference between the first luminance reconstruction pixel value of the reference pixel and the second luminance reconstruction pixel value of the reference pixel is not greater than the first vertical adjustment threshold, and the difference between the first luminance reconstruction pixel value of the reference pixel and the second luminance reconstruction pixel value of the reference pixel is not less than the second vertical adjustment threshold, the third luminance reconstruction pixel value of the reference pixel is determined based on the second luminance reconstruction pixel value of the reference pixel, that is, the second luminance reconstruction pixel value is used as the third luminance reconstruction pixel value.
Step S24, if the current pixel meets the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, a reference pixel corresponding to the current pixel may be determined from the neighboring luminance blocks of the vertical boundary of the current pixel, a gradient value of the reference pixel may be determined based on the second luminance reconstruction pixel value of the reference pixel and the second luminance reconstruction pixel values of the surrounding pixels of the reference pixel (the surrounding pixels of the reference pixel may include pixels surrounding the vertical boundary of the current pixel), and a third luminance reconstruction pixel value of the reference pixel may be determined based on the gradient value of the reference pixel and the second luminance reconstruction pixel value of the reference pixel. For example, the third luma reconstructed pixel value of the reference pixel may be determined based on the gradient value of the reference pixel, the second luma reconstructed pixel value of the reference pixel, the vertical adjustment threshold of the enhanced deblocking filtering adjustment mode, the first enhanced vertical adjustment offset of the enhanced deblocking filtering adjustment mode, and the second enhanced vertical adjustment offset of the enhanced deblocking filtering adjustment mode.
For example, the reference pixel point may be a pixel point adjacent to the current pixel point in the adjacent luminance block, the reference pixel point may also be a pixel point not adjacent to the current pixel point in the adjacent luminance block, and the reference pixel point may also be a pixel point pair adjacent to the current pixel point in the adjacent luminance blockThe pixel points are not limited to this. Referring to fig. 4A, it is a schematic diagram of a vertical boundary of a current pixel point, if the current pixel point is p in a current luminance block0Then the reference pixel point can be q in the adjacent luminance block0If the current pixel point is p in the current brightness block1Then the reference pixel point can be q in the adjacent luminance block1And so on.
For example, the surrounding pixels of the reference pixel may be pixels surrounding the vertical boundary of the current pixel (i.e., the vertical boundary of the reference pixel). For example, the peripheral pixels of the reference pixel may be the neighboring pixels of the vertical boundary of the reference pixel, or may be the non-neighboring pixels of the vertical boundary of the reference pixel. The peripheral pixels of the reference pixel may be pixels located in an adjacent luminance block, or pixels located in a current luminance block, such as pixels in the current luminance block that are symmetric to the reference pixel. FIG. 4A is a schematic diagram of the vertical boundary of the current pixel/reference pixel if the reference pixel is q in the neighboring luminance block0Then the surrounding pixels of the reference pixel can be p in the current luminance block0. Alternatively, the surrounding pixels of the reference pixel may include p0、p1、p2、p3、q1、q2、q3At least one of (a).
In summary, it can be seen that the gradient value of the reference pixel point can be determined based on a difference between the second luminance reconstruction pixel value of the reference pixel point and the second luminance reconstruction pixel values of the surrounding pixel points, and the determination manner of the gradient value is not limited.
For example, determining the gradient value of the reference pixel point based on the second luminance reconstructed pixel value of the reference pixel point and the second luminance reconstructed pixel values of the surrounding pixels of the reference pixel point may include, but is not limited to: determining the gradient value of the reference pixel point based on the following formula: DQi=(pi–qi+2)>>2。DQiRepresenting the gradient value, p, of a reference pixeliSecond brightness of surrounding pixels representing the reference pixelEstablishing a pixel value, qiA second luma reconstructed pixel value representing a reference pixel point,>>indicating a right shift.
For example, the first vertical adjustment threshold and the second vertical adjustment threshold may be determined based on the vertical adjustment threshold, the first vertical adjustment threshold and the vertical adjustment threshold may be the same, and the second vertical adjustment threshold and the vertical adjustment threshold may be opposite numbers, that is, the first vertical adjustment threshold and the second vertical adjustment threshold are opposite numbers. Based on the first luminance reconstruction pixel value, the second luminance reconstruction pixel value, the first vertical adjustment threshold value, the second vertical adjustment threshold value, the first enhanced vertical adjustment offset value and the second enhanced vertical adjustment offset value of the reference pixel point can be determined based on the gradient value of the reference pixel point.
For example, if the gradient value of the reference pixel is smaller than the second vertical adjustment threshold, the third luminance reconstruction pixel value of the reference pixel may be determined based on the second luminance reconstruction pixel value of the reference pixel and the first enhanced vertical adjustment offset value, for example, as shown in the following formula: DQi=(pi–qi+2)>>2, if DQi<-DbrThreshold, then Qi=Clip1(qi+ DbrAltOffset 0). In the above formula, DQiRepresenting the gradient value of the reference pixel, "-DbrThreshold" representing a second vertical adjustment threshold, QiA third luma reconstructed pixel value, q, representing a reference pixel pointiIndicating the second luma reconstructed pixel value of the reference pixel point and DbrAltOffset0 indicating the first enhanced vertical adjustment offset value. Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, such as can be 8, 10, 12, etc.
For another example, if the gradient value of the reference pixel is greater than the first vertical adjustment threshold, the third luminance reconstruction pixel value of the reference pixel may be determined based on the second luminance reconstruction pixel value of the reference pixel and the second enhanced vertical adjustment offset value, for example, as shown in the following formula: DQi=(pi–qi+2)>>2, if DQi>DbrThresholdThen Q isi=Clip1(qi+ DbrAltOffset 1). In the above formula, DQiRepresenting the gradient value of the reference pixel, "DbrThreshold" representing the first vertical adjustment threshold, QiA third luma reconstructed pixel value, q, representing a reference pixel pointiIndicating a second luma reconstructed pixel value for the reference pixel point and DbrAltOffset1 indicating a second enhanced vertical adjustment offset value. Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, such as can be 8, 10, 12, etc.
For another example, if the gradient value of the reference pixel is not less than the second vertical adjustment threshold and the gradient value of the reference pixel is not greater than the first vertical adjustment threshold, the third luminance reconstruction pixel value of the reference pixel is determined based on the second luminance reconstruction pixel value of the reference pixel, that is, the second luminance reconstruction pixel value of the reference pixel is used as the third luminance reconstruction pixel value of the reference pixel.
In the foregoing embodiment, for a case that a current pixel point meets a pixel level enabling condition of a deblocking filtering adjustment mode of a vertical DBR mode, a third luminance reconstruction pixel value of the current pixel point needs to be determined based on a vertical adjustment threshold of the deblocking filtering adjustment mode, a first vertical adjustment offset value of the deblocking filtering adjustment mode, and a second vertical adjustment offset value of the deblocking filtering adjustment mode.
In the above embodiment, for the case that the current pixel point satisfies the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, a third luma reconstructed pixel value of the current pixel point is determined based on a vertical adjustment threshold of the enhanced deblocking filtering adjustment mode (which may be the same as or different from the vertical adjustment threshold of the deblocking filtering adjustment mode, and both are herein referred to as vertical adjustment thresholds by way of example), a first enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode and a second enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode, in one possible implementation, the vertical adjustment threshold for the enhanced deblock filtering adjustment mode, the first enhanced vertical adjustment offset value for the enhanced deblock filtering adjustment mode, and the second enhanced vertical adjustment offset value for the enhanced deblock filtering adjustment mode corresponding to the current luma block may be parsed from the high level syntax.
For example, in the above embodiment, the high level syntax may include, but is not limited to, one of the following: sequence header level high level syntax; picture parameter set PPS high level syntax; a picture header level high level syntax; a frame-level high-level syntax; slice-level high-level syntax; coding tree unit CTU high-level syntax; coding unit, CU, high level syntax.
Step 304, if the current brightness block starts a DBF mode, performing horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, a fourth luma reconstruction block is determined based on the third luma reconstruction block, that is, if the current luma block does not enable the DBF mode, the third luma reconstruction block may be directly used as the fourth luma reconstruction block.
In a possible implementation manner, the third luminance reconstruction block may include third luminance reconstruction pixel values of a plurality of pixel points, the fourth luminance reconstruction block may include fourth luminance reconstruction pixel values of a plurality of pixel points, and the pixel points in the third luminance reconstruction block correspond to the pixel points in the fourth luminance reconstruction block one to one. Based on this, the horizontal DBF filtering process may include:
step S31, for each current pixel point in the third luminance reconstruction block (i.e., each pixel point in the third luminance reconstruction block is taken as a current pixel point), if the current pixel point meets the pixel level enabling condition of the horizontal boundary filtering in the DBF mode, determining a fourth luminance reconstruction pixel value of the current pixel point based on the third luminance reconstruction pixel value of the current pixel point and the third luminance reconstruction pixel values of the surrounding pixel points of the current pixel point. And if the current pixel point does not meet the pixel level starting condition of the horizontal boundary filtering of the DBF mode, determining a fourth brightness reconstruction pixel value of the current pixel point based on the third brightness reconstruction pixel value of the current pixel point, namely, taking the third brightness reconstruction pixel value of the current pixel point as the fourth brightness reconstruction pixel value of the current pixel point.
For example, the surrounding pixels of the current pixel may be pixels surrounding the horizontal boundary of the current pixel. For example, the surrounding pixels of the current pixel may be adjacent pixels of the horizontal boundary of the current pixel, or non-adjacent pixels of the horizontal boundary of the current pixel. The peripheral pixels of the current pixel can be pixels in the current brightness block or pixels in an adjacent brightness block of the current brightness block. The surrounding pixels of the current pixel can be the pixels on the upper side of the current pixel and can also be the pixels on the lower side of the current pixel, and the positions of the surrounding pixels of the current pixel are not limited. As shown in fig. 4C, which is a schematic diagram of the horizontal boundary of the current pixel point, it is obvious that the horizontal boundary of the current pixel point is the boundary of one pixel point and is the boundary of a column in which the current pixel point is located. If the current pixel point is p in the current brightness block0Then the surrounding pixels of the current pixel can be q in the adjacent luminance block under the current luminance block0. Alternatively, the surrounding pixels of the current pixel may include p1、p2、p3、q0、q1、q2、q3At least one of (a).
Exemplarily, the fourth luminance reconstruction pixel value of the current pixel point can be determined based on the third luminance reconstruction pixel value of the current pixel point and the third luminance reconstruction pixel values of the surrounding pixel points of the current pixel point, the determination method is not limited, a DBF filtering implementation method can be adopted, and the DBF filtering implementation method can be referred to in the following embodiments.
Illustratively, on the basis that the DBF mode is enabled in the current luminance block, it is further necessary to determine whether the current pixel point meets a pixel-level enabling condition of horizontal boundary filtering in the DBF mode for each current pixel point in the third luminance reconstruction block. The pixel-level enabling condition that the current pixel point satisfies the horizontal boundary filtering in the DBF mode may include, but is not limited to: the horizontal boundary of the current luminance block allows DBF filtering, and the boundary strength (i.e., BS) of the horizontal boundary of the current pixel point is greater than 0. For example, it may be determined whether the horizontal boundary of the current luminance block allows DBF filtering, if the horizontal boundary of the current luminance block does not allow DBF filtering, it may be determined that the current pixel does not satisfy the pixel level enabling condition of the horizontal boundary filtering in the DBF mode, and if the horizontal boundary of the current luminance block allows DBF filtering, the boundary strength of the horizontal boundary of the current pixel may be determined. If the boundary strength is greater than 0, determining that the current pixel point meets the pixel level enabling condition of the horizontal boundary filtering of the DBF mode, and if the boundary strength is equal to 0, determining that the current pixel point does not meet the pixel level enabling condition of the horizontal boundary filtering of the DBF mode.
As shown in fig. 4C, a schematic diagram of a horizontal boundary of a current pixel point is shown, and as shown in fig. 4D, a schematic diagram of a horizontal boundary of a current luminance block is shown, it is obvious that the horizontal boundary of the current luminance block includes the horizontal boundary of the current pixel point, that is, the horizontal boundary of the current pixel point is a boundary of a column in which the current pixel point is located, the horizontal boundary of the current luminance block includes boundaries of all columns of the current luminance block, and the boundaries of all columns of the current luminance block correspond to a same horizontal line boundary.
Illustratively, the horizontal boundary of the current luminance block that satisfies one of the following conditions does not require filtering, i.e., the horizontal boundary of the current luminance block does not allow DBF filtering: if the horizontal boundary to be filtered (i.e., the horizontal boundary of the current luminance block) is an image boundary, then the horizontal boundary does not need to be filtered. If the horizontal boundary to be filtered is a slice boundary and the cross-slice loop filtering enable flag is 0, then the horizontal boundary does not need to be filtered. If the horizontal boundary to be filtered is a luma filter boundary that is not a boundary of a luma coding block or a luma transform block, then the horizontal boundary does not need filtering. If the horizontal boundary to be filtered is a luminance filtering boundary, the sub-block transform flag of the coding unit where the luminance filtering boundary is located is 1, and the luminance filtering boundary is not the boundary of a luminance coding block, the horizontal boundary does not need filtering. If the string copy intra prediction mode flag of the coding unit where the horizontal boundary to be filtered is located is 1, the horizontal boundary does not need to be filtered.
And step S32, determining a fourth brightness reconstruction block based on the fourth brightness reconstruction pixel value of each current pixel point.
For example, after the fourth luminance reconstruction pixel values of all current pixel points are obtained for each current pixel point in the third luminance reconstruction block, the fourth luminance reconstruction pixel values of all current pixel points may be combined into a fourth luminance reconstruction block.
Step S33, if the current pixel point meets the pixel level enabling condition of the horizontal boundary filtering in the DBF mode, determining a reference pixel point corresponding to the current pixel point from the adjacent luminance block of the horizontal boundary of the current pixel point.
For example, the reference pixel point may be a pixel point adjacent to the current pixel point in the adjacent luminance block, the reference pixel point may also be a pixel point not adjacent to the current pixel point in the adjacent luminance block, and the reference pixel point may also be a pixel point symmetric to the current pixel point in the adjacent luminance block, which is not limited herein. Referring to fig. 4C, it is a schematic diagram of the horizontal boundary of the current pixel point, if the current pixel point is p in the current luminance block0Then the reference pixel point can be q in the adjacent luminance block0If the current pixel point is p in the current brightness block1Then the reference pixel point can be q in the adjacent luminance block1And so on.
Step S34, determining a fourth luminance reconstruction pixel value of the reference pixel point based on the third luminance reconstruction pixel value of the reference pixel point in the adjacent luminance block and the third luminance reconstruction pixel values of the surrounding pixel points of the reference pixel point.
For example, the surrounding pixels of the reference pixel may be pixels surrounding the horizontal boundary of the current pixel (i.e., the horizontal boundary of the reference pixel). For example, see fig. 4C, which is a schematic diagram of a horizontal boundary of a current pixel/reference pixel if the reference pixel is q in an adjacent luminance block0Then the surrounding pixels of the reference pixel can be p in the current luminance block0. Or the surrounding pixels of the reference pixel may comprise p0、p1、p2、p3、q1、q2、q3At least one of (a).
Exemplarily, the fourth luminance reconstruction pixel value of the reference pixel point can be determined based on the third luminance reconstruction pixel value of the reference pixel point and the third luminance reconstruction pixel values of the surrounding pixel points of the reference pixel point, the determination method is not limited, a DBF filtering implementation method can be adopted, and the DBF filtering implementation method can be referred to in the following embodiments.
Step 305, if the current brightness block starts the horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, a fifth luma reconstruction block is determined based on the fourth luma reconstruction block, that is, the fourth luma reconstruction block may be considered as the fifth luma reconstruction block if the horizontal DBR mode is not enabled for the current luma block.
In a possible implementation manner, the fourth luminance reconstruction block may include fourth luminance reconstruction pixel values of a plurality of pixel points, the fifth luminance reconstruction block may include fifth luminance reconstruction pixel values of a plurality of pixel points, and the pixel points in the fourth luminance reconstruction block correspond to the pixel points in the fifth luminance reconstruction block one to one. Based on this, the horizontal DBR filtering process may include:
step S41, for each current pixel point in the fourth luminance reconstruction block (i.e., each pixel point in the fourth luminance reconstruction block is used as a current pixel point), if the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode in the horizontal DBR mode, determining a fifth luminance reconstruction pixel value of the current pixel point based on the fourth luminance reconstruction pixel value of the current pixel point and the third luminance reconstruction pixel value of the current pixel point. And if the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, determining the gradient value of the current pixel point based on the fourth brightness reconstruction pixel value of the current pixel point and the fourth brightness reconstruction pixel values of surrounding pixel points of the current pixel point, and determining the fifth brightness reconstruction pixel value of the current pixel point based on the gradient value of the current pixel point and the fourth brightness reconstruction pixel value of the current pixel point. And if the current pixel point does not meet the pixel level starting condition of the horizontal DBR mode, determining a fifth brightness reconstruction pixel value of the current pixel point based on the fourth brightness reconstruction pixel value of the current pixel point, namely taking the fourth brightness reconstruction pixel value of the current pixel point as the fifth brightness reconstruction pixel value of the current pixel point.
Illustratively, on the basis that the horizontal DBR mode is enabled for the current luminance block, it is further necessary to determine whether the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode of the horizontal DBR mode for each current pixel point in the fourth luminance reconstruction block. If yes, determining a fifth brightness reconstruction pixel value of the current pixel point by adopting the third condition. If not, whether the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode needs to be judged. And if so, determining a fifth brightness reconstruction pixel value of the current pixel point by adopting the condition four. If not, directly taking the fourth brightness reconstruction pixel value of the current pixel point as the fifth brightness reconstruction pixel value of the current pixel point, and not executing the third condition and the fourth condition.
And a third condition, if the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode in the horizontal DBR mode, determining a fifth brightness reconstruction pixel value of the current pixel point based on the fourth brightness reconstruction pixel value of the current pixel point, the third brightness reconstruction pixel value of the current pixel point, the horizontal adjustment threshold of the deblocking filtering adjustment mode, the first horizontal adjustment offset value of the deblocking filtering adjustment mode, and the second horizontal adjustment offset value of the deblocking filtering adjustment mode.
For example, the pixel-level enabling condition that the current pixel point satisfies the deblocking filtering adjustment mode of the horizontal DBR mode may include, but is not limited to: the horizontal boundary of the current luma block allows horizontal DBR filtering; the boundary strength (i.e., BS) of the horizontal boundary of the current pixel point is greater than 0. For example, whether horizontal DBR filtering is allowed for the horizontal boundary of the current luminance block is determined, if the horizontal boundary of the current luminance block does not allow the horizontal DBR filtering, it is determined that the current pixel point does not satisfy the pixel level enabling condition of the deblocking filtering adjustment mode of the horizontal DBR mode, and if the horizontal boundary of the current luminance block allows the horizontal DBR filtering, the boundary strength of the horizontal boundary of the current pixel point is determined. If the boundary strength is greater than 0, determining that the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode of the horizontal DBR mode, and if the boundary strength is equal to 0, determining that the current pixel point does not meet the pixel level enabling condition of the deblocking filtering adjustment mode of the horizontal DBR mode. As for the horizontal boundary of the current pixel and the horizontal boundary of the current luminance block, as shown in fig. 4C and 4D, the horizontal boundary of the current pixel is a boundary of a column in which the current pixel is located, the horizontal boundary of the current luminance block includes boundaries of all columns of the current luminance block, and the boundaries of all columns of the current luminance block correspond to a same horizontal line boundary.
Illustratively, the horizontal boundary of the current luma block that satisfies one of the following conditions does not require filtering, i.e., the horizontal boundary of the current luma block does not allow horizontal DBR filtering: if the horizontal boundary to be filtered (i.e., the horizontal boundary of the current luminance block) is an image boundary, then the horizontal boundary does not need to be filtered. If the horizontal boundary to be filtered is a slice boundary and the cross-slice loop filtering enable flag is 0, then the horizontal boundary does not need to be filtered. If the horizontal boundary to be filtered is a luma filter boundary that is not a boundary of a luma coding block or a luma transform block, then the horizontal boundary does not need filtering. If the horizontal boundary to be filtered is a luminance filtering boundary, the sub-block transform flag of the coding unit where the luminance filtering boundary is located is 1, and the luminance filtering boundary is not the boundary of a luminance coding block, the horizontal boundary does not need filtering. If the string copy intra prediction mode flag of the coding unit where the horizontal boundary to be filtered is located is 1, the horizontal boundary does not need to be filtered.
For example, the first leveling threshold and the second leveling threshold may be determined based on the leveling threshold, the first leveling threshold and the leveling threshold may be the same, and the second leveling threshold and the leveling threshold may be opposite numbers, that is, the first leveling threshold and the second leveling threshold are opposite numbers. Based on the fourth brightness reconstruction pixel value of the current pixel point, the third brightness reconstruction pixel value of the current pixel point, the first horizontal adjustment threshold value, the second horizontal adjustment threshold value, the first horizontal adjustment deviation value and the second horizontal adjustment deviation value, the fifth brightness reconstruction pixel value of the current pixel point is determined.
For example, if a difference between the third luminance reconstructed pixel value of the current pixel and the fourth luminance reconstructed pixel value of the current pixel is greater than the first horizontal adjustment threshold, the fifth luminance reconstructed pixel value of the current pixel is determined based on the third luminance reconstructed pixel value of the current pixel, the fourth luminance reconstructed pixel value of the current pixel, and the first horizontal adjustment offset value. I.e. if pi>Pi+ DbrThreshold, then Pi’=Clip1((Pi+pi+1)>>1+DbrOffset0)。piThird luminance reconstructed pixel value, P, representing current pixel pointiThe fourth luminance reconstruction pixel value representing the current pixel point, "+ DbrThreshold" represents the first level adjustment threshold, Pi' denotes a fifth luma reconstructed pixel value of the current pixel point, and DbroOffset 0 denotes a first horizontal adjustment offset value.
For another example, if a difference between the third luminance reconstructed pixel value of the current pixel point and the fourth luminance reconstructed pixel value of the current pixel point is smaller than the second horizontal adjustment threshold, the fifth luminance reconstructed pixel value of the current pixel point is determined based on the third luminance reconstructed pixel value of the current pixel point, the fourth luminance reconstructed pixel value of the current pixel point, and the second horizontal adjustment offset value. I.e. if pi<PiDbrThreshold, then Pi’=Clip1((Pi+pi+1)>>1+DbrOffset1)。piThird luminance reconstructed pixel value, P, representing current pixel pointiA fourth luma reconstructed pixel value representing the current pixel point, "-DbrThreshold" represents a second leveling threshold, Pi' denotes a fifth luma reconstructed pixel value of the current pixel point, and DbroOffset 1 denotes a second pan offset value.
For another example, if a difference between the third luminance reconstruction pixel value of the current pixel point and the fourth luminance reconstruction pixel value of the current pixel point is not greater than the first horizontal adjustment threshold, and a difference between the third luminance reconstruction pixel value of the current pixel point and the fourth luminance reconstruction pixel value of the current pixel point is not less than the second horizontal adjustment threshold, the fifth luminance reconstruction pixel value of the current pixel point is determined based on the fourth luminance reconstruction pixel value of the current pixel point, that is, the fourth luminance reconstruction pixel value is used as the fifth luminance reconstruction pixel value.
And if the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, determining the gradient value of the current pixel point based on the fourth brightness reconstruction pixel value of the current pixel point and the fourth brightness reconstruction pixel values of surrounding pixel points of the current pixel point, and determining the fifth brightness reconstruction pixel value of the current pixel point based on the gradient value of the current pixel point and the fourth brightness reconstruction pixel value of the current pixel point. For example, the fifth luma reconstructed pixel value of the current pixel point may be determined based on the gradient value of the current pixel point, the fourth luma reconstructed pixel value of the current pixel point, the horizontal adjustment threshold of the enhanced deblocking filtering adjustment mode, the first enhanced horizontal adjustment offset of the enhanced deblocking filtering adjustment mode, and the second enhanced horizontal adjustment offset of the enhanced deblocking filtering adjustment mode.
For example, the pixel level enabling condition that the current pixel point satisfies the enhanced deblocking filtering adjustment mode of the horizontal DBR mode may include, but is not limited to: the horizontal boundary of the current luma block allows horizontal DBR filtering; the boundary strength (i.e., BS) of the horizontal boundary of the current pixel point is equal to 0. For example, whether horizontal DBR filtering is allowed for the horizontal boundary of the current luminance block is determined, if the horizontal boundary of the current luminance block does not allow the horizontal DBR filtering, it is determined that the current pixel point does not satisfy the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, and if the horizontal boundary of the current luminance block allows the horizontal DBR filtering, the boundary strength of the horizontal boundary of the current pixel point is determined. And if the boundary strength is equal to 0, determining that the current pixel point meets the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, and if the boundary strength is greater than 0, determining that the current pixel point does not meet the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode. As for the horizontal boundary of the current pixel and the horizontal boundary of the current luminance block, as shown in fig. 4C and 4D, the horizontal boundary of the current pixel is a boundary of a column in which the current pixel is located, the horizontal boundary of the current luminance block includes boundaries of all columns of the current luminance block, and the boundaries of all columns of the current luminance block correspond to a same horizontal line boundary.
For example, determining the gradient value of the current pixel point based on the fourth luminance reconstructed pixel value of the current pixel point and the fourth luminance reconstructed pixel values of the surrounding pixels of the current pixel point may include, but is not limited to: determining the gradient value of the current pixel point based on the following formula: DPi=(qi–pi+2)>>2。DPiRepresenting the gradient value, q, of the current pixel pointiFourth luminance reconstructed pixel value, p, representing surrounding pixels of the current pixeliA fourth luma reconstructed pixel value representing the current pixel point,>>indicating a right shift.
The peripheral pixels of the current pixel may be pixels around the horizontal boundary of the current pixel, for example, the peripheral pixels of the current pixel may be adjacent pixels of the horizontal boundary of the current pixel, or may be non-adjacent pixels of the horizontal boundary of the current pixel. The surrounding pixels of the current pixel may be pixels located in an adjacent luminance block, such as pixels in the adjacent luminance block that are symmetric to the current pixel. Referring to fig. 4C, it is a schematic diagram of the horizontal boundary of the current pixel point, if the current pixel point is p in the current luminance block0Then the surrounding pixel points can be q in the adjacent luminance block under the current luminance block0. If the current pixel point is p in the current brightness block1Then the surrounding pixel points can be q in the neighboring luminance block1
In one possible embodiment, the first leveling threshold and the second leveling threshold may be determined based on the leveling threshold, the first leveling threshold and the leveling threshold may be the same, and the second leveling threshold and the leveling threshold may be opposite numbers, that is, the first leveling threshold and the second leveling threshold are opposite numbers. Based on this, a fifth luminance reconstruction pixel value of the current pixel point may be determined based on the gradient value of the current pixel point, the fourth luminance reconstruction pixel value of the current pixel point, the first level adjustment threshold of the enhanced deblocking filtering adjustment mode, the second level adjustment threshold of the enhanced deblocking filtering adjustment mode, the first enhanced level adjustment offset value of the enhanced deblocking filtering adjustment mode, and the second enhanced level adjustment offset value of the enhanced deblocking filtering adjustment mode.
For example, if the gradient value of the current pixel point is smaller than the second leveling threshold, the fifth luminance reconstruction pixel value of the current pixel point is determined based on the fourth luminance reconstruction pixel value of the current pixel point and the first enhanced leveling offset value. And if the gradient value of the current pixel point is larger than the first horizontal adjustment threshold value, determining a fifth brightness reconstruction pixel value of the current pixel point based on the fourth brightness reconstruction pixel value of the current pixel point and the second enhanced horizontal adjustment deviation value. And if the gradient value of the current pixel point is not smaller than the second horizontal adjustment threshold value and the gradient value of the current pixel point is not larger than the first horizontal adjustment threshold value, determining a fifth brightness reconstruction pixel value of the current pixel point based on a fourth brightness reconstruction pixel value of the current pixel point, namely taking the fourth brightness reconstruction pixel value as the fifth brightness reconstruction pixel value.
For example, if DPi<DbrThreshold, then Pi=Clip1(pi+ DbrAltOffset 0). If DPi>DbrThreshold, then Pi=Clip1(pi+DbrAltOffset1)。DPiRepresenting a gradient value, -DbrThreshold representing a second leveling threshold, PiRepresenting a fifth luminance reconstructed pixel value, piRepresenting the fourth luma reconstructed pixel value, dbraltffset 0 represents the first enhancement level adjustment offset value, DbrThreshold represents the first level adjustment threshold value, and dbraltffset 1 represents the second enhancement level adjustment offset value.
Step S42, determining a fifth luminance reconstruction block based on the fifth luminance reconstruction pixel value of each current pixel point.
For example, for each current pixel point in the fourth luminance reconstruction block, after the fifth luminance reconstruction pixel values of all current pixel points are obtained, the fifth luminance reconstruction pixel values of all current pixel points may be combined into a fifth luminance reconstruction block.
Step S43, if the current pixel meets the pixel level enabling condition of the deblocking filtering adjustment mode of the horizontal DBR mode, a reference pixel corresponding to the current pixel may also be determined from the adjacent luminance blocks of the horizontal boundary of the current pixel, and a fifth luminance reconstruction pixel value of the reference pixel may be determined based on the fourth luminance reconstruction pixel value of the reference pixel and the third luminance reconstruction pixel value of the reference pixel. For example, a fifth luminance reconstruction pixel value of the reference pixel point is determined based on the fourth luminance reconstruction pixel value of the reference pixel point, the third luminance reconstruction pixel value of the reference pixel point, the horizontal adjustment threshold value of the deblocking filtering adjustment mode, the first horizontal adjustment offset value of the deblocking filtering adjustment mode, and the second horizontal adjustment offset value of the deblocking filtering adjustment mode.
For example, the reference pixel may be a pixel adjacent to the current pixel in the adjacent luminance block, or a pixel not adjacent to the current pixel, or a pixel symmetric to the current pixel in the adjacent luminance block, which is not limited herein. Referring to FIG. 4C, if the current pixel point is p in the current luminance block0Then the reference pixel point can be q in the adjacent luminance block0If the current pixel point is p in the current brightness block1Then the reference pixel point can be q in the adjacent luminance block1And so on.
For example, the first leveling threshold and the second leveling threshold may be determined based on the leveling threshold, the first leveling threshold and the leveling threshold may be the same, and the second leveling threshold and the leveling threshold may be opposite numbers, that is, the first leveling threshold and the second leveling threshold are opposite numbers. Based on the fourth brightness reconstruction pixel value of the reference pixel point, the third brightness reconstruction pixel value of the reference pixel point, the first horizontal adjustment threshold value, the second horizontal adjustment threshold value, the first horizontal adjustment offset value and the second horizontal adjustment offset value, the fifth brightness reconstruction pixel value of the reference pixel point is determined.
For example, if a difference between the third luminance reconstruction pixel value of the reference pixel point and the fourth luminance reconstruction pixel value of the reference pixel point is greater than the first leveling threshold, the fifth luminance reconstruction pixel value of the reference pixel point is determined based on the third luminance reconstruction pixel value of the reference pixel point, the fourth luminance reconstruction pixel value of the reference pixel point, and the first leveling offset value. And if the difference value between the third brightness reconstruction pixel value of the reference pixel point and the fourth brightness reconstruction pixel value of the reference pixel point is smaller than the second horizontal adjustment threshold value, determining a fifth brightness reconstruction pixel value of the reference pixel point based on the third brightness reconstruction pixel value of the reference pixel point, the fourth brightness reconstruction pixel value of the reference pixel point and the second horizontal adjustment offset value. And if the difference value between the third brightness reconstruction pixel value of the reference pixel point and the fourth brightness reconstruction pixel value of the reference pixel point is not greater than the first horizontal adjustment threshold value and the difference value between the third brightness reconstruction pixel value of the reference pixel point and the fourth brightness reconstruction pixel value of the reference pixel point is not less than the second horizontal adjustment threshold value, determining a fifth brightness reconstruction pixel value of the reference pixel point based on the fourth brightness reconstruction pixel value of the reference pixel point.
For example, if qi>Qi+DbrThreshold,Qi’=Clip1((Qi+qi+1)>>1+ dbrofset 0). If q isi<Qi-DbrThreshold, then Qi’=Clip1((Qi+qi+1)>>1+ dbrofset 1). In the above formula, qiThird luminance reconstructed pixel value, Q, representing a reference pixel pointiA fourth luminance reconstructed pixel value representing a reference pixel point, + DbrThreshold represents a first leveling threshold, Qi' represents a fifth luma reconstructed pixel value of the reference pixel point, DbrOffset0 represents a first leveling offset value, -DbrThreshold represents a second leveling threshold value, and DbrOffset1 represents a second leveling offset value.
Step S44, if the current pixel meets the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, a reference pixel corresponding to the current pixel may be determined from the neighboring luminance blocks of the horizontal boundary of the current pixel, a gradient value of the reference pixel may be determined based on a fourth luminance reconstruction pixel value of the reference pixel and fourth luminance reconstruction pixel values of surrounding pixels of the reference pixel (the surrounding pixels of the reference pixel may include pixels surrounding the horizontal boundary of the current pixel), and a fifth luminance reconstruction pixel value of the reference pixel may be determined based on the gradient value of the reference pixel and the fourth luminance reconstruction pixel value of the reference pixel. For example, the fifth luma reconstructed pixel value of the reference pixel may be determined based on the gradient value of the reference pixel, the fourth luma reconstructed pixel value of the reference pixel, the horizontal adjustment threshold of the enhanced deblocking filtering adjustment mode, the first enhanced horizontal adjustment offset value of the enhanced deblocking filtering adjustment mode, and the second enhanced horizontal adjustment offset value of the enhanced deblocking filtering adjustment mode.
For example, the reference pixel point may be a pixel point adjacent to the current pixel point in the adjacent luminance block, and the reference pixel point may also be a pixel point symmetric to the current pixel point in the adjacent luminance block, as shown in fig. 4C, if the current pixel point is p in the current luminance block0Then the reference pixel point can be q in the adjacent luminance block0And so on. The surrounding pixels of the reference pixel may be pixels surrounding the horizontal boundary of the current pixel (i.e., the horizontal boundary of the reference pixel).
For example, determining the gradient value of the reference pixel point based on the fourth luminance reconstructed pixel value of the reference pixel point and the fourth luminance reconstructed pixel values of the surrounding pixels of the reference pixel point may include, but is not limited to: determining the gradient value of the reference pixel point based on the following formula: DQi=(pi–qi+2)>>2。DQiRepresenting the gradient value, p, of a reference pixeliFourth luminance reconstructed pixel value, q, representing surrounding pixels of the reference pixeliA fourth luma reconstructed pixel value representing a reference pixel point,>>indicating a right shift.
For example, the first leveling threshold and the second leveling threshold may be determined based on the leveling threshold, and the first leveling threshold and the second leveling threshold are opposite numbers of each other. Based on this, a fifth luminance reconstruction pixel value of the reference pixel point may be determined based on the gradient value of the reference pixel point, the fourth luminance reconstruction pixel value of the reference pixel point, the first leveling threshold, the second leveling threshold, the first enhancement leveling offset value, and the second enhancement leveling offset value.
For example, if the gradient value of the reference pixel is smaller than the second leveling threshold, the fifth luminance reconstruction pixel value of the reference pixel is determined based on the fourth luminance reconstruction pixel value of the reference pixel and the first enhanced leveling offset value. And if the gradient value of the reference pixel point is larger than the first horizontal adjustment threshold value, determining a fifth brightness reconstruction pixel value of the reference pixel point based on the fourth brightness reconstruction pixel value of the reference pixel point and the second enhanced horizontal adjustment deviation value. And if the gradient value of the reference pixel point is not smaller than the second horizontal adjustment threshold value and the gradient value of the reference pixel point is not larger than the first horizontal adjustment threshold value, determining a fifth brightness reconstruction pixel value of the reference pixel point based on a fourth brightness reconstruction pixel value of the reference pixel point, namely taking the fourth brightness reconstruction pixel value as the fifth brightness reconstruction pixel value.
For example, if DQi<-DbrThreshold, then Qi=Clip1(qi+ DbrAltOffset 0). If DQi>DbrThreshold, then Qi=Clip1(qi+DbrAltOffset1)。DQiRepresenting a gradient value, -DbrThreshold representing a second leveling threshold, QiRepresenting a fifth luminance reconstructed pixel value, qiRepresenting the fourth luma reconstructed pixel value, dbraltffset 0 represents the first enhancement level adjustment offset value, DbrThreshold represents the first level adjustment threshold value, and dbraltffset 1 represents the second enhancement level adjustment offset value.
In the foregoing embodiment, for a case that a current pixel point meets a pixel level enabling condition of a deblocking filtering adjustment mode of a horizontal DBR mode, a fifth luminance reconstructed pixel value of the current pixel point needs to be determined based on a horizontal adjustment threshold of the deblocking filtering adjustment mode, a first horizontal adjustment offset value of the deblocking filtering adjustment mode, and a second horizontal adjustment offset value of the deblocking filtering adjustment mode.
In the above embodiment, for the case that the current pixel point satisfies the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, it is required that a fifth luma reconstructed pixel value of the current pixel point is determined based on a horizontal adjustment threshold of the enhanced deblocking filtering adjustment mode (which may be the same as or different from the horizontal adjustment threshold of the deblocking filtering adjustment mode, and both are taken as the same example herein, i.e., both are referred to as horizontal adjustment threshold values), a first enhanced horizontal adjustment offset value of the enhanced deblocking filtering adjustment mode and a second enhanced horizontal adjustment offset value of the enhanced deblocking filtering adjustment mode, in one possible implementation, the level adjustment threshold for the enhanced deblock filtering adjustment mode, the first enhancement level adjustment offset value for the enhanced deblock filtering adjustment mode, and the second enhancement level adjustment offset value for the enhanced deblock filtering adjustment mode corresponding to the current luma block may be parsed from the high level syntax.
For example, in the above embodiment, the high level syntax may include, but is not limited to, one of the following: sequence header level high level syntax; picture parameter set PPS high level syntax; a picture header level high level syntax; a frame-level high-level syntax; slice-level high-level syntax; coding tree unit CTU high-level syntax; coding unit, CU, high level syntax.
Step 306, if the current brightness block starts the ESAO mode, performing ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts the SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise (i.e., the current luma block does not enable ESAO mode and the current luma block does not enable ESAO mode), a sixth luma reconstruction block is determined based on the fifth luma reconstruction block.
For example, it may be determined whether the current luma block is enabled in the ESAO mode, and if the ESAO mode is enabled, the fifth luma reconstruction block is filtered by the ESAO filter to obtain a sixth luma reconstruction block. And if the ESAO mode is not started, determining whether the current brightness block starts the SAO mode, and if the SAO mode is started, performing SAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block. And if the SAO mode is not enabled, taking the fifth brightness reconstruction block as a sixth brightness reconstruction block.
Illustratively, ESAO filtering is performed on the fifth luma reconstruction block to obtain a sixth luma reconstruction block, which may include but is not limited to: and determining an enhanced sample value offset compensation block based on the fifth brightness reconstruction block, and operating the brightness reconstruction pixel value of each pixel point in the enhanced sample value offset compensation block to obtain the offset brightness reconstruction pixel value. And determining a sixth brightness reconstruction block based on the shifted brightness reconstruction pixel values of the pixels, namely forming the shifted brightness reconstruction pixel values into the sixth brightness reconstruction block. Of course, the above is only an example of ESAO filtering, and the implementation of this ESAO filtering is not limited.
For example, the SAO filtering is performed on the fifth luminance reconstruction block to obtain a sixth luminance reconstruction block, which may include but is not limited to: and determining a basic sample value offset compensation block based on the fifth brightness reconstruction block, determining basic sample value offset compensation information corresponding to the basic sample value offset compensation block, and operating the brightness reconstruction pixel value of each pixel point in the basic sample value offset compensation block based on the basic sample value offset compensation information to obtain the offset brightness reconstruction pixel value. And determining a sixth brightness reconstruction block based on the shifted brightness reconstruction pixel values of the pixels, namely forming the shifted brightness reconstruction pixel values into the sixth brightness reconstruction block. Of course, the above is only an example of SAO filtering, and the implementation of this SAO filtering is not limited.
Step 307, if the current luminance block starts an ALF mode, performing ALF filtering on the sixth luminance reconstruction block to obtain a seventh luminance reconstruction block; otherwise, the seventh luma reconstruction block is determined based on the sixth luma reconstruction block, that is, if the current luma block does not enable the ALF mode, the sixth luma reconstruction block may be used as the seventh luma reconstruction block, that is, the filtered luma reconstruction block.
For example, the ALF filtering is performed on the sixth luminance reconstruction block to obtain the seventh luminance reconstruction block, which may include but is not limited to: and determining an adaptive correction filtering block based on the sixth brightness reconstruction block, determining an adaptive correction filtering coefficient corresponding to the adaptive correction filtering block, and performing adaptive correction filtering on the brightness reconstruction pixel value of each pixel point in the adaptive correction filtering block based on the adaptive correction filtering coefficient to obtain the brightness reconstruction pixel value after adaptive correction filtering. And determining a seventh brightness reconstruction block based on the brightness reconstruction pixel values of the pixels subjected to the adaptive correction filtering, namely forming the seventh brightness reconstruction block by the brightness reconstruction pixel values subjected to the adaptive correction filtering. Of course, the above is only an example of ALF filtering, and no limitation is made thereto.
In one possible embodiment, an ESAO enable flag (the enable flag may also be referred to as an enable flag) may also be obtained, which allows the current luma block to enable ESAO mode or prohibits the current luma block from enabling ESAO mode. For example, if the ESAO enable flag is the first value (e.g., 1), the current luma block is allowed to enable the ESAO mode, and if the ESAO enable flag is the second value (e.g., 0), the current luma block is prohibited from enabling the ESAO mode. The ESAO permission flag bit may be an ESAO permission flag bit at a sequence head level, an ESAO permission flag bit at a PPS level, an ESAO permission flag bit at a picture head level, an ESAO permission flag bit at a frame level, an ESAO permission flag bit at a slice head level, an ESAO permission flag bit at a CTU level, or an ESAO permission flag bit at a CU level. Of course, the above are just a few examples, and no limitations are made on the high level syntax of the ESAO allowed flags.
An SAO enable flag may also be obtained, which allows the current luma block to enable the SAO mode, or which prohibits the current luma block from enabling the SAO mode. For example, if the SAO enable flag is set to a first value (e.g., 1), the current luma block is allowed to be enabled in the SAO mode, and if the SAO enable flag is set to a second value (e.g., 0), the current luma block is prohibited from being enabled in the SAO mode. Illustratively, the SAO permission flag bit may be a SAO permission flag bit at a sequence header level, or a SAO permission flag bit at a PPS level, or a SAO permission flag bit at a picture header level, or a SAO permission flag bit at a frame level, or a SAO permission flag bit at a slice header level, or a SAO permission flag bit at a CTU level, or a SAO permission flag bit at a CU level. Of course, the above are just a few examples, and the high level syntax of the SAO allowed flag bits is not limited.
An ALF enable flag may also be obtained, which allows the current luminance block to enable the ALF mode, or inhibits the current luminance block from enabling the ALF mode. For example, if the ALF enable flag is set to a first value (e.g., 1), the current luma block is allowed to enable the ALF mode, and if the ALF enable flag is set to a second value (e.g., 0), the current luma block is prohibited from enabling the ALF mode. Illustratively, the ALF enable flag bit may be an ALF enable flag bit at a sequence header level, or an ALF enable flag bit at a PPS level, or an ALF enable flag bit at a picture header level, or an ALF enable flag bit at a frame level, or an ALF enable flag bit at a slice header level, or an ALF enable flag bit at a CTU level, or an ALF enable flag bit at a CU level. Of course, the above are only a few examples, and the high level syntax of the ALF enable flag is not limited.
A DBF enable flag may also be obtained, where the DBF enable flag allows the current luminance block to enable the DBF mode, or the DBF enable flag prohibits the current luminance block from enabling the DBF mode; for example, if the DBF enable flag is a first value (e.g., 1), the current luminance block is allowed to enable the DBF mode, and if the DBF enable flag is a second value (e.g., 0), the current luminance block is prohibited from enabling the DBF mode. Illustratively, the DBF enable flag bit may be a DBF enable flag bit of a picture header level. Of course, the above is only an example of the DBF allowed flag bit, and the high level syntax of the DBF allowed flag bit is not limited. Such as DBF enable flag bit at sequence header level, or PPS level, or frame level, or slice header level, or CTU level, or CU level.
In one possible embodiment, if the DBF enable flag bit allows the DBF mode to be enabled for the current luminance block, the vertical DBR enable flag bit and the horizontal DBR enable flag bit may also be obtained. The vertical DBR enable flag bit enables the vertical DBR mode for the current luminance block, or the vertical DBR enable flag bit disables the vertical DBR mode for the current luminance block; for example, if the vertical DBR enable flag is set to a first value (e.g., 1), the current luma block is allowed to enable the vertical DBR mode, and if the vertical DBR enable flag is set to a second value (e.g., 0), the current luma block is prohibited from enabling the vertical DBR mode. The horizontal DBR enable flag bit enables the current luminance block to enable the horizontal DBR mode, or the horizontal DBR enable flag bit disables the current luminance block to enable the horizontal DBR mode; for example, if the horizontal DBR enable flag is a first value (e.g., 1), the current luminance block is allowed to enable the horizontal DBR mode, and if the horizontal DBR enable flag is a second value (e.g., 0), the current luminance block is prohibited from enabling the horizontal DBR mode.
If the DBF enable flag bit prohibits the current luminance block from enabling the DBF mode, and if the DBF enable flag bit is the second value, the vertical DBR enable flag bit and the horizontal DBR enable flag bit do not need to be acquired, it may be directly determined that the current luminance block is prohibited from enabling the vertical DBR mode, and it may be determined that the current luminance block is prohibited from enabling the horizontal DBR mode.
In another possible embodiment, the vertical DBR allowed flag bit and the horizontal DBR allowed flag bit may also be obtained, that is, the obtaining process does not need to refer to the value of the DBF allowed flag bit.
Illustratively, the vertical DBR allowed flag bit may be a vertical DBR allowed flag bit of the picture header level. Of course, the above is merely an example, and no limitation is made to the high level syntax of the vertical DBR allowed flag bits. For example, the flag bit may be allowed in the vertical DBR at the sequence header level, PPS level, frame level, slice header level, CTU level, or CU level.
Illustratively, the horizontal DBR allowed flag bit may be a horizontal DBR allowed flag bit of an image header level. Of course, the above is only an example, and the high level syntax of the horizontal DBR allowed flag bits is not limited. For example, the horizontal DBR allowed flag bit may be at the sequence header level, or PPS level, or frame level, or slice header level, or CTU level, or CU level.
In the above embodiment, if the DBF enable flag bit allows the DBF mode to be enabled for the current luminance block, the obtaining of the vertical DBR enable flag bit and the horizontal DBR enable flag bit may include, but is not limited to: and if the DBF permission flag bit allows the current luminance block to start the DBF mode and the level identification carried in the coded bit stream of the current luminance block is greater than or equal to the preset identification number, acquiring a vertical DBR permission flag bit and a horizontal DBR permission flag bit.
As can be seen from the above technical solutions, in the embodiment of the present application, if the current luma block enables the DBF mode, the first luma reconstruction block is subjected to vertical DBF filtering to obtain a second luma reconstruction block, if the current luma block enables the vertical DBR mode, the second luma reconstruction block is subjected to vertical DBR filtering to obtain a third luma reconstruction block, if the current luma block enables the DBF mode, the third luma reconstruction block is subjected to horizontal DBF filtering to obtain a fourth luma reconstruction block, if the current luma block enables the horizontal DBR mode, the fourth luma reconstruction block is subjected to horizontal DBR filtering to obtain a fifth luma reconstruction block, if the current luma block enables the ESAO mode, the fifth luma reconstruction block is subjected to ESAO filtering to obtain a sixth luma reconstruction block (or if the current luma block enables the SAO mode, the fifth luma reconstruction block is subjected to SAO filtering to obtain a sixth luma reconstruction block), if the current luma block enables the ALF mode, then the sixth luminance reconstruction block is subject to ALF filtering to obtain a seventh luminance reconstruction block. In summary, it can be seen that filtering processes such as vertical DBF filtering, vertical DBR filtering, horizontal DBF filtering, horizontal DBR filtering, ESAO filtering (or SAO filtering), and ALF filtering can be performed on a current luma block in sequence, so that a reasonable filtering manner is proposed, problems such as poor filtering effect and poor coding performance are avoided, i.e., the filtering effect can be improved, the coding performance can be improved, and a filtering phenomenon cannot occur, i.e., a pixel value after filtering is not much larger or much smaller than a pixel value before filtering. After the pixel values are subjected to the various filtering processes, the filtered pixel values are closer to real pixels, and the image quality can be improved.
Example 2: the embodiments of the present application provide a coding and decoding method, which can be applied to an encoding end or a decoding end, and can process a current luminance block (i.e., a luminance component) and a current chrominance block (i.e., a chrominance component).
For the current luma block (i.e., luma component), the original/first luma reconstruction block may be denoted as Y1(i);
The first step is as follows: if the current luminance block enables the DBF mode, then Y1(i) Y can be obtained after vertical DBF filtering2(i) (ii) a If not, then,Y2(i)=Y1(i),Y2(i) the block may be reconstructed for the second luminance of the above embodiment.
The second step is that: if the current luma block enables vertical DBR mode, then Y2(i) Y can be obtained after filtering through a vertical DBR3(i) (ii) a Otherwise, Y3(i)=Y2(i),Y3(i) The block may be reconstructed for the third luminance of the above embodiment.
The third step: if the current luminance block enables the DBF mode, then Y3(i) Y can be obtained after horizontal DBF filtering4(i) (ii) a Otherwise, Y4(i)=Y3(i),Y4(i) The fourth luma reconstructed block of the above embodiment may be used.
The fourth step: if the current luma block enables horizontal DBR mode, then Y4(i) Y can be obtained after filtering through a horizontal DBR5(i) (ii) a Otherwise, Y5(i)=Y4(i),Y5(i) The fifth luma reconstructed block of the above embodiment may be used.
The fifth step: if the current luma block is enabled in ESAO mode, then Y5(i) Can be filtered by ESAO to obtain Y6(i) Otherwise, if the current brightness block enables the SAO mode, Y5(i) Can obtain Y after filtering by SAO6(i) Otherwise (i.e., not enabling ESAO mode and SAO mode), Y6(i)=Y5(i),Y6(i) The sixth luminance reconstruction block of the above embodiment may be used.
And a sixth step: if the current luminance block enables ALF mode, then Y6(i) Can obtain Y after filtering by ALF7(i) Otherwise, Y7(i)=Y6(i),Y7(i) The seventh luma reconstructed block of the above embodiment may be used.
In the above process, i represents the pixel points in the luminance reconstruction block, i.e. the value range of i is 1-the total number of pixel points.
For the current chroma block (i.e., the chroma component), the original/first chroma reconstruction block may be denoted as C1(i);
The first step is as follows: if the current chroma block enables the DBF mode, then C1(i) Can be filtered by vertical DBFTo obtain C2(i) (ii) a Otherwise, C2(i)=C1(i),C2(i) The block may be reconstructed for the second chrominance of the above embodiment.
The second step is that: if the current chroma block enables the DBF mode, then C2(i) Can be filtered by a horizontal DBF to obtain C3(i) (ii) a Otherwise, C3(i)=C2(i),C3(i) The block may be reconstructed for the third chroma of the above embodiment.
The third step: if the current chroma block enables ESAO mode, then C3(i) Can be filtered by ESAO to obtain C4(i) Otherwise, if the current chroma block enables the SAO mode, C3(i) Can be filtered by SAO to obtain C4(i) Otherwise (i.e., not enabling ESAO mode and SAO mode), C4(i)=C3(i),C4(i) The block may be reconstructed for the fourth chroma of the above embodiment.
The fourth step: if the current chroma block enables the CCSAO mode, then C4(i) Can be filtered by CCSAO to obtain C5(i) (ii) a Otherwise, C5(i)=C4(i),C5(i) The fifth chroma reconstruction block of the above embodiment may be used.
Illustratively, at C4(i) Obtaining C by CCSAO filtering5(i) Can be based on C4(i) And Y5(i) Performing CCSAO filtering to obtain C5(i),Y5(i) The fifth luminance reconstruction block of the above embodiment, i.e., the luminance reconstruction block after horizontal DBR filtering. For example, the basic procedure of CCSAO filtering is as follows: for chroma reconstruction block C requiring CCSAO filtering4(i) Reconstructing the block Y based on the fifth luminance of the corresponding position5(i) And the current chroma pixel value (chroma pixel value C after ESAO4(i) Determine a classification of the current chroma pixel. Based on the classification, a compensation value for the current chroma pixel is determined. Adding the compensation value to the current chrominance pixel value to obtain a chrominance pixel value (C) after CCSAO filtering5(i))。
The fifth step: if the current chroma block enables ALF mode, then C5(i) Can obtain C after filtering by ALF6(i) (ii) a Otherwise, C6(i)=C5(i),C6(i) The sixth chroma reconstruction block of the above embodiment may be used.
In the above process, i represents a pixel point in the chrominance reconstruction block, i.e., the value range of i is 1-the total number of pixel points.
The processing procedure for the current luma block (i.e., luma component) and the current chroma block (i.e., chroma component) can be seen in fig. 5, where in fig. 5, Y is the luma component and Cb and Cr are the two chroma components. For the luminance component Y, vertical DBF filtering, vertical DBR filtering, horizontal DBF filtering, horizontal DBR filtering, ESAO filtering or SAO filtering, ALF filtering, etc. are sequentially performed to obtain a luminance component Y' corresponding to the luminance component Y, that is, a final filtered luminance component.
For the chrominance component Cb, vertical DBF filtering, horizontal DBF filtering, ESAO filtering (or SAO filtering), CCSAO filtering (the input of the CCSAO filtering includes the luminance component after the horizontal DBR filtering), ALF filtering, etc. may be performed in sequence to obtain a chrominance component Cb' corresponding to the chrominance component Cb, that is, the chrominance component Cb after the final filtering.
For the chrominance component Cr, vertical DBF filtering, horizontal DBF filtering, ESAO filtering (or SAO filtering), CCSAO filtering (the input of the CCSAO filtering includes the luminance component after the horizontal DBR filtering), ALF filtering, etc. may be sequentially performed to obtain a chrominance component Cr' corresponding to the chrominance component Cr, that is, the chrominance component Cr after the final filtering.
In the above embodiment, DBF is deblocking filter, i.e. deblocking filtering; DBR is deblocking refining, namely deblocking filtering adjustment; ESAO is Enhanced Sample Adaptive Offset, namely Enhanced Sample value Offset compensation; SAO is Sample Adaptive Offset, i.e. Sample Offset compensation; CCSAO is Cross-Component Sample Adaptive Offset, i.e., Offset compensation across Component samples; the ALF is Adaptive level Filter, namely Adaptive correction filtering.
Example 3: the control of the high level syntax (e.g., sequence header high level syntax) can be seen in table 1, that is, the encoding end encodes the high level syntax shown in table 1 at the sequence header, and the decoding end decodes the high level syntax shown in table 1 from the sequence header.
TABLE 1
Figure BDA0003440600580000241
In table 1, SAO _ enable _ flag is an SAO allowed flag, the current luma block and the current chroma block may share the same SAO allowed flag, or the SAO allowed flag of the current luma block and the SAO allowed flag of the current chroma block may be separately set, and the sharing of the same SAO allowed flag is taken as an example in table 1.
In table 1, ALF _ enable _ flag is an ALF allowed flag bit, the current luma block and the current chroma block may share the same ALF allowed flag bit, or the ALF allowed flag bit of the current luma block and the ALF allowed flag bit of the current chroma block may be separately set, and table 1 exemplifies that the same ALF allowed flag bit is shared.
In table 1, ESAO _ enable _ flag is an ESAO enable flag bit, the current luma block and the current chroma block may share the same ESAO enable flag bit, or the ESAO enable flag bit of the current luma block and the ESAO enable flag bit of the current chroma block may be separately set, and the sharing of the same ESAO enable flag bit is taken as an example in table 1.
In table 1, CCSAO _ enable _ flag is a CCSAO allowed flag bit, and the current luminance block and the current chrominance block may share the same CCSAO allowed flag bit, or the CCSAO allowed flag bit of the current luminance block and the CCSAO allowed flag bit of the current chrominance block may be separately set, for example, the same CCSAO allowed flag bit is shared.
As can be seen from table 1, the sequence header high-level syntax has no sequence header switch of the DBF tool and the DBR tool, i.e., there are no DBF enable flag bit, vertical DBR enable flag bit, and horizontal DBR enable flag bit of the sequence header.
In table 1, sao _ enable _ flag is a sample offset compensation enable flag, which is a binary variable, a value of '1' indicates that sample offset compensation may be used, and a value of '0' indicates that sample offset compensation should not be used.
The alf _ enable _ flag is an adaptive modified filtering permission flag, and is a binary variable, a value of '1' indicates that adaptive modified filtering should be used, and a value of '0' indicates that adaptive modified filtering should not be used.
esao _ enable _ flag is an enhanced sample offset compensation enable flag, and is a binary variable, a value of '1' indicates that enhanced sample offset compensation can be used, and a value of '0' indicates that enhanced sample offset compensation should not be used.
The ccsao _ enable _ flag is a cross-component sample value offset compensation permission flag bit, and is a binary variable, a value of '1' indicates that cross-component sample value offset compensation can be used, and a value of '0' indicates that cross-component sample value offset compensation should not be used.
The early _ enable _ flag is an enhanced adaptive correction filter permission flag, and is a binary variable, where a value of '1' indicates that an enhanced adaptive correction filter should be used, and a value of '0' indicates that an enhanced adaptive correction filter should not be used. The value of earffebleflag is equal to the value of earf _ enable _ flag, and if earf _ enable _ flag is not present in the bitstream, the value of earffebleflag is 0.
Example 4: the control of the high level syntax (e.g., picture header high level syntax) can be seen in table 2, that is, the encoding side encodes the high level syntax shown in table 2 at the picture header, and the decoding side decodes the high level syntax shown in table 2 from the picture header.
TABLE 2
deblocking_filter_disable_flag u(1)
In table 2, deblocking _ filter _ disable _ flag is a DBF enable flag, the current luma block and the current chroma block may share the same DBF enable flag, or the DBF enable flag of the current luma block and the DBF enable flag of the current chroma block may be separately set, taking the sharing of the same DBF enable flag as an example.
In summary, for the DBF mode, the high level syntax shown in table 2 can be encoded/decoded in the picture header, and in table 2, deblocking _ filter _ disable _ flag can be a deblocking filtering disable flag, which is a binary variable, a value of '1' indicates that deblocking filtering should not be used, and a value of '0' indicates that deblocking filtering should be used.
Example 5: the control of the high level syntax (e.g., picture header high level syntax) can be seen in table 3, that is, the encoding side encodes the high level syntax shown in table 3 at the picture header, and the decoding side decodes the high level syntax shown in table 3 from the picture header.
TABLE 3
Figure BDA0003440600580000251
Figure BDA0003440600580000261
Table 3 is the relevant high level syntax for the DBR mode, that is, the high level syntax shown in table 3 can be encoded/decoded for the DBR mode at the picture header, either intra or inter. For example, when the following two conditions are satisfied, the coding end codes the high level syntax shown in table 3 at the picture header, and the decoding end decodes the high level syntax shown in table 3 from the picture header. The high level syntax for the DBR mode may be the high level syntax for the current luma block, i.e., the current chroma block is not DBR-patterned.
Condition 1: the DBF enable flag bit enables the DBF mode, for example, the deblocking _ filter _ disable _ flag is 0. Condition 2: the profile identifier (e.g., profile _ id) carried in the encoded bitstream is greater than or equal to a preset identifier, for example, profile _ id is 0x32| | | profile _ id is 0x30, that is, the profile identifier is 48 or 50, that is, the current profile is a reinforced 8-bit profile (High 8bit profile) or a reinforced 10-bit profile (High 10bit profile), the profile identifier of the reinforced 8-bit profile is 48, and the profile identifier of the reinforced 10-bit profile is 50. Obviously, the preset identification number may be set to 48, and if the profile identifier carried in the coded bitstream is greater than or equal to the preset identification number 48, it indicates that the DBR mode is allowed.
Referring to table 3, for the relevant content of the DBF mode included in the picture header high-level syntax, the following may be included:
picture _ DBR _ v _ enable _ flag is a vertical DBR allowed flag bit, is a picture-level deblocking filtering vertical adjustment allowed flag, is a binary variable, and has a value of '1' indicating that the current picture can use deblocking filtering vertical adjustment and a value of '0' indicating that the current picture should not use deblocking filtering vertical adjustment. The value of PictureDbrVEnableFlag is equal to the value of picture _ dbr _ v _ enable _ flag, and if picture _ dbr _ v _ enable _ flag is not present in the bitstream, the value of PhDbrVEnableFlag is 0.
picture _ alt _ DBR _ v _ enable _ flag is a vertical DBR enable flag bit, picture _ alt _ DBR _ v _ enable _ flag is a picture-level enhanced deblocking filtering vertical adjustment enable flag, and is a binary variable, a value of '1' may indicate that the current picture should use enhanced deblocking filtering vertical adjustment, and a value of '0' may indicate that the current picture should not use enhanced deblocking filtering vertical adjustment. The value of PictureAltDbrVenableFlag is equal to the value of picture _ alt _ dbr _ v _ enable _ flag, if picture _ alt _ dbr _ v _ enable _ flag is not present in the bitstream, the value of PictureAltDbrVenableFlag is 0.
In summary, it can be seen that in table 3, the vertical DBR enable flags may include a picture _ DBR _ v _ enable _ flag and a picture _ alt _ DBR _ v _ enable _ flag. On the basis, if the value of picture _ DBR _ v _ enable _ flag is 1 and/or the value of picture _ alt _ DBR _ v _ enable _ flag is 1, it indicates that the vertical DBR permission flag bit allows the current luminance block to enable the vertical DBR mode. If the value of picture _ DBR _ v _ enable _ flag is 0 and the value of picture _ alt _ DBR _ v _ enable _ flag is 0, it indicates that the vertical DBR enable flag bit prohibits the current luma block from enabling the vertical DBR mode.
The high level syntax may further include only picture _ DBR _ v _ enable _ flag or picture _ alt _ DBR _ v _ enable _ flag, and if the high level syntax includes only picture _ DBR _ v _ enable _ flag, when the value of picture _ DBR _ v _ enable _ flag is 1, it indicates that the vertical DBR enable flag allows the current luminance block to enable the vertical DBR mode, and when the value of picture _ DBR _ v _ enable _ flag is 0, it indicates that the vertical DBR enable flag prohibits the current luminance block from enabling the vertical DBR mode. Or, if the high level syntax includes only picture _ alt _ DBR _ v _ enable _ flag, when the value of picture _ alt _ DBR _ v _ enable _ flag is 1, it indicates that the vertical DBR allows the flag bit to allow the current luminance block to enable the vertical DBR mode, and when the value of picture _ alt _ DBR _ v _ enable _ flag is 0, it indicates that the vertical DBR allows the flag bit to prohibit the current luminance block from enabling the vertical DBR mode.
In the above embodiment, the picture _ DBR _ v _ enable _ flag is a picture-level deblocking filtering vertical adjustment permission flag, that is, an enable flag bit of a deblocking filtering adjustment mode of the vertical DBR mode, and if the value of the picture _ DBR _ v _ enable _ flag is 1, in the above embodiment, it is necessary to determine whether a current pixel point meets a pixel-level enable condition of the deblocking filtering adjustment mode of the vertical DBR mode, and the determination method refers to the above embodiment, and is not described herein again. If the value of picture _ DBR _ v _ enable _ flag is 0, in the above embodiment, it is directly determined that the current pixel does not satisfy the pixel level enabling condition of the deblocking filtering adjustment mode of the vertical DBR mode. The picture _ alt _ DBR _ v _ enable _ flag is a picture-level enhanced deblocking filtering vertical adjustment permission flag, that is, an enable flag bit of an enhanced deblocking filtering adjustment mode of the vertical DBR mode, and if the value of the picture _ alt _ DBR _ v _ enable _ flag is 1, in the above-described embodiment, it is necessary to determine whether a current pixel point meets a pixel-level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, and the determination manner is referred to the above-described embodiment and is not described herein again. If the value of picture _ alt _ DBR _ v _ enable _ flag is 0, in the above embodiment, it is directly determined that the current pixel does not satisfy the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode.
dbr _ v _ threshold _ minus1 is a vertical adjustment threshold, i.e., a vertical adjustment threshold of the deblocking filtering adjustment mode and a vertical adjustment threshold of the enhanced deblocking filtering adjustment mode, and dbr _ v _ threshold _ minus1 has a value ranging from 0 to 1. The value of dbrvhreshold is equal to the value of dbr _ v _ threshold _ minus1 plus 1, and is 0 if there is no dbr _ v _ threshold _ minus1 in the bitstream.
dbr _ v _ offset0_ minus1 is the vertical adjustment offset value 0, and dbr _ v _ offset0_ minus1 has a value in the range of 0 to 3. The value of DbrVOffset0 is equal to the negative value of the value of dbr _ v _ offset0_ minus1 plus 1, and if there is no dbr _ v _ offset0_ minus1 in the bitstream, the value of DbrVOffset0 is 0.
dbr _ v _ offset1_ minus1 is the vertical adjustment offset value of 1, and dbr _ v _ offset1_ minus1 has a value ranging from 0 to 3. The value of DbrVOffset1 is equal to the value of dbr _ v _ offset1_ minus1 plus 1, and if there is no dbr _ v _ offset1_ minus1 in the bitstream, the value of DbrVOffset1 is 0.
dbr _ v _ alt _ offset0_ minus1 is the enhanced vertical adjustment offset value 0, and ranges from 0 to 3. The value of DbrVAltOffset0 is equal to the negative of the value of dbr _ v _ alt _ offset0_ minus1 plus 1, and if dbr _ v _ alt _ offset0_ minus1 is not present in the bitstream, the value of DbrVAltOffset0 is 0.
dbr _ v _ alt _ offset1_ minus1 is the enhanced vertical adjustment offset value of 1, and ranges from 0 to 3. The value of DbrVAltOffset1 is equal to the value of dbr _ v _ alt _ offset1_ minus1 plus 1, and if dbr _ v _ alt _ offset1_ minus1 is not present in the bitstream, the value of DbrVAltOffset1 is 0.
picture _ DBR _ h _ enable _ flag is a horizontal DBR enable flag bit, is a picture-level deblocking filtering level adjustment enable flag, is a binary variable, and has a value of '1' indicating that the current picture can use deblocking filtering level adjustment and a value of '0' indicating that the current picture should not use deblocking filtering level adjustment. The value of PictureDbrhenableFlag is equal to the value of picture _ dbr _ h _ enable _ flag, and if picture _ dbr _ h _ enable _ flag is not present in the bitstream, the value of PictureDbrhenableFlag is 0.
picture _ alt _ DBR _ h _ enable _ flag is a horizontal DBR enable flag bit, picture _ alt _ DBR _ h _ enable _ flag is a picture-level enhanced deblocking filtering level adjustment enable flag, and is a binary variable, a value of '1' may indicate that the current picture should use enhanced deblocking filtering level adjustment, and a value of '0' may indicate that the current picture should not use enhanced deblocking filtering level adjustment. The value of PictureAltDbrHEnableFlag is equal to the value of picture _ alt _ dbr _ h _ enable _ flag, which is 0 if picture _ alt _ dbr _ h _ enable _ flag is not present in the bitstream.
In summary, it can be seen that in table 3, the horizontal DBR enable flags may include a picture _ DBR _ h _ enable _ flag and a picture _ alt _ DBR _ h _ enable _ flag. On this basis, if the value of picture _ DBR _ h _ enable _ flag is 1 and/or the value of picture _ alt _ DBR _ h _ enable _ flag is 1, it indicates that the horizontal DBR enable flag bit allows the current luma block to enable the horizontal DBR mode. If the value of picture _ DBR _ h _ enable _ flag is 0 and the value of picture _ alt _ DBR _ h _ enable _ flag is 0, it indicates that the horizontal DBR enable flag bit prohibits the current luma block from enabling the horizontal DBR mode.
The high level syntax may further include only picture _ DBR _ h _ enable _ flag or picture _ alt _ DBR _ h _ enable _ flag, and if the high level syntax includes only picture _ DBR _ h _ enable _ flag, when the value of picture _ DBR _ h _ enable _ flag is 1, it indicates that the horizontal DBR enable flag allows the current luminance block to enable the horizontal DBR mode, and when the value of picture _ DBR _ h _ enable _ flag is 0, it indicates that the horizontal DBR enable flag prohibits the current luminance block to enable the horizontal DBR mode. Or, if the high level syntax includes only picture _ alt _ DBR _ h _ enable _ flag, when the value of picture _ alt _ DBR _ h _ enable _ flag is 1, it indicates that the horizontal DBR enable flag allows the current luma block to enable the horizontal DBR mode, and when the value of picture _ alt _ DBR _ h _ enable _ flag is 0, it indicates that the horizontal DBR enable flag prohibits the current luma block from enabling the horizontal DBR mode.
In the above embodiment, the picture _ DBR _ h _ enable _ flag is a picture-level deblocking filtering level adjustment permission flag, that is, an enable flag bit of a deblocking filtering adjustment mode of the horizontal DBR mode, and if the value of the picture _ DBR _ h _ enable _ flag is 1, in the above embodiment, it is necessary to determine whether a current pixel point meets a pixel-level enabling condition of the deblocking filtering adjustment mode of the horizontal DBR mode, and the determination manner is referred to the above embodiment and is not described herein again. If the value of picture _ DBR _ h _ enable _ flag is 0, in the above embodiment, it is directly determined that the current pixel does not satisfy the pixel level enabling condition of the deblocking filtering adjustment mode of the horizontal DBR mode.
The picture _ alt _ DBR _ h _ enable _ flag is a picture-level enhanced deblocking filtering horizontal adjustment permission flag, that is, an enable flag bit of an enhanced deblocking filtering adjustment mode of the horizontal DBR mode, and if the value of the picture _ alt _ DBR _ h _ enable _ flag is 1, in the above-described embodiment, it is necessary to determine whether a current pixel point meets a pixel-level enabling condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, and the determination manner is referred to the above-described embodiment and is not described herein again. If the value of picture _ alt _ DBR _ h _ enable _ flag is 0, in the above embodiment, it is directly determined that the current pixel does not satisfy the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode.
dbr _ h _ threshold _ minus1 is a horizontal adjustment threshold, i.e., a horizontal adjustment threshold of the deblocking filtering adjustment mode and a horizontal adjustment threshold of the enhanced deblocking filtering adjustment mode, and dbr _ h _ threshold _ minus1 has a value ranging from 0 to 1. The value of dbrthreshold is equal to the value of dbr _ h _ threshold _ minus1 plus 1, and is 0 if there is no dbr _ h _ threshold _ minus1 in the bitstream.
dbr _ h _ offset0_ minus1 is the horizontal adjustment offset value 0, and dbr _ h _ offset0_ minus1 has a value ranging from 0 to 3. The value of dbrrhoffset 0 is equal to the negative value of the value of dbr _ h _ offset0_ minus1 plus 1, and if there is no dbr _ h _ offset0_ minus1 in the bitstream, the value of dbrrhoffset 0 is 0.
dbr _ h _ offset1_ minus1 is the horizontal adjustment offset value of 1, and dbr _ h _ offset1_ minus1 has a value ranging from 0 to 3. The value of dbrrhoffset 1 is equal to the value of dbr _ h _ offset1_ minus1 plus 1, and if there is no dbr _ h _ offset1_ minus1 in the bitstream, the value of dbrrhoffset 1 is 0.
dbr _ h _ alt _ offset0_ minus1 is the enhancement level adjustment offset value 0, ranging from 0 to 3. The value of DbrHAltOffset0 is equal to the negative of the value of dbr _ h _ alt _ offset0_ minus1 plus 1, and if dbr _ h _ alt _ offset0_ minus1 is not present in the bitstream, then DbrHAltOffset0 has a value of 0.
dbr _ h _ alt _ offset1_ minus1 is the enhancement level adjustment offset value of 1, with a range of values from 0 to 3. The value of DbrHAltOffset1 is equal to the value of dbr _ h _ alt _ offset1_ minus1 plus 1, and if dbr _ h _ alt _ offset1_ minus1 is not present in the bitstream, then the value of DbrHAltOffset1 is 0.
In tables 1, 2 and 3 of the above examples, u (n) represents an n-bit unsigned integer. In the syntax tables of table 1, table 2 and table 3, if n is "v", the number of bits thereof may be determined by other syntax element values, which is not described in detail.
Example 6: for the deblocking filtering process (i.e., DBF filtering and DBR filtering), the luma block and the chroma block may be deblock filtered separately (the luma block may be DBF filtering and DBR filtering, and the chroma block may be DBF filtering), the unit of the deblocking filtering may be the filter block (i.e., the current luma block or the current chroma block of the above-mentioned embodiment), each filter block may be processed in sequence according to a raster scanning order (i.e., from left to right, from top to bottom), the size of the luma filter block may be 8 × 8, and the size of the chroma filter block may be 8 × 8. Each filter block includes a vertical boundary (i.e., a vertical boundary of the current luma block or the current chroma block) and a horizontal boundary (i.e., a horizontal boundary of the current luma block or the current chroma block), each boundary (i.e., the vertical boundary or the horizontal boundary) of the luma filter block has a length of 8 luma samples, which is divided into 8 segments on average, and each boundary (i.e., the vertical boundary or the horizontal boundary) of the chroma filter block has a length of 8 chroma samples, which is divided into 8 segments on average.
For each filter block, the vertical boundary is filtered first, and then the horizontal boundary is filtered. For each boundary, it is first determined whether the boundary (i.e., the boundary of the current luminance block or the current chrominance block, such as a vertical boundary or a horizontal boundary, etc.) needs to be filtered according to embodiment 7. If filtering is required, the deblocking filtering adjustment parameters are determined according to embodiment 8, the filtering strength of each segment boundary of the edge (each segment boundary is also the boundary of the current pixel point) is calculated according to embodiment 9, and then the processes of deblocking filtering, deblocking filtering (i.e., DBF filtering and DBR filtering) are performed according to the filtering strength of the segment boundary, as shown in embodiment 10 to embodiment 16. Otherwise (i.e., no filtering is required), the value of the compensated sample may be directly taken as the value of the filtered sample.
For example, samples on both sides of the current boundary may have been modified in the previous deblocking filtering process, and the filtering input of the current boundary is these samples that may have been modified, for example, the samples modified in the filtering process of the vertical boundary of the current filtering block may be used as the input of the horizontal boundary filtering process, which may be referred to as embodiment 1 and embodiment 2, and will not be described herein again.
Example 7: the decision of whether to skip deblocking filtering (i.e., DBF filtering and DBR filtering). A boundary (such as a vertical boundary or a horizontal boundary, where the boundary refers to a boundary of a current luminance block or a current chrominance block, but not a boundary of a current pixel point) satisfying one of the following conditions does not need to be filtered: if the boundary to be filtered is an image boundary, the boundary does not need to be filtered. If the boundary to be filtered is a slice boundary and the cross-slice loop filter enable flag is 0, then the boundary does not need to be filtered. If the boundary to be filtered is a luma filter boundary that is not a boundary of a luma coding block or a luma transform block, then the boundary does not require filtering. If the boundary to be filtered is a chroma filtering boundary, the chroma filtering boundary is not the boundary of a chroma coding block or a chroma transformation block, and a brightness filtering boundary corresponding to the chroma filtering boundary is not the boundary of a brightness coding block, the boundary does not need filtering. If the boundary to be filtered is a brightness filtering boundary, the sub-block transformation flag of the coding unit where the brightness filtering boundary is located is 1, and the brightness filtering boundary is not the boundary of the brightness coding block, the boundary does not need filtering. If the string copy intra prediction mode flag of the coding unit where the boundary to be filtered is located is 1, then the boundary does not need to be filtered.
Example 8: deblocking filtering adjustment parameters are determined. For example, the following deblocking filtering adjustment parameters may be determined: dbrthresol, dbrafset 0, dbrafset 1, dbraltlofset 0 and dbraltlofset 1. Illustratively, if the current boundary is a vertical boundary and picturedbrvableflag is 1, or the current boundary is a horizontal boundary and picturedbrnableflag is 1, the value of picturedbrgenabeflag is 1; otherwise, the value of PictureDbrEnablFlag is 0. If the current boundary is a vertical boundary and PictureAltDbrVenableFlag is 1, or the current boundary is a horizontal boundary and PictureAltDbrHEnableFlag is 1, the value of PictureAltDbrEnableFlag is 1; otherwise, the value of PictureAltDbrEnablFlag is 0.
In summary, it can be seen that if the vertical DBR enable flag bit indicates that the vertical DBR filtering is allowed to be enabled (i.e., the current boundary is the vertical boundary and picturedbrvableflag is 1, indicating that the deblocking filtering adjustment mode of the vertical DBR filtering is allowed to be enabled, or the current boundary is the vertical boundary and picturealbrtvbenableflag is 1, indicating that the enhanced deblocking filtering adjustment mode of the vertical DBR filtering is allowed to be enabled), the value of picturedbrgenable flag is 1, and when the value is 1, it indicates that the DBR filtering is required to be enabled, i.e., the vertical DBR filtering and/or the horizontal DBR filtering is required to be enabled. If the horizontal DBR enable flag bit indicates that horizontal DBR filtering is allowed to be enabled (i.e., the current boundary is the horizontal boundary and picturedbrnableflag is 1, indicating that the deblocking filtering adjustment mode of horizontal DBR filtering is allowed to be enabled, or the current boundary is the horizontal boundary and picturealt dbrnableflag is 1, indicating that the enhanced deblocking filtering adjustment mode of horizontal DBR filtering is allowed to be enabled), then the value of picturedbrbrgenflatflag is 1, indicating that DBR filtering is required to be enabled, i.e., vertical DBR filtering and/or horizontal DBR filtering is required to be enabled.
Illustratively, for vertical boundaries DbrThreshold dbrtvthreshold dbrtffset 0 dbrtffset 0 dbrtffset 1 dbrtvoffset 1 dbrtoffset 0 dbrtvaltoffset 0 dbrtoffset 1 dbrtvaltoffset 1.
Referring to the above-described embodiment, dbbrvthreshold is used to indicate a vertical adjustment threshold of the deblocking filtering adjustment mode and a vertical adjustment threshold of the enhanced deblocking filtering adjustment mode, which are the same vertical adjustment threshold, dbbrvoffset 0 is used to indicate a first vertical adjustment offset value of the deblocking filtering adjustment mode, dbbrvoffset 1 is used to indicate a second vertical adjustment offset value of the deblocking filtering adjustment mode, dbbrvaltoffset 0 is used to indicate a first enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode, and dbbrvaltoffset 1 is used to indicate a second enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode.
Illustratively, for horizontal boundaries DbrThreshold, dbberoffset 0 dbberhoffset 0 dbberoffset 1 dbberhoffset 1 dbraltaloffset 0 dbraltlaltoffset 0 dbraltloffset 1 DbrHAltOffset 1.
Referring to the above-described embodiment, dbrrhhreshold is used to indicate a horizontal adjustment threshold of the deblocking filtering adjustment mode and a horizontal adjustment threshold of the enhanced deblocking filtering adjustment mode, which are the same horizontal adjustment threshold, dbrrhoffset 0 is used to indicate a first horizontal adjustment offset value of the deblocking filtering adjustment mode, dbrrhoffset 1 is used to indicate a second horizontal adjustment offset value of the deblocking filtering adjustment mode, dbrrhaltoffset 0 is used to indicate a first enhanced horizontal adjustment offset value of the enhanced deblocking filtering adjustment mode, and dbrrhaltoffset 1 is used to indicate a second enhanced horizontal adjustment offset value of the enhanced deblocking filtering adjustment mode.
For example, the vertical boundary may refer to a vertical boundary of the current luminance block, the horizontal boundary may refer to a horizontal boundary of the current luminance block, that is, the vertical boundary of each pixel included in the vertical boundary of the current luminance block may be filtered by using the deblocking filtering adjustment parameter, and the horizontal boundary of each pixel included in the horizontal boundary of the current luminance block may be filtered by using the deblocking filtering adjustment parameter.
Example 9: and (5) derivation of boundary filtering strength. Referring to fig. 4A and 4C, schematic diagrams of a vertical boundary and a horizontal boundary of a current pixel point are shown, and 8 samples on two sides of the vertical boundary/the horizontal boundary are respectively marked as p0、p1、p2、p3And q is0、q1、q2、q3. It should be noted that, when calculating the boundary filtering strength BS, the boundary filtering strength BS is calculated for the current pixel, that is, the boundary is the boundary for the current pixel, and not the boundary for the current luminance block or the current chrominance block.
Boundary filtering strength determination means one, if all the following conditions are satisfied, the boundary filtering strength BS is equal to 0.
a)p0And q is0The quantization coefficients of the transform blocks of the coding units are all 0. Exemplarily, if p0(or q)0) Is a luminance sample and p0(or q)0) In a coding unit containing only luminance samples, p0(or q)0) The coding unit refers to a code containing p0(or q)0) The luminance encoding unit of (1). If p is0(or q)0) Is a chroma sample and p0(or q)0) The coding unit only contains chroma samples, thenp0(or q)0) The coding unit refers to a code containing p0(or q)0) A coding unit corresponding to the brightness sample; otherwise (i.e. p)0Or q0Where the coding unit contains both luma and chroma samples), p0(or q)0) The coding unit refers to a code containing p0(or q)0) The coding unit of (1).
b)p0And q is0The prediction type of the coding unit in which it is located is not intra.
c) Note BPAnd BQAre each p0And q is04 x 4 luma code blocks located, BPAnd BQSatisfies both the following condition 1 and condition 2, or satisfies both the condition 3, the condition 4, and the condition 5.
1)BPAnd BQThe reference indices of L0 of the spatial motion information storage units respectively corresponding to are all equal to-1, or, BPAnd BQThe reference frames corresponding to the reference indexes of the L0 of the spatial motion information storage units respectively are the same frame, and the difference of all components of the L0 motion vectors of the spatial motion information storage units is less than a whole pixel.
2)BPAnd BQThe reference indices of L1 of the spatial motion information storage units respectively corresponding to are all equal to-1, or, BPAnd BQThe reference frames corresponding to the reference indexes of the L1 of the spatial motion information storage units respectively are the same frame, and the difference of all components of the L1 motion vectors of the spatial motion information storage units is less than a whole pixel.
3) One of the following conditions is satisfied:
◆BPthe L0 reference index of the corresponding spatial motion information storage unit is equal to-1, and BQThe L1 reference index of the corresponding spatial motion information storage unit is equal to-1.
◆BPReference frame and B corresponding to L0 reference index of corresponding spatial motion information storage unitQThe reference frame corresponding to the L1 reference index of the corresponding spatial motion information storage unit is the same frame, and BPL0 operation of corresponding spatial domain motion information storage unitMotion vector sum BQThe difference of all components of the L1 motion vector of the corresponding spatial domain motion information storage unit is less than a whole pixel point.
4) One of the following conditions is satisfied:
◆BQthe L0 reference index of the corresponding spatial motion information storage unit is equal to-1, and BPThe L1 reference index of the corresponding spatial motion information storage unit is equal to-1.
◆BQReference frame and B corresponding to L0 reference index of corresponding spatial motion information storage unitPThe reference frame corresponding to the L1 reference index of the corresponding spatial motion information storage unit is the same frame, and BQL0 motion vector sum B of corresponding spatial motion information storage unitsPThe difference of all components of the L1 motion vector of the corresponding spatial domain motion information storage unit is less than a whole pixel point.
5)BPL0 reference index of corresponding spatial motion information storage unit corresponds to reference frame and BQThe reference frames corresponding to the L0 reference indexes of the corresponding spatial motion information storage units are not the same frame; b isPL1 reference index of corresponding spatial motion information storage unit corresponds to reference frame and BQThe reference frames corresponding to the L1 reference indexes of the corresponding spatial motion information storage units are not the same frame.
And (4) a second boundary filtering strength determination mode, otherwise, calculating the boundary filtering strength BS (simply called boundary strength) according to the following method.
a) Calculating p0And q is0Average quantization parameter QP of located coding unitav. If it is a luma sample, the quantization parameter of the luma coding block may be used; in case of chroma samples, the quantization parameter of the chroma coding block may be used. Can make p be0The quantization parameter of the coding unit is QPp,q0The quantization parameter of the coding unit is QPqOn this basis, the average quantization parameter may be: QPav=(QPp+QPq+1)>>1。
b) The indices IndexA and IndexB are calculated using the following formulas. IndexA ═ Clip3(0,63, QP)av–8*(BitDepth–8)+AlphaCOffset);IndexB=Clip3(0,63,QPav–8*(BitDepth–8)+BetaOffset)。
c) Obtaining values of alpha 'and beta' according to table lookup of IndexA and IndexB respectively, and obtaining values of alpha and beta according to BitDepth, which is shown in the following formula: α ═ α' < (BitDepth-8); β ═ β' < (BitDepth-8).
d) If deblocking Filter type is 1 and Abs (p0-q0) is greater than or equal to 4 x α, then BS is equal to 0; otherwise, the boundary filtering strength BS may be calculated as follows.
1) fS was calculated by setting both fL and fR values to 0.
Figure BDA0003440600580000321
2) And determining the BS according to the fS.
When fS is equal to 6, if Abs (p)0-p1) Beta/4 or less and Abs (q)0-q1) Beta/4 or less and Abs (p)0-q0) If less than α, BS equals 4; otherwise BS equals 3.
When fS is equal to 6 and DeblockingFilterType is equal to 1, BS is equal to 4 if Abs (p0-p1) is less than or equal to β/4 and Abs (q0-q1) is less than or equal to β/4 and Abs (p0-p3) is less than or equal to β/2 and Abs (q0-q3) is less than or equal to β/2 and Abs (p0-q0) is less than α; otherwise BS equals 3.
When fS is equal to 5, if p0Is equal to p1And q is0Is equal to q1Then BS equals 3; otherwise BS equals 2.
When fS is equal to 5 and dellockingfiltertype is equal to 1, BS is equal to 3 if p0 is equal to p1 and q0 is equal to q1 and Abs (p2-q2) is less than α; otherwise BS equals 2.
When fS is equal to 4, BS is equal to 2 if fL is equal to 2; otherwise BS equals 1.
When fS is equal to 3, if Abs (p)1–q1) Less than β, then BS equals 1; otherwise BS equals 0.
BS equals 0 when fS is other values.
3) If the BS obtained in step 2) is not equal to 0 and the filtered boundary is a chroma coding block boundary, the BS is subtracted by 1.
In summary, it can be seen that the boundary strength of the current pixel (i.e., the boundary strength of the vertical boundary or the boundary strength of the horizontal boundary of the current pixel) can be determined by using the first boundary filtering strength determining method, and the boundary strength of the current pixel (i.e., the boundary strength of the vertical boundary or the boundary strength of the horizontal boundary of the current pixel) can also be determined by using the second boundary filtering strength determining method, where the boundary strength can be equal to 0, and the boundary strength can also be greater than 0.
The pixel level enabling condition that the current pixel point meets the enhanced deblocking filtering adjustment mode of the vertical DBR mode comprises the following steps: the boundary strength of the vertical boundary of the current pixel point is equal to 0, and the boundary strength of the vertical boundary of the current pixel point is equal to 0, which may include the following cases:
if the boundary strength of the vertical boundary of the current pixel point is determined to be equal to 0 by adopting a boundary filtering strength determination mode I, the current pixel point meets the pixel level starting condition of an enhanced deblocking filtering regulation mode of a vertical DBR mode; and if the boundary strength of the vertical boundary of the current pixel point is determined to be equal to 0 by adopting a second boundary filtering strength determination mode, the current pixel point does not meet the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode. Or, if the boundary strength of the vertical boundary of the current pixel point is determined to be equal to 0 by adopting a boundary filtering strength determination mode I, the current pixel point does not meet the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode; and if the boundary strength of the vertical boundary of the current pixel point is determined to be equal to 0 by adopting a second boundary filtering strength determination mode, the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode. Or, if the boundary strength of the vertical boundary of the current pixel point is determined to be equal to 0 by adopting a boundary filtering strength determination mode I, the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode; and if the boundary strength of the vertical boundary of the current pixel point is determined to be equal to 0 by adopting a second boundary filtering strength determination mode, the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode.
Similarly, the pixel level enabling condition that the current pixel point meets the enhanced deblocking filtering adjustment mode of the horizontal DBR mode includes: the boundary strength of the horizontal boundary of the current pixel point is equal to 0, and the boundary strength of the horizontal boundary of the current pixel point is equal to 0, including the following conditions:
if the boundary strength of the horizontal boundary of the current pixel point is determined to be equal to 0 by adopting a boundary filtering strength determination mode I, the current pixel point meets the pixel level starting condition of an enhanced deblocking filtering regulation mode of a horizontal DBR mode; and if the boundary strength of the horizontal boundary of the current pixel point is determined to be equal to 0 by adopting a second boundary filtering strength determination mode, the current pixel point does not meet the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode. Or, if the boundary strength of the horizontal boundary of the current pixel point is determined to be equal to 0 by adopting a boundary filtering strength determination mode I, the current pixel point does not meet the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode; and if the boundary strength of the horizontal boundary of the current pixel point is determined to be equal to 0 by adopting a second boundary filtering strength determination mode, the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode. Or, if the boundary strength of the horizontal boundary of the current pixel point is determined to be equal to 0 by adopting a boundary filtering strength determination mode I, the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode; and if the boundary strength of the horizontal boundary of the current pixel point is determined to be equal to 0 by adopting a second boundary filtering strength determination mode, the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode.
In the above embodiment, the first process of determining the boundary strength of the current pixel by using the boundary filtering strength determining method is to determine the boundary strength of the current pixel based on the transformation information, intra-frame prediction information, and inter-frame prediction information of the surrounding blocks (e.g., 4 × 4 blocks). And determining the boundary strength of the current pixel point by adopting a second boundary filtering strength determination mode, wherein the boundary strength of the current pixel point is determined based on the peripheral pixel values of the line or the column where the current pixel point is located.
Example 10: boundary filtering process when BS equals 4 for the luminance component. For example, if the value of BS is 4, p is defined0、p1、p2And q is0、q1、q2The filtering is calculated as follows (P)0、P1、P2And Q0、Q1、Q2Is a filtered value):
P0=(p2*3+p1*8+p0*10+q0*8+q1*3+16)>>5;
P1=(p2*4+p1*5+p0*4+q0*3+8)>>4;
P2=(p3*2+p2*2+p1*2+p0*1+q0*1+4)>>3;
Q0=(p1*3+p0*8+q0*10+q1*8+q2×3+16)>>5;
Q1=(p0*3+q0*4+q1*5+q2*4+8)>>4;
Q2=(p0*1+q0*1+q1*2+q2*2+q3*2+4)>>3。
illustratively, the boundary filtering process is DBF filtering, and may be vertical DBF filtering or horizontal DBF filtering. For vertical DBF filtering, p0、p1、p2And q is0、q1、q2Is the pixel value, P, before vertical DBF filtering0、P1、P2And Q0、Q1、Q2Is the vertical DBF filtered pixel value. For horizontal DBF filtering, p0、p1、p2And q is0、q1、q2Is the pixel value, P, before horizontal DBF filtering0、P1、P2And Q0、Q1、Q2Is the horizontal DBF filtered pixel value.
Illustratively, if the value of PictureDbrEnableFlag is 1, i.e., DBR filtering needs to be enabled (e.g., vertical DBR filtering and/or horizontal DBR filtering is enabled), then on the basis of embodiment 10, DBR filtering may also be performed using embodiment 16. When vertical DBR filtering is performed, the pixel value before vertical DBR filtering is the pixel value after vertical DBF filtering. When horizontal straight DBR filtering is performed, the pixel value before horizontal DBR filtering is the pixel value after horizontal DBF filtering.
Example 11: boundary filtering process when BS equals 3 for the luminance component. For example, if the value of BS is 3, p is defined0、p1And q is0、q1The filtering is calculated as follows (P)0、P1And Q0、Q1Is a filtered value):
P0=(p2+(p1<<2)+(p0<<2)+(p0<<1)+(q0<<2)+q1+8)>>4;
P1=((p2<<1)+p2+(p1<<3)+(p0<<2)+q0+8)>>4;
Q0=(p1+(p0<<2)+(q0<<2)+(q0<<1)+(q1<<2)+q2+8)>>4;
Q1=((q2<<1)+q2+(q1<<3)+(q0<<2)+p0+8)>>4。
illustratively, the boundary filtering process is DBF filtering, and may be vertical DBF filtering or horizontal DBF filtering. For vertical DBF filtering, p0、p1And q is0、q1Is the pixel value, P, before vertical DBF filtering0、P1And Q0、Q1Is the vertical DBF filtered pixel value. For horizontal DBF filtering, p0、p1And q is0、q1Is the pixel value, P, before horizontal DBF filtering0、P1And Q0、Q1Is a horizontal DBF filtered pixelThe value is obtained.
Illustratively, if the value of PictureDbrEnableFlag is 1, i.e., DBR filtering needs to be enabled (e.g., vertical DBR filtering and/or horizontal DBR filtering is enabled), then on the basis of embodiment 11, DBR filtering may also be performed using embodiment 16. When vertical DBR filtering is performed, the pixel value before vertical DBR filtering is the pixel value after vertical DBF filtering. When horizontal straight DBR filtering is performed, the pixel value before horizontal DBR filtering is the pixel value after horizontal DBF filtering.
Example 12: boundary filtering process when BS equals 2 for the luminance component. For example, if the value of BS is 2, p is defined0And q is0The filtering is calculated as follows (P)0And Q0Is a filtered value):
P0=((p1<<1)+p1+(p0<<3)+(p0<<1)+(q0<<1)+q0+8)>>4;
Q0=((p0<<1)+p0+(q0<<3)+(q0<<1)+(q1<<1)+q1+8)>>4。
the above-mentioned boundary filtering process is DBF filtering, and may be vertical DBF filtering or horizontal DBF filtering. For vertical DBF filtering, p0And q is0Is the pixel value, P, before vertical DBF filtering0And Q0Is the vertical DBF filtered pixel value. For horizontal DBF filtering, p0And q is0Is the pixel value, P, before horizontal DBF filtering0And Q0Is the horizontal DBF filtered pixel value.
Illustratively, if the value of PictureDbrEnableFlag is 1, i.e., DBR filtering needs to be enabled (e.g., vertical DBR filtering and/or horizontal DBR filtering is enabled), then on the basis of embodiment 12, DBR filtering may also be performed using embodiment 16. When vertical DBR filtering is performed, the pixel value before vertical DBR filtering is the pixel value after vertical DBF filtering. When horizontal straight DBR filtering is performed, the pixel value before horizontal DBR filtering is the pixel value after horizontal DBF filtering.
Example 13: for luminance components, when BS equals 1And (5) a boundary filtering process. For example, if the value of BS is 1, p is selected0And q is0The filtering is calculated as follows (P)0And Q0Is a filtered value):
P0=((p0<<1)+p0+q0+2)>>2;
Q0=((q0<<1)+q0+p0+2)>>2。
the above-mentioned boundary filtering process is DBF filtering, and may be vertical DBF filtering or horizontal DBF filtering. For vertical DBF filtering, p0And q is0Is the pixel value, P, before vertical DBF filtering0And Q0Is the vertical DBF filtered pixel value. For horizontal DBF filtering, p0And q is0Is the pixel value, P, before horizontal DBF filtering0And Q0Is the horizontal DBF filtered pixel value.
Illustratively, if the value of PictureDbrEnableFlag is 1, i.e., DBR filtering needs to be enabled (e.g., vertical DBR filtering and/or horizontal DBR filtering is enabled), then on the basis of embodiment 13, DBR filtering may also be performed using embodiment 16. When vertical DBR filtering is performed, the pixel value before vertical DBR filtering is the pixel value after vertical DBF filtering. When horizontal straight DBR filtering is performed, the pixel value before horizontal DBR filtering is the pixel value after horizontal DBF filtering.
Example 14: a boundary filtering process when BS is equal to 0 for the luminance component, which is a filtering process for the enhanced deblocking filtering adjustment mode of the DBR filtering. For example, when the value of BS is 0 and the value of picteralldbrenableflag is 1 (indicating that the enhanced deblocking filtering adjustment mode of DBR filtering, such as the enhanced deblocking filtering adjustment mode of vertical DBR filtering or the enhanced deblocking filtering adjustment mode of horizontal DBR filtering, is allowed to be enabled), p is filtered0And q is0The filter adjustment is calculated as follows (P)0And Q0Is the filter adjusted value):
Figure BDA0003440600580000351
illustratively, the boundary filtering process is DBR filtering in the enhanced deblocking filtering adjustment mode, and may be vertical DBR filtering in the enhanced deblocking filtering adjustment mode, or horizontal DBR filtering in the enhanced deblocking filtering adjustment mode. Vertical DBR filtering, DP for enhanced deblock filtering adaptation mode0And DQ0Is the gradient value, p, of a pixel0And q is0Is the pixel value, P, before vertical DBR filtering in the enhanced deblocking Filter adjustment mode0And Q0Is the vertical DBR filtered pixel value for the enhanced deblock filtering adjustment mode. DbrThreshold, DbrAltOffset0, DbrAltOffset1 are relevant parameters for vertical DBR filtering for enhanced deblock filtering adjustment mode, see embodiment 8. Horizontal DBR filtering, DP, for enhanced deblock filtering adaptation mode0And DQ0Can represent gradient value, p, of pixel point0And q is0Pixel value, P, before horizontal DBR filtering, which may be an enhanced deblocking filtering adjustment mode0And Q0May be the horizontal DBR filtered pixel values of the enhanced deblocking filtering adjustment mode. DbrThreshold, DbrAltOffset0, DbrAltOffset1 are relevant parameters for horizontal DBR filtering for enhanced deblock filtering adjustment mode, see embodiment 8. In the above formula, Clip1(x) indicates that x is restricted to [0,2^ (bit _ depth) -1]And (including 0 and 2^ (bit _ depth) -1), bit _ depth represents the bit depth of the image, e.g., bit _ depth can be 8, 10, 12, etc.
Example 15: boundary filtering process when BS is greater than 0 for chroma components.
For example, if the value of BS is greater than 0, p is selected0And q is0The filtering is calculated as follows (P)0And Q0Is a filtered value):
P0=((p1<<1)+p1+(p0<<3)+(p0<<1)+(q0<<1)+q0+8)>>4;
Q0=((p0<<1)+p0+(q0<<3)+(q0<<1)+(q1<<1)+q1+8)>>4。
as another example, when the value of BS is equal to 3,to p1And q is1The filtering is calculated as follows (P)1And Q1Is a filtered value):
P1=((p2<<1)+p2+(p1<<3)+(p0<<1)+p0+(q0<<1)+8)>>4;
Q1=((q2<<1)+q2+(q1<<3)+(q0<<1)+q0+(p0<<1)+8)>>4。
illustratively, the boundary filtering process is DBF filtering, and may be vertical DBF filtering or horizontal DBF filtering. For vertical DBF filtering, p0、p1And q is0、q1Is the pixel value, P, before vertical DBF filtering0、P1And Q0、Q1Is the vertical DBF filtered pixel value. For horizontal DBF filtering, p0、p1And q is0、q1Is the pixel value, P, before horizontal DBF filtering0、P1And Q0、Q1Is the horizontal DBF filtered pixel value.
Example 16: a boundary filtering process when BS is greater than 0 for the luminance component, which is a filtering process for a deblocking filtering adjustment mode of DBR filtering. For example, the value of BS is greater than 0 and the value of PictureDbrEnableFlag is 1 (indicating that the deblocking filtering adjustment mode of DBR filtering is allowed to be enabled, such as the deblocking filtering adjustment mode of vertical DBR filtering or the deblocking filtering adjustment mode of horizontal DBR filtering), for PiAnd QiThe calculation procedure for the adjustment is as follows (P)i' and Qi' is a filtered value):
Figure BDA0003440600580000361
illustratively, the boundary filtering process is a DBR filtering in a deblocking filtering adjustment mode, and may be a vertical DBR filtering in the deblocking filtering adjustment mode, or may be a horizontal DBR filtering in the deblocking filtering adjustment mode. Adjusting modes for deblocking filteringVertical DBR filtering of formula (I)iAnd QiPixel value, p, before vertical DBR filtering, which may be a deblocking filter adjustment modeiAnd q isiMay be the pixel value, P, before vertical DBF filteringi' and Qi' may be a vertical DBR-filtered pixel value of the deblocking filtering adjustment mode, and i may take a value of 0, 1, or 2, etc. DbrThreshold, dbrofset 0, dbrofset 1 are relevant parameters for vertical DBR filtering of the deblocking filtering adjustment mode, see embodiment 8. And, horizontal DBR filtering for deblocking filter adjustment mode, PiAnd QiPixel value, p, before horizontal DBR filtering, which may be a deblocking filter adjustment modeiAnd q isiMay be the pixel value, P, before horizontal DBF filteringi' and Qi' may be a horizontal DBR-filtered pixel value of the deblocking filtering adjustment mode, and i may take a value of 0, 1, or 2, etc. DbrThreshold, dbrofset 0, dbrofset 1 are relevant parameters for horizontal DBR filtering of the deblocking filtering adjustment mode, see embodiment 8. In the above formula, Clip1(x) indicates that x is limited to [0,2^ (bit _ depth) -1]And (b) between 0 and 2^ (bit _ depth) -1, where bit _ depth is the bit depth of the image, e.g., bit _ depth is 8, 10, 12, etc.
Example 17: and (4) sample offset compensation filtering. The sample offset compensation filtering includes base sample offset compensation (SAO above), enhanced sample offset compensation (ESAO above), and cross-component sample offset compensation (CCSAO above, done for chroma only).
Basic process of SAO: if the current component of the current block starts SAO, a basic sample value offset compensation unit is led out, basic sample value offset compensation information corresponding to the current basic sample value offset compensation unit is led out, and finally each component of each sample in the current basic sample value offset compensation unit is operated to obtain a sample value after offset. Otherwise, directly taking the value of the corresponding component of the filtered sample as the value of the sample component after the offset. Illustratively, the above-mentioned component may be a luminance component or a chrominance component.
Basic procedures of ESAO (ESAO and SAO are mutually exclusive, i.e. SAO enabled does not enable ESAO): if the current component of the current block starts ESAO, an enhanced sample value offset compensation unit is led out, and each component of each sample in the enhanced sample value offset compensation unit is operated to obtain a sample value after offset. Otherwise, directly taking the value of the corresponding component of the filtered sample as the value of the sample component after the offset. Illustratively, the above-mentioned component may be a luminance component or a chrominance component.
The basic process of CCSAO: if the CCSAO is started for the current component of the current block, a cross-component sample value offset compensation unit is led out, and then each component sample in the current cross-component sample value offset compensation unit is operated to obtain a cross-component offset sample value. Otherwise, directly taking the value of the corresponding component of the sample after the offset as the value of the component of the sample after the component offset. For example, for a chroma pixel requiring CCSAO, the classification of the current chroma pixel is determined based on the luminance value after deblocking filtering (adjustment) of the corresponding position and the current chroma pixel value (chroma pixel value after ESAO). And determining a compensation value of the current chroma pixel based on the classification, and adding the compensation value to the current chroma pixel value to obtain a chroma pixel value after CCSAO filtering.
Example 18: and (4) self-adaptive correction filtering. The adaptive correction filtering (ALF above) may or may not enable enhanced adaptive correction filtering (eal), which may or may not enable enhanced adaptive correction filtering (ALF above).
The basic process of ALF is as follows: if the ALF is not enabled in the current component (such as a brightness component or a chrominance component) of the current image, directly taking the value of the sample component after the offset as the value of the corresponding reconstruction sample component; otherwise, the corresponding sample component after the offset is subjected to self-adaptive correction filtering. The unit of the adaptive correction filtering is an adaptive correction filtering unit derived from a maximum coding unit, and the adaptive correction filtering unit is sequentially processed according to a raster scanning order. Firstly, decoding the adaptive correction filter coefficient of each component, then deriving an adaptive correction filter unit, determining the adaptive correction filter coefficient index of the brightness component of the current adaptive correction filter unit, and finally carrying out adaptive correction filtering on the brightness and chrominance components of the adaptive correction filter unit to obtain a reconstructed sample.
For example, if the current image enables the eal f, there are 15 filter coefficients in each set of the ALF of the current image, and the shape of the filter coefficients can be as shown in fig. 6A, where the maximum value of the number of adaptive correction filters for the luminance component of the current image is 64 for the adaptive correction filter coefficients (7 × 7 crosses plus 5 × 5 squares). Otherwise, there are 9 filter coefficients for each group of the ALF of the current image, and the shape of the filter coefficient group may be as shown in fig. 6B, where the maximum value of the number of the adaptive correction filters for the luminance component of the current image is 16 for the adaptive correction filter coefficients (7 × 7 crosses plus 3 × 3 squares).
For example, the above embodiments 1 to 18 may be implemented individually or in any combination, such as at least one of embodiment 1 and embodiments 3 to 18 may be combined, at least one of embodiment 2 and embodiments 3 to 18 may be combined, and at least two of embodiment 3 to embodiment 18 may be combined. Of course, the above is only an example of a few combinations, and any at least two embodiments between embodiments 1 to 18 may be combined to implement the relevant process, which is not limited herein.
For example, in each of the above embodiments, the content of the encoding end may also be applied to the decoding end, that is, the decoding end may perform processing in the same manner, and the content of the decoding end may also be applied to the encoding end, that is, the encoding end may perform processing in the same manner.
Example 19: based on the same application concept as the method, the embodiment of the present application further provides a decoding apparatus, where the decoding apparatus is applied to a decoding end, and the decoding apparatus includes: a memory configured to store video data; a decoder configured to implement the encoding and decoding methods in the above embodiments 1 to 18, i.e., the processing flow of the decoding end.
For example, in one possible implementation, a decoder configured to implement:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
Based on the same application concept as the method, the embodiment of the present application further provides an encoding apparatus, where the encoding apparatus is applied to an encoding end, and the encoding apparatus includes: a memory configured to store video data; an encoder configured to implement the encoding and decoding methods in embodiments 1 to 18, i.e., the processing flow at the encoding end.
For example, in one possible implementation, an encoder configured to implement:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
Based on the same application concept as the method described above, the decoding-end device (which may also be referred to as a video decoder) provided in the embodiments of the present application may include, from a hardware level,: a processor and a machine-readable storage medium, wherein: the machine-readable storage medium stores machine-executable instructions executable by the processor; the processor is configured to execute machine executable instructions to implement the encoding and decoding methods disclosed in embodiments 1-19 of the present application.
For example, the processor is configured to execute machine-executable instructions to perform the following steps:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
Based on the same application concept as the method described above, the encoding end device (which may also be referred to as a video encoder) provided by the embodiment of the present application may include, from a hardware level,: a processor and a machine-readable storage medium, wherein: the machine-readable storage medium stores machine-executable instructions executable by the processor; the processor is configured to execute machine executable instructions to implement the encoding and decoding methods disclosed in embodiments 1-19 of the present application.
For example, the processor is configured to execute machine-executable instructions to perform the following steps:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
Based on the same application concept as the method, embodiments of the present application further provide a machine-readable storage medium, where a plurality of computer instructions are stored on the machine-readable storage medium, and when the computer instructions are executed by a processor, the encoding and decoding methods disclosed in the above examples of the present application, such as the encoding and decoding methods in the above embodiments, can be implemented. The machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Based on the same application concept as the method, the embodiment of the present application further provides a computer application program, and when the computer application program is executed by a processor, the computer application program can implement the encoding and decoding method disclosed in the above example of the present application.
Based on the same application concept as the method, the embodiment of the present application further provides a coding and decoding apparatus, which can be applied to a coding end or a decoding end, and the coding end apparatus is used for implementing the coding and decoding methods disclosed in the embodiments 1 to 19 of the present application.
In one possible implementation, the encoding and decoding apparatus may include:
the first acquisition module is used for acquiring a first brightness reconstruction block corresponding to the current brightness block;
the first processing module is used for performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block if the DBF mode is started by the current brightness block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, determining a fifth luma reconstruction block based on the fourth luma reconstruction block;
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices. For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. The present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. A method of decoding, the method comprising:
acquiring a first brightness reconstruction block corresponding to a current brightness block;
if the current brightness block starts a DBF mode, performing vertical DBF filtering on the first brightness reconstruction block to obtain a second brightness reconstruction block; otherwise, determining a second luma reconstruction block based on the first luma reconstruction block; the first luminance reconstruction block comprises first luminance reconstruction pixel values of a plurality of pixel points, and the second luminance reconstruction block comprises second luminance reconstruction pixel values of the plurality of pixel points; the performing vertical DBF filtering on the first luminance reconstruction block to obtain a second luminance reconstruction block includes: for each current pixel point in the first brightness reconstruction block, if the current pixel point meets the pixel level enabling condition of vertical boundary filtering in a DBF mode, determining a second brightness reconstruction pixel value of the current pixel point based on a first brightness reconstruction pixel value of the current pixel point and first brightness reconstruction pixel values of surrounding pixel points of the current pixel point; wherein, the surrounding pixels of the current pixel are the pixels around the vertical boundary of the current pixel; if the current pixel point does not meet the pixel level starting condition of the vertical boundary filtering of the DBF mode, determining a second brightness reconstruction pixel value of the current pixel point based on a first brightness reconstruction pixel value of the current pixel point; determining the second luminance reconstruction block based on a second luminance reconstruction pixel value of each current pixel point;
if the current brightness block starts a vertical DBR mode, performing vertical DBR filtering on the second brightness reconstruction block to obtain a third brightness reconstruction block; otherwise, determining a third luma reconstruction block based on the second luma reconstruction block;
if the current brightness block starts a DBF mode, carrying out horizontal DBF filtering on the third brightness reconstruction block to obtain a fourth brightness reconstruction block; otherwise, determining a fourth luma reconstruction block based on the third luma reconstruction block;
if the current brightness block starts a horizontal DBR mode, performing horizontal DBR filtering on the fourth brightness reconstruction block to obtain a fifth brightness reconstruction block; otherwise, a fifth luma reconstruction block is determined based on the fourth luma reconstruction block.
2. The method of claim 1, further comprising:
if the current brightness block starts an ESAO mode, carrying out ESAO filtering on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, if the current brightness block starts an SAO mode, SAO filtering is carried out on the fifth brightness reconstruction block to obtain a sixth brightness reconstruction block; otherwise, determining a sixth luminance reconstruction block based on the fifth luminance reconstruction block;
if the current brightness block starts an ALF mode, performing ALF filtering on the sixth brightness reconstruction block to obtain a seventh brightness reconstruction block; otherwise, a seventh luma reconstruction block is determined based on the sixth luma reconstruction block.
3. The method of claim 1,
if the current pixel point meets the pixel level enabling condition of the vertical boundary filtering in the DBF mode, the method further comprises the following steps: determining a reference pixel point corresponding to the current pixel point from an adjacent brightness block of the vertical boundary of the current pixel point; determining a second brightness reconstruction pixel value of the reference pixel point based on the first brightness reconstruction pixel value of the reference pixel point and the first brightness reconstruction pixel values of surrounding pixel points of the reference pixel point; wherein, the surrounding pixels of the reference pixel are the pixels around the vertical boundary of the current pixel;
wherein, the pixel level enabling condition that the current pixel point meets the vertical boundary filtering of the DBF mode includes: the vertical boundary of the current luma block allows DBF filtering; and the boundary strength of the vertical boundary of the current pixel point is greater than 0.
4. The method of claim 1, wherein the second luma reconstruction block comprises second luma reconstruction pixel values for a plurality of pixel points, and wherein the third luma reconstruction block comprises third luma reconstruction pixel values for the plurality of pixel points;
performing vertical DBR filtering on the second luminance reconstruction block to obtain a third luminance reconstruction block, including:
for each current pixel point in the second brightness reconstruction block, if the current pixel point meets the pixel level enabling condition of a deblocking filtering adjustment mode of a vertical DBR mode, determining a third brightness reconstruction pixel value of the current pixel point based on a second brightness reconstruction pixel value of the current pixel point and a first brightness reconstruction pixel value of the current pixel point; if the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, determining a gradient value of the current pixel point based on a second brightness reconstruction pixel value of the current pixel point and second brightness reconstruction pixel values of surrounding pixel points of the current pixel point, and determining a third brightness reconstruction pixel value of the current pixel point based on the gradient value of the current pixel point and the second brightness reconstruction pixel values of the current pixel point, wherein the surrounding pixel points of the current pixel point are the pixel points surrounding the vertical boundary of the current pixel point; if the current pixel point does not meet the pixel level enabling condition of the vertical DBR mode, determining a third brightness reconstruction pixel value of the current pixel point based on a second brightness reconstruction pixel value of the current pixel point;
determining the third luma reconstruction block based on a third luma reconstruction pixel value of each current pixel point.
5. The method of claim 4,
determining a third luminance reconstruction pixel value of the current pixel point based on the second luminance reconstruction pixel value of the current pixel point and the first luminance reconstruction pixel value of the current pixel point, including: determining a third luminance reconstruction pixel value of the current pixel point based on a second luminance reconstruction pixel value of the current pixel point, a first luminance reconstruction pixel value of the current pixel point, a vertical adjustment threshold of a deblocking filtering adjustment mode, a first vertical adjustment offset value of the deblocking filtering adjustment mode and a second vertical adjustment offset value of the deblocking filtering adjustment mode;
if the current pixel point meets the pixel level enabling condition of the deblocking filtering adjustment mode of the vertical DBR mode, the method further comprises the following steps: determining a reference pixel point corresponding to the current pixel point from an adjacent brightness block of the vertical boundary of the current pixel point; determining a third luma reconstructed pixel value of the reference pixel point based on the second luma reconstructed pixel value of the reference pixel point, the first luma reconstructed pixel value of the reference pixel point, a vertical adjustment threshold of a deblock filtering adjustment mode, the first vertical adjustment offset of the deblock filtering adjustment mode, and the second vertical adjustment offset of the deblock filtering adjustment mode;
wherein the determining the gradient value of the current pixel point based on the second luminance reconstruction pixel value of the current pixel point and the second luminance reconstruction pixel values of surrounding pixel points of the current pixel point includes: determining the gradient value of the current pixel point based on the following formula: DPi=(qi–pi+2)>>2; wherein DPiRepresenting the gradient value, q, of said current pixel pointiA second luminance reconstructed pixel value, p, representing surrounding pixels of said current pixeliA second luma reconstructed pixel value representing the current pixel point,>>represents a right shift;
wherein the determining a third luminance reconstruction pixel value of the current pixel based on the gradient value of the current pixel and the second luminance reconstruction pixel value of the current pixel comprises: determining a third brightness reconstruction pixel value of the current pixel point based on the gradient value of the current pixel point, the second brightness reconstruction pixel value of the current pixel point, the vertical adjustment threshold value of an enhanced deblocking filtering adjustment mode, the first enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode and the second enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode;
if the current pixel point meets the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, the method further comprises the following steps: determining a reference pixel point corresponding to the current pixel point from an adjacent brightness block of the vertical boundary of the current pixel point; determining a gradient value of the reference pixel point based on a second brightness reconstruction pixel value of the reference pixel point and second brightness reconstruction pixel values of surrounding pixel points of the reference pixel point; wherein, the surrounding pixels of the reference pixel are the pixels around the vertical boundary of the current pixel; determining a third brightness reconstruction pixel value of the reference pixel point based on the gradient value of the reference pixel point and the second brightness reconstruction pixel value of the reference pixel point;
wherein the determining a third luma reconstruction pixel value of the reference pixel based on the gradient value of the reference pixel and the second luma reconstruction pixel value of the reference pixel comprises: and determining a third brightness reconstruction pixel value of the reference pixel point based on the gradient value of the reference pixel point, the second brightness reconstruction pixel value of the reference pixel point, the vertical adjustment threshold value of the enhanced deblocking filtering adjustment mode, the first enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode and the second enhanced vertical adjustment offset value of the enhanced deblocking filtering adjustment mode.
6. The method according to claim 4 or 5,
the pixel level enabling condition that the current pixel point meets the deblocking filtering adjustment mode of the vertical DBR mode comprises the following steps: the vertical boundary of the current luma block allows vertical DBR filtering; the boundary strength of the vertical boundary of the current pixel point is greater than 0;
the current pixel point meets the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the vertical DBR mode, and the pixel level enabling condition comprises the following steps: the vertical boundary of the current luma block allows vertical DBR filtering; and the boundary strength of the vertical boundary of the current pixel point is equal to 0.
7. The method of claim 1, wherein the third luma reconstruction block comprises third luma reconstruction pixel values for a plurality of pixel points, and wherein the fourth luma reconstruction block comprises fourth luma reconstruction pixel values for the plurality of pixel points;
performing horizontal DBF filtering on the third luminance reconstruction block to obtain a fourth luminance reconstruction block, including:
for each current pixel point in the third brightness reconstruction block, if the current pixel point meets the pixel level enabling condition of horizontal boundary filtering in a DBF mode, determining a fourth brightness reconstruction pixel value of the current pixel point based on a third brightness reconstruction pixel value of the current pixel point and third brightness reconstruction pixel values of surrounding pixel points of the current pixel point; wherein, the surrounding pixels of the current pixel are the pixels around the horizontal boundary of the current pixel; if the current pixel point does not meet the pixel level starting condition of the horizontal boundary filtering of the DBF mode, determining a fourth brightness reconstruction pixel value of the current pixel point based on a third brightness reconstruction pixel value of the current pixel point;
determining the fourth luminance reconstruction block based on a fourth luminance reconstruction pixel value of each current pixel point;
wherein, the pixel level enabling condition that the current pixel point meets the horizontal boundary filtering of the DBF mode includes: the horizontal boundary of the current luminance block allows DBF filtering; and the boundary strength of the horizontal boundary of the current pixel point is greater than 0.
8. The method of claim 1, wherein the fourth luma reconstruction block comprises fourth luma reconstruction pixel values for a plurality of pixel points, and wherein the fifth luma reconstruction block comprises fifth luma reconstruction pixel values for the plurality of pixel points;
performing horizontal DBR filtering on the fourth luminance reconstruction block to obtain a fifth luminance reconstruction block, including:
for each current pixel point in the fourth luminance reconstruction block, if the current pixel point meets a pixel level enabling condition of a deblocking filtering adjustment mode of a horizontal DBR mode, determining a fifth luminance reconstruction pixel value of the current pixel point based on a fourth luminance reconstruction pixel value of the current pixel point and a third luminance reconstruction pixel value of the current pixel point; if the current pixel point meets the pixel level starting condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, determining the gradient value of the current pixel point based on the fourth brightness reconstruction pixel value of the current pixel point and the fourth brightness reconstruction pixel values of surrounding pixel points of the current pixel point, and determining the fifth brightness reconstruction pixel value of the current pixel point based on the gradient value of the current pixel point and the fourth brightness reconstruction pixel values of the current pixel point, wherein the surrounding pixel points of the current pixel point are the pixel points surrounding the horizontal boundary of the current pixel point; if the current pixel point does not meet the pixel level enabling condition of the horizontal DBR mode, determining a fifth brightness reconstruction pixel value of the current pixel point based on a fourth brightness reconstruction pixel value of the current pixel point;
determining the fifth luma reconstruction block based on a fifth luma reconstruction pixel value of each current pixel point.
9. The method of claim 8,
determining a fifth luminance reconstruction pixel value of the current pixel point based on the fourth luminance reconstruction pixel value of the current pixel point and the third luminance reconstruction pixel value of the current pixel point, including: determining a fifth luminance reconstruction pixel value of the current pixel point based on a fourth luminance reconstruction pixel value of the current pixel point, a third luminance reconstruction pixel value of the current pixel point, a horizontal adjustment threshold of a deblocking filtering adjustment mode, a first horizontal adjustment offset value of the deblocking filtering adjustment mode, and a second horizontal adjustment offset value of the deblocking filtering adjustment mode;
wherein the determining a fifth luminance reconstruction pixel value of the current pixel based on the gradient value of the current pixel and the fourth luminance reconstruction pixel value of the current pixel comprises: determining a fifth brightness reconstruction pixel value of the current pixel point based on the gradient value of the current pixel point, the fourth brightness reconstruction pixel value of the current pixel point, the horizontal adjustment threshold value of an enhanced deblocking filtering adjustment mode, the first enhanced horizontal adjustment offset value of the enhanced deblocking filtering adjustment mode and the second enhanced horizontal adjustment offset value of the enhanced deblocking filtering adjustment mode;
wherein, the pixel level enabling condition that the current pixel point meets the deblocking filtering adjustment mode of the horizontal DBR mode includes: the horizontal boundary of the current luma block allows horizontal DBR filtering; the boundary strength of the horizontal boundary of the current pixel point is greater than 0;
wherein, the current pixel point satisfies the pixel level enabling condition of the enhanced deblocking filtering adjustment mode of the horizontal DBR mode, and the pixel level enabling condition comprises: the horizontal boundary of the current luma block allows horizontal DBR filtering; and the boundary strength of the horizontal boundary of the current pixel point is equal to 0.
10. A decoding apparatus, characterized in that the decoding apparatus comprises:
a memory configured to store video data;
a decoder configured to implement the method of any of claims 1-9.
11. A decoding-side apparatus, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine-executable instructions to implement the method of any of claims 1-9.
12. A machine-readable storage medium comprising, in combination,
the machine-readable storage medium stores machine-executable instructions executable by a processor; wherein the processor is configured to execute the machine executable instructions to implement the method of any of claims 1-9.
CN202111628844.7A 2021-06-30 2021-06-30 Decoding method, device, equipment and machine readable storage medium Active CN114125445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111628844.7A CN114125445B (en) 2021-06-30 2021-06-30 Decoding method, device, equipment and machine readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110739453.6A CN114640847B (en) 2021-06-30 2021-06-30 Encoding and decoding method, device and equipment thereof
CN202111628844.7A CN114125445B (en) 2021-06-30 2021-06-30 Decoding method, device, equipment and machine readable storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202110739453.6A Division CN114640847B (en) 2021-06-30 2021-06-30 Encoding and decoding method, device and equipment thereof

Publications (2)

Publication Number Publication Date
CN114125445A true CN114125445A (en) 2022-03-01
CN114125445B CN114125445B (en) 2023-03-24

Family

ID=85800140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111628844.7A Active CN114125445B (en) 2021-06-30 2021-06-30 Decoding method, device, equipment and machine readable storage medium

Country Status (1)

Country Link
CN (1) CN114125445B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022179504A1 (en) * 2021-02-23 2022-09-01 杭州海康威视数字技术股份有限公司 Coding and decoding method and apparatus, and devices therefor
WO2023208219A1 (en) * 2022-04-29 2023-11-02 Mediatek Inc. Cross-component sample adaptive offset

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110200103A1 (en) * 2008-10-23 2011-08-18 Sk Telecom. Co., Ltd. Video encoding/decoding apparatus, de-blocking filter and filtering method based on intra-prediction directions for same, and recording media
CN104113765A (en) * 2014-07-28 2014-10-22 北京大学深圳研究生院 Video coding and decoding method and device
CN111711825A (en) * 2020-06-23 2020-09-25 腾讯科技(深圳)有限公司 Deblocking filtering method, apparatus, device and medium in video encoding and decoding
CN112514401A (en) * 2020-04-09 2021-03-16 北京大学 Method and device for loop filtering
CN114640847A (en) * 2021-06-30 2022-06-17 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110200103A1 (en) * 2008-10-23 2011-08-18 Sk Telecom. Co., Ltd. Video encoding/decoding apparatus, de-blocking filter and filtering method based on intra-prediction directions for same, and recording media
CN104113765A (en) * 2014-07-28 2014-10-22 北京大学深圳研究生院 Video coding and decoding method and device
CN112514401A (en) * 2020-04-09 2021-03-16 北京大学 Method and device for loop filtering
CN111711825A (en) * 2020-06-23 2020-09-25 腾讯科技(深圳)有限公司 Deblocking filtering method, apparatus, device and medium in video encoding and decoding
CN114640847A (en) * 2021-06-30 2022-06-17 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022179504A1 (en) * 2021-02-23 2022-09-01 杭州海康威视数字技术股份有限公司 Coding and decoding method and apparatus, and devices therefor
WO2023208219A1 (en) * 2022-04-29 2023-11-02 Mediatek Inc. Cross-component sample adaptive offset

Also Published As

Publication number Publication date
CN114125445B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN106131552B (en) Method and apparatus for encoding video using adaptive bias processing
CN110393011B (en) Method and apparatus for implicit intra codec tool setting with intra directional prediction mode in video coding
JP5763210B2 (en) Method and apparatus for improved loop-type filtering process
CN107197256B (en) Method and apparatus for encoding and decoding a sequence of images
TWI717309B (en) Image encoding device, image decoding device and recording medium
TWI558212B (en) Method of post-processing reconstructed image
CN114710669B (en) Video encoding/decoding method/apparatus and corresponding non-volatile computer readable medium
KR20180083389A (en) Video coding method and apparatus
CN114125445B (en) Decoding method, device, equipment and machine readable storage medium
CN114640847B (en) Encoding and decoding method, device and equipment thereof
TWI806447B (en) Encoding and decoding method, encoding and decoding apparatus, and devices thereof
TW202112132A (en) Video processing methods and apparatuses for determining deblocking filter decision in video coding systems
CN113132739B (en) Boundary strength determination method, boundary strength determination device, boundary strength encoding and decoding device and equipment
JP2020129828A (en) Method and apparatus for adaptive filtering of sample for video encoding
CN114143548B (en) Coding and decoding of transform coefficients in video coding and decoding
CN112135131B (en) Encoding and decoding method, device and equipment thereof
CN114189683B (en) Enhanced filtering method and device
RU2817405C1 (en) Method, equipment and devices for encoding and decoding
CN116389737B (en) Coding and decoding of transform coefficients in video coding and decoding
GB2516225A (en) Method, device, and computer program for block filtering in a video encoder and decoder
KR20130029694A (en) Method for generating chroma prediction block in intra mode

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40064082

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant