Video or image coding based on luminance mapping
By employing the Luminance Mapping and Chromatography Scaling (LMCS) process, the high cost of transmitting and storing high-resolution images/videos is addressed, improving coding efficiency and visual quality while reducing resource consumption.
Patent Information
- Application Number
- CN202410898259.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-17
- Filing Date
- 2020-06-17
- Publication Date
- 2024-09-24
AI Technical Summary
Existing technologies are costly to transmit and store high-resolution, high-quality images/videos, and are difficult to effectively compress images/videos that exhibit different characteristics, such as virtual reality and immersive media.
By employing the Luminance Mapping and Chroma Scaling (LMCS) process, and through filtering applications, constrained LMCS codewords, the use of a single chroma residual scaling factor, and linear mapping, the index derivation process is simplified, thereby improving image/video coding efficiency.
It improves image/video compression efficiency, enhances subjective and objective visual quality, reduces resources and costs, decreases division operations in the mapping process, and improves encoding and decoding speed.
Smart Images

Figure CN118694953A
Abstract
Description
[0001] This application is a divisional application of a patent application filed on August 4, 2021, with an application date of June 17, 2020, application number 202080012555.1 (PCT / KR2020 / 007818), and invention name “Video or image compilation based on brightness mapping”. Technical Field
[0002] This paper deals with video or image compilation based on brightness mapping. Background Art
[0003] Recently, there is an increasing demand for high-resolution, high-quality images / videos such as 4K or 8K ultra-high definition (UHD) images / videos in various fields. As the image / video resolution or quality becomes higher, relatively more information or bits are transmitted compared to conventional image / video data. Therefore, if the image / video data is transmitted via a medium such as an existing wired / wireless broadband line or is stored in a conventional storage medium, the cost of transmission and storage is likely to increase.
[0004] Furthermore, there is growing interest and demand for virtual reality (VR) and artificial reality (AR) content and immersive media such as holograms; and there is also growing broadcasting of images / videos that exhibit image / video characteristics different from actual images / videos (e.g., game images / videos).
[0005] Therefore, highly efficient image / video compression technology is required to effectively compress and transmit, store, or play high-resolution, high-quality images / videos showing various characteristics as described above.
[0006] Furthermore, a Luma Mapping and Chroma Scaling (LMCS) process is performed to improve compression efficiency and increase subjective / objective visual quality, and there is discussion of increasing the efficiency of the LMCS process. Summary of the invention
[0007] Technical Solution
[0008] According to the embodiments of this document, a method and apparatus for improving image coding efficiency are provided.
[0009] According to the embodiments of this document, an efficient filtering application method and apparatus are provided.
[0010] According to the embodiments of this document, an efficient LMCS application method and apparatus are provided.
[0011] According to embodiments herein, LMCS codewords (or ranges thereof) may be constrained.
[0012] According to embodiments herein, a single chroma residual scaling factor directly signaled in the chroma scaling of the LMCS may be used.
[0013] According to embodiments herein, a linear mapping (linear LMCS) may be used.
[0014] According to embodiments herein, information about the pivot point required for the linear mapping may be explicitly signaled.
[0015] According to embodiments herein, a flexible number of bins may be used for brightness mapping.
[0016] According to the embodiments of this document, the index derivation process for inverse luma mapping and / or chroma residual scaling may be simplified.
[0017] According to an embodiment of this document, a video / image decoding method performed by a decoding device is provided.
[0018] According to an embodiment of this document, a decoding apparatus for performing video / image decoding is provided.
[0019] According to an embodiment of this document, a video / image encoding method performed by an encoding device is provided.
[0020] According to an embodiment of this document, there is provided an encoding apparatus for performing video / image encoding.
[0021] According to one embodiment of the present invention, a computer-readable digital storage medium is provided, in which encoded video / image information generated according to the video / image encoding method disclosed in at least one embodiment of the present invention is stored.
[0022] According to an embodiment of this document, a computer-readable digital storage medium is provided, in which encoding information or encoded video / image information is stored for enabling a decoding device to perform a video / image decoding method disclosed in at least one embodiment of this document.
[0023] Beneficial Effects
[0024] According to the embodiments of this document, the overall image / video compression efficiency may be improved.
[0025] According to the embodiments of this document, the subjective / objective visual quality can be improved through effective filtering.
[0026] According to the embodiments of this document, the LMCS process for image / video coding may be efficiently performed.
[0027] According to the embodiments herein, the resources / costs (of software or hardware) required for the LMCS process may be minimized.
[0028] According to embodiments herein, hardware implementation for a LMCS process may be facilitated.
[0029] According to embodiments herein, the division operations required for the derivation of LMCS codewords in mapping (shaping) may be removed or minimized by constraining the LMCS codewords (or their ranges).
[0030] According to the embodiments of this document, the delay identified according to the segment index can be removed by using a single chroma residual scaling factor.
[0031] According to the embodiments of this document, by using linear mapping in LMCS, a chroma residual scaling process may be performed without relying on (reconstruction of) a luma block, thereby removing a delay in scaling.
[0032] According to the embodiments of this document, the mapping efficiency in LMCS can be improved.
[0033] According to the embodiments of this invention, the complexity of LMCS can be reduced by simplifying the index derivation process for inverse luminance mapping and / or chrominance residual scaling, thereby improving the video / image coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 An example of a video / image coding system to which embodiments of this document may be applied is illustrated.
[0035] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which the embodiments of this document can be applied.
[0036] Figure 3 is a diagram schematically illustrating a configuration of a video / image decoding device to which the embodiments of this document can be applied.
[0037] Figure 4 The hierarchical structure for compiling images / videos is shown exemplarily.
[0038] Figure 5 The hierarchical structure of the CVS according to the embodiment of this document is exemplarily illustrated.
[0039] Figure 6 An exemplary LMCS structure according to embodiments herein is illustrated.
[0040] Figure 7 A LMCS structure according to another embodiment of this document is illustrated.
[0041] Figure 8 A diagram representing an exemplary forward map is shown.
[0042] Fig. 9 is a flowchart illustrating a method for deriving a chroma residual scaling index according to an embodiment of this document.
[0043] Fig.10A linear fit of a pivot point according to embodiments herein is illustrated.
[0044] Fig.11 An example of a linear shaper according to embodiments herein is illustrated.
[0045] Fig.12 An example of linear forward mapping in the embodiments of this article is shown.
[0046] Fig.13 An example of inverse forward mapping in the embodiments of this document is shown.
[0047] Fig.14 and Fig.15 An example of a video / image encoding method and related components according to embodiments of the present invention is schematically shown.
[0048] Fig.16 and Fig.17 An example of an image / video decoding method and related components according to embodiments of the present invention is schematically shown.
[0049] Fig.18 An example of a content streaming system to which the embodiments disclosed herein may be applied is shown. DETAILED DESCRIPTION
[0050] This article can be modified in various forms, and its specific embodiments will be described and shown in the drawings. However, these embodiments are not intended to limit this article. The terms used in the following description are only used to describe specific embodiments and are not intended to limit this article. Singular expressions include plural expressions unless they can be clearly understood differently. Terms such as "including" and "having" are intended to indicate the presence of features, quantities, steps, operations, elements, components, or combinations thereof used in the following description, so it should be understood that the possibility of the presence or addition of one or more different features, quantities, steps, operations, elements, components, or combinations thereof is not excluded.
[0051] At the same time, for the convenience of describing different characteristic functions, each configuration in the drawings described in this article is shown independently, which does not mean that each configuration is implemented as separate hardware or separate software. For example, two or more components in various components can be combined to form one component, or one component can be divided into multiple components. Embodiments that integrate and / or separate each component are also included in the scope of the disclosure of this article.
[0052] Hereinafter, an example of the present embodiment will be described in detail with reference to the accompanying drawings. In addition, the same reference numerals are used throughout the drawings to indicate the same elements, and the same description of the same elements will be omitted.
[0053] Figure 1An example of a video / image coding system to which embodiments of this document may be applied is illustrated.
[0054] Reference Figure 1 The video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit the encoded video / image information or data in the form of a file or stream transmission to the receiving device via a digital storage medium or a network.
[0055] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.
[0056] The video source may acquire the video / image by a process of capturing, synthesizing or generating the video / image. The video source may include a video / image capturing device and / or a video / image generating device. For example, the video / image capturing device may include one or more cameras, a video / image archive including previously captured videos / images, etc. For example, the video / image generating device may include a computer, a tablet computer, and a smart phone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by a process of generating relevant data.
[0057] The encoding device can encode the input video / image. For compression and coding efficiency, the encoding device can perform a series of processes such as prediction, transformation and quantization. The encoded data (encoded video / image information) can be output in the form of a bit stream.
[0058] The transmitter may transmit the encoded image / image information or data output in the form of a bit stream to a receiver of a receiving device in the form of a file or stream transmission through a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmission through a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received bit stream to a decoding device.
[0059] The decoding device may decode a video / image by performing a series of processes such as dequantization, inverse transformation, and prediction corresponding to the operations of the encoding device.
[0060] The renderer can render the decoded video / image. The rendered video / image can be displayed by a display.
[0061] This article relates to video / image coding. For example, the methods / embodiments disclosed herein can be applied to methods disclosed in the Versatile Video Coding (VVC) standard, the Essential Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation Audio Video Coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267 or H.268, etc.).
[0062] Various embodiments of video / image coding are suggested herein, and unless otherwise mentioned, the embodiments may be performed in combination with each other.
[0063] In this document, video may refer to a series of images over time. A picture generally refers to a unit representing an image at a specific time frame, and a slice / tile refers to a unit that constitutes a part of a picture in terms of coding. A slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles. A tile may represent a rectangular area of a CTU row within a tile in a picture. A tile may be divided into a plurality of tiles, each tile consisting of one or more CTU rows within a tile. Tiles that are not divided into a plurality of tiles may also be referred to as tiles. Tile scanning may represent a specific ordering of CTUs of a partitioned picture, wherein CTUs are continuously ordered with a CTU raster scan within a tile, and tiles within a tile are continuously ordered with a raster scan of tiles of a tile, and tiles in a picture are continuously ordered with a raster scan of tiles of a tile. Tiles are rectangular areas of CTUs within a specific tile column and a specific tile row in a picture. A tile column is a rectangular area of a CTU whose height is equal to the height of the picture and whose width is specified by a syntax element in the picture parameter set. A tile row is a rectangular area of a CTU whose height is specified by a syntax element in the picture parameter set and whose width is equal to the width of the picture. A tile scan is a specific sequential ordering of the CTUs of a partitioned picture, wherein a raster scan of the CTUs in a tile continuously orders the CTUs, while a raster scan of the tiles of a picture continuously orders the tiles in a picture. A slice includes an integer number of tiles of a picture that can be exclusively contained in a single NAL unit. A slice can consist of a continuous sequence of multiple complete tiles or only complete tiles of one tile. In this document, tile groups and slices can be used interchangeably. For example, in this document, a tile group / tile group header can be referred to as a slice / slice header.
[0064] At the same time, a picture can be divided into two or more sub-pictures. A sub-picture can be a rectangular area of one or more slices within a picture.
[0065] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.
[0066] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or an area. In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients. Alternatively, a sample may refer to a pixel value in the spatial domain, and when such a pixel value is transformed to the frequency domain, it may refer to a transform coefficient in the frequency domain.
[0067] In this document, "A or B" may mean "only A", "only B", or "A and B". In other words, "A or B" in this document may be interpreted as "A and / or B". For example, in this document, "A, B or C (A, B or C)" means "only A", "only B", "only C", or "any combination of A, B, and C".
[0068] As used herein, a slash ( / ) or a comma (comma) may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "A and B". For example, "A, B, C" may mean "A, B, or C".
[0069] Herein, "at least one of A and B" may mean "only A", "only B" or "A and B". In addition, herein, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as "at least one of A and B".
[0070] Furthermore, herein, “at least one of A, B, and C” means “only A”, “only B”, “only C”, or “any combination of A, B, and C”. Furthermore, “at least one of A, B, or C” or “at least one of A, B and / or C” may mean “at least one of A, B, and C”.
[0071] In addition, the brackets used herein may refer to "for example". Specifically, when "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction". In other words, "prediction" in this document is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when "prediction (ie, intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".
[0072] The technical features described separately in one of the figures of this document can be implemented separately or simultaneously.
[0073] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which the embodiments of this document can be applied. Hereinafter, the so-called video encoding device may include an image encoding device.
[0074] Reference Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and an entropy encoder 240, an adder 250, a filter 260 and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234 and an inverse transformer 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250 and the filter 260 may be configured by at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB), or may be configured by a digital storage medium. The hardware component may also include the memory 270 as an internal / external component.
[0075] The image divider 210 may divide the input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, the processor may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quadtree structure may be applied first, and a binary tree structure and / or a ternary structure may be applied later. Alternatively, a binary tree structure may be applied first. The coding process according to the present disclosure may be performed based on a final coding unit that is no longer divided. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit may be recursively divided into coding units with a deeper depth and a coding unit with an optimal size may be used as the final coding unit. Here, the coding process may include a process of prediction, transformation, and reconstruction (to be described later). As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be split or partitioned from the above-mentioned final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
[0076] In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an M×N block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component. A sample may be used as a term corresponding to one picture (or image) of a pixel or pixel.
[0077] In the encoding device 200, a prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 is subtracted from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the transformer 232. In this case, as shown, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) in the encoder 200 may be referred to as a subtractor 231. The predictor may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a prediction block including prediction samples of the current block. The predictor may determine whether intra prediction or inter prediction is applied based on the current block or CU. As described later in the description of each prediction mode, the predictor may generate various types of information related to prediction (e.g., prediction mode information) and send the generated information to the entropy encoder 240. Information about prediction may be encoded in the entropy encoder 240 and output in the form of a bitstream.
[0078] The intra-frame predictor 222 may predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. For example, the non-directional mode may include a DC mode and a plane mode. For example, depending on the level of detail of the prediction direction, the directional mode may include 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-frame predictor 222 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.
[0079] The inter-frame predictor 221 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 221 may configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 may use the motion information of the neighboring block as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be sent. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be indicated by signaling a motion vector difference.
[0080] The predictor 220 may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but also apply both intra prediction and inter prediction at the same time. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for content image / video coding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction so that a reference block is derived in the current picture. That is, IBC may use at least one inter prediction technique described herein. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, the sample values within the picture may be signaled based on information about the palette table and the palette index.
[0081] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen–Loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, when the relationship information between pixels is represented by a graph, GBT means a transform obtained from a graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size or to blocks of variable sizes other than square.
[0082] The quantizer 233 may quantize the transform coefficients and send them to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the block type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients may be generated. The entropy encoder 240 may perform various encoding methods such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 240 may encode information required for video / image reconstruction other than the quantized transform coefficients (e.g., the value of a syntax element, etc.) together or separately. The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of NAL (Network Abstraction Layer) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. In this article, information and / or syntax elements sent / signaled from the encoding device to the decoding device may be included in the video / picture information. The video / image information may be encoded by the above-mentioned encoding process and included in the bitstream. The bitstream may be sent via a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that sends a signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the encoding device 200, and alternatively, the transmitter may be included in the entropy encoder 240.
[0083] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients via the dequantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If there is no residual in the block to be processed (for example, in the case of applying the skip mode), the prediction block can be used as a reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. As described below, the generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture and can be used for inter-frame prediction of the next picture through filtering.
[0084] Furthermore, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.
[0085] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). For example, various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various types of information related to filtering and send the generated information to the entropy encoder 240, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.
[0086] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied by the encoding device, prediction mismatch between the encoding device 200 and the decoding device may be avoided and encoding efficiency may be improved.
[0087] The DPB of the memory 270 DPB may store a modified reconstructed picture used as a reference picture in the inter-frame predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 221 and used as motion information of a spatially adjacent block or motion information of a temporally adjacent block. The memory 270 may store reconstructed samples of a reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame predictor 222.
[0088] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0089] Reference Figure 3 , the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 331 and an intra-frame predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured by a hardware component (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include the memory 360 as an internal / external component.
[0090] When a bit stream including video / image information is input, the decoding apparatus 300 can reconstruct the bit stream corresponding to the bit stream in the video / image format. Figure 2 The image corresponding to the processing of the video / image information in the encoding device. For example, the decoding device 300 may derive the unit / block based on the block segmentation related information obtained from the bit stream. The decoding device 300 may use a processor applied in the encoding device to perform decoding. Therefore, for example, the decoding processor may be a coding unit, and the coding unit may be divided from the coding tree unit or the maximum coding unit according to a quadtree structure, a binary tree structure and / or a ternary tree structure. One or more transform units may be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 may be reproduced by a reproduction device.
[0091] The decoding device 300 may receive Figure 2The received signal may be decoded by the entropy decoder 310. For example, the entropy decoder 310 may parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The signaled / received information and / or syntax elements described later in this document may be decoded and obtained from the bitstream by a decoding process. For example, the entropy decoder 310 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs syntax elements required for image reconstruction and quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in the bitstream, determine a context model using information of a decoding target syntax element, decoding information of a decoding target block, or information of a symbol / bin decoded in a previous stage, and perform arithmetic decoding on the bin by predicting the probability of bin occurrence according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information related to prediction among the information decoded by the entropy decoder 310 may be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value (ie, quantized transform coefficient and related parameter information) for which entropy decoding is performed in the entropy decoder 310 may be input to the residual processor 320. The residual processor 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded by the entropy decoder 310 may be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may also be configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to this document may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoder 310, and the sample decoder may include at least one of the dequantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-frame predictor 332, and the intra-frame predictor 331.
[0092] The dequantizer 321 may dequantize the quantized transform coefficient and output the transform coefficient. The dequantizer 321 may rearrange the quantized transform coefficient in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scanning order performed in the encoding device. The dequantizer 321 may perform dequantization on the quantized transform coefficient using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficient.
[0093] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0094] The predictor may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on information on prediction output from the entropy decoder 310 and may determine a specific intra / inter prediction mode.
[0095] The predictor 320 may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but may also apply intra prediction and inter prediction at the same time. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for content image / video coding of games, etc., such as screen content coding (SCC). IBC basically performs a prediction in the current picture, but may be performed similarly to inter prediction so that a reference block is derived in the current picture. That is, IBC may use at least one inter prediction technique described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, the sample values within the picture may be signaled based on information about the palette table and the palette index.
[0096] The intra-frame predictor 331 may predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block. The intra-frame predictor 331 may predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.
[0097] The inter-frame predictor 332 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter-frame predictor 332 may configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating the inter-frame prediction mode of the current block.
[0098] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If there is no residual in the block to be processed, for example, when the skip mode is applied, the prediction block may be used as the reconstructed block.
[0099] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, may be output through a filter as described below, or may be used for inter prediction of the next picture.
[0100] In addition, luma mapping and chroma scaling (LMCS) may be applied during the picture decoding process.
[0101] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 360 (specifically, the DPB of the memory 360). For example, the various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0102] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter-frame predictor 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 260 to be used as motion information of a spatially adjacent block or motion information of a temporally adjacent block. The memory 360 may store reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame predictor 331.
[0103] In the present disclosure, the embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may be the same as or respectively applied to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300. This may also be applied to the unit 332 and the intra-frame predictor 331.
[0104] As described above, when performing video coding, prediction is performed to enhance compression efficiency. A prediction block including prediction samples of a current block (ie, a target coding block) may be generated by prediction. In this case, the prediction block includes prediction samples in a spatial domain (or a pixel domain). The prediction block is derived identically in the encoding device and the decoding device. The encoding device may enhance image coding efficiency by notifying the decoding device with a signal of information (residual information) about the residual between the original block (rather than the original sample value of the original block itself) and the prediction block. The decoding device may derive a residual block including residual samples based on the residual information, may generate a reconstructed block including reconstructed samples by adding the residual block to the prediction block, and may generate a reconstructed picture including the reconstructed block.
[0105] The residual information may be generated through a transform process and a quantization process. For example, the encoding device may derive a residual block between the original block and the prediction block, may derive a transform coefficient by performing a transform process on the residual samples (residual sample array) included in the residual block, may derive a quantized transform coefficient by performing a quantization process on the transform coefficient, and may signal the relevant residual information (through a bitstream) to the decoding device. In this case, the residual information may include information such as value information, position information, transform scheme, transform core, and quantization parameter of the quantized transform coefficient. The decoding device may perform a dequantization / inverse transform process based on the residual information and may derive a residual sample (or residual block). The decoding device may generate a reconstructed picture based on the prediction block and the residual block. In addition, the encoding device may derive a residual block by dequantizing / inverse transforming the quantized transform coefficient for reference to inter-frame prediction of subsequent pictures, and may generate a reconstructed picture.
[0106] Herein, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When quantization / dequantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or may still be referred to as a transform coefficient for the sake of uniform expression.
[0107] In this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information may include information about the transform coefficients, and the information about the transform coefficients may be signaled by residual coding syntax. The transform coefficients may be derived based on the residual information (or information about the transform coefficients), and the scaled transform coefficients may be derived by inversely transforming (scaling) the transform coefficients. Residual samples may be derived based on an inverse transform (transform) of the scaled transform coefficients. This may also be applied / expressed in other parts of this document.
[0108] Intra-frame prediction may refer to a prediction of a prediction sample generated for a current block based on a reference sample in a picture to which the current block belongs (hereinafter referred to as the current picture). When intra-frame prediction is applied to the current block, the neighboring reference samples to be used for intra-frame prediction of the current block may be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary of the current block having a size of nWxnH and a total of 2xnH samples adjacent to the lower left, samples adjacent to the upper boundary of the current block and a total of 2xnW samples adjacent to the upper right, and one sample adjacent to the upper left of the current block. Alternatively, the neighboring reference samples of the current block may include multiple upper neighboring samples and multiple left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block having a size of nWxnH, a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right of the current block.
[0109] However, some neighboring reference samples of the current block may not yet be decoded or available. In this case, the decoder can configure neighboring reference samples for prediction by replacing unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be configured by interpolation of available samples.
[0110] When deriving neighboring reference samples, (i) the prediction sample may be derived based on an average or interpolation of neighboring reference samples of the current block, and (ii) the prediction sample may be derived based on reference samples existing in a specific (prediction) direction for the prediction sample among peripheral reference samples of the current block. Case (i) may be referred to as a non-directional mode or a non-angular mode, and case (ii) may be referred to as a directional mode or an angular mode.
[0111] Further, based on the prediction samples of the current block in the neighboring reference samples, the prediction samples can be generated by interpolating between the first neighboring samples located in the prediction direction of the intra prediction mode of the current block and the second neighboring samples located in the opposite direction of the prediction direction. The above situation can be called linear interpolation intra prediction (LIP). In addition, a linear model can be used to generate chrominance prediction samples based on luma samples. This situation can be called LM mode.
[0112] In addition, the temporary prediction sample of the current block can be derived based on the filtered neighboring reference samples, and the prediction sample of the current block can be derived by weighted summing at least one reference sample derived according to the intra prediction mode among the existing neighboring reference samples (i.e., unfiltered neighboring reference samples) and the temporary prediction sample. The above situation can be called position-dependent intra prediction (PDPC).
[0113] In addition, a reference sample line with the highest prediction accuracy among the neighboring multiple reference sample lines of the current block can be selected to derive a prediction sample by using a reference sample in a prediction direction located on the corresponding line, and then the reference sample line used herein can be indicated (signaled) to a decoding device, thereby performing intra-frame prediction encoding. The above situation can be referred to as multi-reference line (MRL) intra-frame prediction or MRL-based intra-frame prediction.
[0114] In addition, intra prediction can be performed by dividing the current block into vertical or horizontal sub-partitions based on the same intra prediction mode, and neighboring reference samples can be derived and used in units of sub-partitions. That is, in this case, the intra prediction mode of the current block is also applicable to the sub-partitions, and in some cases, the intra prediction performance can be improved by deriving and using neighboring reference samples in units of sub-partitions. This prediction method can be called intra sub-partitioning (ISP) or intra prediction based on ISP.
[0115] The above-mentioned intra-frame prediction method may be referred to as an intra-frame prediction type separate from the intra-frame prediction mode. The intra-frame prediction type may be referred to in various terms, such as an intra-frame prediction technique or an additional intra-frame prediction mode. For example, the intra-frame prediction type (or additional intra-frame prediction mode) may include at least one of the above-mentioned LIP, PDPC, MRL, and ISP. General intra-frame prediction methods other than specific intra-frame prediction types such as LIP, PDPC, MRL, or ISP may be referred to as normal intra-frame prediction types. When a specific intra-frame prediction type is not applied, a normal intra-frame prediction type may generally be applied, and prediction may be performed based on the above-mentioned intra-frame prediction mode. At the same time, post-filtering may be performed on the derived prediction samples as needed.
[0116] Specifically, the intra prediction process may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. In addition, a post-filtering step may be performed on the derived prediction samples as needed.
[0117] When intra prediction is applied, the intra prediction mode of the neighboring block can be used to determine the intra prediction mode applied to the current block. For example, the decoding device can select one of the mpm candidates in the mpm list derived from the intra prediction mode of the neighboring block (e.g., the left and / or upper neighboring block) of the current block based on the received most likely mode (mpm) index, and select one of the other remaining intra prediction modes not included in the mpm candidate (and the plane mode) based on the remaining intra prediction mode information. The mpm list can be configured to include or exclude the plane mode as a candidate. For example, if the mpm list includes the plane mode as a candidate, the mpm list may have six candidates. If the mpm list does not include the plane mode as a candidate, the mpm list may have five candidates. When the mpm list does not include the plane mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not a plane mode can be signaled. For example, the mpm flag can be signaled first, and when the value of the mpm flag is 1, the mpm index and the non-planar flag can be signaled. In addition, the mpm index may be signaled when the value of the non-planar flag is 1. Here, the mpm list is configured to not include the planar mode as a candidate does not intend to indicate that the planar mode is not mpm, but rather to first signal the non-planar flag to first check whether it is the planar mode, because the planar mode is always considered to be mpm.
[0118] For example, it can be indicated based on an mpm flag (e.g., Intra_luma_mpm_flag) whether the intra prediction mode applied to the current block is in the mpm candidates (and planar mode) or in the remaining mode. A value of 1 for the mpm flag can indicate that the intra prediction mode for the current block is within the mpm candidates (and planar mode), and a value of 0 for the mpm flag can indicate that the intra prediction mode for the current block is not in the mpm candidates (and planar mode). A value of 0 for a non-planar flag (e.g., Intra_luma_not_planar_flag) can indicate that the intra prediction mode of the current block is a planar mode, and a value of 1 for the non-planar flag value can indicate that the intra prediction mode of the current block is not a planar mode. The mpm index can be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may index the remaining intra prediction modes that are not included in the mpm candidates (and planar modes) in all intra prediction modes in the order of the prediction mode numbers to indicate one of them. The intra prediction mode may be an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of an mpm flag (e.g., Intra_luma_mpm_flag), a non-planar flag (e.g., Intra_luma_not_planar_flag), an mpm index (e.g., mpm_idx or intra_luma_mpm_idx), and remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this document, the MPM list may be referred to by a variety of terms, such as MPM candidate list and candModeList. When a MIP is applied to the current block, a separate mpm flag (eg, intra_mip_mpm_flag), mpm index (eg, intra_mip_mpm_idx), and remaining intra prediction mode information (eg, intra_mip_mpm_remainder) for the MIP may be signaled and the non-planar flag may not be signaled.
[0119] In other words, in general, when block segmentation is performed on an image, the current block to be coded and the neighboring blocks have similar image characteristics. Therefore, the probability that the current block and the neighboring blocks have the same or similar intra-frame prediction mode is high. Therefore, the encoder can use the intra-frame prediction mode of the neighboring block to encode the intra-frame prediction mode of the current block.
[0120] For example, the encoder / decoder may configure a list of most probable modes (MPMs) for the current block. The MPM list may also be referred to as an MPM candidate list. Here, MPM may refer to a mode that considers the similarity between the current block and the neighboring blocks in intra-prediction mode coding to improve coding efficiency. As described above, the MPM list may be configured to include a planar mode or may be configured to exclude a planar mode. For example, when the MPM list includes a planar mode, the number of candidates in the MPM list may be 6. If the MPM list does not include a planar mode, the number of candidates in the MPM list may be 5.
[0121] The encoder / decoder can be configured with an MPM list consisting of 5 or 6 MPMs.
[0122] To configure the MPM list, three modes can be considered: default intra mode, neighborhood intra mode and derived intra mode.
[0123] For the neighborhood intra mode, two neighboring blocks may be considered, namely the left neighboring block and the upper neighboring block.
[0124] As described above, if the MPM list is configured not to include the planar mode, the planar mode is excluded from the list and the number of MPM list candidates may be set to five.
[0125] Furthermore, the non-directional mode (or non-angular mode) among the intra prediction modes may include a DC mode based on an average of neighboring reference samples of the current block or a planar mode based on interpolation.
[0126] When inter-frame prediction is applied, the predictor of the encoding device / decoding device can derive prediction samples by performing inter-frame prediction in units of blocks. Inter-frame prediction can be a prediction derived in a manner that depends on data elements (e.g., sample values or motion information) of pictures other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction sample array) of the current block can be derived based on the reference block (reference sample array) specified by the motion vector on the reference picture indicated by the reference picture index. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block can be predicted in units of blocks, sub-blocks or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. Temporally neighboring blocks may be referred to as collocated reference blocks, collocated CUs (colCUs), etc., and reference pictures including temporally neighboring blocks may be referred to as collocated pictures (colPic). For example, a motion information candidate list may be configured based on neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the motion information of the current block may be the same as the motion information of the neighboring blocks. In skip mode, unlike merge mode, a residual signal may not be sent. In the case of motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor and the motion vector of the current block may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.
[0127] According to the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. The motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as an L0 prediction, prediction based on the L1 motion vector may be referred to as an L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as a dual prediction. Here, the L0 motion vector may indicate a motion vector associated with the reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with the reference picture list L1 (L1). The reference picture list L0 may include a picture earlier than the current picture in the output order as a reference picture, and the reference picture list L1 may include a picture later than the current picture in the output order as a reference picture. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include a picture later than the current picture in the output order as a reference picture. In this case, the previous picture may be indexed first in the reference picture list L0, and the subsequent picture may be indexed later. The reference picture list L1 may further include a picture before the current picture in the output order as a reference picture. In this case, the subsequent picture may be indexed first in the reference picture list 1, and the previous picture may be indexed later. The output order may correspond to a picture order count (POC) order.
[0128] Figure 4 The hierarchical structure for compiling images / videos is shown exemplarily.
[0129] Reference Figure 4 , the coded image / video is divided into the video coding layer (VCL) that handles the decoding process of the image / video and its own, the subsystem that sends and stores the coding information, and the NAL (Network Abstraction Layer) that is responsible for the network adaptation function and exists between the VCL and the subsystem.
[0130] In the VCL, VCL data including compressed image data (slice data) is generated, or a parameter set including a picture parameter set (PSP), a sequence parameter set (SPS), and a video parameter set (VPS) or a supplemental enhancement information (SEI) message additionally required for an image decoding process may be generated.
[0131] In NAL, a NAL unit may be generated by adding header information (NAL unit header) to a raw byte sequence payload (RBSP) generated in a VCL. In this case, RBSP refers to slice data, parameter sets, SEI messages, etc. generated in a VCL. The NAL unit header may include NAL unit type information specified according to the RBSP data included in the corresponding NAL unit.
[0132] As shown in the figure, according to the RBSP generated in the VCL, the NAL unit can be classified into a VCL NAL unit and a non-VCL NAL unit. The VCL NAL unit may refer to a NAL unit including information about an image (slice data), and the non-VCL NAL unit may refer to a NAL unit including information required for decoding an image (parameter set or SEI message).
[0133] The above-mentioned VCL NAL unit and non-VCL NAL unit can be sent through the network by attaching header information according to the data standard of the subsystem. For example, the NAL unit can be converted into a data format of a predetermined standard such as H.266 / VVC file format, real-time transport protocol (RTP), transport stream (TS), etc., and sent through various networks.
[0134] As described above, a NAL unit may be specified using a NAL unit type according to an RBSP data structure included in a corresponding NAL unit, and information about the NAL unit type may be stored in a NAL unit header and signaled.
[0135] For example, NAL units can be classified into VCL NAL unit types and non-VCL NAL unit types according to whether the NAL unit includes information about an image (slice data). VCL NAL unit types can be classified according to the nature and type of pictures included in the VCL NAL unit, and non-VCL NAL unit types can be classified according to the type of parameter set.
[0136] The following are examples of NAL unit types specified according to the type of parameter sets included in a non-VCL NAL unit type.
[0137] - APS (Adaptation Parameter Set) NAL unit: type used for NAL units that include APS
[0138] - DPS (Decoding Parameter Set) NAL unit: type used for NAL units that include DPS
[0139] - VPS (Video Parameter Set) NAL unit: type used for NAL units that include VPS
[0140] - SPS (Sequence Parameter Set) NAL unit: type used for NAL units that include SPS
[0141] - PPS (Picture Parameter Set) NAL unit: type used for NAL units that include PPS
[0142] - PH (Picture Header) NAL unit: type used for NAL units that include PH
[0143] The above-mentioned NAL unit type may have syntax information for the NAL unit type, and the syntax information may be stored and signaled in the NAL unit header. For example, the syntax information may be nal_unit_type, and the NAL unit type may be specified by the nal_unit_type value.
[0144] Meanwhile, as described above, a picture may include multiple slices, and a slice may include a slice header and slice data. In this case, a picture header may be further added to multiple slices (slice headers and slice data sets) in a picture. The picture header (picture header syntax) may include information / parameters generally applicable to pictures. In this article, slices may be mixed or replaced with tiles. In addition, in this article, slice headers may be mixed or replaced with tile group headers.
[0145] A slice header (slice header syntax) may include information / parameters that are generally applied to slices. APS (APS syntax) or PPS (PPS syntax) may include information / parameters that may be commonly applied to one or more slices or pictures. SPS (SPS syntax) may include information / parameters that may be commonly applied to one or more sequences. VPS (VPS syntax) may include information / parameters that may be commonly applied to multiple layers. DPS (DPS syntax) may include information / parameters that may be commonly applied to the entire video. DPS may include information / parameters related to the concatenation of coded video sequences (CVS). The high-level syntax (HLS) herein may include at least one of APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, and slice header syntax.
[0146] In this article, the image / image information encoded from the encoding device and signaled to the decoding device in the form of a bit stream includes not only segmentation-related information, intra-frame / inter-frame prediction information, residual information, in-loop filtering information, etc. in the picture, but also includes information included in the slice header, information included in the APS, information included in the PPS, information included in the SPS and / or information included in the VPS.
[0147] At the same time, in order to compensate for the difference between the original image and the reconstructed image due to errors occurring in the compression coding process such as quantization, an in-loop filtering process may be performed on the reconstructed sample or the reconstructed picture as described above. As described above, in-loop filtering may be performed by the filter of the encoding device and the filter of the decoding device, and a deblocking filter, SAO and / or an adaptive loop filter (ALF) may be applied. For example, the ALF process may be performed after the deblocking filtering process and / or the SAO process are completed. However, even in this case, the deblocking filtering process and / or the SAO process may be omitted.
[0148] Meanwhile, in order to improve coding efficiency, Luma Mapping and Chroma Scaling (LMCS) may be applied as described above. LMCS may be referred to as a loop shaper (shaping). In order to improve coding efficiency, signaling of LMCS control and / or LMCS-related information may be performed hierarchically.
[0149] Figure 5 The hierarchical structure of the CVS according to the embodiments of the present invention is exemplarily shown. A compiled video sequence (CVS) may include a sequence parameter set (SPS), a picture parameter set (PPS), a patch group header, patch data and / or a CTU. Here, the patch group header and the patch data may be referred to as a slice header and slice data, respectively.
[0150] The SPS may originally include a flag to enable the tool to be used in the CVS. In addition, the SPS may be referenced by a PPS including information about parameters that change for each picture. Each of the coded pictures may include one or more coded rectangular domain tiles. The tiles may be grouped to form tile groups by raster scanning. Each tile group is encapsulated with header information called a tile group header. Each tile consists of a CTU including coded data. Here, the data may include original sample values, predicted sample values, and their brightness and chrominance components (brightness predicted sample values and chrominance predicted sample values).
[0151] Figure 6 An exemplary LMCS structure according to embodiments herein is illustrated. Figure 6 The LMCS structure 600 includes an in-loop mapping section 610 for luma components and a luma-dependent chroma residual scaling section 620 for chroma components based on an adaptive piecewise linear (adaptive PWL) model. The dequantization and inverse transform 611, reconstruction 612, and intra prediction 613 blocks of the in-loop mapping section 610 represent the processes applied in the mapped (shaped) domain. The loop filter 615, motion compensation or inter prediction 617 blocks of the in-loop mapping section 610, and the reconstruction 622, intra prediction 623, motion compensation or inter prediction 624, and loop filter 625 blocks of the chroma residual scaling section 620 represent the processes applied in the original (non-mapped, non-shaped) domain.
[0152] like Figure 6 As shown, when LMCS is enabled, at least one of an inverse mapping (shaping) process 614, a forward mapping (shaping) process 618, and a chroma scaling process 621 may be applied. For example, the inverse mapping process may be applied to (reconstructed) luma samples (or luma samples or luma sample arrays) in a reconstructed picture. The inverse mapping process may be performed based on a piecewise function (inverse) index of the luma sample. The piecewise function (inverse) index may identify the segment to which the luma sample belongs. The output of the inverse mapping process is a modified (reconstructed) luma sample (or a modified luma sample or a modified luma sample array). LMCS may be enabled or disabled at a tile group (or slice), picture, or higher level.
[0153] A forward mapping process and / or a chroma scaling process may be applied to generate a reconstructed picture. A picture may include a luma sample and a chroma sample. A reconstructed picture with a luma sample may be referred to as a reconstructed luma picture, and a reconstructed picture with a chroma sample may be referred to as a reconstructed chroma picture. A combination of a reconstructed luma picture and a reconstructed chroma picture may be referred to as a reconstructed picture. A reconstructed luma picture may be generated based on a forward mapping process. For example, if inter prediction is applied to a current block, forward mapping is applied to luma prediction samples derived based on (reconstructed) luma samples in a reference picture. Because (reconstructed) luma samples in a reference picture are generated based on an inverse mapping process, forward mapping may be applied to luma prediction samples, thereby deriving mapped (shaped) luma prediction samples. A forward mapping process may be performed based on a piecewise function index of a luma prediction sample. A piecewise function index may be derived based on a value of a luma prediction sample in a reference picture for inter prediction or a value of a luma sample. If intra prediction (or intra block copy (IBC)) is applied to a current block, forward mapping is not required because the inverse mapping process has not yet been applied to the reconstructed samples in the current picture. The (reconstructed) luma samples in the reconstructed luma picture are generated based on the mapped luma prediction samples and the corresponding luma residual samples.
[0154] A reconstructed chroma picture can be generated based on a chroma scaling process. For example, a reconstructed chroma picture can be generated based on the chroma prediction samples and the chroma residual samples (c res ) derives the (reconstructed) chroma samples in the reconstructed chroma picture. Based on the (scaled) chroma residual samples (c resScale ) and the chroma residual scaling factor (cScaleInv can be called varScale) to derive the chroma residual samples (c res ). The chroma residual scaling factor can be calculated based on the shaped brightness prediction sample value of the current block. For example, the chroma residual scaling factor can be calculated based on the shaped brightness prediction sample value Y' pred The average brightness value ave(Y' pred ) to calculate the scaling factor. For reference, Figure 6 In the example, the (scaled) chroma residual samples derived based on the inverse transform / dequantization can be referred to as c resScale , and the chroma residual samples derived by performing the (inverse) scaling process on the (scaled) chroma residual samples may be referred to as c res .
[0155] Figure 7 FIG. 4 illustrates a LMCS structure according to another embodiment of the present invention. Figure 6 describe Figure 7 Here, we mainly describe Figure 7 The LMCS structure and Figure 6 The differences between the LMCS structures 600. Figure 7 The in-loop mapping part and the brightness-dependent chroma residual scaling part can be combined with Figure 6 The in-loop mapping section 610 and the luma-dependent chroma residual scaling section 620 operate identically (similarly).
[0156] refer to Figure 7 , the chroma residual scaling factor can be derived based on the luma reconstruction samples. In this case, the average luma value (avgYr) can be obtained (derived) based on the neighboring luma reconstruction samples outside the reconstructed block instead of the internal luma reconstruction samples of the reconstructed block, and the chroma residual scaling factor can be derived based on the average luma value (avgYr). Here, the neighboring luma reconstruction samples can be neighboring luma reconstruction samples of the current block, or can be neighboring luma reconstruction samples of the virtual pipe data unit (VPDU) including the current block. For example, when intra prediction is applied to the target block, the reconstructed samples can be derived based on the prediction samples derived based on the intra prediction. In another example, when inter prediction is applied to the target block, forward mapping is applied to the prediction samples derived based on the inter prediction, and the reconstructed samples are generated (derived) based on the shaped (or forward mapped) luma prediction samples.
[0157] The video / image information signaled by the bitstream may include LMCS parameters (information about LMCS). The LMCS parameters may be configured as high-level syntax (HLS, including slice header syntax), etc. A detailed description and configuration of the LMCS parameters will be described later. As described above, the syntax table described in this document (and the following embodiments) may be configured / encoded at the encoder end and signaled to the decoder end via the bitstream. The decoder may parse / decode the information about LMCS in the syntax table (in the form of syntax elements). One or more embodiments described below may be combined. The encoder may encode the current picture based on the information about LMCS, and the decoder may decode the current picture based on the information about LMCS.
[0158] The in-loop mapping of the luminance component can adjust the dynamic range of the input signal to improve compression efficiency by redistributing codewords across the dynamic range. For luminance mapping, a forward mapping (shaping) function (FwdMap) and an inverse mapping (shaping) function (InvMap) corresponding to the forward mapping function (FwdMap) can be used. A piecewise linear model can be used to signal the FwdMap function, for example, the piecewise linear model can have 16 segments or bins. These segments can have equal lengths. In one example, the InvMap function does not need to be signaled, but is derived from the FwdMap function. That is, the inverse mapping can be a function of the forward mapping. For example, the inverse mapping function can be mathematically constructed as a symmetric function of the forward mapping based on y=x.
[0159] In-loop (luminance) shaping can be used to map input luminance values (samples) to altered values in a shaped domain. The shaped values can be compiled and then mapped back to the original (unmapped, unshaped) domain after reconstruction. To compensate for the interaction between the luminance signal and the chrominance signal, chrominance residual scaling can be applied. In-loop shaping is accomplished by specifying a high-level syntax for the shaper model. The shaper model syntax can signal a piecewise linear model (PWL model). A forward lookup table (FwdLUT) and / or an inverse lookup table (InvLUT) can be derived based on the piecewise linear model. For example, when deriving the forward lookup table FwdLUT, an inverse lookup table InvLUT can be derived based on the forward lookup table FwdLUT. The forward lookup table FwdLUT can map the input luminance value Yi to the altered value Yr, and the inverse lookup table InvLUT can map the altered value Yr to the reconstructed value Y'i. The reconstructed value Y'i can be derived based on the input luminance value Yi.
[0160] In one example, the SPS may include the syntax of Table 1 below. The syntax of Table 1 may include sps_reshaper_enabled_flag as a tool enable flag. Here, sps_reshaper_enabled_flag may be used to specify whether a reshaper is used in a coded video sequence (CVS). That is, sps_reshaper_enabled_flag may be a flag in the SPS to enable reshaping. In one example, the syntax of Table 1 may be part of the SPS.
[0161] [Table 1]
[0162]
[0163] In one example, the semantics for the syntax elements sps_seq_parameter_set_id and sps_reshaper_enabled_flag may be as shown in Table 2 below.
[0164] [Table 2]
[0165] sps_seq_parameter_set_id provides an identifier for the SPS for reference by other syntax elements sps_reshaper_enabled_flag equal to 1 specifies that the reshaper is used in the coded video sequence (CVS). sps_reshaper_enabled_flag equal to 0 specifies that the reshaper is not used in the CVS.
[0166] In one example, the tile group header or the slice header may include the syntax of Table 3 or Table 4 below.
[0167] [Table 3]
[0168]
[0169] [Table 4]
[0170]
[0171] The semantics of the syntax elements included in the syntax of Table 3 or Table 4 may include, for example, the contents disclosed in the following table.
[0172] [Table 5]
[0173] tile_group_reshaper_model_present_flag equal to 1 specifies that tile_group_reshaper_model() is present in the tile group header. tile_group_reshaper_model_present_flag equal to 0 specifies 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 inferred to be equal to 0. tile_group_reshaper_chroma_residual_scale_flag equal to 1 specifies that chroma residual scaling is enabled for the current tile group. tile_group_reshaper_chroma_residual_scale_flag equal to 0 specifies that chroma residual 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.
[0174] [Table 6]
[0175] slice_reshaper_model_present_flag equal to 1 specifies that slice_reshaper_model() is present in the slice header. slice_reshaper_model_present_flag equal to 0 specifies that slice_reshaper_model() is not present in the slice header. When slice_reshaper_model_present_flag is not present, it is inferred to be equal to 0. slice_reshaper_enabled_flag equal to 1 specifies that the reshaper is enabled for the current slice. slice_reshaper_enabled_flag equal to 0 specifies that the reshaper is not enabled for the current slice. When slice_reshaper_enabled_flag is not present, it is inferred to be equal to 0. slice_reshaper_chroma_residual_scale_flag equal to 1 specifies that chroma residual scaling is enabled for the current slice. slice_reshaper_chroma_residual_scale_flag equal to 0 specifies that chroma residual scaling is not enabled for the current slice. When slice_reshaper_chroma_residual_scale_flag is not present, it is inferred to be equal to 0.
[0176] As an example, once the reshaping-enabled flag (i.e., sps_reshaper_enabled_flag) is parsed in the SPS, the tile group header may parse additional data (i.e., information included in Table 5 or 6 above) for constructing the lookup tables (FwdLUT and / or InvLUT). To do this, the state of the SPS reshaper flag (sps_reshaper_enabled_flag) may first be checked in the slice header or tile group header. When sps_reshaper_enabled_flag is true (or 1), an additional flag, tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag), may be parsed. The purpose of tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) may be to indicate the presence of a reshaping model. For example, when tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) is true (or 1), it may indicate that a reshaper exists for the current tile group (or current slice). When tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) is false (or 0), it may indicate that a reshaper does not exist for the current tile group (or current slice).
[0177] If a reshaper exists and is enabled in the current slice group (or current slice), the reshaper model may be processed (i.e., tile_group_reshaper_model() or slice_reshaper_model()). In addition to this, an additional flag tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) may be parsed. tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) may indicate whether the reshaping model is used for the current tile group (or slice). For example, if tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) is 0 (or false), it may indicate that the reshaping model is not used for the current tile group (or current slice). If tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) is 1 (or true), it may indicate that the reshaping model is used for the current tile group (or slice).
[0178] As an example, tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) may be true (or 1) and tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) may be false (or 0). This means that the reshaping model exists but is not used in the current tile group (or slice). In this case, the reshaping model may be used in future tile groups (or slices). As another example, tile_group_reshaper_enable_flag may be true (or 1) and tile_group_reshaper_model_present_flag may be false (or 0). In this case, the decoder uses the reshaper from the previous initialization.
[0179] When parsing the reshaping model (i.e. tile_group_reshaper_model() or slice_reshaper_model()) and tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag), it can be determined (evaluated) whether the conditions required for chroma scaling exist. The above conditions include condition 1 (the current tile group / slice is not intra-coded) and / or condition 2 (the current tile group / slice is not divided into two separate coded quadtree structures for luma and chroma, i.e., the block structure for the current tile group / slice is not a dual tree structure). If condition 1 and / or condition 2 are true and / or tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) is true (or 1), tile_group_reshaper_chroma_residual_scale_flag (or slice_reshaper_chroma_residual_scale_flag) can be parsed. When tile_group_reshaper_chroma_residual_scale_flag (or slice_reshaper_chroma_residual_scale_flag) is enabled (if it is 1 or true), it can indicate that chroma residual scaling is enabled for the current tile group (or slice). When tile_group_reshaper_chroma_residual_scale_flag (or slice_reshaper_chroma_residual_scale_flag) is disabled (if it is 0 or false), it can indicate that chroma residual scaling is disabled for the current tile group (or slice).
[0180] The purpose of the tile group shaping model is to parse the data needed to build a lookup table (LUT). The idea behind building these LUTs is that the distribution of the permissible range of luminance values can be divided into a number of bins (e.g. 16 bins) that can be represented using a set of 16 PWL equations. Therefore, any luminance value that lies within a given bin can be mapped to a changed luminance value.
[0181] Figure 8 A diagram showing an exemplary forward mapping is shown. Figure 8 In FIG. 5 , five bins are exemplarily illustrated.
[0182] refer to Figure 8, the x-axis represents the input luminance value, and the y-axis represents the altered output luminance value. The x-axis is divided into 5 bins or slices, each of which has a length of L. That is, the five bins mapped to the altered luminance value have the same length. A forward lookup table (FwdLUT) can be constructed using data available from the tile group header (i.e., the shaper data), thereby facilitating the mapping.
[0183] In one embodiment, an output pivot point associated with a bin index may be calculated. The output pivot point may set (mark) the minimum and maximum boundaries of an output range for brightness codeword shaping. The calculation process of the output pivot point may be performed by calculating a piecewise cumulative distribution function (CDF) of the number of codewords. The output pivot range may be sliced based on the maximum number of bins to be used and the size of the lookup table (FwdLUT or InvLUT). As an example, the output pivot range may be sliced based on the product between the maximum number of bins and the size of the lookup table (size of the LUT * maximum number of bin indices). For example, if the product between the maximum number of bins and the size of the lookup table is 1024, the output pivot range may be sliced into 1024 entries. This slicing of the output pivot range may be performed (applied or implemented) based on (using) a scaling factor. In one example, the scaling factor may be derived based on Equation 1 below.
[0184] [Equation 1]
[0185]
[0186] In Equation 1, SF represents a scaling factor, and y1 and y2 represent output pivot points corresponding to each bin. In addition, FP_PREC and c may be predetermined constants. The scaling factor determined based on Equation 1 may be referred to as a scaling factor for forward shaping.
[0187] In another embodiment, with respect to inverse shaping (inverse mapping), for a defined range of bins to be used (i.e., from reshaper_model_min_bin_idx to reshape_model_max_bin_idx), the input shaping pivot point corresponding to the mapping pivot point of the forward LUT and the inverse output pivot point of the mapping (given by the number of considered bin index * initial codewords) are extracted. In another example, the scaling factor SF can be derived based on Equation 2 below.
[0188] [Equation 2]
[0189]
[0190] In Equation 2, SF represents a scaling factor, x1 and x2 represent input pivot points, and y1 and y2 represent output pivot points corresponding to each bin (inversely mapped output pivot points). Here, the input pivot point may be a pivot point mapped based on a forward lookup table (FwdLUT), and the output pivot point may be a pivot point inversely mapped based on an inverse lookup table (InvLUT). In addition, FP_PREC may be a predetermined constant value. The FP_PREC of Equation 2 may be the same as or different from the FP_PREC of Equation 1. The scaling factor determined based on Equation 2 may be referred to as a scaling factor for inverse shaping. During inverse shaping, segmentation of the input pivot point may be performed based on the scaling factor of Equation 2. The scaling factor SF is used to divide the range of the input pivot point. Based on the split input pivot points, bin indices ranging from 0 to minimum bin index (reshaper_model_min_bin_idx) and / or from minimum bin index (reshaper_model_min_bin_idx) to maximum bin index (reshape_model_max_bin_idx) are assigned pivot values corresponding to the minimum and maximum bin values.
[0191] Table 7 below shows the syntax of the shaper model according to an embodiment. The shaper model may be referred to as a shaping model or an LMCS model. Here, the shaper model has been exemplarily described as a tile group shaper, but this document is not necessarily limited to this embodiment. For example, the shaper model may be included in the APS, or the tile group shaper model may be referred to as a slice shaper model or LMCS data. In addition, the prefix reshaper_model or Rsp may be used interchangeably with lmcs. For example, in the following table and the following description, reshaper_model_min_bin_idx, reshaper_model_delta_max_bin_idx, reshaper_model_max_bin_idx, RspCW, RsepDeltaCW may be used interchangeably with lmcs_min_bin_idx, lmcs_delta_max_bin_idx, lmcs_max_bin_idx, lmcsCW, lmcsDeltaCW, respectively.
[0192] [Table 7]
[0193]
[0194] The semantics of the syntax elements included in the syntax of Table 7 may include, for example, the contents disclosed in the following table.
[0195] [Table 8]
[0196] <![CDATA[reshape_model_min_bin_idx specifies the minimum bin (or segment) index to be used in the reshaper reconstruction process. reshape_model_min_bin_idx shall be in the range of 0 to MaxBinIdx (including 0 and MaxBinIdx). The value of MaxBinIdx shall be equal to 15. reshape_model_delta_max_bin_idx specifies the maximum allowable bin (or segment) index MaxBinIdx minus the maximum bin index to be used in the reshaper reconstruction process. The value of reshape_model_max_bin_idx is set to be equal to MaxBinIdx - reshape_model_delta_max_bin_idx. reshaper_model_bin_delta_abs_cw_prec_minus1 plus 1 specifies the number of bits to be used for the representation of the syntactic reshape_model_bin_delta_abs_CW[i]. reshape_model_bin_delta_abs_CW[i] specifies the absolute change (delta) codeword value for the i-th bin. reshaper_model_bin_delta_sign_CW_flag[i] specifies the sign of reshape_model_bin_delta_abs_CW[i] as follows: - If reshape_model_bin_delta_sign_CW_flag[i] is equal to 0, the corresponding variable RspDeltaCW[i] is positive. - Otherwise (reshape_model_bin_delta_sign_CW_flag[i] is not equal to 0), the corresponding variable RspDeltaCW[i] is negative. The variable OrgCW is derived as follows: OrgCW = (1<<BitDepthY) / 16 When reshape_model_bin_delta_sign_CW_flag[i] does not exist, it is inferred to be equal to 0. The variable RspDeltaCW[i]=(1 - 2 * reshape_model_bin_delta_sign_CW[i]) * reshape_model_bin_delta_abs_CW[i]; The variable RspCW[i] is derived according to the following steps: The variable OrgCW is set to be equal to (1<<BitDepth Y ) / (MaxBinIdx + 1)- if reshaper_model_min_bin_idx<=i <= reshaper_model_max_bin_idxRspCW[i] = OrgCW+RspDeltaCW[i]- otherwise, RspCW[i]=0. The value of RspCW[i] shall be in the range of (OrgCW>>3) to (OrgCW<<3-1) (inclusive). The variable InputPivot[i] with i in the range of 0 to MaxBinIdx+1 (inclusive) is derived as follows: InputPivot[i] = i * OrgCW]]>
[0197] The variables ReshapePivot[i] with i in the range of 0 to MaxBinIdx+1 (including 0 and MaxBinIdx+1), the variables ScaleCoef[i] and InvScaleCoeff[i] with i in the range of 0 to MaxBinIdx (including 0 and MaxBinIdx) are derived as follows: #timg# The variable ChromaScaleCoef[i] with i in the range of 0 to MaxBinIdx (including 0 and MaxBinIdx) is derived as follows: #timg#
[0198] The inverse mapping process of the brightness samples according to this article can be described in the form of standard literature as shown in the following table.
[0199] [Table 9]
[0200] Inverse mapping process for luma samples The input to this process is the luma sample lumaSample. The output of this process is the modified luma sample invLumaSample. The value of invLumaSample is derived as follows: - If slice_lmcs_enabled_flag of the slice containing the luma sample lumaSample is equal to 1, the following ordered steps apply: 1. The variable idxYInv is derived by calling the identification of the piecewise function indexing process for luma samples as specified in clause 8.8.2.3, with lumaSample as input and idxYInv as output. 2. The variable invSample is derived as follows: #timg# 3. The inverse mapped luma sample invLumaSample is derived as follows: #timg# - Otherwise, invLumaSample is set equal to lumaSample.
[0201] The identification of the piecewise function indexing process for luma samples according to this document may be described in the form of a standard document as shown in the following table: In Table 10, idxYInv may be referred to as an inverse mapping index, and the inverse mapping index may be derived based on the reconstructed luma sample (lumaSample).
[0202] [Table 10]
[0203] Identification of the piecewise function indexing process for luma samples The input to this process is the luma sample lumaSample. The output of this process is the index idxYInv identifying the fragment to which the luma sample lumaSample belongs. The variable idxYInv is derived as follows: #timg#
[0204] Luminance mapping may be performed based on the above embodiments and examples, wherein the above syntax and components included therein may be merely exemplary representations, and the embodiments herein are not limited by the above tables or equations. In the following, a method for performing chrominance residual scaling (scaling the chrominance components of the residual samples) based on luma mapping is described.
[0205] (Lumence-dependent) chroma residual scaling is designed to compensate for the interaction between a luma signal and its corresponding chroma signal. For example, whether chroma residual scaling is enabled is also signaled at the tile group level. In one example, if luma mapping is enabled and if dual-tree partitioning (also known as separate chroma trees) is not applied to the current tile group, an additional flag is signaled to indicate whether luma-dependent chroma residual scaling is enabled. In other examples, luma-dependent chroma residual scaling is disabled when luma mapping is not used, or when dual-tree partitioning is used in the current tile group. In another example, luma-dependent chroma residual scaling is always disabled for chroma blocks with an area less than or equal to 4.
[0206] The chroma residual scaling may be based on the average value of the corresponding luma prediction block (the luma component of the prediction block to which the intra prediction mode and / or the inter prediction mode is applied). The scaling operation at the encoder and / or decoder may be implemented using fixed-point integer arithmetic based on Equation 3 below.
[0207] [Equation 3]
[0208]
[0209] In Equation 3, c represents the chroma residual (chroma residual samples, chroma components of residual samples), c' represents the scaled chroma residual samples (scaled chroma components of residual samples), s represents the chroma residual scaling factor, and CSCALE_FP_PREC represents a (predefined) constant value to specify the precision. For example, CSCALE_FP_PREC can be 11. .
[0210] Fig. 9 is a flowchart illustrating a method for deriving a chroma residual scaling index according to an embodiment of the present invention. Figure 6 and included in Figure 6 Tables, equations, variables, arrays, and function execution in the description Fig. 9 method.
[0211] In step S910, it can be determined whether the prediction mode of the current block is an intra prediction mode or an inter prediction mode based on the prediction mode information. If the prediction mode is an intra prediction mode, the current block or the prediction sample of the current block is considered to be already in the shaped (mapped) area. If the prediction mode is an inter prediction mode, the current block or the prediction sample of the current block is considered to be in the original (unmapped, unshaped) area.
[0212] In step S920, when the prediction mode is the intra prediction mode, the average of the current block (or the brightness prediction samples of the current block) can be calculated (derived). That is, the average of the current block in the shaped area is directly calculated. The average can also be called the average value, mean value or mean.
[0213] In step S921, when the prediction mode is the inter prediction mode, forward shaping (forward mapping) may be performed (applied) on the luma prediction samples of the current block. Through forward shaping, the luma prediction samples based on the inter prediction mode may be mapped from the original region to the shaping region. In an example, the forward shaping of the luma prediction samples is performed based on the shaping model described in Table 7 above.
[0214] In step S922, the average of the forward shaping (forward mapping) luma prediction samples may be calculated (derived). That is, an average process of the forward shaping results may be performed.
[0215] In step S930, a chroma residual scaling index may be calculated. When the prediction mode is an intra prediction mode, the chroma residual scaling index may be calculated based on an average of luma prediction samples. When the prediction mode is an inter prediction mode, the chroma residual scaling index may be calculated based on an average of forward shaped luma prediction samples.
[0216] In an embodiment, the chroma residual scaling index may be calculated based on a loop syntax. The following table shows an example of a loop syntax for deriving (calculating) a chroma residual scaling index.
[0217] [Table 11]
[0218]
[0219] In Table 11, idxS represents the chroma residual scaling index, idxFound represents whether the index of the chroma residual scaling index that satisfies the if statement condition is obtained, S represents a predetermined constant value, and MaxBinIdx represents the maximum allowed bin index. ReshapPivot[idxS+1] can be derived based on Tables 7 and / or 8 above.
[0220] In an embodiment, the chroma residual scaling factor may be derived based on the chroma residual scaling index. Equation 4 is an example for deriving the chroma residual scaling factor.
[0221] [Equation 4]
[0222]
[0223] In Equation 4, s represents a chroma residual scaling factor, and ChromaScaleCoef may be a variable (or array) derived based on Table 7 and / or Table 8 above.
[0224] As described above, an average luma value of the reference sample may be obtained, and a chroma residual scaling factor may be derived based on the average luma value. As described above, the chroma component residual samples may be scaled based on the chroma residual scaling factor, and chroma component reconstructed samples may be generated based on the scaled chroma component residual samples.
[0225] In one embodiment of the present invention, a signaling structure for effectively applying the above-mentioned LMCS is proposed. According to the embodiment of the present invention, for example, LMCS data can be included in HLS (ie, APS), and through the header information (ie, picture header, slice header) of the lower level of APS, the LMCS model (shaper model) can be adaptively derived by signaling the ID of APS (which is called header information). The LMCS model can be derived based on LMCS parameters. In addition, for example, multiple APS IDs can be signaled through header information, and in this way, different LMCS models can be applied in units of blocks within the same picture / slice.
[0226] In one embodiment according to the present invention, a method for efficiently performing the operations required for LMCS is proposed. According to the semantics described in Table 8 above, InvScaleCoeff[i] needs to be derived by a division operation of the segment length lmcsCW[i] (also denoted as RspCW[i] in this article). The segment length of the inverse mapping may not be a power of 2, which means that the division cannot be performed by bit shifting.
[0227] For example, calculating InvScaleCoeff may require up to 16 divisions per slice. According to Table 8 above, for 10-bit encoding, the range of lmcsCW[i] is from 8 to 511, so in order to use the LUT to implement the division operation of lmcsCW[i], the size of the LUT must be 504. In addition, for 12-bit encoding, the range of lmcsCW[i] is from 32 to 2047, so the LUT size needs to be 2016 to implement the division operation of lmcsCW[i] using the LUT. That is, division is expensive in hardware implementation, so it is desirable to avoid division as much as possible.
[0228] In one aspect of this embodiment, lmcsCW[i] may be constrained to be a multiple of a fixed number (or a predetermined number or a predetermined number). Thus, the lookup table (LUT) used for division (the capacity or size of the LUT) may be reduced. For example, if lmcsCW[i] becomes a multiple of 2, the size of the LUT used to replace the division process may be reduced by half.
[0229] In another aspect of the present embodiment, coding with a higher internal bit depth is proposed. Coding with a higher internal bit depth can be an upper condition of the range constraint of lmcsCW[i]. For example, if the coding bit depth is higher than 10, lmcsCW[i] can be constrained to be a multiple of 1<< (BitDepthY-10). Here, BitDepthY can be the brightness bit depth. Therefore, the possible values of lmcsCW[i] do not change with the coding bit depth, and the size of the LUT required for calculating InvScaleCoeff does not increase due to the higher coding bit depth. For example, for a 12-bit internal coding bit depth, the value of lmcsCW[i] is limited to a multiple of 4, so the size of the LUT replacing the division process will be the same as the size of the LUT used for 10-bit coding. This aspect can be implemented separately or in combination with the above-mentioned aspects.
[0230] In another aspect of this embodiment, lmcsCW[i] may be constrained to a narrower range. For example, lmcsCW[i] may be constrained to be in the range from (OrgCW>>1) to (OrgCW<<1)-1. Thus for 10-bit encoding, the range of lmcsCW[i] may be [32, 127], thus requiring only a LUT of size 96 to compute InvScaleCoeff.
[0231] In another aspect of this embodiment, lmcsCW[i] may be approximated to the nearest number that is a power of 2 and used in the shaper design. Thus, the division in the inverse mapping may be performed (and replaced) by a bit shift.
[0232] In one embodiment according to the present invention, a constraint on the range of LMCS codewords is proposed. According to Table 8 above, the value of the LMCS codeword is in the range from (OrgCW>>3) to (OrgCW<<3)-1. This codeword range is too wide. When there is a large difference between RspCW[i] and OrgCW, visual artifacts may occur.
[0233] According to one embodiment of the present invention, it is proposed to constrain the codewords of LMCS PWL mapping to a narrow range. For example, the range of lmcsCW[i] can be in the range of (OrgCW>>1) to (OrgCW<<1)-1.
[0234] In one embodiment according to the present invention, it is proposed to use a single chroma residual scaling factor for chroma residual scaling in LMCS. Existing methods for deriving chroma residual scaling factors use the average value of the corresponding luminance block, and derive the slope of each segment of the inverse luminance mapping as the corresponding scaling factor. In addition, the process of identifying the segment index requires the availability of the corresponding luminance block, which causes delay problems. This is not desirable for hardware implementation. According to an embodiment of the present invention, the scaling in the chroma block may not depend on the luminance block value, and may not require the identification of the segment index. Therefore, the chroma residual scaling process in LMCS can be performed without delay problems.
[0235] In one embodiment according to the present invention, a single chroma scaling factor can be derived from both the encoder and the decoder based on the luma LMCS information. When the LMCS luma model is received, the chroma residual scaling factor can be updated. For example, when the LMCS model is updated, the single chroma residual scaling factor can be updated.
[0236] The following table shows an example for obtaining a single chroma scaling factor according to the present embodiment.
[0237] [Table 12]
[0238]
[0239] Referring to Table 12, a single chroma scaling factor (eg, ChromaScaleCoeff or ChromaScaleCoeffSingle) may be obtained by averaging the inverse luma mapping slopes of all segments within lmcs_min_bin_idx and lmcs_max_bin_idx.
[0240] Fig.10 The figure illustrates a linear fit of the pivot point according to an embodiment of the present invention. Fig.10 In the figure, the pivot points P1, Ps and P2 are shown. Fig.10The following embodiments or examples thereof are described.
[0241] In an example of this embodiment, a single chroma scaling factor may be obtained based on a linear approximation of the luma PWL mapping between the pivot points lmcs_min_bin_idx and lmcs_max_bin_idx+1. That is, the inverse slope of the linear mapping may be used as the chroma residual scaling factor. For example, Fig.10 The linear line 1 may be a straight line connecting the pivot points P1 and P2. Fig.10 , in P1, the input value is x1 and the mapped value is 0, and in P2, the input value is x2 and the mapped value is y2. The inverse slope (inverse scaling) of Linear Line 1 is (x2-x1) / y2, and a single chroma scaling factor ChromaScaleCoeffSingle can be calculated based on the input and mapped values of the pivot points P1 and P2 and the following equation.
[0242] [Equation 5]
[0243]
[0244] In Equation 5, CSCALE_FP_PREC represents a shift factor, for example, CSCALE_FP_PREC may be a predetermined constant value. In one example, CSCALE_FP_PREC may be 11.
[0245] In another example according to this embodiment, referring to Fig.10 , the input value at the pivot point Ps is min_bin_idx+1, and the mapped value at the pivot point Ps is ys. Accordingly, the inverse slope (inverse scaling) of the linear line 1 can be calculated as (xs-x1) / ys, and a single chroma scaling factor ChromaScaleCoeffSingle can be calculated based on the input value and mapped value of the pivot point P1, Ps and the following equation.
[0246] [Equation 6]
[0247]
[0248] In Equation 6, CSCALE_FP_PREC represents a shift factor (a factor for bit shifting), for example, CSCALE_FP_PREC may be a predetermined constant value. In one example, CSCALE_FP_PREC may be 11, and inverse-scaled bit shifting may be performed based on CSCALE_FP_PREC.
[0249] In another example according to this embodiment, a single chroma residual scaling factor can be derived based on a linear approximation line. Examples for deriving a linear approximation line may include a linear connection of pivot points (i.e., lmcs_min_bin_idx, lmcs_max_bin_idx+1). For example, the linear approximation result can be represented by a codeword mapped by PWL. The mapped value y2 at P2 can be the sum of the codewords of all bins (slices), and the difference (x2-x1) between the input value at P2 and the input value at P1 is OrgCW*(lmcs_max_bin_idx-lmcs_min_bin_idx+1) (for OrgCW, see Table 8 above). The following table shows an example of obtaining a single chroma scaling factor according to the above embodiment.
[0250] [Table 13]
[0251]
[0252] Referring to Table 13, a single chroma scaling factor (eg, ChromaScaleCoeffSingle) may be obtained from the two pivot points (ie, lmcs_min_bin_idx, lmcs_max_bin_idx). For example, the inverse slope of a linear mapping may be used as the chroma scaling factor.
[0253] In another example of this embodiment, a single chroma scaling factor may be obtained by a linear fit of the pivot points to minimize the error (or mean square error) between the linear fit and the existing PWL mapping. This example may be more accurate than simply connecting the two pivot points at lmcs_min_bin_idx and lmcs_max_bin_idx. There are many ways to find the best linear mapping, and such an example is described below.
[0254] In one example, parameters b1 and b0 in the linear fitting equation y=b1*x+b0 for minimizing the sum of least square errors may be calculated based on Equations 7 and / or 8 below.
[0255] [Equation 7]
[0256]
[0257] [Equation 8]
[0258]
[0259] In equations 7 and 8, x is the original brightness value, y is the shaped brightness value, x̅ and y̅ are the means of x and y, and x i and i Indicates the value of the i-th pivot point.
[0260] refer to Fig.10 , another simple approximation for identifying linear mappings is given as follows:
[0261] - Linear line 1 is obtained by connecting the pivot points of the PWL map at lmcs_min_bin_idx and lmcs_max_bin_idx+1, which is calculated at input values that are multiples of OrgCW lmcs_pivots_linear[i]
[0262] - The difference between the total pivot point mapping values using Linear Line 1 and using PWL mapping.
[0263] -Get the average difference avgDiff.
[0264] - Adjust the last pivot point of the linear line according to the average difference (e.g. 2*avgDiff)
[0265] - Use the inverse slope of the adjusted linear line as the chroma residual scaling.
[0266] According to the above-mentioned linear fitting, the chroma scaling factor (ie, the inverse slope of the forward mapping) may be derived (obtained) based on Equation 9 or 10 below.
[0267] [Equation 9]
[0268]
[0269] [Equation 10]
[0270]
[0271] In the above equation, lmcs_pivots_linear[i] may be a mapping value of a linear mapping. With a linear mapping, all PWL mappings between the minimum and maximum bin indices may have the same LMCS codeword (lmcsCW). That is, lmcs_pivots_linear[lmcs_min_bin_idx+1] may be the same as lmcsCW[lmcs_min_bin_idx].
[0272] In addition, in equations 9 and 10, CSCALE_FP_PREC represents a shift factor (a factor for bit shifting), and for example, CSCALE_FP_PREC may be a predetermined constant value. In one example, CSCALE_FP_PREC may be 11.
[0273] With a single chroma residual scaling factor (ChromaScaleCoeffSingle), there is no need to calculate the average of the corresponding luminance block and find the index in the PWL linear map to get the chroma residual scaling factor. Therefore, the coding efficiency using chroma residual scaling can be improved. This not only eliminates the dependency on the corresponding luminance block and solves the latency problem, but also reduces complexity.
[0274] In another embodiment of the present invention, the encoder can determine parameters related to a single chroma scaling factor and signal these parameters to the decoder. Using signaling, the encoder can use other information available at the encoder to derive the chroma scaling factor. This embodiment aims to eliminate the chroma residual scaling delay problem.
[0275] For example, another example of identifying a linear mapping for determining the chroma residual scaling factor is as follows:
[0276] - Linear line 1 is obtained by connecting the pivot points of the PWL map at lmcs_min_bin_idx and lmcs_max_bin_idx+1, and lmcs_pivots_linear[i] of this linear line is calculated at input values that are multiples of OrgCW
[0277] - Using the pivot points of the linear line 1 and luma PWL mappings, get a weighted sum of the differences between the mapped values of the pivot points. The weights can be based on encoder statistics (such as a bin histogram).
[0278] - Get the weighted average difference avgDiff.
[0279] - Adjust the last pivot point of Line 1 based on the weighted average difference (e.g. 2*avgDiff)
[0280] - Use the inverse slope of the adjusted linear line to compute the chroma residual scaling.
[0281] The following table shows an example of syntax for signaling the y-value used for chroma scaling factor derivation.
[0282] [Table 14]
[0283]
[0284] In Table 14, the syntax element lmcs_chroma_scale may specify a single chroma (residual) scaling factor for LMCS chroma residual scaling (ChromaScaleCoeffSingle=lmcs_chroma_scale). That is, information about the chroma residual scaling factor may be directly signaled, and the signaled information may be derived as the chroma residual scaling factor. In other words, the value of the signaled information about the chroma residual scaling factor may be (directly) derived as the value of the single chroma residual scaling factor. Here, the syntax element lmcs_chroma_scale may be signaled together with other LMCS data (i.e., syntax elements related to the absolute value and sign of the codeword, etc.).
[0285] Alternatively, the encoder may signal only the necessary parameters to derive the chroma residual scaling factors at the decoder. To derive the chroma residual scaling factors at the decoder, the input value x and the mapped value y are needed. Since the x value is the bin length and is a known number, it does not need to be signaled. As a result, only the y value needs to be signaled in order to derive the chroma residual scaling factors. Here, the y value may be the mapped value of any pivot point in the linear mapping (i.e., Fig.10 The mapping value of P2 or Ps in ).
[0286] The following table shows an example of signaling mapping values used to derive the chroma residual scaling factor.
[0287] [Table 15]
[0288]
[0289] [Table 16]
[0290]
[0291] One of the syntaxes of Table 15 and Table 16 above can be used to signal the y value at any linear pivot point specified by the encoder and decoder. That is, the encoder and decoder can derive the y value using the same syntax.
[0292] First, an embodiment according to Table 15 is described. In Table 15, lmcs_cw_linear may represent a mapping value at Ps or P2. That is, in the embodiment according to Table 15, a fixed number may be signaled by lmcs_cw_linear.
[0293] In the example according to this embodiment, if lmcs_cw_linear represents a mapping value of a bin (ie, Fig.10If lmcs_pivots_linear[lmcs_min_bin_idx+1] in Ps is used, the chroma scaling factor can be derived based on the following equation.
[0294] [Equation 11]
[0295]
[0296] In another example according to this embodiment, if lmcs_cw_linear represents lmcs_max_bin_idx+1 (i.e. Fig.10 lmcs_pivots_linear[lmcs_max_bin_idx+1] in P2), the chroma scaling factor can be derived based on the following equation.
[0297] [Equation 12]
[0298]
[0299] In the above equation, CSCALE_FP_PREC represents a shift factor (a factor used for bit shifting), for example, CSCALE_FP_PREC may be a predetermined constant value. In one example, CSCALE_FP_PREC may be 11.
[0300] Next, an embodiment according to Table 16 is described. In this embodiment, lmcs_cw_linear can be signaled as a change value relative to a fixed number (i.e., lmcs_delta_abs_cw_linear, lmcs_delta_sign_cw_linear_flag). In an example of this embodiment, when lmcs_cw_linear represents the mapping value in lmcs_pivots_linear[lmcs_min_bin_idx+1] (i.e., Fig.10 When Ps is used, lmcs_cw_linear_delta and lmcs_cw_linear can be derived based on the following equations.
[0301] [Equation 13]
[0302]
[0303] [Equation 14]
[0304]
[0305] In another example of this embodiment, when lmcs_cw_linear represents the mapping value in lmcs_pivots_linear[lmcs_max_bin_idx+1] (ie Fig.10 When P2 is used, lmcs_cw_linear_delta and lmcs_cw_linear can be derived based on the following equations.
[0306] [Equation 15]
[0307]
[0308] [Equation 16]
[0309]
[0310] In the above equation, OrgCW may be a value derived based on Table 8 above.
[0311] Fig.11 An example of linear shaping (or linear shaper, linear mapping) according to an embodiment of the present invention is illustrated. That is, in this embodiment, it is proposed to use a linear shaper in LMCS. For example, Fig.11 This example may be related to forward linear reshaping (mapping).
[0312] In existing examples, LMCS can use a piecewise linear mapping with a fixed 16 segments. This complicates the shaper design because abrupt transitions between pivot points may cause undesirable artifacts. In addition, for the inverse luminance mapping of the shaper, it is necessary to identify the piecewise function index. The piecewise function index identification process is an iterative process with multiple comparisons. In addition, for the chrominance residual scaling using the corresponding luminance block average, such a luminance segment index identification process is also required. This not only has complexity issues, but also leads to chrominance residual scaling delays that depend on the reconstruction of the entire luminance block. In order to solve this problem, it is proposed to use a linear shaper for LMCS.
[0313] Reference Fig.11 , the linear reshaper may include two pivot points, namely P1 and P2. P1 and P2 may represent input and mapping values, for example, P1 may be (min_input, 0), and P2 may be (max_input, max_mapped). Here, min_input represents the minimum input value, and max_input represents the maximum input value. Any input value less than or equal to min_input is mapped to 0, and any input value greater than max_input is mapped to max_mapped. Any input brightness value within min_input and max_input is linearly mapped to other values. Fig.11 An example of a mapping is shown. The pivot points P1 , P2 may be determined at the encoder and a linear fit may be used to approximate a piecewise linear mapping.
[0314] There are many ways to signal the linear shaper. In an example of a method to signal the linear shaper, the original brightness range can be divided by an equal number of bins. That is, the brightness mapping between the minimum bin and the maximum bin can be evenly distributed. For example, all bins can have the same LMCS codeword (lmcsCW). To this end, the minimum and maximum bin indexes can be signaled. Therefore, only one set of reshape_model_bin_delta_abs_CW (or reshaper_model_delta_abs_CW, lmcs_delta_abs_CW) and reshaper_model_bin_delta_sign_CW_flag (or reshaper_model_delta_sign_CW_flag, lmcs_delta _sign_CW_flag) need to be signaled.
[0315] The following table exemplarily shows the syntax and semantics of signaling a linear shaper according to this example.
[0316] [Table 17]
[0317]
[0318] [Table 18]
[0319] <![CDATA[log2_lmcs_num_bins_minus4 + 4 equals the log2 of the number of bins. log2_lmcs_num_bins = _log2_lmcs_num_bins_minus4 + 4 and within the range of 4 and BitDepth Y lmcs_min_bin_idx specifies the minimum bin index used during the construction of the luminance mapping and chroma scaling. The value of lmcs_min_bin_idx shall be within the range of 0 to 15 (inclusive of 0 and 15). lmcs_delta_max_bin_idx specifies the change amount value between 15 and the maximum bin index LmcsMaxBinIdx used during the construction of the luminance mapping and chroma scaling. The value of lmcs_delta_max_bin_idx shall be within the range of 0 to 15 (inclusive of 0 and 15). The value of LmcsMaxBinIdx is set to be equal to 15 - lmcs_delta_max_bin_idx. The value of LmcsMaxBinIdx shall be greater than or equal to lmcs_min_bin_idx. lmcs_delta_cw_prec_minus1 plus 1 specifies the number of bits used for the representation of the syntax lmcs_delta_abs_cw[i]. The value of lmcs_delta_cw_prec_minus1 shall be within the range of 0 to BitDepthY - 2 (inclusive of 0 and BitDepthY - 2). lmcs_delta_abs_cw_linear specifies the absolute change amount codeword value of a bin for the linear mapping. lmcs_delta_sign_cw_linear_flag specifies the sign of the variable lmcsDeltaCWLinear as follows: - If lmcs_delta_sign_cw_linear_flag equals 0, then lmcsDeltaCWLinear is a positive value. - Otherwise (lmcs_delta_sign_cw_linear_flag is not equal to 0), then lmcsDeltaCWLinear is a negative value. When lmcs_delta_sign_cw_linear_flag does not exist, it is inferred to be 0. The variable OrgCW is derived as follows: OrgCW = 1 << (BitDepthY - log2_lmcs_num_bins) The variable lmcsDeltaCWLinear is derived as follows: #timg# The variables ScaleCoeffSingle and InvScaleCoeffSingle are derived as follows: #timg# The variable ChromaScaleCoeffSingle is derived as follows: #timg#]]>
[0320] Referring to Tables 17 and 18, the syntax element log2_lmcs_num_bins_minus4 may be information about the number of bins. Based on this information, the number of bins may be signaled to allow finer control of the minimum and maximum pivot points. In another existing example, the encoder and / or decoder may derive (specify) a (fixed) number of bins without signaling, for example, deriving the number of bins to be 16 or 32. However, according to the examples of Tables 17 and 18, log2_lmcs_num_bins_minus4 plus 4 may represent the logarithm of the number of bins to base 2. The number of bins derived based on the syntax element may be in the range from 4 to the value of the luma bit depth BitDepthY.
[0321] In Table 18, ScaleCoeffSingle can be referred to as a single luma forward scaling factor, and InvScaleCoeffSingle can be referred to as a single luma inverse scaling factor. (Forward) mapping of predicted luma samples can be performed based on a single luma forward scaling factor, and (inverse) mapping of reconstructed luma samples can be performed based on a single luma inverse scaling factor. ChromaSclaeCoeffSingle, as described above, can be referred to as a single chroma residual scaling factor. ScaleCoeffSingle, InvScaleCoeffSingle, and ChromaSclaeCoeffSingle can be used for forward luma mapping, inverse luma mapping, and chroma residual scaling, respectively. ScaleCoeffSingle, InvScaleCoeffSingle, and ChromaSclaeCoeffSingle can be applied uniformly to all bins (16-bin PWL mapping) as a single factor.
[0322] Referring to Table 18, FP_PREC and CSCALE_FP_PREC may be constant values for bit shifting. FP_PREC and CSCALE_FP_PREC may be the same or different. For example, FP_PREC may be greater than or equal to CSCALE_FP_PREC. In one example, both FP_PREC and CSCALE_FP_PREC may be 11. In another example, FP_PREC may be 15 and CSCALE_FP_PREC may be 11.
[0323] In another example of a method of signaling a linear shaper, the LMCS codeword (lmcsCWlinearALL) may be derived based on the following equation in Table 19. Also in this example, the linear shaping syntax elements in Table 17 may be used. The following table shows an example of semantics described according to this example.
[0324] [Table 19]
[0325] lmcs_delta_abs_cw_linear specifies the absolute change code value between the pivot points lmcs_min_bin_idx and lmcs_max_bin_idx + 1. The variable lmcsDeltaCWLinear is derived as follows:#timg#lmcsCWLinearAll specifies the code between lmcs_min_bin_idx and LmcsMaxBinIdx + 1. The variables ScaleCoeffSingle and InvScaeCoeffSingle are derived as follows:#timg#The variable ChromaScaleCoeffSingle is derived as follows:#timg#
[0326] Referring to Table 19, FP_PREC and CSCALE_FP_PREC may be constant values for bit shifting. FP_PREC and CSCALE_FP_PREC may be the same or different. For example, FP_PREC may be greater than or equal to CSCALE_FP_PREC. In one example, both FP_PREC and CSCALE_FP_PREC may be 11. In another example, FP_PREC may be 15 and CSCALE_FP_PREC may be 11.
[0327] In Table 19, lmcs_max_bin_idx may be used interchangeably with LmcsMaxBinIdx. lmcs_max_bin_idx and LmcsMaxBinIdx may be derived based on lmcs_delta_max_bin_idx of the syntax of the above Tables 17 and 18. Therefore, Table 19 may be explained with reference to Table 18.
[0328] In another embodiment according to the present invention, another example of a method for signaling a linear shaper can be presented. The pivot points P1, P2 of the linear shaper model can be explicitly signaled. The following table shows an example of syntax and semantics for explicitly signaling a linear shaper model according to this example.
[0329] [Table 20]
[0330]
[0331] [Table 21]
[0332] <![CDATA[The lmcs_min_input specifies the input value of the first pivot point. It has a mapped value of 0. The lmcs_max_input is the input value of the second pivot point. The lmcs_max_mapped is the mapped value at the second pivot point. They are signaled explicitly using an exp golomb code or a fixed length code depending on the length of BitDepth Y The #timg# variables ScaleCoeffSingle and InvScaeCoeffSingle are derived as follows: The #timg# variable ChromaScaleCoeffSingle is derived as follows: #timg#]]>
[0333] Referring to Table 20 and Table 21, the input value of the first pivot point can be derived based on the syntax element lmcs_min_input, and the input value of the second pivot point can be derived based on the syntax element lmcs_max_input. The mapped value of the first pivot point can be a predetermined value (a value known to both the encoder and the decoder), for example, the mapped value of the first pivot point is 0. The mapped value of the second pivot point can be derived based on the syntax element lmcs_max_mapped. That is, the linear shaper model can be explicitly (directly) signaled based on the information signaled in the syntax of Table 20.
[0334] Alternatively, lmcs_max_input and lmcs_max_mapped may be signaled as varying values. The following table shows an example of syntax and semantics for signaling a linear shaper model as varying values.
[0335] [Table 22]
[0336]
[0337] [Table 23]
[0338] lmcs_max_input_data specifies the difference between the input value of the second pivot point and the maximum luminance value (1<<bitdepthY)-1, and #timg# lmcs_max_mapped_delta specifies the difference between the mapped value of the second pivot point and the maximum luminance value (1<<bitdepthY)-1. #timg# The variables ScaleCoeffSingle and InvScaeCoeffSingle are derived as follows: #timg# The variable ChromaScaleCoeffSingle is derived as follows: #timg#
[0339] Referring to Table 23, the input value of the first pivot point can be derived based on the syntactic element lmcs_min_input. For example, the mapped value of lmcs_min_input can be 0. lmcs_max_input_delta can specify the difference between the input value of the second pivot point and the maximum luminance value (i.e., (1<<bitdepthY)-1). lmcs_max_mapped_delta can specify the difference between the mapped value of the second pivot point and the maximum luminance value (i.e., (1<<bitdepthY)-1).
[0340] According to the embodiments herein, forward mapping of luminance prediction samples, inverse mapping of luminance reconstruction samples, and chrominance residual scaling can be performed based on the above examples of the linear shaper. In one example, for the inverse scaling of luminance (reconstruction) samples (pixels) in the inverse mapping based on the linear shaper, only one inverse scaling factor may be required. The same applies to forward mapping and chrominance residual scaling. That is, the steps of determining ScaleCoeff[i], InvScaleCoeff[i], and ChromaScaleCoeff[i] (where i is the bin index) can be replaced by only one single factor. Here, one single factor is the fixed decimal representation of the (forward) slope or inverse slope of the linear mapping. In one example, the inverse luminance mapping scaling factor (the inverse scaling factor for the inverse mapping of luminance reconstruction samples) can be derived based on at least one of the following equations.
[0341] [Equation 17]
[0342]
[0343] [Equation 18]
[0344]
[0345] [Equation 19]
[0346]
[0347] lmcsCWLinear of Equation 17 can be derived from Tables 17 and 18 above. lmcsCWLinearALL of Equations 18 and 19 can be derived from at least one of Tables 19 to 23 above. In Equation 17 or 18, OrgCW can be derived from Table 8 or 18.
[0348] The following table describes the equations and syntax (conditional statements) indicating the forward mapping process for luminance samples (i.e., luminance prediction samples) in picture reconstruction. In the following tables and equations, FP_PREC is a constant value for bit shifting and can be a predetermined value. For example, FP_PREC can be 11 or 15.
[0349] [Table 24]
[0350]
[0351] [Table 25]
[0352]
[0353] Table 24 can be used to derive forward mapped luma samples during the luma mapping process based on Tables 7 and 8 above. That is, Table 24 can be described together with Tables 7 and 8. In Table 24, the forward mapped luma (prediction) sample PredMAPSamples[i][j] as the output can be derived from the luma (prediction) sample predSamples[i][j] as the input. The idxY of Table 24 can be referred to as the (forward) mapping index, and the mapping index can be derived based on the predicted luma samples.
[0354] Table 25 can be used to derive forward mapped luma samples during the luma mapping based on the linear shaper. For example, the lmcs_min_input, lmcs_max_input, lmcs_max_mapped, and ScaleCoeffSingle of Table 25 can be derived from at least one of Tables 20 to 23. In Table 25, in the case of 'lmcs_min_input < predSamples[i][j] < lmcs_max_input', the forward mapped luma (prediction) sample PredMAPSamples[i][j] as the output can be derived from the input (luma (prediction) sample predSamples[i][j]). Comparing Table 24 and Table 25, the changes from the existing LMCS according to the application of the linear shaper can be seen from the perspective of forward mapping.
[0355] The following equations describe the inverse mapping process for luma samples (i.e., luma reconstruction samples). In the following equations, "lumaSample" as the input can be the luma reconstruction sample before the inverse mapping (before modification). "invSample" as the output can be the luma reconstruction sample after the inverse mapping (modified). In other cases, the trimmed invSample can be referred to as the modified luma reconstruction sample.
[0356] [Equation 20]
[0357]
[0358] [Equation 21]
[0359]
[0360] Referring to Equation 20, the index idxInv may be derived based on the above Table 10. That is, Equation 20 may be used to derive inverse-mapped luma samples in the luma mapping process based on the above Tables 7 and 8. Equation 20 may be described together with the above Table 9.
[0361] Equation 21 can be used to derive the inverse mapped luma sample in linear shaper based luma mapping. For example, lmcs_min_input of equation 21 can be derived according to at least one of Tables 20 to 23. Comparing equations 20 and 21, the change from the existing LMCS according to the application of the linear shaper can be seen from the perspective of forward mapping.
[0362] Based on the above example of the linear shaper, the segment index identification process can be omitted. That is, in this example, since only one segment has valid shaped luma pixels, the segment index identification process for inverse luma mapping and chroma residual scaling can be removed. Therefore, the complexity of inverse luma mapping can be reduced. In addition, the delay problem caused by the luma segment index identification during the chroma residual scaling can be eliminated.
[0363] According to an embodiment using the above-mentioned linear shaper, the following advantages can be provided for LMCS: i) the encoder shaper design can be simplified to prevent artifacts that may be caused by abrupt changes between piecewise linear segments; ii) the decoder inverse mapping process in which the segment index identification process can be removed can be simplified by eliminating the segment index identification process; iii) by eliminating the segment index identification process, the delay problem of chroma residual scaling caused by depending on the corresponding luminance block can be removed; iv) the signaling overhead can be reduced and frequent updates of the shaper can be made more feasible; v) for many places where 16 segment loops were required in the past, loops can be eliminated. For example, to derive InvScaleCoeff[i], the number of division operations of lmcsCW[i] can be reduced to 1.
[0364] In another embodiment according to the present invention, a flexible bin-based LMCS is proposed. Here, flexible bins may refer to the number of bins that are not fixed to a predetermined (predefined, specific) number. In existing embodiments, the number of bins in the LMCS is fixed to 16, and the 16 bins are evenly distributed for the input sample values. In this embodiment, a flexible number of bins is proposed, and these segments (bins) may not be evenly distributed in terms of original pixel values.
[0365] The following table exemplarily shows the syntax of LMCS data (data field) according to this embodiment and the semantics of the syntax elements included therein.
[0366] [Table 26]
[0367]
[0368] [Table 27]
[0369] <![CDATA[lmcs_num_bins_minus1 plus 1 specifies the number of bins. Lmcs_num_bins shall be in the range of 1 and 1 << BitDepth Y - 1. Either lmcs_num_bins or lmcs_num_bins_minus1 can be restricted to a multiple of a power of 2 or the logarithm of 2 to reduce the number of bits used for signaling. #timg# lmcs_delta_input_cw[i] specifies the change amount input value of the i-th pivot point relative to the previous pivot point. lmcs_delta_input_cw[i] >= 0. lmcs_delta_mapped_cw[i] specifies the change amount mapped value of the i-th pivot point relative to the previous pivot point. lmcs_delta_mapped_cw[i] >= 0. Variables LmcsPivot_input[i] and LmcsPivot_mapped[i], where #timg##timg# LmcsPivot_input[lmcs_num_bins + 1] shall be equal to (1 << BitDepth Y ) - 1, that is, the sum of all lmcs_delta_input_cw[i] shall be equal to (1 << BitDepth Y ) - 1, so the last lmcs_delta_mapped_cw[i] can be inferred without signaling. LmcsPivot_mapped[lmcs_num_bins + 1], that is, the sum of all lmcs_delta_mapped_cw[i] shall not be greater than (1 << BitDepth Y ) - 1.]]>
[0370] Referring to Table 26, information about the number of bins lmcs_num_bins_minus1 can be signaled. Referring to Table 27, lmcs_num_bins_minus1 + 1 can be equal to the number of bins, and the number of bins can range from 1 to (1<<BitDepthY)-1. For example, lmcs_num_bins_minus1 or lmcs_num_bins_minus1 + 1 can be a multiple of a power of 2.
[0371] In the embodiments described in conjunction with Tables 26 and 27, the number of pivot points can be derived based on lmcs_num_bins_minus1 (information about the number of bins), regardless of whether the shaper is linear (signaling of lmcs_num_bins_minus1), and the input values and mapped values of the pivot points (LmcsPivot_input[i], LmcsPivot_mapped[i]) can be derived based on the sum of the signaled codeword values (lmcs_delta_input_cw[i], lmcs_delta_mapped_cw[i]) (where the initial input value LmcsPivot_input[0] and the initial output value LmcsPivot_mapped[0] are 0).
[0372] Fig.12 An example of linear forward mapping in the embodiments herein is shown. Fig.13 An example of inverse forward mapping in the embodiments herein is shown. In accordance with Fig.12 and Fig.13 In the embodiments, a method is proposed that supports both conventional LMCS and linear LMCS. In an example according to this embodiment, the conventional LMCS and / or linear LMCS can be indicated based on the syntax element lmcs_is_linear. In the encoder, after determining the linear LMCS line, the mapped values (i.e., the mapped values in pL of Fig.12 and Fig.13 ) can be divided into equal segments (i.e., LmcsMaxBinIdx - lmcs_min_bin_idx + 1). The codewords in binLmcsMaxBinIdx can be signaled using the above syntax for lmcs data or shaper mode.
[0373] The following table exemplarily shows the syntax of LMCS data (data field) and the semantics of the syntax elements included therein according to an example of the present embodiment.
[0374] [Table 28]
[0375]
[0376] [Table 29]
[0377] lmcs_min_bin_idx specifies the minimum bin index used during the luma mapping and chroma scaling construction process. The value of lmcs_min_bin_idx shall be in the range of 0 to 15, inclusive. lmcs_delta_max_bin_idx specifies the delta value between 15 and the maximum bin index LmcsMaxBinIdx used during the luma mapping and chroma scaling construction process. lmcs_delta_max_bin_idx shall be in the range of 0 to 15, inclusive. The value of LmcsMaxBinIdx is set equal to 15-lmcs_delta_max_bin_idx. The value of LmcsMaxBinIdx shall be greater than or equal to lmcs_min_bin_idx. lmcs_is_linear_flag equal to 1 specifies that the LMCS model is a linear model, otherwise it is a regular 16-segment PWL model. lmcs_delta_cw_prec_minus1 plus 1 specifies the number of bits used to represent lmcs_delta_abs_cw[i] if lmcs_is_linear_flag is false, and specifies the number of bits used to represent lmcs_bin_delta_abs_CW_linear if lmcs_is_linear_flag is true. The value of lmcs_delta_cw_prec_minus1 shall be in the range of 0 to BitDepthY-2, inclusive. lmcs_delta_abs_cw_linear specifies the absolute delta codeword value for one bin of the linear mapping. lmcs_delta_sign_cw_linear_flag specifies the sign of the variable lmcsDeltaCWLinear as follows: - If lmcs_delta_sign_cw_linear_flag is equal to 0, lmcsDeltaCWLinear is positive. - Otherwise (lmcs_delta_sign_cw_linear_flag is not equal to 0), lmcsDeltaCWLinear is negative. When lmcs_delta_sign_cw_linear_flag is not present, it is inferred to be equal to 0. lmcs_delta_abs_cw[i] specifies the absolute delta codeword value for the i-th bin. lmcs_delta_sign_cw_flag[i] specifies the sign of the variable lmcsDeltaCW[i] as follows: If lmcs_delta_sign_cw_flag[i] is equal to 0, lmcsDeltaCW[i] is positive.Otherwise (lmcs_delta_sign_cw_flag[i] is not equal to 0), lmcsDeltaCW[i] is negative. When lmcs_delta_sign_cw_flag[i] is not present, it is inferred to be equal to 0.
[0378] The variable OrgCW is derived as follows: #timg# The variable lmcsDeltaCW[i] is derived as follows, where i = lmcs_min_bin_idx…LmcsMaxBinIdx: If lmcs_is_linear_flag is true, #timg# Otherwise #timg# The variable lmcsCW[i] is derived as follows: - For i = 0…lmcs_min_bin_idx-1, lmcsCW[i] is set equal to 0. - For i = lmcs_min_bin_idx…LmcsMaxBinIdx, the following applies: #timg# The value of lmcsCW[i] shall be in the range of (OrgCW>>3) to (OrgCW<<3-1), inclusive. - For i = LmcsMaxBinIdx+1…15, lmcsCW[i] is set equal to 0. The following conditions are true as a requirement for bitstream conformance:#timg#
[0379] The following table exemplarily shows the syntax of LMCS data (data field) and the semantics of the syntax elements included therein according to another example of the present embodiment.
[0380] [Table 30]
[0381]
[0382] [Table 31]
[0383] lmcs_min_bin_idx specifies the minimum bin index used during the luma mapping and chroma scaling construction process. The value of lmcs_min_bin_idx shall be in the range of 0 to 15, inclusive. lmcs_delta_max_bin_idx specifies the delta value between 15 and the maximum bin index LmcsMaxBinIdx used during the luma mapping and chroma scaling construction process. The value of lmcs_delta_max_bin_idx shall be in the range of 0 to 15, inclusive. The value of LmcsMaxBinIdx is set equal to 15-lmcs_delta_max_bin_idx. The value of LmcsMaxBinIdx shall be greater than or equal to lmcs_min_bin_idx. lmcs_is_linear_flag equal to 1 specifies that the LMCS model is a linear model, otherwise equal to 0 specifies that the LMCS model is a regular 16-segment PWL model. lmcs_delta_cw_prec_minus1 plus 1 specifies the number of bits used for the representation of the syntax lmcs_delta_abs_cw[i]. The value of lmcs_delta_cw_prec_minus1 shall be in the range of 0 to BitDepthY-2, inclusive. The variable LmcsMaxBinEnd is derived as follows: #timg#lmcs_delta_abs_cw[i] specifies the absolute delta codeword value for the i-th bin. lmcs_delta_sign_cw_flag[i] specifies the sign of the variable lmcsDeltaCW[i] as follows: - If lmcs_delta_sign_cw_flag[i] is equal to 0, then lmcsDeltaCW[i] is a positive value. - Otherwise (lmcs_delta_sign_cw_flag[i] is not equal to 0), lmcsDeltaCW[i] is negative. When lmcs_delta_sign_cw_flag[i] is not present, it is inferred to be equal to 0. When lmcs_is_linear_flag is true, the start and end indices of the loop receiving lmcs_delta_abs_cw[i] are the same, so the loop is entered only once and only one set of lmcs_delta_abs_cw[i] and lmcs_delta_sign_cw[i] is received and stored in lmcs_delta_abs_cw[lmcs_min_bin_idx] and lmcs_delta_sign_cw[lmcs_min_bin_idx].
[0384] The variable OrgCW is derived as follows: #timg# The variable lmcsDeltaCW[i] is derived as follows, where i = lmcs_min_bin_idx…LmcsMaxBinIdx: if lmcs_is_linear_flag is true, #timg# otherwise #timg#
[0385] Referring to Tables 28 to 31, when lmcs_is_linear_flag is true, all lmcsDeltaCW[i] between lmcs_min_bin_idx and LmcsMaxBinIdx may have the same value. That is, lmcsCW[i] of all segments between lmcs_min_bin_idx and LmcsMaxBinIdx may have the same value. The scaling and inverse scaling and chroma scaling of all segments between lmcs_min_bin_idx and LmcsMaxBinIdx may be the same. Then, if the linear reshaper is true, there is no need to derive the segment index, and the scaling and inverse scaling from only one of the segments can be used.
[0386] The following table exemplarily shows the identification process of the segment index according to this embodiment.
[0387] [Table 32]
[0388] Identification process of the piecewise function index for luma samples if lmcs_is_linear_flag is true, #timg# otherwise { / * use existing piecewise index identification process * / }_
[0389] According to another embodiment herein, application of conventional 16-segment PWL LMCS and linear LMCS may depend on a higher level syntax (ie, sequence level).
[0390] The following table exemplarily shows the syntax of the SPS according to this embodiment and the semantics of the syntax elements included therein.
[0391] [Table 33]
[0392]
[0393] [Table 34]
[0394] sps_linear_lmcs_enabled_flag equal to 0 specifies that linear lmcs are disabled and only regular LMCS is enabled. sps_linear_lmcs_enabled_flag equal to 1 specifies that linear lmcs are enabled and regular LMCS is disabled.
[0395] Referring to Tables 33 and 34, enabling of normal LMCS and / or linear LMCS may be determined (signaled) by syntax elements included in SPS. Referring to Table 34, based on the syntax element sps_linear_lmcs_enabled_flag, one of normal LMCS or linear LMCS may be used in units of sequences.
[0396] In addition, whether only linear LMCS, or conventional LMCS, or both are enabled may also depend on the profile level. In one example, for a particular profile (i.e., SDR profile), only linear LMCS may be allowed, while for another profile (i.e., HDR profile), only conventional LMCS may be allowed, while for another profile, both conventional LMCS and / or linear LMCS may be allowed.
[0397] According to another embodiment of the present invention, the LMCS segment index identification process can be used for inverse luma mapping and chroma residual scaling. In this embodiment, the segment index identification process can be used for blocks where chroma residual scaling is enabled, and can also be called for all luma samples in the shaping (mapping) domain. This embodiment is intended to keep its low complexity.
[0398] The following table shows the identification process (derivation process) of the existing piecewise function index.
[0399] [Table 35]
[0400] Identification process of the piecewise function index for brightness samples#timg#
[0401] In an example, during the segment index identification process, the input samples may be divided into at least two categories. For example, the input samples may be divided into three categories, a first category, a second category, and a third category. For example, the first category may represent samples (values) less than LmcsPivot[lmcs_min_bin_idx+1], the second category may represent samples (values) greater than or equal to LmcsPivot[LmcsMaxBinIdx], and the third category may indicate samples (values) between LmcsPivot[lmcs_min_bin_idx+1] and LmcsPivot[LmcsMaxBinIdx].
[0402] In this embodiment, it is proposed to optimize the recognition process by eliminating the category classification. This is because the input of the segment index recognition process is the brightness value in the shaping (mapping) domain, and there should be no value exceeding the mapping value at the pivot points lmcs_min_bin_idx and LmcsMaxBinIdx+1. Therefore, the conditional process of classifying samples into categories in the existing segment index recognition process is unnecessary. In more detail, a specific example is described below in conjunction with the table.
[0403] In the example according to the present embodiment, the identification process included in Table 35 can be replaced by one of the following Tables 36 or 37. Referring to Tables 36 and 37, the first two categories of Table 35 can be removed, and for the last category, the boundary value (second boundary value or end point) in the iteration loop is changed from LmcsMaxBinIdx to LmcsMaxBinIdx+1. That is, the identification process can be simplified and the complexity of the segment index derivation can be reduced. Therefore, according to the present embodiment, LMCS-related compilation can be effectively performed.
[0404] [Table 36]
[0405]
[0406] [Table 37]
[0407]
[0408] Referring to Table 36, the comparison process corresponding to the condition of the if statement (the equation corresponding to the condition of the if statement) may be iteratively performed on all bin indices from the minimum bin index to the maximum bin index. When the equation corresponding to the condition of the if statement is true, the bin index may be derived as an inverse mapping index for inverse luma mapping (or an inverse scaling index for chroma residual scaling). Based on the inverse mapping index, a modified reconstructed luma sample (or a scaled chroma residual sample) may be derived.
[0409] The following figures are created to explain specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the figures are presented by way of example, the technical features of this specification are not limited to the specific names used in the following figures.
[0410] Fig.14 and Fig.15 An example of a video / image encoding method and related components according to embodiments of the present invention is schematically shown. Fig.14 The method disclosed in can be Figure 2 Specifically, for example, Fig.14S1400 may be performed by the residual processor 230 or the predictor 220 of the encoding device, and S1410 may be performed by the predictor 220 or the adder 250 of the encoding device. S1420 may be performed by the residual processor 230 or the adder 250 of the encoding device, S1430 and / or S1440 may be performed by the residual processor 230 of the encoding device, and S1450 may be performed by the entropy encoder 240 of the encoding device. Fig.14 The method disclosed in may include the above-mentioned embodiments in this article.
[0411] Reference Fig.14 , the encoding device may generate a predicted luma sample (S1400). Regarding the predicted luma sample, the encoding device may derive the predicted luma sample of the current block based on the prediction mode. In this case, various prediction methods disclosed herein, such as inter prediction or intra prediction, may be applied.
[0412] The encoding device may derive the predicted chroma samples. The encoding device may derive the residual chroma samples based on the original chroma samples and the predicted chroma samples of the current block. For example, the encoding device may derive the residual chroma samples based on the difference between the predicted chroma samples and the original chroma samples.
[0413] The encoding device may generate a mapped predicted luminance sample (S1410). For example, the encoding device may derive an input value and a mapping value (output value) for a pivot point of the luminance mapping, and may generate a mapped predicted luminance sample based on the input value and the mapping value. In one example, the encoding device may derive a mapping index (idxY) based on a first predicted luminance sample, and may generate a first mapped predicted luminance sample based on the input value and the mapping value of the pivot point corresponding to the mapping index. In other examples, a linear mapping (linear shaping, linear LMCS) may be used and a mapped predicted luminance sample may be generated based on a forward mapping scaling factor derived from two pivot points in the linear mapping, so that the index derivation process may be omitted due to the linear mapping.
[0414] The encoding device may generate scaled residual chroma samples. Specifically, the encoding device may derive a chroma residual scaling factor and generate scaled residual chroma samples based on the chroma residual scaling factor. Here, the chroma residual scaling at the encoding end may be referred to as forward chroma residual scaling. Therefore, the chroma residual scaling factor derived by the encoding device may be referred to as a forward chroma residual scaling factor, and a forward scaled residual chroma sample may be generated.
[0415] The encoding device may derive LMCS-related information based on the mapped predicted luma samples (S1420). In addition, the encoding device may generate LMCS-related information based on the mapped predicted luma samples and / or the scaled residual chroma samples. The encoding device may generate LMCS-related information for the reconstructed samples. The encoding device may derive LMCS-related parameters that may be applied to filter the reconstructed samples, and may generate LMCS-related information based on the LMCS-related parameters. For example, LMCS-related information may include information about luma mapping (i.e., forward mapping, inverse mapping, linear mapping), information about chroma residual scaling, and / or indexes related to LMCS (or shaping, shaper) (i.e., maximum bin index, minimum bin index, mapping index).
[0416] The encoding apparatus may generate a residual luma sample based on the mapped predicted luma sample (S1430). For example, the encoding apparatus may derive the residual luma sample based on a difference between the mapped predicted luma sample and the original luma sample.
[0417] The encoding device may derive residual information (S1440). The encoding device may derive residual information based on the scaled residual chroma samples and / or residual luminance samples. The encoding device may derive transform coefficients based on a transform process of the scaled residual chroma samples and residual luminance samples. For example, the transform process may include at least one of DCT, DST, GBT, or CNT. The encoding device may derive quantized transform coefficients based on a quantization process of the transform coefficients. The quantized transform coefficients may have a one-dimensional vector form based on a coefficient scanning order. The encoding device may generate residual information for a specified quantized transform coefficient. The residual information may be generated by various encoding methods such as exponential Golomb, CAVLC, CABAC, etc.
[0418] The encoding device may encode the image / video information (S1450). The image information may include LMCS-related information and / or residual information. For example, the LMCS-related information may include information about linear LMCS. In one example, at least one LMCS codeword may be derived based on the information about linear LMCS. The encoded video / image information may be output in the form of a bitstream. The bitstream may be sent to a decoding device via a network or a storage medium.
[0419] According to an embodiment of the present invention, the image / video information may include various information. For example, the image / video information may include the information disclosed in at least one of Tables 1 to 37 above.
[0420] In one embodiment, the minimum bin index (i.e., lmcs_min_bin_idx) and / or the maximum bin index (i.e., LmcsMaxBinIdx) may be derived based on the LMCS related information. Information about the minimum bin index (i.e., lmcs_min_bin_idx) and / or the maximum bin index (i.e., LmcsMaxBinIdx) may be included in the LMCS related information. A first mapping value (LmcsPivot[lmcs_min_bin_idx]) may be derived based on the minimum bin index. A second mapping value (LmcsPivot[LmcsMaxBinIdx] or LmcsPivot[LmcsMaxBinIdx+1]) may be derived based on the maximum bin index. The value of the reconstructed luma sample (i.e., lumaSample of Table 36 or 37) may be in the range from the first mapping value to the second mapping value. In one example, the values of all reconstructed luma samples may be in the range from the first mapping value to the second mapping value. In another example, the values of some reconstructed luma samples may be within a range from a first mapped value to a second mapped value.
[0421] In one embodiment, the image information may include a sequence parameter set (SPS). The SPS may include a linear LMCS enable flag that specifies whether to enable linear LMCS.
[0422] In one embodiment, the encoding device may generate (derive) a segment index for chroma residual scaling. The encoding device may derive a chroma residual scaling factor based on the segment index. The encoding device may generate scaled residual chroma samples based on the residual chroma samples and the chroma residual scaling factor.
[0423] In one embodiment, the chroma residual scaling factor may be a single chroma residual scaling factor.
[0424] In one embodiment, the LMCS related information may include an LMCS data field and information about linear LMCS. The information about linear LMCS may be referred to as information about linear mapping. The LMCS data field may include a linear LMCS flag indicating whether linear LMCS is applied. When the value of the linear LMCS flag is 1, a predicted luminance sample of the mapping may be generated based on the information about linear LMCS.
[0425] In one embodiment, the information about the linear LMCS includes information about the first pivot point (ie, Fig.11 P1 in the figure) and information about the second pivot point (i.e., Fig.11For example, the input value and mapping value of the first pivot point are the minimum input value and the minimum mapping value respectively. The input value and mapping value of the second pivot point are the maximum input value and the maximum mapping value respectively. The input values between the minimum input value and the maximum input value are linearly mapped.
[0426] In one embodiment, the image information includes information about a maximum input value and information about a maximum mapping value. The maximum input value is equal to the value of the information about the maximum input value (i.e., lmcs_max_input in Table 20). The maximum mapping value is equal to the value of the information about the maximum mapping value (i.e., lmcs_max_mapped in Table 20).
[0427] In one embodiment, the information about the linear mapping includes information about the input variation value of the second pivot point (i.e., lmcs_max_input_delta in Table 22) and information about the mapping variation value of the second pivot point (i.e., lmcs_max_mapped_delta in Table 22). The maximum input value may be derived based on the input variation value of the second pivot point, and the maximum mapping value may be derived based on the mapping variation value of the second pivot point.
[0428] In one embodiment, the maximum input value and the maximum mapping value may be derived based on at least one equation included in the above-mentioned Table 23.
[0429] In one embodiment, generating the mapped predicted luma samples includes deriving a forward mapped scaling factor (ie, ScaleCoeffSingle) for predicting luma samples, and generating the mapped predicted luma samples based on the forward mapped scaling factor. The forward mapped scaling factor may be a single factor for predicting luma samples.
[0430] In one embodiment, the forward mapping scaling factor may be derived based on at least one equation included in Table 21 and / or Table 23 above.
[0431] In one embodiment, the mapped predicted luma samples may be derived based on at least one equation included in Table 25 above.
[0432] In one embodiment, the encoding device may derive an inverse mapping scaling factor (i.e., InvScaleCoeffSingle) for reconstructing luma samples (i.e., lumaSample). In addition, the encoding device may generate modified reconstructed luma samples (i.e., invSample) based on the reconstructed luma samples and the inverse mapping scaling factor. The inverse mapping scaling factor may be a single factor for reconstructing luma samples.
[0433] In one embodiment, the inverse mapping scaling factor may be derived using a segment index derived based on the reconstructed luma samples.
[0434] In one embodiment, the segment index may be derived based on the above-mentioned Table 36. That is, the comparison process (lumaSample <LmcsPivot[idxYInv+1])。
[0435] In one embodiment, the modified reconstructed luma samples may be generated based on a mapping value based on the bin index from a minimum bin index to a maximum bin index.
[0436] In one embodiment, the bin index includes a first bin index indicating a first mapping value. The first bin index can be derived based on a comparison between a mapping value based on a bin index from a minimum bin index to a maximum bin index and a value of the reconstructed luma sample. At least one of the modified reconstructed luma samples can be derived based on the reconstructed luma sample and the first mapping value.
[0437] In one embodiment, the bin index includes a first bin index indicating a first mapping value, and the first bin index may be derived based on a comparison formula (lumaSample < LmcsPivot[idxYInv+1]) included in Table 36. For example, in the above formula, lumaSample represents a value of a target luma sample in the reconstructed luma sample, idxYInv represents one of the bin indexes, and LmcsPivot[idxYinv + 1] represents one of the mapping values based on the bin index from the minimum bin index to the maximum bin. At least one of the reconstructed luma samples may be derived based on the reconstructed luma sample and the first mapping value.
[0438] In one embodiment, the comparison process included in Table 36 may be performed on all bin indices from the minimum bin index to the maximum bin index (lumaSample <LmcsPivot[idxYInv+1])。
[0439] In one embodiment, the inverse mapping scaling factor may be derived based on the equations included in Tables 18, 19, 21, and 23 or at least one of the above-mentioned equations 11 or 12.
[0440] In an embodiment, the modified reconstructed luma samples may be derived based on Equation 21 above.
[0441] In one embodiment, the LMCS related information may include information on the number of bins for predicting the luminance samples used for derivation of the mapping (i.e., lmcs_num_bins_minus1 in Table 26). For example, the number of pivot points for luminance mapping may be set to be equal to the number of bins. In one example, the encoding device may generate the change amount input value and the change amount mapping value of the pivot points respectively according to the number of bins. In one example, the input value and the mapping value of the pivot points are derived based on the change amount input value (i.e., lmcs_delta_input_cw[i] in Table 26) and the change amount mapping value (i.e., lmcs_delta_mapped_cw[i] in Table 26), and the mapped predicted luminance samples may be generated based on the input value (i.e., LmcsPivot_input[i] in Table 27, or InputPivot[i] in Table 8) and the mapping value (i.e., LmcsPivot_mapped[i] in Table 27, or LmcsPivot[i] in Table 8).
[0442] In one embodiment, the encoding device may derive the LMCS change amount codeword based on at least one LMCS codeword and the original codeword (OrgCW) included in the LMCS related information, and may derive the mapped luminance prediction samples based on at least one LMCS codeword and the original codeword. In one example, the information on the linear mapping may include the information on the LMCS change amount codeword.
[0443] In one embodiment, at least one LMCS codeword may be derived based on the sum of the LMCS change amount codeword and OrgCW. For example, OrgCW is (1<<BitDepthY) / 16, where BitDepthY represents the luminance bit depth. This embodiment may be based on Equation 12.
[0444] In one embodiment, at least one LMCS codeword may be derived based on the sum of the LMCS change amount codeword and OrgCW*(lmcs_max_bin_idx - lmcs_min_bin_idx + 1). For example, lmcs_max_bin_idx and lmcs_min_bin_idx are the maximum bin index and the minimum bin index respectively, and OrgCW may be (1<<BitDepthY) / 16. This embodiment may be based on Equations 15 and 16.
[0445] In one embodiment, at least one LMCS codeword may be a multiple of two.
[0446] In an embodiment, when the luminance bit depth (BitDepthY) of the reconstructed luminance samples is greater than 10, at least one LMCS codeword may be a multiple of 1<<(BitDepthY - 10).
[0447] In one embodiment, at least one LMCS codeword may be in the range from (OrgCW>>1) to (OrgCW<<1)-1.
[0448] Fig.16 and Fig.17 An example of an image / video decoding method and related components according to embodiments of the present invention is schematically shown. Fig.16 The method disclosed in can be Figure 3 The decoding device shown is executed. Specifically, for example, Fig.16 S1600 may be performed by the entropy decoder 310 of the decoding device, S1610 may be performed by the predictor 330 of the decoding device, S1620 may be performed by the residual processor 320, the predictor 330 and / or the adder 340 of the decoding device, and S1630 may be performed by the adder 340 of the decoding device. Fig.16 The method disclosed in may include the above-mentioned embodiments in this article.
[0449] Reference Fig.16 , the decoding device may receive / obtain video / image information (S1600). The video / image information may include LMCS related information. For example, LMCS related information may include information about luminance mapping (i.e., forward mapping, inverse mapping, linear mapping), information about chrominance residual scaling, and / or indexes related to LMCS (or shaping, shaping device) (i.e., maximum bin index, minimum bin index, mapping index). The decoding device may receive / obtain image / video information through a bitstream.
[0450] According to an embodiment of the present invention, the image / video information may include various information. For example, the image / video information may include the information disclosed in at least one of Tables 1 to 37 above.
[0451] The decoding device may generate a predicted luma sample (S1610). The decoding device may derive a predicted luma sample of the current block based on the prediction mode. In this case, various prediction methods disclosed herein, such as inter prediction or intra prediction, may be applied.
[0452] The image information may include residual information. The decoding device may generate residual chrominance samples and / or residual luminance samples based on the residual information. Specifically, the decoding device may derive quantized transform coefficients based on the residual information. The quantized transform coefficients may have a one-dimensional vector form based on a coefficient scanning order. The decoding device may derive the transform coefficients based on a dequantization process of the quantized transform coefficients. The decoding device may derive residual chrominance samples and / or residual luminance samples based on the transform coefficients.
[0453] The decoding device may generate a mapped predicted luminance sample (S1620). For example, the decoding device may derive an input value and a mapping value (output value) for a pivot point of the luminance mapping, and may generate a mapped predicted luminance sample based on the input value and the mapping value. In one example, the decoding device may derive a (forward) mapping index (idxY) based on a first predicted luminance sample, and may generate a first mapped predicted luminance sample based on the input value and the mapping value of the pivot point corresponding to the mapping index. In other examples, a linear mapping (linear shaping, linear LMCS) may be used and the mapped predicted luminance sample may be generated based on a forward mapping scaling factor derived from two pivot points in the linear mapping, so that the index derivation process may be omitted due to the linear mapping.
[0454] The decoding device may generate a reconstructed luma sample (S1630). The decoding device may generate a reconstructed luma sample based on the mapped predicted luma sample. Specifically, the decoding device may sum the residual luma sample with the mapped predicted luma sample, and may generate a reconstructed luma sample based on the summed result.
[0455] The decoding device may generate scaled residual chroma samples. Specifically, the decoding device may derive a chroma residual scaling factor and generate scaled residual chroma samples based on the chroma residual scaling factor. Here, the chroma residual scaling on the decoding side may be referred to as inverse chroma residual scaling, as opposed to the encoding side. Accordingly, the chroma residual scaling factor derived by the decoding device may be referred to as an inverse chroma residual scaling factor, and inversely scaled residual chroma samples may be generated.
[0456] The decoding device may generate a reconstructed chroma sample. The decoding device may generate a reconstructed chroma sample based on the scaled residual chroma sample. Specifically, the decoding device may perform a prediction process for the chroma component and generate a predicted chroma sample. The decoding device may generate a reconstructed chroma sample based on the sum of the predicted chroma sample and the scaled residual chroma sample.
[0457] In one embodiment, the minimum bin index (e.g., lmcs_min_bin_idx) and / or the maximum bin index (e.g., LmcsMaxBinIdx) may be derived based on LMCS related information. A first mapping value (LmcsPivot[lmcs_min_bin_idx]) may be derived based on the minimum bin index. A second mapping value (LmcsPivot[LmcsMaxBinIdx] or LmcsPivot[LmcsMaxBinIdx+1]) may be derived based on the maximum bin index. The value of the reconstructed luma sample (i.e., lumaSample of Table 36 or Table 37) may be in the range from the first mapping value to the second mapping value. In one example, the values of all reconstructed luma samples may be in the range from the first mapping value to the second mapping value. In another example, the values of some reconstructed luma samples may be in the range from the first mapping value to the second mapping value.
[0458] In one embodiment, the image information may include a sequence parameter set (SPS). The SPS may include a linear LMCS enable flag that specifies whether to enable linear LMCS.
[0459] In one embodiment, the segment index (ie, idxYInv in Table 35, 36, or 37) may be identified based on the LMCS related information. The decoding device may derive the chroma residual scaling factor based on the segment index. The decoding device may generate scaled residual chroma samples based on the residual chroma samples and the chroma residual scaling factor.
[0460] In one embodiment, the chroma residual scaling factor may be a single chroma residual scaling factor.
[0461] In one embodiment, the LMCS related information may include an LMCS data field and information about linear LMCS. The information about linear LMCS may be referred to as information about linear mapping. The LMCS data field may include a linear LMCS flag indicating whether linear LMCS is applied. When the value of the linear LMCS flag is 1, a predicted luminance sample of the mapping may be generated based on the information about linear LMCS.
[0462] In one embodiment, the information about the linear LMCS includes information about the first pivot point (ie, Fig.11 P1 in the figure) and information about the second pivot point (i.e., Fig.11 For example, the input value and mapping value of the first pivot point are the minimum input value and the minimum mapping value respectively. The input value and mapping value of the second pivot point are the maximum input value and the maximum mapping value respectively. The input values between the minimum input value and the maximum input value are linearly mapped.
[0463] In one embodiment, the image information includes information about a maximum input value and information about a maximum mapping value. The maximum input value is equal to the value of the information about the maximum input value (i.e., lmcs_max_input in Table 20). The maximum mapping value is equal to the value of the information about the maximum mapping value (i.e., lmcs_max_mapped in Table 20).
[0464] In one embodiment, the information about the linear mapping includes information about the input variation value of the second pivot point (i.e., lmcs_max_input_delta in Table 22) and information about the mapping variation value of the second pivot point (i.e., lmcs_max_mapped_delta in Table 22). The maximum input value may be derived based on the input variation value of the second pivot point, and the maximum mapping value may be derived based on the mapping variation value of the second pivot point.
[0465] In one embodiment, the maximum input value and the maximum mapping value may be derived based on at least one equation included in the above-mentioned Table 23.
[0466] In one embodiment, generating the mapped predicted luma samples includes deriving a forward mapped scaling factor (ie, ScaleCoeffSingle) for predicting luma samples, and generating the mapped predicted luma samples based on the forward mapped scaling factor. The forward mapped scaling factor may be a single factor for predicting luma samples.
[0467] In one embodiment, the inverse mapping scaling factor may be derived using a segment index derived based on the reconstructed luma samples.
[0468] In one embodiment, the segment index may be derived based on the above-mentioned Table 36. That is, the comparison process (lumaSample <LmcsPivot[idxYInv+1])。
[0469] In one embodiment, the modified reconstructed luma samples may be generated based on a mapping value based on the bin index from a minimum bin index to a maximum bin index.
[0470] In one embodiment, the bin index includes a first bin index indicating a first mapping value. The first bin index can be derived based on a comparison between a mapping value based on a bin index from a minimum bin index to a maximum bin index and a value of the reconstructed luma sample. At least one of the modified reconstructed luma samples can be derived based on the reconstructed luma sample and the first mapping value.
[0471] In one embodiment, the bin index includes a first bin index indicating a first mapping value, and the first bin index may be derived based on a comparison formula (lumaSample < LmcsPivot[idxYInv+1]) included in Table 36. For example, in the above formula, lumaSample represents a value of a target luma sample in the reconstructed luma sample, idxYInv represents one of the bin indexes, and LmcsPivot[idxYinv + 1] represents one of the mapping values based on the bin indexes from the minimum bin index to the maximum bin index. At least one of the reconstructed luma samples may be derived based on the reconstructed luma sample and the first mapping value.
[0472] In one embodiment, the comparison process included in Table 36 may be performed on all bin indices from the minimum bin index to the maximum bin index (lumaSample <LmcsPivot[idxYInv+1])。
[0473] In one embodiment, the forward mapping scaling factor may be derived based on at least one equation included in Table 21 and / or Table 23 above.
[0474] In one embodiment, the mapped predicted luma samples may be derived based on at least one equation included in Table 25 above.
[0475] In one embodiment, the decoding device may derive an inverse mapping scaling factor (i.e., InvScaleCoeffSingle) for reconstructing luma samples (i.e., lumaSample). In addition, the decoding device may generate modified reconstructed luma samples (i.e., invSample) based on the reconstructed luma samples and the inverse mapping scaling factor. The inverse mapping scaling factor may be a single factor for reconstructing luma samples.
[0476] In one embodiment, the inverse mapping scaling factor may be derived based on the equations included in Tables 18, 19, 21, and 23 or at least one of the above-mentioned equations 11 or 12.
[0477] In an embodiment, the modified reconstructed luma samples may be derived based on Equation 21 above.
[0478] In one embodiment, the LMCS-related information may include information about the number of bins for predicting luminance samples used for derivation of mapping (i.e., lmcs_num_bins_minus1 in Table 26). For example, the number of pivot points for luminance mapping may be set to be equal to the number of bins. In one example, the decoding device may generate a change amount input value and a change amount mapping value for the pivot points respectively according to the number of bins. In one example, the input value and the mapping value of the pivot points are derived based on the change amount input value (i.e., lmcs_delta_input_cw[i] in Table 26) and the change amount mapping value (i.e., lmcs_delta_mapped_cw[i] in Table 26), and the mapped predicted luminance samples may be generated based on the input value (i.e., LmcsPivot_input[i] in Table 27, or InputPivot[i] in Table 8) and the mapping value (i.e., LmcsPivot_mapped[i] in Table 27, or LmcsPivot[i] in Table 8).
[0479] In one embodiment, the decoding device may derive an LMCS change amount codeword based on at least one LMCS codeword and the original codeword (OrgCW) included in the LMCS-related information, and may derive the mapped luminance prediction samples based on at least one LMCS codeword and the original codeword. In one example, the information about the linear mapping may include the information about the LMCS change amount codeword.
[0480] In one embodiment, at least one LMCS codeword may be derived based on the sum of the LMCS change amount codeword and OrgCW. For example, OrgCW is (1<<BitDepthY) / 16, where BitDepthY represents the luminance bit depth. This embodiment may be based on Equation 12.
[0481] In one embodiment, at least one LMCS codeword may be derived based on the sum of the LMCS change amount codeword and OrgCW*(lmcs_max_bin_idx - lmcs_min_bin_idx + 1). For example, lmcs_max_bin_idx and lmcs_min_bin_idx are the maximum bin index and the minimum bin index respectively, and OrgCW may be (1<<BitDepthY) / 16. This embodiment may be based on Equations 15 and 16.
[0482] In one embodiment, at least one LMCS codeword may be a multiple of two.
[0483] In an embodiment, when the luminance bit depth (BitDepthY) of the reconstructed luminance samples is greater than 10, at least one LMCS codeword may be a multiple of 1<<(BitDepthY - 10).
[0484] In one embodiment, at least one LMCS codeword may be in the range from (OrgCW>>1) to (OrgCW<<1)-1.
[0485] In the above-mentioned embodiment, the method is described based on a flow chart with a series of steps or boxes. The present disclosure is not limited to the order of the above-mentioned steps or boxes. Some steps or boxes may occur simultaneously with other steps or boxes as described above or in a different order. In addition, it will be understood by those skilled in the art that the steps shown in the above-mentioned flow chart are not exclusive, and further steps may be included, or one or more steps in the flow chart may be deleted without affecting the scope of the present disclosure.
[0486] The methods according to the above-described embodiments of the present invention may be implemented in software form, and the encoding device and / or decoding device according to the present invention may be included in a device that performs image processing for a TV, computer, smartphone, set-top box, display device, etc., for example.
[0487] When the embodiments herein are implemented in software, the above methods may be implemented as modules (processes, functions, etc.) that perform the above functions. The modules may be stored in a memory and executed by a processor. The memory may be inside or outside the processor and may be coupled to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described herein may be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in the figures may be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information about the instructions or the algorithm for implementation may be stored in a digital storage medium.
[0488] In addition, the decoding device and the encoding device to which the present disclosure is applied may be included in a multimedia broadcast transmission / reception device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a VoD service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a three-dimensional (3D) video device, a teleconferencing video device, a traffic user device (i.e., a vehicle user device, an aircraft user device, a ship user device, etc.), and a medical video device, and may be used to process video signals and data signals. For example, an over-the-top (OTT) video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet computer, a digital video recorder (DVR), etc.
[0489] In addition, the processing method of the present invention can be generated in the form of a program to be executed by a computer and can be stored in a computer-readable recording medium. Multimedia data with a data structure according to the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices in which data that can be read by a computer system is stored. For example, computer-readable recording media may include BD, universal serial bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. In addition, computer-readable recording media include media implemented in the form of carrier waves (i.e., transmitted over the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or can be sent through a wired / wireless communication network.
[0490] In addition, the embodiments of the present invention may be implemented using a computer program product according to a program code, and the program code may be executed in a computer through the embodiments of the present invention. The program code may be stored on a carrier that can be read by a computer.
[0491] Fig.18 An example of a content streaming system to which the embodiments disclosed herein may be applied is shown.
[0492] Reference Fig.18 The content streaming transmission system to which the embodiments of this document are applied may mainly include an encoding server, a streaming transmission server, a network server, a media storage, a user device, and a multimedia input device.
[0493] The encoding server compresses the content input from a multimedia input device such as a smartphone, a camera, or a camcorder into digital data to generate a bitstream and sends the bitstream to the streaming server. For another example, when a multimedia input device such as a smartphone, a camera, or a camcorder directly generates a bitstream, the encoding server can be omitted.
[0494] A bitstream may be generated by applying the encoding method or the bitstream generating method of the embodiment of the present disclosure, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0495] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server is used as a medium to inform the user of the service. When the user requests the required service from the network server, the network server passes it to the streaming server, and the streaming server sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.
[0496] The streaming server may receive content from a media storage and / or encoding server. For example, when content is received from an encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a predetermined time.
[0497] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc. Each server in the content streaming system may be operated as a distributed server, in which case data received from each server may be distributed.
[0498] Each server in the content streaming system may be operated as a distributed server, in which case data received from each server may be distributed and processed.
[0499] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and implemented as a device, and the technical features of the device claims herein may be combined and implemented as a method. In addition, the technical features of the method claims herein and the technical features of the device claims herein may be combined to be implemented as a device, and the technical features of the method claims herein and the technical features of the device claims herein may be combined and implemented as a method.
Claims
1. A decoding device for image decoding, the decoding device include: Memory; as well as at least one processor connected to the memory, the at least one processor being configured to: Obtaining image information from a bitstream, the image information comprising prediction related information and luminance mapping and chrominance scaling (LMCS) related information; Based on the prediction related information, deriving an intra prediction mode of the current block; Based on the intra prediction mode, generating predicted luminance samples; Based on the predicted brightness samples, generating reconstructed brightness samples; Based on the LMCS related information, deriving a piecewise function index; as well as generating modified reconstructed luminance samples based on the reconstructed luminance samples and the piecewise function index; Wherein, the minimum bin index and the maximum bin index are derived based on the LMCS related information, Wherein, deriving the piecewise function index comprises: determining whether a first mapping value is greater than a value of the reconstructed luma sample when the piecewise function index is equal to the minimum bin index; determining whether the second mapping value is greater than the value of the reconstructed luma sample when the piecewise function index is equal to the maximum bin index -1; determining whether a third mapped value is greater than the value of the reconstructed luma sample if the piecewise function index is equal to the maximum bin index based on determining that the second mapped value is not greater than the value of the reconstructed luma sample if the piecewise function index is equal to the maximum bin index-1, and Wherein, based on determining that the second mapping value is not greater than the value of the reconstructed brightness sample when the piecewise function index is equal to the maximum bin index-1, and based on determining that the third mapping value is greater than the value of the reconstructed brightness sample, the piecewise function index is derived as the maximum bin index.
2. A coding device for image coding, the coding device include: Memory; as well as at least one processor connected to the memory, the at least one processor being configured to: determining an intra prediction mode for a current block; Based on the intra prediction mode, generating predicted luminance samples; Based on the predicted brightness samples, generating residual brightness samples; Based on the residual brightness samples, deriving residual information; as well as encoding image information, the image information comprising luminance mapping and chrominance scaling (LMCS) related information and the residual information, Wherein, the method further comprises: Based on the predicted brightness samples, generating reconstructed brightness samples; Derivation of a piecewise function index based on the LMCS related information; and generating modified reconstructed luminance samples based on the reconstructed luminance samples and the piecewise function index, Wherein, the minimum bin index and the maximum bin index are derived based on the LMCS related information, Wherein, deriving the piecewise function index comprises: determining whether a first mapping value is greater than a value of the reconstructed luma sample when the piecewise function index is equal to the minimum bin index; determining whether the second mapping value is greater than the value of the reconstructed luma sample when the piecewise function index is equal to the maximum bin index -1; determining whether a third mapped value is greater than the value of the reconstructed luma sample if the piecewise function index is equal to the maximum bin index based on determining that the second mapped value is not greater than the value of the reconstructed luma sample if the piecewise function index is equal to the maximum bin index-1, and Wherein, based on determining that the second mapping value is not greater than the value of the reconstructed brightness sample when the piecewise function index is equal to the maximum bin index-1, and based on determining that the third mapping value is greater than the value of the reconstructed brightness sample, the piecewise function index is derived as the maximum bin index.
3. A device for transmitting data for image information, the device include: at least one processor configured to obtain a bitstream of image information, the image information comprising luma mapping and chroma scaling (LMCS) related information and residual information, wherein the bitstream is generated by determining an intra prediction mode for a current block, generating predicted luma samples based on the intra prediction mode, generating residual luma samples based on the predicted luma samples, deriving residual information based on the residual luma samples, and encoding the image information comprising the LMCS related information and the residual information; and a transmitter, the transmitter being configured to transmit data of the bit stream including the image information, the image information including the LMCS related information and the residual information, wherein, based on the predicted brightness samples, reconstructed brightness samples are generated; Wherein, based on the LMCS related information, a piecewise function index is derived; and wherein, based on the reconstructed brightness sample and the piecewise function index, a modified reconstructed brightness sample is generated, Wherein, based on the LMCS related information, the minimum bin index and the maximum bin index are derived, Wherein, to derive the piecewise function index, determining whether a first mapping value is greater than a value of the reconstructed luma sample when the piecewise function index is equal to the minimum bin index; determining whether the second mapping value is greater than the value of the reconstructed luma sample when the piecewise function index is equal to the maximum bin index -1; Based on determining that the second mapped value is not greater than the value of the reconstructed luma sample when the piecewise function index is equal to the maximum bin index-1, determining whether a third mapped value is greater than the value of the reconstructed luma sample when the piecewise function index is equal to the maximum bin index; and Wherein, based on determining that the second mapping value is not greater than the value of the reconstructed brightness sample when the piecewise function index is equal to the maximum bin index-1, and based on determining that the third mapping value is greater than the value of the reconstructed brightness sample, the piecewise function index is derived as the maximum bin index.
