1. A method, performed by an encoder, for encoding a picture of a video sequence into a bitstream, wherein the picture comprises at least a luminance color component and a chrominance color component, wherein the luminance color component comprises a first block of luminance samples and the chrominance color component comprises a second block of chrominance samples, the method comprising: segmenting the first block of luminance samples and the second block of chrominance samples into: a first segment comprising first luminance samples from the first block and first chrominance samples from the second block that have the same first position as the first luminance samples in the first block; and a second segment comprising second luminance samples from the first block and second chrominance samples from the second block that have the same second position as the second luminance samples in the second block; predicting sample chrominance values in the second block of chrominance samples based on the sample values in the first block of luminance samples that belong to the same segment; and encoding, in the video bitstream, prediction parameters to obtain the predicted sample chrominance values at a decoder.