A method for reducing noise, the method comprising: receiving a sequence of input images in a first dynamic range; for an input image in the sequence of input images: receiving an input backward reshaping function (BLUT) mapping codewords from the first dynamic range to a second dynamic range, wherein the second dynamic range is equal or higher than the first dynamic range; generating based on the sequence of input images and the input backward reshaping function statistical data for the input image to estimate the risk of noise artifacts in a target image in the second dynamic range, wherein the target image is generated by applying the input backward reshaping function to the input image, wherein the statistical data include computing, for two or more input images of the sequence, corresponding two or more temporal histograms of codewords bins at corresponding times of the two or more input images in the sequence, and computing a measure of a variance of the computed temporal histograms; computing a measure of noise likelihood in the input image based on the statistical data; computing a first derivative of the input backward reshaping function; if the measure of noise likelihood is higher than a threshold then adjusting the first derivative of the input backward reshaping function to generate a modified first derivative of the backward reshaping function for reducing the noise in the target image; generating an output backward reshaping function based on the modified first derivative of the backward reshaping function; and replacing the input backward reshaping function with the output backward reshaping function. receiving a sequence of input images in a first dynamic range; for an input image in the sequence of input images: receiving an input backward reshaping function (BLUT) mapping codewords from the first dynamic range to a second dynamic range, wherein the second dynamic range is equal or higher than the first dynamic range; generating based on the sequence of input images and the input backward reshaping function statistical data for the input image to estimate the risk of noise artifacts in a target image in the second dynamic range, wherein the target image is generated by applying the input backward reshaping function to the input image, wherein the statistical data include computing, for two or more input images of the sequence, corresponding two or more temporal histograms of codewords bins at corresponding times of the two or more input images in the sequence, and computing a measure of a variance of the computed temporal histograms; computing a measure of noise likelihood in the input image based on the statistical data; computing a first derivative of the input backward reshaping function; if the measure of noise likelihood is higher than a threshold then adjusting the first derivative of the input backward reshaping function to generate a modified first derivative of the backward reshaping function for reducing the noise in the target image; generating an output backward reshaping function based on the modified first derivative of the backward reshaping function; and receiving an input backward reshaping function (BLUT) mapping codewords from the first dynamic range to a second dynamic range, wherein the second dynamic range is equal or higher than the first dynamic range; generating based on the sequence of input images and the input backward reshaping function statistical data for the input image to estimate the risk of noise artifacts in a target image in the second dynamic range, wherein the target image is generated by applying the input backward reshaping function to the input image, wherein the statistical data include computing, for two or more input images of the sequence, corresponding two or more temporal histograms of codewords bins at corresponding times of the two or more input images in the sequence, and computing a measure of a variance of the computed temporal histograms; computing a measure of noise likelihood in the input image based on the statistical data; computing a first derivative of the input backward reshaping function; if the measure of noise likelihood is higher than a threshold then adjusting the first derivative of the input backward reshaping function to generate a modified first derivative of the backward reshaping function for reducing the noise in the target image; generating an output backward reshaping function based on the modified first derivative of the backward reshaping function; and replacing the input backward reshaping function with the output backward reshaping function.