An image decoding method, comprising: parsing a code stream to obtain a direction parameter value, and a position parameter value, wherein the direction parameter value represents a direction of a division line, the position parameter value represents a relative position of an endpoint of the division line against a reference endpoint in a reference direction, wherein the reference endpoint is an intersection point of the boundary of the image block and a line that is parallel to the division line and crosses a center of the image block, and the endpoint of the division line is an intersection point of the division line and a boundary of an image block or an extension line of the boundary of the image block; determining a second length according to the direction of the division line, and the position parameter value, wherein the second length is a distance from a point existent on the boundary of the image block and corresponding to a point of the image block to the endpoint of the division line, wherein the point of the image block is located on the division line; and determining a division mode of the image block, representing a size and shape of image subblocks into which the image block is divided, according to the direction of the division line, a first length, and the second length, wherein the first length is a distance from the point of the image block to the boundary of the image block, wherein: when the boundary of the image block is an upper boundary or a lower boundary of the image block, the point existent on the boundary of the image block and corresponding to the point of the image block is: a point existent on the boundary of the image block and sharing the same x-coordinate with the point of the image block; and when the boundary of the image block is a left boundary or a right boundary of the image block, the point existent on the boundary of the image block and corresponding to the point of the image block is: a point existent on the boundary of the image block and sharing the same y-coordinate with the point of the image block. parsing a code stream to obtain a direction parameter value, and a position parameter value, wherein the direction parameter value represents a direction of a division line, the position parameter value represents a relative position of an endpoint of the division line against a reference endpoint in a reference direction, wherein the reference endpoint is an intersection point of the boundary of the image block and a line that is parallel to the division line and crosses a center of the image block, and the endpoint of the division line is an intersection point of the division line and a boundary of an image block or an extension line of the boundary of the image block; determining a second length according to the direction of the division line, and the position parameter value, wherein the second length is a distance from a point existent on the boundary of the image block and corresponding to a point of the image block to the endpoint of the division line, wherein the point of the image block is located on the division line; and determining a division mode of the image block, representing a size and shape of image subblocks into which the image block is divided, according to the direction of the division line, a first length, and the second length, wherein the first length is a distance from the point of the image block to the boundary of the image block, wherein: when the boundary of the image block is an upper boundary or a lower boundary of the image block, the point existent on the boundary of the image block and corresponding to the point of the image block is: a point existent on the boundary of the image block and sharing the same x-coordinate with the point of the image block; and when the boundary of the image block is a left boundary or a right boundary of the image block, the point existent on the boundary of the image block and corresponding to the point of the image block is: a point existent on the boundary of the image block and sharing the same y-coordinate with the point of the image block. when the boundary of the image block is an upper boundary or a lower boundary of the image block, the point existent on the boundary of the image block and corresponding to the point of the image block is: a point existent on the boundary of the image block and sharing the same x-coordinate with the point of the image block; and when the boundary of the image block is a left boundary or a right boundary of the image block, the point existent on the boundary of the image block and corresponding to the point of the image block is: a point existent on the boundary of the image block and sharing the same y-coordinate with the point of the image block.