A method, comprising: computing one or more statistical values based on one or more source images in a sequence of source images; selecting, based on the one or more statistical values, an adaptive reshaping function for the one or more source images, the adaptive reshaping function mapping source codewords to reshaped codewords; adaptively reshaping, based at least in part on the selected adaptive reshaping function, a portion of source video content to generate a portion of reshaped video content, the portion of source video content being represented by the one or more source images; generating an approximation of an inverse of the selected adaptive reshaping function, comprising: determining a target lookup table comprising key-value pairs representing the inverse of the selected adaptive reshaping function; generating a first approximation of the target LUT by performing a forward search from small keys to large keys in the key-value pairs of the LUT; generating a second approximation of the target LUT by performing a backward search from large keys to small keys in the key-value pairs of the LUT; selecting one of the first approximation and the second approximation by comparing approximation errors respectively generated by the forward search and the backward search; encoding the reshaped video content and a set of adaptive reshaping parameters that define the approximation of the inverse of the selected adaptive reshaping function into a reshaped video signal, wherein the approximation of the inverse of the selected adaptive reshaping function is represented by a set of second order polynomials, the method further comprising: determining a continuity condition for approximating the target LUT; based on the continuity condition, selecting a first stopping rule for the forward search used to approximate the target LUT and a second stopping rule for the backward search used to approximate the target LUT; generating the first approximation based at least in part on the first stopping rule; and generating the second approximation based at least in part on the second stopping rule. computing one or more statistical values based on one or more source images in a sequence of source images; selecting, based on the one or more statistical values, an adaptive reshaping function for the one or more source images, the adaptive reshaping function mapping source codewords to reshaped codewords; adaptively reshaping, based at least in part on the selected adaptive reshaping function, a portion of source video content to generate a portion of reshaped video content, the portion of source video content being represented by the one or more source images; generating an approximation of an inverse of the selected adaptive reshaping function, comprising: determining a target lookup table comprising key-value pairs representing the inverse of the selected adaptive reshaping function; generating a first approximation of the target LUT by performing a forward search from small keys to large keys in the key-value pairs of the LUT; generating a second approximation of the target LUT by performing a backward search from large keys to small keys in the key-value pairs of the LUT; selecting one of the first approximation and the second approximation by comparing approximation errors respectively generated by the forward search and the backward search; determining a target lookup table comprising key-value pairs representing the inverse of the selected adaptive reshaping function; generating a first approximation of the target LUT by performing a forward search from small keys to large keys in the key-value pairs of the LUT; generating a second approximation of the target LUT by performing a backward search from large keys to small keys in the key-value pairs of the LUT; selecting one of the first approximation and the second approximation by comparing approximation errors respectively generated by the forward search and the backward search; encoding the reshaped video content and a set of adaptive reshaping parameters that define the approximation of the inverse of the selected adaptive reshaping function into a reshaped video signal, wherein the approximation of the inverse of the selected adaptive reshaping function is represented by a set of second order polynomials, the method further comprising: determining a continuity condition for approximating the target LUT; based on the continuity condition, selecting a first stopping rule for the forward search used to approximate the target LUT and a second stopping rule for the backward search used to approximate the target LUT; generating the first approximation based at least in part on the first stopping rule; and generating the second approximation based at least in part on the second stopping rule. determining a continuity condition for approximating the target LUT; based on the continuity condition, selecting a first stopping rule for the forward search used to approximate the target LUT and a second stopping rule for the backward search used to approximate the target LUT; generating the first approximation based at least in part on the first stopping rule; and generating the second approximation based at least in part on the second stopping rule.