Encoding / decoding method, apparatus, and device

By adjusting pixel values based on gradient values in video encoding, the method addresses overfiltering in DBF, SAO, and ALF techniques, enhancing filtering effects and encoding performance.

JP2024149789AActive Publication Date: 2024-10-18HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2024135472
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-02-23
Filing Date
2024-08-14
Publication Date
2024-10-18
Estimated Expiration
2042-02-22

AI Technical Summary

Technical Problem

Existing video encoding techniques suffer from overfiltering issues in filter techniques like DBF, SAO, and ALF, leading to poor filtering effects and low encoding performance due to classification based on current pixel values or surrounding pixel relationships.

Method used

An encoding/decoding method that adjusts the pixel value of a current pixel point based on its gradient value and surrounding pixel values when certain conditions are met, improving filtering effects and encoding performance.

Benefits of technology

The method enhances filtering outcomes and improves encoding performance by adjusting pixel values according to gradient values, mitigating overfiltering and underfiltering issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024149789000001_ABST
    Figure 2024149789000001_ABST
Patent Text Reader

Abstract

To provide an encoding / decoding method, an apparatus, and a device.SOLUTION: A method includes the steps of: determining a gradient value of a current pixel point according to an original pixel value of the current pixel point and original pixel values of neighboring pixel points of the current pixel point when the current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode; and determining an adjustment pixel value of the current pixel point according to the gradient value of the current pixel point and the original pixel value of the current pixel point. The technical solution according to the present invention can improve the coding performance.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of encoding and decoding technology, and in particular to an encoding and decoding method, apparatus, and device thereof. [Background technology]

[0002] In order to achieve the purpose of saving space, every video image is coded before being transmitted, and the complete video coding method may include processes such as prediction, transformation, quantization, entropy coding, filtering, etc. Among them, predictive coding may include intraframe coding and interframe coding. Furthermore, interframe coding utilizes the correlation in the video time domain, and predicts the current pixel using the pixels of adjacent coded images to achieve the purpose of effectively removing the redundancy in the video time domain. Intraframe coding utilizes the correlation in the video space domain, and predicts the current pixel using the pixels of the coded block of the image of the current frame to achieve the purpose of effectively removing the redundancy in the video space domain.

[0003] Common filter techniques include DBF (DeBlocking Filter) technique, SAO (Sample Adaptive Offset) technique, and ALF (Adaptive Loop Filter) technique. DBF technique is used to remove block boundary effects caused by block coding. SAO technique classifies based on the pixel value of the sample and the gradient value of the surrounding blocks, and adds different compensation values ​​to the pixel values ​​of each category to make the reconstructed image closer to the original image. ALF technique filters the reconstructed image by Wiener filter to make the reconstructed image closer to the original image.

[0004] However, DBF, SAO, ALF and other filter technologies all perform classification based on the pixel value of the current pixel point, or classification based on the relationship between the pixel value of the current pixel point and the pixel values ​​of the surrounding pixel points, and then perform different filtering operations according to different categories. This may result in over-filtering, that is, the pixel value after filtering is much larger or smaller than the pixel value before filtering, and even much larger or smaller than the original pixel value, resulting in poor filtering effect and relatively poor coding performance. Summary of the Invention [Problem to be solved by the invention]

[0005] The present invention provides a coding / decoding method, an apparatus, and a device thereof that can improve coding performance. [Means for solving the problem]

[0006] The present invention provides an encoding / decoding method, the method comprising: The method includes a step of determining a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point when the current pixel point in the current block satisfies an enable condition of the emphasis adjustment mode, and a step of determining an adjusted pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0007] The present invention provides a decoding device, the decoding device comprising: a memory configured to store video data; and a decoder configured to, when a current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode, determine a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point, and determine an adjusted pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0008] The present invention provides an encoding device, the encoding device comprising: a memory configured to store video data; and an encoder configured to, when a current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode, determine a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point, and determine an adjusted pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0009] The present invention provides a decoding device including a processor and a machine-readable storage medium having machine-executable instructions stored thereon that are executable by the processor; The processor executes machine-executable instructions to The present invention provides a decoding device that is used to perform, when a current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode, a step of determining a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point, and a step of determining an adjustment pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0010] The present invention provides a coding device including a processor and a machine-readable storage medium having machine-executable instructions stored thereon that are executable by the processor; The processor executes machine-executable instructions to The present invention provides an encoding device that is used to perform, when a current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode, a step of determining a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of pixel points surrounding the current pixel point, and a step of determining an adjustment pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point. Effect of the Invention

[0011] It can be seen from the above technical solutions that in the embodiment of the present invention, when a current pixel point in a current block satisfies the enabling condition of the emphasis adjustment mode, an adjusted pixel value of the current pixel point can be determined according to the gradient value of the current pixel point and the original pixel value of the current pixel point, that is, the original pixel value of the current pixel point is adjusted according to the gradient value of the current pixel point, so that the adjusted pixel value of the current pixel point is closer to the original pixel, thereby improving the coding performance. For example, in the filtering process such as DBF, SAO and ALF, when a current pixel point in a current block satisfies the enabling condition of the emphasis adjustment mode, the original pixel value of the current pixel point can be adjusted according to the gradient value of the current pixel point, thereby improving the filtering effect and improving the coding performance. [Brief description of the drawings]

[0012] [Figure 1] FIG. 1 is a schematic diagram of an encoding / decoding framework in one embodiment of the present invention. [Figure 2A] FIG. 2 is a schematic diagram of block division in one embodiment of the present invention. [Figure 2B] FIG. 2 is a schematic diagram of block division in one embodiment of the present invention. [Diagram 3] FIG. 2 is a schematic diagram of deblocking filtering in one embodiment of the present invention. [Figure 4] 1 is a flowchart of an encoding / decoding method according to an embodiment of the present invention. [Figure 5A] FIG. 2 is a hardware configuration diagram of a decoding device according to an embodiment of the present invention. [Figure 5B] FIG. 2 is a hardware configuration diagram of an encoding device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] The terms used in the embodiments of the present invention are merely for the purpose of describing a particular embodiment and are not intended to limit the present invention. The singular forms "a kind of," "the," and "the," as used in the embodiments and claims of the present invention, are intended to include the plural forms, unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein means to include any or all possible combinations of one or more associated listed items. Furthermore, while the embodiments of the present invention may use terms such as first, second, and third to describe various pieces of information, it should be understood that such information is not limited to these terms. These terms are used only to distinguish between information of the same type. For example, the first information may be referred to as the second information, and similarly, the second information may be referred to as the first information, without departing from the scope of the embodiments of the present invention. Furthermore, depending on the context, the term "and" may be interpreted as "when," "when," or "in response to determining."

[0014] Hereinafter, technical terms will be briefly explained to help those skilled in the art better understand the technical solutions of the present invention.

[0015] Video coding framework: As shown in Fig. 1, the process flow of the encoding side of the embodiment of the present invention may be realized using a video coding framework, and the schematic diagram of the video decoding framework may be similar to Fig. 1, and the overlapping description will be omitted here. The process flow of the decoding side of the embodiment of the present invention may be realized using a video decoding framework. In the video coding framework and the video decoding framework, modules such as prediction (e.g., intraframe prediction and interframe prediction, etc.), motion estimation / motion compensation, reference image buffer, in-loop filter, reconstruction, transform, quantization, inverse transform, inverse quantization, entropy coder, etc. may be included, but are not limited to these. On the encoding side, the process flow of the encoding side is realized by the cooperation between these modules, and on the decoding side, the process flow of the decoding side is realized by the cooperation between these modules.

[0016] The loop filter is used to reduce problems such as image block effect or poor image effect, and can improve image quality, and can include three filters: DBF, SAO, and ALF, where DBF is deblocking filtering, which is used to remove block boundary effects caused by block coding. SAO is a sample adaptive offset filter, which classifies based on the pixel value of the sample and the gradient value of the surrounding blocks, and adds different compensation values ​​to the pixel values ​​of each category, so that the reconstructed image is closer to the original image. ALF is an adaptive loop filter, i.e., it filters the reconstructed image by a Wiener filter, so that the reconstructed image is closer to the original image.

[0017] As an example, in a video encoding / decoding process, the prediction process may include intraframe prediction and interframe prediction. Intraframe prediction considers that there exists high spatial correlation between adjacent blocks, and uses surrounding pixels that have already been reconstructed as reference pixels to predict a block that is not currently coded, and does not code the original value, but only needs to carry out subsequent coding processing on the residual value, thereby effectively eliminating redundancy in spatial domain and greatly improving compression efficiency. Interframe prediction utilizes the correlation in video time domain, and uses pixels of adjacent coded images to predict pixels of a current image, thereby achieving the purpose of eliminating redundancy in video time domain.

[0018] As an example, in the video encoding and decoding process, transformation refers to converting an image described in terms of pixels in the spatial domain into the transform domain and expressing it in the form of transform coefficients. Most images contain many flat and slowly changing regions, so a suitable transformation process can transform the image energy from a dispersed distribution in the spatial domain into a relatively concentrated distribution in the transform domain, thereby eliminating the frequency domain correlation between signals, and, in line with the quantization process, can effectively compress the bitstream.

[0019] As an example, entropy coding is a method of lossless coding according to the principle of information entropy, which is located in the last processing module of video compression, converting a series of element codes for displaying a video sequence into a binary bitstream for transmission or storage, where the input codes may include quantized transform coefficients, motion vector information, prediction mode information, transform quantization related syntax, etc., and the output data of the entropy coding module is the final bitstream after the original video is compressed. Entropy coding can effectively remove the statistical redundancy of these video element codes, and is one of the important tools to ensure the compression efficiency of video coding.

[0020] As an example, the loop filter is used to reduce problems such as image block effect or poor image effect and improve image quality, which may include but are not limited to DBF, SAO and ALF. For example, in video images, the boundaries of image blocks are not continuous, and the compressed reconstructed image has significant block effect, which seriously affects image quality, and deblocking filtering can be performed on the boundaries using DBF technology. Deblocking filtering is performed on the boundaries of all prediction units (PU) and transform units (TU), and the deblocking filtering includes filtering decision and filtering operation, and in the process of filtering decision, obtains boundary strength (e.g., no filtering, weak filtering or strong filtering) and filtering parameters. In the process of filtering operation, correct pixels according to the boundary strength and filtering parameters, for example, when filtering is performed on the boundaries, it may be strong filtering or weak filtering, and filtering is performed using taps of different lengths.

[0021] SAO filtering: Used to remove ringing. The ringing effect is a phenomenon in which ripples occur around edges after decoding due to quantization distortion of high-frequency AC coefficients. The larger the size of the transform block, the more pronounced the ringing effect becomes. The basic principle of SAO is to offset the peak pixels in the reconstruction curve by adding negative values, and offset the valley pixels by adding positive values. SAO uses CTU (Coding Tree Unit) as its basic unit, and can include two offset formats: Edge Offset (EO) and Band Offset (BO). Parameter fusion technology is also introduced.

[0022] ALF filtering: The optimal filter in the mean square sense, i.e., Wiener filter, can be calculated based on the original signal and the distorted signal. The ALF filter can include, but is not limited to, a 7*7 diamond filter or a 5*5 diamond filter, a 7*7 cross + 3*3 square central symmetric filter, or a 7*7 cross + 5*5 square central symmetric filter.

[0023] Intraframe prediction: Using the correlation in the video space domain, prediction is performed using the coded blocks of the current frame to achieve the purpose of removing the redundancy in the video space domain. Intraframe prediction defines a number of prediction modes, each of which corresponds to a texture direction (except for DC mode). For example, when the texture of an image is aligned horizontally, the horizontal prediction mode can predict the image information better.

[0024] Inter-frame prediction: based on the correlation in the video time domain, since video sequences contain high time-domain correlation, by predicting the pixels of the current image using the pixels of adjacent coded images, the purpose of effectively removing the redundancy in the video time domain can be achieved. All standard inter-frame prediction parts of video coding adopt block-based motion compensation technology, and the main principle is that for each pixel block of the current image, find one best matching block from the previously coded image, and this process is called motion estimation (ME).

[0025] Motion Vector (MV): In inter-frame prediction, a motion vector can be used to represent the relative displacement between a current block of an image of a current frame and a reference block of an image of a reference frame. Each divided block has a corresponding motion vector that is transmitted to the decoding side, and if the motion vector of each block is coded and transmitted independently, a lot of bits will be consumed, especially when there are a large number of small-sized blocks. In order to reduce the number of bits for coding the motion vector, the spatial correlation between adjacent blocks can be utilized, and the motion vector of the current block to be coded can be predicted based on the motion vector of the adjacent coded block, and then the prediction difference can be coded, thus effectively reducing the number of bits representing the motion vector. When coding the motion vector of the current block, the motion vector of the current block can be predicted first using the motion vector of the adjacent coded block, and then the difference between the predicted value of the motion vector (MVP, Motion Vector Prediction) and the true estimated value of the motion vector (MVD, Motion Vector Difference) can be coded.

[0026] Motion Information: Since a motion vector represents a position offset between a current block and a certain reference block, in order to accurately obtain information pointing to a block, index information of a reference frame image indicating which reference frame image the current block uses is required in addition to the motion vector. In a video coding technique, a picture list of one reference frame may generally be constructed for the picture of the current frame, and the index information of the picture of the reference frame indicates which reference frame image in the picture list of the reference frame the current block uses. In addition, since many coding techniques support multiple reference picture lists, one index value may be used to indicate which reference picture list is used, and the index value may be called a reference direction. In summary, in a video coding technique, information related to motion, such as a motion vector, a reference frame index, and a reference direction, may be collectively called motion information.

[0027] Flag coding: In video coding, there are many modes. For a certain block, one of the modes may be used. To indicate which mode is used, the corresponding flag bit for each block needs to be coded and marked. For example, the coding side decides the value of the flag bit according to the coding side's decision, and then codes the value of the flag bit and transmits it to the decoding side. The decoding side analyzes the value of the flag bit to decide whether to enable the corresponding mode or not.

[0028] In the process of encoding the flag bits, the encoding of the flag bits can be realized by a high-level syntax, and the high-level syntax can represent whether a certain mode is allowed to be enabled, that is, the high-level syntax allows the enabling of a certain mode, or prohibits the enabling of a certain mode.

[0029] As an example, the high level syntax may be a sequence parameter set level high level syntax, a picture parameter set level high level syntax, a slice header level high level syntax, or a picture header level high level syntax, without any limitation regarding this high level syntax.

[0030] In the high level syntax for a sequence parameter set (SPS), there is a flag bit that determines whether or not a certain mode (tool / method) is allowed to be enabled in the entire video sequence (i.e., multi-frame video images). For example, if the flag bit has value A (e.g., a numeric value of 1), the video sequence may allow the mode corresponding to that flag bit to be enabled, or if the flag bit has value B (e.g., a numeric value of 0), the video sequence may not allow the mode corresponding to that flag bit to be enabled.

[0031] In the high level syntax for a picture parameter set (PPS), there is a flag bit that determines whether a certain mode (tool / method) is allowed to be enabled in a certain picture (e.g., video image). If the flag bit has value A, the video image is allowed to have the mode corresponding to that flag bit enabled, and if the flag bit has value B, the video image is not allowed to have the mode corresponding to that flag bit enabled.

[0032] In the high level syntax for picture header, there are flag bits that determine whether a certain mode (tool / method) is allowed to be enabled in a picture header. If the flag bit has value A, the picture head is allowed to enable the mode corresponding to the flag bit, and if the flag bit has value B, the picture head is not allowed to enable the mode corresponding to the flag bit. As an example, the picture head stores common information for the current picture only, e.g., if an image contains multiple slices, the multiple slices can share information in the picture head.

[0033] In the high level syntax for the slice header, there is a flag bit that determines whether a certain mode (tool / method) is allowed to be enabled in a slice. If the flag bit has value A, the slice is allowed to enable the mode corresponding to the flag bit, and if the flag bit has value B, the slice is not allowed to enable the mode corresponding to the flag bit. As an example, a frame of image may contain one slice or multiple slices, and the high level syntax for the slice header is the high level syntax that is placed for each slice.

[0034] High-level syntax: used to indicate whether some tool (method) is allowed to be enabled, i.e., the high-level syntax allows some tool (method) to be enabled or prohibits some tool (method). As an example, referring to the above description, the high-level syntax may be a sequence parameter set level high-level syntax, a picture parameter set level high-level syntax, 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 it can realize the above function.

[0035] Rate-Distortion Optimized Principle: There are two indices for evaluating coding efficiency: bit rate and PSNR (Peak Signal to Noise Ratio). The smaller the bit stream, the higher the compression rate. The higher the PSNR, the better the quality of the reconstructed image. When selecting a mode, the discriminant is essentially a comprehensive evaluation of both. For example, the cost corresponding to a mode is J(mode)=D+λ*R, where D represents distortion, and is generally evaluated using the SSE index. SSE is the mean square sum of the difference between the reconstructed image block and the original image, λ is the Lagrange multiplier, and R is the actual number of bits required to encode the image block in the mode, including the sum of the number of bits required for coding mode information, motion information, residuals, etc. When selecting a mode, if the coding mode is compared and determined according to the RDO principle, it can generally ensure optimal coding performance.

[0036] Block partitioning technique: A coding tree unit (CTU) is recursively partitioned into CUs (Coding Units) using a quadtree. At the leaf node, the CU level determines whether intraframe coding or interframe coding is used. A CU can be partitioned into two or four prediction units (PUs), and the same prediction information is used within the same PU. After completing prediction and obtaining residual information, a CU can be partitioned into multiple transform units (TUs) using a quadtree. For example, the current image block in the present invention is one PU. In addition, the block partitioning technique can be modified, for example, a partitioning structure that combines binary tree / ternary tree / quadtree is used to replace the original partitioning mode, eliminating the distinction between the concepts of CU, PU, ​​and TU, and supporting a more flexible partitioning method for CUs. A CU can be partitioned into squares or rectangles. A CTU can first be partitioned into quadtrees, and then the leaf nodes of the quadtree partitioning can be partitioned into binary and ternary trees. As shown in FIG. 2A, a CU has a total of five partition types, which are quad-tree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning and vertical ternary tree partitioning, respectively. As shown in FIG. 2B, the CU partitioning in a CTU may be any combination of the above five partition types. As can be seen from the above, different partitioning methods result in different shapes of each PU, such as rectangles and squares of different sizes.

[0037] DBF filtering (ie, deblocking filtering) method: The DBF filtering process includes two processes: filtering decision and filtering operation.

[0038] The filtering decision includes: 1) getting the boundary strength (BS value), 2) deciding whether filtering is enabled, and 3) choosing whether filtering is strong or weak. For the chrominance component, only step 1) exists, and the BS value of the luma component is directly reused. For the chrominance component, the filtering operation is performed only if the BS value is 2 (i.e., at least one of the blocks on both sides of the current block uses intra mode).

[0039] The filtering operation includes: 1) strong and weak filtering on the luma component; and 2) filtering on the chroma component.

[0040] As an example, DBF filtering processing generally performs horizontal boundary filtering (which may also be referred to as horizontal DBF filtering) and vertical boundary filtering (which may also be referred to as vertical DBF filtering) in units of 8*8, and performs filtering on a maximum of three pixel points on both sides of the boundary, and performs filtering using a maximum of four pixel points on both sides of the boundary. Therefore, the horizontal DBF filtering and vertical DBF filtering of different blocks do not affect each other, that is, the horizontal DBF filtering and vertical DBF filtering can be performed in parallel.

[0041] As shown in FIG. 3, for a current block (taking 8*8 as an example), vertical DBF filtering may be first performed on the pixel points of the three columns on the left side of the current block and the pixel points of the three columns on the right side of the left block (i.e., the block on the left side of the current block), and then horizontal DBF filtering may be performed on the pixel points of the three rows on the top side of the current block and the pixel points of the three rows on the bottom side of the upper block (i.e., the block above the current block).

[0042] For example, for pixel points that need to be subjected to vertical DBF filtering and horizontal DBF filtering, generally, vertical DBF filtering is performed first, and then horizontal DBF filtering is performed. Of course, horizontal DBF filtering may be performed first, and then vertical DBF filtering may be performed. In the following embodiment, vertical DBF filtering is performed first, and then horizontal DBF filtering is performed as an example.

[0043] In one possible embodiment, the process flow of DBF filtering may include the following steps:

[0044] In step S11, edge condition values ​​in the horizontal and vertical directions are calculated in units of 4*4.

[0045] In the case of a CU boundary and an 8*8 boundary, the edge condition value is 2 (used to indicate that filtering is performed on both the luma and chroma components). In the case of a PU (Prediction Unit) boundary (e.g., 1 / 4, 1 / 2, 3 / 4 horizontal lines within 2N*hN) and an 8*8 boundary, the edge condition value is 1 (used to indicate that filtering is performed on the luma component but not on the chroma component). In cases other than the above two types, the edge condition value is 0.

[0046] In step S12, vertical filtering of all blocks is completed in units of 4*4 (filtering is performed in units of 8*8, but information such as edge condition values ​​is stored in units of 4*4). If the edge condition value is not 0, the following filtering process is performed.

[0047] 1. Luminance component filtering (vertical filtering processes 4 rows of vertical boundaries, horizontal filtering processes 4 columns of horizontal boundaries): 1.1. First, determine whether to skip the filtering process. As an example, if the blocks on both sides of the boundary are non-intra-frame mode blocks, there is no residual, and the motion is consistent, then skip the filtering process; otherwise, it is necessary to perform the filtering process in all cases.

[0048] 1.2. If the filtering process is not skipped, perform the following processing.

[0049] 1.2.1. If the filtering type (df_type) of the current frame is type 1 and ABS(R0 - L0) >= 4 * Alpha, then FS becomes 0; otherwise, perform step 1.2.2 to determine FS. Alpha is a predetermined numerical value, and ABS() is an operation to take the absolute value.

[0050] 1.2.2. Calculate FL (Flatness Left, left - hand flatness, selectable values are 0, 2, 3) and FR (Flatness Right, right - hand flatness, selectable values are 0, 2, 3). FL and FR are used to determine the flatness inside both sides. Subsequently, determine FS based on FL and FR. For example, FS may be determined using the formula FS = FL + FR.

[0051] 1.2.2.1. If ABS(L1 - L0) < Beta and ABS(L2 - L0) < Beta, then FL becomes 3; if ABS(L1 - L0) < Beta and ABS(L2 - L0) >= Beta, then FL becomes 2; if ABS(L1 - L0) >= Beta and ABS(L2 - L0) < Beta, then FL becomes 1; otherwise, FL becomes 0. Beta is a predetermined numerical value, and ABS() is an operation to take the absolute value.

[0052] 1.2.2.2. Since the calculation method of FR is similar to that of FL, the repeated description is omitted here.

[0053] 1.2.3. Determine the BS value based on FS (the selectable values of FS are 0, 2, 3, 4, 5, 6, and the selectable values of BS are 0, 1, 2, 3, 4). For example, after obtaining FS, the BS value may be determined based on the value of FS.

[0054] 1.2.3.1. If FS is 2 or less (at most one side is moderately flat), then BS = 0.

[0055] 1.2.3.2. If FS is 3 (only one side is highly flat), then BS = (ABS(L1 - R1) < Beta)? 1 : 0, that is, if ABS(L1 - R1) < Beta holds, then BS = 1, otherwise, BS = 0.

[0056] 1.2.3.3. If FS is 4 (i.e., both sides are moderately flat), then BS = (FL == 2)? 2 : 1, that is, if FL = 2, then BS = 2, otherwise, if FL is not equal to 2, then BS = 1.

[0057] 1.2.3.4. If FS is 5 (i.e., one side is moderately flat and the other side is highly flat), when the filtering type (df_type) of the current frame is type 1, then BS = (R1 == R0 && L0 == L1 && ABS(R2 - L2) < Alpha)? 3 : 2, that is, if the pixel value of pixel point R1 is equal to the pixel value of pixel point R0, and the pixel value of pixel point L0 is equal to the pixel value of pixel point L1, and the absolute value of the difference between the pixel value of pixel point R2 and the pixel value of pixel point L2 is less than Alpha (i.e., a preset numerical value), then BS = 3, otherwise, BS = 2.

[0058] Otherwise (i.e., when the filtering type (df_type) of the current frame is not type 1), if the filtering type of the current frame is type 0, BS = (R1 == R0 && L0 == L1)? 3 : 2, that is, when the pixel value of pixel point R1 is equal to the pixel value of pixel point R0 and the pixel value of pixel point L0 is equal to the pixel value of pixel point L1, BS = 3; otherwise, BS = 2.

[0059] 1.2.3.5. If FS is 6 (i.e., both sides are highly flat), When the filtering type (df_type) of the current frame is type 1, BS = (ABS(R0 - R1) <= Beta / 4 && ABS(L0 - L1) <= Beta / 4 && ABS(R0 - L0) < Alpha) && ABS(R0 - R3) <= Beta / 2 && ABS(L0 - L3) <= Beta / 2? 4 : 3, that is, when ABS(R0 - R1) <= Beta / 4, ABS(L0 - L1) <= Beta / 4, ABS(R0 - L0) < Alpha, ABS(R0 - R3) <= Beta / 2, and ABS(L0 - L3) <= Beta / 2 all hold, BS = 4; otherwise, BS = 3.

[0060] Otherwise (i.e., when the filtering type (df_type) of the current frame is not type 1), if the filtering type of the current frame is type 0, BS = (ABS(R0 - R1) <= Beta / 4 && ABS(L0 - L1) <= Beta / 4 && ABS(R0 - L0) < Alpha)? 4 : 3, that is, when ABS(R0 - R1) <= Beta / 4, ABS(L0 - L1) <= Beta / 4, and ABS(R0 - L0) < Alpha all hold, BS = 4; otherwise, BS = 3.

[0061] 1.2.4. Determine the filtering coefficient and the number of filtering pixels based on the BS value. For example, assume that the four pixel points on the left side or upper side of the boundary are L0 to L3 (as shown in FIG. 3, taking the left side in FIG. 3 as an example), and the four pixel points on the right side or lower side of the boundary are R0 to R3 (as shown in FIG. 3, taking the right side in FIG. 3 as an example). For the luminance component, 1.2.4.1, if BS=4, filtering is performed on three pixels on each side of the boundary.

[0062] For L0 and R0, the filtering coefficients are [3,8,10,8,3] / 32, i.e., to determine the filtered pixel value of pixel point L0, a weighted sum of the pixel values ​​of pixel points L2, L1, L0, R0 and R1 is calculated, and the weighting coefficients (i.e., filtering coefficients) are 3 / 32, 8 / 32, 10 / 32, 8 / 32 and 3 / 32, respectively. If wj is a filtering coefficient, when j=-2 (the second pixel point on the left side of the current pixel point, i.e., L2), wj=3 / 32, when j=-1 (the first pixel point on the left side of the current pixel point, i.e., L1), wj=8 / 32, when j=0 (the current pixel point, i.e., L0), wj=10 / 32, when j=1 (the first pixel point on the right side of the current pixel point, i.e., R0), wj=8 / 32, when j=2 (the second pixel point on the right side of the current pixel point, i.e., R1), wj=3 / 32. To determine the filtered pixel value of pixel point R0, a weighted sum of pixel values ​​of pixel points R2, R1, R0, L0 and L1 is calculated, and the weighting coefficients are 3 / 32, 8 / 32, 10 / 32, 8 / 32 and 3 / 32, respectively. If wj is a filtering coefficient, then when j=-2 (the second pixel point to the right of the current pixel point, i.e., R2), wj=3 / 32; when j=-1 (the first pixel point to the right of the current pixel point, i.e., R1), wj=8 / 32; when j=0 (the current pixel point, i.e., R0), wj=10 / 32; when j=1 (the first pixel point to the left of the current pixel point, i.e., L0), wj=8 / 32; and when j=2 (the second pixel point to the left of the current pixel point, i.e., L1), wj=3 / 32.

[0063] To summarize the above, L0'=clip(L2*3+L1*8+L0*10+R0*8+R1*3+16)>>5), where L0' is the pixel value of pixel point L0 after filtering, L0-L2 are the pixel values ​​of pixel points L0-L2 before filtering, R0-R1 are the pixel values ​​of pixel points R0-R1, and so on. R0'=clip((R2*3+R1*8+R0*10+L0*8+L1*3+16)>>5)>>5).

[0064] In the above formula, ">>" is the right shift operation, which is used instead of division; that is, ">>5" is 2 5 (i.e., it is equivalent to dividing by 32). Multiplication ("*") can be replaced by left-shifting, e.g., multiplying a by 4 can be replaced by shifting it 2 bits to the left, i.e., a<<2, and multiplying a by 10 can be replaced by (a<<3)+(a<<1). "<<" is the left-shifting operation, and is used in place of multiplication, so "a<<2" is 2 2 (i.e., multiplying by 4). When division is realized by shifting, the operation result is usually converted to an integer, that is, if the operation result is a non-integer between N and N+1, N is taken as the result, but when the decimal part is greater than 0.5, N+1 is taken as the result, which is considered to provide higher accuracy. Therefore, in order to improve the accuracy of the determined pixel value, 1 / 2 of the denominator (i.e., dividend) may be added to the numerator of the weighted sum in the calculation to achieve the effect of rounding. Taking the calculation of L0' above as an example, shifting 5 bits to the right is 2 5 (i.e., 32), so 16 may be added to the numerator of the weighted sum. Clip(x) is a clipping operation that sets the value of x to the upper limit of a predetermined numerical range if x exceeds the upper limit of the predetermined numerical range, and sets the value of x to the lower limit of the predetermined numerical range if x is less than the lower limit of the predetermined numerical range.

[0065] For L1 and R1, the filtering coefficients are [4,5,4,3] / 16, and based on this, L1'=clip((L2*4+L1*5+L0*4+R0*3+8)>>4), R1'=clip((R2*4+R1*5+R0*4+L0*3+8)>>4).

[0066] For L2 and R2, if the filtering coefficients are [2,2,2,1,1] / 8, then L2'=clip((L3*2+L2*2+L1*2+L0*1+R0*1+4)>>3), R2'=clip((R3*2+R2*2+R1*2+R0*1+L0*1+4)>>3).

[0067] 1.2.4.2, if BS=3, filtering is performed on two pixels on each side of the boundary.

[0068] For L0 and R0, if the filtering coefficients are [1,4,6,4,1] / 16, then L0′=clip(L2*1+L1*4+L0*6+R0*4+R1*1+8)>>4 and R0′=clip(R2*1+R1*4+R0*6+L0*4+L1*1+8)>>4.

[0069] For L1 and R1, if the filtering coefficients are [3,8,4,1] / 16, then L1′=clip((L2*3+L1*8+L0*4+R0*1+8)>>4), R1′=clip(R2*3+R1*8+R0*4+L0*1+8)>>4).

[0070] 1.2.4.3, if BS=2, filtering is performed on one pixel on each side of the boundary.

[0071] For L0 and R0, the filtering coefficients are [3,10,3] / 16, and based on this, L0′=clip(L1*3+L0*10+R0*3+8)>>4, R0′=clip(R1*3+R0*10+L0*3+8)>>4.

[0072] 1.2.4.4, if BS=1, filtering is performed on one pixel on each side of the boundary. For L0 and R0, if the filtering coefficient is [3,1] / 4, then L0′=clip(L0*3+R0*1+2)>>2, R0′=clip(R0*3+L0*1+2)>>2.

[0073] 1.2.4.5. If BS=0, no filtering is performed, that is, no filtering is performed on the pixels on both sides of the boundary.

[0074] 2. When the edge condition value is 2, chrominance filtering is performed on the boundary of the 16*16 block, that is, chrominance component filtering is performed on the boundary of the 16*16 block. The chrominance component filtering process is as follows:

[0075] 2.1. First, determine whether filtering is necessary. The process is similar to that for the luminance component, so a duplicated explanation will be omitted here.

[0076] 2.2. If filtering processing is required (i.e., the filtering process is not skipped), calculate FL and FR respectively, and then obtain FS based on FL and FR, and obtain BS value based on FS. This process is also similar to that of the luminance component, so duplicated explanations are omitted here.

[0077] 2.3. Subtract 1 from the BS value of the obtained chromaticity component (for example, 4, 3, 2, 1, 0, etc.), that is, the selectable values ​​of BS can be 3, 2, 1, 0. Perform filtering processing of the chromaticity component according to the BS value, and the specific process is as follows:

[0078] If BS=3, filtering is performed on two pixels on each side of the boundary, and for L0 and R0, if the filtering coefficient is [3,10,3] / 16, then L0′=clip(L1*3+L0*10+R0*3+8)>>4, R0′=clip(R1*3+R0*10+L0*3+8)>>4. For L1 and R1, if the filtering coefficient is [3,8,3,2] / 16, then L1′=clip((L2*3+L1*8+L0*3+R0*2+8)>>4), R1′=clip((R2*3+R1*8+R0*3+L0*2+8)>>4).

[0079] If BS=2 or BS=1, filtering is performed on one pixel on each side of the boundary, and if the filtering coefficient for L0 and R0 is [3,10,3] / 16, then L0'=clip(L1*3+L0*10+R0*3+8)>>4, R0'=clip(R1*3+R0*10+L0*3+8)>>4. If BS=0, no filtering is performed, i.e., no filtering is performed on the pixels on both sides of the boundary.

[0080] As an example, Alpha and Beta in the above process are related to the average QP values ​​of the blocks on both sides of the boundary, i.e., the current block is related to the average QP value of the block to the left of the current block (for vertical DBF filtering), or the current block is related to the average QP value of the block above the current block (for horizontal DBF filtering), and the values ​​of Alpha and Beta can be obtained by table lookup, without being limited thereto.

[0081] In step S13, horizontal filtering of all blocks is completed in units of 4*4 (the filtering process is in units of 8*8, but information such as edge condition values ​​is stored in units of 4*4). Since the implementation method is similar to that of step S12, a duplicated explanation will be omitted here.

[0082] In the related art, filter technologies such as DBF, SAO, and ALF all classify based on the pixel value of the current pixel point, or based on the relationship between the pixel value of the current pixel point and the pixel values ​​of the surrounding pixel points, and then perform different filtering operations according to different categories. This may result in over-filtering, that is, the pixel value after filtering is much larger or smaller than the pixel value before filtering, and is much larger or smaller than the original pixel value, resulting in poor filtering effect and relatively poor coding performance.

[0083] In response to the above finding, the present embodiment provides an encoding / decoding method, which adjusts the original pixel value of a current pixel point according to the gradient value of the current pixel point, so that the adjusted pixel value of the current pixel point is closer to the original pixel, thereby improving the encoding performance. In the filtering process, if the current pixel point in the current block satisfies the enabling condition of the enhancement adjustment mode, the original pixel value of the current pixel point is adjusted according to the gradient value of the current pixel point, thereby improving the filtering effect and improving the encoding performance.

[0084] The encoding / decoding method according to the embodiment of the present invention will be described in detail below in accordance with a specific embodiment.

[0085] Example 1: An embodiment of the present invention provides an encoding / decoding method, which can be applied to the encoding side or the decoding side. As shown in FIG. 4, which is a flowchart of the encoding / decoding method, the method may include:

[0086] In step 401, if the current pixel point in the current block satisfies the enable condition of the emphasis adjustment mode, the gradient value of the current pixel point is determined according to the original pixel value of the current pixel point and the original pixel values ​​of the neighboring pixel points of the current pixel point.

[0087] As an example, the gradient value of the current pixel point may be determined based on the difference between the original pixel value of the current pixel point and the original pixel values ​​of the surrounding pixel points, i.e., the gradient value of the current pixel point reflects the difference between the two pixel values.

[0088] As an example, the peripheral pixel points of the current pixel point may be adjacent pixel points of the current pixel point or may be pixel points that are not adjacent to the current pixel point. The peripheral pixel points of the current pixel point may be pixel points located in the current block or may be pixel points located in a block adjacent to the current block. For example, the peripheral pixel points of the current pixel point may be a pixel point on the left side of the current pixel point, a pixel point on the right side of the current pixel point, a pixel point above the current pixel point, or a pixel point below the current pixel point, and the positions of the peripheral pixel points of the current pixel point are not limited.

[0089] For example, as shown in Fig. 3, if the current pixel point is R0 in the current block, the peripheral pixel points of the current pixel point may be L0 in the adjacent block to the left of the current block, or if the current pixel point is the pixel point in the first row and second column of the current block, the peripheral pixel points of the current pixel point may be the pixel point in the eighth row and second column of the adjacent block above the current block.

[0090] In step 402, an adjusted pixel value of the current pixel point is determined based on the gradient value of the current pixel point and the original pixel value of the current pixel point. For example, the adjusted pixel value of the current pixel point may be determined based on the gradient value of the current pixel point, the original pixel value of the current pixel point, a first adjustment threshold, a second adjustment threshold, a first adjustment offset value, and a second adjustment offset value.

[0091] In one possible embodiment, if the gradient value of the current pixel point is greater than the first adjustment threshold, the adjusted pixel value of the current pixel point is determined based on the original pixel value of the current pixel point and the first adjustment offset value, for example, the adjusted pixel value of the current pixel point is determined based on the sum of the original pixel value of the current pixel point and the first adjustment offset value. If the gradient value of the current pixel point is less than the second adjustment threshold, the adjusted pixel value of the current pixel point is determined based on the original pixel value of the current pixel point and the second adjustment offset value, for example, the adjusted pixel value of the current pixel point is determined based on the sum of the original pixel value of the current pixel point and the second adjustment offset value. As an example, the first adjustment threshold and the second adjustment threshold may be mutually reciprocal. Of course, the first adjustment threshold and the second adjustment threshold do not have to be mutually reciprocal, and the first adjustment threshold and the second adjustment threshold can be set arbitrarily.

[0092] In one possible embodiment, when a current pixel point in a current block satisfies the enabling condition of the emphasis adjustment mode, the method may further include determining a reference pixel point corresponding to the current pixel point from an adjacent block of the current block, determining a gradient value of the reference pixel point based on the original pixel value of the reference pixel point and the original pixel values ​​of the pixel points surrounding the reference pixel point, and determining an adjustment pixel value of the reference pixel point based on the gradient value of the reference pixel point and the original pixel value of the reference pixel point.

[0093] As an example, the reference pixel point may be a pixel point adjacent to the current pixel point in the neighboring block, or may be a pixel point not adjacent to the current pixel point in the neighboring block, and this is not limited. For example, as shown in FIG. 3, if the current pixel point is R0 in the current block, the reference pixel point may be L0 in the neighboring block to the left of the current block, or may be L1, L2, etc. in the neighboring block to the left of the current block, and this is not limited. If the current pixel point is R1 in the current block, the reference pixel point may be L0 in the neighboring block to the left of the current block, or may be L1, L2, etc. in the neighboring block to the left of the current block, and this is not limited. If the current pixel point is the pixel point in the first row and second column in the current block, the reference pixel point may be the pixel point in the eighth row and second column in the neighboring block above the current block, or may be the pixel point in the seventh row and second column in the neighboring block above the current block, and this is not limited.

[0094] As an example, the gradient value of the reference pixel point may be determined based on the difference between the original pixel value of the reference pixel point and the original pixel values ​​of the neighboring pixel points of the reference pixel point, i.e., the gradient value reflects the difference between the two pixel values.

[0095] As an example, the peripheral pixel points of the reference pixel point may be adjacent pixel points of the reference pixel point or may be pixel points not adjacent to the reference pixel point. The peripheral pixel points of the reference pixel point may be pixel points located in a block in which the reference pixel point is located or may be pixel points located in a block adjacent to the block in which the reference pixel point is located. The peripheral pixel points of the reference pixel point may be pixel points on the left side of the reference pixel point, pixel points on the right side of the reference pixel point, pixel points above the reference pixel point, or pixel points below the reference pixel point, and the positions of the peripheral pixel points of the reference pixel point are not limited.

[0096] In one possible embodiment, the neighboring pixel points of the reference pixel point may be the current pixel point in the current block, and similarly, the neighboring pixel points of the current pixel point may be the reference pixel points in the neighboring blocks of the current block.

[0097] As an example, the step of determining an adjusted pixel value of the reference pixel point based on the gradient value of the reference pixel point and the original pixel value of the reference pixel point may include, but is not limited to, a step of determining an adjusted pixel value of the reference pixel point based on the gradient value of the reference pixel point, the original pixel value of the reference pixel point, a third adjustment threshold (which may be the same as or different from the first adjustment threshold), a fourth adjustment threshold (which may be the same as or different from the second adjustment threshold), a third adjustment offset value (which may be the same as or different from the first adjustment offset value) and a fourth adjustment offset value (which may be the same as or different from the third adjustment offset value).

[0098] For example, if the gradient value of the reference pixel point is greater than the third adjustment threshold, the adjusted pixel value of the reference pixel point is determined based on the original pixel value of the reference pixel point and the third adjustment offset value, for example, the adjusted pixel value of the reference pixel point is determined based on the sum of the original pixel value of the reference pixel point and the third adjustment offset value.If the gradient value of the reference pixel point is less than the fourth adjustment threshold, the adjusted pixel value of the reference pixel point is determined based on the original pixel value of the reference pixel point and the fourth adjustment offset value, for example, the adjusted pixel value of the reference pixel point is determined based on the sum of the original pixel value of the reference pixel point and the fourth adjustment offset value.

[0099] For example, the third adjustment threshold and the fourth adjustment threshold may be mutually inverse numbers. Of course, the third adjustment threshold and the fourth adjustment threshold do not have to be mutually inverse numbers, and the third adjustment threshold and the fourth adjustment threshold can be set arbitrarily.

[0100] In one possible embodiment, the first adjustment threshold, the second adjustment threshold, the first adjustment offset value, the second adjustment offset value, the third adjustment threshold, the fourth adjustment threshold, the third adjustment offset value, and the fourth adjustment offset value corresponding to the current block may be parsed from the high level syntax. Or, the first adjustment threshold, the first adjustment offset value, the second adjustment offset value, the third adjustment threshold, the third adjustment offset value, and the fourth adjustment offset value corresponding to the current block may be parsed from the high level syntax. Or, the first adjustment threshold, the first adjustment offset value, the second adjustment offset value, the third adjustment threshold, the third adjustment offset value, and the fourth adjustment offset value corresponding to the current block may be parsed from the high level syntax. Alternatively, the second adjusted threshold, the first adjusted offset value, the second adjusted offset value, the fourth adjusted threshold, the third adjusted offset value and the fourth adjusted offset value corresponding to the current block may be parsed from the high level syntax.

[0101] As an example, if the first adjustment threshold and the second adjustment threshold are mutually inverse numbers, the second adjustment threshold can be derived by analyzing the first adjustment threshold from the high level syntax, and the first adjustment threshold can be derived by analyzing the second adjustment threshold from the high level syntax. If the third adjustment threshold and the fourth adjustment threshold are mutually inverse numbers, the fourth adjustment threshold can be derived by analyzing the third adjustment threshold from the high level syntax, and the third adjustment threshold can be derived by analyzing the fourth adjustment threshold from the high level syntax.

[0102] In one possible embodiment, the current pixel point in the current block satisfying the enable condition of the emphasis adjustment mode may include, but is not limited to, determining that the current pixel point satisfies the enable condition of the emphasis adjustment mode when the boundary strength of the filtered boundary corresponding to the current pixel point in the current block satisfies the enable condition of the emphasis adjustment mode. For example, if the boundary strength of the filtered boundary corresponding to the current pixel point is a predetermined first numerical value, it may be determined that the boundary strength of the filtered boundary satisfies the enable condition of the emphasis adjustment mode. As an example, the predetermined first numerical value may be 0. Of course, the predetermined first numerical value may be other numerical values.

[0103] Alternatively, when the feature information corresponding to the current block satisfies the enable condition of the emphasis adjustment mode, it is determined that the current pixel point in the current block satisfies the enable condition of the emphasis adjustment mode. For example, when it is determined not to start a filtering operation (e.g., a deblocking filtering operation) on the current block based on the feature information corresponding to the current block, it is determined that the feature information corresponding to the current block satisfies the enable condition of the emphasis adjustment mode.

[0104] As an example, before determining that the current pixel point in the current block satisfies the enable condition of the emphasis adjustment mode, first obtain the emphasis adjustment mode enable flag bit corresponding to the current block, and if the emphasis adjustment mode enable flag bit corresponding to the current block allows the current block to enable the emphasis adjustment mode, determine whether the current pixel point in the current block satisfies the enable condition of the emphasis adjustment mode, i.e., determine whether the current pixel point satisfies the enable condition of the emphasis adjustment mode or does not satisfy the enable condition of the emphasis adjustment mode.

[0105] Or, if the enhancement adjustment mode enable flag bit corresponding to the current block does not allow the current block to enable the enhancement adjustment mode, it is directly determined that the current pixel point in the current block does not satisfy the enable condition of the enhancement adjustment mode.

[0106] As an example, the decoding side may parse the enhancement adjustment mode enable flag bit corresponding to the current block from the high-level syntax, and then determine whether or not the current block is allowed to enable the enhancement adjustment mode based on the enhancement adjustment mode enable flag bit.

[0107] For example, if the emphasis adjustment mode enable flag bit is a first value (e.g., 1), the emphasis adjustment mode enable flag bit allows the current block to enable the emphasis adjustment mode, and if the emphasis adjustment mode enable flag bit is a second value (e.g., 0), the emphasis adjustment mode enable flag bit does not allow the current block to enable the emphasis adjustment mode.

[0108] In one possible embodiment, if the encoding / decoding method is applied to a prediction process (e.g., intraframe prediction or interframe prediction), the original pixel value of the current pixel point may be a predicted value obtained by intraframe prediction or interframe prediction, and the adjusted pixel value of the current pixel point is a target pixel value of the current pixel point (the final pixel value of the prediction process). If the encoding / decoding method is applied to a filtering process, the original pixel value of the current pixel point may be a predicted value before filtering, and the adjusted pixel value of the current pixel point is a target pixel value of the current pixel point (the final pixel value of the filtering process).

[0109] It can be seen from the above technical solutions that in the embodiment of the present invention, when a current pixel point in a current block satisfies the enabling condition of the emphasis adjustment mode, an adjusted pixel value of the current pixel point can be determined according to the gradient value of the current pixel point and the original pixel value of the current pixel point, that is, the original pixel value of the current pixel point is adjusted according to the gradient value of the current pixel point, so that the adjusted pixel value of the current pixel point is closer to the original pixel, thereby improving the coding performance. For example, in the filtering process such as DBF, SAO and ALF, when a current pixel point in a current block satisfies the enabling condition of the emphasis adjustment mode, the original pixel value of the current pixel point can be adjusted according to the gradient value of the current pixel point, thereby improving the filtering effect and improving the coding performance.

[0110] In one possible embodiment, when the current pixel point in the current block satisfies the enable condition of the normal filtering mode, the original pixel value of the current pixel point may be further subjected to deblocking filtering (i.e., DBF filtering) to obtain a filtered pixel value of the current pixel point. Of course, the deblocking filtering is merely an example, and other filtering methods may be used to filter the original pixel value of the current pixel point, for example, the original pixel value of the current pixel point may be subjected to an SAO filter to obtain a filtered pixel value of the current pixel point. Or, the original pixel value of the current pixel point may be subjected to an ALF filter to obtain a filtered pixel value of the current pixel point.

[0111] Taking deblocking filtering as an example, steps S11 to S13 show a process of performing deblocking filtering on an original pixel value of a current pixel point to obtain a filtered pixel value of the current pixel point, and redundant explanations will be omitted here.

[0112] Continuing to refer to steps S11 to S13, it can be seen from these steps that only if the blocks on both sides of the boundary are non-intra mode blocks, there is no residual, and the motion is consistent, the filtering process is skipped, otherwise, it is necessary to perform the filtering process. If it is necessary to perform the filtering process, the value of BS may be further obtained, and if BS is equal to 0, no filtering is performed, that is, no filtering is performed on the pixels on both sides of the boundary, and if BS is greater than 0, filtering is performed on the pixels on both sides of the boundary. In summary, if the blocks on both sides of the boundary are non-intra mode blocks, there is no residual, and the motion is consistent, the current pixel point in the current block does not satisfy the enable condition of the normal filtering mode. If the blocks on both sides of the boundary are non-intra mode blocks, there is no residual, and the motion is not consistent (i.e., the blocks on both sides of the boundary are not non-intra mode blocks, or the blocks on both sides of the boundary have residual, or the motion of the blocks on both sides of the boundary is not consistent), and BS is equal to 0, the current pixel point in the current block does not satisfy the enable condition of the normal filtering mode. If the blocks on both sides of the boundary are non-intra-mode blocks, there is no residual, the motion matching does not occur, and BS is greater than 0, then the current pixel point in the current block satisfies the enable condition of the normal filtering mode.

[0113] It should be noted that if the current pixel point in the current block satisfies the enable condition of the normal filtering mode, then the current pixel point in the current block does not satisfy the enable condition of the emphasis adjustment mode, and vice versa.

[0114] In addition to performing deblocking filtering on the original pixel value of the current pixel point to obtain the filtered pixel value of the current pixel point when the current pixel point satisfies the enabling condition of the normal filtering mode, it is also necessary to determine whether the current pixel point in the current block satisfies the enabling condition of the enhancement filtering mode. If the current pixel point in the current block satisfies the enabling condition of the enhancement filtering mode, an adjusted pixel value of the current pixel point is determined according to the filtered pixel value of the current pixel point and the original pixel value of the current pixel point, that is, the adjusted pixel value of the current pixel point is taken as the target pixel value of the current pixel point (the final pixel value of the deblocking filtering process). If the current pixel point in the current block does not satisfy the enabling condition of the enhancement filtering mode, the filtered pixel value of the current pixel point is not adjusted, and the filtered pixel value of the current pixel point is taken as the target pixel value of the current pixel point (the final pixel value of the deblocking filtering process).

[0115] As an example, when a current pixel point in a current block satisfies the enable condition of the enhancement filtering mode, the step of determining an adjusted pixel value of the current pixel point based on the filtered pixel value of the current pixel point and the original pixel value of the current pixel point may include, but is not limited to, determining an adjusted pixel value of the current pixel point based on the filtered pixel value of the current pixel point, the original pixel value of the current pixel point, a first filtering threshold, a second filtering threshold, a first filtering offset value, and a second filtering offset value.

[0116] As an example, the first filtering threshold and the second filtering threshold may be the inverse of each other, and of course, the first filtering threshold and the second filtering threshold do not have to be the inverse of each other, and the first filtering threshold and the second filtering threshold can be set arbitrarily.

[0117] In one possible embodiment, when the current pixel point in the current block satisfies the enable condition of the normal filtering mode, further determine a reference pixel point corresponding to the current pixel point from an adjacent block of the current block, and perform deblocking filtering (i.e. DBF filtering) on ​​the original pixel value of the reference pixel point to obtain a filtered pixel value of the reference pixel point. Of course, deblocking filtering is merely an example, and other filtering methods may be used to filter the original pixel value of the reference pixel point, for example, perform SAO filtering or ALF filtering on the original pixel value of the reference pixel point to obtain a filtered pixel value of the reference pixel point.

[0118] Taking deblocking filtering as an example, steps S11 to S13 show a process of performing deblocking filtering on original pixel values ​​of reference pixel points to obtain filtered pixel values ​​of the reference pixel points, and redundant explanations will be omitted here.

[0119] As an example, the reference pixel point may be a pixel point adjacent to the current pixel point in the neighboring block, or may be a pixel point not adjacent to the current pixel point in the neighboring block, but is not limited thereto.

[0120] In addition to the current pixel point satisfying the enabling condition of the normal filtering mode and performing deblocking filtering on the original pixel value of the reference pixel point to obtain the filtered pixel value of the reference pixel point, it is also necessary to determine whether the current pixel point in the current block satisfies the enabling condition of the enhancement filtering mode. If the current pixel point in the current block satisfies the enabling condition of the enhancement filtering mode, an adjusted pixel value of the reference pixel point is determined according to the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point, that is, the adjusted pixel value of the reference pixel point is taken as the target pixel value of the reference pixel point (the final pixel value of the deblocking filtering process). If the current pixel point in the current block does not satisfy the enabling condition of the enhancement filtering mode, the filtered pixel value of the reference pixel point is not adjusted, and the filtered pixel value of the reference pixel point is taken as the target pixel value of the reference pixel point (the final pixel value of the deblocking filtering process).

[0121] As an example, the step of determining an adjusted pixel value of the reference pixel point based on the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point may include, but is not limited to, a step of determining an adjusted pixel value of the reference pixel point based on the filtered pixel value of the reference pixel point, the original pixel value of the reference pixel point, a third filtering threshold, a fourth filtering threshold, a third filtering offset value and a fourth filtering offset value, where the third filtering threshold and the fourth filtering threshold may be mutually reciprocals, of course, the third filtering threshold and the fourth filtering threshold do not have to be mutually reciprocals, and the third filtering threshold and the fourth filtering threshold can be set arbitrarily.

[0122] In one possible embodiment, the first filtering threshold, the second filtering threshold, the first filtering offset value, the second filtering offset value, the third filtering threshold, the fourth filtering threshold, the third filtering offset value, and the fourth filtering offset value corresponding to the current block may be parsed from the high level syntax. Or, the first filtering threshold, the first filtering offset value, the second filtering offset value, the third filtering threshold, the third filtering offset value, and the fourth filtering offset value corresponding to the current block may be parsed from the high level syntax. Or, the first filtering threshold, the first filtering offset value, the second filtering offset value, the third filtering threshold, the third filtering offset value, and the fourth filtering offset value corresponding to the current block may be parsed from the high level syntax. Alternatively, the second filtering threshold, the first filtering offset value, the second filtering offset value, the fourth filtering threshold, the third filtering offset value and the fourth filtering offset value corresponding to the current block may be parsed from the high level syntax.

[0123] As an example, if the first filtering threshold and the second filtering threshold are mutually inverse numbers, the second filtering threshold can be derived by analyzing the first filtering threshold from the high level syntax, and the first filtering threshold can be derived by analyzing the second filtering threshold from the high level syntax. If the third filtering threshold and the fourth filtering threshold are mutually inverse numbers, the fourth filtering threshold can be derived by analyzing the third filtering threshold from the high level syntax, and the third filtering threshold can be derived by analyzing the fourth filtering threshold from the high level syntax.

[0124] In one possible embodiment, the current pixel point in the current block satisfying the enable condition of the emphasis filtering mode may include, but is not limited to, determining that the current pixel point satisfies the enable condition of the emphasis filtering mode if the boundary strength of the filtered boundary corresponding to the current pixel point in the current block satisfies the enable condition of the emphasis filtering mode, and the absolute value of the difference between the filtered pixel value of the current pixel point and the original pixel value of the current pixel point is greater than a predetermined threshold (the predetermined threshold is a positive value, and the predetermined threshold is not limited, for example, if the first filtering threshold and the second filtering threshold are mutually inverse numbers, when the first filtering threshold is a positive value, the predetermined threshold is the same as the first filtering threshold, and when the second filtering threshold is a positive value, the predetermined threshold is the same as the second filtering threshold, and of course, the predetermined threshold may be other values). As an example, the boundary strength of the filtered boundary corresponding to the current pixel point in the current block satisfying the enable condition of the emphasis filtering mode may include, but is not limited to, determining that the boundary strength of the filtered boundary corresponding to the current pixel point satisfies the enable condition of the emphasis filtering mode if the boundary strength of the filtered boundary corresponding to the current pixel point is a predetermined second numerical value (different from the predetermined first numerical value, i.e., not 0; for example, the predetermined second numerical value may be greater than 0).

[0125] As an example, before determining that the current pixel point in the current block satisfies the enable condition of the emphasis filtering mode, first obtain the emphasis filtering mode enable flag bit corresponding to the current block, and if the emphasis filtering mode enable flag bit corresponding to the current block allows the current block to enable the emphasis filtering mode, determine whether the current pixel point in the current block satisfies the enable condition of the emphasis filtering mode, i.e., determine whether the current pixel point satisfies the enable condition of the emphasis filtering mode or does not satisfy the enable condition of the emphasis filtering mode.

[0126] Or, if the enhancement filtering mode enable flag bit corresponding to the current block does not allow the current block to enable the enhancement filtering mode, it is directly determined that the current pixel point in the current block does not satisfy the enable condition of the enhancement filtering mode.

[0127] As an example, the decoding side may parse the enhancement filtering mode enable flag bit corresponding to the current block from the high-level syntax, and then determine whether or not the current block is allowed to enable the enhancement filtering mode based on the enhancement filtering mode enable flag bit.

[0128] For example, if the emphasis filtering mode enable flag bit is a first value (e.g., 1), the emphasis filtering mode enable flag bit allows the current block to enable the emphasis filtering mode, and if the emphasis filtering mode enable flag bit is a second value (e.g., 0), the emphasis filtering mode enable flag bit does not allow the current block to enable the emphasis filtering mode.

[0129] As an example, in the above embodiment, the high level syntax may include, but is not limited to, one of: a high level syntax at a sequence parameter set SPS level, a high level syntax at a picture parameter set PPS level, a high level syntax at a picture header level, a high level syntax at a picture level, a high level syntax at a slice header level, a high level syntax at a coding tree unit CTU level, and a high level syntax at a coding unit CU level.

[0130] As an example, in the above embodiment, the pixel value of the current pixel point in the current block may be a luminance component or a chrominance component.

[0131] It can be seen from the above technical solutions that, when a current pixel point in a current block satisfies the enabling condition of the enhancement filtering mode, an adjusted pixel value of the current pixel point can be determined according to the filtered pixel value of the current pixel point and the original pixel value of the current pixel point, that is, the original pixel value of the current pixel point is adjusted according to the filtered pixel value of the current pixel point, so that the adjusted pixel value of the current pixel point is closer to the original pixel, thereby improving the coding performance. For example, in the filtering process such as DBF, SAO and ALF, when a current pixel point in a current block satisfies the enabling condition of the enhancement filtering mode, the original pixel value of the current pixel point can be adjusted according to the filtered pixel value of the current pixel point, thereby improving the filtering effect and improving the coding performance.

[0132] Example 2: When a filtering process needs to be performed, first, it is necessary to judge whether to skip the filtering process. For example, if the blocks on both sides of the boundary (i.e., the current block and the adjacent block of the current block, for a vertical boundary, the adjacent block on the left side of the current block, and for a horizontal boundary, the adjacent block on the upper side of the current block) are non-intraframe mode blocks (i.e., neither the current block nor the adjacent block is an intraframe block), there is no residual (i.e., there is no residual between the current block and the adjacent block), and the motion is consistent (i.e., the motion between the current block and the adjacent block is consistent), then the filtering process is skipped; otherwise, the filtering process is not skipped. Based on this, "skipping the filtering process" can be set as an enabling condition for the emphasis adjustment mode, that is, if the filtering process is skipped for the current pixel point in the current block, then the current pixel point in the current block satisfies the enabling condition for the emphasis adjustment mode. If the current pixel point satisfies the enabling condition for the emphasis adjustment mode, then the original pixel value of the current pixel point can be adjusted using the emphasis adjustment mode, so that the pixel value is closer to the original pixel.

[0133] As an example, when the feature information corresponding to the current block satisfies the enabling condition of the emphasis adjustment mode, it is determined that the current pixel point in the current block satisfies the enabling condition of the emphasis adjustment mode. The feature information corresponding to the current block is used to represent whether the blocks on both sides of the boundary are non-intra mode blocks, is used to represent whether the blocks on both sides of the boundary have no residual, and is used to represent whether the movements of the blocks on both sides of the boundary are consistent. Based on this, if the feature information corresponding to the current block is used to represent whether the blocks on both sides of the boundary are non-intra mode blocks, is used to represent whether the blocks on both sides of the boundary have no residual, and is used to represent whether the movements of the blocks on both sides of the boundary are consistent, it is indicated that the feature information corresponding to the current block satisfies the enabling condition of the emphasis adjustment mode, and it is determined that the current pixel point in the current block satisfies the enabling condition of the emphasis adjustment mode, i.e., each pixel point in the current block satisfies the enabling condition of the emphasis adjustment mode. Alternatively, if the feature information corresponding to the current block is used to indicate that none of the blocks on either side of the boundary are non-intra-frame mode blocks, and / or the feature information corresponding to the current block is used to indicate that there is residual in the blocks on either side of the boundary, and / or the feature information corresponding to the current block is used to indicate that the movements of the blocks on either side of the boundary are inconsistent, it is indicated that the feature information corresponding to the current block does not satisfy the enable condition of the emphasis adjustment mode, and it is determined that the current pixel point in the current block does not satisfy the enable condition of the emphasis adjustment mode, i.e., none of the pixel points in the current block satisfy the enable condition of the emphasis adjustment mode.

[0134] As an example, when the current pixel point satisfies the enable condition of the emphasis adjustment mode, the emphasis adjustment mode may be used to adjust the original pixel value of the current pixel point. For example, a gradient value of the current pixel point may be determined based on the original pixel value of the current pixel point, and an adjusted pixel value of the current pixel point may be determined based on the gradient value of the current pixel point and the original pixel value of the current pixel point. For the process of determining the adjusted pixel value, reference may be made to subsequent embodiments, and redundant explanations will be omitted here.

[0135] Example 3: When a filtering process needs to be performed, first, it is necessary to determine whether or not to skip the filtering process. For example, if the blocks on both sides of the boundary are both non-intraframe mode blocks, there is no residual, and the motions match, the filtering process is skipped; otherwise, the filtering process is not skipped. If the filtering process is not skipped, the BS value may be further determined, and if the BS value is greater than 0 (for example, the BS value is 1, 2, 3, 4, etc.), filtering may be performed on the pixels on both sides of the boundary. If the BS value is 0, filtering is not performed, that is, filtering is not performed on the pixels on both sides of the boundary. Based on this, the "BS value being 0" can be set as the enabling condition of the emphasis adjustment mode, that is, if the BS value of the current pixel point in the current block is 0, the current pixel point in the current block meets the enabling condition of the emphasis adjustment mode, and if the BS value of the current pixel point in the current block is greater than 0, the current pixel point in the current block does not meet the enabling condition of the emphasis adjustment mode.

[0136] As an example, when the boundary strength of the filtering target boundary corresponding to the current pixel point in the current block satisfies the enable condition of the emphasis adjustment mode, it is determined that the current pixel point satisfies the enable condition of the emphasis adjustment mode. For example, the boundary strength of the filtering target boundary corresponding to the current pixel point may be determined first, and if the boundary strength is a predetermined first numerical value, it may be determined that the boundary strength satisfies the enable condition of the emphasis adjustment mode. The predetermined first numerical value may be arranged based on experience, for example, the predetermined first numerical value is 0. In summary, if the boundary strength of the filtering target boundary corresponding to the current pixel point is 0, it indicates that the boundary strength of the filtering target boundary corresponding to the current pixel point satisfies the enable condition of the emphasis adjustment mode, and it is determined that the current pixel point satisfies the enable condition of the emphasis adjustment mode.

[0137] Alternatively, if the boundary strength of the boundary to be filtered corresponding to the current pixel point in the current block does not satisfy the enabling condition of the emphasis adjustment mode, it is determined that the current pixel point does not satisfy the enabling condition of the emphasis adjustment mode. For example, if the boundary strength of the boundary to be filtered corresponding to the current pixel point is not a predetermined first numerical value, it is determined that the boundary strength does not satisfy the enabling condition of the emphasis adjustment mode, and thus it can be determined that the current pixel point in the current block does not satisfy the enabling condition of the emphasis adjustment mode.

[0138] As an example, if the current pixel point satisfies the enable condition of the emphasis adjustment mode, the emphasis adjustment mode can be used to adjust the original pixel value of the current pixel point, so as to make the pixel value closer to the original pixel. For example, a gradient value of the current pixel point may be determined based on the original pixel value of the current pixel point first, and an adjusted pixel value of the current pixel point may be determined based on the gradient value of the current pixel point and the original pixel value of the current pixel point. The process of determining the adjusted pixel value may refer to the following embodiments.

[0139] Example 4: When a filtering process needs to be performed, first, it is necessary to judge whether to skip the filtering process. For example, if the blocks on both sides of the boundary are both non-intraframe mode blocks, there is no residual, and the motion is consistent, the filtering process is skipped; otherwise, the filtering process is not skipped. If the filtering process is not skipped, the BS value may be further determined, and if the BS value is greater than 0 (for example, the BS value is 1, 2, 3, 4, etc.), filtering may be performed on the pixels on both sides of the boundary. If the BS value is 0, filtering is not performed, that is, filtering is not performed on the pixels on both sides of the boundary. Based on this, the "BS value being 0" can be set as the enabling condition of the normal filtering mode, that is, if the BS value of the current pixel point in the current block is greater than 0, the current pixel point in the current block meets the enabling condition of the normal filtering mode, and if the BS value of the current pixel point in the current block is equal to 0, the current pixel point in the current block does not meet the enabling condition of the normal filtering mode.

[0140] As an example, when the boundary strength of the filtered boundary corresponding to the current pixel point in the current block satisfies the enable condition of the normal filtering mode, it is determined that the current pixel point satisfies the enable condition of the normal filtering mode. For example, the boundary strength of the filtered boundary corresponding to the current pixel point may be determined first, and if the boundary strength is a predetermined second numerical value, it may be determined that the boundary strength satisfies the enable condition of the normal filtering mode. The predetermined second numerical value may be arranged based on experience, for example, the predetermined second numerical value may be greater than 0, for example, the predetermined second numerical value may be 1, 2, 3, 4, etc. In summary, if the boundary strength of the filtered boundary corresponding to the current pixel point is greater than 0 (i.e., the boundary strength is not 0), it is indicated that the boundary strength of the filtered boundary corresponding to the current pixel point satisfies the enable condition of the normal filtering mode, and it is determined that the current pixel point satisfies the enable condition of the normal filtering mode.

[0141] Alternatively, if the boundary strength of the boundary to be filtered corresponding to the current pixel point in the current block does not satisfy the enable condition of the normal filtering mode, it is determined that the current pixel point does not satisfy the enable condition of the normal filtering mode. For example, if the boundary strength of the boundary to be filtered corresponding to the current pixel point (e.g., 0) is not a predetermined second numerical value, it is determined that the boundary strength does not satisfy the enable condition of the normal filtering mode, and thus it can be determined that the current pixel point in the current block does not satisfy the enable condition of the normal filtering mode.

[0142] As an example, if the current pixel point satisfies the enable condition of the normal filtering mode, deblocking filtering (i.e., DBF filtering, in this specification, deblocking filtering is taken as an example) may be further performed on the original pixel value of the current pixel point to obtain a filtered pixel value of the current pixel point.

[0143] Example 5: In addition to performing deblocking filtering on the original pixel value of the current pixel point to obtain the filtered pixel value of the current pixel point, the current pixel point in the current block may also determine whether it satisfies the enable condition of the emphasis filtering mode. For example, it is determined whether the absolute value of the difference between the filtered pixel value of the current pixel point and the original pixel value of the current pixel point is greater than a predetermined threshold, and if it is greater than the predetermined threshold, it is determined that the current pixel point in the current block satisfies the enable condition of the emphasis filtering mode, and if it is not greater than the predetermined threshold, it is determined that the current pixel point in the current block does not satisfy the enable condition of the emphasis filtering mode. In summary, the current pixel point in the current block satisfies the enable condition of the emphasis filtering mode may include determining that the current pixel point satisfies the enable condition of the emphasis filtering mode if the boundary strength of the filtering target boundary corresponding to the current pixel point in the current block satisfies the enable condition of the emphasis filtering mode, and the absolute value of the difference between the filtered pixel value of the current pixel point and the original pixel value of the current pixel point is greater than a predetermined threshold.

[0144] The enable conditions for the emphasis filtering mode will be described below in accordance with a specific embodiment.

[0145] When a filtering process needs to be performed, it is first necessary to determine whether or not to skip the filtering process. If the filtering process is not skipped, a BS value may be further determined, and if the BS value is greater than 0, filtering may be performed on the pixels on both sides of the boundary. Based on this, the enabling condition for the emphasis filtering mode may be "BS value is greater than 0", that is, "BS value is greater than 0" may be the enabling condition for both the normal filtering mode and the emphasis filtering mode. If the BS value is greater than 0, deblocking filtering must be performed on the original pixel value of the current pixel point to obtain the filtered pixel value of the current pixel point. After obtaining the filtered pixel value of the current pixel point, it may be further determined whether the absolute value of the difference between the filtered pixel value of the current pixel point and the original pixel value of the current pixel point is greater than a predetermined threshold, and "the absolute value of the difference is greater than a predetermined threshold" may be the enabling condition for the emphasis filtering mode.

[0146] In summary, if the boundary strength of the filtered boundary corresponding to the current pixel point in the current block satisfies the enabling condition of the emphasis filtering mode, and the absolute value of the difference between the filtered pixel value of the current pixel point and the original pixel value of the current pixel point is greater than a predetermined threshold, it is determined that the current pixel point satisfies the enabling condition of the emphasis filtering mode. Otherwise, it is determined that the current pixel point does not satisfy the enabling condition of the emphasis filtering mode. For example, first determine the boundary strength of the filtered boundary corresponding to the current pixel point, and if the boundary strength is a predetermined second value, it is determined that the boundary strength satisfies the enabling condition of the emphasis filtering mode. The predetermined second value can be arranged based on experience, for example, the predetermined second value can be greater than 0, for example, the predetermined second value can be 1, 2, 3, 4, etc.

[0147] As an example, if the current pixel point satisfies the enabling condition of the emphasis filtering mode, the adjusted pixel value of the current pixel point is determined based on the filtered pixel value of the current pixel point and the original pixel value of the current pixel point, that is, the adjusted pixel value of the current pixel point can be taken as the target pixel value of the current pixel point (the final pixel value of the deblocking filtering process).If the current pixel point in the current block does not satisfy the enabling condition of the emphasis filtering mode, the filtered pixel value of the current pixel point is not adjusted, and the filtered pixel value of the current pixel point is taken as the target pixel value of the current pixel point (the final pixel value of the deblocking filtering process).

[0148] As can be seen from the above embodiments 1, 2, 3, 4 and 5, this specification relates to the emphasis adjustment mode, the normal filtering mode and the emphasis filtering mode, and may process the original pixel value of the current pixel point according to the emphasis adjustment mode, the normal filtering mode or the emphasis filtering mode to obtain the target pixel value (i.e., the final pixel value) of the current pixel point. For example, when the current pixel point meets the enable condition of the emphasis adjustment mode, the emphasis adjustment mode may adjust the original pixel value of the current pixel point according to the gradient value of the current pixel point to obtain the adjusted pixel value of the current pixel point, and the adjusted pixel value may be the target pixel value. For example, when the current pixel point meets the enable condition of the normal filtering mode but does not meet the enable condition of the emphasis filtering mode, the normal filtering mode may filter the original pixel value of the current pixel point to obtain the filtered pixel value of the current pixel point, and the filtered pixel value may be the target pixel value. For example, when the current pixel point satisfies the enable condition for the normal filtering mode and also satisfies the enable condition for the enhancement filtering mode, the original pixel value of the current pixel point may be filtered in the enhancement filtering mode to obtain a filtered pixel value for the current pixel point, the original pixel value of the current pixel point may be adjusted based on the filtered pixel value of the current pixel point to obtain an adjusted pixel value for the current pixel point, and the adjusted pixel value may be set as the target pixel value.

[0149] In one possible embodiment, when performing deblocking filtering on a current block, the original pixel value of the current pixel point can be processed using the emphasis adjustment mode, the normal filtering mode, or the emphasis filtering mode, i.e., the emphasis adjustment mode, the normal filtering mode, and the emphasis filtering mode all belong to the deblocking filtering mode, i.e., the emphasis adjustment mode, the normal filtering mode, and the emphasis filtering mode can be sub-modes in the deblocking filtering mode. Based on this, in the deblocking filtering mode, it may be determined that the emphasis adjustment mode is used to process the original pixel value of the current pixel point, or the normal filtering mode is used to process the original pixel value of the current pixel point, or the emphasis filtering mode is used to process the original pixel value of the current pixel point.

[0150] Of course, the emphasis adjustment mode, the normal filtering mode, and the emphasis filtering mode may belong to other types of filtering modes, such as, for example, the SAO filtering mode or the ALF filtering mode, that is, the emphasis adjustment mode, the normal filtering mode, and the emphasis filtering mode may be sub-modes in the SAO filtering mode, or the emphasis adjustment mode, the normal filtering mode, and the emphasis filtering mode may be sub-modes in the ALF filtering mode. Based on this, in the SAO filtering mode or the ALF filtering mode, it may be determined to process the original pixel value of the current pixel point using the emphasis adjustment mode, or to process the original pixel value of the current pixel point using the normal filtering mode, or to process the original pixel value of the current pixel point using the emphasis filtering mode.

[0151] For example, taking the emphasis refinement mode, the normal filtering mode, and the emphasis filtering mode as all belonging to the deblocking filtering mode, the normal filtering mode can be called the normal mode of the deblocking filtering mode, that is, after performing deblocking filtering on the original pixel value of the current pixel point to obtain a filtered pixel value, the deblocking filtered filtered pixel value is not adjusted. The emphasis filtering mode can be called the deblocking filtering refinement mode (abbreviated as DBR), that is, after performing deblocking filtering on the original pixel value of the current pixel point to obtain a filtered pixel value, the deblocking filtered filtered pixel value needs to be further adjusted. The emphasis refinement mode can be called the alternative deblocking filtering refinement mode (abbreviated as ADBR), that is, after not performing deblocking filtering on the original pixel value of the current pixel point, the original pixel value of the current pixel point is directly adjusted.

[0152] Example 6: For example 1, example 2 and example 3, an emphasis adjustment mode may be used to adjust the original pixel value of the current pixel point, and the following steps may be used when adjusting the original pixel value.

[0153] In step S21, a gradient value of the current pixel point is determined based on the original pixel value of the current pixel point and the original pixel values ​​of the neighboring pixel points of the current pixel point. For example, the gradient value of the current pixel point may be determined based on the difference between the original pixel value of the current pixel point and the original pixel values ​​of the neighboring pixel points, and the determination method is not limited thereto.

[0154] In step S22, a reference pixel point corresponding to the current pixel point is determined from an adjacent block of the current block (for a vertical boundary, the adjacent block is the adjacent block on the left side of the current block, and for a horizontal boundary, the adjacent block is the adjacent block on the upper side of the current block), and a gradient value of the reference pixel point is determined based on the original pixel value of the reference pixel point and the original pixel values ​​of the pixel points surrounding the reference pixel point. For example, the gradient value of the reference pixel point may be determined based on the difference between the original pixel value of the reference pixel point and the original pixel values ​​of the pixel points surrounding the reference pixel point, and this determination method is not limited.

[0155] As an example, a gradient value of a current pixel point is determined based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point (e.g., the neighboring pixel points are reference pixel points), and a gradient value of a reference pixel point is determined based on original pixel values ​​of neighboring pixel points of the reference pixel point (e.g., the neighboring pixel point is the current pixel point) and original pixel value of the reference pixel point.

[0156] For example, if pi is the original pixel value of the current pixel point in the current block, i.e., the original pixel value of the peripheral pixel point of the reference pixel point, and qi is the original pixel value of the reference pixel point in the adjacent block, i.e., the original pixel value of the peripheral pixel point of the current pixel point, i.e., pi and qi are the original pixel values ​​on both sides of the boundary, respectively, the gradient value DPi of the current pixel point pi may be determined by DPi=(pi-qi+2)>>2, and the gradient value DQi of the reference pixel point qi may be determined by DQi=(qi-pi+2)>>2. Of course, the above is only an example of determining the gradient value of the current pixel point and the gradient value of the reference pixel point, and is not limited thereto. Obviously, the gradient value of the current pixel point may be determined based on the difference between the original pixel value of the current pixel point and the original pixel value of the peripheral pixel point. The gradient value of the reference pixel point may be determined based on the difference between the original pixel value of the reference pixel point and the original pixel value of the current pixel point.

[0157] Take the current pixel point pi as p0 (corresponding to R0 in FIG. 3) and the reference pixel point qi as q0 (corresponding to L0 in FIG. 3) as an example, the gradient value DP0 of the current pixel point p0 is determined by DP0=(p0-q0+2)>>2, and the gradient value DQ0 of the reference pixel point q0 is determined by DQ0=(q0-p0+2)>>2. Another expression for DP0=(p0-q0+2)>>2 is DP0=(p0-q0+1)>>1, and another expression for DQ0=(q0-p0+2)>>2 is DQ0=(q0-p0+1)>>1.

[0158] In step S23, an adjusted pixel value of the current pixel point is determined based on the gradient value of the current pixel point and the original pixel value of the current pixel point. For example, if the gradient value of the current pixel point is greater than the first adjustment threshold, an adjusted pixel value of the current pixel point is determined based on the original pixel value of the current pixel point and the first adjustment offset value (which may also be referred to as a first adjustment offset amount). If the gradient value of the current pixel point is less than the second adjustment threshold, an adjusted pixel value of the current pixel point is determined based on the original pixel value of the current pixel point and the second adjustment offset value. As an example, the first adjustment threshold and the second adjustment threshold may be mutual inverses.

[0159] In step S24, an adjusted pixel value of the reference pixel point is determined based on the gradient value of the reference pixel point and the original pixel value of the reference pixel point. For example, if the gradient value of the reference pixel point is greater than the third adjustment threshold, an adjusted pixel value of the reference pixel point is determined based on the original pixel value of the reference pixel point and a third adjustment offset value (which may be referred to as a third adjustment offset amount). If the gradient value of the reference pixel point is less than the fourth adjustment threshold, an adjusted pixel value of the reference pixel point is determined based on the original pixel value of the reference pixel point and the fourth adjustment offset value. As an example, the third adjustment threshold and the fourth adjustment threshold may be mutually inverse numbers.

[0160] For example, if the gradient value DPi of the current pixel point pi is greater than alt_dbr_th (alt_dbr_th represents a first adjustment threshold), the adjusted pixel value Pi of the current pixel point pi may be determined by Pi=clip(pi+alt_dbr_offset0), where alt_dbr_offset0 may represent a first adjustment offset value. Or, if the gradient value DPi of the current pixel point pi is less than -alt_dbr_th (-alt_dbr_th represents a second adjustment threshold), the adjusted pixel value Pi of the current pixel point pi may be determined by Pi=clip(pi+alt_dbr_offset1), where alt_dbr_offset1 may represent a second adjustment offset value.

[0161] In the above embodiment, i may be 0, 1, or 2. Taking the example of i being 0, if DP0>dbr_th, then p0=clip(p0+alt_dbr_offset0), and if DP0<-dbr_th, then p0=clip(p0+alt_dbr_offset1).

[0162] For example, if the gradient value DQi of the reference pixel point qi is greater than alt_dbr_th (alt_dbr_th represents the third adjustment threshold, where the third adjustment threshold is taken as an example to be the same as the first adjustment threshold, and in actual applications, the third adjustment threshold may be different from the first adjustment threshold), the adjusted pixel value Qi of the reference pixel point qi may be determined by Qi=clip(qi+alt_dbr_offset0), where alt_dbr_offset0 may represent the third adjustment offset value, where the third adjustment offset value is taken as an example to be the same as the first adjustment offset value, and in actual applications, the third adjustment offset value may be different from the first adjustment offset value.

[0163] Alternatively, if the gradient value DQi of the reference pixel point qi is smaller than -alt_dbr_th (-alt_dbr_th represents the fourth adjustment threshold, where the fourth adjustment threshold is taken as an example to be the same as the second adjustment threshold, and in actual applications, the fourth adjustment threshold may be different from the second adjustment threshold), the adjusted pixel value Qi of the reference pixel point qi may be determined by Qi=clip(qi+alt_dbr_offset1), where alt_dbr_offset1 may represent the fourth adjustment offset value, where the fourth adjustment offset value is taken as an example to be the same as the second adjustment offset value, and in actual applications, the fourth adjustment offset value may be different from the second adjustment offset value.

[0164] In the above embodiment, i may be 0, 1, or 2. Taking the example of i being 0, if DQ0>dbr_th, then Q0=clip(q0+alt_dbr_offset0), and if DQ0<-dbr_th, then Q0=clip(q0+alt_dbr_offset1).

[0165] In the above embodiment, pi represents the original pixel value of the current pixel point, DPi represents the gradient value of the current pixel point, Pi represents the adjusted pixel value of the current pixel point, qi represents the original pixel value of the reference pixel point, DQi represents the gradient value of the reference pixel point, and Qi represents the adjusted pixel value of the reference pixel point. clip(x) represents limiting x to between [0,2^(lbit_depth)-1] (inclusive), and bit_depth represents the bit depth of the image, which is generally 8, 10, 12, etc.

[0166] In one possible embodiment, the decoding side may analyze the first adjustment threshold, the first adjustment offset value, the second adjustment offset value, the third adjustment threshold, the third adjustment offset value, and the fourth adjustment offset value corresponding to the current block from the high-level syntax. Since the first adjustment threshold and the second adjustment threshold are mutually inverse numbers, and the third adjustment threshold and the fourth adjustment threshold are mutually inverse numbers, the decoding side can determine the second adjustment threshold and the fourth adjustment threshold.

[0167] In another possible embodiment, the decoding side may analyze the first adjustment threshold, the first adjustment offset value, the second adjustment offset value, the fourth adjustment threshold, the third adjustment offset value, and the fourth adjustment offset value corresponding to the current block from the high-level syntax. Since the first adjustment threshold and the second adjustment threshold are mutually inverse numbers, and the third adjustment threshold and the fourth adjustment threshold are mutually inverse numbers, the decoding side can determine the second adjustment threshold and the third adjustment threshold.

[0168] In another possible embodiment, the decoding side may analyze the second adjustment threshold, the first adjustment offset value, the second adjustment offset value, the third adjustment threshold, the third adjustment offset value, and the fourth adjustment offset value corresponding to the current block from the high-level syntax. The first adjustment threshold and the second adjustment threshold are mutually inverse numbers, and the third adjustment threshold and the fourth adjustment threshold are mutually inverse numbers, so that the decoding side can determine the first adjustment threshold and the fourth adjustment threshold.

[0169] In another possible embodiment, the decoding side may analyze the second adjustment threshold, the first adjustment offset value, the second adjustment offset value, the fourth adjustment threshold, the third adjustment offset value and the fourth adjustment offset value corresponding to the current block from the high-level syntax. The first adjustment threshold and the second adjustment threshold are mutually inverse numbers, and the third adjustment threshold and the fourth adjustment threshold are mutually inverse numbers, so that the decoding side can determine the first adjustment threshold and the third adjustment threshold.

[0170] In another possible embodiment, the decoding side may analyze the first adjustment threshold (or the second adjustment threshold, or the third adjustment threshold, or the fourth adjustment threshold, i.e., one adjustment threshold can derive the other three adjustment thresholds), the first adjustment offset value (or the third adjustment offset value), and the second adjustment offset value (or the fourth adjustment offset value) corresponding to the current block from the high-level syntax. Based on this, the first adjustment threshold and the second adjustment threshold are mutually inverse numbers, so the second adjustment threshold can be determined. The first adjustment threshold and the third adjustment threshold are the same, so the third adjustment threshold can be determined. The third adjustment offset value and the first adjustment offset value are the same, so the third adjustment offset value can be determined. The fourth adjustment offset value and the second adjustment offset value are the same, so the fourth adjustment offset value can be determined. The third adjustment threshold and the fourth adjustment threshold are mutually inverse numbers, so the fourth adjustment threshold can be determined.

[0171] Of course, the above forms are only a few examples, and there is no limitation thereon, as long as the decoding side can obtain the first adjustment threshold, the second adjustment threshold, the third adjustment threshold, the fourth adjustment threshold, the first adjustment offset value, the second adjustment offset value, the third adjustment offset value and the fourth adjustment offset value, that is, the above numerical values ​​can be obtained by analysis or derivation.

[0172] In the above embodiment, the high level syntax may include, but is not limited to, one of the following: SPS level high level syntax, PPS level high level syntax, picture header level high level syntax, picture level high level syntax, slice header level high level syntax, CTU level high level syntax, and CU level high level syntax. Of course, the above are only some examples of high level syntax, and as long as the high level syntax can add the adjustment threshold value and adjustment offset value corresponding to the current block, the type of the high level syntax is not limited.

[0173] In the above embodiment, the pixel value of the current pixel point in the current block may be a luminance component or a chrominance component.

[0174] In one possible embodiment, the emphasis adjustment mode enable flag bit may represent whether to allow the emphasis adjustment mode to be enabled, and if the emphasis adjustment mode enable flag bit allows the current block to enable the emphasis adjustment mode, it is necessary to determine whether the current pixel point in the current block meets the enable condition of the emphasis adjustment mode, and if the current pixel point meets the enable condition of the emphasis adjustment mode, the emphasis adjustment mode is used to adjust the original pixel value of the current pixel point. If the emphasis adjustment mode enable flag bit does not allow the current block to enable the emphasis adjustment mode, it directly determines that each pixel point in the current block does not meet the enable condition of the emphasis adjustment mode, and the emphasis adjustment mode is not used to adjust the original pixel value of the current pixel point. Based on this, if the emphasis adjustment mode enable flag bit corresponding to the current block allows the emphasis adjustment mode to be enabled, it determines whether the current pixel point in the current block meets the enable condition of the emphasis adjustment mode. If the emphasis adjustment mode enable flag bit corresponding to the current block does not allow the emphasis adjustment mode to be enabled, it determines that each pixel point in the current block does not meet the enable condition of the emphasis adjustment mode.

[0175] As an example, the decoding side may analyze the enhancement adjustment mode enable flag bit corresponding to the current block from the high-level syntax, for example, if the enhancement adjustment mode enable flag bit is a first value (e.g., 1), it indicates that the enhancement adjustment mode enable flag bit allows the current block to enable the enhancement adjustment mode, and if the enhancement adjustment mode enable flag bit is a second value (e.g., 0), it indicates that the enhancement adjustment mode enable flag bit does not allow the current block to enable the enhancement adjustment mode.

[0176] In the above embodiment, the high level syntax may include, but is not limited to, one of the following: SPS level high level syntax, PPS level high level syntax, picture header level high level syntax, picture level high level syntax, slice header level high level syntax, CTU level high level syntax, and CU level high level syntax. Of course, the above are only some examples of high level syntax, and as long as the high level syntax can add the enhancement adjustment mode enable flag bit corresponding to the current block, the type of the high level syntax is not limited.

[0177] Example 7: For example, in comparison with example 1 and example 5, the original pixel value of the current pixel point may be adjusted using an emphasis filtering mode. When adjusting the original pixel value of the current pixel point, the following steps may be used:

[0178] In step S31, deblocking filtering is performed on the original pixel value of the current pixel point to obtain a filtered pixel value of the current pixel point.

[0179] In step S32, a reference pixel point corresponding to the current pixel point is determined from an adjacent block of the current block (for a vertical boundary, the adjacent block is the adjacent block to the left of the current block, and for a horizontal boundary, the adjacent block is the adjacent block above the current block), and deblocking filtering is performed on the original pixel value of the reference pixel point to obtain a filtered pixel value of the reference pixel point.

[0180] As an example, deblocking filtering is performed on the original pixel value of the current pixel point using a DBF filtering (i.e., deblocking filtering) method to obtain a filtered pixel value of the current pixel point, and deblocking filtering is performed on the original pixel value of the reference pixel point using the DBF filtering method to obtain a filtered pixel value of the reference pixel point. Of course, filtering may be performed on the original pixel value of the current pixel point using the SAO filtering method to obtain a filtered pixel value of the current pixel point, and filtering may be performed on the original pixel value of the reference pixel point using the SAO filtering method to obtain a filtered pixel value of the reference pixel point. Alternatively, filtering may be performed on the original pixel value of the current pixel point using the ALF filtering method to obtain a filtered pixel value of the current pixel point, and filtering may be performed on the original pixel value of the reference pixel point using the ALF filtering method to obtain a filtered pixel value of the reference pixel point. For convenience of explanation, the following embodiments will be exemplified by performing deblocking filtering on the original pixel values ​​of the current pixel point and the reference pixel point using the DBF filtering method.

[0181] As shown in FIG. 3, based on the position of the current pixel point, only horizontal DBF filtering may be performed on the current pixel point and the reference pixel point, or only vertical DBF filtering may be performed on the current pixel point and the reference pixel point, or further, vertical DBF filtering may be performed on the current pixel point and the reference pixel point first, and then horizontal DBF filtering may be performed on the current pixel point and the reference pixel point.

[0182] In step S33, an adjusted pixel value of the current pixel point is determined according to the filtered pixel value of the current pixel point and the original pixel value of the current pixel point, for example, the adjusted pixel value of the current pixel point is determined according to the filtered pixel value of the current pixel point, the original pixel value of the current pixel point, a first filtering threshold, a second filtering threshold, a first filtering offset value, and a second filtering offset value, where the first filtering threshold and the second filtering threshold may be mutually inverse numbers.

[0183] In step S34, an adjusted pixel value of the reference pixel point is determined according to the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point, for example, the adjusted pixel value of the reference pixel point is determined according to the filtered pixel value of the reference pixel point, the original pixel value of the reference pixel point, a third filtering threshold, a fourth filtering threshold, a third filtering offset value, and a fourth filtering offset value, where the third filtering threshold and the fourth filtering threshold may be mutually inverse numbers.

[0184] As an example, if the current pixel point satisfies only the enable condition of the normal filtering mode but not the enable condition of the emphasis filtering mode, steps S31 and S32 are executed, and the filtered pixel value is set as the target pixel value (the final pixel value of the deblocking filtering process).If the current pixel point satisfies the enable condition of the normal filtering mode and the enable condition of the emphasis filtering mode, steps S31 to S34 are executed, and the adjusted pixel value is set as the target pixel value (the final pixel value of the deblocking filtering process).

[0185] In steps S33 and S34, emphasis filtering can be performed on the original pixel value of the pixel point based on the filtered pixel value and the original pixel value that has not been filtered. In other words, emphasis filtering is performed on the original pixel value of the pixel point to obtain an emphasis-processed adjusted pixel value, which makes the emphasis-processed adjusted pixel value closer to the true pixel than the filtered pixel value, thereby preventing the filtered pixel value due to over-filtering from being much larger or much smaller than the true pixel value of the pixel point, and improving image quality.

[0186] As an example, in step S33, if a difference between the filtered pixel value of the current pixel point and the original pixel value of the current pixel point is greater than a first filtering threshold, an adjusted pixel value of the current pixel point may be determined based on the filtered pixel value of the current pixel point, the original pixel value of the current pixel point, and the first filtering offset value, and if a difference between the filtered pixel value of the current pixel point and the original pixel value of the current pixel point is less than a second filtering threshold, an adjusted pixel value of the current pixel point may be determined based on the filtered pixel value of the current pixel point, the original pixel value of the current pixel point, and the second filtering offset value.

[0187] For example, Y 1 (i) is the original pixel value of the current pixel point, Y 2 (i) is the filtered pixel value of the current pixel point, Y 3 Let (i) denote the adjusted pixel value of the current pixel point, and Y v (i)=(Y 1 (i)+Y 2 Let (i)+1)>>1.

[0188] Based on this, Y 1 (i)-Y 2 (i)>T v If so, Y 3 (i) = Clip(Y v (i)+f0 v ) and Y 1 (i)-Y 2 (i) <NT v If so, Y 3 (i) = Clip(Y v (i)+f1 v ) In the above formula, T v may represent the first filtering threshold, and f0 v may represent a first filtering offset value, and NT v can represent the second filtering threshold, and f1 v may represent a second filtering offset value, and NT v Generally, -T vor other values, and clip(x) represents the restriction of x to a given range of values, typically [0, 2 D where D is the image bit depth; for 8-bit images it is in the range [0,255], and for 10-bit images it is in the range [0,1023].

[0189] In order to prevent the adjusted pixel value after the enhancement process from exceeding the pixel value range, the adjusted pixel value may be clipped to a predetermined value range by a clip operation when obtaining the adjusted pixel value. If the adjusted pixel value is greater than the upper limit of the predetermined value range, the adjusted pixel value is set to the upper limit of the predetermined value range, and if the adjusted pixel value is less than the lower limit of the predetermined value range, the adjusted pixel value is set to the lower limit of the predetermined value range. For example, in the case of an 8-bit image, if the adjusted pixel value is less than 0, the adjusted pixel value is set to 0, and if the adjusted pixel value is greater than 255, the adjusted pixel value is set to 255.

[0190] As an example, in step S34, if the difference between the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point is greater than a third filtering threshold, an adjusted pixel value of the reference pixel point may be determined based on the filtered pixel value of the reference pixel point, the original pixel value of the reference pixel point, and the third filtering offset value. If the difference between the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point is smaller than a fourth filtering threshold, an adjusted pixel value of the reference pixel point may be determined based on the filtered pixel value of the reference pixel point, the original pixel value of the reference pixel point, and the fourth filtering offset value. The method of determining the adjusted pixel value of the reference pixel point is the same as the method of determining the adjusted pixel value of the current pixel point, and a duplicated description will be omitted here.

[0191] As an example, the third filtering threshold and the first filtering threshold may be the same or different, the third filtering offset value and the first filtering offset value may be the same or different, the fourth filtering threshold and the second filtering threshold may be the same or different, and the fourth filtering offset value and the second filtering offset value may be the same or different.

[0192] In one possible embodiment, the decoding side may analyze the first filtering threshold, the first filtering offset value, the second filtering offset value, the third filtering threshold, the third filtering offset value and the fourth filtering offset value corresponding to the current block from the high-level syntax. Since the first filtering threshold and the second filtering threshold are mutually inverse numbers, and the third filtering threshold and the fourth filtering threshold are mutually inverse numbers, the decoding side can determine the second filtering threshold and the fourth filtering threshold.

[0193] In another possible embodiment, the decoding side may analyze the first filtering threshold, the first filtering offset value, the second filtering offset value, the fourth filtering threshold, the third filtering offset value and the fourth filtering offset value corresponding to the current block from the high-level syntax. Since the first filtering threshold and the second filtering threshold are mutually inverse numbers, and the third filtering threshold and the fourth filtering threshold are mutually inverse numbers, the decoding side can determine the second filtering threshold and the third filtering threshold.

[0194] In another possible embodiment, the decoding side may analyze the second filtering threshold, the first filtering offset value, the second filtering offset value, the third filtering threshold, the third filtering offset value and the fourth filtering offset value corresponding to the current block from the high-level syntax. Since the first filtering threshold and the second filtering threshold are mutually inverse numbers, and the third filtering threshold and the fourth filtering threshold are mutually inverse numbers, the decoding side can determine the first filtering threshold and the fourth filtering threshold.

[0195] In another possible embodiment, the decoding side may analyze the second filtering threshold, the first filtering offset value, the second filtering offset value, the fourth filtering threshold, the third filtering offset value and the fourth filtering offset value corresponding to the current block from the high-level syntax. Since the first filtering threshold and the second filtering threshold are mutually inverse numbers, and the third filtering threshold and the fourth filtering threshold are mutually inverse numbers, the decoding side can determine the first filtering threshold and the third filtering threshold.

[0196] In another possible embodiment, the decoding side may analyze the first filtering threshold (or the second filtering threshold, or the third filtering threshold, or the fourth filtering threshold, i.e., one filtering threshold can derive the other three filtering thresholds), the first filtering offset value (or the third filtering offset value), and the second filtering offset value (or the fourth filtering offset value) corresponding to the current block from the high-level syntax. Based on this, the first filtering threshold and the second filtering threshold are mutually inverse numbers, so the second filtering threshold can be determined. The first filtering threshold and the third filtering threshold are the same, so the third filtering threshold can be determined. The third filtering offset value and the first filtering offset value are the same, so the third filtering offset value can be determined. The fourth filtering offset value and the second filtering offset value are the same, so the fourth filtering offset value can be determined. The third filtering threshold and the fourth filtering threshold are mutually inverse numbers, so the fourth filtering threshold can be determined.

[0197] Of course, the above forms are only some examples, and there is no limitation thereon, as long as the decoding side can obtain the first filtering threshold, the second filtering threshold, the third filtering threshold, the fourth filtering threshold, the first filtering offset value, the second filtering offset value, the third filtering offset value and the fourth filtering offset value, that is, the above numerical values ​​can be obtained by analysis or derivation.

[0198] In the above embodiment, the high level syntax may include, but is not limited to, one of the following: SPS level high level syntax, PPS level high level syntax, picture header level high level syntax, picture level high level syntax, slice header level high level syntax, CTU level high level syntax, and CU level high level syntax. Of course, the above are only some examples of high level syntax, and as long as the high level syntax can add the filtering threshold value and filtering offset value corresponding to the current block, the type of the high level syntax is not limited.

[0199] In the above embodiment, the pixel value of the current pixel point in the current block may be a luminance component or a chrominance component.

[0200] In one possible embodiment, the emphasis filtering mode enable flag bit can represent whether to allow the emphasis filtering mode to be enabled, and if the emphasis filtering mode enable flag bit allows the current block to enable the emphasis filtering mode, it is necessary to determine whether the current pixel point in the current block meets the enable condition of the emphasis filtering mode, and if the current pixel point meets the enable condition of the emphasis filtering mode, the emphasis filtering mode is used to adjust the original pixel value of the current pixel point. If the emphasis filtering mode enable flag bit does not allow the current block to enable the emphasis filtering mode, it directly determines that each pixel point in the current block does not meet the enable condition of the emphasis filtering mode, and does not use the emphasis filtering mode to adjust the original pixel value of the current pixel point. Based on this, if the emphasis filtering mode enable flag bit corresponding to the current block allows the current block to enable the emphasis filtering mode, it determines whether the current pixel point in the current block meets the enable condition of the emphasis adjustment mode. If the emphasis filtering mode enable flag bit corresponding to the current block does not allow the current block to enable the emphasis filtering mode, it determines that each pixel point in the current block does not meet the enable condition of the emphasis filtering mode.

[0201] As an example, the decoding side may analyze an enhancement filtering mode enable flag bit corresponding to a current block from a high-level syntax, for example, if the enhancement filtering mode enable flag bit is a first value (e.g., 1), it indicates that the enhancement filtering mode enable flag bit allows the current block to enable the enhancement filtering mode, and if the enhancement filtering mode enable flag bit is a second value (e.g., 0), it indicates that the enhancement filtering mode enable flag bit does not allow the current block to enable the enhancement filtering mode.

[0202] In the above embodiment, the high level syntax may include, but is not limited to, one of the following: SPS level high level syntax, PPS level high level syntax, picture header level high level syntax, picture level high level syntax, slice header level high level syntax, CTU level high level syntax, and CU level high level syntax. Of course, the above are only some examples of high level syntax, and as long as the high level syntax can add the enhancement filtering mode enable flag bit corresponding to the current block, the type of the high level syntax is not limited.

[0203] Example 8: When the enable condition of the normal filtering mode is met, deblocking filtering can be performed on the original pixel value of the pixel point using the DBF filtering method (i.e., the deblocking filtering method). Since DBF filtering can be divided into vertical DBF filtering and horizontal DBF filtering, the deblocking filtering process can be performed on the original pixel value of the pixel point using the following steps:

[0204] In step 1, the original pixel value Y 1 (i) is filtered by vertical DBF filtering, and the filtered pixel value Y 2 (i) is obtained, In step 2, the pixel value Y 2 (i) is filtered by horizontal DBF filtering, and the filtered pixel value Y 3 We obtain (i).

[0205] For example, if only vertical DBF filtering is performed on a pixel point, only step 1 is performed to obtain a filtered pixel value of the pixel point. If only horizontal DBF filtering is performed on a pixel point, only step 2 is performed to obtain a filtered pixel value of the pixel point, and the pixel value Y 2(i) can be replaced with the original pixel value of the pixel point. By first performing vertical DBF filtering on the pixel point and then performing horizontal DBF filtering, steps 1 and 2 are executed in sequence.

[0206] When the enabling conditions of the normal filtering mode and the enabling conditions of the enhancement filtering mode are satisfied, a DBF filtering method (i.e., a deblocking filtering method) may be used to perform deblocking filtering on the original pixel value of the pixel point, and the deblocking filtered filtered pixel value may be adjusted. Since DBF filtering can be divided into vertical DBF filtering and horizontal DBF filtering, the following steps may be used to perform a deblocking filtering process on the original pixel value of the pixel point, and the deblocking filtered filtered pixel value may be adjusted.

[0207] In step 1, the original pixel value Y 1 (i) is filtered by vertical DBF filtering, and the filtered pixel value Y 2 (i) is obtained, In step 2, Y 2 (i)-Y 1 Based on (i), the adjusted pixel value Y 3 (i) is obtained, In step 3, the pixel value Y 3 (i) is filtered by horizontal DBF filtering, and the filtered pixel value Y 4 (i) is obtained, In step 4, Y 4 (i)-Y 3 Based on (i), the adjusted pixel value Y 5 We obtain (i).

[0208] For example, if only vertical DBF filtering is performed on a pixel point, only steps 1 and 2 are performed to obtain an adjusted pixel value of the pixel point. If only horizontal DBF filtering is performed on a pixel point, only steps 3 and 4 are performed to obtain an adjusted pixel value of the pixel point, and the pixel value Y 3(i) can be replaced with the original pixel value of the pixel point. If vertical DBF filtering is performed first for a pixel point and then horizontal DBF filtering is performed, steps 1, 2, 3, and 4 are executed in sequence. If horizontal DBF filtering is performed first for a pixel point and then vertical DBF filtering is performed, the steps executed are similar, so duplicated explanations will be omitted here.

[0209] As an example, step 2 and step 4 are a processing process of using the emphasis filtering mode when an enabling condition of the emphasis filtering mode is met, that is, a process of adjusting the filtering pixel value to obtain an adjusted pixel value.

[0210] In step 2, Y v (i)=(Y 1 (i)+Y 2 If (i)+1)>>1, then Y 1 (i)-Y 2 (i)>T v If so, Y 3 (i) = Clip(Y v (i)+f0 v ) and Y 1 (i)-Y 2 (i) <NT v If so, Y 3 (i) = Clip(Y v (i)+f1 v ), otherwise Y 3 (i)=Y 2 (i) (in one embodiment, in this case Y 2 Filter (i) to get Y 3 (i) may be obtained, for example Y 3 (i)=Y 2 (i)+f2 v (It is.)

[0211] For example, clip(x) represents the restriction of x to the value range of a given image, which is generally [0, 2 D−1], and D is the bit depth of the image, so for an 8-bit image, the image value range may be [0,255], and for a 10-bit image, the image value range is [0,1023]. v Generally, -T v and may be other values.

[0212] Similarly, similar to the process in step 2, in step 4, Y h (i)=(Y 3 (i)+Y 4 If (i)+1)>>1, then Y 4 (i)-Y 3 (i)>T h If so, Y 5 (i) = Clip(Y h (i)+f0 h ) and Y 1 (i)-Y 2 (i) <NT h If so, Y 5 (i) = Clip(Y h (i)+f1 h ), otherwise Y 5 (i)=Y 4 (i) (in one embodiment, in this case Y 4 Filter (i) to get Y 5 (i) may be obtained, for example Y 5 (i)=Y 4 (i)+f2 h ), NT h Generally, -T h and may be other values.

[0213] In the above embodiment, T v and N.T. v is the filtering threshold, f0 v , f1 v and f2 v is a filtering offset value, and clip(x) represents limiting x to a certain range of values. For example, T vare the first and third filtering thresholds in the above (for example, the first and third filtering thresholds are the same), and NT v are the second and fourth filtering thresholds in the above (for example, the second and fourth filtering thresholds are the same), and f0 v is the first filtering offset value and the third filtering offset value in the above (take the first filtering offset value and the third filtering offset value as an example), and f1 v NT is the second filtering offset value and the fourth filtering offset value in the above (for example, the second filtering offset value and the fourth filtering offset value are the same). v =-T v , i.e., T v and N.T. v are mutual opposites.

[0214] In the above embodiment, T h and N.T. h is the filtering threshold, f0 h , f1 h and f2 h is a filtering offset value, and clip(x) represents limiting x to a certain range of values. For example, T h are the first and third filtering thresholds in the above (for example, the first and third filtering thresholds are the same), and NT h are the second and fourth filtering thresholds in the above (for example, the second and fourth filtering thresholds are the same), and f0 h is the first filtering offset value and the third filtering offset value in the above (take the first filtering offset value and the third filtering offset value as an example), and f1 hNT is the second filtering offset value and the fourth filtering offset value in the above (for example, the second filtering offset value and the fourth filtering offset value are the same). h =-T h , i.e., T h and N.T. h are mutual opposites.

[0215] Example 9: In DBF, when filtering is performed according to one predefined criterion, there will be a situation of over-filtering or under-filtering. For example, if the reconstruction value before DBF is Y1 and the DBF filtered pixel value is Y2, classification can be performed based on Y2-Y1. The main advantage of classification based on filtering residual is that some over-filtered or false-filtered pixel values ​​can be given special emphasis to achieve the effect of making these pixels closer to their original values. Over-filtering means that Y2 is much larger (or much smaller) than Y1, and Y2 is much larger (or much smaller) than the original pixel value. False filtering means that Y2-Y1 is 0 or close to 0, that is, these pixel values ​​do not change after filtering, and no filtering effect is obtained. Regarding the above discovery, in this embodiment, the pixel value of the pixel point can be adjusted using the emphasis adjustment mode, that is, when the emphasis adjustment mode is enabled for the current pixel point in the current block, the original pixel value of the pixel point can be adjusted using the emphasis adjustment mode without adjusting the original pixel value of the pixel point using the normal filtering mode or the emphasis filtering mode.

[0216] In one possible embodiment, the adjustment process of the original pixel values ​​may include the following steps.

[0217] In step 1, the original pixel value Y 1 (i) is filtered by vertical DBF filtering, and the filtered pixel value Y 2 (i) is obtained, In step 2, Y 2 (i)-Y 1 Based on (i), the adjusted pixel value Y 3 (i) is obtained, In step 3, the pixel value Y 3 (i) is filtered by horizontal DBF filtering, and the filtered pixel value Y 4 (i) is obtained, In step 4, Y 4 (i)-Y 3 Based on (i), the adjusted pixel value Y 4 We obtain (i).

[0218] In step 2, abs(Y 2 (i)-Y 1 (i)) < threshold and abs(Y 2 (i)-Y 1 There are two cases where abs(Y 2 (i)-Y 1 If (i))<threshold, it is further divided into two cases: BS is 0 and BS is greater than 0. As an example, the threshold may be the first filtering threshold or the second filtering threshold in the above embodiment, for example, the first filtering threshold and the second filtering threshold are mutually inverse numbers, and if the first filtering threshold is a positive value, the threshold may be the first filtering threshold, and if the second filtering threshold is a positive value, the threshold may be the second filtering threshold.

[0219] To summarize the above, the adjustment process of the original pixel values ​​can be divided into the following three cases.

[0220] In case 1, BS is 0, and no filtering is performed (i.e., Y 2 (i) is Y 1 (i) is the original pixel value Y 1 (i) corresponds to not performing vertical DBF filtering on the original pixel value Y 1(i) can be adjusted to obtain an adjusted pixel value.

[0221] In case 2, BS is greater than 0, but abs(Y 2 (i)-Y 1 (i))<threshold, and then filtering can be performed (i.e., the original pixel value Y 1 (i) performs vertical DBF filtering on (i), i.e., performs step 1). In performing step 1, furthermore, the filtering pixel values ​​Y 2 (i) is adjusted to obtain the adjusted pixel value Y 3 (i) can be obtained.

[0222] In case 3, BS is greater than 0, but abs(Y 2 (i)-Y 1 (i)) is not smaller than the threshold, and then filtering can be performed (i.e., the original pixel value Y 1 (i) performs vertical DBF filtering on (i), i.e., performs step 1). In performing step 1, filter pixel values ​​Y 2 (i) is not adjusted, i.e., step 2 is not performed, i.e., Y 3 (i)=Y 2 The result is (i).

[0223] In step 4, abs(Y 4 (i)-Y 3 (i))<threshold, and abs(Y 4 (i)-Y 3 There are two cases where abs(Y 4 (i)-Y 3 If (i))<threshold, then it is further divided into two cases: BS is 0 and BS is greater than 0.

[0224] To summarize the above, the adjustment process of the original pixel values ​​can be divided into the following three cases.

[0225] In case 1, BS is 0, and no filtering is performed (i.e., Y 4 (i) is Y 3 (i) is the original pixel value Y 3 (i) corresponds to not performing horizontal DBF filtering, i.e. not performing step 3), but the original pixel value Y 3 (i) can be adjusted to obtain an adjusted pixel value.

[0226] In case 2, BS is greater than 0, but abs(Y 4 (i)-Y 3 (i))<threshold, then filtering can be performed (i.e., the original pixel value Y 3 (i) performing horizontal DBF filtering on (i), i.e., performing step 3), and in performing step 3, further performing filtering pixel value Y 4 (i) is adjusted to obtain the adjusted pixel value Y 5 (i) can be obtained.

[0227] In case 3, BS is greater than 0, but abs(Y 4 (i)-Y 3 (i)) is not smaller than the threshold, then filtering can be performed (i.e., the original pixel value Y 3 (i) is subjected to horizontal DBF filtering, i.e., step 3 is performed. In performing step 3, the filtering pixel values ​​Y 4 (i) is not adjusted, i.e., step 4 is not performed, i.e., Y 5 (i)=Y 4 The result is (i).

[0228] In summary, if BS is 0, the emphasis adjustment mode is used for processing, that is, no filtering process is required; that is, Y 2 (i)=Y 1 (i) and Y 4 (i)=Y 3(i), and based on this, the emphasis adjustment mode is used to 1 (i) can be adjusted using the emphasis adjustment mode. 3 (i) can be adjusted so that the DBF filtering process can be performed using the following steps:

[0229] In step 1, the original pixel value Y 1 (i) is filtered by vertical DBF filtering, and the filtered pixel value Y 2 We obtain (i).

[0230] In step 2, if BS is 0, Y 1 (i) is adjusted to obtain the adjusted pixel value Y 3 (i) is obtained. BS is greater than 0 and abs(Y 2 (i)-Y 1 (i))<threshold, enable emphasis filtering mode, and 2 (i)-Y 1 Based on (i), the adjusted pixel value Y 3 (i) and refer to step 2 of Example 8. BS is greater than 0 and abs(Y 2 (i)-Y 1 If (i)) is not less than the threshold, enable the normal filtering mode and filter pixel value Y 2 (i) is not adjusted, i.e., Y 3 (i)=Y 2 The result is (i).

[0231] As an example, if BS is 0, step 1 is not actually performed, i.e., the filtered pixel value Y 2 There is no need to obtain (i).

[0232] In step 3, the pixel value Y 3 (i) is filtered by horizontal DBF filtering, and the filtered pixel value Y 4 We obtain (i).

[0233] In step 4, if BS is 0, Y 3 (i) is adjusted to obtain the adjusted pixel value Y 5 (i) is obtained. BS is greater than 0 and abs(Y 4 (i)-Y 3 (i))<threshold, enable emphasis filtering mode, and 4 (i)-Y 3 Based on (i), the adjusted pixel value Y 5 (i) and refer to step 4 of Example 8. BS is greater than 0 and abs(Y 4 (i)-Y 3 If (i)) is not less than the threshold, enable the normal filtering mode and filter pixel value Y 4 (i) is not adjusted, i.e., Y 5 (i)=Y 4 The result is (i).

[0234] As an example, if BS is 0, step 3 is not actually performed, i.e., the filtered pixel value Y 4 There is no need to obtain (i).

[0235] In another possible embodiment, if BS is greater than 0, filtering is performed, but after filtering, abs(Y 2 (i)-Y 1 If (i))<threshold, then processing can be performed in emphasis filtering mode, i.e., DBF filtering processing can be performed in the following steps:

[0236] In step 1, the original pixel value Y 1 (i) is filtered by vertical DBF filtering, and the filtered pixel value Y 2 We obtain (i).

[0237] In step 2, BS is greater than 0, but Y 1 After vertical DBF filtering on (i), we still have abs(Y 2 (i)-Y 1(i))<When the threshold is met, the pixel value Y 3 (i) is obtained, for example, Y 1 (i) is added to the compensation value to obtain Y 3 (i). Otherwise, obtain abs(Y 2 (i)-Y 1 If (i)) is not smaller than the threshold, Y 3 (i)=Y 2 The result is (i).

[0238] In step 3, the pixel value Y 3 (i) is filtered by horizontal DBF filtering, and the filtered pixel value Y 4 We obtain (i).

[0239] In step 4, BS is greater than 0, but Y 3 After horizontal DBF filtering on (i), we still have abs(Y 4 (i)-Y 3 (i))<When the threshold is met, the pixel value Y 5 (i) is obtained, for example, Y 3 (i) is added to the compensation value to obtain Y 5 (i). Otherwise, obtain abs(Y 4 (i)-Y 3 If (i)) is not smaller than the threshold, Y 5 (i)=Y 4 The result is (i).

[0240] Example 10: For Example 9, if BS is 0, Y is adjusted by the emphasis adjustment mode. 1 (i) is adjusted to obtain the adjusted pixel value Y 3 (i) is obtained, and the specific adjustment process refers to the following steps: If BS is 0, Y 3 (i) is adjusted to obtain the adjusted pixel value Y 5 (i), the process obtains the adjusted pixel value Y 3 Since this process is similar to that for obtaining (i), a duplicated explanation will be omitted here.

[0241] First, Y1 (i) Determine the gradient value of Y 1 (i) may be the original pixel value of the current pixel point or the original pixel value of the reference pixel point. 1 Horizontal gradient value DY of (i) 1 (i) may be calculated for the horizontal boundary, Y 1 Vertical gradient value DY of (i) 1 For example, let pi and qi be the original pixel value of the current pixel point and the original pixel value of the reference pixel point (Y 1 (corresponding to (i)), then the gradient value DP0 of the original pixel value pi of the current pixel point is calculated, such that DP0 = (pi - qi + 2) >> 2, and the gradient value DQ0 of the original pixel value qi of the reference pixel point is calculated, such that DQ0 = (qi - pi + 2) >> 2.

[0242] And D.Y. 1 Based on the magnitude of (i), a compensating adjustment is made to Y 3 (i) is obtained. For example, the adjusted pixel value Pi corresponding to the original pixel value pi of the current pixel point is determined in the following manner. If DPi>alt_dbr_th, Pi=clip(pi+alt_dbr_offset0), and if DPi<-alt_dbr_th, Pi=clip(pi+alt_dbr_offset1), where i is 0, 1, 2, etc. The adjusted pixel value Qi corresponding to the original pixel value qi of the reference pixel point is determined in the following manner. If DQi>alt_dbr_th, Qi=clip(qi+alt_dbr_offset0), and if DQi<-alt_dbr_th, Qi=clip(qi+alt_dbr_offset1), where i is 0, 1, 2, etc.

[0243] In the above formula, alt_dbr_th represents the first adjustment threshold and the third adjustment threshold (for example, the third adjustment threshold and the first adjustment threshold are the same), alt_dbr_offset0 represents the first adjustment offset value and the third adjustment offset value (for example, the third adjustment offset value and the first adjustment offset value are the same), alt_dbr_offset1 represents the second adjustment offset value and the fourth adjustment offset value (for example, the fourth adjustment offset value and the second adjustment offset value are the same), -alt_dbr_th represents the second adjustment threshold and the fourth adjustment threshold (for example, the fourth adjustment threshold and the second adjustment threshold are the same), and -alt_dbr_th and alt_dbr_th are mutual inverses.

[0244] Example 11: Control enabling of the emphasis adjustment mode by high level syntax (e.g., high level syntax at SPS level). For example, a flag bit adbr_enable_flag is coded / decoded in the sequence header, i.e., the coding side codes the flag bit adbr_enable_flag in the sequence header, and the decoding side decodes the flag bit adbr_enable_flag from the sequence header. adbr_enable_flag is a binary variable, where a value of "1" indicates that the emphasis adjustment mode is available, and a value of "0" indicates that the emphasis adjustment mode should not be used. The value of AdbrEnableFlag is equal to adbr_enable_flag, and if adbr_enable_flag is not present in the bitstream, the value of AdbrEnableFlag is 0.

[0245] To summarize the above, the decoding side may parse the emphasis adjustment mode enable flag bit (i.e., AdbrEnableFlag) corresponding to the current block from the high-level syntax, and if the emphasis adjustment mode enable flag bit is 1, it indicates that the emphasis adjustment mode enable flag bit allows the current block to enable the emphasis adjustment mode, and if the emphasis adjustment mode enable flag bit is 0, it indicates that the emphasis adjustment mode enable flag bit does not allow the current block to enable the emphasis adjustment mode.

[0246] Example 12: Enable of the emphasis filtering mode and enable of the emphasis adjustment mode are controlled simultaneously by a high-level syntax (e.g., high-level syntax at the SPS level). For example, the flag bit dbr_enable_flag is coded / decoded in the sequence header, i.e., the coding side codes the flag bit dbr_enable_flag in the sequence header, and the decoding side decodes the flag bit dbr_enable_flag from the sequence header.

[0247] dbr_enable_flag is a binary variable, where a value of "1" indicates that the emphasis filtering mode and the emphasis adjustment mode are allowed, and a value of "0" indicates that the emphasis filtering mode and the emphasis adjustment mode are not allowed. The value of DbrEnableFlag is equal to dbr_enable_flag, and if dbr_enable_flag is not present in the bitstream, the value of DbrEnableFlag is 0.

[0248] To summarize the above, the decoding side can analyze the emphasis filtering mode enable flag bit and the emphasis adjustment mode enable flag bit (i.e., DbrEnableFlag, that is, DbrEnableFlag is simultaneously the emphasis filtering mode enable flag bit and the emphasis adjustment mode enable flag bit) corresponding to the current block from the high-level syntax, and if DbrEnableFlag is 1, it indicates that the current block is allowed to enable the emphasis filtering mode and the emphasis adjustment mode, and if DbrEnableFlag is 0, it indicates that the current block is not allowed to enable the emphasis filtering mode and the emphasis adjustment mode.

[0249] Example 13: One expression of a high level syntax (e.g., a high level syntax of an image header) can refer to that shown in Table 1, for example, encoding / decoding the syntax shown in Table 1 in the image header. That is, the encoding side encodes the syntax shown in Table 1 in the image header, and the decoding side decodes the syntax shown in Table 1 from the image header.

[0250] [Table 1]

[0251] In Table 1, the meaning of the relevant syntax is as follows: Picture level deblocking filtering vertical adjustment enable flag bit picture_dbr_v_enable_flag: picture_dbr_v_enable_flag is a binary variable where a value of "1" indicates that the current picture allows the use of deblocking filtering vertical adjustment, and a value of "0" indicates that the current picture does not allow the use of 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 PictureDbrVEnableFlag is 0.

[0252] As an example, for the emphasis adjustment mode, PictureDbrVEnableFlag corresponds to the emphasis adjustment mode enable flag bit, which is the emphasis adjustment mode enable flag bit for vertical DBF filtering, that is, when vertical DBF filtering needs to be performed, PictureDbrVEnableFlag indicates whether the emphasis adjustment mode is enabled or not enabled.

[0253] As an example, for the emphasis filtering mode, PictureDbrVEnableFlag corresponds to the emphasis filtering mode enable flag bit, which is the emphasis filtering mode enable flag bit for vertical DBF filtering, that is, when vertical DBF filtering needs to be performed, PictureDbrVEnableFlag indicates whether the emphasis filtering mode is allowed to be enabled or not.

[0254] To summarize, PictureDbrVEnableFlag can represent an emphasis adjustment mode enable flag bit for vertical DBF filtering, and an emphasis filtering mode enable flag bit for vertical DBF filtering, i.e., the emphasis adjustment mode enable flag bit and the emphasis filtering mode enable flag bit share the same flag bit, that is, the current image allows both the emphasis adjustment mode and the emphasis filtering mode to be enabled at the same time, or the current image does not allow both the emphasis adjustment mode and the emphasis filtering mode to be enabled at the same time.

[0255] Deblocking filtering vertical adjustment threshold dbr_v_threshold_minus1: dbr_v_threshold_minus1 is used to determine the deblocking filtering vertical adjustment threshold of the current image, and its value ranges from 0 to 1. The value of DbrVThreshold is equal to the value of dbr_v_threshold_minus1 plus 1. If dbr_v_threshold_minus1 does not exist in the bitstream, the value of DbrVThreshold is 0.

[0256] For example, for the emphasis adjustment mode, DbrVThreshold corresponds to the first adjustment threshold (take the third adjustment threshold and the first adjustment threshold as an example), and is the first adjustment threshold for vertical DBF filtering. That is, when vertical DBF filtering needs to be performed, DbrVThreshold represents the first adjustment threshold in the above embodiment. In addition, the second adjustment threshold in the above embodiment (take the fourth adjustment threshold and the second adjustment threshold as an example) and the first adjustment threshold are mutually inverse numbers, so the second adjustment threshold can be determined based on DbrVThreshold.

[0257] Exemplarily, for the emphasis filtering mode, DbrVThreshold corresponds to the first filtering threshold (take the third filtering threshold and the first filtering threshold as an example), and is the first filtering threshold for vertical DBF filtering. That is, when vertical DBF filtering needs to be performed, DbrVThreshold represents the first filtering threshold in the above embodiment. In addition, the second filtering threshold in the above embodiment (take the fourth filtering threshold and the second filtering threshold as an example) and the first filtering threshold are mutually inverse numbers, so the second filtering threshold can be determined based on DbrVThreshold.

[0258] To sum up, DbrVThreshold can represent the first adjustment threshold and the first filtering threshold for vertical DBF filtering, that is, the first adjustment threshold and the first filtering threshold are the same, and both are the same value.

[0259] Deblocking filtering vertical adjustment offset value 0 (dbr_v_offset0_minus1): Used to determine the offset value 0 of the deblocking filtering vertical adjustment of the current image, the value ranges from 0 to 3. The value of DbrVOffset0 is equal to the negative value obtained by adding 1 to the value of dbr_v_offset0_minus1 and then reciprocating it. If dbr_v_offset0_minus1 does not exist in the bitstream, the value of DbrVOffset0 is 0.

[0260] As an example, for the emphasis filtering mode, DbrVOffset0 corresponds to the first filtering offset value (take for example that the third filtering offset value and the first filtering offset value are the same) and is the first filtering offset value for vertical DBF filtering, that is, when vertical DBF filtering needs to be performed, DbrVOffset0 represents the first filtering offset value in the above embodiment.

[0261] Deblocking Filtering Vertical Adjustment Offset Value 1 (dbr_v_offset1_minus1): Used to determine the deblocking filtering vertical adjustment offset value 1 of the current picture, and the value range may be 0 to 3. The value of DbrVOffset1 is equal to the value of dbr_v_offset1_minus1 plus 1. If dbr_v_offset1_minus1 does not exist in the bitstream, the value of DbrVOffset1 is 0.

[0262] As an example, for the emphasis filtering mode, DbrVOffset1 corresponds to the second filtering offset value (take for example that the fourth filtering offset value and the second filtering offset value are the same), and is the second filtering offset value for vertical DBF filtering, that is, when vertical DBF filtering needs to be performed, DbrVOffset1 represents the second filtering offset value in the above embodiment.

[0263] Enhanced deblocking filtering vertical adjustment offset value 0 (dbr_v_alt_offset0_minus1): dbr_v_alt_offset0_minus1 is used to determine the vertical adjustment offset value 0 when the deblocking filtering BS of the current image is 0, and the value range of dbr_v_alt_offset0_minus1 may be 0 to 3. The value of DbrVAltOffset0 is equal to the negative value obtained by adding 1 to the value of dbr_v_alt_offset0_minus1 and then reciprocating it. If dbr_v_alt_offset0_minus1 does not exist in the bitstream, the value of DbrVAltOffset0 is 0.

[0264] As an example, for the emphasis adjustment mode, DbrVAltOffset0 corresponds to the first adjustment offset value (take for example that the third adjustment offset value and the first adjustment offset value are the same) and is the first adjustment offset value for vertical DBF filtering, that is, when vertical DBF filtering needs to be performed, DbrVAltOffset0 represents the first adjustment offset value in the above embodiment.

[0265] Enhanced Deblocking Filtering Vertical Adjustment Offset Value 1 (dbr_v_alt_offset1_minus1): dbr_v_alt_offset1_minus1 is used to determine the vertical adjustment offset value 1 when the deblocking filtering BS of the current image is 0, and the value range of dbr_v_alt_offset1_minus1 may be 0 to 3. Here, the value of DbrVAltOffset1 is equal to the value of dbr_v_alt_offset1_minus1 plus 1, and if dbr_v_alt_offset1_minus1 does not exist in the bitstream, the value of DbrVAltOffset1 is 0.

[0266] As an example, for the emphasis adjustment mode, DbrVAltOffset1 corresponds to the second adjustment offset value (take for example that the fourth adjustment offset value and the second adjustment offset value are the same), and is the second adjustment offset value for vertical DBF filtering, that is, when vertical DBF filtering needs to be performed, DbrVAltOffset1 represents the second adjustment offset value in the above embodiment.

[0267] Picture level deblocking filtering horizontal adjustment enable flag bit picture_dbr_h_enable_flag: picture_dbr_h_enable_flag is a binary variable where a value of "1" indicates that the current picture allows the use of deblocking filtering horizontal adjustment and a value of "0" indicates that the current picture does not allow the use of deblocking filtering horizontal adjustment. The value of PhDbrHEnableFlag 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 PhDbrHEnableFlag is 0.

[0268] As an example, for the emphasis adjustment mode, PhDbrHEnableFlag corresponds to the emphasis adjustment mode enable flag bit, which is the emphasis adjustment mode enable flag bit for horizontal DBF filtering, that is, when horizontal DBF filtering needs to be performed, PhDbrHEnableFlag indicates whether the emphasis adjustment mode is enabled or not enabled.

[0269] As an example, for the emphasis filtering mode, PhDbrHEnableFlag corresponds to the emphasis filtering mode enable flag bit, which is the emphasis filtering mode enable flag bit for horizontal DBF filtering, that is, when horizontal DBF filtering needs to be performed, PhDbrHEnableFlag indicates whether the emphasis filtering mode is allowed to be enabled or whether the emphasis filtering mode is not allowed to be enabled.

[0270] To summarize, PhDbrHEnableFlag can represent an emphasis adjustment mode enable flag bit for horizontal DBF filtering, and an emphasis filtering mode enable flag bit for horizontal DBF filtering, i.e., the emphasis adjustment mode enable flag bit and the emphasis filtering mode enable flag bit share the same flag bit, i.e., the current image allows both the emphasis adjustment mode and the emphasis filtering mode to be enabled at the same time, or the current image does not allow both the emphasis adjustment mode and the emphasis filtering mode to be enabled at the same time.

[0271] Deblocking filtering horizontal adjustment threshold dbr_h_threshold_minus1: dbr_h_threshold_minus1 is used to determine the deblocking filtering horizontal adjustment threshold of the current image, and its value ranges from 0 to 1. The value of DbrHThreshold is equal to the value of dbr_h_threshold_minus1 plus 1. If dbr_h_threshold_minus1 does not exist in the bitstream, the value of DbrHThreshold is 0.

[0272] Exemplarily, for the emphasis adjustment mode, DbrHThreshold corresponds to the first adjustment threshold (take the third adjustment threshold and the first adjustment threshold as an example) and is the first adjustment threshold for horizontal DBF filtering. That is, when horizontal DBF filtering needs to be performed, DbrHThreshold represents the first adjustment threshold in the above embodiment. In addition, the second adjustment threshold in the above embodiment (take the fourth adjustment threshold and the second adjustment threshold as an example) and the first adjustment threshold are mutually inverse numbers, so the second adjustment threshold can be determined based on DbrHThreshold.

[0273] Exemplarily, for the emphasis filtering mode, DbrHThreshold corresponds to the first filtering threshold (take the third filtering threshold and the first filtering threshold as an example), and is the first filtering threshold for horizontal DBF filtering. That is, when horizontal DBF filtering needs to be performed, DbrHThreshold represents the first filtering threshold in the above embodiment. In addition, the second filtering threshold (take the fourth filtering threshold and the second filtering threshold as an example) and the first filtering threshold in the above embodiment are mutually inverse numbers, so the second filtering threshold can be determined based on DbrHThreshold.

[0274] To sum up, DbrHThreshold can represent the first adjustment threshold and the first filtering threshold for horizontal DBF filtering, that is, the first adjustment threshold and the first filtering threshold are the same, and both are the same value.

[0275] Deblocking filtering horizontal adjustment offset value 0 (dbr_h_offset0_minus1): Used to determine the deblocking filtering horizontal adjustment offset value 0 of the current image, the value ranges from 0 to 3. The value of DbrHOffset0 is equal to the negative value obtained by adding 1 to the value of dbr_h_offset0_minus1 and then reciprocating it. If dbr_h_offset0_minus1 does not exist in the bitstream, the value of DbrHOffset0 is 0.

[0276] As an example, for the emphasis filtering mode, DbrHOffset0 corresponds to the first filtering offset value (take for example that the third filtering offset value and the first filtering offset value are the same) and is the first filtering offset value for horizontal DBF filtering, that is, when horizontal DBF filtering needs to be performed, DbrHOffset0 represents the first filtering offset value in the above embodiment.

[0277] Deblocking Filtering Horizontal Adjustment Offset Value 1 (dbr_h_offset1_minus1): Used to determine the deblocking filtering horizontal adjustment offset value 1 of the current image, and the value may range from 0 to 3. The value of DbrHOffset1 is equal to the value of dbr_h_offset1_minus1 plus 1. If dbr_h_offset1_minus1 does not exist in the bitstream, the value of DbrHOffset1 is 0.

[0278] As an example, for the emphasis filtering mode, DbrHOffset1 corresponds to the second filtering offset value (take for example that the fourth filtering offset value and the second filtering offset value are the same), and is the second filtering offset value for horizontal DBF filtering, that is, when horizontal DBF filtering needs to be performed, DbrHOffset1 represents the second filtering offset value in the above embodiment.

[0279] Enhanced deblocking filtering horizontal adjustment offset value 0 (dbr_h_alt_offset0_minus1): dbr_h_alt_offset0_minus1 is used to determine the horizontal adjustment offset value 0 when the deblocking filtering BS of the current image is 0, and the value range of dbr_h_alt_offset0_minus1 may be 0 to 3. The value of DbrHAltOffset0 is equal to the negative value obtained by adding 1 to the value of dbr_h_alt_offset0_minus1 and then reciprocating it. If dbr_h_alt_offset0_minus1 does not exist in the bitstream, the value of DbrHAltOffset0 is 0.

[0280] As an example, for the emphasis adjustment mode, DbrHAltOffset0 corresponds to the first adjustment offset value (take for example that the third adjustment offset value and the first adjustment offset value are the same) and is the first adjustment offset value for horizontal DBF filtering, that is, when horizontal DBF filtering needs to be performed, DbrHAltOffset0 represents the first adjustment offset value in the above embodiment.

[0281] Enhanced Deblocking Filtering Horizontal Adjustment Offset Value 1 (dbr_h_alt_offset1_minus1): dbr_h_alt_offset1_minus1 is used to determine the horizontal adjustment offset value 1 when the deblocking filtering BS of the current image is 0, and the value range of dbr_h_alt_offset1_minus1 may be 0 to 3. Here, the value of DbrHAltOffset1 is equal to the value of dbr_h_alt_offset1_minus1 plus 1, and if dbr_h_alt_offset1_minus1 does not exist in the bitstream, the value of DbrHAltOffset1 is 0.

[0282] As an example, for the emphasis adjustment mode, DbrHAltOffset1 corresponds to the second adjustment offset value (take for example that the fourth adjustment offset value and the second adjustment offset value are the same), and is the second adjustment offset value for horizontal DBF filtering, that is, when horizontal DBF filtering needs to be performed, DbrHAltOffset1 represents the second adjustment offset value in the above embodiment.

[0283] Example 14: One expression of a high level syntax (e.g., a high level syntax of an image header) can refer to that shown in Table 2, for example, encoding / decoding the syntax shown in Table 1 in the image header. That is, the encoding side encodes the syntax shown in Table 2 in the image header, and the decoding side decodes the syntax shown in Table 2 from the image header.

[0284] [Table 2]

[0285] In Table 2, the meaning of the relevant syntax is as follows: Picture level enhanced vertical adjustment enable flag bit picture_alt_dbr_v_enable_flag: a binary variable where a value of "1" indicates that the current picture allows the use of enhanced vertical adjustment and a value of "0" indicates that the current picture does not allow the use of enhanced vertical adjustment. The value of PictureAltDbrVEnableFlag may be equal to picture_alt_dbr_v_enable_flag, and if picture_alt_dbr_v_enable_flag is not present in the bitstream, the value of PhAltDbrVEnableFlag is 0.

[0286] As an example, for the emphasis adjustment mode, PictureAltDbrVEnableFlag corresponds to the emphasis adjustment mode enable flag bit, which is the emphasis adjustment mode enable flag bit for vertical DBF filtering, that is, when vertical DBF filtering needs to be performed, PictureAltDbrVEnableFlag indicates whether the emphasis adjustment mode is allowed to be enabled or whether the emphasis adjustment mode is not allowed to be enabled.

[0287] Unlike PictureDbrVEnableFlag in the thirteenth embodiment, PictureAltDbrVEnableFlag is not an emphasis filtering mode enable flag bit for vertical DBF filtering, but simply an emphasis adjustment mode enable flag bit for vertical DBF filtering.

[0288] The picture level enhanced horizontal adjustment enable flag bit picture_alt_dbr_h_enable_flag is a binary variable where a value of "1" indicates that the current picture allows the use of enhanced horizontal adjustment and a value of "0" indicates that the current picture does not allow the use of enhanced horizontal adjustment. The value of PictureAltDbrHEnableFlag may be equal to picture_alt_dbr_h_enable_flag, and if picture_alt_dbr_h_enable_flag is not present in the bitstream then the value of PhAltDbrHEnableFlag shall be 0.

[0289] As an example, for the emphasis adjustment mode, PhAltDbrHEnableFlag corresponds to the emphasis adjustment mode enable flag bit, which is the emphasis adjustment mode enable flag bit for horizontal DBF filtering, that is, when horizontal DBF filtering needs to be performed, PhAltDbrHEnableFlag indicates whether the emphasis adjustment mode is allowed to be enabled or whether the emphasis adjustment mode is not allowed to be enabled.

[0290] Unlike PictureDbrHEnableFlag in the thirteenth embodiment, PhAltDbrHEnableFlag is not an emphasis filtering mode enable flag bit for horizontal DBF filtering, but simply an emphasis adjustment mode enable flag bit for horizontal DBF filtering.

[0291] The meanings of other syntax elements in Table 2 are the same as those of the corresponding syntax elements in Table 1, and therefore duplicated explanations will be omitted here.

[0292] Example 15: With respect to Example 11, with regard to the encoding and decoding of adbr_enable_flag, it may be possible to encode and decode adbr_enable_flag only when the deblocking filtering mode is enabled, i.e., it may be determined first whether to enable the deblocking filtering mode, and if it is enabled, the flag bit adbr_enable_flag is encoded / decoded in the sequence header, and if it is not enabled, the flag bit adbr_enable_flag is not encoded / decoded in the sequence header. In summary, the emphasis adjustment mode (adbr_enable_flag is used to control the enabling of the emphasis adjustment mode) is a submode of the deblocking filtering mode, and enabling of the emphasis adjustment mode is allowed only when the deblocking filtering mode is enabled.

[0293] For the twelfth embodiment, the encoding and decoding of dbr_enable_flag may be performed only when the deblocking filtering mode is enabled, i.e., it may be determined first whether the deblocking filtering mode is enabled, and if enabled, the flag bit dbr_enable_flag is encoded / decoded in the sequence header, and if not enabled, the flag bit dbr_enable_flag is not encoded / decoded in the sequence header. In summary, the emphasis filtering mode (dbr_enable_flag is used to control the enablement of the emphasis filtering mode) is a submode of the deblocking filtering mode, and the enablement of the emphasis filtering mode is allowed only when the deblocking filtering mode is enabled.

[0294] For Example 13, with regard to the encoding and decoding of the high level syntax shown in Table 1 (used to control the enabling of the emphasis filtering mode and the enabling of the emphasis adjustment mode), the high level syntax may be encoded and decoded only when the deblocking filtering mode is enabled, i.e., it may be determined first whether to enable the deblocking filtering mode, and if enabled, the high level syntax shown in Table 1 is encoded / decoded in the image header, and if not enabled, the high level syntax shown in Table 1 is not encoded / decoded in the image header.

[0295] For Example 14, with regard to the encoding and decoding of the high level syntax shown in Table 2 (used to control the enabling of the emphasis filtering mode and the enabling of the emphasis adjustment mode), the high level syntax may be encoded and decoded only when the deblocking filtering mode is enabled, i.e., it may be determined first whether to enable the deblocking filtering mode, and if enabled, the high level syntax shown in Table 2 is encoded / decoded in the image header, and if not enabled, the high level syntax shown in Table 2 is not encoded / decoded in the image header.

[0296] Example 16: The deblocking filtering process for the luma component (ie, the current block is the luma component) may, for example, adjust the luma component using an emphasis adjustment mode, or adjust the luma component using an emphasis filtering mode.

[0297] Regarding the derivation process of the DBR parameters of the luminance component, If the current boundary to be filtered is a vertical boundary and the value of PictureDbrVEnableFlag is 1, or if the current boundary to be filtered is a horizontal boundary and the value of PictureDbrHEnableFlag is 1, the value of PictureDbrEnableFlag is 1; otherwise, PictureDbrEnableFlag is 0. Also, if the current boundary to be filtered is a vertical boundary and the value of PictureAltDbrVEnableFlag is 1, or if the current boundary to be filtered is a horizontal boundary and the value of PictureAltDbrHEnableFlag is 1, the value of PictureAltDbrEnableFlag is 1; otherwise, PictureAltDbrEnableFlag is 0.

[0298] Derive dbr_th, dbr_offset0, dbr_offset1, alt_dbr_offset0, and alt_dbr_offset1 using the following method.

[0299] For the vertical boundaries, dbr_th=DbrVThreshold, dbr_offset0=DbrVOffset0, dbr_offset1=DbrVOffset1, alt_dbr_offset0=DbrVAltOffset0, alt_dbr_offset1=DbrVAltOffset1.

[0300] For the horizontal boundaries, dbr_th=DbrHThreshold, dbr_offset0=DbrHOffset0, dbr_offset1=DbrHOffset1, alt_dbr_offset0=DbrHAltOffset0, alt_dbr_offset1=DbrHAltOffset1.

[0301] (1) The boundary filtering process when the BS of the luminance component is equal to 4 (processed in emphasis filtering mode): When the value of BS is 4, the filtering calculation process for p0, p1, p2 and q0, q1, q2 is as follows: 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.

[0302] P0, P1, P2, Q0, Q1, and Q2 are all values ​​after filtering (filtered pixel values).

[0303] After obtaining P0, P1, P2 and Q0, Q1, Q2, if PhDbrEnableFlag is 1, If pi>Pi+dbr_th, then Pi'=clip((Pi+pi+1)>>1+dbr_offset0), otherwise,<Pi-dbr_thであれば、Pi’=clip((Pi+pi+1)> >1+dbr_offset1), where i = 0, 1, 2.

[0304] If qi>Qi+dbr_th, then Qi'=clip((Qi+qi+1)>>1+dbr_offset0), otherwise, qi<Qi-dbr_thであれば、Qi’=clip((Qi+qi+1)> >1+dbr_offset1), where i = 0, 1, 2.

[0305] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, Pi may represent the filtered pixel value, Qi may represent the filtered pixel value, Pi' may represent the adjusted pixel value, and Qi' may represent the adjusted pixel value.

[0306] (2) The boundary filtering process when the BS of the luminance component is equal to 3 (processed in emphasis filtering mode): When the value of BS is 3, the filtering calculation process for p0, p1 and q0, q1 is as follows: 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.

[0307] P0, P1 and Q0, Q1 are all values ​​after filtering (filtered pixel values).

[0308] After obtaining P0, P1 and Q0, Q1, if PhDbrEnableFlag is 1, If pi>Pi+dbr_th, then Pi'=clip((Pi+pi+1)>>1+dbr_offset0), otherwise,<Pi-dbr_thであれば、Pi’=clip((Pi+pi+1)> >1+dbr_offset1), where i = 0, 1.

[0309] If qi>Qi+dbr_th, then Qi'=clip((Qi+qi+1)>>1+dbr_offset0), otherwise, qi<Qi-dbr_thであれば、Qi’=clip((Qi+qi+1)> >1+dbr_offset1), where i = 0, 1.

[0310] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, Pi may represent the filtered pixel value, Qi may represent the filtered pixel value, Pi' may represent the adjusted pixel value, and Qi' may represent the adjusted pixel value.

[0311] (3) The boundary filtering process when the BS of the luminance component is equal to 2 (processed in emphasis filtering mode): When the value of BS is 2, the filtering calculation process for p0 and q0 is as follows: 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.

[0312] Both P0 and Q0 are values ​​after filtering (filtered pixel values).

[0313] After obtaining P0 and Q0, if PhDbrEnableFlag is 1, If pi>Pi+dbr_th, then Pi'=clip((Pi+pi+1)>>1+dbr_offset0), otherwise,<Pi-dbr_thであれば、Pi’=clip((Pi+pi+1)> >1+dbr_offset1), where i=0.

[0314] If qi>Qi+dbr_th, then Qi'=clip((Qi+qi+1)>>1+dbr_offset0), otherwise, qi<Qi-dbr_thであれば、Qi’=clip((Qi+qi+1)> >1+dbr_offset1), where i=0.

[0315] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, Pi may represent the filtered pixel value, Qi may represent the filtered pixel value, Pi' may represent the adjusted pixel value, and Qi' may represent the adjusted pixel value.

[0316] (4) Boundary filtering process when BS of luminance component is equal to 1 (processed in emphasis filtering mode): When the value of BS is 1, the filtering calculation process for p0 and q0 is as follows: P0=((p0<<1)+p0+q0+2)>>2, Q0=((q0<<1)+q0+p0+2)>>2.

[0317] Both P0 and Q0 are values ​​after filtering (filtered pixel values).

[0318] After obtaining P0 and Q0, if PhDbrEnableFlag is 1, If pi>Pi+dbr_th, then Pi'=clip((Pi+pi+1)>>1+dbr_offset0), otherwise,<Pi-dbr_thであれば、Pi’=clip((Pi+pi+1)> >1+dbr_offset1), where i=0.

[0319] If qi>Qi+dbr_th, then Qi'=clip((Qi+qi+1)>>1+dbr_offset0), otherwise, qi<Qi-dbr_thであれば、Qi’=clip((Qi+qi+1)> >1+dbr_offset1), where i=0.

[0320] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, Pi may represent the filtered pixel value, Qi may represent the filtered pixel value, Pi' may represent the adjusted pixel value, and Qi' may represent the adjusted pixel value.

[0321] (5) Method 1 of boundary filtering process when BS of luminance component is equal to 0 (processing in emphasis adjustment mode): When the value of BS is 0, the filtering calculation process for pi and qi is as follows: Determine the gradient value DPi of pi and the gradient value DQi of qi. For example, DPi=(pi-qi+2)>>2, DQi=(qi-pi+2)>>2. Or, DPi=(pi-qi+1)>>1, DQi=(qi-pi+1)>>1.

[0322] After obtaining DPi and DQi, if PhAltDbrEnableFlag is 1, If DPi>dbr_th, then Pi=clip(pi+alt_dbr_offset0), otherwise, if DPi<-dbr_th, then Pi=clip(pi+alt_dbr_offset1), If DQi>dbr_th, then Qi=clip(qi+alt_dbr_offset0); otherwise, if DQi<-dbr_th, then Qi=clip(qi+alt_dbr_offset1).

[0323] The above i may be 0, or may be 0, 1, 2, etc., and is not limited thereto.

[0324] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, DPi may represent the gradient value, DQi may represent the gradient value, Pi may represent the adjusted pixel value, and Qi may represent the adjusted pixel value.

[0325] (6) Method 2 of boundary filtering process when BS of luminance component is equal to 0 (processing in emphasis adjustment mode): When the value of BS is 0, the filtering calculation process for pi and qi is as follows: Determine the gradient value DPi of pi and the gradient value DQi of qi, e.g. DPi=(pi-qi+1)>>1, DQi=(qi-pi+1)>>1.

[0326] After obtaining DPi and DQi, if PhAltDbrEnableFlag is 1, If DPi>2*dbr_th, then Pi=clip(pi+alt_dbr_offset0), otherwise, if DPi<-2*dbr_th, then Pi=clip(pi+alt_dbr_offset1), If DQi>2*dbr_th then Qi=clip(qi+alt_dbr_offset0), otherwise if DQi<-2*dbr_th then Qi=clip(qi+alt_dbr_offset1).

[0327] The above 2*dbr_th and -2*dbr_th may be the adjustment thresholds in the above embodiment.

[0328] The above i may be 0, or may be 0, 1, 2, etc., and is not limited thereto.

[0329] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, DPi may represent the gradient value, DQi may represent the gradient value, Pi may represent the adjusted pixel value, and Qi may represent the adjusted pixel value.

[0330] (7) Method 3 of boundary filtering process when BS of luminance component is equal to 0 (processing in emphasis adjustment mode): When the value of BS is 0, the filtering calculation process for pi and qi is as follows: A gradient value DPi of pi and a gradient value DQi of qi are determined. For example, the gradient value DPi and the gradient value DQi may be determined in the following manner: DPi=((pi<<1)+pi+qi+2)>>2, DQi=((qi<<1)+qi+pi+2)>>2.

[0331] After obtaining DPi and DQi, if PhAltDbrEnableFlag is 1, If pi>DPi+dbr_th, then Pi=clip(pi+alt_dbr_offset0), otherwise, <DPi-dbr_thであれば、Pi=clip(pi+alt_dbr_offset1)となり、 If qi>DQi+dbr_th, then Qi=clip(qi+alt_dbr_offset0), otherwise, qi <DQi-dbr_thであれば、Qi=clip(qi+alt_dbr_offset1)となる。

[0332] In one possible embodiment, the above expression may be equivalently expressed as:

[0333] A gradient value DPi of pi and a gradient value DQi of qi are determined. For example, the gradient value DPi and the gradient value DQi may be determined in the following manner: DPi=pi-(((pi<<1)+pi+qi+2)>>2), DQi=qi-(((qi<<1)+qi+pi+2)>>2).

[0334] After obtaining DPi and DQi, if PhAltDbrEnableFlag is 1, If DPi>dbr_th, then Pi=clip(pi+alt_dbr_offset0), otherwise, if DPi<-dbr_th, then Pi=clip(pi+alt_dbr_offset1), If DQi>dbr_th, then Qi=clip(qi+alt_dbr_offset0); otherwise, if DQi<-dbr_th, then Qi=clip(qi+alt_dbr_offset1).

[0335] The above i may be 0, or may be 0, 1, 2, etc., and is not limited thereto.

[0336] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, DPi may represent the gradient value, DQi may represent the gradient value, Pi may represent the adjusted pixel value, and Qi may represent the adjusted pixel value.

[0337] In the above embodiment, clip(x) represents limiting x to the range [0, 2^(bit_depth)-1] (the range may include 0 and 2^(bit_depth)-1). bit_depth represents the bit depth of the image, typically 8, 10, 12, etc.

[0338] (8) Method 4 of boundary filtering process when BS of luminance component is equal to 0 (processing in emphasis adjustment mode): When the value of BS is 0, the filtering calculation process for pi and qi is as follows: A gradient value DPi of pi and a gradient value DQi of qi are determined. For example, the gradient value DPi and the gradient value DQi may be determined in the following manner: DPi=(qi-pi+2)>>2, DQi=(pi-qi+2)>>2.

[0339] After obtaining DPi and DQi, if PhAltDbrEnableFlag is 1, DPi<dbr_thであれば、Pi=clip(pi+dbr_alt_offset0)となり、そうでなく、DPi> If -dbr_th, Pi = clip(pi + dbr_alt_offset1), DQi<dbr_thであれば、Qi=clip(qi+alt_dbr_offset0)となり、そうでなく、DQi> If -dbr_th, then Qi = clip(qi + dbr_alt_offset1).

[0340] The above i may be 0, or may be 0, 1, 2, etc., and is not limited thereto.

[0341] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, DPi may represent the gradient value, DQi may represent the gradient value, Pi may represent the adjusted pixel value, and Qi may represent the adjusted pixel value.

[0342] (9) Method 5 of boundary filtering process when BS of luminance component is equal to 0 (processing in emphasis adjustment mode): When the value of BS is 0, the filtering calculation process for pi and qi is as follows:

[0343] A gradient value DPi of pi and a gradient value DQi of qi are determined. For example, the gradient value DPi and the gradient value DQi may be determined in the following manner: DPi=pi-(((pi<<1)+pi+qi+2)>>2), i.e. DPi=(pi-qi-2)>>2, DQi=qi-(((qi<<1)+qi+pi+2)>>2), i.e. DQi=(qi-pi-2)>>2.

[0344] After obtaining DPi and DQi, if PhAltDbrEnableFlag is 1, If DPi>dbr_th, then Pi=clip(pi+dbr_alt_offset0), otherwise, if DPi<-dbr_th, then Pi=clip(pi+dbr_alt_offset1), If DQi>dbr_th, then Qi=clip(qi+dbr_alt_offset0); otherwise, if DQi<-dbr_th, then Qi=clip(qi+dbr_alt_offset1).

[0345] The above i may be 0, or may be 0, 1, 2, etc., and is not limited thereto.

[0346] In the above formula, pi may represent the original pixel value, qi may represent the original pixel value, DPi may represent the gradient value, DQi may represent the gradient value, Pi may represent the adjusted pixel value, and Qi may represent the adjusted pixel value.

[0347] Example 17: With respect to Examples 11 and 12, the high level syntax at the SPS level may be replaced with high level syntax at the PPS level, or high level syntax at the picture header level, or high level syntax at the picture level, or high level syntax at the slice header level, or high level syntax at the CTU level, or high level syntax at the CU level, and there is no limitation on the type of this high level syntax, i.e., various types of high level syntax can all transmit dbr_enable_flag or adbr_enable_flag. In Examples 13 and 14, the high level syntax at the image header level may be replaced with high level syntax at the SPS level, or high level syntax at the PPS level, or high level syntax at the image level, or high level syntax at the slice header level, or high level syntax at the CTU level, or high level syntax at the CU level, and there is no limitation on the type of the high level syntax, that is, various types of high level syntax can be used to transmit the contents of Table 1 or Table 2, that is, various types of high level syntax transmit parameters such as the emphasis adjustment mode enable flag bit, the emphasis filtering mode enable flag bit, the first adjustment threshold, the first filtering threshold, the first filtering offset value, the second filtering offset value, the first adjustment offset value, and the second adjustment offset value, and the specific implementation form is similar to the embodiments of Examples 13 and 14, so duplicated explanations will be omitted here.

[0348] With respect to Examples 13 and 14, the high level syntax at the picture header level may be replaced with the high level syntax at the CTU level, and the high level syntax at the CTU level may transmit the relevant parameters of the DBR, and the relevant parameters of the DBR may include parameters such as the first adjustment threshold, the first filtering threshold, the first filtering offset value, the second filtering offset value, the first adjustment offset value, the second adjustment offset value, etc., see Examples 13 and 14. Alternatively, the high level syntax at the picture header level may be replaced with the high level syntax at the CU level, and the high level syntax at the CU level may transmit the relevant parameters of the DBR, and the relevant parameters of the DBR may include parameters such as the first adjustment threshold, the first filtering threshold, the first filtering offset value, the second filtering offset value, the first adjustment offset value, the second adjustment offset value, etc., see Examples 13 and 14.

[0349] Example 18: With respect to Example 16, for the deblocking filtering process for the luma component, the luma component may be replaced with the chroma component, i.e., the deblocking filtering process is performed on the chroma component (i.e., the current block is a chroma component), and since the deblocking filtering process of the chroma component is similar to the deblocking filtering process of the luma component, please refer to Example 16, and redundant explanations will be omitted here.

[0350] As an example, the above-mentioned Example 1 to Example 18 may be realized alone or may be arbitrarily combined, for example, Example 1 and Example 2 may be combined, Example 1 and Example 3 may be combined, Example 1 and Example 4 may be combined, Example 1 and Example 5 may be combined, Example 1 and at least one of Examples 8 to 18 may be combined, at least two of Examples 8 to 18 may be arbitrarily combined, Example 2 and at least one of Examples 8 to 18 may be combined, Example 3 and at least one of Examples 8 to 18 may be combined, Example 4 and at least one of Examples 8 to 18 may be combined, Example 5 and at least one of Examples 8 to 18 may be combined, Example 6 and at least one of Examples 8 to 18 may be combined, and Example 7 and at least one of Examples 8 to 18 may be combined. Of course, the above are only examples of some combinations, and any two or more of Examples 1 to 18 can be combined to realize the corresponding process.

[0351] As an example, in each of the above embodiments, the contents of the encoding side can also be applied to the decoding side, i.e., the decoding side can be processed in the same manner, and the contents of the decoding side can also be applied to the encoding side, i.e., the encoding side can be processed in the same manner.

[0352] Example 19: Based on the same application concept as the above method, a decoding device is further provided in an embodiment of the present invention, and the decoding device is applied to a decoding side, and includes a memory configured to store video data, and a decoder configured to implement the encoding / decoding method in the above Examples 1 to 18, i.e., the processing flow of the decoding side.

[0353] For example, in one possible embodiment, the decoder When a current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode, the method is configured to determine a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point, and to determine an adjusted pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0354] Based on the same application concept as the above method, an encoding device is further provided in an embodiment of the present invention, which is applied to an encoding side, and includes: a memory configured to store video data; and an encoder configured to implement the encoding / decoding method in the above embodiments 1 to 18, i.e., the processing flow of the encoding side.

[0355] For example, in one possible embodiment, the encoder When a current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode, the method is configured to determine a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point, and to determine an adjusted pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0356] Based on the same application concept as the above method, the decoding device (also called video decoder) provided in the embodiment of the present invention is, from the hardware aspect, specifically as shown in Figure 5A, a schematic diagram of its hardware architecture. It includes a processor 511 and a machine-readable storage medium 512, in which the machine-readable storage medium 512 stores machine-executable instructions executable by the processor 511, and the processor 511 executes the machine-executable instructions to implement the methods disclosed in the above embodiments 1 to 18 of the present invention. For example, the processor 511 executes the machine-executable instructions to: When a current pixel point in a current block satisfies the enable condition of the emphasis adjustment mode, it is used to perform a step of determining a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point, and a step of determining an adjusted pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0357] Based on the same application concept as the above method, the encoding device (also called video encoder) provided in the embodiment of the present invention is, from the hardware aspect, a schematic diagram of its hardware architecture is specifically shown in Figure 5B. It includes a processor 521 and a machine-readable storage medium 522, in which the machine-readable storage medium 522 stores machine-executable instructions executable by the processor 521, and the processor 521 executes the machine-executable instructions to implement the methods disclosed in the above embodiments 1 to 18 of the present invention. For example, the processor 521 executes the machine-executable instructions to: When a current pixel point in a current block satisfies the enable condition of the emphasis adjustment mode, it is used to perform a step of determining a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point, and a step of determining an adjusted pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0358] Based on the same application concept as the above method, an embodiment of the present invention further provides a machine-readable storage medium, in which a plurality of computer instructions are stored, and when the computer instructions are executed by a processor, the method disclosed in the above examples of the present invention, for example, the encoding / decoding method in each of the above embodiments, can be implemented. Here, 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, etc. For example, the machine-readable storage medium may be a RAM (Radom Access Memory), a volatile memory, a non-volatile memory, a flash memory, a storage drive (e.g., a hard disk drive), a solid-state drive, any type of storage disk (e.g., an optical disk, a DVD, etc.), or a similar storage medium, or a combination thereof.

[0359] Based on the same application concept as the above method, an embodiment of the present invention further provides a computer application program, which, when executed by a processor, can implement the encoding / decoding method disclosed in the above embodiment of the present invention.

[0360] Based on the same application concept as the above method, an embodiment of the present invention further provides a coding / decoding device applicable to the coding side or the decoding side, the coding / decoding device comprising: The method may include a determination module for determining a gradient value of the current pixel point based on an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point when the current pixel point in the current block satisfies an enable condition of the emphasis adjustment mode, and a processing module for determining an adjustment pixel value of the current pixel point based on the gradient value of the current pixel point and the original pixel value of the current pixel point.

[0361] As an example, when the processing module determines the adjusted pixel value of the current pixel point according to the gradient value of the current pixel point and the original pixel value of the current pixel point, specifically, is used to determine an adjusted pixel value of the current pixel point based on the gradient value of the current pixel point, the original pixel value of the current pixel point, a first adjustment threshold, a second adjustment threshold, a first adjustment offset value, and a second adjustment offset value.

[0362] As an example, when the processing module determines the adjusted pixel value of the current pixel point based on the gradient value of the current pixel point, the original pixel value of the current pixel point, the first adjustment threshold, the second adjustment threshold, the first adjustment offset value, and the second adjustment offset value, specifically, when the gradient value of the current pixel point is greater than the first adjustment threshold, the processing module determines the adjusted pixel value of the current pixel point based on the original pixel value of the current pixel point and the first adjustment offset value; If the gradient value of the current pixel point is less than the second adjustment threshold, it is used to determine an adjusted pixel value of the current pixel point based on the original pixel value of the current pixel point and the second adjustment offset value.

[0363] In one possible embodiment, when a current pixel point in a current block satisfies the enable condition of the emphasis adjustment mode, the determination module is further used for determining a reference pixel point corresponding to the current pixel point from an adjacent block of the current block, and determining a gradient value of the reference pixel point based on an original pixel value of the reference pixel point and an original pixel value of a surrounding pixel point of the reference pixel point, and the processing module is further used for determining an adjustment pixel value of the reference pixel point based on the gradient value of the reference pixel point and the original pixel value of the reference pixel point.

[0364] As an example, when the processing module determines the adjusted pixel value of the reference pixel point according to the gradient value of the reference pixel point and the original pixel value of the reference pixel point, specifically, It is used to determine an adjusted pixel value of the reference pixel point based on the gradient value of the reference pixel point, the original pixel value of the reference pixel point, the third adjustment threshold, the fourth adjustment threshold, the third adjustment offset value and the fourth adjustment offset value.

[0365] As an example, when the processing module determines the adjusted pixel value of the reference pixel point based on the gradient value of the reference pixel point, the original pixel value of the reference pixel point, the third adjustment threshold, the fourth adjustment threshold, the third adjustment offset value, and the fourth adjustment offset value, specifically, when the gradient value of the reference pixel point is greater than the third adjustment threshold, the processing module determines the adjusted pixel value of the reference pixel point based on the original pixel value of the reference pixel point and the third adjustment offset value; If the gradient value of the reference pixel point is smaller than a fourth adjustment threshold, it is used to determine an adjusted pixel value of the reference pixel point according to the original pixel value of the reference pixel point and a fourth adjustment offset value.

[0366] In one possible embodiment, the determination module is used to determine that the current pixel point in the current block satisfies the enabling condition of the emphasis adjustment mode when the current pixel point in the current block satisfies the enabling condition of the emphasis adjustment mode, specifically, when the boundary strength of the filtered boundary corresponding to the current pixel point in the current block satisfies the enabling condition of the emphasis adjustment mode, or when the feature information corresponding to the current block satisfies the enabling condition of the emphasis adjustment mode, the current pixel point in the current block satisfies the enabling condition of the emphasis adjustment mode.

[0367] As an example, the processing module is further used to perform deblocking filtering on an original pixel value of the current pixel point when the current pixel point in the current block satisfies an enabling condition of a normal filtering mode, to obtain a filtered pixel value of the current pixel point, and to determine an adjusted pixel value of the current pixel point based on the filtered pixel value of the current pixel point and the original pixel value of the current pixel point when the current pixel point in the current block satisfies an enabling condition of an enhancement filtering mode.

[0368] As an example, when the processing module determines an adjusted pixel value of the current pixel point based on the filtered pixel value of the current pixel point and the original pixel value of the current pixel point, the processing module is specifically used to determine the adjusted pixel value of the current pixel point based on the filtered pixel value of the current pixel point, the original pixel value of the current pixel point, a first filtering threshold, a second filtering threshold, a first filtering offset value, and a second filtering offset value, where the first filtering threshold and the second filtering threshold are mutually inverse numbers.

[0369] As an example, when a current pixel point in the current block satisfies an enable condition of a normal filtering mode, the processing module further comprises: determining a reference pixel point corresponding to the current pixel point from an adjacent block of the current block; performing deblocking filtering on an original pixel value of the reference pixel point to obtain a filtered pixel value of the reference pixel point; When the current pixel point in the current block satisfies the enable condition of the enhancement filtering mode, it is used to determine the adjustment pixel value of the reference pixel point according to the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point.

[0370] As an example, when the processing module determines the adjusted pixel value of the reference pixel point based on the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point, specifically, the processing module is used to determine the adjusted pixel value of the reference pixel point based on the filtered pixel value of the reference pixel point, the original pixel value of the reference pixel point, a third filtering threshold, a fourth filtering threshold, a third filtering offset value and a fourth filtering offset value, where the third filtering threshold and the fourth filtering threshold are mutual inverses.

[0371] The systems, devices, modules or units described in the above embodiments may be specifically realized by computer chips, entities, or products having some functions. A typical realizing device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a mobile phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, a game console, a tablet, a wearable device, or any combination of these devices. For convenience of explanation, the above devices will be described by dividing them into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be realized by the same or multiple software and / or hardware.

[0372] As will be appreciated by those skilled in the art, embodiments of the present invention may be provided as a method, a system, or a computer program product. The present invention may use an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware. Embodiments of the present invention may be in the form of a computer program product embodied in one or more computer usable storage media (including, but not limited to, magnetic disk memories, CD-ROMs, optical memories, etc.) that contain computer usable program code.

[0373] The present invention will be described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, may be realized by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, whereby the instructions executed by the processor of the computer or other programmable data processing device generate an apparatus for implementing the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.

[0374] These computer program instructions may be stored in a computer-readable memory that can instruct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory generate a product including an instruction device that realizes the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams. These computer program instructions may be loaded into a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for realizing the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams. The above are merely examples of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made without departing from the spirit and principle of the present invention should be included in the scope of the claims of the present invention. [Explanation of symbols]

[0375] 511 processor 512 Machine-readable storage medium 521 Processor 522 Machine-readable storage medium

Claims

1. When a current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode, determining a gradient value of the current pixel point according to an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point; determining an adjusted pixel value for the current pixel point based on a gradient value for the current pixel point and an original pixel value for the current pixel point; Here, the step of determining an adjusted pixel value of the current pixel point based on a gradient value of the current pixel point and an original pixel value of the current pixel point includes the step of determining an adjusted pixel value of the current pixel point based on a gradient value of the current pixel point, an original pixel value of the current pixel point, a first adjustment threshold, a second adjustment threshold, a first adjustment offset value, and a second adjustment offset value; Wherein, if the gradient value of the current pixel point is greater than a first adjustment threshold, determining an adjusted pixel value of the current pixel point based on an original pixel value of the current pixel point and a first adjustment offset value; If the gradient value of the current pixel point is less than a second adjustment threshold, determine an adjusted pixel value of the current pixel point based on the original pixel value of the current pixel point and a second adjustment offset value.

4. A decoding method comprising:

2. If the current pixel point in the current block satisfies the enable condition of the enhancement adjustment mode, the method further comprises: determining a reference pixel point corresponding to the current pixel point from an adjacent block of the current block, and determining a gradient value of the reference pixel point based on an original pixel value of the reference pixel point and original pixel values ​​of pixel points surrounding the reference pixel point; determining an adjusted pixel value of the reference pixel point based on a gradient value of the reference pixel point and an original pixel value of the reference pixel point; 2. The method of claim 1 .

3. The step of determining an adjusted pixel value of the reference pixel point based on a gradient value of the reference pixel point and an original pixel value of the reference pixel point includes: determining an adjusted pixel value of the reference pixel point based on a gradient value of the reference pixel point, an original pixel value of the reference pixel point, a third adjustment threshold, a fourth adjustment threshold, a third adjustment offset value, and a fourth adjustment offset value; 3. The method of claim 2 .

4. determining an adjusted pixel value of the reference pixel point based on a gradient value of the reference pixel point, an original pixel value of the reference pixel point, a third adjustment threshold, a fourth adjustment threshold, a third adjustment offset value, and a fourth adjustment offset value, determining an adjusted pixel value of the reference pixel point based on an original pixel value of the reference pixel point and a third adjustment offset value when the gradient value of the reference pixel point is greater than a third adjustment threshold value, and determining an adjusted pixel value of the reference pixel point based on an original pixel value of the reference pixel point and a fourth adjustment offset value when the gradient value of the reference pixel point is less than a fourth adjustment threshold value; 4. The method according to claim 3 .

5. and parsing a first adjusted threshold, a first adjusted offset value, a second adjusted offset value, a third adjusted threshold, a third adjusted offset value, and a fourth adjusted offset value corresponding to the current block from a high level syntax.

5. The method according to claim 1, wherein the first and second electrodes are arranged in a first direction.

6. before determining that the current pixel point in the current block satisfies the enable condition of the emphasis adjustment mode, further determining that a current pixel point in the current block satisfies an enable condition of the emphasis adjustment mode when an emphasis adjustment mode enable flag bit corresponding to the current block allows the current block to enable the emphasis adjustment mode; 5. The method according to claim 1, wherein the first and second electrodes are arranged in a first direction.

7. and parsing an enhancement adjustment mode enable flag bit corresponding to the current block from a high level syntax.

7. The method of claim 6.

8. when the current pixel point in the current block satisfies an enable condition of a normal filtering mode, performing deblocking filtering on an original pixel value of the current pixel point to obtain a filtered pixel value of the current pixel point; When a current pixel point in the current block satisfies an enable condition of an enhancement filtering mode, determining an adjustment pixel value of the current pixel point according to a filtered pixel value of the current pixel point and an original pixel value of the current pixel point; 2. The method of claim 1 .

9. The step of determining an adjusted pixel value of the current pixel point based on the filtered pixel value of the current pixel point and the original pixel value of the current pixel point includes: determining an adjusted pixel value of the current pixel point based on a filtered pixel value of the current pixel point, an original pixel value of the current pixel point, a first filtering threshold, a second filtering threshold, a first filtering offset value, and a second filtering offset value; where the first filtering threshold and the second filtering threshold are mutual inverses.

9. The method of claim 8.

10. If the current pixel point in the current block satisfies the enable condition of the normal filtering mode, further determining a reference pixel point corresponding to the current pixel point from an adjacent block of the current block; performing deblocking filtering on the original pixel values ​​of the reference pixel points to obtain filtered pixel values ​​of the reference pixel points; If the current pixel point in the current block satisfies the enable condition of the enhancement filtering mode, determining an adjusted pixel value of the reference pixel point based on the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point; 9. The method of claim 8.

11. The step of determining an adjusted pixel value of the reference pixel point based on the filtered pixel value of the reference pixel point and the original pixel value of the reference pixel point includes: determining an adjusted pixel value of the reference pixel point based on a filtered pixel value of the reference pixel point, an original pixel value of the reference pixel point, a third filtering threshold, a fourth filtering threshold, a third filtering offset value, and a fourth filtering offset value; where the third filtering threshold and the fourth filtering threshold are mutual inverses.

11. The method of claim 10.

12. and parsing a first filtering threshold, a first filtering offset value, a second filtering offset value, a fourth filtering threshold, a third filtering offset value, and a fourth filtering offset value corresponding to the current block from a high level syntax.

10. The method of claim 9.

13. Determining that the current pixel point in the current block satisfies an enable condition of an enhancement filtering mode includes: determining that the current pixel point satisfies the enable condition of the enhancement filtering mode if a boundary strength of a filtering target boundary corresponding to the current pixel point in the current block satisfies an enable condition of the enhancement filtering mode and an absolute value of a difference between a filtered pixel value of the current pixel point and an original pixel value of the current pixel point is greater than a predetermined threshold; 9. The method of claim 8.

14. Determining that the boundary strength of the boundary to be filtered corresponding to the current pixel point in the current block satisfies an enable condition of the emphasis filtering mode, determining that the boundary strength of the filtered boundary corresponding to the current pixel point satisfies an enable condition of an emphasis filtering mode if the boundary strength of the filtered boundary corresponds to a predetermined second numerical value; 14. The method of claim 13.

15. If the enhancement filtering mode enable flag bit corresponding to the current block allows the current block to enable the enhancement filtering mode, the method further includes determining whether a current pixel point in the current block satisfies an enable condition of the enhancement filtering mode.

9. The method of claim 8.

16. The pixel value of the current pixel point in the current block is a luminance component or a chrominance component.

5. The method according to claim 1, wherein the first and second electrodes are arranged in a first direction.

17. When a current pixel point in a current block satisfies an enable condition of an emphasis adjustment mode, determining a gradient value of the current pixel point according to an original pixel value of the current pixel point and original pixel values ​​of neighboring pixel points of the current pixel point; determining an adjusted pixel value for the current pixel point based on a gradient value for the current pixel point and an original pixel value for the current pixel point; wherein the step of determining an adjusted pixel value of the current pixel point based on a gradient value of the current pixel point and an original pixel value of the current pixel point includes determining an adjusted pixel value of the current pixel point based on a gradient value of the current pixel point, an original pixel value of the current pixel point, a first adjustment threshold, a second adjustment threshold, a first adjustment offset value, and a second adjustment offset value; Wherein, if the gradient value of the current pixel point is greater than a first adjustment threshold, determining an adjusted pixel value of the current pixel point based on an original pixel value of the current pixel point and a first adjustment offset value; If the gradient value of the current pixel point is less than a second adjustment threshold, determine an adjusted pixel value of the current pixel point based on the original pixel value of the current pixel point and a second adjustment offset value.

13. An encoding method comprising:

18. a memory configured to store video data; a decoder configured to perform the method of claim 1; A decoding device comprising:

19. a memory configured to store video data; and an encoder configured to perform the method of claim 17.

13. An encoding device comprising:

20. A decoding device including a processor and a machine-readable storage medium having machine-executable instructions stored thereon that are executable by the processor; The processor is adapted to execute machine-executable instructions to perform the method of claim 1.

13. A decoding device comprising:

21. A coding device including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is adapted to execute machine-executable instructions to perform the method of claim 17.

13. An encoding device comprising:

Citation Information

Patent Citations

  • Video encoder, video decoder, video system, video coding method, video decoding method, and program

    JP2014239338A

  • Dynamic image encoding device and dynamic image decoding device

    JP2015104061A

  • Deblock filtering using pixel distance

    JP2017513326A

  • Edge adaptive filtering system for reducing artifacts and method

    US20060110062A1

  • Systems and methods for reducing blocking artifacts

    US20120328029A1