A method for prediction implemented in an image decoder, the method comprising: accessing a first image comprising one or more color channels, the first image comprising a plurality of pixels, wherein at least one color channel of the first image is segmented into two or more non-overlapping color channel segments using a set of boundary points, wherein each color channel segment corresponds to two consecutive boundary points, and wherein the pixel values of the color channel which are between two consecutive boundary points are assigned to the corresponding color channel segment; accessing metadata comprising parameters of a prediction parameter matrix of a piece-wise cross-color channel (PCCC) prediction model for a color channel segment, wherein the metadata define a PCCC prediction model of at least first order that expresses a predicted pixel value of a pixel of a second image in one color channel as a combination of at least the respective pixel values for all color channels of the pixels within the first image having the same pixel coordinates as the pixel of the second image, wherein the second image is predicted from the first image and has a dynamic range that is higher than a dynamic range of the first image; and generating an output channel segment of the second image based on the first image and the parameters of the prediction parameter matrix of the PCCC prediction model, wherein the prediction parameter matrix is configured to transform an input vector to the output channel segment, wherein the input vector comprises, for each pixel of the color channel segment of the first image, an input vector component of at least first order, wherein the input vector components of the first order comprise products of the respective pixel values for two or more of the color channels of the pixel within the first image, wherein the output channel segment comprises, for each pixel of the color channel segment of the first image, a predicted pixel value for a pixel of the second image in the one color channel having the same pixel coordinates as the pixel of the first image. accessing a first image comprising one or more color channels, the first image comprising a plurality of pixels, wherein at least one color channel of the first image is segmented into two or more non-overlapping color channel segments using a set of boundary points, wherein each color channel segment corresponds to two consecutive boundary points, and wherein the pixel values of the color channel which are between two consecutive boundary points are assigned to the corresponding color channel segment; accessing metadata comprising parameters of a prediction parameter matrix of a piece-wise cross-color channel (PCCC) prediction model for a color channel segment, wherein the metadata define a PCCC prediction model of at least first order that expresses a predicted pixel value of a pixel of a second image in one color channel as a combination of at least the respective pixel values for all color channels of the pixels within the first image having the same pixel coordinates as the pixel of the second image, wherein the second image is predicted from the first image and has a dynamic range that is higher than a dynamic range of the first image; and generating an output channel segment of the second image based on the first image and the parameters of the prediction parameter matrix of the PCCC prediction model, wherein the prediction parameter matrix is configured to transform an input vector to the output channel segment, wherein the input vector comprises, for each pixel of the color channel segment of the first image, an input vector component of at least first order, wherein the input vector components of the first order comprise products of the respective pixel values for two or more of the color channels of the pixel within the first image, wherein the output channel segment comprises, for each pixel of the color channel segment of the first image, a predicted pixel value for a pixel of the second image in the one color channel having the same pixel coordinates as the pixel of the first image.