A method of coding implemented by a decoding device, comprising: obtaining a bitstream; obtaining an index value of a predefined lookup table for a current block from the bitstream; obtaining a value of a first parameter for the current block and a value of a second parameter for the current block based on the index value of the predefined lookup table as follows: (first parameter, second parameter) = lookupTable(index value), wherein the first and second parameters describe a separation line dividing the current block into two sub-blocks, with the first parameter representing an angle for partitioning the current block, and the second parameter representing a distance for partitioning the current block, wherein a value range for the first parameter is between 0 and 4K-1, and a value range for the second parameter is between 0 and N, where K is equal to 4 or 8, and N is an integer greater than 0, and wherein the lookup table includes all combinations of the first parameter and the second parameter except for the following combinations: - a value of the second parameter is equal to 0, and a value of the first parameter is equal to one of {0, K, 2K, 3K}, - a value of the second parameter is equal to 0, and a value of the first parameter is equal to one of {K/2, 3K/2, 5K/2, 7K/2}, and - a value of the second parameter is equal to 0, and a value of the first parameter is greater than 2K; obtaining a value of a sample distance for a sample which is located in the current block according to the value of the first parameter and the value of the second parameter; obtaining a prediction value for the sample according to the value of the sample distance for the sample. obtaining a bitstream; obtaining an index value of a predefined lookup table for a current block from the bitstream; obtaining a value of a first parameter for the current block and a value of a second parameter for the current block based on the index value of the predefined lookup table as follows: (first parameter, second parameter) = lookupTable(index value), wherein the first and second parameters describe a separation line dividing the current block into two sub-blocks, with the first parameter representing an angle for partitioning the current block, and the second parameter representing a distance for partitioning the current block, wherein a value range for the first parameter is between 0 and 4K-1, and a value range for the second parameter is between 0 and N, where K is equal to 4 or 8, and N is an integer greater than 0, and wherein the lookup table includes all combinations of the first parameter and the second parameter except for the following combinations: - a value of the second parameter is equal to 0, and a value of the first parameter is equal to one of {0, K, 2K, 3K}, - a value of the second parameter is equal to 0, and a value of the first parameter is equal to one of {K/2, 3K/2, 5K/2, 7K/2}, and - a value of the second parameter is equal to 0, and a value of the first parameter is greater than 2K; obtaining a value of a sample distance for a sample which is located in the current block according to the value of the first parameter and the value of the second parameter; obtaining a prediction value for the sample according to the value of the sample distance for the sample. (first parameter, second parameter) = lookupTable(index value), wherein the first and second parameters describe a separation line dividing the current block into two sub-blocks, with the first parameter representing an angle for partitioning the current block, and the second parameter representing a distance for partitioning the current block, wherein a value range for the first parameter is between 0 and 4K-1, and a value range for the second parameter is between 0 and N, where K is equal to 4 or 8, and N is an integer greater than 0, and wherein the lookup table includes all combinations of the first parameter and the second parameter except for the following combinations: - a value of the second parameter is equal to 0, and a value of the first parameter is equal to one of {0, K, 2K, 3K}, - a value of the second parameter is equal to 0, and a value of the first parameter is equal to one of {K/2, 3K/2, 5K/2, 7K/2}, and - a value of the second parameter is equal to 0, and a value of the first parameter is greater than 2K; - a value of the second parameter is equal to 0, and a value of the first parameter is equal to one of {0, K, 2K, 3K}, - a value of the second parameter is equal to 0, and a value of the first parameter is equal to one of {K/2, 3K/2, 5K/2, 7K/2}, and - a value of the second parameter is equal to 0, and a value of the first parameter is greater than 2K; obtaining a value of a sample distance for a sample which is located in the current block according to the value of the first parameter and the value of the second parameter; obtaining a prediction value for the sample according to the value of the sample distance for the sample.