IMAGE RECONFIGURATION IN VIDEO CODING USING RATE-DISTIRSURES OPTIMIZATION.

MX431647BActive Publication Date: 2026-02-25DOLBY LABORATORIES LICENSING CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
MX2023012078
Authority / Receiving Office
MX · MX
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-01-14
Filing Date
2020-08-13
Publication Date
2026-02-25
Estimated Expiration
2039-02-13

AI Technical Summary

Technical Problem

Existing video coding technologies struggle with inefficiencies in compressing images with higher bit depths, such as 10 or 12 bits, and lack effective methods for integrating image reconfiguration to improve coding efficiency and quality, particularly for high dynamic range (HDR) and standard dynamic range (SDR) content.

Method used

Implementing a rate-distortion optimization (RDO) based approach for image reconfiguration, where the input image is divided into multi-pixel regions, assigned to keyword bins based on luminance characteristics, and keywords are allocated using a criterion that minimizes distortion at a given bit rate, with forward and reverse reconfiguration functions to enhance compression efficiency.

Benefits of technology

The RDO-based reconfiguration method improves both subjective visual quality and objective metrics like PSNR and Bjontegaard PSNR, while allowing for more efficient compression of HDR and SDR content, reducing complexity and enhancing coding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure MX431647B0
    Figure MX431647B0
Patent Text Reader

Abstract

Given a sequence of images in a first keyword representation, methods, processes, and systems are presented for image reconfiguration using distortion-rate optimization, where reconfiguration allows the images to be encoded in a second keyword representation that enables more efficient compression than using the first keyword representation. Syntax methods for signaling reconfiguration parameters are also presented.
Need to check novelty before this filing date? Find Prior Art

Description

IMAGE RECONFIGURATION IN VIDEO CODING USING RATE-DISTIRSUITY OPTIMIZATION CROSS REFERENCE TO RELATED APPLICATIONS This application claims the benefit of priority over the US provisional patent application. No. 62 / 792.122, submitted on January 14, 2019, Ser. No. 62 / 782.659, submitted on December 20, 2018, Ser. No. 62 / 772,228, submitted on November 28, 2018, Ser. No. 62 / 739.402, submitted on October 1, 2018, Ser. No. 62 / 726,608, submitted on September 4, 2018, Ser. No. 62 / 691.366, submitted on June 28, 2018, and Ser. No. 62 / 630.385, submitted on February 14, 2018, each of which is incorporated herein by reference in its entirety. TECHNOLOGY The present invention relates generally to images and video encoding. More particularly, one embodiment of the present invention relates to the reconfiguration of images in video encoding. BACKGROUND In 2013, the MPEG group at the International Organization for Standardization (ISO), in conjunction with the International Telecommunication Union (ITU), issued the first draft of the HEVC video coding standard (also known as H.265) (Ref. [4]). More recently, the same group issued a request for evidence to support the development of a next-generation coding standard that provides improved coding performance compared to existing video coding technologies. As used herein, the term bit depth indicates the number of pixels used to represent one of the color components of an image. Traditionally, images were encoded at 8 bits per color component per pixel (e.g., 24 bits per pixel); however, modern architectures can now support higher bit depths, such as 10 bits, 12 bits, or more. In a traditional image pipeline, captured images are quantized using a nonlinear optoelectronic function (OETF), which converts the linear scene light into a nonlinear video signal (e.g., RGB or YCbCr with gamma encoding). Then, at the receiver, before display on the screen, the signal is processed by an electro-optical transfer function (EOTF) that translates the video signal values ​​to the output screen's color values. These nonlinear functions include the traditional "gamma" curve, documented in ITU-R Rec. BT.709 and BT.2020, the PQ (perceptual quantization) curve described in SMPTE ST 2084, and the HybridLog-gamma or HLG curve described in ITU-R Rec. BT.2100. As used herein, the term forward reconfiguration indicates a sample-by-sample or keyword-by-keyword mapping process of a digital image from its original bit depth and original keyword distribution or representation (e.g., gamma, PQ, HLG, and the like) to an image of the same or a different bit depth and a different keyword distribution or representation. Reconfiguration allows for improved compressibility or improved image quality at a fixed bit rate. For example, without limitation, the o / ηζι n / cznz / e / Yi Reconfiguration can be applied to 10-bit or 12-bit PQ-encoded HDR video to improve encoding efficiency in a 10-bit video coding architecture. In a receiver, after decompressing the reconfigured signal, the receiver can apply a reverse reconfiguration function to restore the signal to its original keyword distribution. As the inventors herein appreciate, as the development of the next generation of video coding standards begins, improved techniques for integrated image reconfiguration and encoding are desired. The methods of this invention can be applied to a variety of video content, including, but not limited to, standard dynamic range (SDR) and / or high dynamic range (HDR) content. The approaches described in this section are approaches that can be pursued but are not necessarily approaches that have been previously conceived or followed. Therefore, unless otherwise stated, it should not be assumed that any of the approaches described in this section qualifies as a prior technique simply by virtue of its inclusion in this section. Similarly, problems identified with respect to one or more approaches should not be assumed to have been recognized in any prior technique on the basis of this section, unless otherwise stated. Brief description of the drawings One embodiment of the present invention is illustrated by way of example, and not by way of limitation, in the accompanying drawings, and in which similar reference numbers refer to similar elements and in which: FIG. 1A illustrates an example process for a video supply channel; FIG. 1B illustrates an example of a process for data compression using signal reconfiguration according to the previous technique; FIG. 2A illustrates an example of an architecture for an encoder that uses hybrid loop reconfiguration according to one embodiment of this invention; FIG. 2B illustrates an example of an architecture for a decoder using hybrid loop reconfiguration according to one embodiment of this invention; FIG. 2C illustrates an example of an architecture for intra-CU decoding using reconfiguration according to a form of embodiment; FIG. 2D illustrates an example of an architecture for inter-CU decoding using reconfiguration according to a form of embodiment; FIG. 2E illustrates an example of an architecture for intra-CU decoding within intercoded slices according to a form of embodiment for luma or chroma processing; FIG. 2F illustrates an example of an architecture for intra-CU decoding within inter-coded slices according to a form of implementation for processing; FIG. 3A illustrates an example of a process for encoding video using a reconfiguration architecture according to one embodiment of this invention; o / n7i n / C7nz / R / vi -3 FIG. 3B illustrates an example of a process for decoding video using a reconfiguration architecture according to one embodiment of this invention; FIG. 4 illustrates an example of a process for reassigning keywords in the reconfigured domain according to one embodiment of this invention; FIG. 5 illustrates an example of a process for deriving reconfiguration thresholds according to one embodiment of this invention; Figures 6A, 6B, 6C, and 6D represent examples of data graphs for deriving reconfiguration thresholds according to the process described in Figure 5 and an embodiment of this invention; and FIG. 6E illustrates examples of keyword assignment according to bin variance according to embodiments of this invention. DESCRIPTION OF EXAMPLES OF FORMS OF REALIZATION The signal reconfiguration and encoding techniques for image compression using rate distortion optimization (RDO) are described herein. In the following description, for the purpose of explanation, numerous specific details are set forth to provide a complete understanding of the present invention. However, it will be evident that the present invention can be implemented without these specific details. In other cases, well-known structures and devices are not described in exhaustive detail to avoid unnecessarily obscuring, obscuring, or confusing the present invention. Overview The examples of embodiments described herein refer to signal reconfiguration and video encoding. In an encoder, a processor receives an input image in a first keyword representation to reconfigure it into a second keyword representation, where the second keyword representation allows for more efficient compression than the first keyword representation, and generates a forward reconfiguration function that maps pixels from the input image to a second keyword representation, where generating the forward reconfiguration function, the encoder: divides the input image into multi-pixel regions, assigns each of the pixel regions to one of the multi-keyword bins according to the first luminance characteristic of each pixel region,It calculates a bin metric for each of the multiple keyword bins according to a second luminance feature of each of the pixel regions assigned to each keyword bin, assigns a number of keywords in the second keyword representation to each keyword bin according to the bin metric of each keyword bin and a distortion-rate optimization criterion, and generates the forward reconfiguration function in response to the assignment of keywords in the second keyword representation to each of the multiple keyword bins. In another embodiment, in a decoder, a processor receives encoded bitstream syntax elements characterizing a reconfiguration pattern, where the syntax elements include one or more of a flag indicating a minimum keyword bin index value to use in a reconfiguration construct process, a flag indicating a maximum keyword bin index value to use in a process of -4 Reconfiguration construct, a flag indicating a reconfiguration model profile type, where the model profile type is associated with default bin-related parameters, including bin importance values, or a flag indicating one or more delta bin importance values ​​to be used to adjust the default bin importance values ​​defined in the reconfiguration model profile. The processor determines, based on the reconfiguration model profile, the default bin importance values ​​for each bin and an assignment list of a predetermined number of keywords to be assigned to each bin according to the bin importance value. Then, for each keyword bin, the processor: determines its bin importance value by adding its delta bin importance value; Determines the number of keywords to assign to the keyword bin based on the bin's importance value and the assignment list; and generates a forward reconfiguration function based on the number of keywords assigned to each keyword bin. In another embodiment, in a decoder, a processor receives an encoded bitstream comprising one or more reconfigured images encoded in a first keyword representation and metadata related to the reconfiguration information for the encoded reconfigured images. The processor Based on metadata related to reconfiguration information, it generates a reverse reconfiguration function and a forward reconfiguration function, where the reverse reconfiguration function maps pixels from the reconfigured image of the first keyword representation to a second keyword representation, and the forward reconfiguration function maps pixels from an image of the second keyword representation to the first keyword representation. The processor extracts from the encoded bitstream a reconfigured encoded image comprising one or more encoded units, where for one or more encoded units in the reconfigured encoded image: For a reconfigured intracoded encoding unit (CU) in the reconfigured encoded image, the processor: generates the first reconfigured reconstructed samples of the CU based on the reconfigured residual samples in the CU and the first reconfigured prediction samples; generates a reconfigured loop filter output based on the first reconfigured reconstructed samples and loop filter parameters; applies the reverse reconfiguration function to the reconfigured loop filter output to generate decoded samples of the encoding unit in the second keyword representation; and stores the decoded samples of the encoding unit in the second keyword representation in a reference buffer; For a reconfigured intercoded encoding unit in the reconfigured encoded image, the processor: -5 applies the forward reconfiguration function to the prediction samples stored in the reference buffer in the second keyword representation to generate the second reconfigured prediction samples; Generates the reconfigured second reconstructed samples of the encoding unit based on the reconfigured residual samples in the encoded CU and the reconfigured second prediction samples; generates a reconfigured loop filter output based on the reconfigured second reconstructed samples and loop filter parameters; The processor applies the reverse reconfiguration function to the reconfigured loop filter output to generate samples of the encoding unit in a second keyword representation; and stores the samples of the encoding unit in the second keyword representation in a reference buffer. Finally, the processor generates a decoded image based on the samples stored in the reference buffer. In another embodiment, in a decoder, a processor receives an encoded bitstream comprising one or more reconfigured images encoded in an input keyword representation and reconfiguration metadata (207) for the one or more reconfigured images encoded in the encoded bitstream. The processor generates a forward reconfiguration function (282) based on the reconfiguration metadata, wherein the forward reconfiguration function maps pixels from an image of a first keyword representation to the input keyword representation. The processor generates a reverse reconfiguration function (265-3) based on either the reconfiguration metadata or the forward reconfiguration function, wherein the reverse reconfiguration function maps pixels from the reconfigured image of the input keyword representation to the first keyword representation.The processor extracts from the encoded bit stream a reconfigured encoded image comprising one or more encoded units, where:. For an intra-coded encoding unit (intra-CU) in the reconfigured encoded image, the processor: generates reconfigured reconstructed samples of the intra-CU (285) based on the reconfigured residual samples in the intra-CU and the reconfigured intra-predicted prediction samples; applies the inverse reconfiguration function (265-3) to the reconfigured reconstructed samples of the intra-CU to generate decoded samples of the intra-CU in the first keyword representation; applies a loop filter (270) to the decoded intra-CU samples to generate intra-CU output samples; and stores the intra-CU output samples in a reference buffer; For an inter-coded CU (inter-CU) in the reconfigured encoded image, the processor: o / n7i n / C7nz / R / vi -6applies forward reconfiguration function (282) to the Inter-prediction samples stored in the reference buffer in the first keyword representation to generate reconfigured prediction samples for the Inter-CU in the input keyword representation; generates reconfigured reconstructed samples of the Inter-CU based on the reconfigured residual samples in the Inter-CU and the reconfigured prediction samples for the Inter-CU; applies the inverse reconfiguration function (265-3) to the reconfigured reconstructed samples of the Inter-CU to generate decoded samples of the Inter-CU in the first keyword representation; applies the loop filter (270) to the decoded Inter-CU samples to generate Inter-CU output samples; and stores the Inter-CU output samples in the reference buffer; and generates a decoded image in the first keyword representation based on the output samples in the reference buffer. Example of a video delivery processing channel Figure 1A illustrates an example of a conventional video delivery process (100) showing several stages from video capture to video content display. A sequence of video frames (102) is captured or generated using the image generation block (105). The video frames (102) can be captured digitally (e.g., by a digital camera) or generated by a computer (e.g., using computer animation) to provide video data (107). Alternatively, the video frames (102) can be captured on film by a movie camera. The film is converted to a digital format to provide video data (107). In a production stage (110), the video data (107) is edited to provide a video production workflow (112). The video data from the production flow (112) is then fed to a processor in block (115) for post-production editing. Post-production editing in block (115) may include adjusting or modifying the colors or brightness in particular areas of an image to improve image quality or achieve a specific look according to the video creator's creative intent. This is sometimes referred to as color synchronization or color grading. Other editing (e.g., scene and sequence selection, image cropping, addition of computer-generated visual special effects, etc.) may be performed in block (115) to produce a final version (117) of the production for distribution. During post-production editing (115), the video images are displayed on a reference screen (125). After post-production (115), the final production video data (117) can be delivered to the encoding block (120) for downstream delivery to decoding and playback devices, such as televisions, set-top boxes, cinemas, and the like. In some implementations, the encoding block (120) may include audio and video encoders, such as those defined by ATSC, DVB, DVD, Blu-ray, and other delivery formats, to generate the encoded bitstream (122). At a receiver, the encoded bitstream (122) is decoded by the o / nzi n / C7nz / R / vi -7 Decoding unit (130) to generate a decoded signal (132) that represents an identical or close approximation to the signal (117). The receiver may be connected to a target display (140) that may have characteristics completely different from the reference display (125). In that case, a display management block (135) can be used to map the dynamic range of the decoded signal (132) to the characteristics of the target display (140) by generating a mapped signal on the display (137). Signal reconfiguration Figure 1B illustrates an example of a process for signal reconfiguration according to the prior technique [2]. Given the input frames (117), a forward reconfiguration block (150) analyzes the input and encoding constraints and generates keyword mapping functions that map the input frames (117) to requantize the output frames (152). For example, the input (117) can be encoded according to a certain electro-optical transfer function (EOTF) (e.g., gamma). In some embodiments, information about the reconfiguration process can be communicated to downstream devices (such as decoders) using metadata. As used herein, the term metadata refers to any auxiliary information that is transmitted as part of the encoded bitstream and helps a decoder to represent a decoded image.Such metadata may include, but is not limited to, color space or gamut information, reference display parameters, and auxiliary signal parameters, as described herein. After encoding (120) and decoding (130), the decoded frames (132) can be processed by a reverse reconfiguration function (160), which converts the requantized frames (132) back to the original EOTF domain (e.g., gamma) for further downstream processing, such as the screen management process (135) described above. In some embodiments, the reverse reconfiguration function (160) can be integrated with a dequantizer in the decoder (130), for example, as part of the dequantizer in an AVC or HEVC video decoder. As used herein, the term “reconfigurator” can denote a forward or reverse reconfiguration function used when encoding and / or decoding digital images. Examples of reconfiguration functions are discussed in Ref. [2]. In Ref. [2], a looped block-based image reconfiguration method for high dynamic range video coding was proposed. This design allows block-based reconfiguration within the encoding loop, but at the cost of increased complexity. Specifically, the design requires maintaining two sets of decoded image buffers: one set for reverse-reconfigured (or non-reconfigured) decoded images, which can be used for both non-reconfigured prediction and output to a display, and another set for forward-reconfigured decoded images, which is used only for reconfiguration prediction.Although forward reconfigured decoded images can be calculated on the fly, the cost in complexity is very high, especially for interprediction (motion compensation with subpixel interpolation). In general, image-buffer-display (DPB) management is complicated and requires very careful attention; therefore, as the inventors appreciate, simplified methods for encoding video are desirable. o / n7i n / C7nz / R / vi -8 In ref. [6], additional reconfiguration-based codec architectures were presented, including an external, out-of-loop reconfigurator, an architecture with an intra-loop-only reconfigurator, an architecture with a reconfigurator for residual prediction samples, and a hybrid architecture that combines both intra-loop and residual reconfiguration. The main goal of the proposed architectures is to improve subjective visual quality. Therefore, many of these approaches will produce worse objective metrics, particularly the well-known peak-to-noise ratio (PSNR) metric. This invention proposes a novel reconfigurator based on Distortion-Rate Optimization (RDO). Specifically, when the specific distortion metric is MSE (Mean Squared Error), the proposed reconfigurator will improve both subjective visual quality and well-established objective metrics based on PSNR, Bjontegaard PSNR (BD-PSNR), or Bjontegaard Rate (BD Rate). It is worth noting that any of the proposed reconfiguration architectures, without loss of generality, can be applied to the luminance component, one or more of the chroma components, or a combination of luma and chroma components. Reconfiguration based on distortion-rate optimization Consider a reconfigured video signal represented by a bit depth of B bits in a color component (e.g., 8=10 for Y, Cb, and / or Cr), thus providing a total of 2e keywords. Consider dividing the desired keyword range [0-20] into N segments or bins, and let Λ4 represent the number of keywords in the k-th segment or bin, after a reconfiguration mapping, such that, given a target bit rate R, the distortion D between the source image and the decoded or reconstructed image is minimized. Without loss of generality, D can be expressed as a measure of the sum of squared errors (SSE) between the corresponding pixel values ​​of the source input (Source(jj)) and the reconstructed image (Recon( / ,;)). D= SSE = Σ. Μ / (Μ)2, (1)L>J where Diff(ij) = Source (i, j) - Recon(i,j). The optimization reconfiguration problem can be rewritten as: find Mk (k = 0, 1,..., N-1), so that given a bit rate R, D is minimal, where <= 2β. Several optimization methods can be used to find a solution, but the optimal solution could be too complex for real-time coding. In this invention, a suboptimal but more practical analytical solution is proposed. Without loss of generality, consider an input signal represented by an 8-bit bit depth (e.g., B = 10), where the keywords are evenly divided into N bins (e.g., N = 32). By default, each bin is assigned to Ma = 2BIN keywords (e.g., for M = 32 and 8 = 10, Ma = 32). A more efficient keyword allocation, based on RDO, will be shown below through an example. As used herein, the term “narrow range” [CW1, CW2] indicates a continuous range of keywords between keywords CW1 and CW2 that is a subset of the full dynamic range [0 2S—1]. For example, in an o / n7i n / C7nz / R / vi In the -9 implementation, a narrow range can be defined as [16*2(0-8), 235*2<β-8)], (for example, for B = 10, the narrow range comprises values ​​[64 940]). Assuming the bit depth of the output signal is Bo, if the dynamic range of an input signal is within a narrow range, then, in what will be referred to as the “default” reconfiguration, the signal can be extended across the full range [0 2So—1 ]. Each bin will then have approximately Mf= CEIL((2e° / (CW2-CW1))*Ma) keywords, or, for this example, if Bo=B=10, Mf= CEIL((1024 / (940-64))*32) = 38 keywords, where CEIL(x) denotes the ceiling function, which maps x to the smallest integer greater than or equal to x. Without loss of generality, in the examples below, for simplicity, it is assumed that B0=B. For the same quantization parameter (QP), increasing the number of keywords in a bin is equivalent to allocating more bits to encode the signal within that bin, thus reducing the SSE or improving the PSNR. However, uniformly increasing the keyword allocation in every bin may not yield better results than encoding without reconfiguration, as the PSNR gain may not outweigh the bit rate increase—that is, it is not a good trade-off in terms of RDO. Ideally, more keywords should only be allocated to bins that produce the best RDO trade-off, meaning they generate a significant decrease in SSE (increase in PSNR) at the expense of a small bit rate increase. In one embodiment, the performance of the RDO is enhanced through adaptive piecewise reconfiguration mapping. The method can be applied to any type of signal, including standard dynamic range (SDR) and high dynamic range (HDR) signals. Using the simple case above as an example, the objective of this invention is to assign Mao keywords to each keyword segment or keyword bin. In an encoder, given N bins of keywords for the input signal, the average luminance value of each bin can be approximated as follows: Initialize to zero the sum of the variance of the block (i / arb¡n( / c)) and counter (Cb¡n( / r)) for each bin, for example, varbin(k) = 0 and cbin{k) = 0, for k = 0,1.....L / -1. Divide the images into L * L non-overlapping blocks (e.g., / .=16) For each block of images, calculate the block luma mean and block i luma variance (e.g., Lumajnean(i) and Luma_var(i)) Based on the mean luma of the block, this block is assigned to one of the N bins. In one implementation, if Lumajnean(i) is within the k-th segment of the input dynamic range, the total bin luminance variance for the k-th bin is incremented by the luma variance of the newly assigned block, and the counter for this bin is incremented by one. That is, if the i-th pixel region belongs to the k-th bin: varbinW = varbm(k) + Luma_var( / ); (2) Cbin(k) — Cbin(k) + 1. For each bin, the average luminance variance for this bin is calculated by dividing the sum of the block variances by this bin using the counter, assuming that the counter is not equal to 0; or if Cb¡n(k) is not 0, then varb¡n(k) = varbm(k)l cbm{k) (3) Ο7Π7 I n / C7n7 / R / YI -10A subject matter expert may appreciate that alternative metrics to luminance variance can be applied to characterize sub-blocks. For example, one can use the standard deviation of luminance values, a weighted luminance variance or a luminance value, a peak luminance, and the like. In one implementation, the following pseudocode represents an example of how a coder can adjust bin allocation using metrics calculated for each bin. For the k-th bin, if there are no pixels in bin A4 = 0; Furthermore, if vart>m(k) < THu (4) H = Mf; besides H = Ma, II (note: this is to ensure that each bin will have at least Ma keywords. / / Alternatively, Ma+1 keywords can also be assigned) end where THu indicates a default upper threshold. In another implementation, the assignment can be performed as follows: For the / r-th bin, if there are no pixels in bin M = 0; also if THo < varbm(k) < TH1 (5) Mk = Mf; furthermore, Mk = Ma, where THo and THi indicate predetermined lower and upper thresholds. In another embodiment. For the k-th bin, if there are no pixels in bin M = 0; also if varbm(k) >THL(6) Mk = Mi', also Λ / fk — Ma , end where THl indicates a predetermined lower threshold. ο / Π71 n / C7nz / R / vi -11 The preceding examples show how to select the number of keywords for each bin from two preselection numbers M and Ma. The thresholds (e.g., THu or THl) can be determined based on rate-distortion optimization, for example, through an exhaustive search. The thresholds can also be adjusted based on the values ​​of the quantization parameters (QP). In one embodiment, for 8=10, the thresholds can range from 1,000 to 10,000. In one embodiment, to speed up processing, a threshold can be determined from a fixed set of values, namely {2000, 3000, 4000, 5000, 6000, 7000}, using a Laaranciian optimization method. For example, for each value of TH(i) in the set, using predefined training clips, compression tests with fixed QP can be run, and the values ​​of an objective function J defined as J(i) = D + AR. (7) Therefore, the optimal threshold value can be defined as the value TH(i) in the set for which J(i) is minimum. In a more general example, a lookup table (LUT) can be predefined. For example, in Table 1, the first row defines a set of thresholds that divide the entire range of possible bin metrics (e.g., vafbin(k) values) into segments, and the second row defines the corresponding number of keywords (CWs) to allocate to each segment. In one implementation, a rule for constructing such a LUT is: if the variance of the interval is too large, many bits may need to be spent to reduce the SSE; therefore, keyword (CW) values ​​smaller than Ma can be allocated. If the bin variance is very small, a CW value larger than Ma can be allocated. Table 1: Example of a keyword assignment LUT based on the variance thresholds of the ο / Π71 n / C7nz / R / vi bin THo THp_i THP THp+i THq_i CWo CWp-i cwp CWp+i CWq-1 cwq Using Table 1, the threshold mapping on the keywords can be generated as follows: For the k-th bin, if there are no pixels in bin M. = 0; Furthermore, if varbin(k) < THo A4 = CW0; Furthermore, if THo < varbin(k) <THi (8) M = CWi; furthermore if THp_i < va / b¡n(k) < THPU = CWP; -12plus if varbm(k) > THq_i U = CWq; end For example, given two thresholds and three keyword assignments, for B = 10, in one embodiment, THo = 3,000, CWo = 38, THi = 10,000, CWi = 32, and CW2 = 28. In another embodiment, the two thresholds THo and THi can be selected as follows: a) THi is considered to be a very large number (even infinite), and THo is selected from a set of predetermined values, for example, using RDO optimization in equation (7). Given THo, a second set of possible values ​​for THi is now defined, for example, {10,000, 15,000, 20,000, 25,000, 30,000}, and equation (7) is applied to identify the optimal value. The approach can be performed iteratively with a limited number of threshold values ​​or until convergence occurs. It can be observed that after assigning keywords to bins according to any of the schemes defined above, the sum of the M values ​​may exceed the maximum number of available keywords (2S), or there may be unused keywords. If there are unused keywords, one can simply decide to do nothing or assign them to specific bins. On the other hand, if the algorithm assigns more keywords than are available, then it may be desirable to readjust the Λ4 values, for example, by reconfiguring the CW values. Alternatively, one can generate the forward reconfiguration function using the existing values, but then readjust the output value of the reconfiguration function by scaling with (£fcMk) / 2B. Examples of keyword reassignment techniques are also described in Ref. [7]. Figure 4 illustrates an example process for assigning keywords in the reconfiguration domain according to the RDO technique described above. In step 405, the desired reconfigured dynamic range is divided into N bins. After the input image is divided into non-overlapping blocks (step 410), for each block: • Step 415 calculates its luminance characteristics (e.g., mean and variance) • Step 420 assigns each image block to one of the N bins • Step 425 calculates the average luminance variance in each bin Given the values ​​calculated in step 425, in step 430, each bin is assigned to a number of keywords according to one or more thresholds, for example, using any of the keyword assignment algorithms represented in equations (4) to (8). Finally, in step (435), the final keyword assignment can be used to generate a forward reconfiguration function and / or a reverse reconfiguration function. In one embodiment, by way of example and without limitation, the forward LUT list (FLUT) can be constructed using the following C code. tot_cw = 2S: histjens = tot_cw / N; for (i = 0; i < N; Í++) ο / Π71 n / C7nz / R / vi -13{ Temp double = (double) M[i] / (double)h¡st_lens; / / M[¡] corresponds to Λ4 for (j = 0; j < histjens; j++) { CW_blns_LUT_all[i*hist_lens +j] = temp; }} Y_LUT_all[0] = CW_bins_LUT_all[O]; for (i = 1; i < tot_cw; I++) { Y_LUT_all[i] = Y_LUT_all [i -1] + CW_bins_LUT_all[¡]; } for (i = 0; i < tot_cw; I++) { FLUT[¡] = Clip3(0, tot_cw —1, (lnt)(Y_LUT_all[¡] +0.5)); } In one implementation, the inverse LUT can be constructed as follows: low = FLUT[0]; high = FLUT[tot_cw-1]; first = 0; last = tot_cw-1; for (i = 1; i < tot_cw; Í++) if (FLUT[0] < FLUT[¡]) { first = i -1; interruption; } for (i = tot_cw - 2; i >= 0; i—) if (FLUT[tot_cw - 1] > FLUT[¡]) { last = i +1; > cu K cr\ Cj c K c > or interruption; } for (i = 0; i < tot_cw; Í++) { -14s¡ (i <= low) { ILUT[¡] = first; } also if (i >= high) { ILUT[¡] = last; } besides { for (j = 0; j < tot_cw - 1; j++) if (FLUT[j]>=¡) { ILUT[i]=j; interruption; }} } In terms of syntax, the syntax proposed in previous applications, such as the piecewise polynomial mode parametric model in references [5] and [6], can be reused. Table 2 shows an example of this type for N = 32 for equation (4). Table 2: Reconfiguration syntax using a first parametric model Ο / Π7Ι n / C7n7 / R / YI reshaping_model() { reshaper_model_profile_type reshaper_model_scalejdx reshaper_model_min_binjdx Descriptor ue(v) u(2) u(5) reshaper_model_max_bin_idx u(5) for ( i = reshaper_model_min_binjdx; i <= reshaper_model_max_bin_idx; Í++) { reshaper_model_bin_profile_delta [ i ] u(1)}} where, -15reshaper_model_profile_type specifies the type of profile to use in the reconfigurator build process. A given profile can provide information about the default values ​​being used, such as the number of bins, the importance of the default bins, or the priority values ​​and default keyword assignments (for example, May / or U values). `reshaper_model_scale_idx` specifies the index value of a scale factor (denoted as `ScaleFactor`) to use in the reconfigurator building process. The ScaleFactor value allows for better control of the reconfiguration function for improved overall coding efficiency. `reshaper_model_min_bin_idx` specifies the minimum bin index to use in the reconfigurator build process. The value of `reshaper_model_min_bin_idx` must be in the range of 0 to 31, inclusive. `reshaper_model_max_bin_idx` specifies the maximum bin index to use in the reconfigurator build process. The value of `reshaper_model_max_binjdx` must be in the range of 0 to 31, inclusive. `reshaper_model_bin_profile_delta[i]` specifies the delta value to use for adjusting the profile of the / -th bin being built by the reconfigurator. The value of `reshaper_model_bin_profile_delta[i]` must be in the range of 0 to 1, inclusive. Table 3 illustrates another form of realization with a more efficient alternative syntax representation. Table 3: Reconfiguration syntax using a second parametric model Ο / Π7 I n / C7n7 / R / VI reshaping_model() { reshaper_model_profile_type reshaper_model_scale_idx Descriptor ue(v) u(2) reshaper_model_min_bin_idx ue(v) reshaper_model_delta_max_bin_idx ue(v) reshaper_model_num_cw_minus1 for (i = 0; i < reshaper_model_num_cw_minus1 +1; i++) { u(1) reshaper_model_delta_abs_CW [ i ] u(5) if (reshaper_model_delta_abs_CW > 0 ) reshaper_model_delta_sign_CW [ i ] u(1)} for (i = reshaper_model_min_binjdx; i <= reshaper_model_max_bin_idx; ¡~){ reshaper_model_bin_profile_delta [i] u(v)}} where, -16reshaper_model_delta_max_bin_idx is set equal to the maximum allowed bin index (e.g., 31) minus the maximum bin index to use in the reconfigurator build process. `reshaper model num cw minusl plus 1` specifies the number of keywords to signal. `reshaper_model_delta_abs_CW[i]` specifies the / -th value of the absolute delta keyword. `reshaper_model_delta_sign_CW[i]` specifies the sign for the / -th delta keyword. Then: reshaper_model_delta_CW [ i ] = (1-2* reshaper_model_delta_sign_CW [ i ]) * reshaper_model_delta_abs_CW [i]; reshaper_model_CW[i] = 32 + reshaper_model_delta_CW[i]. `reshaper_model_bin_profile_delta[i]` specifies the delta value used to adjust the profile of the / -th bin in the reconfigurator build process. The value of `reshaper_model_bin_profile_delta[i]` must be in the range of 0 to 1 when `reshaper_model_num_cw_minus1` is equal to 0. The value of `reshaper_model_bin_profile_delta[i]` must be in the range of 0 to 2 when `reshaper_model_num_cw_minus1` is equal to 1. CW=32 when reshaper_model_bin_profile_delta[i] is set equal to 0, CW= reshaper_model_CW[0] when reshaper_model_bin_profile_delta[i] is set equal to 1; CW= reshaper_model_CW[1] when reshaper_model_bin_profile_delta[i] is set equal to 2. In one embodiment, reshaper_model_num_cw_minus1 is allowed to be larger than 1, leaving reshaper_model_num_cw_minus1 and reshaper_model_bin_profile_delta[i] to signal with ue(v) for more efficient encoding. In another embodiment, as described in Table 4, the number of keywords per bin can be explicitly defined. o / n7i n / C7nz / R / vi Table 4: Reconfiguration syntax using a third model slice_reshaper_model () { Descriptor reshaper_model_number_bins_minus1 ue(v) reshaper_model_min_bin_idx ue(v) reshaper_model_delta_max_bin_idx ue(v) reshaper_model_bin_delta_abs_cw_prec_minus1 ue(v) for ( i = reshaper_model_min_binjdx; i <= reshaper_model_max_bin_idx; -17reshaper_model_number_bins_minus1 plus 1 specifies the number of bins used for the luma component. In some implementations, it may be more efficient for the number of bins to be a power of two. Then, the total number of bins can be represented using its Iog2 representation, for example, by using an alternative parameter such as Iog2_reshaper_model_number_bins_minus1. For example, for 32 bins Iog2_reshaper_model_number_bins_minus1 = 4. reshaper_model_bin_delta_abs_cw_prec_minus1 plus 1 specifies the number of bits used for the representation of the reshaper_model_bin_delta_abs_CW[ i ] syntax. reshaper_model_bin_delta_abs_CW[ i ] specifies the value of the absolute delta keyword for the i-th bin. reshaper_model_bin_delta_sign_CW_flag[ i ] specifies the sign of reshaper_model_bin_delta_abs_CW[ i ] as follows: If reshaper_model_bin_delta_sign_CW_flag[ i ] is equal to 0, the corresponding variable RspDeltaCW[ i ] has a positive value. Otherwise (reshaper_model_bin_delta_sign_CW_flag[i] is not equal to 0), the corresponding variable RspDeltaCW[i] has a negative value. When reshaper_model_bin_delta_sign_CW_flag[ i ] is not present, it is inferred to be equal to 0. The variable RspDeltaCW[ i ] = (1 - 2*reshaper_model_bin_delta_s¡gn_CW[ i ]) * reshaper_model_bin_delta_abs_CW [ i ]; The OrgCW variable is set equal to (1 « B¡tDepthY) / (reshaper_model_number_bins_minus1 +1); The variable RspCW[ i ] is derived as follows: if reshaper_model_min_binjdx <= i <= reshaper_model_max_bin_idx then RspCW[ i ] = OrgCW + RspDeltaCW[ i ]. Furthermore, RspCW[ i ] = 0. In one embodiment, assuming the assignment of keywords according to one of the above examples, e.g., equation (4), an example of how to define the parameters of Table 2 comprises: First, it is assumed that one assigns “bin importance” as follows: For the / r-th bin, if Mk= 0; binjmportance = 0; Furthermore if Λ4 = = Mfbinjmportance = 2; (9) furthermore binjmportance = 1; end o / n7i n / C7nz / R / vi -18As used herein, the term “bin importance” is a value assigned to each of the N keyword bins to indicate the importance of all keywords in this bin in the reconfiguration process with respect to other bins. In one implementation, the default_bin_importance from reshaper_model_min_bin_idx to reshaper_model_max_binjdx can be set to 1. The value of reshaper_model_min_bin_idx is adjusted to the smallest bin index that has H not equal to 0. The value of reshaper_model_max_binjdx is adjusted to the largest bin index that has M not equal to 0. The reshaper_model_bin_profile_delta for each bin within [reshaper_model_min_binjdx reshaper_model_max_bin_idx] is the difference between binjmportance and default_binjmportance. An example of how to use the proposed parametric model to construct a forward reconfiguration LUT (FLUT) and a reverse reconfiguration LUT (ILUT) is shown below. 1) Divide the luminance range into N bins (for example, N=32) 2) Derive the bin importance index for each bin in the syntax. For example: For the kth bin, if reshaper_model_m¡n_binjdx <=k<=reshaper_model_max_binjdx bin_importance[k] = default_binjmportance[k] + reshaper_model_b¡n_prof¡le_delta[k]; also binjmportancejk] = 0; 3) Automatically pre-assign keywords based on the importance of the bin: for the k-th bin, if bin_importance[k] == 0 M = 0; also if bin_importance[k] == 2 Λ4 = Mf; besides LL — Ma , fin 4) Construct the forward reconfiguration LUT based on keyword allocation for each bin, by accumulating the keyword allocated to each bin. The sum must be less than or equal to the total keyword budget (e.g., 1024 for a full 10-bit range). (See the C code above for an example.) 5) Create a reverse reconfiguration LUT (for example, see the C code above). From a syntactic point of view, alternative methods can also be applied. The key is to specify the number of keywords in each bin (e.g., Mk, for k = 0, 1, 2, ..., N-1), either explicitly or implicitly. In one embodiment, the number of keywords in each bin can be specified explicitly. In another embodiment, the keywords can be specified differentially. For example, the number of keywords in Ο / Π7 I n / C7n7 / R / YI -19a bin can be determined using the difference between the number of keywords in the current bin and the previous bin (e.g., M_Delta(k) = M(k) — M( / c—1)). In another embodiment, the most commonly used number of keywords (e.g., Mm) can be specified, and the number of keywords in each bin can be expressed as the difference between the number of keywords in each bin and this number (e.g., M_Delta(k) = M(k)- Mm). In one embodiment, two reconfiguration methods are supported. One is designated as the default reconfigurator, which is assigned to all bins. The second, designated as the adaptive reconfigurator, applies the adaptive reconfigurator described above. The two methods can be signaled to a decoder as in Ref. [6] using a special flag, for example, sps_reshaper_adaptive_flag (e.g., use sps_reshaper_adaptive_flag = 0 for the default reconfigurator and use sps_reshaper_adaptive_flag = 1) for the adaptive reconfigurator. The invention is applicable to any reconfiguration architecture proposed in Ref. [6], such as an external reconfigurator, an intra-loop-only reconfigurator, a residue-loop reconfigurator, or a hybrid-loop reconfigurator. As an example, Figures 2A and 2B depict exemplary architectures for hybrid loop reconfiguration according to embodiments of this invention. In Figure 2A, the architecture combines elements of an intra-loop-only reconfiguration architecture (top of the Figure) and a residue-loop architecture (bottom of the Figure). Under this architecture, for intra-slices, the reconfiguration is applied to the image pixels, while for inter-slices, the reconfiguration is applied to the prediction residue samples.In the encoder (200_E), two new blocks are added to a traditional block-based encoder (e.g., HEVC): a block (205) for estimating the forward reconfiguration function (e.g., according to FIG. 4), the forward reconfiguration block (210-1), and the forward residue reconfiguration block (210-2), which applies the forward reconfiguration to one or more of the color components of the input video (117) or the prediction residue samples. In some embodiments, these two operations can be performed as part of a single image reconfiguration block. The parameters (207) related to determining the reverse reconfiguration function in the decoder can be passed to the lossless encoder block of the video encoder (e.g., CABAC 220) so that they can be integrated into the encoded bitstream (122).In intra mode, intra-prediction (225-1), transformation and quantization (T&Q), and inverse transformation and inverse quantization (Q~1&T~1) use reconfigured images. In both modes, the images stored in the DPB (215) are always in inverse reconfiguration mode, which requires either an inverse image reconfiguration block (e.g., 265-1) or an inverse residual reconfiguration block (e.g., 265-2) before the loop filter (270-1, 270-2). As illustrated in FIG. 2A, an Intra / Inter cut switch allows switching between the two architectures depending on the type of slice to be encoded. In another embodiment, loop filtering for Intra slices can be performed before inverse reconfiguration. In the decoder (200_D), the following new normative blocks are added to a traditional block-based decoder: a block (250) (reconfigurer decoder) for reconstructing a forward reconfiguration function and a reverse reconfiguration function based on the parameters of the reconfiguration function ο / Π71 n / C7nz / R / vi -20 decoded (207), a block (265-1) to apply the reverse reconfiguration function to the decoded data, and a block (265-2) to apply the forward reconfiguration function and the reverse reconfiguration function to generate the decoded video signal (162). For example, in (265-2) The reconstructed value is given by Rec = ILUT(FLUT(Pred)+Res), where FLUT indicates the forward reconfiguration LUT and ILUT indicates the reverse reconfiguration LUT. In some embodiments, the operations related to blocks 250 and 265 can be combined into a single processing block. As shown in FIG. 2B, an Intra / Inter cut switch allows switching between the two modes according to the types of cuts in the encoded video images. Figure 3A illustrates an example process (300_E) for encoding video using a reconfiguration architecture (e.g., 200_E) according to one embodiment of this invention. If reconfiguration is not enabled (path 305), then the encoding (335) proceeds as known in prior art encoders (e.g., HEVC). If reconfiguration is enabled (path 310), then an encoder may have the option of applying a default (predefined) reconfiguration function (315), or adaptively determining a new reconfiguration function (325) based on an image analysis (320) (e.g., as described in Figure 4). After encoding an image using a reconfiguration architecture (330), the remainder of the encoding follows the same steps as the traditional encoding channel (335).If adaptive reconfiguration (312) is used, the metadata related to the reconfiguration function is generated as part of the Encode reconfigurator stage (327). FIG. 3B illustrates an example of a process (300_D) for decoding video using a reconfiguration architecture (e.g., 200_D) according to one embodiment of this invention. If reconfiguration is not enabled (path 340), then after decoding an image (350), output frames (390) are generated as in the traditional encoding channel. If reconfiguration is enabled (path 360), then the decoder determines whether to apply a default (predefined) reconfiguration function (375) or adaptively determine a new reconfiguration function (380) based on the received parameters (e.g., 207). After decoding using a reconfiguration architecture (385), the remainder of the decoding follows the traditional encoding channel. As described in ref. [6] and earlier in this specification, the forward reconfiguration LUT (FwdLUT) can be constructed by integration, while the reverse reconfiguration LUT can be constructed by a backward mapping using the forward reconfiguration LUT (FwdLUT). In one embodiment, the forward LUT can be constructed using piecewise linear interpolation. In the decoder, the reverse reconfiguration can be performed using the backward LUT directly or again by linear interpolation. The piecewise linear LUT is constructed based on the input pivot points and the output pivot points. Let (X1, Y1) and (X2, Y2) be two input pivot points and their corresponding output values ​​for each bin. Any input value X between X1 and X2 can be interpolated using the following equation: Y = ((Y2-Y1 ) / (X2-X1)) * (X-X1) + Y1. In a fixed-point implementation, the above equation can be rewritten as o / n7i n / C7nz / R / vi -21 Y = ((m * X + 2FP-PREC-1) » FP_PREC) + c where myc indicate the scalar and displacement for linear interpolation and FP_PREC is a constant related to the precision of the fixed point. As an example, FwdLUT can be constructed as follows: Allow variable lutSize = (1 « BitDepthy). Allow variables binNum = reshaper_model_number_bins_minus1 + 1, and binLen = lutSize / binNum. For the i-th bin, the two encompassed pivots (for example, X1 and X2) can be derived as X1 = PbinLen and X2 = (+1) fbinLen. Then: binsLUTj 0 ] = 0; for( i = 0; i < reshaper_model_number_bins_minus1 +1; i++) { binsLUTj (i +1) * binLen] = binsLUTji *b¡ nLen] + RspCWj i ]; Y1 = b¡nsLUT[¡*b¡nLen]; Y2 = b¡nsLUT[(¡ + 1)*b¡nLen]; scale = ((Y2 - Y1) * (1 « FP_PREC) + (1 « (log2(binLen)-1)))» (log2(binLen)); for (j = 1; j < binLen; j++) { binsLUT[i*binLen +j] = Y1 + ((scale * j + (1 « (FP_PREC - 1))) » FP_PREC); }} The FP_PREC defines the fixed-point precision of the fractional part of the variables (for example, FP_PREC = 14). In one implementation, binsLUT Q can be calculated with greater precision than the FwdLUT. For example, the values ​​of binsLUT[] can be calculated as 32-bit integers, but FwdLUT can be the binsLUT values ​​trimmed to 16 bits. Derivation of the adaptive threshold As described above, during reconfiguration, keyword allocation can be adjusted using one or more thresholds (e.g., TH, THu, THL, and the like). In one embodiment, such thresholds can be generated adaptively based on content characteristics. Figure 5 illustrates an example of a process for deriving such thresholds according to one embodiment. 1) In step 505, the luminance range of an input image is divided into N bins (e.g., N=32). For example, allow N to also be indicated as PIC_ANALYZE_CW_BINS. 2) In step 510, an image analysis is performed to calculate the luminance characteristics for each bin. For example, the percentage of pixels in each bin (denoted as BinHistjb], b = 1, 2, ..., N) can be calculated, where Ο / Π7 I n / C7n7 / R / YI -22BinHist[b] = 100* (total pixels in bin ¿>) / (total pixels in the image), (10) As mentioned earlier, another good metric of image characteristics is the average variance (or standard deviation) of the pixels in each bin, denoted as BinVar[b]. BinVar[b] can be computed in block mode as varbin(k) in the steps described in the section leading to equations (2) and (3). Alternatively, the block-based computation can be reinforced with pixel-based computations. For example, denoted as vf(i) the variance associated with a group of pixels surrounding the i-th pixel in a neighborhood window of m x m (e.g., m = 5) with the i-th pixel at its center. For example, if μω = Σ£χ(Λ).(11) denotes the average value of pixels in a window WN = m * m (e.g., m = 5) surrounding the i-th pixel with value x(Λ), then vf(Λ) = (12) An optional nonlinear mapping, such as vf(j) = log10(vf( / )+1), can be used to suppress the dynamic range of the raw variance values. The variance factor can then be used to calculate the average variance in each bin as BinVar[b] = ^Z*>m(13) nb where Kb indicates the number of pixels in bin b. 3) In step 515, the average variances (and their corresponding indices) are sorted, for example, and without limitation, in descending order. For example, the sorted BinVar values ​​can be stored in BinVarSortDsd[b] and the sorted bin indices can be stored in BinIdxSortDsd[b]. As an example, using C code, the process can be described as: for (int b = 0; b < PIC_ANALYZE_CW_BINS; b++ / / initialize (unsorted) { BinVarSortDsdjb] = BinVar[b]; BinldxSortDsdjb] = b; } / / sorting (see key example in Appendix 1) bubbleSortDsd(BinVarSortDsd, BinldxSortDsd, PIC_ANALYZE_CW_BINS); An example of a bin average variance factor plot is illustrated in FIG. 6A. 4) Given the bin histogram values ​​calculated in step 510, in step 520, a cumulative density function (CDF) is calculated and stored according to the order of the sorted average bin variances. For example, if the CDF is stored in the matrix BinVarSortDsdCDF[b], in one implementation: BinVarSortDsdCDF[0] = BinHist[BinldxSortDsd[0]]; for (int b = 1; b < PIC_ANALYZE_CW_BINS; b++) Ο7Π7 I n / C7n7 / R / YI -23{ BinVarSortDsdCDF[b] = BinVarSortDsdCDF[b -1] + BinHist[BinldxSortDsd[b]]; } An example of a calculated CDF graph (605), based on the data in FIG. 6A, is illustrated in FIG. 6B. Pairs of CDF values ​​versus sorted average bin variances: {x = BinVarSortDsd[b], y = BinVarSortDsdCDFjb]}, can be interpreted as: “there are y% pixels in the image that have a variance greater than or equal to x” or “there are (100- / )% pixels in the image that have a variance less than x.” 5) Finally, in stage 525, given the CDF BinVarSortDsdCDFjBinVarSortDsd[b]] as a function of the average bin variance values, thresholds can be defined based on bin variances and cumulative percentages. Examples for determining a single threshold or two thresholds are shown in Figures 6C and 6D, respectively. When only one threshold is used (e.g., TH), TH can be defined as the average variance where k% of the pixels have vf > TH. TH can then be calculated by finding the intersection of the CDF plot (605) at k% (e.g., 610) (e.g., the BinVarSortDsd[b] value where BinVarSortDsdCDF = k%). For example, as shown in Figure 6C, for k = 50, TH = 2.5. One can then assign keywords U to the bins that have BinVar[b] > TH. As a general rule, it is preferable to assign a larger number of keywords to bins with lower variance (e.g., U > 32 > Ma, for the 10-bit video signal with 32 bins). When two thresholds are used, Figure 6D shows an example of selecting THL and THu. For example, without loss of generality, THL can be defined as the variance where 80% of pixels have vf > THL (so, in this example, THL = 2.3), and THu can be defined as the variance where 10% of all pixels have vf > THU (so, in this example, THu = 3.5). Given these thresholds, keywords U can be assigned to bins that have BinVar[b] < THL and keywords Ma to bins that have BinVar[b] > THu. For bins that have BinVar between THL and THu, the original number of keywords per bin can be used (e.g., 32 for 8=10). The techniques described above can be easily extended to cases with more than two thresholds. The relationship can also be used to adjust the number of keywords (U, A4a, etc.). As a general rule, in low-variance bins, more keywords should be allocated to boost PSNR (and reduce MSE); for high-variance bins, fewer keywords should be allocated to save bits. In one implementation, if the set of parameters (e.g., THl, THu, Ma, LL, and the like) were manually obtained for specific content, for example, through exhaustive manual parameter tuning, this automated method can be applied to design a decision tree for classifying each piece of content in order to automatically establish the optimal manual parameters. For example, content categories include: film, television, SDR, HDR, cartoons, nature, action, and the like. To reduce complexity, loop reconfiguration can be restricted using a variety of schemes. If loop reconfiguration is adopted in a video coding standard, then these restrictions must be implemented. -24 regulations to ensure decoder simplifications. For example, in one embodiment, luma reconfiguration can be disabled for certain block encoding sizes. For example, the intra and inter reconfigurator modes can be disabled in an inter cut when nTbW * nTbH <TH, donde la variable nTbW especifica el ancho del bloque de transformación y la variable nTbH especifica la altura del bloque de transformación. Por ejemplo, para TH = 64, los bloques con tamaños 4x4, 4x8 y 8x4 están deshabilitados para la reconfiguración de modo intra e ínter en cortes ínter-codificados (o mosaicos). Similarly, in another embodiment, luma-based chroma residue scaling can be disabled in intra-mode on intercoded slices (or mosaics), or enabled when separate luma and chroma partition trees are available. Interaction with other coding tools Loop filtering In ref. [6], it was described that a loop filter can operate in the original pixel domain or in the reconfigured pixel domain. In one embodiment, it is suggested that the loop filtering be performed in the original pixel domain (after image reconfiguration). For example, in a hybrid loop reconfiguration architecture (200_E and 200_D), for the intraimage, an inverse reconfiguration (265-1) should be applied before the loop filter (270-1). Figures 2C and 2D represent alternative decoder architectures (200BJ3 and 200CJD) where inverse reconfiguration (265) is performed after loop filtering (270), just before storing the decoded data in the decoded image buffer (DPB) (260). In the proposed embodiments, compared to the architecture in 200_D, the inverse residue reconfiguration formula for inter-cuts is modified, and inverse reconfiguration (e.g., via an InvLUT() function or lookup table) is performed after loop filtering (270). In this way, inverse reconfiguration is performed for both intra- and inter-cuts after loop filtering, and the pixels reconstructed before loop filtering for both intra-coded and inter-coded CUs are in the reconfigured domain.After the reverse reconfiguration (265), the output samples stored in the reference DPB are all in the original domain. This architecture allows for both cut-based and CTU-based adaptation for loop reconfiguration. As illustrated in FIG. 2C and FIG. 2D, in one embodiment, the loop filtering (270) is performed in the reconfigured domain for both intra-coded and inter-coded CUs, and the inverse image reconfiguration (265) occurs only once, thus presenting a unified and simpler architecture for intra- and inter-coded CUs. For the decoding of the intracoded CUs (200B_D), the intra-prediction (225) is performed on reconfigured neighboring pixels. Given Res residual and a predicted sample PredSample, the reconstructed sample (227) is derived as: RecSample = Res + PredSample. (14) Given the reconstructed samples (227), loop filtering (270) and inverse image reconfiguration (265) are applied to obtain RecSamplernDPB samples to be stored in DPB (260), where o / n71 n / C7nz / R / vi -25RecSampelnDPB = lnvLUT(LPF(RecSample))) = = lnvLUT(LPF(Res + PredSample))), (15) Where lnvLUT() indicates the reverse reconfiguration function or reverse reconfiguration lookup table, and LPF() indicates the loop filtering operations. In traditional coding, inter / intra-mode decisions are based on calculating a distortion function (c / funcQ) between the original samples and the predicted samples. Examples of such functions include sum of squared errors (SSE), sum of absolute differences (SAD), and others. When reconfiguration is used, on the encoder side (not shown), CU prediction and mode decision are performed in the reconfigured domain. That is, for mode decision, distortion = dfunc(FwdLUT(SrcSample)-RecSample), (16) where FwdLUTQ denotes the forward reconfiguration function (or LUT) and SrcSample denotes the original image samples. For the intercoded CU, on the decoder side (e.g., 200C_D), interprediction is performed using reference images in the unreconfigured domain in the DPB. Then, in reconstruction block 275, the reconstructed pixels (267) are derived as: RecSample = (Res + FwdLUT(PredSample)). (17) Given the reconstructed samples (267), loop filtering (270) and an inverse image reconfiguration (265) are applied to derive RecSamplernDPB samples for storage in DPB, where RecSampelnDPB = lnvLUT(LPF(RecSample))) = lnvLUT(LPF( Res + FwdLUT(PredSample)))). (18) On the encoder side (not shown), intra-prediction is performed in the reconfigured domain as Res = FwdLUT(SrcSample) - PredSample, (19a) under the assumption that all neighboring samples (PredSample) used for prediction are already in the reconfigured domain. Interprediction (e.g., using motion compensation) is performed in the non-reconfigured domain (i.e., using DPB reference images directly), i.e., PredSample = MC(RecSampleinDPB'), (19b) where MCQ indicates the motion compensation function. For motion estimation and fast-mode decision where no residue is generated, distortion can be calculated using distortion = dfunc(SrcSample-PredSample). However, for the full mode decision where residues are generated, the mode decision is made in the reconfigured domain. That is, for the full mode decision, distortion = dfunc(FwdLUT(SrcSample)-RecSample). (20) Block level adaptation As explained earlier, the reconfigurator in the proposed loop allows the reconfigurator to adapt to the CU level, for example, to activate or deactivate the CU_reshaper variable as needed. Under the same Ο / Π7 I n / C7n7 / R / YI -26architecture, for an intercoded CU, when CU_reshaper = disabled, the rebuilt pixels must be in the reconfigured domain, even if the CU_reshaper flag is disabled for this intercoded CU. RecSample = FwdLUTIRes + PredSample), (21) so that the intra-prediction always has neighboring pixels in the reconfigured domain. The DPB pixels can be derived as: RecSampelnDPB = lnvLUT(LPF(RecSample))) = =lnvLUT(LPF(FwdLUT(Res+PredSample))) (22) For an intracoded CU, according to the coding process, two alternative methods are proposed: 1) All intracoded CUs are encoded with CU_reshaper = on. In this case, no additional processing is needed because all pixels are already in the reconfigured domain. 2) Some intra-encoded CUs can be encoded using CU_reshaper = off. In this case, for CU_reshaper = off, when the intra-prediction is applied, it is necessary to apply the inverse reconfiguration to neighboring pixels so that the intra-prediction is performed in the original domain and the final reconstructed pixels must be in the reconfigured domain, i.e. RecSample = FwdLUT(Res + lnvLUT(PredSample)), (23) then RecSampelnDPB = lnvLUT(LPF(RecSample))) = =lnvLUT(LPF(FwdLUT(Res + InvLUT (PredSample))))). (24) In general, the proposed architectures can be used in a variety of combinations, such as intra-loop reconfiguration only, in-loop reconfiguration only for prediction residues, or a hybrid architecture that combines both intra-loop and inter-residual reconfiguration. For example, to reduce latency in the hardware decoding channel for inter-cut decoding, intra-prediction (i.e., decoding intra-cut CUs in an inter-cut) can be performed before the reverse reconfiguration. An example architecture (200D_D) of such an implementation is shown in FIG. 2E. In the reconstruction module (285), for inter-cut CUs (i.e., the Mux enables the output of 280 and 282), from equation (17), RecSample = (Res + FwdLUT(PredSample)). where FwdLUT(PredSample) indicates the output of the Inter predictor (280) followed by the forward reconfiguration (282). Conversely, for Intra CUs (e.g., the Mux enables the output of 284), the output of the reconstruction module (285) is RecSample = (Res + PredSample), where IPredSample indicates the output of the Intra Prediction block (284). The reverse reconfiguration block (265-3) generates yC[ / = lnvLUT[RecSample]. o / ηζι n / cznz / e / Yi -27The application of intra-prediction for inter-cuts in the reconfigured domain is also applicable to other embodiments, including those represented in FIG. 2C (where reverse reconfiguration is performed after loop filtering) and FIG. 2D. In all these embodiments, special care must be taken in the combined inter / intra-prediction mode (i.e., when during reconstruction, some samples come from intercoded blocks and some from intracoded blocks), since inter-prediction is in the original domain, but intra-prediction is in the reconfigured domain. When data from both inter- and intra-predicted coded units are combined, prediction can be performed in either domain. For example, when the combined inter / intra-prediction mode is performed in the reconfigured domain, then PredSampleCombined = PredSampelntra + FwdLUT(PredSampelntef) RecSample = Res + PredSampleCombined, That is, the intercoded samples in the original domain are reconfigured before the addition. Furthermore, when the combined inter / intra prediction mode is performed in the original domain, then_ PredSampleCombined = InvLJT(PredSampelntra) + PredSampelnter RecSample = Res + FwdLUTiPredSampleCombined), That is, the intra-predicted samples are reverse-configured to be in the original domain. Similar considerations also apply to the corresponding encoding embodiments, since the encoders (e.g., 200_E) include a decoder loop that matches the corresponding decoder. As discussed earlier, equation (20) describes one embodiment where the mode decision is made in the reconfigured domain. In another embodiment, the mode decision can be made in the original domain, i.e. distortion = dfunc(SrcSample-lnvLUT(RecSample)). For luma-based chroma QP shift or chroma residue scaling, the average CU luma value (Ycu) can always be calculated using the predicted value (instead of the reconstructed value) for the minimum latency. QP derivations of chroma As in ref. [6], the same proposed chromaDQP derivation process can be applied to balance the luma-chroma relationship caused by the reconfiguration curve. In one embodiment, a piecewise chromaDQP value can be derived based on keyword assignments for each bin. For example: for the / r-th bin, scafek = (WMa); (25) chromaDQP = 6*log2(scatek); end Encoder optimization Ο / Π7 I n / C7n7 / R / YI -28As described in Ref. [6], it is recommended to use pixel-based weighted distortion when lumaDQP is enabled. When using reconfiguration, in one example, the required weighting is adjusted based on the reconfiguration function (f(x)). For example: Wrsp= f'(x)2, (26) where f'(x) indicates the slope of the reconfiguration function f(x). In another implementation, weights for each part can be derived directly based on the keyword assignment for each bin. For example: for the kth bin, Wrsp(k) = φ2. (27)Ma For a chroma component, the weighting can be set to 1 or some scaling factor sf. To reduce chroma distortion, sf can be set greater than 1. To increase chroma distortion, sf can be set greater than 1. In one embodiment, sf can be used to offset equation (25). Since chromaDQP can only be set as an integer, sf can be used to accommodate the decimal part of chromaDQP: therefore, 2Í (chromaDQP-INT(chromaDQP)) / 3) In another embodiment, the chromaQPOffset value can be explicitly set in the Picture Parameter Set (PPS) or a cut header to control chroma distortion. The remapping curve or mapping function does not need to be fixed for the entire video sequence. For example, it can be adapted based on the quantization parameter (QP) or the target bit rate. In one implementation, a more aggressive remapping curve can be used when the bit rate is low, and a less aggressive one when the bit rate is relatively high. For example, given 32 bins in 10-bit sequences, each bin initially has 32 keywords. When the bit rate is relatively low, keywords e [28 40] can be used to choose keywords for each bin. When the bit rate is high, keywords o can be chosen from [31 33] for each bin, or an identity remapping curve can simply be used. Given a slice (or mosaic), reconfiguration at the slice (mosaic) level can be performed in a variety of ways that may trade encoding efficiency for complexity, including: 1) disabling reconfiguration only on intra-slices; 2) disabling reconfiguration on specific inter-slices, such as inter-slices at particular time levels, or inter-slices not used for reference images, or inter-slices considered less important reference images. Such slice adaptation can also depend on QP / bit rate, so different adaptation rules can be applied for different QP or bit rates. In an encoder, under the proposed algorithm, a variance is calculated for each bin (e.g., BinVar(b) in equation (13)). Based on this information, keywords can be assigned according to each bin variance. In one implementation, BinVar(b) can be mapped inversely linearly to the number of keywords in each bin b. In another implementation, nonlinear mappings such as BinVar(b)2, sqri(BinVar(b)), and ο / Π71 n / C7nz / R / vi can be used. -29 similar, to inversely map the number of keywords in bin b. In essence, this approach allows an encoder to apply arbitrary keywords to each bin, beyond the simpler mapping used previously, where the encoder assigned keywords in each bin using the two upper-rank values ​​Mf and Ma (e.g., see FIG. 6C), or the three upper-rank values, Mt, 32, or Ma (e.g., see FIG. 6D). As an example, FIG. 6E illustrates two keyword allocation schemes based on BinVariJJ values. Figure 610 illustrates keyword allocation using two thresholds, while Figure 620 illustrates keyword allocation using inverse linear mapping, where the keyword allocation for a bin is inversely proportional to its BinVariJJ value. For example, in one embodiment, the following code can be applied to derive the number of keywords (bin_cw) in a specific bin: alpha = (minCW - maxCW) / (maxVar - minVar); beta = (maxCWTnaxVar - m¡nCW*minVar) / (maxVar - minVar); bin_cw = round(alpha * bin_var + beta);, where minVar indicates the minimum variance across all bins, maxVar indicates the maximum variance across all bins, and minCW, maxCW indicates the minimum and maximum number of keywords per bin, as determined in the reconfiguration model. Luma-based Chroma QP compensation refinement In ref. [6], to compensate for the interaction between luma and chroma, an additional QP chromatic compensation (denoted as chromaDQP or cQPO) and a luma-based residual chroma scaler (cScale) were defined. For example: chromaQP = QPJuma + chromaQPOffset + cQPO, (28) where chromaQPOffset indicates a QP chroma offset, and QPJuma indicates the luma QP for the encoding unit. As presented in Ref. [6], in one embodiment cQPO = -6 * log2(FwdLUT'[Yjj]) = - dQP(Yjj, (29) where FwdLUT' indicates the slope (first-order derivative) of FwdLUTQ. For an inter cut, Y^J indicates the average predicted luma value of the CU. For an intra cut, Ycu indicates the inverse reconfigured value of the average predicted luma value of the CU. When dual-tree coding is used for a CU (i.e., the luma and chroma components have two separate coding trees, and thus luma reconstruction is available before chroma coding begins), the average reconstructed luma value of the CU can be used to obtain the cQPO value.The scaling factor cScale was defined as cScale = FwdLUT'JJJ] = pow(2, -cQPO / 6), (30) where y = pow(2, x) indicates the function y = 2Xfunction. Given the nonlinear relationship between luma-derived QP values ​​(denoted as qPi) and final chroma QP values ​​(denoted as QpC) (e.g., see Table 8-10, “Specification of QpC as a function of qPi for ChromaArrayType equal to 1 in Ref [4]), in one embodiment cQPO and cScale can be further adjusted as follows. ο / Π71 n / C7nz / R / vi -30A mapping between the adjusted luma and chroma QP values ​​is indicated as f_QP12QPcQ, for example, as in Table 8-10 of Ref. [4], then chromaQP_actual = f_QP12QPc[chromaQP\ = =f_QPI2QPc[QP_luma + chromaQPOffset + cQPO], (31) To scale the residual chroma, the scale must be calculated based on the actual difference between the actual chroma encoding QP, both before and after applying cQPO: QPcBase = f_QPi2QPc[QPJuma + chromaQPOffset]·, QPcFinal = f_QP¡2QPc[QPJuma + chromaQPOffset + cQPO]·, (32) cQPO_refine = QPcFinal- QpcBase', cScale = pow(2, - cQPO_refinel6). In another implementation, chromaQPOffset can also be absorbed in cScale. For example, QPcBase = f_QPi2QPc[QP_luma]; QPcFinal = f_QPÍ2QPc[QPJuma + chromaQPOffset + cQPO]; (33) cTotalQPO_refine = QPcFinal - QpcBase', cScale = pow(2, - cTotalQPOjefinelQ], As an example, as described in Ref. [6], in one embodiment: CSCALE_FP_PREC = 16 is allowed to indicate a precision parameter • Direct scaling: after generating the chroma residual, before transformation and quantization: - C_Res = C_orig - C_pred - C_Res_scaled = C_Res1cScale + (1 « (CSCALE_FP_PREC - 1))) » CSCALE_FP_PREC • Reverse scaling: after inverse chroma quantization and inverse transformation, but before reconstruction: - C_Res_inv = (C_Res_scaled « CSCALE_FP_PREC) / cScale - C_Reco = C_Pred + C_Res_inv; In an alternative embodiment, the operations for looped chroma reconfiguration can be expressed as follows. On the encoder side, for the residue (CxRes = CxOrg - CxPred) of the chroma component Cx (e.g., Cb or Cr) of each CU or TU, CxResScaled = CxRes * cSca / e[y^J],(34) where CxResScaled is the scaled Cb or Cr residue signal from the UC to be transformed and quantized. On the decoder side, CxResScaled is the scaled chroma residue signal after inverse quantization and transformation, and CxRes = CxResScale / cSc<2Ze[ycu].(35) The final reconstruction of the chroma component is CxRec = CxPred + CxRes.(36) ο / Π71 n / C7nz / R / vi -31 This approach allows the decoder to initiate inverse quantization and transformation operations for chroma decoding immediately after syntax analysis. The cScale value used for a CU can be shared by the Cb and Cr components, and from equations (29) and (30), it can be derived as: cQPO[Y^] = -6 * log2ffWdLUT\Y¿ü\) (37) ____, ____ -cOPO\Ycu\ cScale[Y^j] = FwdLUT'[Ycu] = 2 e where Ycues is the average predicted luma value of the current CU in the Inter cuts (where double-tree encoding is not used and therefore the reconstructed luma is not available), and Y^ is the average reconstructed luma value of the current CU in intra cuts (where double-tree encoding is used). In one embodiment, the scales are computed and stored using 16-bit fixed-point integers, and the scaling operations on both the encoder and decoder sides are implemented using fixed-point integer arithmetic. FwdLUT'[Ycu] indicates the first derivative of the forward reconfiguration function. Assuming a piecewise linear representation of the curve, then FwdLUT'(Y) = (CW[k] / 32) when Y belongs to the k-th bin.To reduce hardware latency, in another embodiment (see Figure 2E), Y^i can use the average predicted luma value of the current CU for intra and inter modes, regardless of the cutter type and whether dual trees are used. In another embodiment, Ycuse can derive using reconstructed CUs (such as those in the top row and / or left column of the current CU) for intra and / or inter mode. In yet another embodiment, an average or median luma value, or the cScale value, can be sent in the bitstream using explicit high-level syntax. The use of cScale is not limited to scaling chroma residues for in-loop reconfiguration. The same method can also be applied for out-of-loop reconfiguration. In an out-of-loop reconfiguration, cScale can be used to scale chroma samples. The operations are the same as in the in-loop approach. On the encoder side, when calculating RDOQ chroma, the lambda modifier for chroma adjustment (whether using QP compensation or chroma residue scaling) must also be calculated based on the refined compensation: Modifier = pow(2, - cQPO_refinel3)', Newjambda = OldJambdalModifier. (38) As noted in equation (35), the use of cScale may require division in the decoder. To simplify the decoder implementation, the same functionality can be implemented using division in the encoder and a simpler multiplication in the decoder. For example, cScalelnv = (VcScale), so, as an example, in an encoder cResScale = CxRes * cScale = CxRes / (1 / cScale) = CxRes / cScalelnv, and in the decoder CxRes = cResScale / cScale = CxRes * (1 / cScale) = CxRes * cScalelnv. Ο / Π7Ι n / C7n7 / R / VI -32 In one embodiment, each luma-dependent chroma scaling factor can be computed for a corresponding luma range in the piecewise linear (PWL) representation instead of for each luma keyword value. Therefore, the chroma scaling factors can be stored in a smaller LUT (e.g., with 16 or 32 entries), e.g., cScalelnv[binldx], instead of the 1024-entry LUT (for 10-bit luma keywords) (e.g., cScale[Y]). The scaling operations on both the encoder and decoder sides can be implemented using fixed-point integer arithmetic as follows: c' = signo(c) * ((abs(c) * s + 2CSCAEE-EP-PREC~') » CSCALE_FP_PREC), where c is the chroma residue, s is the scaling factor of the chroma residue of cScalelnv[binldx], binldx is decided by the corresponding average luma value, and CSCALE_FP_PREC is a constant value related to precision. In one embodiment, for a more efficient implementation related to chroma residual scaling, the following variations can be enabled: • Disable chroma residue scaling when using separate luma / chroma trees; • Disable chroma residue scaling for 2x2 chroma; and • Use the prediction signal rather than the reconstruction signal for both intra- and inter-coded units As an example, given the decoder represented in FIG. 2E (200D_D) for processing the luma component, FIG. 2F represents an example architecture (200D_DC) for processing the corresponding chroma samples. As shown in FIG. 2F, compared to Fig. 2E, the following changes are made when processing chroma: • The forward or reverse reconfiguration blocks (282 and 265-3) are not used; • There is a new chroma residue scaling block (288), which effectively replaces the reverse reconfiguration block for luma (265-3); and • The reconstruction block (285-C) is modified to handle color residues in the original domain, as written in equation (36): CxRec = CxPred + CxRes. From equation (34), on the decoder side, CxResScaled indicates the scaled chroma residue signal extracted after inverse quantization and transformation (before block 288), and CxRes = CxResScaled * CScale¡nv Indicates the rescaled chroma residue generated by the residual chroma scaling block (288) that the reconstruction unit (285—C) will use to calculate CxRec = CxPred + CxRes, where CxPred is generated by Intra (284) or Inter (280) prediction blocks. The CScaleInv value used for a transformation unit (TU) can be shared by the Cb and Cr components and can be calculated as follows: • If it is in intra mode, then the average of the intra-predicted luma values ​​is calculated; o / n71 n / C7nz / R / vi • If in inter-prediction mode, then the average of the inter-predicted luma values ​​is calculated. Forward reconfigured. That is, the average luma value avgY'TU is calculated in the reconfigured domain; and • If in combined fusion and intra-prediction, then the average of the combined predicted luma values ​​is calculated. For example, the combined predicted luma values ​​can be combined according to Appendix 2, section 8.4.6.6. • In one embodiment, a LUT can be applied to calculate CScaieInv based on avgY'TU. Alternatively, given a piecewise linear representation (PWL) of the reconfiguration function, the index idx can be found where the value avgY'TU belongs to an inverse mapping PWL. • Then, CScaleIllv= cScalelnv[ / dx] In Appendix 2 (for example, see Section 8.5.5.1.2), an example implementation can be found, as applied to the versatile video encoding codec (Ref. [8]), currently under development by ITU and ISO. Application of delta_qp In AVC and HEVC, the delta_qp parameter can modify the QP value for an encoding block. In one implementation, the luma curve in the reconfigurator can be used to derive the delta_qp value. A lumaDQP value can be derived piecewise based on the keyword assignment for each bin. For example: For the k-th bin, scatek = (Mk / Ma); (39) lumaDQPk = INT(6*log2(scatek)), where INT() can be CEIL(), ROUND(), or FLOOR(). The encoder can use a luma function, for example, average(luma), min(luma), max(luma), and the like, to find the luma value for that block, then use the corresponding lumaDQP value for that block. To gain the benefit of the distortion rate, from equation (27), weighted distortion can be used in decision and configuration mode, and set Wrsp(k) = scalel Reconfiguration and considerations for the number of bins In typical 10-bit video encoding, it is preferable to use at least 32 bins for reconfiguration mapping; however, to simplify the decoder implementation, in one embodiment, fewer bins can be used, for example, 16, or even 8 bins. Since an encoder may already be using 32 bins to parse the sequence and derive the keyword distribution, the original 32-bin keyword distribution can be reused, and the 16-bin keywords can be derived by adding the corresponding 16 bins within each 32-bin distribution; that is, for i = 0 to 15 CWIn16Bin¡] = CWIn32Bin[2¡] +CWIn32Bin[2¡+1]. o / n7i n / C7nz / R / vi -34 For the chroma residual scaling factor, you can simply divide the keyword by 2 and point to the chromaScalingFactorLUT 32-bins. For example, given CWIn32Bin

[32] ={ 0 0 33 38 38 38 38 38 38 38 38 38 38 38 38 38 38 33 33 33 33 33 33 33 33 33 33 33 33 33 0 0}. The corresponding 16-bin CW allocation is CWIn16B¡n

[16] ={ 0 71 76 76 76 76 76 76 71 66 66 66 66 66 66 0}. This approach can be extended to handle even fewer bins, namely 8, then for i = 0 to 7 CWIn8Bin[¡] = CWIn16Bin[2¡] +CWIn16Bin[2¡+1]. As an example, and without limitation, Appendix 2 provides an example of syntax structure and associated syntax elements to support reconfiguration in the ISO / ITU Video Versatile Code (WC) (Ref. [8]) according to an embodiment using the architectures depicted in FIG. 2C, FIG. 2E, and FIG. 2F, where the forward reconfiguration function comprises 16 segments. References Each of the references listed herein is incorporated by reference in its entirety. []]“Exploratory Test Model for HDR extension ofHEVC, K. Minooetal., MPEGoutputdocument, JCTVC-W0092 (m37732), 2016, San Diego, USA. [2] Patent application PCT / US2016 / 025082, In-Loop Block-Based Image Reshaping in High Dynamic Range Video Coding, filed March 30, 2016, also published as WO 2016 / 164235, by GM. Su. [3] US patent application 15 / 410,563, Content-AdaptiveReshapingforHigh Codeword representation Images, filed on Jan. 19, 2017, by T. Lu et al. [4] ITU-T H.265, “High efficiency video coding,” ITU, Dec. 2016. [5] Patent application PCT / US2016 / 042229, Signal Reshaping and Coding for HDR and Wide Color Gamut Signals, filed July 14, 2016, also published as WO 2017 / 011636, by P. Yin et al. [6] Patent application PCT / US2018 / 040287, Integrated Image Reshaping and Video Coding, filed on June 29, 2018, by T. Lu et al. [7] J. Froehlich et al., “Content-Adaptive Perceptual Quantizer for High Dynamic Range Images, US Patent Application Publication Ser. No. 2018 / 0041759, Feb. 08, 2018. [8] B. Bross, J. Chen, and S. Liu, “Versatile Video Coding (Draft 3),” JVET output document, JVET-L1001, v9, uploaded, January 8, 2019. Example of computer system implementation The embodiments of the present invention can be implemented with a computer system, systems configured in electronic circuits and components, an integrated circuit (IC) device such as a microcontroller, a field-programmable gate array (FPGA), or other configurable logic device or ο / Π71 n / C7nz / R / vi -35program (PLD), a discrete-time or digital signal processor (DSP), an application-specific integrated circuit (ASIC), and / or an apparatus that includes one or more of such systems, devices, or components. The computer and / or the IC may perform, control, or execute instructions related to signal reconfiguration and image encoding, such as those described herein. The computer and / or the IC may calculate any of a variety of parameters or values ​​related to the signal reconfiguration and encoding processes described herein. Image and video realization methods may be implemented in hardware, software, firmware, and various combinations thereof. Certain implementations of the invention comprise computer processors executing software instructions that cause the processors to perform a method of the invention. For example, one or more processors in a display, encoder, decoder, decoder-converter, or the like may implement methods relating to signal reconfiguration and image encoding as described above by executing software instructions in a program memory accessible to the processors. The invention may also be provided in the form of a program product. The program product may comprise any tangible, non-transient medium that carries a set of computer-readable signals comprising instructions that, when executed by a data processor, cause the data processor to execute a method of the invention.The program products according to the invention can be in any of a wide variety of non-transitory, tangible forms. The program product may comprise, for example, physical media such as magnetic data storage media including floppy disks and hard disk drives, optical data storage media including CD-ROMs and DVDs, and electronic data storage media including ROM, flash RAM, or the like. The computer-readable signals in the program product may optionally be compressed or encrypted. When reference is made to a prior component (e.g., a software module, processor, assembly, device, circuit, etc.), unless otherwise stated, the reference to that component (including a reference to a means) shall be construed as including as equivalents of that component any component that performs the function of the described component (e.g., that is functionally equivalent), including components that are not structurally equivalent to the described structure that performs the function in the illustrated embodiments of the invention. Equivalents, Extensions, Alternatives and Miscellaneous Thus, examples of embodiments relating to signal reconfiguration and efficient image encoding are described. In the preceding specification, the embodiments of the present invention have been described with reference to numerous specific details that may vary from implementation to implementation. Therefore, the sole and exclusive indicator of what the invention is, and what the applicants claim the invention to be, is the set of claims arising from this application, in the specific form in which those claims are stated, including any subsequent amendments. Any definitions expressly set forth herein for terms contained in those claims shall govern the meaning of such terms as used in the O / N7i n / C7nz / R / vi -36 claims. Therefore, no limitation, element, property, feature, advantage, or attribute not expressly mentioned in this claim shall limit the scope of this claim in any way. Accordingly, the description and drawings should be considered illustrative rather than restrictive. Examples of listed implementation forms The invention can be carried out in any of the forms described herein, which include, but are not limited to, the following enumerated embodiment examples (EEE) that describe the structure, characteristics, and functionality of some parts of the present invention. EEE 1. A method for the adaptive reconfiguration of a video sequence with a processor, the method comprising: accessing an input image with a processor in a first keyword representation; and generating a forward reconfiguration function that maps pixels from the input image to a second keyword representation, where the second keyword representation allows for more efficient compression than the first keyword representation, where the generation of the forward reconfiguration function comprises: divide the input image into multi-pixel regions; assign each of the pixel regions to one of the multiple keyword bins according to a first luminance feature of each pixel region; calculate a bin metric for each of the multiple keyword bins according to a second luminance feature of each of the pixel regions assigned to each keyword bin; assign a number of keywords in the second keyword representation to each keyword bin according to the bin metric of each keyword bin and a distortion rate optimization criterion; and generate the forward reconfiguration function in response to the assignment of keywords in the second keyword representation to each of the multiple keyword bins. EEE 2. The method of EEE 1, wherein the first luminance feature of a pixel region comprises the average pixel luminance value in the pixel region. EEE 3. The method of EEE 1, wherein the second luminance feature of a pixel region comprises the variance of pixel luminance values ​​in the pixel region. EEE 4. The method of EEE 3, wherein the calculation of a bin metric for a keyword bin comprises calculating the average of the variances of the luminance pixel values ​​for all pixel regions allocated to the keyword bin. EEE 5. The method of EEE 1, wherein the assignment of a number of keywords in the second keyword representation to a keyword bin according to its bin metric comprises: do not assign keywords to the keyword bin if pixel regions are not assigned to the keyword bin; Ο / Π7Ι n / C7n7 / R / YI -37 assign a first keyword number if the keyword bin metric is lower than an upper threshold value; and assign a second keyword number to the keyword bin otherwise. EEE 6. The method of EEE 5, wherein for a first keyword representation with a depth of B bits and a second keyword representation with a depth of Bobits and N bin of keywords, the first number of keywords comprises A4r = CEIL((2e° / (CW2-CW1))* Ma) and the second number of keywords comprises Ma= 2B / N, where CW1 < CW2 indicates two keywords in [0 2a—1 ]. EEE 7. The method of EEE 6, where CW1 = 16*2<^8) and CW2 = 235*2^). EEE 8. The EEE 5 method, where the determination of the upper threshold comprises: define a set of potential threshold values; for each threshold in the set of threshold values: generate a forward reconfiguration function based on the threshold; encode and decode a set of input test frames according to the reconfiguration function and a bit rate R to generate an output set of decoded test frames; and calculate an overall rate-distortion optimization (RDO) metric based on the input test frames and the decoded test frames; and select as the upper threshold the threshold value in the set of potential threshold values ​​for which the RDO metric is minimum. EEE 9. The EEE 8 method, where calculating the RDO metric involves calculating J= D+ÁR, where D indicates a distortion measure between pixel values ​​in the input test frames and the corresponding pixel values ​​in the decoded test frames, and λ indicates a Lagrangian multiplier. EEE 10. The EEE 9 method, where D is a measure of the sum of square differences between the corresponding pixel values ​​of the input test frames and the decoded test frames. EEE 11. The method of EEE 1, wherein the allocation of a number of keywords in the second keyword representation to a keyword bin according to its bin metric is based on a keyword allocation lookup table, wherein the keyword allocation lookup table defines two or more thresholds that divide a range of bin metric values ​​into segments and provides the number of keywords to allocate to a bin with a bin metric within each segment. EEE 12. The method of EEE 11, where given a default keyword allocation to a bin, bins with a large bins metric are allocated fewer keywords than the default keyword allocation and bins with a small bins metric are allocated more keywords than the default keyword allocation. EEE 13. The method of EEE 12, where for a first keyword representation with B bits and N bins, the predetermined keyword assignment per bin is given by Ma= 2B / N. Ο / Π7Ι n / C7n7 / R / VI -38EEE 14. The EEE 1 method, further comprising generating reconfiguration information in response to the forward reconfiguration function, wherein the reconfiguration information comprises one or more of: a flag indicating a minimum keyword bin index value to use in a reconfiguration rebuild process, a flag indicating a maximum keyword bin index value to use in a reconfiguration build process, a flag indicating a reconfiguration model profile type, where each model profile type is associated with default bin-related parameters, or one or more delta values ​​used to adjust the default bin-related parameters. EEE 15. The EEE 5 method, which further comprises assigning to each keyword bin a bin importance value, where the bin importance value is: If no keywords are assigned, they are assigned to the keyword bin; if the first keyword value is assigned to the keyword bin; and otherwise. EEE 16. The EEE 5 method, where the determination of the upper threshold comprises: divide the luminance range of pixel values ​​in the input image into bins; For each bin, determine a bin histogram value and an average bin variance value, where for a bin, the bin histogram value comprises the number of pixels in the bin relative to the total number of pixels in the image, and the average bin variance value provides a metric of the average pixel variance of the pixels in the bin; classify the average bin variance values ​​to generate a ranked list of average bin variance values ​​and a ranked list of average variance value index; calculate a cumulative density function as a function of the average bin variance values ​​ranked on the basis of the bin histogram value and the ranked list of the average variance value index; and determine the upper threshold based on a criterion satisfied by the cumulative density function values. EEE 17. The method of EEE 16, where the calculation of the cumulative density function comprises calculating: B¡nVarSortDsdCDF[0] = BinHlst[BlnldxSortDsd[0]]; for (int b = 1; b < PIC_ANALYZE_CW_BINS; b++) { BinVarSortDsdCDFjb] = BinVarSortDsdCDFjb - 1] + BinHist[BinldxSortDsd[b]]; }, o / n7i n / C7nz / R / vi -39where b indicates a bin number, PIC_ANALYZE_CW_BINS indicates the total number of bins, BinVarSortDsdCDF[b] indicates the output of the CDF function for b bin, BinHistji] indicates the histogram value of bin for bin / , and BinldxSortDsdQ indicates the ranked list of the average variance value index. EEE 18. The method of EEE 16, where under a criterion that for k % of the pixels in the input image the average bin variance is greater than or equal to the upper threshold, the upper threshold is determined as the average bin variance value for which the CDF output is k %. EEE 19. The EEE 18 method, where k = 50. EEE 20. In a decoder, a method for reconstructing a reconfiguration function, the method comprises: receiving in an encoded bitstream syntax elements characterizing a reconfiguration model, wherein the syntax elements include one or more of a flag indicating a minimum keyword bin index value to be used in a reconfiguration construction process, a flag indicating a maximum keyword bin index value to be used in a reconfiguration construction process, a flag indicating a reconfiguration model profile type, wherein the model profile type is associated with default bin-related parameters, including bin importance values, or a flag indicating one or more delta bin importance values ​​used to adjust the default bin importance values ​​defined in the reconfiguration model profile; Determine, based on the reconfiguration model profile, the default bin importance values ​​for each bin and a predetermined keyword number assignment list to assign to each bin according to the bin importance value; for each keyword bin: determine your bin importance value by adding your default bin importance value to your delta bin importance value; Determine the number of keywords to assign to the keyword bin based on the bin's importance value and the assignment list; and generate a forward reconfiguration function based on the number of keywords assigned to each keyword bin. EEE 21. The method of EEE 20, wherein the determination of A4 the number of keywords assigned to the k-th keyword bin, using the assignment list, further comprises: for the kth bin: if binjmportancejk] == 0 then M = 0; also if binjmportancejk] == 2 Ο7Π7 I n / C7n7 / R / YI -40then M = LA; besides Mk — Ma , where May LA are elements of the assignment list and binjmportancejk] indicates the importance value of the k-th bin. EEE 22. In a decoder comprising one or more processors, a method for reconstructing encoded data, the method comprising: receive an encoded bitstream (122) comprising one or more reconfigured images encoded in a first keyword representation and metadata (207) related to reconfiguration information for the reconfigured images encoded; generate (250) an inverse reconfiguration function based on metadata related to reconfiguration information, wherein the inverse reconfiguration function maps pixels of the reconfigured image from the first keyword representation to a second keyword representation; generate (250) a forward reconfiguration function based on metadata related to reconfiguration information, wherein the forward reconfiguration function maps pixels of an image from the second keyword representation to the first keyword representation; extracting from the encoded bitstream a reconfigured encoded image comprising one or more encoded units, where for one or more encoded units in the reconfigured encoded image: for an intracoded coding unit (CU) in the reconfigured coded image: generate first reconfigured reconstructed samples of the CU (227) based on the reconfigured residual samples in the CU and first reconfigured prediction samples; generate (270) a reconfigured loop filter output based on the first reconfigured reconstructed samples and loop filter parameters; apply (265) the reverse reconfiguration function to the reconfigured loop filter output to generate decoded samples of the encoding unit in the second keyword representation; and store the decoded samples of the encoding unit in the second keyword representation in a reference buffer; for an inter-coded encoding unit in the reconfigured encoded image: apply the forward reconfiguration function to prediction samples stored in the reference buffer in the second keyword representation to generate the second reconfigured prediction samples; generate the second reconfigured reconstructed samples of the encoding unit based on the reconfigured residual samples in the encoded Cu and the second reconfigured prediction samples; ο / Π71 n / C7nz / R / vi -41 generate a reconfigured loop filter output based on the reconfigured second reconstructed samples and loop filter parameters; apply the reverse reconfiguration function to the reconfigured loop filter output to generate samples of the encoding unit in the second keyword representation; and store the samples of the encoding unit in the second keyword representation in a reference buffer; and generate a decoded image based on the samples stored in the reference buffer. EEE 23. An apparatus comprising a processor and configured to perform a method mentioned in any of the EEEs 1-22. EEE 24. A non-transient, computer-readable storage medium that has stored a computer-executable instruction to execute a method with one or more processors in accordance with any of EEE 1-22. Appendix 1 Implementation of the bubble sort example. void bubbleSortDsd(double array*, int * idx, int n) { IntiJ; bool swapped; for (i = 0; i < n -1; Í++) { swapped = false; for (j = 0; j < η - i -1; j++) { if (matrixO] < matrix[j +1]) swap(&matrix[j], &matrix[j +1]); swap(&idx[j], &¡dx[¡ +1]); swapped = true; }} if (swapped == false) interruption; Ο / Π7Ι n / C7n7 / R / YI > cu -42-κ cr\1é > a Appendix 2 As an example, this Appendix provides a sample syntax structure and associated syntax elements according to one embodiment to support reconfiguration in the Versatile Video Codec (WC) (Ref. [8]), currently under development by ISO and ITU. New syntax elements in the existing draft version are highlighted or explicitly annotated. Equation numbers such as (8-xxx) indicate placeholders that should be updated, as necessary, in the final descriptive memory. In 7.3.2.1 RBSP Syntax of the Sequence Parameter Set seq_parameter_set_rbsp() { De scriptor sps_seq_parameter_set_id ue( v) intra_only_constraint_flag u(1 max_bitdepth_constraint_idc u(4 max_chroma_format_constraint_idc u(2 frame_only_constraint_flag u(1 no_qtbtt_dual_tree_intra constraint_flag u(1 no_sao_constraint_flag u(1 no_alf_constraint_flag u(1 no_pcm_constraint_flag u(1 no_temporal_mvp_constraint_flag u(1 no_sbtmvp_constraint_flag u(1 no_amvr_constraint_flag u(1 no_cclm_constraint_flag u(1 no_affine_motion_constraint_flag u(1 no_ladf_constraint_flag u(1 no_dep_quant_constraint_flag u(1 no_sign_data_hid¡ng_constra¡nt_flag u(1 chroma_format_idc V) ue( if( chromajormatjdc = = 3) separate_colour_plane_flag u(1 pic_width_in_luma_samples V) ue( pic_height_in_luma_samples V) ue( bit_depth_luma_minus8 V) ue( bit_depth_chroma_minus8 V) ue( Iog2_max_pic_order_cnt_lsb_minus4 V) ue( qtbtt_dual_tree_intra_flag V) ue( Iog2_ctu_size_minus2 V) ue( Iog2_min_luma_coding_bloque_size_minus2 V) ue( partition_constraints_override_enabled_flag V) ue( sps_l og2_d iff_mi n_qt_m i n_cb_i ntra_ti I e_g rou p J u ma v) ue( sps_log2_diff_min_qt_min_cb_inter_tile_group v) ue( sps_max_mtt_hierarchy_depth_inter_tile_groups V) ue( sps_max_mtt_hierarchy_depth_intra_tile_groups_luma V) ue( s¡( sps_max_mtt_h¡erarchy_depthjntra_tile_groups_luma != 0) { sps_l og2_d iff_max_bt_m¡ n_q t_¡ n tra_t¡ I e_g rou p_l urna V) ue( sps I og2 d iff max tt m i n qt i ntra ti le g roup I uma V) ue(} s¡( sps_max_mtt_hierarchy_depthjnter_tile_groups != 0) { sps_l og2_d iff_max_bt_mi n_q t_i n te r_ti I e_g rou p V) ue( sps_l og2_d iff_max_tt_m i n_qt_i n te r_ti I e_g rou p V) ue(} s¡( qtbtt_dual_tree_intra_flag) { sps_log2_diff_min_qt_min_cb_intra_tile_group_chroma V) ue( sps_max_mtt_h¡erarchy_depth_intra_tile_groups_chroma V) ue( si (sps_max_mtt_hierarchy_depthjntra_tile_groups_chroma != 0) { sps_log2_diff_max_bt_min_qt_intra_tile_group_chroma V) ue( spsjog2_d¡ff_max_tt_min_qtjntra_t¡le_group_chroma V) ue(}} sps_sao_enabled_flag u(1 sps_alf_enabled_flag u(1 pcm_enabled_flag u(1 s¡( pcm_enabled_flag) { pcm_sample_bit_depth_luma_minus1 u(4 pcm_sample_bit_depth_chroma_minus1 u(4 Iog2_min_pcmjuma_cod¡ng_bloque_s¡ze_m¡nus3 ue( v) Iog2 diff max min pcm luma coding bloque size ue( v) pcm_loop_filter_deshabilitard_flag u(1} sps_ref_wraparound_enabled_flag u(1 s¡( sps_ref_wraparound_enabled_flag) sps_ref_wraparound_offset ue( v) sps_temporal_mvp_enabled_flag u(1 si( sps_temporal_mvp_enabled_flag) sps_sbtmvp_enabled_flag u(1 sps_amvr_enabled_flag u(1 sps_bdof_enabled_flag u(1 sps_cclm_enabled_flag u(1 sps_mtsjntra_enabled_flag u(1 sps_mts_inter_enabled_flag u(1 sps_affine_enabled_flag u(1 s¡( sps_affine_enabled_flag) sps_aff i n e_ty pe_f lag u(1 sps_gbi_enabled_flag u(1 sps_cpr_enabled_flag u(1 sps ciip enabled flag u(1 sps_triangle_enabled_flag u(1 sps_ladf_enabled_flag u(1 si (sps_ladf_enabled_flag ) { sps_n u mjadfJ nterva I s_m i n us2 u(2 sps_ladf_bajoest_interval_qp_offset v) se( for( i = 0; i < sps_num_ladfjntervals_m¡nus2 +1; i+ + ){ sps_ladf_qp_offset[ i ] v) se( sps_ladf_delta_umbral_minus1[ i ] v) ue(}} sps_reshaper_enabled_flag u(1 rbsp_trailing_b¡ts()} -47Εη 7.3.3.1 Sintaxis general del encabezado del grupo de mosaico tile_group_header() { scriptor De tile_group_pic_parameter_set_id v) ue( s¡( NumTilesInPic > 1) { tile_group_address u(v) num_tiles_in_tile_group_minus1 V) ue(} tile group type V) ue( tile_group_pic_order_cnt_lsb u(v) s¡( partition_constraints_override_enabled_flag) { partí tion_constraints_override_flag V) ue( si( part¡tion_constraints_override_flag) { tile_group_log2_diff_min_qt_min_cb_luma V) ue( tile group max mtt hierarchy depthJuma V) ue( s¡( tile_group_max_mtt_hierarchy_depthjuma != 0) tilegrouplog2diffmaxbtminqtluma V) ue( tile_groupjog2_diff_max_tt_min_qtjuma V) ue(} s¡( tile_group_type = = I && qtbtt_dualJreeJntra_flag ) { tlle_groupjog2_d¡ff_min_qt_m¡n_cb_chroma V) ue( tile_group_max_mtt_hierarchy_depth_chroma V) ue( s¡( tile_group_max_mtt_hierarchy_depth_chroma != 0 ) tile_group_log2_diff_max_bt_min_qt_chroma V) ue( tile_group_log2_diff_max_tt_min_qt_chroma V) ue(}}}} si (tile_group_type != I) { s¡( sps_temporal_mvp_enabled_flag) tile_group_temporal_mvp_enabled_flag u(1 s¡( tile_group_type = = B) mvd_l1_zero_flag u(1 s¡( tile_group_temporal_mvp_enabled_flag) { si( tile_group_type = = B) collocated_from_IO_flag u(1} six_minus_max_num_merge_cand v) ue( s¡( sps_affine_enable_flag) five_minus_max_num_subbloque_merge_cand v) ue(} tile_group_qp_delta v) se( s¡( pps_tile_group_chroma_qp_offsets_present_flag) { tile_group_cb_qp_offset v) se( tile_group_cr_qp_offset V) se(} ονη^ι n / C7n7 / e / Yi s¡( sps_sao_enabled_flag) { tile_group_sao_luma_flag u(1 s¡( ChromaArrayType != 0) tile_group_sao_chroma_flag u(1} s¡( sps_alf_enabled_flag) { tile_group_alf_enabled_flag u(1 s¡( tile_group_alf_enabled_flag) alf_data()} s¡( tile_group_type = = P 11 tile_group_type = = B) { n u m_ref_i dx_l 0_a cti ve_m i n us 1 ue( v) s¡( tile_group_type = = B) num_ref_idxJ1_active_minus1 ue( v)} dep_quant_enabled_flag u(1 s¡( !dep_quant_enabled_flag) sign_data_hiding_enabled_flag u(1 s¡( debloqueing_filter_overr¡de_enabled_flag) debloqueing_filter_override_flag u(1 s¡( debloqueing_f¡lter_override_flag) { tile_group_debloqueing_f¡lter_deshab¡l¡tard_flag u(1 s¡( !tile_group_debloqueing_f¡lter_deshabil¡tard_flag) { tile_group_beta_offset_div2 se( v) ονη^ι n / C7n7 / e / Yi tile_group_tc_offset_div2 se( v)}} s¡( num_tilesjn_t¡le_group_m¡nus1 > 0) { offset_len_minus1 ue( v) for( i = 0; i < num_t¡lesjn_t¡le_group_m¡nus1; i++) entry_point_offset_minus1[ i ] u(v)} si (sps_reshaper_enabled_flag ) { tile_group_reshaper_model_present_flag u(1 si (tile_group_reshaper_model_present_flag) tile_group_reshaper_model () tile_group_reshaper_enable_flag u(1 si ( tile_group_reshaper_enable_flag && (!( qtbtt_dual_tree_intra_flag && tile_group_type == I))) tile_group_reshaper_chroma_residual_scale_flag u(1} byte_alignment()} Añadir un nuevo modelo de reconfiguraador del grupo mosaico de la tabla de sintaxis: tile_group_reshaper_model () { scriptor De reshaper_model_min_binjdx v) ue( reshaper_model_delta_max_bin_idx V) ue( reshaper_model_bin_delta_abs_cw_prec_minus1 V) ue( Ο / Π7Ι n / C7n7 / R / VI for (i = reshaper_model_min_b¡njdx; i <= reshaper_model_max_binjdx; Í++) { reshaper_model_bin_delta_abs_CW [ i ] u(v) if (reshaper_model_bin_delta_abs_CW[ i ]) > 0 ) reshaper_model_bin_delta_sign_CW_flag[ i ] u(1}} o / n7i n / C7nz / R / vi In the RBSP semantics of the general RBSP sequence parameter set, add the following semantics: sps_reshaper_enabled_flag equal to 1 specifies that the reshaper is used in the encoded video sequence (CVS). sps_reshaper_enabled_flag equal to 0 specifies that the reshaper is not used in the CVS. In the tile group header syntax, add the following semantics: `tile_group_reshaper_model_present_flag` equals 1, specifying that `tile_group_reshaper_model()` is present in the tile group header. `tile_group_reshaper_model_present_flag` equals 0, specifying that `tile_group_reshaper_model()` is not present in the tile group header. When `tile_group_reshaper_model_present_flag` is not present, it is inferred to be equal to 0. `tile_group_reshaper_enabled_flag` equal to 1 specifies that the reshaper is enabled for the current tile group. `tile_group_reshaper_enabled_flag` equal to 0 specifies that the reshaper is not enabled for the current tile group. When `tile_group_reshaper_enabled_flag` is not present, it is assumed to be equal to 0. `tile_group_reshaper_chroma_residual_scale_flag` equal to 1 specifies that chroma residue scaling is enabled for the current tile group. `tile_group_reshaper_chroma_residual_scale_flag` equal to 0 specifies that chroma residue scaling is not enabled for the current tile group. When `tile_group_reshaper_chroma_residual_scale_flag` is not present, it is inferred to be equal to 0. Adding the tile_group_reshaper_model() syntax: `reshaper_model_min_bin_idx` specifies the minimum bin (or chunk) index to use in the reshaper build process. The value of `reshaper_model_min_bin_idx` must be in the range of 0 to MaxBinldx, inclusive. The value of MaxBinldx must be equal to 15. `reshaper_model_delta_max_bin_idx` specifies the maximum allowed bin (or chunk) index, `MaxBinldx`, less the maximum bin index to be used in the reconfigurator build process. The value of `reshaper_model_max_bin_idx` is set to `MaxBinldx` - `reshaper_model_delta_max_bin_idx`. reshaper_model_bin_delta_abs_cw_prec_minus1 plus 1 specifies the number of bits used for the representation of the reshaper_model_bin_delta_abs_CW[ i ] syntax. reshaper_model_bin_delta_abs_CW[ i ] specifies the value of the absolute delta keyword for the i-th bin. -52reshaper_model_bin_delta_sign_CW_flag[ i ] specifies the sign of reshaper_model_bin_delta_abs_CW[ i ] as follows: If reshaper_model_bin_delta_sign_CW_flag[ i ] is equal to 0, the corresponding variable RspDeltaCWj i ] is a positive value. On the other hand (reshaper_model_bin_delta_sign_CW_flag[ i ] is not equal to 0), the corresponding variable RspDeltaCWj i ] is a negative value. When reshaper_model_bin_delta_sign_CW_flag[ i ] is not present, it is inferred to be equal to 0. The variable RspDeltaCWj i ] = (1 - 2*reshaper_model_bin_delta_sign_CW [ i ]) * reshaper_model_bin_delta_abs_CW [ i ]; The variable RspCW[ i ] is derived from the following steps: The OrgCW variable is set equal to (1 « BitDepthy) / ( MaxBinldx +1). If reshaper_model_min_b¡njdx <= i <= reshaper_model_max_bin_idx RspCW[ i ] = OrgCW + RspDeltaCWj i ]. Otherwise, RspCW[ i ] = 0. The value of RspCW[i] must be in the range of 32 to 2 * OrgCW - 1 if the value of BitDepthYes equals 10. The variables InputPivotj i ] with 1 in the range from 0 to MaxBinldx +1 inclusive are derived from as follows InputPivotj i ] = i * OrgCW The variable ReshapePivotj i ] with 1 in the range from 0 to MaxBinldx+ 1, inclusive, the variable ScaleCoefj i ] and InvScaleCoeffj i ] with 1 in the range from 0 to MaxBinldx, inclusive, are derived from as follows: shiftY = 14 ReshapePivotj 0 ] = 0; for( i = 0; i <= MaxBinldx; I++){ ReshapePivotj i +1 ] = ReshapePivotj i ] + RspCW[ i ] ScaleCoeff i ] = ( RspCW[¡]*(1 « shiftY) + (1 « (Log2(OrgCW)-1))) » (Log2(OrgCW)) if ( RspCW[ i ] == 0) InvScaleCoeffj i ] =0 also InvScaleCoeffj i ] = OrgCW * (1 « shiftY) / RspCW[ i ]} The variable ChromaScaleCoefj i ] with 1 in the range from 0 to MaxBinldx, inclusive, is derived from as follows: ChromaResidualScaleLut

[64] = {16384, 16384, 16384, 16384, 16384, 16384, 16384, 8192, 8192, 8192, 8192, 5461, 5461, 5461, 5461, 4096, 4096, 4096, 4096, 3277, 3277, 3277, 3277, 2731, 2731, 2731, 2731, 2341, 2341, 2341, Ο7Π7Ι n / C7n7 / R / YI -532048, 2048, 2048, 1820, 1820, 1820, 1638, 1638, 1638, 1638, 1489, 1489, 1489, 1489, 1365, 1365, 1365, 1365, 1260, 1260, 1260, 1260, 1170, 1170, 1170, 1170, 1092, 1092, 1092, 1092, 1024, 1024, 1024, 1024}; shiftC = 11 - if ( RspCW[ i ] == 0) ChromaScaleCoef[i] = (1 « shiftC) Otherwise(RspCW[ i ] != 0), ChromaScaleCoef[ i ] = ChromaResidualScaleLut[ Clip3(1, 64, RspCW[ i ] » 1) - 1 ] Add the following to the weighted sample prediction process for combined fusion and intra-prediction. The addition is highlighted. 8.4.6.6 Weighted sample prediction process for combined fusion and intra-prediction The inputs in this process are: the width of the current encoding block cbWidth, - the height of the current encoding block cbHeight, - two (cbWidth)x(cbHeight) arrays predSamplesInter and predSamplesIntra, - the intra prediction mode, predModelntra - a cldx variable that specifies the color component index. The output of this process is the (cbWidth)x(cbHeight) predSamplesComb matrix of the prediction sample values. The bitDepth variable is derived as follows: - If cldx is equal to 0, bitDepth is set equal to BitDepthy. - Otherwise, bitDepth is set equal to BitDepthc. The prediction samples predSamplesComb[ x ][ y ] with x = 0..cbWidth - 1 and y = 0..cbHeight - 1 are derived from as follows: - The weighting w is derived as follows: - If predModelntra is INTRA_ANGULAR50, w is specified in Table 8-10 with nPos equal to y and nSize equal to cbHeight. - Otherwise, if predModelntra is INTRA_ANGULAR18, w is specified in Table 8-10 with nPos equal to ax and nSize equal to cbWidth. - Otherwise, w is set equal to 4. - If cldx equals 0, predSamplesInter is derived as follows: - If tile_group_reshaper_enabled_flag is equal to 1, shiftY = 14 IdxY = predSampleslnter[x][y ] » Log2( OrgCW ) predSamplesInter [x][y] = Cliply ( ReshapePivot[ IdxY ] Ο7Π7 I n / C7n7 / R / YI -54+ ( ScaleCoeffff idxY ] *( predSamplesInter] x ][ y ] - InputPivot] idxY ] ) + (1 « (shiftY — 1 )))»shiftY) (8-xxx) - Otherwise (tile_group_reshaper_enabled_flag equals 0) predSamplesInter[x][y] = predSamplesInter[x][y] The prediction samples predSamplesComb[ x ][ y ] are derived as follows: predSamplesComb[x][y] = (w*predSampleslntra[x][y ] + (8-740) Ο / Π7 I n / C7n7 / R / VIAI (8 - w) * predSampleslnter[ x ][ y ]) » 3) Table 8-10 - Specifying w as a function of position nP and size nS 0 <= nP < nS / 4 ) ( nS / 4 ) <= nP < ( nS / 2 ) ( nS / 2 ) <= nP < ( 3 *nS / 4 ) ( 3 *nS / 4 ) <= nP < nS 6 5 3 2 Add it next in the Image Reconstruction Process 8.5.5 Image Reconstruction Process The inputs to this process are: a location (xCurr, yCurr) that specifies the top left sample of the current block relative to the top left sample of the current image component, the variables nCurrSw and nCurrSh that specify the width and height, respectively, of the current block, a variable cldx that specifies the color component of the current block, an array (nCurrSw) x (nCurrSh) predSamples that specifies the predicted samples of the current block, an array (nCurrSw) x (nCurrSh) resSamples that specifies the residual samples of the current block. Based on the value of the cldx color component, the following assignments are made: If cldx is equal to 0, recSamples corresponds to the reconstructed image sample matrix Sl and the function clipCidxl corresponds to Clip1Y. Otherwise, if cldx equals 1, recSamples corresponds to the reconstructed chroma sample matrix Scb and the function clipCidxl corresponds to Clip 1 c. Otherwise (cldx equals 2), recSamples corresponds to the reconstructed chroma sample matrix Ser and the function clipCidxl corresponds to Cliplc. When the value of tile_group_reshaper_enabled_flag is equal to 1, the (nCurrSw)x(nCurrSh) block of the reconstructed sample array recSamples at location (xCurr, yCurr) is derived as the mapping process specified in clause 8.5.5.1. Otherwise, the (nCurrSw)x(nCurrSh) block of the reconstructed sample array recSamples at location (xCurr, yCurr) is derived as follows: recSamples[ xCurr + i ][ yCurr + j ] = clipCidxl(predSamples[ i ][ j ] + resSamples[ i ][j ] )(8-xxx) with i = 0..nCurrSw - 1, j = 0..nCurrSh - 1 8.5.5.1 Image reconstruction with mapping process This clause specifies the image reconstruction using the mapping process. Image reconstruction using the mapping process for the luma sample value is specified in 8.5.5.1.1. Image reconstruction using the mapping process for the chroma sample value is specified in 8.5.5.1.2. 8.5.5.1.1 Image reconstruction with mapping process for luma sample value The inputs to this process are: a (nCurrSw)x(nCurrSh) predSamples array that specifies the predicted luma samples of the current block, a (nCurrSw)x(nCurrSh) resSamples array that specifies the residual luma samples of the current block. The outputs for this process are: a mapped luma prediction sample array (nCurrSw)x(nCurrSh) redMapSamples, a reconstructed luma sample array (nCurrSw)x(nCurrSh) recSamples. The predMapSamples is derived as follows: - If (CuPredMode[ xCurr ][ yCurr ] = = MODEJNTRA) || (CuPredMode[ xCurr ][ yCurr ] = = MODEJNTER && mh_intra_flag[ xCurr ][ yCurr ]) predMapSamples[ xCurr + i ][ yCurr + j ] = predSamples[ i ][j ](8-xxx) with i = O.mCurrSw - 1, j = O..nCurrSh - 1 Otherwise ((CuPredModef xCurr ][ yCurr ] = = MODEJNTER && ImhJntra_flag[ xCurr ][ yCurr ])), the following applies: shiftY =14 idxY = predSamples[ i ][ j ] » Log2( OrgCW) predMapSamples[ xCurr + i ][ yCurr+j] = ReshapePivot[ idxY ] + ( ScaleCoeff[ idxY ] *(predSamples[ i ][ j ] — InputPivotf idxY ]) + ( 1 « ( shiftY - 1 ) ) ) » shiftY (8-xxx) with i = O.mCurrSw - 1, j = O..nCurrSh - 1 The recSamples are derived as follows: recSamples[ xCurr + i ][ yCurr +j] = Clip1Y( predMapSamples[ xCurr + i ][ yCurr + j ]+ resSamples[ i ][j ] ] )(8xxx) with i = O.mCurrSw - 1, j = O..nCurrSh - 1 Ο / Π7Ι n / C7n7 / R / VI 8.5.5.1.2 Image reconstruction with mapping process for the chroma sample value The inputs to this process are: -56 a (nCurrSwx2)x(nCurrShx2) mapped predMapSamples matrix that specifies the predicted luma samples mapped from the current block, - an array (nCurrSw)x(nCurrSh) predSamples that specifies the predicted chroma samples of the current block, - an array (nCurrSw)x(nCurrSh) resSamples that specifies the residual chroma samples of the current block. The output for this process is a reconstructed chroma sample array called ecSamples. The recSamples are derived as follows: If (!tile_group_reshaper_chroma_res¡dual_scale_flag || ((nCurrSw)x(nCurrSh) <= 4)) recSamples[ xCurr + ¡ ][yCurr +j ] = Cliplc (predSamples[ i ][j ] + resSamples[ i ][j ]) (8-xxx) with i = 0..nCurrSw - 1, j = 0..nCurrSh - 1 Otherwise (tile_group_reshaper_chroma_residual_scale_flag && ((nCurrSw)x(nCurrSh) > 4)), the following applies: The varScale variable is derived as follows: 1. invAvgLuma=CI¡p1Y( (Σ,Σ, predMapSamples[ (xCurr« 1) + i ][ (yCurr« 1) +j ] + nCurrSw * nCurrSh *2) / ( nCurrSw * nCurrSh *4)) 2. The variable IdxYInv is derived by identifying the piecewise function index as specified in clause 8.5.6.2 with the sample value input InvAvgLuma. 3. varScale = ChromaScaleCoef[ IdxYInv ] LarecSamples is derived as follows: If your_cbf_cldx[xCurr][yCurr] equals 1, the following applies: shiftC = 11recSamples[ xCurr + i ][ yCurr +j ] = ClipCidxl ( predSamples[ i ][j ] + Sign( resSamples[ i ][j ]) *( ( Abs(resSamples[i][j] )* varScale + ( 1«( shiftC -1 ) )»shiftC ) )(8-xxx) with i = 0..nCurrSw - 1, j = 0..nCurrSh -1 Otherwise (tu_cbf_cldx[ xCurr ][ yCurr ] equal to 0) recSamples[ xCurr + i ][ yCurr+j] = ClipCidxl(predSamples[ i ][j ] )(8-xxx) with i = 0..nCurrSw - 1, j = 0..nCurrSh -1 8.5.6 Reverse Image Mapping Process This clause is invoked when the value of tile_group_reshaper_enabled_flag is equal to 1. The input is the reconstructed image luma sample array Sl and the output is the modified reconstructed image luma sample array S'L after the reverse mapping process. The reverse mapping process for the luma sample value is specified in 8.4.6.1. Ο7Π7Ι n / C7n7 / R / VI 8.5.6.1 Inverse mapping process of luma sample values The inputs for this process are a light location (xP, yP) that specifies the location of the luma sample relative to the upper left luma sample of the current image. The output of this process is a sample value of inverse mapped luma invLumaSample. The value of InvLumaSample is derived by applying the ordered steps: 1. The variables IdxYInv are derived by invoking the piecewise function index identification as specified in clause 8.5.6.2 with input of luma sample value Sl[ xP ][ yP ]. 2. The value of reshapeLumaSample is derived as follows: shiftY=14 InvLumaSample = lnputPivot[ IdxYInv ] + (lnvScaleCoeff[ IdxYInv ] *( Sl[ xP ][ yP ] - ReshapePivot[ IdxYInv ]) + (1 « (shiftY - 1)))» shiftY(8—xxx) 3. clipRange = ((reshaper_model_min_bin_idx > 0) && (reshaper_model_max_bin_idx < MaxBinldx)); When clipRange equals 1, the following applies: minVal = 16« (BitDepthv - 8)maxVal = 235« (BitDepthv - 8) invLumaSample = Cllp3(minVal, maxVal, invLumaSample) also (clipRange is equal to 0), the following is applied: InvLumaSample = ClipCidxl (InvLumaSample) 8.5.6.2 Identification of the function index by parts for luma components The inputs to this process are a sample luma value S. The output of this process is an index idxS that identifies the part to which the sample S belongs. The variable IdxS is derived as follows: for( IdxS = 0, idxFound = 0; IdxS <= MaxBinldx; idxS++) {}s¡( (S < ReshapePivot [ IdxS +1 ]) {IdxFound = 1 break} It should be noted that an alternative implementation for finding the IdxS identification is as follows: if (S < ReshapePivot [ reshaper_model_min_binjdx ]) IdxS = 0 also if (S >= ReshapePivot [ reshaper_model_max_binjdx ]) idxS=MaxBinldx also IdxS = findldx (S, 0, MaxBinldx +1, ReshapePivot [ ]) function idx = findldx (val, low, high, pivot[ ]) {if ( high - low <= 1) idx = low also { Ο / Π7Ι n / O7n7 / R / VI -58mid = (low + high) » 1 if (val < pivot [mid]) high=mid also low = mid idx = findldx (val, low, high, pivotO)}}

Claims

1. A method for reconstructing encoded video data with one or more processors, the method comprising: receiving an encoded bitstream comprising one or more reconfigured images encoded in a reconfigured keyword representation;receiving reconfiguration parameters for the one or more reconfigured images encoded in the encoded bitstream, wherein the reconfiguration parameters comprise parameters for generating a forward reconfiguration function based on the reconfiguration parameters, wherein the forward reconfiguration function maps image pixels from a first input keyword representation to the reconfigured input keyword representation, wherein the reconfiguration parameters comprise: a delta index parameter to determine a maximum active bin index used for reconfiguration, wherein the maximum active bin index is less than or equal to a predefined maximum bin index; a min-index parameter indicating a minimum bin index used in reconfiguration; absolute delta keyword values ​​for each active bin in the reconfigured keyword representation;and signals of the absolute delta keyword values ​​for each active bin in the input keyword representation.; 2. The method of claim 1, wherein the forward reconfiguration function is reconstructed as a piecewise linear function with linear segments derived by the reconfiguration parameters.

3. The method of claim 1, wherein the determination of the maximum active bins index used to represent the input keyword representation comprises calculating a difference between the predefined maximum bins index and the delta index parameter.

4. The method of claim 1, wherein the predefined maximum bin index is one of 15, 31 or 63.

5. A method for generating reconfiguration parameters for an encoded bitstream, the method comprising: receiving a sequence of video images in an input keyword representation; applying a forward reconfiguration function to one or more images in the video image sequence to generate reconfigured images in a reconfigured keyword representation, wherein the forward reconfiguration function maps pixels from an image of the input codeword representation to the reconfigured keyword representation; and generating reconfiguration parameters for the reconfigured keyword representation.yo / n7i n / C7nz / R / vi -60 generate a bitstream encoded based at least on the reconfigured images, wherein the reconfiguration parameters comprise: a delta index parameter to determine a maximum active bin index used for reconfiguration, wherein the maximum active bin index is less than or equal to a predefined maximum bin index; a min-index parameter indicating a minimum bin index used in reconfiguration; absolute delta keyword values ​​for each active bin in the reconfigured keyword representation; and signals of the absolute delta keyword values ​​for each active bin in the input keyword representation.

6. The method of claim 5, wherein the forward reconfiguration function comprises a piecewise linear function with linear segments derived by the reconfiguration parameters.

7. The method of claim 5, wherein the determination of the maximum active bins index used to represent the input keyword representation comprises calculating a difference between the predefined maximum bins index and the delta index parameter.

8. The method of claim 5, wherein the predefined maximum bin index is one of 15, 31 or 63.

9. An apparatus comprising a video bitstream stored on one or more non-transient, machine-readable media, the video bitstream being characterized in that: data representing one or more video images in a compressed format, wherein a portion of the data representing the one or more video images in the compressed format comprises: one or more reconfigured images encoded in a reconfigured keyword representation;and reconfigure parameters for the one or more reconfigured images encoded in the video bitstream, wherein the reconfiguration parameters comprise parameters for generating a forward reconfiguration function based on the reconfiguration parameters, wherein the forward reconfiguration function maps pixels from an input keyword representation to the reconfigured keyword representation, wherein the reconfiguration parameters comprise: a delta index parameter to determine a maximum active bin index used for reconfiguration, wherein the maximum active bin index is less than or equal to a predefined maximum bin index; a min-index parameter indicating a minimum bin index used in reconfiguration; absolute delta keyword values ​​for each active bin in the reconfigured keyword representation;and signals of the absolute delta keyword values ​​for each active bin in the reconfigured keyword representation. o / n7i n / C7nz / R / vi; 10. The apparatus of claim 9, wherein the forward reconfiguration function comprises a piecewise linear function with linear segments derived by the reconfiguration parameters.

11. The apparatus of claim 9, wherein the determination of the maximum active bins index used to represent the input keyword representation comprises calculating a difference between the predefined maximum bins index and the delta index parameter.

12. The apparatus of claim 9, wherein the predefined maximum bin index is one of 15, 31 or 63.