Video or image coding based on LUMA mapping with chroma scaling
Patent Information
- Application Number
- IN202218057251
- Authority / Receiving Office
- IN · IN
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-03-07
- Filing Date
- 2022-10-06
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2040-03-06
AI Technical Summary
Current technologies face challenges in efficiently compressing and transmitting high-resolution, high-quality image/video data, particularly in immersive media formats like VR and AR, due to increased data volume and complexity, necessitating improved compression techniques such as luma mapping with chroma scaling (LMCS) and adaptive loop filtering (ALF).
The method involves efficiently signaling LMCS and ALF data hierarchically through adaptation parameter sets (APS) and using different APS IDs for filtering and reshaper data, allowing adaptive application of these techniques in units of pictures, slices, and coding blocks, thereby enhancing compression efficiency and visual quality.
This approach improves overall image/video compression efficiency and subjective/objective visual quality by enabling efficient signaling and adaptive application of LMCS and ALF, reducing transmission and storage costs while maintaining high-quality output.
Abstract
Description
Field of the disclosure[1] The present document relates to video or image coding based on luma mapping withchroma scaling.Related Art[2] Recently, demand for high-resolution, high-quality image / video such as 4K or 8K orhigher ultra high definition (UHD) image / video has increased in various fields. Asimage / video data has high resolution and high quality, the amount of information or bits to betransmitted increases relative to the existing image / video data, and thus, transmitting imagedata using a medium such as an existing wired / wireless broadband line or an existing storagemedium or storing image / video data using existing storage medium increase transmission costand storage cost.[3] In addition, interest and demand for immersive media such as virtual reality (VR) andartificial reality (AR) content or holograms has recently increased and broadcasting forimage / video is having characteristics different from reality images such as game images hasincreased.[4] Accordingly, a highly efficient image / video compression technology is required toeffectively compress, transmit, store, and reproduce information of a high-resolution, high-quality image / video having various characteristics as described above.[5] In addition, there is a discussion on techniques such as luma mapping with chromascaling (LMCS) and adaptive loop filtering (ALF) to improve compression efficiency andincrease subjective / objective visual quality. In order to efficiently apply these techniques, thereis a need for a method for efficiently signaling related information.SUMMARY[6] According to an embodiment of the present document, a method and an apparatus forincreasing image coding efficiency are provided.[7] According to an embodiment of the present document, an efficient filtering applicationmethod and apparatus are provided.[8] According to an embodiment of the present document, an efficient LCMS applicationmethod and apparatus are provided.[9] According to an embodiment of the present document, a method and an apparatus forhierarchically signaling ALF related information are provided.
[10] According to an embodiment of this document, a method and an apparatus forhierarchically signaling LMCS related information are provided.
[11] According to an embodiment of the present document, LMCS data may be signaledthrough APS from the parameter set based on the type information, and APS ID informationspecifying the ID of the referenced APS may be signaled through header information (tilegroup header, picture header or slice header).
[12] According to an embodiment of the present document, ALF data may be conditionallysignaled through APS, and APS ID information specifying the ID of the referenced APS maybe signaled through header information (tile group header, picture header or slice header).
[13] According to an embodiment of the present document, the APS (and / or its ID) for thederivation of ALF data may be different from the APS (and / or its ID) for the derivation of thereshaper data (LMCS data).
[14] According to an embodiment of the present document, a video / image decoding methodperformed by a decoding apparatus is provided.
[15] According to an embodiment of the present document, a decoding apparatus forperforming video / image decoding is provided.
[16] According to an embodiment of the present document, a video / image encoding methodperformed by an encoding apparatus is provided.
[17] According to an embodiment of the present document, an encoding apparatus forperforming video / image encoding is provided.
[18] According to one embodiment of the present document, there is provided a computer-readable digital storage medium in which encoded video / image information, generatedaccording to the video / image encoding method disclosed in at least one of the embodiments ofthe present document, is stored.
[19] According to an embodiment of the present document, there is provided a computer-readable digital storage medium in which encoded information or encoded video / imageinformation, causing to perform the video / image decoding method disclosed in at least one ofthe embodiments of the present document by the decoding apparatus, is stored.ADVANTAGEOUS EFFECTS
[20] According to an embodiment of the present document, overall image / videocompression efficiency may be improved.
[21] According to an embodiment of the present document, subjective / objective visualquality may be improved through efficient filtering.
[22] According to an embodiment of the present document, ALF and / or LMCS may beadaptively applied in units of pictures, slices, and / or coding blocks.
[23] According to an embodiment of the present document, ALF related information canbe efficiently signaled.
[24] According to an embodiment of the present document, LMCS related information canbe efficiently signaled.BRIEF DESCRIPTION OF THE DRAWINGS
[25] FIG. 1 illustrates an example of a video / image coding system to which theembodiments of the present document may be applied.
[26] FIG. 2 is a diagram schematically illustrating a configuration of a video / imageencoding apparatus to which the embodiments of the present document may be applied.
[27] FIG. 3 is a diagram schematically illustrating a configuration of a video / imagedecoding apparatus to which the embodiments of the present document may be applied.
[28] FIG. 4 exemplarily shows a hierarchical structure for a coded image / video.
[29] FIG. 5 is a flowchart schematically illustrating an example of an ALF process.
[30] FIG. 6 shows examples of the shapes of an ALF filters.
[31] FIG. 7 shows an example of a hierarchical structure of ALF data.
[32] FIG. 8 shows another example of a hierarchical structure of ALF data.
[33] FIG. 9 exemplarily illustrates a hierarchical structure of a CVS according to anembodiment of the present document.
[34] FIG. 10 illustrates an exemplary LMCS structure according to an embodiment of thepresent document.
[35] FIG. 11 illustrates an LMCS structure according to another embodiment of the presentdocument.
[36] FIG. 12 shows a graph representing an exemplary forward mapping.
[37] FIG. 13 and FIG. 14 schematically show an example of a video / image encodingmethod and related components according to embodiment(s) of the present document.
[38] FIG. 15 and FIG. 16 schematically show an example of an image / video decodingmethod and related components according to an embodiment of the present document.
[39] FIG. 17 shows an example of a content streaming system to which embodimentsdisclosed in the present document may be applied.DESCRIPTION OF EXEMPLARY EMBODIMENTS
[40] The present document may be modified in various forms, and specific embodimentsthereof will be described and shown in the drawings. However, the embodiments are notintended for limiting the present document. The terms used in the following description areused to merely describe specific embodiments, but are not intended to limit the presentdocument. An expression of a singular number includes an expression of the plural number, solong as it is clearly read differently. The terms such as "include" and "have" are intended toindicate that features, numbers, steps, operations, elements, components, or combinationsthereof used in the following description exist and it should be thus understood that thepossibility of existence or addition of one or more different features, numbers, steps, operations,elements, components, or combinations thereof is not excluded.
[41] Meanwhile, each configuration in the drawings described in the present document isshown independently for the convenience of description regarding different characteristicfunctions, and does not mean that each configuration is implemented as separate hardware orseparate software. For example, two or more components among each component may becombined to form one component, or one component may be divided into a plurality ofcomponents. Embodiments in which each component is integrated and / or separated are alsoincluded in the scope of the disclosure of the present document.
[42] Hereinafter, examples of the present embodiment will be described in detail withreference to the accompanying drawings. In addition, like reference numerals are used toindicate like elements throughout the drawings, and the same descriptions on the like elementswill be omitted.
[43] FIG. 1 illustrates an example of a video / image coding system to which theembodiments of the present document may be applied.
[44] Referring to FIG. 1, a video / image coding system may include a first device (a sourcedevice) and a second device (a reception device). The source device may transmit encodedvideo / image information or data to the reception device through a digital storage medium ornetwork in the form of a file or streaming.
[45] The source device may include a video source, an encoding apparatus, and a transmitter.The receiving device may include a receiver, a decoding apparatus, and a renderer. Theencoding apparatus may be called a video / image encoding apparatus, and the decodingapparatus may be called a video / image decoding apparatus. The transmitter may be includedin the encoding apparatus. The receiver may be included in the decoding apparatus. Therenderer may include a display, and the display may be configured as a separate device or anexternal component.
[46] The video source may acquire video / image through a process of capturing,synthesizing, or generating the video / image. The video source may include a video / imagecapture device and / or a video / image generating device. The video / image capture device mayinclude, for example, one or more cameras, video / image archives including previouslycaptured video / images, and the like. The video / image generating device may include, forexample, computers, tablets and smartphones, and may (electronically) generate video / images.For example, a virtual video / image may be generated through a computer or the like. In thiscase, the video / image capturing process may be replaced by a process of generating relateddata.
[47] The encoding apparatus may encode input video / image. The encoding apparatus mayperform a series of procedures such as prediction, transform, and quantization for compactionand coding efficiency. The encoded data (encoded video / image information) may be output inthe form of a bitstream.
[48] The transmitter may transmit the encoded image / image information or data output inthe form of a bitstream to the receiver of the receiving device through a digital storage mediumor a network in the form of a file or streaming. The digital storage medium may include variousstorage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and the like. Thetransmitter may include an element for generating a media file through a predetermined fileformat and may include an element for transmission through a broadcast / communicationnetwork. The receiver may receive / extract the bitstream and transmit the received bitstream tothe decoding apparatus.
[49] The decoding apparatus may decode the video / image by performing a series ofprocedures such as dequantization, inverse transform, and prediction corresponding to theoperation of the encoding apparatus.
[50] The renderer may render the decoded video / image. The rendered video / image may bedisplayed through the display.
[51] The present document relates to video / image coding. For example, amethod / embodiment disclosed in the present document may be applied to a method disclosedin the versatile video coding (VVC) standard, the essential video coding (EVC) standard, theAOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2)or the next generation video / image coding standard (e.g., H.267, H.268, or the like).
[52] The present document suggests various embodiments of video / image coding, and theabove embodiments may also be performed in combination with each other unless otherwisespecified.
[53] In the present document, a video may refer to a series of images over time. A picturegenerally refers to the unit representing one image at a particular time frame, and a slice / tilerefers to the unit constituting a part of the picture in terms of coding. A slice / tile may includeone or more coding tree units (CTUs). One picture may consist of one or more slices / tiles.One picture may consist of one or more tile groups. One tile group may include one or moretiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tilemay be partitioned into a multiple bricks, each of which may be constructed with one or moreCTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referredto as a brick. A brick scan may represent a specific sequential ordering of CTUs partitioning apicture, wherein the CTUs may be ordered in a CTU raster scan within a brick, and brickswithin a tile may be ordered consecutively in a raster scan of the bricks of the tile, and tiles ina picture may be ordered consecutively in a raster scan of the tiles of the picture. A tile is arectangular region of CTUs within a particular tile column and a particular tile row in a picture.The tile column is a rectangular region of CTUs having a height equal to the height of thepicture and a width specified by syntax elements in the picture parameter set. The tile row is arectangular region of CTUs having a height specified by syntax elements in the pictureparameter set and a width equal to the width of the picture. A tile scan is a specific sequentialordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTUraster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of thetiles of the picture. A slice includes an integer number of bricks of a picture that may beexclusively contained in a single NAL unit. A slice may consists of either a number of completetiles or only a consecutive sequence of complete bricks of one tile. In the present document, atile group and a slice may be used in place of each other. For example, in the present document,a tile group / tile group header may be referred to as a slice / slice header.
[54] Meanwhile, one picture may be divided into two or more subpictures. A subpicturemay be a rectangular region of one or more slices within a picture.
[55] A pixel or a pel may mean a smallest unit constituting one picture (or image). Also,'sample' may be used as a term corresponding to a pixel. A sample may generally represent apixel or a value of a pixel, and may represent only a pixel / pixel value of a luma component oronly a pixel / pixel value of a chroma component.
[56] A unit may represent a basic unit of image processing. The unit may include at leastone of a specific region of the picture and information related to the region. One unit mayinclude one luma block and two chroma (ex. cb, cr) blocks. The unit may be usedinterchangeably with terms such as block or area in some cases. In a general case, an MxNblock may include samples (or sample arrays) or a set (or array) of transform coefficients of Mcolumns and N rows. Alternatively, the sample may mean a pixel value in the spatial domain,and when such a pixel value is transformed to the frequency domain, it may mean a transformcoefficient in the frequency domain.
[57] In the present document, "A or B" may mean "only A", "only B" or "both A and B".In other words, "A or B" in the present document may be interpreted as "A and / or B". Forexample, in the present document "A, B or C (A, B or C)" means "only A", "only B", "onlyC", or "any combination of A, B and C".
[58] A slash ( / ) or comma (comma) used in the present document may mean "and / or". Forexample, "A / B" may mean "A and / or B". Accordingly, "A / B" may mean "only A", "only B",or "both A and B". For example, "A, B, C" may mean "A, B, or C".
[59] In the present document, "at least one of A and B" may mean "only A", "only B" or"both A and B". Also, in the present document, the expression "at least one of A or B" or "atleast one of A and / or B" may be interpreted the same as "at least one of A and B".
[60] Also, in the present document, "at least one of A, B and C" means "only A", "only B","only C", or "any combination of A, B and C". Also, "at least one of A, B or C" or "at leastone of A, B and / or C" may mean "at least one of A, B and C".
[61] Also, parentheses used in the present document may mean "for example". Specifically,when "prediction (intra prediction)" is indicated, "intra prediction" may be proposed as anexample of "prediction". In other words, "prediction" in the present document is not limited to"intra prediction", and "intra prediction" may be proposed as an example of "prediction". Also,even when "prediction (i.e., intra prediction)" is indicated, "intra prediction" may be proposedas an example of "prediction".
[62] Technical features that are individually described in one drawing in the presentdocument may be implemented individually or simultaneously.
[63] FIG. 2 is a diagram schematically illustrating a configuration of a video / imageencoding apparatus to which the embodiments of the present document may be applied.Hereinafter, what is referred to as the video encoding apparatus may include an image encodingapparatus.
[64] Referring to FIG. 2, the encoding apparatus 200 includes an image partitioner 210, apredictor 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 predictor 221 and an intrapredictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, adequantizer 234, and an inverse transformer 235. The residual processor 230 may furtherinclude a subtractor 231. The adder 250 may be called a reconstructor or a reconstructedblock generator. The image partitioner 210, the predictor 220, the residual processor 230, theentropy encoder 240, the adder 250, and the filter 260 may be configured by at least onehardware component (ex. An encoder chipset or processor) according to an embodiment. Inaddition, the memory 270 may include a decoded picture buffer (DPB) or may be configuredby a digital storage medium. The hardware component may further include the memory 270as an internal / external component.
[65] The image partitioner 210 may partition an input image (or a picture or a frame) inputto the encoding apparatus 200 into one or more processors. For example, the processor maybe called a coding unit (CU). In this case, the coding unit may be recursively partitionedaccording to a quad-tree binary-tree ternary-tree (QTBTTT) structure from a coding tree unit(CTU) or a largest coding unit (LCU). For example, one coding unit may be partitioned intoa plurality of coding units of a deeper depth based on a quad tree structure, a binary treestructure, and / or a ternary structure. In this case, for example, the quad tree structure may beapplied first and the binary tree structure and / or ternary structure may be applied later.Alternatively, the binary tree structure may be applied first. The coding procedure accordingto the present disclosure may be performed based on the final coding unit that is no longerpartitioned. In this case, the largest coding unit may be used as the final coding unit based oncoding efficiency according to image characteristics, or if necessary, the coding unit may berecursively partitioned into coding units of deeper depth and a coding unit having an optimalsize may be used as the final coding unit. Here, the coding procedure may include a procedureof prediction, transform, and reconstruction, which will be described later. As anotherexample, 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 theaforementioned final coding unit. The prediction unit may be a unit of sample prediction, andthe transform unit may be a unit for deriving a transform coefficient and / or a unit for derivinga residual signal from the transform coefficient.
[66] The unit may be used interchangeably with terms such as block or area in some cases.In a general case, an MxN block may represent a set of samples or transform coefficientscomposed of M columns and N rows. A sample may generally represent a pixel or a value ofa pixel, may represent only a pixel / pixel value of a luma component or represent only apixel / pixel value of a chroma component. A sample may be used as a term corresponding toone picture (or image) for a pixel or a pel.
[67] In the encoding apparatus 200, a prediction signal (predicted block, prediction samplearray) output from the inter predictor 221 or the intra predictor 222 is subtracted from an inputimage signal (original block, original sample array) to generate a residual signal residual block,residual sample array), and the generated residual signal is transmitted to the transformer 232.In this case, as shown, a unit for subtracting a prediction signal (predicted block, predictionsample array) from the input image signal (original block, original sample array) in the encoder200 may be called a subtractor 231. The predictor may perform prediction on a block to beprocessed (hereinafter, referred to as a current block) and generate a predicted block includingprediction samples for the current block. The predictor may determine whether intraprediction or inter prediction is applied on a current block or CU basis. As described later inthe description of each prediction mode, the predictor may generate various information relatedto prediction, such as prediction mode information, and transmit the generated information tothe entropy encoder 240. The information on the prediction may be encoded in the entropyencoder 240 and output in the form of a bitstream.
[68] The intra predictor 222 may predict the current block by referring to the samples in thecurrent picture. The referred samples may be located in the neighborhood of the current blockor may be located apart according to the prediction mode. In the intra prediction, predictionmodes may include a plurality of non-directional modes and a plurality of directional modes.The non-directional mode may include, for example, a DC mode and a planar mode. Thedirectional mode may include, for example, 33 directional prediction modes or 65 directionalprediction modes according to the degree of detail of the prediction direction. However, thisis merely an example, more or less directional prediction modes may be used depending on asetting. The intra predictor 222 may determine the prediction mode applied to the currentblock by using a prediction mode applied to a neighboring block.
[69] The inter predictor 221 may derive a predicted block for the current block based on areference block (reference sample array) specified by a motion vector on a reference picture.Here, in order to reduce the amount of motion information transmitted in the inter predictionmode, the motion information may be predicted in units of blocks, sub-blocks, or samples basedon correlation of motion information between the neighboring block and the current block.The motion information may include a motion vector and a reference picture index. Themotion information may further include inter prediction direction (L0 prediction, L1 prediction,Bi prediction, etc.) information. In the case of inter prediction, the neighboring block mayinclude a spatial neighboring block present in the current picture and a temporal neighboringblock present in the reference picture. The reference picture including the reference blockand the reference picture including the temporal neighboring block may be the same ordifferent. The temporal neighboring block may be called a collocated reference block, a co-located CU (colCU), and the like, and the reference picture including the temporal neighboringblock may be called a collocated picture (colPic). For example, the inter predictor 221 mayconfigure a motion information candidate list based on neighboring blocks and generateinformation indicating which candidate is used to derive a motion vector and / or a referencepicture index of the current block. Inter prediction may be performed based on variousprediction modes. For example, in the case of a skip mode and a merge mode, the interpredictor 221 may use motion information of the neighboring block as motion information ofthe current block. In the skip mode, unlike the merge mode, the residual signal may not betransmitted. In the case of the motion vector prediction (MVP) mode, the motion vector ofthe neighboring block may be used as a motion vector predictor and the motion vector of thecurrent block may be indicated by signaling a motion vector difference.
[70] The predictor 220 may generate a prediction signal based on various predictionmethods described below. For example, the predictor may not only apply intra prediction orinter prediction to predict one block but also simultaneously apply both intra prediction andinter prediction. This may be called combined inter and intra prediction (CIIP). In addition,the predictor may be based on an intra block copy (IBC) prediction mode or a palette mode forprediction of a block. The IBC prediction mode or palette mode may be used for contentimage / video coding of a game or the like, for example, screen content coding (SCC). TheIBC basically performs prediction in the current picture but may be performed similarly to interprediction in that a reference block is derived in the current picture. That is, the IBC may useat least one of the inter prediction techniques described in the present disclosure. The palettemode may be considered as an example of intra coding or intra prediction. When the palettemode is applied, a sample value within a picture may be signaled based on information on thepalette table and the palette index.
[71] The prediction signal generated by the predictor (including the inter predictor 221and / or the intra predictor 222) may be used to generate a reconstructed signal or to generate aresidual signal. The transformer 232 may generate transform coefficients by applying atransform technique to the residual signal. For example, the transform technique may includeat least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-lineartransform (CNT). Here, the GBT means transform obtained from a graph when relationshipinformation between pixels is represented by the graph. The CNT refers to transformgenerated based on a prediction signal generated using all previously reconstructed pixels. Inaddition, the transform process may be applied to square pixel blocks having the same size ormay be applied to blocks having a variable size rather than square.
[72] The quantizer 233 may quantize the transform coefficients and transmit them to theentropy encoder 240 and the entropy encoder 240 may encode the quantized signal(information on the quantized transform coefficients) and output a bitstream. Theinformation on the quantized transform coefficients may be referred to as residual information.The quantizer 233 may rearrange block type quantized transform coefficients into a one-dimensional vector form based on a coefficient scanning order and generate information on thequantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information on transform coefficients may be generated. Theentropy encoder 240 may perform various encoding methods such as, for example, exponentialGolomb, context-adaptive variable length coding (CAVLC), context-adaptive binaryarithmetic coding (CABAC), and the like. The entropy encoder 240 may encode informationnecessary for video / image reconstruction other than quantized transform coefficients (ex.values of syntax elements, etc.) together or separately. Encoded information (ex. encodedvideo / image information) may be transmitted or stored in units of NALs (network abstractionlayer) in the form of a bitstream. The video / image information may further includeinformation on various parameter sets such as an adaptation parameter set (APS), a pictureparameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Inaddition, the video / image information may further include general constraint information. Inthe present disclosure, information and / or syntax elements transmitted / signaled from theencoding apparatus to the decoding apparatus may be included in video / picture information.The video / image information may be encoded through the above-described encodingprocedure and included in the bitstream. The bitstream may be transmitted over a network ormay be stored in a digital storage medium. The network may include a broadcasting networkand / or a communication network, and the digital storage medium may include various storagemedia such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and the like. A transmitter (notshown) transmitting a signal output from the entropy encoder 240 and / or a storage unit (notshown) storing the signal may be included as internal / external element of the encodingapparatus 200, and alternatively, the transmitter may be included in the entropy encoder 240.
[73] The quantized transform coefficients output from the quantizer 233 may be used togenerate a prediction signal. For example, the residual signal (residual block or residualsamples) may be reconstructed by applying dequantization and inverse transform to thequantized transform coefficients through the dequantizer 234 and the inverse transformer 235.The adder 250 adds the reconstructed residual signal to the prediction signal output from theinter predictor 221 or the intra predictor 222 to generate a reconstructed signal (reconstructedpicture, reconstructed block, reconstructed sample array). If there is no residual for the blockto be processed, such as a case where the skip mode is applied, the predicted block may be usedas the reconstructed block. The adder 250 may be called a reconstructor or a reconstructedblock generator. The generated reconstructed signal may be used for intra prediction of a nextblock to be processed in the current picture and may be used for inter prediction of a nextpicture through filtering as described below.
[74] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied duringpicture encoding and / or reconstruction.
[75] The filter 260 may improve subjective / objective image quality by applying filtering tothe reconstructed signal. For example, the filter 260 may generate a modified reconstructedpicture by applying various filtering methods to the reconstructed picture and store themodified reconstructed picture in the memory 270, specifically, a DPB of the memory 270.The various filtering methods may include, for example, deblocking filtering, a sampleadaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filter 260 maygenerate various information related to the filtering and transmit the generated information tothe entropy encoder 240 as described later in the description of each filtering method. Theinformation related to the filtering may be encoded by the entropy encoder 240 and output inthe form of a bitstream.
[76] The modified reconstructed picture transmitted to the memory 270 may be used as thereference picture in the inter predictor 221. When the inter prediction is applied through theencoding apparatus, prediction mismatch between the encoding apparatus 200 and thedecoding apparatus 300 may be avoided and encoding efficiency may be improved.
[77] The DPB of the memory 270 DPB may store the modified reconstructed picture foruse as a reference picture in the inter predictor 221. The memory 270 may store the motioninformation of the block from which the motion information in the current picture is derived(or encoded) and / or the motion information of the blocks in the picture that have already beenreconstructed. The stored motion information may be transmitted to the inter predictor 221and used as the motion information of the spatial neighboring block or the motion informationof the temporal neighboring block. The memory 270 may store reconstructed samples ofreconstructed blocks in the current picture and may transfer the reconstructed samples to theintra predictor 222.
[78] FIG. 3 is a schematic diagram illustrating a configuration of a video / image decodingapparatus to which the embodiment(s) of the present disclosure may be applied.
[79] Referring to FIG. 3, the decoding apparatus 300 may include an entropy decoder 310,a residual processor 320, a predictor 330, an adder 340, a filter 350, a memory 360. Thepredictor 330 may include an inter predictor 331 and an intra predictor 332. The residualprocessor 320 may include a dequantizer 321 and an inverse transformer 321. The entropydecoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350may be configured by a hardware component (ex. A decoder chipset or a processor)according to an embodiment. In addition, the memory 360 may include a decoded picturebuffer (DPB) or may be configured by a digital storage medium. The hardware componentmay further include the memory 360 as an internal / external component.
[80] When a bitstream including video / image information is input, the decoding apparatus300 may reconstruct an image corresponding to a process in which the video / image informationis processed in the encoding apparatus of FIG. 2. For example, the decoding apparatus 300may derive units / blocks based on block partition related information obtained from thebitstream. The decoding apparatus 300 may perform decoding using a processor applied inthe encoding apparatus. Thus, the processor of decoding may be a coding unit, for example,and the coding unit may be partitioned according to a quad tree structure, binary tree structureand / or ternary tree structure from the coding tree unit or the largest coding unit. One or moretransform units may be derived from the coding unit. The reconstructed image signal decodedand output through the decoding apparatus 300 may be reproduced through a reproducingapparatus.
[81] The decoding apparatus 300 may receive a signal output from the encoding apparatusof FIG. 2 in the form of a bitstream, and the received signal may be decoded through the entropydecoder 310. For example, the entropy decoder 310 may parse the bitstream to deriveinformation (ex. video / image information) necessary for image reconstruction (or picturereconstruction). The video / image information may further include information on variousparameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), asequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / imageinformation may further include general constraint information. The decoding apparatus mayfurther decode picture based on the information on the parameter set and / or the generalconstraint information. Signaled / received information and / or syntax elements described laterin the present disclosure may be decoded may decode the decoding procedure and obtainedfrom the bitstream. For example, the entropy decoder 310 decodes the information in thebitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC,and output syntax elements required for image reconstruction and quantized values oftransform coefficients for residual. More specifically, the CABAC entropy decoding methodmay receive a bin corresponding to each syntax element in the bitstream, determine a contextmodel using a decoding target syntax element information, decoding information of a decodingtarget block or information of a symbol / bin decoded in a previous stage, and perform anarithmetic decoding on the bin by predicting a probability of occurrence of a bin according tothe determined context model, and generate a symbol corresponding to the value of each syntaxelement. In this case, the CABAC entropy decoding method may update the context modelby using the information of the decoded symbol / bin for a context model of a next symbol / binafter determining the context model. The information related to the prediction among theinformation decoded by the entropy decoder 310 may be provided to the predictor (the interpredictor 332 and the intra predictor 331), and the residual value on which the entropy decodingwas performed in the entropy decoder 310, that is, the quantized transform coefficients andrelated parameter information, may be input to the residual processor 320. The residualprocessor 320 may derive the residual signal (the residual block, the residual samples, theresidual sample array). In addition, information on filtering among information decoded bythe entropy decoder 310 may be provided to the filter 350. Meanwhile, a receiver (not shown)for receiving a signal output from the encoding apparatus may be further configured as aninternal / external element of the decoding apparatus 300, or the receiver may be a componentof the entropy decoder 310. Meanwhile, the decoding apparatus according to the presentdisclosure may be referred to as a video / image / picture decoding apparatus, and the decodingapparatus may be classified into an information decoder (video / image / picture informationdecoder) and a sample decoder (video / image / picture sample decoder). The informationdecoder may include the entropy decoder 310, and the sample decoder may include at least oneof the dequantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory360, the inter predictor 332, and the intra predictor 331.
[82] The dequantizer 321 may dequantize the quantized transform coefficients and outputthe transform coefficients. The dequantizer 321 may rearrange the quantized transformcoefficients in the form of a two-dimensional block form. In this case, the rearrangement maybe performed based on the coefficient scanning order performed in the encoding apparatus.The dequantizer 321 may perform dequantization on the quantized transform coefficients byusing a quantization parameter (ex. quantization step size information) and obtain transformcoefficients.
[83] The inverse transformer 322 inversely transforms the transform coefficients to obtaina residual signal (residual block, residual sample array).
[84] The predictor may perform prediction on the current block and generate a predictedblock including prediction samples for the current block. The predictor may determinewhether intra prediction or inter prediction is applied to the current block based on theinformation on the prediction output from the entropy decoder 310 and may determine aspecific intra / inter prediction mode.
[85] The predictor 320 may generate a prediction signal based on various predictionmethods described below. For example, the predictor may not only apply intra prediction orinter prediction to predict one block but also simultaneously apply intra prediction and interprediction. This may be called combined inter and intra prediction (CIIP). In addition, thepredictor may be based on an intra block copy (IBC) prediction mode or a palette mode forprediction of a block. The IBC prediction mode or palette mode may be used for contentimage / video coding of a game or the like, for example, screen content coding (SCC). TheIBC basically performs prediction in the current picture but may be performed similarly to interprediction in that a reference block is derived in the current picture. That is, the IBC may useat least one of the inter prediction techniques described in the present disclosure. The palettemode may be considered as an example of intra coding or intra prediction. When the palettemode is applied, a sample value within a picture may be signaled based on information on thepalette table and the palette index.
[86] The intra predictor 331 may predict the current block by referring to the samples in thecurrent picture. The referred samples may be located in the neighborhood of the current blockor may be located apart according to the prediction mode. In the intra prediction, predictionmodes may include a plurality of non-directional modes and a plurality of directional modes.The intra predictor 331 may determine the prediction mode applied to the current block byusing a prediction mode applied to a neighboring block.
[87] The inter predictor 332 may derive a predicted block for the current block based on areference 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 transmitted in the interprediction mode, motion information may be predicted in units of blocks, sub-blocks, orsamples based on correlation of motion information between the neighboring block and thecurrent block. The motion information may include a motion vector and a reference pictureindex. The motion information may further include inter prediction direction (L0 prediction,L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboringblock may include a spatial neighboring block present in the current picture and a temporalneighboring block present in the reference picture. For example, the inter predictor 332 mayconfigure a motion information candidate list based on neighboring blocks and derive a motionvector of the current block and / or a reference picture index based on the received candidateselection information. Inter prediction may be performed based on various prediction modes,and the information on the prediction may include information indicating a mode of interprediction for the current block.
[88] The adder 340 may generate a reconstructed signal (reconstructed picture,reconstructed block, reconstructed sample array) by adding the obtained residual signal to theprediction signal (predicted block, predicted sample array) output from the predictor (includingthe inter predictor 332 and / or the intra predictor 331). If there is no residual for the block tobe processed, such as when the skip mode is applied, the predicted block may be used as thereconstructed block.
[89] The adder 340 may be called reconstructor or a reconstructed block generator. Thegenerated reconstructed signal may be used for intra prediction of a next block to be processedin the current picture, may be output through filtering as described below, or may be used forinter prediction of a next picture.
[90] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied in the picturedecoding process.
[91] The filter 350 may improve subjective / objective image quality by applying filtering tothe reconstructed signal. For example, the filter 350 may generate a modified reconstructedpicture by applying various filtering methods to the reconstructed picture and store themodified reconstructed picture in the memory 360, specifically, a DPB of the memory 360.The various filtering methods may include, for example, deblocking filtering, a sampleadaptive offset, an adaptive loop filter, a bilateral filter, and the like.
[92] The (modified) reconstructed picture stored in the DPB of the memory 360 may beused as a reference picture in the inter predictor 332. The memory 360 may store the motioninformation of the block from which the motion information in the current picture is derived(or decoded) and / or the motion information of the blocks in the picture that have already beenreconstructed. The stored motion information may be transmitted to the inter predictor 260so as to be utilized as the motion information of the spatial neighboring block or the motioninformation of the temporal neighboring block. The memory 360 may store reconstructedsamples of reconstructed blocks in the current picture and transfer the reconstructed samplesto the intra predictor 331.
[93] In the present document, the embodiments described in the filter 260, the interpredictor 221, and the intra predictor 222 of the encoding apparatus 200 may be the same as orrespectively applied to correspond to the filter 350, the inter predictor 332, and the intrapredictor 331of the decoding apparatus 300. The same may also apply to the unit 332 and theintra predictor 331.
[94] As described above, in video coding, prediction is performed to increase compressionefficiency. Through this, it is possible to generate a predicted block including predictionsamples for a current block, which is a block to be coded. Here, the predicted block includesprediction samples in a spatial domain (or pixel domain). The predicted block is derived equallyfrom the encoding device and the decoding device, and the encoding device decodesinformation (residual information) on the residual between the original block and the predictedblock, not the original sample value of the original block itself. By signaling to the device,image coding efficiency can be increased. The decoding apparatus may derive a residual blockincluding residual samples based on the residual information, and generate a reconstructedblock including reconstructed samples by summing the residual block and the predicted block,and generate a reconstructed picture including reconstructed blocks.
[95] The residual information may be generated through transformation and quantizationprocesses. For example, the encoding apparatus may derive a residual block between theoriginal block and the predicted block, and perform a transform process on residual samples(residual sample array) included in the residual block to derive transform coefficients, and then,by performing a quantization process on the transform coefficients, derive quantized transformcoefficients to signal the residual related information to the decoding apparatus (via abitstream). Here, the residual information may include location information, a transformtechnique, a transform kernel, and a quantization parameter, value information of the quantizedtransform coefficients etc. The decoding apparatus may perform dequantization / inversetransformation process based on the residual information and derive residual samples (orresidual blocks). The decoding apparatus may generate a reconstructed picture based on thepredicted block and the residual block. The encoding apparatus may also dequantize / inversetransform the quantized transform coefficients for reference for inter prediction of a laterpicture to derive a residual block, and generate a reconstructed picture based thereon. In thepresent document, at least one of quantization / dequantization and / or transform / inversetransform may be omitted. When the quantization / dequantization is omitted, the quantizedtransform coefficient may be referred to as a transform coefficient. When the transform / inversetransform is omitted, the transform coefficients may be called coefficients or residualcoefficients, or may still be called transform coefficients for uniformity of expression. In thepresent document, a quantized transform coefficient and a transform coefficient may bereferred to as a transform coefficient and a scaled transform coefficient, respectively. In thiscase, the residual information may include information on transform coefficient(s), and theinformation on the transform coefficient(s) may be signaled through residual coding syntax.Transform coefficients may be derived based on the residual information (or information onthe transform coefficient(s)), and scaled transform coefficients may be derived through inversetransform (scaling) on the transform coefficients. Residual samples may be derived based onan inverse transform (transform) of the scaled transform coefficients. This may beapplied / expressed in other parts of the present document as well.
[96] Intra prediction may refer to prediction that generates prediction samples for thecurrent block based on reference samples in a picture to which the current block belongs(hereinafter, referred to as a current picture). When intra prediction is applied to the currentblock, neighboring reference samples to be used for intra prediction of the current block maybe derived. The neighboring reference samples of the current block may include samplesadjacent to the left boundary of the current block having a size of nWxnH and a total of 2xnHsamples neighboring the bottom-left, samples adjacent to the top boudary of the current blockand a total of 2xnW samples neighboring the top-right, and one sample neighboring the top-left of the current block. Alternatively, the neighboring reference samples of the current blockmay include a plurality of upper neighboring samples and a plurality of left neighboringsamples. In addition, the neighboring reference samples of the current block may include atotal 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 bottom boundary of the current block, and one sampleneighboring (bottom-right) neighboring bottom-right of the current block.
[97] However, some of the neighboring reference samples of the current block may not bedecoded yet or available. In this case, the decoder may configure the neighboring referencesamples to use for prediction by substituting the samples that are not available with theavailable samples. Alternatively, neighboring reference samples to be used for prediction maybe configured through interpolation of the available samples.
[98] When the neighboring reference samples are derived, (i) the prediction sample may bederived based on the average or interpolation of neighboring reference samples of the currentblock, and (ii) the prediction sample may be derived based on the reference sample present ina specific (prediction) direction for the prediction sample among the periphery referencesamples of the current block. The case of (i) may be called non-directional mode or non-angularmode and the case of (ii) may be called directional mode or angular mode.
[99] Furthermore, the prediction sample may also be generated through interpolationbetween the second neighboring sample and the first neighboring sample located in a directionopposite to the prediction direction of the intra prediction mode of the current block based onthe prediction sample of the current block among the neighboring reference samples. The abovecase may be referred to as linear interpolation intra prediction (LIP). In addition, chromaprediction samples may be generated based on luma samples using a linear model. This casemay be called LM mode.
[100] In addition, a temporary prediction sample of the current block may be derived basedon filtered neighboring reference samples, and at least one reference sample derived accordingto the intra prediction mode among the existing neighboring reference samples, that is,unfiltered neighboring reference samples, and the temporary prediction sample may beweighted-summed to derive the prediction sample of the current block. The above case may bereferred to as position dependent intra prediction (PDPC).
[101] In addition, a reference sample line having the highest prediction accuracy among theneighboring multi-reference sample lines of the current block may be selected to derive theprediction sample by using the reference sample located in the prediction direction on thecorresponding line, and then the reference sample line used herein may be indicated (signaled)to the decoding apparatus, thereby performing intra-prediction encoding. The above case maybe referred to as multi-reference line (MRL) intra prediction or MRL based intra prediction.
[102] In addition, intra prediction may be performed based on the same intra prediction modeby dividing the current block into vertical or horizontal subpartitions, and neighboringreference samples may be derived and used in the subpartition unit. That is, in this case, theintra prediction mode for the current block is equally applied to the subpartitions, and the intraprediction performance may be improved in some cases by deriving and using the neighboringreference samples in the subpartition unit. Such a prediction method may be called intra sub-partitions (ISP) or ISP based intra prediction.
[103] The above-described intra prediction methods may be called an intra prediction typeseparately from the intra prediction mode. The intra prediction type may be called in variousterms such as an intra prediction technique or an additional intra prediction mode. For example,the intra prediction type (or additional intra prediction mode) may include at least one of theabove-described LIP, PDPC, MRL, and ISP. A general intra prediction method except for thespecific intra prediction type such as LIP, PDPC, MRL, or ISP may be called a normal intraprediction type. The normal intra prediction type may be generally applied when the specificintra prediction type is not applied, and prediction may be performed based on the intraprediction mode described above. Meanwhile, post-filtering may be performed on the predictedsample derived as needed.
[104] Specifically, the intra prediction procedure may include an intra prediction mode / typedetermination step, a neighboring reference sample derivation step, and an intra predictionmode / type based prediction sample derivation step. In addition, a post-filtering step may beperformed on the predicted sample derived as needed.
[105] When intra prediction is applied, the intra prediction mode applied to the current blockmay be determined using the intra prediction mode of the neighboring block. For example, thedecoding apparatus may select one of most probable mode (mpm) candidates of an mpm listderived based on the intra prediction mode of the neighboring block (ex. left and / or upperneighboring blocks) of the current block based on the received mpm index and select one ofthe other remaining intro prediction modes not included in the mpm candidates (and planarmode) based on the remaining intra prediction mode information. The mpm list may beconfigured to include or not include a planar mode as a candidate. For example, if the mpm listincludes the planar mode as a candidate, the mpm list may have six candidates. If the mpm listdoes not include the planar mode as a candidate, the mpm list may have three candidates. Whenthe mpm list does not include the planar mode as a candidate, a not planar flag (ex.intra_luma_not_planar_flag) indicating whether an intra prediction mode of the current blockis not the planar mode may be signaled. For example, the mpm flag may be signaled first, andthe mpm index and not planar flag may be signaled when the value of the mpm flag is 1. Inaddition, the mpm index may be signaled when the value of the not planar flag is 1. Here, thempm list is configured not to include the planar mode as a candidate does not is to signal thenot planar flag first to check whether it is the planar mode first because the planar mode isalways considered as mpm.
[106] For example, whether the intra prediction mode applied to the current block is in mpmcandidates (and planar mode) or in remaining mode may be indicated based on the mpm flag(ex. Intra_luma_mpm_flag). A value 1 of the mpm flag may indicate that the intra predictionmode for the current block is within mpm candidates (and planar mode), and a value 0 of thempm flag may indicate that the intra prediction mode for the current block is not in the mpmcandidates (and planar mode). The value 0 of the not planar flag (ex.Intra_luma_not_planar_flag) may indicate that the intra prediction mode for the current blockis planar mode, and the value 1 of the not planar flag value may indicate that the intra predictionmode for the current block is not the planar mode. The mpm index may be signaled in the formof an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra predictionmode information may be signaled in the form of a rem_intra_luma_pred_mode orintra_luma_mpm_remainder syntax element. For example, the remaining intra prediction modeinformation may index remaining intra prediction modes not included in the mpm candidates(and planar mode) among all intra prediction modes in order of prediction mode number toindicate one of them. The intra prediction mode may be an intra prediction mode for a lumacomponent (sample). Hereinafter, intra prediction mode information may include at least oneof the mpm flag (ex. Intra_luma_mpm_flag), the not planar flag (ex.Intra_luma_not_planar_flag), the mpm index (ex. mpm_idx or intra_luma_mpm_idx), and theremaining intra prediction mode information (rem_intra_luma_pred_mode orintra_luma_mpm_remainder). In the present document, the MPM list may be referred to invarious terms such as MPM candidate list and candModeList. When MIP is applied to thecurrent block, a separate mpm flag (ex. intra_mip_mpm_flag), an mpm index (ex.intra_mip_mpm_idx), and remaining intra prediction mode information (ex.intra_mip_mpm_remainder) for MIP may be signaled and the not planar flag is not signaled.
[107] In other words, in general, when block splitting is performed on an image, a currentblock and a neighboring block to be coded have similar image characteristics. Therefore, thecurrent block and the neighboring block have a high probability of having the same or similarintra prediction mode. Thus, the encoder may use the intra prediction mode of the neighboringblock to encode the intra prediction mode of the current block.
[108] For example, the encoder / decoder may configure a list of most probable modes (MPM)for the current block. The MPM list may also be referred to as an MPM candidate list. Herein,the MPM may refer to a mode used to improve coding efficiency in consideration of similaritybetween the current block and neighboring block in intra prediction mode coding. As describedabove, the MPM list may be configured to include the planar mode or may be configured toexclude the planar mode. For example, when the MPM list includes the planar mode, thenumber of candidates in the MPM list may be 6. And, if the MPM list does not include theplanar mode, the number of candidates in the MPM list may be 5.
[109] The encoder / decoder may configure an MPM list including 5 or 6 MPMs.
[110] In order to configure the MPM list, three types of modes can be considered: defaultintra modes, neighbor intra modes, and the derived intra modes.
[111] For the neighboring intra modes, two neighboring blocks, i.e., a left neighboring blockand an upper neighboring block, may be considered.
[112] As described above, if the MPM list is configured not to include the planar mode, theplanar mode is excluded from the list, and the number of MPM list candidates may be set to 5.
[113] In addition, the non-directional mode (or non-angular mode) among the intraprediction modes may include a DC mode based on the average of neighboring referencesamples of the current block or a planar mode based on interpolation.
[114] When inter prediction is applied, the predictor of the encoding apparatus / decodingapparatus may derive a prediction sample by performing inter prediction in units of blocks.Inter prediction may be a prediction derived in a manner that is dependent on data elements(ex. sample values or motion information) of picture(s) other than the current picture. Wheninter prediction is applied to the current block, a predicted block (prediction sample array) forthe current block may be derived based on a reference block (reference sample array) specifiedby a motion vector on the reference picture indicated by the reference picture index. Here, inorder to reduce the amount of motion information transmitted in the inter prediction mode, themotion information of the current block may be predicted in units of blocks, subblocks, orsamples based on correlation of motion information between the neighboring block and thecurrent block. The motion information may include a motion vector and a reference pictureindex. The motion information may further include inter prediction type (L0 prediction, L1prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboringblock may include a spatial neighboring block present in the current picture and a temporalneighboring block present in the reference picture. The reference picture including thereference block and the reference picture including the temporal neighboring block may be thesame or different. The temporal neighboring block may be called a collocated reference block,a co-located CU (colCU), and the like, and the reference picture including the temporalneighboring block may be called a collocated picture (colPic). For example, a motioninformation candidate list may be configured based on neighboring blocks of the current block,and flag or index information indicating which candidate is selected (used) may be signaled toderive a motion vector and / or a reference picture index of the current block. Inter predictionmay be performed based on various prediction modes. For example, in the case of a skip modeand a merge mode, the motion information of the current block may be the same as motioninformation of the neighboring block. In the skip mode, unlike the merge mode, the residualsignal may not be transmitted. In the case of the motion vector prediction (MVP) mode, themotion vector of the selected neighboring block may be used as a motion vector predictor andthe motion vector of the current block may be signaled. In this case, the motion vector of thecurrent block may be derived using the sum of the motion vector predictor and the motionvector difference.
[115] The motion information may include L0 motion information and / or L1 motioninformation according to an inter prediction type (L0 prediction, L1 prediction, Bi prediction,etc.). 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 called L0 prediction, prediction based on theL1 motion vector may be called L1 prediction, and prediction based on both the L0 motionvector and the L1 motion vector may be called bi-prediction. Here, the L0 motion vector mayindicate a motion vector associated with the reference picture list L0 (L0), and the L1 motionvector may indicate a motion vector associated with the reference picture list L1 (L1). Thereference picture list L0 may include pictures that are earlier in output order than the currentpicture as reference pictures, and the reference picture list L1 may include pictures that are laterin the output order than the current picture. The previous pictures may be called forward(reference) pictures, and the subsequent pictures may be called reverse (reference) pictures.The reference picture list L0 may further include pictures that are later in the output order thanthe current picture as reference pictures. In this case, the previous pictures may be indexed firstin the reference picture list L0 and the subsequent pictures may be indexed later. The referencepicture list L1 may further include previous pictures in the output order than the current pictureas reference pictures. In this case, the subsequent pictures may be indexed first in the referencepicture list 1 and the previous pictures may be indexed later. The output order may correspondto picture order count (POC) order.
[116] FIG. 4 exemplarily shows a hierarchical structure for a coded image / video.
[117] Referring to FIG. 4, coded image / video is divided into a video coding layer (VCL) thathandles the decoding process of the image / video and itself, a subsystem that transmits andstores the coded information, and NAL (network abstraction layer) in charge of function andpresent between the VCL and the subsystem.
[118] In the VCL, VCL data including compressed image data (slice data) is generated, or aparameter set including a picture parameter set (PSP), a sequence parameter set (SPS), and avideo parameter set (VPS) or a supplemental enhancement information (SEI) messageadditionally required for an image decoding process may be generated.
[119] In the NAL, a NAL unit may be generated by adding header information (NAL unitheader) to a raw byte sequence payload (RBSP) generated in a VCL. In this case, the RBSPrefers to slice data, parameter set, SEI message, etc., generated in the VCL. The NAL unitheader may include NAL unit type information specified according to RBSP data included inthe corresponding NAL unit.
[120] As shown in the figure, the NAL unit may be classified into a VCL NAL unit and aNon-VCL NAL unit according to the RBSP generated in the VCL. The VCL NAL unit maymean a NAL unit that includes information on the image (slice data) on the image, and theNon-VCL NAL unit may mean a NAL unit that includes information (parameter set or SEImessage) required for decoding the image.
[121] The above-described VCL NAL unit and Non-VCL NAL unit may be transmittedthrough a network by attaching header information according to the data standard of thesubsystem. For example, the NAL unit may be transformed into a data format of apredetermined standard such as an H.266 / VVC file format, a real-time transport protocol (RTP),a transport stream (TS), etc., and transmitted through various networks.
[122] As described above, the NAL unit may be specified with the NAL unit type accordingto the RBSP data structure included in the corresponding NAL unit, and information on theNAL unit type may be stored and signaled in the NAL unit header.
[123] For example, the NAL unit may be classified into a VCL NAL unit type and a Non-VCL NAL unit type according to whether the NAL unit includes information (slice data) aboutan image. The VCL NAL unit type may be classified according to the nature and type ofpictures included in the VCL NAL unit, and the Non-VCL NAL unit type may be classifiedaccording to types of parameter sets.
[124] The following is an example of the NAL unit type specified according to the type ofparameter set included in the Non-VCL NAL unit type.
[125] - APS (Adaptation Parameter Set) NAL unit: Type for NAL unit including APS
[126] - DPS (Decoding Parameter Set) NAL unit: Type for NAL unit including DPS
[127] - VPS(Video Parameter Set) NAL unit: Type for NAL unit including VPS
[128] - SPS(Sequence Parameter Set) NAL unit: Type for NAL unit including SPS
[129] - PPS(Picture Parameter Set) NAL unit: Type for NAL unit including PPS
[130] - PH(Picture header) NAL unit: Type for NAL unit including PH
[131] The aforementioned NAL unit types may have syntax information for the NAL unittype, and the syntax information may be stored and signaled in a NAL unit header. For example,the syntax information may be nal_unit_type, and NAL unit types may be specified by anal_unit_type value.
[132] Meanwhile, as described above, one picture may include a plurality of slices, and oneslice may include a slice header and slice data. In this case, one picture header may be furtheradded to a plurality of slices (a slice header and a slice data set) in one picture. The pictureheader (picture header syntax) may include information / parameters commonly applicable tothe picture. In the present document, a slice or a picture may be mixed or replaced with a tilegroup. Also, in the present document, a slice header or a picture header may be mixed orreplaced with a tile group header.
[133] The slice header (slice header syntax) may include information / parameters that maybe commonly applied to the slice. The APS (APS syntax) or the PPS (PPS syntax) may includeinformation / parameters that may be commonly applied to one or more slices or pictures. TheSPS (SPS syntax) may include information / parameters that may be commonly applied to oneor more sequences. The VPS (VPS syntax) may include information / parameters that may becommonly applied to multiple layers. The DPS (DPS syntax) may includeinformation / parameters that may be commonly applied to the overall video. The DPS mayinclude information / parameters related to concatenation of a coded video sequence (CVS). Thehigh level syntax (HLS) in the present document may include at least one of the APS syntax,the PPS syntax, the SPS syntax, the VPS syntax, the DPS syntax, and the slice header syntax.
[134] In the present document, the image / image information encoded from the encodingapparatus and signaled to the decoding apparatus in the form of a bitstream includes not onlypartitioning related information in a picture, intra / inter prediction information, residualinformation, in-loop filtering information, etc, but also information included in a slice header,information included in the APS, information included in the PPS, information included in anSPS, and / or information included in the VPS.
[135] Meanwhile, in order to compensate for a difference between an original image and areconstructed image due to an error occurring in a compression coding process such asquantization, an in-loop filtering process may be performed on reconstructed samples orreconstructed pictures as described above. As described above, the in-loop filtering may beperformed by the filter of the encoding apparatus and the filter of the decoding apparatus, anda deblocking filter, SAO, and / or adaptive loop filter (ALF) may be applied. For example, theALF process may be performed after the deblocking filtering process and / or the SAO processare completed. However, even in this case, the deblocking filtering process and / or the SAOprocess may be omitted.
[136] FIG. 5 is a flowchart schematically illustrating an example of an ALF process. TheALF process disclosed in FIG. 5 may be performed in an encoding apparatus and a decodingapparatus. In this document, the coding apparatus may include the encoding apparatus and / orthe decoding apparatus.
[137] Referring to FIG. 5, the coding apparatus derives a filter for ALF (S500). The filtermay include filter coefficients. The coding apparatus may determine whether to apply the ALF,and when determining to apply the ALF, may derive a filter including filter coefficients for theALF. Information for deriving a filter (coefficients) for ALF or a filter (coefficients) for ALFmay be referred to as an ALF parameter. Information on whether ALF is applied (i.e., ALFenabled flag) and ALF data for deriving the filter may be signaled from the encoding apparatusto the decoding apparatus. ALF data may include information for deriving a filter for the ALF.Also, for example, for hierarchical control of ALF, an ALF enabled flag may be signaled at theSPS, picture header, slice header, and / or CTB level, respectively.
[138] In order to derive the filter for the ALF, the activity and / or directivity of the currentblock (or ALF target block) is derived, and the filter may be derived based on the activity and / orthe directionality. For example, the ALF process may be applied in units of 4x4 blocks (basedon luma components). The current block or the ALF target block may be, for example, a CU,or may be a 4x4 block within a CU. Specifically, for example, filters for ALF may be derivedbased on first filters derived from information included in the ALF data and predefined secondfilters, and the coding apparatus may select one of the filters based on the activity and / or thedirectionality. The coding apparatus may use filter coefficients included in the selected filterfor the ALF.
[139] The coding apparatus performs filtering based on the filter (S510). Modifiedreconstructed samples may be derived based on the filtering. For example, the filter coefficientsin the filter may be arranged or allocated according to a filter shape, and the filtering may beperformed on reconstructed samples in the current block. Here, the reconstructed samples inthe current block may be reconstructed samples after the deblocking filter process and the SAOprocess are completed. For example, one filter shape may be used, or one filter shape may beselected and used from among a plurality of predetermined filter shapes. For example, a filtershape applied to the luma component and a filter shape applied to the chroma component maybe different. For example, a 7x7 diamond filter shape may be used for the luma component,and a 5x5 diamond filter shape may be used for the chroma component.
[140] FIG. 6 shows examples of the shape of an ALF filter.
[141] The (a) of FIG. 6 shows the shape of a 7x7 diamond filter, and the (b) of FIG. 6 showsthe shape of a 5x5 diamond filter. In FIG. 6, Cn in the filter shape represents a filter coefficient.When n in Cn is the same, this indicates that the same filter coefficients can be assigned. In thepresent document, a position and / or unit to which filter coefficients are assigned according tothe filter shape of the ALF may be referred to as a filter tab. In this case, one filter coefficientmay be assigned to each filter tap, and the arrangement of the filter taps may correspond to afilter shape. A filter tab located at the center of the filter shape may be referred to as a centerfilter tab. The same filter coefficients may be assigned to two filter taps of the same n valuethat exist at positions corresponding to each other with respect to the center filter tap. Forexample, in the case of a 7x7 diamond filter shape, 25 filter taps are included, and since filtercoefficients C0 to C11 are assigned in a centrally symmetric form, filter coefficients may beassigned to the 25 filter taps using only 13 filter coefficients. Also, for example, in the case ofa 5x5 diamond filter shape, 13 filter taps are included, and since filter coefficients C0 to C5 areassigned in a centrally symmetrical form, filter coefficients may be assigned to the 13 filtertaps using only 7 filter coefficients. For example, in order to reduce the data amount of signaledinformation on filter coefficients, 12 filter coefficients among 13 filter coefficients for the 7x7diamond filter shape may be signaled (explicitly), and one filter coefficient may be derived(implicitly). Also, for example, 6 filter coefficients among 7 filter coefficients for a 5x5diamond filter shape may be signaled (explicitly) and one filter coefficient may be derived(implicitly).
[142] According to an embodiment of the present document, the ALF parameter used for theALF process may be signaled through an adaptation parameter set (APS). The ALF parametermay be derived from filter information for the ALF or ALF data.
[143] The ALF is a type of in-loop filtering technique that can be applied in video / imagecoding as described above. The ALF may be performed using a Wiener-based adaptive filter.This may be to minimize a mean square error (MSE) between original samples and decodedsamples (or reconstructed samples). A high level design for an ALF tool may incorporatesyntax elements accessible from the SPS and / or slice header (or tile group header).
[144] FIG. 7 shows an example of a hierarchical structure of ALF data.
[145] Referring to FIG. 7, a coded video sequence (CVS) may include an SPS, one or morePPSs, and one or more coded pictures that follow. Each coded picture may be divided intorectangular regions. The rectangular regions may be referred to as tiles. One or more tiles maybe aggregated to form a tile group or slice. In this case, the tile group header may be linked tothe PPS, and the PPS may be linked to the SPS. According to the existing method, the ALFdata (ALF parameter) is included in the tile group header. Considering that one video consistsof a plurality of pictures and one picture includes a plurality of tiles, the frequent ALF data(ALF parameter) signaling in units of tile groups reduces coding efficiency. .
[146] According to an embodiment proposed in the present document, the ALF parametermay be included in the APS and signaled as follows.
[147] FIG. 8 shows another example of a hierarchical structure of ALF data.
[148] Referring to FIG. 8, an APS is defined, and the APS may carry necessary ALF data(ALF parameters). In addition, the APS may have self-identification parameters and ALF data.The self-identification parameter of the APS may include an APS ID. That is, the APS mayinclude information specifying the APS ID in addition to the ALF data field. The tile groupheader or the slice header may refer to the APS using APS index information. In other words,the tile group header or the slice header may include APS index information, and the ALFprocessfor the target block may be performed based on the ALF data (ALF parameter) includedin the APS having the APS ID indicated by the APS index information. Here, the APS indexinformation may be referred to as APS ID information.
[149] In addition, the SPS may include a flag allowing the use of the ALF. For example,when CVS begins, an SPS may be checked, and the flag may be checked in the SPS. Forexample, the SPS may include the syntax of Table 1 below. The syntax of Table 1 may be apart of the SPS.
[150] [Table 1]
[151] The semantics of syntax elements included in the syntax of Table 1 may be expressed,for example, as shown in the following table.
[152] [Table 2]
[153] That is, the syntax element sps_alf_enabled_flag may indicate whether ALF is enabledbased on whether the value is 0 or 1. The syntax element sps_alf_enabled_flag may be referredto as an ALF enabled flag (which may be referred to as a first ALF enabled flag) and may beincluded in the SPS. That is, the ALF enabled flag may be signaled in SPS (or SPS level).When the value of the ALF enabled flag signaled by the SPS is 1, it may be determined thatthe ALF is basically enabled for pictures in the CVS referring to the SPS. Meanwhile, asdescribed above, the ALF may be individually turned on / off by signaling an additional enabledflag at a lower level than the SPS.
[154] For example, if the ALF tool is enabled for CVS, an additional enabled flag (whichmay be called a second ALF enabled flag) may be signaled in a tile group header or a sliceheader. The second ALF enabled flag may be parsed / signaled, for example, when ALF isenabled at the SPS level. If the value of the second ALF enabled flag is 1, ALF data may beparsed through the tile group header or the slice header. For example, the second ALF enabledflag may specify an ALF enabling condition for luma and chroma components. The ALF datacan be accessed through APS ID information.
[155] [Table 3]
[156] [Table 4]
[157] Semantics of syntax elements included in the syntax of Table 3 or Table 4 may beexpressed, for example, as shown in the following tables.
[158] [Table 5]
[159] [Table 6]
[160] The second ALF enabled flag may include the syntax elementtile_group_alf_enabled_flag or the syntax element slice_alf_enabled_flag.
[161] An APS referenced by a corresponding tile group or a corresponding slice may beidentified based on the APS ID information (i.e., the syntax element tile_group_aps_id or thesyntax element slice_aps_id). The APS may include ALF data.
[162] Meanwhile, the structure of the APS including the ALF data may be described basedon the following syntax and semantics, for example. The syntax of Table 7 may be a part of theAPS.
[163] [Table 7]
[164] [Table 8]
[165] As described above, the syntax element adaptation_parameter_set_id may indicate theidentifier of the corresponding APS. That is, the APS may be identified based on the syntaxelement adaptation_parameter_set_id. The syntax element adaptation_parameter_set_id maybe referred to as APS ID information. Also, the APS may include an ALF data field. The ALFdata field may be parsed / signaled after the syntax element adaptation_parameter_set_id.
[166] Also, for example, an APS extension flag (i.e., syntax element aps_extension_flag)may be parsed / signaled in the APS. The APS extension flag may indicate whether APSextension data flag (aps_extension_data_flag) syntax elements are present. The APS extensionflag may be used, for example, to provide extension points for a later version of the VVCstandard.
[167] Core processing / handling of ALF information may be performed in a slice header or atile group header. The above described ALF data field may include information on processingof the ALF filter. For example, information that can be extracted from the ALF data fieldincludes information on the number of filters used, information specifying whether the ALF isapplied only to a luma component, information on a color component, information on anexponential golomb (EG) parameters and / or delta values of filter coefficients, etc.
[168] Meanwhile, the ALF data field may include, for example, ALF data syntax as follows.
[169] [Table 9]
[170]
[171] Semantics of syntax elements included in the syntax of Table 9 may be expressed, forexample, as shown in the following table.
[172] [Table 10]
[173]
[174]
[175] For example, parsing of ALF data through a tile group header or a slice header maystart by first parsing / signaling an alf_chroma_idc syntax element. The alf_chroma_idc syntaxelement may have values ranging from 0 to 3. The values may indicate whether the ALF basedfiltering process is applied only to the luma component, or to a combination of luma andchroma components. Once availability (enabling parameters) for each component isdetermined, information on the number of luma (component) filters may be parsed. As anexample, the maximum number of filters that can be used may be set to 25. If the number ofsignaled luma filters is at least one, for each filter in the range from 0 to the maximum numberof filters (i.e., 25, which may alternatively be known as class), index information for the filtermay be parsed / signaled. This may imply that every class (i.e., from 0 to the maximum numberof filters) is associated with a filter index. When a filter to be used for each class is labeledbased on the filter index, a flag (i.e., alf_luma_coeff_delta_flag) may be parsed / signaled. Theflag may be used to interpret whether flag information (i.e.,alf_luma_coeff_delta_prediction_flag) related to prediction of an ALF luma filter coefficientdelta value exists in a slice header or a tile group header.
[176] If the number of luma filters signaled by the syntax elementalf_luma_num_filters_signalled_minus1 is greater than 0 and the value of the syntax elementalf_luma_coeff_delta_flag is 0, it means that the syntax elementalf_luma_coeff_delta_prediction_flag is present in the slice header or tile group header and itsstatus is evaluated. If the state of the syntax element alf_luma_coeff_delta_prediction_flagindicates 1, this may mean that luma filter coefficients are predicted from previous luma (filter)coefficients. If the state of the syntax element alf_luma_coeff_delta_prediction_flag indicates0, this may mean that luma filter coefficients are not predicted from deltas of previous luma(filter) coefficients.
[177] When delta filter coefficients (i.e., alf_luma_coeff_delta_abs) are coded based on theexponential Golomb code, order k (order-k) of the exponential Golomb (EG) code may haveto be determined in order to decode the delta luma filter coefficients (i.e.,alf_luma_coeff_delta_abs). This information may be needed to decode the filter coefficients.The order of the exponential Golomb code may be expressed as EG(k). In order to determinethe EG(k), the syntax element alf_luma_min_eg_order_minus1 may be parsed / signaled. Thesyntax element alf_luma_min_eg_order_minus1 may be an entropy-coded syntax element. Thesyntax element alf_luma_min_eg_order_minus1 may indicate a smallest order of an EG usedfor decoding the delta luma filter coefficients. For example, the value of the syntax elementalf_luma_min_eg_order_minus1 may be in the range of 0 to 6. After the syntax elementalf_luma_min_eg_order_minus1 is parsed / signaled, the syntax elementalf_luma_eg_order_increase_flag may be parsed / signaled. If the value of the syntax elementalf_luma_eg_order_increase_flag is 1, this indicates that the order of the EG indicated by thesyntax element alf_luma_min_eg_order_minus1 increases by 1. If the value of the syntaxelement alf_luma_eg_order_increase_flag is 0, this indicates that the order of the EG indicatedby the syntax element alf_luma_min_eg_order_minus1 does not increase. The order of the EGmay be represented by an index of the EG. The EG order (or EG index) (related to the lumacomponent) based on the syntax element alf_luma_min_eg_order_minus1 and the syntaxelement alf_luma_eg_order_increase_flag may be determined, for example, as follows.
[178] [Table 11]
[179] Based on the determination process, expGoOrderY may be derived asexpGoOrderY=KminTab. Through this, an array including EG orders can be derived, whichcan be used by the decoding apparatus. The expGoOrderY may indicate the EG order (or EGindex).
[180] There may be a pre-defined Golomb order index (i.e., golombOrderIdxY). Thepredefined Golomb order may be used to determine a final golomb order for coding thecoefficients.
[181] For example, the predefined Golomb order may be configured as, for example, thefollowing.
[182] golombOrderIdxY[] = {0, 0, 1, 0, 1, 2, 1, 0, 0, 1, 2}
[183] Here, the order k = expGoOrderY[golombOrderIdxY[j]], and j may represent the j-thsignaled filter coefficient. For example, if j=2, that is, the third filter coefficient,golomborderIdxY[2] = 1, and thus k = expGoOrderY[1].
[184] In this case, for example, if the value of the syntax element alf_luma_coeff_delta_flagrepresents true, that is, 1, the syntax element alf_luma_coeff_flag may be signaled for everyfilter that is signaled. The syntax element alf_luma_coeff_flag indicates whether a luma filtercoefficient is (explicitly) signaled.
[185] When the EG order and the states of the aforementioned related flags (i.e.,alf_luma_coeff_delta_flag, alf_luma_coeff_flag, etc.) are determined, difference informationand sign information of the luma filter coefficients may be parsed / signaled (i.e.,alf_luma_coeff_flag is true), if indicated). Delta absolute value information(alf_luma_coeff_delata_abs syntax element) for each of the 12 filter coefficients may beparsed / signaled. In addition, if the syntax element alf_luma_coeff_delta_abs has a value, signinformation (syntax element alf_luma_coeff_delta_sign) may be parsed / signaled. Theinformation including the difference information and the sign information of the luma filtercoefficients may be referred to as information about the luma filter coefficients.
[186] The deltas of the filter coefficients may be determined along with the sign and stored.In this case, the deltas of the signed filter coefficients may be stored in the form of an array,which may be expressed as filterCoefficients. The deltas of the filter coefficients may bereferred to as delta luma coefficients, and the deltas of the signed filter coefficients may bereferred to as signed delta luma coefficients.
[187] To determine the final filter coefficients from the signed delta luma coefficients, the(luma) filter coefficients may be updated as follows.
[188] filterCoefficients[sigFiltIdx][j] + filterCoefficients[sigFiltIdx][j]
[189] Here, j may indicate a filter coefficient index, and sigFiltIdx may indicate a signaledfilter index. j={0,… ,11} and sigFiltIdx = {0,… ,alf_luma_filters_signaled_minus1}.
[190] The coefficients may be copied into the final AlfCoeffL[filtIdx][j]. In this case, filtidx = 0, … , 24 and j = 0, … , 11.
[191] The signed delta luma coefficients for a given filter index may be used to determinethe first 12 filter coefficients. For example, the thirteenth filter coefficient of the 7x7 filter maybe determined based on the following equation. The thirteenth filter coefficient may indicatethe above-described center tap filter coefficient.
[192] [Equation 1]
[193] Here, the filter coefficient index 12 may indicate a thirteenth filter coefficient. Forreference, since the filter coefficient index starts from 0, a value of 12 may indicate a thirteenthfilter coefficient.
[194] For example, in order to ensure bitstream conformance, the range of the values of thefinal filter coefficients AlfCoeffL [filtIdx][k] is 0, . . . , 11 may range from -27 to 27-1, and mayrange from 0 to 28-1 when k is 12. Here, k may be replaced with j.
[195] When processing on the luma component is performed, processing on the chromacomponent may be performed based on the syntax element alf_chroma_idc. If the value of thesyntax element alf_chroma_idc is greater than 0, the minimum EG order information for thechroma component (i.e., the syntax element alf_chroma_min_eg_order_minus1) may beparsed / signaled. According to the above-described embodiment of the present document, a 5x5diamond filter shape may be used for the chroma component. In this case, the maximumgolomb index may be 2. In this case, the EG order (or EG index) for the chroma componentmay be determined, for example, as follows.
[196] [Table 12]
[197] Based on the determination process, expGoOrderC may be derived asexpGoOrderC=KminTab. Through this, an array including EG orders can be derived, whichcan be used by the decoding apparatus. The expGoOrderC may indicate the EG order (or EGindex) for the chroma component.
[198] There may be a pre-defined golomb order index (golombOrderIdxC). The pre-definedgolomb order may be used to determine a final golomb order for coding the coefficients.
[199] For example, the pre-defined golomb order may be configured as, for example, thefollowing .
[200] Equation
[201] Here, the order k = expGoOrderC [golombOrderIdxC [j]], and j may represent the j-th signaled filter coefficient. For example, if j=2, it indicates the third filter coefficient, golomborderIdxY [2] = 1, and thus k = expGoOrderC [1].
[202] Based on this, absolute value information and sign information of the chroma filtercoefficients may be parsed / signaled. Information including absolute value information and signinformation of the chroma filter coefficients may be referred to as information on the chromafilter coefficients. For example, a 5x5 diamond filter shape may be applied to the chromacomponent, and in this case, absolute delta information (the syntax elementalf_chroma_coeff_abs) for each of the six (chroma component) filter coefficients may beparsed / signaled. In addition, if the value of the syntax element alf_chroma_coeff_abs is greaterthan 0, sign information (the syntax element alf_chroma_coeff_sign) may be parsed / signaled.For example, the six chroma filter coefficients may be derived based on information on thechroma filter coefficients. In this case, the seventh chroma filter coefficient may be determinedbased on the following equation, for example. The seventh filter coefficient may represent theabove-described center tap filter coefficient.
[203] [Equation 2]
[204] Here, the filter coefficient index 6 may indicate a seventh filter coefficient. Forreference, since the filter coefficient index starts from 0, a value of 6 may indicate a seventhfilter coefficient.
[205] For example, in order to ensure bitstream conformance, the range of the values of the final filter coefficients AlfCoeffC [filtIdx][k] may be from -27 to 27 -1 when k is 0, . . . , 5, and the range of the values of the final filter coefficients AlfCoeffC [filtIdx][k] may be from -2 8 to 2 8 -1 when k is 6. Here, k may be replaced with j.
[206] When the (luma / chroma) filter coefficients are derived, ALF based filtering may beperformed based on the filter coefficients or a filter including the filter coefficients. Throughthis, modified reconstructed samples may be derived, as described above. In addition, multiplefilters may be derived, and filter coefficients of one of the multiple filters may be used for theALF process. For example, one of the plurality of filters may be indicated based on the signaledfilter selection information. Or, for example, one of the plurality of filters may be selectedbased on the activity and / or directionality of the current block or the ALF target block, andfilter coefficients of the selected filter may be used for the ALF process.
[207] Meanwhile, in order to increase coding efficiency, luma mapping with chroma scaling(LMCS) may be applied as described above. LMCS may be referred to as a loop reshaping. Inorder to increase coding efficiency, LMCS control and / or signaling of LMCS relatedinformation may be performed hierarchically.
[208] FIG. 9 exemplarily illustrates a hierarchical structure of a CVS according to anembodiment of the present document. A coded video sequence (CVS) may include a sequenceparameter set (SPS), a picture parameter set (PPS), a tile group header, tile data, and / or CTU(s).Here, the tile group header and the tile data may be referred to as a slice header and slice data,respectively.
[209] The SPS may include flags natively to enable tools to be used in CVS. In addition, theSPS may be referred to by the PPS including information on parameters that change for eachpicture. Each of the coded pictures may include one or more coded rectangular domain tiles.The tiles may be grouped into raster scans forming tile groups. Each tile group is encapsulatedwith header information called a tile group header. Each tile consists of a CTU comprisingcoded data. Here the data may include original sample values, prediction sample values, andits luma and chroma components (luma prediction sample values and chroma prediction samplevalues).
[210] FIG. 10 illustrates an exemplary LMCS structure according to an embodiment of thepresent document. The LMCS structure 1000 of FIG. 10 includes an in-loop mapping part 1010of luma components based on adaptive piecewise linear (adaptive PWL) models and a luma-dependent chroma residual scaling part 1020 for chroma components. The dequantization and inverse transform 1011, reconstruction 1012, and intra prediction 1013 blocks of the in-loopmapping part 1010 represent processes applied in the mapped (reshaped) domain. Loop filters1015, motion compensation or inter prediction 1017 blocks of the in-loop mapping part 1010,and reconstruction 1022, intra prediction 1023, motion compensation or inter prediction 1024,loop filters 1025 block of the chroma residual scaling part 1020 represent processes applied inthe original (non-mapped, non-reshaped) domain.
[211] As illustrated in FIG. 10, when LMCS is enabled, at least one of the inverse mapping(reshaping) process 1014, a forward mapping (reshaping) process 1018, and a chroma scalingprocess 1021 may be applied. For example, the inverse mapping process may be applied to a(reconstructed) luma sample (or luma samples or luma sample array) in a reconstructed picture.The inverse mapping process may be performed based on a piecewise function (inverse) indexof a luma sample. The piecewise function (inverse) index may identify the piece to which theluma sample belongs. Output of the inverse mapping process is a modified (reconsturcted)luma sample (or modified luma samples or modified luma sample array). The LMCS may beenabled or disabled at a level of a tile group (or slice), picture or higher.
[212] The forward mapping process and / or the chroma scaling process may be applied togenerate the reconstructed picture. A picture may comprise luma samples and chroma samples.A reconstructed picture with luma samples may be referred to as a reconstructed luma picture,and a reconstructed picture with chroma samples may be referred to as a reconstructed chromapicture. A combination of the reconstructed luma picture and the reconstructed chroma picturemay be referred to as a reconstructed picture. The reconstructed luma picture may be generatedbased on the forward mapping process. For example, if an inter prediction is applied to a currentblock, a forward mapping is applied to a luma prediction sample derived based on a(reconstructed) luma sample in a reference picture. Because the (reconstructed) luma samplein the reference picture is generated based on the inverse mapping process, the forwardmapping may be applied to the luma prediction sample thus a mapped (reshaped) lumaprediction sample can be derived. The forward mapping process may be performed based on apiecewise function index of the luma prediction sample. The piecewise function index may bederived based on the value of the luma prediction sample or the value of the luma sample inthe reference picture used for inter prediction. If an intra prediction (or an intra block copy(IBC)) is applied to the current block, the forward mapping is not necessary because the inversemapping process has not applied to the reconstructed samples in the current picture yet. A(reconstructed) luma sample in the reconstructed luma picture is generated based on themapped luma prediction sample and a corresponding luma residual sample.
[213] The reconstructed chroma picture may be generated based on the chroma scalingprocess. For example, a (reconstructed) chroma sample in the reconstructed chroma picturemay be derived based on a chroma prediction sample and a chroma residual sample (cres) in acurrent block. The chroma residual sample (cres) is derived based on a (scaled) chroma residualsample (cresScale) and a chroma residual scaling factor (cScaleInv may be referred to as varScale)for the current block. The chroma residual scaling factor may be calculated based on reshapedluma prediction sample values for the current block. For example, the scaling factor may becalculated based on an average luma value ave(Y'pred) of the reshaped luma prediction samplevalues Y'pred. For a reference, in FIG. 10, the (scaled) chroma residual sample derived based onthe inverse transform / dequantization may be referred to as cresScale, and the chroma residualsample derived by performing the (inverse) scaling process to the (scaled) chroma residualsample may be referred to as cres.
[214] FIG. 11 illustrates an LMCS structure according to another embodiment of the presentdocument. FIG. 11 is described with reference to FIG. 10. Here, the difference between theLMCS structure of FIG. 11 and the LMCS structure 1000 of FIG. 10 is mainly described. Thein-loop mapping part and the luma-dependent chroma residual scaling part of FIG. 11 mayoperate the same as (similarly to) the in-loop mapping part 1010 and the luma-dependentchroma residual scaling part 1020 of FIG. 10.
[215] Referring to FIG. 11, a chroma residual scaling factor may be derived based on lumareconstructed samples. In this case, an average luma value (avgYr) may be obtained (derived)based on the neighboring luma reconstructed samples outside the reconstructed block, not theinner luma reconstructed samples of the reconstructed block, and the chroma residual scalingfactor is derived based on the average luma value (avgYr). Here, the neighboring lumareconstructed samples may be neighboring luma reconstructed samples of the current block, ormay be neighboring luma reconstructed samples of virtual pipeline data units (VPDUs)including the current block. For example, when intra prediction is applied to the target block,reconstructed samples may be derived based on prediction samples which are derived based onthe intra prediction. In the other example, when inter prediction is applied to the target block,the forward mapping is applied to prediction samples which are derived based on the interprediction, and reconstructed samples are generated (derived) based on the reshaped (orforward mapped) luma prediction samples.
[216] The video / image information signaled through the bitstream may include LMCSparameters (information on LMCS). LMCS parameters may be configured as high level syntax(HLS, including slice header syntax) or the like. Detailed description and configuration of theLMCS parameters will be described later. As described above, the syntax tables described inthe present document (and the following embodiments) may be configured / encoded at theencoder end and signaled to the decoder end through a bitstream. The decoder mayparse / decode information on the LMCS (in the form of syntax elements) in the syntax tables.One or more embodiments to be described below may be combined. The encoder may encodethe current picture based on the information about the LMCS and the decoder may decode thecurrent picture based on the information about the LMCS.
[217] The in-loop mapping of luma components may adjust the dynamic range of the inputsignal by redistributing the codewords across the dynamic range to improve compressionefficiency. For luma mapping, a forward mapping (reshaping) function (FwdMap) and aninverse mapping (reshaping) function (InvMap) corresponding to the forward mappingfunction (FwdMap) may be used. The FwdMap function may be signaled using a piece-wiselinear models, for example, the piece-wise linear model may have 16 pieces or bins. The piecesmay have the equal length. In one example, the InvMap function does not need to be signalledand is instead derived from the FwdMap function. That is, the inverse mapping may be afunction of the forward mapping. For example, the inverse mapping function may bemathematically built as the symmetric function of the forward mapping as reflected by the liney=x.
[218] An in-loop (luma) reshaping may be used to map input luma values (samples) toaltered values in the reshaped domain. The reshaped values may be coded and then mappedback into the original (un-mapped, un-reshaped) domain after reconstruction. To compensatefor the interaction between the luma signal and the chroma signal, chroma residual scaling maybe applied. In-loop reshaping is done by specifying high level syntax for the reshaper model.The reshaper model syntax may signal a piece-wise linear model (PWL model). For example,the reshaper model syntax may signal a PWL model with 16 bins or pieces of equal lengths. Aforward lookup table (FwdLUT) and / or an inverse lookup table (InvLUT) may be derivedbased on the piece-wise linear model. For example, the PWL model pre-computes the 1024-entry forward (FwdLUT) and inverse (InvLUT) look up tables (LUT)s. As an example, whenthe forward lookup table FwdLUT is derived, the inverse lookup table InvLUT may be derivedbased on the forward lookup table FwdLUT. The forward lookup table FwdLUT may map theinput luma values Yi to the altered values Yr, and the inverse lookup table InvLUT may mapthe altered values Yr to the reconstructed values Y'i. The reconstructed values Y'i may bederived based on the input luma values Yi.
[219] In one example, the SPS may include the syntax of Table 13 below. The syntax ofTable 13 may include sps_reshaper_enabled_flag as a tool enabling flag. Here,sps_reshaper_enabled_flag may be used to specify whether the reshaper is used in a codedvideo sequence (CVS). That is, sps_reshaper_enabled_flag may be a flag for enablingreshaping in the SPS. In one example, the syntax of Table 13 may be a part of the SPS.
[220] [Table 13]
[221] In one example, semantics on the syntax element sps_reshaper_enabled_flag may beas shown in Table 14 below.
[222] [Table 14]
[223] In one example, the tile group header may include the syntax of Table 15 below.Hereinafter, the syntax or information referred to together with a tile group may be replacedwith a slice.
[224] [Table 15]
[225] Semantics of syntax elements included in the syntax of Table 15 may include, forexample, matters disclosed in the following tables.
[226] [Table 16]
[227] As one example, once the flag enabling the reshaping (i.e., sps_reshaper_enabled_flag)is parsed in the SPS, the tile group header may parse additional data (i.e., information includedin Table 15 above) which is used to construct lookup tables (FwdLUT and / or InvLUT). In orderto do this, the status of the SPS reshaper flag (sps_reshaper_enabled_flag) may be first checkedin the tile group header. When sps_reshaper_enabled_flag is true (or 1), an additional flag, i.e.,tile_group_reshaper_model_present_flag may be parsed. The purpose of thetile_group_reshaper_model_present_flag may be to indicate the presence of the reshapingmodel. For example, when tile_group_reshaper_model_present_flag is true (or 1), it may beindicated that the reshaper is present for the current tile group. Whentile_group_reshaper_model_present_flag is false (or 0), it may be indicated that the reshaper isnot present for the current tile.
[228] If the reshaper is present and the reshaper is enabled in the current tile, the reshapermodel (i.e., tile_group_reshaper_model()) may be processed. Further to this, an additional flag,tile_group_reshaper_enable_flag may also be parsed. The tile_group_reshaper_enable_flagmay indicate whether the reshaping model is used for the current tile group. For example, iftile_group_reshaper_enable_flag is 0 (or false), it may be indicated that the reshaping model isnot used for the current tile group. If tile_group_reshaper_enable_flag is 1 (or true), it may beindicated that the reshaping model is used for the current tile group.
[229] As one example, tile_group_reshaper_model_present_flag may be true (or 1) andtile_group_reshaper_enable_flag may be false (or 0). This means that the reshaping model ispresent but not used in the current tile group (or slice). In this case, the reshaping model can beused in the future tile groups (or slices). As another example, tile_group_reshaper_enable_flagmay be true (or 1) and tile_group_reshaper_model_present_flag may be false (or 0). In such acase, the decoder uses the reshaper from the previous initialization.
[230] When the reshaping model (i.e., tile_group_reshaper_model()) andtile_group_reshaper_enable_flag are parsed, it may be determined (evaluated) whetherconditions necessary for chroma scaling are present. The above conditions includes a condition1 (the current tile group / slice has not been intra-coded) and / or a condition 2 (the current tilegroup / slice has not been partitioned into two separate coding quad tree structures for luma andchroma, i.e. the block structure for The current tile group / slice is not a dual tree structure). Ifthe condition 1 and / or the condition 2 are true and / or tile_group_reshaper_enable_flag is true(or 1), then tile_group_reshaper_chroma_residual_scale_flag may be parsed. Whentile_group_reshaper_chroma_residual_scale_flag is enabled (if 1 or true), it may be indicatedthat chroma residual scaling is enabled for the current tile group. Whentile_group_reshaper_chroma_residual_scale_flag is disabled (if 0 or false), it may be indicatedthat chroma residual scaling is disabled for the current tile group.
[231] The purpose of the tile group reshaping model is to parse the data that would benecessary to construct the lookup tables (LUTs). These LUTs are constructed on the idea thatthe distribution of an allowable range of luma values can be divided into a plurality of bins (ex.16 bins) which can be represented using a set of 16 PWL system of equations. Therefore, anyluma value that lies within a given bin can be mapped to an altered luma value.
[232] FIG. 12 shows a graph representing an exemplary forward mapping. In FIG. 12, fivebins are illustrated exemplarily.
[233] Referring to FIG. 12, the x-axis represents input luma values, and the y-axis representsaltered output luma values. The x-axis is divided into 5 bins or slices, each bin of length L.That is, the five bins mapped to the altered luma values have the same length. The forwardlookup table (FwdLUT) may be constructed using data (i.e., reshaper data) available from thetile group header, and thus mapping may be facilitated.
[234] In one embodiment, output pivot points associated with the bin indices may becalculated. The output pivot points may set (mark) the minimum and maximum boundaries ofthe output range of the reshaping codeword. The calculation process of the output pivot pointsmay be performed by computing a piecewise cumulative distribution function (CDF) of thenumber of reshaping codewords. The output pivot range may be sliced based on the maximumnumber of bins to be used and the size of the lookup table (FwdLUT or InvLUT). As oneexample, the output pivot range may be sliced based on a product between the maximumnumber of bins and the size of the lookup table (size of LUT * maximum number of bin indices).For example, if the product between the maximum number of bins and the size of the lookuptable is 1024, the output pivot range may be sliced into 1024 entries. This serration of the outputpivot range may be performed (applied or achieved) based on (using) a scaling factor. In oneexample, the scaling factor may be derived based on Equation 3 below.
[235] [Equation 3]
[236] In Equation 3, SF denotes a scaling factor, and y1 and y2 denote output pivot pointscorresponding to each bin. Also, FP_PREC and c may be predetermined constants. The scalingfactor determined based on Equation 3 may be referred to as a scaling factor for forwardreshaping.
[237] In another embodiment, with respect to inverse reshaping (inverse mapping), for adefined range of the bins to be used (i.e., from reshaper_model_min_bin_idx toreshape_model_max_bin_idx), the input reshaped pivot points which correspond to themapped pivot points of the forward LUT and the mapped inverse output pivot points (given bybin index under consideration * number of initial codewords) are fetched. In another example,the scaling factor SF may be derived based on Equation 4 below.
[238] [Equation 4]
[239] In Equation 4, SF denotes a scaling factor, x1 and x2 denote input pivot points, and y1and y2 denote output pivot points corresponding to each piece (bin) (output pivot points of theinverse mapping). Here, the input pivot points may be pivot points mapped based on a forwardlookup table (FwdLUT), and the output pivot points may be pivot points inverse-mapped basedon an inverse lookup table (InvLUT). Also, FP_PREC may be a predetermined constant value.FP_PREC of Equation 4 may be the same as or different from FP_PREC of Equation 3. Thescaling factor determined based on Equation 4 may be referred to as a scaling factor for inversereshaping. During inverse reshaping, partitioning of input pivot points may be performed basedon the scaling factor of Equation 4. The scaling factor SF is used to slice the range of inputpivot points. Based on the partitioned input pivot points, bin indices in the range from 0 to theminimum bin index (reshaper_model_min_bin_idx) and / or from the minimum bin index(reshaper_model_min_bin_idx) to the maximum bin index (reshape_model_max_bin_idx) areassigned the pivot values that correspond to the minimum and maximum bin values.
[240] Table 17 below shows the syntax of the reshaper model according to an embodiment.The reshaper model may be referred to as a reshaping model or an LMCS model. Here, thereshaper model has been exemplarily described as a tile group reshaper, but the presentdocument is not necessarily limited by this embodiment. For example, the reshaper model maybe included in the APS, or the tile group reshaper model may be referred to as a slice reshapermodel or LMCS data. Also, the prefix reshaper_model or Rsp may be used interchangeablywith lmcs. For example, in the following tables and the description below,reshaper_model_min_bin_idx, reshaper_model_delta_max_bin_idx,reshaper_model_max_bin_idx, RspCW, RsepDeltaCW may be used interchangeably withlmcs_min_bin_idx, lmcs_delta_cs_bin_idx, lmx, lmcs_delta_csDcselta_idx, lmx, respectively.
[241] [Table 17]
[242] The semantics of syntax elements included in the syntax of Table 17 may include, forexample, descriptions in the following table.
[243] [Table 18]
[244] The reshaper model includes reshape_model_min_bin_idx,reshape_model_delta_max_bin_idx, reshaper_model_bin_delta_abs_cw_prec_minus1,reshape_model_bin_delta_abs_CW[i], and reshaper_model_bin_delta_sign_CW as elements.Hereinafter, each syntax element will be described in detail.
[245] reshape_model_min_bin_idx indicates the minimum bin (or piece) index used in thereshaper configuring (constructing) process. The value of reshape_model_min_bin_idx mayrange from 0 to MaxBinIdx. For example, MaxBinIdx may be 15.
[246] In an embodiment, the tile group reshaper model may preferentially parse two indices(or parameters), reshaper_model_min_bin_idx and reshaper_model_delta_max_bin_idx. Amaximum bin index (reshaper_model_max_bin_idx) may be derived (determined) based onthese two indices. The reshape_model_delta_max_bin_idx may represent the value derived bysubtracting the actual maximum bin index (reshape_model_max_bin_idx), used in the reshaperconfiguration process, from the allowed maximum bin index MaxBinIdx. A value of themaximum bin index (reshaper_model_max_bin_idx) may range from 0 to MaxBinIdx. Forexample, MaxBinIdx may be 15. As an example, the value of reshape_model_max_bin_idxmay be derived based on Equation 5 below.
[247] [Equation 5]
[248] The maximum bin index reshaper_model_max_bin_idx may be greater than or equalto the minimum bin index reshaper_model_min_bin_idx. The minimum bin index may bereferred to as a minimum allowed bin index or a allowed minimum bin index, and the maximumbin index may also be referred to as a maximum allowed bin index or a allowed maximum binindex.
[249] If the maximum bin index (rehape_model_max_bin_idx) is derived, the syntaxelement reshaper_model_bin_delta_abs_cw_prec_minus1 may be parsed. The number of bitsused to represent the syntax reshape_model_bin_delta_abs_CW[i] may be determined basedon reshaper_model_bin_delta_abs_cw_prec_minus1. For example, the number of bits used torepresent reshape_model_bin_delta_abs_CW[i] may be equal to 1 plusreshaper_model_bin_delta_abs_cw_prec_minus1.
[250] reshape_model_bin_delta_abs_CW [i] may indicate information related to the absolute delta codeword value (absolute value of the delta codeword) of the i-th bin. reshape_model_bin_delta_abs_CW [i] and reshaper_model_bin_delta_sign_CW_flag [i] may be examples of information on reshaping codewords. In one example, if the absolute delta codeword value of the i-th bin is greater than 0, reshaper_model_bin_delta_sign_CW_flag [i] may be parsed. A sign of reshape_model_bin_delta_abs_CW [i] may be determined based on reshaper_model_bin_delta_sign_CW_flag [i]. In one example, if reshaper_model_bin_delta_sign_CW_flag [i] is 0 (or false), the corresponding variable RspDeltaCW [i] may be a positive sign. In other cases (if reshaper_model_bin_delta_sign_CW_flag [i] is not 0, if reshaper_model_bin_delta_sign_CW_flag [i] is 1 (or true)), the corresponding variable RspDeltaCW [i] may be a negative sign. If reshape_model_bin_delta_sign_CW_flag [i] is not present, it may be inferred to be equal to 0 (or false).
[251] In an embodiment, the variable RspDeltaCW [i] may be derived based on reshape_model_bin_delta_abs_CW [i] and reshape_model_bin_delta_sign_CW_flag [i] described above. RspDeltaCW [i] may be referred to as a value of a delta codeword. For example, RspDeltaCW [i] may be derived based on Equation 6 below.
[252] [Equation 6]
[253] In Equation 6, reshape_model_bin_delta_sign_CW [i] may be information related to a sign of RspDeltaCW [i]. For example, reshape_model_bin_delta_sign_CW [i] may be the same as reshaper_model_bin_delta_sign_CW_flag [i] described above. Here, i may be in a range from a minimum bin index (reshaper_model_min_bin_idx) to a maximum bin index (reshape_model_max_bin_idx).
[254] A variable (or array) RspCW [i] may be derived based on RspDeltaCW [i]. RspDeltaCW [i] may be an example of information on reshaping codewords. Here, RspCW [i] may indicate the number of codewords allocated (distributed) to the i-th bin. That is, the number of codewords allocated (distributed) to each bin may be stored in an array form. In one example, if i is smaller than the reshaper_model_min_bin_idx or larger than reshaper_model_max_bin_idx (i<reshaper_model_min_bin_idx or reshaper_model_max_bin_idx<i), RspCW [i] may be equla to 0. Otherwise (if i is greater than or equal to reshaper_model_min_bin_idx described above and less than or equal to reshaper_model_max_bin_idx (reshaper_model_min_bin_idx<=i<=reshaper_model_max_bin_idx), RspCW [i] may be derived based on the above-described RspDeltaCW [i], the luma bit depth (BitDepthY), and / or MaxBinIdx. In this case, for example, RspCW [i] may be derived based on Equation 7 below.
[255] [Equation 7]
[256] In Equation 7, OrgCW may be a predetermined value, for example, may be determinedbased on Equation 8 below. OrgCW may be an example of information on reshapingcodewords.
[257] [Equation 8]
[258] In Equation 8, BitDepthY is the luma bit depth, and MaxBinIdx represents the allowable maximum bin index. In one example, if BitDepthY is 10, RspCW [i] may have a value from 32 to 2*OrgCW-1.
[259] A variable InputPivot [i] may be derived based on the OrgCW. For example, InputPivot [i] may be derived based on Equation 9 below.
[260] [Equation 9]
[261] Variables ReshapePivot [i], ScaleCoef [i], and / or InvScaleCoeff [i] may be derived based on the above-described RspCW [i], InputPivot [i], and / or OrgCW, for example, ReshapePivot [i] ], ScaleCoef [i], and / or InvScaleCoeff [i] may be derived based on the following table.
[262] [Table 19]
[263] In Table 19, the for loop syntax in which i increases from 0 to MaxBinIdx may be used, and shiftY may be a predetermined constant for bit shifting. Whether InvScaleCoeff [i] is derived based on RspCW [i] may be determined based on a conditional clause according to whether RspCW [i] is 0.
[264] ChromaScaleCoef [i] for deriving the chroma residual scaling factor may be derived based on the following table. Here, i may range from 0 to MaxBinIdx.
[265] [Table 20]
[266] In Table 20, shiftC may be a predetermined constant for bit shifting. Referring to Table 20, whether ChromaScaleCoef [i] is derived based on the array ChromaResidualScaleLut may be determined based on a conditional clause according to whether RspCW [i] is 0. Here, ChromaResidualScaleLut may be a predetermined array. However, the array ChromaResidualScaleLut is merely exemplary, and the present embodiment is not necessarily limited by Table 20.
[267] A method for deriving the i-th variables has been described above. The i+1-th variables may be based on ReshapePivot [i+1], and for example, ReshapePivot [i+1] may be derived based on Equation 10.
[268] [Equation 10]
[269] In Equation 10, RspCW [i] may be derived based on Equations 7 and / or 8 described above. Luma mapping may be performed based on the above-described embodiments and examples, and the above-described syntax and elements included therein may be merely exemplary representations, and embodiments are not limited by the above-mentioned tables or equations.
[270] The (luma-dependent) chroma residual scaling is designed to compensate for theinteraction between the luma signal and its corresponding chroma signals. For example,whether chroma residual scaling is enabled or not is also signalled at the tile group level or theslice level. In one example, if luma mapping is enabled and if dual tree partition (also knownas separate chroma tree) is not applied to the current tile group, an additional flag is signalledto indicate if the luma-dependent chroma residual scaling is enabled or not. In other example,when luma mapping is not used, or when dual tree partition is used in the current tile group,luma-dependent chroma residual scaling is disabled. In another example, the luma-dependentchroma residual scaling is always disabled for the chroma blocks whose area is less than orequal to 4.
[271] Chroma residual scaling may be performed based on an average luma value ofreference samples. For example, the reference samples may include samples of a correspondingluma prediction block (a luma component of a prediction block to which intra prediction and / orinter prediction is applied). When the inter prediction is applied, the reference samples mayinclude samples after forward mapping is applied to the luma component prediction samples.Alternatively, the reference samples may include neighboring samples of the current block orneighboring samples of a VPDU including the current block. In this case, when the interprediction is applied to the neighboring block including the neighboring samples, theneighboring samples may include luma component reconstruction samples derived based onthe luma component prediction samples to which the forward mapping of the neighboring blockis applied. Scaling operations at the encoder side and / or the decoder side may be implementedas, for example, fixed-point integer operations based on Equation 11 below.
[272] [Equation 11]
[273] In Equation 11, c' denotes a scaled chroma residual sample (scaled chroma componentof a residual sample), c denotes a chroma residual sample (chroma component of residualsample), s denotes a chroma residual scaling factor, and CSCALE_FP_PREC denotes a(predefined) constant value.
[274] As described above, the average luma value of the reference samples may be obtained,and the chroma residual scaling factor may be derived based on the average luma value. Asdescribed above, the chroma component residual samples may be scaled based on the chromaresidual scaling factor, and a chroma component reconstructed sample may be generated basedon the scaled chroma component residual samples.
[275] In an embodiment of the present document, a signaling structure for efficientlyapplying the above-described ALF and / or LMCS is proposed. According to an embodiment ofthe present document, for example, ALF data and / or LMCS data (i.e., reshaper data) may beincluded in the HLS (i.e., APS), and ALF data and / or LMCS data (reshaper data) included inthe APS may be derived by signaling the referenced APS ID. Also, for example, each APSmay include type information regarding parameter types of parameters in a correspondingparameter set.
[276] For example, the following table shows an example of a sequence parameter set andsemantics of syntax elements included therein according to an embodiment.
[277] [Table 21]
[278] [Table 22]
[279] For example, the following table shows an example of an adaptation parameter set(APS) according to an embodiment.
[280] [Table 23]
[281] Table 23 will be described based on the difference from the APS of Table 7 describedabove. As an example, type information (i.e., aps_params_type) of APS parameters may beparsed / signaled in the APS. Type information of APS parameters may be parsed / signaled afteradaptation_parameter_set_id.
[282] The aps_params_type, ALF_APS, and MAP_APS included in Table 23 may bedescribed according to the following table. That is, according to the aps_params_type includedin Table 23, the types of APS parameters applied to the APS may be set as shown in thefollowing table.
[283] [Table 24]
[284] Referring to Table 24, for example, aps_params_type may be a syntax element forclassifying types of corresponding APS parameters. The type of APS parameters may includeALF parameters and in-loop mapping (i.e., reshaper) parameters. Referring to Table 24, whenthe value of type information (aps_params_type) is 0, the name of aps_params_type may bedetermined as ALF_APS (or ALF APS), and the type of APS parameters may be determinedas ALF parameters (APS parameter may indicate ALF parameters in this case). In this case,the ALF data field (i.e. alf_data()) may be parsed / signaled to the APS. When the value of typeinformation (aps_params_type) is 1, the name of aps_params_type may be determined asMAP_APS (or reshaper APS), and the type of APS parameters may be determined as in-loopmapping (i.e., reshaper) parameters (APS parameters may indicate reshaper parameters). Inthis case, reshaper (reshaper model, LMCS) data (i.e., reshaper_data()) may be parsed / signaledto the APS.
[285] As an example, the following table shows an example of header information accordingto an embodiment. Here, the tile group header may be referred to as a picture header or a sliceheader.
[286] [Table 25]
[287] The semantics of syntax elements included in the syntax of Table 25 may include, forexample, matters disclosed in the following table. Here, tile_group_reshaper_enable_flag maybe referred to as slice_reshaper_enable_flag, ph_reshaper_enable_flag, andph_lmcs_enable_flag. That is, tile_group_reshaper_enable_flag andslice_reshaper_enable_flag may indicate whether reshaper data is enabled in a tile or slice(reshaper enabled flag). The tile_group_reshaper_enable_flag is different fromsps_reshaper_enable_flag, and specifically, each flag may be present for different layers.
[288] In one example, the image information may include a first APS, a second APS, andheader information. The header information may include reshaper related APS ID information(ex. tile_group_alf_aps_id) and ALF related APS ID information (ex. tile_group_alf_aps_id).The reshaper related APS ID information (ex. tile_group_alf_aps_id) may indicate the firstAPS and / or its ID. The ALF related APS ID information (ex. tile_group_alf_aps_id) mayindicate the second APS and / or its ID. For example, the ID of the first APS may be differentfrom the ID of the second APS.
[289] [Table 26]
[290] The following table shows exemplary syntax of reshaper data (referred to as a reshapermodel, or simply reshaper) according to an embodiment of the present document. The reshaperdata shown in the syntax of Table 27 may be an example of the reshaper data field included inTable 23.
[291] [Table 27]
[292] The semantics of syntax elements included in the syntax of Table 27 may include, forexample, matters disclosed in the following table.
[293] [Table 28]
[294] The following drawings are created to explain specific examples of the presentspecification. Since the names of specific apparatus described in the drawings or the names ofspecific signals / messages / fields are presented by way of example, the technical features of thepresent specification are not limited to the specific names used in the following drawings.
[295] FIG. 13 and FIG. 14 schematically show an example of a video / image encodingmethod and related components according to embodiment(s) of the present document. Themethod disclosed in FIG. 13 may be performed by the encoding apparatus disclosed in FIG. 2.Specifically, for example, S1300 of FIG. 13 may be performed by the predictor 220 of theencoding apparatus, and S1310 to S1330 may be performed by the residual processor 230 ofthe encoding apparatus, and S1340 may be performed by the entropy encoder 240 of theencoding apparatus. The method disclosed in FIG. 13 may include the embodiments describedabove in the present document.
[296] Referring to FIG. 13, the encoding apparatus may generate luma prediction samples ofthe current block in the current picture (S1300). In one example, the encoding apparatus mayderive the prediction mode of the current block as the intra prediction mode or the interprediction mode, and may derive luma prediction samples based on the prediction mode of thecurrent block. In this case, various prediction methods disclosed in the present document, suchas inter prediction or intra prediction, may be applied.
[297] The encoding apparatus may generate prediction mode information (S1310). Forexample, the prediction mode information may include information on various predictionmodes (i.e., merge mode, MVP mode, etc.), MVD information, and the like. The predictionmode information may be generated based on luma prediction samples.
[298] The encoding apparatus may derive reshaping codewords for a reshaping process ofluma prediction samples (S1320). For example, the reshaping codewords may be RspCW[i] described in conjunction with Equation 7 and / or Table 19. Also, the encoding apparatus mayderive information on reshaping codewords for the reshaping process of luma predictionsamples. For example, information about reshaping codewords may includereshaper_model_bin_delta_abs_cw_prec_minus1, reshape_model_bin_delta_abs_CW[i],reshaper_model_bin_delta_sign_CW_flag [i], and / or RspDeltaCW [i] described in conjunctionwith Equation 6, Table 17 and / or Table 18.
[299] In addition, the encoding apparatus may further derive reshaper model indices forreshaping process. The reshaper model indices may include at least one of syntax elementsincluded in reshaper model information (syntax) and header information (tile group header,picture header, or slice header). For example, the reshaper model indices may include theabove-described reshaper_model_min_bin_idx, reshaper_model_delta_max_bin_idx,reshape_model_max_bin_idx, and MaxBinIdx.
[300] The encoding apparatus may generate reshaped luma prediction samples based on theluma prediction samples and the reshaping codewords (S1330). The reshaped luma predictionsamples may be generated based on forward reshaping or inverse reshaping. The reshaped lumaprediction samples may be referred to as (forward or inverse) mapped luma prediction samples.
[301] The encoding apparatus may generate information on reshaping (S1340). Theinformation on reshaping may include information on reshaping codewords, information onreshaper model indices and information on the reshaping data field described above in thepresent document. Furthermore, the information on reshaping may further include informationon reshaped luma prediction samples.
[302] The encoding apparatus may encode video / image information (S1350). Theimage / video information may include information for generating the luma samples and / orinformation related to the reshaping. The information for generating the luma samples mayinclude, for example, prediction related information (prediction mode information), residualinformation, LMCS related information (information on reshaping (reshaper, reshaper data,reshaper model)), and ALF related information. The prediction related information may includeinformation on various prediction modes (i.e., merge mode, MVP mode, etc.), MVDinformation, and the like.
[303] The encoded image / video information may be output in the form of a bitstream. Thebitstream may be transmitted to the decoding apparatusthrough a network or a storage medium.
[304] The image / video information may include various information according to anembodiment of the present document. For example, the image / video information may includeat least one information or at least one syntax element disclosed in at least one of Tables 1, 3,4, 7, 9, 13, 15, 17, 19, 20, 21, 23, 25 and / or 27 described above.
[305] For example, the image information may include a first adaptive parameter set (APS).The first APS may be implemented as shown in Table 23 described above. The first APS mayinclude type information specifying that the first APS is an APS including a reshaper data field.For example, the type information may be aps_params_type described together with Tables 23and 24. Based on the type information, the first APS may include a reshaper data field. That is,the first APS may be classified into an in-loop mapping type (reshaper type or LMCS type)based on the reshaper-related APS ID information. The encoding apparatus may parse / signalthe reshaper data field based on type information specifying that the first APS is an APSincluding the reshaper data field. Reshaping codewords, information about them, and / orreshaping model indices may be derived based on the reshaping data field.
[306] In one example (related to Table 24), based on the value of the type information,specifying that the first APS is an APS including the reshaper data field, is 1, the first APS mayinlcude the reshaper data field including reshaper parameters. Here, the reshaper parametersmay include information on reshaping codewords and / or information on reshaper modelindices.
[307] The image information may include header information, the header information mayinclude reshaper related APS ID information, and the reshaper related APS ID information mayindicate an ID of the first APS.
[308] In one example, the image information may include an SPS, and the SPS may includea first reshaper enable flag (i.e., sps_reshaper_enabled_flag of Table 25) specifying whetherthe reshaper data is enabled. When the value of the first reshaper enabled flag is 1, the headerinformation may include a second reshaper enabled flag (ex. tile_group_reshaper_enabled_flagof Table 25 or ph_reshaper_enabled_flag) specifying whether the reshaper data is enabled in apicture (in another example, a tile group or a slice). When the value of the second reshaperenabled flag is 1, the reshaper related APS ID information may be included in the headerinformation.
[309] The encoding apparatus may perform chroma residual scaling based on the reshapedprediction samples and a chroma residual scaling flag. The chroma residual scaling flag maybe included in the header information, and the chroma residual scaling flag may be generatedwhen the value of the first reshaper enabled flag is 1.
[310] In one example, the encoding apparatus may generate reconstructed samples based onthe reshaped luma prediction samples. The encoding apparatus may derive filter coefficientsfor the ALF on the reconstructed samples. The encoding apparatus may generate modifiedreconstructed samples based on the reconstructed samples and the filter coefficients. Theencoding apparatus may generate ALF data based on the filter coefficients and / or the modifiedreconstructed samples.
[311] For example, the image information may further include a second APS. The secondAPS may be implemented as shown in Table 23 described above. The second APS may includetype information specifying that the second APS is an APS including an ALF data field. Forexample, the type information may be aps_params_type described together with Tables 23 and24. Based on the type information, the second APS may include an ALF data field. That is, thesecond APS may be classified into an ALF type based on ALF related APS ID information.The encoding apparatus may parse / signal the ALF data field based on type informationspecifying that the second APS is an APS including the ALF data field.
[312] In one example, the ID of the first APS indicated by the reshaper related APS IDinformation may be different from the ID of the second APS indicated by the ALF related APSID information.
[313] For example (related to Tables 23 and 24), when the value of the type information,specifying that the second APS is an APS including the ALF data field, is 0, the APSparameters of the second APS indicate the ALF parameters and the second APS may includean ALF data field and / or ALF data. The filter coefficients may be derived based on the ALFdata field and / or ALF data.
[314] In one example, the header information may include ALF related APS ID information,and the ALF related APS ID information may indicate an ID of a second APS including theALF data.
[315] In one example, the SPS may include a first ALF enabled flag (i.e.,sps_ALF_enabled_flag of Table 25) specifying whether the ALF data is enabled. When thevalue of the first ALF enabled flag is 1, the header information includes a second ALF enabledflag (ex. tile_group_alf_enabled_flag of Table 25 or ph_alf_enabled_flag) specifying whetherthe ALF data is enabled in a picture (in another example, a tile group or a slice). When thevalue of the second ALF enabled flag is 1, the ALF related APS ID information may beincluded in the header information.
[316] In one example, the encoding apparatus may derive residual samples based on thereshaped prediction samples and the original samples. In this case, residual information maybe derived based on the residual samples. Based on the residual information, (modified)residual samples may be derived. Reconstructed samples may be generated based on the(modified) residual samples. A reconstructed block and a reconstructed picture may be derivedbased on the reconstructed samples.
[317] FIG. 15 and FIG. 16 schematically show an example of an image / video decodingmethod and related components according to an embodiment of the present document. Themethod disclosed in FIG. 15 may be performed by the decoding apparatus illustrated in FIG.3. Specifically, for example, S1500 of FIG. 15 may be performed by the entropy decoder 310of the decoding apparatus, S1510 may be performed by the predictor 330 of the decodingapparatus, and S1520 may be performed by the residual processor 320 of the decodingapparatus. The method disclosed in FIG. 15 may include the embodiments described above inthe present document.
[318] Referring to FIG. 15, the decoding apparatus may receive / obtain image / videoinformation. For example, he decoding apparatus may receive / obtain the image / videoinformation through a bitstream. The decoding apparatus may obtain prediction modeinformation and / or information on reshaping from the bitstream (S1500).
[319] The image / video information may include various information according to anembodiment of the present document. For example, the image / video information may includeinformation disclosed in at least one of Tables 1, 3, 4, 7, 9, 13, 15, 17, 19, 20, 21, 23, 25, and / or27 described above.
[320] The decoding apparatus may generate luma prediction samples of the current block inthe current picture based on the prediction mode information (S1510). In this case, variousprediction methods disclosed in the present document, such as inter prediction or intraprediction, may be applied.
[321] The coding apparatus may derive reshaped luma prediction samples based on theinformation on reshaping and the luma prediction samples (S1520). The reshaped lumaprediction samples may be generated based on forward reshaping or inverse reshaping.Reshaped luma prediction samples may be referred to as (forward or inverse) mapped lumaprediction samples. Specifically, the decoding apparatus may derive reshaping codewordsbased on the information on reshaping. For example, information on reshaping codewords mayinclude reshaper_model_bin_delta_abs_cw_prec_minus1, reshape_model_bin_delta_abs_CW [i], reshaper_model_bin_delta_sign_CW_flag[i], and / or RspDeltaCW [i] described in conjunction with Equation 6, Table 17 and / or Table 18.
[322] In addition, the decoding apparatus may further derive reshaping model indices for thereshaping process. The reshaper model indices may include at least one of syntax elementsincluded in reshaper model information (syntax) and header information (tile group header,picture header, or slice header). For example, the reshaper model indices may include theabove-described reshaper_model_min_bin_idx, reshaper_model_delta_max_bin_idx,reshape_model_max_bin_idx, and MaxBinIdx.
[323] For example, the image information may include a first adaptive parameter set (APS).The first APS may be implemented as shown in Table 23 described above. The first APS mayinclude type information specifying that the first APS is an APS including a reshaper data field.For example, the type information may be aps_params_type described together with Tables 23and 24. Based on the type information, the first APS may include a reshaper data field. That is,the first APS may be classified into an in-loop mapping type (reshaper type or LMCS type)based on the reshaper-related APS ID information. The decoding apparatus may parse / signalthe reshaper data field based on type information specifying that the first APS is an APSincluding the reshaper data field. Reshaping codewords, information about them, and / orreshaping model indices may be derived based on the reshaping data field.
[324] In one example (related to Table 24), based on the value of the type information,specifying that the first APS is an APS including the reshaper data field, is 1, the first APS mayinlcude the reshaper data field including reshaper parameters. Here, the reshaper parametersmay include information on reshaping codewords and / or information on reshaper modelindices.
[325] The image information may include header information, the header information mayinclude reshaper related APS ID information, and the reshaper related APS ID information mayindicate an ID of the first APS.
[326] In one example, the image information may include an SPS, and the SPS may includea first reshaper enable flag (i.e., sps_reshaper_enabled_flag of Table 25) specifying whetherthe reshaper data is enabled. When the value of the first reshaper enabled flag is 1, the headerinformation may include a second reshaper enabled flag (ex. tile_group_reshaper_enabled_flagof Table 25 or ph_reshaper_enabled_flag) specifying whether the reshaper data is enabled in apicture (in another example, a tile group or a slice). When the value of the second reshaperenabled flag is 1, the reshaper related APS ID information may be included in the headerinformation.
[327] The decoding apparatus may perform chroma residual scaling based on the reshapedprediction samples and a chroma residual scaling flag. The chroma residual scaling flag maybe included in the header information, and the chroma residual scaling flag may be signaledwhen the value of the first reshaper enabled flag is 1.
[328] The decoding apparatus may generate reconstructed samples based on the reshapedluma prediction samples. The decoding apparatus may perform the ALF process on thereconstructed samples. The decoding apparatus may derive filter coefficients for the ALF, andgenerate modified reconstructed samples based on the reconstructed samples and the filtercoefficients. One filter may include a set of filter coefficients. The filter or the filter coefficientsmay be derived based on the ALF data.
[329] For example, the image information may further include a second adaptation parameterset (APS). The second APS may be implemented as shown in Table 23 described above. Thesecond APS may include type information specifying that the second APS is an APS includingan ALF data field. For example, the type information may be aps_params_type describedtogether with Tables 23 and 24. Based on the type information, the second APS may includean ALF data field. That is, the second APS may be classified into an ALF type based on ALFrelated APS ID information. The decoding apparatus may parse / signal the ALF data field basedon type information specifying that the second APS is an APS including the ALF data field.
[330] In one example, the ID of the first APS indicated by the reshaper related APS IDinformation may be different from the ID of the second APS indicated by the ALF related APSID information.
[331] For example (related to Tables 23 and 24), when the value of the type information,specifying that the second APS is an APS including the ALF data field, is 0, the APSparameters of the second APS indicate the ALF parameters and the second APS may includean ALF data field and / or ALF data. The filter coefficients may be derived based on the ALFdata field and / or ALF data.
[332] In one example, the header information may include ALF related APS ID information,and the ALF related APS ID information may indicate an ID of a second APS including theALF data.
[333] In one example, the SPS may include a first ALF enabled flag (i.e.,sps_ALF_enabled_flag of Table 25) specifying whether the ALF data is enabled. When thevalue of the first ALF enabled flag is 1, the header information includes a second ALF enabledflag (ex. tile_group_alf_enabled_flag of Table 25 or ph_alf_enabled_flag) specifying whetherthe ALF data is enabled in a picture (in another example, a tile group or a slice). When thevalue of the second ALF enabled flag is 1, the ALF related APS ID information may beincluded in the header information.
[334] In the above-described embodiment, the methods are described based on the flowcharthaving a series of steps or blocks. The present disclosure is not limited to the order of the abovesteps or blocks. Some steps or blocks may occur simultaneously or in a different order fromother steps or blocks as described above. Further, those skilled in the art will understand thatthe steps shown in the above flowchart are not exclusive, that further steps may be included,or that one or more steps in the flowchart may be deleted without affecting the scope of thepresent disclosure.
[335] The method according to the above-described embodiments of the present documentmay be implemented in software form, and the encoding apparatus and / or decoding apparatusaccording to the present document is, for example, may be included in the apparatus thatperforms the image processing of a TV, a computer, a smart phone, a set-top box, a displaydevice, etc.
[336] When the embodiments in the present document are implemented in software, theabove-described method may be implemented as a module (process, function, etc.) thatperforms the above-described function. A module may be stored in a memory and executed bya processor. The memory may be internal or external to the processor, and may be coupled tothe processor by various well-known means. The processor may include an application-specificintegrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices.Memory may include read-only memory (ROM), random access memory (RAM), flashmemory, memory cards, storage media, and / or other storage devices. That is, the embodimentsdescribed in the present document may be implemented and performed on a processor, amicroprocessor, a controller, or a chip. For example, the functional units shown in each figuremay be implemented and performed on a computer, a processor, a microprocessor, a controller,or a chip. In this case, information on instructions or an algorithm for implementation may bestored in a digital storage medium.
[337] In addition, the decoding apparatus and the encoding apparatus to which the presentdisclosure is applied may be included in a multimedia broadcasting transmission / receptionapparatus, a mobile communication terminal, a home cinema video apparatus, a digital cinemavideo apparatus, a surveillance camera, a video chatting apparatus, a real-time communicationapparatus such as video communication, a mobile streaming apparatus, a storage medium, acamcorder, a VoD service providing apparatus, an Over the top (OTT) video apparatus, anInternet streaming service providing apparatus, a three-dimensional (3D) video apparatus, ateleconference video apparatus, a transportation user equipment (i.e., vehicle user equipment,an airplane user equipment, a ship user equipment, etc.) and a medical video apparatus andmay be used to process video signals and data signals. For example, the Over the top (OTT)video apparatus may include a game console, a blue-ray player, an internet access TV, a hometheater system, a smart phone, a tablet PC, a Digital Video Recorder (DVR), and the like.
[338] Furthermore, the processing method to which the present document is applied may beproduced in the form of a program that is to be executed by a computer and may be stored in acomputer-readable recording medium. Multimedia data having a data structure according tothe present disclosure may also be stored in computer-readable recording media. The computer-readable recording media include all types of storage devices in which data readable by acomputer system is stored. The computer-readable recording media may include a BD, aUniversal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, a magnetictape, a floppy disk, and an optical data storage device, for example. Furthermore, the computer-readable recording media includes media implemented in the form of carrier waves (i.e.,transmission through the Internet). In addition, a bitstream generated by the encoding methodmay be stored in a computer-readable recording medium or may be transmitted overwired / wireless communication networks.
[339] In addition, the embodiments of the present document may be implemented with acomputer program product according to program codes, and the program codes may beperformed in a computer by the embodiments of the present document. The program codesmay be stored on a carrier which is readable by a computer.
[340] FIG. 17 shows an example of a content streaming system to which embodimentsdisclosed in the present document may be applied.
[341] Referring to FIG. 17, the content streaming system to which the embodiment(s) of thepresent document is applied may largely include an encoding server, a streaming server, a webserver, a media storage, a user device, and a multimedia input device.
[342] The encoding server compresses content input from multimedia input devices such asa smartphone, a camera, a camcorder, etc. Into digital data to generate a bitstream andtransmit the bitstream to the streaming server. As another example, when the multimediainput devices such as smartphones, cameras, camcorders, etc. directly generate a bitstream, theencoding server may be omitted.
[343] The bitstream may be generated by an encoding method or a bitstream generatingmethod to which the embodiment(s) of the present disclosure is applied, and the streamingserver may temporarily store the bitstream in the process of transmitting or receiving thebitstream.
[344] The streaming server transmits the multimedia data to the user device based on a user'srequest through the web server, and the web server serves as a medium for informing the userof a service. When the user requests a desired service from the web server, the web serverdelivers it to a streaming server, and the streaming server transmits multimedia data to the user.In this case, the content streaming system may include a separate control server. In this case,the control server serves to control a command / response between devices in the contentstreaming system.
[345] The streaming server may receive content from a media storage and / or an encodingserver. For example, when the content is received from the encoding server, the content maybe received in real time. In this case, in order to provide a smooth streaming service, thestreaming server may store the bitstream for a predetermined time.
[346] Examples of the user device may include a mobile phone, a smartphone, a laptopcomputer, a digital broadcasting terminal, a personal digital assistant (PDA), a portablemultimedia player (PMP), navigation, a slate PC, tablet PCs, ultrabooks, wearable devices (ex.Smartwatches, smart glasses, head mounted displays), digital TVs, desktops computer, digitalsignage, and the like. Each server in the content streaming system may be operated as adistributed server, in which case data received from each server may be distributed.
[347] Each server in the content streaming system may be operated as a distributed server,and in this case, data received from each server may be distributed and processed.
[348] The claims described herein may be combined in various ways. For example, thetechnical features of the method claims of the present document may be combined andimplemented as an apparatus, and the technical features of the apparatus claims of the presentdocument may be combined and implemented as a method. In addition, the technical featuresof the method claim of the present document and the technical features of the apparatus claimmay be combined to be implemented as an apparatus, and the technical features of the methodclaim of the present document and the technical features of the apparatus claim may becombined and implemented as a method.
Claims
1. An image decoding method performed by a decoding apparatus, the method comprising: obtaining a bitstream including a first adaptation parameter set (APS) and a header information for a current picture, wherein the first APS includes first APS type information specifying a type of APS parameters carried in the first APS and the header information includes reshaper related APS ID information for the current picture; deriving luma prediction samples in the current picture; based on the first APS type information specifying that the type of the APS parameters carried in the first APS is reshaper parameters and the reshaper related APS ID information representing an ID of the first APS, deriving reshaping codewords based on the APS parameters carried in the first APS; and deriving reshaped luma prediction samples based on the reshaping codewords and the luma prediction samples.
2. The image decoding method of claim 1, wherein based on a value of the first APS type information being 1, the first APS type information specifies that the type of the APS parameters is the reshaper parameters, wherein based on the value of the first APS type information being 0, the first APS type information specifies that the type of the APS parameters is adaptive loop filter (ALF) parameters.
3. The image decoding method of claim 1, wherein the bitstream includes a sequence parameter set (SPS), and wherein the SPS includes a first reshaper enabled flag specifying whether a reshaping process is enabled.
4. The image decoding method of claim 3, wherein based on a value of the first reshaper enabled flag being 1, the header information includes a second reshaper enabled flag specifying whether the reshaping process is enabled for the current picture.
5. The image decoding method of claim 4, wherein based on a value of the second reshaper enabled flag being 1, the reshaper related APS ID information is included in the header information for the current picture.
6. The image decoding method of claim 1, wherein the method further comprises: generating reconstructed samples for the current picture based on the reshaped luma prediction samples; and performing an adaptive loop filter (ALF) process on the reconstructed samples, wherein the performing the ALF process comprises: deriving filter coefficients for the ALF; and generating modified reconstructed samples for the current picture based on the reconstructed samples and the filter coefficients, wherein the bitstream includes a second APS, wherein the second APS includes second APS type information specifying a type of APS parameters carried in the second APS, wherein the header information includes ALF related APS ID information for the current picture, and wherein based on the second APS type information specifying that the type of the APS parameters is ALF parameters and the ALF related APS ID information representing an ID of the second APS, the filter coefficients are derived based on the APS parameters carried in the second APS.
7. An image encoding method performed by an encoding apparatus, the method comprising: deriving luma prediction samples in a current picture; deriving reshaped luma prediction samples based on reshaping codewords and the luma prediction samples; generating a first adaptation parameter set (APS) including APS parameters for the reshaping codewords and first APS type information specifying a type of the APS parameters; generating header information for the current picture including reshaper related APS ID information for the current picture; generating a bitstream including the first APS and the header information, wherein the first APS type information specifies that the type of the APS parameters carried in the first APS is reshaper parameters, wherein the reshaper related APS ID information represents an ID of the first APS, and wherein the reshaping codewords are derived based on the APS parameters carried in the first APS.
8. The image encoding method of claim 7, wherein based on a value of the first APS type information being 1, the first APS type information specifies that the type of the APS parameters is the reshaper parameters, wherein based on the value of the first APS type information being 0, the first APS type information specifies that the type of the APS parameters is adaptive loop filter (ALF) parameters.
9. A transmission method of data for image, the method comprising: obtaining a bitstream of image information including a first adaptation parameter set (APS) and header information for a current picture; and transmitting the data including the bitstream of the image information including the first APS and the header information, wherein the first APS includes first APS type information specifying a type of APS parameters carried in the first APS and the header information includes reshaper related APS ID information for the current picture, wherein based on the first APS type information specifying that the type of the APS parameters carried in the first APS is reshaper parameters and the reshaper related APS ID information representing an ID of the first APS, reshaping codewords are derived based on the APS parameters carried in the first APS.
10. A decoding apparatus for image decoding, the decoding apparatus configured to: obtain a bitstream including a first adaptation parameter set (APS) and a header information for a current picture, wherein the first APS includes first APS type information specifying a type of APS parameters carried in the first APS and the header information includes reshaper related APS ID information for the current picture; derive luma prediction samples in the current picture; based on the first APS type information specifying that the type of the APS parameters carried in the first APS is reshaper parameters and the reshaper related APS ID information representing an ID of the first APS, derive reshaping codewords based on the APS parameters carried in the first APS; and derive reshaped luma prediction samples based on the reshaping codewords and the luma prediction samples.
11. An encoding apparatus for image encoding, the encoding apparatus configured to: derive luma prediction samples in a current picture; derive reshaped luma prediction samples based on reshaping codewords and the luma prediction samples; generate a first adaptation parameter set (APS) including APS parameters for the reshaping codewords and first APS type information specifying a type of the APS parameters; generate header information for the current picture including reshaper related APS ID information for the current picture; and generate a bitstream including the first APS and the header information, wherein the first APS type information specifies that the type of the APS parameters carried in the first APS is reshaper parameters, wherein the reshaper related APS ID information represents an ID of the first APS, and wherein the reshaping codewords are derived based on the APS parameters carried in the first APS.
12. A transmission apparatus for transmission of data for an image, the transmission apparatus comprising: a processor configured to obtain a bitstream of image information including a first adaptation parameter set (APS) and header information for a current picture; and a transmitter configured to transmit the data including the bitstream of the image information including the first APS and the header information, wherein the first APS includes first APS type information specifying a type of APS parameters carried in the first APS and the header information includes reshaper related APS ID information for the current picture, wherein based on the first APS type information specifying that the type of the APS parameters carried in the first APS is reshaper parameters and the reshaper related APS ID information representing an ID of the first APS, reshaping codewords are derived based on the APS parameters carried in the first APS.
