Image encoding / decoding method and apparatus, and recording medium storing bitstreams

WO2025063778A1PCT designated stage expired Publication Date: 2025-03-27LG ELECTRONICS INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/014284
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-21
Filing Date
2024-09-23
Publication Date
2025-03-27

Smart Images

  • Figure KR2024014284_27032025_PF_FP_ABST
    Figure KR2024014284_27032025_PF_FP_ABST
Patent Text Reader

Abstract

An image decoding / encoding method and apparatus according to the present disclosure can acquire a prediction sample of a current block, generate a virtual sample for the current block, derive a parameter for model-based compensation of the current block on the basis of the prediction sample and the virtual sample of the current block, and acquire a corrected prediction sample by applying the parameter to the prediction sample of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method and device, and recording medium storing bitstream

[0001] The present invention relates to a video encoding / decoding method and device, and a recording medium storing a bitstream.

[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various application fields, and accordingly, high-efficiency image compression technologies are being discussed.

[0003] There are various technologies for image compression, such as inter prediction technology that predicts pixel values ​​included in the current picture from pictures before or after the current picture, intra prediction technology that predicts pixel values ​​included in the current picture using pixel information within the current picture, and entropy encoding technology that assigns short codes to values ​​with high frequency of appearance and long codes to values ​​with low frequency of appearance, and these technologies can be used to effectively compress and transmit or store image data.

[0004] The present disclosure seeks to provide a method and device for correcting a prediction sample obtained by intra prediction or inter prediction.

[0005] The present disclosure seeks to provide a model-based compensation method and device for a prediction sample.

[0006] The present disclosure seeks to provide a method and apparatus for generating virtual samples for model-based compensation.

[0007] The present disclosure seeks to provide a method and apparatus for deriving parameters for model-based compensation.

[0008] The present disclosure seeks to provide a method and device for signaling information regarding model-based compensation.

[0009] The image decoding method and device according to the present disclosure can obtain a prediction sample of a current block, generate a virtual sample for the current block, derive parameters for model-based compensation of the current block based on the prediction sample of the current block and the generated virtual sample, obtain a corrected prediction sample by applying the parameters to the prediction sample of the current block, and reconstruct the current block based on the corrected prediction sample of the current block and the residual sample of the current block.

[0010] In the image decoding method and device according to the present disclosure, the virtual sample can be generated based on a planar mode for intra prediction.

[0011] In the image decoding method and device according to the present disclosure, the virtual sample can be generated based on a DC mode for intra prediction.

[0012] In the video decoding method and device according to the present disclosure, the virtual sample may be generated through a weighted sum between a sample generated by applying a predetermined prediction method to the current block and a reference sample of the current block. Here, the reference sample may include at least one of an upper peripheral sample or a left peripheral sample adjacent to the current block.

[0013] In the video decoding method and device according to the present disclosure, the virtual sample can be generated based on a predetermined intra prediction mode, and the predetermined intra prediction mode can be derived based on decoder-side intra mode derivation (DIMD) or template-based intra mode derivation (TIMD).

[0014] In the video decoding method and device according to the present disclosure, the virtual sample can be generated based on intra template matching prediction (intra TMP).

[0015] In the image decoding method and device according to the present disclosure, the virtual sample can be generated based on matrix-based intra prediction (MIP).

[0016] In the image decoding method and device according to the present disclosure, the virtual sample can be generated for a sample position belonging to a part of the current block.

[0017] In the image decoding method and device according to the present disclosure, the parameter may be a parameter of a linear model or a parameter of a convolution model.

[0018] In the video decoding method and device according to the present disclosure, the parameter can be derived as a parameter that minimizes a predetermined cost. Here, the cost can be defined based on the difference between the virtual sample and the corrected prediction sample for each sample position within the current block.

[0019] In the image decoding method and device according to the present disclosure, the corrected prediction sample can be obtained by applying the parameter to the prediction sample and a neighboring sample adjacent to the prediction sample. The neighboring sample can include at least one of an upper neighboring sample, a lower neighboring sample, a left neighboring sample, a right neighboring sample, an upper left neighboring sample, an upper right neighboring sample, a lower left neighboring sample, or a lower right neighboring sample of the prediction sample.

[0020] The video encoding method and device according to the present disclosure can obtain a prediction sample of a current block, generate a virtual sample for the current block, derive parameters for model-based compensation of the current block based on the prediction sample of the current block and the generated virtual sample, obtain a corrected prediction sample by applying the parameters to the prediction sample of the current block, generate a residual sample of the current block based on the corrected prediction sample of the current block, and encode the residual sample of the current block.

[0021] A computer-readable digital storage medium is provided having encoded video / image information stored thereon, which causes a decoding device according to the present disclosure to perform a video decoding method.

[0022] A computer-readable digital storage medium storing video / image information generated by a video encoding method according to the present disclosure is provided.

[0023] A method and device for transmitting video / image information generated by a video encoding method according to the present disclosure are provided.

[0024] According to the present disclosure, the accuracy of prediction can be improved by correcting prediction samples through intra prediction or inter prediction.

[0025] According to the present disclosure, the accuracy of prediction can be improved through model-based compensation for prediction samples.

[0026] According to the present disclosure, encoding efficiency can be improved by proposing a method for generating virtual samples and a method for deriving parameters for model-based compensation.

[0027] According to the present disclosure, information regarding model-based compensation can be efficiently signaled.

[0028] FIG. 1 illustrates a video / image coding system according to the present disclosure.

[0029] FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed.

[0030] FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed.

[0031] FIG. 4 illustrates a model-based compensation method performed by a decoding device (300) as an embodiment according to the present disclosure.

[0032] FIG. 5 illustrates a schematic configuration of a decoding device (300) that performs a model-based compensation method according to the present disclosure.

[0033] FIG. 6 illustrates a model-based compensation method performed by an encoding device (200) as an embodiment according to the present disclosure.

[0034] FIG. 7 illustrates a schematic configuration of an encoding device (200) that performs a model-based compensation method according to the present disclosure.

[0035] FIG. 8 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.

[0036] The present disclosure may be modified in various ways and encompasses numerous embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present disclosure. Throughout the description of each drawing, similar reference numerals have been used to designate similar components.

[0037] While terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present disclosure, a first component could be referred to as a "second component," and similarly, a second component could also be referred to as a "first component." The term "and / or" includes a combination of multiple related items described herein or any of multiple related items described herein.

[0038] When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening.

[0039] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0040] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the versatile video coding (VVC) standard. In addition, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation of audio video coding standard (AVS2), or the next generation of video / image coding standards (e.g., H.267 or H.268).

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

[0042] In this specification, a video may refer to a set of images over time. A picture generally refers to a unit representing one image at a specific time point, and a slice / tile is a unit that constitutes 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 tile is a rectangular area consisting of multiple CTUs within a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of ​​CTUs that has a height equal to the height of the picture and a width specified by the syntax requirements of the picture parameter set. A tile row is a rectangular area of ​​CTUs that has a height specified by the picture parameter set and a width equal to the width of the picture. CTUs within a tile are arranged consecutively according to the CTU raster scan, while tiles within a picture may be arranged consecutively according to the tile raster scan. A slice may contain an integer number of complete tiles or an integer number of contiguous complete CTU rows within a picture, which may be exclusively contained within a single NAL unit. Meanwhile, a picture may be divided into two or more subpictures. A subpicture may be a rectangular region of one or more slices within a picture.

[0043] A pixel, or pel, can refer to the smallest unit that constitutes a picture (or image). Additionally, the term "sample" can be used as a counterpart to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component.

[0044] 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. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. In some cases, the term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.

[0045] As used herein, "A or B" can mean "only A," "only B," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B or C" can mean "only A," "only B," "only C," or "any combination of A, B and C."

[0046] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Accordingly, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."

[0047] In this specification, "at least one of A and B" may mean "only A", "only B" or "both A and B". Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted identically to "at least one of A and B".

[0048] Additionally, in this specification, “at least one of A, B and C” can mean “only A,” “only B,” “only C,” or “any combination of A, B and C.” Additionally, “at least one of A, B or C” or “at least one of A, B and / or C” can mean “at least one of A, B and C.”

[0049] Additionally, parentheses used herein may mean "for example." Specifically, when "prediction (intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra-prediction," and "intra-prediction" may be suggested as an example of "prediction." Furthermore, even when "prediction (i.e., intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction."

[0050] Technical features individually described in a single drawing in this specification may be implemented individually or simultaneously.

[0051] FIG. 1 illustrates a video / image coding system according to the present disclosure.

[0052] Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device).

[0053] A source device can transmit encoded video / image information or data to a receiving device via a digital storage medium or a network in the form of a file or streaming. The source device may include a video source, an encoding device, and a transmitting device. The receiving device may include a receiving device, 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 unit, and the display unit may be configured as a separate device or an external component.

[0054] A video source may obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device may include a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process of generating related data.

[0055] An encoding device can encode input video / images. The encoding device can perform a series of procedures, such as prediction, transformation, and quantization, to improve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.

[0056] The transmission unit can transmit encoded video / image information or data output in the form of a bitstream to the receiving unit of a receiving device via a digital storage medium or network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit can include an element for generating a media file via a predetermined file format and an element for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.

[0057] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device.

[0058] The renderer can render decoded video / images. The rendered video / images can be displayed through the display unit.

[0059] FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed.

[0060] Referring to FIG. 2, the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270. The prediction unit (220) may include an inter prediction unit (221) and an intra prediction unit (222). The residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235. The residual processing unit (230) may further include a subtractor (231). The addition unit (250) may be called a reconstructor or a recontructed block generator. The image segmentation unit (210), the prediction unit (220), the residual processing unit (230), the entropy encoding unit (240), the addition unit (250), and the filtering unit (260) described above may be configured by one or more hardware components (e.g., an encoding device chipset or processor) according to an embodiment. In addition, the memory (270) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (270) as an internal / external component.

[0061] The image segmentation unit (210) can segment an input image (or picture, frame) input to the encoding device (200) into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively segmented from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure.

[0062] For example, a single coding unit may be split into multiple coding units with deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied before the quad-tree structure. The coding procedure according to the present specification may be performed based on the final coding unit that is no longer split. In this case, based on coding efficiency according to image characteristics, etc., the largest coding unit may be used directly as the final coding unit, or, if necessary, the coding unit may be recursively split into coding units of lower depths, and the coding unit with the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later.

[0063] As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be split or partitioned from the final coding unit described above. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.

[0064] The term "unit" may be used interchangeably with terms such as "block" or "area" depending on the case. In general, an MxN 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 a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component. A sample can be used as a term corresponding to a pixel or pel in a picture (or image).

[0065] The encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (prediction block, prediction sample array) output from an inter prediction unit (221) or an intra prediction unit (222) from an input video signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232). In this case, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input video signal (original block, original sample array) within the encoding device (200) may be called a subtraction unit (231).

[0066] The prediction unit (220) can perform a prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit (220) can determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit (220) can generate various information related to prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit the information to the entropy encoding unit (240). The information related to prediction can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.

[0067] The intra prediction unit (222) can predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The non-directional mode may include at least one of a DC mode or a planar mode. The directional mode may include 33 directional modes or 65 directional modes depending on the degree of detail in the prediction direction. However, this is only an example, and a greater or lesser number of directional modes may be used depending on the settings. The intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0068] The inter prediction unit (221) 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. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, 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 further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring block can include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The above temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference pictures including the temporal neighboring blocks may be called collocated pictures (colPic). For example, the inter prediction unit (221) may construct a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (221) may use the motion information of the neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of the surrounding blocks is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0069] The prediction unit (220) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, sample values ​​within a picture can be signaled based on information about the palette table and palette index. The prediction signal generated through the prediction unit (220) can be used to generate a restoration signal or a residual signal.

[0070] The transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on generating a prediction signal using all previously restored pixels. In addition, the transform process can be applied to a pixel block having a square size and the same size, or can be applied to a block of a non-square variable size.

[0071] The quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients can be called residual information. The quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

[0072] The entropy encoding unit (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 encoding unit (240) can also encode information necessary for video / image restoration (e.g., values ​​of syntax elements, etc.) together or separately from quantized transform coefficients.

[0073] 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) units. The video / image information may further include information on 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 the present specification, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media, such as a USB, SD, CD, DVD, Blu-ray, HDD, or SSD. The signal output from the entropy encoding unit (240) may be configured as an internal / external element of the encoding device (200) by a transmitting unit (not shown) and / or a storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240).

[0074] The quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be reconstructed. The addition unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit (221) or the intra prediction unit (222). When there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as a reconstructed block. The addition unit (250) may be called a reconstructor or a reconstructed block generation unit. The generated restoration signal can be used for intra prediction of the next processing target block within the current picture, and can also be used for inter prediction of the next picture after filtering as described below. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process.

[0075] The filtering unit (260) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate various information regarding filtering and transmit it to the entropy encoding unit (240). The information regarding filtering can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.

[0076] The modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit (221). Through this, when inter prediction is applied, the encoding device can avoid prediction mismatch between the encoding device (200) and the decoding device, and can also improve encoding efficiency.

[0077] The DPB of the memory (270) can store the modified restored picture to be used as a reference picture in the inter prediction unit (221). The memory (270) can store motion information of a block from which motion information is derived (or encoded) within the current picture and / or motion information of blocks within a picture that has already been restored. The stored motion information can be transferred to the inter prediction unit (221) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (270) can store restored samples of restored blocks within the current picture and transfer them to the intra prediction unit (222).

[0078] FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed.

[0079] Referring to FIG. 3, the decoding device (300) may be configured to 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-prediction unit (332) and an intra-prediction unit (331). The residual processor (320) may include a dequantizer (321) and an inverse transformer (321).

[0080] The entropy decoding unit (310), residual processing unit (320), prediction unit (330), addition unit (340), and filtering unit (350) described above may be configured by a single hardware component (e.g., a decoding device chipset or processor) depending on the embodiment. In addition, the memory (360) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (360) as an internal / external component.

[0081] When a bitstream including video / image information is input, the decoding device (300) can restore the image corresponding to the process in which the video / image information is processed in the encoding device of FIG. 2. For example, the decoding device (300) can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device (300) can perform decoding using a processing unit applied in the encoding device. Accordingly, the processing unit of decoding may be a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the coding unit. Then, the restored image signal decoded and output through the decoding device (300) can be reproduced through a reproduction device.

[0082] The decoding device (300) can receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal can be decoded through the entropy decoding unit (310). For example, the entropy decoding unit (310) can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on 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. The decoding device can decode the picture further based on the information on the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this specification can be decoded through the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit (310) can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values ​​of syntax elements required for image restoration and the quantized values ​​of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of the syntax element to be decoded and decoding information of the surrounding and decoding target blocks or information of symbols / bins decoded in the previous step, and predicts the occurrence probability of the bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.At this time, the CABAC entropy decoding method can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information regarding prediction among the information decoded by the entropy decoding unit (310) is provided to the prediction unit (inter prediction unit (332) and intra prediction unit (331)), and residual values ​​on which entropy decoding is performed by the entropy decoding unit (310), i.e., quantized transform coefficients and related parameter information, can be input to the residual processing unit (320). The residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array). In addition, information regarding filtering among the information decoded by the entropy decoding unit (310) can be provided to the filtering unit (350). Meanwhile, a receiving unit (not shown) that receives a signal output from an encoding device may be further configured as an internal / external element of a decoding device (300), or the receiving unit may be a component of an entropy decoding unit (310).

[0083] Meanwhile, a decoding device according to the present specification may be called a video / video / picture decoding device, and the decoding device may be divided into an information decoding device (video / video / picture information decoding device) and a sample decoding device (video / video / picture sample decoding device). The information decoding device may include the entropy decoding unit (310), and the sample decoding device may include at least one of the inverse quantization unit (321), the inverse transformation unit (322), the adding unit (340), the filtering unit (350), the memory (360), the inter prediction unit (332), and the intra prediction unit (331).

[0084] The inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.

[0085] In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).

[0086] The prediction unit (320) can perform a prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit (320) can determine whether intra-prediction or inter-prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit (310), and can determine a specific intra / inter-prediction mode.

[0087] The prediction unit (320) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit (320) can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, information about the palette table and palette index may be included and signaled in the video / image information.

[0088] The intra prediction unit (331) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The intra prediction unit (331) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0089] The inter prediction unit (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. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit (332) can construct 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 prediction can be performed based on various prediction modes, and information about the prediction can include information indicating an inter prediction mode for the current block.

[0090] The addition unit (340) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-prediction unit (332) and / or intra-prediction unit (331)). When there is no residual for the block to be processed, such as when skip mode is applied, the prediction block can be used as the restoration block.

[0091] The addition unit (340) may be referred to as a restoration unit or restoration block generation unit. The generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.

[0092] The filtering unit (350) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (350) can apply various filtering methods to the restored picture to generate a modified restored picture, and transmit the modified restored picture to the memory (360), specifically, to the DPB of the memory (360). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0093] The (corrected) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit (332). The memory (360) can store motion information of a block from which motion information is derived (or decoded) in the current picture and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (332) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (331).

[0094] In this specification, the embodiments described in the filtering unit (260), the inter prediction unit (221), and the intra prediction unit (222) of the encoding device (200) can be applied to the filtering unit (350), the inter prediction unit (332), and the intra prediction unit (331) of the decoding device (300) in the same or corresponding manner, respectively.

[0095] The present disclosure relates to a method for obtaining a prediction sample. In particular, according to the present disclosure, a model that compensates for the difference in sample values ​​between a virtual sample of a current block and a predicted sample is derived, and this model is applied to the predicted sample of the current block to obtain a corrected prediction sample. This is hereinafter referred to as model-based compensation or model-based sample correction. The present disclosure may be distinguished from existing methods that utilize neighboring samples adjacent to the current block and predicted block.

[0096] FIG. 4 illustrates a model-based compensation method performed by a decoding device (300) as an embodiment according to the present disclosure.

[0097] Referring to FIG. 4, a prediction sample of the current block can be obtained (S400).

[0098] The prediction sample of the current block can be obtained based on intra prediction.

[0099] For example, a prediction sample of a current block can be obtained based on intra-template matching prediction (intra TMP). That is, a region matching or most similar to a template of a current block can be searched for within a pre-reconstructed region within the current picture, and a block using the region as a template can be determined as a reference block. A prediction sample of the current block can be obtained based on a reconstructed sample of the reference block. The search can be performed within a pre-defined search range within the pre-reconstructed region. A cost with respect to the template of the current block can be calculated while traversing within the pre-defined search range. A block using the region with the smallest cost among the calculated costs as a template can be selected. Here, the cost can be calculated based on the sum of absolute difference (SAD), the sum of absolute transformed difference (SATD), or the sum of squared difference (SSE). The above-described pre-defined search range may include at least one of the current coding tree unit (CTU) to which the current block belongs or a neighboring CTU adjacent to the current CTU. Here, the neighboring CTU may include at least one of the upper-left neighboring CTU, the upper neighboring CTU, or the left neighboring CTU. Alternatively, the current block may be a block encoded in an intra block copy (IBC) mode. In this case, a reference block may be determined based on a block vector of the current block, and a prediction sample of the current block may be obtained based on a reconstructed sample of the reference block. The block vector may specify the location of the reference block in a reconstructed area within the current picture. Similarly, the reference block may belong to the same current picture as the current block.

[0100] Alternatively, the prediction sample of the current block may be obtained based on inter prediction.

[0101] For example, the prediction sample of the current block can be obtained based on a motion compensation method using motion vectors (e.g., merge mode, AMVP mode). Alternatively, the prediction sample of the current block can be obtained based on a combined inter and intra prediction (CIIP). Alternatively, the prediction sample of the current block can be obtained based on a geometric partitioning mode. When the geometric partitioning mode is applied to the current block, the current block can be partitioned into two partitions (i.e., a first partition and a second partition), and the prediction sample of the current block can be obtained based on a weighted sum of a first prediction sample for the first partition and a second prediction sample for the second partition. Here, both the first and second prediction samples can be generated based on intra prediction. Alternatively, both the first and second prediction samples can be generated based on inter prediction. Alternatively, either the first prediction sample or the second prediction sample can be generated based on intra prediction, and the other can be generated based on inter prediction. Alternatively, the prediction sample of the current block may be obtained based on a multi-hypothesis prediction (MHP) mode. The MHP mode may be a method for obtaining a prediction sample based on a weighted sum between an initial prediction sample and one or more additional prediction samples. Here, at least one of the initial prediction sample or the additional prediction sample may be obtained based on the aforementioned motion compensation method.

[0102] Referring to FIG. 4, a virtual sample for the current block can be generated (S410).

[0103] A virtual sample according to the present disclosure can be generated to represent a sample value of a current block. The virtual sample of the current block can be generated based on reconstructed sample(s) surrounding the current block. Here, the virtual sample can be a predicted sample or a reconstructed sample generated by a method described below. The virtual sample can correspond to the same sample location as the predicted sample of the current block. The generated virtual sample can be used as an input for deriving a compensation model of the predicted sample. In order to generate a virtual sample with the same value in an encoding device and a decoding device, the reconstructed sample(s) surrounding the current block that are available in the encoding and decoding steps can be used. The virtual sample of the current block can be generated using sample(s) of an area encoded / decoded before the current block. The virtual sample of the current block can be generated by one method described below, or by a combination of two or more methods.

[0104] Method 1

[0105] A virtual sample of the current block may be generated based on a planar mode used in intra prediction. The virtual sample of the current block may be generated based on a weighted sum of at least two neighboring samples adjacent to the current block. Here, the at least two neighboring samples may include at least two of an upper neighboring sample, a lower-left neighboring sample, a left neighboring sample, or an upper-right neighboring sample. For example, the virtual sample of the current block may be generated as shown in the following mathematical expression 1.

[0106]

[0107] In mathematical expression 1, genSamples[ x ][ y ] represents a virtual sample at the (x, y) position generated for the current block. Here, the value of x can have a range from 0 to (nTbW - 1), and the value of y can have a range from 0 to (nTbH - 1). nTbW represents the width of the current block, and nTbH represents the height of the current block. ref[ x ][ y ] can represent a reference sample for generating a virtual sample of the current block. In particular, ref[ x ][ -1 ] is an upper peripheral sample adjacent to the current block, which may have the same x-coordinate as the virtual sample to be generated. ref[ -1 ][ nTbH ] may be an upper right peripheral sample adjacent to the current block. ref[ -1 ][ y ] is a left peripheral sample adjacent to the current block, which may have the same y-coordinate as the virtual sample to be generated. ref[ nTbW ][ -1 ] may be the lower left neighboring sample adjacent to the current block.

[0108] Method 2

[0109] The virtual sample of the current block can be generated based on the DC mode used in intra prediction. The virtual sample of the current block can be generated based on the average value of the reconstructed samples belonging to the surrounding area of ​​the current block. Here, the surrounding area can include at least one of the upper surrounding area, the left surrounding area, the upper-left surrounding area, the lower-left surrounding area, or the upper-right surrounding area.

[0110] For example, a virtual sample of the current block can be generated as in the following mathematical expression 2.

[0111]

[0112] In mathematical expression 2, the value of dcVal can be calculated based on the width (nTbW) and height (nTbH) of the current block as follows. Specifically, when nTbW and nTbH are equal, the value of dcVal can be calculated as in mathematical expression 3.

[0113]

[0114] Alternatively, when nTbW is greater than nTbH, the value of dcVal can be calculated as in Equation 4.

[0115]

[0116] Alternatively, when nTbW is smaller than nTbH, the value of dcVal can be calculated as in Equation 5.

[0117]

[0118] Alternatively, regardless of the width and height of the current block, the value of dcVal can be calculated as in the following mathematical expression (6).

[0119]

[0120] In Equation 2, genSamples[ x ][ y ] represents a virtual sample at the position (x, y) generated for the current block. Here, the value of x can have a range of 0 to (nTbW - 1), and the value of y can have a range of 0 to (nTbH - 1). In Equations 3 to 6, nTbW represents the width of the current block, and nTbH represents the height of the current block. ref[ x ][ y ] can represent a reference sample for generating a virtual sample of the current block. In particular, ref[ x' ][ -1 ] can be an upper peripheral sample adjacent to the current block. ref[ -1 ][ y' ] can be a left peripheral sample adjacent to the current block.

[0121] Method 3

[0122] A virtual sample of a current block can be generated through a weighted sum between a sample generated by applying a predetermined prediction method to the current block and reference sample(s) of the current block. The reference sample can be a neighboring sample adjacent to the current block, and the neighboring sample can include at least one of an upper neighboring sample or a left neighboring sample of the current block. Here, the upper neighboring sample can be a sample having the same x-coordinate as the virtual sample, and the left neighboring sample can be a sample having the same y-coordinate as the virtual sample.

[0123] Here, the prediction method may be the intra-template matching prediction or intra-block copy (IBC) mode described above. Alternatively, the prediction method may be a motion compensation method using motion vectors. Alternatively, the prediction method may be a planar mode or a DC mode.

[0124] Alternatively, the sample generated by applying a predetermined prediction method to the current block may be derived as an average value among reference samples of the current block. The reference samples of the current block may include upper peripheral samples and left peripheral samples adjacent to the current block.

[0125] For example, a virtual sample of the current block can be generated as in the following mathematical expression (7).

[0126]

[0127] In Equation 7, genSamples[ x ][ y ] represents a virtual sample generated at the (x, y) location for the current block. Here, the value of x can range from 0 to (nTbW - 1), and the value of y can range from 0 to (nTbH - 1). refL[ x ][ y ] and refT[ x ][ y ] can represent reference samples used to generate the virtual sample at the (x, y) location, respectively. For example, refL[ x ][ y ] can represent a left peripheral sample adjacent to the current block, and refT[ x ][ y ] can represent an upper peripheral sample adjacent to the current block. wL[ x ] can represent a weight applied to the reference sample refL[ x ][ y ], which can be determined based on the x-coordinate of the virtual sample and / or the width and height of the current block. wT[ y ] can represent a weight applied to the reference sample refT[ x ][ y ], which can be determined based on the y-coordinate of the virtual sample and / or the width and height of the current block. nTbW represents the width of the current block, and nTbH represents the height of the current block. p[ x ][ y ] can represent a sample at the (x, y) position generated by applying a predetermined prediction method to the current block.

[0128] Method 4

[0129] The intra prediction mode of the current block can be derived based on the decoder side intra mode derivation (DIMD) method, and a virtual sample of the current block can be generated based on the intra prediction mode.

[0130] Specifically, a gradient can be derived based on at least two samples belonging to a surrounding area of ​​a current block. Here, the gradient can include at least one of a horizontal gradient or a vertical gradient. An intra prediction mode of the current block can be derived based on at least one of the derived gradient or the amplitude of the gradient. Here, the magnitude of the gradient can be determined based on the sum of the horizontal gradient and the vertical gradient. Through this derivation method, one intra prediction mode or two or more intra prediction modes can be derived for the current block.

[0131] A gradient can be calculated in units of a window having a predetermined size. An angle indicating the directionality of a sample within the window can be calculated based on the calculated gradient. The calculated angle can correspond to any one of the multiple intra prediction modes defined above. The magnitude of the gradient can be stored / updated for the intra prediction mode corresponding to the calculated angle. Through this process, for each window, an intra prediction mode corresponding to the calculated gradient can be determined, and the magnitude of the gradient can be stored / updated for the determined intra prediction mode. Among the magnitudes of the stored gradients, the top T intra prediction modes having the largest magnitudes can be selected, and the selected intra prediction mode can be set as the intra prediction mode of the current block. Here, T can be an integer of 1, 2, 3, or a larger number.

[0132] The surrounding area used to calculate the above slope may include at least one of a left area, an upper area, an upper left area, a lower left area, or an upper right area adjacent to the current block, which are previously reconstructed areas of the current block. The surrounding area may include at least one of a neighboring sample line adjacent to the current block, a first non-neighboring sample line that is 1 sample away from the current block, or a second non-neighboring sample line that is 2 samples away from the current block. However, the present invention is not limited thereto, and a non-neighboring sample line that is N samples away from the current block may be further included, and N may be an integer greater than or equal to 3.

[0133] The peripheral region may be a region that is identically predefined for the encoding device and the decoding device to calculate the slope. Alternatively, the peripheral region may be variably determined based on information specifying the location of the peripheral region. In this case, the information specifying the location of the peripheral region may be signaled through a bitstream. Alternatively, the location of the peripheral region may be determined based on at least one of whether the current block is located at the boundary of a coding tree unit, the size of the current block (e.g., width, height, ratio of width to height, product of width and height), the segmentation type of the current block, the prediction mode of the peripheral region, or the availability of the peripheral region.

[0134] Method 5

[0135] Based on the template-based intra mode derivation (TIMD) method, the intra prediction mode of the current block can be derived, and a virtual sample of the current block can be generated based on the intra prediction mode.

[0136] Specifically, a cost may be calculated for each of predetermined candidate modes. The predetermined candidate modes may refer to multiple intra prediction modes that are identically predefined for the encoding device and the decoding device. Alternatively, for template region-based derivation, a candidate list composed of the candidate modes may be generated, and costs may be calculated for candidate modes belonging to the candidate list. Alternatively, costs may be calculated only for the top N candidate modes within the generated candidate list. Here, N may be a value identically predefined for the encoding device and the decoding device. For example, N may be an integer of 2, 3, 4, 5, or more.

[0137] The above cost can be calculated as the sum of absolute differences (SAD) between the predicted samples and the reconstructed samples within the template region. Alternatively, the cost can also be calculated as the sum of absolute transformed differences (SATD) between the predicted samples and the reconstructed samples within the template region. Here, SATD may refer to the SAD transformed into the frequency domain. As an example of the transformation, the Hadamard transform may be used, but is not limited thereto. The predicted samples within the template region may be generated based on the candidate modes described above.

[0138] The template area for calculating the above cost may be a pre-restored area adjacent to the current block. For example, the template area may include at least one of the upper peripheral area, the left peripheral area, the upper left peripheral area, the lower left peripheral area, or the upper right peripheral area of ​​the current block.

[0139] The template region may be a region that is identically predefined for the encoding device and the decoding device to calculate the cost. Alternatively, the template region may be variably determined based on information specifying the location of the template region. In this case, the information specifying the location of the template region may be signaled through a bitstream. Alternatively, the location of the template region may be determined based on at least one of whether the current block is located at the boundary of a coding tree unit, the size of the current block (e.g., width, height, ratio of width to height, product of width and height), the segmentation type of the current block, the prediction mode of the surrounding region, or the availability of the surrounding region.

[0140] Among the costs calculated for the above candidate modes, one candidate mode with the lowest cost may be selected. For example, costs may be calculated for each of five candidate modes in the candidate list. The five candidate modes in the candidate list may be reordered in ascending order of the calculated costs. Among the five reordered candidate modes, the top candidate mode may be selected.

[0141] Alternatively, at least two candidate modes with the lowest cost among the calculated costs for the above candidate modes may be selected. For example, the costs for each of the five candidate modes in the candidate list may be calculated. The five candidate modes in the candidate list may be reordered in ascending order of the calculated costs. The top two candidate modes among the five reordered candidate modes may be selected.

[0142] One or more candidate modes selected through the above-described process can be set as the intra prediction mode of the current block.

[0143] Alternatively, if at least two candidate modes are selected through the aforementioned process, the intra prediction mode of the current block may be derived based on a comparison between the selected candidate modes and / or a comparison between at least one of the selected candidate modes and a threshold value. For example, the intra prediction mode of the current block may be derived based on whether the selected candidate modes satisfy the following conditions:

[0144] [Condition] costMode2 < (K x costMode1)

[0145] In the above condition, costMode1 may refer to a cost calculated based on one of the selected candidate modes, and costMode2 may refer to a cost calculated based on another of the selected candidate modes. For example, costMode1 may refer to a cost calculated based on a candidate mode with a smaller cost among the selected candidate modes, and costMode2 may refer to a cost calculated based on a candidate mode with a larger cost among the selected candidate modes. In the above condition, K represents a predetermined comparison factor, which may be a value that is identically predefined for the encoding device and the decoding device. For example, K may be an integer of 1, 2, or more, or may refer to a real number such as 1 / 2 or 1 / 4.

[0146] If the above conditions are satisfied, the selected candidate modes may be set as the intra prediction modes of the current block. On the other hand, if the above conditions are not satisfied, the candidate mode with a cost of costMode1 may be set as the intra prediction mode of the current block, and the candidate mode with a cost of costMode2 may not be used as the intra prediction mode of the current block.

[0147] Method 6

[0148] The virtual sample of the current block can be generated based on intra template matching prediction (intra TMP).

[0149] Specifically, a region matching or most similar to the template of the current block can be searched for within a pre-restored region within the current picture, and a block using the region as the template can be determined as a reference block. A virtual sample of the current block can be generated based on a restored sample of the reference block.

[0150] The above search can be performed within a pre-defined search range within the pre-restored region. The cost of the current block with respect to the template can be calculated by traversing within the pre-defined search range. A block that uses the region with the smallest cost among the calculated costs as a template can be selected. Here, the cost can be calculated based on the sum of absolute difference (SAD), the sum of absolute transformed difference (SATD), or the sum of squared difference (SSE). The pre-defined search range can include at least one of the current coding tree unit (CTU) to which the current block belongs or the neighboring CTUs adjacent to the current CTU. Here, the neighboring CTU can include at least one of the upper left neighboring CTU, the upper neighboring CTU, or the left neighboring CTU.

[0151] The template of the current block may be composed of a peripheral region adjacent to the current block. Here, the peripheral region may include at least one of a left peripheral region, an upper peripheral region, or an upper left peripheral region. The upper peripheral region may be composed of N horizontal sample lines, and the left peripheral region may be composed of M vertical sample lines. N and M are integers greater than or equal to 1. N and M may be the same or different from each other. The size and / or position of the template for the current block may be variably determined depending on the size and / or position of the current block.

[0152] Method 7

[0153] The virtual sample of the current block can be generated based on matrix-based intra prediction (MIP). Any one of multiple matrices predefined identically for the encoding device and the decoding device can be selectively used. Any one of the multiple matrices can be specified based on the size of the current block. The coefficients of each matrix can be predefined identically for the encoding device and the decoding device.

[0154] Method 8

[0155] A virtual sample of the current block can be generated through intra prediction based on multiple reference lines (MRL).

[0156] For example, the prediction sample of the current block can be obtained by using at least one sample belonging to a reference line adjacent to the current block (e.g., a first reference line) as a reference sample. In this case, the virtual sample of the current block can be generated by applying the same method as the method for obtaining the prediction sample, but using at least one sample belonging to a reference line not adjacent to the current block (e.g., a second, a third, or a fourth reference line) as a reference sample. Alternatively, the virtual sample of the current block can be generated by applying any one of the above-described methods 1 to 7, but using at least one sample belonging to a reference line not adjacent to the current block (e.g., a second, a third, or a fourth reference line) as a reference sample.

[0157] Alternatively, the prediction sample of the current block may be obtained by using at least one sample belonging to a reference line that is not adjacent to the current block as a reference sample. In this case, the virtual sample of the current block may be generated by applying the same method as the method for obtaining the prediction sample, but using at least one sample belonging to a reference line adjacent to the current block as a reference sample. Alternatively, the virtual sample of the current block may be generated by applying any one of the above-described methods 1 to 7, but using at least one sample belonging to a reference line adjacent to the current block as a reference sample.

[0158] According to the present disclosure, the size / range of the area where a virtual sample is generated within the current block may be variable.

[0159] For example, virtual samples can be generated for all sample positions within the current block. If the current block is a WxH block, the number of virtual samples generated for the current block can be (W*H).

[0160] Virtual samples may be generated only for sample positions within a portion of a current block. For example, the portion may be composed of N vertical sample lines from the left and M horizontal sample lines from the top. N may be an integer greater than or equal to 0 and less than the width (W) of the current block. M may be an integer greater than or equal to 0 and less than the height (H) of the current block. Alternatively, the size / range of a portion of a current block may be variably determined based on the size of the current block. For example, the size / range of a portion of a current block may be determined as in the following mathematical expression (8).

[0161]

[0162] In Equation 8, the value of i can be any one of 1, 2, 3, 4, or 5. The value of j can be any one of 1, 2, 3, 4, or 5. i and j can be values ​​that are identically predefined in the encoding device and the decoding device. i and j can be the same or defined differently.

[0163] A portion of the current block may be defined as the remaining area excluding a predetermined lower right area of ​​the current block. Here, the lower right area may be defined as an NxM block. N may be an integer greater than or equal to 0 and less than the width (W) of the current block, and M may be an integer greater than or equal to 0 and less than the height (H) of the current block. Alternatively, the lower right area may be determined variably based on the size of the current block. For example, the lower right area may be determined as in the aforementioned mathematical expression 8.

[0164] A virtual sample can only be generated for a sample location located on a block boundary of the current block, wherein the block boundary may include at least one of the top boundary, the left boundary, the right boundary, or the bottom boundary of the current block.

[0165] In this way, if virtual samples are not generated for all sample locations within the current block, a model can be derived to correct the predicted samples using only the generated virtual samples.

[0166] It should be noted that some of the areas mentioned above are only examples, and any area within the current block can be predefined and virtual samples can be generated only for that area.

[0167] A single virtual sample may be generated for each sample location within the current block. Alternatively, two or more virtual samples may be generated for each sample location. One of the two or more virtual samples may be generated based on one of the aforementioned methods 1 to 8, and the other may be generated based on another method. In this case, the final virtual sample may be generated through a weighted sum of the two or more virtual samples.

[0168] Alternatively, an index specifying any one of a plurality of pre-defined methods for generating a virtual sample of the current block may be defined. Based on the index, any one of the plurality of methods may be selected, and a virtual sample of the current block may be generated based on the selected method. The plurality of pre-defined methods may include at least one of the methods 1 to 8 described above as candidate methods for generating a virtual sample. The index may be signaled through the bitstream, or may be derived based on an attribute of the current block. The attribute of the current block may include at least one of a size, a prediction method used to obtain a prediction sample, a component type, or whether geometric segmentation is applied.

[0169] For example, if multiple methods for generating virtual samples for a single sequence or image are defined, a flag or index that selects one of the multiple methods can be signaled at the picture or slice level. Table 1 below shows an example of ph_gen_samples_idx being signaled in the picture header.

[0170] picture_header_structure() {Descriptor...ph_gen_samples_idxue(v)...}

[0171] In Table 1, ph_gen_samples_idx may be an index that selects one of multiple methods for generating virtual samples from the current picture. Table 2 below is an example showing the mapping relationship between the values ​​of ph_gen_samples_idx and the multiple methods described above.

[0172] ph_gen_samples_idxMethod 0Method 11Method 22Method 33Method 44Method 55Method 66Method 77Method 88Reserved

[0173] Alternatively, a flag or index for selecting one of a plurality of methods for generating a virtual sample may be signaled in the coding unit syntax for the current block. Alternatively, a flag or index for selecting one of a plurality of methods for generating a virtual sample at the sequence level may be signaled, and a flag indicating whether to include the flag or index in the lower-level syntax may be signaled separately.

[0174] Referring to FIG. 4, parameters for model-based compensation can be derived based on the predicted sample and virtual sample of the current block (S420).

[0175] Specifically, one or more models can be defined based on the predicted samples and virtual samples of the current block, and parameters of each model can be derived.

[0176] For example, the model according to the present disclosure may have the form of a first-order linear model as in the following mathematical expression 9.

[0177]

[0178] In the model of mathematical formula 9, P[ x ][ y ] represents a prediction sample of the current block, and P'[ x ][ y ] may represent a prediction sample corrected based on the model of the present disclosure. When the width and height of the current block are nTbW and nTbH, respectively, the value of x in P[ x ][ y ] may range from 0 to (nTbW - 1), and the value of y may range from 0 to (nTbH - 1). a0 and a1 are parameters of the linear model, and may be derived according to the following mathematical formula 10. a0 and a1 may correspond to a weight parameter and an offset parameter among the parameters of the linear model, respectively.

[0179]

[0180] According to Equation 10, for each sample location within the current block, the square of the difference between the virtual sample and the corrected prediction sample is calculated, and ErrCost can be derived as the sum of the calculated values. Here, the corrected prediction sample may be derived based on the parameters of a linear model such as Equation 9. At this time, a0 and a1 can be derived as values ​​that minimize ErrCost for the current block. Obviously, if the virtual sample is generated only for the sample location belonging to a certain area within the current block, the model parameters can be derived based only on the virtual sample and the corresponding prediction sample.

[0181] Alternatively, the model according to the present disclosure may have a convolutional form. In this case, a current sample (C) and one or more adjacent surrounding samples may be used. The surrounding samples may include at least one of a left sample (L), a right sample (R), an upper sample (A), a lower sample (B), an upper left sample (AL), an upper right sample (AR), a lower left sample (BL), or a lower right sample (BR). Here, the current sample (C) is a prediction sample obtained in S400 and may refer to a sample that is currently a target of correction.

[0182] The convolutional model according to the present disclosure can be defined as in the following mathematical expression 11.

[0183]

[0184] According to mathematical expression 11, a model can be defined that uses the samples (L, R, A, B) located to the left, right, top, and bottom of the current sample (C). a0 to a4 are parameters of the convolutional model, and can be derived as in the following mathematical expression 12. a0 to a4 can correspond to weight parameters of the parameters of the convolutional model.

[0185]

[0186] According to Equation 12, for each sample location within the current block, the square of the difference between the virtual sample and the corrected prediction sample is calculated, and ErrCost can be derived as the sum of the calculated values. Here, the corrected prediction sample may be derived based on the parameters of a convolutional model such as Equation 11. In this case, a0 to a4 can be derived as values ​​that minimize ErrCost for the current block.

[0187] The above mathematical expression 12 can also be expressed as the following mathematical expression 13.

[0188]

[0189] The above convolutional model can be defined in various forms depending on the number of surrounding samples used in addition to the current sample (C). For example, all eight surrounding samples (L, R, A, B, AL, AR, BL, BR) adjacent to the current sample (C) can be used. Alternatively, five surrounding samples adjacent to the current sample (C) can be used. Here, the five surrounding samples can be composed of {L, R, A, AL, AR} or {L, R, B, BL, BR}. Alternatively, two surrounding samples adjacent to the current sample (C) can be used. Here, the two surrounding samples can be composed of {L, R}, {A, B}, {AL, AR}, or {BL, BR}.

[0190] The parameters of the convolution model may include at least one of an offset parameter and a nonlinear parameter. The offset parameter may be defined as a median value of a bit depth of an input image or an average value of input samples. Here, the input sample may refer to a current sample (C) and its surrounding samples input to the convolution model. The nonlinear parameter may refer to a parameter having a nonlinear characteristic, such as a square value of the current sample. The nonlinear parameter may be a weight parameter applied to the square value of an input sample (at least one of the current sample and the surrounding samples) in the convolution model.

[0191] For convenience of explanation, the above example uses 3×3 sized surrounding samples with the current sample (C) as the central sample, but is not limited thereto. For example, all or part of surrounding samples with sizes such as 5×5 or 13×13 with the current sample (C) as the central sample may be used.

[0192] The number of surrounding samples used in the convolutional model, whether to use offset parameters and nonlinear parameters, etc. can be variably determined considering complexity and model performance.

[0193] As previously discussed, the parameters of the model according to the present disclosure can be derived based on the predicted sample region of the current block. However, this is not limited to this, and the model parameters can also be derived based on the differential signal region (or residual sample region) of the current block. In this case, the input samples of the linear model or convolutional model may be the corresponding residual samples rather than the predicted samples.

[0194] Meanwhile, there may be cases where the surrounding samples used in the convolutional model are unavailable. For example, the surrounding samples used in the convolutional model may be located outside the current block. To address this issue, a padding process can be performed on the outer region adjacent to the boundary of the current block. The number of padded samples can be determined based on the number of surrounding samples used in the convolutional model.

[0195] The above padding process may be a process of replacing unavailable samples among the surrounding samples input to the convolution model with available samples within the current block. The available samples may be samples located at the boundary of the current block. For example, if the upper sample (A, AL, AR) of the current sample is an unavailable sample, the upper sample may be replaced with the current sample or a lower sample adjacent to the upper sample. If the left sample (L, AL, BL) of the current sample is an unavailable sample, the left sample may be replaced with the current sample or a right sample adjacent to the left sample. If the lower sample (B, BL, BR) of the current sample is an unavailable sample, the lower sample may be replaced with the current sample or an upper sample adjacent to the lower sample. If the right sample (R, AR, BR) of the current sample is an unavailable sample, the right sample may be replaced with the current sample or a left sample adjacent to the right sample. Alternatively, the padding may be performed so as to have a mirror image shape centered on the boundary of the current block.

[0196] For the current block, parameters of one of the predefined linear or convolutional models can be derived. Alternatively, an index specifying one of the multiple models can be defined. Based on the index, one of the multiple models can be selected, and parameters of the selected model can be derived. Here, the index can be signaled through the bitstream or derived based on attributes of the current block. The attributes of the current block can include at least one of the size, the prediction method used to obtain the prediction sample, the component type, or whether geometric segmentation is applied. Alternatively, parameters for each of the multiple models can be derived for the current block.

[0197] For example, if multiple models are defined for a single sequence or image, a flag or index that selects one of the multiple models at the picture or slice level can be signaled. Table 3 below shows an example of ph_mbc_model_idx being signaled in the picture header.

[0198] picture_header_structure() {Descriptor...ph_mbc_model_idxue(v)...}

[0199] In Table 3, ph_mbc_model_idx may be an index that selects one of multiple models for model-based compensation in the current picture. Table 4 below is an example showing the mapping relationship between the values ​​of ph_mbc_model_idx and the aforementioned multiple models.

[0200] ph_mbc_model_idxModel0LinearModel1ConvolutionModel2Reserved

[0201] An index for selecting one of multiple models for model-based compensation can be signaled in the coding unit syntax for the current block. The index can be expressed as cu_mbc_model_idx, and can be signaled as shown in Table 5 below.

[0202] coding_unit() {Descriptor...if(sps_model_based_compensation_enabled_flag)mbc_flagae(v)if(mbc_flag)cu_mbc_model_idxae(v)...}

[0203] According to Table 5, cu_mbc_model_idx can be signaled when the flag (mbc_flag), which indicates whether model-based compensation is applied in the current coding unit (or current block), is 1. On the other hand, cu_mbc_model_idx may not be signaled when mbc_flag is 0.

[0204] If the value of cu_mbc_model_idx is 0, this may indicate that a linear model is selected as the model for model-based compensation. If the value of cu_mbc_model_idx is 1, this may indicate that a convolutional model is selected as the model for model-based compensation. However, this is merely an example, and the multiple models may additionally include other models in addition to the linear model and the convolutional model.

[0205] Referring to FIG. 4, a corrected prediction sample can be obtained based on the prediction sample of the current block and the parameters of the derived model (S430).

[0206] The predicted sample of the current block can be corrected by applying the parameters of the above-described linear model or convolutional model to the predicted sample of the current block.

[0207] If parameters for each of the multiple models for the current block are derived, the parameters of each model can be applied to the prediction sample for the current block. This allows for obtaining multiple corrected prediction samples, each corresponding to a plurality of models, and for obtaining a final prediction sample based on a weighted sum of the multiple corrected prediction samples.

[0208] The above-described derived model is intended to improve the accuracy of a prediction block by compensating for the difference in sample values ​​between the virtual block of the current block and the prediction block, thereby improving encoding efficiency.

[0209] Meanwhile, information regarding the aforementioned model-based compensation can be signaled.

[0210] Specifically, a flag may be signaled from the higher-level syntax to indicate whether model-based compensation is applied to a specific unit of the higher-level syntax. Alternatively, the flag may also indicate whether model-based compensation is available for a specific unit of the higher-level syntax. Here, the higher-level syntax may include at least one of a sequence parameter set (SPS), a picture parameter set (PPS), a picture header (PH), or a slice header (SH).

[0211] For example, the flag can be expressed as sps_model_based_compensation_enabled_flag, which can be signaled as shown in Table 6 below.

[0212] seq_parameter_set_rbsp() {Descriptor...sps_model_based_compensation_enabled_flagu(1)...}

[0213] According to Table 6, sps_model_based_compensation_enabled_flag can be a syntax signaled in SPS. sps_model_based_compensation_enabled_flag can indicate the presence of a flag (mbc_flag) indicating whether model-based compensation is applied to the current block. For example, if sps_model_based_compensation_enabled_flag is 1, this can indicate that mbc_flag can be present in the coding unit syntax for the current block. On the other hand, if sps_model_based_compensation_enabled_flag is 0, this can indicate that mbc_flag does not exist in the coding unit syntax for the current block. If sps_model_based_compensation_enabled_flag does not exist (i.e., sps_model_based_compensation_enabled_flag is not signaled), the value of sps_model_based_compensation_enabled_flag can be derived as 0.

[0214] A flag (mbc_flag) may be signaled to indicate whether model-based rewards are applied to the current block. For example, the flag may be signaled as shown in Table 7 below.

[0215] coding_unit() {Descriptor...if( sps_model_based_compensation_enabled_flag )mbc_flagae(v)...}

[0216] According to Table 7, mbc_flag can be signaled in the coding unit syntax for the current block. mbc_flag can indicate whether model-based compensation is applied to the current coding unit (or the current block). If mbc_flag is 1, this can indicate that model-based compensation is applied to the current coding unit. On the other hand, if mbc_flag is 0, this can indicate that model-based compensation is not applied to the current coding unit. If mbc_flag does not exist (i.e., mbc_flag is not signaled), the value of mbc_flag can be derived as 0.

[0217] mbc_flag may be signaled regardless of the size of the current block. Alternatively, mbc_flag may be signaled only when the size of the current block is greater than or equal to a predefined threshold (T1). Alternatively, mbc_flag may be signaled only when the size of the current block is less than or equal to a predefined threshold (T2). Alternatively, mbc_flag may be signaled only when the size of the current block is greater than or equal to T1 and less than or equal to T2. Here, the size of the current block may be defined as the number of samples belonging to the current block (or the product of the width and the height of the current block), either the width or the height of the current block, the ratio of the width and the height of the current block, or the maximum or minimum value of the width and the height of the current block.

[0218] For example, mbc_flag can be signaled only when the number of samples in the current block is less than 1024. Alternatively, mbc_flag can be signaled only when the number of samples in the current block is greater than 32 or 64. Since model-based prediction accuracy may be low for blocks that are too small or too large, limiting the application of model-based compensation based on the size of the current block can reduce the burden of flag signaling and improve encoding efficiency.

[0219] The mbc_flag may be adaptively signaled based on the prediction mode of the current block. The mbc_flag may be signaled if the prediction mode of the current block corresponds to a prediction mode that allows model-based compensation. The prediction mode that allows model-based compensation may include at least one of the AMVP mode, the merge mode, the affine mode, the subblock-based merge mode, the geometric segmentation mode, the CIIP mode, or the MHP mode.

[0220] mbc_flag can be adaptively signaled based on sps_model_based_compensation_enabled_flag. For example, if sps_model_based_compensation_enabled_flag is 1, mbc_flag can be signaled, and if sps_model_based_compensation_enabled_flag is 0, mbc_flag can not be signaled.

[0221] It is possible to determine whether a model-based reward is applied to the current block. Based on the information regarding the model-based reward, it can be determined whether the model-based reward is applied to the current block. If it is determined that the model-based reward is applied to the current block (e.g., if mbc_flag is 1), steps S410 to S430 described above may be performed for the current block. Otherwise (e.g., if mbc_flag is 0), the prediction sample obtained in S400 may be set as the final prediction sample of the current block.

[0222] FIG. 5 illustrates a schematic configuration of a decoding device (300) that performs a model-based compensation method according to the present disclosure.

[0223] Referring to FIG. 5, the decoding device (300) may include at least one of a prediction sample acquisition unit (500), a virtual sample generation unit (510), a model parameter derivation unit (520), or a prediction sample correction unit (530).

[0224] The prediction sample acquisition unit (500) can acquire a prediction sample of the current block. The prediction sample acquisition unit (500) can acquire a prediction sample of the current block based on intra prediction or inter prediction, as described with reference to FIG. 4.

[0225] The virtual sample generation unit (510) can generate a virtual sample for the current block. The virtual sample generation unit (510) can generate a virtual sample for the current block based on the restored sample(s) surrounding the current block, and the method for generating the virtual sample is as described with reference to FIG. 4.

[0226] The model parameter derivation unit (520) can derive parameters for model-based compensation based on the predicted samples and virtual samples of the current block. The model parameter derivation unit (520) can derive parameters based on a model pre-defined in the decoding device (e.g., a linear model or a convolutional model), or can selectively derive parameters using any one of a plurality of models pre-defined in the decoding device. This is as described with reference to FIG. 4, and a duplicate description will be omitted herein.

[0227] The prediction sample correction unit (530) can obtain a corrected prediction sample based on the prediction sample of the current block and parameters for model-based compensation.

[0228] The decoding device (300) may further include a model-based compensation determination unit (not shown). The model-based compensation determination unit may determine whether model-based compensation is applied to the current block. The model-based compensation determination unit may determine whether model-based compensation is applied to the current block based on the information regarding the model-based compensation discussed above. The information regarding the model-based compensation may be decoded through the entropy decoding unit (310). If it is determined that model-based compensation is applied to the current block, a corrected prediction sample may be obtained through the virtual sample generation unit (510), the model parameter derivation unit (520), and the prediction sample correction unit (530).

[0229] FIG. 6 illustrates a model-based compensation method performed by an encoding device (200) as an embodiment according to the present disclosure.

[0230] Referring to FIG. 6, a prediction sample of the current block can be acquired (S600). The prediction sample of the current block can be acquired based on intra-prediction or inter-prediction, as discussed with reference to FIG. 4.

[0231] Referring to FIG. 6, a virtual sample for the current block can be generated (S610). A virtual sample for the current block can be generated based on the restored sample(s) surrounding the current block, and the method for generating the virtual sample is as described with reference to FIG. 4.

[0232] Referring to FIG. 6, parameters for model-based compensation can be derived based on predicted samples and virtual samples of the current block (S620). The parameters can be derived based on a pre-defined model (e.g., a linear model or a convolutional model) in the encoding device, or the parameters can be derived by selectively using any one of a plurality of pre-defined models in the encoding device. To this end, an index specifying any one of the plurality of models can be defined. That is, a model for model-based compensation of the current block can be determined from among the plurality of models, and an index indicating the determined model can be encoded into a bitstream. The signaling method of the index is as described with reference to FIG. 4. Alternatively, the index can be derived based on the properties of the current block. The method of deriving parameters for model-based compensation is as described with reference to FIG. 4, and a redundant description thereof will be omitted herein.

[0233] Referring to FIG. 6, a corrected prediction sample can be obtained based on the prediction sample of the current block and parameters for model-based compensation (S630).

[0234] It is possible to determine whether model-based compensation is applied to the current block. If it is determined that model-based compensation is applied to the current block, steps S610 to S630 described above may be performed for the current block. Otherwise, the prediction sample obtained in step S600 may be set as the final prediction sample of the current block. Based on the determination of whether model-based compensation is applied to the current block, information regarding the model-based compensation discussed above may be encoded in the bitstream. The signaling method for the information regarding the model-based compensation is as described with reference to FIG. 4.

[0235] FIG. 7 illustrates a schematic configuration of an encoding device (200) that performs a model-based compensation method according to the present disclosure.

[0236] Referring to FIG. 7, the encoding device (200) may include at least one of a prediction sample acquisition unit (700), a virtual sample generation unit (710), a model parameter derivation unit (720), or a prediction sample correction unit (730).

[0237] The prediction sample acquisition unit (700) can acquire a prediction sample of the current block. The prediction sample acquisition unit (700) can acquire a prediction sample of the current block based on intra prediction or inter prediction, as described with reference to FIG. 4.

[0238] The virtual sample generation unit (710) can generate a virtual sample for the current block. The virtual sample generation unit (710) can generate a virtual sample for the current block based on the restored sample(s) surrounding the current block, and the method for generating the virtual sample is as described with reference to FIG. 4.

[0239] The model parameter derivation unit (720) can derive parameters for model-based compensation based on the predicted samples and virtual samples of the current block. The model parameter derivation unit (720) can derive parameters based on a model pre-defined in the encoding device (e.g., a linear model or a convolutional model), or can selectively derive parameters using any one of a plurality of models pre-defined in the encoding device. This is as described with reference to FIGS. 4 and 6, and any duplicate description will be omitted here.

[0240] The prediction sample correction unit (730) can obtain a corrected prediction sample based on the prediction sample of the current block and parameters for model-based compensation.

[0241] The encoding device (200) may further include a model-based compensation determination unit (not shown). The model-based compensation determination unit may determine whether model-based compensation is applied to the current block. If it is determined that model-based compensation is applied to the current block, a corrected prediction sample may be obtained through the virtual sample generation unit (710), the model parameter derivation unit (720), and the prediction sample correction unit (730). Based on the determination of whether model-based compensation is applied to the current block, information regarding the model-based compensation discussed above may be encoded into the bitstream. The signaling method of the information regarding the model-based compensation is as described with reference to FIG. 4.

[0242] In the embodiments described above, the methods are described based on a flowchart as a series of steps or blocks. However, the embodiments are not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments of this document.

[0243] The method according to the embodiments of the present document described above can be implemented in the form of software, and the encoding device and / or decoding device according to the present document can be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.

[0244] When the embodiments in this document are implemented as software, the above-described method can be implemented as a module (process, function, etc.) that performs the above-described function. The module can be stored in memory and executed by a processor. The memory can be internal or external to the processor and can be connected to the processor by various well-known means. The processor can include an application-specific integrated circuit (ASIC), another chipset, logic circuit, and / or data processing device. The memory can include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document can be implemented and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units illustrated in each drawing can be implemented and performed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for implementation (e.g., information on instructions) or an algorithm can be stored on a digital storage medium.

[0245] In addition, the decoding device and encoding device to which the embodiment(s) of the present specification are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (argumente reality) device, a video phone video device, a transportation terminal (ex. a vehicle (including an autonomous vehicle) terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc.

[0246] In addition, the processing method to which the embodiment(s) of the present specification are applied can be produced in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiment(s) of the present specification can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium can include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0247] Additionally, the embodiments of the present disclosure may be implemented as a computer program product by program code, and the program code may be executed on a computer by the embodiments of the present disclosure. The program code may be stored on a computer-readable carrier.

[0248] FIG. 8 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.

[0249] Referring to FIG. 8, a content streaming system to which the embodiment(s) of the present specification are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0250] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams, the encoding server may be omitted.

[0251] The above bitstream can be generated by an encoding method or a bitstream generation method to which the embodiment(s) of the present specification are applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0252] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server transmits the multimedia data to the user. At this time, the content streaming system may include a separate control server, in which case the control server controls commands / responses between each device within the content streaming system.

[0253] The streaming server can receive content from a media repository and / or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.

[0254] Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.

[0255] Each server within the above content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.

[0256] The claims set forth in this specification may be combined in various ways. For example, the technical features of the method claims of this specification may be combined and implemented as a device, and the technical features of the device claims of this specification may be combined and implemented as a method. Furthermore, the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a device, and the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a method.

Claims

1. Step of obtaining a prediction sample of the current block; A step of generating a virtual sample for the current block; A step of deriving parameters for model-based compensation of the current block based on the predicted sample of the current block and the generated virtual sample; A step of obtaining a corrected prediction sample by applying the parameter to the prediction sample of the current block; and A method comprising the step of restoring the current block based on the corrected prediction sample of the current block and the residual sample of the current block.

2. In paragraph 1, The above virtual sample is generated based on a planar mode for intra prediction.

3. In paragraph 1, The above virtual sample is generated based on the DC mode for intra prediction.

4. In paragraph 1, The above virtual sample is generated through a weighted sum between a sample generated by applying a predetermined prediction method to the current block and a reference sample of the current block, A method wherein the above reference sample includes at least one of an upper peripheral sample or a left peripheral sample adjacent to the current block.

5. In paragraph 1, The above virtual sample is generated based on a predetermined intra prediction mode, A method wherein the above-described intra prediction mode is derived based on decoder-side intra mode derivation (DIMD) or template-based intra mode derivation (TIMD).

6. In paragraph 1, The above virtual sample is generated based on intra template matching prediction (intra TMP).

7. In paragraph 1, The above virtual sample is generated based on matrix-based intra prediction (MIP) method.

8. In paragraph 1, A method in which the above virtual sample is generated for a sample location belonging to some area within the current block.

9. In paragraph 1, The above parameters are parameters of a linear model or parameters of a convolutional model.

10. In paragraph 1, The above parameters are derived as parameters that minimize a given cost, A method wherein the above cost is defined based on the difference between the virtual sample and the corrected predicted sample for each sample location within the current block.

11. In paragraph 1, The above-mentioned corrected prediction sample is obtained by applying the above-mentioned parameter to the prediction sample and the surrounding samples adjacent to the prediction sample, A method wherein the above-mentioned peripheral sample includes at least one of an upper peripheral sample, a lower peripheral sample, a left peripheral sample, a right peripheral sample, an upper-left peripheral sample, an upper-right peripheral sample, a lower-left peripheral sample, or a lower-right peripheral sample of the above-mentioned prediction sample.

12. Step of obtaining a prediction sample of the current block; A step of generating a virtual sample for the current block; A step of deriving parameters for model-based compensation of the current block based on the predicted sample of the current block and the generated virtual sample; A step of obtaining a corrected prediction sample by applying the above parameters to the prediction sample of the current block; A step of generating a residual sample of the current block based on the corrected prediction sample of the current block; and A method comprising the step of encoding a residual sample of the current block.

13. A computer-readable storage medium storing a bitstream generated by the method according to Article 12.

14. A step of obtaining a bitstream for image information; wherein the bitstream is generated based on the steps of: obtaining a prediction sample of a current block; generating a virtual sample for the current block; deriving parameters for model-based compensation of the current block based on the prediction sample of the current block and the generated virtual sample; obtaining a corrected prediction sample by applying the parameters to the prediction sample of the current block; generating a residual sample of the current block based on the corrected prediction sample of the current block; and encoding the residual sample of the current block. A method comprising the step of transmitting data including the bitstream.

Citation Information

Patent Citations

  • Method and apparatus for video encoding and decoding based on linear model responsive to neighboring samples

    JP2023130359A

  • Data transmission apparatus in semiconductor system for reducing current consumption

    KR102589534B1

  • Method and apparatus of local illumination compensation for predictive coding

    US20210352277A1

  • Video picture component prediction method and apparatus, and computer storage medium

    US20220239901A1

  • Model adjustment for local illumination compensation in video coding

    WO2023172851A1