Prediction Pixel Value Calculation Circuit, Method and Encoder in an Angle Mode

By utilizing the symmetry characteristics of the angle mode in the AV1 encoding standard, only one predicted pixel coordinate index and offset index at the prediction angle can be calculated to calculate the predicted pixel values ​​at two symmetric angles, which solves the problem of large intra prediction calculation and improves the encoding efficiency.

CN114760468BActive Publication Date: 2025-06-20ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210323953.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-06-20
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

In the AV1 encoding standard, intra prediction requires traversing 56 angle modes, which are large in calculations and take a long time, which affects the encoding efficiency.

Method used

By utilizing the symmetry characteristics of partial angle mode, it is necessary to determine the predicted pixel coordinate index and offset index at one prediction angle, and the predicted pixel values ​​at two symmetric angles can be calculated, reducing the calculation amount.

Benefits of technology

The calculation amount is significantly reduced, from 56 angles to 32 angles, improving coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114760468B_ABST
    Figure CN114760468B_ABST
Patent Text Reader

Abstract

One or more embodiments of this specification provide a prediction pixel value calculation circuit, method, and encoder in an angular mode. The circuit includes: a neighboring pixel acquisition module for acquiring a neighboring pixel array of an M*N image block; a position index determination module for determining the prediction pixel coordinate index and offset index of each pixel in the M*N image block at a prediction angle; a prediction pixel value calculation module for obtaining the prediction pixel value of each pixel in the M*N image block at the prediction angle according to the prediction pixel coordinate index, offset index, and neighboring pixel array of each pixel in the M*N image block; and, if there is a symmetric angle centered on 135° for the prediction angle, obtaining the prediction pixel value of each pixel in the N*M image block at the symmetric angle according to the prediction pixel coordinate index, offset index, and reverse sequence of the neighboring pixel array of each pixel in the M*N image block. This is beneficial for reducing the amount of calculation and improving the calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of encoding technology, and in particular, to a circuit, method, and encoder for calculating predicted pixel values in an angular mode. Background Art

[0002] AV1 is a video coding standard developed by the Alliance of Open Media Video. When encoding an image or video based on the AV1 standard, a series of processes such as image block partitioning, prediction, transformation, quantization, entropy coding, and loop filtering are mainly performed on the input image to obtain the final bitstream for storage or network transmission. Prediction is an important link in the encoding process, and accurately predicting image blocks is the key to improving encoding efficiency.

[0003] Prediction is divided into intra-frame prediction and inter-frame prediction. Intra-frame prediction is to eliminate the redundant information of spatial correlation between images, and the specific implementation is to predict the information within the block through multiple modes. Intra-frame prediction includes an angular mode and a non-angular mode. The angular mode plays an important role. There are a total of 56 angular modes in AV1. Intra-frame prediction needs to traverse various angular modes for each image block and select an optimal angular mode (i.e., the angular mode with the minimum encoding cost) from all angular modes through competition, which has a large amount of calculation and takes a long time. Summary of the Invention

[0004] In view of this, for the scenario of encoding an image frame according to the AV1 standard, one or more embodiments of this specification provide a circuit, method, and encoder for calculating predicted pixel values in an angular mode.

[0005] To achieve the above object, one or more embodiments of this specification provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of this specification, a circuit for calculating predicted pixel values in an angular mode is proposed, which is applied to the scenario of encoding an image frame according to the AV1 standard. The circuit includes a neighboring pixel acquisition module, a position index determination module, and a predicted pixel value calculation module;

[0007] The neighboring pixel acquisition module is configured to acquire an array of neighboring pixels of an M*N image block, and the neighboring pixels in the array of neighboring pixels are arranged in sequence with the neighboring pixel located at the upper left of the M*N image block as the symmetry center; M and N are respectively integers greater than 0;

[0008] The position index determination module is configured to determine the predicted pixel coordinate index and offset index corresponding to each pixel in the M*N image block under the prediction angle;

[0009] The predicted pixel value calculation module is configured to obtain the predicted pixel values of each pixel in the M×N image block at the predicted angle according to the predicted pixel coordinate indices, offset indices of each pixel in the M×N image block, and the neighboring pixel array; and, if there is a symmetric angle centered at 135° for the predicted angle, obtain the predicted pixel values of each pixel in the N×M image block at the symmetric angle according to the predicted pixel coordinate indices, offset indices of each pixel in the M×N image block, and the reverse sequence of the neighboring pixel array.

[0010] According to a second aspect of one or more embodiments of the present specification, a method for calculating predicted pixel values in an angular mode is provided, which is applied to a scenario of encoding an image frame according to the AV1 standard. The method includes:

[0011] Obtain a neighboring pixel array of the M×N image block, where the neighboring pixels in the neighboring pixel array are arranged in order with the neighboring pixel located at the upper left of the M×N image block as the center of symmetry; M and N are respectively integers greater than 0;

[0012] Determine the predicted pixel coordinate indices and offset indices respectively corresponding to each pixel in the M×N image block at the predicted angle;

[0013] Obtain the predicted pixel values of each pixel in the M×N image block at the predicted angle according to the predicted pixel coordinate indices, offset indices of each pixel in the M×N image block, and the neighboring pixel array; and, if there is a symmetric angle centered at 135° for the predicted angle, obtain the predicted pixel values of each pixel in the N×M image block at the symmetric angle according to the predicted pixel coordinate indices, offset indices of each pixel in the M×N image block, and the reverse sequence of the neighboring pixel array.

[0014] According to a third aspect of one or more embodiments of the present specification, an encoder is provided, which is applied to a scenario of encoding an image frame according to the AV1 standard. The encoder includes the predicted pixel value calculation circuit in the angular mode described in the first aspect.

[0015] In the embodiments of this specification, for the symmetry characteristics of the prediction angles corresponding to some of the 56 angular modes in the AV1 coding standard, for a pair of prediction angles with 135° as the symmetry center, only the prediction pixel coordinate index and offset index of the M×N image block under one of the prediction angles need to be determined. Based on this prediction pixel coordinate index and offset index, the prediction pixel value of the M×N image block under this prediction angle and the prediction value of the N×M image block under the symmetric angle of this prediction angle can be determined. That is, based on the relevant information of one prediction angle, the prediction pixel values under two symmetric prediction angles can be obtained, reducing the number of angles that originally needed to be calculated from 56 to 32, significantly reducing the computational amount and improving the coding efficiency at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 and Figure 2 are different schematic diagrams of dividing an image block provided by an exemplary embodiment.

[0017] Figure 3 is a schematic diagram of the prediction angles corresponding to 56 angular modes in the AV1 standard provided by an exemplary embodiment.

[0018] Figure 4A is a schematic diagram of an M×N image block and its neighboring pixels provided by an exemplary embodiment.

[0019] Figure 4B and Figure 4C are schematic diagrams of calculating the predicted pixel values of the pixels in the M×N image block provided by an exemplary embodiment.

[0020] Figure 5 is a schematic diagram of the structure of a predicted pixel value calculation circuit under an angular mode provided by an exemplary embodiment.

[0021] Figure 6A 、 Figure 6B and Figure 7 are different schematic diagrams of determining reference pixels based on the symmetry characteristics of the prediction angles provided by an exemplary embodiment.

[0022] Figure 8 and Figure 9 are different schematic diagrams of the structure of a predicted pixel value calculation circuit under an angular mode provided by an exemplary embodiment.

[0023] Figure 10 is a schematic diagram of a neighboring pixel array provided by an exemplary embodiment.

[0024] Figure 11 is the fourth schematic diagram of the structure of a predicted pixel value calculation circuit under an angular mode provided by an exemplary embodiment.

[0025] Figure 12It is a schematic structural diagram of a predicted pixel value calculation module provided by an exemplary embodiment.

[0026] Figure 13 It is a schematic flowchart of a method for calculating a predicted pixel value in an angle mode provided by an exemplary embodiment. Detailed implementation manners

[0027] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with one or more embodiments of this specification. On the contrary, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0028] It should be noted that: In other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step for description in other embodiments.

[0029] AV1 is a video coding standard developed by the Alliance of Open Media Video. When encoding an image or video using the AV1 standard, it mainly includes the following steps: First, perform block partitioning on the image to be encoded to obtain multiple image blocks. For the currently to-be-encoded image block, the intra-frame prediction or inter-frame prediction can be performed on this image block using the already encoded image blocks to determine the predicted pixel values of the pixels in this image block, and determine the residuals between the actual pixel values and the predicted pixel values of the pixels in this image block, and encode the residuals to obtain the bitstream of the image block for storage or network transmission. Since there is no need to store and transmit the original pixel values of the image block, but only store or transmit the residuals, the data volume can be greatly reduced.

[0030] When partitioning the image to obtain the to-be-encoded image blocks, there are various partitioning methods. Therefore, the shapes of the finally obtained image blocks are also different. For example, they may be square, rectangular (width greater than height), or vertical strip-shaped (height greater than width). For example, as Figure 1As shown in the figure, it is a schematic diagram of image partitioning in the AV1 standard. First, an image can be divided into image blocks of 128×128. The 128×128 image blocks can be further partitioned in 7 ways. Then, the obtained square image blocks can be further partitioned to select the image block partitioning method with the minimum coding cost. When further partitioning the image blocks, they can be further partitioned according to the 10 partitioning methods given by Figure 2 As can be seen from Figure 2 , the partitioned image may be a square image block, a rectangular image block with a width greater than its height, or a rectangular image block with a height greater than its width.

[0031] Predicting the current image block to be encoded based on the encoded image blocks to determine the predicted pixel values of the current image block to be encoded is an important step in the encoding process. Accurately predicting the image block to be encoded is the key to improving the encoding efficiency. In the AV1 encoding standard, there are mainly two prediction modes for the image block to be encoded: the intra-frame prediction mode and the inter-frame prediction mode. The inter-frame prediction mode uses other encoded frame images to predict the image block to be encoded, while the intra-frame prediction mode refers to using the spatial correlation of the video and generating the predicted pixel values of the image block to be encoded using the pixel values of the encoded image blocks on the left and above the image block to be encoded. The intra-frame prediction mode in the AV1 standard includes two categories: the angular mode and the non-angular mode. Both the non-angular mode and the angular mode can be further divided into multiple modes.

[0032] The angular mode in the AV1 standard supports 56 angular modes with prediction angles ranging from 36° to 212°, which can better fit the texture direction of the image for prediction. Please refer to Figure 3 , Figure 3 which shows the angular mode in the AV1 standard. Among them, the 8 prediction directions indicated by the black arrows are defined as the main angular modes, and 6 extended angular modes are obtained by offsetting 3 degrees, 6 degrees, and 9 degrees to both sides of each main angle (such as the gray arrows in Figure 1 ), for a total of 48 extended angular modes. Among them, the direction indicated by the prediction angle corresponding to each angular mode is the prediction direction of that angular mode, and the prediction angles corresponding to each angular mode are shown in Table 1.

[0033] Table 1. Prediction Angles Corresponding to Each Angular Mode in AV1

[0034]

[0035] In the AV1 encoding standard, intra-frame prediction uses the neighboring pixels of the image block as reference pixels, and these neighboring pixels are encoded pixels. Taking an M*N image block as an example, the reference pixels required for its intra-frame prediction are as shown in Figure 4AAs shown, it includes M+N pixels on the left, M+N pixels on the top, and 1 pixel in the upper left corner, for a total of 2(M+N)+1 reference pixels. If a reference pixel is not available, the value of the last available reference pixel is used for filling.

[0036] When selecting a certain angular mode for intra prediction, for each pixel in the image block to be encoded, when determining its predicted pixel value, the predicted pixel value of the pixel is determined based on the reference pixels in the direction pointed to by the prediction angle corresponding to the angular mode. In the AV1 standard, to find the predicted pixel values of the pixels in the M*N image block, it is calculated according to the positions of the pixels in the M*N image block within the image block, referring to the gradient values of the neighboring pixels above, in the upper left, and on the left at different angles. In different angular prediction modes, according to the different angles angle indicated by different angular prediction modes, the positions of the neighboring pixels referred to by the pixels in the M*N image block are calculated through gradient calculation, obtaining the predicted pixel coordinate index and offset index, and then the predicted pixel value is determined based on the predicted pixel coordinate index and offset index. Let a certain pixel be (x, y), the predicted pixel coordinate index be β, the offset index be α, and the pixel value of this pixel be f(x, y), then f(x, y) = ref(β)*α + ref(β + 1)*(1 - α). Among them, ref(β) and ref(β + 1) are used to obtain the pixel values of two adjacent reference pixels in the direction pointed to by the prediction angle of this pixel, and α is used to perform weighted summation on the pixel values of the two adjacent reference pixels.

[0037] According to different prediction angles, it can be divided into the following three cases: (1) If angle <= 90°, then the neighboring pixel above is referred to. If the actual pointing position of this angle exceeds the last neighboring pixel on the upper side, the reference pixel takes the last value of the neighboring pixel; (2) If 90° < angle < 180°, then the neighboring pixels above and on the left are referred to. First, the neighboring pixel above is selected. If the actual pointing position of this angle exceeds the neighboring pixel in the upper left corner (i.e., R - 1, -1), then the neighboring pixel on the left is taken; (3) If angel >= 180°, the neighboring pixel on the left is referred to. If the actual pointing position of this angle exceeds the last neighboring pixel on the left, the reference pixel takes the last value of the neighboring pixel.

[0038] In an example, please refer to Figure 4B , taking one pixel as the distance unit, in the process of calculating the predicted pixel value corresponding to the pixel (x, y) in the M*N image block at the angle angle1, first, according to the angle value, the gradient tan(angle1) corresponding to the pixel (x, y) is calculated. Assuming the angle angle is less than 90°, then there is Among them, please refer to Figure 4B, dis0 is the distance of the neighboring pixels of the pixel (x, y) on the horizontal axis X. dis0 can indicate the position of the neighboring pixels of the pixel (x, y). Since the angle angle1 is less than 90°, the neighboring pixels of the pixel (x, y) are located on the upper side. Please refer to Figure 4C , since the gradient value is a decimal, the calculated dis0 usually also has a decimal part. That is, in most cases, the corresponding angle may not exactly point to a certain neighboring pixel (β), but to a position between two neighboring pixels (β) and (β + 1). Therefore, the predicted pixel coordinate index β and the offset index α can be obtained according to dis0. Among them, the predicted pixel coordinate index β is the integer part of dis0, and the offset index α is the decimal part of dis0. Furthermore, based on f(x, y) = ref(β)*α + ref(β + 1)*(1 - α), the neighboring pixel value of the pixel (x, y) can be calculated.

[0039] In the intra prediction mode, an optimal angle mode (i.e., the angle mode with the minimum coding cost) is selected from all angle modes through a competition method, and then it competes with other non-angle modes to obtain the final intra prediction mode, which is written into the bitstream. If the angle mode is finally selected, the index of this angle mode will be written into the bitstream.

[0040] In an example, please refer to Figure 1 , the 128×128 image block is divided according to 7 division methods. For each image block in each division method, 56 angle modes need to be traversed. Calculate the predicted pixel coordinate index β and the offset index α corresponding to the pixels in this image block under 56 angle modes respectively, and then determine the predicted pixel value based on the predicted pixel coordinate index β and the offset index α. Furthermore, determine the difference between the predicted pixel value and the actual pixel value, and select the angle mode with the minimum difference (i.e., the best angle mode) from 56 differences. For example, if the 128×128 image block is divided according to 7 division methods, there are a total of 20 image blocks, and each image block needs to traverse 56 angle modes.

[0041] It can be seen that for an image to be encoded, it can be divided into multiple 128×128 image blocks. There are multiple division methods for 128×128 image blocks. 128×128 image blocks can be further divided into smaller image blocks layer by layer, and each layer of image blocks can also be divided according to different division methods. Each image block in each division method needs to traverse 56 angle modes in the intra prediction mode, and the computational complexity is very high.

[0042] The inventors found that among the 56 angular modes of the AV1 coding standard, except for the angles from 36° to 54°, other angles show a symmetric trend with 135° as the center of symmetry. Therefore, in the embodiments of this specification, this feature is utilized to enable a hardware circuit to calculate the predicted pixel values at a certain predicted angle (if there is a symmetric angle with 135° as the center of symmetry for this predicted angle). When calculating the predicted pixel values at a certain predicted angle, the predicted pixel coordinate index β and the offset index α of this predicted angle are used to calculate the predicted pixel values at another symmetric angle simultaneously, which is beneficial to improving the processing efficiency.

[0043] For the scenario of encoding an image frame according to the AV1 standard, the embodiments of this specification provide a circuit for calculating predicted pixel values in an angular mode. Please refer to Figure 5 , Figure 5 FIG. is a schematic structural diagram of a circuit for calculating predicted pixel values in an angular mode provided by the embodiments of this specification. The circuit includes a neighboring pixel acquisition module 10, a position index determination module 20, and a predicted pixel value calculation module 30.

[0044] The neighboring pixel acquisition module 10 is configured to acquire an array of neighboring pixels of an M*N image block. The neighboring pixels in the array of neighboring pixels are arranged in sequence with the neighboring pixel located at the upper left of the M*N image block as the center of symmetry; M and N are respectively positive integers greater than 0.

[0045] The position index determination module 20 is configured to determine the predicted pixel coordinate index and the offset index corresponding to each pixel in the M*N image block at the predicted angle.

[0046] The predicted pixel value calculation module 30 is configured to obtain the predicted pixel values of each pixel in the M*N image block at the predicted angle according to the predicted pixel coordinate index, the offset index of each pixel in the M*N image block, and the array of neighboring pixels; and, if there is a symmetric angle with 135° as the center of symmetry for the predicted angle, obtain the predicted pixel values of each pixel in the N*M image block at the symmetric angle according to the predicted pixel coordinate index, the offset index of each pixel in the M*N image block, and the reverse sequence of the array of neighboring pixels.

[0047] In this embodiment, for a pair of predicted angles with 135° as the center of symmetry, only the predicted pixel coordinate index and the offset index at one of the predicted angles need to be determined, and then the predicted pixel values at the two angles can be determined based on this predicted pixel coordinate index and the offset index. The number of angles that originally needed to be calculated is reduced from 56 to 32, significantly reducing the amount of calculation and improving the encoding efficiency at the same time.

[0048] In some exemplary embodiments, the neighboring pixels of the M×N image block and the N×M image block are the same, and the M×N image block and the N×M image block are symmetric about a straight line with an inclination angle of 135°. When predicting the M×N image block in a certain angle mode, if there is a symmetric angle with 135° as the symmetry center for the prediction angle corresponding to this angle mode, the inventors found that, in the case where the neighboring pixels are the same, the reference pixels determined by the pixels in the M×N image block along the prediction angle direction and the reference pixels determined by the pixels in the N×M image block along the symmetric angle direction also show a symmetric trend about the straight line with an inclination angle of 135°. Based on this feature, in the embodiments of this specification, when the predicted pixel coordinate index and offset index of the pixels in the M×N image block at the prediction angle are calculated, the neighboring pixels can be symmetrically flipped with the straight line with an inclination angle of 135° as the symmetry center. In this way, based on the predicted pixel coordinate index and offset index of the pixels in the M×N image block at the prediction angle, the predicted pixel value of the pixels in the N×M image block can be determined from the flipped neighboring pixels. In this embodiment, for a pair of prediction angles with 135° as the symmetry center, only the predicted pixel coordinate index and offset index at one of the prediction angles need to be determined, and then the predicted pixel values at two prediction angles with symmetric characteristics can be determined. The number of angles required is reduced from the original 56 to 32, significantly reducing the computational amount and improving the coding efficiency at the same time. In one example, assuming M is not equal to N, the M×N image block and the N×M image block are different rectangular image blocks. Taking the rectangular image block 1 (4×8) and rectangular image block 2 (8×4) in Figure 1 as an example for illustration: Please refer to Figure 6A . The neighboring pixels of the rectangular image block 1 and the rectangular image block 2 are the same, including 12 neighboring pixels above, 12 neighboring pixels on the left, and one neighboring pixel in the upper left corner, for a total of 2(4 + 8)+1 neighboring reference pixels. Figure 6A The gray part in Figure 6A represents the neighboring pixels; and the rectangular image block 1 (4×8) and the rectangular image block 2 (8×4) are symmetric about a straight line with an inclination angle of 135°. Assuming that the 90° angle mode is selected for intra-frame prediction of the rectangular image block 1, and 90° has a symmetric angle (i.e., 180°) with 135° as the symmetry center. It can be seen from

[0049] Figure 6A Figure 6AThe positions of reference pixels b1 and d1 are swapped, and the positions of reference pixels b2 and d2 are swapped; among the flipped neighboring pixels, the reference pixels (d1, d2) determined by pixel A in rectangular image block 1 along the 90° direction are the reference pixels (d1, d2) of pixel C in rectangular image block 2 along the 180° direction. That is to say, when the predicted pixel coordinate index and offset index of pixel A in rectangular image block 1 along the 90° direction are calculated, based on the predicted pixel coordinate index, offset index of pixel A in rectangular image block 1 along the 90° direction and the flipped neighboring pixels, the predicted pixel value of pixel C in rectangular image block 2 along the 180° direction can be determined, realizing that based on the predicted pixel coordinate index and offset index of the M*N image block at the predicted angle, the predicted pixel value of the M*N image block at the predicted angle and the predicted pixel value of the N*M image block at the symmetric angle can be determined.

[0050] In some exemplary embodiments, refer to Figure 4B , Figure 4C and Figure 6B , the angle angle1 has a symmetric angle angle2 with 135° as the center of symmetry, that is, angle1 + angle2 = 135° * 2. The M*N image block and the N*M image block are symmetric about the 135° inclined line, and the symmetric pixel of pixel (x, y) in the M*N image block in the N*M image block is (y, x). Among them, in the process of calculating the predicted pixel value corresponding to pixel (y, x) in the N*M image block at the angle angle2, first, according to the angle value, the gradient corresponding to pixel (y, x) is calculated, then there is Refer to Figure 6B , dis1 is the distance of the neighboring pixel of pixel (y, x) on the horizontal axis Y, and dis1 can indicate the position where the neighboring pixel of pixel (y, x) is located. Since the angle angle2 is greater than 180°, the neighboring pixel of pixel (y, x) is on the left side.

[0051] Obviously, the pixel (x, y) in the M*N image block and the pixel (y, x) in the N*M image block are symmetric about a 135° inclined straight line. The angle angle1 and the angle angle2 are also a pair of symmetric angles with 135° as the center of symmetry. tan(angle1) = tan(270° - angle2), then dis0 = dis1. That is to say, the predicted pixel coordinate index β and the offset index α of the pixel (x, y) in the M*N image block at the angle angle1, and the predicted pixel coordinate index β and the offset index α of the pixel (y, x) in the N*M image block at the angle angle2 are the same. And the neighboring pixels of the pixel (x, y) in the M*N image block at the angle angle1 and the pixel (y, x) in the N*M image block at the angle angle2 are symmetric about a 135° inclined straight line. Therefore, when the angle angle1 and the angle angle2 are a pair of symmetric angles with 135° as the center of symmetry, only the predicted pixel coordinate index β and the offset index α of the pixel (x, y) in the M*N image block at the angle angle1 need to be obtained to calculate the predicted pixel value of the pixel (x, y) in the M*N image block at the angle angle1 and the predicted pixel value of the pixel (y, x) in the N*M image block at the angle angle2; or, only the predicted pixel coordinate index β and the offset index α of the pixel (y, x) in the N*M image block at the angle angle2 need to be obtained to get the predicted pixel values at the two angles. The same predicted pixel coordinate index β and offset index α only need to be calculated once, which is beneficial to reducing the amount of calculation and improving the coding efficiency. In another example, assuming M is equal to N, the M*N image block and the N*M image block are the same square image block. Taking the square image block 3 (8*8) in Figure 1 as an example for illustration: Please refer to Figure 7 . The neighboring pixels of the square image block 3 include 16 neighboring pixels above, 16 neighboring pixels on the left, and one neighboring pixel in the upper left corner, for a total of 2(8 + 8) + 1 neighboring reference pixels. Figure 7 The gray part in Figure 7 represents the neighboring pixels. Assuming the 90° angle mode is selected for intra-frame prediction of the square image block 3, 90° has a symmetric angle (i.e., 180°) with 135° as the center of symmetry. It can be seen from Figure 7 that the reference pixels (b1, b2) determined by the pixel A in the square image block 3 along 90° and the reference pixels (d1, d2) determined by the pixel C in the square image block 3 along 180° are symmetric about a 135° inclined straight line.

[0052] Then the neighboring pixels can be symmetrically flipped with the 135° inclined straight line as the center of symmetry. After the flipping, Figure 7The positions of the reference pixels b1 and d1 are swapped, and the positions of the reference pixels b2 and d2 are swapped; among the flipped neighboring pixels, the reference pixels (d1, d2) determined by the pixel A in the square image block 3 along the 90° direction are the reference pixels (d1, d2) of the pixel C along the 180° direction. That is to say, when the predicted pixel coordinate index and offset index of the pixel A in the square image block 3 along the 90° direction are calculated, based on the predicted pixel coordinate index, offset index of the pixel A along the 90° direction, and the flipped neighboring pixels, the predicted pixel value of the pixel C along the 180° direction can be determined, realizing that based on the predicted pixel coordinate index and offset index of the M*M image block at the predicted angle, the predicted pixel value of the M*M image block at the predicted angle and the predicted pixel value of the M*M image block at the symmetric angle can be determined.

[0053] In some embodiments, when calculating the predicted pixel value in the angle mode in a hardware manner in the embodiments of this specification, the neighboring pixel acquisition module 10 can be used to acquire the neighboring pixel array of the M*N image block, and the position index determination module 20 can be used to determine the predicted pixel coordinate index β and offset index α corresponding to each pixel in the M*N image block at the predicted angle respectively.

[0054] In some embodiments, please refer to Figure 8 The predicted pixel value calculation circuit further includes a control module 40, and the control module 40 is respectively connected to the neighboring pixel acquisition module 10, the position index determination module 20, and the predicted pixel value calculation module 30 to control each module to execute corresponding functions.

[0055] Exemplarily, please refer to Figure 9 The neighboring pixel acquisition module 10 can, under the control of the control module 40, read the neighboring pixels of the M*N image block from the memory 51 storing the encoded reference pixels, generate a one-dimensional neighboring pixel array, and transmit it to the predicted pixel value calculation module 30. The neighboring pixels in the neighboring pixel array are arranged in sequence with the neighboring pixel at the upper left of the M*N image block as the symmetry center. For example, please refer to Figure 10 Figure 10 shows Figure 6A The schematic diagram of the arrangement of the neighboring pixels shown in a one-dimensional array manner. In Figure 10 The neighboring pixel array shown starts with the last neighboring pixel at the lower left in Figure 6A as the first element of the neighboring pixel array, and the last neighboring pixel at the upper right as the last element of the neighboring pixel array, and is arranged in the order of lower left → upper left → upper right. In Figure 10In the adjacent pixel array, the two pairs of pixels, namely the reference pixel b1 and the reference pixel d1, and the reference pixel b2 and the reference pixel d2, are respectively arranged symmetrically with the adjacent reference pixel at the upper left of the M*N image block as the symmetry center. And the reverse sequence of the adjacent pixel array is the result of symmetrically flipping the adjacent pixels shown in Figure 6A with a 135° inclined straight line as the symmetry center.

[0056] Exemplarily, the position index determination module 20 can, under the control of the control module 40, obtain the predicted pixel coordinate index β and the offset index α respectively corresponding to each pixel in the M*N image block at the predicted angle. Among them, the predicted pixel coordinate index β and the offset index α respectively corresponding to each pixel in the M*N image block at the predicted angle are determined according to the predicted angle and the relative position of the pixel in the M*N image block.

[0057] In a possible implementation manner, the position index determination module 20 can, during the prediction process of the M*N image block, calculate in real time the predicted pixel coordinate index β and the offset index α respectively corresponding to the pixel at the predicted angle according to the predicted angle and the relative position of the pixel in the M*N image block.

[0058] In another possible implementation manner, image blocks with the same size, the same division method, and the same relative position after division can be considered as image blocks of the same type. Among them, the relative position after division refers to the relative position of the divided image block in the image block before division. For example, for two different 64×64 image blocks, according to the Figure 2 first division method in, when divided into 4 32×32 image blocks, the two 32×32 image blocks in the upper left corner belong to image blocks of the same type, the two 32×32 image blocks in the upper right corner belong to image blocks of the same type, the two 32×32 image blocks in the lower left corner belong to image blocks of the same type, and the two 32×32 image blocks in the lower right corner belong to image blocks of the same type.

[0059] Since the sizes, partitioning methods, and relative positions after partitioning are the same, the relative positions of the pixels at the same position in different image blocks of the same type within the image blocks are also the same. Further, it can be determined that the predicted pixel coordinate indices β and offset indices α of the pixels at the same position in different image blocks of the same type at the predicted angle corresponding to a certain angle mode are also the same. Therefore, based on this characteristic, the predicted pixel coordinate indices β and offset indices α corresponding to each pixel in various different types of image blocks at different predicted angles (different angle modes) can be determined in advance, and an index table is generated according to the determination result and stored in the memory; the index table indicates the predicted pixel coordinate indices and offset indices corresponding to each pixel in different types of image blocks at different angle modes.

[0060] Please refer to Figure 11 , the position index determination module 20 includes a memory 52 that stores the above index table. Then, during the prediction process of the M*N image block, the position index determination module 20 can obtain the predicted pixel coordinate indices and offset indices corresponding to the M*N image block at the predicted angle from the index table according to the type of the M*N image block and the angle mode indicated by the predicted angle. In this embodiment, it is realized that only one calculation of the predicted pixel coordinate indices and offset indices is required for image blocks of the same type, and the predicted pixel coordinate indices and offset indices can be shared among different image blocks of the same type, saving workload and thus being beneficial to improving the coding efficiency.

[0061] Exemplarily, the index table includes a plurality of sub-index tables, and each sub-index table indicates the predicted pixel coordinate indices β and offset indices α corresponding to each pixel in an image block of one type at one angle mode. Then, during the prediction process of the M*N image block, the position index determination module 20 can obtain the target sub-index table from the index table according to the type of the M*N image block and the angle mode indicated by the predicted angle, and thus obtain the predicted pixel coordinate indices β and offset indices α of each pixel in the M*N image block at the predicted angle.

[0062] Further, considering that there are prediction angles with symmetric properties in the prediction angles, for a pair of prediction angles centered on 135°, only the prediction pixel coordinate index and offset index under one of the prediction angles need to be determined to determine the prediction pixel values under two prediction angles with symmetric characteristics. Therefore, for a pair of prediction angles centered on 135°, only the prediction pixel coordinate index β and offset index α under one of the prediction angles need to be stored in the index table. That is to say, if the prediction angle has a symmetric angle centered on 135°, the index table only stores the prediction pixel coordinate index and offset index corresponding to each pixel of the M*N image block under the prediction angle, and does not store the prediction pixel coordinate index and offset index corresponding to each pixel of the N*M image block under the symmetric angle, which is beneficial to further saving storage space and reducing resource consumption.

[0063] In some embodiments, after obtaining the adjacent pixel array of the M*N image block and the prediction pixel coordinate index and offset index corresponding to each pixel in the M*N image block under the prediction angle, the prediction pixel value calculation module 30 can calculate the prediction pixel value of each pixel in the M*N image block under the prediction angle; and in the case where the prediction angle has a symmetric angle centered on 135°, the prediction pixel value of each pixel in the N*M image block under the symmetric angle can be calculated simultaneously, significantly reducing the amount of calculation in the process of solving the prediction pixel value and improving the processing ability of the prediction pixel value calculation module 30.

[0064] Exemplarily, the prediction pixel value calculation module 30 includes a first calculation unit and a second calculation unit. The first calculation unit is configured to: for each pixel in the M*N image block, obtain a reference pixel from the adjacent pixel array according to the prediction pixel coordinate index of the pixel; determine the prediction pixel value of the pixel under the prediction angle according to the pixel value of the reference pixel and the offset index and output it. For example, taking the Figure 6A shown embodiment as an example, for pixel A in rectangle image block 1, the reference pixels (b1, b2) can be determined along the 90° direction. Then, based on f(x, y) = ref(β)*α + ref(β + 1)*(1 - α), the first calculation unit obtains the reference pixel b1 from the adjacent pixel array based on the prediction pixel coordinate index β, and obtains the reference pixel b2 from the adjacent pixel array based on the prediction pixel coordinate index (β + 1). Then, the prediction pixel value of pixel A = the pixel value of reference pixel b1 * α + the pixel value of reference pixel b2 * (1 - α).

[0065] The second calculation unit is configured to: if there is a symmetric angle of the predicted angle with 135° as the center of symmetry, obtain the reference pixels of the corresponding pixels in the N×M image block from the reverse sequence in the adjacent pixel array according to the predicted pixel coordinate indexes of the pixels in the M×N image block; determine the predicted pixel values of the corresponding pixels in the N×M image block at the symmetric angle according to the pixel values of the reference pixels and the offset index and output them. For example, taking the Figure 6A illustrated embodiment as an example, the pixel C in the rectangular image block 2 is the corresponding pixel of the pixel A in the rectangular image block 1. The reference pixels (d1, d2) of the pixel C in the rectangular image block 2 can be determined along the 180° direction. When the adjacent pixels in the adjacent pixel array are output in reverse order, based on the predicted pixel coordinate index β of the pixel A in the rectangular image block 1 in the 90° direction, the reference pixel d1 can be obtained from the reverse sequence of the adjacent pixel array, and based on the predicted pixel coordinate index (β + 1), the reference pixel d2 can be obtained from the reverse sequence of the adjacent pixel array. Then, the predicted pixel value of the pixel C at 180° = the pixel value of the reference pixel d1 * α+ the pixel value of the reference pixel d2 * (1 - α).

[0066] Based on the parallel calculation processes of the first calculation unit and the second calculation unit, this embodiment can obtain the predicted pixel values at two predicted angles with symmetric characteristics within one clock cycle by using the predicted pixel coordinate indexes and offset indexes at one predicted angle, significantly improving the processing efficiency while reducing the calculation amount.

[0067] Wherein, the pixels in the M×N image block and the corresponding pixels in the N×M image block are symmetric about a straight line with an inclination angle of 135°; in other words, the relative abscissa offset of the pixels in the M×N image block within the image block is equal to the relative ordinate offset of the corresponding pixels in the N×M image block within the image block; and the relative ordinate offset of the pixels in the M×N image block within the image block is equal to the relative abscissa offset of the corresponding pixels in the N×M image block within the image block. For example, please refer to Figure 6A and Figure 7 , the pixel A and the pixel C are symmetric about a straight line with an inclination angle of 135°. Taking the uppermost corner of the image block as the origin (0, 0), the horizontal direction as the abscissa direction, and the vertical direction as the ordinate direction, and each pixel ( Figure 6A each grid in) as a calculation step, then the relative position of the pixel A in the rectangular image block 1 is (7, 3), and the relative position of the pixel C in the rectangular image block 2 is (3, 7).

[0068] In some embodiments, when there is a symmetric angle centered at 135° for the predicted angle, the control module 40 controls the second calculation unit to output the predicted pixel values of each pixel in the N*M image block at the symmetric angle; when there is no symmetric angle for the predicted angle, the second calculation unit is controlled not to output data.

[0069] In a possible implementation manner, considering that the multiplication operation is more complex in the design of the hardware circuit compared to the addition operation and subtraction operation, therefore, in order to simplify the multiplication operation in the first calculation unit and the second calculation unit, f(x, y) = ref(β)*α + ref(β + 1)*(1 - α) can be further converted into f(x, y) = [ref(β) - ref(β + 1)]*α + ref(β + 1). After conversion, only one multiplication operation process is required, which is beneficial to simplifying the circuit design.

[0070] Exemplarily, please refer to Figure 12 , the first calculation unit 31 includes a selector, a subtractor, a multiplier, and an adder.

[0071] The selector is used to read the pixel values of two reference pixels corresponding to the pixel from the adjacent pixel array according to the predicted pixel coordinate index of the pixel in the M*N image block, that is, ref(β) and ref(β + 1); the subtractor is used to obtain the difference between the pixel values of the two reference pixels, that is, [ref(β) - ref(β + 1)]; the multiplier is used to obtain the product of the difference between the pixel values of the two reference pixels and the offset index of the pixel, that is, [ref(β) - ref(β + 1)]*α; the adder is used to obtain the sum of the pixel value of the target reference pixel among the two reference pixels and the product. The target reference pixel is the reference pixel pointed to by (β + 1), that is, [ref(β) - ref(β + 1)]*α + ref(β + 1), so as to obtain the predicted pixel value of the pixel at the predicted angle and output it.

[0072] Exemplarily, please refer to Figure 12 , the second calculation unit 32 includes a selector, a subtractor, a multiplier, an adder, and a flip-flop.

[0073] The selector is used to obtain the pixel values of two reference pixels from the reverse sequence of the neighboring pixel array according to the predicted pixel coordinate indexes of the pixels in the M*N image block; the subtractor is used to obtain the difference between the pixel values of the two reference pixels; the multiplier is used to obtain the product of the difference between the pixel values of the two reference pixels and the offset index of the pixel; the adder is used to obtain the sum of the pixel value of the target reference pixel among the two reference pixels and the product, and the target reference pixel is the reference pixel pointed to by (β+1); the trigger is used to output the sum as the predicted pixel value of the pixel in the N*M image block at the symmetric angle when there is a symmetric angle centered on 135° for the predicted angle.

[0074] In one example, when there is a symmetric angle centered on 135° for the predicted angle, the control module 40 sends an enable control signal to the trigger to control the second calculation unit to output the predicted pixel value of the pixel in the N*M image block at the symmetric angle; when there is no symmetric angle for the predicted angle, the result calculated by the second calculation unit is invalid data, and the control module 40 sends a disable control signal to the trigger to control the second calculation unit not to output data.

[0075] Correspondingly, please refer to Figure 13 , this embodiment of the specification also provides a method for calculating a predicted pixel value in an angle mode, including:

[0076] In step S101, a neighboring pixel array of the M*N image block is obtained, and the neighboring pixels in the neighboring pixel array are arranged in sequence with the neighboring pixel located at the upper left of the M*N image block as the center of symmetry; M and N are respectively integers greater than 0.

[0077] In step S102, the predicted pixel coordinate indexes and offset indexes respectively corresponding to the pixels in the M*N image block at the predicted angle are determined.

[0078] In step S103, according to the predicted pixel coordinate indexes, offset indexes of the pixels in the M*N image block and the neighboring pixel array, the predicted pixel values of the pixels in the M*N image block at the predicted angle are obtained; and if there is a symmetric angle centered on 135° for the predicted angle, according to the predicted pixel coordinate indexes, offset indexes of the pixels in the M*N image block and the reverse sequence of the neighboring pixel array, the predicted pixel values of the pixels in the N*M image block at the symmetric angle are obtained.

[0079] In some embodiments, the neighboring pixels of the M*N image block and the N*M image block are the same, and the M*N image block and the N*M image block are symmetric about a straight line with an inclination angle of 135°.

[0080] In some embodiments, obtaining the predicted pixel values of the pixels in the M*N image block at the predicted angle according to the predicted pixel coordinate indices, offset indices, and the neighboring pixel array of the pixels in the M*N image block includes: in a first calculation unit, for each pixel in the M*N image block, obtaining a reference pixel from the neighboring pixel array according to the predicted pixel coordinate index of the pixel; determining the predicted pixel value of the pixel at the predicted angle according to the pixel value of the reference pixel and the offset index and outputting it.

[0081] If the predicted angle has a symmetric angle with 135° as the center of symmetry, obtaining the predicted pixel values of the pixels in the N*M image block at the symmetric angle according to the predicted pixel coordinate indices, offset indices, and the reverse sequence of the neighboring pixel array of the pixels in the M*N image block includes: in a second calculation unit, if the predicted angle has a symmetric angle with 135° as the center of symmetry, obtaining a reference pixel of the corresponding pixel in the N*M image block from the reverse sequence of the neighboring pixel array according to the predicted pixel coordinate index of the pixel in the M*N image block; determining the predicted pixel value of the corresponding pixel in the N*M image block at the symmetric angle according to the pixel value of the reference pixel and the offset index and outputting it.

[0082] In some embodiments, the pixels in the M*N image block and the corresponding pixels in the N*M image block are symmetric about a straight line with an inclination angle of 135°;

[0083] The relative abscissa offset of the pixels in the M*N image block within the image block is equal to the relative ordinate offset of the corresponding pixels in the N*M image block within the image block; and the relative ordinate offset of the pixels in the M*N image block within the image block is equal to the relative abscissa offset of the corresponding pixels in the N*M image block within the image block.

[0084] In some embodiments, the method further includes: when the predicted angle has a symmetric angle with 135° as the center of symmetry, controlling the second calculation unit to output the predicted pixel values of the pixels in the N*M image block at the symmetric angle; when the predicted angle does not have a symmetric angle, controlling the second calculation unit not to output data.

[0085] In some embodiments, the predicted pixel coordinate indices and offset indices respectively corresponding to the pixels in the M×N image block at the predicted angle are determined according to the predicted angle and the relative positions of the pixels in the M×N image block.

[0086] In some embodiments, the obtaining of the adjacent pixel array of the M×N image block includes: obtaining the predicted pixel coordinate indices and offset indices respectively corresponding to the M×N image block at the predicted angle from a pre-stored index table according to the type to which the M×N image block belongs and the angle mode indicated by the predicted angle; the index table indicates the predicted pixel coordinate indices and offset indices respectively corresponding to each pixel of different types of image blocks in different angle modes; wherein, different image blocks with the same size, the same partitioning method, and the same relative positions after partitioning belong to the same type.

[0087] In some embodiments, if there is a symmetric angle of the predicted angle with 135° as the center of symmetry, the index table only stores the predicted pixel coordinate indices and offset indices respectively corresponding to each pixel of the M×N image block at the predicted angle, and does not store the predicted pixel coordinate indices and offset indices respectively corresponding to each pixel of the N×M image block at the symmetric angle.

[0088] For the relevant parts of the method item, reference may be made to the relevant description of the predicted pixel value calculation circuit in the above angle mode, which will not be elaborated here.

[0089] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the element.

[0090] The specific embodiments of this specification are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0091] The terms used in one or more embodiments of this specification are for the purpose of describing particular embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0092] It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0093] The above are only the preferred embodiments of one or more embodiments of this specification and are not intended to limit one or more embodiments of this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included within the scope of protection of one or more embodiments of this specification.

Claims

1. A prediction pixel value calculation circuit in an angular mode, which is applied to a scenario of encoding an image frame according to the AV1 standard. The circuit includes a neighboring pixel acquisition module, a position index determination module, and a prediction pixel value calculation module; The neighboring pixel acquisition module is configured to acquire an array of neighboring pixels of an M*N image block, and the neighboring pixels in the array of neighboring pixels are arranged in sequence with the neighboring pixel located at the upper left of the M*N image block as the symmetry center; M and N are respectively integers greater than 0; The position index determination module is configured to determine the prediction pixel coordinate index and offset index corresponding to each pixel in the M*N image block under a prediction angle respectively; The prediction pixel value calculation module is configured to obtain the prediction pixel value of each pixel in the M*N image block under the prediction angle according to the prediction pixel coordinate index, offset index of each pixel in the M*N image block, and the array of neighboring pixels; and, if there is a symmetric angle with 135° as the symmetry center for the prediction angle, obtain the prediction pixel value of each pixel in the N*M image block under the symmetric angle according to the prediction pixel coordinate index, offset index of each pixel in the M*N image block, and the reverse sequence of the array of neighboring pixels.

2. The circuit according to claim 1, wherein the neighboring pixels of the M*N image block and the N*M image block are the same, and the M*N image block and the N*M image block are symmetric about a straight line with an inclination angle of 135°.

3. The circuit according to claim 1 or 2, wherein the prediction pixel value calculation module includes a first calculation unit and a second calculation unit; The first calculation unit is configured to: for each pixel in the M*N image block, obtain a reference pixel from the array of neighboring pixels according to the prediction pixel coordinate index of the pixel; determine and output the prediction pixel value of the pixel under the prediction angle according to the pixel value of the reference pixel and the offset index; The second calculation unit is configured to: if there is a symmetric angle with 135° as the symmetry center for the prediction angle, obtain a reference pixel of the corresponding pixel in the N*M image block from the reverse sequence of the array of neighboring pixels according to the prediction pixel coordinate index of the pixel in the M*N image block; determine and output the prediction pixel value of the corresponding pixel in the N*M image block under the symmetric angle according to the pixel value of the reference pixel and the offset index.

4. The circuit according to claim 3, wherein the pixel in the M*N image block and the corresponding pixel in the N*M image block are symmetric about a straight line with an inclination angle of 135°; The relative abscissa offset of the pixels in the M*N image block within the image block is equal to the relative ordinate offset of the corresponding pixels in the N*M image block within the image block; and, the relative ordinate offset of the pixels in the M*N image block within the image block is equal to the relative abscissa offset of the corresponding pixels in the N*M image block within the image block.

5. The circuit according to claim 3, wherein the circuit further comprises a control module; The control module is configured to control the second calculation unit to output the predicted pixel values of the respective pixels in the N*M image block at the symmetric angle when there is a symmetric angle centered at 135° for the predicted angle; and to control the second calculation unit not to output data when there is no symmetric angle for the predicted angle.

6. The circuit according to claim 3, wherein the first calculation unit comprises a selector, a subtractor, a multiplier and an adder; The selector is configured to read the pixel values of two reference pixels corresponding to the pixel from the adjacent pixel array according to the predicted pixel coordinate index of the pixel in the M*N image block; The subtractor is configured to obtain the difference between the pixel values of the two reference pixels; The multiplier is configured to obtain the product of the difference between the pixel values of the two reference pixels and the offset index of the pixel; The adder is configured to obtain the sum of the pixel value of the target reference pixel among the two reference pixels and the product, and output the predicted pixel value of the pixel at the predicted angle; wherein, The target reference pixel is the reference pixel pointed to by the sum of the predicted pixel coordinate index and one.

7. The circuit according to claim 3, wherein the second calculation unit comprises a selector, a subtractor, a multiplier, an adder and a flip-flop; The selector is configured to obtain the pixel values of two reference pixels from the reverse sequence of the adjacent pixel array according to the predicted pixel coordinate index of the pixel in the M*N image block; The subtractor is configured to obtain the difference between the pixel values of the two reference pixels; The multiplier is configured to obtain the product of the difference between the pixel values of the two reference pixels and the offset index of the pixel; The adder is configured to obtain the sum of the pixel value of the target reference pixel among the two reference pixels and the product; wherein, The target reference pixel is the reference pixel pointed to by the sum of the predicted pixel coordinate index and one; The trigger is used to output the sum as the predicted pixel value of the pixel in the N*M image block at the symmetric angle when there is a symmetric angle centered at 135° for the predicted angle.

8. The circuit according to claim 1, wherein the predicted pixel coordinate index and the offset index respectively corresponding to each pixel in the M*N image block at the predicted angle are determined according to the predicted angle and the relative position of the pixel in the M*N image block.

9. The circuit according to claim 1, wherein the position index determination module includes a memory, and an index table is stored in the memory; the index table indicates the predicted pixel coordinate indices and offset indices corresponding to each pixel in different types of image blocks in different angular modes; The position index determination module is configured to obtain the predicted pixel coordinate indices and offset indices corresponding to the M×N image block at the predicted angle from the index table according to the type of the M×N image block and the angular mode indicated by the predicted angle; wherein, Different image blocks with the same size, the same partitioning method, and the same relative position after partitioning belong to the same type.

10. The circuit according to claim 9, if there is a symmetric angle with 135° as the center of symmetry for the predicted angle, the index table only stores the predicted pixel coordinate indices and offset indices corresponding to each pixel in the M×N image block at the predicted angle, and does not store the predicted pixel coordinate indices and offset indices corresponding to each pixel in the N×M image block at the symmetric angle.

11. A method for calculating a predicted pixel value in an angular mode, which is applied to a scenario of encoding an image frame according to the AV1 standard, the method includes: Obtain an adjacent pixel array of the M*N image block, and the adjacent pixels in the adjacent pixel array are arranged in sequence with the adjacent pixel located at the upper left of the M*N image block as the center of symmetry; M and N are respectively integers greater than 0; Determine the predicted pixel coordinate index and offset index corresponding to each pixel in the M*N image block at the predicted angle; Obtain the predicted pixel value of each pixel in the M*N image block at the predicted angle according to the predicted pixel coordinate index, offset index of each pixel in the M*N image block, and the adjacent pixel array; and if there is a symmetric angle centered at 135° for the predicted angle, obtain the predicted pixel value of each pixel in the N*M image block at the symmetric angle according to the predicted pixel coordinate index, offset index of each pixel in the M*N image block, and the reverse sequence of the adjacent pixel array.

12. The method according to claim 11, wherein the neighboring pixels of the M×N image block and the N×M image block are the same, and the M×N image block and the N×M image block are symmetric about a straight line with an inclination angle of 135°.

13. The method according to claim 11 or 12, wherein obtaining the predicted pixel values of the pixels in the M×N image block at the predicted angle according to the predicted pixel coordinate indices, offset indices of the pixels in the M×N image block, and the neighboring pixel array includes: In the first calculation unit, for each pixel in the M*N image block, obtain the reference pixel from the adjacent pixel array according to the predicted pixel coordinate index of the pixel; determine and output the predicted pixel value of the pixel at the predicted angle according to the pixel value of the reference pixel and the offset index; The step of, if there is a symmetric angle centered at 135° for the predicted angle, obtaining the predicted pixel value of each pixel in the N*M image block at the symmetric angle according to the predicted pixel coordinate index, offset index of each pixel in the M*N image block, and the reverse sequence of the adjacent pixel array, includes: In the second calculation unit, if there is a symmetric angle centered at 135° for the predicted angle, obtain the reference pixel of the corresponding pixel in the N*M image block from the reverse sequence of the adjacent pixel array according to the predicted pixel coordinate index of the pixel in the M*N image block; determine and output the predicted pixel value of the corresponding pixel in the N*M image block at the symmetric angle according to the pixel value of the reference pixel and the offset index.

14. An encoder, which is applied to a scenario of encoding an image frame according to the AV1 standard, the encoder includes the circuit for calculating the predicted pixel value in the angular mode according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Image compression device and method

    CN104282030A

  • Directional intra-prediction coding

    CN110622515A