Video encoding and decoding method and device
By filling different amounts of adjacent block motion information according to the width and height information of the coding unit, and using the angle prediction mode to improve the accuracy of inter-frame prediction, it solves the problem of inaccurate inter-frame prediction in the AVS3 standard and improves coding performance and efficiency.
Patent Information
- Application Number
- CN202010474296.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-28
- Filing Date
- 2020-05-29
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-05-29
AI Technical Summary
In the AVS3 standard, inaccurate inter-frame prediction leads to reduced coding performance, especially when the width and height of coding units are different. Existing methods have problems of insufficient redundancy and diversity when filling in adjacent block motion information.
Filling different amounts of adjacent block motion information according to the width and height information of the current coding unit, the angle prediction mode is used to improve the accuracy of inter-frame prediction, reduce redundant information on the short side and increase the diversity of the long side.
The accuracy and coding performance of inter-frame prediction are improved, redundant information is reduced, and coding efficiency is improved.
Smart Images

Figure CN113329225B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to video coding technology, and more particularly, to inter-frame prediction technology in video coding. Background Art
[0002] In the existing video coding standards (such as HEVC, AVS2, AVS3, VVC, etc.), it is defined that each image in the video sequence is divided into multiple coding blocks, and each coding block is decoded and decoded. The specific coding steps are prediction, transformation, quantization and entropy coding. Among them, the prediction is to obtain the prediction value of the current coding block by using the spatial correlation between the current coding block and the reconstructed coding block that has been encoded in the current image, or the temporal correlation between the reconstructed block in the encoded image. The encoder entropy encodes the prediction mode information finally selected by each coding block, the residual information of the difference between the prediction value and the original value after transformation and quantization, and writes it into the bitstream. The specific decoding steps include: the decoding end obtains the prediction information of the current block to be decoded from the bitstream, and obtains the prediction value according to the same prediction method as the encoding end based on the prediction information; obtains the residual information of the current block to be decoded from the bitstream, and obtains the residual value after inverse quantization and inverse transformation; and adds the residual value and the prediction value to obtain the reconstruction value of the current block to be decoded.
[0003] There are six ways to divide the coding unit defined in the AVS3 standard. For different coding unit divisions, there may be a problem of inaccurate inter-frame prediction, which may lead to a decrease in coding performance. Summary of the invention
[0004] The various aspects of the present disclosure are to solve at least the above-mentioned problems and / or disadvantages, and provide at least the following advantages. Therefore, the various aspects of the present disclosure provide a method for filling motion information in an angle prediction mode, which fills different amounts of adjacent block motion information on the left and top of the current coding unit according to the shape of the current coding unit (i.e., width and height information). Thereby achieving the following advantages: reducing the redundancy caused by filling repeated motion information on the short side, increasing the diversity of filling motion information on the long side, improving the accuracy of inter-frame prediction, and improving coding performance and efficiency.
[0005] According to one aspect of the present disclosure, a method for deriving angle prediction motion information at a decoding end includes: filling surrounding block motion information according to width and height information of a current coding unit to be decoded; and deriving angle prediction motion information according to the filled surrounding block motion information.
[0006] According to an aspect of the present disclosure, filling surrounding block motion information according to width and height information of a current coding unit to be decoded includes: determining, according to a size relationship between a width and a height of the current coding unit to be decoded, a number of surrounding blocks filled in a horizontal direction and a number of surrounding blocks filled in a vertical direction of the current coding unit to be decoded, respectively, and filling the surrounding block motion information according to the determined number of surrounding blocks to be filled.
[0007] According to one aspect of the present disclosure, filling the motion information of surrounding blocks according to the width and height information of the current coding unit to be decoded further includes: traversing the surrounding blocks, and if the motion information of the currently traversed surrounding blocks is not available, using the motion information of other surrounding blocks for filling, wherein available means that the block is in the current image, the block has been decoded and the block is in inter-frame prediction mode.
[0008] According to an aspect of the present disclosure, deriving angular prediction motion information according to padded surrounding block motion information includes: obtaining surrounding block motion information corresponding to an angular prediction mode; and determining the number of valid angular prediction modes based on a judgment condition.
[0009] According to an aspect of the present disclosure, the angular prediction modes include: horizontal, vertical, horizontal up, horizontal down, and vertical right.
[0010] According to one aspect of the present disclosure, deriving the angle prediction motion information based on the filled surrounding block motion information further includes: modifying the determined valid angle prediction mode information based on the width and height information of the current coding unit to be decoded, wherein the valid angle prediction mode information includes at least one of the following: the number of valid angle prediction modes, the angle prediction mode validity identifier, and the angle prediction mode auxiliary information identifier.
[0011] According to one aspect of the present disclosure, the judgment conditions include: judging whether the motion information of all surrounding blocks corresponding to each angular prediction mode is the same in pairs; or judging whether the motion information at equally spaced positions of the surrounding blocks corresponding to each angular prediction mode is the same; or judging whether the motion information at any spaced positions of the surrounding blocks corresponding to each angular prediction mode is the same.
[0012] According to one aspect of the present disclosure, deriving angular prediction motion information based on the filled surrounding block motion information further includes: determining the subtype of the current coding unit to be decoded based on the current coding unit type to be decoded, the subtype index and other inter-frame prediction mode flags obtained from the bitstream and the derived number of valid angular prediction modes.
[0013] According to an aspect of the present disclosure, deriving the angular prediction motion information according to the padded surrounding block motion information further includes: predicting the motion information according to the auxiliary information identifier of the current coding unit subtype or angular prediction mode to be decoded.
[0014] According to one aspect of the present disclosure, a method for deriving angle prediction motion information at an encoding end includes: filling surrounding block motion information according to width and height information of a current coding unit to be encoded; and deriving angle prediction motion information according to the filled surrounding block motion information.
[0015] According to an aspect of the present disclosure, filling surrounding block motion information according to width and height information of a current coding unit to be encoded includes: determining, according to a size relationship between a width and a height of the current coding unit to be encoded, a number of surrounding blocks filled in a horizontal direction and a number of surrounding blocks filled in a vertical direction of the current coding unit to be encoded, respectively, and filling the surrounding block motion information according to the determined number of surrounding blocks to be filled.
[0016] According to one aspect of the present disclosure, filling the motion information of surrounding blocks according to the width and height information of the current coding unit to be encoded further includes: traversing the surrounding blocks, and if the motion information of the currently traversed surrounding blocks is not available, using the motion information of other surrounding blocks for filling, wherein available means that the block is in the current image, the block has been encoded, and the block is in inter-frame prediction mode.
[0017] According to an aspect of the present disclosure, deriving angular prediction motion information according to padded surrounding block motion information includes: obtaining surrounding block motion information corresponding to an angular prediction mode; and determining the number of valid angular prediction modes based on a judgment condition.
[0018] According to one aspect of the present disclosure, the angular prediction modes include: horizontal, vertical, horizontal upward, horizontal downward, and vertical right. According to one aspect of the present disclosure, the judgment conditions include: judging whether the motion information of all surrounding blocks corresponding to each angular prediction mode is the same; or judging whether the motion information at equally spaced positions of surrounding blocks corresponding to each angular prediction mode is the same; or judging whether the motion information at any spaced positions of surrounding blocks corresponding to each angular prediction mode is the same.
[0019] According to an aspect of the present disclosure, deriving angular prediction motion information according to the padded surrounding block motion information further includes: deriving a prediction value of a coding unit to be encoded based on the number of valid angular prediction modes and the angular prediction motion information corresponding to the valid angular prediction modes.
[0020] According to one aspect of the present disclosure, a coding and decoding device includes: a memory configured to store program instructions; a transceiver configured to receive and send code streams; and a processor configured to run the instructions stored in the memory to perform the above method.
[0021] According to one aspect of the present disclosure, an encoding device includes: a memory configured to store program instructions; a transceiver configured to send a code stream; and a processor configured to run the instructions stored in the memory to perform the above encoding method.
[0022] According to one aspect of the present disclosure, a decoding device includes: a memory configured to store program instructions; a transceiver configured to receive a code stream; and a processor configured to run the instructions stored in the memory to perform the above decoding method. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0024] Figure 1 The division method of the coding unit defined in the AVS3 standard is shown;
[0025] Figure 2 The method of filling the motion information of the adjacent blocks of the current coding unit according to an embodiment of the present disclosure is shown;
[0026] Figure 3 shows the construction of an angle prediction mode according to an embodiment of the present disclosure;
[0027] Figure 4 The method of filling motion information based on the angle prediction mode according to an embodiment of the present disclosure is shown;
[0028] Figure 5 A method for predicting the angle of motion information at a decoding end according to an embodiment of the present disclosure is shown;
[0029] Figure 6 A decoding device according to an embodiment of the present disclosure is shown;
[0030] Figure 7 A method for predicting the angle of motion information at the encoding end according to an embodiment of the present disclosure is shown; and
[0031] Figure 8 An encoding device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0032] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0033] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may also be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items. In addition, the terms "first" and "second" used herein may describe various constituent elements, but they should not limit the corresponding constituent elements.
[0034] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the field to which the present disclosure belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0035] Figure 1 The figure shows the division method of the coding unit defined in the AVS3 standard. Figure 1 As shown, there are six ways of dividing the coding units defined in the AVS3 standard: 1) no division; 2) quadtree division (divided into four square blocks); 3) binary tree division (divided into two upper and lower blocks); 4) binary tree division (divided into two left and right blocks); 5) division into a horizontal I-shaped; and 6) division into a vertical I-shaped. Among them, for the case where the coding unit is a square (that is, the width and height are the same), there is no problem with the existing method of filling the motion information of the surrounding adjacent blocks. However, for the case where the width and height of the coding unit are different, the existing method fills the same amount of adjacent block motion information on the top and left sides of the current coding unit. This may lead to the following problems: on the one hand, more repeated motion information is filled in the shorter side, resulting in redundancy in the storage of motion information; on the other hand, the motion information filled in the longer side is not diverse and rich enough, and more possible motion information cannot be obtained, resulting in inaccurate inter-frame prediction and reduced coding performance.
[0036] In inter-frame prediction, each prediction unit may select an inter-frame prediction mode including a normal motion vector prediction mode, a skip mode, and a direct mode. If the current prediction unit is in a normal motion vector prediction mode, the motion information is derived through the following steps: 1) deriving a motion vector prediction value, decoding the motion vector difference information and the motion vector basic unit to obtain the motion vector difference, and adding the motion vector prediction value and the difference to obtain the motion vector value; 2) decoding the reference image information, and obtaining the prediction value of the prediction unit according to the position pointed to by the motion vector on the obtained reference image; 3) decoding the residual information, and performing inverse quantization and inverse transformation on the residual information to obtain the residual value, and adding the residual value and the prediction value to obtain the reconstructed value of the current prediction unit.
[0037] If the current prediction unit is in skip mode or direct mode, the motion information can be derived by the following method: according to the corresponding position block in the time domain, the adjacent block in the spatial domain, etc., the motion information stored in the optimal block is used as the motion information of the current prediction unit, wherein the motion information includes: motion vector, reference index and prediction direction.
[0038] AVS3 standard defines a new method for deriving motion information for skip mode and direct mode: motion information angle prediction mode. The angle prediction mode uses a certain angle to set motion information for each sub-block in the current coding unit. Figures 2 to 4 The specific implementation method is described in detail.
[0039] 1. Fill in the motion information of the adjacent blocks of the current coding unit.
[0040] Figure 2 FIG. 4 shows a method for filling the motion information of adjacent blocks of the current coding unit. Figure 2 As shown, the same amount of block motion information is filled on the top and left of the current coding unit, and B1~BN and D1~DN are filled on the top, and A1~AN and C1~CN are filled on the left; the blocks that can be used for filling should meet the following conditions: a. The block is inside the image, b. The block has been encoded or decoded, c. The block is in inter-frame prediction mode; traverse all adjacent blocks A1~AN, B1~BN, C1~CN and D1~DN, if the motion information of the traversed block is not available, fill it with the motion information of the most adjacent previous available block until the traversal is completed; the above-mentioned adjacent blocks are 4x4 blocks in AVS3.
[0041] 2. Build an angle prediction model.
[0042] Figure 3 The construction of the angle prediction model is shown. Figure 3Five angular prediction modes are constructed: horizontal, vertical, horizontal_up, horizontal_down, and vertical_right, so as to obtain adjacent sub-block motion information lists corresponding to the five angular prediction modes.
[0043] 3. Check for duplicate sports information.
[0044] The motion information in the adjacent sub-block motion information lists corresponding to the five angular prediction modes are checked for duplication respectively. If different motion information exists, the corresponding angular prediction mode is available, otherwise the angular prediction mode is not available.
[0045] 4.Fill in sports information.
[0046] Figure 4 FIG. 2 shows a method for filling motion information according to an angle prediction mode. For an available angle prediction mode, motion information is filled for each sub-block in the current coding unit according to the corresponding angle as its motion information. Figure 4 As shown, for the horizontal angular prediction mode, sub-blocks sub1 and sub2 are filled with the motion information of A1, while sub-blocks sub3 and sub4 are filled with the motion information of A3.
[0047] According to an embodiment of the present disclosure, a decoding method is provided. Figure 5 Let's describe it in detail.
[0048] Figure 5 The method for predicting the angle of motion information at the decoding end according to an embodiment of the present disclosure is shown. Figure 5 As shown, the method includes the following steps.
[0049] Step 101: Obtain the type of the current coding unit.
[0050] Step 102: If the type of the current coding unit is direct mode or skip mode, derive the number of valid angular prediction modes.
[0051] Specifically, the width of the current coding unit is W, the height is H, the number of surrounding blocks filled on the top of the current coding unit is m, and the number of surrounding blocks filled on the left is n.
[0052] -Fill the surrounding block motion information according to the width and height information. A possible judgment condition is: when W is equal to H, m = n (m>0, n>0); when W is greater than H, m>n (m>0, n≥0); when W is less than H, m<n(m≥0,n> 0). Another possible judgment condition is: when the ratio of W to H is greater than 2, m>n (m>0, n≥0); when the ratio of W to H is less than 1 / 2, m<n(m≥0,n> 0); otherwise, m=n(m>0, n>0). There may be other judgment conditions, which are not limited here.
[0053] The specific position of the adjacent blocks is not limited here but should be consistent with the encoding end. It can be a block in a column on the left side of the current coding unit and at an equal interval, or a block in a row on the top side of the current coding unit and at an equal interval; it can also be a few columns on the left side of the non-immediate current coding unit, a few rows on the top side of the current coding unit, and a block at an unequal interval. Traverse the surrounding blocks in a certain order. The specific order is not limited here but should be consistent with the encoding end. It can be clockwise, counterclockwise, or other orders. During traversal, if the motion information of the current traversed block is not available, it is filled with the motion information of other blocks. The specific block whose motion information is used for filling is not limited here but should be consistent with the encoding end. It can be the previous available block that is most adjacent to it, or it can be other blocks. Whether a block is available means that the block is in the current image, the block has been decoded, and the block is in inter-frame prediction mode.
[0054] - Deriving the number of angle prediction modes: obtaining the motion information of the surrounding blocks corresponding to each angle prediction mode, judging whether the motion information of the corresponding surrounding blocks is the same according to the set rules, and then deriving the number of valid angle prediction modes; the specific judgment rules are not limited here but should be consistent with the encoding end, and the judgment rules can be: a. judging whether the motion information of all surrounding blocks corresponding to each angle prediction mode is the same in pairs, if there are blocks with different motion information, the angle prediction mode is valid, and the number of valid angle prediction modes is increased by 1; b. selecting several blocks at equally spaced positions in the surrounding blocks corresponding to each angle prediction mode, judging whether their motion information is the same, if there are blocks with different motion information, the angle prediction mode is valid, and the number of valid angle prediction modes is increased by 1; c. selecting several blocks at any interval position in the surrounding blocks corresponding to each angle prediction mode, judging whether their motion information is the same, if there are blocks with different motion information, the angle prediction mode is valid, and the number of valid angle prediction modes is increased by 1.
[0055] Step 103: Obtain a subtype index and other inter-frame prediction mode flags of the current coding unit, and determine the subtype of the current coding unit according to the number of valid angle prediction modes, the coding unit type, the subtype index of the coding unit, and other inter-frame prediction mode flags derived in step 102;
[0056] Step 104: Obtain the prediction value of the current coding unit according to the subtype of the current coding unit, and derive the angular motion information if the subtype of the current coding unit is an angular prediction mode of a skip mode or a direct mode. Specifically, the angular mode of the current coding unit is obtained according to the valid angular mode information obtained in step 102 and the subtype index of the current coding unit, and the prediction unit subblock motion information array, i.e., the motion information of each subblock in the current coding unit, is derived according to the angular mode.
[0057] Step 105: Obtain a prediction value of each sub-block according to the motion information of each sub-block in the current coding unit.
[0058] Step 106: Obtain residual information of the current coding unit, and obtain a residual value after inverse quantization and inverse transformation.
[0059] Step 107: Add the predicted value and the residual value of the current coding unit to obtain a reconstructed value of the current coding unit.
[0060] Through the decoding method described in the above embodiment, motion information filling can be performed according to the angle prediction mode, so as to fill different amounts of adjacent block motion information on the left and top of the current coding unit according to the shape of the current coding unit (i.e., width and height information). Thus, the redundancy caused by filling repeated motion information on the short side is reduced, the diversity of filling motion information on the long side is increased, the accuracy of inter-frame prediction is improved, and the coding performance and efficiency are improved.
[0061] According to an embodiment of the present disclosure, there is provided a method for executing Figure 5 The decoding device of the decoding method shown. Figure 6 Let's describe it in detail.
[0062] Figure 6 600 includes a memory 601, a transceiver 602, and a processor 603. The decoding device is configured to Figure 5 The method shown performs decoding.
[0063] The transceiver 602 is configured to receive a current coding unit type from a bitstream.
[0064] If the type of the current coding unit is direct mode or skip mode, the processor 603 is configured to derive the number of valid angular prediction modes.
[0065] The transceiver 602 is configured to receive a subtype index and other inter-frame prediction mode flags of the current coding unit from the bitstream, and the processor 603 is configured to determine the subtype of the current coding unit based on the number of valid angle prediction modes, the coding unit type, the subtype index of the coding unit, and other inter-frame prediction mode flags derived in step 102.
[0066] Processor 603 is configured to obtain a prediction value of the current coding unit according to the subtype of the current coding unit, and if the subtype of the current coding unit is an angular prediction mode of a skip mode or a direct mode, derive angular motion information, that is, motion information of each subblock in the current coding unit; and obtain a prediction value of each subblock according to the motion information of each subblock in the current coding unit.
[0067] The processor 603 is configured to obtain residual information of the current coding unit, and obtain a residual value after inverse quantization and inverse transformation.
[0068] The processor 603 is configured to add the prediction value and the residual value of the current coding unit to obtain a reconstructed value of the current coding unit.
[0069] Through the decoding device described in the above embodiment, motion information filling can be performed according to the angle prediction mode, so as to fill different amounts of adjacent block motion information on the left and top of the current coding unit according to the shape of the current coding unit (i.e., width and height information). Thus, the redundancy caused by filling repeated motion information on the short side is reduced, the diversity of filling motion information on the long side is increased, the accuracy of inter-frame prediction is improved, and the coding performance and efficiency are improved.
[0070] In addition, although Figure 6 One transceiver and one processor are shown in the figure, but the present disclosure is not limited thereto. The number of processors and transceivers shown is only an example, and it can be one or more; and the above-mentioned processing can be performed by one or more processors or transceivers.
[0071] According to another embodiment of the present disclosure, a coding method is provided. Figure 7 Let's describe it in detail.
[0072] Figure 7 The method for predicting the angle of motion information at the encoding end according to an embodiment of the present disclosure is shown. Figure 7 As shown, the method includes the following steps.
[0073] Step 201: A prediction value is obtained by adopting an angle prediction mode of a skip mode or a direct mode for a current unit to be encoded. Specifically:
[0074] (1) Deriving the number of valid angle prediction modes;
[0075] Specifically, the width of the current coding unit is W, the height is H, the number of surrounding blocks filled on the top of the current coding unit is m, and the number of surrounding blocks filled on the left is n.
[0076] -Fill the surrounding block motion information according to the width and height information: A possible judgment condition is: when W is equal to H, m = n (m>0, n>0); when W is greater than H, m>n (m>0, n≥0); when W is less than H, m<n(m≥0,n> 0). Another possible judgment condition is: when the ratio of W to H is greater than 2, m>n (m>0, n≥0); when the ratio of W to H is less than 1 / 2, m<n(m≥0,n> 0); otherwise, m=n(m>0, n>0). There may be other judgment conditions, which are not limited here.
[0077] The specific position of the adjacent blocks is not limited here but should be consistent with the encoding end. It can be a block in a column on the left side of the current coding unit and at an equal interval, or a block in a row on the top side of the current coding unit and at an equal interval; it can also be a few columns on the left side of the non-immediate current coding unit, a few rows on the top side of the current coding unit, and a block at an unequal interval. Traverse the surrounding blocks in a certain order. The specific order is not limited here but should be consistent with the encoding end. It can be clockwise, counterclockwise, or other orders. During traversal, if the motion information of the current traversed block is not available, it is filled with the motion information of other blocks. The specific block whose motion information is used for filling is not limited here but should be consistent with the encoding end. It can be the previous available block that is most adjacent to it, or it can be other blocks. Whether a block is available means that the block is in the current image, the block has been decoded, and the block is in inter-frame prediction mode.
[0078] - Deriving the number of angle prediction modes: obtaining the motion information of the surrounding blocks corresponding to each angle prediction mode, judging whether the motion information of the corresponding surrounding blocks is the same according to the set rules, and then deriving the number of valid angle prediction modes; the specific judgment rules are not limited here but should be consistent with the encoding end, and the rules can be: a. judging whether the motion information of all surrounding blocks corresponding to each angle prediction mode is the same in pairs, if there are blocks with different motion information, the angle prediction mode is valid, and the number of valid angle prediction modes is increased by 1; b. selecting several blocks at equally spaced positions in the surrounding blocks corresponding to each angle prediction mode, judging whether their motion information is the same, if there are blocks with different motion information, the angle prediction mode is valid, and the number of valid angle prediction modes is increased by 1; c. selecting several blocks at any interval position in the surrounding blocks corresponding to each angle prediction mode, judging whether their motion information is the same, if there are blocks with different motion information, the angle prediction mode is valid, and the number of valid angle prediction modes is increased by 1.
[0079] (2) Obtaining the prediction value of the current coding unit under each valid angle prediction mode. Specifically, deriving the prediction unit sub-block motion information array, that is, the motion information of each sub-block in the current coding unit; and obtaining the prediction value of each sub-block according to the motion information of each sub-block in the current coding unit.
[0080] Step 202: Obtain the residual value of the current coding unit in each valid angular prediction mode, and calculate the rate-distortion cost.
[0081] Step 203: Select the corresponding prediction mode with the minimum rate-distortion cost of the current coding unit as the final prediction mode of the current coding unit.
[0082] Step 204: entropy encode the final prediction mode information of the current coding unit, the coding unit type, the subtype index of the coding unit, the residual information after the residual value is transformed and quantized, etc., and write them into the bitstream.
[0083] Through the encoding method described in the above embodiment, motion information filling can be performed according to the angle prediction mode, so as to fill different amounts of adjacent block motion information on the left and top of the current coding unit according to the shape of the current coding unit (i.e., width and height information). Thus, the redundancy caused by filling repeated motion information on the short side is reduced, the diversity of filling motion information on the long side is increased, the accuracy of inter-frame prediction is improved, and the encoding performance and efficiency are improved.
[0084] According to another embodiment of the present disclosure, there is provided a method for executing Figure 7 The following reference is made to the encoding method of the encoding device shown. Figure 8 Let's describe it in detail.
[0085] Figure 8 800 includes a memory 801, a transceiver 802, and a processor 803. The video encoder is configured to Figure 7 The method shown performs the encoding.
[0086] The processor 803 is configured to obtain a prediction value by adopting an angle prediction mode of a skip mode or a direct mode for a current unit to be encoded.
[0087] The processor 803 is configured to obtain a residual value of a current coding unit in each valid angular prediction mode and calculate a rate-distortion cost.
[0088] The processor 803 is configured to select a corresponding prediction mode with the smallest rate-distortion cost of the current coding unit as a final prediction mode of the current coding unit.
[0089] The processor 803 is configured to perform entropy encoding on the final prediction mode information of the current coding unit, the coding unit type, the subtype index of the coding unit, the residual information after the residual value is transformed and quantized, etc., and write them into the bitstream.
[0090] Through the encoding device described in the above embodiment, motion information filling can be performed according to the angle prediction mode, so as to fill different amounts of adjacent block motion information on the left and top of the current coding unit according to the shape of the current coding unit (i.e., width and height information). Thus, redundancy caused by filling repeated motion information on the short side is reduced, the diversity of motion information filled on the long side is increased, the accuracy of inter-frame prediction is improved, and the encoding performance and efficiency are improved.
[0091] In addition, although Figure 8 One transceiver and one processor are shown in the figure, but the present disclosure is not limited thereto. The number of processors and transceivers shown is only an example, and it can be one or more; and the above-mentioned processing can be performed by one or more processors or transceivers.
[0092] According to the method for decoding-side motion information angle prediction according to an embodiment of the present disclosure, the method includes the following steps.
[0093] Step 901: Obtain the type of the current coding unit.
[0094] Step 902: If the type of the current coding unit is direct mode or skip mode, derive the number of valid angular prediction modes.
[0095] Specifically, the width of the current coding unit is W, and the height is H. If W is less than the first threshold, or H is less than the first threshold, or W and H are both equal to the first threshold, the number of valid angle prediction modes of the current coding unit is set to 0, and step 903 is entered; the first threshold may be 8, or other values; otherwise, the following steps are performed:
[0096] 1. The number of surrounding blocks filled on the top of the current coding unit is m, and the number of surrounding blocks filled on the left is n. m can be equal to n, m can be less than n, and m can be greater than n. There is no restriction here.
[0097] 2. Export valid angle prediction mode information: obtain the surrounding block motion information corresponding to each angle prediction mode, determine whether the corresponding surrounding block motion information is the same according to the set rules, and then export the number of valid angle prediction modes, and set the auxiliary information flag of the valid angle prediction mode to 2, and set the auxiliary information flag of the invalid angle prediction mode to 0.
[0098] The auxiliary information identifier of the angle prediction mode is used to derive the index value of the surrounding blocks used by the motion information of the current sub-block in each angle prediction mode. The value of the auxiliary information identifier can be 2, 1 or 0, which is not limited here, and its value can be modified according to the width and height information of the current coding unit. The auxiliary information identifier can be used to predict motion information, and the use of the auxiliary information identifier at the same time can improve the accuracy of motion information prediction.
[0099] 3. Modify the above derived effective angle prediction mode information according to the width and height information.
[0100] One possible approach is:
[0101] (1) When W and / or H is less than or equal to the second threshold, the following steps are executed; otherwise, (2) is executed: if the horizontal downward mode is invalid, whether the vertical rightward mode is valid is determined; if the vertical rightward mode is valid, the horizontal downward mode is set to be valid, and the auxiliary information flag of the horizontal downward mode is set to 1; if the vertical rightward mode is invalid, whether the horizontal downward mode is valid is determined; if the horizontal downward mode is valid, the vertical rightward mode is set to be valid, and the auxiliary information flag of the vertical rightward mode is set to 1;
[0102] The second threshold may be 32, 16, or 64, which is not limited herein.
[0103] (2) When W is greater than H, determine whether the vertical right mode is valid. If the vertical right mode is valid,
[0104] The horizontal downward mode is set to valid, and the auxiliary information flag of the horizontal downward mode is set to 1; when H is greater than W, it is determined whether the horizontal downward mode is valid. If the horizontal downward mode is valid, the vertical right mode is set to valid, and the auxiliary information flag of the vertical right mode is set to 1.
[0105] Another possible approach is:
[0106] (1) When the value of W multiplied by H (i.e., the area of the coding unit) is less than or equal to the third threshold, the following steps are performed; otherwise, (2) is performed: if the horizontal downward mode is invalid, whether the vertical right mode is valid is determined; if the vertical right mode is valid, the horizontal downward mode is set to be valid, and the auxiliary information flag of the horizontal downward mode is set to 1; if the vertical right mode is invalid, whether the horizontal downward mode is valid is determined; if the horizontal downward mode is valid, the vertical right mode is set to be valid, and the auxiliary information flag of the vertical right mode is set to 1;
[0107] The third threshold may be 512, 128, or 256, which is not limited herein.
[0108] (2) When W is greater than H, determine whether the vertical right mode is valid. If the vertical right mode is valid, set the horizontal downward mode to valid, and set the auxiliary information flag of the horizontal downward mode to 1; when H is greater than W, determine whether the horizontal downward mode is valid. If the horizontal downward mode is valid, set the vertical right mode to valid, and set the auxiliary information flag of the vertical right mode to 1.
[0109] The specific position of the adjacent blocks is not limited here but should be consistent with the encoding end. It can be a block in a column on the left side of the current coding unit and at an equal interval, or a block in a row on the top side of the current coding unit and at an equal interval; it can also be a few columns on the left side of the non-immediate current coding unit, a few rows on the top side of the non-immediate current coding unit, and a block at an unequal interval. Traverse the surrounding blocks in a certain order. The specific order is not limited here but should be consistent with the encoding end. It can be a clockwise order, a counterclockwise order, or other orders. During traversal, if the motion information of the current traversed block is not available, it is filled with the motion information of other blocks. The specific block whose motion information is used for filling is not limited here but should be consistent with the encoding end. It can be the previous available block that is most adjacent to it, or other blocks, or it can be set to a zero motion vector. Whether a block is available means that the block is in the current image, the block has been decoded, and the block is in inter-frame prediction mode.
[0110] Step 903: Obtain the subtype index and other inter-frame prediction mode flags of the current coding unit, and determine the subtype of the current coding unit according to the number of valid angle prediction modes, the coding unit type, the subtype index of the coding unit, and other inter-frame prediction mode flags derived in step 902;
[0111] Step 904: Obtain the prediction value of the current coding unit according to the subtype of the current coding unit, and derive the angular motion information if the subtype of the current coding unit is an angular prediction mode of a skip mode or a direct mode. Specifically, the angular mode of the current coding unit is obtained according to the valid angular mode information obtained in step 902 and the subtype index of the current coding unit, and the prediction unit subblock motion information array, i.e., the motion information of each subblock in the current coding unit, is derived according to the angular mode.
[0112] Specifically, i is the index value of the column where the current sub-block position is located, j is the index value of the row where the current sub-block position is located, and >> is a right shift operation:
[0113] If the current coding unit is in the angle prediction horizontal mode, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)-1-2*(j>>1) is used as the motion information of the current sub-block;
[0114] If the current coding unit is in angular prediction vertical mode, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)+1+2*(i>>1) is used as the motion information of the current sub-block;
[0115] If the current coding unit is in the angle prediction horizontal upward mode, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)-2*(j>>1)+2*(i>>1) is used as the motion information of the current sub-block;
[0116] If the current coding unit is in the angle prediction horizontal down mode, when the auxiliary information flag of the horizontal down mode is 1, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)+2*(j>>1)+2*(i>>1)+1 is used as the motion information of the current sub-block; otherwise, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)-2*(j>>1)-2*(i>>1)-3 is used as the motion information of the current sub-block;
[0117] If the current coding unit is the angle-predicted vertical right mode, when the auxiliary information identifier of the vertical right mode is 1, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)-2*(j>>1)-2*(i>>1)-1 is used as the motion information of the current sub-block; otherwise, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)+2*(j>>1)+2*(i>>1)+3 is used as the motion information of the current sub-block.
[0118] Step 905: Obtain a prediction value of each sub-block according to the motion information of each sub-block in the current coding unit.
[0119] Step 906: Obtain residual information of the current coding unit, and obtain a residual value after inverse quantization and inverse transformation.
[0120] Step 907: Add the predicted value and the residual value of the current coding unit to obtain a reconstructed value of the current coding unit.
[0121] Through the decoding method described in the above embodiment, the diversity of long-side motion information in the inter-frame angle prediction mode can be increased, the inter-frame prediction accuracy can be improved, and the encoding performance and efficiency can be improved.
[0122] According to the method for decoding-side motion information angle prediction according to an embodiment of the present disclosure, the method includes the following steps.
[0123] Step 1001: Obtain the type of the current coding unit.
[0124] Step 1002: If the type of the current coding unit is direct mode or skip mode, derive the number of valid angular prediction modes.
[0125] Specifically, the width of the current coding unit is W, and the height is H. If W is less than the first threshold, or H is less than the first threshold, or W and H are both equal to the first threshold, the number of valid angle prediction modes of the current coding unit is set to 0, and step 1003 is entered; the first threshold may be 8, or other values; otherwise, the following steps are performed:
[0126] 1. The number of surrounding blocks filled on the top of the current coding unit is m, and the number of surrounding blocks filled on the left is n. m can be equal to n, m can be less than n, and m can be greater than n. There is no restriction here.
[0127] 2. Deriving valid angle prediction mode information: obtaining the surrounding block motion information corresponding to each angle prediction mode, judging whether the corresponding surrounding block motion information is the same according to the set rules, and then deriving the number of valid angle prediction modes, and setting the auxiliary information flag of the valid angle prediction mode to 2, and setting the auxiliary information flag of the invalid angle prediction mode to 0;
[0128] The specific position of the adjacent blocks is not limited here but should be consistent with the encoding end. It can be a block in a column on the left side of the current coding unit and at an equal interval, or a block in a row on the top side of the current coding unit and at an equal interval; it can also be a few columns on the left side of the non-immediate current coding unit, a few rows on the top side of the non-immediate current coding unit, and a block at an unequal interval. Traverse the surrounding blocks in a certain order. The specific order is not limited here but should be consistent with the encoding end. It can be a clockwise order, a counterclockwise order, or other orders. During traversal, if the motion information of the current traversed block is not available, it is filled with the motion information of other blocks. The specific block whose motion information is used for filling is not limited here but should be consistent with the encoding end. It can be the previous available block that is most adjacent to it, or other blocks, or it can be set to a zero motion vector. Whether a block is available means that the block is in the current image, the block has been decoded, and the block is in inter-frame prediction mode.
[0129] Step 1003: Obtain a subtype index and other inter-frame prediction mode flags of the current coding unit, and determine the subtype of the current coding unit according to the number of valid angle prediction modes, the coding unit type, the subtype index of the coding unit, and other inter-frame prediction mode flags derived in step 1002;
[0130] Step 1004: Obtain the prediction value of the current coding unit according to the subtype of the current coding unit, and derive the angular motion information if the subtype of the current coding unit is an angular prediction mode of a skip mode or a direct mode. Specifically, the angular mode of the current coding unit is obtained according to the valid angular mode information obtained in step 1002 and the subtype index of the current coding unit, and the prediction unit subblock motion information array, i.e., the motion information of each subblock in the current coding unit, is derived according to the angular mode.
[0131] Specifically, i is the index value of the column where the current sub-block position is located, j is the index value of the row where the current sub-block position is located, and >> is a right shift operation:
[0132] If the current coding unit is in the angle prediction horizontal mode, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)-1-2*(j>>1) is used as the motion information of the current sub-block;
[0133] If the current coding unit is in angular prediction vertical mode, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)+1+2*(i>>1) is used as the motion information of the current sub-block;
[0134] If the current coding unit is in the angle prediction horizontal upward mode, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)-2*(j>>1)+2*(i>>1) is used as the motion information of the current sub-block;
[0135] If the current coding unit is in the angle prediction horizontal downward mode, when the auxiliary information identifier of the vertical right mode is 2, and W is greater than H, and H is greater than the fourth threshold, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)+2*(j>>1)+2*(i>>1)+1 is used as the motion information of the current sub-block; otherwise, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)-2*(j>>1)-2*(i>>1)-3 is used as the motion information of the current sub-block;
[0136] If the current coding unit is in the angle prediction vertical right mode, when the auxiliary information identifier of the horizontal downward mode is 2, and H is greater than W, and W is greater than the fourth threshold, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)-2*(j>>1)-2*(i>>1)-1 is used as the motion information of the current sub-block; otherwise, the motion information of the surrounding blocks with index values of (W>>2)+(H>>2)+2*(j>>1)+2*(i>>1)+3 is used as the motion information of the current sub-block.
[0137] The fourth threshold may be 16, 32, or other values, which are not limited here.
[0138] Step 1005: Obtain a prediction value of each sub-block according to the motion information of each sub-block in the current coding unit.
[0139] Step 1006: Obtain residual information of the current coding unit, and obtain a residual value after inverse quantization and inverse transformation.
[0140] Step 1007: Add the prediction value and the residual value of the current coding unit to obtain a reconstructed value of the current coding unit.
[0141] Through the decoding method described in the above embodiment, the diversity of long-side motion information in the inter-frame angle prediction mode can be increased, the inter-frame prediction accuracy can be improved, and the encoding performance and efficiency can be improved.
[0142] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
[0143] It will be appreciated by those skilled in the art that the present disclosure includes devices for performing one or more of the operations described in the present disclosure. These devices may be specially designed and manufactured for the desired purpose, or may also include known devices in general-purpose computers. These devices have computer programs stored therein, which are selectively activated or reconstructed. Such computer programs may be stored in a device (e.g., computer) readable medium or in any type of medium suitable for storing electronic instructions and coupled to a bus, respectively, the computer readable medium including but not limited to any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the readable medium includes any medium that stores or transmits information in a readable form by a device (e.g., computer).
[0144] Those skilled in the art will appreciate that each block in these structure diagrams and / or block diagrams and / or flow charts and combinations of blocks in these structure diagrams and / or block diagrams and / or flow charts can be implemented using computer program instructions. Those skilled in the art will appreciate that these computer program instructions can be provided to a general-purpose computer, a professional computer, or a processor of other programmable data processing methods to implement, thereby executing the scheme specified in the block or multiple blocks of the structure diagrams and / or block diagrams and / or flow charts disclosed in the present disclosure through the processor of the computer or other programmable data processing method.
[0145] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes discussed in the present disclosure may be alternated, altered, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in the present disclosure may also be alternated, altered, rearranged, decomposed, combined, or deleted. Furthermore, the steps, measures, and schemes in the prior art that are similar to those disclosed in the present disclosure may also be alternated, altered, rearranged, decomposed, combined, or deleted.
[0146] The above description is only a partial implementation mode of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as the protection scope of the present disclosure.
Claims
1. A method performed by an electronic device, include: Fill the surrounding block motion information according to the width and height information of the current coding unit to be decoded; as well as According to the filled surrounding block motion information, the angle prediction motion information is derived. Wherein, filling the surrounding block motion information according to the width and height information of the current coding unit to be decoded includes: According to the size relationship between the width and height of the current coding unit to be decoded, respectively determine the number of surrounding blocks filled in the horizontal direction and the number of surrounding blocks filled in the vertical direction of the current coding unit to be decoded, and Filling the surrounding block motion information according to the determined number of surrounding blocks to be filled, wherein deriving the angular prediction motion information according to the filled surrounding block motion information comprises: Obtaining surrounding block motion information corresponding to the angular prediction mode; and The number of valid angle prediction modes is determined based on the judgment condition.
2. The method according to claim 1, in, Filling the surrounding block motion information according to the width and height information of the current coding unit to be decoded further includes: Traverse the surrounding blocks, and If the motion information of the currently traversed surrounding blocks is not available, the motion information of other surrounding blocks is used for filling. Available means that the block is in the current image, the block has been decoded, and the block is in inter-frame prediction mode.
3. The method according to claim 1, in, Angular prediction modes include: horizontal, vertical, horizontal up, horizontal down, and vertical right.
4. The method according to any one of claims 1 to 3, in, Deriving the angular prediction motion information according to the filled surrounding block motion information further comprises: Modify the determined valid angle prediction mode information according to the width and height information of the current coding unit to be decoded, The valid angle prediction mode information includes at least one of the following: the number of valid angle prediction modes, an angle prediction mode validity identifier, and an angle prediction mode auxiliary information identifier.
5. The method according to any one of claims 1 to 3, in, The judgment conditions include: Determine whether the motion information of all surrounding blocks corresponding to each angular prediction mode is the same; or Determine whether the motion information at equally spaced positions of surrounding blocks corresponding to each angular prediction mode is the same; or It is determined whether the motion information at any interval positions of surrounding blocks corresponding to each angular prediction mode is the same.
6. The method according to any one of claims 1 to 3, in, The angle prediction motion information derived from the filled surrounding block motion information includes: The subtype of the coding unit to be decoded is determined based on the coding unit type to be decoded currently obtained from the bitstream, the subtype index and other inter-frame prediction mode flags and the number of valid angular prediction modes derived.
7. The method according to claim 6, in, Deriving the angular prediction motion information according to the filled surrounding block motion information further comprises: The motion information is predicted according to the auxiliary information identifier of the coding unit subtype or the angular prediction mode to be decoded.
8. A method performed by an electronic device, include: Fill the surrounding block motion information according to the width and height information of the current coding unit to be encoded; as well as According to the filled surrounding block motion information, the angle prediction motion information is derived. Wherein, filling the surrounding block motion information according to the width and height information of the current coding unit to be encoded includes: According to the size relationship between the width and height of the current coding unit to be encoded, the number of surrounding blocks filled in the horizontal direction and the number of surrounding blocks filled in the vertical direction of the current coding unit to be encoded are determined respectively, and Filling the surrounding block motion information according to the determined number of surrounding blocks to be filled, The deriving of the angle prediction motion information according to the filled surrounding block motion information includes: Obtaining surrounding block motion information corresponding to the angular prediction mode; and The number of valid angle prediction modes is determined based on the judgment condition.
9. The method according to claim 8, in, Filling the surrounding block motion information according to the width and height information of the current coding unit to be encoded further includes: Traverse the surrounding blocks, and If the motion information of the currently traversed surrounding blocks is not available, the motion information of other surrounding blocks is used for filling. Available means that the block is in the current image, the block has been encoded, and the block is in inter-frame prediction mode.
10. The method according to claim 8, in, Angular prediction modes include: horizontal, vertical, horizontal up, horizontal down, and vertical right.
11. The method according to any one of claims 8 to 10, in, The judgment conditions include: Determine whether the motion information of all surrounding blocks corresponding to each angular prediction mode is the same; or Determine whether the motion information at equally spaced positions of surrounding blocks corresponding to each angular prediction mode is the same; or It is determined whether the motion information at any interval positions of surrounding blocks corresponding to each angular prediction mode is the same.
12. The method according to claim 8, in, Deriving the angular prediction motion information according to the filled surrounding block motion information further comprises: Based on the number of valid angular prediction modes and angular prediction motion information corresponding to the valid angular prediction modes, a prediction value of a coding unit to be encoded is derived.
13. An electronic device, include: a memory configured to store program instructions; A transceiver configured to receive and transmit code streams; as well as A processor configured to run instructions stored in the memory to perform the method according to any one of claims 1 to 12.
14. An electronic device, include: a memory configured to store program instructions; The transceiver is configured to send a code stream; as well as A processor configured to run instructions stored in the memory to perform the method according to any one of claims 8 to 12.
15. An electronic device, include: a memory configured to store program instructions; A transceiver configured to receive a code stream; as well as A processor configured to run instructions stored in the memory to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Encoding method and computer readable recording meduim for video information
CN106937123A
Image processing method, and image encoding and decoding method using same
CN109314790A
Airspace candidate motion information acquisition method and device, codec and storage device
CN110213588A
A coding and decoding method and apparatus therefor
CN110225346A
Method for selecting motion vector candidate and method for encoding / decoding image using the same
KR1020160143583A
