主权项 |
1. A coding method, comprising:
determining an image block type of an image block to be coded according to an irregular partitioning mode, wherein the image block type indicates how the image block is to be partitioned in one of a plurality of preset partition ways, the plurality of preset partition ways comprises: partitioning the image block into two rectangular sub-blocks by a vertical partition line, and partitioning the image block into two rectangular sub-blocks by a horizontal partition line; partitioning the image block to be coded irregularly according to the irregular partitioning mode to obtain two different sub-blocks; encoding the sub-blocks to obtain residual information, position parameter information, and motion vector information, wherein when the image block is partitioned by a vertical partition line, the position parameter information indicates whether a shared border of the two rectangular sub-blocks is on a left side or on a right side of a vertical medial axis of the image block; and when the image block is partitioned by a horizontal partition line, the position parameter information indicates whether a shared border of the two rectangular sub-blocks is below or above a horizontal medial axis of the image block; encoding an image block type parameter, wherein the image block type parameter indicates a type of the image block; encoding an irregular partitioning identifier; and writing the image block type parameter, the irregular partitioning identifier, the residual information, the position parameter information, and the motion vector information into a code stream. |