A method comprising: accessing a first input image of a first dynamic range; accessing a second input image of a second dynamic range, wherein the second dynamic range is lower than the first dynamic range; generating a prediction image of the first dynamic range using the second input image and a predictor function; identifying at least one post-prediction filtering area within the generated prediction image; selecting a post-prediction filtering mode among one or more post-prediction filtering modes; applying the selected post-prediction filtering mode to the at least one post-prediction filtering area; outputting a filtered prediction image based on the post-prediction filtering mode that is applied to the at least one post-prediction filtering area; and communicating to a receiver information related to the at least one post-prediction filtering area and the selected post-prediction filtering mode, wherein the post-prediction filtering mode comprises using a linear interpolation filter, wherein using the linear interpolation filter comprises: line-by-line accessing the filtering area of the predicted image to yield interpolation input data; performing median filtering on the interpolation input data for determining stair steps in the filtering area of the predicted image and to output first filtered input data; for each of the one or more determined stair steps, determining a step length, a middle step position, and a middle step value; and for each filtered input data point of the first filtered input data; determining whether the first filtered input data point is qualified for interpolation; and if the first filtered input data point is qualified for interpolation, computing a new value for said filtered input data point, wherein the new value is proportional to two or more middle step values that bracket the input data. accessing a first input image of a first dynamic range; accessing a second input image of a second dynamic range, wherein the second dynamic range is lower than the first dynamic range; generating a prediction image of the first dynamic range using the second input image and a predictor function; identifying at least one post-prediction filtering area within the generated prediction image; selecting a post-prediction filtering mode among one or more post-prediction filtering modes; applying the selected post-prediction filtering mode to the at least one post-prediction filtering area; outputting a filtered prediction image based on the post-prediction filtering mode that is applied to the at least one post-prediction filtering area; and communicating to a receiver information related to the at least one post-prediction filtering area and the selected post-prediction filtering mode, wherein the post-prediction filtering mode comprises using a linear interpolation filter, wherein using the linear interpolation filter comprises: line-by-line accessing the filtering area of the predicted image to yield interpolation input data; performing median filtering on the interpolation input data for determining stair steps in the filtering area of the predicted image and to output first filtered input data; for each of the one or more determined stair steps, determining a step length, a middle step position, and a middle step value; and for each filtered input data point of the first filtered input data; determining whether the first filtered input data point is qualified for interpolation; and line-by-line accessing the filtering area of the predicted image to yield interpolation input data; performing median filtering on the interpolation input data for determining stair steps in the filtering area of the predicted image and to output first filtered input data; for each of the one or more determined stair steps, determining a step length, a middle step position, and a middle step value; and for each filtered input data point of the first filtered input data; determining whether the first filtered input data point is qualified for interpolation; and determining whether the first filtered input data point is qualified for interpolation; and if the first filtered input data point is qualified for interpolation, computing a new value for said filtered input data point, wherein the new value is proportional to two or more middle step values that bracket the input data.