Image encoding / decoding method and device, and recording medium for storing bitstream

The method addresses the inefficiencies in high-resolution image coding/decoding by determining lighting compensation parameters for dual prediction IBC mode, improving prediction accuracy and efficiency in image encoding and decoding processes.

WO2025023735A1PCT designated stage expired Publication Date: 2025-01-30HYUNDAI MOTOR CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/010715
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-24
Filing Date
2024-07-24
Publication Date
2025-01-30

AI Technical Summary

Technical Problem

High-resolution and high-quality image data require efficient encoding and decoding methods to reduce storage and transmission costs, as existing technologies struggle with high data volumes and prediction accuracy in image coding/decoding processes.

Method used

The proposed method improves prediction accuracy in image coding/decoding by determining lighting compensation parameters for dual prediction Intra Block Copy (IBC) mode, using block vectors and templates to modify prediction blocks and generate a final prediction block through weighting, which enhances encoding/decoding efficiency.

Benefits of technology

This approach enhances the predictive accuracy of image coding/decoding, leading to improved encoding/decoding efficiency and reduced storage and transmission costs for high-resolution images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024010715_30012025_PF_FP_ABST
    Figure KR2024010715_30012025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention provides an image decoding method comprising the steps of: determining a first reference block and a second reference block of a current block from a current picture; determining a first illumination compensation parameter of a current template of the current block and a first reference template of the first reference block and a second illumination compensation parameter of the current template and a second reference template of the second reference block; modifying a first prediction block derived from the first reference block according to the first illumination compensation parameter, and modifying a second prediction block derived from the second reference block according to the second illumination compensation parameter; and determining a final prediction block of the current block from the modified first prediction block and the modified second prediction block.
Need to check novelty before this filing date? Find Prior Art

Description

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

[0001] The present invention relates to a video encoding / decoding method, a device, and a recording medium storing a bitstream. Specifically, the present invention relates to a video encoding / decoding method and device using an intra-screen prediction method, and a recording medium storing a bitstream.

[0002] Recently, the demand for high-resolution, high-quality images, such as UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising from the increasing resolution and quality of image data, high-efficiency image encoding / decoding technologies for higher-resolution and higher-quality images are required.

[0003] In video encoding and decoding, intra-block copy (IBC) is a technique for predicting the current block based on a reference block in a previously reconstructed region of the current picture. Intra-block copy offers high prediction accuracy in pictures with repetitive patterns. Improving the intra-block copy mode can improve the encoding efficiency of the current picture when a reference picture is not available. Therefore, various methods for improving the prediction accuracy of intra-block copy are being discussed.

[0004] The purpose of the present invention is to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.

[0005] In addition, the present invention aims to provide a recording medium storing a bitstream generated by the image decoding method or device provided in the present invention.

[0006] A video decoding method according to one embodiment of the present invention may include the steps of: determining a first reference block and a second reference block of a current block from a current picture; determining a first illumination compensation parameter of a current template of the current block and a first reference template of the first reference block and a second illumination compensation parameter of a second reference template of the current template and the second reference block; modifying a first prediction block derived from the first reference block according to the first illumination compensation parameter and modifying a second prediction block derived from the second reference block according to the second illumination compensation parameter; and determining a final prediction block of the current block from the modified first prediction block and the modified second prediction block.

[0007] According to one embodiment, the first reference block may be derived from a first block vector of the current block, and the second reference block may be derived from a second block vector of the current block.

[0008] According to one embodiment, the first block vector and the second block vector may be characterized in that they are derived from a first reference block vector and a second reference block vector of an adjacent block of the current block.

[0009] According to one embodiment, the first block vector and the second block vector may be characterized in that they are derived from a first reference block vector of a first adjacent block of the current block and a second reference block vector of a second adjacent block of the current block, respectively.

[0010] According to one embodiment, the first illumination compensation parameter may represent a first linear model of the current template and the first reference template, and include a first slope parameter and a first intercept parameter of the first linear model, and the second illumination compensation parameter may represent a second linear model of the current template and the second reference template, and include a second slope parameter and a second intercept parameter of the second linear model.

[0011] According to one embodiment, the step of determining the first lighting compensation parameter and the second lighting compensation parameter may include the step of determining the first lighting compensation parameter from the current template and the first reference template, the step of determining the first correction template by correcting the current template using the first lighting compensation parameter, and the step of determining the second lighting compensation parameter from the first correction template and the second reference template.

[0012] According to one embodiment, the step of determining the first illumination compensation parameter and the second illumination compensation parameter may include the step of determining a second correction template by correcting the first correction template using the second illumination compensation parameter determined from the first correction template and the second reference template, and the step of determining a modified first illumination compensation parameter based on the second correction template and the first reference template.

[0013] According to one embodiment, in the step of determining the final prediction block of the current block, it may be characterized in that the sample of the final prediction block is determined based on a weighted sum of samples of the modified first prediction block and samples of the modified second prediction block.

[0014] According to one embodiment, the weighted sum of the samples of the modified first prediction block and the samples of the modified second prediction block may be determined based on a first weight for the modified first prediction block and a second weight for the modified second prediction block, and the first weight and the second weight may be determined based on a first distortion between the current template and the first reference template and a second distortion between the current template and the second reference template.

[0015] In one embodiment, the first weight may be characterized by increasing as the second distortion increases, and the second weight may be characterized by increasing as the first distortion increases.

[0016] According to one embodiment, the current template, the first reference template, and the second reference template may have the same shape, and the shape may be one of an L-shaped template, a top template, and a left template.

[0017] According to one embodiment, the image decoding method may further include a step of obtaining a binary prediction IBC mode flag indicating whether a binary prediction IBC mode is applied to the current block, and when the binary prediction IBC is applied according to the binary prediction IBC mode flag, a first reference block and a second reference block of the current block are determined from the current picture.

[0018] A video encoding method according to one embodiment of the present invention may include the steps of: determining a first reference block and a second reference block of a current block from a current picture; determining a first illumination compensation parameter of a current template of the current block and a first reference template of the first reference block and a second illumination compensation parameter of a second reference template of the current template and the second reference block; modifying a first prediction block derived from the first reference block according to the first illumination compensation parameter and modifying a second prediction block derived from the second reference block according to the second illumination compensation parameter; and determining a final prediction block of the current block from the modified first prediction block and the modified second prediction block.

[0019] A non-transitory computer-readable recording medium according to one embodiment of the present invention stores a bitstream generated by the image encoding method.

[0020] A transmission method according to one embodiment of the present invention transmits a bitstream generated by the image encoding method.

[0021] The features briefly summarized above of the present invention are merely exemplary aspects of the detailed description of the present invention described below and do not limit the scope of the present invention.

[0022] The present invention proposes various embodiments of a lighting compensation method for block copying within a binary prediction screen.

[0023] In addition, the present invention proposes various embodiments of a method for determining lighting compensation parameters required for the lighting compensation method.

[0024] According to the above various embodiments, the overall encoding efficiency can be improved as the prediction accuracy of block copy within the screen is improved.

[0025] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

[0026] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0027] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.

[0028] Figure 4 illustrates a method for deriving a prediction block based on binary prediction IBC.

[0029] Figure 5 illustrates a lighting compensation method for the binary prediction IBC mode.

[0030] Figure 6 illustrates an example of the form of a template used in the binary prediction IBC mode.

[0031] Fig. 7 illustrates an embodiment of an in-screen prediction method according to a binary prediction IBC mode.

[0032] Figure 8 illustrates an example of a content streaming system to which an embodiment according to the present invention can be applied.

[0033] A video decoding method according to one embodiment of the present invention may include the steps of: determining a first reference block and a second reference block of a current block from a current picture; determining a first illumination compensation parameter of a current template of the current block and a first reference template of the first reference block and a second illumination compensation parameter of a second reference template of the current template and the second reference block; modifying a first prediction block derived from the first reference block according to the first illumination compensation parameter and modifying a second prediction block derived from the second reference block according to the second illumination compensation parameter; and determining a final prediction block of the current block from the modified first prediction block and the modified second prediction block.

[0034] The present invention is susceptible to various modifications and embodiments. Therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but rather to encompass all modifications, equivalents, and substitutes falling within the spirit and scope of the present invention. In the drawings, similar reference numerals designate the same or similar functions throughout. The shape and size of elements in the drawings may be provided by way of example only for clarity. The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments, while different from each other, are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention. Furthermore, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be modified without departing from the spirit and scope of the embodiment. Accordingly, the detailed description set forth below is not intended to be taken in a limiting sense, and the scope of the illustrative embodiments, if properly described, is defined only by the appended claims, along with the full scope equivalents to which such claims are entitled.

[0035] In the present invention, terms such as first, second, etc. may be used to describe various components, but the 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 invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term "and / or" includes a combination of multiple related described items or any of multiple related described items.

[0036] The components shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and do not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.

[0037] The terminology used herein is merely used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In addition, some components of the present invention are not essential components that perform essential functions in the present invention and may be optional components merely for performance enhancement. The present invention may be implemented by including only components essential to realizing the essence of the present invention, excluding components used only for performance enhancement, and a structure including only essential components, excluding optional components used only for performance enhancement, is also within the scope of the present invention.

[0038] In embodiments, the term "at least one" may mean one of a number greater than or equal to 1, such as 1, 2, 3, and 4. In embodiments, the term "a plurality of" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.

[0039] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of this specification, if it is determined that a detailed description of a related known configuration or function may obscure the gist of this specification, the detailed description will be omitted. The same reference numerals will be used for identical components in the drawings, and duplicate descriptions of identical components will be omitted.

[0040]

[0041] Glossary of Terms

[0042] Hereinafter, “video” may mean a single picture constituting a video, or may refer to the video itself. For example, “encoding and / or decoding of a video” may mean “encoding and / or decoding of a video,” or may mean “encoding and / or decoding of one of the videos constituting the video.”

[0043] Hereinafter, the terms "video" and "movie" may be used interchangeably and have the same meaning. Furthermore, the target image may be an encoding target image, which is the target of encoding, and / or a decoding target image, which is the target of decoding. Furthermore, the target image may be an input image input to an encoding device, or an input image input to a decoding device. Here, the target image may have the same meaning as the current image.

[0044] Hereinafter, “image”, “picture”, “frame” and “screen” may be used with the same meaning and may be used interchangeably.

[0045] Hereinafter, the term "target block" may refer to an encoding target block, which is the target of encoding, and / or a decoding target block, which is the target of decoding. Furthermore, the target block may refer to a current block, which is the target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used interchangeably and have the same meaning.

[0046] Hereinafter, "block" and "unit" may be used with the same meaning and may be used interchangeably. In addition, "unit" may mean including a luminance component block and a corresponding chroma component block to distinguish it from a block. For example, a coding tree unit (CTU) may be composed of one luma component (Y) coding tree block (CTB) and two chroma component (Cb, Cr) coding tree blocks associated with it.

[0047] Hereinafter, “sample,” “pixel,” and “pixel” may be used interchangeably and have the same meaning. Here, a sample may represent a basic unit that constitutes a block.

[0048] Hereinafter, “inter” and “between screens” may be used interchangeably and have the same meaning.

[0049] Hereinafter, “intra” and “within screen” may be used interchangeably and have the same meaning.

[0050]

[0051] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

[0052] The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device (100) may sequentially encode one or more images.

[0053] Referring to FIG. 1, the encoding device (100) may include an image segmentation unit (110), an intra prediction unit (120), a motion prediction unit (121), a motion compensation unit (122), a switch (115), a subtractor (113), a transformation unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transformation unit (170), an adder (117), a filter unit (180), and a reference picture buffer (190).

[0054] Additionally, the encoding device (100) can generate a bitstream including encoded information through encoding an input image and output the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium or can be streamed via a wired / wireless transmission medium.

[0055] The video segmentation unit (110) can segment the input video into various forms to increase the efficiency of video encoding / decoding. That is, the input video is composed of multiple pictures, and one picture can be hierarchically segmented and processed for compression efficiency, parallel processing, etc. For example, one picture can be segmented into one or more tiles or slices, which can then be segmented into multiple Coding Tree Units (CTUs). Alternatively, one picture can first be segmented into multiple sub-pictures defined as groups of rectangular slices, and each sub-picture can then be segmented into the tiles / slices. Here, the sub-pictures can be utilized to support the function of partially independently encoding / decoding and transmitting the picture. Since multiple sub-pictures can each be individually restored, there is an advantage of easy editing in applications that configure multi-channel input into a single picture. In addition, tiles can be segmented horizontally to generate bricks. Here, a brick can be utilized as the basic unit of parallel processing within a picture. In addition, one CTU can be recursively split into a quadtree (QT), and the terminal node of the split can be defined as a coding unit (CU). The CU can be split into a prediction unit (PU) and a transformation unit (TU), and prediction and splitting can be performed. Meanwhile, the CU can be utilized as a prediction unit and / or a transformation unit itself. Here, for flexible splitting, each CTU can be recursively split into a multi-type tree (MTT) as well as a quadtree (QT). Splitting of a CTU into a multi-type tree can start from the terminal node of a QT, and the MTT can be composed of a binary tree (BT) and a triple tree (TT).For example, the MTT structure can be divided into vertical binary split mode (SPLIT_BT_VER), horizontal binary split mode (SPLIT_BT_HOR), vertical ternary split mode (SPLIT_TT_VER), and horizontal ternary split mode (SPLIT_TT_HOR). In addition, the minimum block size (MinQTSize) of the quad tree of the luminance block during splitting can be set to 16x16, the maximum block size (MaxBtSize) of the binary tree can be set to 128x128, and the maximum block size (MaxTtSize) of the triple tree can be set to 64x64. In addition, the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the triple tree can be set to 4x4, and the maximum depth (MaxMttDepth) of the multi-type tree can be set to 4. Additionally, to improve the encoding efficiency of the I slice, a dual tree can be applied that uses different CTU partition structures for the luminance and chrominance components. On the other hand, in the P and B slices, the luminance and chrominance CTBs (Coding Tree Blocks) within the CTU can be partitioned into a single tree that shares the coding tree structure.

[0056] The encoding device (100) may perform encoding on the input image in intra mode and / or inter mode. Alternatively, the encoding device (100) may perform encoding on the input image in a third mode (e.g., IBC mode, Palette mode, etc.) other than the intra mode and inter mode. However, if the third mode has functional characteristics similar to the intra mode or inter mode, it may be classified as intra mode or inter mode for convenience of explanation. In the present invention, the third mode will be classified and described separately only when a specific description is required.

[0057] When the intra mode is used as the prediction mode, the switch (115) can be switched to intra, and when the inter mode is used as the prediction mode, the switch (115) can be switched to inter. Here, the intra mode can mean the intra prediction mode, and the inter mode can mean the inter-screen prediction mode. The encoding device (100) can generate a prediction block for an input block of an input image. In addition, after the prediction block is generated, the encoding device (100) can encode a residual block using the residual of the input block and the prediction block. The input image can be referred to as a current image that is currently a target of encoding. The input block can be referred to as a current block that is currently a target of encoding or an encoding target block.

[0058] When the prediction mode is intra mode, the intra prediction unit (120) can use samples of blocks already encoded / decoded around the current block as reference samples. The intra prediction unit (120) can perform spatial prediction on the current block using the reference samples, and can generate prediction samples for the input block through spatial prediction. Here, intra prediction can mean prediction within the screen.

[0059] As an intra prediction method, non-directional prediction modes such as DC mode and Planar mode, as well as directional prediction modes (e.g., 65 directions) can be applied. Here, the intra prediction method can be expressed as an intra prediction mode or an intra prediction mode.

[0060] When the prediction mode is inter mode, the motion prediction unit (121) can search for an area that best matches the input block from the reference image during the motion prediction process and derive a motion vector using the searched area. At this time, the area can be used as a search area. The reference image can be stored in the reference picture buffer (190). Here, when encoding / decoding for the reference image is processed, it can be stored in the reference picture buffer (190).

[0061] The motion compensation unit (122) can generate a prediction block for the current block by performing motion compensation using a motion vector. Here, inter prediction may mean inter-screen prediction or motion compensation.

[0062] The above motion prediction unit (121) and motion compensation unit (122) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform inter-screen prediction or motion compensation, it is possible to determine whether the motion prediction and motion compensation method of the prediction unit included in the corresponding encoding unit is one of Skip Mode, Merge Mode, Advanced Motion Vector Prediction (AMVP) mode, and Intra Block Copy (IBC) mode based on the encoding unit, and perform inter-screen prediction or motion compensation according to each mode.

[0063] In addition, based on the above inter-screen prediction method, the AFFINE mode of sub-PU based prediction, the SbTMVP (Subblock-based Temporal Motion Vector Prediction) mode, and the MMVD (Merge with MVD) mode and the GPM (Geometric Partitioning Mode) mode of PU based prediction can be applied. In addition, in order to improve the performance of each mode, the HMVP (History based MVP), the PAMVP (Pairwise Average MVP), the CIIP (Combined Intra / Inter Prediction), the AMVR (Adaptive Motion Vector Resolution), the BDOF (Bi-Directional Optical-Flow), the BCW (Bi-predictive with CU Weights), the LIC (Local Illumination Compensation), the TM (Template Matching), and the OBMC (Overlapped Block Motion Compensation) can be applied.

[0064] The subtractor (113) can generate a residual block using the difference between the input block and the predicted block. The residual block may also be referred to as a residual signal. The residual signal may refer to the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a residual signal in block units.

[0065] The transform unit (130) can perform a transform on the residual block to generate a transform coefficient and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit (130) may also skip the transform on the residual block.

[0066] Quantized levels can be generated by applying quantization to transform coefficients or residual signals. In the following embodiments, quantized levels may also be referred to as transform coefficients.

[0067] For example, a 4x4 luminance residual block generated through within-screen prediction can be transformed using a basis vector based on DST (Discrete Sine Transform), and the remaining residual blocks can be transformed using a basis vector based on DCT (Discrete Cosine Transform). In addition, through RQT (Residual Quad Tree) technology, the transform block is divided into a quad tree shape for one block, and after performing transformation and quantization on each transform block divided through RQT, a coded block flag (cbf) can be transmitted to increase encoding efficiency when all coefficients become 0.

[0068] Another alternative is to apply Multiple Transform Selection (MTS) technology, which selectively performs transformation using multiple transformation bases. That is, instead of dividing CUs into TUs via RQT, a Sub-block Transform (SBT) technology can perform a function similar to TU division. Specifically, SBT is applied only to inter-screen prediction blocks, and unlike RQT, it can divide the current block into ½ or ¼ blocks vertically or horizontally, and then perform transformation on only one of the blocks. For example, in a vertically divided block, the transformation can be performed on the leftmost or rightmost block, and in a horizontally divided block, the transformation can be performed on the topmost or bottommost block.

[0069] Additionally, LFNST (Low Frequency Non-Separable Transform), a secondary transform technique that further transforms the residual signal converted to the frequency domain through DCT or DST, can be applied. LFNST additionally performs a transform on the low-frequency region of 4x4 or 8x8 in the upper left, which allows the residual coefficients to be concentrated in the upper left.

[0070] The quantization unit (140) can generate a quantized level by quantizing a transform coefficient or residual signal according to a quantization parameter (QP), and can output the generated quantized level. At this time, the quantization unit (140) can quantize the transform coefficient using a quantization matrix.

[0071] For example, a quantizer with QP values ​​of 0 to 51 can be used. Alternatively, if the image size is larger and high encoding efficiency is required, a QP of 0 to 63 can be used. In addition, a Dependent Quantization (DQ) method that uses two quantizers instead of a single quantizer can be applied. DQ performs quantization using two quantizers (e.g., Q0 and Q1), but even without signaling information about the use of a specific quantizer, the quantizer to be used for the next transform coefficient can be selected based on the current state through a state transition model.

[0072] The entropy encoding unit (150) can generate a bitstream by performing entropy encoding according to a probability distribution on values ​​produced by the quantization unit (140) or coding parameter values ​​produced during the encoding process, and can output the bitstream. The entropy encoding unit (150) can perform entropy encoding on information about image samples and information for decoding the image. For example, the information for decoding the image can include syntax elements, etc.

[0073] When entropy encoding is applied, a small number of bits are allocated to symbols with a high occurrence probability, and a large number of bits are allocated to symbols with a low occurrence probability, thereby representing the symbols, whereby the size of the bit string for the symbols to be encoded can be reduced. The entropy encoding unit (150) can use an encoding method such as exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), or Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding. For example, the entropy encoding unit (150) can perform entropy encoding using a Variable Length Coding / Code (VLC) table. In addition, the entropy encoding unit (150) may perform arithmetic encoding using the binarization method, probability model, and context model derived from the binarization method of the target symbol and the probability model of the target symbol / bin.

[0074] In this regard, when applying CABAC, the table probability update method can be changed to a simple formula-based table update method to reduce the size of the probability table stored in the decryption device. Furthermore, two different probability models can be used to obtain more accurate symbol probability values.

[0075] The entropy encoding unit (150) can change a two-dimensional block form coefficient into a one-dimensional vector form through a transform coefficient scanning method to encode a transform coefficient level (quantized level).

[0076] Coding parameters may include not only information (flags, indexes, etc.) encoded in an encoding device (100) and signaled to a decoding device (200), such as syntax elements, but also information derived during an encoding process or a decoding process, and may mean information necessary when encoding or decoding an image.

[0077] Here, signaling a flag or index may mean that the encoder entropy encodes the flag or index and includes it in the bitstream, and that the decoder entropy decodes the flag or index from the bitstream.

[0078] The encoded current image can be used as a reference image for other images to be processed later. Accordingly, the encoding device (100) can reconstruct or decode the encoded current image again and store the reconstructed or decoded image as a reference image in the reference picture buffer (190).

[0079] The quantized level can be dequantized in the dequantization unit (160) and inversely transformed in the inverse transformation unit (170). The dequantized and / or inversely transformed coefficients can be combined with a prediction block through an adder (117), and a reconstructed block can be generated by combining the dequantized and / or inversely transformed coefficients and the prediction block. Here, the dequantized and / or inversely transformed coefficients refer to coefficients on which at least one of dequantization and inverse transformation has been performed, and may refer to a reconstructed residual block. The dequantization unit (160) and the inverse transformation unit (170) can be performed in the reverse process of the quantization unit (140) and the transformation unit (130).

[0080] The restoration block may pass through a filter unit (180). The filter unit (180) may apply a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), a bilateral filter (BIF), a Luma Mapping with Chroma Scaling (LMCS), etc. as a filtering technique, in whole or in part, to the restoration sample, restoration block, or restoration image. The filter unit (180) may also be referred to as an in-loop filter. In this case, the in-loop filter is also used as a name excluding LMCS.

[0081] A deblocking filter can remove block distortion that occurs at the boundaries between blocks. Whether to apply a deblocking filter to the current block can be determined based on the samples contained in several columns or rows within the block. When applying a deblocking filter to a block, different filters can be applied depending on the required deblocking filtering strength.

[0082] Sample adaptive offset can be used to compensate for encoding errors by adding an appropriate offset value to sample values. Sample adaptive offset can compensate for the offset from the original image on a sample-by-sample basis in a deblocked image. This can be done by dividing the samples contained in the image into a fixed number of regions, determining the regions to be offset, and applying the offset to those regions, or by applying the offset based on the edge information of each sample.

[0083] Bilateral filter (BIF) can also compensate for the offset from the original image on a sample-by-sample basis for the deblocked image.

[0084] An adaptive loop filter can perform filtering based on a comparison between a reconstructed image and the original image. By dividing the samples contained in the image into predetermined groups and determining the filter to be applied to each group, filtering can be performed differentially for each group. Information regarding whether to apply an adaptive loop filter can be signaled for each coding unit (CU), and the shape and filter coefficients of the adaptive loop filter applied to each block can vary.

[0085] In LMCS (Luma Mapping with Chroma Scaling), luma mapping (LM) refers to remapping luminance values ​​through a piece-wise linear model, and chroma scaling (CS) refers to a technique that scales the residual values ​​of chrominance components according to the average luminance value of the prediction signal. In particular, LMCS can be utilized as an HDR correction technique that reflects the characteristics of HDR (High Dynamic Range) images.

[0086] The restored block or restored image that has passed through the filter unit (180) may be stored in the reference picture buffer (190). The restored block that has passed through the filter unit (180) may be a part of the reference image. In other words, the reference image may be a restored image composed of restored blocks that have passed through the filter unit (180). The stored reference image may be used for inter-screen prediction or motion compensation thereafter.

[0087] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0088] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.

[0089] Referring to FIG. 2, the decoding device (200) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), a motion compensation unit (250), an adder (201), a switch (203), a filter unit (260), and a reference picture buffer (270).

[0090] The decoding device (200) can receive a bitstream output from the encoding device (100). The decoding device (200) can receive a bitstream stored in a computer-readable recording medium, or a bitstream streamed through a wired / wireless transmission medium. The decoding device (200) can perform decoding on the bitstream in intra mode or inter mode. In addition, the decoding device (200) can generate a restored image or a decoded image through decoding, and can output the restored image or the decoded image.

[0091] If the prediction mode used for decryption is intra mode, the switch (203) can be switched to intra. If the prediction mode used for decryption is inter mode, the switch (203) can be switched to inter.

[0092] The decoding device (200) can decode the input bitstream to obtain a reconstructed residual block and generate a prediction block. Once the reconstructed residual block and the prediction block are obtained, the decoding device (200) can generate a reconstructed block to be decoded by adding the reconstructed residual block and the prediction block. The block to be decoded may be referred to as a current block.

[0093] The entropy decoding unit (210) can generate symbols by performing entropy decoding according to a probability distribution for the bitstream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the reverse process of the entropy encoding method described above.

[0094] The entropy decoding unit (210) can change a one-dimensional vector-shaped coefficient into a two-dimensional block-shaped coefficient through a transform coefficient scanning method to decode a transform coefficient level (quantized level).

[0095] The quantized level can be inversely quantized in the inverse quantization unit (220) and inversely transformed in the inverse transformation unit (230). The quantized level can be generated as a restored residual block as a result of performing inverse quantization and / or inverse transformation. At this time, the inverse quantization unit (220) can apply a quantization matrix to the quantized level. The inverse quantization unit (220) and inverse transformation unit (230) applied to the decoding device can apply the same technology as the inverse quantization unit (160) and inverse transformation unit (170) applied to the encoding device described above.

[0096] When intra mode is used, the intra prediction unit (240) can generate a predicted block by performing spatial prediction on the current block using sample values ​​of already decoded blocks surrounding the block to be decoded. The intra prediction unit (240) applied to the decoding device can apply the same technology as the intra prediction unit (120) applied to the encoding device described above.

[0097] When the inter mode is used, the motion compensation unit (250) can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer (270) on the current block. The motion compensation unit (250) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform motion compensation, it is possible to determine whether the motion compensation method of the prediction unit included in the corresponding encoding unit is skip mode, merge mode, AMVP mode, or current picture reference mode based on the encoding unit, and motion compensation can be performed according to each mode. The motion compensation unit (250) applied to the decoding device can apply the same technology as the motion compensation unit (122) applied to the encoding device described above.

[0098] The adder (201) can add the restored residual block and the predicted block to generate a restored block. The filter unit (260) can apply at least one of an Inverse-LMCS, a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the restored block or restored image. The filter unit (260) applied to the decoding device can apply the same filtering technology as that applied to the filter unit (180) applied to the encoding device described above.

[0099] The filter unit (260) can output a restored image. The restored block or restored image can be stored in the reference picture buffer (270) and used for inter prediction. The restored block that has passed through the filter unit (260) can be a part of the reference image. In other words, the reference image can be a restored image composed of restored blocks that have passed through the filter unit (260). The stored reference image can be used for inter-screen prediction or motion compensation thereafter.

[0100] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.

[0101] A video coding system according to one embodiment may include an encoding device (10) and a decoding device (20). The encoding device (10) may transmit encoded video and / or image information or data to the decoding device (20) in the form of a file or streaming through a digital storage medium or a network.

[0102] An encoding device (10) according to one embodiment may include a video source generation unit (11), an encoding unit (12), and a transmission unit (13). A decoding device (20) according to one embodiment may include a reception unit (21), a decoding unit (22), and a rendering unit (23). The encoding unit (12) may be referred to as a video / image encoding unit, and the decoding unit (22) may be referred to as a video / image decoding unit. The transmission unit (13) may be included in the encoding unit (12). The reception unit (21) may be included in the decoding unit (22). The rendering unit (23) may include a display unit, and the display unit may be configured as a separate device or an external component.

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

[0104] The encoding unit (12) can encode the input video / image. The encoding unit (12) can perform a series of procedures such as prediction, transformation, and quantization for compression and encoding efficiency. The encoding unit (12) can output encoded data (encoded video / image information) in the form of a bitstream. The detailed configuration of the encoding unit (12) can also be configured in the same manner as the encoding device (100) of FIG. 1 described above.

[0105] The transmission unit (13) can transmit encoded video / image information or data output in the form of a bitstream to the reception unit (21) of the decoding device (20) via a digital storage medium or a 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 (13) can include an element for generating a media file through a predetermined file format and can include an element for transmission via a broadcasting / communication network. The reception unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).

[0106] The decoding unit (22) can decode video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding unit (12). The detailed configuration of the decoding unit (22) can also be configured in the same manner as the decoding device (200) of FIG. 2 described above.

[0107] The rendering unit (23) can render the decrypted video / image. The rendered video / image can be displayed through the display unit.

[0108]

[0109] The present disclosure provides a method for improving prediction accuracy using illumination compensation. Illumination compensation is a technique for improving prediction accuracy by compensating for changes in illumination values ​​when there are local or global illumination changes between the current block and the predicted block. This disclosure describes a method for applying illumination compensation to bi-predictive intra-block copy (IBC). In particular, since bi-predictive IBC uses two prediction blocks, a novel illumination compensation method suitable for this is required.

[0110] For lighting compensation, parameters for lighting compensation are calculated by comparing the template of the current block with the template of the prediction block. Since binary prediction IBC has two prediction blocks, comparison of the templates of the two prediction blocks with the template of the current block is necessary. Therefore, in the present disclosure, a method is proposed to derive optimal lighting compensation parameters by continuously and sequentially calculating the lighting changes of the templates of the two prediction blocks compared to the template of the current block. In addition, a method is proposed to obtain lighting-compensated prediction blocks by applying the optimal lighting compensation parameters to the prediction blocks, and to generate a final prediction block by weighting the lighting-compensated prediction blocks.

[0111] Below, an embodiment of a lighting compensation method for binary prediction IBC is described.

[0112] Figure 4 illustrates a method for deriving a prediction block based on binary prediction IBC. The two prediction blocks used in binary prediction IBC can be derived in various ways. According to Figure 4, a reference block (Reference block1P) of the current block (400) is derived within a predefined search range (R1, R2, R3, R4) of a reconstructed area around the current block (400).BV1 , Reference block2P BV2 ) (410, 420) can be searched. At this time, in the encoder, the reference block (410, 420) of the current block (400) is selected as the two blocks most similar to the current block (400) from among the candidate list derived by a predetermined method for the current block. The vector pointing to the reference block (410, 420) from the current block (400) is called BV (block vector) (412, 422). In the decoder, the reference block (410, 420) of the current block (400) can be determined from among the candidate list derived by a predetermined method based on information related to the block vector of the bitstream.

[0113] According to one embodiment, the two BVs (412, 422) may be derived from IBC block vector prediction (BVP) mode or IBC merge mode, respectively.

[0114] According to the IBC BVP mode, two BVPs (block vector predictors) are selected from a predetermined BVP candidate list derived from adjacent blocks of the current block (400). Then, two BVs (412, 422) are derived based on the two BVPs and two BVDs (block vector differences). Then, two reference blocks are determined based on the two BVs. The encoder can encode BVP index information indicating the two BVPs from the BVP candidate list. Conversely, the decoder can decode the BVP index information to derive two BVPs from the BVP candidate list.

[0115] According to the IBC merge mode, two BVs (412, 422) are selected from a predetermined IBC merge candidate list derived from adjacent blocks of the current block (400). And two reference blocks (410, 420) are determined according to the two BVs (412, 422). The encoder can encode IBC merge index information indicating IBC merge candidates from the IBC merge candidate list. Conversely, the decoder can decode the IBC merge index information to derive IBC merge candidates including two BVs from the IBC merge index list.

[0116] In another embodiment, two BVs (412, 422) can be derived from two IBC merge candidates selected from the IBC merge index list. In this case, the IBC merge index information indicating the two IBC merge candidates can be explicitly signaled from the encoder to the decoder and parsed by the decoder. Alternatively, the two BVs (412, 422) can be derived using the same derivation method in the decoder / sub-decoder without signaling explicit index information.

[0117] The final prediction block of the current block (400) according to the binary prediction IBC can be generated by weighting two prediction blocks derived from two reference blocks (410, 420). Mathematical expression 1 shows a method for generating the final prediction block.

[0118] [Mathematical Formula 1]

[0119]

[0120] P in mathematical formula 1 BV1 Wow P BV2denote the predicted value generated from BV1 and the predicted value generated from BV2, respectively. And, v denotes the weight value of BV2. The weight value v can be determined through various methods, and 0 ≤ v ≤ 1 is satisfied. In mathematical expression 1, (x, y) denotes a sample position within the prediction block. And, (x, y) may correspond only to an integer-pel sample position, or may correspond to a sub-pel sample position as well as an integer pixel. BV1 and BV2 may have the precision of an integer pixel. In addition, according to an embodiment, BV1 and BV2 may have the precision of a sub-pel (e.g., 1 / 2, 1 / 4, 1 / 8, 1 / 16, ..., 1 / 2^n) to improve the prediction accuracy. If BV1 and BV2 are expressed in sub-pel precision, P BV1 Wow P BV2 can be generated by interpolation based on integer pixels.

[0121] Figure 5 illustrates a lighting compensation method for the binary prediction IBC mode.

[0122] In Fig. 5, the template T (502) of the current block (500) is shown. Also, in Fig. 5, the reference block P pointed to by the first block vector BV1 (514) BV1 Template T BV1 (512) is shown. Also, in Fig. 5, the reference block P pointed to by the second block vector BV2 (524) BV2 (520) Template T BV2 (522). In the binary prediction IBC mode, for lighting compensation of the current block (500), T (502) and T BV1 Comparison of (512) and T (502) and T BV2 By sequentially performing comparisons of (522), the lighting compensation parameters can be derived. Hereinafter, mathematical expressions 2 to 4 are used for the reference block P BV1 The first prediction block and reference block P derived from (510) BV2An embodiment of a method for calculating parameters for lighting compensation of a second prediction block derived from (520) is described.

[0123] Mathematical formula 2 is T and T BV1 (512) represents the relationship as a linear model. In mathematical expression 2, the parameter class is T and T BV1 (512) represents a linear model.

[0124] [Equation 2]

[0125]

[0126] The above parameters class The update of template T (502) is performed using . Hereinafter, T' in mathematical expression 3 is a template determined by the update of template T (502). Mathematical expression 3 is a template determined by the update of template T' and T BV2 (522) represents the relationship as a linear model. In mathematical expression 3, the parameter class is T' and T BV2 (522) represents a linear model.

[0127] [Equation 3]

[0128]

[0129] and, class The update of template T' is performed using . Hereinafter, T" in mathematical expression 4 is a template determined by the update of template T'. Hereinafter, mathematical expression 4 is a template determined by the update of template T" and T BV1 (512) represents the relationship as a linear model. In mathematical expression 4, the parameter class is T" and T BV1 (512) represents a linear model. According to mathematical expression 4, T BV2 (522) The characteristics of the first prediction block P BV1 Lighting compensation parameters for lighting compensation class can be reflected in. Therefore, class Lighting compensation according to class It is possible to derive more sophisticated results than the lighting compensation according to Equation 2. However, in order to reduce the complexity of the lighting compensation process, the calculation according to Equation 4 is omitted and Equation 2 is used. class The first prediction block P BV1 can be used for lighting compensation.

[0130] [Equation 4]

[0131]

[0132] According to mathematical formula 5, the above determined class Using the first prediction block P BV1 By applying lighting compensation to the lighting-compensated prediction signal, This is determined. According to mathematical formula 6, the above determined and Using the second prediction block P BV2 By applying lighting compensation to the lighting-compensated prediction signal, This is determined. In mathematical formula 5, and Lighting compensation was performed based on, but according to the embodiment and Lighting compensation can be performed based on this.

[0133] [Equation 5]

[0134]

[0135] [Equation 6]

[0136]

[0137] And according to mathematical formula 7 class The final illumination-compensated prediction signal P' is calculated as a weighted sum. The weight value u in Equation 7 can be determined in various ways, and the condition 0 ≤ u ≤ 1 is satisfied. The weight value u can be a fixed value defined in the encoder / decoder. Alternatively, the weight value u can be determined based on the aspect ratio, width, and / or height of the current block. Alternatively, the weight value u can be derived based on information of neighboring blocks of the current block.

[0138] [Equation 7]

[0139]

[0140] In mathematical expressions 2 to 7, (x, y) denotes the sample location within the prediction block. And, (x, y) represents the integer-pel sample location of the prediction samples P and P'. If the block vector BV1 or BV2 is expressed in sub-pel units rather than integer-pel units, (x, y) is P BV1 and P BV2 One of the integer pixel samples used for interpolation.

[0141] Below, mathematical expressions 8 to 10 are the first prediction block P BV1 and the second prediction block P BV2 Another embodiment of a method for calculating parameters for lighting compensation is described.

[0142] Mathematical expression 8 is T (502) and T BV2 (522) represents the relationship as a linear model. In mathematical expression 8, the parameter class is T (502) and T BV2 (522) represents a linear model.

[0143] [Equation 8]

[0144]

[0145] The above parameters class The update of template T (502) is performed using . Hereinafter, T' in mathematical expression 9 is a template determined by the update of template T (502). Mathematical expression 9 is a template determined by the update of template T' and T BV1 (512) represents the relationship as a linear model. In mathematical expression 9, the parameter class is T' and T BV1 (512) represents a linear model.

[0146] [Equation 9]

[0147]

[0148] and, class The update of template T' is performed using . Hereinafter, T" in mathematical expression 10 is a template determined by the update of template T'. Hereinafter, mathematical expression 10 is a template determined by the update of template T" and T BV2 (522) represents the relationship as a linear model. In mathematical expression 10, the parameter class is T" and T BV2 (522) represents the linear model. According to mathematical expression 10, T BV1 (512) The characteristics of the second prediction block P BV2 Lighting compensation parameters for lighting compensation class can be reflected in. Therefore, class Lighting compensation according to class It is possible to derive more sophisticated results than the lighting compensation according to Equation 8. However, in order to reduce the complexity of the lighting compensation process, the calculation according to Equation 10 is omitted and Equation 8 is used. class The second prediction block P BV2 can be used for lighting compensation.

[0149] [Equation 10]

[0150]

[0151] According to mathematical formula 11, the above determined and Using the first prediction block P BV1 By applying lighting compensation to the lighting-compensated prediction signal, This is determined. According to mathematical formula 12, the above determined class Using the second prediction block P BV2 By applying lighting compensation to the lighting-compensated prediction signal, This is determined. In mathematical expression 12, class Lighting compensation was performed based on, but according to the embodiment class Lighting compensation can be performed based on this.

[0152] [Equation 11]

[0153]

[0154] [Equation 12]

[0155]

[0156] And according to mathematical formula 13 class The final illumination-compensated prediction signal P' is calculated as a weighted sum. The weight value m in Equation 13 can be determined in various ways, and the condition 0 ≤ m ≤ 1 is satisfied. The weight value m can be a fixed value defined in the encoder / decoder. Alternatively, the weight value m can be determined based on the aspect ratio, width, and / or height of the current block. Alternatively, the weight value m can be derived based on information of neighboring blocks of the current block.

[0157] [Equation 13]

[0158]

[0159] In mathematical expressions 8 to 13, (x, y) denotes the sample location within the prediction block. (x, y) represents the integer-pel sample location of the prediction samples P and P'. If the block vector BV1 or BV2 is expressed in sub-pel units rather than integer-pel units, (x, y) is P BV1 and P BV2 One of the integer pixel samples used for interpolation.

[0160] The first reference block and the second reference block P of Fig. 5 BV1 , P BV2 (510, 520) are blocks arbitrarily defined for convenience of explanation. In the binary prediction IBC mode, for calculating lighting compensation parameters, it can be explicitly or implicitly determined which of the two reference blocks is the first reference block or the second reference block. For example, the first reference block of the two reference blocks can be determined based on the size of the block vector or the similarity between the current block and the reference block.

[0161] According to one embodiment, the weights required for the calculation of the final illumination compensated prediction signal P' are the template T (502) of the current block (500) and each reference block P BV1 , P BV2 Templates T of (510, 520) BV1, T BV2 (512, 522) can be determined based on the distortion. As in Equation 14, D represents the distortion between templates according to each block vector. BV1 , D BV2 Based on this, the weight values ​​n1 and n2 can be calculated. In Equation 14, D BV1 is the template T (502) of the current block (500) and the reference template T BV1 (512) means distortion between the D BV2 is the template T (502) of the current block and the reference template T BV2(522) It means distortion of the liver.

[0162] [Equation 14]

[0163]

[0164] According to one embodiment, D BV1 is the updated current block's template T' and the reference template T BV1 (512) may mean distortion between the two. And, D BV2 is the updated current block's template T' and the reference template T BV2 (522) This may mean distortion of the liver.

[0165] According to one embodiment, D BV1 is the updated current block's template T" and the reference template T BV1 (512) may mean distortion between the two. And D BV2 is the updated current block's template T" and the reference template T BV2 (522) This may mean distortion of the liver.

[0166] According to Equation 15, based on the weighted values ​​n1 and n2 calculated according to Equation 14, class A weighted sum of is calculated. And the weighted sum is determined as the final illumination-compensated prediction signal P'.

[0167] [Equation 15]

[0168]

[0169] Prediction signal derived based on BV1 The weighted value n1 is the distortion value D derived based on BV2. BV1 can be calculated based on. And, the prediction signal derived based on BV2 The weighted value n2 is the distortion value D derived based on BV1. BV1It can be calculated based on. When the similarity between the predicted signal and the original signal is large, the distortion value is small, and when the similarity between the predicted signal and the original signal is small, the distortion value is large. Therefore, the weight value of each signal can be determined to be proportional to the distortion value of the other signal. The distortion of each signal can be calculated using various correlation measures such as sum of absolute differences (SAD) or sum of square error (SSE).

[0170] Figure 6 illustrates an example of the form of a template used in the binary prediction IBC mode.

[0171] In Fig. 5, the template T (502) of the current block (500) and the template T of the reference block (510, 520) pointed to by BV1, BV2 (514, 524) BV1 , T BV2 (512, 522) is L-shaped. However, in addition to the L-shaped template of FIG. 5, any other arbitrary shape template may be used. For example, FIG. 6 illustrates an L-shaped template (600), an upper template (610), and a left template (620).

[0172] Here, the size of the L-shaped template (600) can be expressed as (w x L2) + (L1 xh) + (L1 x L2). Here, w and h represent the width and height of the current block. In addition, the values ​​of L1 and L2 can be determined as any positive numbers.

[0173] The size of the upper template (610) can be expressed as wx L4, where w represents the width of the current block. The value of L4 can be determined as any positive number.

[0174] The size of the left template (620) can be expressed as L3 x h, where h represents the height of the current block. In addition, the value of L3 can be determined as any positive number.

[0175] According to one embodiment, when the binary prediction IBC mode is applied to the current block, whether lighting compensation is applied to the current block can be determined using 1-bit flag information. The flag can be encoded and decoded at a high level (e.g., Video Parameter Set, Sequence Parameter Set, Picture Parameter Set, Picture Header, Slice Header). Alternatively, the flag can be determined at a low level (e.g., Prediction Block, Coding Block, Coding Tree Block). Alternatively, two or more flags indicating whether lighting compensation is applied can be encoded and decoded at the high level and the low level. The flag can be encoded and decoded depending on whether the binary prediction IBC mode is applied. For example, the flag can be obtained only when the binary prediction IBC mode is applied.

[0176] Fig. 7 illustrates an embodiment of an in-screen prediction method according to a binary prediction IBC mode.

[0177] In step 702, a first reference block and a second reference block of the current block are determined from the current picture.

[0178] The first reference block may be derived from a first block vector of a current block, and the second reference block may be derived from a second block vector of the current block. In addition, the first block vector and the second block vector may be derived from a first reference block vector and a second reference block vector of an adjacent block of the current block. At this time, the first reference block vector and the second reference block vector may be determined as the first block vector and the second block vector. Alternatively, the first reference block vector and the second reference block vector may be determined as the first block vector and the second block vector based on the first block vector predictor and the second block vector predictor and the first differential block vector and the second differential block vector.

[0179] According to one embodiment, the first block vector and the second block vector may be derived from a first reference block vector of a first adjacent block of the current block and a second reference block vector of a second adjacent block of the current block, respectively.

[0180] According to one embodiment, a binary prediction IBC mode flag indicating whether a binary prediction IBC mode is applied to a current block may be acquired. And, if binary prediction IBC is applied according to the binary prediction IBC mode flag, a first reference block and a second reference block of the current block may be determined from the current picture.

[0181] In step 704, a first lighting compensation parameter of the current template of the current block and the first reference template of the first reference block is determined. In addition, a second lighting compensation parameter of the current template and the second reference template of the second reference block is determined. The first lighting compensation parameter represents a first linear model representing a relationship between the current template and the first reference template. The first lighting compensation parameter may include a first slope parameter and a first intercept parameter of the first linear model. Similarly, the second lighting compensation parameter represents a second linear model representing a relationship between the current template and the second reference template. The second lighting compensation parameter may include a second slope parameter and a second intercept parameter of the second linear model.

[0182] In one embodiment, a first illumination compensation parameter may be determined from a current template and a first reference template. Then, by correcting the current template using the first illumination compensation parameter, a first correction template in which the current template is corrected may be determined. A second illumination compensation parameter may be determined from the first correction template and the second reference template.

[0183] In one embodiment, a second illumination compensation parameter may be determined from a first correction template and a second reference template. Then, by correcting the first correction template using the second illumination compensation parameter, a second correction template, in which the first correction template is corrected, may be determined. Furthermore, a modified first illumination compensation parameter may be determined based on the second correction template and the first reference template.

[0184] In one embodiment, the current template, the first reference template, and the second reference template have the same shape. The shapes of the current template, the first reference template, and the second reference template may be one of an L-shaped template, a top template, and a left template.

[0185] In step 706, a first prediction block derived from a first reference block is modified according to a first illumination compensation parameter. A second prediction block derived from a second reference block is modified according to a second illumination compensation parameter.

[0186] In step 708, a final prediction block of the current block is determined from the modified first prediction block and the modified second prediction block. For example, the samples of the final prediction block may be determined based on a weighted sum of samples of the modified first prediction block and samples of the modified second prediction block. The weighted sum of the samples of the modified first prediction block and samples of the modified second prediction block is determined based on a first weight for the modified first prediction block and a second weight for the modified second prediction block.

[0187] In one embodiment, the first weight and the second weight may be determined based on a first distortion between the current template and the first reference template and a second distortion between the current template and the second reference template. The first weight may be characterized in that it increases as the second distortion increases. Conversely, the second weight may be characterized in that it increases as the first distortion increases.

[0188] According to one embodiment, a lighting compensation flag indicating whether lighting compensation is applied to the current block may be acquired. If lighting compensation is applied to the current block according to the lighting compensation flag, steps 704 to 708 may be performed.

[0189] Depending on the prediction method performed in steps 702 to 708, the current block may be encoded or decoded. In some embodiments, the binary prediction IBC mode flag and the lighting compensation flag are encoded in the encoder according to the prediction result. The information is then decoded in the decoder and used for block prediction.

[0190] And the bitstream generated by the encoder according to the prediction method performed in steps 702 to 708 can be stored in a recording medium or transmitted outside the encoder.

[0191] FIG. 8 is a drawing exemplarily showing a content streaming system to which an embodiment according to the present invention can be applied.

[0192] As illustrated in FIG. 8, a content streaming system to which an embodiment of the present invention is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

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

[0194] The above bitstream can be generated by an image encoding method and / or an image encoding device to which an embodiment of the present invention is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0195] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act 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 can transmit multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server may control commands / responses between each device within the content streaming system.

[0196] The streaming server can receive content from a media repository and / or 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.

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

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

[0199] The above embodiments can be performed in the same or corresponding manner in an encoding device and a decoding device. In addition, an image can be encoded / decoded using at least one or a combination of at least one of the above embodiments.

[0200] The order in which the above embodiments are applied may be different in the encoding device and the decoding device. Alternatively, the order in which the above embodiments are applied may be the same in the encoding device and the decoding device.

[0201] The above embodiments can be performed for each of the luminance and chrominance signals. Alternatively, the above embodiments can be performed identically for the luminance and chrominance signals.

[0202] In the above embodiments, the methods are described based on a flowchart as a series of steps or units. However, the present invention is 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 present invention.

[0203] The above embodiments may be implemented in the form of program commands that can be executed by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., either singly or in combination. The program commands recorded on the computer-readable recording medium may be those specifically designed and constructed for the present invention, or may be known and usable by those skilled in the art of computer software.

[0204] The bitstream generated by the encoding method according to the above embodiment can be stored in a non-transitory computer-readable recording medium. In addition, the bitstream stored in the non-transitory computer-readable recording medium can be decoded by the decoding method according to the above embodiment.

[0205] Here, examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, and flash memories. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter, etc. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.

[0206] Although the present invention has been described above with specific details such as specific components and limited examples and drawings, these are provided only to help a more general understanding of the present invention, and the present invention is not limited to the above examples, and those with ordinary knowledge in the technical field to which the present invention pertains can make various modifications and variations from this description.

[0207] Therefore, the idea of ​​the present invention should not be limited to the embodiments described above, and all things that are modified equally or equivalently to the following claims as well as the claims are considered to fall within the scope of the idea of ​​the present invention.

[0208] The present invention can be used in a device for encoding / decoding an image and a recording medium storing a bitstream.

Claims

1. In the video decryption method, A step of determining a first reference block and a second reference block of the current block from the current picture; A step of determining a first lighting compensation parameter of the current template of the current block and the first reference template of the first reference block and a second lighting compensation parameter of the current template and the second reference template of the second reference block; A step of modifying a first prediction block derived from the first reference block according to a first illumination compensation parameter, and modifying a second prediction block derived from the second reference block according to a second illumination compensation parameter; and A method for decoding an image, comprising the step of determining a final prediction block of the current block from the modified first prediction block and the modified second prediction block.

2. In paragraph 1, An image decoding method, characterized in that the first reference block is derived from a first block vector of the current block, and the second reference block is derived from a second block vector of the current block.

3. In paragraph 2, An image decoding method, characterized in that the first block vector and the second block vector are derived from a first reference block vector and a second reference block vector of an adjacent block of the current block.

4. In paragraph 2, An image decoding method, characterized in that the first block vector and the second block vector are derived from a first reference block vector of a first adjacent block of the current block and a second reference block vector of a second adjacent block of the current block, respectively.

5. In paragraph 1, The above first lighting compensation parameter is, Represents a first linear model of the above current template and the above first reference template, Including a first slope parameter and a first intercept parameter of the first linear model, The above second lighting compensation parameter is, Represents a second linear model of the current template and the second reference template, An image decoding method, characterized in that it includes a second slope parameter and a second intercept parameter of the second linear model.

6. In paragraph 1, The step of determining the first lighting compensation parameter and the second lighting compensation parameter comprises: A step of determining a first illumination compensation parameter from the current template and the first reference template; A step of determining a first compensation template by correcting the current template using the first illumination compensation parameter; and An image decoding method, characterized by comprising a step of determining a second illumination compensation parameter from the first correction template and the second reference template.

7. In paragraph 6, The step of determining the first lighting compensation parameter and the second lighting compensation parameter comprises: A step of determining a second correction template by correcting the first correction template using a second illumination compensation parameter determined from the first correction template and the second reference template; and An image decoding method, characterized by comprising a step of determining a modified first illumination compensation parameter based on the second correction template and the first reference template.

8. In paragraph 1, In the step of determining the final prediction block of the current block, An image decoding method, characterized in that the samples of the final prediction block are determined based on a weighted sum of samples of the modified first prediction block and samples of the modified second prediction block.

9. In paragraph 8, A weighted sum of the samples of the modified first prediction block and the samples of the modified second prediction block is determined based on a first weight for the modified first prediction block and a second weight for the modified second prediction block, An image decoding method, characterized in that the first weight and the second weight are determined based on a first distortion between the current template and the first reference template and a second distortion between the current template and the second reference template.

10. In paragraph 9, The above first weight is characterized in that it increases as the second distortion increases, An image decoding method, characterized in that the second weight increases as the first distortion increases.

11. In paragraph 1, The above current template, the above first reference template and the above second reference template have the same form, An image decoding method, characterized in that the above shape is one of an L-shaped template, an upper template, and a left template.

12. In paragraph 1, The above video decryption method is, Further comprising a step of obtaining a binary prediction IBC mode flag indicating whether the binary prediction IBC mode is applied to the current block, An image decoding method, characterized in that when binary prediction IBC is applied according to the binary prediction IBC mode flag, a first reference block and a second reference block of the current block are determined from the current picture.

13. In paragraph 1, The above video decryption method is, Further comprising a step of obtaining a lighting compensation flag indicating whether lighting compensation is applied to the current block; An image decoding method, characterized in that when lighting compensation is applied to the current block according to the lighting compensation flag, a first lighting compensation parameter and a second lighting compensation parameter of the current block are determined, and the first prediction block and the second prediction block are modified according to the first lighting compensation parameter and the second lighting compensation parameter.

14. In the video encoding method, A step of determining a first reference block and a second reference block of the current block from the current picture; A step of determining a first lighting compensation parameter of the current template of the current block and the first reference template of the first reference block and a second lighting compensation parameter of the current template and the second reference template of the second reference block; A step of modifying a first prediction block derived from the first reference block according to a first illumination compensation parameter, and modifying a second prediction block derived from the second reference block according to a second illumination compensation parameter; and A video encoding method comprising the step of determining a final prediction block of the current block from the modified first prediction block and the modified second prediction block.

15. In a computer-readable recording medium storing a bitstream generated by a video encoding method, In a video encoding method, A step of determining a first reference block and a second reference block of the current block from the current picture; A step of determining a first lighting compensation parameter of the current template of the current block and the first reference template of the first reference block and a second lighting compensation parameter of the current template and the second reference template of the second reference block; A step of modifying a first prediction block derived from the first reference block according to a first illumination compensation parameter, and modifying a second prediction block derived from the second reference block according to a second illumination compensation parameter; and A recording medium comprising a step of determining a final prediction block of the current block from the modified first prediction block and the modified second prediction block.

16. A bitstream transmission method for transmitting a bitstream generated by a video encoding method, A step of encoding an image based on the above image encoding method; and Comprising a step of transmitting a bitstream including the encoded image, The above image encoding method is, A step of determining a first reference block and a second reference block of the current block from the current picture; A step of determining a first lighting compensation parameter of the current template of the current block and the first reference template of the first reference block and a second lighting compensation parameter of the current template and the second reference template of the second reference block; A step of modifying a first prediction block derived from the first reference block according to a first illumination compensation parameter, and modifying a second prediction block derived from the second reference block according to a second illumination compensation parameter; and A bitstream transmission method comprising the step of determining a final prediction block of the current block from the modified first prediction block and the modified second prediction block.

Citation Information

Patent Citations

  • Display device

    KR1020230151584A

  • Black pigment composition, and coating composition, coating layer, optical device and electronic device using the same

    KR1020240130442A

  • Method and apparatus for adaptive illumination compensation in video encoding and decoding

    US20220239930A1

  • Signaling for illumination compensation

    US20220248064A1

  • Adjustment based local illumination compensation

    US20230224474A1