Filtering method, apparatus and electronic device
By flexibly adjusting the boundary strength of blocks in the geometric partitioning mode (GPM) during video coding, the problem of reduced prediction gain caused by the same boundary strength is solved, thus improving image quality.
Patent Information
- Application Number
- CN202611095019.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-11-27
AI Technical Summary
In video coding standards, when using the geometric partitioning mode (GPM), setting the same boundary strength for the entire block may result in the prediction gain being weakened by ill-fitting filtering, affecting the subjective quality of the reconstructed image.
Based on the prediction mode of the block to be filtered being the geometric partitioning mode (GPM), the prediction modes of its two geometric partitions are determined, and the boundary strength is flexibly adjusted for each partition. Filtering is performed through adaptive setting of the boundary strength.
It improves the subjective visual effect of the reconstructed image, avoids the problem of reduced prediction gain caused by unsuitable filtering, and adapts to the diversity of mixed image content.
Smart Images

Figure CN123185352A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a filtering method, apparatus and electronic device. Background Technology
[0002] Boundary Strength (BS) is a core control parameter of the deblocking filter in video coding standards. Its value directly determines the degree to which the boundary between two adjacent blocks needs to be smoothed.
[0003] In related technologies, when the current block uses GPM (Geometric Partitioning Mode), the two GPM sub-blocks it divides can be predicted using different prediction modes. If the same boundary intensity is still set for the entire block, the prediction gain brought by GPM may be weakened by the unsuitable filtering, affecting the subjective quality of the reconstructed image. Summary of the Invention
[0004] This application aims to at least partially address one of the technical problems in the related art.
[0005] Therefore, the first objective of this application is to propose a filtering method.
[0006] The second objective of this application is to provide a filtering device.
[0007] The third objective of this application is to propose an electronic device.
[0008] The fourth objective of this application is to provide a computer-readable storage medium.
[0009] The fifth objective of this application is to provide a computer program product.
[0010] To achieve the above objectives, a filtering method is proposed in the first aspect of this application, comprising: Determine the prediction mode of the block to be filtered in the encoder or decoder; In response to the prediction mode of the block to be filtered being the geometric partitioning mode (GPM), the prediction modes of the two geometric partitioning regions of the block to be filtered are determined. For any of the geometric partitions, the boundary strength of the geometric partition is determined based on at least one of the prediction mode of the geometric partition and the prediction mode of the adjacent blocks of the geometric partition. Filtering is performed on the block to be filtered based on the boundary strength of the two geometric partitions of the block to be filtered.
[0011] To achieve the above objectives, a second aspect of this application provides a filtering device, comprising: The first determining module is used to determine the prediction mode of the block to be filtered in the encoding or decoding end; The second determining module is used to determine the prediction modes of the two geometric partitions of the block to be filtered in response to the prediction mode of the block to be filtered being the geometric partition mode GPM. The third determining module is used to determine the boundary strength of any geometric partition based on at least one of the prediction modes of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition. The filtering module is used to perform filtering on the block to be filtered based on the boundary strength of the two geometric partitions of the block to be filtered.
[0012] To achieve the above objectives, a third aspect of this application provides an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement a filtering method as described in the first aspect of this application.
[0013] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement a filtering method as described in the first aspect of this application.
[0014] To achieve the above objectives, a fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements a filtering method as described in the first aspect of this application.
[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0016] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a filtering method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating another filtering method provided in an embodiment of this application; Figures 3(a)-3(g) A schematic diagram illustrating the determination of boundary strength provided in an embodiment of this application; Figure 4 This is a flowchart illustrating another filtering method provided in an embodiment of this application; Figure 5 This is a schematic diagram illustrating boundary strength determination provided in an embodiment of this application. Figure 6 This is a schematic diagram of the structure of a filtering device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0017] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0018] The following is a brief description of the relevant technical content involved in this application: De-blocking filter: A crucial component of the in-loop filter, the de-blocking filter is applied in standards such as H.264 / AVC (Advanced Video Coding), H.265 / HEVC (High Efficiency Video Coding), and H.266 / VVC (Versatile Video Coding) to effectively improve the subjective quality of reconstructed images. H.266 / VVC, in particular, incorporates several key improvements over H.265 / HEVC. In H.266 / VVC, de-blocking filters process CU (Coding Unit) boundaries, transform sub-block boundaries, and prediction sub-block boundaries. Luminance component filters are categorized into three strength levels: 1. Stronger filtering: modifies up to 7 pixels on each side of the boundary; 2. Stronger filtering: modifies 3 pixels on each side of the boundary; 3. Weaker filtering: modifies up to 2 pixels on both sides of the boundary. Because H.266 / VVC uses binary and ternary tree partitioning, which introduces rectangular blocks, the luminance component uses 4×4 blocks as filtering units. For chroma filtering, there are two types of filters: 1. Strong filtering: modifies 3 pixels on each side of the boundary; 2. Weak filtering: modifies 1 pixel on each side of the boundary. Whether it's H.265, H.266, or the future H.267 standard, the deblocking filtering process mainly includes three steps: 1. Determine the boundary strength based on the encoding mode and encoding parameters on both sides of the boundary; 2. Determine the filtering strength based on the pixel values on both sides of the boundary (including filter on / off decisions and filtering strength decisions); 3. Perform the filtering process.
[0019] GPM sub-block partitioning: The current block uses GPM, and the two GPM sub-blocks use different prediction modes to obtain prediction values. The prediction mode of the GPM sub-block can be IBC (Intra Block Copy) mode, Palette Mode, BDPCM (Block based delta pulse code modulation) mode, intra-prediction mode, Merge mode, or other inter-frame prediction modes.
[0020] ISP (Intra Sub-Partitions): ISP mode divides the current block into multiple sub-blocks. The reconstructed signal of each sub-block can be used to generate the prediction value for the next sub-block. All sub-blocks use the same prediction mode, which can only be PLANAR mode, DC mode, or intra-angle mode.
[0021] IBC Mode: IBC is an effective coding tool for screen content coding. Similar to inter-frame prediction mode, the encoder performs motion search (such as BM (Block Maching)) to find the optimal block vector (also called motion vector) for each CU. The block vector indicates the displacement from the current block to the reference block. The difference between IBC mode and inter-frame prediction mode lies in the search range: the optimal block vector in IBC mode is obtained by searching within the reconstruction region of the frame where the current CU is located, while the motion vector in inter-frame prediction mode is obtained by searching within adjacent reference frames.
[0022] Palette Mode: Since screen video pixel values often concentrate on a small number of colors, Palette Mode can effectively improve the encoding performance of screen video. In this mode, the encoder and decoder maintain a color list called the palette. When a pixel value equals or is close to a color in the palette, the encoder needs to encode the index of that color. When the number of colors in the screen content video is small, a shorter palette can be used to describe the pixel information, achieving higher encoding efficiency.
[0023] BDPCM Mode: BDPCM is an intra-frame coding technique used in modern video coding standards such as H.266 / VVC. The core idea of BDPCM can be summarized as follows: in the spatial domain, it performs secondary compression on pixels within a block using "prediction + residual differential," thereby representing image content more efficiently. Simply put, it combines the ideas of traditional DPCM with the block structure of modern video coding, specifically designed to improve the efficiency of intra-frame coding.
[0024] In related technologies, when the current block uses GPM (Geometric Partitioning Mode), the two GPM sub-blocks it divides can be predicted using different prediction modes. If the boundary intensity is still set for the entire block, the prediction gain brought by GPM may be weakened by the unsuitable filtering, affecting the subjective quality of the reconstructed image.
[0025] To address the aforementioned problems, this application proposes a filtering method, apparatus, and electronic device. The filtering method, apparatus, and electronic device of this application are described below with reference to the accompanying drawings.
[0026] Figure 1 This is a flowchart illustrating a filtering method provided in an embodiment of this application.
[0027] like Figure 1 As shown, the filtering method includes the following steps: Step 101: Determine the prediction mode of the block to be filtered in the encoding or decoding end.
[0028] The prediction mode is a coding parameter in video coding that indicates how a corresponding block generates a prediction signal from the reconstructed pixel or motion information.
[0029] In some alternative embodiments, the prediction mode may include: Intra Prediction mode, Inter Prediction mode, IBC mode, and other special modes such as Palette Mode, BDPCM mode, GPM, ISP mode, etc.
[0030] Among them, the Intra Prediction mode uses the reconstructed neighboring pixels (top, left, etc.) within the current frame for spatial prediction; the Inter Prediction mode uses the encoded reference frame (forward, backward, etc.) for temporal prediction; and the IBC mode uses the pixel blocks of the reconstructed region within the current frame for copy prediction.
[0031] In some alternative embodiments, the encoder may utilize RDO (Rate-Distortion Optimization) to determine the prediction mode of the block to be filtered. In video coding, RDO is a decision-making technique used to seek the optimal balance between coding rate and image distortion. The encoder calculates the corresponding rate-distortion cost for each candidate coding scheme (such as different prediction modes, block partitioning, motion vectors, etc.). To select the optimal encoding scheme, where... To indicate the error between the reconstructed image and the original image, used to indicate image distortion. The smaller the size, the higher the image quality; The number of bits required to encode the current block or frame, used to indicate the coding rate. The smaller the size, the more bandwidth / storage is saved; The parameter used to adjust the weighting between bitrate and distortion is typically determined by the QP (Quantization Parameter). The QP controls the quantization step size during compression; a smaller QP results in higher bitrate and distortion. The smaller the QP, the finer the quantization, the more details are preserved, and the lower the distortion, but the higher the bitrate. In other words, a smaller QP tends to reduce distortion (allowing for a higher bitrate); a larger QP... The larger the QP, the coarser the quantization and the lower the bitrate, but the greater the distortion. In other words, the larger the QP, the more it tends to save bitrate (allowing for greater distortion).
[0032] In some alternative embodiments, the decoder can determine the prediction mode of the block to be filtered by parsing the target syntax element in the bitstream (usually the first syntax element or the highest priority syntax element in the bitstream). For example, when processing the current block, the decoder can read the first syntax element `mode_id` from the bitstream and determine the prediction mode of the current block based on `mode_id`. For example, a value of `mode_id` of 0 indicates that the prediction mode of the current block is intra-frame prediction mode; a value of `mode_id` of 1 indicates that the prediction mode of the current block is inter-frame prediction mode of ordinary AMVP (Advanced Motion Vector Prediction) (i.e., non-Merge mode, requiring the transmission of motion vector difference); a value of `mode_id` of 2 indicates that the prediction mode of the current block is Merge mode; a value of `mode_id` of 3 indicates that the prediction mode of the current block is IBC mode; and a value of `mode_id` of 4 indicates that the prediction mode of the current block is GPM.
[0033] Step 102: In response to the prediction mode of the block to be filtered being GPM, determine the prediction modes of the two geometric partitions of the block to be filtered.
[0034] In the H.266 / VVC standard, GPM only supports dividing a CU into two partitions, i.e., performing binary geometric partitioning. Therefore, if the prediction mode of the block to be filtered is GPM, the number of geometric partitions for the block to be filtered is two.
[0035] When the prediction mode of the block to be filtered is GPM, the prediction modes of the two geometric partitions of the block to be filtered can be IBC mode, Palette Mode, BDPCM mode, intra-frame prediction mode, Merge mode, or other inter-frame prediction modes.
[0036] In some optional embodiments, the encoder can determine the prediction mode of a geometric partition based on the prediction modes of its neighboring blocks (top, left, etc.). The neighboring blocks of any geometric partition include: geometric partitions adjacent to the geometric partition in the block to be filtered; and blocks adjacent to the geometric partition in the neighboring blocks of the block to be filtered.
[0037] In some alternative embodiments, the decoding end can determine the prediction mode of the block to be filtered by parsing the target syntax element in the bitstream (usually the first syntax element or the highest priority syntax element in the bitstream), and then derive the prediction mode of the two geometric partitions of the block to be filtered by the target syntax element, or determine the prediction mode of the two geometric partitions of the block to be filtered by parsing specific syntax elements after the target syntax element in the bitstream.
[0038] Step 103: For any geometric partition, determine the boundary strength of the geometric partition based on at least one of the prediction modes of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition.
[0039] In some alternative embodiments, adjacent blocks of any geometric partition may include: geometric partitions in the block to be filtered that are adjacent to the geometric partition; and blocks in the adjacent blocks of the block to be filtered that are adjacent to the geometric partition.
[0040] Different boundary strengths are preset for different prediction modes. For example, for BDPCM mode and palette mode, the preset boundary strength is 0, which means that the boundary of the corresponding block does not need to be filtered. For other prediction modes, the preset boundary strength is 1 or 2, which means that the boundary of the corresponding block needs to be filtered. Different values will affect the choice of filtering strength.
[0041] It should be noted that any geometric partition has multiple boundaries, and the boundary strength of multiple geometric partitions can include the boundary strength of any boundary of each geometric partition.
[0042] In some optional embodiments, if the prediction mode of the geometric partition is BDPCM mode or palette mode, the boundary strength of the geometric partition can be determined based solely on the prediction mode of the geometric partition; otherwise, the boundary strength of the geometric partition is determined based on the prediction mode of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition.
[0043] Step 104: Filter the block to be filtered based on the boundary strength of the two geometric partitions of the block to be filtered.
[0044] In this method, filtering can be performed on the block to be filtered according to the filtering method corresponding to the boundary strength of the two geometric partitions of the block to be filtered.
[0045] In this embodiment, the prediction mode of the block to be filtered in the encoding or decoding end is determined; in response to the prediction mode of the block to be filtered being GPM, the prediction modes of the two geometric partitions of the block to be filtered are determined; for any geometric partition, the boundary strength of the geometric partition is determined based on at least one of the prediction mode of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition; filtering is performed on the block to be filtered based on the boundary strengths of the two geometric partitions of the block to be filtered; wherein, for the block to be filtered with the prediction mode of GPM, the boundary strength is no longer uniformly set for the entire block, but the boundary strength is calculated for each geometric partition separately, which can flexibly adjust the boundary strength when the prediction modes of each geometric partition are different, so as to better adapt to the mixed image content, improve the subjective visual effect, and avoid the problem that the prediction gain brought by GPM is weakened by the unsuitable filtering.
[0046] This embodiment provides another filtering method. Figure 2 This is a flowchart illustrating another filtering method provided in an embodiment of this application.
[0047] like Figure 2 As shown, the filtering method may include the following steps: Step 201: Determine the prediction mode of the block to be filtered in the encoding or decoding end.
[0048] It should be noted that the relevant content in step 201 can be found in the relevant descriptions in the foregoing embodiments, and will not be repeated here.
[0049] In one possible embodiment of this application, RDO decision is used to determine the prediction mode of the block to be filtered in the encoding end; and the prediction mode of the block to be filtered in the decoding end is determined according to the syntax elements in the bitstream.
[0050] The encoder determines the prediction mode of the block to be filtered through RDO decision, which can select the optimal prediction mode with minimal rate distortion, thereby improving coding efficiency. The decoder directly determines the same prediction mode based on the parsed syntax elements in the bitstream, which can achieve complete consistency in the understanding of the prediction mode of the block to be filtered at both ends of the encoder and decoder. This ensures that the calculation of the boundary filtering intensity and the deblocking filtering operation are strictly synchronized at both ends, avoiding filter drift or degradation of reconstructed image quality caused by prediction mode mismatch.
[0051] Step 202: In response to the prediction mode of the block to be filtered being GPM, determine the prediction modes of the two geometric partitions of the block to be filtered.
[0052] It should be noted that the relevant content in step 202 can be found in the relevant descriptions in the foregoing embodiments, and will not be repeated here.
[0053] Step 203: For any geometric partition, in response to whether the prediction mode of the geometric partition is BDPCM mode or Palette mode, determine the boundary strength of any boundary of the geometric partition according to the prediction mode of the geometric partition.
[0054] In one possible embodiment of this application, the boundary strength includes: a first identifier value for indicating that the corresponding boundary is not filtered; a second identifier value for indicating that the corresponding boundary is filtered in the first way; and a third identifier value for indicating that the corresponding boundary is filtered in the second way; wherein the filtering strength of the first filter is less than the filtering strength of the second filter.
[0055] For example, the first identifier value can be 0, the second identifier value can be 1, and the third identifier value can be 2.
[0056] By dividing the boundary intensity into first, second, and third label values, corresponding to no filtering, first filtering (weak filtering), and second filtering (strong filtering) respectively, the appropriate filtering strategy can be adaptively selected based on the actual distortion level of different boundaries and the image content. For example, no filtering or weak filtering is used for boundaries with weak block artifacts to preserve the true edges and texture details of the image and avoid subjective quality degradation caused by over-smoothing; strong filtering is used for boundaries with severe block artifacts to fully suppress visible block artifacts.
[0057] In one possible embodiment of this application, in response to the prediction mode of the geometric partition being either BDPCM mode or Palette mode, the boundary strength of any boundary of the geometric partition is determined to be a first identifier value.
[0058] That is, when the prediction mode of a certain geometric partition is BDPCM mode or palette mode, the boundary strength of all its boundaries is set to the first identifier value (i.e. no filtering is performed).
[0059] Among them, BDPCM mode and palette mode are mainly used for screen content encoding. Their prediction residuals have directional (BDPCM) or indexed characteristics (palette), and the block effect they produce is relatively weak. By directly skipping the filtering operation through geometric partitioning of these special modes, the original sharpness of the reconstructed pixels can be effectively preserved, and the subjective visual quality of the screen content can be improved.
[0060] Step 204: In response to the fact that the prediction mode of the geometric partition is not the BDPCM mode or the palette mode, determine the boundary strength of any boundary of the geometric partition based on the prediction mode of the geometric partition and the prediction mode of the adjacent blocks of the geometric partition.
[0061] In one possible embodiment of this application, in response to the prediction mode of the geometric partition not being the BDPCM mode or the palette mode, for any boundary, the boundary strength of the boundary is determined according to the prediction mode of the geometric partition and the prediction mode of the target block corresponding to the boundary; wherein, the target block corresponding to the boundary is the block other than the geometric partition among the two adjacent blocks of the boundary.
[0062] That is, when the prediction mode of a certain geometric partition is not the BDPCM mode or the palette mode, the boundary strength needs to be determined based on the prediction modes of the blocks on both sides of the boundary.
[0063] Specifically, for inter-block boundaries in non-BDPCM and palette modes, the filtering intensity is adaptively allocated based on the matching degree of the prediction modes on both sides of the boundary. The boundary intensity can be specifically set based on the difference in prediction modes between the geometric partition and adjacent blocks. For example, when the prediction modes of the geometric partition and adjacent blocks differ significantly (e.g., one is intra-frame and the other is inter-frame), the probability of block artifacts at the boundary is higher, and a higher boundary intensity can be assigned accordingly for strong filtering. When the prediction modes are consistent or similar, a lighter filtering or no filtering is used to avoid over-smoothing of the true edges.
[0064] In one possible embodiment of this application, for any boundary, in response to the prediction mode of the target block corresponding to the boundary being BDPCM mode or Palette mode, the boundary strength of the boundary is determined as a first identifier value; in response to the prediction mode of the geometric partition being intra-frame prediction mode, and / or the prediction mode of the target block corresponding to the boundary being intra-frame prediction mode, the boundary strength of the boundary is determined as a third identifier value; in response to the prediction mode of the geometric partition being IBC mode or Inter-frame prediction mode, and the prediction mode of the target block corresponding to the boundary being IBC mode or Inter-frame prediction mode, the boundary strength of the boundary is determined as a second identifier value.
[0065] That is, in non-BDPCM mode and palette mode, determining the boundary strength between blocks includes the following three cases: 1. If the prediction mode of the geometric partition is not BDPCM mode or palette mode, but the prediction mode of the target block corresponding to the boundary is BDPCM mode or palette mode, then the boundary strength of the boundary can be directly determined as the first identifier value (i.e., no filtering is performed). 2. As long as the prediction mode of at least one of the target blocks corresponding to the geometric partition is the intra-frame prediction mode, the boundary strength of the boundary is determined to be the third identifier value (i.e., the first filtering is performed). 3. If the prediction modes of the target blocks corresponding to the geometric partitions and boundaries are all IBC mode or inter-frame prediction mode, then the boundary strength of the boundary is determined as the second identifier value (i.e., the second filtering is performed).
[0066] Specifically, when the prediction mode of the target block corresponding to the boundary is BDPCM or Palette mode, the boundary strength is directly determined as the first identifier value (no filtering). This avoids the sharp edges and color index structure damage caused by filtering in these special modes, protecting the inherent characteristics of the screen content. When the prediction mode of the target block corresponding to the geometric partition and / or boundary is intra-frame prediction mode, the boundary strength is determined as the third identifier value (first filtering) because intra-frame prediction boundaries are prone to strong discontinuities, which can suppress block artifacts. When the prediction modes of both the geometric partition and the target block corresponding to the boundary are IBC or inter-frame prediction mode, the boundary jumps caused by motion compensation are relatively gentle. The boundary strength is determined as the second identifier value (second filtering), which can moderately smooth the boundary while avoiding excessive smoothing of details. This hierarchical filtering strategy based on prediction mode type achieves fine-grained control of stronger filtering for critical boundaries, moderate filtering for ordinary boundaries, and skipping filtering for special mode boundaries while maintaining coding efficiency.
[0067] In one possible embodiment of this application, the inter-frame prediction modes include: Inter mode, which indicates the prediction of motion information of the current block based on MVD (Motion Vector Difference) and reference frame index; and Merge mode, which indicates the prediction of motion information of the current block based on the motion information of neighboring blocks of the current block.
[0068] For example, the first identifier value is 0, the second identifier value is 1, and the third identifier value is 2. As shown in Figure 3(a), the block to be filtered is a GPM block, which is divided into non-diagonal binary partitions. The prediction mode of geometric partition 1 is BDPCM mode, and the prediction mode of geometric partition 2 is IBC mode. Then, the boundary intensity of the luminance and chrominance components of boundary 1 / 3 / 5 / 7 can be set to 0. Assuming that the prediction mode of the adjacent blocks of boundary 2 / 4 / 6 is IBC mode or inter-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 2 / 4 / 6 is set to 1; assuming that the prediction mode of the adjacent blocks of boundary 2 / 4 / 6 is intra-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 2 / 4 / 6 is set to 2. Among them, the inter-frame prediction mode includes Inter mode and Merge mode.
[0069] For example, the first identifier value is 0, the second identifier value is 1, and the third identifier value is 2. As shown in Figure 3(b), the block to be filtered is a GPM block, which is divided into non-diagonal binary partitions. The prediction mode of geometric partition 1 is BDPCM mode, and the prediction mode of geometric partition 2 is BDPCM mode. Then, the boundary intensity of the luminance and chrominance components of the boundary 1 / 2 / 3 / 4 / 5 / 6 / 7 can be set to 0.
[0070] For example, the first identifier value is 0, the second identifier value is 1, and the third identifier value is 2. As shown in Figure 3(c), the block to be filtered is a GPM block, which is divided into two parts. The prediction mode of geometric partition 1 is BDPCM mode, and the prediction mode of geometric partition 2 is Merge mode. Then, the boundary intensity of the luminance and chrominance components of boundary 1 / 3 / 5 / 7 can be set to 0. Assuming that the prediction mode of the adjacent blocks of boundary 2 / 4 / 6 is IBC mode or inter-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 2 / 4 / 6 is set to 1; assuming that the prediction mode of the adjacent blocks of boundary 2 / 4 / 6 is intra-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 2 / 4 / 6 is set to 2. Among them, the inter-frame prediction mode includes Inter mode and Merge mode.
[0071] For example, the first identifier value is 0, the second identifier value is 1, and the third identifier value is 2. As shown in Figure 3(d), the block to be filtered is a GPM block, which is divided into diagonal binary partitions. The prediction mode for geometric partition 1 is BDPCM mode, and the prediction mode for geometric partition 2 is IBC mode. Therefore, the boundary intensity of the luminance and chrominance components of boundaries 2 / 4 / 5 can be set to 0. If the prediction mode of adjacent blocks at boundary 1 / 3 is IBC mode or inter-frame prediction mode, then the boundary intensity of the luminance and chrominance components of boundary 1 / 3 is set to 1; if the prediction mode of adjacent blocks at boundary 1 / 3 is intra-frame prediction mode, then the boundary intensity of the luminance and chrominance components of boundary 1 / 3 is set to 2. Inter-frame prediction modes include Inter mode and Merge mode.
[0072] For example, the first identifier value is 0, the second identifier value is 1, and the third identifier value is 2. As shown in Figure 3(e), the block to be filtered is a GPM block, which is divided into diagonal binary partitions. The prediction mode of geometric partition 1 is BDPCM mode, and the prediction mode of geometric partition 2 is Inter mode. Then, the boundary intensity of the luminance and chrominance components of boundary 2 / 4 / 5 can be set to 0. Assuming that the prediction mode of the adjacent block of boundary 1 / 3 is IBC mode or inter-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 1 / 3 is set to 1; assuming that the prediction mode of the adjacent block of boundary 1 / 3 is intra-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 1 / 3 is set to 2. Among them, the inter-frame prediction mode includes Inter mode and Merge mode.
[0073] For example, the first identifier value is 0, the second identifier value is 1, and the third identifier value is 2. As shown in Figure 3(f), the block to be filtered is a GPM block, which is divided into diagonal binary partitions. The prediction mode of geometric partition 1 is Palette mode, and the prediction mode of geometric partition 2 is Inter mode. Then, the boundary intensity of the luminance and chrominance components of boundary 2 / 4 / 5 can be set to 0. Assuming that the prediction mode of the adjacent block of boundary 1 / 3 is IBC mode or inter-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 1 / 3 is set to 1; assuming that the prediction mode of the adjacent block of boundary 1 / 3 is intra-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 1 / 3 is set to 2. Among them, the inter-frame prediction mode includes Inter mode and Merge mode.
[0074] Step 205: Filter the block to be filtered according to the filtering method corresponding to the boundary strength of any boundary of the two geometric partitions of the block to be filtered.
[0075] For example, a 4×4 block can be used as the filtering processing unit of the block to be filtered. For any filtering processing unit, the boundary strength of the filtering processing unit can be determined according to the boundary strength of any boundary of the two geometric partitions of the block to be filtered. Then, the corresponding boundary of the filtering processing unit is filtered according to the filtering method corresponding to the boundary strength of the filtering processing unit.
[0076] In this embodiment, the prediction mode of the block to be filtered in the encoder or decoder is determined; in response to the prediction mode of the block to be filtered being GPM, the prediction modes of the two geometric partitions of the block to be filtered are determined; for any geometric partition, in response to the prediction mode of the geometric partition being BDPCM mode or palette mode, the boundary strength of any boundary of the geometric partition is determined according to the prediction mode of the geometric partition; in response to the prediction mode of the geometric partition not being BDPCM mode or palette mode, the boundary strength of any boundary of the geometric partition is determined according to the prediction mode of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition. Boundary strength: The filtering method is applied to the block to be filtered based on the boundary strength of any boundary of the two geometric partitions. For geometric partitions with strong spatial correlation or independent coding characteristics, such as BDPCM or palette mode, the boundary strength is determined directly based on its own prediction mode, avoiding comparison with the complex modes of adjacent blocks and reducing the computational complexity and processing delay of deblocking filtering. For other prediction modes, the boundary strength is determined by combining the prediction modes of the geometric partitions and adjacent blocks to ensure that the filtering strength accurately matches the local coding features, effectively suppressing block artifacts and preserving image details.
[0077] It should be noted that the GPM in the H.266 / VVC standard only supports dividing a CU into two partitions, i.e., performing binary geometric partitioning. However, in future standards, CPM may be extended to support dividing a CU into three partitions, i.e., performing ternary geometric partitioning. For example, GPM performing ternary geometric partitioning is shown in Figure 3(g). In this case, the filtering method of this application still applies: For any geometric partition, in response to whether the prediction mode of the geometric partition is BDPCM mode or palette mode, the boundary strength of any boundary of the geometric partition is determined according to the prediction mode of the geometric partition. In response to the fact that the prediction mode of the geometric partition is not BDPCM mode or palette mode, the boundary strength of any boundary of the geometric partition is determined based on the prediction mode of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition.
[0078] In one possible embodiment of this application, the boundary strength includes: a first identifier value for indicating that the corresponding boundary is not filtered; a second identifier value for indicating that the corresponding boundary is filtered in the first way; and a third identifier value for indicating that the corresponding boundary is filtered in the second way; wherein the filtering strength of the first filter is less than the filtering strength of the second filter.
[0079] Furthermore, in response to the prediction mode of geometric partitioning being either BDPCM mode or palette mode, the boundary strength of any boundary of the geometric partitioning is determined to be the first identifier value. In response to the prediction mode of the geometric partition not being BDPCM mode or palette mode, for any boundary, the boundary strength is determined based on the prediction mode of the geometric partition and the prediction mode of the target block corresponding to the boundary; wherein, the target block corresponding to the boundary is the block other than the geometric partition among the two adjacent blocks of the boundary. In one possible embodiment, for any boundary, in response to the prediction mode of the target block corresponding to the boundary being BDPCM mode or palette mode, the boundary strength of the boundary is determined as a first identifier value; in response to the prediction mode of the geometric partition being intra-frame prediction mode, and / or the prediction mode of the target block corresponding to the boundary being intra-frame prediction mode, the boundary strength of the boundary is determined as a third identifier value; in response to the prediction mode of the geometric partition being IBC mode or inter-frame prediction mode, and the prediction mode of the target block corresponding to the boundary being IBC mode or inter-frame prediction mode, the boundary strength of the boundary is determined as a second identifier value.
[0080] For example, the first identifier value is 0, the second identifier value is 1, and the third identifier value is 2. As shown in Figure 3(g), the block to be filtered is a GPM block, which is divided into three geometric partitions. The prediction mode of geometric partition 1 is IBC mode, the prediction mode of geometric partition 2 is BDPCM mode, and the prediction mode of geometric partition 3 is Inter mode. Then, the boundary intensity of the luminance and chrominance components of boundary 3 / 8 / 9 can be set to 0. Assuming that the prediction mode of the adjacent blocks of boundary 1 / 2 / 4 / 5 / 6 / 7 is IBC mode or inter-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 1 / 2 / 4 / 5 / 6 / 7 is set to 1; assuming that the prediction mode of the adjacent blocks of boundary 1 / 2 / 4 / 5 / 6 / 7 is intra-frame prediction mode, the boundary intensity of the luminance and chrominance components of boundary 1 / 2 / 4 / 5 / 6 / 7 is set to 2. Among them, the inter-frame prediction mode includes Inter mode and Merge mode.
[0081] This embodiment provides a filtering method. Figure 4 This is a flowchart illustrating another filtering method provided in an embodiment of this application.
[0082] like Figure 4 As shown, the filtering method may include the following steps: Step 401: Determine the prediction mode of the block to be filtered in the encoding or decoding end.
[0083] Step 402: In response to the prediction mode of the block to be filtered being GPM, determine the prediction modes of the two geometric partitions of the block to be filtered.
[0084] Step 403: For any geometric partition, determine the boundary strength of the geometric partition based on at least one of the prediction mode of the geometric partition and the prediction mode of the adjacent blocks of the geometric partition.
[0085] Step 404: Filter the block to be filtered based on the boundary strength of the two geometric partitions of the block to be filtered.
[0086] It should be noted that the relevant content in steps 401-404 can be found in the relevant descriptions in the foregoing embodiments, and will not be repeated here.
[0087] Step 405: In response to the prediction mode of the block to be filtered being ISP mode, determine whether the multiple geometric partitions of the block to be filtered share the prediction mode.
[0088] Step 406: In response to the fact that multiple geometric partitions do not share prediction modes, determine the boundary strength of the inner boundary of the block to be filtered based on the prediction modes of the multiple geometric partitions and the prediction modes of the adjacent geometric partitions of the multiple geometric partitions in the block to be filtered.
[0089] In one possible embodiment of this application, for any inner boundary of the block to be filtered, in response to the prediction mode of either of the two adjacent blocks of the inner boundary being BDPCM mode or palette mode, the boundary strength of the inner boundary is determined as a first identifier value; in response to the prediction mode of either of the two adjacent blocks of the inner boundary being intra-frame prediction mode, the boundary strength of the inner boundary is determined as a third identifier value; in response to the prediction modes of both adjacent blocks of the inner boundary being IBC mode or inter-frame prediction mode, the boundary strength of the inner boundary is determined as a second identifier value; wherein, the two adjacent blocks of the inner boundary are two geometric partitions of the block to be filtered.
[0090] For example, the first identifier value is 0, the second identifier value is 1, and the third identifier value is 2. Figure 5 As shown, the prediction mode of the block to be filtered is ISP mode, and the four geometric partitions do not share prediction modes. The prediction mode of geometric partition 1 is DC (Direct Current) mode, the prediction mode of geometric partition 2 is BDPCM mode, the prediction mode of geometric partition 3 is DC mode, and the prediction mode of geometric partition 4 is BDPCM mode. That is, the prediction modes of the four geometric partitions are DC / BDPCM / DC / BDPCM in sequence. Therefore, the boundary intensity of the luminance and chrominance components of the inner boundary 1 / 2 / 3 can be set to 0. Similarly, if the prediction modes of the four geometric partitions are DC / BDPCM / BDPCM / DC in sequence, the boundary intensity of the luminance and chrominance components of the inner boundary 1 / 2 / 3 can also be set to 0.
[0091] In this embodiment, in response to the prediction mode of the block to be filtered being ISP mode, it is determined whether the multiple geometric partitions of the block to be filtered share the prediction mode; in response to the multiple geometric partitions not sharing the prediction mode, the boundary strength of the inner boundary of the block to be filtered is determined based on the prediction modes of the multiple geometric partitions and the prediction modes of the adjacent geometric partitions in the block to be filtered. Thus, for a block to be filtered containing multiple geometric partitions in ISP mode, by determining whether the geometric partitions share the prediction mode, and dynamically determining the inner boundary strength using the prediction modes of the geometric partitions themselves and the adjacent geometric partitions when they do not share the prediction mode, it is possible to more precisely reflect the differences in coding features between different sub-partitions, avoid block effect residues or over-filtering caused by mode abrupt changes or boundary strength mismatches, and improve the accuracy of deblocking filtering and subjective and objective image quality while maintaining the details inside the sub-partitions.
[0092] To achieve the above embodiments, this application also proposes a filtering device.
[0093] Figure 6 This is a schematic diagram of the structure of a filtering device provided in an embodiment of this application.
[0094] like Figure 6 As shown, the filter device 600 includes: The first determining module 601 is used to determine the prediction mode of the block to be filtered in the encoding or decoding end; The second determining module 602 is used to determine the prediction modes of the two geometric partitions of the block to be filtered in response to the prediction mode of the block to be filtered being the geometric partition mode GPM. The third determining module 603 is used to determine the boundary strength of a geometric partition based on at least one of the prediction mode of the geometric partition and the prediction mode of the adjacent blocks of the geometric partition for any geometric partition. The filtering module 604 is used to perform filtering on the block to be filtered based on the boundary strength of the two geometric partitions of the block to be filtered.
[0095] Optionally, the third determining module 603 includes: a first determining unit, configured to, for any geometric partition, determine the boundary strength of any boundary of the geometric partition based on the prediction mode of the geometric partition, in response to the prediction mode of the geometric partition being either a block-based differential pulse code modulation (BDPCM) mode or a palette mode; and a second determining unit, configured to, in response to the prediction mode of the geometric partition not being either a BDPCM mode or a palette mode, determine the boundary strength of any boundary of the geometric partition based on the prediction mode of the geometric partition and the prediction modes of adjacent blocks of the geometric partition.
[0096] Optionally, the boundary strength includes: a first identifier value, used to indicate that the corresponding boundary is not filtered; a second identifier value, used to indicate that the corresponding boundary is filtered in the first way; and a third identifier value, used to indicate that the corresponding boundary is filtered in the second way; wherein the filtering strength of the first filter is less than the filtering strength of the second filter.
[0097] Optionally, the first determining unit is specifically used to: in response to the prediction mode of the geometric partition being either BDPCM mode or Palette mode, determine that the boundary strength of any boundary of the geometric partition is a first identifier value.
[0098] Optionally, the second determining unit is specifically used to: in response to the prediction mode of the geometric partition not being a BDPCM mode or a palette mode, for any boundary, determine the boundary strength of the boundary based on the prediction mode of the geometric partition and the prediction mode of the target block corresponding to the boundary; wherein the target block corresponding to the boundary is the block other than the geometric partition among the two adjacent blocks of the boundary.
[0099] Optionally, the second determining unit is specifically configured to: for any boundary, in response to the prediction mode of the target block corresponding to the boundary being BDPCM mode or Palette mode, determine the boundary strength of the boundary as a first identifier value; in response to the prediction mode of the geometric partition being intra-frame prediction mode, and / or, the prediction mode of the target block corresponding to the boundary being intra-frame prediction mode, determine the boundary strength of the boundary as a third identifier value; in response to the prediction mode of the geometric partition being intra-frame block copy (IBC) mode or inter-frame prediction mode, and the prediction mode of the target block corresponding to the boundary being IBC mode or inter-frame prediction mode, determine the boundary strength of the boundary as a second identifier value.
[0100] Optionally, the inter-frame prediction modes include: Inter mode, which indicates the prediction of motion information of the current block based on motion vector difference (MVD) and reference frame index; and Merge mode, which indicates the prediction of motion information of the current block based on the motion information of neighboring blocks.
[0101] Optionally, the filtering module 604 is specifically used to: perform filtering on the block to be filtered according to the filtering method corresponding to the boundary strength of any boundary of the two geometric partitions of the block to be filtered.
[0102] Optionally, the first determining module 601 is specifically used to: adopt rate-distortion optimization (RDO) decision to determine the prediction mode of the block to be filtered in the encoding end; and determine the prediction mode of the block to be filtered in the decoding end based on the syntax elements in the bitstream.
[0103] Optionally, the adjacent blocks of any geometric partition include: the geometric partitions adjacent to the geometric partition in the block to be filtered; and the blocks adjacent to the geometric partition in the adjacent blocks of the block to be filtered.
[0104] Optionally, the above apparatus further includes: a fourth determining module, configured to determine whether multiple geometric partitions of the block to be filtered share a prediction mode in response to the prediction mode of the block to be filtered being an intra-frame sub-block partitioning mode (ISP); and a fifth determining module, configured to determine the boundary strength of the inner boundary of the block to be filtered based on the prediction modes of the multiple geometric partitions and the prediction modes of adjacent geometric partitions of the multiple geometric partitions in the block to be filtered in response to the multiple geometric partitions not sharing a prediction mode.
[0105] It should be noted that the foregoing explanation of the filtering method embodiment also applies to the filtering device of this embodiment, and will not be repeated here.
[0106] In this embodiment, the prediction mode of the block to be filtered in the encoding or decoding end is determined; in response to the prediction mode of the block to be filtered being GPM, the prediction modes of the two geometric partitions of the block to be filtered are determined; for any geometric partition, the boundary strength of the geometric partition is determined based on at least one of the prediction mode of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition; filtering is performed on the block to be filtered based on the boundary strengths of the two geometric partitions of the block to be filtered; wherein, for the block to be filtered with the prediction mode of GPM, the boundary strength is no longer uniformly set for the entire block, but the boundary strength is calculated for each geometric partition separately, which can flexibly adjust the boundary strength when the prediction modes of each geometric partition are different, so as to better adapt to the mixed image content, improve the subjective visual effect, and avoid the problem that the prediction gain brought by GPM is weakened by the unsuitable filtering.
[0107] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 700 in this embodiment is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0108] like Figure 7 As shown, the above-mentioned electronic device 700 includes: The memory 701 and the processor 702 are connected by a bus 703. The memory 701 stores a computer program, and when the processor 702 executes the program, it implements the filtering method of the present application embodiment.
[0109] Bus 703 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0110] Electronic device 700 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by electronic device 700, including volatile and non-volatile media, removable and non-removable media.
[0111] Memory 701 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 704 and / or cache memory 705. Electronic device 700 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 706 can be used to read and write non-removable, non-volatile magnetic media (… Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 703 via one or more data media interfaces. Memory 701 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0112] A program / utility 708 having a set (at least one) of program modules 707 may be stored, for example, in memory 701. Such program modules 707 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 707 typically perform the functions and / or methods described in the embodiments of this application.
[0113] Electronic device 700 can also communicate with one or more external devices 709 (e.g., keyboard, pointing device, display 711, etc.), and with one or more devices that enable a user to interact with the electronic device 700, and / or with any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 712. Furthermore, electronic device 700 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 713. Figure 7 As shown, network adapter 713 communicates with other modules of electronic device 700 via bus 703. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0114] The processor 702 executes various functional applications and data processing by running programs stored in the memory 701.
[0115] It should be noted that the implementation process and technical principles of the electronic device in this embodiment are explained in the foregoing description of the filtering method in the embodiments of this application, and will not be repeated here.
[0116] To implement the above embodiments, this application also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.
[0117] To implement the above embodiments, this application also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.
[0118] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this application comply with relevant laws and regulations and do not violate public order and good morals.
[0119] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.
[0120] This application is intended to provide an implementation scheme for users to selectively prevent the use or access to their personal information data. Specifically, this application is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information is de-identified to protect user privacy.
[0121] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0122] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0123] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0124] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0125] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0126] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0127] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0128] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A filtering method, characterized in that, Includes the following steps: Determine the prediction mode of the block to be filtered in the encoder or decoder; In response to the prediction mode of the block to be filtered being the geometric partitioning mode (GPM), the prediction modes of the two geometric partitioning regions of the block to be filtered are determined. For any of the geometric partitions, the boundary strength of the geometric partition is determined based on at least one of the prediction mode of the geometric partition and the prediction mode of the adjacent blocks of the geometric partition. Filtering is performed on the block to be filtered based on the boundary strength of the two geometric partitions of the block to be filtered.
2. The method according to claim 1, characterized in that, For any of the geometric partitions, determining the boundary strength of the geometric partition based on at least one of the prediction modes of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition includes: For any of the geometric partitions, in response to the prediction mode of the geometric partition being either a block-based differential pulse code modulation (BDPCM) mode or a palette mode, the boundary strength of any boundary of the geometric partition is determined according to the prediction mode of the geometric partition. In response to the fact that the prediction mode of the geometric partition is not BDPCM mode or palette mode, the boundary strength of any boundary of the geometric partition is determined according to the prediction mode of the geometric partition and the prediction mode of the adjacent blocks of the geometric partition.
3. The method according to claim 2, characterized in that, The boundary strength includes: The first identifier value is used to indicate that no filtering is performed at the corresponding boundary; The second identifier value is used to indicate the first filtering to be performed at the corresponding boundary; The third identifier value is used to indicate the second filtering to be performed at the corresponding boundary; The filtering strength of the first filter is less than that of the second filter.
4. The method according to claim 3, characterized in that, The prediction mode in response to the geometric partitioning is either a block-based differential pulse code modulation (BDPCM) mode or a palette mode. Based on the prediction mode of the geometric partitioning, the boundary strength of any boundary of the geometric partitioning is determined, including: In response to the prediction mode of the geometric partition being either BDPCM mode or Palette mode, the boundary strength of any boundary of the geometric partition is determined to be the first identifier value.
5. The method according to claim 3, characterized in that, In response to the prediction mode of the geometric partition not being a BDPCM mode or a palette mode, the boundary strength of any boundary of the geometric partition is determined based on the prediction mode of the geometric partition and the prediction modes of adjacent blocks of the geometric partition, including: In response to the prediction mode of the geometric partition not being a BDPCM mode or a palette mode, for any of the boundaries, the boundary strength of the boundary is determined according to the prediction mode of the geometric partition and the prediction mode of the target block corresponding to the boundary; wherein, the target block corresponding to the boundary is the block other than the geometric partition among the two adjacent blocks of the boundary.
6. The method according to claim 5, characterized in that, For any of the boundaries, determining the boundary strength based on the prediction mode of the geometric partitioning and the prediction mode of the target block corresponding to the boundary includes: For any of the boundaries, in response to the prediction mode of the target block corresponding to the boundary being either BDPCM mode or palette mode, the boundary strength of the boundary is determined to be the first identifier value. In response to the prediction mode of the geometric partition being an intra-frame prediction mode, and / or the prediction mode of the target block corresponding to the boundary being an intra-frame prediction mode, the boundary strength of the boundary is determined as the third identifier value. In response to the prediction mode of the geometric partition being either intra-block copy (IBC) mode or inter-frame prediction mode, and the prediction mode of the target block corresponding to the boundary being either IBC mode or inter-frame prediction mode, the boundary strength of the boundary is determined to be the second identifier value.
7. The method according to claim 6, characterized in that, The inter-frame prediction mode includes: Inter mode, which is used to indicate the prediction of motion information of the current block based on motion vector difference (MVD) and reference frame index; The Merge mode is used to indicate the motion information of the current block based on the motion information of the neighboring blocks of the current block.
8. The method according to claim 2, characterized in that, The step of filtering the block to be filtered based on the boundary strength of the two geometric partitions of the block to be filtered includes: The filtering is performed on the block to be filtered according to the filtering method corresponding to the boundary strength of any boundary of the two geometric partitions of the block to be filtered.
9. The method according to claim 1, characterized in that, Determining the prediction mode of the block to be filtered in the encoding or decoding end includes: Rate-distortion optimized RDO decision is used to determine the prediction mode of the block to be filtered in the encoder. Based on the syntax elements in the bitstream, determine the prediction mode of the block to be filtered in the decoding end.
10. The method according to any one of claims 1-9, characterized in that, Adjacent blocks of any of the geometric partitions include: The geometric partitions adjacent to the geometric partitions in the block to be filtered; The blocks adjacent to the geometric partition in the adjacent blocks of the block to be filtered.
11. The method according to any one of claims 1-9, characterized in that, The method further includes: In response to the prediction mode of the block to be filtered being the intra-frame sub-block partitioning (ISP) mode, it is determined whether the multiple geometric partitions of the block to be filtered share the prediction mode. In response to the fact that the plurality of geometric partitions do not share a prediction mode, the boundary strength of the inner boundary of the block to be filtered is determined based on the prediction modes of the plurality of geometric partitions and the prediction modes of the adjacent geometric partitions of the plurality of geometric partitions in the block to be filtered.
12. A filtering device, characterized in that, include: The first determining module is used to determine the prediction mode of the block to be filtered in the encoding or decoding end; The second determining module is used to determine the prediction modes of the two geometric partitions of the block to be filtered in response to the prediction mode of the block to be filtered being the geometric partition mode GPM. The third determining module is used to determine the boundary strength of any geometric partition based on at least one of the prediction modes of the geometric partition and the prediction modes of the adjacent blocks of the geometric partition. The filtering module is used to perform filtering on the block to be filtered based on the boundary strength of the two geometric partitions of the block to be filtered.
13. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-11.
15. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-11.
