Method for decoding image, method for encoding image, and method for transmission

The image decoding method enhances compression efficiency by using intra-picture prediction between color components, addressing the challenge of high data volume in high-resolution images and reducing storage and transmission costs.

JP2024128092AActive Publication Date: 2024-09-20LX SEMICON CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
JP2024112482
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2016-10-04
Filing Date
2024-07-12
Publication Date
2024-09-20
Estimated Expiration
2037-09-22

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images leads to a significant increase in data volume, resulting in higher storage and transmission costs, necessitating the need for more efficient image encoding and decoding technologies.

Method used

An image decoding method that utilizes intra-picture prediction by deriving and applying prediction parameters between color components, such as luminance and chrominance blocks, to enhance compression efficiency.

Benefits of technology

Improves compression efficiency in image decoding and encoding methods, reducing storage and transmission costs while maintaining image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024128092000001
    Figure 2024128092000001
Patent Text Reader

Abstract

To enhance compression efficiency.SOLUTION: An image encoding / decoding method and apparatus for predicting a second color component block using a first color component block are provided. An image decoding method of the present invention comprises deriving a prediction parameter using the first color component block, and predicting the second color component block using the derived prediction parameter.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image decoding method, an image coding method, and a recording medium. Specifically, the present invention relates to an image decoding method using intra prediction, an image coding method, and a recording medium storing a bitstream generated by the image coding method (or device) of the present invention. [Background technology]

[0002] Recently, the demand for high-resolution, high-quality images, for example, HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various application fields. As the resolution and quality of image data increases, the amount of data increases relatively compared to conventional image data. Therefore, when the image data is transmitted using conventional media such as wired or wireless broadband lines or stored using conventional storage media, the transmission and storage costs increase. In order to solve the problems that arise with the increase in the resolution and quality of image data, a highly efficient image encoding / decoding technology for images with higher resolution and quality is required.

[0003] There are various image compression techniques, such as inter prediction techniques that predict pixel values ​​contained in a current picture from pictures before or after the current picture, intra prediction techniques that predict pixel values ​​contained in a current picture using pixel information in the current picture, transformation and quantization techniques for compressing the energy of residual signals, and entropy coding techniques that assign short codes to values ​​that occur frequently and long codes to values ​​that occur less frequently. By using such image compression techniques, image data can be effectively compressed and transmitted or stored. Summary of the Invention [Problem to be solved by the invention]

[0004] An object of the present invention is to provide an image decoding method and an image coding method with improved compression efficiency.

[0005] Another object of the present invention is to provide an image decoding method and an image coding method using intra prediction with improved compression efficiency.

[0006] Another object of the present invention is to provide a recording medium that stores a bit stream generated by the image coding method of the present invention. [Means for solving the problem]

[0007] An image decoding method according to the present invention for predicting a second color component block using a first color component block may include a step of deriving prediction parameters using the first color component block, and a step of predicting the second color component block using the derived prediction parameters.

[0008] In the image decoding method according to the present invention, the first color component block may be a luminance block, and the second color component block may be a chrominance block.

[0009] In the image decoding method of the present invention, the method may further include a step of determining whether to predict the second color component block using the first color component block based on the size or shape of the second color component block.

[0010] The image decoding method according to the present invention may further include the step of reconstructing the first color component block based on a size of the first color component block and a size of the second color component block.

[0011] In an image decoding method according to the present invention, when the size of the first color component block is larger than the size of the second color component block, the step of reconstructing the first color component block may include a step of downsampling the first color component block.

[0012] In an image decoding method according to the present invention, when the size of the first color component block is smaller than the size of the second color component block, the step of reconstructing the first color component block may include a step of upsampling the first color component block.

[0013] In the image decoding method according to the present invention, the step of reconstructing the first color component block may be performed based on whether a boundary of the first color component block or a boundary of the second color component block corresponds to a boundary of a predetermined image region.

[0014] In the image decoding method according to the present invention, the predetermined image region may be at least one of a picture, a slice, a tile, a CTU, and a CU.

[0015] In the image decoding method of the present invention, when the boundary of the first color component block or the boundary of the second color component block corresponds to the boundary of a specified image area, the number of upper reference sample lines and the number of left reference sample lines used in reconstructing the first color component block may be different from each other.

[0016] In the image decoding method according to the present invention, the reference samples used for reconstructing the first color component block can be determined based on an intra prediction mode of the first color component block.

[0017] In the image decoding method according to the present invention, the reference samples used for reconstructing the first color component block can be determined based on quantization parameters of neighboring blocks of the first color component block.

[0018] In the image decoding method of the present invention, when the first color component block is square and the second color component block is rectangular, the reference sample used to construct the first color component block may be a reference sample in the vicinity of the square first color component block.

[0019] In the image decoding method according to the present invention, the step of deriving the prediction parameters may be performed using at least one of a reference sample of the first color component block and a reference sample of the second color component block.

[0020] In the image decoding method according to the present invention, the reference samples used in deriving the prediction parameters may be determined based on an intra prediction mode of the first color component block.

[0021] In the image decoding method according to the present invention, the reference samples used in deriving the prediction parameters can be determined based on a size or a shape of the first color component block or the second color component block.

[0022] In the image decoding method according to the present invention, the step of deriving the prediction parameters may be performed based on at least one of a correlation, a variation, an average value, and a distribution between a reference sample of the first color component block and a reference sample of the second color component block.

[0023] In an image decoding device according to the present invention, the image decoding device includes an intra-screen prediction unit that predicts a second color component block using a first color component block, the intra-screen prediction unit can derive prediction parameters using the first color component block, and predict the second color component block using the derived prediction parameters.

[0024] An image encoding method according to the present invention for predicting a second color component block using a first color component block may include a step of deriving prediction parameters using the first color component block, and a step of predicting the second color component block using the derived prediction parameters.

[0025] In an image encoding device according to the present invention, the image encoding device includes an intra-screen prediction unit that predicts a second color component block using a first color component block, the intra-screen prediction unit can derive prediction parameters using the first color component block, and predict the second color component block using the derived prediction parameters.

[0026] The recording medium according to the present invention is capable of storing a bit stream generated by the image coding method according to the present invention. Effect of the Invention

[0027] According to the present invention, it is possible to provide an image decoding method and an image encoding method with improved compression efficiency.

[0028] Moreover, according to the present invention, it is possible to provide an image decoding method and an image coding method using intra prediction with improved compression efficiency.

[0029] According to the present invention, the bit stream generated by the image decoding method of the present invention is A recording medium on which the information is stored can be provided. [Brief description of the drawings]

[0030] [Figure 1] 1 is a block diagram showing a configuration of an embodiment of an encoding device to which the present invention is applied. [Diagram 2] 1 is a block diagram showing a configuration of an embodiment of a decoding device to which the present invention is applied. [Diagram 3] FIG. 2 is a schematic diagram showing an image division structure when encoding and decoding an image. [Figure 4] FIG. 13 is a diagram for explaining an embodiment of an intra-screen prediction process. [Diagram 5] FIG. 2 is a diagram for explaining intra-screen prediction according to the present invention. [Figure 6] FIG. 11 is an exemplary diagram for explaining a relationship between a luminance block and a chrominance block. [Figure 7] 13 is a diagram for explaining DC prediction according to the size and / or shape of a current block. FIG. [Figure 8] 11 is a diagram for explaining an inter-color component intra-screen prediction execution process. FIG. [Figure 9] FIG. 13 is an exemplary diagram for explaining the reconstruction of color component blocks. [Figure 10] FIG. 13 is a diagram for explaining an embodiment in which reconstruction is performed using multiple upper and / or left reference sample lines. [Figure 11] 11 is an exemplary diagram for explaining reference samples used for reconstruction depending on an intra-frame prediction mode or coding parameters of a corresponding block. FIG. [Figure 12] 13 is an exemplary diagram illustrating a reconstructed first-color component corresponding block when a second-color component prediction target block is 4x4; FIG. [Figure 13] 4A and 4B are diagrams for explaining samples of a first color component and samples of a second color component. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0031] Since the present invention can be modified in various ways and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this does not limit the present invention to a specific embodiment, and it should be understood that it includes all modifications, equivalents, or alternatives within the spirit and technical scope of the present invention. In the drawings, similar reference symbols indicate the same or similar functions in various aspects. The shape and size of elements in the drawings may be exaggerated for more clear explanation. The detailed description of the exemplary embodiments described below refers to the attached drawings showing specific embodiments as examples. These embodiments are described in sufficient detail to enable those skilled in the art to implement the embodiments. It should be understood that the various embodiments are different from each other, but are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein can be realized in various embodiments without departing from the spirit and scope of the present invention in relation to one embodiment. It should also be understood that the position or arrangement of individual components in each disclosed embodiment can be changed without departing from the spirit and scope of the embodiment. Accordingly, the following detailed description is not to be taken in a limiting sense, and the scope of the example embodiments is limited only by the appended claims, if properly recited, and to the full extent of equivalents to which those claims are entitled.

[0032] In the present invention, the terms "first", "second", etc. may be used to describe various components, but these components should not be limited by the above terms. These terms are used only to distinguish one component from another. For example, a first component can be named a second component, and similarly, a second component can be named a first component, without departing from the scope of the present invention. The term "and / or" includes any combination of two or more related listed items or two or more related listed items.

[0033] When a component of the present invention is said to be "coupled" or "connected" to another component, it should be understood that the component may be directly coupled or connected to the other component, but there may be other components between them. In contrast, when a component is said to be "directly coupled" or "directly connected" to another component, it should be understood that there are no other components between them.

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

[0035] The terms used in the present invention are merely used to describe certain embodiments and are not intended to limit the present invention. A singular expression includes a plural expression unless the context clearly indicates otherwise. In the present invention, the terms "include" or "have" specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or additional possibility of one or more other features, numbers, steps, operations, components, parts, or combinations thereof. In other words, in the present invention, the content described as "including" a specific configuration does not exclude configurations other than the corresponding configuration, and means that additional configurations may be included in the implementation of the present invention or the technical idea of ​​the present invention.

[0036] Some components of the present invention may not be essential components performing essential functions in the present invention, but may be optional components merely for improving performance. The present invention can be realized by including only components essential for realizing the essence of the present invention, excluding components merely used for improving performance, and a structure including only essential components, excluding optional components merely used for improving performance, is also included in the scope of the present invention.

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

[0038] In the following, an image may mean one picture constituting a video, or may refer to the video itself. For example, "encoding and / or decoding an image" may mean "encoding and / or decoding a video" or "encoding and / or decoding one of the images constituting a video." Here, a picture may have the same meaning as an image.

[0039] Terminology Encoder: A device that performs encoding. Decoder: A device that performs decoding. Block: An MxN array of Samples.

[0040] Here, M and N are positive integers, and the block may generally refer to a two-dimensional sample array. The block may refer to a unit. The current block may refer to a block to be coded that is a target for coding during coding, or a block to be decoded that is a target for decoding during decoding. The current block may be at least one of a coding block, a prediction block, a residual block, and a transformation block.

[0041] Sample: The basic unit that makes up a block. d ) 0 to 2 depending on Bd It can be expressed as a value up to -1. In the present invention, a sample can be used synonymously with a picture element or pixel.

[0042] Unit: refers to a unit of image encoding and decoding. In image encoding and decoding, a unit may be an area into which an image is divided. Also, when an image is divided into smaller units for encoding or decoding, a unit may refer to the divided units. In image encoding and decoding, a predefined process may be performed for each unit. A unit may be further divided into sub-units having a smaller size than the unit. Depending on the function, a unit may refer to a block, macroblock, coding tree unit, coding tree block, coding unit, coding block, prediction unit, prediction block, residual unit, residual block, transform unit, transform block, etc. Also, a unit may mean including a luma component block, a corresponding chroma component block, and syntax elements for each block in order to distinguish and indicate the unit from a block. The unit may have various sizes and shapes, and in particular, the shape of the unit may include geometric shapes that can be expressed two-dimensionally, such as a rectangle, a square, a trapezoid, a triangle, a pentagon, etc. Also, the unit information may include at least one of a type of unit indicating a coding unit, a prediction unit, a residual unit, a transform unit, etc., a size of the unit, a depth of the unit, an encoding and decoding order of the unit, etc.

[0043] Coding Tree Unit: Consists of two chrominance (Cb, Cr) coding tree blocks related to one luminance (Y) coding tree block. It can also mean including the blocks and syntax elements for each block. Each coding tree unit can be divided using one or more division methods such as a quad tree, a binary tree, etc. to form subunits such as a coding unit, a prediction unit, and a transform unit. It can be used as a term to indicate pixel blocks that are processing units in image decoding / encoding processing, such as division of an input image.

[0044] Coding Tree Block: A term that can be used to refer to any of the Y coding tree block, the Cb coding tree block, and the Cr coding tree block.

[0045] Neighbor block: refers to a block adjacent to a current block. The block adjacent to the current block may refer to a block whose boundary abuts the current block or a block within a predetermined distance from the current block. The neighbor block may refer to a block adjacent to a vertex of the current block. Here, the block adjacent to a vertex of the current block may be a block adjacent vertically to a neighbor block adjacent horizontally to the current block, or a block adjacent horizontally to a neighbor block adjacent vertically to the current block. The neighbor block may also refer to a reconstructed neighbor block.

[0046] Reconstructed Neighbor Block: refers to a neighboring block that has already been encoded or decoded spatially / temporally in the vicinity of a current block. In this case, the reconstructed neighboring block may refer to a reconstructed neighboring unit. The reconstructed spatial neighboring block may be a block in the current picture that has already been reconstructed through encoding and / or decoding. The reconstructed temporal neighboring block may be a reconstructed block or its neighboring block at the same position as the current block of the current picture in the reference picture.

[0047] Unit Depth: It means the degree to which a unit is divided. In a tree structure, the root node has the shallowest depth and the leaf node has the deepest depth. Also, when a unit is expressed in a tree structure, the level at which the unit exists can mean the unit depth.

[0048] Bitstream: A string of bits containing coded image information.

[0049] Parameter Set: This corresponds to header information among structures in a bitstream. At least one of a video parameter set, a sequence parameter set, a picture parameter set, and an adaptation parameter set may be included in the parameter set. The parameter set may also include slice header and tile header information.

[0050] Parsing: This can mean entropy decoding a bitstream to determine the values ​​of syntax elements, or it can mean entropy decoding itself.

[0051] Symbol: may refer to at least one of a syntax element of a unit to be coded / decoded, a coding parameter, a value of a transform coefficient, etc. Also, a symbol may refer to an object of entropy coding or a result of entropy decoding.

[0052] Prediction Unit: A basic unit for performing prediction such as inter prediction, intra prediction, inter compensation, intra compensation, motion compensation, etc. One prediction unit may be divided into a plurality of smaller partitions or sub-prediction units.

[0053] Prediction Unit Partition: This may refer to the shape in which a prediction unit is divided.

[0054] Transform Unit: A basic unit for performing residual signal coding / decoding such as transform, inverse transform, quantization, inverse quantization, and transform coefficient coding / decoding. One transform unit can be divided into multiple smaller transform units.

[0055] FIG. 1 is a block diagram showing the configuration of an embodiment of an encoding device to which the present invention is applied. The encoding device 100 may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device 100 may sequentially encode one or more images.

[0056] Referring to FIG. 1, the encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.

[0057] The encoding device 100 may perform encoding on an input image in an intra mode and / or an inter mode. The encoding device 100 may generate a bitstream through encoding on the input image and output the generated bitstream. The generated bitstream may be stored in a computer-readable recording medium or streamed via a wired / wireless transmission medium. When an intramode is used as a prediction mode, the switch 115 may switch to intra, and when an intermode is used as a prediction mode, the switch 115 may switch to inter. Here, the intramode may mean an intra-frame prediction mode, and the intermode may mean an inter-frame prediction mode. The encoding device 100 may generate a prediction block for an input block of an input image. After the prediction block is generated, the encoding device 100 may encode a residual between the input block and the prediction block. The input image may be referred to as a current image currently being encoded. The input block may be referred to as a current block currently being encoded or a block to be encoded.

[0058] When the prediction mode is an intra mode, the intra prediction unit 120 may also use pixel values ​​of a block that has already been encoded / decoded in the vicinity of the current block as reference pixels. The intra prediction unit 120 may perform spatial prediction using the reference pixels and generate a prediction sample for an input block through the spatial prediction. Here, intra prediction may mean intra-frame prediction.

[0059] When the prediction mode is an inter mode, the motion prediction unit 111 can search for an area that best matches the input block in the reference image in the motion prediction process, and can derive a motion vector using the searched area. The reference image can be stored in the reference picture buffer 190.

[0060] The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector. Here, inter prediction may refer to inter-frame prediction or motion compensation.

[0061] The subtractor 125 may generate a residual block using the difference between the input block and the predicted block. The residual block may also be called a residual signal. The residual signal may mean a difference between an original signal and a predicted signal. The residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a block-based residual signal.

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

[0063] By applying quantization to the transform coefficients or the residual signal, quantized levels can be generated, which may hereinafter also be referred to as transform coefficients in the embodiments.

[0064] The quantization unit 140 may generate quantized levels by quantizing the transform coefficients or the residual signal based on the quantization parameter, and may output the quantized levels. In this case, the quantization unit 140 may quantize the transform coefficients using a quantization matrix.

[0065] The entropy coding unit 150 may generate a bitstream by performing entropy coding based on a probability distribution on a value calculated by the quantization unit 140 or a coding parameter value calculated in a coding process, and may output the bitstream. The entropy coding unit 150 may perform entropy coding on information related to pixels of an image and information for decoding the image. For example, the information for decoding the image may include syntax elements, etc.

[0066] When entropy coding is applied, a smaller number of bits are assigned to symbols having a higher occurrence probability and a larger number of bits are assigned to symbols having a lower occurrence probability to represent the symbols, thereby reducing the size of a bit string for a symbol to be coded. The entropy coding unit 150 can use coding methods such as exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) for entropy coding. For example, the entropy coding unit 150 can perform entropy coding using a variable length coding / code (VLC) table. In addition, the entropy coding unit 150 can derive a binarization method for a target symbol and a probability model for a target symbol / bin, and then perform arithmetic coding using the derived binarization method, probability model, and context model.

[0067] The entropy coding unit 150 can convert two-dimensional block shape coefficients into one-dimensional vector form through a transform coefficient scanning method in order to code the transform coefficient levels.

[0068] Coding parameters can include not only information (flags, indexes, etc.) that is coded by an encoder and signaled to a decoder, such as syntax elements, but also information derived during the coding or decoding process, and can refer to information required when coding or decoding an image. For example, block size, block depth, block partition information, unit size, unit depth, unit partition information, quadtree partition flag, binary tree partition flag, binary tree partition direction, intra prediction mode, intra prediction direction, reference sample filtering method, prediction block boundary filtering method, filter tap, filter coefficient, inter prediction mode, motion information, motion vector, reference image index, inter prediction direction, inter prediction indicator, reference image list, motion vector predictor, motion vector candidate list, whether motion merge mode is used, motion merge candidate, motion merge candidate list, whether skip mode is used, type of interpolation filter, motion vector size, accuracy of motion vector representation, type of transformation, transformation size, information on whether additional (secondary) transformation is used, information on the presence or absence of residual signal, coded block pattern, coded block flag The coding parameters may include at least one value or a combination form of information regarding the following: frame weighting factor (CBF), quantization parameter, quantization matrix, in-loop filter information, information regarding whether an in-loop filter is applied, in-loop filter coefficient, binarization / de-binarization method, context model, context bin, bypass bin, transform coefficient, transform coefficient level, transform coefficient level scanning method, image display / output order, slice identification information, slice type, slice division information, tile identification information, tile type, tile division information, picture type, bit depth, and information regarding the luminance signal or the chrominance signal.

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

[0070] When the encoding device 100 performs encoding using inter prediction, the encoded current image can be used as a reference image for other images to be processed later. Thus, the encoding device 100 can further reconstruct or decode the encoded current image and store the reconstructed or decoded image as a reference image.

[0071] The quantized levels may be dequantized by the inverse quantization unit 160 and inverse transformed by the inverse transform unit 170. The inverse quantized and / or inverse transformed coefficients may be combined with the prediction block via an adder 175. A reconstructed block may be generated by combining the inverse quantized and inverse transformed coefficients with the prediction block. Here, the inverse quantized and / or inverse transformed coefficients refer to coefficients that have been subjected to at least one of inverse quantization and inverse transformation, and may refer to a reconstructed residual block.

[0072] The reconstructed block may pass through a filter unit 180. The filter unit 180 may apply at least one of a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), etc. to the reconstructed block or the reconstructed image. The filter unit 180 may also be referred to as an in-loop filter.

[0073] The deblocking filter can remove block noise that occurs at the boundary between blocks. In order to determine whether to perform the deblocking filter, it can be determined whether to apply the deblocking filter to the current block based on pixels included in several columns or rows included in the block. When applying the deblocking filter to the block, different filters can be applied depending on the required deblocking filtering strength.

[0074] In order to compensate for coding errors using sample adaptive offset, an appropriate offset value can be added to pixel values. Sample adaptive offset can correct the offset between a deblocked image and an original image on a pixel-by-pixel basis. After dividing the pixels included in an image into a certain number of regions, a region to be offset is determined and an offset is applied to the corresponding region, or an offset is applied by considering edge information of each pixel.

[0075] The adaptive loop filter can perform filtering based on a value obtained by comparing a reconstructed image with an original image. After dividing pixels included in an image into predetermined groups, a filter to be applied to the group is determined, and filtering can be performed differentially for each group. Information related to whether to apply an adaptive loop filter can be signaled for each coding unit (CU), and the shape and filter coefficients of the adaptive loop filter applied may be different depending on each block.

[0076] The reconstructed block or image that has passed through the filter unit 180 can be stored in a reference picture buffer 190. Fig. 2 is a block diagram showing a configuration according to an embodiment of a decoding device to which the present invention is applied.

[0077] The decoding device 200 may be a decoder, a video decoding device, or an image decoding device. Referring to FIG. 2, the decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260, and a reference picture buffer 270.

[0078] The decoding device 200 may receive a bitstream output from the encoding device 100. The decoding device 10 may receive a bitstream stored in a computer-readable recording medium or a bitstream streamed via a wired / wireless transmission medium. The decoding device 200 may perform decoding on the bitstream in an intra mode or an inter mode. The decoding device 200 may also generate a reconstructed image or a decoded image through decoding, and may output the reconstructed image or the decoded image.

[0079] If the prediction mode used for decoding is an intra mode, the switch may switch to intra. If the prediction mode used for decoding is an inter mode, the switch may switch to inter.

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

[0081] The entropy decoder 210 may generate symbols by performing entropy decoding based on a probability distribution on the bit stream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be an inverse process of the above-mentioned entropy encoding method.

[0082] The entropy decoder 210 may convert one-dimensional vector form coefficients into two-dimensional block form coefficients according to a transform coefficient scanning method in order to decode the transform coefficient levels.

[0083] The quantized levels may be inverse quantized by the inverse quantization unit 220 and inverse transformed by the inverse transform unit 230. The quantized levels are the result of inverse quantization or inverse transformation and may be generated as reconstructed residual blocks. In this case, the inverse quantization unit 220 may apply a quantization matrix to the quantized levels.

[0084] When the intra mode is used, the intra prediction unit 240 can generate a prediction block by performing spatial prediction using pixel values ​​of already decoded blocks neighboring the block to be decoded.

[0085] When the inter mode is used, the motion compensation unit 250 can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer 270.

[0086] The adder 255 may add the reconstructed residual block and the prediction block to generate a reconstructed block. The filter unit 260 may apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or image. The filter unit 260 may output the reconstructed image. The reconstructed block or image may be stored in the reference picture buffer 270 and used for inter prediction.

[0087] 3 is a schematic diagram showing an image division structure when encoding and decoding an image, which illustrates an embodiment in which one unit is divided into multiple sub-units.

[0088] In order to efficiently divide an image, a coding unit (CU) can be used in encoding and decoding. The coding unit can be used as a basic unit for image encoding / decoding. Also, the coding unit can be used as a unit for distinguishing intra-frame mode and inter-frame mode when encoding / decoding an image. The coding unit can be a basic unit used for prediction, transformation, quantization, inverse transformation, inverse quantization, or encoding / decoding of transform coefficients.

[0089] Referring to FIG. 3, an image 300 is sequentially divided into Largest Coding Unit (LCU) units, and a division structure is determined for each LCU. Here, LCU can be used synonymously with Coding Tree Unit (CTU). Division of a unit may mean division of blocks corresponding to the unit. Block division information may include information regarding the depth of the unit. The depth information may indicate the number of times and / or the degree to which the unit is divided. One unit may be hierarchically divided with the depth information based on a tree structure. Each divided subunit may have depth information. The depth information is information indicating the size of a CU, and may be stored for each CU.

[0090] The partition structure may refer to the distribution of coding units (CUs) within the LCU 310. Such a distribution may be determined by whether or not one CU is partitioned into a plurality of CUs (a positive integer equal to or greater than 2, including 2, 4, 8, 16, etc.). The width and height of a CU generated by partitioning may be half the width and half the height of the CU before partitioning, respectively, or may have a size smaller than the width and height of the CU before partitioning depending on the number of partitions. A CU may be partitioned recursively into a plurality of CUs. The partitioning of a CU may be performed recursively up to a predetermined depth or a predetermined size. For example, the depth of an LCU may be 0, and the depth of a smallest coding unit (SCU) may be a predefined maximum depth. Here, as described above, an LCU may be a coding unit having a maximum coding unit size, and an SCU may be a coding unit having a minimum coding unit size. Partitioning starts from the LCU 310, and the depth of the CU increases by 1 each time the width and / or height of the CU decreases due to partitioning.

[0091] In addition, information regarding whether a CU is divided can be expressed by division information of the CU. The division information can be 1-bit information. All CUs except for SCUs can include division information. For example, if the value of the division information is a first value, the CU may not be divided, and if the value of the division information is a second value, the CU may be divided.

[0092] Referring to FIG 3, an LCU with a depth of 0 may be 64x64 pixels. 0 may be the minimum depth. An SCU with a depth of 3 may be 8x8 pixels. 3 may be the maximum depth. CUs of 32x32 blocks and 16x16 blocks may be represented by depth 1 and depth 2, respectively.

[0093] For example, when one coding unit is divided into four coding units, the width and height of the four divided coding units may be half the size of the width and height of the coding unit before division. As an example, when a coding unit of 32x32 size is divided into four coding units, each of the divided four coding units may have a size of 16x16. When one coding unit is divided into four coding units, it can be said that the coding unit is divided into a quad-tree shape.

[0094] For example, when one coding unit is divided into two coding units, the width or height of the two divided coding units may be half the size of the width or height of the coding unit before the division. As an example, when a coding unit of 32x32 size is vertically divided into two coding units, each of the divided coding units may have a size of 16x32. When one coding unit is divided into two coding units, it can be said that the coding unit is divided into a binary-tree shape. LCU32 in FIG. 3 is an example of an LCU to which both quad-tree division and binary-tree division are applied.

[0095] FIG. 4 is a diagram for explaining an embodiment of the intra-screen prediction process. The intra prediction mode may be a non-directional mode or a directional mode. The non-directional mode may be a DC mode or a planar mode, and the directional mode may be a prediction mode having a specific direction or angle. The intra prediction mode may be expressed by at least one of a mode number, a mode value, a mode number, and a mode angle. The number of intra prediction modes may be one or more M including the non-directional and directional modes.

[0096] The number of intra prediction modes may be fixed to N regardless of the size of the block. Alternatively, the number of intra prediction modes may vary depending on the size of the block and / or the type of color component. For example, the larger the size of the block, the more intra prediction modes there may be. Alternatively, the number of intra prediction modes for the luma component block may be greater than the number of intra prediction modes for the chroma component block.

[0097] A step of checking whether samples included in neighboring blocks reconstructed for intra-predicting the current block can be used as reference samples for the current block may be performed. If there is a sample that cannot be used as a reference sample for the current block, at least one sample value among the samples included in the reconstructed neighboring blocks may be copied and / or interpolated to replace the sample value of the sample that cannot be used as a reference sample, and then the sample value may be used as a reference sample for the current block.

[0098] A filter may be applied to at least one of the reference samples or the predicted samples based on at least one of an intra prediction mode and a size of the current block during intra prediction.

[0099] In the case of the planar mode, when generating a predicted block of the current block, the sample value of the predicted sample may be generated using the weighted sum of the upper and left reference samples of the current block and the upper right and lower left reference samples of the current block based on the position of the sample to be predicted in the predicted block. In addition, in the case of the DC mode, the average value of the upper and left reference samples of the current block may be used when generating a predicted block of the current block. In addition, in the case of the directional mode, the predicted block may be generated using the upper, left, upper right and / or lower left reference samples of the current block. To generate the predicted sample value, real number unit interpolation may be performed.

[0100] The intra prediction mode of the current block may be predicted from the intra prediction mode of a block existing in the vicinity of the current block and may be entropy coded / decoded. If the intra prediction modes of the current block and the neighboring block are the same, information indicating that the intra prediction modes of the current block and the neighboring block are the same may be signaled using predetermined flag information. Also, indicator information for an intra prediction mode that is the same as the intra prediction mode of the current block among the intra prediction modes of a plurality of neighboring blocks may be signaled. If the intra prediction modes of the current block and the neighboring block are different from each other, entropy coding / decoding may be performed based on the intra prediction mode of the neighboring block to entropy code / decode intra prediction mode information of the current block.

[0101] FIG. 5 is a diagram for explaining intra-frame prediction according to the present invention. The intra prediction for the current block may include an intra prediction mode derivation step (S510), a reference sample construction step (S520), and / or an intra prediction execution step (S530).

[0102] In step S510, an intra prediction mode of the current block can be derived. The intra prediction mode of the current block can be derived by using an intra prediction mode of a neighboring block, entropy coding / decoding the intra prediction mode of the current block from a bitstream, using coding parameters of a neighboring block, or using an intra prediction mode of a color component. According to the method of using the intra prediction mode of a neighboring block, the intra prediction mode of the current block can be derived using at least one of the intra prediction mode of the neighboring block, a combination of one or more intra prediction modes of the neighboring blocks, and an intra prediction mode derived using one or more MPMs.

[0103] In step S520, at least one of reference sample selection and reference sample filtering is performed to construct a reference sample.

[0104] In step S530, intra prediction may be performed by performing at least one of non-directional prediction, directional prediction, position information based prediction, and inter-color component prediction. When the directional prediction is performed, predictions having different directions may be performed for each predetermined unit including one or more samples of the current block. The predetermined unit may be, for example, at least one of a single sample, a sample group, a line, and a block. The inter-color component prediction may include a step of reconstructing a color component block, a step of deriving a prediction parameter, and / or a step of performing inter-color component prediction. In step S530, filtering of the prediction samples may be further performed.

[0105] One or more reconstructed neighboring blocks can be used to derive the intra prediction mode of the current block. The position of the reconstructed neighboring block may be a predefined fixed position or a position derived by encoding / decoding. Hereinafter, encoding / decoding may mean entropy encoding and decoding. For example, when the coordinates of the upper left corner sample of a current block having a size of WxH are (0,0), the neighboring block may be at least one of blocks adjacent to the coordinates (-1,H-1), (W-1,-1), (W,-1), (-1,H), and (-1,-1) and neighboring blocks of the block. In this case, the W and H may indicate the width W and height H of the current block or the number of samples.

[0106] The intra prediction mode of the available neighboring block may be replaced with a predetermined intra prediction mode. The predetermined intra prediction mode may be, for example, a DC mode, a planar mode, a vertical mode, a horizontal mode, and / or a diagonal mode. For example, if the neighboring block is located outside the boundary of at least one predetermined unit of a picture, a slice, a tile, a CTU (Coding Tree Unit), or is inter-predicted or coded in PCM mode, the neighboring block may be determined to be unavailable. Alternatively, if the neighboring block is unavailable, the intra prediction mode of the unavailable neighboring block may not be replaced, and the unavailable neighboring block may not be used.

[0107] The intra prediction mode of the current block may be derived using the intra prediction modes of neighboring blocks at a predetermined position or a statistic of the intra prediction modes of two or more neighboring blocks. In this specification, the statistic may mean at least one of an average value, a maximum value, a minimum value, a mode value, a median value, a weighted average value, and an interpolated value.

[0108] Alternatively, the intra prediction mode of the current block may be derived based on the size of the neighboring block. For example, the intra prediction mode of a relatively large neighboring block may be derived as the intra prediction mode of the current block. Alternatively, a relatively large weight may be assigned to the intra prediction mode of a relatively large block to calculate the statistics.

[0109] Alternatively, whether the intra prediction mode of the neighboring block is directional may be taken into consideration. For example, if the intra prediction mode of the neighboring block is non-directional, the non-directional mode may be derived as the intra prediction mode of the current block. Alternatively, the intra prediction mode of the current block may be derived using the intra prediction modes of other neighboring blocks other than the non-directional mode.

[0110] In order to derive an intra prediction mode of a current block, one or more Most Probable Mode (MPM) lists may be constructed using intra prediction modes of neighboring blocks. The number N of candidate modes included in an MPM list may be fixed or may be determined based on the size and / or shape of the current block. The MPM list may be constructed so that there are no overlapping modes. If the number of available candidate modes is less than N, a predetermined candidate mode among the available candidate modes, for example, a mode obtained by adding or subtracting a predetermined offset from a directional mode, may be added to the one or more MPM lists. Alternatively, at least one of a horizontal mode, a vertical mode, a 45 degree mode, a 135 degree mode, a 225 degree mode, and a non-directional mode may be added to the MPM list. The predetermined offset may be 1, 2, 3, 4, or a positive integer.

[0111] The MPM list may be arranged in a predetermined order based on the positions of neighboring blocks. For example, the predetermined order may be the order of the blocks adjacent to the left, top, bottom left corner, top right corner, and top left corner of the current block. The non-directional mode may be included in any position of the MPM list. For example, it may be added next to the intra-prediction modes of the blocks adjacent to the left and top.

[0112] In another embodiment, the intra prediction mode of the current block may be derived using the intra prediction mode derived using the MPM list and the intra prediction mode of the neighboring block. For example, when the intra prediction mode derived using the MPM list is Pred_mpm, the Pred_mpm may be changed using the intra prediction mode of the neighboring block. For example, if Pred_mpm is greater than the intra prediction mode of the neighboring block (or a statistical value of two or more intra prediction modes), Pred_mpm may be increased by n, otherwise, it may be decreased by n. In this case, n may be a predetermined integer such as +1, +2, +3, 0, -1, -2, -3, etc. The intra prediction mode of the current block may be derived by the changed Pred_mpm. Alternatively, if at least one of Pred_mpm and the intra prediction mode of the neighboring block is a non-directional mode, the intra prediction mode of the current block may be derived as the non-directional mode. Alternatively, conversely, the intra prediction mode of the current block may be derived as a directional mode.

[0113] As another embodiment of deriving an intra prediction mode, the intra prediction mode of the current block may be derived using the intra prediction mode of another color component. For example, if the current block is a chrominance block, the intra prediction mode of a luminance block corresponding to the chrominance block may be used. The corresponding luminance block may be one or more. The corresponding luminance block may be determined based on at least one of a size, a shape, and / or a coding parameter of the chrominance block. Alternatively, the corresponding luminance block may be determined based on at least one of a size, a shape, and / or a coding parameter of the luminance block.

[0114] A luminance block corresponding to a chrominance block may include a plurality of partitions. All or some of the plurality of partitions may have different intra prediction modes. The intra prediction mode of the chrominance block may be derived based on all or some of the plurality of partitions in the corresponding luminance block. In this case, some partitions may be selectively used based on a comparison of block size, shape, depth information, etc. between the chrominance block and the luminance block (all or some of the plurality of partitions). A partition at a position in the luminance block corresponding to a predetermined position in the chrominance block may be selectively used. The predetermined position may refer to a corner sample (e.g., upper left sample) position or a central sample position of the chrominance block.

[0115] The method for deriving an inter-color component intra prediction mode according to the present invention is not limited to using the intra prediction mode of the corresponding luminance block. For example, the intra prediction mode of the chrominance block may be derived by using or sharing at least one of the mpm_idx or MPM list of the corresponding luminance block.

[0116] FIG. 6 is an exemplary diagram for explaining the relationship between the luminance block and the chrominance block. In the example shown in FIG. 6, the ratio between the color components is 4:2:0, and the luma block corresponding to the chrominance block may be at least one of A, B, C, and D.

[0117] In the example shown in Fig. 6, the intra prediction mode of the chrominance block can be derived using the intra prediction mode of the luma block A corresponding to the upper left position (0,0) in the chrominance block, or the intra prediction mode of the luma block D corresponding to the central sample position (nS / 2,nS / 2) of the chrominance block. The predetermined position in the chrominance block is not limited to (0,0) and (nS / 2,nS / 2). For example, the predetermined position can be the position of the upper right, lower left and / or lower right corner sample in the chrominance block.

[0118] The predetermined position can be selected according to the shape of the chrominance block. For example, if the chrominance block is square, the predetermined position can be the center sample position. For example, if the chrominance block is rectangular, the predetermined position can be the top left sample position. In the above example, the predetermined positions when the chrominance block is square and when it is rectangular can be reversed.

[0119] In another embodiment, the intra prediction mode of the chrominance block may be derived using statistics of one or more intra prediction modes in a luminance block corresponding to the size of the chrominance block.

[0120] In the example shown in FIG. 6, for example, a mode corresponding to the average of the intra-picture prediction modes of luminance blocks A and D, or a mode corresponding to the average of the intra-picture prediction modes of A, B, C, and D in a luminance block corresponding to the size of the chrominance block, can be derived as the intra-picture prediction mode of the chrominance block.

[0121] If there are multiple available intra prediction modes for the luma block, all or some of them can be selected. The selection can be based on a predefined position within the chroma block, or based on the size, shape and / or depth of the chroma block and / or luma block. The selected intra prediction mode for the luma block can be used to derive the intra prediction mode for the chroma block.

[0122] For example, by comparing the size of luminance block A corresponding to the upper left sample position (0,0) in the chrominance block with the size of luminance block D corresponding to the central sample position (nS / 2, nS / 2) in the chrominance block, the intra-screen prediction mode of the chrominance block can be derived using the intra-screen prediction mode of luminance block D, which is relatively larger.

[0123] Alternatively, if a luminance block corresponding to a given position in a chrominance block is larger than or equal to the chrominance block, the intra prediction mode of the chrominance block can be derived using the intra prediction mode of the corresponding luminance block.

[0124] Alternatively, if the size of the chrominance block falls within a predetermined range, the intra-picture prediction mode of the chrominance block can be derived using the intra-picture prediction mode of the luminance block corresponding to the upper left sample position (0,0) in the chrominance block.

[0125] Alternatively, if the size of the chrominance block falls within a predetermined range, the sizes of the luminance blocks corresponding to predetermined positions (0,0) and (nS / 2,nS / 2) within the chrominance block can be compared, and the intra-screen prediction mode of the chrominance block can be derived using the intra-screen prediction mode of the larger block.

[0126] The predetermined range can be derived based on at least one of information signaled via the bitstream, information regarding the size (and / or depth) of the blocks (chrominance blocks and / or luminance blocks), and information predefined in the encoder / decoder.

[0127] Alternatively, if the chrominance block has a rectangular shape, the intra prediction mode of the chrominance block can be derived using the intra prediction mode of the luma block corresponding to the central sample position (nS / 2, nS / 2) in the chrominance block.

[0128] Alternatively, among the multiple partitions in the luma block, a partition having the same shape as the chroma block can be used. For example, if the chroma block is square or non-square, among the multiple partitions in the luma block, a square or non-square partition can be used.

[0129] In the example described with reference to Fig. 6, the intra prediction mode of the chrominance block is derived using the intra prediction mode of the luminance block, including the case where the intra prediction mode of the luminance block is used as the intra prediction mode of the chrominance block as is. Also, it is not limited to using the intra prediction mode of the luminance block, and information used when deriving the intra prediction mode of the luminance block, including the mpm_idx and MPM list of the luminance block, may be used.

[0130] Alternatively, the MPM list for the chrominance block may be constructed using the intra prediction mode of the luminance block corresponding to the predetermined position. In this case, mpm_idx information for the chrominance block may be coded and signaled. The MPM list for the chrominance block may be constructed in a similar manner to the MPM list for the luminance block. However, the MPM candidates for the chrominance block may include the intra prediction modes of the neighboring chrominance blocks and / or the intra prediction mode of the corresponding luminance block.

[0131] When the MPM flag is 0, a secondary MPM list including one or more intra prediction modes can be constructed, and the intra prediction mode of the current block can be derived using the secondary MPM index (2nd_mpm_idx). In this case, a secondary indicator (e.g., secondary MPM flag) indicating whether the intra prediction mode of the current block is included in the secondary MPM list can be encoded / decoded. The secondary MPM list can be constructed using the intra prediction modes of neighboring blocks, similar to the primary MPM list. In this case, the intra prediction modes included in the primary MPM list may not be included in the secondary MPM list. The number of MPM lists is not limited to one or two, and N MPM lists can be used.

[0132] If the intra prediction mode of the current block is not included in any of the MPM lists, the luma component intra prediction mode of the current block can be coded / decoded, and the chroma component intra prediction mode can be derived or coded / decoded based on the corresponding luma component intra prediction mode.

[0133] When the current block is divided into a plurality of sub-blocks, at least one of the above-described methods can be applied to derive an intra prediction mode for each of the divided sub-blocks.

[0134] The size and / or shape of the sub-block may be a predetermined size and / or shape (e.g., 4x4) or may be determined according to the size and / or shape of the current block. Alternatively, the size of the sub-block may be determined based on whether neighboring blocks of the current block are divided or not, or based on the intra prediction modes of the neighboring blocks of the current block. For example, the current block may be divided based on a boundary where the intra prediction modes of the neighboring blocks are different from each other. Alternatively, the current block may be divided based on whether the neighboring blocks are intra coded blocks or inter coded blocks.

[0135] An indicator (e.g., NDIP_flag) indicating that the intra prediction mode of the current block is derived using the intra prediction mode of a neighboring block may be encoded / decoded. The indicator may be encoded / decoded for at least one unit of the current block or a sub-block. In this case, the indicator may be encoded / decoded only if the size of the current block or a sub-block falls within a predetermined size or a predetermined size range.

[0136] The determination of whether the size of the current block corresponds to the predetermined size may be performed based on the width or height of the current block. For example, if the width or height is a divisible length, it may be determined that the size of the current block corresponds to the predetermined size.

[0137] When the current block is divided into a plurality of sub-blocks, the intra prediction modes of the sub-blocks may be derived in a zigzag order or in parallel. The intra prediction modes of the sub-blocks may be derived by at least one of the methods of deriving the intra prediction mode of the current block. In this case, neighboring blocks of the current block may be used as neighboring blocks of each of the sub-blocks. Alternatively, sub-blocks in the current block may be used as neighboring blocks of each of the sub-blocks.

[0138] The intra prediction mode of the sub-blocks belonging to the current block may be derived using the average value of the intra prediction mode of the current block and the intra prediction modes of the adjacent blocks on the left and top sides of the (0,0) position sample of each sub-block. For example, if the intra prediction mode of the current block is greater than the average value, only 1 / 2 of the average value may be subtracted from the derived intra prediction mode, and if it is less than or equal to the average value, it may be added.

[0139] The information on intra prediction may be signaled via at least one of a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, and a tile header. At least one of the information on intra prediction may not be signaled below a certain block size. In this case, the information on intra prediction of a previously encoded / decoded block (e.g., a higher block) may be used.

[0140] Based on the derived intra prediction mode, a reference sample for intra prediction can be constructed. In the following description, a current block may refer to a prediction block or a sub-block having a size / shape smaller than that of a prediction block. The reference sample can be constructed using one or more reconstructed samples or a combination of samples in the vicinity of the current block. Filtering can also be applied to the constructed reference sample.

[0141] The number and / or position of reconstructed sample lines used to construct the reference sample may vary depending on the position of the current block in the coding tree block. Each reconstructed sample on multiple reconstructed sample lines can be used as a reference sample as is. Alternatively, a predetermined filter can be applied to the reconstructed sample, and the reference sample can be generated using the filtered reconstructed sample. The reconstructed samples to which the filter is applied may belong to the same reconstructed sample line or different reconstructed sample lines.

[0142] The reconstructed reference sample can be represented as ref[m,n], and the neighboring reconstructed sample or a sample obtained by filtering the reconstructed sample can be represented as rec[m,n]. Here, m or n can be a predetermined integer value indicating the position of the sample. When the position of the upper left sample in the current block is (0,0), the position of the upper left reference sample of the current block can be set to (-1,-1).

[0143] Availability of nearby reconstructed samples to construct the reference sample may be determined. If the nearby reconstructed samples are located outside at least one of a picture, slice, tile, and CTU, they may be determined to be unavailable. Or, if constrained intra prediction is performed on the current block, if the nearby reconstructed samples are located in an inter-coded / decoded block, they may be determined to be unavailable.

[0144] If the neighboring reconstructed samples are determined to be unavailable, the unavailable samples can be replaced with nearby available reconstructed samples, e.g., starting from the bottom left sample position, adjacent available samples can be used to fill the unavailable samples, or a combination of available samples can be used to fill the unavailable samples, e.g., the average value of the available samples on either side of the unavailable sample can be used to fill the unavailable sample.

[0145] Alternatively, the unavailable samples can be filled using information of available reference samples. In this case, the unavailable samples can be filled with an arbitrary value, not with the adjacent available sample values. The arbitrary value may be an average value of the available sample values, or a value taking into account a gradient of the available sample values. Alternatively, both the average value and the gradient may be used. The gradient may be determined based on a difference value between the adjacent available samples. Alternatively, the gradient may be determined based on a difference value between the average value and the available sample value. In addition to the average value, a weighted sum using a maximum value, a minimum value, a median value, or an arbitrary weight may be used. The arbitrary weight may be determined based on a distance between the available sample and the unavailable sample.

[0146] These methods can be applied to both the top and left reference samples, or just to any direction, and can also be applied when multiple reconstructed sample lines are used to construct the reference sample line of the current block.

[0147] It may be determined whether to apply filtering to the constructed one or more reference samples based on at least one of an intra prediction mode of the current block or a size / shape of the block. If filtering is applied, the type of filter may vary depending on at least one of the intra prediction mode, size, and shape of the current block.

[0148] Based on the derived intra prediction mode and reference samples, intra prediction may be performed on the current block.

[0149] In the case of DC mode, an average value of one or more of the constructed reference samples can be used. In this case, filtering can be applied to one or more predicted samples located at the boundary of the current block. DC prediction can be performed differently based on at least one of the size and shape of the current block. For example, the range of reference samples used in DC mode can be specified based on the size and / or shape of the current block.

[0150] FIG. 7 is a diagram for explaining DC prediction according to the size and / or shape of the current block. As shown in FIG. 7(a), when the current block is a square, DC prediction can be performed using the average value of the reference samples above and to the left of the current block.

[0151] If the current block is non-square, the neighboring samples on the left or top side of the current block can be selectively used. For example, as shown in (b) of FIG. 7, if the current block is rectangular, DC prediction can be performed using the average value of the reference samples adjacent to the larger of the width and height of the current block.

[0152] Alternatively, if the size of the current block is a predetermined size or is within a predetermined range, a predetermined sample may be selected from the reference samples on the upper or left side of the current block, and DC prediction may be performed using an average value of the selected samples. The predetermined size may mean a predetermined fixed size NxM in the encoder / decoder. N and M are integers greater than 0, and N and M may be the same or different from each other. The predetermined range may mean a threshold value for selecting a reference sample of the current block. The threshold value may be realized by at least one of a minimum value or a maximum value. The minimum value and / or the minimum value may be a fixed value predetermined in the encoder / decoder, or may be a variable value coded and signaled by the encoder.

[0153] As mentioned above, the average value of one or more reference samples can be used for DC prediction. To calculate the average value, division by the number of reference samples can be performed. n In the case where n is a positive integer, the division can be replaced by a binary shift operation. In the case of a non-square block, if all the reference samples on the upper and left sides are used, the number of reference samples becomes 2. n In this case, a shift operation cannot be used instead of a division operation. n By using the reference samples, the division can be replaced by a shift operation.

[0154] In the planar mode, a weighted sum considering the distance from the constructed one or more reference samples can be used according to the position of the intra-frame prediction target sample of the current block.

[0155] In the directional mode, one or more reference samples existing on or near a predetermined angle line to the position of the intra-frame prediction target sample can be used.

[0156] In the case of a position information-based intra prediction mode, a reconstructed sample block generated based on encoded / decoded or derived position information can be used as an intra prediction block of the current block, or the decoder can search for and derive a reconstructed sample block to be used as an intra prediction block of the current block.

[0157] Intra prediction for the chrominance signal may be performed using a reconstructed luminance signal of the current block, and intra prediction for another chrominance signal Cr may be performed using one reconstructed chrominance signal Cb or a residual signal of Cb of the current block.

[0158] The one or more prediction methods may be combined to perform intra prediction. For example, an intra prediction block for a current block may be constructed through a weighted sum of a block predicted using a predetermined non-directional intra prediction mode and a block predicted using a predetermined directional intra prediction mode. In this case, the weight may be applied differently depending on at least one of the intra prediction mode of the current block, the block size, and the sample position. Alternatively, in the case of a chrominance block, an intra prediction block for the chrominance block may be constructed through a weighted sum of a block predicted using a predetermined intra prediction mode and a block predicted using a reconstructed signal of a luminance block. In this case, the predetermined intra prediction mode may be, for example, any one of the modes used to derive the intra prediction mode of the chrominance block. In the case of a chrominance block, whether or not a final prediction block is constructed using the weighted sum of two prediction blocks as described above may be signaled by coded information.

[0159] In the case of a directional mode, the constructed reference samples may be reconstructed based on a directional prediction mode. For example, when the directional prediction mode is a mode using all reference samples present on the left and upper sides, a one-dimensional array may be constructed for the left or upper reference samples. Alternatively, the left reference sample may be moved to construct the upper reference sample, or the upper reference sample may be constructed using a weighted sum of one or more left reference samples.

[0160] Different directional intra predictions may be performed on a predetermined sample group unit of the current block, where the predetermined sample group unit may be a block, a sub-block, a line, or a single sample.

[0161] According to an embodiment of the present invention, it is possible to perform inter-color component intra prediction. FIG. 8 is a diagram for explaining an inter-color component intra prediction execution process. The inter-color component intra prediction may include a color component block reconstruction step (S810), a prediction parameter derivation step (S820), and / or an inter-color component prediction execution step (S830). The color component may mean at least one of a luma signal, a chroma signal, Red, Green, Blue, Y, Cb, and Cr. The prediction for the first color component may be performed using at least one of a second color component, a third color component, and a fourth color component. In this case, the signal of the color component used for the prediction may be at least one of an original signal, a reconstructed signal, a residual signal, and a prediction signal.

[0162] When performing intra prediction on a second color component target block, at least one of samples of a first color component corresponding block corresponding to the target block and / or samples of a neighboring block of the corresponding block can be used. For example, when performing intra prediction on a color difference component block Cb or Cr, a reconstructed luma component block Y corresponding to the color difference component block can be used. Or, when performing intra prediction on a Cr component block, a Cb component block can be used. Or, when performing intra prediction on a fourth color component block, at least one combination of a first color component block, a second color component block, and a third color component block corresponding to the block can be used.

[0163] Whether or not to perform inter-color component intra prediction may be determined based on at least one of the size and shape of the current target block. For example, if the size of the target block is the CTU size, is equal to or larger than a predetermined size, or falls within a predetermined size range, inter-color component intra prediction may be performed on the target block. Alternatively, if the shape of the target block is a predetermined shape, inter-color component intra prediction may be performed on the target block. The predetermined shape may be a square. In this case, if the target block is rectangular, inter-color component intra prediction may not be performed. If the predetermined shape is rectangular, the above-described embodiment may operate inversely.

[0164] Alternatively, whether to perform inter-color component intra prediction may be determined based on at least one coding parameter of a corresponding block corresponding to the prediction target block and a neighboring block of the corresponding block. For example, when a corresponding block is inter-predicted under a CIP (Constrained intra prediction) environment, inter-color component intra prediction may not be performed. Alternatively, when the intra prediction mode of the corresponding block corresponds to a predetermined mode, inter-color component intra prediction may be performed. Alternatively, whether to perform inter-color component intra prediction may be determined based on at least one of the CBF information of the corresponding block and the neighboring block. The coding parameter is not limited to the prediction mode of the block, and the above-mentioned various parameters that can be used for encoding / decoding may be used.

[0165] The color component block reconstruction step of step S810 will now be described. When predicting a second color component block using a first color component block, the first color component block may be reconstructed. For example, when the color space of an image is YCbCr and the ratio between color components is any one of 4:4:4, 4:2:2, and 4:2:0, the sizes of the inter-color component blocks may be different from each other. Therefore, when predicting a second color component block using first color component blocks having different sizes, the first color component block may be reconstructed to make the sizes of the two blocks the same. In this case, the reconstructed block may include at least one of samples of the first color component corresponding block and samples of a neighboring block. FIG. 9 is an exemplary diagram for explaining the reconstruction of color component blocks.

[0166] In Fig. 9(a), p1[x,y] may represent a sample at the (x,y) position of the first color component block, and in Fig. 9(b), p1'[x,y] may represent a sample at the (x,y) position of the block reconstructed from the first color component block.

[0167] If the size of a first color component block is larger than that of a second color component block, the first color component block may be down-sampled and reconstructed into a block of the same size as the size of the second color component block. The down-sampling may be performed by applying an N-tap filter to one or more samples (N is an integer equal to or greater than 1). In this case, at least one of the following Equations 1 to 5 may be used. If any of a plurality of down-sampling methods is selectively used, the encoder may select one down-sampling method as a predetermined method. For example, the encoder may select a down-sampling method having an optimal effect. The selected down-sampling method may be coded and signaled to the decoder. The signaled information may be index information indicating the down-sampling method.

[0168] [Formula 1] p1'[x, y] = (p1[2x, 2y] + p1[2x, 2y+1] + 1) >> 1 [Formula 2] p1'[x, y] = (p1[2x+1, 2y] + p1[2x+1, 2y+1] + 1) >> 1 [Formula 3] p1'[x, y]= (p1[2x-1, 2y] + 2 x p1[2x, 2y] + p1[2x+1, 2y] + 2) >> 2 [Formula 4] p1'[x, y] = (p1[2x-1, 2y+1] + 2 * p1[2x, 2y+1] + p1[2x+1, 2y+1] + 2) >> 2 [Formula 5] p1'[x, y] = (p1[2x-1, 2y] + 2 * p1[2x, 2y] + p1[2x+1, 2y] + p1[2x-1, 2y+1] + 2 * p1[2x, 2y+1] + p1[2x+1, 2y+1] + 4) >> 3

[0169] The method of downsampling using two or more samples is not limited to the embodiment of Equation 1 to Equation 5. For example, two or more samples that can be used to calculate the downsampled value p1'[x,y] can be selected from p1[2x,2y] and its neighboring samples. The neighboring samples can be selected from p1[2x-1,2y-1], p[2x-1,2y], p1[2x-1,2y+1], p1[2x,2y-1], p1[2x,2y+1], p1[2x+1,2y-1], p1[2x+1,2y], and p1[2x+1,2y+1]. Downsampling can be performed by calculating an average or a weighted average using two or more samples.

[0170] Alternatively, the downsampling may be performed by selecting a specific sample from one or more samples, using at least one of the following Equations 6 to 9. [Formula 6] p1'[x, y] = p1[2x, 2y] [Formula 7] p1'[x, y] = p1[2x, 2y+1] [Formula 8] p1'[x, y] = p1[2x+1, 2y] [Formula 9] p1'[x, y] = p1[2x+1, 2y+1]

[0171] If the size of the first color component block is smaller than the size of the second color component block, the first color component block can be up-sampled and reconstructed into a block having the same size as the second color component block, using the following Equation 10. [Formula 10] p1'[2x, 2y] = p1[x,y], p1'[2x+1, 2y] = (p1[x, y] + p1[x+1, y]+1)>>1, p1'[2x, 2y+1] = (p1[x, y] + p1[x, y+1]+1)>>1, p1'[2x+1, 2y+1] = (p1[x+1, y] + p1[x, y+1]+1) >> 1

[0172] In performing the reconstruction process, a filter may be applied to one or more samples, for example, a filter may be applied to one or more samples included in at least one of the first color component corresponding block, a neighboring block of the corresponding block, the second color component target block, and a neighboring block of the target block.

[0173] In the above-mentioned reference sample construction step, an indicator corresponding to a predetermined line among a plurality of reference sample lines can be signaled, and in this case, in the reconstruction process, reconstruction can be performed using the predetermined line corresponding to the signaled indicator.

[0174] When performing the reconstruction process, if at least one of the boundaries of the second color component target block and the corresponding first color component corresponding block corresponds to the boundary of a predetermined area, the reference samples used for reconstruction may be selected differently. In this case, the number of reference sample lines on the upper side may be different from the number of reference sample lines on the left side. The predetermined area may be, for example, at least one of a picture, a slice, a tile, a CTU, and a CU.

[0175] For example, when the upper boundary of the first color component corresponding block corresponds to the boundary of the predetermined region, the upper reference sample is not used, and only the left reference sample is used for reconstruction. When the left boundary of the first color component corresponding block corresponds to the boundary of the predetermined region, the left reference sample is not used, and only the upper reference sample is used for reconstruction. Alternatively, N upper reference sample lines and M left reference sample lines can be used, where N may be smaller than M. For example, N may be 1 when the upper boundary corresponds to the boundary of the predetermined region, and M may be 1 when the left boundary corresponds to the boundary of the predetermined region.

[0176] Alternatively, reconstruction may be performed using N upper reference sample lines and / or M left reference sample lines of the first color component corresponding block, regardless of whether they fall on the boundary of the specified area.

[0177] FIG. 10 is a diagram illustrating an embodiment in which reconstruction is performed using multiple upper and / or left reference sample lines.

[0178] As shown in FIG. 10(a), reconstruction can be performed using four upper reference sample lines and four left reference sample lines.

[0179] For example, when the upper or left boundary of the first color component corresponding block corresponds to the boundary of the predetermined region, the number of upper and left reference sample lines used for reconstruction may be different from each other. For example, as shown in (b) to (d) of FIG. 10, two upper reference sample lines and four left reference sample lines may be used, or one upper reference sample line and three left reference sample lines may be used, or one upper reference sample line and two left reference sample lines may be used.

[0180] The number of reference sample lines used is not limited to the above example, and N upper reference sample lines and M left reference sample lines may be used. N and M may be the same or different. If the upper and left boundaries all correspond to the boundaries of the predetermined area, N and M may be the same, for example 1. Alternatively, under the same conditions, N may be set smaller than M. This is because more resources (memory) are required to store the upper reference sample lines than the left reference sample lines.

[0181] Alternatively, as shown in FIG. 10(e), reconstruction can be performed using one or more reference samples that do not deviate from the width and height of the block corresponding to the first color component.

[0182] When performing the reconstruction, the reference sample reconstruction of the first color component corresponding block can be performed differently depending on at least one of the size, shape, and encoding parameters of at least one of the first color component corresponding block and its neighboring blocks, and the second color component target block and its neighboring blocks.

[0183] For example, among the first color component corresponding blocks or neighboring blocks, the reference samples can be reconstructed using samples of blocks in intra-screen coding mode without using samples of blocks in inter-screen coding mode.

[0184] FIG. 11 is an exemplary diagram for explaining reference samples used for reconstruction according to the intra prediction mode or coding parameters of the corresponding block. The reconstruction of the reference samples of the first color component block can be performed differently according to the intra prediction mode of the first color component corresponding block. For example, when the intra prediction mode of the corresponding block is a non-directional mode such as DC mode or Planar mode, or a directional mode using both the upper reference sample and the left reference sample, as shown in (a) of FIG. 11, reconstruction can be performed using at least one of the reference samples present on the upper and left sides. Or, when the intra prediction mode of the corresponding block is a directional mode using the upper reference sample and the upper right reference sample, as shown in (b) of FIG. 11, reconstruction can be performed using at least one of the reference samples present on the upper and upper right sides. Or, when the intra prediction mode of the corresponding block is a directional mode using the left and lower left reference samples, as shown in (c) of FIG. 11, reconstruction can be performed using at least one of the reference samples present on the left and lower left sides.

[0185] Alternatively, the reconstruction of the reference sample of the first color component corresponding block may be performed differently depending on at least one quantization parameter of the first color component corresponding block or the neighboring block. For example, as shown in (d) of FIG. 11, the reconstruction may be performed using the reference sample belonging to the upper block having a relatively small quantization parameter value (QP) of the neighboring block.

[0186] Alternatively, if the shape of the second color component target block is rectangular, reconstruction can be performed using reference samples in the vicinity of the first color component corresponding block, which is square.

[0187] Alternatively, if the second color component target block is divided into two blocks (e.g., two 16x8 blocks) and the first color component corresponding block is, for example, a 32x16 block, reconstruction can be performed using reference samples in the vicinity of the 32x32 block. In this case, the reference samples in the vicinity of the reconstructed 32x32 block can be shared as reference samples for the first color component block corresponding to the second 16x8 block located below among the second color component corresponding blocks.

[0188] The prediction parameter derivation step S820 will now be described. A prediction parameter may be derived using at least one of a reference sample of the reconstructed first-color component corresponding block and a reference sample of a second-color component prediction target block. Hereinafter, the first color component and the first color component block may refer to the reconstructed first color component and the reconstructed first color component block.

[0189] 12 is a diagram illustrating an example of a reconstructed first-color component corresponding block when the second-color component prediction target block is 4x4, and there may be N reference sample lines.

[0190] As shown in FIG. 12(a), the prediction parameters can be derived using reference samples on the upper and left sides of the reconstructed first-color component corresponding block or the second-color component prediction target block.

[0191] For example, the prediction parameters can be derived by adaptively using the reconstructed first-color component reference samples based on the intra-prediction mode of the first-color component corresponding block, and the second-color component reference samples can also be adaptively used based on the intra-prediction mode of the first-color component corresponding block.

[0192] When the intra-screen prediction mode of the first color component corresponding block is a non-directional mode such as DC mode or Planar mode, or a directional mode that uses both an upper reference sample and a left reference sample, the upper and left reference samples of the first color component corresponding block can be used, as shown in (a) of Figure 12.

[0193] When the intra-screen prediction mode of the first color component corresponding block is a directional mode using an upper reference sample, the upper reference sample of the first color component corresponding block can be used, as shown in (b) or (c) of Figure 12.

[0194] When the intra-screen prediction mode of the first color component corresponding block is a directional mode using a left reference sample, the left reference sample of the first color component corresponding block can be used, as shown in (d) or (e) of Figure 12.

[0195] Alternatively, when the intra prediction mode of the first color component corresponding block is a directional mode, the reference sample used for prediction for each mode can be used as the reference sample of the first color component. For example, when the intra prediction mode is a vertical mode, the reference sample shown in (b) of FIG. 12 can be used. When the intra prediction mode is a horizontal mode, the reference sample shown in (d) of FIG. 12 can be used. When the intra prediction mode is a top-right diagonal mode, the reference sample shown in (c) of FIG. 12 can be used. When the intra prediction mode is a bottom-left diagonal mode, the reference sample shown in (e) of FIG. 12 can be used. When the intra prediction mode is a mode between the vertical mode and the top-right diagonal mode, the reference sample shown in (f) of FIG. 12 can be used. When the intra prediction mode is a directional mode corresponding to a 45-degree diagonal line, at least one of the upper right or lower left reference samples can be used as shown in (g) of FIG. 12. The reference samples used according to the intra prediction mode can be stored in the form of a look-up table and used.

[0196] The derivation of the prediction parameters may be performed adaptively using reference samples of the first or second color component depending on the size and / or shape of the first and / or second color component blocks.

[0197] For example, when the size of the second color component target block is 64x64, 32, 16 or 8 reference samples among the upper or left reference samples of the first or second color component block can be used. As described above, when the size of the second color component target block corresponds to a predetermined size, the reference samples of the first or second color component block can be adaptively used. The predetermined size is not limited to 64x64 and may be a size signaled via a bitstream or derived based on the coding parameters of the current block and neighboring blocks.

[0198] Alternatively, if the shape of the second-color component target block is a rectangle, the adjacent reference sample in the longer horizontal or vertical direction can be used. For example, if the shape of the target block is 32x8, the upper reference sample of the first or second-color component block can be used.

[0199] Or, if the shape of the second color component target block is rectangular, a square block of reference samples can be used, for example, if the shape of the target block is 32x8, reference samples located in the vicinity of a 32x32 block can be used.

[0200] The prediction parameters may be derived using the reference samples of the reconstructed first color component block and the reference samples of the second color component block. The prediction parameters may be derived based on at least one of correlation, variation, average value, and distribution between the reference samples of the color components. At least one of the methods such as LS (Least Square) and LMS (Least Mean Square) may be used.

[0201] When the prediction parameters are derived using the LMS method, the prediction parameters may be at least one of a, b, alpha, and beta. The prediction parameters that minimize the error between the first color component reference sample and the second color component reference sample can be derived using the following Equation 11.

number

[0202] In the above formula 11, p2 n denotes the second color component reference sample, and p1' n may denote the reference sample of the reconstructed first color component, N may denote the horizontal or vertical number of reference samples used, and a and b may denote prediction parameters.

[0203] In this case, the relevance between the reference samples can be calculated using the following Equation 12.

number

[0204] In Equation 12, BitDepth may represent a bit depth. p1' may represent a reconstructed first color component sample, and p2 may represent a second color component sample. FIG 13 is a diagram illustrating the first color component sample and the second color component sample.

[0205] When deriving prediction parameters, if there are regions where no reference samples exist, the prediction parameters can be derived using only the reference samples that exist.

[0206] One or more of the prediction parameters may be derived. For example, a first prediction parameter may be derived from a reference sample whose value used to derive the prediction parameters satisfies a particular condition. Also, a second prediction parameter may be derived from a reference sample whose value does not satisfy the particular condition. The particular condition may be met when the value of the reference sample is less than a statistical value (e.g., an average value) of the reference sample.

[0207] According to another embodiment of the present invention, the prediction parameters are not derived using reference samples, and default parameters are used. The default parameters may be predefined in the encoder and decoder. For example, the prediction parameters a and b may be 1 and 0, respectively.

[0208] Alternatively, if prediction parameters are derived, the derived prediction parameters can be encoded / decoded.

[0209] When performing inter-color component prediction between Y, Cb, and Cr, prediction parameters for predicting Cb and Cr can be derived from Y. Alternatively, prediction parameters for predicting Cr can be derived from Cb. Alternatively, prediction parameters for predicting Cr are not derived, and prediction parameters derived from Y can be used to predict Cb.

[0210] The inter-color component prediction execution step of step S830 will now be described. As described above, once the prediction parameters are derived, inter-color component intra prediction can be performed using at least one of the derived prediction parameters.

[0211] For example, prediction for the second color component target block can be performed by applying the derived prediction parameters to the reconstructed signal of the first color component using Equation 13 below.

number

[0212] In Equation 13, p2[x,y] may be a predicted block of the second-color component target block, and p1'[x,y] may be a first-color component block or a reconstructed first-color component block.

[0213] Alternatively, prediction for the second color component target block can be performed by applying the derived prediction parameters to the reconstructed residual signal of the first color component using Equation 14 below.

number

[0214] In Equation 14, p1'_residual may represent a residual signal of the first color component, and p2_pred may represent a predicted signal obtained by performing intra prediction on the target block of the second color component.

[0215] When the derived prediction parameters are one or more, the one or more prediction parameters may be applied to the reconstructed sample of the first color component. For example, when the reconstructed sample of the first color component satisfies a specific condition, a first prediction parameter derived from a reference sample satisfying the specific condition may be applied to perform inter-color component intra prediction. Also, when the reconstructed sample of the first color component does not satisfy the specific condition, a second prediction parameter derived from a reference sample not satisfying the specific condition may be applied to perform inter-color component intra prediction. The specific condition may correspond to a case where a value of a reference sample is smaller than a statistical value (e.g., an average value) of the reference sample of the first color component.

[0216] The inter-color component prediction method may also be applied to an inter-prediction mode. For example, when performing inter-prediction on a current block, inter-prediction may be performed on a first color component and inter-color component prediction may be performed on a second color component. For example, the first color component may be a luminance component and the second color component may be a chrominance component. In addition, the inter-color component prediction may be adaptively performed according to an encoding parameter of the first color component. For example, it may be determined whether or not to perform the inter-color component prediction based on CBF information of the first color component. The CBF information may be information indicating the presence or absence of a residual signal. That is, when the CBF of the first color component is 1, inter-color component prediction may be performed on the second color component. When the CBF of the first color component is 0, the inter-color component prediction may be performed without performing inter-color component prediction on the second color component. Alternatively, a flag indicating whether or not to perform the inter-color component prediction may be signaled.

[0217] These embodiments may be implemented in a similar manner in the encoder and decoder. The order of application of these embodiments may be different between the encoder and the decoder, or the order of application of the embodiments may be the same between the encoder and the decoder.

[0218] The above embodiment can be performed for each of the luminance and color difference signals, and the above embodiment can be performed for the luminance and color difference signals in a similar manner.

[0219] The shape of the blocks to which the above-described embodiments of the present invention are applied may be square or non-square.

[0220] The above-described embodiments of the present invention can be applied according to the size of at least one of the coding block, the prediction block, the transformation block, the block, the current block, the coding unit, the prediction unit, the transformation unit, the unit, and the current unit. The size here may be defined as a minimum size and / or a maximum size for which these embodiments are applied, or may be defined as a fixed size for which the embodiments are applied. In addition, the first embodiment can be applied to a first size, and the second embodiment can be applied to a second size. That is, these embodiments can be applied in combination according to the size. In addition, the above-described embodiments of the present invention can be applied only when the size of the block is equal to or larger than the minimum size and equal to or smaller than the maximum size. That is, these embodiments can be applied only when the size of the block is within a certain range.

[0221] For example, the embodiment is applicable only if the size of the current block is 8x8 or more. For example, the embodiment is applicable only if the size of the current block is 4x4. For example, the embodiment is applicable only if the size of the current block is 16x16 or less. For example, the embodiment is applicable only if the size of the current block is 16x16 or more and 64x64 or less.

[0222] The above-described embodiments of the present invention may be applied according to a temporal layer. A separate identifier may be signaled to identify a temporal layer to which the embodiments are applicable, and the embodiments may be applied to a temporal layer identified by the corresponding identifier. The identifier may be defined as a lowest layer and / or a highest layer to which the embodiments are applicable, or may be defined as indicating a specific layer to which the embodiments are applied. A fixed temporal layer to which the embodiments are applied may also be defined.

[0223] For example, the above embodiment is applicable only when the temporal hierarchy of the current image is the lowest hierarchy, for example, the above embodiment is applicable only when the temporal hierarchy identifier of the current image is equal to or greater than 1, for example, the above embodiment is applicable only when the temporal hierarchy of the current image is the highest hierarchy.

[0224] The slice types to which the above-described embodiments of the present invention are applied are defined, and the embodiments of the present invention can be applied according to the slice types.

[0225] In the above-mentioned embodiments, the methods are described based on the flowcharts in a series of steps or units, but the present invention is not limited to the order of these steps, and a step may occur in a different order or simultaneously with a different step than that described above. Also, a person skilled in the art will understand that the steps shown in the flowcharts are not exclusive, and other steps may be included, or one or more steps of the flowcharts may be deleted without affecting the scope of the present invention.

[0226] The above-described embodiments include examples of various aspects. It is not possible to describe all possible combinations for illustrating the various aspects, but a person having ordinary skill in the art will recognize that other combinations are possible. Therefore, it can be said that the present invention includes all various alterations, modifications, and variations that fall within the scope of the following claims.

[0227] The above-described embodiments of the present invention may be realized in the form of program instructions that can be executed by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include, alone or in combination, program instructions, data files, data structures, and the like. The program instructions recorded on the computer-readable recording medium may be those specially designed and constructed for the present invention, or those known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specially configured to store and execute program instructions, such as ROMs, RAMs, and flash memories. Examples of program instructions include not only machine language code produced by a compiler, but also high-level language code that can be executed by a computer using an interpreter, for example. The hardware devices may be configured to operate as one or more software modules to perform the processes of the present invention, or vice versa.

[0228] Although the present invention has been described above by using specific details such as specific components, limited embodiments, and drawings, these are merely provided to facilitate a more general understanding of the present invention, and the present invention is not limited to these embodiments. A person having ordinary knowledge in the technical field to which the present invention pertains can make various modifications and variations from such descriptions.

[0229] Therefore, the concept of the present invention should not be limited to the above-described embodiments, and all modifications equivalent to or equivalent to the scope of the claims, as well as the claims set forth below, fall within the scope of the concept of the present invention. [Industrial Applicability]

[0230] The present invention can be used to encode / decode images.

Claims

1. determining that inter-color component intra prediction is applied to the current chrominance block; deriving luminance neighboring reference samples of a luminance block related to the current chrominance block; deriving downsampled luminance neighboring reference samples based on the luminance neighboring reference samples; deriving chrominance neighboring reference samples for the current chrominance block; deriving prediction parameters based on the downsampled luma neighboring reference samples and the chroma neighboring reference samples, the prediction parameters including a scaling factor a and an offset b related to a correlation between the luma block and the current chroma block; generating a predicted block of the current chrominance block based on the prediction parameters; Including, the downsampled luminance neighboring reference samples include at least one of a left downsampled luminance neighboring reference sample and an upper downsampled luminance neighboring reference sample; At least one of the one or more left luminance-neighboring reference sample lines and the one or more upper luminance-neighboring reference sample lines is selected based on whether a boundary of the luma block overlaps with a boundary of a coding tree unit (CTU). Image decoding method.

2. based on an upper boundary of the luminance block overlapping with an upper boundary of the CTU and a left boundary of the luminance block overlapping with a left boundary of the CTU, the number of the one or more upper luminance-neighboring reference sample lines is less than the number of the one or more left luminance-neighboring reference sample lines; The image decoding method according to claim 1 .

3. According to the upper boundary of the luminance block overlapping with the upper boundary of the CTU, the upper luminance-neighboring reference sample is located on one upper luminance-neighboring reference sample line; based on an upper boundary of the luma block overlapping with an upper boundary of the CTU, the left downsampled luma neighboring reference sample is derived by using six luma neighboring reference samples, and the upper downsampled luma neighboring reference sample is derived by using three luma neighboring reference samples; Based on the upper boundary of the luma block not overlapping with the upper boundary of the CTU, the left downsampled luma-neighboring reference sample is derived by using six luma-neighboring reference samples, and the upper downsampled luma-neighboring reference sample is derived by using six luma-neighboring reference samples. The image decoding method according to claim 1 .

4. the luma-neighboring reference samples for deriving the downsampled luma-neighboring reference samples are located in one of: (i) a left region and an upper region of the luma block; (ii) an upper region and a top-right region of the luma block; and (iii) a left region and a lower-left region of the luma block; the location of the luminance neighboring reference sample is determined based on an intra prediction mode of the corresponding block. The image decoding method according to claim 1 .

5. Based on the fact that the intra prediction mode is a non-directional prediction mode, the luma neighboring reference samples for deriving the downsampled luma neighboring reference samples are (i) located within a left region and an upper region of the luma block; The image decoding method according to claim 4.

6. Based on the fact that the intra prediction mode is a directional prediction mode using an upper reference sample and an upper right reference sample, the luma neighboring reference samples for deriving the downsampled luma neighboring reference sample are (ii) located within an upper region and an upper right region of the luma block; Based on the fact that the intra prediction mode is a directional prediction mode using a left reference sample and a lower-left reference sample, the luma neighboring reference samples for deriving the downsampled luma neighboring reference sample are (iii) located in a left region and a lower-left region of the luma block. The image decoding method according to claim 4.

7. a selected chrominance neighboring reference sample is derived from the chrominance neighboring reference sample; the prediction parameters are derived by using the selected chrominance neighboring reference samples; the number of the selected chrominance neighboring reference samples is smaller than the width or height of the current chrominance block; The image decoding method according to claim 1 .

8. the number of the selected chrominance neighboring reference samples is less than or equal to half the width or height of the current chrominance block; The image decoding method according to claim 7.

9. determining that inter-color component intra prediction is applied to the current chrominance block; deriving luminance neighboring reference samples of a luminance block related to the current chrominance block; deriving downsampled luminance neighboring reference samples based on the luminance neighboring reference samples; deriving chrominance neighboring reference samples for the current chrominance block; deriving prediction parameters based on the downsampled luma neighboring reference samples and the chroma neighboring reference samples, the prediction parameters including a scaling factor a and an offset b related to a correlation between the luma block and the current chroma block; generating a predicted block of the current chrominance block based on the prediction parameters; encoding image information including information related to an intra-prediction mode; Including, the downsampled luminance neighboring reference samples include at least one of a left downsampled luminance neighboring reference sample and an upper downsampled luminance neighboring reference sample; At least one of the one or more left luminance-neighboring reference sample lines and the one or more upper luminance-neighboring reference sample lines is selected based on whether a boundary of the luma block overlaps with a boundary of a coding tree unit (CTU). Image encoding method.

10. A method for transmitting image data, comprising the steps of: obtaining a bitstream of encoded image information, the encoded image information being generated by an image encoding method, the image encoding method comprising: determining that inter-color component intra prediction is applied to a current chrominance block; deriving luma neighboring reference samples of a luma block related to the current chrominance block; deriving downsampled luma neighboring reference samples based on the luma neighboring reference samples; deriving chroma neighboring reference samples for the current chrominance block; deriving prediction parameters based on the downsampled luma neighboring reference samples and the chrominance neighboring reference samples, the prediction parameters including a scaling factor a and an offset b related to a correlation between the luma block and the current chrominance block; generating a predicted block of the current chrominance block based on the prediction parameters; and encoding the image information including information related to an intra prediction mode; transmitting the image data including the bitstream; Including, the downsampled luminance neighboring reference samples include at least one of a left downsampled luminance neighboring reference sample and an upper downsampled luminance neighboring reference sample; At least one of the one or more left luminance-neighboring reference sample lines and the one or more upper luminance-neighboring reference sample lines is selected based on whether a boundary of the luma block overlaps with a boundary of a coding tree unit (CTU). Transmission method.

Citation Information

Patent Citations

  • Image processing device and image processing method

    JP2013034163A

  • Image processing apparatus and image processing method

    JP2013141187A

  • Entropy decoding method and decoding device utilizing the same

    JP2014515894A

  • Image decoding method and image encoding method

    JP2022078048A

  • Image decoding method, image encoding method, and recording medium

    JP7356347B2