Pixel compensation method and device and storage medium
By obtaining the slope function of the SAO category to calculate the optimal compensation value, the calculation process of the SAO category is simplified, the problem of ripple phenomenon in H.265 video encoding is solved, and the hardware resource saving and image quality improvement are achieved.
Patent Information
- Application Number
- CN202510744938.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-08-26
AI Technical Summary
In the prior art, the H.265 video encoding protocol leads to ripple after decoding during the DCT transformation and quantization process of image blocks. The traditional SAO compensation method has high computational complexity, consumes hardware resources and consumes a lot of power.
By obtaining the slope function of each SAO category, and using the slope function of the primary function to calculate the optimal compensation value, simplifying the process of determining the optimal compensation value, reducing the calculation complexity and saving hardware resources.
It effectively reduces the computational complexity of optimal compensation value under the SAO category, saves hardware resource overhead, reduces system power consumption, improves working frequency, and improves the visual quality of the reconstructed image.
Smart Images

Figure CN120547342A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a pixel compensation method, device, and storage medium. Background Art
[0002] The H.265 High Efficiency Video Coding (HEVC) protocol is the next-generation video compression standard. The H.265 protocol uses the block-based Discrete Cosine Transform (DCT) and quantizes the transform coefficients in the frequency domain. This causes some high-frequency coefficients to lose some detail information after quantization, resulting in some ripples in the reconstructed image after decoding, seriously affecting the decoded video quality.
[0003] In the existing technology, SAO (Sample Adaptive Offset) is generally used to obtain the optimal compensation value, and the reconstructed pixels are compensated by the optimal compensation value to solve the ripple phenomenon existing in the decoded reconstructed image.
[0004] The optimal compensation value is usually calculated using Figure 1 The traditional method shown in the figure first calculates the number of pixels N in each SAO category and the sum of the differences E between each reconstructed pixel and the corresponding original pixel. The average of N and E for each category, or E / N, is then calculated to obtain an initial compensation value. The initial compensation values for each category are then rounded, clipped, and adjusted to obtain a set of candidate compensation values. Finally, a fast mode discrimination method is used to traverse the entire set of candidate compensation values and calculate the relative rate-distortion cost of each candidate compensation value. The relative rate-distortion cost function is a quadratic function. Finally, each relative rate-distortion cost is compared one by one, and the candidate compensation value with the lowest cost is selected as the optimal compensation value. This traditional method for determining the optimal compensation value is computationally complex, involving numerous multiplication, division, and addition operations, which consumes a lot of hardware resources. Summary of the Invention
[0005] In view of this, the present application provides a pixel compensation method, device and storage medium, which aim to effectively reduce the computational complexity of the optimal compensation value under each SAO category, thereby significantly improving the visual quality of the reconstructed image while effectively saving hardware resources.
[0006] The present application provides a pixel compensation method, comprising: Obtaining a slope function corresponding to each SAO category, where the slope function is obtained by deriving a relative rate-distortion cost function corresponding to the SAO category; determining an optimal compensation value for each of the SAO categories according to the slope function corresponding to each of the SAO categories; The reconstructed pixels are compensated according to the optimal compensation values under each of the SAO categories.
[0007] Optionally, determining the optimal compensation value for each SAO category according to the slope function corresponding to each SAO category includes: Obtaining a compensation range for the SAO category; Based on the slope function corresponding to each of the SAO categories, the compensation range is approximated successively to obtain the optimal compensation value under each of the SAO categories.
[0008] Optionally, the performing successive approximations on the compensation range based on the slope function corresponding to each of the SAO categories to obtain an optimal compensation value under each of the SAO categories includes: Based on the slope function corresponding to each of the SAO categories, the compensation range is successively approximated to obtain an initial compensation value in the form of an absolute value under each of the SAO categories; According to each of the SAO categories, an optimal compensation value under each of the SAO categories is determined based on an initial compensation value under each of the SAO categories.
[0009] Optionally, determining the optimal compensation value for each SAO category based on the initial compensation value for each SAO category includes: When the SAO category belongs to the BO mode and the first statistical value is greater than or equal to a first preset value, the optimal compensation value is the initial compensation value; When the SAO category belongs to the BO mode and the first statistical value is less than a first preset value, the optimal compensation value is the opposite of the initial compensation value; The first statistical value is the sum of the differences between each reconstructed pixel and each corresponding original pixel under the SAO category.
[0010] Optionally, determining the optimal compensation value for each SAO category based on the initial compensation value for each SAO category includes: When the SAO category belongs to the EO mode and the reference trend is an upward trend, the optimal compensation value is the initial compensation value; When the SAO category belongs to the EO mode and the reference trend is a downward trend, the optimal compensation value is the opposite of the initial compensation value; The reference trend is a trend of a curve formed by combining an original pixel in a pixel set belonging to the SAO category and at least two reference pixels located on both sides of the original pixel, and the original pixel corresponds to the reconstructed pixel.
[0011] Optionally, the step of successively approximating the compensation range based on the slope function corresponding to each of the SAO categories to obtain an initial compensation value in absolute value form under each of the SAO categories includes: Calculating, by using a slope function corresponding to each of the SAO categories, a slope of each of the SAO categories when a first endpoint value and a second endpoint value are within a compensation range, wherein the first endpoint value is greater than the second endpoint value; Calculating the slope of each SAO category at an intermediate value according to the slope of each SAO category at the first endpoint value and the second endpoint value, wherein the intermediate value is the average of the first endpoint value and the second endpoint value; When the slope of each of the SAO categories is less than or equal to a second preset value at an intermediate value, updating the compensation range to a value from the intermediate value to the first endpoint value; When the slope of each of the SAO categories is greater than a second preset value at an intermediate value, updating the compensation range to a value from the second endpoint value to the intermediate value; The slope function corresponding to each of the SAO categories is used to continuously calculate the slope of each of the SAO categories at the first endpoint value and the second endpoint value within the updated compensation range, until only a single compensation value exists in the updated compensation range, and the single compensation value is used as the initial compensation value in the form of an absolute value.
[0012] Optionally, obtaining the compensation range of the SAO category includes: Obtaining an initial compensation range for the SAO category, where the initial compensation range includes a first compensation interval and a second compensation interval that are symmetrically distributed, and any compensation value in the first compensation interval is smaller than any compensation value in the second compensation interval; The second compensation interval is used as a compensation range of the SAO category.
[0013] Optionally, compensating the reconstructed pixels according to the optimal compensation value under each of the SAO categories includes: Selecting an optimal compensation value under an optimal SAO category from the optimal compensation values under each of the SAO categories; The reconstructed pixels are compensated based on the optimal compensation value under the optimal SAO category.
[0014] The present application also provides a pixel compensation device, comprising: An acquisition module is configured to acquire a slope function corresponding to each SAO category, where the slope function is obtained by deriving a relative rate-distortion cost function corresponding to the SAO category; a determination module, configured to determine an optimal compensation value for each of the SAO categories according to the slope function corresponding to each of the SAO categories; The compensation module is configured to compensate the reconstructed pixels according to the optimal compensation value under each of the SAO categories.
[0015] The present application also provides an electronic device, comprising: a processor, a memory, and a communication bus; The communication bus is used to realize the connection and communication between the processor and the memory; The processor is used to execute the pixel compensation processing program stored in the memory to implement the steps of any one of the above-mentioned pixel compensation methods.
[0016] The present application also provides a readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the steps of any of the above-mentioned pixel compensation methods are implemented.
[0017] The present application also provides a computer program product, comprising computer-executable instructions, which, when loaded and executed by a processor, implement the steps of any of the above-mentioned pixel compensation methods.
[0018] Compared to the prior art, the present application provides a pixel compensation method, device, and storage medium. These methods obtain a slope function corresponding to each SAO category, where the slope function is derived by deriving a relative rate-distortion cost function for the corresponding SAO category. Based on the slope function, the optimal compensation value for each SAO category is determined, and the reconstructed pixel is compensated based on the optimal compensation value for each SAO category. In the present application, the optimal compensation value for each SAO category used to compensate the reconstructed pixel is determined using the slope function for the corresponding category, which is derived by deriving the relative rate-distortion cost function for each SAO category. Compared to conventional methods, the optimal compensation value determination process is simplified to a calculation process combining a linear function with the slope function. This effectively reduces the computational complexity of the optimal compensation value for each SAO category, improving the visual quality of the reconstructed image while effectively saving hardware resource overhead. This reduces the average power consumption of the system and increases the operating frequency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 Flowchart of the conventional method for calculating the optimal compensation value; Figure 2 A schematic flow chart of a pixel compensation method provided in an embodiment of the present application; Figure 3 This is a schematic diagram showing a slope function corresponding to an SAO category with E less than 0 and a slope function corresponding to another SAO category with E greater than 0, which are symmetrical about the Y axis, provided in an embodiment of the present application; Figure 4 This is a flow chart illustrating how to obtain an initial compensation value in absolute value form for each SAO category by successively approximating the compensation range using a bisection method based on the slope function corresponding to each SAO category provided in an embodiment of the present application; Figure 5 Schematic diagram of the relationship between the initial compensation value in absolute value form and the relative rate-distortion cost function and the slope function when the slope of each SAO category is less than 0 at an intermediate value of 3.5 provided in an embodiment of the present application; Figure 6 Schematic diagram of the relationship between the initial compensation value in absolute value form and the relative rate-distortion cost function and the slope function when the slope of each SAO category is equal to 0 at an intermediate value of 3.5 provided in an embodiment of the present application; Figure 7 Schematic diagram of the relationship between the initial compensation value in absolute value form and the relative rate-distortion cost function and the slope function when the slope of each SAO category is greater than 0 at an intermediate value of 3.5 provided in an embodiment of the present application; Figure 8 A schematic flow chart of another pixel compensation method provided in an embodiment of the present application; Figure 9 This is a schematic structural diagram of a pixel compensation device provided in an embodiment of the present application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to help those skilled in the art better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of this application.
[0022] It should be noted that when an element is referred to as being “fixed on” or “set on” another element, it can be directly on the other element or indirectly set on the other element; when an element is referred to as being “connected to” another element, it can be directly connected to the other element or indirectly connected to the other element.
[0023] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.
[0024] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. Throughout the description of this application, "plurality" or "several" means two or more, unless otherwise specifically defined.
[0025] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the efficacy and purpose that can be achieved by this application.
[0026] like Figure 2 As shown, an embodiment of the present application provides a pixel compensation method, including: S1. Obtain the slope function corresponding to each SAO category, where the slope function is obtained by deriving the relative rate-distortion cost function under the corresponding SAO category; In this embodiment, the BO (Band Offset) mode or the EO (Edge Offset) mode of the Sample Adaptive Offset (SAO) technology can be used to perform classification compensation on pixels in the image blocks of the reconstructed image, i.e., reconstructed pixels. The specific compensation mode and the determination of the compensation value will be described in detail in subsequent embodiments.
[0027] It should be noted that the SAO compensation modes include BO mode and EO mode. The principle of pixel classification in BO mode is: classify each pixel according to its pixel value. For example, the value range of the pixel is 0-255 (8bit), and the pixel value in the range of [0, 7] can be recorded as BO0, and the pixel value in the range of [8, 15] can be recorded as BO1. By analogy, a total of 32 SAO categories from BO0 to BO31 can be obtained.
[0028] The principle of pixel classification in EO mode is as follows: classification is based on the local gradient direction of the pixel, and there are four gradient categories: horizontal direction, vertical direction, 135° direction and 45° direction, which are recorded as EO0, EO1, EO2, and EO3. For each pixel, according to the relationship between its gradient direction and the pixel value of the adjacent pixels, it can be divided into four edge types. The four edge types in the horizontal gradient direction are recorded as EO0_0, EO0_1, EO0_2, and EO0_3, the four edge types in the vertical gradient direction are recorded as EO1_0, EO1_1, EO1_2, and EO1_3, the four edge types in the 135° direction are recorded as EO2_0, EO2_1, EO2_2, and EO2_3, and the four edge types in the 45° direction are recorded as EO3_0, EO3_1, EO3_2, and EO3_3. Since each gradient direction corresponds to four edge types under the four gradient directions (horizontal, vertical, 45°, and 135°), there are a total of 16 combinations, a total of 16 SAO categories. That is, there are a total of 48 SAO categories, and the relative rate-distortion cost functions under the 48 SAO categories can be obtained. Then, each relative rate-distortion cost function is derived to obtain the slope function corresponding to each SAO category.
[0029] The slope function can be calculated in advance according to the relative rate-distortion cost function and stored in the memory. When image pixel compensation begins, the slope function corresponding to each SAO category can be read from the memory and used for subsequent processing.
[0030] The relative rate-distortion cost function mentioned above is essentially a quadratic function. In some embodiments, the relative rate-distortion cost function under the SAO category can be expressed as:
[0031] in, is the relative rate distortion cost under the SAO category, D is the distortion degree under the SAO category, is the Lagrange constant, R is the number of bits required to encode the current mode or syntax information, N is the number of pixels under the SAO category, h is the compensation value under the SAO category, E is the sum of the differences between each reconstructed pixel under the SAO category and the corresponding original pixels, C is a constant, and abs(h)+C represents the number of bits required to encode the optimal compensation value.
[0032] Substituting the actual values of the parameters such as the number of pixels, distortion and compensation value under each SAO category above, we get the relative rate-distortion cost function under each SAO category.
[0033] The slope function obtained by deriving the relative rate distortion cost function under the above SAO category is expressed as:
[0034] in, is the slope under the SAO category, is the number of pixels under the SAO category, is the compensation value under the SAO category, E is the sum of the differences between each reconstructed pixel under the SAO category and the corresponding original pixels, is the Lagrange constant.
[0035] Substituting the actual values of parameters such as the number of pixels N under each SAO category and the sum of the differences E between each reconstructed pixel and the corresponding original pixel, we can obtain the slope function corresponding to each SAO category. It can be seen that by taking the derivative and omitting the square, the slope function is a linear function.
[0036] S2. Determine the optimal compensation value for each SAO category based on the slope function corresponding to each SAO category; S3. Compensate the reconstructed pixels according to the optimal compensation value under each SAO category.
[0037] In this embodiment, the present application converts the process of calculating the optimal compensation value of the EO mode and the BO mode in the sample adaptive compensation into the same calculation process, simplifies the calculation steps, and can achieve the normalization processing of the optimal compensation value under 48 SAO categories, which is convenient for hardware design.
[0038] This application addresses the process of calculating the optimal compensation value for each SAO category in sample adaptive compensation. It converts the process of solving the relative rate-distortion cost function, which is a quadratic function, into a process of determining the optimal compensation value using a slope function, which is a linear function. This effectively reduces the computational complexity of the optimal compensation value for each SAO category, effectively reduces the use of hardware resources such as multipliers, dividers, and adders, and can save approximately 75% of hardware resources. This improves the visual quality of the reconstructed image while effectively saving hardware resource overhead, thereby reducing the average power consumption of the system and increasing the operating frequency.
[0039] In addition, the present application eliminates the process of calculating the initial compensation value in the process of obtaining the optimal compensation value in the traditional method, that is, it eliminates the process of calculating the average value E / N according to N and E under each category and using the average value under each category as the initial compensation value, thereby eliminating the divider, so that while improving the visual quality of the reconstructed image, it can further save hardware resource overhead, thereby further reducing the average power consumption of the system and increasing the operating frequency.
[0040] Therefore, compared with the prior art, this embodiment obtains a slope function corresponding to each SAO category, where the slope function is obtained by deriving the relative rate-distortion cost function under the corresponding SAO category. Based on the slope function corresponding to each SAO category, the optimal compensation value under each SAO category is determined, and then the reconstructed pixel is compensated based on the optimal compensation value under each SAO category. In this application, when obtaining the optimal compensation value under each SAO category for compensating the reconstructed pixel, it is determined by the slope function under the corresponding category, and the slope function is obtained by deriving the relative rate-distortion cost function corresponding to each SAO category. Therefore, compared with the traditional method of simplifying the optimal compensation value determination process to the calculation process of the slope function belonging to a linear function, the computational complexity of the optimal compensation value under each SAO category can be effectively reduced, thereby improving the visual quality of the reconstructed image while effectively saving hardware resource overhead, thereby reducing the average power consumption of the system and increasing the operating frequency.
[0041] In some implementations of S2 of this embodiment, the compensation range of each SAO category can be obtained, and based on the slope function corresponding to each SAO category, the compensation range can be successively approximated to obtain the optimal compensation value for each SAO category. This shortens the path to determining the optimal compensation value, reduces the number of calculations, and increases the operating frequency of pixel compensation. For example, the successive approximation method can be a bisection method.
[0042] Alternatively, various values within the compensation range may be traversed, and combined with the slope function corresponding to each SAO category to obtain various compensation values under each SAO category, and ultimately determine the optimal compensation value under each SAO category.
[0043] In this embodiment, the reconstructed pixels are compensated according to the optimal compensation value under each SAO category, which can effectively improve the visual quality of the reconstructed image and achieve a better visual effect of the video.
[0044] In some implementations of S3 of this embodiment, preferably, an optimal compensation value under the optimal SAO category may be selected from the optimal compensation values under various SAO categories, and the reconstructed pixels may be compensated based on the optimal compensation value under the optimal SAO category.
[0045] For example, the optimal compensation value under BO mode can be selected from the optimal compensation values under various SAO categories belonging to BO mode, the optimal compensation value under EO mode can be selected from the optimal compensation values under various SAO categories belonging to EO mode, and an optimal compensation value can be selected from the optimal compensation values under BO mode and the optimal compensation values under EO mode. The corresponding category is the optimal SAO category, thereby obtaining the optimal compensation value under the optimal SAO category.
[0046] As an implementation manner, in the embodiment of the present application, step S2 includes: S21. Obtain the compensation range of the SAO category; In this embodiment, an initial compensation range of the SAO category may be obtained, where the initial compensation range includes a first compensation interval and a second compensation interval, and any compensation value in the first compensation interval is smaller than any compensation value in the second compensation interval.
[0047] In some examples, the first compensation interval and the second compensation interval may be symmetrically distributed. In this case, the second compensation interval may be used as the compensation range of the SAO category.
[0048] The initial compensation range of the SAO category can also be obtained and used as the compensation range of the SAO category. Preferably, the second compensation interval is used as the compensation range of the SAO category when the distribution is symmetrical. This can effectively narrow the compensation range, so that in the process of calculating the optimal compensation value under each SAO category, the amount of calculation can be effectively reduced, and thus the use of hardware resources such as adders and comparison selectors can be effectively reduced.
[0049] For example, if the initial compensation range of the SAO category is [-7, 7], the first compensation interval is [-7, 0], and the second compensation interval is [0, 7], the second compensation interval [0, 7] can be used as the compensation range of the SAO category, or the initial compensation range [-7, 7] can be used as the compensation range of the SAO category.
[0050] S22. Based on the slope function corresponding to each SAO category, the compensation range is successively approximated to obtain the optimal compensation value under each SAO category.
[0051] In this embodiment, based on the slope function corresponding to each SAO category, the optimal compensation value under each SAO category is obtained by successively approximating the compensation range. This can avoid traversing all possible compensation values, significantly reduce the amount of calculation, and further save hardware resource overhead.
[0052] In some implementations of this embodiment, if S21 uses the second compensation interval as the compensation range of the SAO category, S22 can be based on the slope function corresponding to each SAO category, successively approximating the compensation range to obtain the initial compensation value in the absolute value form under each SAO category, and determining the optimal compensation value under each SAO category based on the initial compensation value under each SAO category.
[0053] If S21 is to use the initial compensation range of the SAO category as the compensation range of the SAO category, S22 can be to successively approximate the compensation range based on the slope function corresponding to each SAO category, and the compensation value under each SAO category obtained by the successive approximation is the optimal compensation value under each SAO category.
[0054] As an implementation manner, in the embodiment of the present application, step S22 includes: S221: Based on the slope function corresponding to each SAO category, the compensation range is successively approximated to obtain an initial compensation value in the form of an absolute value for each SAO category; In this embodiment, the initial compensation value in the form of absolute value is the absolute value of the optimal compensation value, that is, , the slope function corresponding to each SAO category is specifically the absolute value of the sum of the actual value of the number of pixels N under each SAO category and the difference between each reconstructed pixel and the corresponding original pixel, i.e. |E|, substituted into the following formula: , and obtain the slope function.
[0055] S222: Determine the optimal compensation value for each SAO category based on the initial compensation value for each SAO category.
[0056] In this embodiment, since the first compensation interval and the second compensation interval are symmetrically distributed, specifically, Figure 3 As shown, the first compensation interval and the second compensation interval are symmetric about the Y axis. Since the actual value of the number of pixels N under each SAO category is greater than 0, if the actual value of the sum of the differences E between the reconstructed pixels and the original pixels under the SAO category is less than 0, it means that the reconstructed pixels are generally brighter than the original pixels, and the brightness of the reconstructed pixels should be reduced. The optimal compensation value under this SAO category, that is, the actual value of the compensation value h, is less than 0.
[0057] If the actual value of the sum of the differences between the reconstructed pixels and the original pixels under the SAO category, E, is greater than 0, it means that the reconstructed pixels are generally darker than the original pixels, and the reconstructed pixels should be brighter. The optimal compensation value under the SAO category, that is, the actual value of the compensation value h, is greater than 0.
[0058] In summary, the slope function corresponding to another SAO category obtained by substituting the actual value of the number of pixels N under one SAO category and the actual value of the sum of the differences E between each reconstructed pixel and the corresponding original pixel less than 0, and the slope function corresponding to one SAO category obtained by substituting the actual value of the number of pixels N under another SAO category and the actual value of the sum of the differences E between each reconstructed pixel and the corresponding original pixel greater than 0, are symmetric about the Y axis.
[0059] Therefore, by taking the second compensation interval as the compensation range of the SAO category, the second compensation interval is successively approximated based on the slope function obtained by substituting the actual value of the number of pixels N under each SAO category and the absolute value of the sum of the differences E between each reconstructed pixel and the corresponding original pixel, to obtain an initial compensation value in the form of an absolute value under each SAO category, and then according to each SAO category, the optimal compensation value under each SAO category is determined based on the initial compensation value under each SAO category, so that the process of calculating the optimal compensation value within the initial compensation range for the 16 SAO categories in the EO mode and the 32 SAO categories in the BO mode in the sample adaptive compensation can be converted into the first compensation interval. First, the initial compensation value in absolute value form under each SAO category is calculated within the second compensation interval using the same calculation method, and then the optimal compensation value is determined based on the initial compensation value under each SAO category. This process not only simplifies the calculation steps and can achieve normalization of the optimal compensation values under 48 SAO categories, facilitating hardware design, but also effectively narrows the compensation range, effectively reducing the computational complexity of the successive approximation process, and thus effectively reducing the use of hardware resources such as adders and comparison selectors. This improves the visual quality of the reconstructed image while further effectively saving hardware resource overhead, thereby further reducing the average power consumption of the system and increasing the operating frequency.
[0060] In some implementations of S221 of this embodiment, when the dichotomy method is implemented, the slope function corresponding to each SAO category can be used to calculate the slope of each SAO category at the first endpoint value and the second endpoint value within the compensation range, wherein the first endpoint value is greater than the second endpoint value. Then, based on the slope of each SAO category at the first endpoint value and the second endpoint value, the slope of each SAO category at the intermediate value is calculated, and the intermediate value is the average of the first endpoint value and the second endpoint value.
[0061] Therefore, when the slope of each SAO category is less than or equal to the second preset value at the intermediate value, the compensation range is updated to the intermediate value to the first endpoint value; when the slope of each SAO category is greater than the second preset value at the intermediate value, the compensation range is updated to the second endpoint value to the intermediate value, and the slope function corresponding to each SAO category is used to continue to calculate the slope of each SAO category at the first endpoint value and the second endpoint value within the updated compensation range, until there is only a single compensation value in the updated compensation range, and the single compensation value is used as the initial compensation value in the absolute value form.
[0062] The above judgment condition can also be replaced by "the slope under each SAO category is less than or equal to the second preset value" to "the slope under each SAO category is less than the second preset value", and correspondingly, "the slope under each SAO category is greater than the second preset value" is replaced by "the slope under each SAO category is greater than or equal to the second preset value".
[0063] Alternatively, the slope function corresponding to each SAO category may be used to calculate the slope of each SAO category when the middle value of the first endpoint value and the second endpoint value within the compensation range (that is, the average of the first endpoint value and the second endpoint value, where the first endpoint value is greater than the second endpoint value) is calculated.
[0064] When the slope of each SAO category at the intermediate value is less than or equal to the second preset value, the compensation range is updated to the intermediate value to the first endpoint value. When the slope of each SAO category at the intermediate value is greater than the second preset value, the compensation range is updated to the second endpoint value to the intermediate value. The slope function corresponding to each SAO category is used to continuously calculate the slope of each SAO category at the intermediate value between the first endpoint value and the second endpoint value within the updated compensation range. When only a single compensation value exists in the updated compensation range, the single compensation value is used as the initial compensation value in absolute value form.
[0065] In some implementations of S222 of this embodiment, the optimal compensation value for each SAO category may be determined based on the initial compensation value for each SAO category according to the compensation mode type of each SAO category, the sum of the differences between each reconstructed pixel and the corresponding original pixel under the SAO category, and the trend of a curve formed by a combination of the original pixel corresponding to the reconstructed pixel in the pixel set of the SAO category and at least two reference pixels located on both sides of the original pixel.
[0066] As an implementation manner, in the embodiment of the present application, step S222 includes: S2221: When the SAO category belongs to the BO mode and the first statistical value is greater than or equal to the first preset value, the optimal compensation value is the initial compensation value; In this embodiment, the first preset value is a pre-set value, which may be 0. When the SAO category belongs to the BO mode, if the first statistical value is greater than or equal to the first preset value, it indicates that the reconstructed pixels are generally too large. Since the initial compensation value has already reflected the direction in which the reduction is required, the optimal compensation value directly adopts the initial compensation value.
[0067] S2222: When the SAO category belongs to the BO mode and the first statistical value is less than the first preset value, the optimal compensation value is the opposite of the initial compensation value; In this embodiment, when the SAO category belongs to the BO mode, if the first statistical value is less than the first preset value, it means that the reconstructed pixels are generally too small and the adjustment direction needs to be reversed (from decreasing to increasing). Therefore, the opposite of the initial compensation value needs to be used as the optimal compensation value.
[0068] The first statistical value is the sum of the differences between each reconstructed pixel and each corresponding original pixel under the SAO category.
[0069] As an implementation manner, in the embodiment of the present application, step S222 includes: S2223. When the SAO category belongs to the EO mode and the reference trend is an upward trend, the optimal compensation value is the initial compensation value; In this embodiment, when the SAO category belongs to the EO mode, if the reference trend is an upward trend, that is, the original pixel value is greater than the reference pixel value (for example, the right pixel is brighter than the left pixel), since the initial value has already adapted to the edge enhancement requirement, the initial compensation value is directly used as the optimal compensation value.
[0070] S2224. When the SAO category belongs to the EO mode and the reference trend is a downward trend, the optimal compensation value is the opposite of the initial compensation value; The reference trend is a trend of a curve formed by combining an original pixel and at least two reference pixels located on both sides of the original pixel in a pixel set of the SAO category, and the original pixel corresponds to the reconstructed pixel.
[0071] In this embodiment, when the SAO category belongs to the EO mode, if the reference trend is a downward trend, that is, the original pixel value is less than the reference pixel value (for example, the right pixel is darker than the left pixel), it is necessary to reverse the compensation direction to match the characteristics of the downward edge. Therefore, the opposite of the initial compensation value is required as the optimal compensation value.
[0072] The following combination Figures 4 to 7 A specific calculation example is provided to illustrate step S221 in the embodiment of the present application. It includes: S2211: Calculate the slope of each SAO category when the first endpoint value and the second endpoint value are within the compensation range using the slope function corresponding to each SAO category, wherein the first endpoint value is greater than the second endpoint value; In this embodiment, the first endpoint value within the compensation range is substituted into the slope function corresponding to each SAO category, and the slope of each SAO category when the first endpoint value is obtained is calculated. The second endpoint value within the compensation range is substituted into the slope function corresponding to each SAO category, and the slope of each SAO category when the second endpoint value is obtained is calculated.
[0073] For example, Figure 4 As shown, the compensation range is [0,7], and the first endpoint value 7 is substituted into the slope function corresponding to each SAO category. Among them , get the slope of each SAO category when the first endpoint value is 7 , substitute the second endpoint value 0 into the slope function corresponding to each SAO category The slope of each SAO category when the second endpoint value is 0 is obtained. .
[0074] S2212: Calculate the slope of each SAO category at the intermediate value based on the slope of each SAO category at the first endpoint value and the second endpoint value, where the intermediate value is the average of the first endpoint value and the second endpoint value. In this embodiment, the midpoint coordinate formula of a linear function can be used to calculate the slope of each SAO category at the middle value of the first endpoint value and the second endpoint value (that is, the average value of the first endpoint value and the second endpoint value) based on the slope of each SAO category at the first endpoint value and the second endpoint value.
[0075] For example, Figure 4 As shown, using the midpoint coordinate formula of the linear function, according to the slope of each SAO category when the first endpoint value is 7 And the slope of each SAO category when the second endpoint value is 0 , we get the slope of each SAO category when the intermediate value is 3.5 .
[0076] S2213: When the slope of each SAO category is less than or equal to the second preset value at the intermediate value, update the compensation range to the intermediate value to the first endpoint value; In this embodiment, the second preset value is a preset value, which may be 0. The initial compensation value in absolute value form is an integer value. When the slope of each SAO category is less than or equal to the second preset value at the intermediate value, the relative rate distortion cost in absolute value form is indicated. The minimum integer compensation value, ie, the initial compensation value in absolute value form, is between the middle value and the first endpoint value, so the compensation range can be updated to the middle value to the first endpoint value.
[0077] For example, Figure 5 and Figure 6As shown, when the slope of each SAO category is less than or equal to 0 at the intermediate value of 3.5, it indicates the relative rate distortion cost in absolute value form. The minimum integer compensation value, that is, the initial compensation value in absolute value form, is between the intermediate value 3.5 and the first endpoint value 7, so the compensation range can be updated to the intermediate value 3.5 to the first endpoint value 7, that is, [3.5,7].
[0078] S2214: When the slope of each SAO category is greater than the second preset value at the intermediate value, the compensation range is updated to the second endpoint value to the intermediate value; In this embodiment, when the slope of each SAO category is greater than the second preset value at the intermediate value, the relative rate distortion cost in the form of absolute value is indicated. The minimum integer compensation value, ie, the initial compensation value in absolute value form, is between the second endpoint value and the middle value, so the compensation range can be updated to the second endpoint value to the middle value.
[0079] For example, Figure 7 As shown, when the slope of each SAO category is greater than 0 at the intermediate value of 3.5, it indicates the relative rate distortion cost in absolute value form. The minimum integer compensation value, that is, the initial compensation value in absolute value form, is between the intermediate value second endpoint value 0 and the intermediate value 3.5, so the compensation range can be updated to the intermediate value 0 to the first endpoint value 3.5, that is, [0,3.5].
[0080] S2215. Continue calculating the slope of each SAO category at the first endpoint value and the second endpoint value within the updated compensation range using the slope function corresponding to each SAO category, until only a single compensation value exists within the updated compensation range, and use the single compensation value as the initial compensation value in absolute value form.
[0081] In this embodiment, the slope function corresponding to each SAO category is used to continue calculating the slope of each SAO category when the first endpoint value and the second endpoint value are within the updated compensation range, until there is only a single integer compensation value in the updated compensation range, and the single integer compensation value is used as the initial compensation value in the absolute value form.
[0082] For example, Figure 4 As shown, the slope of each SAO category at the intermediate value of 3.5 When it is greater than 0, the updated compensation range is [0,3.5]. Using the midpoint coordinate formula of the linear function, the slope of each SAO category when the first endpoint value is 3.5 in the updated compensation range [0,3.5] is calculated. The slope of each SAO category when the second endpoint value is 0 The slope of each SAO category at the updated intermediate value of 1.75 .
[0083] Slopes for each SAO category at the updated intermediate value of 1.75 When it is greater than 0, the updated compensation range is [0,1.75]. Using the midpoint coordinate formula of the linear function, the slope of each SAO category when the first endpoint value is 1.75 in the updated compensation range [0,1.75] is calculated. The slope of each SAO category when the second endpoint value is 0 The slope of each SAO category at the updated median value of 0.875 .
[0084] The slope of each SAO category at the updated median value of 0.875 When it is greater than 0, the updated compensation range is [0, 0.875]. Since the updated compensation range [0, 0.875] only has a single integer compensation value of 0, the single integer compensation value 0 is used as the initial compensation value in absolute value form. .
[0085] The slope of each SAO category at the updated median value of 0.875 When it is less than or equal to 0, the updated compensation range is [0.875, 1]. Since the updated compensation range [0.875, 1] only has a single integer compensation value 1, the single integer compensation value 1 is used as the initial compensation value in absolute value form. , Slopes for each SAO category at the updated intermediate value of 1.75 When it is less than or equal to 0, the updated compensation range is [1.75, 3.5]. Using the midpoint coordinate formula of the linear function, the slope of each SAO category when the first endpoint value is 3.5 in the updated compensation range [1.75, 3.5] is calculated. The slope of each SAO category when the second endpoint value is 1.75 The slope of each SAO category at the updated intermediate value of 2.625 .
[0086] The slope of each SAO category at the updated intermediate value of 2.625 When it is greater than 0, the updated compensation range is [1.75, 2.625]. Since the updated compensation range [1.75, 2.625] only has a single integer compensation value 2, the single integer compensation value 2 is used as the initial compensation value in absolute value form. .
[0087] The slope of each SAO category at the updated intermediate value of 2.625 When it is less than or equal to 0, the updated compensation range is [2.625, 3.5]. Since the updated compensation range [2.625, 3.5] only has a single integer compensation value of 3, the single integer compensation value 3 is used as the initial compensation value in absolute value form. .
[0088] Slopes for each SAO category at the intermediate value of 3.5 When it is less than or equal to 0, the updated compensation range is [3.5,7]. Using the midpoint coordinate formula of the linear function, the slope of each SAO category when the first endpoint value is 7 within the updated compensation range [3.5,7] is calculated. The slope of each SAO category when the second endpoint value is 3.5 The slope of each SAO category at the updated intermediate value of 5.25 .
[0089] The slope of each SAO category at the updated intermediate value of 5.25 When it is greater than 0, the updated compensation range is [3.5, 5.25]. Using the midpoint coordinate formula of the linear function, the slope of each SAO category when the first endpoint value is 5.25 in the updated compensation range [3.5, 5.25] is calculated. The slope of each SAO category when the second endpoint value is 3.5 The slope of each SAO category at the updated intermediate value of 4.375 .
[0090] The slope of each SAO category at the updated intermediate value of 4.375 When it is greater than 0, the updated compensation range is [3.5, 4.375]. Since the updated compensation range [3.5, 4.375] only has a single integer compensation value of 4, the single integer compensation value 4 is used as the initial compensation value in absolute value form. .
[0091] The slope of each SAO category at the updated intermediate value of 4.375 When it is less than or equal to 0, the updated compensation range is [4.375, 5.25]. Since the updated compensation range [4.375, 5.25] only has a single integer compensation value of 5, the single integer compensation value 5 is used as the initial compensation value in absolute value form. .
[0092] The slope of each SAO category at the updated intermediate value of 5.25 When it is less than or equal to 0, the updated compensation range is [5.25,7]. Using the midpoint coordinate formula of the linear function, the slope of each SAO category when the first endpoint value is 7 within the updated compensation range [5.25,7] is calculated. The slope of each SAO category when the second endpoint value is 5.25 is 21 The slope of each SAO category at the updated intermediate value of 6.125 .
[0093] The slope of each SAO category at the updated intermediate value of 6.125 When it is greater than 0, the updated compensation range is [5.25, 6.125]. Since the updated compensation range [5.25, 6.125] only has a single integer compensation value of 6, the single integer compensation value 6 is used as the initial compensation value in absolute value form. .
[0094] The slope of each SAO category at the updated intermediate value of 6.125 When it is less than or equal to 0, the updated compensation range is [6.125, 7]. Since the updated compensation range [6.125, 7] only has a single integer compensation value of 7, the single integer compensation value 7 is used as the initial compensation value in absolute value form. .
[0095] Similarly, the following is an example of a specific calculation to illustrate the above step S21 in the embodiment of the present application. This step includes: S211: Obtain an initial compensation range for the SAO category, where the initial compensation range includes a first compensation interval and a second compensation interval that are symmetrically distributed, and any compensation value in the first compensation interval is smaller than any compensation value in the second compensation interval; For example, if the initial compensation range of the SAO category is [-7, 7], the first compensation interval is [-7, 0], and the second compensation interval is [0, 7].
[0096] S212: Use the second compensation interval as the compensation range of the SAO category.
[0097] For example, the second compensation interval [0, 7] is used as the compensation range of the SAO category.
[0098] As an implementation manner, in the embodiment of the present application, step S3 includes: S31, selecting the optimal compensation value under the optimal SAO category from the optimal compensation values under each SAO category; In this embodiment, the optimal compensation value in the BO mode can be selected from the optimal compensation values in each SAO category belonging to the BO mode, and the optimal compensation value in the EO mode can be selected from the optimal compensation values in each SAO category belonging to the EO mode; the optimal compensation value in the optimal SAO category can be selected from the optimal compensation values in the BO mode and the optimal compensation values in the EO mode. Specifically, the relative rate-distortion cost of each of the 32 SAO categories in the BO mode can be calculated based on the optimal compensation value under each SAO category and the relative rate-distortion cost function corresponding to each SAO category, and then the relative rate-distortion costs of four consecutive categories are accumulated, that is, the relative rate-distortion costs of BO0 to BO3, the relative rate-distortion costs of BO1 to BO4...the relative rate-distortion costs of BO28 to BO31 are accumulated respectively to obtain 29 groups of relative rate-distortion costs, and a first relative rate-distortion cost set is constructed. The optimal compensation value of a group of categories corresponding to the minimum value is selected from the first relative rate-distortion cost set as the optimal compensation value under the BO mode; the optimal compensation value under each SAO category in the EO mode can be obtained based on the optimal compensation value under the BO mode. The relative rate-distortion cost function corresponding to the value and each SAO category is used to calculate the relative rate-distortion cost of each of the 16 SAO categories in the EO mode, and the relative rate-distortion costs of the four edge categories corresponding to each gradient direction are accumulated, that is, the relative rate-distortion costs of EO0_0 to EO0_3 categories...the relative rate-distortion costs of EO3_0 to EO3_3 categories are accumulated respectively to obtain relative rate-distortion costs of four groups of categories, and a second relative rate-distortion cost set is constructed. The optimal compensation value of a group of categories corresponding to the minimum value in the second relative rate-distortion cost set is selected as the optimal compensation value in the EO mode, and the optimal compensation value with the minimum relative rate-distortion cost is selected from the optimal compensation value in the BO mode and the optimal compensation value in the EO mode as the optimal compensation value under the optimal SAO category.
[0099] S32: Compensate the reconstructed pixels based on the optimal compensation value under the optimal SAO category.
[0100] In this embodiment, based on the optimal compensation value under the optimal SAO category, the reconstructed pixels of the reconstructed pixels under the optimal SAO category in the image block of the reconstructed image are compensated, which can significantly improve the visual quality of the reconstructed image and achieve better visual effects for the video.
[0101] like Figure 8 As shown, the embodiment of the present application provides another pixel compensation method, including: S1. Obtain the slope function corresponding to each SAO category, where the slope function is obtained by deriving the relative rate-distortion cost function under the corresponding SAO category; S211: Obtain an initial compensation range for the SAO category, where the initial compensation range includes a first compensation interval and a second compensation interval that are symmetrically distributed, and any compensation value in the first compensation interval is smaller than any compensation value in the second compensation interval; S212: Use the second compensation interval as the compensation range of the SAO category; S2211: Calculate the slope of each SAO category when the first endpoint value and the second endpoint value are within the compensation range using the slope function corresponding to each SAO category, wherein the first endpoint value is greater than the second endpoint value; S2212: Calculate the slope of each SAO category at the intermediate value based on the slope of each SAO category at the first endpoint value and the second endpoint value, where the intermediate value is the average of the first endpoint value and the second endpoint value. S2213: When the slope of each SAO category is less than or equal to the second preset value at the intermediate value, update the compensation range to the intermediate value to the first endpoint value; S2214: When the slope of each SAO category is greater than the second preset value at the intermediate value, the compensation range is updated to the second endpoint value to the intermediate value; S2215: Continue calculating the slope of each SAO category at the first endpoint value and the second endpoint value within the updated compensation range using the slope function corresponding to each SAO category, until only a single compensation value exists within the updated compensation range, and use the single compensation value as the initial compensation value in absolute value form. S2221: When the SAO category belongs to the BO mode and the first statistical value is greater than or equal to the first preset value, the optimal compensation value is the initial compensation value; S2222: When the SAO category belongs to the BO mode and the first statistical value is less than the first preset value, the optimal compensation value is the opposite of the initial compensation value; S2223. When the SAO category belongs to the EO mode and the reference trend is an upward trend, the optimal compensation value is the initial compensation value; S2224: When the SAO category belongs to the EO mode and the reference trend is a downward trend, the optimal compensation value is the opposite of the initial compensation value; wherein the reference trend is the trend of a curve formed by combining an original pixel in the pixel set belonging to the SAO category and at least two reference pixels located on both sides of the original pixel, where the original pixel corresponds to the reconstructed pixel; S31, selecting the optimal compensation value under the optimal SAO category from the optimal compensation values under each SAO category; S32: Compensate the reconstructed pixels based on the optimal compensation value under the optimal SAO category.
[0102] like Figure 9 As shown, the embodiment of the present application further provides a pixel compensation device, comprising: An acquisition module 91 is configured to acquire a slope function corresponding to each SAO category, where the slope function is obtained by deriving a relative rate-distortion cost function under the corresponding SAO category. a determination module 92 for determining an optimal compensation value for each SAO category based on a slope function corresponding to each SAO category; The compensation module 93 is configured to compensate the reconstructed pixels according to the optimal compensation value under each SAO category.
[0103] like Figure 10 As shown, an embodiment of the present application further provides an electronic device, including: a processor 101, a memory 102 and a communication bus 103; The communication bus 103 is used to realize the connection and communication between the processor 101 and the memory 102; The processor 101 is configured to execute the pixel compensation processing program stored in the memory 102 to implement the steps of any of the above pixel compensation methods.
[0104] The electronic device may be an executor of the above method, such as the above pixel compensation device. The pixel compensation device may be, for example, a chip, such as a chip including a VPU, or a device including a chip.
[0105] The present application also provides a readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, the steps of any of the above-mentioned pixel compensation methods are implemented.
[0106] The present application also provides a computer program product, comprising computer-executable instructions, which, when loaded and executed by a processor, implement the steps of any of the above-mentioned pixel compensation methods.
[0107] It should be understood that the use of "system," "device," "unit," and / or "module" in this application is merely a method for distinguishing different components, elements, parts, portions, or assemblies at different levels. However, if other terms can achieve the same purpose, the terms may be replaced by other expressions.
[0108] The embodiments in this specification are described in a progressive manner, and each embodiment focuses on the following For other differences between the embodiments, reference may be made to the same or similar parts between the embodiments.
[0109] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A pixel compensation method, characterized in that: include: Obtaining a slope function corresponding to each SAO category, where the slope function is obtained by deriving a relative rate-distortion cost function corresponding to the SAO category; determining an optimal compensation value for each of the SAO categories according to the slope function corresponding to each of the SAO categories; The reconstructed pixels are compensated according to the optimal compensation values under each of the SAO categories.
2. The method according to claim 1, characterized in that The determining, according to the slope function corresponding to each of the SAO categories, an optimal compensation value under each of the SAO categories, includes: Obtaining a compensation range for the SAO category; Based on the slope function corresponding to each of the SAO categories, the compensation range is approximated successively to obtain the optimal compensation value under each of the SAO categories.
3. The method according to claim 2, characterized in that The step of successively approximating the compensation range based on the slope function corresponding to each of the SAO categories to obtain an optimal compensation value under each of the SAO categories includes: Based on the slope function corresponding to each of the SAO categories, the compensation range is successively approximated to obtain an initial compensation value in the form of an absolute value under each of the SAO categories; According to each of the SAO categories, an optimal compensation value under each of the SAO categories is determined based on an initial compensation value under each of the SAO categories.
4. The method according to claim 3, characterized in that The determining, according to each of the SAO categories, the optimal compensation value for each of the SAO categories based on the initial compensation value for each of the SAO categories, includes: When the SAO category belongs to the BO mode and the first statistical value is greater than or equal to a first preset value, the optimal compensation value is the initial compensation value; When the SAO category belongs to the BO mode and the first statistical value is less than a first preset value, the optimal compensation value is the opposite of the initial compensation value; The first statistical value is the sum of the differences between each reconstructed pixel and each corresponding original pixel under the SAO category.
5. The method according to claim 3, characterized in that Determining the optimal compensation value for each of the SAO categories based on the initial compensation value for each of the SAO categories includes: When the SAO category belongs to the EO mode and the reference trend is an upward trend, the optimal compensation value is the initial compensation value; When the SAO category belongs to the EO mode and the reference trend is a downward trend, the optimal compensation value is the opposite of the initial compensation value; The reference trend is a trend of a curve formed by combining an original pixel in a pixel set belonging to the SAO category and at least two reference pixels located on both sides of the original pixel, and the original pixel corresponds to the reconstructed pixel.
6. The method according to claim 3, characterized in that The step of successively approximating the compensation range based on the slope function corresponding to each of the SAO categories to obtain an initial compensation value in absolute value form under each of the SAO categories includes: Calculating, by using a slope function corresponding to each of the SAO categories, a slope of each of the SAO categories when a first endpoint value and a second endpoint value are within a compensation range, wherein the first endpoint value is greater than the second endpoint value; Calculating the slope of each SAO category at an intermediate value according to the slope of each SAO category at the first endpoint value and the second endpoint value, wherein the intermediate value is the average of the first endpoint value and the second endpoint value; When the slope of each of the SAO categories is less than or equal to a second preset value at an intermediate value, updating the compensation range to a value from the intermediate value to the first endpoint value; When the slope of each of the SAO categories is greater than a second preset value at an intermediate value, updating the compensation range to a value from the second endpoint value to the intermediate value; The slope function corresponding to each of the SAO categories is used to continuously calculate the slope of each of the SAO categories at the first endpoint value and the second endpoint value within the updated compensation range, until only a single compensation value exists in the updated compensation range, and the single compensation value is used as the initial compensation value in the form of an absolute value.
7. The method according to claim 2, characterized in that The obtaining of the compensation range of the SAO category includes: Obtaining an initial compensation range for the SAO category, where the initial compensation range includes a first compensation interval and a second compensation interval that are symmetrically distributed, and any compensation value in the first compensation interval is smaller than any compensation value in the second compensation interval; The second compensation interval is used as a compensation range of the SAO category.
8. The method according to claim 1, characterized in that The compensating the reconstructed pixels according to the optimal compensation values under each of the SAO categories includes: Selecting an optimal compensation value under an optimal SAO category from the optimal compensation values under each of the SAO categories; The reconstructed pixels are compensated based on the optimal compensation value under the optimal SAO category.
9. An electronic device, characterized in that: include: processor, memory, and communication bus; The communication bus is used to realize the connection and communication between the processor and the memory; The processor is configured to execute the pixel compensation processing program stored in the memory to implement the steps of the pixel compensation method according to any one of claims 1 to 8.
10. A readable storage medium, characterized in that: The readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the steps of the pixel compensation method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Wyner-Ziv frame quantification method based on rate distortion
CN102724495A
Simplified SAO optimal compensation value calculation method and device based on HEVC
CN109963160A
Image processing method and device, storage medium and electronic device
CN110430430A
SAR moving target imaging method based on improved minimum entropy algorithm
CN114002676A
Method and apparatus for inter-picture cost computation
US20150139322A1