Image enhancement method and apparatus

By performing differential analysis and weighting of the filtered pixel values ​​in video encoding technology, the problem of the filtered pixel values ​​being away from the original value is solved, and image quality and encoding and decoding performance are improved.

JP7671892B2Active Publication Date: 2025-05-02HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024042283
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-06-05
Filing Date
2024-03-18
Publication Date
2025-05-02
Estimated Expiration
2041-06-03

AI Technical Summary

Technical Problem

In the existing video encoding technology, excessive filtering causes the filtered pixel value to be far away from the original pixel value, affecting image quality and encoding and decoding performance.

Method used

By determining the difference between the first filtered pixel value and its previous pixel value, and performing weighting or compensation processing of the pixel value, the filtered pixel value is adjusted to make it closer to the original pixel value.

Benefits of technology

It effectively avoids the problem of excessive or too small pixel values ​​after filtering, improves image quality, and improves encoding and decoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007671892000002
    Figure 0007671892000002
  • Figure 0007671892000003
    Figure 0007671892000003
  • Figure 0007671892000004
    Figure 0007671892000004
Patent Text Reader

Abstract

To provide an image enhancement method and device.SOLUTION: The present invention provides an image enhancement method and device. The image enhancement method includes the steps of determining a first pixel value of the pixel point after first filtering processing for any pixel point of a current block that satisfies a first filtering processing condition, emphasizing the pixel value of the pixel point on the basis of the first pixel value and a second pixel value of the pixel point before the first filtering processing, and determining a third pixel value of the pixel point after the emphasizing step.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to video encoding / decoding technology, and in particular to an image enhancement method and apparatus. [Background technology]

[0002] Complete video encoding typically includes operations such as prediction, transformation, quantization, entropy coding, and filtering.

[0003] Currently, common filtering techniques adopted as standards include a deblocking filter (DBF) technique, a sample adaptive offset (SAO) technique, and an adaptive loop filter (ALF) technique.

[0004] The DBF technique is used to remove blocking artifacts caused by block coding. The SAO technique classifies the pixel values ​​of samples based on the gradient values ​​of the surrounding blocks, and adds different compensation values ​​to the pixel values ​​of each category, making the reconstructed image closer to the original image. The ALF technique performs enhancement filtering on the reconstructed image through a Wiener filter, making the reconstructed image closer to the original image.

[0005] The above-mentioned DBF, SAO, and ALF filtering techniques all perform classification based on the current pixel value or the relationship between the current pixel value and surrounding pixel values, and further perform different filtering operations based on different categories, which may result in over-filtering, i.e., 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. Summary of the Invention

[0006] Therefore, the present invention provides an image enhancement method and apparatus.

[0007] Specifically, the present invention is realized by the following technical solutions: According to a first aspect of an embodiment of the present invention, an image enhancement method is provided, which includes: for any pixel point of a current block that satisfies a first filtering processing condition, a step of determining a first pixel value of the pixel point after a first filtering processing; and a step of enhancing the pixel value of the pixel point based on the first pixel value and a second pixel value of the pixel point before the first filtering processing, and obtaining a third pixel value of the pixel point after the enhancement processing.

[0008] According to a second aspect of an embodiment of the present invention, there is provided an image enhancement device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, and a computer program is stored in the memory, and the processor executes, using the computer program, the steps of: determining a first pixel value of any pixel point of a current block that satisfies a first filtering processing condition after the first filtering processing; and enhancing the pixel value of the pixel point based on the first pixel value and a second pixel value of the pixel point before the first filtering processing, and obtaining a third pixel value of the pixel point after the enhancement processing.

[0009] The image enhancement method of the embodiment of the present invention improves image quality and improves encoding / decoding performance by determining, for any pixel point of a current image block that satisfies a first filtering processing condition, a first pixel value of the pixel point after the first filtering processing, enhancing the pixel value of the pixel point based on the first pixel value and a second pixel value of the pixel point before the first filtering processing, and obtaining a third pixel value of the pixel point after the enhancement processing. [Brief description of the drawings]

[0010] [Figure 1A] FIG. 2 is a schematic diagram of block division as shown in an exemplary embodiment of the present invention; [Figure 1B] FIG. 2 is a schematic diagram of block division as shown in an exemplary embodiment of the present invention; [Diagram 2]FIG. 2 is a schematic diagram of an encoding and decoding method as shown in an exemplary embodiment of the present invention. [Diagram 3] FIG. 2 is a schematic diagram of DBF filtering pixels as shown in an exemplary embodiment of the present invention. [Figure 4] 4 is a flow chart of an image enhancement method according to an exemplary embodiment of the present invention. [Diagram 5] FIG. 2 is a schematic diagram of a hardware structure of an image enhancement device according to an exemplary embodiment of the present invention; [Figure 6] 1 is a schematic diagram of the functional structure of an image enhancement device as shown in an exemplary embodiment of the present invention; [Figure 7] FIG. 2 is a schematic diagram of the functional structure of another image enhancement device according to an exemplary embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Exemplary embodiments will now be described in detail, examples of which are illustrated in the drawings. When the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not all embodiments consistent with the present invention. On the contrary, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.

[0012] The terms used in the embodiments of the present invention are for the purpose of describing particular embodiments only and are not intended to limit the present invention. Unless the context clearly indicates otherwise, the singular forms "a," "the," and "the" used in the embodiments and claims of the present invention are also intended to include the plural forms.

[0013] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, first, some technical terms related to the embodiments of the present invention and the main processes of existing video encoding and decoding will be briefly described.

[0014] 1. Technical terms

[0015] 1. Rate-Distortion Optimized (RDO) method: The indexes for evaluating the efficiency of coding include bit rate and Peak Signal to Noise Ratio (PSNR). The lower the bit rate, the higher the compression rate, and the higher the PSNR, the higher the quality of the reconstructed image. When selecting a coding mode, the discriminant is essentially a combined evaluation of both. The cost corresponding to the mode is J(mode)=D+λ*R, where D represents distortion, which can generally be evaluated using the SSE (sum of the squared errors) index, where SSE refers to the mean square sum of the difference between the reconstructed image block and the source image, λ is the Lagrange multiplier, and R is the actual number of bits required to code the image block in the mode, including the total number of bits required for coding mode information, motion information, residuals, etc. When selecting a mode, using the RDO method to make a comparative decision on the coding mode can generally ensure optimal coding performance.

[0016] 2. Sequence Parameter Set (SPS): This set contains flag bits that determine whether a particular tool (method) is allowed to be turned on or off in the sequence. If this flag bit is 1, the corresponding tool (method) is allowed to be turned on in the video sequence; otherwise, the tool (method) cannot be turned on during the encoding of the sequence.

[0017] 3. Picture Parameter Set (PPS): This set contains a flag bit that determines whether a certain tool (method) is allowed to be turned on or off in a frame image. If this flag bit is 1, the corresponding tool (method) is allowed to be turned on in the frame image; otherwise, the tool (method) cannot be turned on during the encoding of the frame image.

[0018] 4. Picture header: Common information for a specific frame image.

[0019] 5. Slice header: A frame image contains one or more slices, and the slice header information contains a flag bit that determines whether a particular tool (method) is allowed to be turned on or off in a particular slice. If this flag bit is 1, the corresponding tool (method) is allowed to be turned on in the slice, otherwise the tool (method) cannot be turned on during encoding of the slice.

[0020] 6. SAO filtering: Used to remove ringing artifacts. Ringing artifacts are caused by quantization distortion of high-frequency AC coefficients, which causes ripples around edges after decoding. The larger the transform block size, the more noticeable the ringing artifacts become. The basic principle of SAO is to compensate by adding negative values ​​to the peak pixels of the reconstruction curve, and positive values ​​to the trough pixels. SAO uses the CTU as the basic unit, and includes two major compensation methods, edge offset (EO) and band offset (BO), and also introduces parameter fusion technology.

[0021] 7. ALF filtering: Based on the original signal and the distorted signal, the optimal filter in the mean square method is calculated, that is, the Wiener filter. The ALF filter is usually a 7x7 or 5x5 diamond filter.

[0022] II. Block division techniques in existing video coding standards

[0023] In HEVC (High Efficiency Video Coding), a coding tree unit (CTU) is recursively divided into coding units (CU) using a quadtree. At the leaf node CU level, it is determined whether to use intra coding or inter coding. A CU can be further divided into two or four prediction units (PU), and the same prediction information is used within the same PU. After obtaining residual information after prediction, the CU can be further divided into multiple transform units (TU) using a quadtree. For example, the current image block in the present invention is one PU.

[0024] However, in the latest proposed Versatile Video Coding (VVC), the block partitioning technology has changed significantly. The partitioning structure combining 2-ary / 3-ary / 4-ary trees replaces the traditional partitioning model, cancels the traditional concept of CU, PU, ​​and TU, and supports more flexible partitioning methods of CU. CUs can be partitioned into squares or rectangles. CTUs are first partitioned into 4-ary trees, and the leaf nodes obtained by the 4-ary tree partitioning can be further partitioned into 2-ary trees or 3-ary trees. As shown in Figure 1A, there are five types of partitioning types for CUs as shown in (a): 4-ary tree partitioning as shown in (b), horizontal 2-ary tree partitioning as shown in (c), vertical 2-ary tree partitioning as shown in (d), horizontal 3-ary tree partitioning as shown in (e), and vertical 3-ary tree partitioning as shown in (f). As shown in Figure 1B, the partitioning of CUs in a CTU may be a partitioning that freely combines the above five partitioning types. From the above, it is possible to make the shapes of each PU different by different partitioning methods, for example, rectangles and squares with different sizes.

[0025] 3. The main process of existing video encoding and decoding

[0026] Taking video coding as an example, as shown in (a) of Figure 2, video coding generally includes processes such as prediction, transformation, quantization, and entropy coding, and furthermore, coding can also be performed in a framework such as that shown in (b) of Figure 2.

[0027] Here, prediction can be divided into intra prediction and inter prediction. Intra prediction predicts a current uncoded block by using neighboring coded blocks as references, effectively removing redundancy in the spatial domain. Inter prediction predicts a current image by using neighboring coded images, effectively removing redundancy in the temporal domain.

[0028] Transformation refers to converting an image from the spatial domain to the transform domain and using transform coefficients to represent the image. Most images contain many flat and slowly changing regions, and by applying an appropriate transformation, the image can be transformed from a scattered distribution in the spatial domain to a relatively concentrated distribution in the transform domain, eliminating the frequency domain correlation between signals, and effectively compressing the bitstream together with the quantization process.

[0029] Entropy coding is a lossless coding method that converts a sequence of element symbols into a binary bitstream for transmission or storage. The input element symbols may include quantized transform coefficients, motion vector information, prediction mode information, syntax for transform and quantization, etc. Entropy coding can effectively remove redundancy in the video element symbols.

[0030] The above takes encoding as an example, but the process of video decoding is the opposite of the process of video encoding; that is, video decoding usually includes processes such as entropy decoding, prediction, inverse quantization, inverse transform, filtering, etc., and the implementation principles of each process are the same as or similar to those of video encoding.

[0031] A brief implementation of the DBF filtering technique is given below.

[0032] The DBF filtering process consists of two processes: filtering decision and filtering operation.

[0033] The filtering decision consists of 1) getting the boundary strength (i.e. BS value), 2) deciding whether filtering should be turned on or off, and 3) choosing the filtering strength. For chrominance components, only step 1) exists, and the BS value of the luma component is reused as is. For chrominance components, the filtering operation is performed only if the BS value is 2 (i.e. at least one of the blocks on either side of the current block adopts intra mode).

[0034] The filtering operation consists of 1) strong filtering and weak filtering for the luminance component, and 2) filtering for the chrominance component. The DBF filtering process generally performs horizontal boundary filtering (which may be called horizontal DBF filtering) and vertical boundary filtering (which may be called vertical DBF filtering) in 8*8 units, filtering up to three pixel points on both sides of the boundary, and filtering using up to four pixel points on both sides of the boundary, so that the horizontal / vertical DBF filtering of different blocks does not affect each other and can be performed in parallel.

[0035] As shown in FIG. 3, for a current block 310 (e.g., 8*8), first, vertical DBF filtering is performed on the pixel points in the three columns on the left side of the current block 310 and the three columns on the right side of the left block 320, and then horizontal DBF filtering is performed on the pixel points in the three rows on the top side of the current block 310 and the three rows on the bottom side of the top block 330.

[0036] For example, for pixel points that need to perform vertical DBF filtering and horizontal DBF filtering separately, the vertical DBF filtering is usually performed first, and then the horizontal DBF filtering is performed.

[0037] In DBF filtering, SAO filtering, and ALF filtering, classification is performed based on the current pixel value or the relationship between the current pixel value and the surrounding pixel values, and different filtering operations are performed based on different categories. In contrast, the image enhancement method proposed in this invention is a secondary filtering method based on filtering residuals (called enhancement filtering in this invention). Filtering residuals are the difference between pixel values ​​before and after filtering. For example, if the reconstruction value before DBF filtering is Y1 and the pixel value after DBF filtering is Y2, classification can be performed based on the result of Y2-Y1. The main advantage of classifying based on filtering residuals is that special enhancement can be performed on some over-filtered or pseudo-filtered pixel values ​​to make the pixels in these categories closer to their original values. Over-filtering means that Y2 is much larger (or much smaller) than Y1, and therefore Y2 is much larger (or much smaller) than the original pixel value. Pseudo-filtering means that Y2-Y1 is 0 or close to 0, and these pixel values ​​do not change after filtering and can be considered as not being filtered.

[0038] In the present invention, if the coordinates of a pixel are represented as (i,j), the reconstruction value before the first filtering process (including filtering methods that do not use filtering residuals, such as DBF filtering, SAO filtering, or ALF filtering) is represented as Y1, and the pixel value after the filtering process is represented as Y2, the residual can be classified according to the result of Y2-Y1. Based on the result of the residual classification, an enhancement process is performed to obtain Y3. Here, Y3 can be obtained by enhancing Y2, or by enhancing based on Y1, or by enhancing based on Y1 and Y2. Here, the enhancement process can add a compensation value (which can be positive or negative), or perform a weighted filtering process, such as Y3=w1*Y1+w2*Y2, or Y3=w1*Y1+w2*Y2(i-1,j)+w2*Y2(i,j-1), where Y2(i-1,j) and Y2(i,j-1) are adjacent pixel values ​​in the spatial domain of Y2.

[0039] In order to make the above objectives, features and advantages of the embodiments of the present invention more clearly understood, the technical solutions in the embodiments of the present invention will be further described in detail together with the drawings.

[0040] Please refer to FIG. 4, which is a flowchart of an image enhancement method provided in an embodiment of the present invention. As shown in FIG. 4, the image enhancement method may include the following steps:

[0041] In step S400, for any pixel point in the current block that satisfies the first filtering processing condition, a first pixel value of the pixel point after the first filtering processing is determined.

[0042] In an embodiment of the present invention, the first filtering process may include, but is not limited to, a vertical DBF filtering process, a horizontal DBF filtering process, a SAO filtering process, or an ALF filtering process.

[0043] For example, when the first filtering process is a vertical DBF filtering process or a horizontal DBF filtering process, whether each pixel point of the current block satisfies the first filtering process condition can be determined based on the position of the pixel point in the current block and the filtering decision method of the DBF filtering process. For example, when it is determined according to the filtering decision of the DBF filtering process that the DBF filtering process needs to be performed on the current block, the pixel points in the current block that need to be subjected to the vertical DBF filtering process or / and the horizontal DBF filtering process may be as shown in FIG.

[0044] For any pixel point of the current block that satisfies the first filtering processing condition, the pixel value of the pixel point after the first filtering processing (called the first pixel value in the present invention) can be determined.

[0045] In step S410, the pixel value of the pixel point is enhanced based on the first pixel value and the second pixel value of the pixel point before the first filtering process, and a third pixel value of the pixel point after the enhancement process is obtained.

[0046] In an embodiment of the present invention, when the first pixel value of the pixel point after the first filtering process is determined, the pixel value of the pixel point is emphasized based on the first pixel value and the pixel value of the pixel point before the first filtering process (referred to as the second pixel value in the present invention), i.e., the pixel value of the pixel point is emphasized filtered to obtain the pixel value of the pixel point after the emphasis process (referred to as the third pixel value in the present invention). This makes the pixel value of the pixel point after the emphasis process closer to the original pixel value than the first pixel value, thereby avoiding a situation in which the pixel value after filtering becomes much larger or smaller than the original pixel value of the pixel point due to excessive filtering, and improving image quality.

[0047] For example, the third pixel value is closer to the original pixel value than the first pixel value, so as to avoid the pixel value after filtering being much larger or smaller than the original pixel value of the pixel point due to over-filtering.

[0048] For example, enhancement of a pixel point can be achieved by adding a compensation value (which may be called an offset amount, and may be positive or negative) or by performing weighting filtering.

[0049] Taking the case of weighted filtering processing as an example, if the coordinate point of the pixel is (i,j), the first pixel value is Y2, the second pixel value is Y1, and the third pixel value is Y3, then Y3=w1*Y1+w2*Y2, or Y3=w1*Y2+w2*Y2(i-1,j)+w2*Y2(i,j-1), where Y2(i-1,j) and Y2(i,j-1) are the adjacent pixel values ​​in the spatial domain of the pixel point.

[0050] Therefore, in the method flow shown in Figure 4, by performing a filtering process on a pixel point and enhancing the pixel value of the pixel point based on the pixel values ​​before and after filtering, it is possible to improve the encoding and decoding performance and thereby improve the image quality.

[0051] As one possible embodiment, in step S410, enhancing the pixel value of the pixel point based on the first pixel value and the second pixel value of the pixel point before the first filtering process may include enhancing the pixel value of the pixel point based on the difference between the first pixel value and the second pixel value.

[0052] For example, it is considered that the residual of the pixel value before and after filtering of a pixel point can usually represent the residual between the pixel value of the pixel point after the filtering process and the original pixel value of the pixel point. Therefore, when a pixel point is enhanced based on the residual of the pixel value before and after filtering of the pixel point, it is possible to effectively ensure that the pixel value of the pixel point after the enhancement process is close to the original pixel value of the pixel point, thereby improving image quality.

[0053] In addition, when the first pixel value of the pixel point after the first filtering process is determined, the difference between the first pixel value and the second pixel value of the pixel point before the first filtering process is calculated, and the pixel value of the pixel point is emphasized based on this difference.

[0054] In one example, enhancing the pixel value of the pixel point based on the difference between the first pixel value and the second pixel value may include enhancing the pixel point based on a comparison result between the difference between the first pixel value and the second pixel value and a predetermined threshold value.

[0055] For example, a pixel point may be classified based on a comparison result between a difference between a first pixel value and a second pixel value of the pixel point and a predetermined threshold, and the pixel value of the pixel point may be enhanced based on the category of the pixel point. For example, different methods of enhancement may be used for pixel points of different categories.

[0056] In one example, emphasizing the pixel value of the pixel point based on the result of comparing the difference between the first pixel value and the second pixel value with a predetermined threshold may include: emphasizing the pixel value of the pixel point based on a first emphasis filtering offset amount if the difference between the first pixel value and the second pixel value is greater than a first emphasis filtering threshold; and emphasizing the pixel value of the pixel point based on a second emphasis filtering offset amount if the difference between the first pixel value and the second pixel value is less than a second emphasis filtering threshold, where the second emphasis filtering threshold is less than the first emphasis filtering threshold.

[0057] Illustratively, the predetermined thresholds may include a first emphasis filtering threshold and a second emphasis filtering threshold, the second emphasis filtering threshold being smaller than the first emphasis filtering threshold.

[0058] When the difference between the first pixel value and the second pixel value is determined, the difference may be compared to a first emphasis filtering threshold and a second emphasis filtering threshold, and if the difference is greater than the first emphasis filtering threshold, the pixel value of the pixel point may be emphasis processed based on a first emphasis filtering offset, and if the difference is less than the second emphasis filtering threshold, the pixel value of the pixel point may be emphasis processed based on a second emphasis filtering offset.

[0059] For example, when emphasizing the pixel value of the pixel point, a fourth pixel value may be determined based on the first pixel value and the second pixel value. If the difference between the first pixel value and the second pixel value is greater than a first emphasis filtering threshold, the fourth pixel value may be emphasized based on a first emphasis filtering offset amount to obtain a third pixel value, and if the difference between the first pixel value and the second pixel value is less than a second emphasis filtering threshold, the fourth pixel value may be emphasized based on a second emphasis filtering offset amount to obtain a third pixel value.

[0060] Also, for example, when emphasizing the pixel value of the pixel point, this can be realized by emphasizing the first pixel value. If the difference between the first pixel value and the second pixel value is greater than a first emphasis filtering threshold, the first pixel value may be emphasized based on a first emphasis filtering offset amount to obtain a third pixel value, and if the difference between the first pixel value and the second pixel value is less than a second emphasis filtering threshold, the first pixel value may be emphasized based on a second emphasis filtering offset amount to obtain a third pixel value.

[0061] It should be noted that in an embodiment of the present invention, when the difference between the first pixel value and the second pixel value is less than the first emphasis filtering threshold and greater than or equal to the second emphasis filtering threshold, the first pixel value may be used as the third pixel value, or the first pixel value may be subjected to a filtering process (referred to as a second filtering process in the present invention) to obtain the third pixel value.

[0062] For example, the third pixel value may be determined as the sum of the first pixel value and a predetermined third emphasis filtering offset amount. As another example, the second filtering process may be an ALF filtering process, i.e., the first pixel value is filtered by an ALF filtering process to obtain the third pixel value.

[0063] The pixel value of a pixel point is considered to be in a specified range, which is usually determined by the image bit depth, e.g., [0,2 D -1], and D is the image bit depth. For example, for an 8-bit image, the range is [0, 255], and for a 10-bit image, the range is [0, 1023]. In order to prevent the third pixel value of the pixel point after the enhancement process from being outside the pixel value range, the third pixel value may be limited to a predetermined range by a clip operation when it is obtained.

[0064] If the third pixel value is greater than the upper limit of the predetermined range, the third pixel value is set as the upper limit of the predetermined range, and if the third pixel value is less than the lower limit of the predetermined range, the third pixel value is set as the lower limit of the predetermined range. Taking an 8-bit image as an example, if the third pixel value is less than 0, the third pixel value is set as 0, and if the third pixel value is greater than 255, the third pixel value is set as 255.

[0065] Considering that the encoding device has performed the above enhancement processing on the pixel points of the current block, the encoding device and the decoding device need to maintain consistency in the values ​​of the enhancement filtering threshold and the enhancement filtering offset amount.

[0066] Exemplarily, the encoding device and the decoding device may build the same emphasis filtering threshold candidate list (hereinafter referred to as threshold candidate list) and the same emphasis filtering offset amount candidate list. The encoding device adds an emphasis filtering threshold index (hereinafter referred to as threshold index) and an emphasis filtering offset amount index (hereinafter referred to as offset amount index) to the bitstream, where the threshold index is used to represent the emphasis filtering threshold, for example, representing the position of the first emphasis filtering threshold or the second emphasis filtering threshold in the threshold candidate list, and the offset amount index is used to represent the emphasis filtering offset amount, for example, representing the position of the first emphasis filtering offset amount or the second emphasis filtering offset amount in the offset amount candidate list.

[0067] When the decoding device receives the bitstream, it may decode a threshold index and an offset amount index from the bitstream, search for a first emphasis filtering threshold or a second emphasis filtering threshold from the threshold candidate list based on the threshold index, and search for a first emphasis filtering offset amount or a second emphasis filtering offset amount from the offset amount candidate list based on the offset amount index.

[0068] In one example, the first emphasis filtering threshold may be the inverse of the second emphasis filtering threshold to reduce the number of bits consumed by the threshold index that needs to be coded.

[0069] Exemplarily, since the second emphasis filtering threshold is smaller than the first emphasis filtering threshold, the first emphasis filtering threshold is a positive number and the second emphasis filtering threshold is a negative number. For example, the first emphasis filtering threshold is 2 and the second emphasis filtering threshold is −2. Similarly, the first emphasis filtering offset amount may be the inverse number of the second emphasis filtering offset amount.

[0070] It should be noted that in the embodiment of the present invention, when constructing the emphasis filtering threshold candidate list and the emphasis filtering offset amount candidate list, they may be constructed in the form of a parameter set, that is, each candidate value in the candidate list is a parameter set, and the parameter set includes a first emphasis filtering threshold candidate, a second emphasis filtering threshold candidate (if the first emphasis filtering threshold and the second emphasis filtering threshold are mutually inverse numbers, only one of them may be included), a first emphasis filtering offset amount candidate, and a second emphasis filtering offset amount candidate (if the first emphasis filtering offset amount and the second emphasis filtering offset amount are mutually inverse numbers, only one of them may be included).

[0071] When encoding and decoding an index, it may be encoded and decoded in the form of a parameter set index, i.e., the parameter set index represents the position of a parameter set in a parameter set candidate list, and a specific implementation thereof can be described in the following specific example.

[0072] Furthermore, in embodiments of the present invention, the enhancement filtering parameters of the current block, such as the enhancement filtering threshold and the enhancement filtering offset, may reuse the corresponding parameters of a neighboring block, such as the block above or the block to the left.

[0073] The encoding and decoding side may use a flag bit in the bitstream to indicate whether the current block reuses the enhancement filtering parameters of the surrounding blocks. If it is determined that the enhancement filtering parameters of the surrounding blocks are reused, no additional encoding and decoding of the enhancement filtering parameters of the current block is required.

[0074] In another example, the first emphasis filtering threshold or / and the second emphasis filtering threshold are fixed values ​​to reduce the number of bits consumed by the threshold indexes that need to be coded. Illustratively, the first emphasis filtering threshold or / and the second emphasis filtering threshold may be set to fixed values, so that it is not necessary to code the threshold indexes corresponding to the first emphasis filtering threshold or / and the second emphasis filtering threshold. Similarly, the first emphasis filtering offset amount or / and the second emphasis filtering offset amount may also be fixed values.

[0075] As another possible example, in step S410, enhancing the pixel value of the pixel point based on the first pixel value and the second pixel value of the pixel point before the first filtering process may include determining a third pixel value using machine learning or deep learning with the first pixel value and the second pixel value as input parameters.

[0076] For example, the pixel value enhancement process may be realized by using machine learning or deep learning. When a pixel point is subjected to a first filtering process to determine a first pixel value of the pixel point, the pixel value of the pixel point may be enhanced by using machine learning or deep learning with the first pixel value and the second pixel value as input parameters to obtain a third pixel value after the enhancement process.

[0077] It should be noted that the methods for determining the third pixel value described in the above embodiments are merely some specific examples of methods for realizing the determination of the third pixel value in the embodiments of the present invention, and do not limit the scope of protection of the present invention; that is, in the embodiments of the present invention, the third pixel value may be determined in other ways based on the first pixel value and the second pixel value, for example, the difference between the first pixel value and the second pixel value is used as input to determine the third pixel value using a Wiener filter, or the second pixel value is classified based on the difference between the first pixel value and the second pixel value, and the pixel value of the pixel point is enhanced using a Wiener filter based on the category of the second pixel value to determine the third pixel value.

[0078] As another possible example, in step S410, enhancing the pixel value of the pixel point based on the first pixel value and the second pixel value of the pixel point before the first filtering process may include, if the current block has enhancement filtering enabled, enhancing the pixel value of the pixel point based on the first pixel value and the second pixel value.

[0079] For example, to increase the flexibility and controllability of the emphasis filtering, it may be possible to select whether to enable the emphasis filtering scheme, i.e., whether to emphasize the pixel value of the pixel point after filtering (emphasis filtering is enabled) or not to emphasize the pixel value of the pixel point (emphasis filtering is not enabled).

[0080] For any pixel point of the current block that satisfies the first filtering condition, when the first pixel value of the pixel point after the first filtering process is determined, it may be determined whether or not to perform emphasis processing on the pixel value of the pixel point based on whether emphasis filtering is enabled for the current block. If emphasis filtering is enabled for the current block, the pixel point is emphasized based on the first pixel value and the second pixel value.

[0081] As an example, a specified syntax is used to identify whether the current block has emphasis filtering enabled. Exemplarily, the level of the specified syntax may include, but is not limited to, one or more of a sequence parameter set level syntax, a picture parameter set level syntax, and a slice level syntax. Or, the level of the specified syntax may include, but is not limited to, one or more of a sequence parameter set level syntax, a picture parameter set level syntax, a CTU level syntax, and a CU level syntax.

[0082] Exemplarily, in order to increase the flexibility and controllability of the emphasis filtering, it may be realized to enable / not enable the emphasis filtering at different levels. For example, it may be realized to enable / not enable the emphasis filtering at the sequence parameter set level, the image parameter set level, or / and the slice level. For example, when an image sequence enables the emphasis filtering, it may be set to enable / not enable the emphasis filtering at the image parameter set level syntax, and thus each image in the image sequence can selectively set whether to enable the emphasis filtering. Or, when an image enables the emphasis filtering, it may be set to enable / not enable the emphasis filtering at the slice level syntax, and thus each slice of the image can selectively set whether to enable the emphasis filtering. It should be noted that when the number of slices included in one frame is 1, when the image enables the emphasis filtering, the slice also enables the emphasis filtering, and vice versa.

[0083] Similarly, it is also possible to realize enabling / not enabling of enhancement filtering from the sequence parameter set level, the picture parameter set level, the CTU level and / or the CU level.

[0084] As an example, when the candidate levels of the specified syntax include at least two levels, the level of the specified syntax is determined based on a predetermined flag bit, and the predetermined flag bit is used to indicate the level of the specified syntax.

[0085] Exemplarily, when the level candidates of the specified syntax include at least two levels, a dedicated flag bit may be used to indicate the level of the specified syntax. For example, when the level of the specified syntax includes a picture parameter set level and a CTU level, a flag bit may be added to the picture parameter set to indicate that the level of the specified syntax is the picture parameter set level or the CTU level.

[0086] Exemplarily, the syntax level of the predetermined flag bit matches a non-lowest level among the level candidates of the specified syntax. For example, if the level candidates of the specified syntax include a sequence parameter set level syntax and a picture parameter set level syntax, the syntax level of the predetermined flag bit is the sequence parameter set level, if the level candidates of the specified syntax level include a picture parameter set level syntax and a slice level syntax, the syntax level of the predetermined flag bit is the picture parameter set level, if the level candidates of the specified syntax level include a sequence parameter set level syntax, a picture parameter set level syntax, and a slice level syntax, the syntax level of the predetermined flag bit is the sequence parameter set level flag bit and the picture parameter set level syntax. If the level candidates of the specified syntax level include a picture parameter set level syntax and a CTU level syntax, the syntax level of the specified flag bit is the picture parameter set level; if the level candidates of the specified syntax level include a CTU level syntax and a CU level syntax, the syntax level of the specified flag bit is the CTU level; if the level candidates of the specified syntax level include a picture parameter set level syntax, a CTU level syntax, and a CU level syntax, the specified flag bit includes a picture parameter set level flag bit and a CTU level flag bit, the specific implementation of which will be described below in connection with specific embodiments.

[0087] As one possible embodiment, if the first filtering process is not the first of multiple successive filtering processes for the pixel point, the second pixel value is a pixel value obtained by emphasizing the pixel value after the previous filtering process for the pixel point.

[0088] For example, when a pixel point needs to be filtered multiple times in succession, the pixel value of the pixel point may be emphasized each time the pixel point is filtered, and the pixel value of the pixel point before the next filtering process is the pixel value obtained by the emphasis process after the previous filtering process.

[0089] As an example, if the first filtering process is a horizontal DBF filtering process and the pixel point satisfies the vertical DBF filtering process conditions, the second pixel value is the pixel value of the pixel point after an emphasis process of the fifth pixel value of the pixel point, and the fifth pixel value is the pixel value of the pixel point after the vertical DBF filtering process.

[0090] For example, if the first filtering process is a horizontal DBF filtering process, and the pixel point satisfies the vertical DBF filtering process conditions, and the pixel value of the pixel point after the vertical DBF filtering process is the fifth pixel value, the second pixel value is the pixel value of the pixel point after the pixel point after the vertical DBF filtering process has been highlighted using the method described in the above embodiment.

[0091] As one possible embodiment, the first filtering process may be a vertical DBF filtering process, and in step S410, after emphasizing the pixel value of the pixel point, if the pixel point satisfies a horizontal DBF filtering condition, the process may further include performing a horizontal DBF filtering process on a third pixel value to obtain a sixth pixel value of the pixel point, emphasizing the pixel value of the pixel point based on the third pixel value and the sixth pixel value, and obtaining a seventh pixel value of the pixel point after the emphasis process.

[0092] For example, when performing vertical DBF filtering processing and enhancement processing on the pixel point using the method described in steps S400 to S410, it may be determined whether the pixel point satisfies the horizontal DBF filtering processing condition, for example, by determining whether the pixel point satisfies the horizontal DBF filtering processing condition based on the position of the pixel point.

[0093] If the pixel point satisfies the horizontal DBF filtering conditions, horizontal DBF filtering processing may be performed on the third pixel value to obtain the pixel value of the pixel point after horizontal DBF filtering (referred to as the sixth pixel value in this invention), and the pixel value of the pixel point may be enhanced based on the pixel value of the pixel point before horizontal DBF filtering, i.e., the third pixel value, and the pixel value of the pixel point after horizontal DBF filtering, i.e., the sixth pixel value, to obtain the pixel value of the pixel point after enhancement processing (referred to as the seventh pixel value in this invention).

[0094] It should be noted that the specific implementation process of the pixel value enhancement process of a pixel point based on the third pixel value and the sixth pixel value can refer to the description of the pixel value enhancement process of a pixel point based on the first pixel value and the second pixel value described in the above embodiment, and the description will be omitted here in the embodiment of the present invention.

[0095] Furthermore, in the embodiment of the present invention, the process of implementing the above-mentioned multiple consecutive filtering processes is described on the assumption that emphasis filtering is enabled each time a filtering process is performed on a pixel point. If emphasis filtering is not enabled in any case, there is no need to perform emphasis filtering after the corresponding filtering process.

[0096] For example, taking vertical DBF filtering processing and horizontal DBF filtering processing as an example, if a pixel point satisfies the vertical DBF filtering processing conditions and the horizontal DBF filtering processing conditions but emphasis filtering is not enabled for the vertical DBF filtering processing, there is no need to emphasis process the pixel value after vertical DBF filtering. In this case, when horizontal DBF filtering processing is performed on the pixel point, the pixel value of the pixel point before horizontal DBF filtering becomes the pixel value of the pixel point after vertical DBF filtering.

[0097] In order to allow those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, the technical solutions provided by the embodiments of the present invention will be described below with specific examples. Taking the initial filtering process as DBF filtering process, SAO filtering process or ALF filtering process respectively as examples, the technical solutions provided by the embodiments of the present invention will be described.

[0098] If the reconstruction value before the first filtering process is Y1 and the pixel value after the first filtering process is Y2, classification may be performed based on Y2-Y1 or Y1-Y2, and based on the classification result, corresponding enhancement processing (which can also be called enhancement filtering processing) may be performed on the residuals of different categories to obtain the pixel value Y3 after the enhancement processing.

[0099] Exemplarily, Y3 may be obtained by enhancing Y2, or by enhancing based on Y1, or by enhancing based on Y1 and Y2. Exemplarily, the above-mentioned enhancement process may add a compensation value (which may be positive or negative), or perform a weighting filtering process, such as Y3=w1*Y1+w2*Y2, or Y3=w1*Y2+w2*Y2(i-1,j)+w2*Y2(i,j-1), where Y2(i-1,j) and Y2(i,j-1) are adjacent pixel values ​​in the spatial domain of Y2.

[0100] First, the first filtering process will be described as DBF filtering process.

[0101] Example 1: Take pixel point i as an example, which satisfies the vertical DBF filtering condition and the horizontal DBF filtering condition.

[0102] Step 1: Y1(i) is subjected to vertical DBF filtering to obtain Y2(i); step 2: based on Y1(i) and Y2(i), the pixel value of the pixel point is enhanced to obtain Y3(i); step 3: Y3(i) is subjected to horizontal DBF filtering to obtain Y4(i); step 4: based on Y4(i) and Y3(i), the pixel value of the pixel point is enhanced to obtain Y5(i).

[0103] Exemplarily, when the first filtering process is a vertical DBF filtering process, Y1(i) is the second pixel value, Y2(i) is the first pixel value, and Y3(i) is the third pixel value. Y4(i) is the sixth pixel value, and Y5(i) is the seventh pixel value. Exemplarily, when the first filtering process is a horizontal DBF filtering process, Y3(i) is the second pixel value, Y4(i) is the first pixel value, Y5(i) is the third pixel value, and Y2(i) is the fifth pixel value.

[0104] Example 2

[0105] Based on Example 1, in step 2, Y v Assume that (i) = (Y1(i) + Y2(i) + 1) / 2;

[0106] If Y1(i)-Y2(i)>Tv, then Y3(i)=clip(Y v (i)+f0 v ) becomes;

[0107] Y1(i)-Y2(i) <NT v Then, Y3(i) = clip(Y v (i)+f1 v ) becomes;

[0108] NT v ≦Y1(i)-Y2(i)≦T v Then, Y3(i)=Y2(i), or Y3(i)=Y2(i)+f2 v Y3(i)=Y2(i)+f2 vrepresents the filtering process of Y2(i) (i.e., the second filtering process described above) to obtain Y3(i).

[0109] For example, T v , N.T. v is the emphasis filtering threshold, f0 v , f1 v , f2 v is an enhancement filtering offset amount. clip(x) represents limiting x to a predetermined range. For example, when the first filtering process is a vertical BDF filtering process, T v is the first enhancement filtering threshold, NT v is the second emphasis filtering threshold, f0 v is the first emphasis filtering offset amount, and f1 v is the second emphasis filtering offset amount, and f2 v is the third emphasis filtering offset amount, and Y v (i) is the fourth pixel value, and clip(x) indicates that x is restricted to be within a predetermined range.

[0110] For example, NT v =-T v , i.e. T v and N.T. v are the opposites of each other.

[0111] Similarly, in step 4, Y h Assume that (i) = (Y3(i) + Y4(i) + 1) / 2;

[0112] Y3(i)-Y4(i)>T h Then, Y3(i) = clip(Y h (i)+f0 h ) becomes;

[0113] Y3(i)-Y4(i) <NT h Then, Y3(i) = clip(Y h (i)+f1 h ) becomes;

[0114] NT h ≦Y3(i)-Y4(i)≦T h Then, Y5(i) = Y4(i), or Y5(i) = Y4(i) + f2 h Y5(i)=Y4(i)+f2 h represents that Y4(i) is filtered (i.e., the second filtering process described above) to obtain Y5(i).

[0115] For example, T h , N.T. h is the emphasis filtering threshold, f0 h , f1 h , f2 h is the enhancement filtering offset amount.

[0116] Exemplarily, when the first filtering process is a horizontal BDF filtering process, T h is the first enhancement filtering threshold, NT h is the second emphasis filtering threshold, f0 h is the first emphasis filtering offset amount, and f1 h is the second emphasis filtering offset amount, and f2 h is the third emphasis filtering offset amount.

[0117] For example, NT h =-T h , i.e. T h and N.T. h are the opposites of each other.

[0118] Example 3

[0119] Based on Example 1, in step 2, Y v Assume that (i) = Y2(i);

[0120] If Y1(i)-Y2(i)>Tv, then Y3(i)=clip(Y v (i)+f0 v ) becomes;

[0121] Y1(i)-Y2(i) <NT v Then, Y3(i) = clip(Y v (i)+f1 v ) becomes;

[0122] NT v ≦Y1(i)-Y2(i)≦T v Then, Y3(i)=Y2(i), or Y3(i)=Y2(i)+f2 v Y3(i)=Y2(i)+f2 v represents the filtering process of Y2(i) (i.e., the second filtering process described above) to obtain Y3(i).

[0123] For example, T v , N.T. v is the emphasis filtering threshold, f0 v , f1 v , f2 v is the emphasis filtering offset. clip(x) represents limiting x to a given range.

[0124] For example, NT v =-T v , i.e. T v and N.T. v are the opposites of each other.

[0125] Similarly, in step 4, Y h Assume that (i) = Y4(i);

[0126] Y3(i)-Y4(i)>T h Then, Y3(i) = clip(Y h (i)+f0 h ) becomes;

[0127] Y3(i)-Y4(i) <NT h Then, Y3(i) = clip(Y h (i)+f1 h ) becomes;

[0128] NT h≦Y3(i)-Y4(i)≦T h Then, Y5(i) = Y4(i), or Y5(i) = Y4(i) + f2 h Y5(i)=Y4(i)+f2 h represents that Y4(i) is filtered (i.e., the second filtering process described above) to obtain Y5(i).

[0129] For example, T h , N.T. h is the emphasis filtering threshold, f0 h , f1 h , f2 h is the enhancement filtering offset amount. For example, NT h =-T h , i.e. T h and N.T. h are the opposites of each other.

[0130] In the above embodiments 1 to 3, the pixel point i satisfies the vertical DBF filtering processing condition and the horizontal DBF filtering processing condition, but the method may be applied to the pixel point i satisfies the vertical DBF filtering processing condition or the horizontal DBF filtering processing condition. For example, when the pixel i satisfies only the vertical DBF filtering processing condition, only the first two steps of the above embodiments are included. For example, when the pixel point i satisfies only the horizontal DBF filtering processing condition, only two steps are included, step 1 is to obtain Y2(i) after performing horizontal DBF filtering processing on Y1(i), and step 2 is to obtain Y3(i) by emphasizing the pixel value of the pixel point based on Y1(i) and Y2(i), and the specific implementation of step 2 can refer to the specific implementation of step 2 in embodiments 2 and 3, and it is only necessary to replace the parameters of the vertical DBF filtering processing with the parameters of the horizontal DBF filtering processing, and the description is omitted here.

[0131] Example 4

[0132] The method described in the second or third embodiment is adopted at the frame level. The frame level includes an image parameter set level or a slice level, and the image parameter set level is one frame image, and one frame image may include N slices (N is a positive integer).

[0133] For the coding device, the following syntax information needs to be encoded and transmitted in the picture header or slice header: A frame or a slice adopts the following syntax set (at the picture parameter set level or slice level), and all coding blocks in the picture or slice reuse the same coefficient set:

[0134] For example, the coefficient set may include an emphasis filtering threshold (which may include a vertical emphasis filtering threshold or / and a horizontal emphasis filtering threshold) and an emphasis filtering offset amount (which may include a vertical emphasis filtering offset amount or / and a horizontal emphasis filtering offset amount).

[0135] For a decoding device, the following syntax information needs to be decoded in the image header or slice header:

[0136] 1. A vertical emphasis filtering enable flag for identifying whether the current image or slice has emphasis filtering enabled in the vertical direction.

[0137] If not enabled, then after step 1, there is no need to perform step 2 above, and there is no need to encode and decode the associated threshold index and offset amount index.

[0138] If enabled, after step 1 above, step 2 above needs to be performed, and the following information needs to be encoded and decoded: vertical enhancement filtering threshold index and vertical enhancement filtering offset amount index.

[0139] The vertical emphasis filtering threshold index may be 1bin, i.e., there are two threshold candidates. Exemplarily, the emphasis filtering threshold candidate list may be {1, 2} or {2, 4}, or other candidate list containing two candidate values.

[0140] For example, T v and N.T. v If the thresholds are the inverse of each other, then only one threshold index needs to be coded. v =2, NT v If =-2, then there is no need to encode and decode the threshold index.

[0141] Vertical emphasis filtering offset index f0 v and F1 v The candidate values ​​of f0 may be the same or different, and the offset amount index may be 2 bin, i.e., includes four offset amount candidates. Exemplarily, the enhancement filtering offset amount candidate list may be {1, 2, 3, 4} or {2, 4, 6, 8}, or may be other candidate list including four candidate values. Exemplarily, when the enhancement filtering offset amount is a fixed value, the offset amount index does not need to be coded. Exemplarily, f0 may be a fixed value, and the offset amount index may be a fixed value. v and F1 v The candidate lists of can be the same or different, e.g., f0 v The candidate list for f1 is {-1, -2, -3, -4}. v The candidate list for is {1, 2, 3, 4}.

[0142] 2. A horizontal emphasis filtering enable flag for identifying whether the current image or slice has emphasis filtering enabled in the horizontal direction.

[0143] If not enabled, then after step 3 above, there is no need to perform step 4 above, and there is no need to encode and decode the associated threshold index and offset amount index.

[0144] If enabled, after step 3 above, step 4 above needs to be performed, and the following information needs to be encoded and decoded: horizontal enhancement filtering threshold index and horizontal enhancement filtering offset amount index.

[0145] The horizontal emphasis filtering threshold index may be 1bin, i.e., there are two threshold candidates. Exemplarily, the emphasis filtering threshold candidate list may be {1, 2} or {2, 4}, or may be other candidate lists containing two candidate values.

[0146] For example, T h and N.T. h If the thresholds are the inverse of each other, then only one threshold index needs to be coded. h =2, NT h If =-2, then there is no need to encode and decode the threshold index.

[0147] Horizontal emphasis filtering offset index f0 h and F1 hThe candidate values ​​of f0 may be the same or different, and the offset amount index may be 2 bin, i.e., includes four offset amount candidates. Exemplarily, the enhancement filtering offset amount candidate list may be {1, 2, 3, 4} or {2, 4, 6, 8}, or may be other candidate list including four candidate values. Exemplarily, when the enhancement filtering offset amount is a fixed value, the offset amount index does not need to be coded. Exemplarily, f0 may be a fixed value, and the offset amount index may be a fixed value. h and F1 h The candidate lists of can be the same or different, e.g., f0 h The candidate list for f1 is {-1, -2, -3, -4}. h The candidate list for is {1, 2, 3, 4}.

[0148] Example 5

[0149] Unlike Example 4, in Example 5, the emphasis filtering parameters (including the emphasis filtering threshold and / or the emphasis filtering offset amount) are represented in the form of a parameter set, i.e., instead of separately encoding the index information of the emphasis filtering threshold and / or the emphasis filtering offset amount, the index information of the parameter set consisting of the emphasis filtering threshold and the emphasis filtering offset amount is encoded.

[0150] The method described in the second or third embodiment is adopted at the frame level. The frame level includes an image parameter set level or a slice level, and the image parameter set level is one frame image, and one frame image may include N slices (N is a positive integer).

[0151] For the coding device, the following syntax information needs to be encoded and transmitted in the picture header or slice header: A frame or a slice adopts the following syntax set (at the picture parameter set level or slice level), and all coding blocks in the picture or slice reuse the same coefficient set:

[0152] Exemplarily, the coefficient set may include an enhancement filtering parameter set consisting of an enhancement filtering threshold and an enhancement filtering offset amount. For a decoding device, the following syntax information needs to be decoded in the image header or slice header.

[0153] 1. A vertical emphasis filtering enable flag for identifying whether the current image or slice has emphasis filtering enabled in the vertical direction.

[0154] If not enabled, then after step 1 above, there is no need to perform step 2 above, and there is no need to encode and decode the associated parameter index.

[0155] If enabled, after step 1 above, step 2 above needs to be performed and the following information needs to be encoded and decoded: vertical emphasis filtering parameter index.

[0156] The vertical emphasis filtering parameters may be represented in the form of a parameter set, and the vertical emphasis filtering parameter index is included in the parameter set candidate list T{T v ,f0 v ,f1 v} in {T v ,f0 v ,f1 v}, i.e., the parameter set candidate list T to T based on the index. v ,f0 v,f1 v The value of can be determined.

[0157] For example, the vertical emphasis filtering parameters may be a predetermined fixed parameter set on the encoding / decoding side, or may be vertical filtering parameters of another frame already encoded on the stored time domain, in which case the parameter index does not need to be encoded / decoded.

[0158] 2. A horizontal emphasis filtering enable flag for identifying whether the current image or slice has emphasis filtering enabled in the horizontal direction.

[0159] If not enabled, then after step 3 above, there is no need to perform step 4 above, and there is no need to encode and decode the associated parameter index.

[0160] If enabled, then after step 3 above, step 4 above needs to be performed and the following information needs to be encoded and decoded: horizontal emphasis filtering parameter index.

[0161] The horizontal emphasis filtering parameters may be represented in the form of a parameter set, and the horizontal emphasis filtering parameter index is included in the parameter set candidate list T{T h ,f0 h ,f1 h} in {T h ,f0 h ,f1 h}, i.e., the parameter set candidate list T to T based on the index. h ,f0 h ,f1 h The value of can be determined.

[0162] For example, the horizontal emphasis filtering parameters may be a predetermined fixed parameter set on the encoding / decoding side, or may be horizontal filtering parameters of another frame already encoded on the stored time domain, in which case the parameter index does not need to be encoded / decoded.

[0163] Example 6

[0164] The method described in the second or third embodiment is adopted at the CTU level. A CTU is the maximum coding unit, and typically, the size of a CTU for an I-frame is 64*64, and the size of a CTU for a non-I-frame (such as a B-frame or a P-frame) is 128*128.

[0165] Each CTU encodes one coefficient set, that is, all coding blocks under the CTU adopt the same coefficient set, and a specific implementation of the encoding and decoding of the coefficients in each CTU can refer to the specific implementation of the encoding and decoding of the corresponding coefficients in Example 4 or Example 5. Exemplarily, the one coefficient set may include an enhancement filtering threshold and an enhancement filtering offset amount (corresponding to Example 4), or an enhancement filtering parameter set consisting of an enhancement filtering threshold and an enhancement filtering offset amount (corresponding to Example 5).

[0166] Illustratively, for a decoding device, the following syntax information needs to be decoded in the CTU header:

[0167] 1. A vertical emphasis filtering enable flag for identifying whether the current image or slice has emphasis filtering enabled in the vertical direction.

[0168] If not enabled, then after step 1, there is no need to perform step 2 above, and there is no need to encode and decode the associated threshold index and offset amount index.

[0169] If enabled, after step 1 above, step 2 above needs to be performed, and the following information needs to be encoded and decoded: vertical enhancement filtering threshold index and vertical enhancement filtering offset amount index.

[0170] The vertical emphasis filtering threshold index may be 1bin, i.e., there are two threshold candidates. Exemplarily, the emphasis filtering threshold candidate list may be {1, 2} or {2, 4}, or other candidate list containing two candidate values.

[0171] For example, T v and N.T. v If the thresholds are the inverse of each other, then only one threshold index needs to be coded. v =2, NT v If =-2, then there is no need to encode and decode the threshold index.

[0172] Vertical emphasis filtering offset index f0 v and F1 v The candidate values ​​of f0 may be the same or different, and the offset amount index may be 2 bin, i.e., includes four offset amount candidates. Exemplarily, the enhancement filtering offset amount candidate list may be {1, 2, 3, 4} or {2, 4, 6, 8}, or may be other candidate list including four candidate values. Exemplarily, when the enhancement filtering offset amount is a fixed value, the offset amount index does not need to be coded. Exemplarily, f0 may be a fixed value, and the offset amount index may be a fixed value. v and F1 v The candidate lists of can be the same or different, e.g., f0 v The candidate list for f1 is {-1, -2, -3, -4}. v The candidate list for is {1, 2, 3, 4}.

[0173] 2. A horizontal emphasis filtering enable flag for identifying whether the current image or slice has emphasis filtering enabled in the horizontal direction.

[0174] If not enabled, then after step 3 above, there is no need to perform step 4 above, and there is no need to encode and decode the associated threshold index and offset amount index.

[0175] If enabled, after step 3 above, step 4 above needs to be performed, and the following information needs to be encoded and decoded: horizontal enhancement filtering threshold index and horizontal enhancement filtering offset amount index.

[0176] The horizontal emphasis filtering threshold index may be 1bin, i.e., there are two threshold candidates. Exemplarily, the emphasis filtering threshold candidate list may be {1, 2} or {2, 4}, or may be other candidate lists containing two candidate values.

[0177] For example, T h and N.T. h If the thresholds are the inverse of each other, then only one threshold index needs to be coded. h =2, NT h If =-2, then there is no need to encode and decode the threshold index.

[0178] Horizontal emphasis filtering offset index f0 h and F1 hThe candidate values ​​of f0 may be the same or different, and the offset amount index may be 2 bin, i.e., includes four offset amount candidates. Exemplarily, the enhancement filtering offset amount candidate list may be {1, 2, 3, 4} or {2, 4, 6, 8}, or may be other candidate list including four candidate values. Exemplarily, when the enhancement filtering offset amount is a fixed value, the offset amount index does not need to be coded. Exemplarily, f0 may be a fixed value, and the offset amount index may be a fixed value. h and F1 h The candidate lists of can be the same or different, e.g., f0 h The candidate list for f1 is {-1, -2, -3, -4}. h The candidate list for is {1, 2, 3, 4}.

[0179] Example 7

[0180] At the CU level, the method described in the second or third embodiment is adopted. The size of a CU is usually within the range of 4*4 to 128*128.

[0181] Each CU encodes a coefficient set, that is, each coding block under the CU adopts the coefficient set, and the specific implementation of the coding and decoding of the coefficient in each CU can refer to the specific implementation of the coding and decoding of the corresponding coefficient in Example 4 or Example 5. Exemplarily, the coefficient set may include an enhancement filtering threshold and an enhancement filtering offset amount (corresponding to Example 4), or an enhancement filtering parameter set consisting of an enhancement filtering threshold and an enhancement filtering offset amount (corresponding to Example 5).

[0182] Illustratively, for a decoding device, the following syntax information needs to be decoded for each CU:

[0183] 1. A vertical emphasis filtering enable flag for identifying whether the current image or slice has emphasis filtering enabled in the vertical direction.

[0184] If not enabled, then after step 1, there is no need to perform step 2 above, and there is no need to encode and decode the associated threshold index and offset amount index.

[0185] If enabled, after step 1 above, step 2 above needs to be performed, and the following information needs to be encoded and decoded: vertical enhancement filtering threshold index and vertical enhancement filtering offset amount index.

[0186] The vertical emphasis filtering threshold index may be 1bin, i.e., there are two threshold candidates. Exemplarily, the emphasis filtering threshold candidate list may be {1, 2} or {2, 4}, or other candidate list containing two candidate values.

[0187] For example, T v and N.T. v If the thresholds are the inverse of each other, then only one threshold index needs to be coded. v =2, NT v If =-2, then there is no need to encode and decode the threshold index.

[0188] Vertical emphasis filtering offset index f0 v and F1 v The candidate values ​​of f0 may be the same or different, and the offset amount index may be 2 bin, i.e., includes four offset amount candidates. Exemplarily, the enhancement filtering offset amount candidate list may be {1, 2, 3, 4} or {2, 4, 6, 8}, or may be other candidate list including four candidate values. Exemplarily, when the enhancement filtering offset amount is a fixed value, the offset amount index does not need to be coded. Exemplarily, f0 may be a fixed value, and the offset amount index may be a fixed value. v and F1 v The candidate lists of can be the same or different, e.g., f0 vThe candidate list for f1 is {-1, -2, -3, -4}. v The candidate list for is {1, 2, 3, 4}.

[0189] 2. A horizontal emphasis filtering enable flag for identifying whether the current image or slice has emphasis filtering enabled in the horizontal direction.

[0190] If not enabled, then after step 3 above, there is no need to perform step 4 above, and there is no need to encode and decode the associated threshold index and offset amount index.

[0191] If enabled, after step 3 above, step 4 above needs to be performed, and the following information needs to be encoded and decoded: horizontal enhancement filtering threshold index and horizontal enhancement filtering offset amount index.

[0192] The horizontal emphasis filtering threshold index may be 1bin, i.e., there are two threshold candidates. Exemplarily, the emphasis filtering threshold candidate list may be {1, 2} or {2, 4}, or may be other candidate lists containing two candidate values.

[0193] For example, T h and N.T. h If the thresholds are the inverse of each other, then only one threshold index needs to be coded. h =2, NT h If =-2, then there is no need to encode and decode the threshold index.

[0194] Horizontal emphasis filtering offset index f0 h and F1 hThe candidate values ​​of f0 may be the same or different, and the offset amount index may be 2 bin, i.e., includes four offset amount candidates. Exemplarily, the enhancement filtering offset amount candidate list may be {1, 2, 3, 4} or {2, 4, 6, 8}, or may be other candidate list including four candidate values. Exemplarily, when the enhancement filtering offset amount is a fixed value, the offset amount index does not need to be coded. Exemplarily, f0 may be a fixed value, and the offset amount index may be a fixed value. h and F1 h The candidate lists of can be the same or different, e.g., f0 h The candidate list for f1 is {-1, -2, -3, -4}. h The candidate list for is {1, 2, 3, 4}.

[0195] Example 8

[0196] The method described in the second or third embodiment is adopted at the CU level.

[0197] Each CU encodes and decodes a set of coefficients as follows:

[0198] 1, a flag bit for indicating whether to reuse the enhancement filtering parameters of the surrounding blocks.

[0199] 1.1. In the case of reuse, the enhancement filtering parameters of the surrounding blocks such as the left block and the upper block are reused.

[0200] 1.2. If no reuse is required, encode the parameters as follows:

[0201] 1.2.1. A vertical emphasis filtering enable flag that identifies whether the current CU has emphasis filtering enabled in the vertical direction.

[0202] 1.2.1.1, if enabled, then after step 1 above, step 2 above must be performed, and the following information must be encoded and decoded:

[0203] 1.2.1.1.1, vertical emphasis filtering threshold index. The threshold index is preferably 1bin, that is, there are two threshold candidates. Exemplarily, the emphasis filtering threshold candidate list may be {1, 2} or {2, 4}, or other candidate list containing two candidate values. Exemplarily, T v and N.T. v If the thresholds are the inverse of each other, then only one threshold index needs to be coded. v =2, NT v If =-2, then there is no need to encode and decode the threshold index.

[0204] 1.2.1.1.2, vertical emphasis filtering offset index. f0 v and F1 v The candidate values ​​of f0 may be the same or different, and the offset amount index is preferably 2 bin, i.e., includes four offset amount candidates. Exemplarily, the enhancement filtering offset amount candidate list may be {1, 2, 3, 4} or {2, 4, 6, 8}, or may be other candidate list including four candidate values. Exemplarily, when the enhancement filtering offset amount is a fixed value, the offset amount index does not need to be coded. Exemplarily, f0 may be a fixed value, and the offset amount index may be a fixed value. v and F1 v The candidate lists of can be the same or different, e.g., f0 v The candidate list for f1 is {-1, -2, -3, -4}. v The candidate list for is {1, 2, 3, 4}.

[0205] If 1.2.1.2 is not enabled, there is no need to execute step 2 above after step 1 above, and there is no need to encode and decode the threshold index and offset amount index in 1.2.1.1.1 and 1.2.1.1.2.

[0206] 1.2.2. A horizontal emphasis filtering enable flag for identifying whether the current CU has emphasis filtering enabled in the horizontal direction.

[0207] 1.2.2.1, if enabled, then after step 3 above, step 4 above must be performed and the following information must be encoded and decoded:

[0208] 1.2.2.1.1, horizontal emphasis filtering threshold index. The threshold index is preferably 1bin, that is, there are two threshold candidates. Exemplarily, the emphasis filtering threshold candidate list may be {1, 2} or {2, 4}, or other candidate list including two candidate values. Exemplarily, T h and N.T. h If the thresholds are the inverse of each other, then only one threshold index needs to be coded. h =2, NT h If =-2, then there is no need to encode and decode the threshold index.

[0209] 1.2.2.1.2, horizontal emphasis filtering offset index. f0 h and F1 h The candidate values ​​of f0 may be the same or different, and the offset amount index is preferably 2 bin, i.e., includes four offset amount candidates. Exemplarily, the enhancement filtering offset amount candidate list may be {1, 2, 3, 4} or {2, 4, 6, 8}, or may be other candidate list including four candidate values. Exemplarily, when the enhancement filtering offset amount is a fixed value, the offset amount index does not need to be coded. Exemplarily, f0 may be a fixed value, and the offset amount index may be a fixed value. h and F1 h The candidate lists of can be the same or different, e.g., f0 h The candidate list for f1 is {-1, -2, -3, -4}. h The candidate list for is {1, 2, 3, 4}.

[0210] If 1.2.2.2 is not enabled, there is no need to execute step 4 above after step 3 above, and there is no need to encode and decode the threshold index and offset amount index in 1.2.2.1.1 and 1.2.2.1.2.

[0211] Example 9

[0212] The method described in the second or third embodiment is adopted at the frame level and the CTU level.

[0213] A flag bit is added at the frame level (i.e., the above-mentioned predetermined flag bit), and the flag bit is used to indicate that the current frame adopts either the frame level syntax or the CTU level syntax to enable enhancement filtering. The encoding and decoding sides need to encode and decode the flag bit at the frame level.

[0214] When the current frame adopts the frame level syntax to enable enhancement filtering, the specific implementation of the encoding and decoding coefficients in each frame image may refer to Example 4 or Example 5.

[0215] When the current frame adopts the CTU level syntax to enable enhancement filtering, the specific implementation of the encoding and decoding coefficients in each CTU can refer to Example 6.

[0216] Example 10

[0217] The method described in the second or third embodiment is adopted at the frame level, the CTU level, and the CU level.

[0218] A flag bit is added at the frame level, which is used to indicate that the current frame has enabled enhancement filtering by adopting either the frame level syntax or the CTU level syntax, and the encoding and decoding sides need to encode and decode the flag bit at the frame level.

[0219] When the current frame adopts the frame level syntax to enable enhancement filtering, the specific implementation of the encoding and decoding coefficients in each frame image may refer to Example 4 or Example 5.

[0220] If the current frame adopts the CTU-level syntax to enable enhancement filtering, a flag bit needs to be added at the CTU level, which is used to indicate that the current CTU adopts either the CTU-level syntax or the CU-level syntax to enable enhancement filtering, and the encoding and decoding sides need to encode and decode the flag bit at the CTU level.

[0221] When the current frame adopts the CTU level syntax to enable enhancement filtering, the specific implementation of the encoding and decoding coefficients in each CTU can refer to Example 6.

[0222] When the current frame adopts the CU level syntax to enable enhancement filtering, the specific implementation of the encoding and decoding coefficients in each CU may refer to Example 7 or Example 8.

[0223] Next, the first filtering is described as SAO filtering.

[0224] Example 11

[0225] Step 1: Y1(i) is subjected to SAO filtering to obtain Y2(i); Step 2: Y3(i) is obtained by emphasizing the pixel values ​​of the pixel points based on Y1(i) and Y2(i).

[0226] Exemplarily, when the first filtering process is an SAO filtering process, Y1(i) is the second pixel value, Y2(i) is the first pixel value, and Y3(i) is the third pixel value.

[0227] Example 12

[0228] Step 2 in Example 11 can be performed using the method described in any one of Examples 2 to 10. It should be noted that, although Examples 2 to 10 have been mainly described using two filtering processes as examples, in this example, only one filtering process is performed, and the steps and parameters corresponding to the two filtering processes in the above examples may be replaced with the steps and parameters corresponding to the one filtering process in this example.

[0229] Next, the first filtering is described as ALF filtering.

[0230] Example 13

[0231] Step 1: Y1(i) is subjected to ALF filtering to obtain Y2(i), and step 2: based on Y1(i) and Y2(i), pixel values ​​of pixel points are enhanced to obtain Y3(i).

[0232] Exemplarily, when the first filtering process is an ALF filtering process, Y1(i) is the second pixel value, Y2(i) is the first pixel value, and Y3(i) is the third pixel value.

[0233] Example 14

[0234] Step 2 in Example 13 can be performed using the method described in any one of Examples 2 to 10. It should be noted that, although Examples 2 to 10 have been mainly described using two filtering processes as examples, in this example, only one filtering process is performed, and the steps and parameters corresponding to the two filtering processes in the above examples may be replaced with the steps and parameters corresponding to the one filtering process in this example.

[0235] Finally, the first filtering is described as either filtering method.

[0236] Example 15

[0237] Step 1: Y1(i) is filtered to obtain Y2(i), and step 2: the pixel values ​​of the pixel points are enhanced based on Y1(i) and Y2(i) to obtain Y3(i).

[0238] Exemplarily, when the first filtering process is the filtering process in step 1, Y1(i) is the second pixel value, Y2(i) is the first pixel value, and Y3(i) is the third pixel value.

[0239] Example 16

[0240] Step 2 in Example 15 can be performed using the method described in any one of Examples 2 to 10. It should be noted that, although Examples 2 to 10 have been mainly described as examples of two filtering processes, in this example, only one filtering process is performed, and the steps and parameters corresponding to the two filtering processes in the above examples may be replaced with the steps and parameters corresponding to the one filtering process in this example.

[0241] Example 17

[0242] In step 2 of the fifteenth embodiment, Y3(i) may be determined using machine learning or deep learning with Y1(i) and Y2(i) as input.

[0243] Example 18

[0244] In step 2 of the fifteenth embodiment, Y3(i) may be determined using a Wiener filter with Y1(i)-Y2(i) or Y2(i)-Y1(i) as input. However, the Wiener filter is

number

[0245] This filter represents the weighted addition of Y2(i) and its neighboring pixel points to obtain Y3(i), where K is a positive integer and represents the number of pixel points (including the current pixel point and neighboring pixel points) used for filtering.

[0246] Example 19

[0247] Step 2 of Example 15 may classify Y2(i) based on the magnitude of Y1(i)-Y2(i) or Y2(i)-Y1(i), and determine Y3(i) using different Wiener filters for different categories of Y2(i).

[0248] For example, the segment in which Y1(i)-Y2(i) or Y2(i)-Y1(i) is located is determined based on the magnitude of Y1(i)-Y2(i) or Y2(i)-Y1(i) and a predetermined segmentation threshold, and if the segment in which Y1(i)-Y2(i) or Y2(i)-Y1(i) is located is different, the category of Y2(i) is also different.

[0249] Example 20

[0250] Decode or encode a flag bit at the SPS level, which is used to control whether all images in the current image sequence use the above technique, including the embodiment of the enhancement filtering technique described in any of Examples 1 to 19. Illustratively, if the flag bit decoded by the decoding device indicates to use the above technique, process according to the enhancement filtering technique described in any of Examples 1 to 19.

[0251] In an embodiment of the present invention, for any pixel point of a current image block that satisfies a first filtering processing condition, a first pixel value of the pixel point after the first filtering processing is determined, and the pixel value of the pixel point is enhanced based on the first pixel value and a second pixel value of the pixel point before the first filtering processing, and a third pixel value of the pixel point after the enhancement processing is obtained, thereby improving image quality and improving encoding / decoding performance.

[0252] The method provided by the present invention is as described above. The device provided by the present invention will be described below.

[0253] 5 is a schematic diagram of a hardware structure of an image enhancement device shown in an embodiment of the present invention. The image enhancement device may include a processor 501 and a memory 502 storing a computer program. The device further includes a communication interface 503 and a communication bus 504. The processor 501, the memory 502, and the communication interface 503 can communicate with each other via the communication bus 504. Furthermore, the processor 501 can execute the above-mentioned image enhancement method by reading and executing the computer program corresponding to the image enhancement control logic in the memory 502.

[0254] The memory 502 referred to in the present invention 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 memory may be a RAM (Random 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.

[0255] As shown in FIG. 6, functionally, the image enhancement device may include a determination unit 610 for determining, for any pixel point of a current block that satisfies a first filtering processing condition, a first pixel value of the pixel point after the first filtering processing, and an enhancement unit 620 for enhancing the pixel value of the pixel point based on the first pixel value and a second pixel value of the pixel point before the first filtering processing, and obtaining a third pixel value of the pixel point after the enhancement processing.

[0256] In one possible embodiment, the enhancement unit 620 is specifically used for enhancing the pixel value of the pixel point according to the difference between the first pixel value and the second pixel value.

[0257] In one possible embodiment, the enhancement unit 620 is specifically used for enhancing the pixel value of the pixel point according to a comparison result between the difference and a predetermined threshold.

[0258] As one possible embodiment, the enhancement unit 620 is specifically used to enhance the pixel value of the pixel point based on a first enhancement filtering offset amount when the difference is greater than a first enhancement filtering threshold, and to enhance the pixel value of the pixel point based on a second enhancement filtering offset amount when the difference is less than a second enhancement filtering threshold, where the second enhancement filtering threshold is less than the first enhancement filtering threshold.

[0259] As one possible embodiment, the enhancement unit 620 is specifically used for determining a fourth pixel value based on the first pixel value and the second pixel value, and enhancing the fourth pixel value based on the first enhancement filtering offset amount to obtain the third pixel value.

[0260] In one possible embodiment, the enhancement unit 620 is specifically used for enhancing the first pixel value according to the first enhancement filtering offset amount to obtain the third pixel value.

[0261] As one possible embodiment, the enhancement unit 620 is specifically used for determining a fourth pixel value based on the first pixel value and the second pixel value, and enhancing the fourth pixel value based on the second enhancement filtering offset amount to obtain the third pixel value.

[0262] In one possible embodiment, the enhancement unit 620 is specifically used for enhancing the first pixel value according to the second enhancement filtering offset amount to obtain the third pixel value.

[0263] As one possible embodiment, the enhancement unit 620 is further used to set the first pixel value as the third pixel value if the difference is less than the first enhancement filtering threshold and greater than or equal to the second enhancement filtering threshold.

[0264] As one possible embodiment, the enhancement unit 620 is further used to perform a second filtering process on the first pixel value to obtain the third pixel value when the difference is less than the first enhancement filtering threshold and greater than or equal to the second enhancement filtering threshold.

[0265] In one possible embodiment, the first emphasis filtering threshold is the inverse of the second emphasis filtering threshold and / or the first emphasis filtering offset amount is the inverse of the second emphasis filtering offset amount.

[0266] As one possible embodiment, as shown in FIG. 7, the device further includes an encoding / decoding unit 630, where the encoding / decoding unit is used to encode / decode a threshold index, where the threshold index is used to represent a position of the first enhancement filtering threshold or the second enhancement filtering threshold in a threshold candidate list, and the encoding / decoding unit is used to encode / decode an offset amount index, where the offset amount index is used to represent a position of the first enhancement filtering offset amount or the second enhancement filtering offset amount in the offset amount candidate list.

[0267] In one possible embodiment, the first emphasis filtering threshold and / or the second emphasis filtering threshold are fixed values. In one possible embodiment, the first emphasis filtering offset amount and / or the second emphasis filtering offset amount are fixed values.

[0268] As one possible embodiment, the highlighting unit 620 is further used to set the third pixel value to the upper limit value of the predetermined range if the third pixel value is greater than the upper limit value of the predetermined range, and to set the third pixel value to the lower limit value of the predetermined range if the third pixel value is less than the lower limit value of the predetermined range.

[0269] As one possible embodiment, the enhancement unit 620 is specifically used for determining the third pixel value using machine learning or deep learning with the first pixel value and the second pixel value as input parameters.

[0270] As one possible embodiment, the enhancement unit 620 is specifically used for enhancing the pixel value of the pixel point based on the first pixel value and the second pixel value when the current block has enhancement filtering enabled.

[0271] As one possible embodiment, a designated syntax is used to identify whether the current block has enhancement filtering enabled, and the designated syntax includes one or more of a sequence parameter set level syntax, a picture parameter set level syntax, and a slice level syntax, or the designated syntax includes one or more of a sequence parameter set level syntax, a picture parameter set level syntax, a coding tree unit (CTU) level syntax, and a coding tree unit (CU) level syntax.

[0272] As one possible embodiment, when the level candidates of the specified syntax include at least two levels, the level of the specified syntax is determined based on a predetermined flag bit, and the predetermined flag bit is used to indicate the level of the specified syntax.

[0273] In one possible embodiment, the syntax level of the predetermined flag bit matches a non-lowest level among the candidate levels of the specified syntax.

[0274] As one possible embodiment, when the level candidates of the specified syntax level include a sequence parameter set level syntax and a picture parameter set level syntax, the syntax level of the predetermined flag bit is a sequence parameter set level; when the level candidates of the specified syntax level include a picture parameter set level syntax and a slice level syntax, the syntax level of the predetermined flag bit is a picture parameter set level; when the level candidates of the specified syntax level include a sequence parameter set level syntax, a picture parameter set level syntax, and a slice level syntax, the syntax level of the predetermined flag bit is a sequence parameter set level syntax. The syntax level of the specified flag bit includes a flag bit and a picture parameter set level flag bit, and if the level candidates of the specified syntax level include picture parameter set level syntax and CTU level syntax, the syntax level of the specified flag bit is picture parameter set level, and if the level candidates of the specified syntax level include CTU level syntax and CU level syntax, the syntax level of the specified flag bit is CTU level, and if the level candidates of the specified syntax level include picture parameter set level syntax, CTU level syntax, and CU level syntax, the specified flag bit includes a picture parameter set level flag bit and a CTU level flag bit.

[0275] As one possible embodiment, the first filtering process includes a vertical deblocking filter (DBF) filtering process, a horizontal DBF filtering process, a sample adaptive offset (SAO) filtering process, or an adaptive loop filter (ALF) filtering process.

[0276] In one possible embodiment, when the first filtering process is not the first filtering process of a plurality of successive filtering processes for the pixel point, the second pixel value is a pixel value obtained by emphasizing a pixel value of the pixel point after a previous filtering process. When the first filtering process is a horizontal DBF filtering process and the pixel point satisfies a vertical DBF filtering process condition, the second pixel value is a pixel value of the pixel point after emphasizing a fifth pixel value of the pixel point, and the fifth pixel value is a pixel value of the pixel point after a vertical DBF filtering process.

[0277] As one possible embodiment, the first filtering process is a vertical deblocking filter DBF filtering process, and the enhancement unit is further used to perform a horizontal DBF filtering process on the third pixel value to obtain a sixth pixel value of the pixel point when the pixel point satisfies a horizontal DBF filtering condition, and enhance the pixel value of the pixel point based on the third pixel value and the sixth pixel value, and obtain a seventh pixel value of the pixel point after the enhancement process.

[0278] In some embodiments, the present invention further provides a camera device comprising the image enhancement device of any of the above embodiments, which may be applied to an encoding device or a decoding device.

[0279] It should be explained that in the present invention, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply an actual relationship or order between those entities or operations. Furthermore, the terms "comprise", "comprises" or their derivatives are intended to convey a non-exclusive inclusion such that a process, method, article or device that includes a set of elements not only includes such elements, but also includes other elements not expressly listed, or further includes the inherent elements of the process, method, article or device. Without further limitation, an element limited by "comprises a ..." does not exclude the presence of another identical element in the process, method, article or device that includes said element.

[0280] The above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made without departing from the spirit and principle of the present invention shall be within the protection scope of the present invention.

Claims

1. 1. A method for enhancing an image, comprising: For any pixel point of a current block of a current image that satisfies a first filtering condition, determining a first pixel value of the pixel point after a first filtering process, the first filtering process including a vertical deblocking filter (DBF) filtering process or a horizontal DBF filtering process, the current image is a reconstructed image, and in a decoding process, the reconstructed image is obtained by entropy decoding, inverse quantization and inverse transform on a bitstream; performing an enhancement process on the pixel value of the pixel point based on the first pixel value and a second pixel value of the pixel point before the first filtering process, and obtaining a third pixel value of the pixel point after the enhancement process; The enhancement process of the pixel value of the pixel point based on the first pixel value and the second pixel value of the pixel point before the first filtering process is emphasizing the pixel value of the pixel point based on a comparison result between the difference between the first pixel value and the second pixel value and a predetermined threshold value; The pixel value of the pixel point is emphasized based on a comparison result between the difference and a predetermined threshold value. If the difference is greater than a first emphasis filtering threshold, emphasizing the pixel value of the pixel point based on a first emphasis filtering offset amount; If the difference is smaller than a second emphasis filtering threshold, emphasizing the pixel value of the pixel point based on a second emphasis filtering offset amount; The second emphasis filtering threshold is smaller than the first emphasis filtering threshold.

13. An image enhancement method comprising:

2. The enhancement processing of the pixel value of the pixel point based on the first enhancement filtering offset amount includes: determining a fourth pixel value based on the first pixel value and the second pixel value; emphasizing the fourth pixel value based on the first emphasis filtering offset amount to obtain the third pixel value; Or, emphasizing the first pixel value based on the first emphasis filtering offset amount to obtain the third pixel value.

2. The method of claim 1 .

3. The enhancement processing of the pixel value of the pixel point based on the second enhancement filtering offset amount is determining a fourth pixel value based on the first pixel value and the second pixel value; emphasizing the fourth pixel value based on the second emphasis filtering offset amount to obtain the third pixel value; Or, performing enhancement processing on the first pixel value based on the second enhancement filtering offset amount to obtain the third pixel value.

2. The method of claim 1 .

4. The step of emphasizing the pixel value of the pixel point based on a comparison result between the difference and a predetermined threshold value further includes: if the difference is less than or equal to the first emphasis filtering threshold and is greater than or equal to the second emphasis filtering threshold, setting the first pixel value as the third pixel value; Or, if the difference is less than or equal to the first emphasis filtering threshold and is greater than or equal to the second emphasis filtering threshold, performing a second filtering process on the first pixel value to obtain the third pixel value. The method according to any one of claims 1 to 3.

5. The first emphasis filtering threshold and the second emphasis filtering threshold are set as follows: the first emphasis filtering threshold is the inverse of the second emphasis filtering threshold; the first emphasis filtering threshold is a fixed value; the second emphasis filtering threshold being a fixed value; and / or The first emphasis filtering offset amount and the second emphasis filtering offset amount are set as follows: the first emphasis filtering offset amount is the inverse of the second emphasis filtering offset amount; the first emphasis filtering offset amount is a fixed value; the second emphasis filtering offset amount being a fixed value. The method according to any one of claims 1 to 4.

6. encoding / decoding a threshold index, the threshold index representing a position of the first emphasis filtering threshold or the second emphasis filtering threshold in a threshold candidate list; and encoding / decoding an offset amount index, the offset amount index representing a position of the first enhancement filtering offset amount or the second enhancement filtering offset amount in an offset amount candidate list. The method according to any one of claims 1 to 5.

7. The enhancement process of the pixel value of the pixel point based on the first pixel value and the second pixel value of the pixel point before the first filtering process is and, if the current block has emphasis filtering enabled, emphasizing the pixel value of the pixel point based on the first pixel value and the second pixel value. The method according to any one of claims 1 to 6.

8. Identifying whether the current block has emphasis filtering enabled using a specified syntax; The specified syntax level includes one or more of a sequence parameter set level syntax, an image parameter set level syntax, and a slice level syntax; or The specified syntax level includes one or more of a sequence parameter set level syntax, a picture parameter set level syntax, a coding tree unit (CTU) level syntax, and a coding unit (CU) level syntax; Wherein, when the level candidates of the specified syntax include at least two levels, a level of the specified syntax is determined based on a predetermined flag bit, the predetermined flag bit is used to indicate a level of the specified syntax, and a syntax level of the predetermined flag bit matches a non-lowest level of the level candidates of the specified syntax; When the level candidates of the specified syntax include the sequence parameter set level syntax and the image parameter set level syntax, the syntax level of the predetermined flag bit is a sequence parameter set level; When the level candidates of the specified syntax level include the image parameter set level syntax and the slice level syntax, the syntax level of the predetermined flag bit is an image parameter set level; When the level candidates of the specified syntax level include the sequence parameter set level syntax, the image parameter set level syntax, and the slice level syntax, the predetermined flag bits include a sequence parameter set level flag bit and an image parameter set level flag bit; When the level candidates of the specified syntax level include the picture parameter set level syntax and the CTU level syntax, the syntax level of the predetermined flag bit is a picture parameter set level; When the level candidates of the specified syntax level include the CTU level syntax and the CU level syntax, the syntax level of the predetermined flag bit is a CTU level; When the level candidates of the specified syntax level include the picture parameter set level syntax, the CTU level syntax, and the CU level syntax, the predetermined flag bits include a picture parameter set level flag bit and a CTU level flag bit.

8. The method of claim 7.

9. The first filtering process includes a vertical deblocking filter (DBF) filtering process, a horizontal deblocking filter (DBF) filtering process, a sample adaptive offset (SAO) filtering process, or an adaptive loop filter (ALF) filtering process. The method according to any one of claims 1 to 8.

10. When the first filtering process is not the first filtering process among a plurality of successive filtering processes for the pixel point, the second pixel value is a pixel value obtained by emphasizing the pixel value after the previous filtering process for the pixel point. The method according to any one of claims 1 to 8.

11. the first filtering process is a horizontal DBF filtering process; When the pixel point satisfies the vertical DBF filtering processing condition, the second pixel value is a pixel value of the pixel point after a fifth pixel value of the pixel point is enhanced, and the fifth pixel value is a pixel value of the pixel point after a vertical DBF filtering processing.

11. The method of claim 10.

12. the first filtering process is a vertical deblocking filter (DBF) filtering process, After the pixel value of the pixel point is emphasized, If the pixel point satisfies a horizontal DBF filtering condition, performing a horizontal DBF filtering process on the third pixel value to obtain a sixth pixel value of the pixel point; and performing an enhancement process on the pixel value of the pixel point based on the third pixel value and the sixth pixel value to obtain a seventh pixel value of the pixel point after the enhancement process. The method according to any one of claims 1 to 8.

13. 1. An image enhancement device, comprising: A determination unit for determining, for any pixel point of a current block of a current image that satisfies a first filtering operation condition, a first pixel value of the pixel point after a first filtering operation, the first filtering operation includes a vertical deblocking filter (DBF) filtering operation or a horizontal DBF filtering operation, the current image is a reconstructed image, and in a decoding operation, the reconstructed image is obtained by entropy decoding, inverse quantization and inverse transform on a bitstream; an enhancement unit for enhancing a pixel value of the pixel point based on the first pixel value and a second pixel value of the pixel point before the first filtering process, and obtaining a third pixel value of the pixel point after the enhancement process; Specifically, the enhancement unit is used to enhance the pixel value of the pixel point based on a comparison result between the difference between the first pixel value and the second pixel value and a predetermined threshold value; Specifically, the highlighting unit is If the difference is greater than a first emphasis filtering threshold, emphasizing the pixel value of the pixel point based on a first emphasis filtering offset amount; If the difference is less than a second enhancement filtering threshold, a second enhancement filtering offset is used to enhance the pixel value of the pixel point; The second emphasis filtering threshold is smaller than the first emphasis filtering threshold.

1. An image enhancement device comprising:

14. 1. An image enhancement device, comprising: The present invention includes a processor and a memory, the memory storing a computer program, and the processor executes the computer program to perform the method according to any one of claims 1 to 12.

1. An image enhancement device comprising:

15. A machine-readable storage medium having stored thereon machine-executable instructions executable by a processor, the machine-executable instructions, when executed by the processor, to perform the method of any one of claims 1 to 12. A machine-readable storage medium comprising:

Citation Information

Patent Citations

  • Image processor, image processing method and image processing program

    JP2002354256A

  • Image enhancement processing method and image enhancement processing device using same

    WO2012042821A1

  • Encoding device, decoding device, encoding method, and decoding method

    WO2018123800A1