Image compiling device and method based on in-loop filtering

Through the cross component adaptive loop filtering (CCALF) process, the chroma sample is filtered based on the reconstruction of brightness samples, solving the problem of high transmission and storage costs in high-resolution image/video compression, achieving more efficient compression and improved visual quality.

CN120475183APending Publication Date: 2025-08-12NOKIA TECHNOLOGIES OY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510654984.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-08-29
Filing Date
2020-08-31
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The prior art has high transmission and storage costs in high resolution, high quality image/video compression, especially when dealing with virtual reality, artificial reality and immersive media content, compression efficiency and visual quality need to be improved.

Method used

The cross component adaptive loop filtering (CCALF) process is used to filter the chromaticity sample based on the reconstruction of luminance samples, and the availability of CCALF and the filter set index information are signaled, and ALF and CCALF are adaptively applied to improve encoding and decoding efficiency.

Benefits of technology

Improve image/video compression efficiency, improve subjective and objective visual quality, enhance the filtering performance of encoding and decoding, especially in encoding and decoding of still images or videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120475183A_ABST
    Figure CN120475183A_ABST
Patent Text Reader

Abstract

The present document relates to an in-loop filtering-based image coding apparatus and method. In accordance with an embodiment of the present document, a method for improving the accuracy of in-loop filtering is presented. In an example, the filtering accuracy of a chroma block may be improved on a luma block basis by performing a cross-component adaptive loop filtering process.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with application number 202080073204.1 (PCT / KR2020 / 011597) filed on April 19, 2022, with an international application date of August 31, 2020, and the invention name is “Image compilation device and method based on in-loop filtering”. Technical Field

[0002] The present disclosure relates to an image coding device and method based on in-loop filtering. Background Art

[0003] Recently, there has been an increasing demand for high-resolution, high-quality images / videos, such as 4K or 8K or higher ultra-high-definition (UHD) images / videos, in various fields. As image / video data has high resolution and high quality, the amount of information or bits to be transmitted increases relative to existing image / video data. Therefore, transmitting image data using a medium such as an existing wired / wireless broadband line or an existing storage medium or storing image / video data using an existing storage medium increases transmission costs and storage costs.

[0004] In addition, interest in and demand for immersive media such as virtual reality (VR) and artificial reality (AR) content and holograms are growing, and broadcasting of images / videos having characteristics different from real images (such as game images) is also increasing.

[0005] Therefore, highly efficient image / video compression technology is required to effectively compress, transmit, store or reproduce information of high-resolution, high-quality images / videos having various characteristics as described above.

[0006] In addition, a cross-component adaptive loop filtering (CCALF) process is performed to improve compression efficiency and enhance subjective / objective visual quality, and a method for improving data transmission efficiency of the CCALF process is being discussed. Summary of the Invention

[0007] The present disclosure provides a method and apparatus for improving image / video coding efficiency.

[0008] The present disclosure also provides an efficient filtering application method and device.

[0009] The present disclosure also provides an efficient ALF application method and apparatus.

[0010] According to an embodiment of the present disclosure, a filtering process may be performed on the reconstructed chroma samples based on the reconstructed luma samples.

[0011] According to an embodiment of the present disclosure, filtered reconstructed chroma samples may be modified based on reconstructed luma samples.

[0012] According to an embodiment of the present disclosure, information on whether CCALF is available may be signaled in the SPS.

[0013] According to an embodiment of the present disclosure, information on the values of cross-component filter coefficients may be derived from ALF data (normal ALF data or CCALF data).

[0014] According to an embodiment of the present disclosure, identifier (ID) information of an APS including ALF data for deriving cross-component filter coefficients in a slice may be signaled.

[0015] According to an embodiment of the present disclosure, information about a filter set index of a CCALF can be signaled in units of CTU (block).

[0016] According to an embodiment of this document, a video / image decoding method performed by a decoding device is provided.

[0017] According to an embodiment of this document, a decoding apparatus for performing video / image decoding is provided.

[0018] According to an embodiment of this document, a video / image encoding method performed by an encoding device is provided.

[0019] According to an embodiment of this document, there is provided an encoding apparatus for performing video / image encoding.

[0020] According to one embodiment of this document, a computer-readable digital storage medium is provided, in which encoded video / image information generated according to the video / image encoding method disclosed in at least one embodiment of this document is stored.

[0021] According to an embodiment of this document, a computer-readable digital storage medium is provided, in which encoded information or encoded video / image information is stored for enabling a decoding device to perform the video / image decoding method disclosed in at least one embodiment of this document.

[0022] Beneficial effects

[0023] According to the embodiments of this document, the overall image / video compression efficiency can be improved.

[0024] According to the embodiments of this document, subjective / objective visual quality can be improved through efficient filtering.

[0025] According to an embodiment of the present disclosure, the ALF process may be efficiently performed and filtering performance may be improved.

[0026] According to an embodiment of the present disclosure, reconstructed chroma samples filtered based on reconstructed luma samples may be modified to improve picture quality and coding accuracy of chroma components of a decoded picture.

[0027] According to an embodiment of the present disclosure, the CCALF process may be efficiently performed.

[0028] According to the embodiments of the present disclosure, ALF-related information may be efficiently signaled.

[0029] According to an embodiment of the present disclosure, CCALF-related information may be efficiently signaled.

[0030] According to an embodiment of the present disclosure, ALF and / or CCALF can be adaptively applied in units of pictures, slices, and / or coding blocks.

[0031] According to the embodiments of this document, when CCALF is used in encoding and decoding methods and devices for still images or videos, the filter coefficients used for CCALF and the on / off transmission method in blocks or CTU units can be improved, thereby improving encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 An example of a video / image coding system that can be applied to an embodiment of the present disclosure is schematically shown.

[0033] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device that can be applied to an embodiment of the present disclosure.

[0034] Figure 3 is a diagram schematically illustrating a configuration of a video / image decoding device that can be applied to an embodiment of the present disclosure.

[0035] Figure 4 The hierarchical structure of the compiled image / video is shown exemplarily.

[0036] Figure 5 is a flowchart illustrating a method for reconstructing an intra prediction-based block in an encoding apparatus.

[0037] Figure 6 is a diagram illustrating an intra-frame predictor in an encoding device.

[0038] Figure 7 3 is a flowchart illustrating a block reconstruction method based on intra prediction in a decoding apparatus.

[0039] Figure 8 FIG. 1 is a diagram illustrating an intra-frame predictor in a decoding device.

[0040] Figure 9This is a flowchart for describing a block reconstruction method based on intra-frame prediction in an encoding device.

[0041] Figure 10 is a diagram illustrating an inter-frame predictor in an encoding device.

[0042] Figure 11 This is a flowchart for describing a block reconstruction method based on inter-frame prediction in a decoding device.

[0043] Figure 12 is a diagram illustrating an inter-frame predictor in a decoding device.

[0044] Figure 13 is a diagram illustrating an example of the shape of an ALF filter.

[0045] Figure 14 is a diagram for describing a virtual boundary applied to a filtering process according to an embodiment of the present disclosure.

[0046] Figure 15 is a diagram illustrating an example of an ALF process using a virtual boundary according to an embodiment of the present disclosure.

[0047] Figure 16 is a diagram for describing a cross-component adaptive loop filtering (CC-ALF (CCALF)) process according to an embodiment of the present disclosure.

[0048] Figure 17 and Figure 18 is a diagram schematically illustrating an example of a video / image decoding method and related components according to an embodiment of the present disclosure.

[0049] Figure 19 and Figure 20 is a diagram schematically illustrating an example of an image / video decoding method and related components according to an embodiment of the present disclosure.

[0050] Figure 21 is a diagram illustrating an example of a content streaming system to which the embodiments disclosed in the present disclosure can be applied. DETAILED DESCRIPTION

[0051] This document can be modified in various ways and can have various embodiments, and specific embodiments will be illustrated in the accompanying drawings and described in detail. However, this is not intended to limit this document to specific embodiments. The commonly used terms in this specification are used to describe specific embodiments and are not used to limit the technical spirit of this document. Singular expressions include plural expressions unless the context clearly expresses otherwise. Terms such as "including" or "having" in this specification should be understood to indicate the presence of characteristics, quantities, steps, operations, elements, parts or combinations thereof described in the specification, rather than excluding the presence or possibility of adding one or more other characteristics, quantities, steps, operations, elements, parts or combinations thereof.

[0052] At the same time, in order to facilitate the description of different feature functions, the elements in the drawings described in this document are illustrated independently. This does not mean that each element is implemented as separate hardware or separate software. For example, at least two elements can be combined to form a single element, or a single element can be divided into multiple elements. Embodiments in which elements are combined and / or separated are also included in the scope of the rights of this document unless it deviates from the essence of this document.

[0053] Hereinafter, the preferred embodiment of this document will be described in more detail with reference to the accompanying drawings. Hereinafter, in the accompanying drawings, the same reference numerals are used for the same elements, and repeated description of the same elements is omitted.

[0054] This document relates to video / image coding. For example, the methods / embodiments disclosed herein may be related to the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), the next generation video / image coding standard after VVC, or other video coding-related standards (e.g., the High Efficiency Video Coding (HEVC) standard (ITU-T Rec. H.265), the Essential Video Coding (EVC) standard, and the AVS2 standard).

[0055] This document presents various embodiments of video / image coding, and the embodiments may be performed in conjunction with each other unless otherwise stated.

[0056] In this document, video may mean a collection of images over time. A picture generally means a unit that represents an image in a specific time region, and a slice / tile is a unit that constitutes a part of a picture in 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 picture may be composed of one or more tile groups. A tile group may include one or more tiles.

[0057] A pixel or picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a value of a pixel, and may represent only a pixel / pixel value of a luminance component, or only a pixel / pixel value of a chrominance component. In addition, a sample may refer to a pixel value in a spatial domain, or, in the case of transforming such a pixel value into a frequency domain, may refer to a transform coefficient in a frequency domain.

[0058] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may include a luminance block and two chrominance (e.g., CB, CR) blocks. In some cases, terms such as unit and block, region, etc. may be used interchangeably. In general, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients consisting of M columns and N rows.

[0059] In this document, the terms " / " and "," are interpreted as meaning "and / or." For example, the expression "A / B" is interpreted as meaning "A and / or B," and "A, B" is interpreted as meaning "A and / or B." Furthermore, "A / B / C" may mean "at least one of A, B, and / or C." Furthermore, "A, B, C" may mean "at least one of A, B, and / or C."

[0060] Furthermore, in this document, the term "or" should be interpreted as meaning "and / or." For example, the expression "A or B" may mean 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document may mean "additionally or alternatively."

[0061] In this specification, “at least one of A and B” may mean “only A”, “only B”, or “both A and B”. In addition, in this specification, 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] In addition, in this specification, “at least one of A, B, and C” may mean “only A,” “only B,” “only C,” or “any combination of A, B, and C.” In addition, “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] Furthermore, brackets used in this specification may mean "for example." Specifically, when "prediction (intra-frame prediction)" is expressed, it may indicate that "intra-frame prediction" is proposed as an example of "prediction." In other words, the term "prediction" in this specification is not limited to "intra-frame prediction" and may indicate that "intra-frame prediction" is proposed as an example of "prediction." Furthermore, even when "prediction (i.e., intra-frame prediction)" is expressed, it may indicate that "intra-frame prediction" is proposed as an example of "prediction."

[0064] In this specification, technical features explained separately in one drawing may be implemented separately or may be implemented simultaneously.

[0065] Figure 1 Schematically illustrates an example of a video / image coding system to which embodiments of this document can be applied.

[0066] refer to Figure 1 The video / image coding system may include a source device and a receiving device. The source device may deliver the encoded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or a network.

[0067] 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.

[0068] The video source can obtain the video / image by capturing, synthesizing, or generating a video / image. The video source may include a video / image capture device and / or a video / image generation device. For example, the video / image capture device may include one or more cameras, a video / image archive including previously captured videos / images, etc. For example, the video / image generation device may include a computer, a tablet computer, and a smart phone, and may generate the video / image (electronically). For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capture process may be replaced by a process that generates relevant data.

[0069] 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 bitstream.

[0070] The transmitter can transmit the encoded image / image information or data, output as a bitstream, in the form of a file or stream to a receiver in a receiving device via a digital storage medium or network. Digital storage media can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include components for generating media files in a predetermined file format and can also include components for transmission via a broadcast / communication network. The receiver can receive / extract the bitstream and transmit the received bitstream to a decoding device.

[0071] The decoding device may decode a video / image by performing a series of processes such as dequantization, inverse transform, and prediction corresponding to the operations of the encoding device.

[0072] The renderer can render the decoded video / image, and the rendered video / image can be displayed on a display.

[0073] Figure 2 is a diagram schematically explaining the configuration of a video / image encoding device to which this document is applicable. Hereinafter, a video encoding device may include an image encoding device.

[0074] refer to 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 components may also include the memory 270 as an internal / external component.

[0075] The image splitter 210 can split the input image (or picture, or frame) input to the encoding device 200 into one or more processors. For example, a processor can be referred to as a coding unit (CU). In this case, the coding unit can be recursively split from a coding tree unit (CTU) or a largest coding unit (LCU) based on a quadtree, binary tree, and ternary tree (QTBTTT) structure. For example, a coding unit can be split into multiple coding units of a greater depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, the quadtree structure can be applied first, and / or the binary tree structure and / or ternary tree structure can be applied later. Alternatively, the binary tree structure can be applied first. The coding process according to the present disclosure can be performed based on the final coding unit that is no longer split. In this case, based on coding efficiency according to image characteristics, the largest coding unit can be used as the final coding unit, or, if necessary, the coding unit can be recursively split into coding units of a greater depth, and the coding unit with the optimal size can be used as the final coding unit. Here, the coding process may include the prediction, transformation, and reconstruction processes described later. As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be partitioned or split from the aforementioned final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.

[0076] In some cases, the term "unit" can be used interchangeably with terms such as "block" or "region." In general, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or pixel value, and can represent only the pixel / pixel value of the luma component or only the pixel / pixel value of the chroma component. A sample can be used as a term corresponding to a pixel or picture element of a picture (or image).

[0077] The subtractor 231 can generate a residual signal (residual block, residual sample, or residual sample array) by subtracting the prediction signal (prediction block, prediction sample, or prediction sample array) output from the predictor 220 from the input image signal (original block, original sample, or original sample array), and can send the generated residual signal to the transformer 232. The predictor 220 can perform prediction on the processing target block (hereinafter referred to as the "current block") and can generate a prediction block including prediction samples for the current block. The predictor 220 can determine whether to apply intra-frame prediction or inter-frame prediction in units of the current block or CU. The predictor can generate and transmit various information about the prediction to the entropy encoder 240, such as prediction mode information that will be described later in the explanation of each prediction mode. The information about the prediction can be encoded by the entropy encoder 240 and can be output in the form of a bitstream.

[0078] The intra-frame predictor 222 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referenced samples can be located near the current block or can be spaced apart. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. For example, the non-directional mode can include a DC mode and a planar mode. For example, depending on the level of detail of the prediction direction, the directional mode can include 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes can be used depending on the settings. The intra-frame predictor 222 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0079] The inter-frame predictor 221 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can also include information about the inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, neighboring blocks can include spatially neighboring blocks in the current picture and temporally neighboring blocks in the reference picture. The reference picture including the reference block and the reference picture including the temporally neighboring block can be the same or different. Temporally neighboring blocks can be referred to as collocated reference blocks, collocated CUs (colCUs), etc., and the reference picture including temporally neighboring blocks can be referred to as collocated pictures (colPics). For example, the inter-frame predictor 221 can 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 for the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 can 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. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0080] The predictor 220 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction at the same time. This can be called combined inter and intra prediction (CIIP). In addition, the predictor can perform intra block copying (IBC) for prediction of the block. Intra block copying can be used for content image / video coding of games, etc., for example, screen content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction at the point of deriving a reference block in the current picture. That is, IBC can use at least one of the inter prediction techniques described in this document.

[0081] The prediction signal generated by the inter-frame predictor 221 and / or the intra-frame predictor 222 can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT means a transform obtained from a graph when the relationship information between pixels is represented by a graph. CNT means a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size, or can be applied to blocks of variable size rather than square.

[0082] The quantizer 233 can quantize the transform coefficients and send them to the entropy encoder 240, and the entropy encoder 240 can encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients can be called residual information. The quantizer 233 can rearrange the block-type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 can perform various encoding methods, such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), Context-Adaptive Binary Arithmetic Coding (CABAC), etc. The entropy encoder 240 can encode information required for video / image reconstruction in addition to the quantized transform coefficients (e.g., the values of syntax elements, etc.) together or separately. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (Network Abstraction Layer). The video / image information may further 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 further include general constraint information. In this document, the information and / or syntax elements to be signaled / transmitted described later in this document may be encoded by the above-mentioned encoding process and may be included in the bitstream. The bitstream may be transmitted over a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits the signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the encoding device 200, and alternatively, the transmitter may be included in the entropy encoder 240.

[0083] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients by the dequantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the predictor 220 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample or reconstructed sample array). If the block to be processed has no residual, such as when skip mode is applied, the prediction block can be used as the reconstructed block. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture through filtering as described below.

[0084] Meanwhile, luma mapping and chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.

[0085] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information related to filtering and send the generated information to the entropy encoder 240, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.

[0086] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and the decoding apparatus 300 may be avoided, and encoding efficiency may be improved.

[0087] The DPB of the memory 270 can store the modified reconstructed picture for use as a reference picture in the inter-frame predictor 221. The memory 270 can store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the block in the reconstructed picture. The stored motion information can be sent to the inter-frame predictor 221 and used as the motion information of the spatially adjacent block or the motion information of the temporally adjacent block. The memory 270 can store the reconstructed samples of the reconstructed block in the current picture and can pass the reconstructed samples to the intra-frame predictor 222.

[0088] Figure 3 is a diagram schematically explaining the configuration of a video / image decoding device to which this document is applied.

[0089] refer to 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 332 and an intra-frame predictor 331. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured by a hardware component (e.g., a decoder chipset or processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include the memory 360 as an internal / external component.

[0090] When a bit stream including video / image information is input, the decoding apparatus 300 can be used with Figure 2 The image is reconstructed accordingly to the processing of the video / image information in the encoding device. For example, the decoding device 300 can derive the unit / block based on the block partition related information obtained from the bit stream. The decoding device 300 can perform decoding using a processor applied in the encoding device. Therefore, the decoding processor can be, for example, a coding unit, and the coding unit can be partitioned from the coding tree unit or the largest 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. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.

[0091] The decoding device 300 may receive the data in the form of a bit stream from Figure 2The received signal is output by the encoding device, and the entropy decoder 310 can decode the received signal. For example, the entropy decoder 310 can parse the bitstream to derive information required for image reconstruction (or picture reconstruction) (e.g., video / image information). The video / image information may further include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device can further decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements transmitted / received using the signal described later in this document can be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 310 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, as well as the output values of the syntax elements required for image reconstruction and the quantized values of the transform coefficients used for the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, determine a context model using information about the target syntax element to be decoded, information about decoded neighboring and target blocks, or information about a symbol / bin decoded in a previous stage, and perform arithmetic decoding on the bin by predicting the probability of the bin's occurrence based on the determined context model, thereby generating a symbol corresponding to the value of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method can update the context model by applying the information about the decoded symbol / bin to the context model of the next symbol / bin. Information about prediction from the information decoded by the entropy decoder 310 can be provided to the predictor 330, and information about the residual for which entropy decoding has been performed in the entropy decoder 310, i.e., quantized transform coefficients and related parameter information, can be input to the dequantizer 321. In addition, information about filtering from the information decoded by the entropy decoder 310 can be provided to the filter 350. Meanwhile, a receiver (not shown) for receiving a signal output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiver can be a component of the entropy decoder 310. Meanwhile, the decoding device according to this document may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 310, and the sample decoder may include at least one of a dequantizer 321, an inverse transformer 322, a predictor 330, an adder 340, a filter 350, and a memory 360.

[0092] The dequantizer 321 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The dequantizer 321 may dequantize the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain the transform coefficients.

[0093] The inverse transformer 322 performs an inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0094] The predictor may perform prediction on the current block and generate a prediction block including prediction samples for the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on the information on prediction output from the entropy decoder 310 and may determine a specific intra / inter prediction mode.

[0095] The predictor can generate a prediction signal based on the various prediction methods described below. For example, the predictor can apply not only intra prediction or inter prediction to predict a block, but also intra prediction and inter prediction at the same time. This can be called combined inter and intra prediction (CIIP). In addition, the predictor can perform intra block copying (IBC) for prediction of blocks. Intra block copying can be used for content image / video coding of games, etc., for example, screen content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction because a reference block is derived in the current picture. That is, IBC can use at least one of the inter prediction techniques described in this document.

[0096] The intra-frame predictor 331 can predict the current block by referencing samples in the current picture. The referenced samples can be located near the current block or at a separate location depending on the prediction mode. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0097] The inter-frame predictor 332 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks 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 the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the prediction information may include information indicating the mode used for inter-frame prediction of the current block.

[0098] 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 (330). If the block to be processed has no residual, such as when skip mode is applied, the prediction block can be used as the reconstructed block.

[0099] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra-frame 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-frame prediction of the next picture.

[0100] At the same time, luminance mapping and chroma scaling (LMCS) can be applied during the picture decoding process.

[0101] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image, and store the modified reconstructed image in the memory 360 (specifically, the DPB of the memory 360). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0102] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the block in the reconstructed picture. The stored motion information can be sent to the inter-frame predictor 260 so that it can be used as the motion information of the spatially adjacent block or the motion information of the temporally adjacent block. The memory 360 can store the reconstructed samples of the reconstructed block in the current picture and pass the reconstructed samples to the intra-frame predictor 331.

[0103] In this specification, the embodiments explained in the predictor 330, the dequantizer 321, the inverse transformer 322, and the filter 350 of the decoding device 300 can be applied to or correspond to the predictor 220, the dequantizer 234, the inverse transformer 235, and the filter 260 of the encoding device 200, respectively, in the same manner.

[0104] As described above, in video coding, prediction is performed to improve compression efficiency. Through this operation, a prediction block including prediction samples for the current block (i.e., the block to be coded) can be generated. Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived identically from the encoding device and the decoding device, and the encoding device decodes information (residual information) about the residual between the original block and the prediction block (rather than the original sample values of the original block themselves). Image coding efficiency can be improved by notifying the device with a signal. The decoding device can derive a residual block including residual samples based on the residual information, generate a reconstructed block including reconstructed samples by adding the residual block and the prediction block, and generate a reconstructed picture including the reconstructed block.

[0105] Residual information can be generated through transformation and quantization. For example, the encoding device can derive a residual block between the original block and the prediction block, perform transformation processing on the residual samples (residual sample array) included in the residual block to derive the transformation coefficient, and then derive the quantized transformation coefficient by performing quantization processing on the transformation coefficient to signal the residual related information (via the bitstream) to the decoding device. Here, the residual information may include value information, position information, transformation technology, transformation core and quantization parameter of the quantized transformation coefficient. The decoding device can perform dequantization / inverse transformation processing based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. The encoding device can also dequantize / inverse transform the quantized transformation coefficient for inter-frame prediction reference of the subsequent picture to derive the residual block, and generate a reconstructed picture based on this.

[0106] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When quantization / dequantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or, for the sake of uniformity of expression, may still be referred to as a transform coefficient.

[0107] In this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information about the transform coefficients, and the information about the transform coefficients may be signaled via residual coding syntax. The transform coefficients may be derived based on the residual information (or information about the transform coefficients), and the scaled transform coefficients may be derived by inversely transforming (scaling) the transform coefficients. Residual samples may be derived based on the inverse transform (transform) of the scaled transform coefficients. This may also be applied / expressed in other parts of this document.

[0108] The predictor of the encoding / decoding device can derive prediction samples by performing inter-frame prediction on a block-by-block basis. Inter-frame prediction can be a prediction derived in a manner that depends on data elements (e.g., sample values or motion information) of pictures other than the current picture. When inter-frame prediction is applied to the current block, a prediction block (prediction sample array) for the current block can be derived based on a reference block (reference sample array) specified by a motion vector in a reference picture indicated by a reference picture index. Here, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can also include information on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, neighboring blocks can include spatially neighboring blocks in the current picture and temporally neighboring blocks in a reference picture. The reference picture comprising the reference block and the reference picture comprising the temporally neighboring blocks can be the same or different. Temporally neighboring blocks may be referred to as collocated reference blocks, collocated CUs (colCUs), etc., and a reference picture including temporally neighboring blocks may be referred to as collocated pictures (colPics). For example, a motion information candidate list may be configured based on neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) may be signaled 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 skip mode and merge mode, the motion information of the current block may be the same as the motion information of the neighboring blocks. In skip mode, unlike merge mode, a residual signal may not be sent. In motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.

[0109] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as L0 prediction, prediction based on the L1 motion vector may be referred to as 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 reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with reference picture list L1 (L1). Reference picture list L0 may include pictures that are earlier in output order than the current picture as reference pictures, and reference picture list L1 may include pictures that are later in output order than the current picture. The preceding picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. Reference picture list L0 may also include pictures that are later in output order than the current picture as reference pictures. In this case, the previous picture may be indexed first in reference picture list L0, and the subsequent picture may be indexed later. Reference picture list L1 may also include pictures earlier in output order than the current picture as reference pictures. In this case, the subsequent picture may be indexed first in reference picture list 1, and the previous picture may be indexed later. The output order may correspond to the picture order count (POC) order.

[0110] Figure 4 The hierarchical structure of the compiled image / video is shown exemplarily.

[0111] refer to Figure 4 The coded image / video is divided into the video coding layer (VCL) that handles the image / video and its own decoding process, the subsystem that sends and stores the coding information, and the NAL (Network Abstraction Layer) that is responsible for the network adaptation function and exists between the VCL and the subsystem.

[0112] In the VCL, VCL data including compressed image data (slice data) is generated, or a parameter set including a picture parameter set (PSP), a sequence parameter set (SPS), and a video parameter set (VPS), or a supplemental enhancement information (SEI) message additionally required for the image decoding process may be generated.

[0113] In NAL, a NAL unit can be generated by adding header information (NAL unit header) to the raw byte sequence payload (RBSP) generated in the VCL. In this case, RBSP refers to slice data, parameter sets, SEI messages, etc. generated in the VCL. The NAL unit header can include NAL unit type information specified according to the RBSP data included in the corresponding NAL unit.

[0114] As shown in the figure, NAL units can be divided into VCL NAL units and non-VCL NAL units according to RBSP generated in VCL. VCL NAL units can refer to NAL units that include information about images (slice data), and non-VCL NAL units can refer to NAL units that include information (parameter sets or SEI messages) required for decoding images.

[0115] The aforementioned VCL NAL units and non-VCL NAL units can be transmitted over a network by appending header information according to the data standard of the subsystem. For example, the NAL units can be converted into a predetermined standard data format such as the H.266 / VVC file format, the Real-time Transport Protocol (RTP), or the Transport Stream (TS), and transmitted over various networks.

[0116] As described above, a NAL unit may be specified using a NAL unit type according to an RBSP data structure included in a corresponding NAL unit, and information about the NAL unit type may be stored and signaled in a NAL unit header.

[0117] For example, NAL units can be classified into VCL NAL unit types and non-VCL NAL unit types according to whether the NAL unit includes information about the image (slice data). VCL NAL unit types can be classified according to the nature and type of the picture included in the VCL NAL unit, and non-VCL NAL unit types can be classified according to the type of parameter set.

[0118] The following are examples of NAL unit types specified according to the type of parameter sets included in the non-VCL NAL unit type.

[0119] -APS (Adaptation Parameter Set) NAL unit: type used for NAL units containing APS

[0120] -DPS (Decoding Parameter Set) NAL unit: type used for NAL units containing DPS

[0121] - VPS (Video Parameter Set) NAL unit: type used for NAL units containing VPS

[0122] - SPS (Sequence Parameter Set) NAL unit: type used for NAL units containing SPS

[0123] -PPS (Picture Parameter Set) NAL unit: type used for NAL units containing PPS

[0124] - PH (Picture Header) NAL unit: type used for NAL units including PH

[0125] The aforementioned NAL unit type may have syntax information for the NAL unit type, and the syntax information may be stored and signaled in the NAL unit header. For example, the syntax information may be nal_unit_type, and the NAL unit type may be specified by the nal_unit_type value.

[0126] At the same time, as described above, a picture may include multiple slices, and a slice may include a slice header and slice data. In this case, a picture header may be further added to the multiple slices (slice header and slice data set) in a picture. The picture header (picture header syntax) may include information / parameters that are commonly applicable to the picture. In this document, slices may be mixed or replaced with tile groups. In addition, in this document, slice headers may be mixed or replaced with tile group headers.

[0127] The slice header (slice header syntax, slice header information) may include information / parameters that can be commonly applied to the slice. APS (APS syntax) or PPS (PPS syntax) may include information / parameters that can be commonly applied to one or more slices or pictures. SPS (SPS syntax) may include information / parameters that can be commonly applied to one or more sequences. VPS (VPS syntax) may include information / parameters that can be commonly applied to multiple layers. DPS (DPS syntax) may include information / parameters that can be commonly applied to the entire video. DPS may include information / parameters related to the concatenation of coded video sequences (CVS). The high-level syntax (HLS) in this document may include at least one of APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, and slice header syntax.

[0128] In this document, the image / image information encoded from the encoding device and notified to the decoding device by signal in the form of a bit stream includes not only partition-related information, intra-frame / inter-frame prediction information, residual information, in-loop filtering information, etc. in the picture, but also includes information included in the slice header, information included in the APS, information included in the PPS, information included in the SPS and / or information included in the VPS.

[0129] 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 reconstructed picture as described above. As described above, in-loop filtering may be performed by the filter of the encoding device and the filter of the decoding device, and a deblocking filter, SAO and / or an adaptive loop filter (ALF) may be applied. For example, the ALF process may be performed after the deblocking filtering process and / or the SAO process are completed. However, even in this case, the deblocking filtering process and / or the SAO process may be omitted.

[0130] Hereinafter, a detailed description of picture reconstruction and filtering will be described. In image / video coding, a reconstructed block can be generated based on intra prediction / inter prediction for each block, and a reconstructed picture including the reconstructed block can be generated. When the current picture / slice is an I picture / slice, the blocks included in the current picture / slice can be reconstructed based only on intra prediction. Meanwhile, when the current picture / slice is a P or B picture / slice, the blocks included in the current picture / slice can be reconstructed based on intra prediction or inter prediction. In this case, intra prediction can be applied to some blocks in the current picture / slice, and inter prediction can be applied to the remaining blocks.

[0131] Intra-frame prediction may refer to the generation of prediction samples for the current block based on reference samples in the 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 of the current block (nWxnH) and a total of 2xnH samples adjacent to the lower left portion, samples adjacent to the upper boundary of the current block and a total of 2xnW samples adjacent to the upper right portion, and one sample adjacent to the upper left portion of the current block. Alternatively, the neighboring reference samples of the current block may include multiple upper neighboring samples and multiple left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block (nWxnH), a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right portion of the current block.

[0132] However, some neighboring reference samples of the current block may not yet be decoded or available. In this case, the decoder can configure 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 configured by interpolation of available samples.

[0133] When deriving neighboring reference samples, the prediction samples can be derived based on (i) an average or interpolation of neighboring reference samples of the current block and (ii) a prediction from neighboring reference samples of the current block. The prediction samples can be derived based on reference samples located in a specific (prediction) direction relative to the sample. Case (i) can be referred to as non-directional mode or non-angle mode, and case (ii) can be referred to as directional mode or angle mode. In addition, based on the prediction samples of the current block from neighboring reference samples, a first neighboring sample and a second neighboring sample located in a direction opposite to the prediction direction of the intra-frame prediction mode of the current block are interpolated. The prediction samples can be generated. This case is referred to as linear interpolation intra-frame prediction (LIP). In addition, chroma prediction samples can be generated based on luma samples using a linear model. This case is referred to as LM mode. In addition, temporary prediction samples for the current block can be derived based on filtered neighboring reference samples, and the prediction samples for the current block can be derived by weighted summing at least one reference sample derived according to the intra-frame prediction mode (i.e., an unfiltered neighboring reference sample) from the existing neighboring reference samples and the temporary prediction sample. The above situation can be referred to as position-dependent intra prediction (PDPC). In addition, a reference sample line with the highest prediction accuracy among multiple reference sample lines adjacent to the current block can be selected to derive prediction samples by using reference samples located in the prediction direction on the corresponding line, and then the reference sample line used in this article can be indicated (notified by signal) to the decoding device, thereby performing intra-frame prediction encoding. The above situation can be referred to as multiple reference line (MRL) intra prediction or MRL-based intra prediction. In addition, intra prediction can be performed based on the same intra prediction mode by dividing the current block into vertical or horizontal sub-partitions, and neighboring reference samples can be derived and used in the sub-partition unit. That is, in this case, the intra prediction mode for the current block is equally applied to the sub-partition, and in some cases, the intra prediction performance can be improved by deriving and using neighboring reference samples in the sub-partition unit. Such a prediction method can be referred to as intra sub-partition (ISP) or ISP-based intra prediction. The aforementioned intra prediction method can be referred to as an intra prediction type separately from the intra prediction mode. The intra prediction type can be referred to by various terms such as intra prediction technology or additional intra prediction mode. For example, the intra prediction type (or additional intra prediction mode) may include at least one of the aforementioned LIP, PDPC, MRL, and ISP. A general intra prediction method other than a specific intra prediction type such as LIP, PDPC, MRL, or ISP may be referred to as a normal intra prediction type. When a specific intra prediction type cannot be applied, the normal intra prediction type may be generally applied, and prediction may be performed based on the aforementioned intra prediction mode. At the same time, post-filtering may be performed on the derived prediction samples as needed.

[0134] Specifically, the intra prediction process may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. In addition, a post-filtering step may be performed on the derived prediction samples as needed.

[0135] Figure 5 is a flowchart illustrating a block reconstruction method based on intra prediction in an encoding apparatus. Figure 6 is a diagram illustrating an inter-frame predictor in an encoding device.

[0136] S500 may be performed by the intra-frame predictor 222 of the encoding device, and S510 to S530 may be performed by the residual processor 230 of the encoding device. Specifically, S510 may be performed by the subtractor 231 of the encoding device, S520 may be performed by the transformer 232 and quantizer 233 of the encoding device, and S530 may be performed by the dequantizer 234 and inverse transformer 235 of the encoding device. In S500, prediction information may be derived by the inter-frame predictor 222 and encoded by the entropy encoder 240. Residual information may be derived through S510 and S520 and encoded by the entropy encoder 240. Residual information is information about residual samples. The residual information may include information about quantized transform coefficients for the residual samples. As described above, the residual samples may be derived into transform coefficients by the transformer 232 of the encoding device, and the transform coefficients may be derived into quantized transform coefficients by the quantizer 233. Information about the quantized transform coefficients may be encoded by the entropy encoder 240 through a residual coding process.

[0137] The encoding device performs intra prediction for the current block (S500). The encoding device can derive an intra prediction mode for the current block, derive neighboring reference samples of the current block, and generate prediction samples in the current block based on the intra prediction mode and the neighboring reference samples. Here, the process of determining the intra prediction mode, deriving neighboring reference samples, and generating prediction samples can be performed simultaneously, or one process can be performed before the other process. For example, the intra predictor 222 of the encoding device may include a prediction mode / type determiner 222-1, a reference sample derivation unit 222-2, and a prediction sample derivation unit 222-3, and may determine the intra prediction mode / type for the current block in the prediction mode / type determiner 222-1, derive neighboring reference samples of the current block in the reference sample derivation unit 222-2, and derive motion samples of the current block from the prediction sample derivation unit 222-3. At the same time, although not shown, when performing the prediction sample filtering process to be described later, the intra predictor 222 may also include a prediction sample filter unit (not shown). The encoding apparatus may determine a mode applied to the current block from among a plurality of intra prediction modes.The encoding apparatus may compare RD costs for the intra prediction modes and determine an optimal intra prediction mode for the current block.

[0138] At the same time, the encoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0139] The encoding apparatus derives residual samples for the current block based on the prediction samples (S510). The encoding apparatus may compare the prediction samples with the original samples of the current block based on a phase and derive the residual samples.

[0140] The encoding apparatus may transform / quantize the residual samples to derive quantized transform coefficients (S520), and then dequantize / inverse transform the quantized transform coefficients again to derive (modified) residual samples (S530). The reason for performing dequantization / inverse transform again after transform / quantization is to derive residual samples identical to the residual samples derived from the decoding apparatus as described above.

[0141] The encoding apparatus may generate a reconstructed block including reconstructed samples of the current block based on the prediction samples and the (modified) residual samples (S540). A reconstructed picture for the current picture may be generated based on the reconstructed block.

[0142] As described above, the encoding device may encode image information including prediction information about intra prediction (e.g., prediction mode information indicating a prediction mode) and residual information about intra and residual samples, and output the encoded image information in the form of a bitstream. The residual information may include residual coding syntax. The encoding device may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.

[0143] Figure 7 3 is a flowchart illustrating a block reconstruction method based on intra prediction in a decoding apparatus. Figure 8 FIG. 1 is a diagram illustrating an intra-frame predictor in a decoding device.

[0144] The decoding device may perform an operation corresponding to the operation performed by the encoding device.

[0145] S700 to S720 may be performed by the intra-frame predictor 331 of the decoding device, and the prediction information of S700 and the residual information of S730 may be obtained from the bitstream by the entropy decoder 310 of the decoding device. The residual processor 320 of the decoding device may derive residual samples for the current block based on the residual information. Specifically, the dequantizer 321 of the residual processor 320 may derive transform coefficients by performing dequantization based on quantized transform coefficients derived based on the residual information, and the inverse transformer 322 of the residual processor may derive residual samples for the current block by performing an inverse transform on the transform coefficients. S740 may be performed by the adder 340 or the reconstructor of the decoding device.

[0146] Specifically, the decoding device may derive an intra-frame prediction mode for the current block based on the received prediction mode information (S700). The decoding device may derive neighboring reference samples for the current block (S710). The decoding device generates prediction samples in the current block based on the intra-frame prediction mode and the neighboring reference samples (S720). 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 prediction samples may be filtered through the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0147] The decoding apparatus generates residual samples for the current block based on the received residual information (S730). The decoding apparatus may generate reconstructed samples for the current block based on the predicted samples and the residual samples, and derive a reconstructed block including the reconstructed samples (S740). A reconstructed picture for the current picture may be generated based on the reconstructed block.

[0148] Here, the intra-frame predictor 331 of the decoding device may include a prediction mode / type determiner 331-1, a reference sample deriver 331-2, and a prediction sample deriver 331-3. The prediction mode / type determiner 331-1 may determine the intra-frame prediction mode for the current block based on the prediction mode information obtained from the entropy decoder 310 of the decoding device, the reference sample deriver 331-2 may derive the neighboring reference samples of the current block, and the prediction sample deriver 331-3 may derive the prediction sample of the current block. Meanwhile, although not shown, when performing the above-mentioned prediction sample filtering process, the intra-frame predictor 331 may further include a prediction sample filter unit (not shown).

[0149] The prediction information may include intra-frame prediction mode information and / or intra-frame prediction type information. 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, and 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 candidate (MPM candidate) 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 candidate (MPM candidate). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information. A separate MPM list may be configured for the aforementioned MIP.

[0150] In addition, the intra-frame prediction type information can be implemented in various forms. For example, the intra-frame prediction type information may include intra-frame prediction type index information indicating one of the intra-frame prediction types. As another example, the intra-frame 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, if applied, which reference sample line is used (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 split 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-frame prediction type information may include a MIP flag indicating whether MIP is applied to the current block.

[0151] The intra-frame prediction mode information and / or the intra-frame prediction type information may be encoded / decoded by the coding method described in the present disclosure. For example, the intra-frame prediction mode information and / or the intra-frame prediction type information may be encoded / decoded by entropy coding (e.g., CABAC, CAVLC) based on truncated (Rice) binary code.

[0152] The predictor of the encoding / decoding device can derive prediction samples by performing inter-frame prediction on a block-by-block basis. Inter-frame prediction can be a prediction derived in a manner that depends on data elements (e.g., sample values or motion information) of pictures other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction sample array) for the current block can be derived based on a reference block (reference sample array) specified by a motion vector in a reference picture indicated by a reference picture index. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include information on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter-frame prediction is applied, neighboring blocks may include spatially neighboring blocks in the current picture and temporally neighboring blocks in a reference picture. The reference picture including the reference block and the reference picture including the temporally neighboring blocks may be the same as or different from each other. Temporally neighboring blocks may be referred to as collocated reference blocks, collocated CUs (colCUs), and the reference picture including the temporally neighboring blocks may be referred to as collocated pictures (colPics). For example, a motion information candidate list may be configured based on neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Inter-frame prediction may be performed based on various prediction modes, and for example, in skip mode and merge mode, the motion information of the current block may be the same as that of the neighboring blocks. In skip mode, unlike merge mode, a residual signal may not be transmitted. In motion vector prediction (MVP) mode, the motion vector of the selected neighboring block is 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 using the sum of the motion vector predictor and the motion vector difference.

[0153] Figure 9 This is a flowchart for describing a block reconstruction method based on intra-frame prediction in an encoding device. Figure 10 is a diagram illustrating an inter-frame predictor in an encoding device.

[0154] S900 may be performed by the inter-frame predictor 221 of the encoding device, and S910 to S930 may be performed by the residual processor 230 of the encoding device. Specifically, S910 may be performed by the subtractor 231 of the encoding device, S920 may be performed by the transformer 232 and quantizer 233 of the encoding device, and S930 may be performed by the dequantizer 234 and inverse transformer 235 of the encoding device. In S900, prediction information may be derived by the inter-frame predictor 221 and encoded by the entropy encoder 240. Residual information may be derived through S910 and S920 and encoded by the entropy encoder 240. Residual information is information about residual samples. The residual information may include information about quantized transform coefficients for the residual samples. As described above, the residual samples may be derived into transform coefficients by the transformer 232 of the encoding device, and the transform coefficients may be derived into quantized transform coefficients by the quantizer 233. Information about the quantized transform coefficients may be encoded by the entropy encoder 240 through a residual encoding process.

[0155] The encoding device performs inter prediction on the current block (S900). The encoding device may derive an inter prediction mode and motion information of the current block, and generate prediction samples of the current block. Here, the processes for determining the inter prediction mode, deriving motion information, and generating prediction samples may be performed simultaneously, or one process may be performed before the other process. For example, the inter predictor 221 of the encoding device may include a prediction mode determiner 221-1, a motion information deriver 221-2, and a prediction sample deriver 221-3, and the prediction mode determiner 221-1 may determine a prediction mode for the current block, the motion information deriver 221-2 may derive motion information of the current block, and the prediction sample deriver 221-3 may derive motion samples of the current block. For example, the inter predictor 221 of the encoding device may search for a block similar to the current block within a predetermined area (search area) of a reference picture through motion estimation, and derive a reference block whose difference with the current block is equal to or less than a minimum value or a specific criterion. Based on this, a reference picture index indicating the reference picture in which the reference block is located can be derived, and a motion vector can be derived based on the difference between the position of the reference block and the position of the current block. The encoding device can determine a mode to be applied to the current block from among various prediction modes. The encoding device can compare the RD costs for various prediction modes and determine the optimal prediction mode for the current block.

[0156] For example, when skip mode or merge mode is applied to the current block, the encoding device may construct a merge candidate list (to be described later) and derive a reference block having a minimum difference or a predetermined criterion or less from the current block 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 selected merge candidate may be used to derive the motion information of the current block.

[0157] As another example, when applying the (A)MVP mode to the current block, the encoding device may construct an (A)MVP candidate list to be described later, and may use the motion vector of an MVP candidate selected from 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, the motion vector indicating the reference block derived by the above-mentioned motion estimation may 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 may be the selected MVP candidate. A motion vector difference (MVD) may be derived as the difference obtained by subtracting the MVP from the motion vector of the current block. In this case, information about the MVD may be signaled to the decoding device. In addition, when applying the (A)MVP mode, the value of the reference picture index may be separately signaled to the decoding device by constructing reference picture index information.

[0158] The encoding apparatus may derive residual samples based on the predicted samples (S910). The encoding apparatus may derive residual samples by comparing original samples of the current block with the predicted samples.

[0159] The encoding apparatus transforms / quantizes the residual samples to derive quantized transform coefficients (S920), and then dequantizes / inverse-transforms the quantized transform coefficients again to derive (modified) residual samples (S930). The reason for performing dequantization / inverse-transformation again after transform / quantization is to derive the same residual samples as the residual samples derived from the decoding apparatus as described above.

[0160] The encoding apparatus may generate a reconstructed block including reconstructed samples for the current block based on the prediction samples and the (modified) residual samples (S940). A reconstructed picture for the current picture may be generated based on the reconstructed block.

[0161] Although not shown, as described above, the encoding device can encode image information including prediction information and residual information. The encoding device can output the encoded image information in the form of a bitstream. Prediction information is information related to the prediction process and can include prediction mode information (for example, a skip flag, a merge flag, or a mode index, etc.) and motion information. Information about motion information may include candidate selection information (for example, a merge index, an mvp flag, or an mvp index) as information for deriving a motion vector. In addition, the information about motion information may include the above-mentioned MVD information and / or reference picture index information. In addition, the information about motion information may include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. Residual information is information about residual samples. The residual information may include information about quantized transform coefficients used for the residual samples.

[0162] The output bitstream may be stored in a (digital) storage medium and sent to the decoding device, or may be sent to the decoding device over a network.

[0163] Figure 11 This is a flowchart for describing a block reconstruction method based on inter-frame prediction in a decoding device. Figure 12 is a diagram illustrating an inter-frame predictor in a decoding device.

[0164] The decoding device may perform an operation corresponding to the operation performed by the encoding device.

[0165] S1100 to S1120 may be performed by the inter-frame predictor 332 of the decoding device, and the prediction information of S1100 and the residual information of S1130 may be obtained from the bitstream by the entropy decoder 310 of the decoding device. The residual processor 320 of the decoding device may derive residual samples for the current block based on the residual information. Specifically, the dequantizer 321 of the residual processor 320 may derive transform coefficients by performing dequantization based on the quantized transform coefficients derived based on the residual information, and the inverse transformer 322 of the residual processor may derive residual samples for the current block by performing an inverse transform on the transform coefficients. S1140 may be performed by the adder 340 or the reconstructor of the decoding device.

[0166] Specifically, the decoding apparatus may determine a prediction mode for the current block based on the received prediction information ( S1100 ).The decoding apparatus may determine which inter prediction mode to apply to the current block based on prediction mode information in the prediction information.

[0167] For example, based on the merge flag, it can be determined whether the merge mode is applied to the current block or whether the (A)MVP mode is determined. Alternatively, one of various inter-frame prediction mode candidates can be selected based on the mode index. The inter-frame prediction mode candidate may include skip mode, merge mode and / or (A)MVP mode, or may include various inter-frame prediction modes to be described later.

[0168] The decoding device derives the motion information of the current block based on the determined inter-frame prediction mode (S1110). For example, when skip mode or merge mode is applied to the current block, the decoding device can construct a merge candidate list and select a merge candidate from the merge candidates included in the merge candidate list. The selection can be performed based on the above-mentioned selection information (merge index). The motion information of the selected merge candidate can be used to derive the motion information of the current block. The motion information of the selected merge candidate can be used as the motion information of the current block.

[0169] As another example, when applying the (A)MVP mode to the current block, the decoding device may construct an (A)MVP candidate list to be described later, and may use the motion vector of a motion vector predictor (MVP) candidate selected from among the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. The selection may be performed based on the above-mentioned 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 MVP and MVD 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.

[0170] At the same time, as described below, the motion information of the current block can be derived without constructing a candidate list, and in this case, the motion information of the current block can be derived according to the process disclosed in the prediction mode to be described later. In this case, the candidate list configuration as described above can be omitted.

[0171] The decoding apparatus may generate prediction samples of the current block based on the motion information of the current block (S1120). In this case, a reference picture may be derived based on a reference picture index of the current block, and the prediction samples of the current block may be derived using samples of the reference block indicated by the motion vector of the current block on the reference picture. In this case, as described below, in some cases, a prediction sample filtering process may be further performed on all or some of the prediction samples of the current block.

[0172] For example, the inter-frame predictor 332 of the decoding device may include a prediction mode determiner 332_1, a motion information deriver 332_2 and a prediction sample deriver 332_3, and the prediction mode determiner 332_1 can determine the prediction mode for the current block based on the received prediction mode information, the motion information deriver 332_2 can derive the motion information (motion vector and / or reference picture index, etc.) of the current block based on the received information about the motion information, and the prediction sample deriver 332_3 can derive the prediction sample of the current block.

[0173] The decoding apparatus generates residual samples for the current block based on the received residual information (S1130). The decoding apparatus may generate reconstructed samples for the current block based on the predicted samples and the residual samples, and derive a reconstructed block including the reconstructed samples (S1140). A reconstructed picture for the current picture may be generated based on the reconstructed block.

[0174] 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, and merge with MVD (MMVD) mode can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bi-prediction with CU-level weights (BCW), bidirectional optical flow (BDOF), etc. can also be used in addition or alternatively as additional modes. Affine mode can be referred to as affine motion prediction mode. MVP mode can be referred to as advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived by some modes can be included as one of the motion information candidates of other modes. For example, an HMVP candidate can be added as a merge candidate in merge / skip mode or can be added as an MVP candidate in MVP mode.

[0175] Prediction mode information indicating the inter prediction mode of the current block can be signaled from the encoding device to the decoding device. The prediction mode information can 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, a skip flag may be signaled to indicate whether the skip mode is applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether the merge mode is applied, and if the merge mode is not applied, an MVP mode is to be applied, or a flag for additional classification may be further signaled. The affine mode may be signaled in an independent mode or may be signaled in a 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] At the same time, information indicating whether the above-mentioned list0 (L0) prediction, list1 (L1) prediction, or bi-prediction is used in the current block (current coding unit) can be signaled in the current block. This information can be called motion prediction direction information, inter-frame prediction direction information, or inter-frame prediction indication information, and can be configured / encoded / signaled in the form of, for example, an inter_pred_idc syntax element. That is, the inter_pred_idc syntax element can indicate whether the above-mentioned list0 (L0) prediction, list1 (L1) prediction, or bi-prediction is used for the current block (current coding unit). In this document, for convenience of description, the inter-frame prediction type (L0 prediction, L1 prediction, or BI prediction) indicated by the inter_pred_idc syntax element can be indicated as a motion prediction direction. L0 prediction can be expressed as pred_L0, L1 prediction can be expressed as pred_L1, and paired prediction can be expressed as pred_BI. For example, the following prediction types can be determined according to the value of the inter_pred_idc syntax element.

[0177] [Table 1]

[0178]

[0179] As described above, a picture may include one or more slices. A slice may have one of slice types including an intra (I) slice, a predicted (P) slice, and a bidirectional predicted (B) slice. The slice type may be indicated based on slice type information. For blocks in an I slice, inter prediction may not be used for prediction, and only intra prediction may be used. Of course, even in this case, the original sample values may be encoded and signaled without prediction. Intra prediction or inter prediction may be used for blocks in a P slice, and only unidirectional prediction may be used when inter prediction is used. Meanwhile, intra prediction or inter prediction may be used for blocks in a B slice, and up to bidirectional prediction may be used when inter prediction is used.

[0180] L0 and L1 may include reference pictures that were previously encoded / decoded before the current picture. For example, L0 may include reference pictures that are before and / or after the current picture in POC order, and L1 may include reference pictures that are after and / or before the current picture in POC order. In this case, L0 may be assigned a reference picture index that is lower than the current picture relative to the previous reference picture in the POC order, and L1 may be assigned a reference picture index that is lower than the current picture relative to the subsequent reference picture in the POC order. In the case of B slices, bi-prediction may be applied, and in this case, unidirectional bi-prediction may be applied or bi-directional bi-prediction may be applied. Bi-directional bi-prediction may be referred to as true bi-prediction.

[0181] As described above, a residual block (residual sample) can be derived based on a prediction block (prediction sample) derived by prediction at the encoding stage, and a residual sample transformed / quantized by residual information can be generated. The residual information may include information about the quantized transform coefficients. The residual information may be included in the video / image information, and the video / image information may be encoded and sent to a decoding device in the form of a bitstream. The decoding device may obtain the residual information from the bitstream and may derive the residual sample based on the residual information. Specifically, the decoding device may derive the quantized transform coefficients based on the residual information and may derive the residual block (residual sample) through a dequantization / inverse transform process.

[0182] At the same time, at least one process of (inverse) transformation and / or (de)quantization may be omitted.

[0183] Hereinafter, the in-loop filtering process performed on the reconstructed picture will be described. Modified reconstructed samples, blocks, pictures (or modified filtered samples, blocks, pictures) can be generated by the in-loop filtering process, and the modified (modified and filtered) reconstructed pictures can be output as decoded pictures at the decoding device and can also be stored in the decoded image buffer or memory of the encoding device / decoding device and used as reference pictures in the inter-frame prediction process when the picture is later encoded / decoded. The in-loop filtering process may include the deblocking filtering process, sample adaptive offset (SAO) process and / or adaptive loop filter (ALF) process as described above. In this case, one or some of the deblocking filtering process, sample adaptive offset (SAO) process, adaptive loop filter (ALF) process and bilateral filter process can be applied sequentially or all can be applied sequentially. For example, the SAO process can be performed after the deblocking filtering process is applied to the reconstructed picture. Or, for example, the ALF process can be performed after the deblocking filtering process is applied to the reconstructed picture. This can also be performed in the encoding device.

[0184] Deblocking filtering is a filtering technique that removes distortion at the boundaries between blocks in a reconstructed image. For example, the deblocking filtering process can derive a target boundary from the reconstructed image, determine the boundary strength (bS) of the target boundary, and perform deblocking filtering on the target boundary based on the bS. The bS can be determined based on the prediction mode of the two blocks adjacent to the target boundary, the difference in motion vectors, whether the reference pictures are the same, the presence of non-zero significant coefficients, and other factors.

[0185] SAO is a method for compensating for the offset difference between the reconstructed image and the original image on a sample basis. For example, SAO can be applied based on types such as band offset, edge offset, etc. According to SAO, samples can be classified into different categories according to each SAO type, and an offset value can be added to each sample based on the category. Filter information for SAO may include information on whether SAO is applied, SAO type information, and SAO offset value information. SAO can be applied to the reconstructed image after deblocking filtering is applied.

[0186] An adaptive loop filter (ALF) is a technique for filtering a reconstructed picture on a sample-by-sample basis using filter coefficients according to a filter shape. The encoding device can determine whether to apply the ALF, the ALF shape, and / or ALF filter coefficients by comparing the reconstructed picture with the original picture, and can notify the decoding device of this information using a signal. That is, the filter information used for the ALF may include information on whether the ALF is applied, ALF filter shape information, ALF filter coefficient information, and the like. The ALF can be applied to the reconstructed picture after deblocking filtering has been applied.

[0187] Figure 13An example of the shape of the ALF filter is shown.

[0188] Figure 13 (a) shows the shape of a 7x7 diamond filter, Figure 13 (b) shows the shape of a 5x5 diamond filter. Figure 13 In 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 to which the filter coefficient is assigned according to the filter shape of the ALF can be referred to as a filter tap. In this case, one filter coefficient can be assigned to each filter tap, and the arrangement of the filter taps can correspond to the filter shape. The filter tap located at the center of the filter shape can be referred to as a center filter tap. The same filter coefficient can be assigned to two filter taps with the same n value that are located at positions corresponding to each other relative to the center filter tap. For example, in the case of a 7x7 diamond filter shape, 25 filter taps are included, and since filter coefficients C0 to C11 are assigned in a centrally symmetrical form, only 13 filter coefficients can be used to assign the filter coefficients to the 25 filter taps. In addition, for example, in the case of a 5x5 diamond filter shape, 13 filter taps are included, and since filter coefficients C0 to C5 are assigned in a centrally symmetrical form, only 7 filter coefficients can be used to assign the filter coefficients to the 13 filter taps. For example, to reduce the amount of information about the signaled filter coefficients, 12 of the 13 filter coefficients for a 7x7 diamond filter shape are (explicitly) signaled, and one filter coefficient can be (implicitly) derived. Alternatively, for example, 6 of the 7 filter coefficients for a 5x5 diamond filter shape can be (explicitly) signaled, and one filter coefficient can be (implicitly) derived.

[0189] According to an embodiment of the present disclosure, ALF parameters for the ALF process may be signaled through an adaptive parameter set (APS), and the ALF parameters may be derived based on filter information or ALF data for the ALF process.

[0190] ALF is an in-loop filtering technique that can be applied in video / image coding as described above. ALF can be performed using a Wiener-based adaptive filter. This can be to minimize the mean square error (MSE) between the original sample and the decoded sample (or reconstructed sample). Advanced designs for ALF tools can incorporate syntax elements accessible in the SPS and / or slice header (or tile group header).

[0191] In this example, before filtering for each 4x4 luma block, geometric transformations such as rotations or diagonal and vertical flips can be applied to the filter coefficients f(k, l) and corresponding filter clipping values c(k, l) that depend on the gradient values calculated for the block. This is equivalent to applying these transformations to the samples in the filter support region. Creating other blocks to which the ALF is applied can be similar to arranging these blocks according to their directionality.

[0192] For example, three transformations can be performed based on the following equations: diagonal, vertical flip, and rotation.

[0193] [Equation 1]

[0194] Diagonal: f_D(k,l)=f(l,k), c_D(k,l)=c(l,k)

[0195] [Equation 2]

[0196] Vertical flip: f_V(k,l)=f(k,Kl-1), c_V(k,l)=c(k,Kl-1)

[0197] [Equation 3]

[0198] Rotation: f_R(k,l)=f(Kl-1,k), c_R(k,l)=c(Kl-1,k)

[0199] In equations 1 to 3, K may be the size of the filter. 0 ≤ k and 1 ≤ K-1 may be coefficient coordinates. For example, (0, 0) may be the upper left corner coordinate, and / or (K-1, K-1) may be the lower right corner coordinate. The relationship between the transform and the four gradients in the four directions can be summarized in the following table.

[0200] [Table 2]

[0201] Gradient value Transform <![CDATA[g d2 <g d1 And g h <g v ]]> No transformation <![CDATA[g d2 <g d1 And g v <g h ]]> diagonal <![CDATA[g d1 <g d2 And g h <g v ]]> Flip vertically <![CDATA[g d1 <g d2 And g v <g h ]]> Rotation

[0202] ALF filter parameters can be signaled in the APS and slice header. In one APS, up to 25 luma filter coefficients and clipping value indices can be signaled. In one APS, up to 8 chroma filter coefficients and clipping value indices can be signaled. To reduce bit overhead, filter coefficients of different classifications for luma components can be merged. In the slice header, the index of the APS for the current slice (referenced by the current slice) can be signaled.

[0203] The clip value index decoded from the APS can make it possible to determine the clip value using the clip value's luminance table and the clip value's chrominance table. These clip values may depend on the internal bit depth. More specifically, the clip value's luminance table and the clip value's chrominance table can be derived based on the following equations.

[0204] [Equation 4]

[0205] AlfClipL = {round(2^(B(N-n+1) / N)) for n∈[1..N]}

[0206] [Equation 5]

[0207] AlfClipC = {round(2^((B-8)+8((Nn)) / (N-1))) for n∈[1..N]}

[0208] In the above equation, B may be the internal bit depth, and N may be the number of allowable clipping values (a predetermined number). For example, N may be 4.

[0209] In the slice header, up to 7 APS indices can be signaled to indicate the luma filter set for the current slice. The filtering process can be further controlled at the CTB level. For example, a flag indicating whether the ALF is applied to the luma CTB can be signaled. The luma CTB can select one of 16 fixed filter sets and a filter set from the APS. A filter set index can be signaled for the luma CTB to indicate which filter set is applied. The 16 fixed filter sets can be predefined and hard-coded in both the encoder and decoder.

[0210] For chroma components, an APS index may be signaled in the slice header to indicate the chroma filter set used for the current slice. At the CTB level, when two or more chroma filter sets are present in the APS, a filter index may be signaled for each chroma CTB.

[0211] The filter coefficients may be quantized with a norm of 128. To limit the multiplication complexity, bitstream conformance may be applied such that the coefficient values at non-center positions may vary from 0 to 28 and / or the coefficient values at the remaining positions may range from -27 to 27-1. The center position coefficient may not be signaled in the bitstream and may be predetermined (considered) to be 128.

[0212] When ALF is available for the current block, each sample R(i, j) may be filtered, and the filtering result R'(i, j) may be expressed by the following equation.

[0213] [Equation 6]

[0214] R′(i, j)=R(i, j)+((∑ k≠0 ∑ l≠0f(k,l)×K(R(i+k,j+l)-R(i,j),c(k,l))+64)>>7)

[0215] In the above equation, f(k, l) can be the decoding filter coefficients, K(x, y) can be the clipping function, and c(k, l) can be the decoding clipping parameter. For example, the variables k and / or l can vary from -L / 2 to L / 2. Here, L can represent the filter length. The clipping function K(x, y) = min(y, max(-y, x)) can correspond to the function Clip3(-y, y, x).

[0216] In an example, to reduce the line buffer requirements of the ALF, modified block classification and filtering may be applied for samples adjacent to horizontal CTU boundaries. For this purpose, a virtual boundary may be defined.

[0217] Figure 14 is a diagram for describing a virtual boundary applied to a filtering process according to an embodiment of the present disclosure. Figure 15 is a diagram illustrating an example of an ALF process using a virtual boundary according to an embodiment of the present disclosure. Figure 14 describe Figure 15 .

[0218] refer to Figure 14 , the virtual boundary may be a line defined by shifting the horizontal CTU boundary by N samples. In one example, N may be 4 for the luma component and / or 2 for the chroma components.

[0219] exist Figure 14 In

[15] , a modified block classification can be applied to the luma component. For the 1D Laplacian gradient calculation of a 4x4 block on a virtual boundary, only samples above the virtual boundary can be used. Similarly, to calculate the 1D Laplacian gradient of a 4x4 block below the virtual boundary, only samples below the virtual boundary can be used. Given the reduced number of samples used in the 1D Laplacian gradient calculation, the quantization of the activity value A can be scaled accordingly.

[0220] For the filtering process, symmetric padding operations at the imaginary boundaries can be applied to both luma and chroma components. Figure 15 When a filtered sample is below a virtual boundary, the adjacent samples above the virtual boundary can be filled in. At the same time, the corresponding samples on the other side can also be filled in symmetrically.

[0221] When no filter is enabled across the boundary, refer to Figure 15The described process can also be applied to slice, brick, and / or tile boundaries. For ALF block classification, only samples included in the same slice, brick, and / or tile can be used and the activity values can be scaled accordingly. For ALF filtering, symmetric padding can be applied in each of the horizontal and / or vertical directions relative to the horizontal and / or vertical boundaries.

[0222] Figure 16 1 is a diagram for describing a cross-component adaptive loop filtering (CCALF (CC-ALF)) process according to an embodiment of the present disclosure. The CCALF process may be referred to as a cross-component filtering process.

[0223] In one aspect, the ALF process may include a general ALF process and a CCALF process. That is, the CCALF process may be referred to as some processes of the ALF process. In another aspect, the filtering process may include a deblocking process, an SAO process, an ALF process, and / or a CCALF process.

[0224] CC-ALF can use luma sample values to refine each chroma component. CC-ALF is controlled by (image) information of the bitstream, and the image information may include (a) information about filter coefficients for each chroma component and (b) information about masks for controlling the application of filters to blocks of samples. The filter coefficients may be signaled at the APS, and the block size and mask may be signaled at the slice level.

[0225] refer to Figure 16 , can be obtained by applying a linear diamond filter ( Figure 16 (b)) to operate CC-ALF. The filter coefficients are sent to the APS, scaled by a factor of 210, and rounded up to obtain a fixed-point representation. The application of the filter can be controlled at a variable block size and signaled by a context coding flag received for each block of samples. The block size and CC-ALF enable flag can be received at the slice level for each chroma component. The block size (for chroma samples) can be 16x16, 32x32, 64x64, or 128x128.

[0226] In the following embodiments, a method of re-filtering or modifying the reconstructed chroma samples that have passed the ALF filtering based on the reconstructed luma samples will be proposed.

[0227] Embodiments of the present disclosure relate to filter on / off transmission and filter coefficient transmission in CC-ALF. As described above, the information (syntax elements) in the syntax table disclosed in the present disclosure can be included in the image / video information, can be configured / encoded in the encoding device, and can be sent to the decoding device in the form of a bitstream. The decoding device can parse / decode the information (syntax elements) in the corresponding syntax table. The decoding device can perform a picture / image / video decoding process (specifically, for example, a CC-ALF process) based on the decoded information. Hereinafter, the same applies to other examples.

[0228] According to an embodiment of the present disclosure, in order to determine whether to use (apply) CCALF, a sequence parameter set (SPS) may include a CCALF enable flag (sps_ccalf_enable_flag). The CCALF enable flag may be transmitted independently of an ALF enable flag (sps_alf_enabled_flag) used to determine whether to use (apply) ALF.

[0229] The following table shows an exemplary syntax of the SPS according to this embodiment.

[0230] [Table 3]

[0231]

[0232]

[0233]

[0234]

[0235] The following table shows exemplary semantics of the CC-ALF enabled flag included in the table: The CC-ALF enabled flag may indicate (may be related to) whether CC-ALF is enabled.

[0236] [Table 4]

[0237]

[0238] In another example of this embodiment, when the CC-ALF enable flag is sent, the conditions for ChromaArrayType may be determined as shown in the following table.

[0239] [Table 5]

[0240]

[0241]

[0242]

[0243]

[0244] Referring to the above table, when ChromaArrayType is not 0, the SPS may include a CC-ALF enable flag. For example, when ChromaArrayType is not 0, the chroma format may not be monochrome, and in this case, the CCALF enable flag may be transmitted through the SPS.

[0245] The following table shows exemplary semantics of the CC-ALF enabled flags included in the table.

[0246] [Table 6]

[0247]

[0248] The image information may include an SPS. The SPS may include a first ALF enable flag (sps_alf_enabled_flag) related to whether ALF is enabled. For example, based on a determination that the value of the first ALF enable flag is 1, the SPS may include a CCALF enable flag related to whether cross-component filtering is enabled.

[0249] In an embodiment of the present disclosure, general constraint information for defining profiles and levels may include a constraint flag for CC-ALF. In one example, the syntax of the general constraint information may be expressed as in the following table.

[0250] [Table 7]

[0251]

[0252] The following table shows exemplary semantics of the CC-ALF constraint flags included in the table.

[0253] [Table 8]

[0254]

[0255] The image information may include general constraint information. For example, the general constraint information may include a CCALF constraint flag for constraining cross-component filtering based on the value of the CCALF enable flag included in the SPS. When the value of the CCALF constraint flag is 0, the CCALF constraint may not be applied. A CCALF constraint flag having a value of 1 may indicate that the value of the CCALF enable flag included in the SPS is 0.

[0256] According to an embodiment of the present disclosure, a slice_cross_component_alf_cb_enabled_flag flag may be added in slice units to determine whether CC-ALF is used. The slice_cross_component_alf_cb_enabled_flag flag may be transmitted when the sps_ccalf_enabled_flag flag is 1. Alternatively, the slice_ccalf_enable_flag flag may be transmitted when the sps_ccalf_enabled_flag flag is 1 and ChromaArrayType is not 0.

[0257] For example, when the slice_cross_component_alf_cb_enabled_flag flag value is 1, the syntax slice_cross_component_alf_cb_reuse_temporal_layer_filter may be additionally transmitted. When this syntax value is 0, the syntax slice_cross_component_alf_cb_aps_id may be transmitted. The syntax slice_cross_component_alf_cb_log2_control_size_minus4 for the block size used for CC-ALF may be transmitted.

[0258] The following table is an exemplary syntax of slice header information according to the above embodiment.

[0259] [Table 9]

[0260]

[0261]

[0262]

[0263]

[0264] The following table is an exemplary syntax of slice header information according to the above embodiment.

[0265] [Table 10]

[0266]

[0267]

[0268] According to an embodiment of the present disclosure, a slice_ccalf_enable_flag flag may be added in slice units to determine whether CC-ALF is used. The slice_ccalf_enable_flag flag may be transmitted when the sps_ccalf_enabled_flag flag is 1. Alternatively, the slice_ccalf_enable_flag flag may be transmitted when the sps_ccalf_enabled_flag flag is 1 and ChromaArrayType is not 0.

[0269] For example, when the slice_ccalf_enable_flag flag value is 1, slice_ccalf_chroma_idc syntax and slice_ccalf_aps_id_chroma syntax may be additionally transmitted. The slice_ccalf_chroma_idc syntax indicates whether Cb or Cr is applied, and the slice_ccalf_aps_id_chroma syntax indicates an APS id referenced for a corresponding slice CC-ALF.

[0270] The following table shows the syntax of slice header information according to this embodiment.

[0271] [Table 11]

[0272]

[0273]

[0274]

[0275]

[0276] The following table shows the semantics of the syntax elements included in the table.

[0277] [Table 12]

[0278]

[0279]

[0280] Alternatively, the syntax element slice_ccalf_chroma_idc in the above table may be described based on semantics as shown in the following table.

[0281] [Table 13]

[0282]

[0283] According to an embodiment of the present disclosure, CC-ALF can be performed at the slice level without adding an enabling flag (or information similar thereto). The following table shows some syntax of slice header information according to this embodiment.

[0284] [Table 14]

[0285]

[0286] The following table shows the semantics of the syntax elements included in the table.

[0287] [Table 15]

[0288]

[0289] According to an embodiment of the present disclosure, the syntax element slice_ccalf_chroma_idc may be included in the slice header information based on the condition of ChromaArrayType. The following table shows some syntaxes of the slice header information according to this embodiment.

[0290] [Table 16]

[0291]

[0292] In an example, the header information (slice_header()) includes a first flag (slice_cross_component_alf_cb_enabeld_flag or sh_cc_alf_cb_enabeld_flag) related to whether CCALF is enabled for the Cb color component of the filtered reconstructed chroma samples and a second flag (slice_cross_component_alf_cr_enabeld_flag or sh_cc_alf_cr_enabeld_flag) related to whether CCALF can be used for the Cr color component of the filtered reconstructed chroma samples.

[0293] In an example, based on determination that a value of the first flag (slice_cross_component_alf_cb_enabeld_flag or sh_cc_alf_cb_enabeld_flag) is 1, the header information may include information (slice_cross_cb_aps_id_id or sh_cc_alf_cb_aps_id) about an identifier of an APS for deriving a cross-component filter coefficient for a Cb color component.

[0294] In one example, based on determination that the value of the second flag (slice_cross_component_alf_cr_enabeld_flag or sh_cc_alf_cr_enabeld_flag) is 1, the header information may include information (slice_cross_component_id_cross_component_id_flag or sh_cc_alf_cr_aps_id) about an identifier of an APS for deriving cross-component filter coefficients for Cr color components.

[0295] According to an embodiment of the present disclosure, cross-component filter coefficients for CC-ALF may be transmitted via an APS. In one example, an APS for CC-ALF may be defined.

[0296] The following table shows an exemplary syntax of the APS according to this embodiment.

[0297] [Table 17]

[0298]

[0299] In the above table, alf_data() can be referred to as general ALF data, and ccalf_data() can be referred to as CCALF data. ALF data can include general ALF data and / or CCALF data. In one example, ALF data can be the same as CCALF data. In another example, ALF data can be different from CCALF data.

[0300] The following table shows the semantics of the syntax elements included in the table.

[0301] [Table 18]

[0302]

[0303] The ALF data according to an embodiment of the present disclosure may be expressed using the syntax shown in the following table.

[0304] [Table 19]

[0305]

[0306] The semantics of the syntax elements included in the table can be expressed as shown in the following table.

[0307] [Table 20]

[0308]

[0309]

[0310]

[0311] In another example, the syntax related to ALF data may be expressed as shown in the following table.

[0312] [Table 21]

[0313]

[0314] The semantics of the syntax elements included in the table can be shown in the following table.

[0315] [Table 22]

[0316]

[0317]

[0318] In the table, the order of exp-Golomb binarization used to parse the syntax of alf_cross_component_cb_coeff_abs[j] and alf_cross_component_cr_coeff_abs[j] may be defined as one of values 0 to 9.

[0319] In another example, the syntax related to ALF data may be expressed as shown in the following table.

[0320] [Table 23]

[0321]

[0322] In the table, information about the absolute value of the filter coefficient and / or information about the sign of the filter coefficient may be expressed as a quadratic vector, a quadratic matrix, or a quadratic array (e.g., alf_cross_component_cb_coeff_abs[altIdx][j], alf_cross_component_cb_coeff_sign[altIdx][j], alf_cross_component_cr_coeff_abs[altIdx][j], alf_cross_component_cr_coeff_sign[altIdx][j]). In an example, information about the number of filters, information about the absolute value of the filter coefficient, and / or information about the sign of the filter coefficient may be included in general ALF data.

[0323] The semantics of the syntax elements included in the table can be shown in the following table.

[0324] [Table 24]

[0325]

[0326]

[0327] The order of exp-Golomb binarization used to parse the syntax of alf_cross_component_cb_coeff_abs[j] and alf_cross_component_cr_coeff_abs[j] may be defined as one of values 0 to 9.

[0328] The cross-component filter coefficients may be referred to as CCALF filter coefficients. The cross-component filter coefficients may include a cross-component filter coefficient for a Cb color component and a cross-component filter coefficient for a Cr color component. The information about the value of the cross-component filter coefficient for the Cb color component (Cr color component) may include information about the value of the cross-component filter coefficient for the Cb color component (Cr color component) and / or information about the sign of the cross-component filter coefficient for the Cb color component (Cr color component).

[0329] In one example, the ALF data included in the APS for deriving the cross-component filter coefficients for the Cb color component may include a Cb filter signal flag (alf_cross_component_cb_filter_signal_flag or alf_cc_cb_filter_signal_flag) related to whether the cross-component filter for the Cb color component is signaled. Based on the Cb filter signal flag, the ALF data included in the APS for deriving the cross-component filter coefficients for the Cb color component may include information related to the number of cross-component filters for the Cb color component (ccalf_cb_num_alt_filters_minus1 or alf_cc_cb_filters_signalled_minus1). Based on the information about the number of cross-component filters for the Cb color component, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component may include information about the absolute value of the cross-component filter coefficient for the Cb color component (alf_cross_component_cb_coeff_abs or alf_cc_cb_mapped_coeff_abs) and information about the sign of the cross-component filter coefficient for the Cb color component (alf_cross_component_cb_coeff_sign or alf_cc_cb_coeff_sign). The cross-component filter coefficient for the Cb color component (ccalfcoeff or ccalfapscoeff) may be derived based on the information about the absolute value of the cross-component filter coefficient for the Cb color component and the information about the sign of the cross-component filter coefficient for the Cb color component. For example, the information about the number of cross-component filters for the Cb color component may be zero-order exponential Golomb (0EG, ue(v), or ue(k)) coded.

[0330] In one example, the ALF data included in the APS for deriving the cross-component filter coefficients for the Cr color component may include a Cr filter signal flag (alf_cross_component_cr_filter_signal_flag or alf_cc_cr_filter_signal_flag) related to whether the cross-component filter for the Cr color component is signaled. Based on the Cr filter signal flag, the ALF data included in the APS for deriving the cross-component filter coefficients for the Cr color component may include information related to the number of cross-component filters for the Cr color component (ccalf_cr_num_alt_filters_minus1 or alf_cc_cr_filters_signalled_minus1). Based on the information about the number of cross-component filters for the Cr color component, the ALF data included in the APS for deriving the cross-component filter coefficients for the Cr color component may include information about the absolute value of the cross-component filter coefficients for the Cr color component (alf_cross_component_cr_coeff_abs or alf_cc_cr_mapped_coeff_abs) and information about the sign of the cross-component filter coefficients for the Cr color component (alf_cross_component_cr_coeff_sign or alf_cc_cr_coeff_sign). The cross-component filter coefficients for the Cr color component (ccalfcoeff or ccalfapscoeff) may be derived based on the information about the absolute value of the cross-component filter coefficients for the Cr color component and the information about the sign of the cross-component filter coefficients for the Cr color component. For example, the information about the number of cross-component filters for the Cr color component may be zero-order exponential Golomb (0EG, ue(v), or ue(k)) coded.

[0331] According to an embodiment of the present disclosure, CC-ALF related information can be transmitted in units of CTU (block) to control filter on / off of CC-ALF.

[0332] The following table shows an exemplary syntax of a coding tree unit according to this embodiment.

[0333] [Table 25]

[0334]

[0335] The following table shows exemplary semantics of the syntax elements included in the table.

[0336] [Table 26]

[0337]

[0338] In another example of this embodiment, the syntax of the relevant coding tree unit can be expressed as the following table.

[0339] [Table 27]

[0340]

[0341]

[0342] The following table shows exemplary semantics of the syntax elements included in the table.

[0343] [Table 28]

[0344]

[0345] In an example, the image information may include information about a coding tree unit (coding_tree_unit()). The information about the coding tree unit may include information about whether a cross-component filter is applied to the current block of the Cb color component (ccalf_ctb_flag[0]) and / or information about whether a cross-component filter is applied to the current block of the Cr color component (ccalf_ctb_flag[1]). In addition, the information about the coding tree unit may include information about a filter set index of a cross-component filter applied to the current block of the Cb color component (ccalf_ctb_filter_alt_idx[0]) and / or information about a filter set index of a cross-component filter applied to the current block of the Cr color component (ccalf_ctb_filter_alt_idx[1]).

[0346] Figure 17 and Figure 18 is a diagram schematically illustrating an example of a video / image encoding method and related components according to an embodiment of the present disclosure.

[0347] Figure 17 The method disclosed in Figure 2 or Figure 18 Specifically, for example, Figure 17 The S1700 to S1730 can be Figure 18 The residual processor 230 of the encoding device performs, Figure 17 The S1740 can be Figure 18 The adder 250 of the encoding device performs, Figure 17 The S1750 can be Figure 18 The filter 260 of the encoding device performs, and Figure 17 The S1760 can be Figure 18 The entropy encoder 240 of the encoding device performs. In addition, although Figure 17 Not shown, but the prediction samples or prediction related information can be obtained by Figure 17 The predictor 220 of the encoding device may derive the information, and the entropy encoder 240 of the encoding device may generate a bitstream according to the residual information or the prediction-related information. Figure 17 The method disclosed in may include the embodiments described above in the present disclosure.

[0348] refer to Figure 17 , the encoding device may generate residual samples (S1700). The encoding device may generate residual samples for the current block, and may generate the residual samples of the current block based on the original samples and the predicted samples of the current block. Specifically, the encoding device may generate the predicted samples of the current block based on the prediction mode. In this case, various prediction methods disclosed in the present disclosure, such as inter-frame prediction or intra-frame prediction, may be applied. The residual samples may be generated based on the predicted samples and the original samples.

[0349] In one example, the encoding device may generate residual luma samples. The residual luma samples may be generated based on the original luma samples and the predicted luma samples. In one example, the encoding device may generate residual chroma samples. The residual chroma samples may be generated based on the original chroma samples and the predicted chroma samples.

[0350] The encoding apparatus may derive transform coefficients (S1710). The encoding apparatus may derive transform coefficients based on a transform process for the residual samples. The encoding apparatus may derive transform coefficients for the residual luma samples (luminance transform coefficients) and / or transform coefficients for the residual chroma samples (chroma transform coefficients). For example, the transform process may include at least one of DCT, DST, GBT, or CNT.

[0351] The encoding device may derive quantized transform coefficients (S1720). The encoding device may derive quantized transform coefficients based on a quantization process for the transform coefficients. The quantized transform coefficients may have a one-dimensional vector form based on a coefficient scanning order. The quantized transform coefficients may include quantized luma transform coefficients and / or quantized chroma transform coefficients.

[0352] The encoding apparatus may generate residual information (S1730). The encoding apparatus may generate residual information indicating (including) the quantized transform coefficient. The residual information may be generated by various encoding methods such as exponential Golomb, CAVLC, CABAC, etc.

[0353] The encoding device may generate reconstructed samples (S1740). The reconstructed samples may include reconstructed luma samples and / or reconstructed chroma samples. The encoding device may generate the reconstructed samples based on the residual information. The reconstructed samples may be generated by adding residual samples based on the residual information to the predicted samples. Specifically, the encoding device may perform prediction (intra-frame prediction or inter-frame prediction) on the current block and generate the reconstructed samples based on the original samples and the predicted samples generated according to the prediction.

[0354] The encoding device may generate ALF-related information and / or CCALF (CC-ALF)-related information for the reconstructed sample (S1750). The encoding device may generate ALF-related information for the reconstructed sample. The encoding device derives ALF-related parameters that can be applied to filter the reconstructed sample and generates ALF-related information. For example, the ALF-related information may include the ALF-related information described above in the present disclosure. The encoding device may generate CCALF-related information for the reconstructed chroma sample among the reconstructed samples.

[0355] The encoding device may encode the video / image information (S1760). The image information may include residual information, ALF-related information, and / or CCALF-related information. The encoded video / image information may be output in the form of a bitstream. The bitstream may be sent to the decoding device via a network or storage medium.

[0356] In one example, CCALF-related information may include a CCALF enable flag, a flag related to whether CCALF is enabled for the Cb (or Cr) color component, a Cb (or Cr) filter signal flag associated with whether a cross-component filter for the Cb (or Cr) color component is signaled, information related to the number of cross-component filters for the Cb (or Cr) color component, information about the values of the cross-component filter coefficients for the Cb (or Cr) color component, information about the absolute values of the cross-component filter coefficients for the Cb (or Cr) color component, information about the signs of the cross-component filter coefficients for the Cb (or Cr) color component, and / or information about whether the cross-component filter is applied to the current block of the Cb (or Cr) color component in the information about the coding tree unit (coding tree unit syntax).

[0357] The image / video information may include various pieces of information according to an embodiment of the present disclosure. For example, the image / video information may include information disclosed in at least one of Tables 1 to 28 above.

[0358] In an embodiment, the image information may include header information and an adaptive parameter set (APS). The header information may be slice header information. The header information may include information related to an identifier of the APS including the ALF data. For example, cross-component filter coefficients may be derived based on the ALF data.

[0359] In an embodiment, the image information may include a sequence parameter set (SPS). The SPS may include a cross-component adaptive loop filter (CCALF) enable flag related to whether cross-component filtering is enabled.

[0360] In an embodiment, the image information may include general constraint information. For example, the general constraint information may include a CCALF constraint flag for constraining cross-component filtering based on the value of the CCALF enable flag included in the SPS. When the value of the CCALF constraint flag is 0, the CCALF constraint may not be applied. A CCALF constraint flag having a value of 1 may indicate that the value of the CCALF enable flag included in the SPS is 0.

[0361] In an embodiment, the header information may include a first flag regarding whether CCALF is enabled for the Cb color component of the filtered reconstructed chroma samples, and a second flag regarding whether CCALF is enabled for the Cr color component of the filtered reconstructed chroma samples.

[0362] In an embodiment, based on the determination that the value of the first flag is 1, the header information may include information about an identifier of an APS used to derive cross-component filter coefficients for the Cb color component.

[0363] In an example, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component may include a Cb filter signal flag related to whether the cross-component filter for the Cb color component is signaled. Based on the Cb filter signal flag, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component may include information related to the number of cross-component filters for the Cb color component. Based on the information related to the number of cross-component filters for the Cb color component, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component may include information about the absolute value of the cross-component filter coefficient for the Cb color component and information about the sign of the cross-component filter coefficient for the Cb color component. The cross-component filter coefficient for the Cb color component can be derived based on the information about the absolute value of the cross-component filter coefficient for the Cb color component and the information about the sign of the cross-component filter coefficient for the Cb color component.

[0364] In an embodiment, the information about the number of cross-component filters for the Cb color component may be zero-order exponential-Golomb (0th EG) coded.

[0365] In an example, the image information may include information about a coding tree unit. The information about the coding tree unit may include information about whether a cross-component filter is applied to the current block of the Cb color component and / or information about whether a cross-component filter is applied to the current block of the Cr color component.

[0366] In an embodiment, the information about the coding tree unit may include information about a filter set index of a cross-component filter applied to the current block of the Cb color component and / or information about a filter set index of a cross-component filter applied to the current block of the Cr color component.

[0367] Figure 19 and Figure 20 is a diagram schematically illustrating an example of a video / image decoding method and related components according to an embodiment of the present disclosure.

[0368] Figure 19 The method disclosed in Figure 3 or Figure 20 Specifically, for example, Figure 19 S1900 may be performed by the entropy decoder 310 of the decoding device, S1910 to S1930 may be performed by the residual processor 320 of the decoding device, S1940 may be performed by the adder 340 of the decoding device, and S1950 to S1980 may be performed by the filter 350 of the decoding device. Figure 19 The method disclosed in may include the embodiments described above in the present disclosure.

[0369] refer to Figure 19, the decoding device may receive / obtain video / image information (S1900). The video / image information may include residual information. The decoding device may receive / obtain image / video information through a bitstream. In one example, the video / image information may also include CCAL related information. For example, the CCALF related information may include a CCALF enable flag, a flag related to whether CCALF is enabled for the Cb (or Cr) color component, a Cb (or Cr) filter signal flag associated with whether a cross component filter for the Cb (or Cr) color component is signaled, information related to the number of cross component filters for the Cb (or Cr) color component, information about the value of the cross component filter coefficient for the Cb (or Cr) color component, information about the absolute value of the cross component filter coefficient for the Cb (or Cr) color component, information about the sign of the cross component filter coefficient for the Cb (or Cr) color component, and / or information about whether a cross component filter is applied to the current block of the Cb (or Cr) color component in the information about the coding tree unit (coding tree unit syntax).

[0370] The image / video information may include various pieces of information according to an embodiment of the present disclosure. For example, the image / video information may include information disclosed in at least one of Tables 1 to 28 above.

[0371] The decoding apparatus may derive a quantized transform coefficient (S1910). The decoding apparatus may derive the quantized transform coefficient based on the residual information. The quantized transform coefficient may have a one-dimensional vector form based on a coefficient scanning order.

[0372] The decoding apparatus may derive a transform coefficient (S1920). The decoding apparatus may derive the transform coefficient based on a dequantization process for quantizing the transform coefficient.

[0373] The decoding apparatus may generate / derive residual samples (S1930). The decoding apparatus may derive residual samples based on an inverse transform process for transform coefficients.

[0374] The decoding apparatus may generate / derive reconstructed samples (S1940). The decoding apparatus may generate reconstructed samples based on the residual samples. The reconstructed samples may include reconstructed luma samples and / or reconstructed chroma samples. The luma component of the reconstructed samples may correspond to the reconstructed luma samples, and the chroma component of the reconstructed samples may correspond to the reconstructed chroma samples.

[0375] The decoding apparatus may derive ALF filter coefficients for an ALF process for reconstructing chroma samples (S1950). Additionally, the decoding apparatus may derive ALF filter coefficients for an ALF process for reconstructing luma samples. The ALF filter coefficients may be derived based on ALF parameters included in the ALF data in the APS.

[0376] The decoding apparatus may generate filtered reconstructed chroma samples (S1960).The decoding apparatus may generate filtered reconstructed samples based on the reconstructed chroma samples and the ALF filter coefficients.

[0377] The decoding apparatus may derive cross-component filter coefficients for cross-component filtering (S1970). The cross-component filter coefficients may be derived based on CCALF-related information in the ALF data included in the APS, and the identifier (ID) information of the corresponding APS may be included in the slice header (and signaled through the slice header).

[0378] The decoding device may generate a modified filtered reconstructed chroma sample (S1980). The decoding device may generate the modified filtered reconstructed chroma sample based on the reconstructed luminance sample, the filtered reconstructed chroma sample, and the cross-component filter coefficients. In an example, the decoding device may derive the difference between the two reconstructed luminance samples and multiply the difference by the filter coefficient of one of the cross-component filter coefficients. Based on the result of the multiplication and the filtered reconstructed chroma sample, the decoding device may generate the modified filtered reconstructed chroma sample. For example, the decoding device may generate the modified filtered reconstructed chroma sample based on the sum of the multiplication and one of the filtered reconstructed chroma samples.

[0379] In an embodiment, the image information may include header information and an adaptive parameter set (APS). The header information may be slice header information. The header information may include information related to an identifier of the APS including the ALF data. For example, cross-component filter coefficients may be derived based on the ALF data. The ALF data may be general ALF data or CCALF data.

[0380] In an embodiment, the image information may include an SPS. The SPS may include a CCALF enable flag related to whether cross-component filtering is enabled.

[0381] In an embodiment, the image information may include general constraint information. For example, the general constraint information may include a CCALF constraint flag for constraining cross-component filtering based on the value of the CCALF enable flag included in the SPS. When the value of the CCALF constraint flag is 0, the CCALF constraint may not be applied. A CCALF constraint flag having a value of 1 may indicate that the value of the CCALF enable flag included in the SPS is 0.

[0382] In an embodiment, the header information may include a first flag regarding whether CCALF is enabled for the Cb color component of the filtered reconstructed chroma samples, and a second flag regarding whether CCALF is enabled for the Cr color component of the filtered reconstructed chroma samples.

[0383] In an embodiment, based on the determination that the value of the first flag is 1, the header information may include information about an identifier of an APS used to derive cross-component filter coefficients for the Cb color component.

[0384] In an example, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component may include a Cb filter signal flag related to whether the cross-component filter for the Cb color component is signaled. Based on the Cb filter signal flag, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component may include information related to the number of cross-component filters for the Cb color component. Based on the information related to the number of cross-component filters for the Cb color component, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component may include information about the absolute value of the cross-component filter coefficient for the Cb color component and information about the sign of the cross-component filter coefficient for the Cb color component. The cross-component filter coefficient for the Cb color component can be derived based on the information about the absolute value of the cross-component filter coefficient for the Cb color component and the information about the sign of the cross-component filter coefficient for the Cb color component.

[0385] In an embodiment, the information about the number of cross-component filters for the Cb color component may be zero-order exponential-Golomb (0th EG) coded.

[0386] In an example, the ALF data included in the APS for deriving the cross-component filter coefficients for the Cr color component may include a Cr filter signal flag related to whether the cross-component filter for the Cr color component is signaled. Based on the Cr filter signal flag, the ALF data included in the APS for deriving the cross-component filter coefficients for the Cr color component may include information related to the number of cross-component filters for the Cr color component. Based on the information related to the number of cross-component filters for the Cr color component, the ALF data included in the APS for deriving the cross-component filter coefficients for the Cr color component may include information about the absolute value of the cross-component filter coefficients for the Cr color component and information about the sign of the cross-component filter coefficients for the Cr color component. The cross-component filter coefficients for the Cr color component may be derived based on the information about the absolute value of the cross-component filter coefficients for the Cr color component and the information about the sign of the cross-component filter coefficients for the Cr color component.

[0387] In an embodiment, the information about the number of cross-component filters for the Cr color component may be Zeroth Order Exponential Golomb (0th EG) coded.

[0388] In an embodiment, the image information may include information about a coding tree unit. The information about the coding tree unit may include information about whether a cross-component filter is applied to the current block of the Cb color component and / or information about whether a cross-component filter is applied to the current block of the Cr color component.

[0389] In an embodiment, the information about the coding tree unit may include information about a filter set index of a cross-component filter applied to the current block of the Cb color component and / or information about a filter set index of a cross-component filter applied to the current block of the Cr color component.

[0390] In the event that residual samples for the current block exist, the decoding device may receive information about the residual for the current block. The information about the residual may include transform coefficients for the residual samples. The decoding device may derive residual samples (or residual sample arrays) for the current block based on the residual information. Specifically, the decoding device may derive quantized transform coefficients based on the residual information. The quantized transform coefficients may have a one-dimensional vector form based on a coefficient scanning order. The decoding device may derive the transform coefficients based on a dequantization process for the quantized transform coefficients. The decoding device may derive the residual samples based on the transform coefficients.

[0391] The decoding device may generate reconstructed samples based on the (intra-frame) prediction samples and the residual samples, and may derive a reconstructed block or a reconstructed picture based on the reconstructed samples. Specifically, the decoding device may generate reconstructed samples based on the sum of the (intra-frame) prediction samples and the residual samples. Thereafter, as described above, if necessary, the decoding device may apply loop filtering processing (e.g., deblocking filtering and / or SAO processing) to the reconstructed picture to improve subjective / objective picture quality.

[0392] For example, the decoding device can obtain image information including all or some of the above information (or syntax elements) by decoding the bitstream or encoded information. In addition, the bitstream or encoded information can be stored in a computer-readable storage medium, or the above decoding method can be executed.

[0393] In the above embodiments, the methods are described based on a flow chart having a series of steps or boxes. The present disclosure is not limited to the order of the above steps or boxes. Some steps or boxes may occur simultaneously with other steps or boxes as described above or in an order different from that of other steps or boxes as described above. In addition, it will be understood by those skilled in the art that the steps shown in the above flow chart are not exclusive and may include additional steps or may delete one or more steps in the flow chart without affecting the scope of this document.

[0394] The method according to the above-mentioned embodiment of this document can be implemented in the form of software, and the encoding device and / or decoding device according to this document can 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.

[0395] When the embodiments in this document are implemented in software, the above methods can be implemented as modules (processing, functions, etc.) that perform the above functions. The modules can be stored in a memory and executed by a processor. The memory can be inside or outside the processor and can be connected to the processor by various well-known means. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing equipment. The memory may include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. In other words, the embodiments described in this document can be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each of the accompanying drawings can be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information about instructions or algorithms for the implementation can be stored in a digital storage medium.

[0396] In addition, the decoding device and encoding device to which this document is applied may be included in a multimedia broadcast transmission / reception device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as a video communication device, a mobile streaming device, a storage medium, a camera, a VoD service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a three-dimensional (3D) video device, a teleconferencing video device, a transportation user equipment (i.e., a vehicle-mounted user equipment, an aircraft user equipment, a ship user equipment, etc.), and a medical video device, and may be used to process video signals and data signals. For example, an over-the-top (OTT) video device may include a game console, a Blu-ray player, an Internet-connected television, a home theater system, a smart phone, a tablet computer, a digital video recorder (DVR), etc.

[0397] In addition, the processing method of applying this document can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data with a data structure according to the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all kinds of storage devices that store data readable by a computer system. For example, computer-readable recording media may include BD, universal serial bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk and optical data storage device. In addition, computer-readable recording media include media implemented in the form of carrier waves (i.e., transmission over the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or can be sent through a wired or wireless communication network.

[0398] In addition, the embodiments of this document can be implemented using a computer program product according to the program code, and the program code can be executed in a computer according to the embodiments of this document. The program code can be stored on a computer-readable carrier.

[0399] Figure 21 represents an example of a content streaming system to which embodiments of this document can be applied.

[0400] refer to Figure 21 A content streaming system to which the embodiments of this document are applied may generally include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0401] The encoding server compresses the content input from the multimedia input device (e.g., a smartphone, a camera, a camcorder, etc.) into digital data to generate a bitstream, and sends the bitstream to the streaming server. As another example, when the multimedia input device such as a smartphone, a camera, a camcorder, etc. directly generates the bitstream, the encoding server can be omitted.

[0402] A bitstream may be generated by applying the encoding method or the bitstream generating method of the embodiment of the present disclosure, and the streaming server may temporarily store the bitstream in a process of transmitting or receiving the bitstream.

[0403] The streaming server sends multimedia data to the user device via a web server based on the user's request. The web server serves as a medium for notifying the user of the service. When the user requests the desired service from the web server, the web server passes the request to the streaming server, and the streaming server sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the commands / responses between the devices in the content streaming system.

[0404] The streaming server can receive content from a media storage and / or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a predetermined time.

[0405] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributed.

[0406] Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be processed in a distributed manner.

[0407] The claims described herein may be combined in various ways. For example, the technical features of the method claims of this document may be combined and implemented as a device, and the technical features of the device claims of this document may be combined and implemented as a method. Furthermore, the technical features of the method claims of this document and the technical features of the device claims of this document may be combined to implement a device, and the technical features of the method claims of this document and the technical features of the device claims of this document may be combined and implemented as a method.

Claims

1. An image decoding method performed by a decoding device, comprising: Obtaining image information including residual information through a bit stream; deriving quantized transform coefficients based on the residual information; deriving transform coefficients based on a dequantization process for the quantized transform coefficients; deriving residual samples based on an inverse transform process for the transform coefficients; Based on the residual samples, generating reconstructed samples, wherein the reconstructed samples include reconstructed luminance samples and reconstructed chrominance samples; deriving adaptive loop filtering (ALF) filter coefficients for an ALF process of the reconstructed chroma samples; generating filtered reconstructed chroma samples based on the reconstructed chroma samples and the ALF filter coefficients; deriving cross-component filter coefficients for cross-component filtering; as well as generating modified filtered reconstructed chroma samples based on the reconstructed luminance samples, the filtered reconstructed chroma samples and the cross-component filter coefficients, The image information includes a sequence parameter set (SPS), header information, and an adaptation parameter set (APS) including ALF data. The SPS includes a cross-component adaptive loop filter (CCALF) enabling flag related to whether the cross-component filtering is enabled. wherein the cross-component filter coefficients are derived based on the ALF data, wherein the header information includes a first flag related to whether CCALF is enabled for the Cb color component of the filtered reconstructed chroma sample, wherein, based on determining that the value of the first flag is 1, the header information includes information related to an identifier of the APS for deriving the cross-component filter coefficient for the Cb color component, wherein the ALF data included in the APS for deriving the cross-component filter coefficients for the Cb color component includes a Cb filter signal flag related to whether the cross-component filter for the Cb color component is signaled, wherein the ALF data included in the APS for deriving the cross-component filter coefficients for the Cb color component includes information related to the number of cross-component filters for the Cb color component based on the Cb filter signal flag, wherein, based on the information related to the number of the cross-component filters for the Cb color component, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component includes information about absolute values of the cross-component filter coefficient for the Cb color component and information about signs of the cross-component filter coefficient for the Cb color component, and wherein the cross-component filter coefficient for the Cb color component is derived based on the information about the absolute value of the cross-component filter coefficient for the Cb color component and the information about the sign of the cross-component filter coefficient for the Cb color component.

2. An image encoding method performed by an encoding device, comprising: Generate residual samples for the current block; deriving transform coefficients based on a transform process for the residual samples; deriving quantized transform coefficients based on a quantization process for the transform coefficients; generating residual information indicative of the quantized transform coefficients; generating a reconstructed sample based on the residual information; generating adaptive loop filter (ALF) related information and cross-component ALF (CCALF) related information for the reconstructed samples; and encoding the image information including the residual information, the ALF related information, and the CCALF related information, The image information includes a sequence parameter set (SPS), header information, and an adaptation parameter set (APS) including ALF data. The SPS includes a cross-component adaptive loop filter (CCALF) enabling flag related to whether the cross-component filtering is enabled. wherein the header information includes a first flag related to whether CCALF is enabled for the Cb color component of the filtered reconstructed chroma sample, wherein, based on the ALF data, represents the cross-component filter coefficients, wherein, based on determining that the value of the first flag is 1, the header information includes information related to an identifier of the APS for deriving the cross-component filter coefficient for the Cb color component, wherein the ALF data included in the APS for deriving the cross-component filter coefficients for the Cb color component includes a Cb filter signal flag related to whether the cross-component filter for the Cb color component is signaled, wherein the ALF data included in the APS for deriving the cross-component filter coefficients for the Cb color component includes information related to the number of cross-component filters for the Cb color component based on the Cb filter signal flag, wherein, based on the information related to the number of the cross-component filters for the Cb color component, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component includes information about absolute values of the cross-component filter coefficient for the Cb color component and information about signs of the cross-component filter coefficient for the Cb color component, and wherein the cross-component filter coefficient for the Cb color component is derived based on the information about the absolute value of the cross-component filter coefficient for the Cb color component and the information about the sign of the cross-component filter coefficient for the Cb color component.

3. A method for transmitting image data, the method comprising: Obtaining a bitstream for the image, wherein the bitstream is generated based on the following steps: generating residual samples for a current block; deriving transform coefficients based on a transform process for the residual samples; deriving quantized transform coefficients based on a quantization process for the transform coefficients; generating residual information indicating the quantized transform coefficients; generating reconstructed samples based on the residual information; generating adaptive loop filter (ALF)-related information and cross-component ALF (CCALF)-related information for the reconstructed samples; and encoding the image information including the residual information, the ALF-related information, and the CCALF-related information; as well as sending said data comprising said bitstream, The image information includes a sequence parameter set (SPS), header information, and an adaptation parameter set (APS) including ALF data. The SPS includes a cross-component adaptive loop filter (CCALF) enabling flag related to whether the cross-component filtering is enabled. wherein the header information includes a first flag related to whether CCALF is enabled for the Cb color component of the filtered reconstructed chroma sample, wherein, based on the ALF data, represents the cross-component filter coefficients, wherein, based on determining that the value of the first flag is 1, the header information includes information related to an identifier of the APS for deriving the cross-component filter coefficient for the Cb color component, wherein the ALF data included in the APS for deriving the cross-component filter coefficients for the Cb color component includes a Cb filter signal flag related to whether the cross-component filter for the Cb color component is signaled, wherein the ALF data included in the APS for deriving the cross-component filter coefficients for the Cb color component includes information related to the number of cross-component filters for the Cb color component based on the Cb filter signal flag, wherein, based on the information related to the number of the cross-component filters for the Cb color component, the ALF data included in the APS for deriving the cross-component filter coefficient for the Cb color component includes information about absolute values of the cross-component filter coefficient for the Cb color component and information about signs of the cross-component filter coefficient for the Cb color component, and wherein the cross-component filter coefficient for the Cb color component is derived based on the information about the absolute value of the cross-component filter coefficient for the Cb color component and the information about the sign of the cross-component filter coefficient for the Cb color component.