Video or image compiling method and device
By employing adaptive filtering and luminance mapping and chroma scaling techniques, the high-cost transmission and storage issues of high-resolution images/videos are resolved, improving compression efficiency and visual quality.
Patent Information
- Application Number
- CN202410824124.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-04-03
- Filing Date
- 2020-03-19
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-03-19
AI Technical Summary
With the increasing demand for high-resolution, high-quality images/videos, existing technologies are becoming more expensive to transmit and store, and there is a lack of effective image/video compression technologies to handle the differences in characteristics of virtual reality, artificial reality, and immersive media.
Adaptive filtering and luminance mapping and chrominance scaling techniques (ALF and LMCS) are employed. By using the APS signal to notify relevant information, filter coefficients and parameters are adaptively applied to improve compression efficiency.
It improves image/video compression efficiency and subjective/objective visual quality, and enhances the efficiency of image/video encoding and decoding.
Smart Images

Figure CN118612428A
Abstract
Description
[0001] This application is a divisional application of the patent application with application number 202080031817.9 (PCT / KR2020 / 003787), filed on October 27, 2021, and international application date of March 19, 2020, and the invention name is “Video or image compilation method and device thereof”. Technical Field
[0002] The present disclosure relates to a video or image coding method and a device thereof. Background Art
[0003] Recently, there is an increasing demand for high-resolution, high-quality images / videos such as 4K or 8K ultra-high definition (UHD) images / videos in various fields. As the image / video resolution or quality becomes higher, relatively more information or bits are transmitted compared to conventional image / video data. Therefore, if the image / video data is transmitted via a medium such as an existing wired / wireless broadband line or stored in a conventional storage medium, the cost of transmission and storage is easily increased.
[0004] In addition, there is growing interest and demand for virtual reality (VR) and artificial reality (AR) content and immersive media such as holograms; and there is also growing broadcasting of images / videos that exhibit image / video characteristics different from actual images / videos (e.g., game images / videos).
[0005] Therefore, efficient image / video compression technology is needed to effectively compress and transmit, store or play high-resolution, high-quality images / videos showing various characteristics as described above.
[0006] In addition, there are discussions on techniques such as Luma Mapping and Chroma Scaling (LMCS) and Adaptive Loop Filtering (ALF) to improve compression efficiency and increase subjective / objective visual quality. In order to effectively apply these techniques, a method for effectively signaling relevant information is required. Summary of the invention
[0007] Technical Solution
[0008] According to an embodiment of this document, a method and apparatus for increasing image coding efficiency are provided.
[0009] According to an embodiment of this document, an effective filtering application method and device are provided.
[0010] According to the embodiments of this document, an effective LMCS application method and device are provided.
[0011] According to an embodiment of this document, a method and apparatus for adaptively / hierarchically signaling ALF-related information are provided.
[0012] According to an embodiment of this document, a method and apparatus for adaptively / hierarchically signaling LMCS-related information are provided.
[0013] According to an embodiment of this document, the ALF data field may be signaled through the APS, and APS ID information indicating an ID associated with the referenced APS may be signaled through header information (picture header or slice header).
[0014] According to an embodiment of this document, information about the number of APS IDs related to ALF may be signaled through header information. In this case, the header information may include as many APS ID syntax elements as the number of APS IDs related to ALF, and based on this, it may support deriving an adaptive filter (filter coefficient) in units of blocks / subblocks within the same picture or the same slice and applying ALF.
[0015] According to an embodiment of the present document, the LMCS data field may be signaled through the APS, and APS ID information indicating the ID of the referenced APS may be signaled through header information (picture header or slice header).
[0016] According to an embodiment of this document, APS type information may be signaled through an APS, and whether the corresponding APS is an APS including an ALF data field (or ALF parameters) or whether the corresponding APS is an APS including an LMCS data field (or LMCS parameters) may be indicated through the type information.
[0017] According to an embodiment of this document, a video / image decoding method performed by a decoding device is provided. The video / image decoding method may include the method disclosed in the embodiment of this document.
[0018] According to an embodiment of this document, a decoding device for performing video / image decoding is provided. The decoding device may include the method disclosed in the embodiment of this document.
[0019] According to an embodiment of this document, a video / image encoding method performed by an encoding device is provided. The video / image encoding method may include the method disclosed in the embodiments of this document.
[0020] According to an embodiment of this document, there is provided an encoding device for performing video / image encoding. The encoding device may include the method disclosed in the embodiment of this document.
[0021] According to an embodiment of this document, a computer-readable digital storage medium is provided, which stores encoded video / image information generated according to the video / image encoding method disclosed in at least one embodiment of this document.
[0022] According to an embodiment of the present document, a computer-readable digital storage medium storing coding information or coded video / image information is provided, wherein the coding information or coded video / image information enables a decoding device to perform a video / image decoding method disclosed in at least one embodiment of the present document.
[0023] Effects of the Invention
[0024] According to the present disclosure, the overall image / video compression efficiency may be improved.
[0025] According to the present disclosure, subjective / objective visual quality can be improved through effective filtering.
[0026] According to the present disclosure, compression performance can be improved through LMCS.
[0027] According to the present disclosure, ALF and / or LMCS can be adaptively applied in units of pictures, slices, and / or coding blocks.
[0028] According to the present disclosure, ALF parameters can be efficiently signaled.
[0029] According to the present disclosure, LMCS parameters may be efficiently signaled. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 An example of a video / image coding system to which embodiments of the present disclosure may be applied is schematically shown.
[0031] Figure 2 is a diagram schematically describing a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied.
[0032] Figure 3 is a diagram schematically describing a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0033] Figure 4 An example of a video / image encoding method based on intra-frame prediction is shown.
[0034] Figure 5 An example of a video / image decoding method based on intra-frame prediction is shown.
[0035] Figure 6 The intra prediction process is exemplarily shown.
[0036] Figure 7 An example of a video / image encoding method based on inter-frame prediction is shown.
[0037] Figure 8 An example of a video / image decoding method based on inter-frame prediction is shown.
[0038] Fig. 9 The inter-frame prediction process is exemplarily shown.
[0039] Fig.10 The hierarchical structure of the compiled image / video is shown exemplarily.
[0040] Fig.11 is a flow chart schematically illustrating an example of an ALF process.
[0041] Fig.12 An example of the shape of the ALF filter is shown.
[0042] Fig.13 An example of the hierarchical structure of ALF data is shown.
[0043] Fig.14 Another example of the hierarchical structure of ALF data is shown.
[0044] Fig.15 The hierarchical structure of the CVS according to the embodiment of this document is exemplarily shown.
[0045] Fig.16 An exemplary LMCS structure according to an embodiment of this document is shown.
[0046] Fig.17 An exemplary LMCS structure according to another embodiment of this document is shown.
[0047] Fig.18 A diagram representing an exemplary forward map is shown.
[0048] Fig.19 and Fig. 20 An example of a video / image encoding method and related components according to an embodiment of this document is schematically represented.
[0049] Fig.21 and Fig. 22 An example of a video / image decoding method and related components according to an embodiment of this document is schematically represented.
[0050] Fig.23 The content streaming system structure diagram to which the present disclosure is applied is illustratively shown. DETAILED DESCRIPTION
[0051] The disclosure of this document can be modified in various forms, and specific embodiments thereof will be described and illustrated in the accompanying drawings. However, the embodiments are not intended to limit the present disclosure. The terms used in this document are only used to describe specific embodiments, rather than to limit the embodiments of this document. Singular expressions include plural expressions as long as it is not clearly understood differently. Terms such as "including" and "having" are intended to indicate the presence of features, quantities, steps, operations, elements, components, or combinations thereof used in the document, and therefore it should be understood that the possibility of the presence or addition of one or more different features, quantities, steps, operations, elements, components, or combinations thereof is not excluded.
[0052] In addition, each configuration of the drawings described in this document is an independent diagram for explaining the functions of features that are different from each other, and does not mean that each configuration is implemented by different hardware or different software. For example, two or more configurations can be combined to form a configuration, and a configuration can also be divided into multiple configurations. Without departing from the gist of the present disclosure, embodiments of combined and / or separated configurations are included in the scope of the disclosure of this document.
[0053] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document may be applied to methods disclosed in the Versatile Video Coding (VVC) standard. In addition, the methods / embodiments disclosed in this document may be applied to methods disclosed in the Basic Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation Audio Video Coding standard (AVS2), or the next generation video / image coding standards (e.g., H.267, H.268, etc.).
[0054] The present disclosure proposes various embodiments of video / image coding, and unless otherwise specified, the above embodiments may also be performed in combination with each other.
[0055] In the present disclosure, video may refer to a series of images over time. A picture generally refers to a unit representing an image at a specific time frame, and a slice / tile refers to a unit that constitutes a part of a picture in terms of coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A tile is a rectangular area of a CTU within a specific tile column and a specific tile row in a picture (a tile is a rectangular area of a CTU within a specific tile column and a specific tile row in a picture). A tile column is a rectangular area of a CTU having a height equal to the height of the picture and a width that can be specified by a syntax element in a picture parameter set (a tile column is a rectangular area of a CTU having a height equal to the height of the picture and a width specified by a syntax element in a picture parameter set). A tile row is a rectangular area of a CTU having a width specified by a syntax element in a picture parameter set and a height that can be equal to the height of the picture (a tile row is a rectangular area of a CTU having a height specified by a syntax element in a picture parameter set and a width equal to the width of the picture). Patch scan may refer to a specific sequential ordering of CTUs that partition a picture, and CTUs may be ordered consecutively in a CTU raster scan in a patch, and patches in a picture may be ordered consecutively in a raster scan of patches of a picture (patch scan is a specific sequential ordering of CTUs that partition a picture, where CTUs are ordered consecutively in a CTU raster scan in a patch and patches in a picture are ordered consecutively in a raster scan of patches of a picture). A slice includes an integer number of complete patches that may be exclusively contained in a single NAL unit or an integer number of consecutive complete CTU rows within a patch of a picture.
[0056] Meanwhile, a picture can be divided into two or more sub-pictures. A sub-picture can be a rectangular area of one or more slices within a picture.
[0057] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a value of a pixel, and may represent a pixel / pixel value of only a luminance component or a pixel / pixel value of only a chrominance component.
[0058] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or an area. In general, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients of M columns and N rows.
[0059] In this document, "A or B" may mean "only A", "only B", or "both A and B". In other words, "A or B" in this document may be interpreted as "A and / or B". For example, in this document, "A, B, or C" means "only A", "only B", "only C", or "any combination of A, B, and C".
[0060] As used in this document, a slash ( / ) or a comma (,) may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "both A and B". For example, "A, B, C" may mean "A, B, or C".
[0061] In this document, "at least one of A and B" may mean "only A", "only B", or "both A and B". In addition, in this document, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as the same as "at least one of A and B".
[0062] Furthermore, in this document, “at least one of A, B, and C” means “only A”, “only B”, “only C”, or “any combination of A, B, and C”. Furthermore, “at least one of A, B, or C” or “at least one of A, B and / or C” may mean “at least one of A, B, and C”.
[0063] In addition, brackets used in this document may mean "for example". Specifically, when "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction". In other words, "prediction" in this document is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when "prediction (ie, intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".
[0064] Technical features described separately in one drawing in this document may be implemented separately or may be implemented simultaneously.
[0065] Hereinafter, embodiments of the present document will be described in detail with reference to the accompanying drawings. In addition, in all drawings, the same reference numerals may be used to indicate the same elements, and the same description of the same elements will be omitted.
[0066] Figure 1 An example of a video / image coding system to which embodiments of this document can be applied is shown.
[0067] Reference Figure 1 The video / image coding system may include a source device and a receiving device. The source device may transmit the encoded video / image information or data in the form of a file or stream to the receiving device via a digital storage medium or a network.
[0068] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.
[0069] The video source may acquire the video / image by capturing, synthesizing or generating a video / image process. The video source may include a video / image capturing device, and / or a video / image generating device. For example, the video / image capturing device may include one or more cameras, a video / image archive including previously captured videos / images, etc. For example, the video / image generating device may include a computer, a tablet computer, and a smart phone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by a process that generates relevant data.
[0070] The encoding device can encode the input video / image. For compression and coding efficiency, the encoding device can perform a series of processes such as prediction, transformation and quantization. The encoded data (encoded video / image information) can be output in the form of a bit stream.
[0071] The transmitter may transmit the encoded image / image information or data output in the form of a bit stream to a receiver of a receiving device in the form of a file or stream via a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmitting via a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received bit stream to a decoding device.
[0072] The decoding device may decode a video / image by performing a series of processes corresponding to the operations of the encoding device, such as dequantization, inverse transformation, and prediction.
[0073] The renderer may render the decoded video / image. The rendered video / image may be displayed through a display.
[0074] Figure 2 Schematically illustrates a configuration of a video / image encoding device to which an embodiment of the present disclosure may be applied. Hereinafter, a device referred to as an encoding device may include an image encoding device and / or a video encoding device. In addition, an image encoding method / device may include a video encoding method / device. Alternatively, a video encoding method / device may include an image encoding method / device.
[0075] Reference Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and an entropy encoder 240, an adder 250, a filter 260 and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234 and an inverse transformer 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250 and the filter 260 may be configured by at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB), or may be configured by a digital storage medium. The hardware component may also include the memory 270 as an internal / external component.
[0076] The image divider 210 may divide the input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, the quadtree structure is first applied, and the binary tree structure and / or the ternary tree structure may be applied later. Alternatively, the binary tree structure may also be applied first. The coding process according to this document may be performed based on the final coding unit that is no longer divided. In this case, based on the coding efficiency according to image characteristics, etc., the maximum coding unit may be directly used as the final coding unit, or, as required, the coding unit may be recursively divided into coding units with a deeper depth, so that the coding unit with the best size may be used as the final coding unit. Here, the coding process may include processes such as prediction, transformation, and reconstruction described later. As another example, the processing unit may also include a prediction unit (PU) or a transform unit (TU). In this case, each of the prediction unit and the transform unit may be split or partitioned from the above-mentioned final coding unit. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.
[0077] In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an M×N block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component. A sample may be used as a term corresponding to one picture (or image) of a pixel or a pixel element.
[0078] In the encoding device 200, a prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 is subtracted from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the transformer 232. In this case, as shown, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) in the encoder 200 may be referred to as a subtractor 231. The predictor may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a prediction block including prediction samples of the current block. The predictor may determine whether intra prediction or inter prediction is applied based on the current block or CU. As described later in the description of each prediction mode, the predictor may generate various types of information related to prediction (e.g., prediction mode information) and send the generated information to the entropy encoder 240. Information about the prediction may be encoded in the entropy encoder 240 and output in the form of a bitstream.
[0079] The intra-frame predictor 222 may predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. For example, the non-directional mode may include a DC mode and a plane mode. For example, depending on the level of detail of the prediction direction, the directional mode may include 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-frame predictor 222 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.
[0080] The inter-frame predictor 221 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 221 may configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 may use the motion information of the neighboring block as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted. The motion vector prediction (MVP) mode may indicate the motion vector of the current block by using the motion vector of the neighboring block as a motion vector predictor and signaling the motion vector difference.
[0081] The predictor 200 may generate a prediction signal based on various prediction methods described later. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but may also apply both intra prediction and inter prediction at the same time. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may be based on an intra block copy (IBC) prediction mode or a palette mode to perform prediction on a block. The IBC prediction mode or the palette mode may be used for content image / video coding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but it may be performed similarly to inter prediction because it derives a reference block in the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, the sample values in the picture may be signaled based on information about the palette table and the palette index.
[0082] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of the following: discrete cosine transform (DCT), discrete sine transform (DST), graph-based transform (GBT), or conditional nonlinear transform (CNT). Here, when the relationship information between pixels is illustrated as a graph, GBT means a transform obtained from a graph. CNT means a transform obtained based on a prediction signal generated by using all previously reconstructed pixels. In addition, the transform process can also be applied to pixel blocks of squares of the same size, and can also be applied to blocks of variable sizes other than squares.
[0083] The quantizer 233 may quantize the transform coefficients to send the quantized transform coefficients to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) into a bitstream. Information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form in a one-dimensional vector form based on the coefficient scanning order, and also generate information about the quantized transform coefficients based on the quantized transform coefficients in a one-dimensional vector form. The entropy encoder 240 may perform various encoding methods such as exponential Golomb coding, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 240 may also encode information necessary for reconstructing the video / image (e.g., the value of a syntax element, etc.) in addition to the quantized transform coefficients together or separately. The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The information and / or syntax elements that are signaled / sent later described in this disclosure may be encoded by the aforementioned encoding process and thus included in the bitstream. The bitstream may be sent over a network or may be stored in a digital storage medium. Here, the network may include a broadcast network and / or a communication network, etc., and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for sending a signal output from the entropy encoder 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device 200, or the transmitter may also be included in the entropy encoder 240.
[0084] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, the dequantizer 234 and the inverse transformer 235 apply dequantization and inverse transformation to the quantized transform coefficients so that the residual signal (residual block or residual sample) can be reconstructed. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222, so that a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) can be generated. If there is no residual in the block to be processed, the prediction block can be used as a reconstructed block, such as in the case of applying the skip mode. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and as described later, it is also used for inter-frame prediction of the next picture through filtering.
[0085] Meanwhile, luminance mapping and chrominance scaling (LMCS) may also be applied during picture encoding and / or reconstruction.
[0086] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). For example, various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various types of information related to filtering and send the generated information to the entropy encoder 240, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.
[0087] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and the decoding apparatus may be avoided and coding efficiency may be improved.
[0088] The DPB of the memory 270 DPB may store a modified reconstructed picture used as a reference picture in the inter-frame predictor 221. The memory 270 may store motion information of a block for deriving (or encoding) motion information in the current picture and / or motion information of a reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 221 and used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of a reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame predictor 222.
[0089] Figure 31 is a diagram for schematically explaining the configuration of a video / image decoding device to which an embodiment of the present disclosure may be applied. In the following, a device referred to as a decoding device may include an image decoding device and / or a video decoding device. In addition, an image encoding method / device may include a video encoding method / device. Alternatively, a video encoding method / device may include an image encoding method / device.
[0090] Reference Figure 3 , the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 331 and an intra-frame predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. According to an embodiment, the entropy decoding 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured by a hardware component (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include the memory 360 as an internal / external component.
[0091] When a bit stream including video / image information is input, the decoding device 300 may respond to the Figure 2 The image can be reconstructed by processing video / image information in the encoding device shown. For example, the decoding device 300 can derive the unit / block based on the block segmentation related information obtained from the bit stream. The decoding device 300 can perform decoding using a processing unit applied to the encoding device. Therefore, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided from the coding tree unit or the maximum coding unit according to a quadtree structure, a binary tree structure and / or a ternary tree structure. One or more transform units can be derived from the coding unit. In addition, the reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.
[0092] The decoding device 300 may receive the bit stream from Figure 2, and the received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can derive the information (e.g., video / image information) required for image reconstruction (or picture reconstruction) by parsing the bitstream. The video / image information may also include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The signaled / received information and / or syntax elements described later in the present disclosure may be decoded by a decoding process and obtained from the bitstream. For example, the entropy decoder 310 may decode the information within the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of the syntax elements required for image reconstruction and the quantized values of the residual-related transform coefficients. More specifically, the CABAC entropy decoding method may receive a bin (binary bit) corresponding to each syntax element from a bitstream, determine a context model using information of syntax elements to be decoded, information of decoded adjacent blocks or blocks to be decoded, or information of symbols / bins decoded in a previous stage, and generate symbols corresponding to the values of each syntax element by predicting the probability of generating bins according to the determined context model to perform arithmetic decoding on bins. At this point, the CABAC entropy decoding method may determine a context model and then update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin. Information related to prediction among the information decoded by the entropy decoder 310 may be provided to a predictor (inter-frame predictor 332 and intra-frame predictor 331), and residual values (i.e., quantized transform coefficients and related parameter information) entropy decoded by the entropy decoder 310 may be input to a residual processor 320. The residual processor 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded by the entropy decoder 310 may be provided to a filter 350. Meanwhile, a receiver (not shown) for receiving a signal output from the encoding device may also be configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. Meanwhile, the decoding device according to the present disclosure may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 310, and the sample decoder may include at least one of the following: a dequantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.
[0093] The dequantizer 321 may dequantize the quantized transform coefficient and output the transform coefficient. The dequantizer 321 may rearrange the quantized transform coefficient in a two-dimensional block form. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The dequantizer 321 may perform dequantization on the quantized transform coefficient using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficient.
[0094] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0095] The predictor 330 may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on information on prediction output from the entropy decoder 310 and may determine a specific intra / inter prediction mode.
[0096] The predictor may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but may also apply intra prediction and inter prediction at the same time. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for content image / video coding of games, such as screen content coding (SCC). IBC basically performs a prediction in the current picture, but may be performed similarly to inter prediction so that a reference block is derived in the current picture. That is, IBC may use at least one inter prediction technique described herein. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, information about the palette table and the palette index may be included in the video / image information and signaled.
[0097] The intra-frame predictor 331 may predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The intra-frame predictor 331 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.
[0098] The inter-frame predictor 332 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter-frame predictor 332 may configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating the inter-frame prediction mode of the current block.
[0099] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If there is no residual in the block to be processed, for example, when the skip mode is applied, the prediction block can be used as the reconstructed block.
[0100] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, may be output through filtering as described below, or may be used for inter prediction of the next picture.
[0101] Meanwhile, luma mapping and chroma scaling (LMCS) may be applied in the picture decoding process.
[0102] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 360 (specifically, the DPB of the memory 360). For example, the various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0103] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter-frame predictor 332. The memory 360 may store the motion information of the block in which the motion information in the current picture is derived (decoded) and / or the motion information of the block in the previously reconstructed picture. The stored motion information may be transmitted to the inter-frame predictor 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 360 may store the reconstructed samples of the reconstructed block in the current picture and transmit the stored reconstructed samples to the intra-frame predictor 331.
[0104] In this document, the exemplary embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may be equally applied to or correspond to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300, respectively.
[0105] Meanwhile, as described above, when performing video coding, prediction is performed to improve compression efficiency. Thus, a prediction block including prediction samples for a current block as a block to be coded (i.e., a coding target block) may be generated. Here, the prediction block includes prediction samples in a spatial domain (or a pixel domain). The prediction block is derived in the same manner in the encoding device and the decoding device, and the encoding device may signal information about the residual between the original block and the prediction block (residual information) instead of the original sample value of the original block to the decoding device, thereby improving image coding efficiency. The decoding device may derive a residual block including residual samples based on the residual information, add the residual block and the prediction block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0106] The residual information may be generated by a transformation and quantization procedure. For example, the encoding device may derive a residual block between the original block and the prediction block, perform a transformation process on the residual samples (residual sample array) included in the residual block to derive a transformation coefficient, perform a quantization process on the transformation coefficient to derive a quantized transformation coefficient, and notify the decoding device of the relevant residual information (through a bitstream) with a signal. Here, the residual information may include value information, position information, transformation technology, transformation kernel, quantization parameter, etc. of the quantized transformation coefficient. The decoding device may perform a dequantization / inverse transformation process based on the residual information and derive residual samples (or residual blocks). The decoding device may generate a reconstructed picture based on the prediction block and the residual block. In addition, for reference for inter-frame prediction of subsequent pictures, the encoding device may also dequantize / inverse transform the quantized transformation coefficient to derive a residual block, and generate a reconstructed picture based on the residual block.
[0107] Intra-frame prediction may indicate a prediction of a prediction sample for a current block generated based on a reference sample in a picture to which the current block belongs (hereinafter referred to as the current picture). When intra-frame prediction is applied to the current block, neighboring reference samples to be used for intra-frame prediction of the current block may be derived. The neighboring reference samples of the current block may include: samples adjacent to the left boundary and a total of 2xnH samples adjacent to the lower left of the current block of size nWxnH; samples adjacent to the upper boundary of the current block and a total of 2xnW samples adjacent to the upper right of the current block; and one sample adjacent to the upper left of the current block. Alternatively, the neighboring reference samples of the current block may include multiple columns of upper neighboring samples and multiple rows of left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right of the current block.
[0108] However, some of the neighboring reference samples of the current block have not been decoded or may not be available. In this case, the decoding device can construct the neighboring reference samples to be used for prediction by replacing the unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be constructed by interpolation of available samples.
[0109] When deriving the neighboring reference samples, (i) the prediction sample may be derived based on an average or interpolation of the neighboring reference samples of the current block, or (ii) the prediction sample may be derived based on a reference sample located in a specific (prediction) direction relative to the prediction sample among the neighboring reference samples of the current block. The case of (i) may be referred to as a non-directional mode or a non-angular mode, and the case of (ii) may be referred to as a directional mode or an angular mode.
[0110] In addition, the prediction samples may be generated by interpolating the first adjacent samples located in the prediction direction of the intra prediction mode of the current block and the second adjacent samples located in the direction opposite to the prediction direction among the adjacent reference samples based on the prediction samples of the current block. The above case may be referred to as linear interpolation intra prediction (LIP). In addition, the chroma prediction samples may be generated based on the luma samples using a linear model (LM). This case may be referred to as an LM mode or a CCLM (chroma component LM) mode.
[0111] In addition, the temporary prediction sample of the current block can be derived by the neighboring reference samples based on the filtering, and the prediction sample of the current block can also be derived by the weighted sum of at least one reference sample derived according to the intra prediction mode among the existing neighboring reference samples (i.e., the unfiltered neighboring reference samples) and the temporary prediction sample. The above situation can be called position-dependent intra prediction (PDPC).
[0112] In addition, a reference sample line with the highest prediction accuracy is selected among multiple reference sample lines surrounding the current block, and a reference sample located in a prediction direction of the selected reference sample line is used to derive a prediction sample, and intra-frame prediction encoding can be performed by indicating (notifying with a signal) the used reference sample line to a decoding device. The above situation may be referred to as multi-reference line intra-frame prediction or MRL-based intra-frame prediction.
[0113] In addition, the current block is divided into vertical or horizontal sub-partitions to perform intra prediction based on the same intra prediction mode, but it is possible to derive and use adjacent reference samples in units of sub-partitions. That is, in this case, the intra prediction mode for the current block can be applied to all sub-partitions in the same manner, but the intra prediction performance can be improved by deriving and using adjacent reference samples in units of sub-partitions in some cases. This prediction method may be referred to as intra prediction based on intra sub-partitions (ISP).
[0114] The above-mentioned intra-frame prediction method may be referred to as an intra-frame prediction type to distinguish it from an intra-frame prediction mode. The intra-frame prediction type may be referred to by various terms such as an intra-frame prediction technique or an additional intra-frame prediction mode. For example, the intra-frame prediction type (or additional intra-frame prediction mode) may include at least one of the LIP, PDPC, MRL and ISP mentioned above. General intra-frame prediction methods other than specific intra-frame prediction types such as LIP, PDPC, MRL and ISP may be referred to as normal intra-frame prediction types. Normal intra-frame prediction types may generally be applied when a specific intra-frame prediction type is not applied, and prediction may be performed based on an intra-frame prediction mode. At the same time, if necessary, post-processing filtering may be performed on the derived prediction samples.
[0115] Specifically, the intra prediction process may include an intra prediction mode / type determination step, an adjacent reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. In addition, if necessary, a post-filtering step may be performed on the derived prediction samples.
[0116] Figure 4 An example of a video / image encoding method based on intra-frame prediction is shown.
[0117] Reference Figure 4, the encoding device performs intra prediction on the current block (S400). The encoding device performs intra prediction on the current block (S400). The encoding device may derive an intra prediction mode / type for the current block, derive adjacent reference samples of the current block, and generate prediction samples in the current block based on the intra prediction mode / type and the adjacent reference samples. Here, the processes of determining the intra prediction mode / type, deriving adjacent reference samples, and generating prediction samples may also be performed simultaneously, and any one process may also be performed earlier than the other processes. The encoding device may determine a mode / type to be applied to the current block among a plurality of intra prediction modes / types. The encoding device may compare the RD costs of the intra prediction modes / types, and determine the best intra prediction mode / type for the current block.
[0118] At the same time, the encoding device may also perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered according to the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.
[0119] The encoding apparatus generates residual samples for the current block based on the (filtered) prediction samples (S410). The encoding apparatus may compare the prediction samples based on a phase in the original samples of the current block and derive the residual samples.
[0120] The encoding device may encode image information including information about intra prediction (prediction information) and residual information about residual samples (S420). The prediction information may include intra prediction mode information and intra prediction type information. The encoding device may output the encoded image information in the form of a bit stream. The output bit stream may be transmitted to a decoding device via a storage medium or a network.
[0121] The residual information may include a residual coding syntax to be described. The encoding apparatus may derive a quantized transform coefficient by transforming / quantizing the residual sample. The residual information may include information on the quantized transform coefficient.
[0122] Meanwhile, as described above, the encoding device may generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding device may derive (modified) residual samples by dequantizing / inverse transforming the quantized transform coefficients again. As described above, the reason for transforming / quantizing the residual samples and then dequantizing / inverse transforming them again is to derive the same residual samples as the residual samples derived by the decoding device as described above. The encoding device may generate a reconstructed block including reconstructed samples for the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture of the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering process, etc. may be further applied to the reconstructed picture.
[0123] Figure 5An example of a video / image decoding method based on intra-frame prediction is shown.
[0124] The decoding device may perform an operation corresponding to an operation performed by the encoding device.
[0125] Prediction information and residual information may be obtained from a bitstream. Residual samples for the current block may be derived based on the residual information. Specifically, the decoding device may derive transform coefficients by performing dequantization based on quantized transform coefficients derived based on the residual information, and inverse transform the transform coefficients to derive residual samples for the current block.
[0126] Specifically, the decoding device may derive the intra prediction mode / type of the current block based on the received prediction information (intra prediction mode / type information) (S500). The decoding device may derive the adjacent reference samples of the current block (S510). The decoding device generates the prediction samples in the current block based on the intra prediction mode / type and the adjacent reference samples (S520). In this case, the decoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post filtering. Some or all of the prediction samples may be filtered according to the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.
[0127] The decoding device generates a residual sample for the current block based on the received residual information (S530). The decoding device may generate a reconstructed sample of the current block based on the predicted sample and the residual sample, and derive a reconstructed block including the reconstructed sample (S540). A reconstructed picture of the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering process or the like may also be applied to the reconstructed picture.
[0128] The intra-frame prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether the most probable mode (MPM) is applied to the current block or whether the residual mode is applied to the current block, and when the MPM is applied to the current block, the prediction mode information may also include index information (e.g., intra_luma_mpm_idx) indicating one of the intra-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may include an MPM candidate list or an MPM list. In addition, if the MPM is not applied to the current block, the intra-frame prediction mode information may also include residual mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.
[0129] In addition, the intra prediction type information can be implemented in various forms. As an example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of the following: reference sample line information indicating whether MRL is applied to the current block and which reference sample line is used if MRL is applied (e.g., intra_luma_ref_idx), ISP flag information indicating whether ISP is applied to the current block (e.g., intra_subpartitions_mode_flag), ISP type information indicating the segmentation type of the sub-partition if ISP is applied (e.g., intra_subpartitions_split_flag), flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. In addition, the intra prediction type information may include a MIP flag indicating whether MIP is applied to the current block.
[0130] The intra prediction mode information and / or the intra prediction type information may be encoded / decoded by the coding method described in this document. For example, the intra prediction mode information and / or the intra prediction type information may be encoded / decoded by entropy coding (eg, CABAC, CAVLC).
[0131] Figure 6 The intra prediction process is exemplarily shown.
[0132] Reference Figure 6 As described above, the intra prediction process may include an intra prediction mode / type determination step, a step of deriving adjacent reference samples, and a step of performing intra prediction (generating prediction samples). The intra prediction process may be performed in the encoding device and the decoding device as described above. In this document, the coding device may include an encoding device and / or a decoding device.
[0133] Reference Figure 6 , the encoding device determines the intra prediction mode / type (S600).
[0134] The encoding device may determine the intra prediction mode / type applied to the current block from among the various intra prediction modes / types described above, and may generate prediction related information. The prediction related information may include intra prediction mode information indicating the intra prediction mode applied to the current block and / or intra prediction type information indicating the intra prediction type applied to the current block. The decoding device may determine the intra prediction mode / type applied to the current block based on the prediction related information.
[0135] The intra-frame prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether the most probable mode (MPM) is applied to the current block or the residual mode is applied to the current block. When MPM is applied to the current block, the prediction mode information may also include index information (e.g., intra_luma_mpm_idx) indicating one of the intra-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may include an MPM candidate list or an MPM list. In addition, when MPM is not applied to the current block, the intra-frame prediction mode information may also include residual mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.
[0136] In addition, the intra prediction type information can be implemented in various forms. As an example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of the following: reference sample line information indicating whether MRL is applied to the current block and which reference sample line is used when MRL is applied (e.g., intra_luma_ref_idx), ISP flag information indicating whether ISP is applied to the current block (e.g., intra_subpartitions_mode_flag), ISP type information indicating the segmentation type of the sub-partition when ISP is applied (e.g., intra_subpartitions_split_flag), flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. In addition, the intra prediction type information may include a MIP flag indicating whether matrix-based intra prediction (MIP) is applied to the current block.
[0137] For example, when intra prediction is applied, the intra prediction mode applied to the current block may be determined by using the intra prediction mode of the neighboring block. For example, the coding device may select one of the MPM candidates in the MPM (most likely mode) list derived based on the intra prediction mode of the neighboring blocks (e.g., the left neighboring block and / or the upper neighboring block) of the current block and the additional candidate mode based on the received MPM index, or select one of the other remaining intra prediction modes not included in the MPM candidate (and the plane mode) based on the remaining intra prediction mode information. The MPM list may be configured to include or exclude the plane mode as a candidate. For example, when the MPM list includes the plane mode as a candidate, the MPM list may have 6 candidates, and when the MPM list does not include the plane mode as a candidate, the MPM list may have 5 candidates. When the MPM list does not include the plane mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not a plane mode may be signaled. For example, the MPM flag is first signaled, and the MPM index and the non-planar flag may be signaled when the value of the MPM flag is 1. In addition, the MPM index may be signaled when the value of the non-planar flag is 1. Here, the reason why the MPM list is configured not to include the planar mode as a candidate is not that the planar mode is not the MPM, but because the planar mode is always considered to be the MPM, it is first checked whether the MPM is the planar mode by first signaling the flag (non-planar flag).
[0138] For example, it may be indicated based on an MPM flag (e.g., intra_luma_mpm_flag) whether the intra prediction mode applied to the current block is included in the MPM candidates (and planar mode) or in the remaining mode. An MPM flag value of 1 may indicate that the intra prediction mode for the current block is included in the MPM candidates (and planar mode), and an MPM flag of 0 may indicate that the intra prediction mode for the current block is not in the MPM candidates (and planar mode). A non-planar flag (e.g., intra_luma_not_planar_flag) value of 0 may indicate that the intra prediction mode for the current block is a planar mode, and a non-planar flag value of 1 may indicate that the intra prediction mode for the current block is not a planar mode. The MPM index may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may indicate one of the remaining intra prediction modes that is not included in the MPM candidates (and the planar mode) among all intra prediction modes by indexing in the order of the prediction mode number. The intra prediction mode may be an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of an MPM flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an MPM index (e.g., mpm_idx or intra_luma_mpm_idx), and remaining intra prediction mode information (e.g., rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this document, the MPM list may be referred to by various terms such as an MPM candidate list or candModeList.
[0139] When a MIP is applied to the current block, a separate MPM flag (eg, intra_mip_mpm_flag), an MPM index (eg, intra_mip_mpm_idx), and remaining intra prediction mode information for the MIP (eg, intra_mip_mpm_remainder) may be separately signaled, and the non-planar flag may not be signaled.
[0140] In other words, generally, when an image is divided into blocks, the current block to be coded and the adjacent blocks have similar image characteristics. Therefore, the possibility that the current block and the adjacent blocks have the same or similar intra-frame prediction mode is high. Therefore, the encoding device can encode the intra-frame prediction mode of the current block using the intra-frame prediction mode of the adjacent block.
[0141] The coding device may be configured with a list of most probable modes (MPMs) for the current block. The MPM list may be referred to as an MPM candidate list. Here, MPM may refer to a mode for improving coding efficiency by considering the similarity between the current block and the adjacent blocks during intra prediction mode coding. As described above, the MPM list may be configured to include a planar mode, or may be configured to exclude a planar mode. For example, when the MPM list includes a planar mode, the number of candidates in the MPM list may be six. And, when the MPM list does not include a planar mode, the number of candidates in the MPM list may be five.
[0142] The encoding device may perform prediction based on various intra prediction modes, and may determine the best intra prediction mode based on rate distortion optimization (RDO) based on the prediction. In this case, the encoding device may determine the best intra prediction mode by using only the MPM candidates and the plane mode configured in the MPM list, or may determine the best intra prediction mode by further using the remaining intra prediction modes and the MPM candidates and the plane mode configured in the MPM list. Specifically, for example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP) other than the normal intra prediction type, the encoding device may determine the best intra prediction mode by considering only the MPM candidates and the plane mode as intra prediction mode candidates for the current block. That is, in this case, the intra prediction mode for the current block may be determined only from the MPM candidates and the plane mode, and in this case, encoding / signaling of the mpm flag may not be performed. In this case, the decoding device may estimate that the mpm flag is 1 without receiving a signal of the mpm flag separately.
[0143] Meanwhile, generally, when the intra prediction mode of the current block is not the planar mode and is one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpm idx) indicating one of the MPM candidates. When the intra prediction mode of the current block is not in the MPM list, the encoding device generates MPM residual information (remaining intra prediction mode information) indicating the same mode as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list (and the planar mode). The MPM residual information may include, for example, an intra_luma_mpm_remainder syntax element.
[0144] The decoding device obtains intra prediction mode information from the bitstream. As described above, the intra prediction mode information may include at least one of an MPM flag, a non-plane flag, an MPM index, and MPM residual information (residual intra prediction mode information). The decoding device may configure an MPM list. The MPM list is configured in the same manner as the MPM list configured in the encoding device. That is, the MPM list may include intra prediction modes of adjacent blocks, and may also include a specific intra prediction mode according to a predetermined method.
[0145] The decoding device may determine the intra prediction mode of the current block based on the MPM list and the intra prediction mode information. For example, when the value of the MPM flag is 1, the decoding device may derive the plane mode as the intra prediction mode of the current block (based on the non-plane flag), or may derive the candidate indicated by the MPM index from the MPM candidates in the MPM list as the intra prediction mode of the current block. Here, the MPM candidate may indicate only the candidates included in the MPM list, or may include not only the candidates included in the MPM list, but also the plane mode applicable when the value of the MPM flag is 1.
[0146] As another example, when the value of the MPM flag is 0, the decoding device may derive the intra prediction mode and the plane mode indicated by the remaining intra prediction mode information (which may be referred to as mpm remaining information) in the remaining intra prediction modes not included in the MPM list as the intra prediction mode of the current block. At the same time, as another example, when the intra prediction type of the current block is a specific type (such as LIP, MRL, or ISP, etc.), the decoding device may derive the plane mode or the candidate indicated by the MPM flag in the MPM list as the intra prediction mode of the current block without parsing / decoding / checking the MPM flag.
[0147] The coding device derives peripheral reference samples of the current block (S610). When intra prediction is applied to the current block, neighboring reference samples to be used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include: samples adjacent to the left boundary and a total of 2xnH samples adjacent to the lower left of the current block of size nWxnH; samples adjacent to the upper boundary of the current block and a total of 2xnW samples adjacent to the upper right of the current block; and one sample adjacent to the upper left of the current block. Alternatively, the neighboring reference samples of the current block may include multiple columns of upper neighboring samples and multiple rows of left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right of the current block.
[0148] On the other hand, when MRL is applied (ie, when the value of the MRL index is greater than 0), the neighboring reference samples may be located on the 1st and 2nd rows instead of the 0th row adjacent to the current block on the left / upper side, in which case the number of neighboring reference samples may be further increased. Meanwhile, when ISP is applied, the neighboring reference samples can be derived in units of sub-partitions.
[0149] The coding device derives a prediction sample by performing intra prediction on the current block (S620). The coding device may derive the prediction sample based on the intra prediction mode / type and the neighboring samples. The coding device may derive a reference sample from the neighboring reference samples of the current block according to the intra prediction mode of the current block, and may derive the prediction sample of the current block based on the reference sample.
[0150] Meanwhile, when inter-frame prediction is applied, the predictor of the encoding device / decoding device may derive prediction samples by performing inter-frame prediction in units of blocks. When prediction is performed on the current block, inter-frame prediction may be applied. That is, the predictor of the encoding / decoding device (more specifically, the inter-frame predictor) may derive prediction samples by performing inter-frame prediction in units of blocks. Inter-frame prediction may refer to predictions derived by a method that depends on data elements (e.g., sample values or motion information) of pictures other than the current picture. When inter-frame prediction is applied to the current block, a prediction block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. In this case, in order to reduce the amount of motion information sent in an inter-frame prediction mode, the motion information of the current block may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of applying inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same as or different from each other. The temporal neighboring block may be referred to as a name such as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be configured based on the neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) may be signaled to derive the motion vector / or reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes, and, for example, in the case of a skip mode and a merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of the skip mode, unlike the merge mode, a residual signal may not be sent. In the case of a motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block may be derived by using the sum of the motion vector predictor and the motion vector difference.
[0151] The motion information may also include L0 motion information and / or L1 motion information according to the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). The L0 direction motion vector may be referred to as the L0 motion vector or MVL0, and the L1 direction motion vector may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as the L0 prediction, prediction based on the L1 motion vector may be referred to as the L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as bidirectional prediction. Here, the L0 motion vector may indicate a motion vector associated with the reference picture list L0, and the L1 motion vector may indicate a motion vector associated with the reference picture list L1. The reference picture list L0 may include pictures before the current picture in output order, and the reference picture list L1 may include pictures after the current picture in output order as reference pictures. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may also include pictures after the current picture in output order as reference pictures. In this case, the previous picture may be indexed first in the reference picture list L0, and then the subsequent picture may be indexed. The reference picture list L1 may also include a picture preceding the current picture in the output order as a reference picture. In this case, the subsequent picture may be indexed first in the reference picture list L1, and then the previous picture may be indexed. Here, the output order may correspond to a picture order count (POC) order.
[0152] The video / image encoding process based on inter-frame prediction may schematically include, for example, the following contents.
[0153] Figure 7 An example of a video / image encoding method based on inter-frame prediction is shown.
[0154] The encoding device performs inter prediction on the current block (S700). The encoding device may derive the inter prediction mode and motion information of the current block, and generate a prediction sample of the current block. Here, the inter prediction mode determination process, the motion information derivation process, and the prediction sample generation process may be performed simultaneously, and any one process may be performed earlier than the other processes. For example, the inter prediction unit of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and the prediction mode determination unit may determine the prediction mode for the current block, the motion information derivation unit may derive the motion information of the current block, and the prediction sample derivation unit may derive the prediction sample of the current block. For example, the inter prediction unit of the encoding device may search for a block similar to the current block in a predetermined area (search area) of the reference picture through motion estimation, and derive a reference block whose difference with the current block is the smallest or equal to or less than a predetermined standard. A reference picture index indicating the reference picture where the reference block is located may be derived based on this, and a motion vector may be derived based on the position difference between the reference block and the current block. The encoding device may determine a mode applied to the current block among various prediction modes. The encoding apparatus may compare RD costs of various prediction modes and determine an optimal prediction mode for the current block.
[0155] For example, when the skip mode or merge mode is applied to the current block, the encoding device may configure a merge candidate list to be described below, and derive a reference block whose difference with the current block is the smallest or equal to or less than a predetermined standard among the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding device. The motion information of the current block may be derived by using the motion information of the selected merge candidate.
[0156] As another example, when the (A)MVP mode is applied to the current block, the encoding device may configure the (A)MVP candidate list described below, and use the motion vector of the selected MVP candidate among the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, it is indicated that the motion vector of the reference block derived by motion estimation can be used as the motion vector of the current block, and the MVP candidate having the motion vector with the smallest difference from the motion vector of the current block among the MVP candidates can become the selected MVP candidate. A motion vector difference (MVD) can be derived, which is a difference obtained by subtracting the MVP from the motion vector of the current block. In this case, information about the MVD can be notified to the decoding device by a signal. In addition, when the (A)MVP mode is applied, the value of the reference picture index can be configured as reference picture index information and separately notified to the decoding device by a signal.
[0157] The encoding apparatus may induce residual samples based on the predicted samples (S710). The encoding apparatus may induce residual samples by comparing original samples and predicted samples of the current block.
[0158] The encoding device encodes the image information including prediction information and residual information (S720). The encoding device may output the encoded image information in the form of a bitstream. The prediction information may include information about prediction mode information (e.g., a skip flag, a merge flag, or a mode index, etc.) and information about motion information as information related to the prediction process. The information about the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index), which is information for deriving a motion vector. In addition, the information about the motion information may include information about the MVD and / or reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or bidirectional prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients of the residual sample.
[0159] The output bitstream may be stored in a (digital) storage medium and transmitted to a decoding device or transmitted to a decoding device via a network.
[0160] At the same time, as described above, the encoding device may generate a reconstructed picture (including a reconstructed sample and a reconstructed block) based on the reference sample and the residual sample. This is to derive the same prediction result as the prediction result performed by the decoding device, and as a result, the coding efficiency can be improved. Therefore, the encoding device may store the reconstructed picture (or the reconstructed sample or the reconstructed block) in a memory and use the reconstructed picture as a reference picture. The in-loop filtering process may be further applied to the reconstructed picture as described above.
[0161] The video / image decoding process based on inter-frame prediction may schematically include, for example, the following process.
[0162] Figure 8 An example of a video / image decoding method based on inter-frame prediction is shown.
[0163] Reference Figure 8 The decoding device may perform an operation corresponding to the operation performed by the encoding device. The decoding device may perform prediction on the current block based on the received prediction information and derive a prediction sample.
[0164] Specifically, the decoding apparatus may determine a prediction mode for the current block based on the received prediction information (S800). The decoding apparatus may determine which inter prediction mode to apply to the current block based on prediction mode information in the prediction information.
[0165] For example, whether to apply the merge mode or the (A) MVP mode to the current block may be determined based on the merge flag. Alternatively, one of various inter prediction mode candidates may be selected based on the mode index. The inter prediction mode candidate may include a skip mode, a merge mode, and / or an (A) MVP mode, or may include various inter prediction modes to be described below.
[0166] The decoding device derives motion information of the current block based on the determined inter prediction mode (S810). For example, when the skip mode or merge mode is applied to the current block, the decoding device may configure a merge candidate list described below, and select a merge candidate from among the merge candidates included in the merge candidate list. Here, the selection may be performed based on the selection information (merge index). The motion information of the current block may be derived by using the motion information of the selected merge candidate. The motion information of the selected merge candidate may be used as the motion information of the current block.
[0167] As another example, when the (A)MVP mode is applied to the current block, the decoding device may configure the (A)MVP candidate list to be described below, and use the motion vector of the selected MVP candidate among the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. Here, the selection may be performed based on the selection information (MVP flag or MVP index). In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVD and the MVP of the current block. In addition, the reference picture index of the current block may be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list for the current block may be derived as the reference picture referenced for inter-frame prediction of the current block.
[0168] Meanwhile, as described below, the motion information of the current block may be derived without a candidate list configuration, and in this case, the motion information of the current block may be derived according to a process disclosed in the prediction mode. In this case, the candidate list configuration may be omitted.
[0169] The decoding device may generate a prediction sample for the current block based on the motion information of the current block (S820). In this case, a reference picture may be derived based on a reference picture index of the current block, and the prediction sample of the current block may be derived by using a sample of the reference block indicated by the motion vector of the current block on the reference picture. In this case, in some cases, a prediction sample filtering process may be further performed for all or some of the prediction samples of the current block.
[0170] For example, the inter-frame prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit and a prediction sample derivation unit, and the prediction mode determination unit may determine the prediction mode for the current block based on the received prediction mode information, the motion information derivation unit may derive the motion information (motion vector and / or reference picture index) of the current block based on the information about the received motion information, and the prediction sample derivation unit may derive the prediction sample of the current block.
[0171] The decoding device generates a residual sample for the current block based on the received residual information (S830). The decoding device may generate a reconstructed sample for the current block based on the predicted sample and the residual sample, and generate a reconstructed picture based on the generated reconstructed sample (S840). Thereafter, as described above, the in-loop filtering process may be further applied to the reconstructed picture.
[0172] Fig. 9 The inter-frame prediction process is exemplarily shown.
[0173] Reference Fig. 9 As described above, the inter-frame prediction process may include an inter-frame prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction processing (prediction sample generation) step based on the derived motion information. The inter-frame prediction process may be performed by the encoding device and the decoding device as described above. In this document, the coding device may include the encoding device and / or the decoding device.
[0174] Reference Fig. 9 , the coding device determines the inter prediction mode for the current block (S900). Various inter prediction modes can be used for the prediction of the current block in the picture. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, merge with MVD (MMVD) mode and historical motion vector prediction (HMVP) mode can be used. Decoder side motion vector correction (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bidirectional prediction (BCW) with CU level weight, bidirectional optical flow (BDOF), etc. can also be used as additional modes. Affine mode can also be referred to as affine motion prediction mode. MVP mode can also be referred to as advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived from some modes can also be included in one of the motion information related candidates in other modes. For example, an HMVP candidate can be added to the merge candidate of the merge / skip mode, or also added to the MVP candidate of the MVP mode. If the HMVP candidate is used as a motion information candidate for the merge mode or the skip mode, the HMVP candidate can be referred to as an HMVP merge candidate.
[0175] Prediction mode information indicating the inter prediction mode of the current block may be signaled from the encoding device to the decoding device. In this case, the prediction mode information may be included in the bitstream and received by the decoding device. The prediction mode information may include index information indicating one of a plurality of candidate modes. Alternatively, the inter prediction mode may be indicated by hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, whether the skip mode is applied may be indicated by signaling a skip flag, whether the merge mode is applied may be indicated by signaling a merge flag when the skip mode is not applied, and indicating the application of the MVP mode, or a flag for additional distinction may also be signaled when the merge mode is not applied. The affine mode may be signaled as an independent mode, or as a dependent mode that depends on the merge mode or the MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0176] The coding apparatus derives motion information for a current block (S910). The motion information may be derived based on an inter prediction mode.
[0177] The coding device may use the motion information of the current block to perform inter-frame prediction. The coding device may derive the best motion information for the current block through a motion estimation process. For example, the coding device may search for a similar reference block with high correlation in units of fractional pixels within a predetermined search range in the reference picture by using the original block in the original picture for the current block, and derive motion information through the searched reference block. The similarity of the blocks may be derived based on the difference in sample values based on the phase. For example, the similarity of the blocks may be calculated based on the sum of absolute differences (SAD) between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, the motion information may be derived based on the reference block with the smallest SAD in the search area. The derived motion information may be signaled to the decoding device according to various methods based on the inter-frame prediction mode.
[0178] The coding apparatus performs inter prediction based on the motion information for the current block (S920). The coding apparatus may derive a prediction sample for the current block based on the motion information. The current block including the prediction sample may be referred to as a prediction block.
[0179] Fig.10 The hierarchical structure of the compiled image / video is shown exemplarily.
[0180] refer to Fig.10 The coded image / video is divided into the VCL (Video Coding Layer) which handles the image / video decoding process and itself, the subsystem that sends and stores the coding information, and the Network Abstraction Layer (NAL) which exists between the VCL and the subsystem and is responsible for the network adaptation function.
[0181] VCL can generate VCL data including compressed image data (slice data), or generate parameter sets including picture parameter sets (Picture Parameter Set: PPS), sequence parameter sets (Sequence Parameter Set: SPS), video parameter sets (Video Parameter Set: VPS), etc., or supplementary enhancement information (SEI) messages that are additionally required for the decoding process of the image.
[0182] In NAL, a NAL unit can be generated by adding header information (NAL unit header) to a raw byte sequence payload (RBSP) generated in the VCL. In this case, the RBSP refers to slice data, parameter sets, SEI messages, etc. generated in the VCL. The NAL unit header may include NAL unit type information specified according to the RBSP data included in the corresponding NAL unit.
[0183] As shown in the figure, the NAL unit can be divided into a VCL NAL unit and a non-VCL NAL unit according to the RBSP generated in the VCL. The VCL NAL unit may mean a NAL unit including information about the image (slice data), and the non-VCL NAL unit may mean a NAL unit containing information required for decoding the image (parameter set or SEI message).
[0184] The above-mentioned VCL NAL unit and non-VCL NAL unit can be sent through the network by adding header information according to the data standard of the subsystem. For example, the NAL unit can be converted into a data form of a predetermined standard, such as H.266 / VVC file format, real-time transport protocol (RTP), transport stream (TS), etc., and sent through various networks.
[0185] As described above, in a NAL unit, a NAL unit type may be specified according to an RBSP data structure included in a corresponding NAL unit, and information on the NAL unit type may be stored in a NAL unit header and signaled in the NAL unit header.
[0186] For example, NAL units may be roughly classified into VCL NAL unit types and non-VCL NAL unit types depending on whether the NAL unit includes information about an image (slice data). VCL NAL unit types may be classified according to the attributes and types of pictures included in the VCL NAL unit, and non-VCL NAL unit types may be classified according to the types of parameter sets.
[0187] The following are examples of NAL unit types specified according to the type of parameter sets included in a non-VCL NAL unit type.
[0188] -APS (Adaptation Parameter Set) NAL unit: the type of NAL unit that includes APS
[0189] -DPS (Decoding Parameter Set) NAL unit: the type of NAL unit that includes the DPS
[0190] -VPS (Video Parameter Set) NAL unit: the type of NAL unit that contains the VPS
[0191] -SPS (Sequence Parameter Set) NAL unit: the type of NAL unit that includes SPS
[0192] -PPS (Picture Parameter Set) NAL unit: the type of NAL unit that includes PPS
[0193] - PH (Picture Header) NAL unit: the type of NAL unit including PH
[0194] The above-mentioned NAL unit type has syntax information of the NAL unit type, and the syntax information may be stored and signaled in the NAL unit header. For example, the syntax information may be nal_unit_type, and the NAL unit type may be specified by the nal_unit_type value.
[0195] Meanwhile, as described above, a picture may include multiple slices, and a slice may include a slice header and slice data. In this case, a picture header may also be added to multiple slices (slice header and slice data set) in a picture. The picture header (picture header syntax) may include information / parameters generally applicable to pictures. In this document, a tiling group may be mixed with a slice or a picture or replaced with a slice or a picture. In addition, in this document, a tiling group header may be mixed with a slice header or a picture header or replaced with a slice header or a picture header.
[0196] A slice header (slice header syntax) may include information / parameters that are generally applicable to slices. APS (APS syntax) or PPS (PPS syntax) may include information / parameters that are generally applicable to one or more slices or pictures. SPS (SPS syntax) may include information / parameters that are generally applicable to one or more sequences. VPS (VPS syntax) may include information / parameters that are generally applicable to multiple layers. DPS (DPS syntax) may include information / parameters that are generally applicable to the entire video. DPS may include information / parameters related to the concatenation of a coded video sequence (CVS). In this document, a high-level syntax (HLS) may include at least one of the following: APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, picture header syntax, and slice header syntax.
[0197] In this document, the image / video information encoded in the encoding device and notified to the decoding device in the form of a bitstream may include, in addition to the picture segmentation related information in the picture, intra / inter prediction information, residual information, in-loop filtering information, etc., information included in the slice header, information included in the picture header, information included in the APS, information included in the PPS, information included in the SPS, information included in the VPS and / or information included in the DPS. In addition, the image / video information may also include information of the NAL unit header.
[0198] At the same time, in order to compensate for the difference between the original image and the reconstructed image due to errors occurring in the compression coding process such as quantization, an in-loop filtering process may be performed on the reconstructed sample or the reconstructed picture as described above. As described above, the in-loop filtering may be performed by a filter of an encoding device and a filter of a decoding device, and a deblocking filter, SAO and / or an adaptive loop filter (ALF) may be applied. For example, the ALF process may be performed after the deblocking filtering process and / or the SAO process are completed. However, even in this case, the deblocking filtering process and / or the SAO process may be omitted.
[0199] Fig.11 is a flow chart schematically illustrating an example of an ALF process. Figure 8 The ALF process disclosed in the can be executed in the encoding device and the decoding device. In this document, the encoding device may include the encoding device and / or the decoding device.
[0200] refer to Fig.11 , the coding device derives a filter for ALF (S1100). The filter may include filter coefficients. The coding device may determine whether to apply ALF, and when it is determined that ALF is applied, a filter including filter coefficients for ALF may be derived. The filter (coefficient) of ALF or information about the derivation of the filter (coefficient) of ALF may be referred to as ALF parameters. Information about whether ALF is applied (e.g., ALF availability flag) and ALF data for deriving the filter may be signaled from the coding device to the decoding device. The ALF data may include information for deriving the filter of ALF. In addition, for example, for hierarchical control of ALF, the ALF availability flag may be signaled at the SPS, picture header, slice header, and / or CTB level, respectively.
[0201] In order to derive the filter for ALF, the activity and / or directionality of the current block (or ALF target block) is derived, and the filter may be derived based on the activity and / or directionality. For example, the ALF process can be applied in units of 4×4 blocks (based on the luminance component). 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, the filter for ALF may be derived based on a first filter derived from information included in the ALF data and a predefined second filter, and the coding device may select one of the filters based on the activity and / or directionality. The coding device may use the filter coefficients included in the selected filter of the ALF.
[0202] The coding device performs filtering based on the filter (S1110). Modified reconstructed samples can be derived based on filtering. For example, filter coefficients in the filter can be arranged or assigned according to the filter shape, and filtering can be performed on the reconstructed samples in the current block. Here, the reconstructed samples in the current block can be reconstructed samples after the deblocking filter processing and the SAO processing are completed. For example, one filter shape can be used, or a filter shape selected from a plurality of predetermined filter shapes can be used. For example, the filter shape applied to the luminance component and the filter shape applied to the chrominance component can be different. For example, a 7×7 diamond filter shape can be used for the luminance component, and a 5×5 diamond filter shape can be used for the chrominance component.
[0203] Fig.12 An example of the shape of the ALF filter is shown.
[0204] Fig.12 (a) shows the shape of a 7×7 diamond filter, Figure 6 (b) shows the shape of a 5×5 diamond filter. Figure 6In the filter shape, Cn represents the filter coefficient. When n in Cn is the same, this indicates that the same filter coefficient can be assigned. In this document, the position and / or unit of assigning the filter coefficient according to the filter shape of the ALF may be referred to as a filter tap. In this case, one filter coefficient may be assigned to each filter tap, and the arrangement of the filter taps may correspond to the filter shape. The filter tap located at the center of the filter shape may be referred to as a center filter tap. The same filter coefficient may be assigned to two filter taps of the same n value, which exist at positions corresponding to each other relative to the center filter tap. For example, in the case of a 7×7 diamond filter shape, 25 filter taps are included, and since the filter coefficients C0 to C11 are assigned in a centrally symmetrical form, the filter coefficients may be assigned to the 25 filter taps using only 13 filter coefficients. In addition, for example, in the case of a 5×5 diamond filter shape, 13 filter taps are included, and since the filter coefficients C0 to C5 are assigned in a centrally symmetrical form, the filter coefficients may be assigned to the 13 filter taps using only 7 filter coefficients. For example, in order to reduce the data amount of information about the signaled filter coefficients, 12 filter coefficients out of 13 filter coefficients of a 7×7 diamond filter shape are (explicitly) signaled, and 1 filter coefficient can be (implicitly) derived. In addition, for example, 6 filter coefficients out of 7 filter coefficients of a 5×5 diamond filter shape can be (explicitly) signaled, and 1 filter coefficient can be (implicitly) derived.
[0205] According to an embodiment of this document, ALF parameters for an ALF process may be signaled through an adaptation parameter set (APS). The ALF parameters may be derived from filter information for ALF or ALF data.
[0206] ALF is an in-loop filtering technique that can be applied to image / video coding as described above. ALF can be performed using a Wiener-based adaptive filter. This can minimize the mean square error (MSE) between the original sample and the decoded sample (or reconstructed sample). The high-level design of the ALF tool can be incorporated into syntax elements accessible in the SPS and / or slice header (or mosaic group header).
[0207] Fig.13 An example of the hierarchical structure of ALF data is shown.
[0208] refer to Fig.13, a coded video sequence (CVS) may include an SPS, one or more PPSs, and subsequently one or more coded pictures. Each coded picture may be divided into a rectangular area. A rectangular area may be referred to as a mosaic. One or more mosaics may be aggregated to form a mosaic group or a slice. In this case, a mosaic group header may be linked to a PPS, and a PPS may be linked to an SPS. According to an existing method, ALF data (ALF parameters) are included in a mosaic group header. Considering that a video is composed of multiple pictures and a picture includes multiple mosaics, frequent ALF data (ALF parameters) signaling in units of mosaic groups reduces coding efficiency.
[0209] According to the embodiments proposed in this document, ALF parameters may be signaled by including in the APS as follows.
[0210] Fig.14 Another example of the hierarchical structure of ALF data is shown.
[0211] refer to Fig.14 , defines the APS, 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 parameters of the APS may include an APS ID. That is, in addition to the ALF data field, the APS may also include information indicating the APS ID. The patch group header or the slice header may refer to the APS using the APS index information. In other words, the patch group header or the slice header may include the APS index information, and the ALF process for the target block may be performed based on the ALF data (ALF parameters) included in the APS having the APS ID indicated by the APS index information. Here, the APS index information may be referred to as the APS ID information.
[0212] In addition, the SPS may include a flag that allows the use of ALF. For example, when the CVS starts, the SPS may be checked, and the flag may be checked in the SPS. For example, the SPS may include the syntax of Table 1 below. The syntax of Table 1 may be part of the SPS.
[0213] [Table 1]
[0214]
[0215] For example, the semantics of the syntax elements included in the syntax of Table 1 may be specified as shown in the following table.
[0216] [Table 2]
[0217]
[0218] That is, the sps_alf_enabled_flag syntax element may indicate whether the ALF is available based on whether the value is 0 or 1. The sps_alf_enabled_flag syntax element may be referred to as an ALF availability flag (which may be referred to as a first ALF availability flag) and may be included in the SPS. That is, the ALF availability flag may be signaled at the SPS (or SPS level). When the value of the ALF availability flag signaled by the SPS is 1, it may be determined that the ALF is basically available for pictures in the CVS referring to the SPS. Meanwhile, as described above, the ALF may be turned on / off separately by signaling an additional availability flag at a level lower than the SPS.
[0219] For example, if the ALF tool is available for CVS, an additional availability flag (which may be referred to as a second ALF availability flag) may be signaled in the tiling header or slice header. For example, when ALF is available at the SPS level, the second ALF availability flag may be parsed / signaled. If the value of the second ALF availability flag is 1, the ALF data may be parsed via the tiling header or slice header. For example, the second ALF availability flag may specify the ALF availability conditions for luma and chroma components. The ALF data may be accessed via the APS ID information.
[0220] [Table 3]
[0221]
[0222] [Table 4]
[0223]
[0224] For example, the semantics of the syntax elements included in the syntax of Table 3 or Table 4 may be specified as shown in the following table.
[0225] [Table 5]
[0226]
[0227] [Table 6]
[0228]
[0229]
[0230] The second ALF availability flag may include a tile_group_alf_enabled_flag syntax element or a slice_alf_enabled_flag syntax element.
[0231] Based on the APS ID information (eg, tile_group_aps_id syntax element or slice_aps_id syntax element), the APS referenced by the corresponding tile group or the corresponding slice may be identified. The APS may include ALF data.
[0232] Meanwhile, the structure of the APS including the ALF data may be described based on, for example, the following syntax and semantics. The syntax of Table 7 may be a part of the APS.
[0233] [Table 7]
[0234]
[0235] [Table 8]
[0236]
[0237]
[0238] As described above, the adaptation_parameter_set_id syntax element may indicate an identifier of a corresponding APS. That is, the APS may be identified based on the adaptation_parameter_set_id syntax element. The adaptation_parameter_set_id syntax element may be referred to as APS ID information. Also, the APS may include an ALF data field. The ALF data field may be parsed / signaled after the adaptation_parameter_set_id syntax element.
[0239] In addition, for example, an APS extension flag (e.g., an aps_extension_flag syntax element) may be parsed / signaled in the APS. The APS extension flag may indicate whether an APS extension data flag (aps_extension_data_flag) syntax element is present. The APS extension flag may be used, for example, to provide an extension point for later versions of the VVC standard.
[0240] The core processing / handling of the ALF information may be performed in a slice header or a tile group header. The ALF data field may include information about the processing of the ALF filter. For example, the information that may be extracted from the ALF data field includes information about the number of filters used, information indicating whether the ALF is applied only to the luma component, information about the color components and exponential Golomb (EG) parameters and / or information about delta values of filter coefficients, etc.
[0241] Meanwhile, the ALF data field may include, for example, the following ALF data syntax.
[0242] [Table 9]
[0243]
[0244] For example, the semantics of the syntax elements included in the syntax of Table 9 may be specified as shown in the following table.
[0245] [Table 10]
[0246]
[0247]
[0248]
[0249]
[0250]
[0251] For example, the parsing of ALF data through a tile group header or a slice header may be started by first parsing / signaling an alf_chroma_idc syntax element. The alf_chroma_idc syntax element may have a value ranging from 0 to 3. The value may indicate whether the ALF-based filtering process is applied only to the luma component or to a combination of the luma component and the chroma component. Once the availability (available parameters) of each component is determined, information about the number of luma (component) filters may be parsed. As an example, the maximum number of available filters may be set to 25. If the number of luma filters signaled is at least one, for each filter ranging from 0 to the maximum number of filters (e.g., 25, which may alternatively be referred to as a category), the filter index information may be parsed / signaled. This may imply that each category (i.e., from 0 to the maximum number of filters) is associated with a filter index. When the filter to be used for each category is marked based on the filter index, a flag (e.g., alf_luma_coeff_delta_flag) may be parsed / signaled. The flag may be used to interpret whether flag information related to the prediction of the ALF luma filter coefficient delta value (eg, alf_luma_coeff_delta_prediction_flag) is present in a slice header or a tile group header.
[0252] If the number of luma filters signaled by the alf_luma_num_filters_signalled_minus1 syntax element is greater than 0, and the value of the alf_luma_coeff_delta_flag syntax element is 0, it may mean that the alf_luma_coeff_delta_prediction_flag syntax element is present in the slice header or the patch group header, and its state may be evaluated. If the state of the alf_luma_coeff_delta_prediction_flag syntax element indicates 1, it may mean that the luma filter coefficients are predicted from previous luma (filter) coefficients. If the state of the alf_luma_coeff_delta_prediction_flag syntax element indicates 0, it may mean that the luma filter coefficients are not predicted from deltas of previous luma (filter) coefficients.
[0253] When the delta filter coefficients (e.g., alf_luma_coeff_delta_abs) are coded based on exponential Golomb codes, it may be necessary to determine the order k of the exponential Golomb (EG) code in order to decode the delta luma filter coefficients (e.g., alf_luma_coeff_delta_abs). This information may be needed to decode the filter coefficients. The order of the exponential Golomb code may be denoted as EG(k). To determine EG(k), the alf_luma_min_eg_order_minus1 syntax element may be parsed / signaled. The alf_luma_min_eg_order_minus1 syntax element may be an entropy coded syntax element. The alf_luma_min_eg_order_minus1 syntax element may indicate the minimum order of EG for decoding delta luma filter coefficients. For example, the value of the alf_luma_min_eg_order_minus1 syntax element may be in the range of 0 to 6. After parsing / signaling the alf_luma_min_eg_order_minus1 syntax element, the alf_luma_eg_order_increase_flag syntax element may be parsed / signaled. If the value of the alf_luma_eg_order_increase_flag syntax element is 1, this indicates that the order of the EG indicated by the alf_luma_min_eg_order_minus1 syntax element is increased by 1. If the value of the alf_luma_eg_order_increase_flag syntax element is 0, this indicates that the order of the EG indicated by the alf_luma_min_eg_order_minus1 syntax element is not increased. The order of the EG may be represented by the index of the EG. For example, the EG order (or EG index) based on the alf_luma_min_eg_order_minus1 syntax element and the alf_luma_eg_order_increase_flag syntax element (related to the luma component) may be determined as follows.
[0254] [Table 11]
[0255]
[0256] Based on the above determination process, expGoderY can be derived as xpGoderY=KminTab. In this way, an array including EG orders can be derived, which can be used by a decoding device. expGoOrderY can indicate an EG order (or EG index).
[0257] There may be a predefined Golomb order index (ie, golombOrderIdxY). The predefined Golomb order may be used to determine the final Golomb order for coding the coefficients.
[0258] For example, the predefined Golomb order may be configured, for example, as in the following table.
[0259] golombOrderIdxY[]={0, 0, 1, 0, 1, 2, 1, 0, 0, 1, 2}
[0260] Here, the order k=expGoderY[GolombOrderIdxY[j]], and j can be indicated as the jth signaled filter coefficient. For example, if j=2, that is, the third filter coefficient golomborderIdxY[2]=1, then k=expGoderY[1].
[0261] In this case, for example, if the value of the alf_luma_coeff_delta_flag syntax element indicates true, ie 1, then for each filter that is signaled, an alf_luma_coeff_flag syntax element may be signaled. The alf_luma_coeff_flag syntax element indicates whether the luma filter coefficients are (explicitly) signaled.
[0262] When the EG order and the state of the above-mentioned related flags (e.g., alf_luma_coeff_delta_flag, alf_luma_coeff_flag, etc.) are determined, the difference information and sign information of the luma filter coefficient may be parsed / signaled (i.e., when alf_luma_coeff_flag indicates true). The delta absolute value information of each of the 12 filter coefficients may be parsed / signaled (alf_luma_coeff_delta_abs syntax element). In addition, if the alf_luma_coeff_delta_abs syntax element has a value, the sign information (alf_luma_coeff_delta_sign syntax element) may be parsed / signaled. Information including the difference information and sign information of the luma filter coefficient may be referred to as information about the luma filter coefficient.
[0263] The increment of the filter coefficient may be determined and stored with the sign. In this case, the increment of the filter coefficient with the sign may be stored in the form of an array, which may be denoted as filterCoefficient. The increment of the filter coefficient may be referred to as the incremental brightness coefficient, and the increment of the filter coefficient with the sign may be referred to as the incremental brightness coefficient with the sign.
[0264] To determine the final filter coefficients from the signed delta-luminance coefficients, the (luminance) filter coefficients may be updated as follows.
[0265] filterCoefficients[sigFiltIdx][j]+=filterCoefficients[sigFiltIdx][j]
[0266] Here, j may indicate a filter coefficient index, and sigFiltIdx may indicate a signaled filter index. j={0, ..., 11} and sigFiltIdx={0, ..., alf_luma_filters_signaled_minus1}.
[0267] The coefficients can be copied into the final AlfCoeffl[filtIdx][j]. Here, filtidx=0,...,24, and j=0,...,11.
[0268] The signed delta-luminance coefficient for a given filter index may be used to determine the first 12 filter coefficients. For example, the thirteenth filter coefficient for a 7×7 filter may be determined based on the following equation. The thirteenth filter coefficient may represent the center-tap filter coefficient described above.
[0269] [Equation 1]
[0270] Alf Coeff L [filtIdx][12=128-∑ k Alf Coeff L [filtIdx][k]《1
[0271] Here, the filter coefficient index 12 may indicate the thirteenth filter coefficient. For reference, since the filter coefficient index starts from 0, the value 12 may indicate the thirteenth filter coefficient.
[0272] For example, to ensure bitstream consistency, when k is 0, ..., 11, the value of the final filter coefficient AlfCoeffl[filtIdx][k] ranges from -2 7 To 2 7 -1, and when k is 12, it can range from 0 to 2 8 -1. Here, k can be replaced by j.
[0273] If processing for luma components is performed, processing for chroma components may be performed based on the alf_chroma_idc syntax element. If the value of the alf_chroma_idc syntax element is greater than 0, minimum EG order information for chroma components (e.g., alf_chroma_min_eg_order_minus1 syntax element) may be parsed / signaled. According to the above-described embodiment of the present document, a 5×5 diamond filter shape may be used for chroma components, and in this case, the maximum Golomb index may be 2. In this case, the EG order (or EG index) of the chroma component may be determined, for example, as follows.
[0274] [Table 12]
[0275]
[0276] Based on the determination process, expGoOrderC may be derived as expGoOrderC=KminTab. Thus, an array containing EG orders that can be used by the decoding apparatus can be derived. expGoOrderC may indicate the EG order (or EG index) of the chroma component.
[0277] There may be a predefined (predefined) Golomb order index (golombOrderIdxC). The predefined Golomb order may be used to determine the final Golomb order used to code the coefficients.
[0278] For example, the predefined Golomb order may be configured, for example, as in the following table.
[0279] golombOrderIdxC[]={0, 0, 1, 0, 0, 1}
[0280] Here, the order k=expGoOrderC[golombOrderIdxC[j]], and j may represent the jth signaled filter coefficient. For example, if j=2, ie, the third filter coefficient golomboorderIdxY[2]=1, then k=expGoOrderC[1].
[0281] Based on this, the absolute value information and sign information of the chroma filter coefficient can be parsed / signaled. Information including the absolute value information and sign information of the chroma filter coefficient can be referred to as information about the chroma filter coefficient. For example, a 5×5 diamond filter shape can be applied to the chroma component, and in this case, the absolute increment information (alf_chroma_coeff_abs syntax element) of each of the six (chroma component) filter coefficients can be parsed / signaled. In addition, if the value of the alf_chroma_coeff_abs syntax element is greater than 0, the sign information (alf_chroma_coeff_abs syntax element) can be parsed / signaled. For example, six chroma filter coefficients can be derived based on the information about the chroma filter coefficient. In this case, for example, the seventh chroma filter coefficient can be determined based on the following equation. The seventh filter coefficient can represent the above-mentioned center tap filter coefficient.
[0282] [Equation 2]
[0283] AlfCoeffC[6]=128-∑ k Alf Coeff C [filtIdx][k]<<1
[0284] Here, the filter coefficient index 6 may indicate the seventh filter coefficient. For reference, since the filter coefficient index starts from 0, the value 6 may indicate the seventh filter coefficient.
[0285] For example, to ensure bitstream consistency), when k is 0, ..., 5, the value of the final filter coefficient AlfCoeffc[filtIdx][k] ranges from -2 7 To 2 7 -1, and when k is 6, it can range from 0 to 2 8 -1. Here, k can be replaced by j.
[0286] If (luminance / chrominance) filter coefficients are derived, ALF-based filtering can be performed based on the filter coefficients or filters including the filter coefficients. As described above, modified reconstructed samples can be derived in this way. In addition, multiple filters can be derived, and the filter coefficients of one of the multiple filters can be used for the ALF process. As an example, one of the multiple filters can be indicated based on filter selection information notified by signaling. Alternatively, for example, one of the multiple filters can be selected based on the activity and / or directionality of the current block or the ALF target block, and the filter coefficients of the selected filter can be used for the ALF process.
[0287] Meanwhile, as described above, Luma Mapping and Chroma Scaling (LMCS) may be applied to improve coding efficiency. LMCS may be referred to as a loop shaper (shaping). In order to increase coding efficiency, signaling of LMCS control and / or LMCS-related information may be performed hierarchically.
[0288] Fig.15 The hierarchical structure of the CVS according to the embodiment of the present document is exemplarily shown. A coded video sequence (CVS) may include a sequence parameter set (SPS), a picture parameter set (PPS), a tiling group header, tiling data and / or a CTU. Here, the tiling group header and the tiling data may be referred to as a slice header and slice data, respectively.
[0289] The SPS may originally include a flag for enabling tools to enable them to be used in the CVS. In addition, the SPS may be referenced by a PPS including information about parameters that change for each picture. Each of the coded pictures may include one or more tiles of a coded rectangular domain. The tiles may be grouped to form a tile group raster scan. Each tile group is encapsulated with header information called a tile group header. Each tile consists of a CTU containing coded data. Here, the data may include original sample values, predicted sample values, and their brightness and chrominance components (brightness predicted sample values and chrominance predicted sample values).
[0290] Fig.16 An exemplary LMCS structure according to an embodiment of this document is shown. Fig.16 The LMCS structure 1600 may include an in-loop mapping portion 1610 for luma components based on an adaptive piecewise linear (adaptive PWL) model and a luma-dependent chroma residual scaling portion 1620 for chroma components. The blocks of dequantization and inverse transformation 1611, reconstruction 1612, and intra prediction 1613 of the in-loop mapping portion 1610 represent the processing applied in the mapped (shaped) domain. The blocks of loop filter 1615, motion compensation or inter prediction 1617 of the in-loop mapping portion 1610, and the blocks of reconstruction 1622, intra prediction 1623, motion compensation or inter prediction 1624, and loop filter 1625 of the chroma residual scaling portion 1620 represent the processing applied in the original (non-mapped, non-shaped) domain.
[0291] like Fig.16As shown, when LMCS is enabled, at least one of an inverse shaping (mapping) process 1614, a forward shaping (mapping) process 1618, and a chroma scaling process 1621 may be applied. For example, the inverse shaping process may be applied to a (reconstructed) luma sample (or multiple luma samples or a luma sample array) of a reconstructed picture. The inverse shaping process may be performed based on a piecewise function (inverse) index of the luma sample. The piecewise function (inverse) index may identify the segment (or portion) to which the luma sample belongs. The output of the inverse shaping process is a modified (reconstructed) luma sample (or multiple modified luma samples or a modified luma sample array). LMCS may be enabled or disabled at a tile group (or slice), picture, or higher level.
[0292] A forward shaping process and / or a chroma scaling process may be applied to generate a reconstructed picture. A picture may include 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 chroma picture. A combination of a reconstructed luma picture and a reconstructed chroma picture may be referred to as a reconstructed picture. A reconstructed luma picture may be generated based on a forward shaping process. For example, if inter prediction is applied to a current block, forward shaping is applied to luma prediction samples derived based on (reconstructed) luma samples of a reference picture. Since the (reconstructed) luma samples of the reference picture are generated based on an inverse shaping process, forward shaping may be applied to the luma prediction samples to derive shaped (mapped) luma prediction samples. A forward shaping process may be performed based on a piecewise function index of the luma prediction samples. The piecewise function index may be derived based on a value of a luma prediction sample of a reference picture used for inter prediction or a value of a luma sample. A reconstructed sample may be generated based on the (shaped / mapped) luma prediction sample. An inverse shaping (mapping) process may be applied to the reconstructed sample. Reconstructed samples to which the inverse shaping (mapping) process has been applied may be referred to as inverse shaped (mapped) reconstructed samples. In addition, inverse shaped (mapped) reconstructed samples may be simply referred to as shaped (mapped) reconstructed samples. When intra prediction (or intra block copy (IBC)) is applied to the current block, forward mapping of the prediction samples of the current block may not be required because the inverse shaping process has not yet been applied to the reconstructed samples with reference to the current picture. In a reconstructed luma picture, luma samples may be generated (reconstructed) based on the (shaped) luma prediction samples and the corresponding luma residual samples.
[0293] A reconstructed chroma picture may be generated based on a chroma scaling process. For example, a reconstructed chroma picture may be generated based on chroma prediction samples and chroma residual samples (c res ) to derive the (reconstructed) chroma samples in the reconstructed chroma picture. Based on the (scaled) chroma residual samples (c resScale ) and the chroma residual scaling factor (cScaleInv can be called varScale) to derive the chroma residual samples (c resThe chroma residual scaling factor may be calculated based on the shaped luma prediction sample value in the current block. For example, the chroma residual scaling factor may be calculated based on the shaped luma prediction sample value (Y' pred )'s average brightness value (ave(Y' pred )) to calculate the scaling factor. For reference, based on Fig.16 The (scaled) chroma residual samples derived by the inverse transform / dequantization in may be referred to as c rescale , and the chroma residual samples derived by performing the (inverse) scaling process on the (scaled) chroma residual samples may be referred to as c res .
[0294] Fig.17 The LMCS structure according to another embodiment of this document is shown. Fig.16 describe Fig.17 Here, we will mainly describe Fig.17 The LMCS structure and Fig.16 The difference between the LMCS structures. Fig.17 The in-loop mapping part and the luminance-dependent chrominance residual scaling part can be compared with Fig.16 The in-loop mapping part and the luma-dependent chroma residual scaling part operate in the same way.
[0295] refer to Fig.17 , the chroma residual scaling factor can be derived based on the luma reconstruction samples. In this case, the average luma value (avgY) can be obtained based on the adjacent luma reconstruction samples outside the reconstruction block instead of the luma reconstruction samples inside the reconstruction block. r ), and can be based on the average brightness value (avgY r ) to derive the chroma residual scaling factor. Here, the adjacent luma reconstruction samples may be adjacent luma reconstruction samples of the current block, or may be adjacent luma reconstruction samples of a virtual pipeline data unit (VPDU) including the current block. For example, when intra prediction is applied to the target block, the reconstructed samples may be derived based on prediction samples, wherein the prediction samples are derived based on the intra prediction. In addition, for example, when inter prediction is applied to the target block, forward mapping is applied to the prediction samples derived based on the inter prediction, and the reconstructed samples may be generated based on the shaped (or forward mapped) luma prediction samples.
[0296] The motion picture / image information signaled by the bitstream may include LMCS parameters (information about LMCS). The LMCS parameters may be configured as high-level syntax (HLS, including slice header syntax), etc. A detailed description of the LMCS parameters and configuration will be described later. As described above, the syntax table described in this document (and the following embodiments) may be constructed / encoded on the encoder (encoding device) side and signaled to the decoder (decoding device) via the bitstream. The decoder may parse / decode the information about LMCS in the syntax table (in the form of syntax components). One or more embodiments described below may be combined. The encoder may encode the current image based on the information about LMCS, and the decoder may decode the current image based on the information about LMCS.
[0297] The in-loop mapping of the luminance component can adjust the dynamic range of the input signal to improve compression efficiency by redistributing codewords across the dynamic range. For luminance mapping, a forward mapping (shaping) function (FwdMap) and an inverse mapping (shaping) function (InvMap) corresponding to the forward mapping function (FwdMap) can be used. The forward mapping function (FwdMap) can be signaled using a partial linear model, for example, the partial linear model can have 16 segments or bins. These segments can have the same length. In one example, the inverse mapping function (InvMap) may not be signaled separately, but can be derived from the forward mapping function (FwdMap). That is, the inverse mapping can be a function of the forward mapping. For example, the inverse mapping function can be a function in which the forward mapping function is symmetric based on y=x.
[0298] In-loop (luminance) shaping can be used to map input luminance values (samples) to changed values in the shaping domain. After reconstruction, the shaped values can be encoded and mapped back to the original (unmapped, unshaped) domain. Chroma residual scaling can be applied to compensate for the difference between the luminance signal and the chrominance signal. In-loop shaping can be performed by specifying a high-level syntax for the shaper model. The shaper model syntax can signal a partial linear model (PWL model). A forward lookup table (FwLUT) and / or an inverse lookup table (InvLUT) can be derived based on the partial linear model. As an example, when the forward lookup table FwLUT is derived, the inverse lookup table InvLUT can be derived based on the forward lookup table FwLUT. The forward lookup table FwLUT can map the input luminance value Yi to the changed value Yr, and the inverse lookup table InvLUT can map the reconstructed value Yr to the reconstructed value Y'i based on the changed value.
[0299] In one example, the SPS may include the syntax of Table 13 below. The syntax of Table 13 may include sps_reshaper_enabled_flag as a tool enable flag. Here, sps_reshaper_enabled_flag may be used to specify whether a reshaper is used in a coded video sequence (CVS). That is, sps_reshaper_enabled_flag may be a flag for enabling reshaping in the SPS. In one example, the syntax of Table 13 may be part of the SPS.
[0300] [Table 13]
[0301]
[0302] In one example, the semantics that may be indicated by sps_seq_parameter_set_id and sps_reshaper_enabled_flag may be as shown in Table 14 below.
[0303] [Table 14]
[0304]
[0305] In one example, the tile group header or the slice header may include the syntax of Table 15 or Table 16 below.
[0306] [Table 15]
[0307]
[0308] [Table 16]
[0309]
[0310] The semantics of the syntax elements included in the syntax of Table 15 or Table 16 may include, for example, the contents disclosed in the following table.
[0311] [Table 17]
[0312]
[0313] [Table 18]
[0314]
[0315]
[0316] As an example, if sps_reshaper_enabled_flag is parsed, additional data (e.g., information included in Table 15 or 16 above) for configuring the lookup tables (FwdLUT and / or InvLUT) may be parsed in the tile group header. To this end, the state of the SPS reshaper flag may be checked in the slice header or the tile group header. When sps_reshaper_enabled_flag is true (or 1), the additional flag tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) may be parsed. The purpose of tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) may be to indicate the presence of a reshaper model. For example, when tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) is true (or 1), it may indicate that a reshaper is present for the current tile group (or current slice). When tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) is false (or 0), it may indicate that no reshaper exists for the current tile group (or current slice).
[0317] If a reshaper exists in the current tile group (or current slice) and is enabled, a reshaper model may be processed (e.g., tile_group_reshaper_model() or slice_reshaper_model()), and tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) may be parsed in addition to additional flags. The tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) may indicate whether the reshaper model is used for the current tile group (or current slice). For example, if tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) is 0 (or false), it may indicate that the reshaper model is not used for the current tile group (or current slice). If tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) is 1 (or true), it may indicate that the reshaper model is used for the current tile group (or current slice).
[0318] As an example, for example, tile_group_reshaper_model_present_flag (or slice_reshaper_model_present_flag) may be true (or 1), and tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) may be false (or 0). This means that the reshaper model is present but not used in the current tile group (or current slice). In this case, the reshaper model may be used in the following tile groups (or slices). As another example, tile_group_reshaper_enable_flag may be true (or 1) and tile_group_reshaper_model_present_flag may be false (or 0).
[0319] When parsing the reshaper model (e.g., tile_group_reshaper_model() or slice_reshaper_model()) and tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag), it may be determined (evaluated) whether there are conditions required for chroma scaling. The above conditions may include condition 1 (the current tile group / slice is not intra-coded) and / or condition 2 (the current tile group / slice is not divided into two separate coded quadtree structures for luma and chroma, i.e., the current tile group / slice is not a binary tree structure). If condition 1 and / or condition 2 are true and / or tile_group_reshaper_enable_flag (or slice_reshaper_enable_flag) is true (or 1), tile_group_reshaper_chroma_residual_scale_flag (or slice_reshaper_chroma_residual_scale_flag) may be parsed. When tile_group_reshaper_chroma_residual_scale_flag (or slice_reshaper_chroma_residual_scale_flag) is enabled (if 1 or true), it may indicate that chroma residual scaling is enabled for the current tile group (or current slice). When tile_group_reshaper_chroma_residual_scale_flag (or slice_reshaper_chroma_residual_scale_flag) is disabled (if 0 or false), it may indicate that chroma residual scaling is disabled for the current tile group (or current slice).
[0320] The purpose of the above shaping is to parse the data required to construct the lookup table (FwdLUT and / or InvLUT). In an example, the lookup table constructed based on the parsed data can divide the distribution of the allowable brightness value range into multiple bins (e.g., 16). Therefore, the brightness value in a given bin can be mapped to a changed brightness value.
[0321] Fig.18 A diagram showing an exemplary forward mapping is shown. Fig.12 In FIG. 5 , five bins are shown by way of example only.
[0322] refer to Fig.18, the x-axis represents the input luma value, and the y-axis represents the changed output luma value. The x-axis is divided into 5 bins or segments, each bin having a length of L, i.e., the five bins mapped to the changed luma value have the same length. The forward lookup table (FwdLUT) may be constructed using data available in the tile group header (e.g., shaper data) from which the mapping is facilitated.
[0323] In an embodiment, an output pivot point associated with a bin index may be calculated. The output pivot point may set (mark) the minimum and maximum boundaries of the output range of the brightness codeword shaping. The process of calculating the output pivot point may be performed based on a piecewise cumulative distribution function of the number of codewords. The output pivot range may be divided based on the maximum number of bins to be used and the size of the lookup table (FwdLUT or InvLUT). As an example, the output pivot range may be divided based on the product between the maximum number of bins and the size of the lookup table. For example, if the product between the maximum number of bins and the size of the lookup table is 1024, the output pivot range may be divided into 1024 entries. The division of the output pivot range may be performed (applied or implemented) based on (using) a scaling factor. In one example, the scaling factor may be derived based on equation 3 below.
[0324] [Equation 3]
[0325] SF=(y2-y1)*(1<<FP_PREC)+c
[0326] In Equation 3, SF represents a scaling factor, and y1 and y2 represent output pivot points corresponding to respective bins. In addition, FP_PREC and c may be predetermined constants. The scaling factor determined based on Equation 3 may be referred to as a scaling factor for forward shaping.
[0327] In another embodiment, for inverse shaping (inverse mapping), for a defined range of bins (e.g., reshaper_model_min_bin_idx to reshaper_model_max_bin_idx), the input shaping pivot point corresponding to the mapped pivot point of the forward lookup table (FwdLUT) and the mapped inverse output pivot point (given as the initial codeword number * bin index) are obtained. In another example, the scaling factor SF may be derived based on the following equation 4.
[0328] [Equation 4]
[0329] SF = (y2-y1) * (1 << FP_PREC) / (x2-x1) In Equation 4, SF represents a scaling factor, x1 and x2 represent input pivot points, and y1 and y2 represent output pivot points corresponding to each bin. Here, the input pivot point may be a pivot point mapped based on a forward lookup table (FwdLUT), and the output pivot point may be a pivot point reversely mapped based on an inverse lookup table (InvLUT). In addition, FP_PREC may be a predetermined constant. The FP_PREC of Equation 4 may be the same as or different from the FP_PREC of Equation 3, and the scaling factor determined based on Equation 4 may be referred to as a scaling factor for inverse shaping. During inverse shaping, a partitioning of the input pivot point may be performed based on the scaling factor of Equation 4, and based on the partitioned input pivot point, pivot values corresponding to minimum and maximum bin values of bin indices from 0 to a minimum bin index (reshaper_model_min_bin_idx) and / or from a minimum bin index (reshaper_model_min_bin_idx) to a maximum bin index (reshaper_model_max_bin_idx) are specified.
[0330] Table 19 below shows the syntax of the shaper model according to an embodiment. The shaper model may be referred to as a LMCS model. Here, the shaper model is exemplarily described as a tile group shaper, but the present specification is not necessarily limited to this embodiment. For example, the shaper model may be included in the APS, or the tile group shaper model may be referred to as a slice shaper model.
[0331] [Table 19]
[0332]
[0333] The semantics of the syntax elements included in the syntax of Table 19 may include, for example, the contents disclosed in the following table.
[0334] [Table 20]
[0335]
[0336] The reshape model includes components such as 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. Each component will be described in detail below.
[0337] reshape_model_min_bin_idx indicates the minimum bin (or segment) index used during the reshaper configuration process. The value of reshape_model_min_bin_idx can be in the range of 0 to MaxBinIdx. For example, MaxBinIdx can be 15.
[0338] In an embodiment, the patch group shaper model may preferably parse two indices (or parameters),
[0339] That is, reshaper_model_min_bin_idx and reshaper_model_delta_max_bin_idx. The maximum bin index (reshaper_model_max_bin_idx) may be derived (determined) based on these two indexes. reshaper_model_delta_max_bin_idx may represent the maximum bin index MaxBinIdx allowed minus the actual maximum bin index (reshaper_model_max_bin_idx) used in the shaper configuration process.
[0340] The value of the maximum bin index (reshaper_model_max_bin_idx) may be in the range from 0 to MaxBinIdx. For example, MaxBinIdx may be 15. As an example, the value of reshaper_model_max_bin_idx may be derived based on Equation 5 below.
[0341] [Equation 5]
[0342] reshape_model_max_bin_idx=MaxBinldx-reshape_model_delta_max_bin_idx.
[0343] The maximum bin index (reshaper_model_max_bin_idx) can be greater than or equal to the minimum bin
[0344] Index (reshaper_model_min_bin_idx). The minimum bin index can be called the minimum allowed bin
[0345] The index or the minimum bin index allowed, and the maximum bin index may also be referred to as the maximum allowed bin index or the maximum bin index allowed.
[0346] If the maximum bin index (reshaper_model_max_bin_idx) is derived, the syntax element reshaper_model_bin_delta_abs_cw_prec_minus1 may be parsed. The number of bits used to represent the syntax reshape_model_bin_delta_abs_CW[i] may be determined based on reshaper_model_bin_delta_abs_cw_prec_minus1. For example, the number of bits used to represent reshape_model_bin_delta_abs_CW[i] may be the same as reshaper_model_bin_delta_abs_cw_prec_minus1 plus 1.
[0347] 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. 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. The 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 positive. 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 negative. If reshaper_model_bin_delta_sign_CW_flag[i] is not present, it may be inferred to be 0 (or false).
[0348] In an embodiment, the variable RspDeltaCW[i] may be derived based on the above reshape_model_bin_delta_abs_CW[i] and reshape_model_bin_delta_sign_CW_flag[i]. RspDeltaCW[i] may be referred to as the value of the delta codeword. For example, RspDeltaCW[i] may be derived based on the following equation 6.
[0349] [Equation 6]
[0350] RspDeltaCW[i] = (1 - 2 * reshape_model_bin_delta_sign_CW[i]) * reshape_model_bin_delta_abs_CW[i]
[0351] In Equation 6, reshape_model_bin_delta_sign_CW[i] can be information related to the sign of RspDeltaCW[i]. For example, reshape_model_bin_delta_sign_CW[i] can be the same as the above-mentioned reshaper_model_bin_delta_sign_CW_flag[i]. Here, i can range from the minimum bin index (reshaper_model_min_bin_idx) to the maximum bin index (reshape_model_max_bin_idx).
[0352] The variable (or array) RspCW[i] can be derived based on RspDeltaCW[i]. Here, RspCW[i] can represent the number of codewords assigned (distributed) to the i-th bin. That is, the number of codewords assigned (distributed) to each bin can be stored in array form. In one example, if i is less than the above-mentioned reshaper_model_min_bin_idx or greater than reshaper_model_max_bin_idx, (i < reshaper_model_min_bin_idx or reshaper_model_max_bin_idx < i), then RspCW[i] can be 0. Otherwise (if i is greater than or equal to the above-mentioned reshaper_model_min_bin_idx and less than or equal to reshaper_model_max_bin_idx, (reshaper_model_min_bin_idx <= i <= reshaper_model_max_bin_idx)), then RspCW[i] can be derived based on the above-mentioned RspDeltaCW[i], the luminance bit depth (BitDepthsy), and / or MaxBinIdx. In this case, for example, RspCW[i] can be derived based on the following Equation 7.
[0353] [Equation 7]
[0354] RspCW[i] = OrgCW + RspDeltaCW[i]
[0355] In Equation 7, OrgCW may be a predetermined value, for example, may be determined based on Equation 8 below.
[0356] [Equation 8]
[0357] OrgCW=(1<<BitDepthY) / (MaxBinldx+1)
[0358] In Equation 8, BitDepthY is the luma bit depth, and MaxBinIdx represents the maximum allowable bin index. In one example, if BitDepthY is 10, RspCW[i] can have values from 32 to 2*OrgCW-1.
[0359] The variable InputPivot[i] may be derived based on the above-mentioned OrgCW. For example, InputPivot[i] may be derived based on the following equation 9.
[0360] [Equation 9]
[0361] InputPivot[i]=i*OrgCW
[0362] The variables ReshapePivot[i], ScaleCoef[i] and / or InvScaleCoeff[i] can be derived based on the above-mentioned RspCW[i], InputPivot[i] and / or OrgCW, for example, ReshapePivot[i], ScaleCoef[i] and / or InvScaleCoeff[i] can be derived based on the following Table 21.
[0363] [Table 21]
[0364]
[0365] In Table 21, a for loop syntax may be used, where i increases from 0 to MaxBinIdx, 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 depending on whether RspCW[i] is 0.
[0366] ChromaScaleCoef[i] used to derive the chroma residual scaling factor can be derived based on the following Table 22.
[0367] [Table 22]
[0368]
[0369] In Table 22, ShiftC may be a predetermined constant for bit shifting. Referring to Table 22, whether ChromaScaleCoef[i] is derived based on the array ChromaResidualScalLut may be determined based on a conditional clause according to whether RspCW[i] is 0. Here, ChromaResidualScalLut may be a predetermined array. However, the ChromaResidualScalLeLut array is merely exemplary, and the present embodiment is not necessarily limited to Table 22.
[0370] The method for deriving the i-th variable has been described above. The i+1-th variable may be based on ReshapePivot[i+1], and for example, ReshapePivot[i+1] may be derived based on Equation 10.
[0371] [Equation 10]
[0372] ReshapePivot[i+1]=ReshapePivot[i]+RspCW[i]
[0373] In equation 10, RspCW[i] may be derived based on equations 7 and / or 8 above. Luma mapping may be performed based on the above embodiments and examples, and the above syntax and components included therein may be merely exemplary representations, and the embodiments are not limited to the above tables or equations. Hereinafter, a method for performing chroma residual scaling (scaling of chroma components of residual samples) based on luma mapping will be described.
[0374] (Lumence-dependent) chroma residual scaling is to compensate for the difference between luma samples and corresponding chroma samples. For example, whether chroma residual scaling is enabled may be signaled at the tile group level or the slice level. In one example, if luma mapping is enabled and dual-tree partitioning is not applied to the current tile group, an additional flag may be signaled to indicate whether luma-dependent chroma residual scaling is enabled. In another example, if luma mapping is not used, or if dual-tree partitioning is not used for the current tile group, luma-dependent chroma residual scaling may be disabled. In another example, chroma residual scaling may be always disabled for chroma blocks having a size less than or equal to 4.
[0375] Chroma residual scaling may be performed based on an average luminance value of a reference sample. For example, the reference sample may include samples of a corresponding luminance prediction block (luminance component of a prediction block to which intra prediction and / or inter prediction is applied). When inter prediction is applied, the reference sample may include samples after forward mapping is applied to the luminance component prediction sample. Alternatively, the reference sample may include neighboring samples of the current block or neighboring samples of a VPDU including the current block. In this case, when inter prediction is applied to a neighboring block including neighboring samples, the neighboring samples may include luminance component reconstructed samples derived based on luminance component prediction samples to which forward mapping of the neighboring block is applied. The scaling operation on the encoder side and / or the decoder side may be implemented as a fixed-point integer calculation, for example, based on the following equation 11.
[0376] [Equation 11]
[0377] c'=sign(c)*((abs(c)*s+2CSCALE_EP_PREC-1)>>CSCALE_EP_PREC)
[0378] In the above Equation 11, c' represents a scaled chroma residual sample (a scaled chroma component of the residual sample), c represents a chroma residual sample (a chroma component of the residual sample), s may represent a chroma residual scaling factor, and CSCALE_FP_PREC may represent a predetermined constant.
[0379] As described above, the average luma value of the reference sample may be obtained, and the chroma residual scaling factor may be derived based on the average luma value. As described above, the chroma component residual samples may be scaled based on the chroma residual scaling factor, and the chroma component reconstructed samples may be generated based on the scaled chroma component residual samples.
[0380] An embodiment of the present document proposes a signaling structure for effectively applying the above-mentioned ALF and / or LMCS. According to an embodiment of the present document, for example, ALF data and / or LMCS data may be included in an HLS (e.g., APS), and by signaling a reference APS ID via lower-level header information (e.g., picture header, slice header) as an APS, a filter for an ALF and / or LMCS model (shaper model) may be adaptively derived. The LMCS model may be derived based on LMCS parameters. In addition, for example, multiple APS IDs may be signaled via header information, and in this way, different ALF and / or LMCS models may be applied in units of blocks within the same picture / slice.
[0381] For example, according to an embodiment of the present document, an APS may carry ALF data and / or LMCS data. In this case, whether the corresponding APS carries ALF data or LMCS data may be indicated by APS type information (e.g., aps_params_type syntax element). As described above, LMCS data may be mixed or referred to as shaper data, and may carry LMCS / shaper parameters for deriving a LMCS / shaper model. In this case, a plurality of APSs may be signaled, a first APS may carry ALF data, and a second APS may carry LMCS (shaper) data. The first APS and the second APS may be identified at a lower level (e.g., header information, CTU or CU, etc.) based on an APS ID.
[0382] For example, the following table shows an example of an APS according to one embodiment.
[0383] [Table 23]
[0384]
[0385] Referring to Table 23, as an example, APS type information (e.g., aps_params_type) may be parsed / signaled in APS. APS type information may be referred to as APS parameter type information. APS type information may indicate whether the corresponding APS carries ALF data or LMCS data. As an example, APS type information may be parsed / signaled after adaptation_parameter_set_id.
[0386] For example, aps_params_type, ALF_APS, and LMCS_APS included in Table 23 may be described according to the following table. That is, ALF_APS determined according to aps_params_type may indicate an APS carrying ALF data, and LMCS_APS may indicate an APS carrying LMCS data.
[0387] [Table 24]
[0388]
[0389] Referring to Table 24, for example, the APS type information (aps_params_type) may be a syntax element for classifying the type of the corresponding APS. When the value of the APS type information (aps_params_type) is 0, the type of the corresponding APS may be ALF_APS, the corresponding APS may carry ALF data, and the ALF data may include ALF parameters for deriving filters / filter coefficients. When the value of the APS type information (aps_params_type) is 1, the type of the corresponding APS may be LMCS_APS, the corresponding APS may carry LMCS data, and the LMCS data may include LMCS parameters for deriving LMCS models / bin / mapping indexes.
[0390] In addition, for example, as described above, the ALF data or LMCS data included in the APS can be accessed through the header information. In this way, filters for ALF and / or LMCS models can be adaptively derived in units of images / slices / CTUs / CUs, etc. In addition, multiple APS IDs can be signaled for the header information, and through this, different ALF and / or LMCS models can be applied in units of blocks within the same picture / slice.
[0391] For example, the following table shows an example of header information according to an embodiment. The header information may include a slice header and / or a picture header.
[0392] [Table 25]
[0393]
[0394] [Table 26]
[0395]
[0396] The semantics of the syntax elements included in the syntax of Tables 25 and 26 may include, for example, the contents disclosed in the following table.
[0397] [Table 27]
[0398]
[0399]
[0400] [Table 28]
[0401]
[0402]
[0403] For example, referring to Table 23 to Table 28, the header information may include ALF related information. The ALF related information includes an ALF availability flag (e.g., a slice_ALF_enabled_flag syntax element or a ph_ALF_enabled_flag syntax element), ALF related APS ID quantity information (e.g., a num_ALF_APS_IDs_minus1 syntax element or a ph_num_ALF_APS_IDs_luma syntax element), and ALF related APS ID syntax elements (e.g., slice_ALF_APS_ID[i] or ph_ALF_APS_ID_luma[i]), the number of which is the same as the number of ALF related APS IDs derived based on the ALF related APS ID quantity information.
[0404] In addition, the header information may include LMCS related information. The LMCS related information may include, for example, at least one of the following: LMCS availability flag information (e.g., slice_lmcs_enabled_flag syntax element or ph_lmcs_enabled_flag syntax element), LMCS related APS ID information (slice_lmcs_aps_id syntax element or ph_lmcs_aps_id syntax element), and chroma residual scaling flag information (slice_chroma_residual_scale_flag syntax element or ph_chroma_residual_scale_flag syntax element).
[0405] According to this embodiment, hierarchical control of ALF and / or LMCS is possible.
[0406] For example, as described above, the availability of the ALF tool may be determined by an ALF availability flag in an SPS (e.g., an sps_alf_enabled_flag syntax element), and then whether the ALF is available in a current picture or slice may be indicated by an ALF availability flag in header information (e.g., a slice_alf_enabeld_flag syntax element or a ph_alf_enabeld_flag syntax element). When the value of the ALF availability flag in the header information is 1, an ALF-related APS ID number syntax element may be parsed / signaled. In addition, as many ALF-related APS ID syntax elements as the number of ALF-related APS IDs derived based on the ALF-related APS ID number syntax element may be parsed / signaled. That is, this may indicate that a plurality of APSs may be parsed or referenced by one header information.
[0407] In addition, for example, whether the LMCS (or reshaping) tool is available can be determined by an LMCS availability flag (e.g., sps_reshaper_enabled_flag) in the SPS. sps_reshaper_enabled_flag may be referred to as sps_lmcs_enabled_flag. Whether the LMCS is available in the current image or slice may be indicated by the LMCS availability flag information in the header information (e.g., slice_lmcs_enabled_flag syntax element or ph_lmcs_enabled_flag syntax element). When the value of the LMCS availability flag in the header information is 1, the LMCS-related APS ID syntax element may be parsed / signaled. The LMCS model (shaper model) may be derived from the APS indicated by the LMCS-related APS ID syntax element. For example, the APS may further include an LMCS data field, and the LMCS data field may include the above-mentioned LMCS model (shaper model) information.
[0408] Additionally, multiple APSs may be signaled, a first APS may carry ALF data, and a second APS may carry LMCS (shaper) data. The first APS and the second APS may be identified by header information based on an APS ID. Also, for example, the first APS may carry first ALF data, the second APS may carry second ALF data, and the third APS may carry LMCS (shaper) data. The first APS and / or the second APS may be referenced based on an ALF-related APS ID syntax element of the header information, and the third APS may be referenced based on an LMCS-related APS ID syntax element.
[0409] The following figures are created to explain specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the figures are presented by way of example, the technical features of this specification are not limited to the specific names used in the following figures.
[0410] Fig.19 and Fig. 20 An example of a video / image encoding method and related components according to an embodiment of this document is schematically shown. Fig.19 The method disclosed in Figure 2 Specifically, for example, Fig.19 S1900 may be performed by the predictor 220 of the encoding device, S1910 may be performed by the residual processor 230 of the encoding device, S1920 may be performed by the adder 250 of the encoding device, S1930 may be performed by the filter 260 of the encoding device, and S1940 may be performed by the entropy encoder 240 of the encoding device. Fig.19The methods disclosed in may include the above-mentioned embodiments in this document.
[0411] Reference Fig.19 , the encoding device determines the intra prediction mode of the current block in the current picture and derives the prediction sample (S1900). The encoding device may derive the prediction sample of the current block based on the prediction mode. In this case, various prediction methods disclosed in this document, such as inter prediction or intra prediction, may be applied. In this case, the encoding device may generate prediction mode information. The encoding device may generate prediction mode information indicating the prediction mode applied to the current block.
[0412] The encoding device derives residual samples based on the prediction samples (S1910). The encoding device may derive residual samples based on the prediction samples and the original samples. In this case, residual information may be generated based on the residual samples. The residual information may include information about the above-mentioned (quantized) transform coefficients.
[0413] The encoding device generates a reconstructed sample based on the prediction sample (S1920). The encoding device may derive (modified) residual samples based on the residual information. The reconstructed sample may be generated based on the (modified) residual sample and the prediction sample. The reconstructed block and the reconstructed picture may be derived based on the reconstructed sample.
[0414] The encoding device derives ALF parameters (S1930). The encoding device may derive ALF parameters related to ALF, which may be applied to filter the reconstructed samples. The ALF parameters may be included in the ALF data field. For example, the ALF data field may include the ALF parameters described above in this document. The ALF data field may include information such as a filter or filter coefficient indicating the ALF.
[0415] In addition, although not disclosed, the encoding device may derive LMCS parameters for the LMCS process. The LMCS parameters may be included in the LMCS (shaper) data field. The LMCS data field may include the LMCS parameters described above in this document. The LMCS data field may include information such as for deriving the LMCS (shaping) model / bin / codeword / mapping index for LMCS (shaping).
[0416] The encoding device encodes the image / video information (S1940). The image / video information may include prediction related information (prediction mode information) and / or an ALF data field. In addition, the image / video information may include an LMCS data field. In addition, the image / video information may include residual information. The prediction related information may include information about various prediction modes (e.g., merge mode, MVP mode, etc.), MVD information, etc.
[0417] The coded image / video information can be output in the form of a bitstream, which can be sent to a decoding device via a network or a (digital) storage medium.
[0418] According to an embodiment of this document, the image / video information may include various information. For example, the image / video information may include information disclosed in at least one of Tables 1, 3, 4, 7, 9, 13, 15, 16, 19, 23, 24, 25, 26, 27, and / or 28 above.
[0419] For example, the image / video information may include at least one of the adaptation parameter sets APS.
[0420] For example, the image / video information may include a first adaptation parameter set (APS), the APS including an ALF data field, and the ALF data field may include ALF parameters for deriving filter coefficients for the ALF process.
[0421] For example, the image / video information includes header information including a picture header or a slice header, and the header information includes ALF-related APS ID information, and the first APS including the ALF data field may be identified based on the ALF-related APS ID information.
[0422] For example, the header information includes ALF-related APS ID number information, and the ALF-related APS ID number information is specified based on a value of the ALF-related APS ID number information, and as many ALF-related APS ID syntax elements as the number of ALF-related APS IDs may be included in the header information.
[0423] For example, the header information includes an ALF availability flag indicating whether ALF is available in a picture or a slice, and when the value of the ALF availability flag is 1, the header information includes ALF-related APS ID quantity information.
[0424] For example, the image / video information may include an SPS, and the SPS may include a first ALF availability flag indicating whether the ALF is available.
[0425] For example, when the value of the first ALF availability flag is 1, the header information may include a second ALF availability flag indicating whether the ALF is available in the picture or the slice.
[0426] For example, the prediction mode may be an inter-frame prediction mode. In this case, generating the reconstructed sample may include deriving a mapping prediction sample based on the prediction sample derived based on the inter-frame prediction mode, and generating the reconstructed sample based on the mapping prediction sample. In this case, the image / video information includes a second APS, the second APS includes a luminance mapping and chrominance scaling (LMCS) data field, the LMCS data field includes an LMCS parameter indicating an integer codeword, and the mapping prediction sample for the prediction sample may be derived based on the integer codeword.
[0427] For example, the first APS includes first type information indicating that the first APS is an APS including an ALF data field, and the second APS includes second type information indicating that the second APS is an APS including an LMCS data field.
[0428] In addition, for example, the header information may include LMCS related information. The LMCS related information may include, for example, at least one of the following: LMCS availability flag information (e.g., slice_lmcs_enabled_flag syntax element or ph_lmcs_enabled_flag syntax element), LMCS related APS ID information (slice_lmcs_aps_id syntax element or ph_lmcs_aps_id syntax element), and chroma residual scaling flag information (slice_chroma_residual_scale_flag syntax element or ph_chroma_residual_scale_flag syntax element).
[0429] For example, the header information may include LMCS-related APS ID information, and the second APS including the LMCS data field may be identified based on the LMCS-related APS ID information.
[0430] For example, the header information may include an LMCS enable flag, and when the value of the LMCS enable flag is 1, the header information may include LMCS-related APS ID information.
[0431] Fig.21 and Fig. 22 An example of an image / video decoding method and related components according to an embodiment of this document is schematically shown. Fig.21 The method disclosed in Figure 3 Specifically, for example, Fig.21S2100 may be performed by the entropy decoder 310 of the decoding device, S2110 and S2120 may be performed by the predictor 330 of the decoding device, S2130 may be performed by the residual processor 320 of the decoding device, S2140 may be performed by the adder 340 of the decoding device, and S2150 and S2160 may be performed by the filter 350 of the decoding device. Fig.21 The methods disclosed in may include the above-mentioned embodiments in this document.
[0432] Reference Fig.21 , the decoding device receives / acquires the image / video information (S2100). The decoding device may receive / acquire the image / video information through the bit stream.
[0433] The image / video information may include prediction related information (including prediction mode information) and residual information. In addition, according to an embodiment of the present document, the image / video information may include various information. For example, the image / video information may include information disclosed in at least one of Tables 1, 3, 4, 7, 9, 13, 15, 16, 19, 23, 24, 25, 26, 27, and / or 28 above.
[0434] The decoding apparatus may derive a prediction mode of the current block based on the image / video information (S2110). The decoding apparatus may determine a prediction mode of the current block based on the prediction mode information.
[0435] The decoding apparatus derives a prediction sample of the current block (S2120). The decoding apparatus may perform prediction based on a prediction mode and derive a prediction sample.
[0436] The decoding device derives residual samples (S2130). The decoding device may derive residual samples based on residual information. For example, the residual information may include information about (quantized) transform coefficients. The quantized transform coefficients may be derived based on the information about the (quantized) transform coefficients, and the transform coefficients may be derived through a dequantization process. Thereafter, the residual samples may be derived through an inverse transform process on the transform coefficients.
[0437] The decoding device generates a reconstructed sample (S2140). The decoding device may generate the reconstructed sample based on the prediction sample and the residual sample. A reconstructed block and a reconstructed picture may be derived based on the reconstructed sample.
[0438] The decoding apparatus derives filter coefficients for an ALF process for reconstructing samples (S2150). The decoding apparatus may derive a filter or filter coefficients for ALF based on the ALF parameters.
[0439] The decoding device may perform an ALF process based on a filter or filter coefficient (S2160). The decoding device may generate a modified reconstructed sample based on the reconstructed sample and the filter or filter coefficient. A filter of the ALF may include a filter coefficient set. The filter or filter coefficient may be derived based on the ALF parameter.
[0440] For example, the image / video information may include at least one of the Adaptation Parameter Sets (APS).
[0441] For example, the image / video information may include a first adaptation parameter set (APS), the APS including an ALF data field, and the ALF data field may include ALF parameters for deriving filter coefficients for the ALF process.
[0442] For example, the image / video information includes header information including a picture header or a slice header, and the header information includes ALF-related APS ID information, and the first APS including the ALF data field can be identified based on the ALF-related APS ID information.
[0443] For example, the header information includes ALF-related APS ID number information, and the ALF-related APS ID number information is specified based on a value of the ALF-related APS ID number information, and as many ALF-related APS ID syntax elements as the number of ALF-related APS IDs may be included in the header information.
[0444] For example, the header information includes an ALF availability flag indicating whether ALF is available in a picture or a slice, and when a value of the ALF availability flag is 1, the header information includes ALF-related APS ID quantity information.
[0445] For example, the image / video information may include an SPS, and the SPS may include a first ALF availability flag indicating whether the ALF is available.
[0446] For example, when the value of the first ALF availability flag is 1, the header information may include a second ALF availability flag indicating whether the ALF is available in the picture or the slice.
[0447] For example, the prediction mode may be an inter-frame prediction mode. In this case, generating the reconstructed sample may include deriving a mapping prediction sample based on the prediction sample derived based on the inter-frame prediction mode, and generating the reconstructed sample based on the mapping prediction sample. In this case, the image / video information includes a second APS, the second APS includes a luminance mapping and chrominance scaling (LMCS) data field, the LMCS data field includes an LMCS parameter indicating an integer codeword, and the mapping prediction sample for the prediction sample may be derived based on the integer codeword.
[0448] For example, the first APS includes first type information indicating that the first APS is an APS including an ALF data field, and the second APS includes second type information indicating that the second APS is an APS including an LMCS data field.
[0449] In addition, for example, the header information may include LMCS related information. The LMCS related information may include, for example, at least one of the following: LMCS availability flag information (e.g., slice_lmcs_enabled_flag syntax element or ph_lmcs_enabled_flag syntax element), LMCS related APS ID information (slice_lmcs_aps_id syntax element or ph_lmcs_aps_id syntax element), and chroma residual scaling flag information (slice_chroma_residual_scale_flag syntax element or ph_chroma_residual_scale_flag syntax element).
[0450] For example, the header information may include LMCS-related APS ID information, and the second APS including the LMCS data field may be identified based on the LMCS-related APS ID information.
[0451] For example, the header information may include an LMCS enable flag, and when the value of the LMCS enable flag is 1, the header information may include LMCS-related APS ID information.
[0452] Although the method has been described based on a flowchart that lists steps or blocks in sequence in the above-mentioned embodiments, the steps of the embodiments are not limited to a specific order, and specific steps may be performed in a different order or at the same time than the above-mentioned steps. In addition, it will be understood by those of ordinary skill in the art that the steps of the flowchart are not exclusive, and another step may be included therein or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments of this document.
[0453] The above-mentioned method according to the embodiment of the present document may be implemented in the form of software, and the encoding device and / or decoding device according to the present document may be included in a device that performs image processing such as a TV, a computer, a smart phone, a set-top box, and a display device.
[0454] When the embodiment is implemented with software in this document, the aforementioned method can be implemented by a module (process or function) that performs the aforementioned functions. The module can be stored in a memory and executed by a processor. The memory can be installed inside or outside the processor and can be connected to the processor via various known means. The processor may include an application specific integrated circuit (ASIC), other chipsets, logic circuits and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium and / or other storage devices. In other words, the embodiments disclosed herein can be implemented and executed on a processor, a microprocessor, a controller or a chip. For example, the functional units illustrated in each figure can be implemented and executed on a computer, a processor, a microprocessor, a controller or a chip. In this case, information about the implementation (e.g., information about instructions) or an algorithm can be stored in a digital storage medium.
[0455] In addition, the decoding device and encoding device to which the embodiments of this document are applied may be included in the following: a multimedia broadcast transceiver, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, and a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a 3D video device, a virtual reality (VR) device, an augmented reality (AR) device, an image phone video device, a vehicle terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an aircraft terminal, or a ship terminal) and a medical video device; and can be used to process image signals or data. For example, an OTT video device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smart phone, a tablet PC, and a digital video recorder (DVR).
[0456] In addition, the processing method to which the embodiments of this document are applied may be generated in the form of a program executed by a computer and stored in a computer-readable recording medium. Multimedia data having a data structure according to an embodiment of this document may also be stored in a computer-readable recording medium. Computer-readable recording media include all kinds of storage devices and distributed storage devices in which computer-readable data is stored. Computer-readable recording media may include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. Computer-readable recording media also include media embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, the bit stream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0457] In addition, the embodiments of this document may be embodied as a computer program product based on program codes, and the program codes may be executed on a computer according to the embodiments of this document. The program codes may be stored on a computer readable carrier.
[0458] Fig.23 represents an example of a content streaming system to which the embodiments described in this document can be applied.
[0459] refer to Fig.23 A content streaming system to which the embodiments of this document are applied may generally include an encoding server, a streaming server, a network (web) server, a media storage, a user device, and a multimedia input device.
[0460] The encoding server is used to compress the content input from the multimedia input device such as a smart phone, camera, camcorder, etc. into digital data, generate a bit stream, and transmit it to the streaming server. As another example, in the case where the multimedia input device such as a smart phone, camera, camcorder, etc. directly generates a bit stream, the encoding server can be omitted.
[0461] The bitstream may be generated by an encoding method or a bitstream generation method to which the embodiments of this document are applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0462] The streaming server sends multimedia data to the user device based on the user's request through the web server, which acts as a tool to inform the user of what services are available. When the user requests the service the user wants, the web server transfers the request to the streaming server, and the streaming server sends the multimedia data to the user. In this regard, the content streaming system may include a separate control server, and in this case, the control server is used to control the commands / responses between the various devices in the content streaming system.
[0463] The streaming server may receive content from a media storage device and / or an encoding server. For example, in the case where the content is received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a predetermined period of time to smoothly provide a streaming service.
[0464] For example, user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., watch-type terminals (smart watches), glasses-type terminals (smart glasses), head-mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc.
[0465] Each server in the content streaming system may be operated as a distributed server, and in this case, data received by each server may be processed in a distributed manner.
[0466] The claims described herein can be combined in various ways. For example, the technical features of the method claims of this specification can be combined and implemented as a device, and the technical features of the device claims of this specification can be combined and implemented as a method. In addition, the technical features of the method claims of this specification and the technical features of the device claims can be combined to be implemented as a device, and the technical features of the method claims of this specification and the technical features of the device claims can be combined and implemented as a method.
Claims
1. A decoding device for image decoding, the decoding device comprising: Memory; as well as at least one processor, the at least one processor connected to the memory, the at least one processor configured to: Acquire image information including prediction mode information and residual information through a bit stream; Based on the prediction mode information, deriving a prediction mode of the current block; Based on the prediction model, deriving prediction samples; Based on the residual information, deriving residual samples; Generate a reconstructed sample based on the predicted sample and the residual sample; deriving filter coefficients for an adaptive loop filter (ALF) for the reconstructed samples; as well as generating modified reconstructed samples based on the reconstructed samples and the filter coefficients, The image information includes a sequence parameter set (SPS), slice header information and a first adaptation parameter set (APS), The first APS includes first type information related to whether the first APS is an APS including an ALF data field, wherein, based on the first type information indicating that the first APS is the APS including the ALF data field, the first APS includes the ALF data field, The ALF data field includes ALF parameters used to derive the filter coefficients. The SPS includes ALF enabling flag information related to whether the ALF is enabled. Wherein, based on the ALF enabling flag information in the SPS, the slice header information includes ALF enabling flag information related to whether the ALF is enabled in the slice, The slice header information includes ALF-related APSID quantity information based on the ALF enabling flag information in the slice header, wherein, based on the value of the ALF-related APS ID quantity information, the number of ALF-related APS IDs is derived, and Wherein, ALF-related APS ID syntax elements, whose number is equal to the number of the ALF-related APSIDs, are included in the slice header information.
2. A coding device for image coding, the coding device comprising: Memory; as well as at least one processor, the at least one processor connected to the memory, the at least one processor configured to: Derived prediction samples of the current block based on inter-frame prediction or intra-frame prediction; generating prediction mode information indicating a prediction mode of the current block; deriving residual samples based on the prediction samples; generating residual information based on the residual samples; generating a reconstructed sample based on the predicted sample; deriving adaptive loop filter (ALF) parameters for the ALF for the reconstructed samples; and encoding the image information including the prediction mode information, the residual information and the ALF parameter, The image information includes a sequence parameter set (SPS), slice header information and a first adaptation parameter set (APS), The first APS includes first type information related to whether the first APS is an APS including an ALF data field, wherein, based on the first type information indicating that the first APS is the APS including the ALF data field, the first APS includes the ALF data field, The ALF data field includes ALF parameters used to derive the filter coefficients. The SPS includes ALF enabling flag information related to whether the ALF is enabled. Wherein, based on the ALF enabling flag information in the SPS, the slice header information includes ALF enabling flag information related to whether the ALF is enabled in the slice, The slice header information includes ALF-related APSID quantity information based on the ALF enabling flag information in the slice header, wherein, based on the value of the ALF-related APS ID quantity information, the number of ALF-related APS IDs is derived, and Wherein, ALF-related APS ID syntax elements, whose number is equal to the number of the ALF-related APSIDs, are included in the slice header information.
3. A device for transmitting data for an image, the device comprising: at least one processor configured to obtain a bitstream for the image, wherein the bitstream is generated based on: deriving a prediction sample of a current block based on inter-frame prediction or intra-frame prediction; generating prediction mode information indicating a prediction mode of the current block; deriving a residual sample based on the prediction sample; generating residual information based on the residual sample; generating a reconstructed sample based on the prediction sample; deriving an adaptive loop filter (ALF) parameter for the reconstructed sample; and encoding the image information to generate the bitstream, wherein the image information includes the prediction mode information, the residual information, and the ALF parameter, and a transmitter configured to transmit the data including the bit stream, The image information includes a sequence parameter set (SPS), slice header information and a first adaptation parameter set (APS), The first APS includes first type information related to whether the first APS is an APS including an ALF data field, wherein, based on the first type information indicating that the first APS is the APS including the ALF data field, the first APS includes the ALF data field, The ALF data field includes ALF parameters used to derive the filter coefficients. The SPS includes ALF enabling flag information related to whether the ALF is enabled. Wherein, based on the ALF enabling flag information in the SPS, the slice header information includes ALF enabling flag information related to whether the ALF is enabled in the slice, The slice header information includes ALF-related APSID quantity information based on the ALF enabling flag information in the slice header, wherein, based on the value of the ALF-related APS ID quantity information, the number of ALF-related APS IDs is derived, and Wherein, ALF-related APS ID syntax elements, the number of which is equal to the number of the ALF-related APS IDs, are included in the slice header information.
Citation Information
Patent Citations
Method and apparatus for slice common information sharing
CN103210650A
Cited By
Encoding method, decoding method, bitstream, encoder, decoder and storage medium
WO2026085787A1
