Sub-pixel interpolation method and device
By selecting different sub-pixel interpolation methods based on the number of pixels, the problem of excessive calculation cost in the prior art is solved, and the real-time nature of the encoder and the encoding compression rate are balanced.
Patent Information
- Application Number
- CN202210032256.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-01-12
AI Technical Summary
In the existing video encoding technology, the calculation cost of sub-pixel interpolation process is too high to ensure the real-time performance of the encoder.
According to the number of pixels in the block to be interpolated, different interpolation methods are used to perform subpixel interpolation, including hevc interpolation, hevc interpolation based on offset value and dynamic range of interpolation result, and hevc interpolation based on addition and subtraction operations and shift operations. A suitable interpolation method is selected for different situations to control losses.
Effectively control the encoding compression rate loss, ensure the real-timeness of the encoder, and significantly reduce the encoding time of sub-pixel interpolation, and avoid the calculation burden caused by multiplication and division operations.
Smart Images

Figure CN114390279B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of coding and decoding technology, and more particularly to a sub-pixel interpolation method and device. Background Art
[0002] During video encoding, a pre-defined encoding mode must be adaptively selected based on the video content. For sub-pixel search within this mode, at least one sub-pixel interpolation step is required for each possible search point. Related technologies typically employ the interpolation scheme specified in the HEVC standard, but this can be computationally expensive and cannot guarantee real-time encoder operation. Summary of the Invention
[0003] The present disclosure provides a sub-pixel interpolation method and apparatus to at least solve the above-mentioned problems in the related art, but may not solve any of the above-mentioned problems.
[0004] According to a first aspect of an embodiment of the present disclosure, a sub-pixel interpolation method is provided, comprising: obtaining the number of pixels contained in a block to be interpolated; determining an interpolation method corresponding to the block to be interpolated based on the number of pixels, wherein the number of pixels is positively correlated with the loss of the corresponding interpolation method; and interpolating each pixel of the block to be interpolated using the determined interpolation method.
[0005] Optionally, determining the interpolation method corresponding to the block to be interpolated based on the number of pixels includes: if the number of pixels is less than a first preset value, determining that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method; if the number of pixels is greater than or equal to the first preset value and less than a second preset value, determining that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range; if the number of pixels is greater than or equal to the second preset value, determining that the interpolation method corresponding to the block to be interpolated is a preset interpolation method, wherein the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations, and the first preset value is less than the second preset value.
[0006] Optionally, when it is determined that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range, the interpolation processing on each pixel of the block to be interpolated using the determined interpolation method includes: interpolating each pixel using the HEVC inter-frame sub-pixel interpolation method to obtain a first type of sub-pixel corresponding to each pixel; and interpolating each pixel using the HEVC inter-frame sub-pixel interpolation method based on the first type of sub-pixel corresponding to at least one pixel of the block to be interpolated, the preset offset value, and the preset interpolation result dynamic range to obtain a second type of sub-pixel corresponding to each pixel.
[0007] Optionally, the preset interpolation method includes a first preset interpolation method for a first type of sub-pixel and a second preset interpolation method for a second type of sub-pixel; when it is determined that the interpolation method corresponding to the block to be interpolated is the preset interpolation method, the interpolation processing is performed on each pixel of the block to be interpolated using the determined interpolation method, including: for any pixel of the block to be interpolated, interpolating the any pixel using the first preset interpolation method to obtain the first type of sub-pixel corresponding to the any pixel; interpolating the any pixel using the second preset interpolation method to obtain the second type of sub-pixel corresponding to the any pixel.
[0008] Optionally, the interpolation processing is performed on the any pixel by the first preset interpolation method to obtain the first type of sub-pixel corresponding to the any pixel, including: based on the any pixel and the next pixel in the same column as the any pixel, the interpolation processing is performed on the any pixel by the first preset interpolation method to obtain the first type of sub-pixel corresponding to the any pixel.
[0009] Optionally, the interpolation processing is performed on the any pixel using the second preset interpolation method to obtain the second type of sub-pixel corresponding to the any pixel, including: based on the any pixel, the next pixel in the same row as the any pixel, the next pixel in the same column as the any pixel, and at least one pixel in the next column and next row of the any pixel, the any pixel is interpolated using the second preset interpolation method to obtain at least one intermediate value; based on the at least one intermediate value, the any pixel is interpolated using the second preset interpolation method to obtain the second type of sub-pixel corresponding to the any pixel.
[0010] According to a second aspect of an embodiment of the present disclosure, a sub-pixel interpolation device is provided, comprising: a number acquisition unit, configured to: acquire the number of pixels contained in a block to be interpolated; a method determination unit, configured to: determine an interpolation method corresponding to the block to be interpolated based on the number of pixels, wherein the number of pixels is positively correlated with the loss of the corresponding interpolation method; and an interpolation processing unit, configured to: perform interpolation processing on each pixel of the block to be interpolated using the determined interpolation method.
[0011] Optionally, the method determination unit is configured to: if the number of pixels is less than a first preset value, determine that the interpolation method corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation method; if the number of pixels is greater than or equal to the first preset value and less than a second preset value, determine that the interpolation method corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range; if the number of pixels is greater than or equal to the second preset value, determine that the interpolation method corresponding to the block to be interpolated is the preset interpolation method, wherein the preset interpolation method is the HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations, and the first preset value is less than the second preset value.
[0012] Optionally, when the interpolation method corresponding to the block to be interpolated is determined by the method determination unit to be a HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range, the interpolation processing unit is configured to: perform interpolation processing on each pixel by using the HEVC inter-frame sub-pixel interpolation method to obtain a first type of sub-pixel corresponding to each pixel; and perform interpolation processing on each pixel by using the HEVC inter-frame sub-pixel interpolation method according to the first type of sub-pixel corresponding to at least one pixel of the block to be interpolated, the preset offset value and the preset interpolation result dynamic range, to obtain a second type of sub-pixel corresponding to each pixel.
[0013] Optionally, the preset interpolation method includes a first preset interpolation method for a first type of sub-pixel and a second preset interpolation method for a second type of sub-pixel; when the method determination unit determines that the interpolation method corresponding to the block to be interpolated is the preset interpolation method, the interpolation processing unit is configured to: for any pixel of the block to be interpolated, perform interpolation processing on the any pixel through the first preset interpolation method to obtain the first type of sub-pixel corresponding to the any pixel; perform interpolation processing on the any pixel through the second preset interpolation method to obtain the second type of sub-pixel corresponding to the any pixel.
[0014] Optionally, the interpolation processing unit is configured to: perform interpolation processing on the any pixel and the next pixel in the same column as the any pixel using the first preset interpolation method to obtain the first type of sub-pixel corresponding to the any pixel.
[0015] Optionally, the interpolation processing unit is configured to: perform interpolation processing on the any pixel by the second preset interpolation method based on the any pixel, the next pixel in the same row as the any pixel, the next pixel in the same column as the any pixel, and at least one pixel in the next column and next row of the any pixel to obtain at least one intermediate value; perform interpolation processing on the any pixel by the second preset interpolation method based on the at least one intermediate value to obtain a second type of sub-pixel corresponding to the any pixel.
[0016] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: at least one processor; and at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, prompt the at least one processor to execute the sub-pixel interpolation method according to the present disclosure.
[0017] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to execute the sub-pixel interpolation method according to the present disclosure.
[0018] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer instructions, which implement the sub-pixel interpolation method according to the present disclosure when executed by at least one processor.
[0019] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0020] According to the sub-pixel interpolation method and device disclosed herein, different interpolation methods are used to perform sub-pixel interpolation on blocks with different numbers of pixels, and the number of pixels is positively correlated with the loss of the corresponding interpolation method. For blocks with a small number of pixels that are difficult to encode and have a small number of pixels, a method with low loss is used, while for blocks with a large number of pixels that are easy to encode and have a large number of pixels, the opposite is used. This can effectively control the loss, thereby ensuring the real-time operation of the encoder and ensuring that the encoding compression rate loss meets the encoding requirements.
[0021] In addition, according to the sub-pixel interpolation method and device disclosed herein, setting a preset interpolation method that does not include multiplication and division operations can significantly reduce the encoding time of sub-pixel interpolation. When using the preset interpolation method, the original maximum of 72 multiplications and 63 additions and subtractions are reduced to a maximum of 8 shifts and 12 additions (for 3 / 4 rows and 3 / 4 columns of pixels), which makes the computational cost extremely low and avoids multiplication and division operations, which can make special optimizations for SIMD optimization.
[0022] In addition, according to the sub-pixel interpolation method and device disclosed in the present invention, the preset interpolation method and the HEVC inter-frame sub-pixel interpolation method are monotonically consistent, except that the HEVC inter-frame sub-pixel interpolation method has higher precision and the preset interpolation method has lower precision, so that there is no obvious conflict between the frequency response of the preset interpolation method and the HEVC inter-frame sub-pixel interpolation method.
[0023] In addition, according to the sub-pixel interpolation method and device disclosed herein, the relevant formulas of the preset interpolation method are calculated by rounding off, which will not cause the interpolated pixels to be excessively large or small.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0026] Figure 1 is a schematic diagram illustrating a pixel according to an exemplary embodiment of the present disclosure.
[0027] Figure 2 is a flowchart illustrating a sub-pixel interpolation method according to an exemplary embodiment of the present disclosure.
[0028] Figure 3 is a block diagram illustrating a sub-pixel interpolation apparatus according to an exemplary embodiment of the present disclosure.
[0029] Figure 4 is a block diagram illustrating an electronic device 400 according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0031] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0032] It should be noted that the phrase "at least one of the items" in this disclosure includes three types of parallel situations: "any one of the items", "a combination of any multiple items of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. For another example, "performing at least one of step 1 and step 2" includes the following three parallel situations: (1) performing step 1; (2) performing step 2; and (3) performing steps 1 and 2.
[0033] When encoding a video, it is necessary to adaptively select a predetermined encoding mode based on the video content. In the mode selection of video encoding, a lot of time is required for sub-pixel search in motion search. In the sub-pixel search, for each possible search point, at least one sub-pixel interpolation is required, and one of the sub-pixels obtained by each pixel interpolation is selected for subsequent encoding. Therefore, in order to be able to select the encoding mode as quickly as possible, it is necessary to limit the time consumption of sub-pixel interpolation. It should be noted here that pixels can be interpolated to obtain sub-pixels, and this process can be referred to as sub-pixel interpolation in the exemplary embodiments of the present disclosure.
[0034] Figure 1 is a schematic diagram illustrating a pixel according to an exemplary embodiment of the present disclosure, with reference to Figure 1 , A -1,-1 、A -1,0 、A -1,1 、A -1,2 、A 0,-1 、A 0,0 、A 0,1 、A 0,2 、A 1,-1 、A 1,0 、A 1,1 、A 1,2 、A 2,-1 、A 2,0 、A 2,1 and A 2,2 are all pixels, that is, integer pixels, a0,0 、b 0,0 、c 0,0 d 0,0 、e 0,0 、f 0,0 、g 0,0 、h 0,0 、i 0,0 、j 0,0 、k 0,0 、n 0,0 、p 0,0 ,q 0,0 、r 0,0 、a 0,-1 、b 0,-1 、c 0,-1 d 2,0 、h 2,0 、n 2,0 、a 0,2 、b 0,2 、c 0,2 d -1,0 、h -1,0 、n -1,0 d 1,0 、h 1,0 、n 1,0 、a 0,1 、b 0,1 and c 0,1 All are sub-pixel.
[0035] In related technologies, the interpolation scheme specified by the HEVC standard, namely the HEVC inter-frame sub-pixel interpolation method, is generally adopted. For the HEVC inter-frame sub-pixel interpolation method, sub-pixel interpolation can be performed on the pixels in the interpolation block based on the binary representation of at least one pixel in the interpolation block according to the following formula:
[0036] a 0,0 =(-A -3,0 +4*A -2,0 -10*A -1,0 +58*A 0,0 +17*A 1,0 -5*A 2,0 +A 3,0 )>>shift1
[0037] b 0,0 =(-A -3,0 +4*A -2,0 -11*A -1,0 +40*A 0,0 +40*A 1,0 -11*A 2,0 +4*A 3,0 -A 4,0 )>>shift1
[0038] c 0,0 =(A -2,0 -5*A -1,0 +17*A 0,0 +58*A 1,0 -10*A 2,0 +4*A 3,0 -A 4,0 )>>shift1
[0039] d 0,0 =(-A 0,-3 +4*A 0,-2 -10*A 0,-1 +58*A 0,0 +17*A 0,1 -5*A 0,2 +A 0,3 )>>shift1
[0040] h 0,0 =(-A 0,-3 +4*A 0,-2 -11*A 0,-1 +40*A 0,0 +40*A 0,1 -11*A 0,2 +4*A 0,3 -A 0,4 )>>shift1
[0041] n 0,0 =(A 0,-2 -5*A 0,-1 +17*A 0,0 +58*A 0,1 -10*A 0,2 +4*A 0,3 -A 0,4 )>>shift1
[0042] c 0,0 =(-a 0,-3 +4*a 0,-2 -10*a 0,-1 +58*a 0,0 +17*a 0,1 -5*a 0,2 +a 0,3 )>>shift2
[0043] i 0,0 =(-a 0,-3 +4*a 0,-2 -11*a 0,-1 +40*a 0,0 +40*a 0,1 -11*a 0,2 +4*a0,3 -a 0,4 )>>shift2
[0044] p 0,0 =(a 0,-2 -5*a 0,-1 +17*a 0,0 +58*a 0,1 -10*a 0,2 +4*a 0,3 -a 0,4 )>>shift2
[0045] f 0,0 =(-b 0,-3 +4*b 0,-2 -10*b 0,-1 +58*b 0,0 +17*b 0,1 -5*b 0,2 +b 0,3 )>>shift2
[0046] j 0,0 =(-b 0,-3 +4*b 0,-2 -11*b 0,-1 +40*b 0,0 +40*b 0,1 -11*b 0,2 +4*b 0,3 -b 0,4 )>>shift2
[0047] q 0,0 =(b 0,-2 -5*b 0,-1 +17*b 0,0 +58*b 0,1 -10*b 0,2 +4*b 0,3 -b 0,4 )>>shift2
[0048] g 0,0 =(-c 0,-3 +4*c 0,-2 -10*c 0,-1 +58*c 0,0 +17*c 0,1 -5*c 0,2 +c 0,3 )>>shift2
[0049] k 0,0 =(-c 0,-3 +4*c 0,-2 -11*c 0,-1 +40*c0,0 +40*c 0,1 -11*c 0,2 +4*c 0,3 -c 0,4 )>>shift2
[0050] r 0,0 =(c 0,-2 -5*c 0,-1 +17*c 0,0 +58*c 0,1 -10*c 0,2 +4*c 0,3 -c 0,4 )>>shift2
[0051] The above formula is for A 0,0 Perform sub-pixel interpolation. This disclosure only uses A 0,0 This example uses subpixel interpolation for , and the same method can be used for subpixel interpolation of other pixels. In the above formula, lowercase letters with subscripts represent the binary representation of subpixels, uppercase letters with subscripts represent the binary representation of pixels, >>shift1 represents a right shift of 1 position, and >>shift2 represents a right shift of 2 positions. It should be noted that this example uses binary representation only; decimal representation can also be used.
[0052] In addition, for a 0,0 、b 0,0 、c 0,0 d 0,0 、h 0,0 and n 0,0 , is and A 0,0 Subpixels in the same row or column can be obtained by a single interpolation (i.e., they can be directly obtained through pixel calculation in the above formula). In the case of 8-bit (pixel depth 8) YUV420P encoding, the value of shift1 can be 6. The dynamic range of the interpolation result can be 8 bits.
[0053] In addition, for e 0,0 、f 0,0 、g 0,0 、i 0,0 、j 0,0 、k 0,0 、p 0,0 ,q 0,0 、r 0,0 , not with A 0,0Subpixels in the same row or column can be obtained by two interpolations (i.e., they cannot be obtained directly from the pixel calculation in the above formula; at least one subpixel must be interpolated before the calculation). When encoding an 8-bit (pixel depth of 8) YUV420P image, the value of shift1 can be 0 and the value of shift2 can be 12.
[0054] In addition, for the sub-pixel obtained by two interpolations in the hevc inter-frame sub-pixel interpolation method, the second interpolation needs to be based on b 0,0 Calculate as an example, b 0,0 The interpolation result has the largest dynamic range. Consider the two most extreme cases. For the first case: if b 0,0 In the calculation formula, all pixels after addition (i.e., pixels with +) are the maximum value 255, and all pixels after subtraction (i.e., pixels with -) are the minimum value 0, so b 0,0 The maximum value of is 255*88=22440, which can be represented by 15 bits. For the second case: If b 0,0 In the calculation formula, all pixels after addition (i.e., pixels with +) are the minimum value 0, and all pixels after subtraction (i.e., pixels with -) are the maximum value 255, so b 0,0 The minimum value is -255*24=-6120, which can be represented by 15 bits. Based on this, we can know that the dynamic range of the first interpolation result is 15 bits. For the dynamic range of the second interpolation result, using the same derivation method as above, we can know that the dynamic range of the second interpolation result is 9 bits.
[0055] In addition, the sub-pixels obtained by the two interpolations can be post-processed after the second interpolation. The specific operation is to compress the obtained sub-pixels represented in binary into 8 bits.
[0056] Furthermore, the HEVC inter-frame sub-pixel interpolation method described above allows for up to 15 sub-pixels to be calculated for each pixel, based on the desired interpolation location, and one of these sub-pixels can be selected for subsequent encoding. This selection is based on existing encoder sub-pixel search methods. Next, an interpolated image is obtained based on the selected sub-pixels, which is then added to the residual image to produce the reconstructed image.
[0057] The HEVC inter-frame sub-pixel interpolation method in the related art has a relatively high result accuracy and a relatively high compression rate of the final encoding result. However, for a 1080p image, 2 million sub-pixels may need to be interpolated. In order to obtain a sub-pixel interpolation result, at most 72 multiplications and 63 additions and subtractions may be required (for j 0,0Each calculation of b with a subscript requires 8 multiplications and 7 additions and subtractions to calculate j 0,0 It also needs to perform 8 multiplications and 7 additions and subtractions), which makes the calculation cost very high and cannot guarantee the real-time performance of the encoder.
[0058] In order to solve the problems existing in the above-mentioned related technologies, the present disclosure proposes a sub-pixel interpolation method and device, which specifically adopt different interpolation methods to perform sub-pixel interpolation on blocks to be interpolated with different numbers of pixels, and the number of pixels is positively correlated with the loss of the corresponding interpolation method. For blocks to be interpolated with a small number of pixels that are difficult to encode, a method with low loss is used, and the opposite is true for blocks to be interpolated with a large number of pixels that are easy to encode. In this way, the loss can be effectively controlled. In this way, the real-time operation of the encoder can be guaranteed, and the coding compression rate loss can meet the coding requirements.
[0059] Below, we will refer to Figures 2 to 4 The sub-pixel interpolation method and apparatus according to the present disclosure are described in detail. Figure 2 is a flowchart illustrating a sub-pixel interpolation method according to an exemplary embodiment of the present disclosure. Figure 2 In step 201, the number of pixels contained in the block to be interpolated may be obtained.
[0060] Here, the block to be interpolated may be an image containing a certain number of pixels.
[0061] An exemplary embodiment of the present disclosure may select a corresponding interpolation method based on the number of pixels contained in the block to be interpolated. Specifically, in step 202, the interpolation method corresponding to the block to be interpolated may be determined based on the number of pixels, wherein the number of pixels is positively correlated with the loss of the corresponding interpolation method.
[0062] According to an exemplary embodiment of the present disclosure, when the number of pixels is large, an interpolation method with a larger loss may be selected, and when the number of pixels is small, an interpolation method with a smaller loss may be selected. Here, the loss may be the loss of encoding compression rate of video encoding after sub-pixel interpolation, that is, when the number of pixels is large, a certain loss of compression rate is selected to speed up the interpolation process, and vice versa when the number of pixels is small.
[0063] Considering that the interpolation method is relatively complex in actual application based on the change in the number of pixels, this is because the number of pixels in each block to be interpolated may be different. Based on this, the exemplary embodiment of the present disclosure can divide the number of pixels into different numerical intervals according to at least one preset value. In this way, in actual application, a corresponding interpolation method can be set for each numerical interval, and subsequent sub-pixel interpolation can be performed.
[0064] For example, an exemplary embodiment of the present disclosure may be provided with a first preset value and a second preset value. In this way, three situations are distinguished. The first situation is that the number of pixels is less than the first preset value, the second situation is that the number of pixels is greater than or equal to the first preset value and less than the second preset value, and the third situation is that the number of pixels is greater than or equal to the second preset value. It should be noted here that the first preset value is less than the second preset value.
[0065] For the first case, it can be determined that the interpolation mode corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation mode.
[0066] For the second case, it can be determined that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method based on a preset offset value (shift value) and a preset interpolation result dynamic range.
[0067] For the third case, it can be determined that the interpolation method corresponding to the block to be interpolated is a preset interpolation method, wherein the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations. It should be noted that the preset interpolation method may not include multiplication and division operations.
[0068] According to the exemplary embodiments of the present disclosure, it can be seen from the above description that the result obtained by the HEVC inter-frame sub-pixel interpolation method is relatively high in accuracy, and the loss of the HEVC inter-frame sub-pixel interpolation method is relatively small; and the HEVC inter-frame sub-pixel interpolation method can reduce the amount of calculation by controlling the offset value and the dynamic range of the interpolation result, thereby accelerating the interpolation, so it can be seen that the loss of the HEVC inter-frame sub-pixel interpolation method based on the preset offset value and the preset interpolation result dynamic range is greater than the loss of directly performing the HEVC inter-frame sub-pixel interpolation method; and the multiplication and division operations in the HEVC inter-frame sub-pixel interpolation method will bring a very large amount of calculation, and the preset interpolation method does not include multiplication and division operations, so the preset interpolation method has a greater loss than the first two interpolation methods.
[0069] According to the sub-pixel interpolation method disclosed herein, the number of pixels is divided into three cases by a first preset value and a second preset value, and then the interpolation methods corresponding to the three cases are determined in a targeted manner. For interpolation blocks with a small number of pixels that are difficult to encode, a low-loss interpolation method can be used, while for interpolation blocks with a large number of pixels that are easy to encode, the opposite method is used, thereby effectively controlling the loss.
[0070] For another example, an exemplary embodiment of the present disclosure may also set three numerical intervals based on two preset values, including a first interval, a second interval, and a third interval, wherein the two preset values may be 64 and 256, and the three numerical intervals may be: the first interval is [16, 64); the second interval is [64, 256); and the third interval is [256, 4096].
[0071] When the number of pixels falls within the first interval, it can be determined that the interpolation method corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation method.
[0072] When the number of pixels falls within the second interval, it can be determined that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range.
[0073] When the number of pixels falls within the third interval, it can be determined that the interpolation method corresponding to the block to be interpolated is a preset interpolation method, wherein the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations.
[0074] Next, after the corresponding interpolation method is determined, in step 203, an interpolation process may be performed on each pixel of the block to be interpolated using the determined interpolation method.
[0075] In the above description, for the first case or when the number of pixels falls within the first interval, it can be determined that the interpolation mode corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation mode.
[0076] Here, the 15 formulas corresponding to the HEVC inter-frame sub-pixel interpolation method described above can be used to perform sub-pixel interpolation, which will not be repeated here.
[0077] For the second case or when the number of pixels falls within the second interval, it can be determined that the interpolation method corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range.
[0078] From the above description, we can know that for any pixel of the block to be interpolated, two types of sub-pixels can be obtained by interpolation. Figure 1 , a 0,0 、b 0,0 、c 0,0 d 0,0 、h 0,0 and n 0,0 It can be obtained by one-time interpolation. In the exemplary embodiment of the present disclosure, this type of sub-pixel may be referred to as a first type of sub-pixel. 0,0 、f 0,0 、g 0,0 、i 0,0 、j 0,0 、k 0,0 、p 0,0 ,q 0,0 、r 0,0This sub-pixel can be obtained by two interpolations. In exemplary embodiments of the present disclosure, this type of sub-pixel may be referred to as a second-type sub-pixel. Based on existing technologies, for the first-type sub-pixel, the dynamic range of the interpolation result using the HEVC inter-frame sub-pixel interpolation method can be 8 bits. For the second-type sub-pixel, the dynamic range of the interpolation result using the HEVC inter-frame sub-pixel interpolation method can include a first interpolation result dynamic range of 15 bits and a second interpolation result dynamic range of 9 bits.
[0079] In this case, each pixel can be interpolated using the HEVC inter-frame sub-pixel interpolation method to obtain the first type of sub-pixel corresponding to each pixel.
[0080] Here, each pixel can be directly interpolated using the HEVC inter-frame sub-pixel interpolation method described above to obtain the first type of sub-pixel corresponding to each pixel, which will not be described in detail here.
[0081] Then, according to the first type of sub-pixel corresponding to at least one pixel of the block to be interpolated, the preset offset value and the preset interpolation result dynamic range, each pixel can be interpolated by the HEVC inter-frame sub-pixel interpolation method to obtain the second type of sub-pixel corresponding to each pixel.
[0082] Here, the above-described HEVC inter-frame sub-pixel interpolation method can be used to first interpolate the specific position of the second type of sub-pixel obtained by pre-interpolation (such as Figure 1 e in 0,0 、f 0,0 、g 0,0 、i 0,0 、j 0,0 、k 0,0 、p 0,0 ,q 0,0 、r 0,0 any second-class sub-pixel in the sub-pixel interpolation), determine the first-class sub-pixel required for the sub-pixel interpolation (such as e 0,0 The first type of sub-pixels required for interpolation include a 0,-3 etc.), and then, based on the first type of sub-pixels required for the sub-pixel interpolation, the HEVC inter-frame sub-pixel interpolation method is used to perform interpolation processing based on the preset offset value and the preset interpolation result dynamic range to obtain the corresponding pre-interpolated second type of sub-pixels.
[0083] It should be noted that the preset offset value includes the preset first interpolation offset value (shift1 value) and the preset second interpolation offset value (shift2 value). The preset interpolation result dynamic range includes the preset first interpolation result dynamic range and the preset second interpolation result dynamic range.
[0084] For example, the preset shift1 value and the preset shift2 value may both be 6. The preset dynamic range of the first interpolation result and the preset dynamic range of the second interpolation result may both be 8 bits.
[0085] The sub-pixel interpolation method disclosed herein can interpolate the second type of sub-pixels based on a preset offset value and a preset interpolation result dynamic range, thereby reducing the amount of interpolation computation required. The preset shift1 value and the preset shift2 value are both set to 6, and the preset first interpolation result dynamic range and the preset second interpolation result dynamic range are both set to 8 bits. This reduces the computational complexity compared to existing shift values and interpolation result dynamic ranges.
[0086] Here, the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations, which may mean that the preset interpolation method simulates the HEVC inter-frame sub-pixel interpolation method, but only includes addition, subtraction and shift operations.
[0087] As can be seen from the above description, for any pixel in the block to be interpolated, two types of sub-pixels can be obtained through interpolation, namely, first-type sub-pixels and second-type sub-pixels. The preset interpolation method in the exemplary embodiment of the present disclosure can be provided for these two types of sub-pixels, with a first preset interpolation method for the first-type sub-pixels and a second preset interpolation method for the second-type sub-pixels, respectively. Therefore, for any pixel in the block to be interpolated, the first preset interpolation method can be first used to interpolate the pixel to obtain the first-type sub-pixel corresponding to the pixel. Then, the second preset interpolation method can be used to interpolate the pixel to obtain the second-type sub-pixel corresponding to the pixel. The preset interpolation method in the sub-pixel interpolation method of the present disclosure can be provided with interpolation methods corresponding to the two types of sub-pixels to obtain the two types of sub-pixels, so that the preset interpolation method and the HEVC inter-frame sub-pixel interpolation method are monotonically consistent, and there is no obvious conflict between the frequency response of the preset interpolation method and the HEVC inter-frame sub-pixel interpolation method.
[0088] Regarding the process of obtaining the first type of sub-pixel using the first preset interpolation method, any pixel and the next pixel in the same column as any pixel can be interpolated using the first preset interpolation method to obtain the first type of sub-pixel corresponding to any pixel.
[0089] For the convenience of subsequent description, any pixel may be referred to as the first pixel, the next pixel in the same row as any pixel may be referred to as the second pixel, the next pixel in the same column as any pixel may be referred to as the third pixel, and the pixel in the next column and next row of any pixel may be referred to as the fourth pixel. Figure 1 , the first pixel is A 0,0 In the case of1,0 , the third pixel can be A 0,1 , the fourth pixel can be A 1,1 .
[0090] Here, a binary representation of the first pixel and a binary representation of the third pixel may be first obtained. Then, based on the binary representation of the first pixel and the binary representation of the third pixel, the first pixel may be interpolated using a first preset interpolation method to obtain a first type of sub-pixel corresponding to the first pixel.
[0091] It should be noted that the first type of sub-pixels obtained after one interpolation may include 1 / 4 pixels, 2 / 4 pixels, and 3 / 4 pixels, wherein the 1 / 4 pixels are the 1 / 4 pixels in the same row or column as the first pixel, the 2 / 4 pixels are the 2 / 4 pixels in the same row or column as the first pixel, and the 3 / 4 pixels are the 3 / 4 pixels in the same row or column as the first pixel. Figure 1 , the first pixel is A 0,0 In this case, 1 / 4 pixel can be a 0,0 and d 0,0 , and the first pixel A 0,0 1 / 4 pixel in the same row is a 0,0 , and the first pixel A 0,0 The 1 / 4 pixel in the same column is d 0,0 . 2 / 4 pixels can be b 0,0 and h 0,0 , the 2 / 4 pixel in the same row as the first pixel is b 0,0 , the 2 / 4 pixels in the same column as the first pixel are h 0,0 . 3 / 4 pixels can be c 0,0 and n 0,0 , the 3 / 4 pixel in the same row as the first pixel is c 0,0 , the 3 / 4 pixels in the same column as the first pixel are n 0,0 .
[0092] For example, reference Figure 1 , the first pixel is A 0,0 In the case of, A can be calculated based on the binary representation of the first pixel and the binary representation of the third pixel by the following equations (1)-(3): 0,0 Perform interpolation to obtain A 0,0 The corresponding first type of sub-pixel:
[0093] p1=(A 00 +((A 00 +A 01 +2)>>1))>>1;; (1)
[0094] p2=(A 00 +A 01+1)>>1; (2)
[0095] p3=(A 01 +((A 00 +A 01 +2)>>1))>>1; (3)
[0096] Among them, p1 is the binary representation of 1 / 4 pixel, p2 is the binary representation of 2 / 4 pixel, p3 is the binary representation of 3 / 4 pixel, A 00 is the binary representation of the first pixel, A 01 is the binary representation of the third pixel, and "" means shifting to the right. p1 is the binary representation of 1 / 4 pixel, which is a 0,0 or d 0,0 The binary representation of p2 is 2 / 4 pixel, which is b 0,0 or h 0,0 The binary representation of p3 is 3 / 4 pixel, which is c 0,0 or n 0,0 The dynamic range of the interpolation result of the first preset interpolation method is 8 bits.
[0097] According to the sub-pixel interpolation method disclosed herein, any pixel can be interpolated using a first preset interpolation method to obtain a first type of sub-pixel corresponding to any pixel. Multiplication and division operations can be avoided during the interpolation process to ensure the real-time operation of the encoder.
[0098] In the process of obtaining the second type of sub-pixel using the second preset interpolation method, at least one intermediate value may be obtained by performing interpolation processing on any pixel using the second preset interpolation method based on at least one pixel selected from the group consisting of the next pixel in the same row as the pixel, the next pixel in the same column as the pixel, and the next pixel in the next column and next row. Then, based on the at least one intermediate value, the second type of sub-pixel corresponding to the pixel may be obtained by performing interpolation processing on the pixel using the second preset interpolation method.
[0099] Furthermore, the above process can be described as follows: first, interpolation processing can be performed on the first pixel using a second preset interpolation method based on at least one of the first pixel, the second pixel, the third pixel, and the fourth pixel to obtain at least one intermediate value. Then, interpolation processing can be performed on the first pixel using the second preset interpolation method based on the at least one intermediate value to obtain a sub-pixel of the second type corresponding to the first pixel.
[0100] Here, first, a binary representation of at least one of the binary representations of a first pixel, a second pixel, a third pixel, and a fourth pixel can be obtained. Then, based on the binary representation of the at least one pixel, the first pixel can be interpolated using a second preset interpolation method to obtain at least one intermediate value. Finally, based on the at least one intermediate value, the first pixel can be interpolated using the second preset interpolation method to obtain a sub-pixel of the second type corresponding to the first pixel.
[0101] It should be noted here that the second type of sub-pixels obtained after two interpolations may include row 1 / 4 column 1 / 4 pixel, row 1 / 4 column 2 / 4 pixel, row 1 / 4 column 3 / 4 pixel, row 2 / 4 column 1 / 4 pixel, row 2 / 4 column 2 / 4 pixel, row 2 / 4 column 3 / 4 pixel, row 3 / 4 column 1 / 4 pixel, row 3 / 4 column 2 / 4 pixel, and row 3 / 4 column 3 / 4 pixel. For example, referring to Figure 1 , the first pixel is A 0,0 In the case of , the row 1 / 4 column 1 / 4 pixels are e 0,0 , row 1 / 4 column 2 / 4 pixels are i 0,0 , row 1 / 4 column 3 / 4 pixels are p 0,0 , row 2 / 4 column 1 / 4 pixels is f 0,0 , row 2 / 4 column 2 / 4 pixels is j 0,0 , row 2 / 4 column 3 / 4 pixels are q 0,0 , row 3 / 4 column 1 / 4 pixels are g 0,0 , row 3 / 4 column 2 / 4 pixels is k 0,0 , row 3 / 4 column 3 / 4 pixels are r 0,0 .
[0102] For example, reference Figure 1 , the first pixel is A 0,0 In the case of , first, the first pixel can be interpolated by a second preset interpolation method according to the binary representation of at least one pixel to obtain two intermediate values tmp0 and tmp1. Then, A can be calculated according to tmp0 and tmp1 by the following equations (4)-(6): 0,0 Perform interpolation to obtain A 0,0 The corresponding second type of sub-pixel:
[0103] p a =(tmp0+(tmp0+tmp1+2)>>1)>>1; (4)
[0104] p b =(tmp0+tmp1+1)>>1; (5)
[0105] p c=(tmp1+(tmp0+tmp1+2)>>1)>>1; (6)
[0106] Among them, p a 1 / 4 row and 1 / 4 column pixels e 0,0 , row 2 / 4 column 1 / 4 pixel f 0,0 or row 3 / 4 column 1 / 4 pixel g 0,0 The binary representation of p b i is row 1 / 4 column 2 / 4 pixels 0,0 , row 2 / 4 column 2 / 4 pixel j 0,0 or row 3 / 4 column 2 / 4 pixels k 0,0 The binary representation of p c 1 / 4 row and 3 / 4 column pixels p 0,0 , row 2 / 4 column 3 / 4 pixels q 0,0 or row 3 / 4 column 3 / 4 pixels r 0,0 The dynamic range of the interpolation result of the second preset interpolation method is 8 bits.
[0107] According to the sub-pixel interpolation method disclosed in the present invention, any pixel can be interpolated using a second preset interpolation method to obtain a second type of sub-pixel corresponding to any pixel. Multiplication and division operations can be avoided during the interpolation process to ensure the real-time operation of the encoder.
[0108] Next, expand equations (4)-(6) and use equations (7)-(33) to calculate A. 0,0 Perform interpolation to obtain A 0,0 The corresponding second type of sub-pixel:
[0109] For row 1 / 4 column 1 / 4 pixel e 0,0 :
[0110] tmp0=(A 00 +(A 00 +A 01 +1)>>1)>>1; (7)
[0111] tmp1=(A 10 +(A 10 +A 11 +1)>>1)>>1; (8)
[0112] p1′=(tmp0+(tmp0+tmp1+2)>>1)>>1; (9)
[0113] Among them, p1′ is the row 1 / 4 column 1 / 4 pixel e 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0114] For row 1 / 4 column 2 / 4 pixels i 0,0 :
[0115] tmp0=(A 00 +(A 00 +A 01 +1)>>1)>>1; (10)
[0116] tmp1=(A 10 +(A 10 +A 11 +2)>>1)>>1; (11)
[0117] p2′=(tmp0+tmp1+1)>>1; (12)
[0118] Among them, p2′ is the row 1 / 4 column 2 / 4 pixel i 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A 01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0119] For row 1 / 4 column 3 / 4 pixels p 0,0 :
[0120] tmp0=(A 00 +(A 00 +A 01 +1)>>1)>>1; (13)
[0121] tmp1=(A 10 +(A 10 +A 11 +1)>>1)>>1; (14)
[0122] p3′=(tmp1+(tmp0+tmp1+2)>>1)>>1; (15)
[0123] Among them, p3′ is the row 1 / 4 column 3 / 4 pixel p 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A 01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0124] For row 2 / 4 column 1 / 4 pixel f 0,0 :
[0125] tmp0=(A 00 +A 01 +1)>>1; (16)
[0126] tmp1=(A 10 +A 11 +1)>>1; (17)
[0127] p4=(tmp0+(tmp0+tmp1+2)>>1)>>1; (18)
[0128] Among them, p4 is row 2 / 4 column 1 / 4 pixel f 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A 01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0129] For row 2 / 4 column 2 / 4 pixel j 0,0 :
[0130] tmp0=(A 00 +A 01 +1)>>1; (19)
[0131] tmp1=(A 10 +A 11 +1)>>1; (20)
[0132] p5=(tmp0+tmp1+1)>>1; (21)
[0133] Among them, p5 is row 2 / 4 column 2 / 4 pixel j 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A 01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0134] For row 2 / 4 column 3 / 4 pixels q 0,0 :
[0135] tmp0=(A 00 +A 01 +1)>>1; (22)
[0136] tmp1=(A 10 +A11 +1)>>1; (23)
[0137] p6=(tmp1+(tmp0+tmp1+2)>>1)>>1; (24)
[0138] Among them, p6 is row 2 / 4 column 3 / 4 pixel q 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A 01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0139] For row 3 / 4 column 1 / 4 pixel g 0,0 :
[0140] tmp0=(A 01 +(A 00 +A 01 +1)>>1)>>1; (25)
[0141] tmp1=(A 11 +(A 10 +A 11 +1)>>1)>>1; (26)
[0142] p7=(tmp0+(tmp0+tmp1+2)>>1)>>1; (27)
[0143] Among them, p7 is row 3 / 4 column 1 / 4 pixel g 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A 01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0144] For row 3 / 4 column 2 / 4 pixels k 0,0 :
[0145] tmp0=(A 01 +(A 00 +A 01 +1)>>1)>>1; (28)
[0146] tmp1=(A 11 +(A 10 +A 11 +2)>>1)>>1; (29)
[0147] p8=(tmp0+tmp1+1)>>1; (30)
[0148] Among them, p8 is row 3 / 4 column 2 / 4 pixel k 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A 01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0149] For row 3 / 4 column 3 / 4 pixels r 0,0 :
[0150] tmp0=(A 01 +(A 00 +A 01 +1)>>1)>>1; (31)
[0151] tmp1=(A 11 +(A 10 +A 11 +1)>>1)>>1; (32)
[0152] p9=(tmp1+(tmp0+tmp1+2)>>1)>>1; (33)
[0153] Among them, p9 is row 3 / 4 column 3 / 4 pixel r 0,0 The binary representation of A 00 is the binary representation of the first pixel, A 10 is the binary representation of the second pixel, A 01 is the binary representation of the third pixel, A 1,1 is the binary representation of the fourth pixel.
[0154] It should be noted here that the exemplary embodiments of the present disclosure only take binary representation as an example. The present disclosure also protects schemes based on other bases, such as schemes based on decimal representation. In the case of decimal representation, rounding can be used to calculate the formula.
[0155] Figure 3 is a block diagram illustrating a sub-pixel interpolation apparatus according to an exemplary embodiment of the present disclosure. Figure 3 The sub-pixel interpolation device 300 includes a number acquisition unit 301, a mode determination unit 302 and an interpolation processing unit 303.
[0156] The number obtaining unit 301 may obtain the number of pixels included in the block to be interpolated.
[0157] Here, the block to be interpolated may be an image containing a certain number of pixels.
[0158] The method determining unit 302 may determine the interpolation method corresponding to the block to be interpolated according to the number of pixels, wherein the number of pixels is positively correlated with the loss of the corresponding interpolation method.
[0159] According to an exemplary embodiment of the present disclosure, the method determination unit 302 may select an interpolation method with a larger loss when the number of pixels is large, and select an interpolation method with a smaller loss when the number of pixels is small. Here, the loss may be the coding compression rate loss of video encoding after sub-pixel interpolation, that is, when the number of pixels is large, a certain compression rate loss is selected to speed up the interpolation process, and vice versa when the number of pixels is small.
[0160] However, considering that the interpolation method changes relatively complicatedly based on the change in the number of pixels during actual application, this is because the number of pixels in each block to be interpolated may be different. Based on this, the method determination unit 302 can divide the number of pixels into different numerical intervals according to at least one preset value. In this way, in actual application, a corresponding interpolation method can be set for each numerical interval, and subsequent sub-pixel interpolation can be performed.
[0161] For example, the mode determination unit 302 may be provided with a first preset value and a second preset value. Thus, three situations are distinguished. The first situation is that the number of pixels is less than the first preset value. The second situation is that the number of pixels is greater than or equal to the first preset value and less than the second preset value. The third situation is that the number of pixels is greater than or equal to the second preset value. It should be noted here that the first preset value is less than the second preset value.
[0162] For the first case, the mode determining unit 302 may determine that the interpolation mode corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation mode.
[0163] For the second case, the mode determining unit 302 may determine that the interpolation mode corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation mode based on a preset offset value (shift value) and a preset dynamic range of the interpolation result.
[0164] For the third case, the method determination unit 302 may determine that the interpolation method corresponding to the block to be interpolated is a preset interpolation method, wherein the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction, and shift operations. It should be noted that the preset interpolation method may not include multiplication and division operations.
[0165] According to the exemplary embodiments of the present disclosure, it can be seen from the above description that the result obtained by the HEVC inter-frame sub-pixel interpolation method is relatively high in accuracy, and the loss of the HEVC inter-frame sub-pixel interpolation method is relatively small; and the HEVC inter-frame sub-pixel interpolation method can reduce the amount of calculation by controlling the offset value and the dynamic range of the interpolation result, thereby accelerating the interpolation, so it can be seen that the loss of the HEVC inter-frame sub-pixel interpolation method based on the preset offset value and the preset interpolation result dynamic range is greater than the loss of directly performing the HEVC inter-frame sub-pixel interpolation method; and the multiplication and division operations in the HEVC inter-frame sub-pixel interpolation method will bring a very large amount of calculation, and the preset interpolation method does not include multiplication and division operations, so the preset interpolation method has a greater loss than the first two interpolation methods.
[0166] According to the sub-pixel interpolation device disclosed herein, the method determination unit 302 divides the number of pixels into three cases through a first preset value and a second preset value, and then specifically determines the interpolation methods corresponding to the three cases. For a block to be interpolated with a small number of pixels that is difficult to encode, a loss-less interpolation method can be used, and vice versa for a block to be interpolated with a large number of pixels that is easy to encode, thereby effectively controlling the loss.
[0167] For another example, the method determination unit 302 can also set three numerical intervals based on two preset values, including a first interval, a second interval and a third interval, where the two preset values can be 64 and 256, and the three numerical intervals can be: the first interval is [16, 64); the second interval is [64, 256); and the third interval is [256, 4096].
[0168] When the number of pixels falls within the first interval, the mode determining unit 302 may determine that the interpolation mode corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation mode.
[0169] When the number of pixels falls within the second interval, the method determining unit 302 may determine that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range.
[0170] When the number of pixels falls within the third interval, the method determining unit 302 may determine that the interpolation method corresponding to the block to be interpolated is a preset interpolation method, wherein the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations.
[0171] The interpolation processing unit 303 may perform interpolation processing on each pixel of the block to be interpolated using the determined interpolation method.
[0172] In the above description, for the first case or when the number of pixels falls within the first interval, the mode determining unit 302 may determine that the interpolation mode corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation mode.
[0173] Here, the interpolation processing unit 303 may perform sub-pixel interpolation using the 15 formulas corresponding to the HEVC inter-frame sub-pixel interpolation method described above, which will not be described in detail here.
[0174] For the second case or when the number of pixels falls within the second interval, the mode determining unit 302 may determine that the interpolation mode corresponding to the block to be interpolated is the HEVC inter-frame sub-pixel interpolation mode based on a preset offset value and a preset interpolation result dynamic range.
[0175] From the above description, we can know that for any pixel of the block to be interpolated, two types of sub-pixels can be obtained by interpolation. Figure 1 , a 0,0 、b 0,0 、c 0,0 d 0,0 、h 0,0 and n 0,0 It can be obtained by one-time interpolation. In the exemplary embodiment of the present disclosure, this type of sub-pixel may be referred to as a first type of sub-pixel. 0,0 、f 0,0 、g 0,0 、i 0,0 、j 0,0 、k 0,0 、p 0,0 ,q 0,0 、r 0,0 This sub-pixel can be obtained by two interpolations. In exemplary embodiments of the present disclosure, this type of sub-pixel may be referred to as a second-type sub-pixel. Based on existing technologies, for the first-type sub-pixel, the dynamic range of the interpolation result using the HEVC inter-frame sub-pixel interpolation method can be 8 bits. For the second-type sub-pixel, the dynamic range of the interpolation result using the HEVC inter-frame sub-pixel interpolation method can include a first interpolation result dynamic range of 15 bits and a second interpolation result dynamic range of 9 bits.
[0176] In view of this situation, the interpolation processing unit 303 may first perform interpolation processing on each pixel by using the HEVC inter-frame sub-pixel interpolation method to obtain the first type of sub-pixel corresponding to each pixel.
[0177] Here, the interpolation processing unit 303 can directly perform interpolation processing on each pixel through the HEVC inter-frame sub-pixel interpolation method described above to obtain the first type of sub-pixel corresponding to each pixel, which will not be repeated here.
[0178] Then, the interpolation processing unit 303 may interpolate each pixel using the HEVC inter-frame sub-pixel interpolation method according to the first type of sub-pixel corresponding to at least one pixel of the block to be interpolated, the preset offset value, and the preset interpolation result dynamic range to obtain the second type of sub-pixel corresponding to each pixel.
[0179] Here, the interpolation processing unit 303 may first use the above-described HEVC inter-frame sub-pixel interpolation method to interpolate the specific position of the second type of sub-pixel obtained by pre-interpolation (such as Figure 1 e in 0,0 、f 0,0 、g 0,0 、i 0,0 、j 0,0 、k 0,0 、p 0,0 ,q 0,0 、r 0,0 any second-class sub-pixel in the sub-pixel interpolation), determine the first-class sub-pixel required for the sub-pixel interpolation (such as e 0,0 The first type of sub-pixels required for interpolation include a 0,-3 The interpolation processing unit 303 may further perform interpolation processing on the first type of sub-pixels required for the sub-pixel interpolation based on a preset offset value and a preset interpolation result dynamic range through the HEVC inter-frame sub-pixel interpolation method to obtain the corresponding pre-interpolated second type of sub-pixels.
[0180] It should be noted that the preset offset value includes the preset first interpolation offset value (shift1 value) and the preset second interpolation offset value (shift2 value). The preset interpolation result dynamic range includes the preset first interpolation result dynamic range and the preset second interpolation result dynamic range.
[0181] For example, the preset shift1 value and the preset shift2 value may both be 6. The preset dynamic range of the first interpolation result and the preset dynamic range of the second interpolation result may both be 8 bits.
[0182] According to the sub-pixel interpolation device disclosed herein, the interpolation processing unit 303 can perform interpolation for the second type of sub-pixels based on a preset offset value and a preset interpolation result dynamic range, thereby reducing the amount of interpolation computation required. The preset shift1 value and the preset shift2 value are both set to 6, and the preset first interpolation result dynamic range and the preset second interpolation result dynamic range are both set to 8 bits. This reduces the computational complexity compared to existing shift values and interpolation result dynamic ranges.
[0183] For the third case or when the number of pixels falls within the third interval, the method determination unit 302 may determine that the interpolation method corresponding to the block to be interpolated is a preset interpolation method, wherein the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations.
[0184] Here, the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations, which may mean that the preset interpolation method simulates the HEVC inter-frame sub-pixel interpolation method, but only includes addition, subtraction and shift operations.
[0185] As can be seen from the above description, for any pixel in the block to be interpolated, two types of sub-pixels can be obtained through interpolation: a first type of sub-pixel and a second type of sub-pixel. The preset interpolation method in the interpolation processing unit 303 can be configured for these two types of sub-pixels, with a first preset interpolation method for the first type of sub-pixel and a second preset interpolation method for the second type of sub-pixel, respectively. Therefore, for any pixel in the block to be interpolated, the interpolation processing unit 303 can first interpolate the pixel using the first preset interpolation method to obtain the first type of sub-pixel corresponding to the pixel. Then, the interpolation processing unit 303 can interpolate the pixel using the second preset interpolation method to obtain the second type of sub-pixel corresponding to the pixel. The preset interpolation method in the sub-pixel interpolation device of the present disclosure can be configured to obtain the two types of sub-pixels by providing interpolation methods corresponding to the two types of sub-pixels. This ensures that the preset interpolation method is monotonically consistent with the HEVC inter-frame sub-pixel interpolation method, and that there is no significant conflict between the frequency response of the preset interpolation method and the HEVC inter-frame sub-pixel interpolation method.
[0186] Regarding the process of obtaining the first type of sub-pixel using the first preset interpolation method, the interpolation processing unit 303 can interpolate any pixel and the next pixel in the same column as any pixel using the first preset interpolation method to obtain the first type of sub-pixel corresponding to any pixel.
[0187] For the convenience of subsequent description, any pixel may be referred to as the first pixel, the next pixel in the same row as any pixel may be referred to as the second pixel, the next pixel in the same column as any pixel may be referred to as the third pixel, and the pixel in the next column and next row of any pixel may be referred to as the fourth pixel. Figure 1 , the first pixel is A 0,0 In the case of 1,0 , the third pixel can be A 0,1 , the fourth pixel can be A 1,1 .
[0188] Here, the interpolation processing unit 303 may first obtain a binary representation of the first pixel and a binary representation of the third pixel. Then, the interpolation processing unit 303 may interpolate the first pixel using a first preset interpolation method based on the binary representation of the first pixel and the binary representation of the third pixel to obtain a first type of sub-pixel corresponding to the first pixel.
[0189] It should be noted that the first type of sub-pixels obtained after one interpolation may include 1 / 4 pixels, 2 / 4 pixels, and 3 / 4 pixels, wherein the 1 / 4 pixels are the 1 / 4 pixels in the same row or column as the first pixel, the 2 / 4 pixels are the 2 / 4 pixels in the same row or column as the first pixel, and the 3 / 4 pixels are the 3 / 4 pixels in the same row or column as the first pixel. Figure 1 , the first pixel is A 0,0 In this case, 1 / 4 pixel can be a 0,0 and d 0,0 , and the first pixel A 0,0 1 / 4 pixel in the same row is a 0,0 , and the first pixel A 0,0 The 1 / 4 pixel in the same column is d 0,0 . 2 / 4 pixels can be b 0,0 and h 0,0 , the 2 / 4 pixel in the same row as the first pixel is b 0,0 , the 2 / 4 pixels in the same column as the first pixel are h 0,0 . 3 / 4 pixels can be c 0,0 and n 0,0 , the 3 / 4 pixel in the same row as the first pixel is c 0,0 , the 3 / 4 pixels in the same column as the first pixel are n 0,0 .
[0190] For example, reference Figure 1 , the first pixel is A 0,0 In the case of, the interpolation processing unit 303 can use the above formulas (1)-(3) to calculate A according to the binary representation of the first pixel and the binary representation of the third pixel. 0,0 Perform interpolation to obtain A 0,0 The corresponding first type of sub-pixel.
[0191] According to the sub-pixel interpolation device disclosed in the present invention, the interpolation processing unit 303 can perform interpolation processing on any pixel through a first preset interpolation method to obtain a first type of sub-pixel corresponding to any pixel. Multiplication and division operations can be avoided during the interpolation process to ensure the real-time operation of the encoder.
[0192] In the process of obtaining the second type of sub-pixel using the second preset interpolation method, the interpolation processing unit 303 may first interpolate any pixel using the second preset interpolation method based on at least one pixel among the pixel, the next pixel in the same row as the pixel, the next pixel in the same column as the pixel, and the pixel in the next column and next row of the pixel to obtain at least one intermediate value. Then, the interpolation processing unit 303 may interpolate any pixel using the second preset interpolation method based on the at least one intermediate value to obtain the second type of sub-pixel corresponding to the pixel.
[0193] Furthermore, the above process can be described as follows: first, the interpolation processing unit 303 may interpolate the first pixel using a second preset interpolation method based on at least one of the first pixel, the second pixel, the third pixel, and the fourth pixel to obtain at least one intermediate value. Then, the interpolation processing unit 303 may interpolate the first pixel using the second preset interpolation method based on the at least one intermediate value to obtain a sub-pixel of the second type corresponding to the first pixel.
[0194] Here, the interpolation processing unit 303 may first obtain a binary representation of at least one of the binary representations of the first pixel, the second pixel, the third pixel, and the fourth pixel. Then, based on the binary representation of the at least one pixel, the interpolation processing unit 303 may interpolate the first pixel using a second preset interpolation method to obtain at least one intermediate value. Finally, based on the at least one intermediate value, the interpolation processing unit 303 may interpolate the first pixel using the second preset interpolation method to obtain a sub-pixel of the second type corresponding to the first pixel.
[0195] It should be noted here that the second type of sub-pixels obtained after two interpolations may include row 1 / 4 column 1 / 4 pixel, row 1 / 4 column 2 / 4 pixel, row 1 / 4 column 3 / 4 pixel, row 2 / 4 column 1 / 4 pixel, row 2 / 4 column 2 / 4 pixel, row 2 / 4 column 3 / 4 pixel, row 3 / 4 column 1 / 4 pixel, row 3 / 4 column 2 / 4 pixel, and row 3 / 4 column 3 / 4 pixel. For example, referring to Figure 1 , the first pixel is A 0,0 In the case of , the row 1 / 4 column 1 / 4 pixels are e 0,0 , row 1 / 4 column 2 / 4 pixels are i 0,0 , row 1 / 4 column 3 / 4 pixels are p 0,0 , row 2 / 4 column 1 / 4 pixels is f 0,0 , row 2 / 4 column 2 / 4 pixels is j 0,0 , row 2 / 4 column 3 / 4 pixels are q 0,0 , row 3 / 4 column 1 / 4 pixels are g 0,0 , row 3 / 4 column 2 / 4 pixels is k 0,0, row 3 / 4 column 3 / 4 pixels are r 0,0 .
[0196] For example, reference Figure 1 , the first pixel is A 0,0 In the case of , first, the interpolation processing unit 303 can interpolate the first pixel by the second preset interpolation method according to the binary representation of at least one pixel to obtain two intermediate values tmp0 and tmp1. Then, the interpolation processing unit 303 can interpolate A according to tmp0 and tmp1 by using the above formulas (4)-(6). 0,0 Perform interpolation to obtain A 0,0 The corresponding second type of sub-pixel.
[0197] According to the sub-pixel interpolation device disclosed in the present invention, the interpolation processing unit 303 can perform interpolation processing on any pixel through a second preset interpolation method to obtain a second type of sub-pixel corresponding to any pixel. Multiplication and division operations can be avoided during the interpolation process to ensure the real-time operation of the encoder.
[0198] Next, by expanding equations (4)-(6), the interpolation processing unit 303 can use equations (7)-(33) to calculate A 0,0 Perform interpolation to obtain A 0,0 The corresponding second type of sub-pixel.
[0199] Figure 4 is a block diagram illustrating an electronic device 400 according to an exemplary embodiment of the present disclosure.
[0200] Reference Figure 4 The electronic device 400 includes at least one memory 401 and at least one processor 402, wherein the at least one memory 401 stores a set of computer-executable instructions. When the computer-executable instruction set is executed by the at least one processor 402, the sub-pixel interpolation method according to the exemplary embodiment of the present disclosure is executed.
[0201] As an example, the electronic device 400 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above-mentioned instruction set. Here, the electronic device 400 is not necessarily a single electronic device, but may also be any device or circuit that can execute the above-mentioned instructions (or instruction set) individually or in combination. The electronic device 400 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that is interconnected with a local or remote (e.g., via wireless transmission) interface.
[0202] In electronic device 400, processor 402 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0203] The processor 402 can execute instructions or codes stored in the memory 401, wherein the memory 401 can also store data. Instructions and data can also be sent and received over the network via the network interface device, wherein the network interface device can use any known transmission protocol.
[0204] Memory 401 may be integrated with processor 402, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. Furthermore, memory 401 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device usable by a database system. Memory 401 and processor 402 may be operatively coupled or may communicate with each other, for example, via an I / O port, a network connection, or the like, such that processor 402 can access files stored in memory.
[0205] In addition, the electronic device 400 may further include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device 400 may be connected to each other via a bus and / or a network.
[0206] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to perform the sub-pixel interpolation method according to the exemplary embodiment of the present disclosure. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or ultra-fast digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device configured to store the computer program and any associated data, data files and data structures in a non-transitory manner and provide the computer program and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0207] According to an exemplary embodiment of the present disclosure, a computer program product may also be provided. Instructions in the computer program product may be executed by a processor of a computer device to implement the sub-pixel interpolation method according to an exemplary embodiment of the present disclosure.
[0208] According to the sub-pixel interpolation method and device disclosed herein, different interpolation methods are used to perform sub-pixel interpolation on blocks with different numbers of pixels, and the number of pixels is positively correlated with the loss of the corresponding interpolation method. For blocks with a small number of pixels that are difficult to encode and have a small number of pixels, a method with low loss is used, while for blocks with a large number of pixels that are easy to encode and have a large number of pixels, the opposite is used. This can effectively control the loss, thereby ensuring the real-time operation of the encoder and ensuring that the encoding compression rate loss meets the encoding requirements.
[0209] In addition, according to the sub-pixel interpolation method and device disclosed herein, setting a preset interpolation method that does not include multiplication and division operations can significantly reduce the encoding time of sub-pixel interpolation. When using the preset interpolation method, the original maximum of 72 multiplications and 63 additions and subtractions are reduced to a maximum of 8 shifts and 12 additions (for 3 / 4 rows and 3 / 4 columns of pixels), which makes the computational cost extremely low and avoids multiplication and division operations, which can make special optimizations for SIMD optimization.
[0210] In addition, according to the sub-pixel interpolation method and device disclosed in the present invention, the preset interpolation method and the HEVC inter-frame sub-pixel interpolation method are monotonically consistent, except that the HEVC inter-frame sub-pixel interpolation method has higher precision and the preset interpolation method has lower precision, so that there is no obvious conflict between the frequency response of the preset interpolation method and the HEVC inter-frame sub-pixel interpolation method.
[0211] In addition, according to the sub-pixel interpolation method and device disclosed herein, the relevant formulas of the preset interpolation method are calculated by rounding off, which will not cause the interpolated pixels to be excessively large or small.
[0212] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0213] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A sub-pixel interpolation method, characterized in that: include: Get the number of pixels contained in the block to be interpolated; Determining an interpolation method corresponding to the block to be interpolated according to the number of pixels, wherein the number of pixels is positively correlated with the loss of the corresponding interpolation method; Performing interpolation processing on each pixel of the block to be interpolated using the determined interpolation method; The step of determining an interpolation method corresponding to the block to be interpolated according to the number of pixels includes: If the number of pixels is less than a first preset value, determining that the interpolation mode corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation mode; If the number of pixels is greater than or equal to a first preset value and less than a second preset value, determining that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range; If the number of pixels is greater than or equal to a second preset value, it is determined that the interpolation method corresponding to the block to be interpolated is a preset interpolation method, wherein the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations, and the first preset value is less than the second preset value.
2. The sub-pixel interpolation method according to claim 1, wherein: When it is determined that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range, performing interpolation processing on each pixel of the block to be interpolated using the determined interpolation method includes: Performing interpolation processing on each pixel by using the HEVC inter-frame sub-pixel interpolation method to obtain a first type of sub-pixel corresponding to each pixel; According to the first type of sub-pixel corresponding to at least one pixel of the block to be interpolated, the preset offset value and the preset interpolation result dynamic range, each pixel is interpolated by the HEVC inter-frame sub-pixel interpolation method to obtain the second type of sub-pixel corresponding to each pixel.
3. The sub-pixel interpolation method according to claim 1, wherein: The preset interpolation method includes a first preset interpolation method for the first type of sub-pixels and a second preset interpolation method for the second type of sub-pixels; When it is determined that the interpolation mode corresponding to the block to be interpolated is a preset interpolation mode, performing interpolation processing on each pixel of the block to be interpolated using the determined interpolation mode includes: For any pixel of the block to be interpolated, interpolate the pixel using the first preset interpolation method to obtain a first type of sub-pixel corresponding to the pixel; Interpolation processing is performed on the any pixel using the second preset interpolation method to obtain a second type of sub-pixel corresponding to the any pixel.
4. The sub-pixel interpolation method according to claim 3, wherein: The interpolation process is performed on the any pixel by using the first preset interpolation method to obtain a first type of sub-pixel corresponding to the any pixel, including: According to the any pixel and the next pixel in the same column as the any pixel, the any pixel is interpolated by using the first preset interpolation method to obtain a first type of sub-pixel corresponding to the any pixel.
5. The sub-pixel interpolation method according to claim 3, wherein: The interpolation process is performed on the any pixel by using the second preset interpolation method to obtain the second type of sub-pixel corresponding to the any pixel, including: interpolate the pixel using the second preset interpolation method to obtain at least one intermediate value based on the pixel, the next pixel in the same row as the pixel, the next pixel in the same column as the pixel, and the next pixel in the next column and next row as the pixel; According to the at least one intermediate value, the any pixel is interpolated using the second preset interpolation method to obtain a second type of sub-pixel corresponding to the any pixel.
6. A sub-pixel interpolation device, characterized in that: include: The number obtaining unit is configured to: obtain the number of pixels included in the block to be interpolated; a method determining unit configured to: determine an interpolation method corresponding to the block to be interpolated according to the number of pixels, wherein the number of pixels is positively correlated with the loss of the corresponding interpolation method; an interpolation processing unit, configured to: perform interpolation processing on each pixel of the block to be interpolated using the determined interpolation method; The mode determination unit is configured as follows: If the number of pixels is less than a first preset value, determining that the interpolation mode corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation mode; If the number of pixels is greater than or equal to a first preset value and less than a second preset value, determining that the interpolation method corresponding to the block to be interpolated is a HEVC inter-frame sub-pixel interpolation method based on a preset offset value and a preset interpolation result dynamic range; If the number of pixels is greater than or equal to a second preset value, it is determined that the interpolation method corresponding to the block to be interpolated is a preset interpolation method, wherein the preset interpolation method is a HEVC inter-frame sub-pixel interpolation method based on addition, subtraction and shift operations, and the first preset value is less than the second preset value.
7. The sub-pixel interpolation device according to claim 6, wherein: When the interpolation mode corresponding to the block to be interpolated is determined by the mode determination unit to be a HEVC inter-frame sub-pixel interpolation mode based on a preset offset value and a preset interpolation result dynamic range, the interpolation processing unit is configured to: Performing interpolation processing on each pixel by using the HEVC inter-frame sub-pixel interpolation method to obtain a first type of sub-pixel corresponding to each pixel; According to the first type of sub-pixel corresponding to at least one pixel of the block to be interpolated, the preset offset value and the preset interpolation result dynamic range, each pixel is interpolated by the HEVC inter-frame sub-pixel interpolation method to obtain the second type of sub-pixel corresponding to each pixel.
8. The sub-pixel interpolation device according to claim 6, wherein: The preset interpolation method includes a first preset interpolation method for the first type of sub-pixels and a second preset interpolation method for the second type of sub-pixels; When the interpolation mode corresponding to the block to be interpolated is determined to be a preset interpolation mode by the mode determining unit, the interpolation processing unit is configured to: For any pixel of the block to be interpolated, interpolate the pixel using the first preset interpolation method to obtain a first type of sub-pixel corresponding to the pixel; Interpolation processing is performed on the any pixel using the second preset interpolation method to obtain a second type of sub-pixel corresponding to the any pixel.
9. The sub-pixel interpolation device according to claim 8, wherein: The interpolation processing unit is configured as follows: According to the any pixel and the next pixel in the same column as the any pixel, the any pixel is interpolated by using the first preset interpolation method to obtain a first type of sub-pixel corresponding to the any pixel.
10. The sub-pixel interpolation device according to claim 8, wherein: The interpolation processing unit is configured as follows: interpolate the pixel using the second preset interpolation method to obtain at least one intermediate value based on the pixel, the next pixel in the same row as the pixel, the next pixel in the same column as the pixel, and the next pixel in the next column and next row as the pixel; According to the at least one intermediate value, the any pixel is interpolated using the second preset interpolation method to obtain a second type of sub-pixel corresponding to the any pixel.
11. An electronic device, characterized in that: include: at least one processor; at least one memory storing computer-executable instructions, When the computer executable instructions are executed by the at least one processor, the at least one processor is prompted to perform the sub-pixel interpolation method according to any one of claims 1 to 5.
12. A computer-readable storage medium storing instructions, characterized in that: When the instructions are executed by at least one processor, the at least one processor is prompted to perform the sub-pixel interpolation method according to any one of claims 1 to 5.
13. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by at least one processor, the sub-pixel interpolation method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Filter interpolation method and filter
CN103747269A