WO2022141282A1 - Video processing method and encoding device - Google Patents
Video processing method and encoding device Download PDFInfo
- Publication number
- WO2022141282A1 WO2022141282A1 PCT/CN2020/141756 CN2020141756W WO2022141282A1 WO 2022141282 A1 WO2022141282 A1 WO 2022141282A1 CN 2020141756 W CN2020141756 W CN 2020141756W WO 2022141282 A1 WO2022141282 A1 WO 2022141282A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image block
- intra
- prediction modes
- sub
- prediction mode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
Definitions
- the present application relates to the field of video coding and decoding, and more particularly, to a video processing method and coding device.
- the video coding process mainly includes steps such as prediction, transformation, quantization, and entropy coding.
- prediction includes two types of intra-frame prediction and inter-frame prediction.
- the current frame to be coded will first be divided into blocks to generate multiple non-overlapping coding regions, and each coding region will be divided into multiple coding blocks. Perform operations such as prediction, transformation, quantization, and entropy coding.
- the present application provides a video processing method and an encoding device, which can more accurately determine the final reconstructed pixels and final prediction mode of an image block to be encoded, and can improve encoding efficiency.
- a video processing method comprising: using initial reconstructed pixels of adjacent blocks of a to-be-coded image block as reference pixels, and determining an optimal intra-frame prediction mode and initial reconstructed pixels of the to-be-coded image block, wherein , the reconstructed pixels of the to-be-coded image block in the optimal intra-frame prediction mode of the to-be-coded image block are the initial reconstructed pixels of the to-be-coded image block;
- the optimal prediction mode is the optimal intra prediction mode of the image block to be encoded
- the final reconstructed pixel of the adjacent block is used as a reference pixel
- the optimal intra prediction mode of the image block to be encoded is used as the reference pixel and the final reconstructed pixel to determine the final prediction mode of the image block to be encoded
- the reconstructed pixel in the final prediction mode of the image block to be encoded is the final reconstructed pixel of the image block to be encoded.
- an encoding device comprising: a memory and a processor, wherein,
- the memory is used to store computer programs
- the processor invokes the computer program, and when the computer program is executed, performs the following operations:
- the optimal intra-frame prediction mode and initial reconstructed pixels of the to-be-coded image block are the initial reconstructed pixels of the to-be-coded image block;
- the optimal prediction mode is the optimal intra prediction mode of the image block to be encoded
- the final reconstructed pixel of the adjacent block is used as a reference pixel
- the optimal intra prediction mode of the image block to be encoded is used as the reference pixel , determining the final prediction mode and final reconstructed pixels of the image block to be encoded, wherein the reconstructed pixels in the final prediction mode of the image block to be encoded are the final reconstructed pixels of the image block to be encoded.
- a third aspect provides a computer-readable storage medium on which codes for executing the method of the first aspect are stored.
- a computer program product comprising code for performing the method of the first aspect.
- FIG. 1 is a schematic diagram of an encoding method.
- FIG. 2 is a schematic flowchart of a video processing method provided by the present application.
- FIG. 3 is a schematic diagram of a specific implementation manner of some steps of the video processing method provided by the present application.
- FIG. 4 is a schematic diagram of a division manner of an image block to be encoded provided by the present application.
- FIG. 5 is a schematic diagram of another division manner of an image block to be encoded provided by the present application.
- FIG. 6 is a schematic diagram of another division manner of an image block to be encoded provided by the present application.
- FIG. 7 is a schematic diagram of staged processing of the video processing method provided by the present application.
- FIG. 8 is a schematic diagram of a pipeline structure of the video processing method provided by the present application.
- FIG. 9 is a schematic structural diagram of an encoding device provided by the present application.
- This application can be applied to various video coding standards, such as H.264, high efficiency video coding (HEVC), universal video coding (VVC), audio video coding standard (audio video coding standard, AVS), AVS+, AVS2 and AVS3, etc.
- video coding standards such as H.264, high efficiency video coding (HEVC), universal video coding (VVC), audio video coding standard (audio video coding standard, AVS), AVS+, AVS2 and AVS3, etc.
- the video coding process mainly includes the steps of prediction, transformation, quantization and entropy coding.
- the current frame to be coded is firstly subjected to block processing to generate multiple non-overlapping coding regions, and then these coding regions are separately coded during coding.
- the coding region may also be referred to as a coding tree unit (coding tree unit, CTU).
- the size of the CTU may be, for example, 64 ⁇ 64, or 128 ⁇ 128 (the unit is a pixel, and the unit is omitted in the similar description below), and the like.
- the coding region can be further divided into square or rectangular image blocks, and operations such as prediction, transformation, quantization and entropy coding are performed on each image block respectively.
- the image block may also be referred to as a coding unit (coding unit, CU).
- coding unit coding unit, CU
- the image block to be encoded is referred to as the image block to be encoded.
- the prediction step in video coding includes two types of intra prediction and inter prediction.
- the intra-frame prediction mainly uses the information of the image in this frame as prediction data to remove the spatial redundancy information of the image block to be encoded.
- the method calculates the predicted value to generate a predicted block, and subtracts the corresponding pixel values of the image block to be encoded and the predicted block to obtain a residual.
- Inter-frame prediction is to use the information of the reference frame as prediction data to remove the temporal redundancy information of the image block to be encoded.
- the residuals are obtained by subtracting the corresponding pixel values of the encoded image block and the predicted block, and the residuals corresponding to the obtained image blocks to be encoded are combined together to obtain the residuals of the to-be-encoded area.
- operations such as transformation, quantization and entropy coding can be used to further improve the coding efficiency.
- the prediction block can be calculated in Planar mode, DC mode or angular mode. Specifically, the reconstructed pixels of the left adjacent and upper adjacent blocks of the image block to be coded are used as reference pixels, and all prediction modes are traversed to perform prediction to generate prediction blocks, and finally, the bits consumed by each prediction mode and the distortion situation are optimized by rate distortion. The method selects the best prediction mode and the corresponding prediction block.
- the pipeline structure shown in Figure 1 is generally used to realize parallel encoding of the encoding area.
- the coding information of adjacent coding regions is not available.
- the to-be-encoded region 1 in the intra-frame prediction stage of the to-be-encoded region 2, the to-be-encoded region 1 only goes to the mode decision stage. At this time, the reconstructed pixel value of the to-be-encoded region 1 cannot be obtained, so the left adjacent encoding cannot be obtained. Reference information for the area.
- the DC value (usually 2 bitdepth-1 , where bitdepth is the pixel bit depth) can be used. ) as the predicted value, or use the original pixel of the adjacent block as the reference pixel for prediction, obtain the reconstructed pixel value in the subsequent pipeline stage and then use the reconstructed pixel value of the adjacent block as the reference pixel for correction.
- the best prediction mode that is decided may be inaccurate. In this case, the inaccurate best prediction mode is used for correction. It will also lead to poor prediction effect, resulting in low video encoding quality.
- the present application provides a video processing method, which can improve video encoding quality while realizing real-time encoding.
- the method provided by the present application will be described below.
- FIG. 2 is a schematic flowchart of a video processing method provided by the application.
- the method may include S210 to S230.
- the reconstructed pixels of the image block to be encoded in the optimal intra prediction mode are the initial reconstructed pixels of the image block to be encoded. That is to say, the initial reconstructed pixels of adjacent blocks of the image block to be encoded are used as reference pixels, and the image block to be encoded is reconstructed based on the best intra prediction mode of the image block to be encoded (for example, including intra prediction, transform , quantization, inverse quantization, inverse transformation, and reconstruction) are the initial reconstructed pixels of the to-be-coded image block.
- the best intra prediction mode of the image block to be encoded for example, including intra prediction, transform , quantization, inverse quantization, inverse transformation, and reconstruction
- the initial reconstructed pixels of the adjacent blocks of the image block to be encoded are the reconstructed pixels of the adjacent blocks of the image block to be encoded in the optimal intra prediction mode of the adjacent blocks of the image block to be encoded.
- the optimal intra-frame prediction mode of the adjacent blocks of the image block to be coded takes the initial reconstructed pixels of the adjacent blocks of the adjacent blocks of the image block to be coded as reference pixels, and the intra-frame prediction of the adjacent blocks of the to-be-coded image block is performed. owned.
- the size of the image block to be encoded is not limited in this application, for example, the size of the image block to be encoded may be 64 ⁇ 64, 32 ⁇ 32, 16 ⁇ 16, or 8 ⁇ 8.
- S220 Determine the optimal prediction mode of the image block to be encoded from the optimal intra prediction mode of the image block to be encoded and the inter prediction mode of the image block to be encoded.
- the best prediction mode of the image block to be coded is the best intra prediction mode of the image block to be coded
- the reconstructed pixels in the final prediction mode of the image block to be encoded are the final reconstructed pixels of the image block to be encoded.
- each image block to be encoded can be encoded in parallel, and since the initial reconstruction pixels of adjacent blocks of the image block to be encoded are used to determine the optimal intra prediction mode of the image block to be encoded, the determined The best intra prediction mode is more accurate.
- the final prediction mode of the to-be-coded image block is determined by using the final reconstructed pixels of the adjacent blocks of the to-be-coded image block, the determined final prediction mode is more accurate.
- S210 may be implemented in two manners (ie, manner 1 and manner 2) that will be described below.
- mode 1 in the case that the image block to be encoded can be divided into multiple sub-image blocks, mode 1 can be adopted, and in the case that the image block to be encoded cannot be divided into smaller sub-blocks, mode 2 can be adopted.
- the second method can also be adopted.
- the first mode and the second mode are respectively described below.
- the first way may include steps S310 to S330.
- S310 Determine the first intra prediction mode and the first initial reconstructed pixels of the to-be-coded image block by using the initial reconstructed pixels of adjacent blocks of the to-be-coded image block as reference pixels.
- S310 may specifically include: using the initial reconstructed pixels of adjacent blocks of the image block to be encoded as reference pixels, using N1 intra prediction modes to perform intra prediction on the image block to be encoded, and determining the first image block to be encoded. Intra prediction mode and first initial reconstructed pixel. where N1 is a positive integer.
- the initial reconstructed pixels of adjacent blocks of the image block to be encoded are used as reference pixels, and N1 intra-frame prediction modes are used to perform intra-frame prediction on the to-be-coded image block, and it is determined that the image block to be encoded is predicted in the N1 types of intra-frame predictions respectively.
- the encoding cost #1 in the mode that is to say, N1 encoding costs #1 can be obtained.
- the intra prediction mode corresponding to the smallest encoding cost #1 among the N1 encoding costs #1 may be used as the first intra prediction mode of the image block to be encoded.
- the coding cost #1 may be a Hadamard (Hadamard, HAD) cost (cost), but this application does not limit this, for example, the coding cost #1 may also be the sum of the absolute difference (Sum of Absolute Difference, SAD). ) cost, absolute transform difference sum (Sum of Absolute Transformed Difference, STAD) cost or rate-distortion (rate-distortion, RD) cost, etc.
- HAD Hadamard
- SAD absolute transform difference sum
- rate-distortion rate-distortion cost
- S310 is described by taking the encoding cost #1 as the HAD cost as an example.
- the initial reconstructed pixels of adjacent blocks of the image block to be encoded are used as reference pixels, and the image block to be encoded is framed using the intra-frame prediction mode.
- Intra prediction the prediction block can be obtained.
- subtract the prediction block from the image block to be coded to obtain the residual and perform HAD transformation on the residual to obtain the HAD cost.
- the N1 HAD costs obtained according to the N1 intra prediction modes are compared, and the intra prediction mode corresponding to the HAD cost with the smallest HAD cost is used as the first intra prediction mode of the image block to be encoded.
- the residual is obtained by subtracting the prediction block corresponding to the first intra-frame prediction mode of the image block to be encoded and the original pixels of the image block to be encoded, and then performing transform quantization and inverse quantization and inverse transformation to obtain the reconstruction residual.
- the prediction blocks corresponding to the first intra prediction mode of the encoded image block are added to obtain the first initial reconstructed pixel.
- the N1 intra-frame prediction modes may include one or more modes from a total of 35 intra-frame prediction modes of 33 angle modes, DC mode and Planar mode.
- the N1 intra prediction modes may be determined by the following steps:
- Step (A1) according to the gradient information of the original pixel of the to-be-coded image block, determine P1 intra-frame prediction modes from Q1 kinds of intra-frame prediction modes, Q1>P1, and both Q1 and P1 are integers;
- Step (A2) Determine the N1 intra prediction modes according to the P1 intra prediction modes.
- P1 N1.
- the Q1 intra prediction modes may include 33 angular modes (or, angular prediction modes), DC mode and Planar mode.
- step (A1) can be realized by the following process:
- each subset in the plurality of subsets includes multiple intra-frame prediction modes in the Q1 intra-frame prediction modes.
- the number of intra prediction modes in each subset may be the same or different.
- the prediction modes in each subset may or may not contain prediction modes in other subsets.
- S12 Determine a subset from the multiple subsets according to the gradient information of the original pixels of the image block to be encoded.
- S13 Use the original pixels of the adjacent blocks of the image block to be encoded as reference pixels, and use each intra prediction mode in the determined subset to perform intra prediction on the image block to be encoded, and determine that the image block to be encoded is in the determined image block. Coding cost #2 for each intra prediction mode in the resulting subset.
- the P1 intra prediction modes with the smallest coding cost #2 in the determined subset are the P1 intra prediction modes.
- the Q1 intra-frame prediction modes are 33 angular modes, a DC mode, and a total of 35 intra-frame prediction modes.
- the 35 intra prediction modes may be divided into multiple subsets according to the direction of the prediction mode.
- 35 intra prediction modes can be divided into 4 subsets as shown in Table 1.
- subset 1 0° ⁇ 0,1,6,7,8,9,10,11,12,13,14 ⁇
- Subset 2 45° ⁇ 0,1,14,15,16,17,18,19,20,21,22 ⁇
- Subset 3 90° ⁇ 0,1,22,23,24,25,26,27,28,29,30 ⁇
- Subset 4 135° ⁇ 0,1,2,3,4,5,30,31,32,33,34 ⁇
- the 35 intra prediction modes can be divided into 8 subsets as shown in Table 2.
- subset 1 -22.5° ⁇ 0,1,4,5,6,7,8 ⁇
- Subset 2 0° ⁇ 0,1,8,9,10,11,12 ⁇
- Subset 3 22.5° ⁇ 0,1,12,13,14,15,16 ⁇
- Subset 4 45° ⁇ 0,1,16,17,18,19,20 ⁇
- Subset 5 67.5° ⁇ 0,1,20,21,22,23,24 ⁇
- Subset 6 90° ⁇ 0,1,24,25,26,27,28 ⁇
- Subset 7 112.5° ⁇ 0,1,28,29,30,31,32 ⁇
- Subset 8 135° ⁇ 0,1,2,3,32,33,34 ⁇
- Example 2 in step S11, 33 angle patterns may be divided into multiple groups of 2, 3, 4, 5, 6, 7, etc., according to the adjacent serial numbers. Take three groups as an example, the details are as follows:
- Each subset may include a DC mode and/or a Planar mode in addition to the prediction mode in its corresponding group.
- step S12 it is assumed that the size of the image block to be encoded is 2Nx2N.
- 5 NxN sub-blocks can be taken from the image block to be encoded to calculate the mean values pa to pe respectively (four are obtained by dividing the quadtree, and then one is taken from the center), and the calculation can be performed by dividing the image block to be encoded along the 0°, 45° °, 90°, 135° (corresponding to a subset respectively) gradient information GI, compare the GI of the four directions, and select a subset corresponding to the direction with the smallest GI. in:
- the to-be-coded image block can be divided into 5 sub-blocks as shown in FIG. D and E. Then the gradient information (Gradient Information) of 4 different prediction directions (0°, 45°, 90° and 135°) can be calculated to obtain 4 gradient information.
- the size of each sub-block is 1/4 of the image block to be encoded.
- A, B, C, and D are the upper left, upper right, lower left, and lower right sub-blocks of the image block to be encoded, respectively, and E is the sub-block at the center of the image block to be encoded (as shown by the dotted line in FIG. 4 ).
- the average value of the pixel values of all the pixels in the sub-block can be calculated, and the average value here can be obtained by arithmetic mean, geometric mean, or other methods
- the average value of which is not limited in this application. Assuming that the average value of the pixel values of the 5 sub-blocks A, B, C, D and E can be expressed as a, b, c, d and e, respectively, then the four 0°, 45°, 90° and 135° can be calculated.
- the gradient information of different prediction directions is as follows:
- the four gradient information GI1, GI2, GI3, and GI4 can be compared to determine the smallest gradient information. Assuming that the minimum gradient information is GI1 and its corresponding prediction direction is 0°, the subset determined in step S12 is the subset corresponding to 0°.
- the to-be-coded image block can be divided into 9 sub-blocks, except for the 5 sub-blocks shown in FIG. 4
- it also includes four sub-blocks F, G, H, and I as shown in FIG. 5 .
- each sub-block is 1/4 of the image block to be encoded.
- F and I are located above and below the center position of the image block to be encoded, respectively, where F is shown as the shaded area in FIG. 5 .
- G and H are located to the left and right of the center position of the image block to be encoded, respectively.
- the average value of the pixel values of all the pixels in the sub-block can be calculated, and the average value here can be an arithmetic average, a geometric average, or an average obtained in other ways, and this application applies to this Not limited.
- the average value of the pixel values of these 9 sub-blocks as a, b, c, d, e, f, g, h and i in turn, then the gradient information of 8 different prediction directions can be calculated subsequently.
- 4 gradient information of 4 different prediction directions of 0°, 45°, 90° and 135° can be obtained similarly to the above example, namely GI1, GI2, GI3 and GI4.
- 4 gradient information of 4 different prediction directions of -22.5°, 22.5°, 67.5° and 112.5° can be obtained similarly by combining the sub-blocks shown in Fig. 4 and Fig. 5, which are as follows:
- these 8 gradient information GI1, GI2, GI3, GI4, GI5, GI6, GI7, and GI8 can be compared to determine which of them is the smallest.
- step S13 the original pixels of adjacent blocks of the image block to be encoded are used as reference pixels, and the 11 intra prediction modes in the determined subset are used to perform intra prediction on the image block to be encoded, and the image block to be encoded is determined. Coding cost #2 in these 11 intra prediction modes. Finally, the intra-frame prediction modes corresponding to the smallest P1 (for example, 5) coding costs #2 among the 11 coding costs #2 may be selected.
- encoding cost #2 may be the same as encoding cost #1, or may be different.
- encoding cost #2 can be HAD cost, SAD cost, STAD cost or RD cost.
- step (A2) may specifically include: according to the F1 intra prediction modes and the P1 intra predictions in the initial most probable mode (Most Probable Mode, MPM) list of adjacent blocks of the image block to be encoded mode, which determines the N1 intra prediction modes.
- the initial MPM list of the adjacent blocks of the image block to be encoded is determined according to the first intra-frame prediction mode of the adjacent blocks of the image block to be encoded, and F1 is a positive integer. It should be understood that the manner of determining the first intra prediction mode of the adjacent blocks of the image block to be encoded is similar to that of determining the first intra prediction mode of the image block to be encoded, and details are not repeated here.
- N1 intra prediction modes may be determined from F1+P1 intra prediction modes.
- N1-F1 intra-frame prediction modes that are different from the F1 intra-frame prediction modes and the F1 intra-frame prediction modes may be used as the N1 intra-frame prediction modes. forecast mode.
- step (A2) the 3 intra-frame prediction modes in the above initial MPM list and the 5 intra-frame prediction modes determined in step (A1) can be used.
- the modes two intra-prediction modes different from the three intra-prediction modes are referred to as the N1 intra-prediction modes.
- the MPM list involved in this application may be determined by any method of determining the MPM list in the prior art.
- the initial MPM list includes 3 intra prediction modes. If the first intra prediction mode of the left adjacent block of the image block to be encoded is the DC mode, the three intra prediction modes in the initial MPM list are the DC mode, the Planar mode and the angle prediction 26 mode.
- the three intra prediction modes in the initial MPM list are: the first intra prediction mode of the left adjacent block of the image block to be encoded Mode; DC mode; Planar, DC, Angle prediction 26, the first of these three modes is different from the first intra prediction mode and DC mode of the left adjacent block of the image block to be encoded.
- V is an integer greater than 1.
- the V sub-image blocks are obtained by dividing the to-be-coded image block according to the first division manner.
- the first division manner may be, for example, a binary tree, a quadtree, or an octree division.
- picture (A) in FIG. 6 is a to-be-coded unit, and the to-be-coded image block in the to-be-coded unit may be divided into the structure shown in (B) of FIG. 6 . That is, the to-be-coded image block includes 4 sub-image blocks.
- S310 and S320 may be executed in parallel.
- S320 may specifically include: using the initial reconstructed pixels of adjacent blocks of each sub-image block as reference pixels, and using N2 intra-frame prediction modes corresponding to each sub-image block to perform intra-frame prediction on each sub-image block, A second intra prediction mode and second initial reconstructed pixels are determined for each sub-image block.
- N2 is a positive integer, and N2 can be equal to or unequal to N1.
- the initial reconstructed pixels of the adjacent blocks of the sub-image block can be used as reference pixels, and the N2 intra prediction modes corresponding to the sub-image block can be used for this sub-image block.
- Perform intra-frame prediction on the sub-image block and select an intra-frame prediction mode with the smallest corresponding coding cost #3 from the N2 kinds of intra-frame prediction modes according to the N2 kinds of coding costs #3 under the N2 kinds of intra-frame prediction modes , as the second intra prediction mode of the sub-image block.
- the residual is obtained by subtracting the prediction block corresponding to the second intra-frame prediction mode of the sub-image block and the original pixel of the sub-image block, and then performing the transformation and quantization and inverse quantization and inverse transformation process to obtain the reconstruction residual.
- the prediction blocks corresponding to the second intra prediction mode of the sub-image block are added to obtain the second initial reconstructed pixel of the sub-image block.
- the coding cost #3 and the coding cost #1 may be the same or different, for example, the coding cost #3 may be HAD cost, SAD cost, STAD cost or RD cost.
- the manner of determining the N2 intra-frame prediction modes corresponding to each sub-image block may be similar to the manner of determining the N1 intra-frame prediction modes corresponding to the image block to be encoded.
- a method for determining the N2 intra prediction modes corresponding to the sub image block #1 will be described below. It should be understood that the sub-image block #1 may be any sub-image block in the V sub-image blocks.
- Determine the N2 intra prediction modes corresponding to sub-image block #1 include:
- Step (B1) according to the gradient information, determine P2 intra-frame prediction modes from Q2 intra-frame prediction modes, Q2>P2, and both Q2 and P2 are integers;
- Step (B2) Determine the N2 intra prediction modes according to the P2 intra prediction modes.
- P2 N2.
- the Q2 intra prediction modes may include 33 angle modes, DC mode and Planar mode.
- step (B1) can be achieved by the following process:
- S21 Determine multiple subsets corresponding to the Q2 intra prediction modes, where each subset in the multiple subsets includes multiple intra prediction modes in the Q2 intra prediction modes.
- the number of intra prediction modes in each subset may be the same or different.
- the prediction modes in each subset may or may not contain prediction modes in other subsets.
- S22 Determine a subset from the plurality of subsets according to the gradient information of the original pixels of the sub-image block #1.
- the Q2 intra-frame prediction modes are 33 angular modes, a DC mode, and a total of 35 intra-frame prediction modes.
- the 35 intra prediction modes may be divided into 4 subsets according to the direction of the prediction mode, that is, the 35 intra prediction modes correspond to 4 subsets, and each subset includes 11 intra predictions model.
- One way of dividing is as follows:
- Subset 1 ⁇ 0,1,6,7,8,9,10,11,12,13,14 ⁇
- Subset 2 ⁇ 0,1,2,3,4,5,30,31,32,33,34 ⁇
- Subset 3 ⁇ 0,1,22,23,24,25,26,27,28,29,30 ⁇
- Subset 4 ⁇ 0,1,14,15,16,17,18,19,20,21,22 ⁇
- step S22 one subset is determined from the four subsets by calculating the gradient information of the original pixels of the sub-image block #1.
- step S12 For this step, reference may be made to the description of step S12, which will not be repeated here.
- step S23 using the original pixels of the adjacent blocks of sub-image block #1 as reference pixels, and using 11 intra-frame prediction modes in the determined subset, perform intra-frame prediction on sub-image block #1, and determine the sub-image block #1. Coding cost #4 of image block #1 in these 11 intra prediction modes. Finally, the intra prediction modes corresponding to the smallest P2 (for example, 5) coding costs #4 among the 11 coding costs #4 may be selected. The selected intra-frame prediction mode is the P2 intra-frame prediction modes.
- encoding cost #4 may be the same as encoding cost #3, or may be different.
- Encoding cost #4 can be the same as encoding cost #2, or it can be different.
- encoding cost #4 can be HAD cost, SAD cost, STAD cost or RD cost.
- step (B2) may include: determining the N2 intra prediction modes according to the F2 intra prediction modes and the P2 intra prediction modes in the initial MPM list of the adjacent blocks of the sub-image block #1 forecast mode.
- the initial MPM list of the adjacent blocks of the sub-image block #1 is determined according to the second intra prediction mode of the adjacent blocks of the sub-image block #1, and F2 is a positive integer.
- N2 intra prediction modes may be determined from F2+P2 intra prediction modes.
- N-F intra prediction modes that are different from the F2 intra prediction modes among the P2 intra prediction modes and the F2 intra prediction modes may be used as the N2 intra prediction modes .
- step (B2) the 3 intra-frame prediction modes in the above-mentioned MPM list and the 5 intra-frame prediction modes determined in step (B1) can be used. Among them, two intra prediction modes different from the three intra prediction modes are used as the N2 intra prediction modes.
- the MPM list involved in this application may be determined by any method of determining the MPM list in the prior art.
- the initial MPM list of adjacent blocks of sub-image block #1 includes 3 intra prediction modes. If the upper adjacent block of sub-image block #1 does not belong to the image block to be coded, in step (B2), it is considered that the second intra prediction mode of the upper adjacent block of sub-image block #1 is DC mode, otherwise, in step (B2) In step (B2), the second intra-frame prediction mode of the upper adjacent block of sub-image block #1 is considered to be the actually obtained second intra-frame prediction mode.
- the initial MPM list of the adjacent blocks of sub-image block #1 includes Palnar mode, DC mode and angle prediction 26 mode; (2) if all are DC mode, the initial MPM list of adjacent blocks of sub-image block #1 includes DC mode, Planar mode and angle prediction 26 mode; (3) if all is the angle prediction mode, then the initial MPM list of the adjacent blocks of sub-image block #1 includes the second intra prediction mode of the left adjacent block (or upper adjacent block) of sub-image block #1, and sub-image block #1 The two angle prediction modes to which the second intra prediction mode of the left adjacent block (or upper adjacent block) of 1 is closest.
- the initial MPM list of the adjacent blocks of sub-image block #1 is: the left phase of sub-image block #1
- the second intra prediction mode of the adjacent block; the second intra prediction mode DC mode of the upper adjacent block of the sub-image block #1; Planar, DC, angle prediction 26, the first of these three modes is related to the sub-image block.
- the V second intra-frame prediction modes and the second initial reconstruction pixels corresponding to the V sub-image blocks may be determined as the best intra-frame prediction mode and initial reconstruction pixels of the to-be-coded image block, In this case, the image block to be encoded needs to be divided into smaller blocks, and intra-frame prediction is performed in units of smaller blocks.
- the first intra prediction mode and the first initial reconstruction pixel are determined as the best intra prediction mode and initial reconstruction pixel of the image block to be encoded. In this case, the image block to be encoded does not need to be smaller , and perform intra-frame prediction in the unit of the image block to be encoded.
- the first intra-frame prediction mode and the first initial reconstruction pixel are determined as the best intra-frame prediction mode and initial reconstruction pixel of the image block to be encoded.
- the product of the first encoding cost and the second preset weight of the image block to be encoded in the first intra prediction mode is greater than (or, greater than or equal to) each sub-image block in the V sub-image blocks.
- the sum of the first coding costs in the second intra-frame prediction mode, the V second intra-frame prediction modes and the second initial reconstruction pixels corresponding to the V sub-image blocks may be determined as the best intra-frame frame of the to-be-coded image block Prediction mode and initial reconstructed pixels.
- the first intra-frame prediction mode and the first initial reconstruction pixel are determined as the best intra-frame prediction mode and initial reconstruction pixel of the image block to be encoded.
- the second intra prediction modes corresponding to each sub-image block may be the same or different.
- the first preset weight may be a positive number less than 1, such as 0.5.
- the second preset weight may be a value greater than 1 and less than 2, such as 1.5.
- N intra-frame prediction modes to perform intra-frame prediction on the image block to be encoded, and determine the optimal intra-frame prediction mode of the image block to be encoded and its initial reconstructed pixels. .
- N is a positive integer.
- the optimal intra-frame prediction mode of the image block to be encoded here may be the same as the first intra-frame prediction mode in the first mode. Therefore, with regard to the second mode, the description of step (1) in the first mode may be referred to, and details are not described herein again.
- step S220 Taking the encoding cost #5 as the RD cost as an example, step S220 will be described.
- the best intra prediction mode of the image block to be encoded is the first intra prediction mode
- the best intra prediction mode of the image block to be encoded is the second intra prediction mode corresponding to each of the V sub image blocks, then compare the sum of the RD cost corresponding to the V sub image blocks with the image block to be encoded in the inter prediction mode RD cost. If the sum of the RD cost corresponding to the V sub-image blocks is small, then the best prediction mode of the image block to be encoded is V second intra prediction modes, otherwise the best prediction mode of the image block to be encoded is the inter prediction mode . It should be understood that the RD cost corresponding to any sub-image block is determined by using the initial reconstructed pixels of adjacent blocks of the sub-image block as reference pixels.
- the best intra prediction mode of the image block to be encoded is the first intra prediction mode
- the best prediction mode of the image block to be encoded is the first intra prediction mode
- the final reconstructed pixel of the adjacent block of the image block to be encoded is used as the reference pixel
- the optimal prediction mode of the image block to be encoded is V second prediction modes
- the final reconstructed pixel of the adjacent block of each sub-image block is used as a reference pixel, and according to the second intra-frame prediction mode of each sub-image block, determine The final prediction mode for each sub-tile.
- the best prediction mode of the image block to be encoded is the first intra prediction mode
- the final reconstructed pixel of the adjacent block of the image block to be encoded is used as the reference pixel, According to the first prediction mode, the final prediction mode of the image block to be encoded is determined.
- the determining the final prediction mode of the to-be-coded image block according to the first intra-frame prediction mode using the final reconstructed pixels of the adjacent blocks of the to-be-coded image block as reference pixels includes: taking the phase of the to-be-coded image block The final reconstructed pixel of the adjacent block is used as a reference pixel to determine the encoding cost #5 of the image block to be encoded in the first intra prediction mode and M1 intra prediction modes; the first intra prediction mode and M1 intra prediction modes are used. Among them, the prediction mode with the smallest encoding cost #5 is determined as the final prediction mode of the image block to be encoded. M1 is a positive integer.
- the encoding cost #5 may be the RD cost, but this application does not limit it.
- the M1 intra prediction modes include one or more of the following: one or more of the W1 intra prediction modes in the final MPM list of the image block to be encoded; or, the N1 One or more intra-prediction modes with the smallest coding cost #1 among the intra-prediction modes except the first intra-prediction mode.
- the final MPM list of the image block to be encoded is generated according to the final prediction mode of the adjacent blocks of the image block to be encoded and/or the best prediction mode of the adjacent blocks of the image block to be encoded.
- the M1 intra prediction modes may include the first intra prediction mode, or the second or third intra prediction mode among the W1 intra prediction modes.
- the final reconstructed pixels of adjacent blocks of the image block to be encoded can also be used as reference pixels to calculate the RD cost, SAD cost, or HAD cost of the image block to be encoded in W1 intra-frame prediction modes, and compare the corresponding costs.
- a small intra prediction mode is used as one of M1 intra prediction modes.
- step (A1) encoding cost #1 corresponding to N1 intra prediction modes can be obtained.
- the intra prediction mode corresponding to the coding cost #1 of the N1 encoding cost #1 times smaller (greater than the first intra prediction mode, but smaller than other intra prediction modes) can be used as one of the M1 intra prediction modes .
- the final MPM list of the image blocks to be encoded may be determined by any method of determining the MPM list in the prior art.
- the first two MPMs in the final MPM list of the image block to be coded are the upper adjacent blocks
- the optimal intra prediction mode of the block and the left adjacent block if the image block to be coded has no upper adjacent block or left adjacent block or the optimal prediction mode is not the optimal intra prediction mode, the final prediction mode of the image block to be coded
- the first MPM in the MPM list is DC mode.
- the optimal intra prediction modes of the upper adjacent block and the left adjacent block are equal: (1) If both are Palnar mode, the final MPM list of the image block to be encoded includes Palnar mode, DC mode and angle prediction 26 mode; ( 2) If all are DC mode, then the final MPM list of the image block to be encoded includes DC mode, Planar mode and angle prediction 26 mode; (3) If all are the angle prediction mode, then the final MPM list of the image block to be encoded includes the left The optimal intra prediction mode of the adjacent block (or the upper adjacent block), and the two angle prediction modes closest to the optimal intra prediction mode of the left adjacent block (or the upper adjacent block).
- the final MPM list of the image block to be encoded is: the intra prediction mode of the left adjacent block; the DC mode of the upper adjacent block; Planar, DC , Angle prediction 26
- the first of these three modes is different from the best intra prediction mode of the left adjacent block and the upper adjacent block.
- the final prediction mode of each sub-image block including: The final reconstructed pixels of adjacent blocks are used as reference pixels to determine the encoding cost #5 of each sub-image block in the corresponding second prediction mode and the corresponding M2 intra prediction modes; the second prediction mode corresponding to each sub-image block is used. and the prediction mode with the smallest coding cost #5 among the corresponding M2 intra-frame prediction modes, is determined as the final prediction mode of the sub-image block.
- M2 is a positive integer.
- the final reconstructed pixel of the adjacent block of the sub-image block #1 is used as a reference pixel to determine the sub-image block #1 in its corresponding second prediction mode and the corresponding encoding cost #5 in M2 intra prediction modes.
- the obtained M2+1 encoding costs #5 are compared, and the intra prediction mode corresponding to the smallest encoding cost #5 is the final prediction mode of the sub-image block.
- step S230 if encoding cost #5 is RD cost, RDO reconstruction needs to be performed first when calculating RD cost.
- M1 intra-frame prediction modes or M1 intra-frame prediction modes can be obtained the corresponding reconstructed pixels.
- the reconstructed pixel corresponding to the intra prediction mode with the smallest RD cost (that is, the final prediction mode of the image block to be encoded) is the final reconstructed pixel of the image block to be encoded.
- step S230 if the encoding cost #5 is not the RD cost, after determining the final prediction mode of the image block to be encoded, the final reconstructed pixel of the adjacent block is used as the reference pixel, and the final prediction mode of the image block to be encoded is used to carry out RDO reconstruction, the obtained reconstructed pixels are the final reconstructed pixels of the image block to be encoded.
- the method may further include: encoding the final prediction mode of the image block to be encoded, and sending the encoded code stream to the decoding end. Then, the decoding end can decode the transmitted video according to the final prediction mode of the image block to be encoded.
- the method provided by the present application may be divided into three stages: a mode preliminary screening stage, a mode decision stage, and a mode correction stage.
- Mode preliminary screening stage Select several optimal intra-frame prediction modes from multiple intra-frame prediction modes.
- 11 intra-frame prediction modes may be selected from 35 intra-frame prediction modes first, and then 5 better intra-frame prediction modes may be selected from the 11 intra-frame prediction modes.
- the 35 intra prediction modes may be firstly divided into 4 subsets according to the direction of the prediction modes, and each subset includes 11 intra prediction modes.
- Determine a mode set by calculating the gradient information of the original pixels of the current block to be coded, and then use the 11 prediction modes in the mode set to perform intra-frame prediction (the reference pixels used in prediction are the original pixels of adjacent blocks) to obtain the predicted block , and then subtract the prediction block from the original pixel block to get the residual, and then perform Hadamard transform to calculate the HAD cost, and select the 5 modes with the smallest HAD cost to transmit to the mode decision stage.
- the 35 intra prediction modes are firstly divided into 4 subsets according to the direction of the prediction mode, and each subset contains 11 intra prediction modes.
- a mode set is determined by calculating the gradient information of the original pixels of the current sub-image block, and then the 11 prediction modes in the mode set are used for intra-frame prediction (the reference pixels used in the prediction are the original pixels of the adjacent blocks of the sub-image block). pixel) to obtain the prediction block, and then subtract the prediction block from the original pixel block to obtain the residual, perform Hadamard transform to calculate HAD cost, and select the 5 modes with the smallest HAD cost to transmit to the mode decision stage.
- the 35 intra prediction modes may be firstly divided into 4 subsets according to the direction of the prediction modes, and each subset includes 11 intra prediction modes.
- Determine a mode set by calculating the gradient information of the original pixels of the current block to be coded, and then use the 11 prediction modes in the mode set to perform intra-frame prediction (the reference pixels used in prediction are the original pixels of adjacent blocks) to obtain the predicted block , and then subtract the prediction block from the original pixel block to get the residual, and then perform Hadamard transform to calculate the HAD cost, and select the 5 modes with the smallest HAD cost to transmit to the mode decision stage.
- Mode decision stage Combine several better intra prediction modes obtained in the mode preliminary screening stage with the intra prediction modes in the MPM list (ie, the initial MPM list) generated by adjacent blocks in the mode decision stage to obtain a variety of modes. Intra-frame prediction mode, and then select the optimal one from these multiple prediction modes to perform the RDO reconstruction process to obtain RD cost. Then compare the RD cost with the RD cost of inter-frame prediction to determine the encoding mode (select the intra-frame prediction mode or select the inter-frame prediction mode).
- the five intra-frame prediction modes obtained in the mode preliminary screening stage and the MPM list generated in the mode decision stage of the adjacent blocks of the current block to be coded (that is, the current block to be coded
- the 3 intra-frame prediction modes in the initial MPM list of adjacent blocks) are combined to obtain new 5 intra-frame prediction modes, and then the optimal one is selected from these 5 prediction modes for the RDO reconstruction process.
- RD cost For each sub-image block, compare the five intra-frame prediction modes obtained in the mode preliminary screening stage with the MPM list generated in the mode decision stage of the adjacent blocks of the sub-image small block (that is, the initial MPM of the adjacent blocks of the sub-image block).
- the 3 intra prediction modes in the list) are combined to obtain new 5 intra prediction modes, and then the optimal one is selected from these 5 prediction modes to perform the RDO reconstruction process to obtain the RD cost. Compare the sum of the RD cost of the V sub-image blocks with the size of the RD cost of the current block to be coded, and compare the smaller RD cost with the RD cost of inter-frame prediction to determine the coding mode.
- the five intra-frame prediction modes obtained in the mode preliminary screening stage with the MPM list generated by the adjacent blocks of the current block to be coded in the mode decision stage (that is, the initial The 3 intra-frame prediction modes in the MPM list) are combined to obtain 5 new intra-frame prediction modes, and then the optimal one is selected from these 5 prediction modes to perform the RDO reconstruction process to obtain the RD cost.
- the coding mode is determined by comparing the RD cost with the RD cost of inter-frame prediction.
- Mode correction stage If the coding mode determined in the mode decision stage is the intra-frame coding mode, the real reconstructed pixels of adjacent blocks (ie, the final reconstructed pixels of adjacent blocks) and the coding mode are used for intra-frame prediction in the mode modification stage. correction.
- the intra prediction mode decided in the mode decision stage to perform the RDO reconstruction process to obtain the reconstructed pixels and RD cost
- the reference pixels used in intra prediction are the reconstructed pixels of adjacent blocks in the mode correction stage (that is, adjacent the final reconstructed pixels of the block).
- 3 intra prediction modes in the MPM list ie, the final MPM list
- the first and mode are selected from the 3 intra prediction modes.
- Different intra-frame prediction modes passed from the decision-making stage perform the RDO reconstruction process to obtain reconstructed pixels and RD cost.
- the intra prediction mode selects the intra prediction mode with the smaller RD cost as the optimal intra prediction mode in the mode correction stage (that is, the final prediction mode of the image block to be encoded), and save its reconstructed pixels.
- the final encoded reconstructed pixel ie, the final reconstructed pixel of the image block to be encoded.
- the mode correction stage is directed to each sub-image block.
- the final MPM list is the final MPM list of sub-image blocks.
- steps (A1) and (B1) correspond to the mode preliminary screening stage; (A2), (B2), S330 and S210 correspond to the mode decision stage; and S230 corresponds to the mode correction stage.
- steps (A1) correspond to the mode preliminary screening stage; (A2) and S210 correspond to the mode decision stage; and S230 corresponds to the mode correction stage.
- the mode preliminary screening stage corresponds to the R-2 flow level
- the mode decision stage corresponds to the R-1 flow stage
- the mode correction stage corresponds to the R-th flow stage.
- loop filtering and entropy coding can also be performed.
- in-loop filtering and entropy coding reference may be made to the prior art.
- the loop filtering may correspond to the R+1th stage pipeline
- the entropy encoding may correspond to the R+2th stage pipeline.
- FIG. 8 shows a schematic diagram of a pipeline structure based on the method shown in FIG. 2 .
- one-stage pipelines are staggered between adjacent coding regions. For example, when coding region 1 goes to R-1 pipeline level, its adjacent coding region 2 goes to R-2 level pipeline. It should be understood that the different stages of pipeline work in parallel.
- the N1 intra-frame prediction modes mentioned above are obtained from the R-2 pipeline stage; the optimal intra-frame prediction mode and the initial reconstructed pixels are obtained from the R-1 pipeline stage; the final prediction mode and The final reconstructed pixels are obtained by the R pipeline stage.
- FIG. 9 is a schematic structural diagram of an encoding device provided by the present application.
- the apparatus 900 may be a physical device or a chip.
- the device may be a camera, an unmanned aerial vehicle, a mobile phone, or other equipment with a video codec processing function.
- the apparatus includes: a memory 910 and a processor 920 .
- Memory 910 may be used to store code.
- the processor 920 may be configured to read the code in the memory to perform the following operations: using the initial reconstructed pixels of the adjacent blocks of the image block to be encoded as reference pixels, determine the optimal intra prediction mode of the image block to be encoded and initial reconstructed pixels, wherein the reconstructed pixels of the to-be-coded image block in the optimal intra prediction mode of the to-be-coded image block are the initial reconstructed pixels of the to-be-coded image block; In the best intra prediction mode of the to-be-coded image block and the inter-frame prediction mode of the to-be-coded image block, determine the best prediction mode of the to-be-coded image block; if the best prediction mode is the best prediction mode of the to-be-coded image block the optimal intra prediction mode, taking the final reconstructed pixels of the adjacent blocks as reference pixels, and determining the final prediction mode and the final reconstructed pixels of the to-be-coded image block according to the best intra-prediction mode of the
- the determining the optimal intra prediction mode and the initial reconstructed pixels of the image block to be encoded by using the initial reconstructed pixels of the adjacent blocks of the image block to be encoded as reference pixels includes: The initial reconstructed pixels of adjacent blocks of the block are used as reference pixels to determine the first intra prediction mode and the first initial reconstructed pixels of the to-be-coded image block; each sub-image block of the V sub-image blocks included in the to-be-coded image block is The initial reconstructed pixels of adjacent blocks of the image block are used as reference pixels to determine the second intra-frame prediction mode and the second initial reconstructed pixels of each sub-image block, and the V sub-image blocks are the image blocks to be encoded according to Obtained by the first division method, V is a positive integer; according to the first coding cost of the to-be-coded image block in the first intra-frame prediction mode and each sub-image block in the V sub-image blocks in the The sum of the first coding costs in the second intra-frame prediction mode determines the optimal intra-frame
- the determining the first intra prediction mode and the first initial reconstructed pixel of the image block to be encoded by using the initial reconstructed pixels of the adjacent blocks of the image block to be encoded as reference pixels includes: The initial reconstructed pixels of adjacent blocks of the to-be-coded image block are used as reference pixels, and N1 intra-frame prediction modes are used to perform intra-frame prediction on the to-be-coded image block, and the first intra-frame prediction mode of the to-be-coded image block is determined. and the first initial reconstructed pixel, N1 is a positive integer.
- determining the second intra prediction mode of each sub-image block by using the initial reconstructed pixels of adjacent blocks of each sub-image block in the V sub-image blocks included in the to-be-coded image block as reference pixels and a second initial reconstructed pixel comprising: using the initial reconstructed pixel of the adjacent block of each sub-image block as a reference pixel, and using N2 intra prediction modes corresponding to each sub-image block
- the block performs intra-frame prediction to determine the second intra-frame prediction mode and the second initial reconstruction pixel of each sub-image block, and N2 is a positive integer.
- the processor is further configured to perform the following operation: according to the gradient information of the original pixels of the image block to be encoded, determine P1 intra prediction modes from Q1 intra prediction modes, Q1>P1, And Q1 and P1 are both integers; the N1 intra prediction modes are determined according to the P1 intra prediction modes.
- PI N1.
- determining the P1 intra prediction modes from the Q1 intra prediction modes according to the gradient information of the original pixels of the to-be-encoded image block includes: determining a plurality of P1 intra prediction modes corresponding to the Q1 intra prediction modes. subsets, each of the subsets includes multiple intra prediction modes in the Q1 intra prediction modes; according to the gradient information of the original pixels of the image block to be encoded, from the multiple subsets Determining a subset; using the original pixels of adjacent blocks of the image block to be encoded as reference pixels, and using each intra prediction mode in the determined subset to perform intra prediction on the image block to be encoded, determining the first encoding cost of the image block to be encoded in each intra-frame prediction mode in the determined subset; determining the P1 intra-frame prediction modes with the smallest first encoding cost in the determined subset is the P1 intra prediction mode.
- the multiple subsets are 4 subsets.
- the number of intra prediction modes included in each subset is the same.
- the Q1 intra-frame prediction modes include Planar mode, DC mode, and 33 angular modes, and/or the types of intra-frame prediction modes included in each subset are 11 types.
- determining the N1 intra prediction modes according to the P1 intra prediction modes includes: according to the F1 intra prediction modes in the initial MPM list of adjacent blocks of the to-be-coded image block and The P1 intra prediction modes determine the N1 intra prediction modes, wherein the initial MPM list is determined according to the first intra prediction mode of the adjacent block of the to-be-coded image block, and F1 is positive integer.
- the N1 intra prediction modes are determined according to the F1 intra prediction modes and the P1 intra prediction modes in the initial MPM list of the adjacent blocks of the to-be-coded image block, including: : take N1-F1 intra-frame prediction modes that are different from the F1 intra-frame prediction modes and the F1 intra-frame prediction modes as the N1 intra-frame prediction modes .
- the processor 720 may further perform the following operation: for each sub-image block, according to the gradient information of the sub-image block, determine P2 intra prediction modes from Q2 intra prediction modes, Q2>P2, and both Q2 and P2 are integers; N2 intra prediction modes of each sub image block are determined according to the P2 intra prediction modes of each sub image block.
- determining P2 intra-frame prediction modes from the Q2 intra-frame prediction modes according to the gradient information of the sub-image block including: according to the direction and/or type of the intra-frame prediction mode, converting the Q2 kinds of frame
- the intra prediction mode is divided into multiple subsets, and each subset in the multiple subsets includes multiple intra prediction modes in the Q2 intra prediction modes; according to the gradient information of the original pixels of the sub image block, from A subset is determined from the plurality of subsets; the original pixels of the adjacent blocks of the sub-image block are used as reference pixels, and each intra-frame prediction mode in the determined subset is used to perform a frame rate on the sub-image block.
- Intra-prediction determining the first coding cost of the sub-image block in each intra-frame prediction mode in the determined subset; performing the P2 intra-frame predictions with the smallest first coding cost in the determined subset
- the mode is determined to be the P2 intra prediction modes.
- the multiple subsets are 4 subsets.
- the number of intra prediction modes included in each subset is the same.
- the Q2 intra-frame prediction modes include Planar mode, DC mode, and 33 angle modes, and/or, the types of intra-frame prediction modes included in each subset are 11 types.
- determining N2 intra-frame prediction modes of each sub-image block according to the P2 intra-frame prediction modes of each sub-image block including: F2 intra-frame prediction modes in the initial MPM list and P2 intra-frame prediction modes of each sub-image block are determined, and N2 intra-frame prediction modes of each sub-image block are determined, wherein the initial MPM list is based on It is determined by the second intra-frame prediction mode of the adjacent blocks of the sub-image block, and F2 is a positive integer.
- N2 intra-frame prediction modes for blocks including: for each sub-image block, assigning the P2 kinds of intra-frame prediction modes of the sub-image block different from the F2 kinds of intra-frame prediction modes of the sub-image block N2-F2 intra prediction modes, and the F2 intra prediction modes of the sub image block are used as the N2 intra prediction modes of the sub image block.
- the first encoding cost is a Hadamard cost
- determining the final prediction mode of the to-be-coded image block according to the best intra-frame prediction mode of the to-be-coded image block by using the final reconstructed pixel of the adjacent block as a reference pixel including: if The best intra-frame prediction mode of the image block to be encoded is the first intra-frame prediction mode, and the final reconstructed pixel of the adjacent block of the image block to be encoded is used as a reference pixel, and it is determined that the image block to be encoded is in The second coding cost under the optimal intra prediction mode and M1 intra prediction modes, and the minimum intra prediction of the second coding cost in the optimal intra prediction mode and M1 intra prediction modes.
- M1 is a positive integer; or, if the best intra-frame prediction mode of the to-be-coded image block is the second intra frame of the V sub-image blocks Prediction mode, for each sub-image block, the final reconstructed pixel of the adjacent block of the sub-image block is used as a reference pixel to determine the second intra-frame prediction mode of the sub-image block and the second coding cost in the M2 intra prediction modes of the sub image block, and the second intra prediction mode of the sub image block and the M2 intra prediction modes of the sub image block
- the second intra-frame prediction mode with the least coding cost is determined as the final prediction mode of the sub-image block, and M2 is a positive integer.
- the M1 intra prediction modes include one or both of the following: one or more of the W1 intra prediction modes in the final most probable mode MPM list of the image block to be encoded.
- the final MPM list of the image block to be encoded is generated according to the final prediction mode of the adjacent blocks of the image block to be encoded and/or the best prediction mode of the adjacent blocks of the image block to be encoded , W1 is a positive integer; among the N1 intra-frame prediction modes, one or more intra-frame prediction modes in which the second coding cost is the smallest except for the first intra-frame prediction mode.
- M1 1
- the M1 intra prediction modes include the first or second or W1th in the final MPM list of the image block to be encoded and the first frame of the image block to be encoded.
- Intra prediction modes with different intra prediction modes include the first or second or W1th in the final MPM list of the image block to be encoded and the first frame of the image block to be encoded.
- the M2 intra-frame prediction modes of the sub-image block include one or both of the following: one of the W2 intra-frame prediction modes in the final MPM list of the sub-image block.
- W2 is a positive integer; among the N2 intra prediction modes of the sub-image block, one or more intra-frames with the smallest second coding cost except the second intra-frame prediction mode of the sub-image block forecast mode.
- M2 1
- the M2 intra prediction modes include the first or the second or the W2th in the final MPM list of the sub image block and the second intra prediction of the sub image block.
- Intra prediction modes with different modes are possible.
- the second coding cost is a rate-distortion cost.
- the determining the optimal intra prediction mode and the first initial reconstruction pixel of the to-be-coded image block by using the initial reconstructed pixels of the adjacent blocks of the to-be-coded image block as reference pixels includes: The initial reconstructed pixels of adjacent blocks of the coded image block are used as reference pixels, and N1 intra-frame prediction modes are used to perform intra-frame prediction on the to-be-coded image block, and the optimal intra-frame prediction mode and initial frame of the to-be-coded image block are determined.
- Reconstructed pixel, N1 is a positive integer.
- the processor 920 may further perform the following operations: encode the final prediction mode of the image block to be encoded, and send the encoded code stream to the decoding end.
- the present application also provides a computer-readable storage medium, on which a computer program (or referred to as a computer instruction) is stored, when the computer program is run on a computer, the computer executes the method to implement The video processing method in the example.
- a computer program or referred to as a computer instruction
- the present application further provides a computer program product, the computer program product includes computer program code, when the computer program code is run on a computer, the computer program code causes the computer to execute the video processing method in the method embodiment of the present application.
- the present application also provides a chip including a processor.
- the memory for storing the computer program is provided independently of the chip, and the processor is used for executing the computer program stored in the memory to execute the video processing method in the method embodiment.
- the chip further includes the memory.
- the chip further includes a communication interface.
- the communication interface may be a transceiver, an input/output interface, a pin or a circuit, or the like.
- processors may be one or more
- memory may be one or more
- the memory may be integrated with the processor, or the memory may be provided separately from the processor.
- the processor may be a logic circuit, an integrated circuit, or the like.
- the present application also provides a chip, which includes an R-2 flow stage, an R-1 flow stage, and an R flow stage.
- the R-2 flow level, the R-1 flow level, and the R flow level may refer to the foregoing description, and will not be repeated here.
- the R-2 flow stage, the R-1 flow stage and the R flow stage work in parallel.
- the processor may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a ready-made Programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, microprocessors, or one or more integrated circuits for controlling the execution of programs in the present application, etc. .
- a processor may include a digital signal processor device, a microprocessor device, an analog-to-digital converter, a digital-to-analog converter, and the like.
- the processor may distribute the control and signal processing functions of the mobile device among the devices according to their respective functions.
- the processor may include functionality to operate one or more software programs, which may be stored in memory.
- the functions of the processor may be implemented by hardware, or may be implemented by hardware executing corresponding software.
- the hardware or software includes one or more units corresponding to the above functions.
- the memory can be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or other types of storage devices that can store information and instructions Dynamic storage device. It can also be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, Laser Disc, Optical Disc, Digital Versatile Disc, Blu-ray Disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer medium, but not limited to this.
- ROM read-only memory
- RAM random access memory
- Dynamic storage device Dynamic storage device. It can also be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (CD
- the computer program product includes one or more computer instructions.
- the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
- the usable media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, digital video disc (DVD)), or semiconductor media (eg, solid state disk (SSD)), etc. .
- the disclosed system, apparatus and method may be implemented in other manners.
- the apparatus embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the technical solution of this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
版权申明Copyright notice
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The disclosure of this patent document contains material that is subject to copyright protection. This copyright belongs to the copyright owner. The copyright owner has no objection to the reproduction by anyone of the patent document or the patent disclosure as it exists in the official records and archives of the Patent and Trademark Office.
本申请涉及视频编解码领域,并且更为具体地,涉及一种视频处理方法和编码装置。The present application relates to the field of video coding and decoding, and more particularly, to a video processing method and coding device.
当前技术中,视频编码过程主要包括预测、变换、量化和熵编码等步骤。其中,预测包括帧内预测和帧间预测两种类型。另外,目前常用的编码技术中,首先都会对当前待编码帧进行划块处理,产生多个互相不重叠的编码区域,并且将每个编码区域划分为多个编码块,对每个编码块分别进行预测、变换、量化和熵编码等操作。In the current technology, the video coding process mainly includes steps such as prediction, transformation, quantization, and entropy coding. Among them, prediction includes two types of intra-frame prediction and inter-frame prediction. In addition, in the currently commonly used coding techniques, the current frame to be coded will first be divided into blocks to generate multiple non-overlapping coding regions, and each coding region will be divided into multiple coding blocks. Perform operations such as prediction, transformation, quantization, and entropy coding.
然而,在对编码块进行帧内预测时,需依赖于该编码块的相邻块的重建像素值。为获得编码块的相邻块的重建像素,一种比较简单的实现方式是,依次编码每个编码区域。但是,这种方式并行化处理能力较低,很难实现高分辨率视频的实时编解码,编码性能较差。However, when performing intra prediction on a coding block, it is necessary to rely on the reconstructed pixel values of the adjacent blocks of the coding block. In order to obtain the reconstructed pixels of the adjacent blocks of the coding block, a relatively simple implementation is to code each coding region in turn. However, this method has low parallel processing capability, it is difficult to realize real-time encoding and decoding of high-resolution video, and the encoding performance is poor.
发明内容SUMMARY OF THE INVENTION
本申请提供一种视频处理方法和编码装置,能够较准确的确定待编码图像块的最终重建像素和最终预测模式,并且能够提高编码效率。The present application provides a video processing method and an encoding device, which can more accurately determine the final reconstructed pixels and final prediction mode of an image block to be encoded, and can improve encoding efficiency.
第一方面,提供一种视频处理方法,包括:将待编码图像块的相邻块的初始重建像素作为参考像素,确定所述待编码图像块的最佳帧内预测模式和初始重建像素,其中,所述待编码图像块在所述待编码图像块的最佳帧内预测模式下的重建像素为所述待编码图像块的初始重建像素;In a first aspect, a video processing method is provided, comprising: using initial reconstructed pixels of adjacent blocks of a to-be-coded image block as reference pixels, and determining an optimal intra-frame prediction mode and initial reconstructed pixels of the to-be-coded image block, wherein , the reconstructed pixels of the to-be-coded image block in the optimal intra-frame prediction mode of the to-be-coded image block are the initial reconstructed pixels of the to-be-coded image block;
从所述待编码图像块的最佳帧内预测模式和所述待编码图像块的帧间预测模式中,确定所述待编码图像块的最佳预测模式;From the optimal intra prediction mode of the to-be-coded image block and the inter-frame prediction mode of the to-be-coded image block, determine the optimal prediction mode of the to-be-coded image block;
若所述最佳预测模式为所述待编码图像块的最佳帧内预测模式,将所述相邻块的最终重建像素作为参考像素,根据所述待编码图像块的最佳帧内预测模式和最终重建像素,确定所述待编码图像块的最终预测模式,其中所述待编码图像块的最终预测模式下的重建像素为所述待编码图像块的最终重建像素。If the optimal prediction mode is the optimal intra prediction mode of the image block to be encoded, the final reconstructed pixel of the adjacent block is used as a reference pixel, and the optimal intra prediction mode of the image block to be encoded is used as the reference pixel and the final reconstructed pixel to determine the final prediction mode of the image block to be encoded, wherein the reconstructed pixel in the final prediction mode of the image block to be encoded is the final reconstructed pixel of the image block to be encoded.
第二方面,提供一种编码装置,包括:存储器和处理器,其中,In a second aspect, an encoding device is provided, comprising: a memory and a processor, wherein,
所述存储器用于存储计算机程序;the memory is used to store computer programs;
所述处理器调用所述计算机程序,当所述计算机程序被执行时,用于执行以下操作:The processor invokes the computer program, and when the computer program is executed, performs the following operations:
将待编码图像块的相邻块的初始重建像素作为参考像素,确定所述待编码图像块的最佳帧内预测模式和初始重建像素,其中,所述待编码图像块在所述待编码图像块的最佳帧内预测模式下的重建像素为所述待编码图像块的初始重建像素;Using the initial reconstructed pixels of adjacent blocks of the to-be-coded image block as reference pixels, determine the optimal intra-frame prediction mode and initial reconstructed pixels of the to-be-coded image block, wherein the to-be-coded image block is in the to-be-coded image The reconstructed pixels in the optimal intra prediction mode of the block are the initial reconstructed pixels of the to-be-coded image block;
从所述待编码图像块的最佳帧内预测模式和所述待编码图像块的帧间预测模式中,确定所述待编码图像块的最佳预测模式;From the optimal intra prediction mode of the to-be-coded image block and the inter-frame prediction mode of the to-be-coded image block, determine the optimal prediction mode of the to-be-coded image block;
若所述最佳预测模式为所述待编码图像块的最佳帧内预测模式,将所述相邻块的最终重建像素作为参考像素,根据所述待编码图像块的最佳帧内预测模式,确定所述待编码图像块的最终预测模式和最终重建像素,其中所述待编码图像块的最终预测模式下的重建像素为所述待编码图像块的最终重建像素。If the optimal prediction mode is the optimal intra prediction mode of the image block to be encoded, the final reconstructed pixel of the adjacent block is used as a reference pixel, and the optimal intra prediction mode of the image block to be encoded is used as the reference pixel , determining the final prediction mode and final reconstructed pixels of the image block to be encoded, wherein the reconstructed pixels in the final prediction mode of the image block to be encoded are the final reconstructed pixels of the image block to be encoded.
第三方面,提供一种计算机可读存储介质,其上存储有用于执行第一方面所述的方法的代码。A third aspect provides a computer-readable storage medium on which codes for executing the method of the first aspect are stored.
第四方面,提供一种计算机程序产品,包括用于执行第一方面所述的方法的代码。In a fourth aspect, a computer program product is provided, comprising code for performing the method of the first aspect.
图1是一种编码方法的示意图。FIG. 1 is a schematic diagram of an encoding method.
图2是本申请提供的视频处理方法的示意图流程图。FIG. 2 is a schematic flowchart of a video processing method provided by the present application.
图3是本申请提供的视频处理方法的部分步骤的具体实现方式的示意图。FIG. 3 is a schematic diagram of a specific implementation manner of some steps of the video processing method provided by the present application.
图4是本申请提供的待编码图像块的一种划分方式的示意图。FIG. 4 is a schematic diagram of a division manner of an image block to be encoded provided by the present application.
图5是本申请提供的待编码图像块的另一种划分方式的示意图。FIG. 5 is a schematic diagram of another division manner of an image block to be encoded provided by the present application.
图6是本申请提供的待编码图像块的另一种划分方式的示意图。FIG. 6 is a schematic diagram of another division manner of an image block to be encoded provided by the present application.
图7是本申请提供的视频处理方法的分阶段处理示意图。FIG. 7 is a schematic diagram of staged processing of the video processing method provided by the present application.
图8是本申请提供的视频处理方法的流水结构示意图。FIG. 8 is a schematic diagram of a pipeline structure of the video processing method provided by the present application.
图9本申请提供的编码装置的示意性结构图。FIG. 9 is a schematic structural diagram of an encoding device provided by the present application.
下面将结合附图,对本申请实施例的技术方案进行描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. Terms used in the specification of the present application are for the purpose of describing specific embodiments only, and are not intended to limit the present application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
本申请可应用于多种视频编码标准,如H.264,高效率视频编码(high efficiency video coding,HEVC),通用视频编码(versatile video coding,VVC),音视频编码标准(audio video coding standard,AVS),AVS+,AVS2以及AVS3等。This application can be applied to various video coding standards, such as H.264, high efficiency video coding (HEVC), universal video coding (VVC), audio video coding standard (audio video coding standard, AVS), AVS+, AVS2 and AVS3, etc.
以下,对视频编码进行简要说明。一般来说,视频编码过程主要包括预测、变换、量化和熵编码等步骤。目前常用的编码技术中,首先都会对当前待编码帧进行划块处理,产生多个互相不重叠的编码区域,然后在编码时对这些编码区域分别进行编码。示例性的,所述编码区域也可称为编码树单元(coding tree unit,CTU)。CTU的尺寸例如可以是64×64,也可以是128×128(单位为像素,后文的类似描述均省略单位)等。在对每个编码区域进行编码时,又可以将编码区域进一步划分为方形或矩形的图像块,对每个图像块分别进行预测、变换、量化和熵编码等操作。示例性的,所述图像块也可称为编码单元(coding unit,CU)。后文中,将待编码的图像块称为待编码图像块。Hereinafter, video coding will be briefly described. Generally speaking, the video coding process mainly includes the steps of prediction, transformation, quantization and entropy coding. In the currently commonly used coding technologies, the current frame to be coded is firstly subjected to block processing to generate multiple non-overlapping coding regions, and then these coding regions are separately coded during coding. Exemplarily, the coding region may also be referred to as a coding tree unit (coding tree unit, CTU). The size of the CTU may be, for example, 64×64, or 128×128 (the unit is a pixel, and the unit is omitted in the similar description below), and the like. When coding each coding region, the coding region can be further divided into square or rectangular image blocks, and operations such as prediction, transformation, quantization and entropy coding are performed on each image block respectively. Exemplarily, the image block may also be referred to as a coding unit (coding unit, CU). Hereinafter, the image block to be encoded is referred to as the image block to be encoded.
视频编码中的预测步骤包括帧内预测和帧间预测两种类型。其中,帧内预测主要是利用本帧图像的信息作为预测数据来去除待编码图像块的空域冗余信息,其过程包括获取待编码图像块的相邻块的重建像素作为参考像素, 采用角度预测方法计算预测值生成预测块,将待编码图像块与预测块的相应像素值相减得到残差。帧间预测是利用参考帧的信息作为预测数据来去除待编码图像块的时域冗余信息,其过程包括在参考图像中搜索与待编码图像块最匹配的图像块作为预测块,然后将待编码图像块与预测块的相应像素值相减得到残差,并将得到的各待编码的图像块对应的残差组合在一起,得到待编码区域的残差。在经过预测步骤产生残差之后还可以采用变换、量化和熵编码等操作进一步提高编码效率。The prediction step in video coding includes two types of intra prediction and inter prediction. The intra-frame prediction mainly uses the information of the image in this frame as prediction data to remove the spatial redundancy information of the image block to be encoded. The method calculates the predicted value to generate a predicted block, and subtracts the corresponding pixel values of the image block to be encoded and the predicted block to obtain a residual. Inter-frame prediction is to use the information of the reference frame as prediction data to remove the temporal redundancy information of the image block to be encoded. The residuals are obtained by subtracting the corresponding pixel values of the encoded image block and the predicted block, and the residuals corresponding to the obtained image blocks to be encoded are combined together to obtain the residuals of the to-be-encoded area. After the residual error is generated through the prediction step, operations such as transformation, quantization and entropy coding can be used to further improve the coding efficiency.
在进行帧内预测时,可以通过Planar模式、DC模式或角度模式计算预测块。具体地,将待编码图像块左相邻和上相邻块的重建像素作为参考像素,遍历所有的预测模式进行预测生成预测块,最后综合每种预测模式消耗的比特和失真情况用率失真优化方法选出最佳的预测模式以及对应的预测块。When performing intra prediction, the prediction block can be calculated in Planar mode, DC mode or angular mode. Specifically, the reconstructed pixels of the left adjacent and upper adjacent blocks of the image block to be coded are used as reference pixels, and all prediction modes are traversed to perform prediction to generate prediction blocks, and finally, the bits consumed by each prediction mode and the distortion situation are optimized by rate distortion. The method selects the best prediction mode and the corresponding prediction block.
现有技术中,对于帧内预测,由于需要参考相邻块的信息,比较简单的实现方式是依次编码图像中的每个编码区域。然而,这样的编码方式并行化处理能力较低,很难实现高分辨率视频的实时编解码。In the prior art, for intra-frame prediction, since it is necessary to refer to the information of adjacent blocks, a relatively simple implementation is to encode each encoding region in the image sequentially. However, such an encoding method has low parallel processing capability, and it is difficult to realize real-time encoding and decoding of high-resolution video.
为了达到实时编解码的目的,一般会采用如图1所示的流水结构,实现编码区域的并行编码。但是,这样就可能会出现相邻编码区域的编码信息不可得的情况。参见图1,在待编码区域2的帧内预测阶段,待编码区域1只进行到模式决策阶段,此时还无法获取到待编码区域1的重建像素值,因此就无法获取到左相邻编码区域的参考信息。一种方式中,在进行待编码区域2的某个待编码图像块的帧内预测时,如果相邻块参考信息不可得,可以用DC值(一般是2 bitdepth-1,bitdepth是像素位深)作为预测值,或者用相邻块的原始像素作为参考像素进行预测,在后续的流水级中获得重建像素值后再用相邻块的重建像素值作为参考像素进行修正。 In order to achieve the purpose of real-time encoding and decoding, the pipeline structure shown in Figure 1 is generally used to realize parallel encoding of the encoding area. However, there may be cases where the coding information of adjacent coding regions is not available. Referring to Figure 1, in the intra-frame prediction stage of the to-be-encoded region 2, the to-be-encoded region 1 only goes to the mode decision stage. At this time, the reconstructed pixel value of the to-be-encoded region 1 cannot be obtained, so the left adjacent encoding cannot be obtained. Reference information for the area. In one way, when performing intra-frame prediction of a certain image block to be coded in region 2 to be coded, if the reference information of adjacent blocks is not available, the DC value (usually 2 bitdepth-1 , where bitdepth is the pixel bit depth) can be used. ) as the predicted value, or use the original pixel of the adjacent block as the reference pixel for prediction, obtain the reconstructed pixel value in the subsequent pipeline stage and then use the reconstructed pixel value of the adjacent block as the reference pixel for correction.
然而,由于之前帧内预测时是用DC值作为预测或者用原始像素作为参考来进行预测的,决策出的最佳预测模式可能不准,这时沿用之前不准的最佳预测模式来进行修正同样也会导致预测效果较差,导致视频编码质量偏低。However, because the DC value is used as prediction or the original pixel is used as a reference for prediction in the previous intra-frame prediction, the best prediction mode that is decided may be inaccurate. In this case, the inaccurate best prediction mode is used for correction. It will also lead to poor prediction effect, resulting in low video encoding quality.
有鉴于此,本申请提供了一种视频处理方法,在实现实时编码的同时,能够提高视频编码质量。下面对本申请提供的方法进行说明。In view of this, the present application provides a video processing method, which can improve video encoding quality while realizing real-time encoding. The method provided by the present application will be described below.
图2是申请提供的一种视频处理方法的示意图流程图。该方法可以包括S210至S230。FIG. 2 is a schematic flowchart of a video processing method provided by the application. The method may include S210 to S230.
S210,将待编码图像块的相邻块的初始重建像素作为参考像素,确定该 待编码图像块的最佳帧内预测模式和待编码图像块的初始重建像素。S210, using the initial reconstructed pixels of adjacent blocks of the to-be-coded image block as reference pixels, determine the optimal intra-frame prediction mode of the to-be-coded image block and the initial reconstructed pixels of the to-be-coded image block.
其中,待编码图像块在该最佳帧内预测模式下的重建像素为该待编码图像块的初始重建像素。也就是说,将待编码图像块的相邻块的初始重建像素作为参考像素,基于该待编码图像块的最佳帧内预测模式对该待编码图像块进行重建(例如包括帧内预测、变换、量化、反量化、反变换、重建)所得到的重建像素,为该待编码图像块的初始重建像素。The reconstructed pixels of the image block to be encoded in the optimal intra prediction mode are the initial reconstructed pixels of the image block to be encoded. That is to say, the initial reconstructed pixels of adjacent blocks of the image block to be encoded are used as reference pixels, and the image block to be encoded is reconstructed based on the best intra prediction mode of the image block to be encoded (for example, including intra prediction, transform , quantization, inverse quantization, inverse transformation, and reconstruction) are the initial reconstructed pixels of the to-be-coded image block.
应理解,待编码图像块的相邻块的初始重建像素是待编码图像块的相邻块在待编码图像块的相邻块的最佳帧内预测模式下的重建像素。待编码图像块的相邻块的最佳帧内预测模式是以待编码图像块的相邻块的相邻块的初始重建像素作为参考像素,对待编码图像块的相邻块进行帧内预测所得到的。It should be understood that the initial reconstructed pixels of the adjacent blocks of the image block to be encoded are the reconstructed pixels of the adjacent blocks of the image block to be encoded in the optimal intra prediction mode of the adjacent blocks of the image block to be encoded. The optimal intra-frame prediction mode of the adjacent blocks of the image block to be coded takes the initial reconstructed pixels of the adjacent blocks of the adjacent blocks of the image block to be coded as reference pixels, and the intra-frame prediction of the adjacent blocks of the to-be-coded image block is performed. owned.
还应理解,本申请对待编码图像块的尺寸不作限定,比如该待编码图像块的尺寸可以是64×64、32×32、16×16或者8×8等。It should also be understood that the size of the image block to be encoded is not limited in this application, for example, the size of the image block to be encoded may be 64×64, 32×32, 16×16, or 8×8.
S220,从待编码图像块的最佳帧内预测模式和待编码图像块的帧间预测模式中,确定待编码图像块的最佳预测模式。S220: Determine the optimal prediction mode of the image block to be encoded from the optimal intra prediction mode of the image block to be encoded and the inter prediction mode of the image block to be encoded.
S230,若待编码图像块的最佳预测模式为待编码图像块的最佳帧内预测模式,将待编码图像块的相邻块的最终重建像素作为参考像素,根据待编码图像块的最佳帧内预测模式,确定待编码图像块的最终预测模式和待编码图像块的最终重建像素。其中,待编码图像块的最终预测模式下的重建像素为待编码图像块的最终重建像素。S230, if the best prediction mode of the image block to be coded is the best intra prediction mode of the image block to be coded, take the final reconstructed pixel of the adjacent block of the image block to be coded as a reference pixel, according to the best prediction mode of the image block to be coded Intra prediction mode, which determines the final prediction mode of the image block to be encoded and the final reconstructed pixels of the image block to be encoded. The reconstructed pixels in the final prediction mode of the image block to be encoded are the final reconstructed pixels of the image block to be encoded.
综上,根据本申请提供的方法,可以并行编码各个待编码图像块,并且由于采用待编码图像块的相邻块的初始重建像素确定待编码图像块的最佳帧内预测模式,因此确定的最佳帧内预测模式较准确。此外,由于采用待编码图像块的相邻块的最终重建像素确定待编码图像块的最终预测模式,因此所确定的最终预测模式较准确。To sum up, according to the method provided by the present application, each image block to be encoded can be encoded in parallel, and since the initial reconstruction pixels of adjacent blocks of the image block to be encoded are used to determine the optimal intra prediction mode of the image block to be encoded, the determined The best intra prediction mode is more accurate. In addition, since the final prediction mode of the to-be-coded image block is determined by using the final reconstructed pixels of the adjacent blocks of the to-be-coded image block, the determined final prediction mode is more accurate.
下面对方法200中的各步骤进行详细描述。The steps in the method 200 are described in detail below.
示例性的,S210可以通过下面即将描述的两种方式(即,方式一和方式二)实现。Exemplarily, S210 may be implemented in two manners (ie, manner 1 and manner 2) that will be described below.
可选地,在待编码图像块可以被划分为多个子图像块的情况下,可以采用方式一,在待编码图像块不能被划分为更小的子块的情况下,可以采用方式二。Optionally, in the case that the image block to be encoded can be divided into multiple sub-image blocks, mode 1 can be adopted, and in the case that the image block to be encoded cannot be divided into smaller sub-blocks, mode 2 can be adopted.
或者,在待编码图像块可以被划分为多个子图像块的情况下,也可以采 用方式二。Alternatively, in the case that the image block to be encoded can be divided into multiple sub-image blocks, the second method can also be adopted.
下面对方式一和方式二分别进行说明。The first mode and the second mode are respectively described below.
方式一method one
参见图3,方式一可以包括步骤S310至S330。Referring to FIG. 3 , the first way may include steps S310 to S330.
S310,将待编码图像块的相邻块的初始重建像素作为参考像素,确定待编码图像块的第一帧内预测模式及第一初始重建像素。S310: Determine the first intra prediction mode and the first initial reconstructed pixels of the to-be-coded image block by using the initial reconstructed pixels of adjacent blocks of the to-be-coded image block as reference pixels.
可选地,S310具体可以包括:将待编码图像块的相邻块的初始重建像素作为参考像素,采用N1种帧内预测模式对待编码图像块进行帧内预测,确定待编码图像块的第一帧内预测模式及第一初始重建像素。其中N1为正整数。Optionally, S310 may specifically include: using the initial reconstructed pixels of adjacent blocks of the image block to be encoded as reference pixels, using N1 intra prediction modes to perform intra prediction on the image block to be encoded, and determining the first image block to be encoded. Intra prediction mode and first initial reconstructed pixel. where N1 is a positive integer.
具体来讲,以待编码图像块的相邻块的初始重建像素作为参考像素,采用N1种帧内预测模式对待编码图像块进行帧内预测,确定待编码图像块分别在该N1种帧内预测模式下的编码代价#1,也就是说可以得到N1个编码代价#1。N1个编码代价#1中最小的编码代价#1对应的帧内预测模式可以作为待编码图像块的第一帧内预测模式。Specifically, the initial reconstructed pixels of adjacent blocks of the image block to be encoded are used as reference pixels, and N1 intra-frame prediction modes are used to perform intra-frame prediction on the to-be-coded image block, and it is determined that the image block to be encoded is predicted in the N1 types of intra-frame predictions respectively. The encoding cost #1 in the mode, that is to say, N1 encoding costs #1 can be obtained. The intra prediction mode corresponding to the smallest encoding cost #1 among the N1 encoding costs #1 may be used as the first intra prediction mode of the image block to be encoded.
示例性的,编码代价#1可以是哈达玛(Hadamard,HAD)代价(cost),但本申请对此不作限定,比如,编码代价#1还可以是绝对差值和(Sum of Absolute Difference,SAD)cost、绝对变换差和(Sum of Absolute Transformed Difference,STAD)cost或者率失真(rate-distortion,RD)cost等。Exemplarily, the coding cost #1 may be a Hadamard (Hadamard, HAD) cost (cost), but this application does not limit this, for example, the coding cost #1 may also be the sum of the absolute difference (Sum of Absolute Difference, SAD). ) cost, absolute transform difference sum (Sum of Absolute Transformed Difference, STAD) cost or rate-distortion (rate-distortion, RD) cost, etc.
以编码代价#1为HAD cost为例对S310进行说明。在S310中,对于N1种帧内预测模式中的任一种帧内预测模式,以待编码图像块的相邻块的初始重建像素作为参考像素,采用该帧内预测模式对待编码图像块进行帧内预测,可以得到预测块。然后,将预测块与待编码图像块相减得到残差,并对残差进行HAD变换可以得到HAD cost。比较根据N1种帧内预测模式所得到的N1个HAD cost,将HAD cost最小的HAD cost所对应的帧内预测模式作为待编码图像块的第一帧内预测模式。以待编码图像块的第一帧内预测模式对应的预测块与待编码图像块的原始像素相减得到残差再进行变换量化和反量化反变换过程得到重建残差,将重建残差与待编码图像块的第一帧内预测模式对应的预测块相加得到第一初始重建像素。S310 is described by taking the encoding cost #1 as the HAD cost as an example. In S310, for any one of the N1 intra-frame prediction modes, the initial reconstructed pixels of adjacent blocks of the image block to be encoded are used as reference pixels, and the image block to be encoded is framed using the intra-frame prediction mode. Intra prediction, the prediction block can be obtained. Then, subtract the prediction block from the image block to be coded to obtain the residual, and perform HAD transformation on the residual to obtain the HAD cost. The N1 HAD costs obtained according to the N1 intra prediction modes are compared, and the intra prediction mode corresponding to the HAD cost with the smallest HAD cost is used as the first intra prediction mode of the image block to be encoded. The residual is obtained by subtracting the prediction block corresponding to the first intra-frame prediction mode of the image block to be encoded and the original pixels of the image block to be encoded, and then performing transform quantization and inverse quantization and inverse transformation to obtain the reconstruction residual. The prediction blocks corresponding to the first intra prediction mode of the encoded image block are added to obtain the first initial reconstructed pixel.
应理解,如何根据残差计算HAD cost、SAD cost、STAD cost、RD cost等可以参照现有技术,本申请不再赘述。It should be understood that how to calculate HAD cost, SAD cost, STAD cost, RD cost, etc. according to the residual can refer to the prior art, which will not be repeated in this application.
示例性的,一种方式中,所述N1种帧内预测模式可以包括33种角度模式、DC模式和Planar模式共35种帧内预测模式中的一种或多种模式。Exemplarily, in one manner, the N1 intra-frame prediction modes may include one or more modes from a total of 35 intra-frame prediction modes of 33 angle modes, DC mode and Planar mode.
另一种方式中,所述N1种帧内预测模式可以通过下述步骤确定:In another way, the N1 intra prediction modes may be determined by the following steps:
步骤(A1),根据待编码图像块的原始像素的梯度信息,从Q1种帧内预测模式中确定P1种帧内预测模式,Q1>P1,且Q1和P1均为整数;Step (A1), according to the gradient information of the original pixel of the to-be-coded image block, determine P1 intra-frame prediction modes from Q1 kinds of intra-frame prediction modes, Q1>P1, and both Q1 and P1 are integers;
步骤(A2),根据所述P1种帧内预测模式,确定所述N1种帧内预测模式。Step (A2): Determine the N1 intra prediction modes according to the P1 intra prediction modes.
可选地,P1=N1。比如,P1=N1=5。Optionally, P1=N1. For example, P1=N1=5.
可选地,Q1种帧内预测模式可以包括33种角度模式(或称,角度预测模式)、DC模式和Planar模式。Optionally, the Q1 intra prediction modes may include 33 angular modes (or, angular prediction modes), DC mode and Planar mode.
可选地,步骤(A1)可以通过下述过程实现:Optionally, step (A1) can be realized by the following process:
S11:确定所述Q1种帧内预测模式对应的多个子集。其中,该多个子集中的每个子集包括所述Q1种帧内预测模式中的多种帧内预测模式。其中,每个子集中的帧内预测模式的数量可以相同,也可以不同。各个子集中的预测模式可以包含其他子集中的预测模式,也可以不包含。S11: Determine multiple subsets corresponding to the Q1 intra prediction modes. Wherein, each subset in the plurality of subsets includes multiple intra-frame prediction modes in the Q1 intra-frame prediction modes. The number of intra prediction modes in each subset may be the same or different. The prediction modes in each subset may or may not contain prediction modes in other subsets.
S12:根据待编码图像块的原始像素的梯度信息,从该多个子集中确定一个子集。S12: Determine a subset from the multiple subsets according to the gradient information of the original pixels of the image block to be encoded.
S13:将待编码图像块的相邻块的原始像素作为参考像素,采用所确定出的子集中的每种帧内预测模式,对待编码图像块进行帧内预测,确定待编码图像块在所确定出的子集中的每种帧内预测模式下的编码代价#2。所确定出的子集中编码代价#2最小的P1种帧内预测模式即为所述P1种帧内预测模式。S13: Use the original pixels of the adjacent blocks of the image block to be encoded as reference pixels, and use each intra prediction mode in the determined subset to perform intra prediction on the image block to be encoded, and determine that the image block to be encoded is in the determined image block. Coding cost #2 for each intra prediction mode in the resulting subset. The P1 intra prediction modes with the smallest coding cost #2 in the determined subset are the P1 intra prediction modes.
以下以所述Q1种帧内预测模式为33种角度模式、DC模式和Planar模式共35种帧内预测模式为例,对上述过程进行说明。The above process will be described below by taking as an example that the Q1 intra-frame prediction modes are 33 angular modes, a DC mode, and a total of 35 intra-frame prediction modes.
示例1,在步骤S11中,可以将35种帧内预测模式按照预测模式的方向划分为多个子集。Example 1, in step S11, the 35 intra prediction modes may be divided into multiple subsets according to the direction of the prediction mode.
比如,可以将35种帧内预测模式划分为如表1所示的4个子集。For example, 35 intra prediction modes can be divided into 4 subsets as shown in Table 1.
表1Table 1
再如,可以将35种帧内预测模式划分为如表2所示的8个子集。For another example, the 35 intra prediction modes can be divided into 8 subsets as shown in Table 2.
表2Table 2
示例2,在步骤S11中,可以将33种角度模式按照序号相邻的方式分成2、3、4、5、6、7等多个组。以分为3个组为例,具体如下:Example 2, in step S11, 33 angle patterns may be divided into multiple groups of 2, 3, 4, 5, 6, 7, etc., according to the adjacent serial numbers. Take three groups as an example, the details are as follows:
第1组:2、3、4、5、6、7、8、9、10、11、12Group 1: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
第2组:13、14、15、16、17、18、19、20、21、22、23Group 2: 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
第3组:24、25、26、27、28、29、30、31、32、33、34Group 3: 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34
3个分组对应3个子集,每个子集除包括其对应的分组中的预测模式外,还可以包括DC模式和/或Planar模式。Three groups correspond to three subsets, and each subset may include a DC mode and/or a Planar mode in addition to the prediction mode in its corresponding group.
在步骤S12中,假设待编码图像块的尺寸为2Nx2N。一个示例中,可以从待编码图像块中取5个NxN的子块分别计算均值pa~pe(四叉树划分得到4个,然后中心取一个),计算将待编码图像块沿0°、45°、90°、135°(分别对应一个子集)的梯度信息GI,比较4个方向的GI,并选择GI最小的方向对应的一个子集。其中:In step S12, it is assumed that the size of the image block to be encoded is 2Nx2N. In an example, 5 NxN sub-blocks can be taken from the image block to be encoded to calculate the mean values pa to pe respectively (four are obtained by dividing the quadtree, and then one is taken from the center), and the calculation can be performed by dividing the image block to be encoded along the 0°, 45° °, 90°, 135° (corresponding to a subset respectively) gradient information GI, compare the GI of the four directions, and select a subset corresponding to the direction with the smallest GI. in:
0°:GI=|pb-pa|+|pd-pc|,0°: GI=|pb-pa|+|pd-pc|,
45°:GI=|pc-pe|+|pe-pb|,45°: GI=|pc-pe|+|pe-pb|,
90°:GI=|pc-pa|+|pd-pb|,90°: GI=|pc-pa|+|pd-pb|,
135°:GI=|pd-pe|+|pe-pa|。135°: GI=|pd-pe|+|pe-pa|.
比如,若步骤S11中的多个子集为表1所示的4个子集,那么,可以按照如图4所示的方式将待编码图像块划分为5个子块,分别为A、B、C、D和E。随后可以计算4个不同的预测方向(0°、45°、90°和135°)的梯度信息(Gradient Information),得到4个梯度信息。其中,每个子块的大小都是待编码图像块的1/4。A、B、C、D分别是待编码图像块的左上、右上、左下、右下的子块,E是待编码图像块的中心位置处的子块(如图4中虚线所示)。For example, if the multiple subsets in step S11 are the 4 subsets shown in Table 1, then the to-be-coded image block can be divided into 5 sub-blocks as shown in FIG. D and E. Then the gradient information (Gradient Information) of 4 different prediction directions (0°, 45°, 90° and 135°) can be calculated to obtain 4 gradient information. The size of each sub-block is 1/4 of the image block to be encoded. A, B, C, and D are the upper left, upper right, lower left, and lower right sub-blocks of the image block to be encoded, respectively, and E is the sub-block at the center of the image block to be encoded (as shown by the dotted line in FIG. 4 ).
针对A、B、C、D和E这5个子块中的每一个子块,可以计算其中的所有像素的像素值的平均值,这里的平均值可以为算术平均、几何平均、或者其他方式得到的均值,本申请对此不限定。假设A、B、C、D和E这5个子块的像素值的平均值分别可以表示为a、b、c、d和e,那么可以计算0°、45°、90°和135°这4个不同的预测方向的梯度信息依次为:For each of the five sub-blocks A, B, C, D, and E, the average value of the pixel values of all the pixels in the sub-block can be calculated, and the average value here can be obtained by arithmetic mean, geometric mean, or other methods The average value of , which is not limited in this application. Assuming that the average value of the pixel values of the 5 sub-blocks A, B, C, D and E can be expressed as a, b, c, d and e, respectively, then the four 0°, 45°, 90° and 135° can be calculated. The gradient information of different prediction directions is as follows:
GI1=|b-a|+|d-c|,GI1=|b-a|+|d-c|,
GI2=|c-e|+|e-b|,GI2=|c-e|+|e-b|,
GI3=|c-a|+|d-b|,GI3=|c-a|+|d-b|,
GI4=|d-e|+|e-a|。GI4=|d-e|+|e-a|.
然后,可以比较这四个梯度信息GI1、GI2、GI3和GI4,确定最小的梯度信息。假设最小的梯度信息为GI1,其对应的预测方向为0°,则S12步骤中所确定出的子集为0°所对应的子集。Then, the four gradient information GI1, GI2, GI3, and GI4 can be compared to determine the smallest gradient information. Assuming that the minimum gradient information is GI1 and its corresponding prediction direction is 0°, the subset determined in step S12 is the subset corresponding to 0°.
在一个示例中,若步骤S11中的多个子集为表2所示的8个子集,那么,可以将待编码图像块划分为9个子块,这9个子块除了如图4所示的5个子块A、B、C、D和E之外,还包括如图5所示的F、G、H、I这4个子块。In an example, if the multiple subsets in step S11 are the 8 subsets shown in Table 2, then the to-be-coded image block can be divided into 9 sub-blocks, except for the 5 sub-blocks shown in FIG. 4 In addition to blocks A, B, C, D and E, it also includes four sub-blocks F, G, H, and I as shown in FIG. 5 .
其中,每个子块的大小都是待编码图像块的1/4。F和I分别位于待编码图像块的中心位置的上方和下方,其中F如图5中的阴影区域所示。G和H分别位于待编码图像块的中心位置的左方和右方。The size of each sub-block is 1/4 of the image block to be encoded. F and I are located above and below the center position of the image block to be encoded, respectively, where F is shown as the shaded area in FIG. 5 . G and H are located to the left and right of the center position of the image block to be encoded, respectively.
类似地,可以针对9个子块中的每一个子块,计算其中的所有像素的像素值的平均值,这里的平均值可以为算术平均、几何平均、或者其他方式得到的均值,本申请对此不限定。将这9个子块的像素值的平均值依次表示为a、b、c、d、e、f、g、h和i,那么随后可以计算8个不同的预测方向的梯度信息。Similarly, for each of the 9 sub-blocks, the average value of the pixel values of all the pixels in the sub-block can be calculated, and the average value here can be an arithmetic average, a geometric average, or an average obtained in other ways, and this application applies to this Not limited. Denote the average value of the pixel values of these 9 sub-blocks as a, b, c, d, e, f, g, h and i in turn, then the gradient information of 8 different prediction directions can be calculated subsequently.
其中,可以在图4中的5个子块的基础上与上例类似地得到0°、45°、 90°和135°这4个不同的预测方向的4个梯度信息,即GI1、GI2、GI3和GI4。并且,可以结合在图4和图5中所示的子块进一步类似地得到-22.5°、22.5°、67.5°和112.5°这4个不同的预测方向的4个梯度信息,依次为:Wherein, on the basis of the 5 sub-blocks in FIG. 4, 4 gradient information of 4 different prediction directions of 0°, 45°, 90° and 135° can be obtained similarly to the above example, namely GI1, GI2, GI3 and GI4. And, 4 gradient information of 4 different prediction directions of -22.5°, 22.5°, 67.5° and 112.5° can be obtained similarly by combining the sub-blocks shown in Fig. 4 and Fig. 5, which are as follows:
GI5=|b-g|+|h-c|,GI5=|b-g|+|h-c|,
GI6=|d-g|+|h-a|,GI6=|d-g|+|h-a|,
GI7=|d-f|+|i-a|,GI7=|d-f|+|i-a|,
GI8=|c-f|+|i-b|。GI8=|c-f|+|i-b|.
然后,可以比较这8个梯度信息GI1、GI2、GI3、GI4、GI5、GI6、GI7和GI8,确定其中哪一个最小。Then, these 8 gradient information GI1, GI2, GI3, GI4, GI5, GI6, GI7, and GI8 can be compared to determine which of them is the smallest.
在步骤S13中,将待编码图像块的相邻块的原始像素作为参考像素,采用所确定出的子集中的11种帧内预测模式,对待编码图像块进行帧内预测,确定待编码图像块在这11种帧内预测模式下的编码代价#2。最后,可以选出11个编码代价#2中最小的P1个(比如,5个)编码代价#2对应的帧内预测模式。In step S13, the original pixels of adjacent blocks of the image block to be encoded are used as reference pixels, and the 11 intra prediction modes in the determined subset are used to perform intra prediction on the image block to be encoded, and the image block to be encoded is determined. Coding cost #2 in these 11 intra prediction modes. Finally, the intra-frame prediction modes corresponding to the smallest P1 (for example, 5) coding costs #2 among the 11 coding costs #2 may be selected.
示例性的,编码代价#2可以和编码代价#1相同,也可以不同。比如,编码代价#2可以是HAD cost、SADcost、STADcost或者RD cost。Exemplarily, encoding cost #2 may be the same as encoding cost #1, or may be different. For example, encoding cost #2 can be HAD cost, SAD cost, STAD cost or RD cost.
可选地,步骤(A2)具体可以包括:根据待编码图像块的相邻块的初始最可能模式(Most Probable Mode,MPM)列表中的F1种帧内预测模式以及所述P1种帧内预测模式,确定所述N1种帧内预测模式。其中,待编码图像块的相邻块的初始MPM列表是根据待编码图像块的相邻块的第一帧内预测模式确定的,F1为正整数。应理解,待编码图像块的相邻块的第一帧内预测模式与待编码图像块的第一帧内预测模式的确定方式类似,这里不再赘述。Optionally, step (A2) may specifically include: according to the F1 intra prediction modes and the P1 intra predictions in the initial most probable mode (Most Probable Mode, MPM) list of adjacent blocks of the image block to be encoded mode, which determines the N1 intra prediction modes. The initial MPM list of the adjacent blocks of the image block to be encoded is determined according to the first intra-frame prediction mode of the adjacent blocks of the image block to be encoded, and F1 is a positive integer. It should be understood that the manner of determining the first intra prediction mode of the adjacent blocks of the image block to be encoded is similar to that of determining the first intra prediction mode of the image block to be encoded, and details are not repeated here.
在步骤(A2)中,可以从F1+P1种帧内预测模式中,确定N1种帧内预测模式。比如,可以将所述P1种帧内预测模式中与所述F1种帧内预测模式不同的N1-F1种帧内预测模式,以及所述F1种帧内预测模式,作为所述N1种帧内预测模式。In step (A2), N1 intra prediction modes may be determined from F1+P1 intra prediction modes. For example, N1-F1 intra-frame prediction modes that are different from the F1 intra-frame prediction modes and the F1 intra-frame prediction modes may be used as the N1 intra-frame prediction modes. forecast mode.
示例性的,F1=3。以F1=3,P1=N1=5为例,在步骤(A2)中,可以将上述初始MPM列表中的3种帧内预测模式,以及步骤(A1)中所确定出来的5种帧内预测模式中与该3种帧内预测模式不同的2种帧内预测模式,作为所述N1种帧内预测模式。Exemplarily, F1=3. Taking F1=3 and P1=N1=5 as an example, in step (A2), the 3 intra-frame prediction modes in the above initial MPM list and the 5 intra-frame prediction modes determined in step (A1) can be used. Among the modes, two intra-prediction modes different from the three intra-prediction modes are referred to as the N1 intra-prediction modes.
需要说明的是,本申请中所涉及的MPM列表可以采用现有技术中任一种确定MPM列表的方式确定。比如,以初始MPM列表包括3种帧内预测模式举例说明。如果待编码图像块的左相邻块的第一帧内预测模式为DC模式,则初始MPM列表中的3种帧内预测模式为DC模式、Planar模式和角度预测26模式。如果待编码图像块的左相邻块的第一帧内预测模式不是DC模式,则初始MPM列表中的3种帧内预测模式为:待编码图像块的左相邻块的第一帧内预测模式;DC模式;Planar、DC、角度预测26,这三种模式中第一个与待编码图像块的左相邻块的第一帧内预测模式和DC模式不同的模式。It should be noted that, the MPM list involved in this application may be determined by any method of determining the MPM list in the prior art. For example, it is exemplified that the initial MPM list includes 3 intra prediction modes. If the first intra prediction mode of the left adjacent block of the image block to be encoded is the DC mode, the three intra prediction modes in the initial MPM list are the DC mode, the Planar mode and the angle prediction 26 mode. If the first intra prediction mode of the left adjacent block of the image block to be encoded is not the DC mode, the three intra prediction modes in the initial MPM list are: the first intra prediction mode of the left adjacent block of the image block to be encoded Mode; DC mode; Planar, DC, Angle prediction 26, the first of these three modes is different from the first intra prediction mode and DC mode of the left adjacent block of the image block to be encoded.
S320,将待编码图像块所包含的V个子图像块中每个子图像块的相邻块的初始重建像素作为参考像素,确定每个子图像块的第二帧内预测模式及第二初始重建像素,V为大于1的整数。S320, using the initial reconstructed pixels of adjacent blocks of each sub-image block in the V sub-image blocks included in the image block to be encoded as reference pixels, and determining the second intra-frame prediction mode and the second initial reconstructed pixels of each sub-image block, V is an integer greater than 1.
该V个子图像块是将待编码图像块按照第一划分方式划分得到的。第一划分方式例如可以是二叉树、四叉树或者八叉树划分等。例如,图6中的(A)图为待编码单元,该待编码单元中的待编码图像块可以被划分为图6中的(B)图所示的结构。即,该待编码图像块包括4个子图像块。The V sub-image blocks are obtained by dividing the to-be-coded image block according to the first division manner. The first division manner may be, for example, a binary tree, a quadtree, or an octree division. For example, picture (A) in FIG. 6 is a to-be-coded unit, and the to-be-coded image block in the to-be-coded unit may be divided into the structure shown in (B) of FIG. 6 . That is, the to-be-coded image block includes 4 sub-image blocks.
本申请中,S310和S320可以并行执行。In this application, S310 and S320 may be executed in parallel.
可选地,S320具体可以包括:将每个子图像块的相邻块的初始重建像素作为参考像素,分别采用每个子图像块对应的N2种帧内预测模式对每个子图像块进行帧内预测,确定每个子图像块的第二帧内预测模式及第二初始重建像素。N2为正整数,N2可以和N1相等,也可以不等。Optionally, S320 may specifically include: using the initial reconstructed pixels of adjacent blocks of each sub-image block as reference pixels, and using N2 intra-frame prediction modes corresponding to each sub-image block to perform intra-frame prediction on each sub-image block, A second intra prediction mode and second initial reconstructed pixels are determined for each sub-image block. N2 is a positive integer, and N2 can be equal to or unequal to N1.
举例来说,对于V个子图像块中的任一子图像块,可以将该子图像块的相邻块的初始重建像素作为参考像素,采用该子图像块对应的N2种帧内预测模式对该子图像块进行帧内预测,根据该N2种帧内预测模式下的N2个编码代价#3,从该N2种帧内预测模式中选择出对应的编码代价#3最小的一种帧内预测模式,作为该子图像块的第二帧内预测模式。以该子图像块的第二帧内预测模式对应的预测块与该子图像块的原始像素相减得到残差再进行变换量化和反量化反变换过程得到重建残差,将重建残差与该子图像块的第二帧内预测模式对应的预测块相加得到该子图像块的第二初始重建像素。For example, for any sub-image block in the V sub-image blocks, the initial reconstructed pixels of the adjacent blocks of the sub-image block can be used as reference pixels, and the N2 intra prediction modes corresponding to the sub-image block can be used for this sub-image block. Perform intra-frame prediction on the sub-image block, and select an intra-frame prediction mode with the smallest corresponding coding cost #3 from the N2 kinds of intra-frame prediction modes according to the N2 kinds of coding costs #3 under the N2 kinds of intra-frame prediction modes , as the second intra prediction mode of the sub-image block. The residual is obtained by subtracting the prediction block corresponding to the second intra-frame prediction mode of the sub-image block and the original pixel of the sub-image block, and then performing the transformation and quantization and inverse quantization and inverse transformation process to obtain the reconstruction residual. The prediction blocks corresponding to the second intra prediction mode of the sub-image block are added to obtain the second initial reconstructed pixel of the sub-image block.
编码代价#3和编码代价#1可以相同,也可以不同,例如编码代价#3可以是HAD cost、SADcost、STADcost或者RD cost。The coding cost #3 and the coding cost #1 may be the same or different, for example, the coding cost #3 may be HAD cost, SAD cost, STAD cost or RD cost.
示例性的,确定每个子图像块对应的N2种帧内预测模式的方式可以和确定待编码图像块对应的N1种帧内预测模式的方式类似。下面对确定子图像块#1对应的N2种帧内预测模式的一种方式进行说明。应理解,子图像块#1可以是该V个子图像块中的任一子图像块。Exemplarily, the manner of determining the N2 intra-frame prediction modes corresponding to each sub-image block may be similar to the manner of determining the N1 intra-frame prediction modes corresponding to the image block to be encoded. A method for determining the N2 intra prediction modes corresponding to the sub image block #1 will be described below. It should be understood that the sub-image block #1 may be any sub-image block in the V sub-image blocks.
确定子图像块#1对应的N2种帧内预测模式包括:Determine the N2 intra prediction modes corresponding to sub-image block #1 include:
步骤(B1),根据梯度信息从Q2种帧内预测模式中确定P2种帧内预测模式,Q2>P2,且Q2和P2均为整数;Step (B1), according to the gradient information, determine P2 intra-frame prediction modes from Q2 intra-frame prediction modes, Q2>P2, and both Q2 and P2 are integers;
步骤(B2),根据所述P2种帧内预测模式,确定所述N2种帧内预测模式。Step (B2): Determine the N2 intra prediction modes according to the P2 intra prediction modes.
可选地,P2=N2。比如,P2=N2=5。Optionally, P2=N2. For example, P2=N2=5.
可选地,Q2种帧内预测模式可以包括33种角度模式及DC模式和Planar模式。Optionally, the Q2 intra prediction modes may include 33 angle modes, DC mode and Planar mode.
可选地,步骤(B1)可以通过下述过程实现:Optionally, step (B1) can be achieved by the following process:
S21:确定Q2种帧内预测模式对应的多个子集,该多个子集中的每个子集包括所述Q2种帧内预测模式中的多种帧内预测模式。其中,每个子集中的帧内预测模式的数量可以相同,也可以不同。各个子集中的预测模式可以包含其他子集中的预测模式,也可以不包含。S21: Determine multiple subsets corresponding to the Q2 intra prediction modes, where each subset in the multiple subsets includes multiple intra prediction modes in the Q2 intra prediction modes. The number of intra prediction modes in each subset may be the same or different. The prediction modes in each subset may or may not contain prediction modes in other subsets.
S22:根据子图像块#1的原始像素的梯度信息,从该多个子集中确定一个子集。S22: Determine a subset from the plurality of subsets according to the gradient information of the original pixels of the sub-image block #1.
S23:将子图像块#1的相邻块的原始像素作为参考像素,采用所确定出的子集中的每种帧内预测模式,对子图像块#1进行帧内预测,确定子图像块#1在所确定出的子集中的每种帧内预测模式下的编码代价#4。所确定出的子集中编码代价#4最小的P2种帧内预测模式即为所述P2种帧内预测模式。S23: Using the original pixels of the adjacent blocks of the sub-image block #1 as reference pixels, using each intra prediction mode in the determined subset, perform intra-frame prediction on the sub-image block #1, and determine the sub-image block # 1 Coding cost #4 in each intra prediction mode in the determined subset. The P2 intra prediction modes with the smallest coding cost #4 in the determined subset are the P2 intra prediction modes.
以下以所述Q2种帧内预测模式为33种角度模式、DC模式和Planar模式共35种帧内预测模式为例,对上述过程进行说明。The above process will be described below by taking as an example that the Q2 intra-frame prediction modes are 33 angular modes, a DC mode, and a total of 35 intra-frame prediction modes.
举例来说,在步骤S21中,可以将35种帧内预测模式按照预测模式的方向划分为4个子集,即35种帧内预测模式对应4个子集,其中每个子集中包括11种帧内预测模式。一种划分方式如下:For example, in step S21, the 35 intra prediction modes may be divided into 4 subsets according to the direction of the prediction mode, that is, the 35 intra prediction modes correspond to 4 subsets, and each subset includes 11 intra predictions model. One way of dividing is as follows:
子集1={0,1,6,7,8,9,10,11,12,13,14}Subset 1 = {0,1,6,7,8,9,10,11,12,13,14}
子集2={0,1,2,3,4,5,30,31,32,33,34}Subset 2 = {0,1,2,3,4,5,30,31,32,33,34}
子集3={0,1,22,23,24,25,26,27,28,29,30}Subset 3 = {0,1,22,23,24,25,26,27,28,29,30}
子集4={0,1,14,15,16,17,18,19,20,21,22}Subset 4 = {0,1,14,15,16,17,18,19,20,21,22}
在步骤S22中,通过计算子图像块#1的原始像素的梯度信息,从4个子集中确定出一个子集。该步骤可以参考步骤S12的说明,这里不再赘述。In step S22, one subset is determined from the four subsets by calculating the gradient information of the original pixels of the sub-image block #1. For this step, reference may be made to the description of step S12, which will not be repeated here.
在步骤S23中,将子图像块#1的相邻块的原始像素作为参考像素,采用所确定出的子集中的11种帧内预测模式,对子图像块#1进行帧内预测,确定子图像块#1在这11种帧内预测模式下的编码代价#4。最后,可以选出11个编码代价#4中最小的P2个(比如,5个)编码代价#4对应的帧内预测模式。所选择出的帧内预测模式即为所述P2种帧内预测模式。In step S23, using the original pixels of the adjacent blocks of sub-image block #1 as reference pixels, and using 11 intra-frame prediction modes in the determined subset, perform intra-frame prediction on sub-image block #1, and determine the sub-image block #1. Coding cost #4 of image block #1 in these 11 intra prediction modes. Finally, the intra prediction modes corresponding to the smallest P2 (for example, 5) coding costs #4 among the 11 coding costs #4 may be selected. The selected intra-frame prediction mode is the P2 intra-frame prediction modes.
示例性的,编码代价#4可以和编码代价#3相同,也可以不同。编码代价#4可以和编码代价#2相同,也可以不同。比如,编码代价#4可以是HAD cost、SADcost、STADcost或者RD cost。Exemplarily, encoding cost #4 may be the same as encoding cost #3, or may be different. Encoding cost #4 can be the same as encoding cost #2, or it can be different. For example, encoding cost #4 can be HAD cost, SAD cost, STAD cost or RD cost.
可选地,步骤(B2)可以包括:根据子图像块#1的相邻块的初始MPM列表中的F2种帧内预测模式以及所述P2种帧内预测模式,确定所述N2种帧内预测模式。其中,子图像块#1的相邻块的初始MPM列表是根据子图像块#1的相邻块的第二帧内预测模式确定的,F2为正整数。Optionally, step (B2) may include: determining the N2 intra prediction modes according to the F2 intra prediction modes and the P2 intra prediction modes in the initial MPM list of the adjacent blocks of the sub-image block #1 forecast mode. The initial MPM list of the adjacent blocks of the sub-image block #1 is determined according to the second intra prediction mode of the adjacent blocks of the sub-image block #1, and F2 is a positive integer.
也就是说,在步骤(B2)中,可以从F2+P2种帧内预测模式中,确定N2种帧内预测模式。That is, in step (B2), N2 intra prediction modes may be determined from F2+P2 intra prediction modes.
比如,可以将所述P2种帧内预测模式中与所述F2种帧内预测模式不同的N-F种帧内预测模式,以及所述F2种帧内预测模式,作为所述N2种帧内预测模式。For example, N-F intra prediction modes that are different from the F2 intra prediction modes among the P2 intra prediction modes and the F2 intra prediction modes may be used as the N2 intra prediction modes .
示例性的,F2=3。以F2=3,P2=N2=5为例,在步骤(B2)中,可以将上述MPM列表中的3种帧内预测模式,以及步骤(B1)中所确定出来的5种帧内预测模式中与该3种帧内预测模式不同的2种帧内预测模式,作为所述N2种帧内预测模式。Exemplarily, F2=3. Taking F2=3, P2=N2=5 as an example, in step (B2), the 3 intra-frame prediction modes in the above-mentioned MPM list and the 5 intra-frame prediction modes determined in step (B1) can be used. Among them, two intra prediction modes different from the three intra prediction modes are used as the N2 intra prediction modes.
需要说明的是,本申请中所涉及的MPM列表可以采用现有技术中任一种确定MPM列表的方式确定。比如,以子图像块#1的相邻块的初始MPM列表包括3种帧内预测模式举例说明。如果子图像块#1的上相邻块不属于待编码图像块,则在步骤(B2)中认为子图像块#1的上相邻块的第二帧内预测模式为DC模式,否则,在步骤(B2)中认为子图像块#1的上相邻块的第二帧内预测模式为其实际得到的第二帧内预测模式。如果子图像块#1的上相邻块和左相邻块的第二帧内预测模式相等:(1)若都为Palnar模式,则子 图像块#1的相邻块的初始MPM列表包括Palnar模式、DC模式和角度预测26模式;(2)若都为DC模式,则子图像块#1的相邻块的初始MPM列表包括DC模式、Planar模式和角度预测26模式;(3)若都为角度预测模式,则子图像块#1的相邻块的初始MPM列表包括子图像块#1的左相邻块(或上相邻块)的第二帧内预测模式、与子图像块#1的左相邻块(或上相邻块)的第二帧内预测模式最接近的两个角度预测模式。如果子图像块#1的上相邻块和左相邻块的第二帧内预测模式不相等,则子图像块#1的相邻块的初始MPM列表为:子图像块#1的左相邻块的第二帧内预测模式;子图像块#1的上相邻块的第二帧内预测模式DC模式;Planar、DC、角度预测26,这三种模式中第一个与子图像块#1的左相邻块和上相邻块的第二帧内预测模式不同的模式。It should be noted that, the MPM list involved in this application may be determined by any method of determining the MPM list in the prior art. For example, it is exemplified that the initial MPM list of adjacent blocks of sub-image block #1 includes 3 intra prediction modes. If the upper adjacent block of sub-image block #1 does not belong to the image block to be coded, in step (B2), it is considered that the second intra prediction mode of the upper adjacent block of sub-image block #1 is DC mode, otherwise, in step (B2) In step (B2), the second intra-frame prediction mode of the upper adjacent block of sub-image block #1 is considered to be the actually obtained second intra-frame prediction mode. If the second intra prediction modes of the upper and left adjacent blocks of sub-image block #1 are equal: (1) If both are Palnar mode, the initial MPM list of the adjacent blocks of sub-image block #1 includes Palnar mode, DC mode and angle prediction 26 mode; (2) if all are DC mode, the initial MPM list of adjacent blocks of sub-image block #1 includes DC mode, Planar mode and angle prediction 26 mode; (3) if all is the angle prediction mode, then the initial MPM list of the adjacent blocks of sub-image block #1 includes the second intra prediction mode of the left adjacent block (or upper adjacent block) of sub-image block #1, and sub-image block #1 The two angle prediction modes to which the second intra prediction mode of the left adjacent block (or upper adjacent block) of 1 is closest. If the second intra prediction modes of the upper and left adjacent blocks of sub-image block #1 are not equal, the initial MPM list of the adjacent blocks of sub-image block #1 is: the left phase of sub-image block #1 The second intra prediction mode of the adjacent block; the second intra prediction mode DC mode of the upper adjacent block of the sub-image block #1; Planar, DC, angle prediction 26, the first of these three modes is related to the sub-image block. A mode in which the second intra prediction mode of the left adjacent block of #1 and the upper adjacent block are different.
S330,根据待编码图像块在第一帧内预测模式下的第一编码代价以及V个子图像块中每个子图像块在第二帧内预测模式下的第一编码代价,确定待编码图像块的最佳帧内预测模式及初始重建像素。S330, according to the first coding cost of the to-be-coded image block in the first intra-frame prediction mode and the first coding cost of each sub-image block in the V sub-image blocks in the second intra-frame prediction mode, determine the value of the to-be-coded image block Best intra prediction mode and initial reconstructed pixels.
可选地,在S330中,若待编码图像块在第一帧内预测模式下的第一编码代价大于(或,大于或等于)V个子图像块中每个子图像块在第二帧内预测模式下的第一编码代价之和,则可以将V个子图像块对应的V个第二帧内预测模式及第二初始重建像素确定为待编码图像块的最佳帧内预测模式及初始重建像素,这种情况下,待编码图像块则需要进行更小块的划分,并以更小块为单位进行帧内预测。相反,则将第一帧内预测模式及第一初始重建像素确定为待编码图像块的最佳帧内预测模式及初始重建像素,这种情况下,待编码图像块则不需要进行更小块的划分,并以待编码图像块本身为单位进行帧内预测。Optionally, in S330, if the first encoding cost of the image block to be encoded in the first intra prediction mode is greater than (or, greater than or equal to) the V sub image blocks in the second intra prediction mode If the sum of the first encoding costs is given below, the V second intra-frame prediction modes and the second initial reconstruction pixels corresponding to the V sub-image blocks may be determined as the best intra-frame prediction mode and initial reconstruction pixels of the to-be-coded image block, In this case, the image block to be encoded needs to be divided into smaller blocks, and intra-frame prediction is performed in units of smaller blocks. On the contrary, the first intra prediction mode and the first initial reconstruction pixel are determined as the best intra prediction mode and initial reconstruction pixel of the image block to be encoded. In this case, the image block to be encoded does not need to be smaller , and perform intra-frame prediction in the unit of the image block to be encoded.
可选地,在S330中,若待编码图像块在第一帧内预测模式下的第一编码代价大于(或,大于或等于)V个子图像块中每个子图像块在第二帧内预测模式下的第一编码代价与第一预设权值的乘积的总和,则可以将V个子图像块对应的V个第二帧内预测模式及第二初始重建像素确定为待编码图像块的最佳帧内预测模式及初始重建像素。相反,则将第一帧内预测模式及第一初始重建像素确定为待编码图像块的最佳帧内预测模式及初始重建像素。Optionally, in S330, if the first encoding cost of the image block to be encoded in the first intra prediction mode is greater than (or, greater than or equal to) the V sub image blocks in the second intra prediction mode The sum of the products of the first encoding cost and the first preset weight value under the condition of Intra prediction mode and initial reconstructed pixels. On the contrary, the first intra-frame prediction mode and the first initial reconstruction pixel are determined as the best intra-frame prediction mode and initial reconstruction pixel of the image block to be encoded.
或者,在S330中,若待编码图像块在第一帧内预测模式下的第一编码代价与第二预设权值的乘积大于(或,大于或等于)V个子图像块中每个子 图像块在第二帧内预测模式下的第一编码代价之和,则可以将V个子图像块对应的V个第二帧内预测模式及第二初始重建像素确定为待编码图像块的最佳帧内预测模式及初始重建像素。相反,则将第一帧内预测模式及第一初始重建像素确定为待编码图像块的最佳帧内预测模式及初始重建像素。Or, in S330, if the product of the first encoding cost and the second preset weight of the image block to be encoded in the first intra prediction mode is greater than (or, greater than or equal to) each sub-image block in the V sub-image blocks The sum of the first coding costs in the second intra-frame prediction mode, the V second intra-frame prediction modes and the second initial reconstruction pixels corresponding to the V sub-image blocks may be determined as the best intra-frame frame of the to-be-coded image block Prediction mode and initial reconstructed pixels. On the contrary, the first intra-frame prediction mode and the first initial reconstruction pixel are determined as the best intra-frame prediction mode and initial reconstruction pixel of the image block to be encoded.
需要说明的是,每个子图像块对应的第二帧内预测模式可能相同或不同。It should be noted that the second intra prediction modes corresponding to each sub-image block may be the same or different.
示例性的,所述第一预设权值可以为小于1的正数,比如为0.5。Exemplarily, the first preset weight may be a positive number less than 1, such as 0.5.
示例性的,所述第二预设权值可以为大于1且小于2的数值,比如为1.5。Exemplarily, the second preset weight may be a value greater than 1 and less than 2, such as 1.5.
方式二Method 2
将待编码图像块的相邻块的初始重建像素作为参考像素,采用N种帧内预测模式对待编码图像块进行帧内预测,确定待编码图像块的最佳帧内预测模式及其初始重建像素。其中N为正整数。Using the initial reconstructed pixels of adjacent blocks of the image block to be encoded as reference pixels, use N intra-frame prediction modes to perform intra-frame prediction on the image block to be encoded, and determine the optimal intra-frame prediction mode of the image block to be encoded and its initial reconstructed pixels. . where N is a positive integer.
这里的待编码图像块的最佳帧内预测模式可以和方式一中的第一帧内预测模式相同。因此,关于方式二,具体可以参照方式一中对步骤(1)所作的说明,本文不再赘述。The optimal intra-frame prediction mode of the image block to be encoded here may be the same as the first intra-frame prediction mode in the first mode. Therefore, with regard to the second mode, the description of step (1) in the first mode may be referred to, and details are not described herein again.
以编码代价#5为RD cost为例,对步骤S220进行说明。Taking the encoding cost #5 as the RD cost as an example, step S220 will be described.
若S210采用方式一,那么在S220中:If S210 adopts mode 1, then in S220:
若待编码图像块的最佳帧内预测模式为第一帧内预测模式,则比较待编码图像块在第一帧内预测模式下的RD cost和待编码图像块在帧间预测模式下的RD cost。如果第一帧内预测模式对应的RD cost较小,则待编码图像块的最佳预测模式为第一帧内预测模式,如果帧间预测模式下的RD cost较小,则待编码图像块的最佳预测模式为该帧间预测模式。应理解,待编码图像块在第一帧内预测模式下的RD cost是以待编码图像块的相邻块的初始重建像素作为参考像素确定的。If the best intra prediction mode of the image block to be encoded is the first intra prediction mode, then compare the RD cost of the image block to be encoded in the first intra prediction mode with the RD cost of the image block to be encoded in the inter prediction mode cost. If the RD cost corresponding to the first intra-frame prediction mode is small, the best prediction mode of the image block to be encoded is the first intra-frame prediction mode. The best prediction mode is the inter prediction mode. It should be understood that the RD cost of the image block to be encoded in the first intra prediction mode is determined by using the initial reconstructed pixels of the adjacent blocks of the image block to be encoded as reference pixels.
若待编码图像块的最佳帧内预测模式为V个子图像块各自对应的第二帧内预测模式,则比较V个子图像块对应的RD cost之和与待编码图像块在帧间预测模式下的RD cost。如果V个子图像块对应的RD cost之和较小,则待编码图像块的最佳预测模式为V个第二帧内预测模式,否则待编码图像块的最佳预测模式为该帧间预测模式。应理解,任一子图像块对应的RD cost是以该子图像块的相邻块的初始重建像素作为参考像素确定的。If the best intra prediction mode of the image block to be encoded is the second intra prediction mode corresponding to each of the V sub image blocks, then compare the sum of the RD cost corresponding to the V sub image blocks with the image block to be encoded in the inter prediction mode RD cost. If the sum of the RD cost corresponding to the V sub-image blocks is small, then the best prediction mode of the image block to be encoded is V second intra prediction modes, otherwise the best prediction mode of the image block to be encoded is the inter prediction mode . It should be understood that the RD cost corresponding to any sub-image block is determined by using the initial reconstructed pixels of adjacent blocks of the sub-image block as reference pixels.
若S210采用方式二,那么在S220中:If S210 adopts Mode 2, then in S220:
若待编码图像块的最佳帧内预测模式为第一帧内预测模式,则比较待编 码图像块在第一帧内预测模式下的RD cost和待编码图像块在帧间预测模式下的RD cost。如果第一帧内预测模式对应的RD cost较小,则待编码图像块的最佳预测模式为第一帧内预测模式,否则待编码图像块的最佳预测模式为该帧间预测模式。应理解,待编码图像块在第一帧内预测模式下的RD cost是以待编码图像块的相邻块的初始重建像素作为参考像素确定的。If the best intra prediction mode of the image block to be encoded is the first intra prediction mode, then compare the RD cost of the image block to be encoded in the first intra prediction mode with the RD cost of the image block to be encoded in the inter prediction mode cost. If the RD cost corresponding to the first intra prediction mode is small, the best prediction mode of the image block to be encoded is the first intra prediction mode, otherwise the best prediction mode of the image block to be encoded is the inter prediction mode. It should be understood that the RD cost of the image block to be encoded in the first intra prediction mode is determined by using the initial reconstructed pixels of the adjacent blocks of the image block to be encoded as reference pixels.
若S210采用的是方式一,那么,在S230中,若待编码图像块的最佳预测模式为第一帧内预测模式,则将待编码图像块的相邻块的最终重建像素作为参考像素,根据第一帧内预测模式,确定待编码图像块的最终预测模式。若待编码图像块的最佳预测模式为V个第二预测模式,则以每个子图像块的相邻块的最终重建像素作为参考像素,根据每个子图像块的第二帧内预测模式,确定每个子图像块的最终预测模式。If the first mode is adopted in S210, then, in S230, if the best prediction mode of the image block to be encoded is the first intra prediction mode, the final reconstructed pixel of the adjacent block of the image block to be encoded is used as the reference pixel, According to the first intra prediction mode, the final prediction mode of the image block to be encoded is determined. If the optimal prediction mode of the image block to be encoded is V second prediction modes, then the final reconstructed pixel of the adjacent block of each sub-image block is used as a reference pixel, and according to the second intra-frame prediction mode of each sub-image block, determine The final prediction mode for each sub-tile.
若S210采用的是方式二,那么,在S230中,若待编码图像块的最佳预测模式为第一帧内预测模式,则将待编码图像块的相邻块的最终重建像素作为参考像素,根据第一预测模式,确定待编码图像块的最终预测模式。If the second mode is adopted in S210, then, in S230, if the best prediction mode of the image block to be encoded is the first intra prediction mode, the final reconstructed pixel of the adjacent block of the image block to be encoded is used as the reference pixel, According to the first prediction mode, the final prediction mode of the image block to be encoded is determined.
可选地,所述将待编码图像块的相邻块的最终重建像素作为参考像素,根据第一帧内预测模式,确定待编码图像块的最终预测模式,包括:将待编码图像块的相邻块的最终重建像素作为参考像素,确定待编码图像块在第一帧内预测模式和M1种帧内预测模式下的编码代价#5;将第一帧内预测模式和M1种帧内预测模式中编码代价#5最小的预测模式,确定为待编码图像块的最终预测模式。M1为正整数。Optionally, the determining the final prediction mode of the to-be-coded image block according to the first intra-frame prediction mode using the final reconstructed pixels of the adjacent blocks of the to-be-coded image block as reference pixels includes: taking the phase of the to-be-coded image block The final reconstructed pixel of the adjacent block is used as a reference pixel to determine the encoding cost #5 of the image block to be encoded in the first intra prediction mode and M1 intra prediction modes; the first intra prediction mode and M1 intra prediction modes are used. Among them, the prediction mode with the smallest encoding cost #5 is determined as the final prediction mode of the image block to be encoded. M1 is a positive integer.
编码代价#5可以是RD cost,但本申请对此不作限定。The encoding cost #5 may be the RD cost, but this application does not limit it.
示例性的,M1种帧内预测模式包括下述中的一项或多项:待编码图像块的最终MPM列表中的W1种帧内预测模式中的一种或多种;或者,所述N1种帧内预测模式中除第一帧内预测模式以外的编码代价#1最小的一种或多种帧内预测模式。其中,待编码图像块的最终MPM列表是根据待编码图像块的相邻块的最终预测模式和/或待编码图像块的相邻块的最佳预测模式生成的。W1为正整数,比如,W1=3,但本申请对此不作限定。Exemplarily, the M1 intra prediction modes include one or more of the following: one or more of the W1 intra prediction modes in the final MPM list of the image block to be encoded; or, the N1 One or more intra-prediction modes with the smallest coding cost #1 among the intra-prediction modes except the first intra-prediction mode. The final MPM list of the image block to be encoded is generated according to the final prediction mode of the adjacent blocks of the image block to be encoded and/or the best prediction mode of the adjacent blocks of the image block to be encoded. W1 is a positive integer, for example, W1=3, which is not limited in this application.
举例来说,M1种帧内预测模式可以包括W1种帧内预测模式中的第一个帧内预测模式,或者第二个或第三个帧内预测模式。或者,也可以将待编码图像块的相邻块的最终重建像素作为参考像素,计算待编码图像块在W1种帧内预测模式下的RD cost或者SAD cost或者HAD cost等,将相应的cost 较小的一个帧内预测模式作为M1种帧内预测模式中的一种。举例来说,在步骤(A1)中,可以得到N1种帧内预测模式分别对应的编码代价#1。这N1个编码代价#1次小(大于第一帧内预测模式,但小于其他帧内预测模式)的编码代价#1对应的帧内预测模式,可以作为M1种帧内预测模式中的一种。For example, the M1 intra prediction modes may include the first intra prediction mode, or the second or third intra prediction mode among the W1 intra prediction modes. Alternatively, the final reconstructed pixels of adjacent blocks of the image block to be encoded can also be used as reference pixels to calculate the RD cost, SAD cost, or HAD cost of the image block to be encoded in W1 intra-frame prediction modes, and compare the corresponding costs. A small intra prediction mode is used as one of M1 intra prediction modes. For example, in step (A1), encoding cost #1 corresponding to N1 intra prediction modes can be obtained. The intra prediction mode corresponding to the coding cost #1 of the N1 encoding cost #1 times smaller (greater than the first intra prediction mode, but smaller than other intra prediction modes) can be used as one of the M1 intra prediction modes .
应理解,待编码图像块的最终MPM列表可以采用现有技术中任一种确定MPM列表的方式确定。It should be understood that the final MPM list of the image blocks to be encoded may be determined by any method of determining the MPM list in the prior art.
比如,如果待编码图像块存在上相邻块和左相邻块且最佳预测模式都为最佳帧内预测模式,则待编码图像块的最终MPM列表中的前两个MPM为上相邻块和左相邻块的最佳帧内预测模式;如果待编码图像块没有上相邻块或者左相邻块或者且最佳预测模式不是最佳帧内预测模式,则待编码图像块的最终MPM列表中的第一个MPM为DC模式。如果上相邻块和左相邻块的最佳帧内预测模式相等:(1)若都为Palnar模式,则待编码图像块的最终MPM列表包括Palnar模式、DC模式和角度预测26模式;(2)若都为DC模式,则待编码图像块的最终MPM列表包括DC模式、Planar模式和角度预测26模式;(3)若都为角度预测模式,则待编码图像块的最终MPM列表包括左相邻块(或上相邻块)的最佳帧内预测模式、与左相邻块(或上相邻块)的最佳帧内预测模式最接近的两个角度预测模式。如果上相邻块和左相邻块的帧内预测模式不相等,则待编码图像块的最终MPM列表为:左相邻块的帧内预测模式;上相邻块的DC模式;Planar、DC、角度预测26这三种模式中第一个与左相邻块和上相邻块的最佳帧内预测模式不同的模式。For example, if the image block to be coded has an upper adjacent block and a left adjacent block and the best prediction mode is the best intra prediction mode, the first two MPMs in the final MPM list of the image block to be coded are the upper adjacent blocks The optimal intra prediction mode of the block and the left adjacent block; if the image block to be coded has no upper adjacent block or left adjacent block or the optimal prediction mode is not the optimal intra prediction mode, the final prediction mode of the image block to be coded The first MPM in the MPM list is DC mode. If the optimal intra prediction modes of the upper adjacent block and the left adjacent block are equal: (1) If both are Palnar mode, the final MPM list of the image block to be encoded includes Palnar mode, DC mode and angle prediction 26 mode; ( 2) If all are DC mode, then the final MPM list of the image block to be encoded includes DC mode, Planar mode and angle prediction 26 mode; (3) If all are the angle prediction mode, then the final MPM list of the image block to be encoded includes the left The optimal intra prediction mode of the adjacent block (or the upper adjacent block), and the two angle prediction modes closest to the optimal intra prediction mode of the left adjacent block (or the upper adjacent block). If the intra prediction modes of the upper adjacent block and the left adjacent block are not equal, the final MPM list of the image block to be encoded is: the intra prediction mode of the left adjacent block; the DC mode of the upper adjacent block; Planar, DC , Angle prediction 26 The first of these three modes is different from the best intra prediction mode of the left adjacent block and the upper adjacent block.
可选地,以每个子图像块的相邻块的最终重建像素作为参考像素,根据每个子图像块的第二预测模式,确定每个子图像块的最终预测模式,包括:将每个子图像块的相邻块的最终重建像素作为参考像素,确定每个子图像块在对应的第二预测模式和对应的M2种帧内预测模式下的编码代价#5;将每个子图像块对应的第二预测模式和对应的M2种帧内预测模式中编码代价#5最小的预测模式,确定为该子图像块的最终预测模式。M2为正整数。Optionally, taking the final reconstructed pixels of adjacent blocks of each sub-image block as reference pixels, and determining the final prediction mode of each sub-image block according to the second prediction mode of each sub-image block, including: The final reconstructed pixels of adjacent blocks are used as reference pixels to determine the encoding cost #5 of each sub-image block in the corresponding second prediction mode and the corresponding M2 intra prediction modes; the second prediction mode corresponding to each sub-image block is used. and the prediction mode with the smallest coding cost #5 among the corresponding M2 intra-frame prediction modes, is determined as the final prediction mode of the sub-image block. M2 is a positive integer.
也就是说,对于V个子图像块中的任一子图像块#1,将子图像块#1的相邻块的最终重建像素作为参考像素,确定子图像块#1在其对应的第二预测模式和对应的M2种帧内预测模式下的编码代价#5。比较所得到的M2+1个编码代价#5,其中最小的编码代价#5对应的帧内预测模式为该子图像块的最终预测模式。That is to say, for any sub-image block #1 in the V sub-image blocks, the final reconstructed pixel of the adjacent block of the sub-image block #1 is used as a reference pixel to determine the sub-image block #1 in its corresponding second prediction mode and the corresponding encoding cost #5 in M2 intra prediction modes. The obtained M2+1 encoding costs #5 are compared, and the intra prediction mode corresponding to the smallest encoding cost #5 is the final prediction mode of the sub-image block.
需要说明的是,在S230步骤中,若编码代价#5为RD cost,在计算RD cost时首先需要进行RDO重建,通过RDO重建过程,可以得到M1种帧内预测模式或者M1种帧内预测模式对应的重建像素。其中,RD cost最小的帧内预测模式(即,待编码图像块的最终预测模式)对应的重建像素为待编码图像块的最终重建像素。在S230步骤中,若编码代价#5不为RD cost,则在确定待编码图像块的最终预测模式后,将相邻块的最终重建像素作为参考像素,采用待编码图像块的最终预测模式进行RDO重建,得到的重建像素为待编码图像块的最终重建像素。It should be noted that, in step S230, if encoding cost #5 is RD cost, RDO reconstruction needs to be performed first when calculating RD cost. Through the RDO reconstruction process, M1 intra-frame prediction modes or M1 intra-frame prediction modes can be obtained the corresponding reconstructed pixels. Wherein, the reconstructed pixel corresponding to the intra prediction mode with the smallest RD cost (that is, the final prediction mode of the image block to be encoded) is the final reconstructed pixel of the image block to be encoded. In step S230, if the encoding cost #5 is not the RD cost, after determining the final prediction mode of the image block to be encoded, the final reconstructed pixel of the adjacent block is used as the reference pixel, and the final prediction mode of the image block to be encoded is used to carry out RDO reconstruction, the obtained reconstructed pixels are the final reconstructed pixels of the image block to be encoded.
S230步骤得到待编码图像块的最终预测模式后,该方法还可以包括:对待编码图像块的最终预测模式进行编码,并将编码的码流发送给解码端。那么,解码端可以根据待编码图像块的最终预测模式,对传输的视频进行解码。After obtaining the final prediction mode of the image block to be encoded in step S230, the method may further include: encoding the final prediction mode of the image block to be encoded, and sending the encoded code stream to the decoding end. Then, the decoding end can decode the transmitted video according to the final prediction mode of the image block to be encoded.
可选地,如图7所示,本申请提供的方法可以分三个阶段:模式初筛阶段、模式决策阶段和模式修正阶段。Optionally, as shown in FIG. 7 , the method provided by the present application may be divided into three stages: a mode preliminary screening stage, a mode decision stage, and a mode correction stage.
模式初筛阶段:从多种帧内预测模式中,选出几种较优的帧内预测模式。Mode preliminary screening stage: Select several optimal intra-frame prediction modes from multiple intra-frame prediction modes.
比如,可以首先从35种帧内预测模式中筛选出11种帧内预测模式,再从11种帧内预测模式中选出较优的5种帧内预测模式。For example, 11 intra-frame prediction modes may be selected from 35 intra-frame prediction modes first, and then 5 better intra-frame prediction modes may be selected from the 11 intra-frame prediction modes.
举例来说,针对上述方式一,可以首先将35种帧内预测模式按照预测模式的方向划分成4个子集,每个子集中包含11种帧内预测模式。通过计算当前待编码块原始像素的梯度信息确定一个模式集合,然后用该模式集合中的11种预测模式进行帧内预测(预测时用到的参考像素为相邻块的原始像素)得到预测块,然后将预测块与原始像素块相减得到残差进行哈达马变换计算HAD cost,选择HAD cost最小的5个模式传送到模式决策阶段。针对当前待编码块中的V个子图像块中的每个子图像块,首先将35种帧内预测模式按照预测模式的方向划分成4个子集,每个子集中包含11种帧内预测模式。通过计算当前子图像块原始像素的梯度信息确定一个模式集合,然后用该模式集合中的11种预测模式进行帧内预测(预测时用到的参考像素为该子图像块的相邻块的原始像素)得到预测块,然后将预测块与原始像素块相减得到残差进行哈达马变换计算HAD cost,选择HAD cost最小的5个模式传送到模式决策阶段。For example, for the above-mentioned way 1, the 35 intra prediction modes may be firstly divided into 4 subsets according to the direction of the prediction modes, and each subset includes 11 intra prediction modes. Determine a mode set by calculating the gradient information of the original pixels of the current block to be coded, and then use the 11 prediction modes in the mode set to perform intra-frame prediction (the reference pixels used in prediction are the original pixels of adjacent blocks) to obtain the predicted block , and then subtract the prediction block from the original pixel block to get the residual, and then perform Hadamard transform to calculate the HAD cost, and select the 5 modes with the smallest HAD cost to transmit to the mode decision stage. For each sub-image block in the V sub-image blocks in the current block to be encoded, the 35 intra prediction modes are firstly divided into 4 subsets according to the direction of the prediction mode, and each subset contains 11 intra prediction modes. A mode set is determined by calculating the gradient information of the original pixels of the current sub-image block, and then the 11 prediction modes in the mode set are used for intra-frame prediction (the reference pixels used in the prediction are the original pixels of the adjacent blocks of the sub-image block). pixel) to obtain the prediction block, and then subtract the prediction block from the original pixel block to obtain the residual, perform Hadamard transform to calculate HAD cost, and select the 5 modes with the smallest HAD cost to transmit to the mode decision stage.
针对上述方式二,可以首先将35种帧内预测模式按照预测模式的方向 划分成4个子集,每个子集中包含11种帧内预测模式。通过计算当前待编码块原始像素的梯度信息确定一个模式集合,然后用该模式集合中的11种预测模式进行帧内预测(预测时用到的参考像素为相邻块的原始像素)得到预测块,然后将预测块与原始像素块相减得到残差进行哈达马变换计算HAD cost,选择HAD cost最小的5个模式传送到模式决策阶段。For the above-mentioned mode 2, the 35 intra prediction modes may be firstly divided into 4 subsets according to the direction of the prediction modes, and each subset includes 11 intra prediction modes. Determine a mode set by calculating the gradient information of the original pixels of the current block to be coded, and then use the 11 prediction modes in the mode set to perform intra-frame prediction (the reference pixels used in prediction are the original pixels of adjacent blocks) to obtain the predicted block , and then subtract the prediction block from the original pixel block to get the residual, and then perform Hadamard transform to calculate the HAD cost, and select the 5 modes with the smallest HAD cost to transmit to the mode decision stage.
模式决策阶段:将模式初筛阶段得到的几种较优的帧内预测模式与相邻块在模式决策阶段生成的MPM列表(即,初始MPM列表)中的帧内预测模式进行结合得到多种帧内预测模式,然后再从这多种预测模式中选出最优的一个进行RDO重建过程,得到RD cost。再将该RD cost与帧间预测的RD cost进行比较决定编码模式(选择帧内预测模式还是选择帧间预测模式)。Mode decision stage: Combine several better intra prediction modes obtained in the mode preliminary screening stage with the intra prediction modes in the MPM list (ie, the initial MPM list) generated by adjacent blocks in the mode decision stage to obtain a variety of modes. Intra-frame prediction mode, and then select the optimal one from these multiple prediction modes to perform the RDO reconstruction process to obtain RD cost. Then compare the RD cost with the RD cost of inter-frame prediction to determine the encoding mode (select the intra-frame prediction mode or select the inter-frame prediction mode).
比如,对应上述方式一,针对当前待编码块,将模式初筛阶段得到的5种帧内预测模式与当前待编码块的相邻块在模式决策阶段生成的MPM列表(即,当前待编码块的相邻块的初始MPM列表)中的3种帧内预测模式进行结合得到新的5种帧内预测模式,然后再从这5种预测模式这选出最优的一个进行RDO重建过程,得到RD cost。针对每个子图像块,将模式初筛阶段得到的5种帧内预测模式与该子图小块的相邻块在模式决策阶段生成的MPM列表(即,子图像块的相邻块的初始MPM列表)中的3种帧内预测模式进行结合得到新的5种帧内预测模式,然后再从这5种预测模式这选出最优的一个进行RDO重建过程,得到RD cost。比较V个子图像块的RD cost之和与当前待编码块的RD cost的大小,将较小的RD cost与帧间预测的RD cost进行比较决定编码模式。For example, corresponding to the above method 1, for the current block to be coded, the five intra-frame prediction modes obtained in the mode preliminary screening stage and the MPM list generated in the mode decision stage of the adjacent blocks of the current block to be coded (that is, the current block to be coded The 3 intra-frame prediction modes in the initial MPM list of adjacent blocks) are combined to obtain new 5 intra-frame prediction modes, and then the optimal one is selected from these 5 prediction modes for the RDO reconstruction process. RD cost. For each sub-image block, compare the five intra-frame prediction modes obtained in the mode preliminary screening stage with the MPM list generated in the mode decision stage of the adjacent blocks of the sub-image small block (that is, the initial MPM of the adjacent blocks of the sub-image block). The 3 intra prediction modes in the list) are combined to obtain new 5 intra prediction modes, and then the optimal one is selected from these 5 prediction modes to perform the RDO reconstruction process to obtain the RD cost. Compare the sum of the RD cost of the V sub-image blocks with the size of the RD cost of the current block to be coded, and compare the smaller RD cost with the RD cost of inter-frame prediction to determine the coding mode.
比如,对应上述方式二,将模式初筛阶段得到的5种帧内预测模式与当前待编码块的相邻块在模式决策阶段生成的MPM列表(即,当前待编码块的相邻块的初始MPM列表)中的3种帧内预测模式进行结合得到新的5种帧内预测模式,然后再从这5种预测模式这选出最优的一个进行RDO重建过程,得到RD cost。将该RD cost与帧间预测的RD cost进行比较决定编码模式。For example, corresponding to the above method 2, compare the five intra-frame prediction modes obtained in the mode preliminary screening stage with the MPM list generated by the adjacent blocks of the current block to be coded in the mode decision stage (that is, the initial The 3 intra-frame prediction modes in the MPM list) are combined to obtain 5 new intra-frame prediction modes, and then the optimal one is selected from these 5 prediction modes to perform the RDO reconstruction process to obtain the RD cost. The coding mode is determined by comparing the RD cost with the RD cost of inter-frame prediction.
模式修正阶段:如果模式决策阶段决策出的编码模式是帧内编码模式,则在模式修正阶段用相邻块真正的重建像素(即,相邻块的最终重建像素)以及编码模式进行帧内预测的修正。Mode correction stage: If the coding mode determined in the mode decision stage is the intra-frame coding mode, the real reconstructed pixels of adjacent blocks (ie, the final reconstructed pixels of adjacent blocks) and the coding mode are used for intra-frame prediction in the mode modification stage. correction.
比如,用模式决策阶段决策出的帧内预测模式进行RDO重建过程得到 重建像素和RD cost,其中帧内预测时用到的参考像素为相邻块在模式修正阶段的重建像素(即,相邻块的最终重建像素)。同时根据相邻块在模式修正阶段的编码模式和预测模式信息生成MPM列表(即,最终MPM列表)中的3个帧内预测模式,从这3个帧内预测模式中选择第一个与模式决策阶段传过来的帧内预测模式不同的帧内预测模式进行RDO重建过程得到重建像素和RD cost。比较上述两个帧内预测模式的RD cost,选择RD cost较小的帧内预测模式作为模式修正阶段最优的帧内预测模式(即,待编码图像块的最终预测模式),保存其重建像素作为最终的编码重建像素(即,待编码图像块的最终重建像素)。其中,若所述相邻块的最终预测模式为帧内预测模式,则所述预测模式信息为帧内预测模式,若所述相邻块的最终预测模式为帧间预测模式,则不需要所述预测模式信息。For example, using the intra prediction mode decided in the mode decision stage to perform the RDO reconstruction process to obtain the reconstructed pixels and RD cost, where the reference pixels used in intra prediction are the reconstructed pixels of adjacent blocks in the mode correction stage (that is, adjacent the final reconstructed pixels of the block). At the same time, 3 intra prediction modes in the MPM list (ie, the final MPM list) are generated according to the coding mode and prediction mode information of the adjacent blocks in the mode modification stage, and the first and mode are selected from the 3 intra prediction modes. Different intra-frame prediction modes passed from the decision-making stage perform the RDO reconstruction process to obtain reconstructed pixels and RD cost. Compare the RD cost of the above two intra prediction modes, select the intra prediction mode with the smaller RD cost as the optimal intra prediction mode in the mode correction stage (that is, the final prediction mode of the image block to be encoded), and save its reconstructed pixels. As the final encoded reconstructed pixel (ie, the final reconstructed pixel of the image block to be encoded). Wherein, if the final prediction mode of the adjacent block is the intra prediction mode, the prediction mode information is the intra prediction mode, and if the final prediction mode of the adjacent block is the inter prediction mode, no the prediction mode information.
应理解,如果在模式决策阶段中,V个子图像块的RD cost之和小于当前待编码块的RD cost的大小,则模式修正阶段针对的是每个子图像块。例如,最终MPM列表为子图像块的最终MPM列表。It should be understood that, if in the mode decision stage, the sum of the RD cost of the V sub-image blocks is smaller than the size of the RD cost of the current block to be encoded, the mode correction stage is directed to each sub-image block. For example, the final MPM list is the final MPM list of sub-image blocks.
应理解,在一个示例中,上述步骤(A1)和(B1)对应模式初筛阶段;(A2)、(B2)、S330和S210对应模式决策阶段;S230对应模式修正阶段。It should be understood that, in an example, the above steps (A1) and (B1) correspond to the mode preliminary screening stage; (A2), (B2), S330 and S210 correspond to the mode decision stage; and S230 corresponds to the mode correction stage.
在另一示例中,上述步骤(A1)对应模式初筛阶段;(A2)和S210对应模式决策阶段;S230对应模式修正阶段。In another example, the above steps (A1) correspond to the mode preliminary screening stage; (A2) and S210 correspond to the mode decision stage; and S230 corresponds to the mode correction stage.
可选地,模式初筛阶段对应第R-2流水级;模式决策阶段对应第R-1流水级;模式修正阶段对应第R流水级。Optionally, the mode preliminary screening stage corresponds to the R-2 flow level; the mode decision stage corresponds to the R-1 flow stage; and the mode correction stage corresponds to the R-th flow stage.
进一步地,在模式修正阶段完成后,还可以进行环路滤波和熵编码。关于如何进行环路滤波和熵编码可以参照现有技术。Further, after the mode correction stage is completed, loop filtering and entropy coding can also be performed. Regarding how to perform in-loop filtering and entropy coding, reference may be made to the prior art.
可选地,环路滤波可以对应第R+1级流水,熵编码可以对应第R+2级流水。Optionally, the loop filtering may correspond to the R+1th stage pipeline, and the entropy encoding may correspond to the R+2th stage pipeline.
示例性的,图8示出了基于图2所示的方法的一种流水结构示意图。参见图8,相邻的编码区域之间错开一级流水。比如,编码区域1进行到R-1流水级时,其相邻的编码区域2进行到R-2级流水。应理解,不同级流水之间并行工作。Exemplarily, FIG. 8 shows a schematic diagram of a pipeline structure based on the method shown in FIG. 2 . Referring to FIG. 8 , one-stage pipelines are staggered between adjacent coding regions. For example, when coding region 1 goes to R-1 pipeline level, its adjacent coding region 2 goes to R-2 level pipeline. It should be understood that the different stages of pipeline work in parallel.
本领域技术人员可以理解,前文中所涉及的N1种帧内预测模式是R-2流水级得到的;最佳帧内预测模式以及初始重建像素是R-1流水级得到的;最终预测模式以及最终重建像素是R流水级得到的。Those skilled in the art can understand that the N1 intra-frame prediction modes mentioned above are obtained from the R-2 pipeline stage; the optimal intra-frame prediction mode and the initial reconstructed pixels are obtained from the R-1 pipeline stage; the final prediction mode and The final reconstructed pixels are obtained by the R pipeline stage.
上文结合图1至图8,详细描述了本申请的方法实施例,下面结合图9,详细描述本申请的装置实施例。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。The method embodiments of the present application are described in detail above with reference to FIGS. 1 to 8 , and the apparatus embodiments of the present application are described in detail below with reference to FIG. 9 . It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments. Therefore, for the parts not described in detail, reference may be made to the foregoing method embodiments.
图9是本申请提供的编码装置的示意性结构图。该装置900可以是实体设备,也可以是芯片。该装置可以是相机、无人机、手机等具备视频编解码处理功能的设备。该装置包括:存储器910和处理器920。FIG. 9 is a schematic structural diagram of an encoding device provided by the present application. The
存储器910可用于存储代码。处理器920可用于读取所述存储器中的代码,以执行如下操作:将待编码图像块的相邻块的初始重建像素作为参考像素,确定所述待编码图像块的最佳帧内预测模式和初始重建像素,其中,所述待编码图像块在所述待编码图像块的最佳帧内预测模式下的重建像素为所述待编码图像块的初始重建像素;从所述待编码图像块的最佳帧内预测模式和所述待编码图像块的帧间预测模式中,确定所述待编码图像块的最佳预测模式;若所述最佳预测模式为所述待编码图像块的最佳帧内预测模式,将所述相邻块的最终重建像素作为参考像素,根据所述待编码图像块的最佳帧内预测模式,确定所述待编码图像块的最终预测模式和最终重建像素,其中所述待编码图像块的最终预测模式下的重建像素为所述待编码图像块的最终重建像素。
可选地,所述将待编码图像块的相邻块的初始重建像素作为参考像素,确定所述待编码图像块的最佳帧内预测模式和初始重建像素,包括:将所述待编码图像块的相邻块的初始重建像素作为参考像素,确定所述待编码图像块的第一帧内预测模式及第一初始重建像素;将所述待编码图像块包含的V个子图像块中每个子图像块的相邻块的初始重建像素作为参考像素,确定所述每个子图像块的第二帧内预测模式及第二初始重建像素,所述V个子图像块是将所述待编码图像块按照第一划分方式划分得到的,V为正整数;根据所述待编码图像块在所述第一帧内预测模式下的第一编码代价以及所述V个子图像块中每个子图像块在所述第二帧内预测模式下的第一编码代价之和,确定所述待编码图像块的最佳帧内预测模式及初始重建像素。Optionally, the determining the optimal intra prediction mode and the initial reconstructed pixels of the image block to be encoded by using the initial reconstructed pixels of the adjacent blocks of the image block to be encoded as reference pixels includes: The initial reconstructed pixels of adjacent blocks of the block are used as reference pixels to determine the first intra prediction mode and the first initial reconstructed pixels of the to-be-coded image block; each sub-image block of the V sub-image blocks included in the to-be-coded image block is The initial reconstructed pixels of adjacent blocks of the image block are used as reference pixels to determine the second intra-frame prediction mode and the second initial reconstructed pixels of each sub-image block, and the V sub-image blocks are the image blocks to be encoded according to Obtained by the first division method, V is a positive integer; according to the first coding cost of the to-be-coded image block in the first intra-frame prediction mode and each sub-image block in the V sub-image blocks in the The sum of the first coding costs in the second intra-frame prediction mode determines the optimal intra-frame prediction mode and initial reconstructed pixels of the image block to be coded.
可选地,所述将所述待编码图像块的相邻块的初始重建像素作为参考像素,确定所述待编码图像块的第一帧内预测模式及第一初始重建像素,包括:将所述待编码图像块的相邻块的初始重建像素作为参考像素,采用N1种帧内预测模式对所述待编码图像块进行帧内预测,确定所述待编码图像块的第 一帧内预测模式及第一初始重建像素,N1为正整数。Optionally, the determining the first intra prediction mode and the first initial reconstructed pixel of the image block to be encoded by using the initial reconstructed pixels of the adjacent blocks of the image block to be encoded as reference pixels includes: The initial reconstructed pixels of adjacent blocks of the to-be-coded image block are used as reference pixels, and N1 intra-frame prediction modes are used to perform intra-frame prediction on the to-be-coded image block, and the first intra-frame prediction mode of the to-be-coded image block is determined. and the first initial reconstructed pixel, N1 is a positive integer.
可选地,所述将所述待编码图像块包含的V个子图像块中每个子图像块的相邻块的初始重建像素作为参考像素,确定所述每个子图像块的第二帧内预测模式及第二初始重建像素,包括:将所述每个子图像块的相邻块的初始重建像素作为参考像素,分别采用所述每个子图像块对应的N2种帧内预测模式对所述每个子图像块进行帧内预测,确定所述每个子图像块的第二帧内预测模式及第二初始重建像素,N2为正整数。Optionally, determining the second intra prediction mode of each sub-image block by using the initial reconstructed pixels of adjacent blocks of each sub-image block in the V sub-image blocks included in the to-be-coded image block as reference pixels and a second initial reconstructed pixel, comprising: using the initial reconstructed pixel of the adjacent block of each sub-image block as a reference pixel, and using N2 intra prediction modes corresponding to each sub-image block The block performs intra-frame prediction to determine the second intra-frame prediction mode and the second initial reconstruction pixel of each sub-image block, and N2 is a positive integer.
可选地,所述处理器还用于执行下述操作:根据所述待编码图像块的原始像素的梯度信息,从Q1种帧内预测模式中确定P1种帧内预测模式,Q1>P1,且Q1和P1均为整数;根据所述P1种帧内预测模式,确定所述N1种帧内预测模式。Optionally, the processor is further configured to perform the following operation: according to the gradient information of the original pixels of the image block to be encoded, determine P1 intra prediction modes from Q1 intra prediction modes, Q1>P1, And Q1 and P1 are both integers; the N1 intra prediction modes are determined according to the P1 intra prediction modes.
可选地,PI=N1。Optionally, PI=N1.
可选地,所述根据所述待编码图像块的原始像素的梯度信息,从Q1种帧内预测模式中确定P1种帧内预测模式,包括:确定所述Q1种帧内预测模式对应的多个子集,所述多个子集中的每个子集包括所述Q1种帧内预测模式中的多种帧内预测模式;根据所述待编码图像块的原始像素的梯度信息,从所述多个子集中确定一个子集;将所述待编码图像块的相邻块的原始像素作为参考像素,采用所确定出的子集中的每种帧内预测模式,对所述待编码图像块进行帧内预测,确定所述待编码图像块在所述所确定出的子集中的每种帧内预测模式下的第一编码代价;将所确定出的子集中第一编码代价最小的P1种帧内预测模式确定为所述P1种帧内预测模式。Optionally, determining the P1 intra prediction modes from the Q1 intra prediction modes according to the gradient information of the original pixels of the to-be-encoded image block includes: determining a plurality of P1 intra prediction modes corresponding to the Q1 intra prediction modes. subsets, each of the subsets includes multiple intra prediction modes in the Q1 intra prediction modes; according to the gradient information of the original pixels of the image block to be encoded, from the multiple subsets Determining a subset; using the original pixels of adjacent blocks of the image block to be encoded as reference pixels, and using each intra prediction mode in the determined subset to perform intra prediction on the image block to be encoded, determining the first encoding cost of the image block to be encoded in each intra-frame prediction mode in the determined subset; determining the P1 intra-frame prediction modes with the smallest first encoding cost in the determined subset is the P1 intra prediction mode.
可选地,所述多个子集为4个子集。Optionally, the multiple subsets are 4 subsets.
可选地,所述每个子集所包括的帧内预测模式的数量相同。Optionally, the number of intra prediction modes included in each subset is the same.
可选地,所述Q1种帧内预测模式包括Planar模式、DC模式和33种角度模式,和/或,所述每个子集包括的帧内预测模式的种类为11种。Optionally, the Q1 intra-frame prediction modes include Planar mode, DC mode, and 33 angular modes, and/or the types of intra-frame prediction modes included in each subset are 11 types.
可选地,根据所述P1种帧内预测模式,确定所述N1种帧内预测模式,包括:根据所述待编码图像块的相邻块的初始MPM列表中的F1种帧内预测模式以及所述P1种帧内预测模式,确定所述N1种帧内预测模式,其中,所述初始MPM列表是根据所述待编码图像块的相邻块的第一帧内预测模式确定的,F1为正整数。Optionally, determining the N1 intra prediction modes according to the P1 intra prediction modes includes: according to the F1 intra prediction modes in the initial MPM list of adjacent blocks of the to-be-coded image block and The P1 intra prediction modes determine the N1 intra prediction modes, wherein the initial MPM list is determined according to the first intra prediction mode of the adjacent block of the to-be-coded image block, and F1 is positive integer.
可选地,所述根据所述待编码图像块的相邻块的初始MPM列表中的F1 种帧内预测模式以及所述P1种帧内预测模式,确定所述N1种帧内预测模式,包括:将所述P1种帧内预测模式中与所述F1种帧内预测模式不同的N1-F1种帧内预测模式,以及所述F1种帧内预测模式,作为所述N1种帧内预测模式。Optionally, the N1 intra prediction modes are determined according to the F1 intra prediction modes and the P1 intra prediction modes in the initial MPM list of the adjacent blocks of the to-be-coded image block, including: : take N1-F1 intra-frame prediction modes that are different from the F1 intra-frame prediction modes and the F1 intra-frame prediction modes as the N1 intra-frame prediction modes .
可选地,P1=N1,F1=3。Optionally, P1=N1, F1=3.
可选地,所述处理器720还可以执行下述操作:针对所述每个子图像块,根据所述子图像块的梯度信息,从Q2种帧内预测模式中确定P2种帧内预测模式,Q2>P2,且Q2和P2均为整数;根据所述每个子图像块的所述P2种帧内预测模式,确定所述每个子图像块的N2种帧内预测模式。Optionally, the processor 720 may further perform the following operation: for each sub-image block, according to the gradient information of the sub-image block, determine P2 intra prediction modes from Q2 intra prediction modes, Q2>P2, and both Q2 and P2 are integers; N2 intra prediction modes of each sub image block are determined according to the P2 intra prediction modes of each sub image block.
可选地,P2=N2。Optionally, P2=N2.
可选地,根据所述子图像块的梯度信息,从Q2种帧内预测模式中确定P2种帧内预测模式,包括:按照帧内预测模式的方向和/或种类,将所述Q2种帧内预测模式划分为多个子集,所述多个子集中的每个子集包括所述Q2种帧内预测模式中的多种帧内预测模式;根据所述子图像块的原始像素的梯度信息,从所述多个子集中确定一个子集;将所述子图像块的相邻块的原始像素作为参考像素,采用所确定出的子集中的每种帧内预测模式,对所述子图像块进行帧内预测,确定所述子图像块在所述所确定出的子集中的每种帧内预测模式下的第一编码代价;将所确定出的子集中第一编码代价最小的P2种帧内预测模式确定为所述P2种帧内预测模式。Optionally, determining P2 intra-frame prediction modes from the Q2 intra-frame prediction modes according to the gradient information of the sub-image block, including: according to the direction and/or type of the intra-frame prediction mode, converting the Q2 kinds of frame The intra prediction mode is divided into multiple subsets, and each subset in the multiple subsets includes multiple intra prediction modes in the Q2 intra prediction modes; according to the gradient information of the original pixels of the sub image block, from A subset is determined from the plurality of subsets; the original pixels of the adjacent blocks of the sub-image block are used as reference pixels, and each intra-frame prediction mode in the determined subset is used to perform a frame rate on the sub-image block. Intra-prediction, determining the first coding cost of the sub-image block in each intra-frame prediction mode in the determined subset; performing the P2 intra-frame predictions with the smallest first coding cost in the determined subset The mode is determined to be the P2 intra prediction modes.
可选地,所述多个子集为4个子集。Optionally, the multiple subsets are 4 subsets.
可选地,所述每个子集所包括的帧内预测模式的数量相同。Optionally, the number of intra prediction modes included in each subset is the same.
可选地,所述Q2种帧内预测模式包括Planar模式、DC模式和33种角度模式,和/或,所述每个子集包括的帧内预测模式的种类为11种。Optionally, the Q2 intra-frame prediction modes include Planar mode, DC mode, and 33 angle modes, and/or, the types of intra-frame prediction modes included in each subset are 11 types.
可选地,根据所述每个子图像块的所述P2种帧内预测模式,确定所述每个子图像块的N2种帧内预测模式,包括:根据所述每个子图像块的相邻块的初始MPM列表中的F2种帧内预测模式以及所述每个子图像块的P2种帧内预测模式,确定所述每个子图像块的N2种帧内预测模式,其中,所述初始MPM列表是根据所述子图像块的相邻块的第二帧内预测模式确定的,F2为正整数。Optionally, determining N2 intra-frame prediction modes of each sub-image block according to the P2 intra-frame prediction modes of each sub-image block, including: F2 intra-frame prediction modes in the initial MPM list and P2 intra-frame prediction modes of each sub-image block are determined, and N2 intra-frame prediction modes of each sub-image block are determined, wherein the initial MPM list is based on It is determined by the second intra-frame prediction mode of the adjacent blocks of the sub-image block, and F2 is a positive integer.
可选地,所述根据所述每个子图像块的相邻块的初始MPM列表中的F2种帧内预测模式以及所述每个子图像块的P2种帧内预测模式,确定所述每 个子图像块的N2种帧内预测模式,包括:针对每个子图像块,将所述子图像块的所述P2种帧内预测模式中与所述子图像块的所述F2种帧内预测模式不同的N2-F2种帧内预测模式,以及所述子图像块的所述F2种帧内预测模式,作为子图像块的所述N2种帧内预测模式。Optionally, according to the F2 intra-frame prediction modes in the initial MPM list of adjacent blocks of each sub-image block and the P2 intra-frame prediction modes of each sub-image block, determine the each sub-image. N2 intra-frame prediction modes for blocks, including: for each sub-image block, assigning the P2 kinds of intra-frame prediction modes of the sub-image block different from the F2 kinds of intra-frame prediction modes of the sub-image block N2-F2 intra prediction modes, and the F2 intra prediction modes of the sub image block are used as the N2 intra prediction modes of the sub image block.
可选地,P2=N2,F2=3。Optionally, P2=N2, F2=3.
可选地,所述第一编码代价为哈达玛代价Optionally, the first encoding cost is a Hadamard cost
可选地,所述将所述相邻块的最终重建像素作为参考像素,根据所述待编码图像块的最佳帧内预测模式,确定所述待编码图像块的最终预测模式,包括:若所述待编码图像块的最佳帧内预测模式为所述第一帧内预测模式,将所述待编码图像块的相邻块的最终重建像素作为参考像素,确定所述待编码图像块在所述最佳帧内预测模式和M1种帧内预测模式下的第二编码代价,并将所述最佳帧内预测模式和M1种帧内预测模式中所述第二编码代价最小帧内预测模式,确定为所述待编码图像块的最终预测模式,M1为正整数;或者,若所述待编码图像块的最佳帧内预测模式为所述V个子图像块的所述第二帧内预测模式,针对每个子图像块,将所述子图像块的相邻块的最终重建像素作为参考像素,确定所述子图像块在所述子图像块的所述第二帧内预测模式和所述子图像块的M2种帧内预测模式下的所述第二编码代价,并将所述子图像块的所述第二帧内预测模式和所述子图像块的M2种帧内预测模式中所述第二编码代价最小帧内预测模式,确定为所述子图像块的最终预测模式,M2为正整数。Optionally, determining the final prediction mode of the to-be-coded image block according to the best intra-frame prediction mode of the to-be-coded image block by using the final reconstructed pixel of the adjacent block as a reference pixel, including: if The best intra-frame prediction mode of the image block to be encoded is the first intra-frame prediction mode, and the final reconstructed pixel of the adjacent block of the image block to be encoded is used as a reference pixel, and it is determined that the image block to be encoded is in The second coding cost under the optimal intra prediction mode and M1 intra prediction modes, and the minimum intra prediction of the second coding cost in the optimal intra prediction mode and M1 intra prediction modes. mode, determined as the final prediction mode of the to-be-coded image block, M1 is a positive integer; or, if the best intra-frame prediction mode of the to-be-coded image block is the second intra frame of the V sub-image blocks Prediction mode, for each sub-image block, the final reconstructed pixel of the adjacent block of the sub-image block is used as a reference pixel to determine the second intra-frame prediction mode of the sub-image block and the second coding cost in the M2 intra prediction modes of the sub image block, and the second intra prediction mode of the sub image block and the M2 intra prediction modes of the sub image block The second intra-frame prediction mode with the least coding cost is determined as the final prediction mode of the sub-image block, and M2 is a positive integer.
可选地,所述M1种帧内预测模式包括下述中的一项或两项:所述待编码图像块的最终最可能模式MPM列表中的W1种帧内预测模式中的一种或多种,其中,所述待编码图像块的最终MPM列表是根据所述待编码图像块的相邻块的最终预测模式和/或所述待编码图像块的相邻块的最佳预测模式生成的,W1为正整数;所述N1种帧内预测模式中除所述第一帧内预测模式以外的所述第二编码代价最小的一种或多种帧内预测模式。Optionally, the M1 intra prediction modes include one or both of the following: one or more of the W1 intra prediction modes in the final most probable mode MPM list of the image block to be encoded. The final MPM list of the image block to be encoded is generated according to the final prediction mode of the adjacent blocks of the image block to be encoded and/or the best prediction mode of the adjacent blocks of the image block to be encoded , W1 is a positive integer; among the N1 intra-frame prediction modes, one or more intra-frame prediction modes in which the second coding cost is the smallest except for the first intra-frame prediction mode.
可选地,M1=1,所述M1种帧内预测模式包括所述待编码图像块的最终MPM列表中第一个或第二个或第W1个与所述待编码图像块的第一帧内预测模式不同的帧内预测模式。Optionally, M1=1, and the M1 intra prediction modes include the first or second or W1th in the final MPM list of the image block to be encoded and the first frame of the image block to be encoded. Intra prediction modes with different intra prediction modes.
可选地,所述子图像块的M2种帧内预测模式包括下述中的一项或两项:所述子图像块的最终最可能模式MPM列表中的W2种帧内预测模式中的一 种或多种,其中,所述子图像块的最终MPM列表是根据所述子图像块的相邻块的最终预测模式和/或所述待编码图像块的相邻块的最佳预测模式生成的,W2为正整数;所述子图像块的N2种帧内预测模式中除所述子图像块的第二帧内预测模式以外的所述第二编码代价最小的一种或多种帧内预测模式。Optionally, the M2 intra-frame prediction modes of the sub-image block include one or both of the following: one of the W2 intra-frame prediction modes in the final MPM list of the sub-image block. One or more, wherein the final MPM list of the sub-image block is generated according to the final prediction mode of the adjacent blocks of the sub-image block and/or the best prediction mode of the adjacent blocks of the to-be-coded image block , W2 is a positive integer; among the N2 intra prediction modes of the sub-image block, one or more intra-frames with the smallest second coding cost except the second intra-frame prediction mode of the sub-image block forecast mode.
可选地,M2=1,所述M2种帧内预测模式包括所述子图像块的最终MPM列表中第一个或第二个或第W2个与所述子图像块的第二帧内预测模式不同的帧内预测模式。Optionally, M2=1, and the M2 intra prediction modes include the first or the second or the W2th in the final MPM list of the sub image block and the second intra prediction of the sub image block. Intra prediction modes with different modes.
可选地,所述第二编码代价为率失真代价。Optionally, the second coding cost is a rate-distortion cost.
可选地,所述将待编码图像块的相邻块的初始重建像素作为参考像素,确定所述待编码图像块的最佳帧内预测模式及第一初始重建像素,包括:将所述待编码图像块的相邻块的初始重建像素作为参考像素,采用N1种帧内预测模式对所述待编码图像块进行帧内预测,确定所述待编码图像块的最佳帧内预测模式及初始重建像素,N1为正整数。Optionally, the determining the optimal intra prediction mode and the first initial reconstruction pixel of the to-be-coded image block by using the initial reconstructed pixels of the adjacent blocks of the to-be-coded image block as reference pixels includes: The initial reconstructed pixels of adjacent blocks of the coded image block are used as reference pixels, and N1 intra-frame prediction modes are used to perform intra-frame prediction on the to-be-coded image block, and the optimal intra-frame prediction mode and initial frame of the to-be-coded image block are determined. Reconstructed pixel, N1 is a positive integer.
可选地,所述处理器920还可以执行下述操作:对所述待编码图像块的最终预测模式进行编码,并将编码的码流发送给解码端。Optionally, the
此外,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序(或者称为计算机指令),当所述计算机程序在计算机上运行时,使得计算机执行方法实施例中的视频处理方法。In addition, the present application also provides a computer-readable storage medium, on which a computer program (or referred to as a computer instruction) is stored, when the computer program is run on a computer, the computer executes the method to implement The video processing method in the example.
本申请还提供一种计算机程序产品,所述计算机程序产品包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行本申请方法实施例中的视频处理方法。The present application further provides a computer program product, the computer program product includes computer program code, when the computer program code is run on a computer, the computer program code causes the computer to execute the video processing method in the method embodiment of the present application.
本申请还提供一种芯片,所述芯片包括处理器。用于存储计算机程序的存储器独立于芯片而设置,处理器用于执行存储器中存储的计算机程序,以执行方法实施例中的视频处理方法。The present application also provides a chip including a processor. The memory for storing the computer program is provided independently of the chip, and the processor is used for executing the computer program stored in the memory to execute the video processing method in the method embodiment.
可选地,所述芯片还包括所述存储器。Optionally, the chip further includes the memory.
进一步可选地,所述芯片还包括通信接口。所述通信接口可以是收发器、输入/输出接口、管脚或者电路等。Further optionally, the chip further includes a communication interface. The communication interface may be a transceiver, an input/output interface, a pin or a circuit, or the like.
可选地,上述的处理器可以是一个或多个,存储器可以是一个或多个。Optionally, the above-mentioned processors may be one or more, and the memory may be one or more.
可选地,所述存储器可以与所述处理器集成在一起,或者所述存储器与处理器分离设置。Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
可选地,所述处理器可以是逻辑电路、集成电路等。Optionally, the processor may be a logic circuit, an integrated circuit, or the like.
本申请还提供一种芯片,所述芯片包括R-2流水级、R-1流水级和R流水级。R-2流水级、R-1流水级和R流水级可以参见前文描述,这里不再赘述。The present application also provides a chip, which includes an R-2 flow stage, an R-1 flow stage, and an R flow stage. The R-2 flow level, the R-1 flow level, and the R flow level may refer to the foregoing description, and will not be repeated here.
可选地,所述R-2流水级、所述R-1流水级和所述R流水级并行工作。Optionally, the R-2 flow stage, the R-1 flow stage and the R flow stage work in parallel.
以上各实施例中,处理器可以为中央处理器(central processing unit,CPU)、通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件、微处理器或一个或多个用于控制本申请方案程序执行的集成电路等。例如,处理器可以包括数字信号处理器设备、微处理器设备、模数转换器、数模转换器等。处理器可以根据这些设备各自的功能而在这些设备之间分配移动设备的控制和信号处理的功能。此外,处理器可以包括操作一个或多个软件程序的功能,软件程序可以存储在存储器中。处理器的所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的单元。In the above embodiments, the processor may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a ready-made Programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, microprocessors, or one or more integrated circuits for controlling the execution of programs in the present application, etc. . For example, a processor may include a digital signal processor device, a microprocessor device, an analog-to-digital converter, a digital-to-analog converter, and the like. The processor may distribute the control and signal processing functions of the mobile device among the devices according to their respective functions. Additionally, the processor may include functionality to operate one or more software programs, which may be stored in memory. The functions of the processor may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions.
存储器可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备。也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。The memory can be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or other types of storage devices that can store information and instructions Dynamic storage device. It can also be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, Laser Disc, Optical Disc, Digital Versatile Disc, Blu-ray Disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer medium, but not limited to this.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其他任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中, 或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, digital video disc (DVD)), or semiconductor media (eg, solid state disk (SSD)), etc. .
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例的技术方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the technical solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护 范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims (66)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/141756 WO2022141282A1 (en) | 2020-12-30 | 2020-12-30 | Video processing method and encoding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/141756 WO2022141282A1 (en) | 2020-12-30 | 2020-12-30 | Video processing method and encoding device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022141282A1 true WO2022141282A1 (en) | 2022-07-07 |
Family
ID=82260050
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/141756 Ceased WO2022141282A1 (en) | 2020-12-30 | 2020-12-30 | Video processing method and encoding device |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2022141282A1 (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102685532A (en) * | 2012-06-04 | 2012-09-19 | 山东大学 | Coding method for free view point four-dimensional space video coding system |
| CN102752595A (en) * | 2012-06-29 | 2012-10-24 | 香港应用科技研究院有限公司 | Hybrid skip mode for depth map encoding and decoding |
| GB2494469A (en) * | 2011-09-12 | 2013-03-13 | Canon Kk | Intra mode coding using probabilities of occurrence of different prediction modes |
| CN103533369A (en) * | 2013-10-24 | 2014-01-22 | 东南大学 | Rapid mode selection method of scalable video coding(SVC) space reinforcement layer |
| CN108702515A (en) * | 2016-02-25 | 2018-10-23 | 联发科技股份有限公司 | Method and device for video coding and decoding |
| CN110800302A (en) * | 2017-06-07 | 2020-02-14 | 联发科技股份有限公司 | Method and apparatus for intra-inter prediction for video coding |
-
2020
- 2020-12-30 WO PCT/CN2020/141756 patent/WO2022141282A1/en not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2494469A (en) * | 2011-09-12 | 2013-03-13 | Canon Kk | Intra mode coding using probabilities of occurrence of different prediction modes |
| CN102685532A (en) * | 2012-06-04 | 2012-09-19 | 山东大学 | Coding method for free view point four-dimensional space video coding system |
| CN102752595A (en) * | 2012-06-29 | 2012-10-24 | 香港应用科技研究院有限公司 | Hybrid skip mode for depth map encoding and decoding |
| CN103533369A (en) * | 2013-10-24 | 2014-01-22 | 东南大学 | Rapid mode selection method of scalable video coding(SVC) space reinforcement layer |
| CN108702515A (en) * | 2016-02-25 | 2018-10-23 | 联发科技股份有限公司 | Method and device for video coding and decoding |
| CN110800302A (en) * | 2017-06-07 | 2020-02-14 | 联发科技股份有限公司 | Method and apparatus for intra-inter prediction for video coding |
Non-Patent Citations (1)
| Title |
|---|
| A.K. RAMASUBRAMONIAN (QUALCOMM), G. VAN DER AUWERA (QUALCOMM), V. SEREGIN (QUALCOMM), M. KARCZEWICZ (QUALCOMM): "CE3: Two MPM modes and shape dependency (Test 3.1.1)", 11. JVET MEETING; 20180711 - 20180718; LJUBLJANA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 3 July 2018 (2018-07-03), Ljubljana SI, pages 1 - 5, XP030198776 * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11985309B2 (en) | Picture coding method, picture decoding method, and related apparatuses | |
| US11277644B2 (en) | Combining mode dependent intra smoothing (MDIS) with intra interpolation filter switching | |
| JP5823623B2 (en) | Motion vector predictor candidate clipping removal for video coding | |
| CN113891076B (en) | Method and apparatus for filtering decoded blocks of video data and storage medium | |
| TWI880126B (en) | Method and apparatus of frame inter prediction of video data | |
| TW202218428A (en) | Image encoding method, image decoding method, and related apparatuses | |
| US20120287994A1 (en) | Filtering blockiness artifacts for video coding | |
| CN116584096A (en) | Luma-based Chroma Prediction for Video Coding | |
| TW202232955A (en) | Upsampling reference pixels for intra-prediction in video coding | |
| CN111801941A (en) | Method and apparatus for image filtering using adaptive multiplier coefficients | |
| CN111316642A (en) | Method and apparatus for signaling image encoding and decoding division information | |
| US20250039437A1 (en) | Methods and devices for multi-hypothesis-based prediction | |
| US11638019B2 (en) | Methods and systems for prediction from multiple cross-components | |
| CN111869208A (en) | Method and apparatus for image filtering using adaptive multiplier coefficients | |
| WO2022141282A1 (en) | Video processing method and encoding device | |
| CN109889831B (en) | Method, encoder and apparatus for 360 degree video intra mode selection based on CU size | |
| US9414076B2 (en) | System architecture for distributed coding | |
| US11706410B2 (en) | Methods and systems for combined lossless and lossy coding | |
| WO2022141278A1 (en) | Video processing method and coding apparatus | |
| EP4660950A1 (en) | System and method for mesh clers coding | |
| CN114208197B (en) | Block partitioning methods for video encoding and decoding | |
| HK40065622A (en) | Method and apparatus for constructing motion information list in video encoding and decoding, and device | |
| HK40065622B (en) | Method and apparatus for constructing motion information list in video encoding and decoding, and device | |
| CN114079788A (en) | Motion information list construction method, device and equipment in video coding and decoding | |
| HK40045699A (en) | Combining mode dependent intra smoothing (mdis) with intra interpolation filter switching |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20967622 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20967622 Country of ref document: EP Kind code of ref document: A1 |