A method for encoding an input video comprising a luma component and two chroma components represented by code words, the method comprising: - reshaping of said input video by applying piece-wise linear functions to luma and chroma components of said input video, - encoding the reshaped video into a bitstream; and - encoding parameters representative of said piece-wise linear functions as side information, - encoding, as side information, a first information data which determines a targeted range of a decoded reshaped video and a second information data (CRFR) which determines a range of a reconstructed video after inverse-reshaping the decoded reshaped video, wherein reshaping of said input video comprises checking the status of the first information data and the status of the second information data (CRFR): if the status of the first information data equals false and the status of the second information data equals false, the piece-wise linear functions are multiplied by a scaling factor lower than 1 and a non null offset value is added to the piece-wise linear function; if the status of the first information data equals true and the status of the second information data equals false, the piece-wise linear functions are multiplied by a scaling factor lower than 1; for the other combinations of the status of the first and second information status, the piece-wise linear functions are multiplied by a scaling factor equal to 1. - reshaping of said input video by applying piece-wise linear functions to luma and chroma components of said input video, - encoding the reshaped video into a bitstream; and - encoding parameters representative of said piece-wise linear functions as side information, - encoding, as side information, a first information data which determines a targeted range of a decoded reshaped video and a second information data (CRFR) which determines a range of a reconstructed video after inverse-reshaping the decoded reshaped video, wherein reshaping of said input video comprises checking the status of the first information data and the status of the second information data (CRFR): if the status of the first information data equals false and the status of the second information data equals false, the piece-wise linear functions are multiplied by a scaling factor lower than 1 and a non null offset value is added to the piece-wise linear function; if the status of the first information data equals true and the status of the second information data equals false, the piece-wise linear functions are multiplied by a scaling factor lower than 1; for the other combinations of the status of the first and second information status, the piece-wise linear functions are multiplied by a scaling factor equal to 1. if the status of the first information data equals false and the status of the second information data equals false, the piece-wise linear functions are multiplied by a scaling factor lower than 1 and a non null offset value is added to the piece-wise linear function; if the status of the first information data equals true and the status of the second information data equals false, the piece-wise linear functions are multiplied by a scaling factor lower than 1; for the other combinations of the status of the first and second information status, the piece-wise linear functions are multiplied by a scaling factor equal to 1.