Method for encoding and decoding video signal

By using samples of luma blocks in video signal processing to derive predicted values ​​of chroma blocks and calculating compensation parameters based on reference areas, the problem of low encoding/decoding efficiency of high-resolution video signals is solved and higher intra-frame prediction accuracy is achieved performance and lower transmission and storage costs.

CN118784833APending Publication Date: 2024-10-15KWANGWOON UNIVERSITY INDUSTRY ACADEMIC COLLABORATION FOUNDATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411126420.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2018-06-12
Filing Date
2019-06-10
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

When processing high-resolution and high-quality video signals, the existing technology has low encoding/decoding efficiency, insufficient intra-frame prediction accuracy, and increased transmission and storage costs.

Method used

By using samples of luma blocks to derive predicted values ​​of chroma blocks, compensation parameters are calculated based on predetermined reference areas, chroma blocks are reconstructed, and adaptive block partitioning and tree structure partitioning are used to improve encoding/decoding efficiency.

Benefits of technology

It improves the encoding/decoding efficiency of video signals, enhances the accuracy of intra-frame prediction, and reduces transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784833A_ABST
    Figure CN118784833A_ABST
Patent Text Reader

Abstract

Methods for encoding and decoding a video signal are disclosed. The decoding method includes: receiving a bitstream including a flag indicating whether to decode a chroma block based on a luma block corresponding to the chroma block and a luma reference region adjacent to the luma block; predicting a chroma block based on the luma block and the luma reference region according to the flag; and reconstructing the predicted chroma block. A second prediction sample of the predicted chroma block is obtained based on a compensation parameter including a weight and an offset, the second prediction sample being obtained by multiplying a first prediction sample by the weight and adding the offset, the first prediction sample being obtained by predicting a luma block. The compensation parameter is calculated based on a representative luminance value derived as one or more of an average value, a minimum value, a maximum value, or a median value belonging to some samples of the luminance reference region and a representative chrominance value derived from a luminance value of the luminance reference region at a respective position.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese invention patent application with Chinese application number 201980039260.0, application date June 10, 2019, and invention name “Video signal processing method and device based on reference between components”. Technical Field

[0002] The present invention relates to a method and apparatus for encoding / decoding a video signal. Background Art

[0003] The demand for high-resolution, high-quality video is growing in various applications. As image data becomes high-resolution and high-quality, the amount of data increases relative to conventional image data. Therefore, when using a medium such as a conventional wired / wireless broadband line to transmit image data or using a conventional storage medium to store image data, the transmission cost and storage cost increase. Efficient image compression technology can be used to solve these problems caused by high-resolution and high-quality image data. Summary of the invention

[0004] Technical issues

[0005] The object of the present invention is to improve the encoding / decoding efficiency of a prediction block.

[0006] An object of the present invention is to improve the accuracy of intra prediction for each component.

[0007] The object of the present invention is to improve the encoding / decoding efficiency through adaptive block partitioning.

[0008] Technical Solutions

[0009] The method and apparatus for processing a video signal according to the present invention derive a first prediction value of a chrominance block using samples of a luminance block, calculate a compensation parameter based on a predetermined reference area, derive a second prediction value of the chrominance block, and reconstruct the chrominance block based on the second prediction value of the chrominance block.

[0010] In the video signal processing method and apparatus according to the present invention, the calculating step may further include: determining a reference area to be referred to in order to calculate the compensation parameter.

[0011] In the video signal processing method and apparatus according to the present invention, the reference area may be determined for at least one of a luminance block or a chrominance block.

[0012] In the video signal processing method and apparatus according to the present invention, the compensation parameter may be calculated based on at least one of a representative value of a reference area of ​​a luminance block or a representative value of a reference area of ​​a chrominance block.

[0013] In the video signal processing method and apparatus according to the present invention, the representative value may be derived according to one of an average value, a minimum value, a maximum value, a mode value or a median value of all or some samples belonging to the reference area.

[0014] In the video signal processing method and apparatus according to the present invention, the step of deriving the first prediction value may be selectively performed based on information indicating whether the chroma block is decoded by prediction based on an inter-component reference.

[0015] In the video signal processing method and apparatus according to the present invention, the chroma block may be a first chroma block (Cr block), and the second chroma block (Cb block) may be reconstructed using samples of the first chroma block.

[0016] In the video signal processing method and apparatus according to the present invention, the luminance block or the chrominance block may be divided into blocks of variable size / shape based on at least one of a quadtree, a binary tree, or a ternary tree.

[0017] Beneficial Effects

[0018] According to the present invention, prediction encoding / decoding efficiency can be improved through prediction based on inter-component reference.

[0019] Furthermore, according to the present invention, encoding / decoding efficiency can be improved through tree-structured block division. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a block diagram showing an encoding apparatus according to an embodiment of the present invention.

[0021] Figure 2 is a block diagram illustrating a decoding apparatus according to an exemplary embodiment of the present invention.

[0022] Figure 3 Block partition types according to an embodiment to which the present invention is applied are shown.

[0023] Figure 4 A tree-structure based block partitioning method according to an embodiment of the present invention is shown.

[0024] Figure 5 A process of reconstructing a chroma block by inter-component referencing according to an embodiment of the present invention is shown.

[0025] Figure 6 and Figure 7 An example of a reference area used for inter-component reference according to an embodiment of the present invention is shown.

[0026] Figure 8 A method of determining a region of a luma block to be used for inter-component reference of a chroma block according to an embodiment of the present invention is shown.

[0027] Best Mode for Carrying Out the Invention

[0028] The method and apparatus for processing a video signal according to the present invention use samples of a luminance block to derive a first prediction value of a chrominance block, calculate a compensation parameter based on a predetermined reference area, derive a second prediction value of the chrominance block, and reconstruct the chrominance block based on the second prediction value of the chrominance block.

[0029] In the video signal processing method and apparatus according to the present invention, the calculating step may further include: determining a reference area to be referred to for calculating the compensation parameter.

[0030] In the video signal processing method and apparatus according to the present invention, the reference area may be determined for at least one of a luminance block or a chrominance block.

[0031] In the video signal processing method and apparatus according to the present invention, the compensation parameter may be calculated based on at least one of a representative value of a reference area of ​​a luminance block or a representative value of a reference area of ​​a chrominance block.

[0032] In the video signal processing method and apparatus according to the present invention, the representative value may be derived based on one of an average value, a minimum value, a maximum value, a mode value, or a median value of all or a part of the samples belonging to the reference area.

[0033] In the video signal processing method and apparatus according to the present invention, the step of deriving the first prediction value may be selectively performed based on information indicating whether the chroma block is decoded by prediction based on an inter-component reference.

[0034] In the video signal processing method and apparatus according to the present invention, the chroma block may be a first chroma block (Cr block), and the second chroma block (Cb block) may be reconstructed using samples of the first chroma block.

[0035] In the video signal processing method and apparatus according to the present invention, the luminance block or the chrominance block may be divided into blocks of variable size / shape based on at least one of a quadtree, a binary tree, or a ternary tree.

[0036] Embodiments of the present invention

[0037] The present invention may be changed and modified in various ways and may be described with reference to different exemplary embodiments, some of which will be described and shown in the accompanying drawings. However, these embodiments are not intended to limit the present invention, but are understood to include all modifications, equivalents and alternatives that belong to the spirit and technical scope of the present invention. In the accompanying drawings, the same reference numerals always refer to the same elements.

[0038] Although the terms first, second, etc. may be used to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, without departing from the teachings of the present invention, a first element may be referred to as a second element, and similarly a second element may be referred to as a first element. The term "and / or" includes any and all combinations of multiple associated listed items.

[0039] It will be understood that when an element is referred to as being "connected to" or "coupled to" another element, the element may be directly connected or coupled to the other element or an intervening element. In contrast, when an element is referred to as being "directly connected to" or "directly coupled to" another element, there are no intervening elements.

[0040] The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are also intended to include plural forms. It will also be understood that when used in this specification, the terms "including" and / or "having" specify the presence of stated features, wholes, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, parts and / or their groups.

[0041] Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals refer to the same elements throughout, and redundant descriptions of the same elements will be omitted herein.

[0042] Figure 1 is a block diagram showing an encoding apparatus according to an embodiment of the present invention.

[0043] Reference Figure 1 , the encoding device 100 includes a picture division unit 110, prediction units 120 and 125, a transform unit 130, a quantization unit 135, a rearrangement unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150 and a memory 155.

[0044] Figure 1 Each of the elements shown is shown independently to represent different characteristic functions in the encoding device, and it can be meant that each element is composed of separate hardware. However, for ease of description, the elements are arranged independently, wherein at least two elements can be combined into a single element, or a single element can be divided into multiple elements to perform a function. It should be noted that, without departing from the essence of the present invention, some elements are integrated into a combined element and / or the embodiment in which the element is divided into multiple separate elements is included within the scope of the present invention.

[0045] Some elements are not essential to the substantial functions of the present invention, but are optional constituent elements that can only be used to improve performance. The present invention can be implemented by only including constituent elements that are essential to the embodiments of the present invention except for the constituent elements that are only used to improve performance. Structures that only include essential constituent elements except for the optional constituent elements that are only used to improve performance belong to the scope of the present invention.

[0046] The picture division unit 110 may divide the input picture into at least one block. At this time, the block may mean a coding unit (CU), a prediction unit (PU) or a transform unit (TU). The division may be performed based on at least one of a quadtree, a binary tree or a ternary tree. A quadtree is a method of dividing an upper layer block into sub-blocks whose width and height are half of the upper layer block. A binary tree is a method of dividing an upper layer block into sub-blocks whose width or height is half of the upper layer block. In a binary tree, by dividing the upper layer block based on the above-mentioned binary tree-based division, the block may have a non-square shape as well as a square shape.

[0047] In an embodiment of the present invention, CU may be used to refer not only to a coding unit but also to a decoding unit.

[0048] The prediction units 120 and 125 may include an inter-frame prediction unit 120 for performing inter-frame prediction and an intra-frame prediction unit 125 for performing intra-frame prediction. The prediction units 120 and 125 may determine which of the inter-frame prediction and the intra-frame prediction is performed on the PU, and may determine the specific information of the determined prediction method (e.g., intra-frame prediction mode, motion vector, and reference picture). Here, the processing unit for which prediction is performed may be different from the processing unit for which the prediction method and specific information are determined. For example, the prediction method and prediction mode may be determined for each PU, and the prediction may be performed for each TU. The residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130. In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded by the entropy encoding unit 165 together with the residual value and sent to the decoding device. When a specific encoding mode is used, the original block may be encoded and sent to the decoding device without generating a prediction block by the prediction units 120 and 125.

[0049] The inter prediction unit 120 may predict the PU based on information about at least one of a previous picture of the current picture and a subsequent picture of the current picture. In some cases, the inter prediction unit 120 may predict the PU based on information about a partial coding region in the current picture. The inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

[0050] The reference picture interpolation unit may be provided with reference picture information from the memory 155, and the reference picture interpolation unit may generate pixel information less than or equal to an integer pixel on the reference picture. In the case of luma pixels, an 8-tap interpolation filter based on DCT with a variable filter coefficient may be used to generate pixel information less than or equal to an integer pixel in units of 1 / 4 pixels. In the case of chroma pixels, a 4-tap interpolation filter based on DCT with a variable filter coefficient may be used to generate pixel information less than or equal to an integer pixel in units of 1 / 8 pixels.

[0051] The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit. Various methods such as a full search based block matching algorithm (FBMA), a three-step search (TSS) algorithm, and a new three-step search (NTS) algorithm may be used to calculate a motion vector. Based on the interpolated pixel, the motion vector has a motion vector value in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit may use different motion prediction methods to predict the current PU. Various methods such as skip mode, merge mode, and advanced motion vector prediction (AMVP) mode may be used as motion prediction methods.

[0052] The intra prediction unit 125 may generate a PU based on information about reference pixels adjacent to the current block. When the reference pixel is a pixel on which inter prediction has been performed because the block adjacent to the current PU is a block on which inter prediction has been performed, the information about the reference pixel in the block on which inter prediction has been performed may be replaced with information about the reference pixel in the block on which intra prediction has been performed. That is, when the reference pixel is unavailable, the information about the unavailable reference pixel may be replaced with information about at least one reference pixel among the available reference pixels.

[0053] The prediction mode of the intra prediction includes a directional prediction mode in which reference pixel information is used according to the prediction direction and a non-directional prediction mode in which information about the direction is not used when performing prediction. The mode for predicting the luminance component and the mode for predicting the chrominance component may be different from each other. In addition, the chrominance component may be predicted by using the intra prediction mode for obtaining the luminance component or the predicted / reconstructed luminance component.

[0054] In the intra prediction method, a prediction block can be generated by applying an adaptive intra smoothing (AIS) filter to reference pixels according to an intra prediction mode. Different types of AIS filters can be applied to reference pixels. In the intra prediction method, the intra prediction mode of the current PU can be predicted based on the intra prediction mode of a PU adjacent to the current PU. When the prediction mode of the current PU is predicted using mode information predicted based on the adjacent PU, when the current PU has the same intra prediction mode as the adjacent PU, predetermined flag information can be used to send information indicating that the current PU has the same intra prediction mode as the adjacent PU. When the current PU and the adjacent PU have different intra prediction modes, information about the intra prediction mode of the current block can be encoded by entropy coding.

[0055] A residual block including residual information may be generated. The residual information is a difference between the original block and the prediction block generated by the prediction units 120 and 125. The generated residual block may be input to the transform unit 130.

[0056] The transform unit 130 may transform the residual block including the residual data by using a transform type such as DCT, DST, etc. At this time, the transform type may be determined based on an intra prediction mode of a prediction unit used to generate the residual block.

[0057] The quantization unit 135 may quantize the value transformed to the frequency domain by the transformation unit 130. The quantization coefficient may be changed according to the importance or block of the image. The value output from the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160.

[0058] The rearrangement unit 160 may perform rearrangement of coefficient values ​​on the quantized residual block. The rearrangement unit 160 may change the coefficients of a two-dimensional (2D) block into coefficients of a one-dimensional (1D) vector by a coefficient scanning method. For example, the rearrangement unit 160 may scan a DC coefficient into a coefficient in a high frequency region using a predetermined scanning type and change it into a one-dimensional vector form.

[0059] The entropy encoding unit 165 may perform entropy encoding based on the value obtained by the rearrangement unit 160. For entropy encoding, various encoding methods such as exponential Golomb coding, context-adaptive variable length coding (CAVLC), or context-adaptive binary arithmetic coding (CABAC) may be used.

[0060] The entropy encoding unit 165 can encode various information from the rearrangement unit 160 and the prediction units 120 and 125, such as residual coefficient information and block type information about the CU, prediction mode information, partition unit information, PU information, transmission unit information, motion vector information, reference frame information, block interpolation information and filtering information.

[0061] The entropy encoding unit 165 may entropy encode coefficients of the CU input from the rearrangement unit 160 .

[0062] The inverse quantization unit 140 and the inverse transform unit 145 dequantize the value quantized by the quantization unit 135, and inversely transform the value transformed by the transform unit 130. A reconstructed block may be generated by adding a residual value to the predicted PU. The residual value may be generated by the inverse quantization unit 140 and the inverse transform unit 145. The predicted PU may be predicted by a motion vector prediction unit, a motion compensation unit, and an intra prediction unit of the prediction units 120 and 125.

[0063] The filter unit 150 may include at least one of a deblocking filter, an offset unit, and an adaptive loop filter (ALF).

[0064] The deblocking filter can remove block distortion generated by the boundaries between blocks in the reconstructed picture. It can be determined whether to apply the deblocking filter to the current block based on the pixels included in several rows or columns of the block. When the deblocking filter is applied to the block, a strong filter or a weak filter can be applied according to the required deblocking filter strength. When horizontal filtering and vertical filtering are performed when applying the deblocking filter, horizontal filtering and vertical filtering can be performed in parallel.

[0065] The offset unit may apply an offset relative to the original image to the deblocked filtered image in units of pixels. The region to which the offset may be applied may be determined after dividing the pixels of the picture into a predetermined number of regions. The offset may be applied to the determined region in consideration of edge information about each pixel or a method of applying the offset to the determined region.

[0066] ALF can perform filtering based on the comparison result of the filtered reconstructed image with the original image. The pixels included in the image can be divided into predetermined groups, the filter to be applied to each group can be determined, and differential filtering can be performed for each group. Information about whether ALF is applied can be transmitted by each coding unit (CU), and the shape and filter coefficient of ALF to be applied to each block can be varied. In addition, ALF having the same form (fixed form) can be applied to the block regardless of the characteristics of the block.

[0067] The memory 155 may store the reconstructed block or the reconstructed picture output from the filter unit 150 , and when inter prediction is performed, may provide the stored reconstructed block or the reconstructed picture to the prediction units 120 and 125 .

[0068] Figure 2 is a block diagram illustrating a decoding apparatus according to an exemplary embodiment of the present invention.

[0069] Reference Figure 2, the decoding device 200 may include an entropy decoding unit 210 , a rearrangement unit 215 , a dequantization unit 220 , an inverse transform unit 225 , prediction units 230 and 235 , a filter unit 240 , and a memory 245 .

[0070] Figure 2 Each of the elements shown is independently shown to represent different characteristic functions in the decoding device, and it can be meant that each element is composed of separate hardware. However, for ease of description, the elements are independently arranged, wherein at least two elements can be combined into a single element, or a single element can be divided into multiple elements to perform a function. It should be noted that, without departing from the essence of the present invention, some elements are integrated into a combined element and / or the embodiment in which the element is divided into multiple separate elements is included within the scope of the present invention.

[0071] The entropy decoding unit 210 may perform entropy decoding on the input bit stream. For example, for entropy encoding, various methods such as exponential Golomb coding, CAVLC, or CABAC may be used.

[0072] The entropy decoding unit 210 may decode information associated with intra prediction and inter prediction performed by the encoding device.

[0073] The rearrangement unit 215 may perform rearrangement on the bitstream entropy-decoded by the entropy decoding unit 210. The rearrangement unit 215 may reconstruct the coefficients of the 1D vector into coefficients of the 2D block and rearrange them. The rearrangement unit 215 may be provided with information about the coefficient scanning performed by the encoding device, and the rearrangement unit 215 may perform rearrangement using a method of inversely scanning the coefficients based on the scanning order performed by the encoding device.

[0074] The dequantization unit 220 may perform dequantization based on the quantization parameter and the rearrangement coefficient of the block.

[0075] The inverse transform unit 225 may perform inverse transform on the dequantized transform coefficient based on a predetermined transform type. At this time, the transform type may be determined based on a prediction mode (inter / intra prediction), a block size / shape, an intra prediction mode, a component type (luminance / chrominance component), or a partition type (QT, BT, TT, etc.).

[0076] The prediction units 230 and 235 may generate a prediction block based on the provided information for generating the prediction block and information about a previously decoded block or picture. The information for generating the prediction block may be provided from the entropy decoding unit 210. The information about a previously decoded block or picture may be provided from the memory 245.

[0077] The prediction units 230 and 235 may include a PU determination unit, an inter prediction unit, and an intra prediction unit. The PU determination unit may receive various information from the entropy decoding unit 210, such as PU information, intra prediction mode related information of the intra prediction method, and motion prediction related information of the inter prediction method, and the like, and the PU determination unit may determine the PU of the current CU. The PU determination unit may determine which of inter prediction and intra prediction is performed on the PU. The inter prediction unit 230 may perform inter prediction on the current PU based on information about at least one of the previous picture and the subsequent picture of the current picture including the current PU. The inter prediction unit 230 may use the information required for inter prediction for the current PU provided from the encoding device. Inter prediction may be performed based on information of a pre-reconstructed partial area in the current picture including the current PU. To this end, the pre-reconstructed partial area may be added to the reference picture list.

[0078] In order to perform inter prediction, whether a motion prediction method for a PU included in a CU is a skip mode, a merge mode, an AMVP mode, or a current picture reference mode may be determined in units of CUs.

[0079] The intra prediction unit 235 may generate a prediction block based on pixel information in the current picture. When the PU is a PU on which intra prediction is performed, intra prediction may be performed based on intra prediction mode information about the PU provided from the encoding device. The intra prediction unit 235 may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter performs filtering on the reference pixels of the current block. The AIS filter may determine whether to apply the filter based on the prediction mode of the current PU. The prediction mode of the PU provided from the encoding device and information about the AIS filter may be used to perform AIS filtering on the reference pixels of the current block. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.

[0080] When the prediction mode of the PU indicates a prediction mode for performing intra-frame prediction based on pixel values ​​obtained by interpolating reference pixels, the reference pixel interpolation unit may generate reference pixels by interpolating reference pixels in units of fractional pixels that are smaller than integer pixels (i.e., full pixels). When the prediction mode of the current PU indicates a prediction mode for generating a prediction block without interpolating reference pixels, the reference pixels may not be interpolated. When the prediction mode of the current block is a DC mode, the DC filter may generate a prediction block by filtering.

[0081] The reconstructed block or the reconstructed picture may be provided to the filter unit 240. The filter unit 240 includes a deblocking filter, an offset unit, and an ALF.

[0082] The encoding device may provide information about whether to apply a deblocking filter to a corresponding block or picture and information about which of a strong filter and a weak filter to apply when using the deblocking filter. The deblocking filter of the decoding device may be provided with information about the deblocking filter from the encoding device, and the deblocking filter may perform deblocking filtering on the corresponding block.

[0083] The offset unit may apply an offset to the reconstructed picture based on information about an offset type and an offset value applied to the picture during encoding.

[0084] ALF may be applied to the CU based on information on whether ALF is applied and ALF coefficient information, etc., provided from the encoding device. The ALF information may be included in and provided in a specific parameter set.

[0085] The memory 245 may store a reconstructed picture or a reconstructed block used as a reference picture or a reference block, and may provide the reconstructed picture to the output unit.

[0086] Figure 3 Block partition types according to an embodiment to which the present invention is applied are shown.

[0087] One block (hereinafter referred to as a first block) may be divided into a plurality of sub-blocks (hereinafter referred to as a second block) by at least one of a vertical line or a horizontal line. The number of each of the vertical lines and the horizontal lines may be one, two or more. Here, the first block may be a coding block (CU) as a basic unit of image encoding / decoding, a prediction block (PU) as a basic unit of prediction encoding / decoding, or a transform block (TU) as a basic unit of transform encoding / decoding. The first block may be a square block or a non-square block.

[0088] The partitioning of the first block may be performed based on a quadtree, a binary tree, a ternary tree, etc., and the reference Figure 3 Describe in detail.

[0089] Figure 3 (a) shows a quadtree partition (QT). QT is a partition type in which a first block is partitioned into four second blocks. For example, when a 2N×2N first block is partitioned by QT, the first block may be partitioned into four second blocks having a size of N×N. QT may be limited to be applicable to only square blocks, but may also be applicable to non-square blocks.

[0090] Figure 3(b) shows a horizontal binary tree (hereinafter referred to as horizontal BT) partition. Horizontal BT is a partition type in which a first block is divided into two second blocks by a horizontal line. The partition can be performed symmetrically or asymmetrically. For example, when a 2N×2N first block is divided based on horizontal BT, the first block can be divided into two second blocks with a height ratio of (a:b). Here, a and b can be the same value, and a can be greater than or less than b.

[0091] Figure 3 (c) shows a vertical binary tree (hereinafter referred to as vertical BT) partition. Vertical BT is a partition type in which a first block is divided into two second blocks by a vertical line. The partition can be performed symmetrically or asymmetrically. For example, when a 2N×2N first block is divided based on vertical BT, the first block can be divided into two second blocks with a width ratio of (a:b). Here, a and b can be the same value, and a can be greater than or less than b.

[0092] Figure 3 (d) shows a horizontal ternary tree (hereinafter referred to as horizontal TT) partition. Horizontal TT is a partition type in which a first block is divided into three second blocks by two horizontal lines. For example, when a 2N×2N first block is divided based on horizontal TT, the first block may be divided into three second blocks with a height ratio of (a:b:c). Here, a, b, and c may be the same value. Alternatively, a and c may be the same, and b may be greater than or less than a.

[0093] Figure 3 (e) shows a vertical ternary tree (hereinafter referred to as vertical TT) partition. Vertical TT is a partition type in which a first block is divided into three second blocks by two vertical lines. For example, when a 2N×2N first block is divided based on vertical TT, the first block can be divided into three second blocks with a width ratio of (a:b:c). Here, a, b, and c can be the same value or different values. Alternatively, a and c can be the same, and b can be greater than or less than a. Alternatively, a and b can be the same, and c can be greater than or less than a. Alternatively, b and c are the same, and a can be greater than or less than b.

[0094] The above-mentioned division may be performed based on division information signaled from the encoding device. The division information may include at least one of division type information, division direction information, or division ratio information.

[0095] The partition type information may specify any one of the partition types predefined in the encoding / decoding device. The predefined partition types may include at least one of QT, horizontal BT, vertical BT, horizontal TT, vertical TT, or non-partition mode (no partitioning). Alternatively, the partition type information may mean information about whether QT, BT, or TT is applied, and may be encoded in the form of a tag or index. In the case of BT or TT, the partition direction information may indicate whether it is horizontal partitioning or vertical partitioning. In the case of BT or TT, the partition ratio information may indicate the ratio of the width and / or height of the second block.

[0096] Figure 4 A tree-structure based block partitioning method according to an embodiment of the present invention is shown.

[0097] Figure 4 The block 400 shown is assumed to be a square block of size 8N×8N and a partition depth of k (hereinafter referred to as a first block). When the partition information of the first block indicates QT partitioning, the first block may be divided into four sub-blocks (hereinafter referred to as a second block). The size of the second block may be 4N×4N, and the partition depth may be (k+1).

[0098] The four second blocks may be divided again based on QT, BT, TT or non-division mode. For example, when the division information of the second block indicates a horizontal binary tree (horizontal BT), as Figure 4 In the second block 410, the second block is divided into two sub-blocks (hereinafter referred to as the third block). At this time, the size of the third block may be 4N×2N, and the division depth may be (k+2).

[0099] The third block may be further divided based on QT, BT, TT or non-division mode. For example, when the division information of the third block indicates a vertical binary tree (vertical BT), the third block is divided into two sub-blocks 411 and 412, as shown in FIG. Figure 4 As shown. At this time, the size of sub-blocks 411 and 412 may be 2N×2N and the division depth may be (k+3). Alternatively, when the division information of the third block indicates a horizontal binary tree (horizontal BT), the third block may be divided into two sub-blocks 413 and 414, as shown in FIG. Figure 4 In this case, the size of sub-blocks 413 and 414 may be 4N×N and the partition depth may be (k+3).

[0100] The partitioning may be performed independently or in parallel with adjacent blocks, or may be performed sequentially according to a predetermined priority order.

[0101] The division information of the current block can be determined based on at least one of the division information of the upper block of the current block or the division information of the adjacent block. For example, when the second block is divided based on the horizontal BT and the upper third block is divided based on the vertical BT, it is not necessary to divide the lower third block based on the vertical BT. If the lower third block is divided by the vertical BT, this is the same as the result of dividing the second block by QT. Therefore, the encoding of the division information of the lower third block (especially the division direction information) can be skipped, and the decoding device can be set to divide the lower third block in the horizontal direction.

[0102] The upper block may mean a block having a smaller partition depth than the partition depth of the current block. For example, when the partition depth of the current block is (k+2), the partition depth of the upper block may be (k+1). The neighboring block may be a block adjacent to the top or left side of the current block. The neighboring block may be a block having the same partition depth as the current block.

[0103] The above division can be performed repeatedly until the minimum unit of encoding / decoding. When divided into the minimum unit, the division information of the block is no longer signaled from the encoding device. The information about the minimum unit may include at least one of the size or shape of the minimum unit. The size of the minimum unit may be represented by width, height, minimum or maximum value of width and height, sum of width and height, number of pixels, or division depth. The information about the minimum unit may be signaled in at least one of a video sequence, a picture, a slice, or a block unit. Alternatively, the information about the minimum unit may be a value predefined in the encoding / decoding device. Information about the minimum unit may be signaled for each of the CU, PU, ​​and TU. Information about a minimum unit may be equally applied to CU, PU, ​​and TU.

[0104] Figure 5 A process of reconstructing a chroma block by inter-component referencing according to an embodiment of the present invention is shown.

[0105] The inter-component reference of the present invention may refer to a method of predicting / reconstructing a chrominance component of a current block (hereinafter referred to as a chrominance block) based on a luminance component of a current block (hereinafter referred to as a luminance block).

[0106] Reference Figure 5 , the first prediction value of the chrominance block can be derived using the samples of the luminance block (S500).

[0107] The sample of the luma block corresponding to the position of the first prediction value of the chroma block may be set as the first prediction value of the chroma block. Alternatively, the first prediction value may be derived by resizing the luma block to a resolution corresponding to the chroma block. The resizing may be performed based on filtering such as downsampling or subsampling.

[0108] On the other hand, there may be a case where a chrominance block corresponds to a plurality of luminance blocks. In this case, a process of determining an area corresponding to a chrominance block in a plurality of luminance blocks may be performed, and this will be referred to Figure 8 Give a description.

[0109] The sample of the luminance block may be a predicted value or a reconstructed value. The predicted value may be obtained by intra prediction or inter prediction. The reconstructed value may be a first value obtained by adding a residual sample (residual, residual value) to the predicted value, or a second value obtained by applying an in-loop filter to the first value.

[0110] Intra prediction may be performed based on a predetermined intra prediction mode and a neighboring area of ​​a luminance block.

[0111] The intra-frame prediction mode can be determined as one of two non-directional modes and p directional modes. Here, p can be 33, 65, 129 or more. p can be a fixed value predefined for the encoding / decoding device, or can be variably determined based on the encoding information. Here, the encoding information can include not only information encoded and signaled by the encoding device, but also information derived from the signaled information in the decoding device. For example, the encoding information may include at least one of block size / shape, block availability, partition type, partition count, component type, prediction mode, information about the intra-frame prediction mode, inter-frame mode, motion information, transform type, transform skip mode, information about non-zero residual coefficients, scan order, color format, in-loop filter information, etc.

[0112] The block size may be represented by any of the following: width and height, minimum / maximum value of width and height, sum of width and height, number of samples belonging to a block, etc. The availability of a block may be determined in consideration of block position, range of parallel processing region, decoding order, etc. The prediction mode may mean information indicating intra mode or inter mode. Information about intra prediction mode includes information about whether the intra prediction mode is a non-directional mode, whether the intra prediction mode is a vertical / horizontal mode, directionality of the intra prediction mode, number of intra prediction modes predefined in the encoding / decoding device, etc. The inter mode may mean information indicating a merge / skip mode, an AMVP mode, or a current picture reference mode. The current picture reference mode refers to a method of predicting the current block using a pre-reconstructed region of the current picture. The current picture may be a picture to which the current block belongs. The current picture may be added to a reference picture list for inter prediction, and the current picture may be arranged after a short-term reference picture or a long-term reference picture in the reference picture list. Motion information may include a prediction direction flag, a motion vector, a reference picture index, etc. The coding information may be related to the current block and / or a neighboring block.

[0113] The neighboring area may be an area reconstructed before the luminance block according to a decoding order, and may include at least one of the left side, top side, right side, bottom side, or an area adjacent to each corner of the luminance block.

[0114] The neighboring area may include one, two, three, four or more lines. For example, one or more horizontal lines located at the top of the luminance block may be determined as the neighboring area, and one or more vertical lines located at the left of the luminance block may be determined as the neighboring area. The number of lines belonging to the neighboring area may be a fixed number (e.g., one) predefined in the encoding / decoding device, or may be variably determined based on the encoding information. Here, the encoding information may include not only information encoded and signaled by the encoding device, but also information derived from the signaled information in the decoding device. For example, the encoding information may include at least one of the following: block size / shape, block availability, partition type, partition count, component type, prediction mode, information about intra-frame prediction mode, inter-frame mode, motion information, transform type, transform skip mode, information about non-zero residual coefficients, scanning order, color format, in-loop filter information, etc.

[0115] The block size may be represented by any one of the following: width and height, minimum / maximum value of width and height, sum of width and height, number of samples belonging to a block, etc. The availability of a block may be determined in consideration of block position, range of parallel processing region, decoding order, etc. The prediction mode may mean information indicating intra mode or inter mode. Information about intra prediction mode includes information about whether the intra prediction mode is a non-directional mode, whether the intra prediction mode is a vertical / horizontal mode, directionality of the intra prediction mode, number of intra prediction modes predefined in the encoding / decoding device, etc. The inter mode may mean information indicating a merge / skip mode, AMVP mode, or current picture reference mode. The current picture reference mode refers to a method of predicting a current block using a pre-reconstructed area of ​​a current picture. The current picture may be a picture to which the current block belongs. The current picture may be added to a reference picture list for inter prediction, and the current picture may be arranged after a short-term reference picture or a long-term reference picture in the reference picture list. Motion information may include a prediction direction flag, a motion vector, a reference picture index, etc. The coding information may be related to the current block and / or a neighboring block.

[0116] Reference Figure 5 , a compensation parameter may be calculated based on a predetermined reference area (S510).

[0117] The encoding / decoding device may determine an area to be referred to for calculating the compensation parameters of the chrominance block, which area is hereinafter referred to as a reference area. Figure 6 and Figure 7Describe the method used to determine the reference area.

[0118] A reference region may be defined for each component type. That is, the reference region may include at least one of a reference region of a luminance block (hereinafter referred to as a luminance reference region) or a reference region of a chrominance block (hereinafter referred to as a chrominance reference region). The chrominance block may include at least one of a Cb block and a Cr block. The reference region may be a pre-reconstruction region adjacent to the block, wherein the pre-reconstruction region may be a reconstruction region before applying an in-loop filter, or may be a reconstruction region after applying an in-loop filter.

[0119] The compensation parameter may be calculated based on that the linearity between the representative value of the luma reference area and the luma block is equal to or similar to the linearity between the representative value of the chroma reference area and the chroma block. The compensation parameter may be calculated in the form of at least one of a weighting factor, an offset, or a filter coefficient.

[0120] All samples or some samples belonging to the luma reference region may be used to derive a representative value of the luma reference region.

[0121] The positions of some samples may be predefined in the encoding / decoding device (first embodiment). For example, the positions of some samples may be positions adjacent to at least one of the left, top, or upper left of the upper left sample of the luminance block. The positions of some samples may be determined according to the positions of the samples of the luminance block (second embodiment). For example, some samples may have the same x-coordinate or y-coordinate as the samples of the luminance block. Some samples may be determined according to the intra-frame prediction mode of the luminance block (third embodiment). For example, the intra-frame prediction mode may be represented by an angle line, in which some samples may be located on the same angle line as the samples of the luminance block. When there are no integer samples (integer pixels) on the angle line, integer samples located on both sides of the angle line may be used as some of the samples. Some of the samples may be determined by a combination of at least two of the first to third embodiments described above. The number of some samples may be one, two, three, four, five, or more. The number may be a fixed value predefined in the encoding / decoding device, and may be variably determined based on the position of the sample of the luminance block, whether the intra-frame prediction mode is a non-directional mode, the angle of the directional mode, the size / shape of the luminance block, and the like.

[0122] The representative value can be derived from the average value, minimum value, maximum value, mode value or median value of all samples or some samples belonging to the brightness reference area. Alternatively, the representative value can be derived by applying a predetermined filter to all samples or some samples belonging to the brightness reference area. The filter can be predefined in the encoding / decoding device. The predefined filter can be one, two or more, and one of the multiple filters can be selectively used considering the size / shape of the brightness block, the prediction mode, the information about the intra-frame prediction mode, the filter strength, etc. At least one of the length, filter strength or filter coefficient of the filter associated with one of the multiple filters can be different from another filter. The information about the intra-frame prediction mode includes information related to whether the intra-frame prediction mode is a non-directional mode, whether the intra-frame prediction mode is a vertical / horizontal mode, the directionality of the intra-frame prediction mode, the number of intra-frame prediction modes predefined in the encoding / decoding device, etc.

[0123] The representative value of the chrominance reference area may be derived in the same or similar manner as the representative value of the luma reference area, and thus a detailed description thereof will be omitted.

[0124] Reference Figure 5 , a second prediction value of the chroma block may be derived by applying the compensation parameter of S510 to the first prediction value of S500 ( S520 ).

[0125] As described above, the compensation parameter may be calculated in the form of a weighting factor and / or an offset. In this case, the second prediction value of the chrominance block may be derived by multiplying the first prediction value by the weighting factor, or the second prediction value of the chrominance block may be derived by adding an offset to the first prediction value or subtracting an offset from the first prediction value. As shown in equation (1), the first prediction value may be derived by applying both the weighting factor and the offset.

[0126] [Formula 1]

[0127] PredC2=a*PredC1+b

[0128] In equation (1), PredC2 represents the second prediction value, PredC1 represents the first prediction value or the sample of the luminance block, and a and b represent a weighting factor and an offset, respectively.

[0129] Alternatively, the compensation parameter may be calculated in the form of a filter coefficient of an n-tap filter. The input value of the n-tap filter may include at least one of a first prediction value (or a sample of a luma block), a representative value of a luma reference region, or a representative value of a chroma reference region. The output value of the n-tap filter may be a second prediction value of a chroma block.

[0130] Reference Figure 5, the chroma block may be reconstructed based on the second prediction value of the chroma block derived in S520 ( S530 ).

[0131] In the case of prediction based on inter-component reference, the second prediction value can be set as the reconstruction value. That is, in the case of prediction based on inter-component reference, the decoding device can omit the process of decoding the residual sample. Alternatively, even in the case of prediction based on inter-component reference, the residual value sample can be added to the second prediction value of the chroma block to generate the reconstruction value of the chroma block.

[0132] On the other hand, the above-mentioned prediction method based on inter-component reference (first embodiment) can be selectively performed based on information signaled from the encoding device. The information can indicate whether the chrominance block is decoded by prediction based on inter-component reference, and the information can be signaled in the form of a flag or an index.

[0133] Alternatively, the decoding device may determine whether to decode the chrominance block by prediction based on inter-component reference based on predetermined encoding information (second embodiment). Here, the encoding information may include not only information encoded and signaled by the encoding device, but also information derived in the decoding device based on the signaled information. For example, the encoding information may include at least one of the following: block size / shape, block availability, partition type, partition count, component type, prediction mode, information about intra-frame prediction mode, inter-frame mode, motion information, transform type, transform skip mode, information about non-zero residual coefficients, scanning order, color format, in-loop filter information, etc.

[0134] The block size may be represented by any one of the following: width and height, minimum / maximum value of width and height, sum of width and height, number of samples belonging to a block, etc. The availability of a block may be determined in consideration of block position, range of parallel processing region, decoding order, etc. The prediction mode may mean information indicating intra mode or inter mode. Information about intra prediction mode includes information about whether the intra prediction mode is a non-directional mode, whether the intra prediction mode is a vertical / horizontal mode, directionality of the intra prediction mode, number of intra prediction modes predefined in the encoding / decoding device, etc. The inter mode may mean information indicating a merge / skip mode, an AMVP mode, or a current picture reference mode. The current picture reference mode refers to a method of predicting a current block using a pre-reconstructed region of a current picture. The current picture may be a picture to which the current block belongs. The current picture may be added to a reference picture list for inter prediction, and the current picture may be arranged after a short-term reference picture or a long-term reference picture in the reference picture list. Motion information may include a prediction direction flag, a motion vector, a reference picture index, etc. The coding information may be related to the current block and / or a neighboring block.

[0135] Alternatively, prediction based on inter-component reference can be performed only when the luma block satisfies specific conditions (third embodiment). As examples of the above-mentioned specific conditions, the following conditions may exist: the luma block is encoded in intra-frame mode, the intra-frame prediction mode of the luma block is a non-directional mode, the intra-frame prediction mode of the luma block is a non-directional mode, the intra-frame prediction mode of the luma block is a vertical / horizontal mode, the size of the luma block is equal to or less than a predetermined threshold, the luma block is encoded in merge / skip mode, the residual coefficient of the luma block is 0 (for example, coded_block_flag=0), the number of non-zero residual coefficients belonging to the luma block is equal to or less than a predetermined threshold, and the in-loop filter information of the luma block is derived from the in-loop filter information of the neighboring blocks (for example, deblocking filter, SAO, ALF), etc. Prediction based on inter-component reference can be selectively performed based on a combination of at least two of the above-mentioned first to third embodiments.

[0136] The chroma block may include a first chroma block (Cr block) and a second chroma block (Cb block). The first chroma block and the second chroma block may be respectively decoded using samples of the luminance block through the above-described inter-component reference-based prediction.

[0137] Alternatively, prediction based on inter-component references may be applied between the luminance block and the chrominance block, and prediction based on inter-component references may be equally / similarly applied between the first chrominance block and the second chrominance block. In this case, the first chrominance block may be predicted / reconstructed using samples of the luminance block by prediction based on inter-component references. Then, the second chrominance block may be predicted / reconstructed using samples of the first chrominance block by prediction based on inter-component references.

[0138] Alternatively, the first chrominance block may be predicted / reconstructed using samples of the luminance block by prediction based on an inter-component reference. Then, the second chrominance block may be predicted / reconstructed by a weighted sum of the luminance block and the first chrominance block. The weight of the weighted sum may be calculated based on all or some samples of the reference region. Alternatively, the weight may be encoded and signaled by an encoding device, or the weight may be determined as a predetermined value in an encoding / decoding device.

[0139] In the above embodiment, the chroma blocks are reconstructed in the order from the first chroma block to the second chroma block, but they may also be reconstructed in the order from the second chroma block to the first chroma block. The order may be determined based on a predetermined order in the encoding / decoding device. Alternatively, information specifying the order may be encoded and signaled, and the decoding device may sequentially reconstruct the chroma blocks according to the signaled information.

[0140] Figure 6 and Figure 7An example of a reference area used for inter-component reference according to an embodiment of the present invention is shown.

[0141] An area adjacent to the luma / chroma block and pre-reconstructed before the luma / chroma block according to a predetermined decoding order may be used as a reference area. Figure 6 As shown, the area adjacent to the left or top of the luminance / chrominance block can be used as the reference area. Figure 7 As shown, the reference area can be extended to the area adjacent to the upper right and lower left of the luminance / chrominance block. Figure 6 and Figure 7 Not shown in the figure, the area adjacent to the upper left of the luminance / chrominance block and the area adjacent to the right, bottom or lower right of the luminance / chrominance block can also be used as a reference area. The area can be pre-reconstructed before the luminance / chrominance block according to the decoding order.

[0142] The reference area may be determined based on at least one of the encoding information of the luminance block or the encoding information of the neighboring block. The determination may include determining at least one of the following: the position, number, size (width / height), shape, length, or priority in the candidate reference area related to the reference area. The candidate reference area refers to one or more candidate areas that can be used as a reference area, and the reference area may be determined as any one of the candidate reference areas. The neighboring block may be a block reconstructed before the luminance block according to the decoding order. For example, the neighboring block may be a block adjacent to at least one of the left, top, right, bottom, or each corner of the luminance block.

[0143] Here, the coding information may include not only information encoded and signaled by the coding device, but also information derived in the decoding device based on the signaled information. For example, the coding information may include at least one of the following: block size / shape, block availability, partition type, partition count, component type, prediction mode, information about intra-frame prediction mode, inter-frame mode, motion information, transform type, transform skip mode, information about non-zero residual coefficients, scanning order, color format, in-loop filter information, etc.

[0144] The block size may be represented by any one of the following: width and height, minimum / maximum value of width and height, sum of width and height, number of samples belonging to a block, etc. The availability of a block may be determined in consideration of block position, range of parallel processing region, decoding order, etc. The prediction mode may mean information indicating intra mode or inter mode. Information about intra prediction mode includes information about whether the intra prediction mode is a non-directional mode, whether the intra prediction mode is a vertical / horizontal mode, directionality of the intra prediction mode, number of intra prediction modes predefined in the encoding / decoding device, etc. The inter mode may mean information indicating a merge / skip mode, an AMVP mode, or a current picture reference mode. The current picture reference mode refers to a method of predicting a current block using a pre-reconstructed region of a current picture. The current picture may be a picture to which the current block belongs. The current picture may be added to a reference picture list for inter prediction, and the current picture may be arranged after a short-term reference picture or a long-term reference picture in the reference picture list. Motion information may include a prediction direction flag, a motion vector, a reference picture index, etc.

[0145] For example, when encoding a luma block in intra mode, an area of ​​neighboring samples for intra prediction may be determined as a reference area of ​​a luma / chroma block. Here, when filtering is applied to neighboring samples in intra prediction, the reference area of ​​the luma / chroma block may be an area of ​​the neighboring samples to which filtering is applied or an area of ​​the neighboring samples before filtering is applied. The number of sample lines belonging to the reference area may be set equal to the number of sample lines belonging to an area of ​​the neighboring samples, and the reference area may be composed of N or M sample lines different from the area of ​​the neighboring samples.

[0146] Alternatively, the encoding information of the luminance block may be derived based on the encoding information of the neighboring blocks. For example, there is a case where the intra prediction mode of the luminance block is derived from the MPM (most probable mode) based on the neighboring blocks, and the luminance block is encoded in the merge / skip mode or the AMVP mode, and the SAO filter information is derived from the SAO filter information of the neighboring blocks, etc. In this case, all or some of the neighboring blocks may be determined as reference areas.

[0147] Alternatively, when the size of the luminance block is less than or equal to a threshold, the left reference region and the top reference region can be used. Otherwise, either the left reference region or the top reference region can be used. If the luminance block is an NxM non-square block (N > M), the top reference region can be used, while if the luminance block is an NxM non-square block (N < M), the left reference region can be used. When the intra prediction mode of the luminance block is a non-directional mode, the left reference region and the top reference region can be used. Otherwise, depending on the directionality of the intra prediction mode, either the left reference region or the top reference region can be considered. In this case, when the directionality is vertical, the top reference region can be used, while when the directionality is horizontal, the left reference region can be used.

[0148] Alternatively, information about the reference region can be signaled from the encoding device. The decoding device can determine the reference region based on the signaled information. The information about the reference region is information specifying the reference region. The information about the reference region can include at least one of the following: the position, number, size (width / height), shape, length, or priority information between candidate reference regions related to the reference region. This information can be signaled in at least one of a video sequence, a picture, or a predetermined discard area (e.g., a strip, a slice, a group of blocks, a block, etc.).

[0149] To this end, when there are m available reference regions, the encoding device can assign indices from 0 to (m - 1) to each reference region and can encode any one of the m reference regions. The encoding information can be signaled for each of the luminance block and the chrominance block, and the luminance block and the chrominance block can use reference regions with different positions from each other. Alternatively, this information can be signaled only for the luminance block. In this case, the reference region for the chrominance block can be determined based on the signaled information of the luminance block.

[0150] According to the above method, the reference region can be determined adaptively. However, there may be cases where the determined reference region is not available. Here, the unavailable case may mean that the determined reference region has not been decoded or the determined reference region is outside the picture. In the case of not being decoded, this may mean that the determined reference region belongs to the same parallel processing region as the luminance / chrominance block, or the determined reference region has a decoding order later than the decoding order of the luminance / chrominance block.

[0151] Therefore, when the determined reference area is unavailable, the reference area can be restricted from being used for prediction based on inter-component reference. To this end, flag information on whether to use the reference area can be used. Alternatively, the unavailable reference area can be replaced by an available reference area. The available reference area can be an area adjacent in a specific direction to the unavailable reference area. The specific direction can be one of the left, right, top, bottom or diagonal. The specific direction can be predefined in the encoding / decoding device, or can be variably determined in consideration of the position of the unavailable reference area.

[0152] The number of sample lines belonging to the reference area can be one, two or more. Figure 6 As shown, the top reference area of ​​the luminance block may include NL horizontal lines, and the left reference area may include ML vertical lines. The top reference area of ​​the chrominance block may include NC horizontal lines, and the left reference area may include MC vertical lines. At the same time, the number of sample lines (NL, NC) in the top reference area may be the same as the number of sample lines (ML, MC) in the left reference area. Alternatively, one of the number of sample lines (NL, NC) in the top reference area and the number of sample lines (ML, MC) in the left reference area may be greater or less than the other.

[0153] The values ​​of NL, ML, NC, and MC may be integers greater than or equal to zero. The values ​​of NL, ML, NC, and MC may be set to predetermined values ​​in the encoding / decoding device, or may be variably determined based on the above-mentioned encoding information. Alternatively, information about the number of sample lines may be encoded and signaled from the encoding device, and the decoding device may determine the values ​​of NL, ML, NC, and MC based on the signaled information.

[0154] On the other hand, the ratio between the number of sample lines belonging to the luma reference area and the number of sample lines belonging to the chroma reference area can be determined based on the color format. For example, when the color format is 4:2:0, the ratio between the number of sample lines belonging to the luma reference area and the number of sample lines belonging to the chroma reference area (NL:NC or ML:MC) is 2:1.

[0155] At least one of the luma reference region and the chroma reference region may be upsampled or downsampled based on the determined ratio. A ratio of the reference region between luma and chroma may be adjusted through the sampling process.

[0156] In addition, regardless of the color format, the ratio of the reference area between luma and chroma can be 1:1. That is, the number of sample lines belonging to the chroma reference area can be set according to the number of reference lines belonging to the luma reference area (e.g., NL=NC or ML=MC). The embodiments regarding the ratio can be equally applied to the ratio between the length of the luma reference area and the length of the chroma reference area.

[0157] As described above, the reference area may include multiple sample lines. In this case, Figure 5 Some of the samples referenced in may belong to a single sample line among the plurality of sample lines. Alternatively, at least one of some of the samples may belong to a sample line different from the others.

[0158] at the same time, Figure 6 and Figure 7 The blocks shown are NxN squares, but they do not limit the size or shape of the blocks and may have various sizes / shapes depending on the partitioning type described above.

[0159] Figure 8 A method of determining a region of a luma block to be used for inter-component reference of a chroma block according to an embodiment of the present invention is shown.

[0160] The encoding / decoding device can determine the area of ​​the luminance block to be used for inter-component reference of the chrominance block (hereinafter referred to as the luminance area). Therefore, the luminance block in the above embodiment can be interpreted as a luminance block corresponding to the chrominance block, or can be interpreted as a luminance area.

[0161] There may be a situation where one chrominance block corresponds to one luminance block (i.e., luminance block: chrominance = 1:1). Here, the luminance / chrominance block may be a block that is not further divided. In this case, Figure 5 As shown, the luminance region of the present invention can be determined as a luminance block corresponding to the chrominance block. The determined luminance region can be resized to a resolution corresponding to the chrominance block.

[0162] At the same time, if Figure 8 As shown, according to at least one of the above-mentioned division types or color formats, the following situation may exist: one of the chrominance blocks corresponds to a luminance block composed of N sub-blocks (i.e., luminance block EL: chrominance block AC = N: 1). In this case, the luminance region is determined as the luminance block corresponding to the chrominance block, and the luminance region can be resized to a resolution corresponding to the chrominance block. Alternatively, the region of the luminance block overlapping with the chrominance block can be determined as the luminance region. Alternatively, when luminance block: chrominance block = N: 1, it can be restricted so that prediction based on inter-component reference is not performed in the decoding device.

[0163] Alternatively, according to at least one of the above-mentioned division types or color formats, there may be a case where a chrominance block composed of M sub-blocks corresponds to a luminance block composed of N sub-blocks (i.e., luminance block: chrominance block=N:M). In this case, the luminance region may be determined considering the correspondence between the luminance block and the chrominance block (i.e., the correspondence of N:M). Alternatively, the region of the luminance block overlapping with the chrominance block may be determined as the luminance region.

[0164] The determined brightness region may include at least one of a block encoded in an intra mode or a block encoded in an inter mode. If the brightness region includes blocks encoded in intra and inter modes, respectively, the prediction based on the inter-component reference may be restricted. Alternatively, even when the brightness region includes blocks encoded in intra and inter modes, the compensation parameter may be calculated using neighboring samples of the brightness region. In addition, in the case where a block encoded in an inter mode is included in the brightness region, the reference region may be as follows. Figure 6 The diagram is expanded as shown, and its detailed description will be omitted. Alternatively, when the luma region includes blocks encoded in intra mode and inter mode, only the neighboring samples of the blocks encoded in inter mode may be used as the luma reference region. At the same time, only the region corresponding to the neighboring samples of the blocks encoded in inter mode may be determined as the chroma reference region. Alternatively, when the luma region includes blocks encoded in intra mode and inter mode, the encoding device may encode and signal information specifying the luma / chroma reference region, and the decoding device may specify the luma / chroma reference region based on the information. Alternatively, when luma block:chroma block=N:M, the above-described prediction based on inter-component reference may not be performed in the decoding device.

[0165] The determination of the luminance region may be performed considering at least one of the partition information of the luminance block, the partition information of the chrominance block, or the correspondence relationship between the partition information of the luminance block and the chrominance block. The partition information may include at least one of the following: a width, a height, a width-height ratio, the number of samples belonging to the block, the number of sub-blocks belonging to the block, a shape of the sub-block, or a partition type related to the partition block.

[0166] The determination of the luma region may be performed based on a comparison result between the division information of the luma block and the division information of the chroma block. For example, when the division information of the chroma block is the same as the division information of the luma block, the luma region may be determined as a luma block corresponding to the chroma block. On the other hand, when the division information of the chroma block is different from the division information of the luma block, the luma region may be determined as a partial region of the luma block by a predetermined rule or information signaled by the encoding device. The information may be information for specifying the luma region.

[0167] Although for the sake of clarity of explanation, the exemplary methods of the present disclosure are represented by a series of actions, they are not intended to limit the order in which the steps are performed, and each step can be performed simultaneously or in a different order if necessary. To implement the method according to the present disclosure, the illustrative steps may additionally include other steps, include the remaining steps except some steps, or may include other steps except some steps.

[0168] The various embodiments of the present disclosure are not intended to be all-inclusive and are intended to illustrate representative aspects of the present disclosure, and the features described in the various embodiments may be applied independently or in combination of two or more.

[0169] In addition, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the hardware may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general purpose processors, controllers, microcontrollers, microprocessors, etc.

[0170] The scope of the present disclosure includes: software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that enable operations of methods according to various embodiments to be performed on a device or computer; and non-transitory computer-readable media in which such software or instructions that can be executed on a device or computer are stored.

[0171] In addition, the present disclosure also includes the following examples.

[0172] Example 1. A method for processing a video signal, comprising:

[0173] deriving a first prediction value for the chrominance block using samples of the luma block;

[0174] calculating compensation parameters based on a predetermined reference region;

[0175] deriving a second prediction value for the chroma block by applying the compensation parameter to the first prediction value; and

[0176] The chroma block is reconstructed based on the second prediction value of the chroma block.

[0177] Example 2. A method according to Example 1, wherein calculating the compensation parameter includes: determining a reference area that is referenced to calculate the compensation parameter, and wherein the reference area is determined for at least one of the luminance block or the chrominance block.

[0178] Example 3. The method according to Example 1, wherein the compensation parameter is calculated based on at least one of a representative value of a reference area of ​​the luminance block or a representative value of a reference area of ​​the chrominance block.

[0179] Example 4. The method according to Example 3, wherein the representative value is derived based on one of an average value, a minimum value, a maximum value, a mode value or a median value of all samples or some samples belonging to the reference area.

[0180] Example 5. The method of Example 1, wherein the derivation of the first prediction value is selectively performed based on information indicating whether the chroma block is decoded by prediction based on an inter-component reference.

[0181] Example 6. A method according to Example 1, wherein the chrominance block is a first chrominance block (Cr block), and wherein a second chrominance block (Cb block) is reconstructed by using at least one of the samples of the luminance block or the samples of the first chrominance block.

[0182] Example 7. An apparatus for processing a video signal, comprising:

[0183] A prediction unit configured to:

[0184] deriving a first prediction value for the chrominance block using samples of the luma block;

[0185] calculating compensation parameters based on a predetermined reference area; and

[0186] deriving a second prediction value for the chroma block by applying the compensation parameter to the first prediction value; and

[0187] A reconstruction unit is configured to reconstruct the chroma block based on the second prediction value of the chroma block.

[0188] Example 8. An apparatus according to Example 7, wherein the prediction unit is configured to determine a reference area that is referenced to calculate the compensation parameter, and wherein the reference area is determined for at least one of the luma block and the chroma block.

[0189] Example 9. The apparatus according to Example 7, wherein the compensation parameter is calculated based on at least one of a representative value of a reference area of ​​the luminance block or a representative value of a reference area of ​​the chrominance block.

[0190] Example 10. An apparatus according to Example 9, wherein the representative value is derived based on one of an average value, a minimum value, a maximum value, a mode value or a median value of all samples or some samples belonging to the reference area.

[0191] Example 11. The apparatus of Example 7, wherein the prediction unit is configured to derive the first prediction value based on information indicating whether the chrominance is decoded by prediction based on an inter-component reference.

[0192] Example 12. An apparatus according to Example 7, wherein the chrominance block is a first color difference block (Cr block), and wherein a second chrominance block (Cb block) is reconstructed by using at least one of the samples of the luminance block or the samples of the first chrominance block.

[0193] Industrial Applicability

[0194] The present invention can be used for encoding / decoding video signals.

Claims

1. A method for decoding a video signal using a decoding device, comprising: Receiving, by the decoding device, a bit stream including a flag, the flag indicating whether to decode the chrominance block based on a luminance block corresponding to the chrominance block and a luminance reference area adjacent to the luminance block; predicting the chrominance block based on the luminance block and the luminance reference area according to the mark using the decoding device; as well as reconstructing the predicted chrominance block using the decoding device, The brightness reference area includes a top brightness reference area adjacent to a top boundary of the brightness block and a left brightness reference area adjacent to a left boundary of the brightness block. Wherein, the top brightness reference area includes a plurality of horizontal sample lines, Wherein, the left brightness reference area includes a plurality of vertical sample lines, wherein the number of horizontal sample lines belonging to the top luminance reference region is variably determined based on availability of the top luminance reference region, wherein the number of vertical sample lines belonging to the left luminance reference region is variably determined based on availability of the left luminance reference region, wherein the second prediction sample of the predicted chrominance block is obtained based on compensation parameters including weights and offsets, wherein the second prediction sample is obtained by multiplying the first prediction sample by the weight and adding the offset, wherein the first prediction sample is obtained by predicting the luminance block, The compensation parameter is calculated based on a representative luminance value of a luminance reference area adjacent to the luminance block and a representative chrominance value of a chrominance reference area adjacent to the chrominance block, wherein the representative brightness value is derived as one or more of an average value, a minimum value, a maximum value or a median value of some samples belonging to the brightness reference area, and The representative chromaticity value is derived from the brightness value of the brightness reference area at the corresponding position.

2. The method according to claim 1, wherein: When the luminance reference area is unavailable, an adjacent area of ​​the unavailable luminance reference area in a right direction or a lower direction is used to replace the unavailable luminance reference area.

3. The method according to claim 1, wherein: The number of horizontal sample lines belonging to the top luminance reference region is different from the number of vertical sample lines belonging to the left luminance reference region.

4. A method for encoding a video signal using an encoding device, comprising: Predicting the chrominance block using the encoding device based on a luminance block corresponding to the chrominance block and a luminance reference area adjacent to the luminance block; Obtaining, by the encoding device, a residual block of the chroma block based on an original block of the chroma block and a predicted chroma block obtained by predicting the chroma block; as well as generating a bit stream by encoding the residual block using the encoding device, wherein the bitstream includes a flag indicating whether the chrominance block is encoded based on the luminance block and the luminance reference area, The brightness reference area includes a top brightness reference area adjacent to a top boundary of the brightness block and a left brightness reference area adjacent to a left boundary of the brightness block. Wherein, the top brightness reference area includes a plurality of horizontal sample lines, Wherein, the left brightness reference area includes a plurality of vertical sample lines, wherein the number of horizontal sample lines belonging to the top luminance reference region is variably determined based on availability of the top luminance reference region, wherein the number of vertical sample lines belonging to the left luminance reference region is variably determined based on availability of the left luminance reference region, wherein the second prediction sample of the predicted chrominance block is obtained based on compensation parameters including weights and offsets, wherein the second prediction sample is obtained by multiplying the first prediction sample by the weight and adding the offset, wherein the first prediction sample is obtained by predicting the luminance block, The compensation parameter is calculated based on a representative luminance value of a luminance reference area adjacent to the luminance block and a representative chrominance value of a chrominance reference area adjacent to the chrominance block, wherein the representative brightness value is derived as one or more of an average value, a minimum value, a maximum value or a median value of some samples belonging to the brightness reference area, and The representative chromaticity value is derived from the brightness value of the brightness reference area at the corresponding position.

5. The method according to claim 4, wherein: When the luminance reference area is unavailable, an adjacent area of ​​the unavailable luminance reference area in a right direction or a lower direction is used to replace the unavailable luminance reference area.

6. The method according to claim 4, wherein: The number of horizontal sample lines belonging to the top luminance reference region is different from the number of vertical sample lines belonging to the left luminance reference region.

7. A method for transmitting a bit stream generated by a coding method, the coding method comprising: Predicting the chrominance block based on a luma block corresponding to the chrominance block and a luma reference region adjacent to the luma block; Obtaining a residual block of the chroma block based on an original block of the chroma block and a predicted chroma block obtained by predicting the chroma block; as well as Generate a bitstream by encoding the residual block, wherein the bitstream includes a flag indicating whether the chrominance block is encoded based on the luminance block and the luminance reference area, The brightness reference area includes a top brightness reference area adjacent to a top boundary of the brightness block and a left brightness reference area adjacent to a left boundary of the brightness block. Wherein, the top brightness reference area includes a plurality of horizontal sample lines, Wherein, the left brightness reference area includes a plurality of vertical sample lines, wherein the number of horizontal sample lines belonging to the top luminance reference region is variably determined based on availability of the top luminance reference region, wherein the number of vertical sample lines belonging to the left luminance reference region is variably determined based on availability of the left luminance reference region, wherein the second prediction sample of the predicted chrominance block is obtained based on compensation parameters including weights and offsets, wherein the second prediction sample is obtained by multiplying the first prediction sample by the weight and adding the offset, wherein the first prediction sample is obtained by predicting the luminance block, The compensation parameter is calculated based on a representative luminance value of a luminance reference area adjacent to the luminance block and a representative chrominance value of a chrominance reference area adjacent to the chrominance block, wherein the representative brightness value is derived as one or more of an average value, a minimum value, a maximum value or a median value of some samples belonging to the brightness reference area, and The representative chromaticity value is derived from the brightness value of the brightness reference area at the corresponding position.

8. The method according to claim 7, wherein: The number of horizontal sample lines belonging to the top luminance reference region is different from the number of vertical sample lines belonging to the left luminance reference region.