Image decoding method, image encoding method, and transmission method
The image decoding and encoding methods improve compression efficiency by predicting second color component blocks from first color component blocks, addressing the challenge of high data volumes in high-resolution images, thereby reducing transmission and storage costs.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- LX SEMICON CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-04-10
AI Technical Summary
The increasing demand for high-resolution and high-quality images leads to higher data amounts, resulting in increased transmission and storage costs, necessitating improved image encoding/decoding technologies for efficient compression.
An image decoding method that predicts a second color component block using a first color component block, involving steps such as deriving prediction parameters, determining block sizes, and reconstructing blocks through downsampling or upsampling based on block boundaries and quantization parameters, along with an image encoding method that utilizes in-picture prediction.
Enhances compression efficiency in image decoding and encoding processes, reducing data volume and associated costs.
Smart Images

Figure 2026063309000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image decoding method, an image encoding method, and a transmission method. Specifically, the present invention relates to an image decoding method using intra-prediction, an image encoding method, and a transmission method for a bitstream generated by the image encoding method of the present invention.
Background Art
[0002] Recently, the demand for high-resolution and high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, has been increasing in various application fields. As the image data becomes higher in resolution and quality, the data amount relatively increases compared to conventional image data. Therefore, when transmitting image data using media such as conventional wired / wireless broadband lines or storing it using conventional storage media, the transmission cost and storage cost increase. In order to solve the problems arising from such high-resolution and high-quality image data, a high-efficiency image encoding / decoding technology for images with higher resolution and image quality is required.
[0003] As image compression technologies, there are various technologies such as an inter-prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, an intra-prediction technology that predicts pixel values included in the current picture using pixel information within the current picture, a transformation and quantization technology for compressing the energy of the residual signal, and an entropy encoding technology that assigns short codes to values with high occurrence frequencies and long codes to values with low occurrence frequencies. Using such image compression technologies, image data can be effectively compressed for transmission or storage.
Summary of the Invention
Problems to be Solved by the Invention
[0004] The present invention aims to provide an image decoding method and an image coding method with improved compression efficiency.
[0005] Furthermore, the present invention aims to provide an image decoding method and an image coding method using in-screen prediction with improved compression efficiency.
[0006] Furthermore, the present invention aims to provide a recording medium that stores a bitstream generated by the image encoding method of the present invention. [Means for solving the problem]
[0007] The present invention provides an image decoding method for predicting a second color component block using a first color component block, which includes the steps of: deriving prediction parameters using the first color component block; and 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 color difference block.
[0009] The image decoding method according to the present invention may further include a step of determining whether or not 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 the size of the first color component block and the size of the second color component block.
[0011] In the image decoding method according to the present invention, if 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 the step of downsampling the first color component block.
[0012] In the image decoding method according to the present invention, if 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 the 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 the boundary of the first color component block or the boundary of the second color component block corresponds to a predetermined image region boundary.
[0014] In the image decoding method according to the present invention, the predetermined image region may be at least one of a picture, slice, tile, CTU, and CU.
[0015] In the image decoding method according to the present invention, if the boundary of the first color component block or the boundary of the second color component block corresponds to the boundary of a predetermined image region, the number of upper reference sample lines and the number of left reference sample lines used to reconstruct the first color component block may be different from each other.
[0016] In the image decoding method according to the present invention, the reference sample used for reconstructing the first color component block can be determined based on the in-screen prediction mode of the first color component block.
[0017] In the image decoding method according to the present invention, the reference sample used for reconstructing the first color component block can be determined based on the quantization parameters of the neighboring blocks of the first color component block.
[0018] In the image decoding method according to the present invention, if the first color component block is square and the second color component block is rectangular, the reference sample used in the configuration of 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 parameter may be performed using at least one of the reference samples of the first color component block and the reference samples of the second color component block.
[0020] In the image decoding method according to the present invention, the reference sample used for deriving the prediction parameter can be determined based on the intra prediction mode of the first color component block.
[0021] In the image decoding method according to the present invention, the reference sample used for deriving the prediction parameter can be determined based on the size or 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 parameter may be performed based on at least one of the relevance, variation amount, average value, and distribution between the reference sample of the first color component block and the reference sample of the second color component block.
[0023] In an image decoding apparatus including an intra prediction unit that predicts a second color component block using a first color component block according to the present invention, the intra prediction unit can derive a prediction parameter using the first color component block and predict the second color component block using the derived prediction parameter.
[0024] An image encoding method for predicting a second color component block using a first color component block according to the present invention may include a step of deriving a prediction parameter using the first color component block and a step of predicting the second color component block using the derived prediction parameter.
[0025] In an image encoding apparatus including an in-picture prediction unit that predicts a second color component block using a first color component block according to the present invention, the in-picture 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 can store a bitstream generated by the image encoding method according to the present invention.
Advantages 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] Also, according to the present invention, it is possible to provide an image decoding method and an image encoding method using in-picture prediction with improved compression efficiency.
[0029] Also, according to the present invention, it is possible to provide a recording medium storing the bitstream generated by the image decoding method of the present invention. stores.
Brief Description of the Drawings
[0030] [Figure 1] It is a block diagram showing a configuration according to an embodiment of an encoding apparatus to which the present invention is applied. [Figure 2] It is a block diagram showing a configuration according to an embodiment of a decoding apparatus to which the present invention is applied. [Figure 3] It is a schematic diagram showing a division structure of an image when encoding and decoding an image. [Figure 4] It is a diagram for explaining an embodiment of in-picture prediction processing. [Figure 5] It is a diagram for explaining in-picture prediction according to the present invention. [Figure 6] It is an exemplary diagram for explaining the relationship between a luminance block and a chrominance block. [Figure 7] It is a diagram for explaining DC prediction according to the size and / or shape of a current block. [Figure 8] This diagram illustrates the in-screen prediction execution process between color components. [Figure 9] This is an illustrative diagram to explain the reconstruction of color component blocks. [Figure 10] This figure illustrates an embodiment of reconstruction using multiple upper and / or left-side reference sample lines. [Figure 11] This is an illustrative diagram illustrating the reference samples used for reconstruction depending on the in-screen prediction mode or coding parameters of the corresponding block. [Figure 12] This is an illustrative diagram illustrating the reconstructed first color component corresponding block when the second color component prediction target block is 4x4. [Figure 13] This diagram illustrates the sample of the first color component and the sample of the second color component. [Modes for carrying out the invention]
[0031] The present invention can be modified in various ways and may have various embodiments; therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this should not be understood as limiting the present invention to specific embodiments, but rather as including all modifications, equivalents, or substitutes that fall within the spirit and technical scope of the present invention. Similar reference numerals in the drawings refer to the same or similar functions in various aspects. The shape and size of elements in the drawings may be exaggerated for clearer explanation. Detailed descriptions of the exemplary embodiments described below refer to the accompanying drawings that illustrate specific embodiments. These embodiments are described in sufficient detail to enable those skilled in the art to carry out the embodiments. It should be understood that the various embodiments are different from each other but do not necessarily have to be mutually exclusive. For example, certain shapes, structures, and characteristics described herein can be realized in various embodiments in relation to one embodiment without departing from the spirit and scope of the present invention. It should also be understood that the position or arrangement of individual components within each disclosed embodiment can be changed without departing from the spirit and scope of the embodiment. Therefore, the detailed descriptions set forth below should not be taken as restrictive, and the scope of exemplary embodiments is limited only to all equivalents of those claims and the appended claims, if appropriately described.
[0032] In this invention, terms such as "first," "second," etc., can be used to describe various components, but these components should not be limited by the above terms. These terms are used solely for the purpose of distinguishing one component from another. For example, as long as it does not fall outside the scope of the rights of this invention, the first component may be named the second component, and similarly, the second component may be named the first component. The term "and / or" includes a combination of multiple related descriptions or any of multiple related descriptions.
[0033] When one component of the present invention is described as being "connected" or "linked" to another component, it should be understood that it may be directly connected or linked to the other component, but there may also be another component interposed between them. Conversely, when one component is described as being "directly connected" or "directly linked" to another component, it should be understood that there is no other component interposed between them.
[0034] The components shown in the embodiments of the present invention are illustrated independently to illustrate distinct characteristic functions, and this does not mean that each component consists of separate hardware or a single software component. That is, for the sake of explanation, each component is listed and included within each component, and at least two of the components from each component may be combined to form a single component, or a single component may be divided into multiple components to perform functions. Such integrated and separated embodiments of each component are also included within 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 this invention are used solely to describe specific embodiments and do not limit the invention. A singular expression includes plural expressions unless the context clearly indicates otherwise. In this invention, terms such as “includes” or “having” specify the presence of features, figures, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to pre-exist or exclude the existence or possibility of adding one or more other features, figures, steps, operations, components, parts, or combinations thereof. In other words, in this invention, the description of a particular configuration as “includes” does not exclude configurations other than that configuration, but rather means that additional configurations may be included within the scope of the implementation of this invention or the technical idea of this invention.
[0036] Some components of the present invention may not be essential components that perform an essential function in the present invention, but rather optional components that merely improve performance. The present invention can be realized by including only components that are essential to realizing the essence of the present invention, excluding components used solely for performance improvement, and a structure including only essential components, excluding optional components used solely for performance improvement, is also within the scope of the rights of the present invention.
[0037] Embodiments of the present invention will be described in detail below with reference to the drawings. In describing the embodiments of this specification, if it is determined that a specific description of a related known configuration or function may obscure the gist of this specification, such detailed description will be omitted, the same reference numerals will be used for the same components in the drawings, and redundant descriptions of the same components will be omitted.
[0038] Furthermore, in the following, "image" may refer to a single picture that makes up a video, or it may refer to the video itself. For example, "encoding and / or decoding of an image" can mean "encoding and / or decoding of a video," or it can mean "encoding and / or decoding of one of the images that make up a video." Here, "picture" can have the same meaning as "image."
[0039] Glossary Encoder: This refers to a device that performs encoding. Decoder: A device that performs decoding. A block is the MxN sequence of a sample.
[0040] Here, M and N represent positive integer values, and a block can generally represent a two-dimensional sample array. A block can also represent a unit. The current block can represent the target block to be encoded during encoding, and the target block to be decoded during decoding. Furthermore, the current block can be at least one of the encoded block, prediction block, residual block, and transformation block.
[0041] Sample: The basic unit that makes up a block. Bit depth (B d ) Depending on the situation, from 0 to 2 Bd It can be expressed as a value up to -1. In this invention, "sample" can be used interchangeably with "pixel".
[0042] A unit refers to a unit of image encoding and decoding. In image encoding and decoding, a unit can be a region into which a single image has been divided. Furthermore, when an image is divided into subdivided units for encoding or decoding, a unit can refer to one of these subdivided units. In image encoding and decoding, predefined processes can be performed on each unit. A single unit can be further divided into smaller subunits. Depending on the function, a unit can 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, and so on. Furthermore, a unit can mean that it includes a luminance (Luma) component block, a corresponding chroma component block, and syntactic elements for each block, in order to distinguish it from a block. Units can have various sizes and shapes, and in particular, the shape of a unit can include not only rectangles but also geometric shapes that can be represented in two dimensions, such as squares, trapezoids, triangles, and pentagons. In addition, unit information can include at least one of the following: the type of unit that points to an encoded unit, a prediction unit, a residual unit, a transform unit, etc.; the size of the unit; the depth of the unit; and the encoding and decoding order of the unit.
[0043] A coding tree unit (CUT) consists of two chrominance component (Cb, Cr) coding tree blocks associated with one luminance component (Y) coding tree block. It can also refer to the block containing the syntactic elements associated with each block. Each coding tree unit can be partitioned using one or more partitioning schemes, such as a quad tree or binary tree, to form subunits such as coding units, prediction units, and transformation units. It can be used as a term to indicate a pixel block, which is the processing unit in image decoding / coding, such as the partitioning of an input image.
[0044] Coding Tree Block: This term can be used to refer to any of the following: Y-coded tree block, Cb-coded tree block, and Cr-coded tree block.
[0045] A neighboring block refers to a block adjacent to the current block. A neighboring block can be a block whose boundary abuts the current block, or a block that is within a predetermined distance from the current block. A neighboring block can also refer to a block adjacent to a vertex of the current block. Here, a block adjacent to a vertex of the current block can be a block that is adjacent to a block adjacent to the current block horizontally, vertically, or horizontally adjacent to a block adjacent to a block that is vertically adjacent to the current block. A neighboring block can also refer to a restored neighboring block.
[0046] A reconstructed neighbor block refers to a neighbor block that has already been encoded or decoded spatially / temporally in the vicinity of the current block. In this case, a reconstructed neighbor block can also mean a reconstructed neighbor unit. A reconstructed spatial neighbor block may be a block in the current picture that has already been reconstructed through encoding and / or decoding. A reconstructed temporal neighbor block may be a reconstructed block in the reference picture at the same position as the current block in the current picture, or a neighboring block thereof.
[0047] Unit depth refers to the degree to which a unit is divided. In a tree structure, the root node has the shallowest depth, and the leaf nodes have the deepest depth. Furthermore, when a unit is represented in a tree structure, the level at which the unit exists can be considered the unit depth.
[0048] Bitstream: Refers to a sequence of bits containing encoded image information.
[0049] Parameter Set: This corresponds to the header information within the structure of a bitstream. A parameter set may contain at least one of the following: video parameter set, sequence parameter set, picture parameter set, and adaptation parameter set. A parameter set may also contain slice header and tile header information.
[0050] Parsing: This can mean determining the values of syntax elements by entropy decoding a bitstream, or it can refer to the entropy decoding process itself.
[0051] A symbol can represent at least one of the following: a syntactic element of the unit to be encoded / decoded, a coding parameter, or a transform coefficient value. A symbol can also represent the target of entropy coding or the result of entropy decoding.
[0052] A prediction unit refers to the basic unit used when performing predictions, such as inter-screen prediction, intra-screen prediction, inter-screen compensation, intra-screen compensation, and motion compensation. A single prediction unit can also be divided into multiple smaller partitions or sub-prediction units.
[0053] Prediction Unit Partition: This can refer to a shape in which the prediction unit is divided.
[0054] A Transform Unit (CUnit) is the fundamental unit used when performing residual signal coding / decoding, such as transform, inverse transform, quantization, dequantization, and transform coefficient coding / decoding. A single transform unit can be divided into multiple smaller transform units.
[0055] Figure 1 is a block diagram showing a configuration according to one 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. The video may contain one or more images. The encoding device 100 can sequentially encode one or more images.
[0056] Referring to Figure 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 transformer 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transformer 170, an adder 175, a filter unit 180, and a reference picture buffer 190.
[0057] The encoding device 100 can encode an input image in intra-mode and / or inter-mode. The encoding device 100 can also generate a bitstream through encoding of the input image and output the generated bitstream. The generated bitstream can be stored on a computer-readable recording medium or streamed via a wired / wireless transmission medium. When intra-mode is used as the prediction mode, switch 115 can be switched to intra; when inter-mode is used as the prediction mode, switch 115 can be switched to inter. Here, intra-mode can mean in-screen prediction mode, and inter-mode can mean inter-screen prediction mode. The encoding device 100 can generate prediction blocks for input blocks of the input image. Furthermore, after the prediction blocks are generated, the encoding device 100 can encode the difference (residual) between the input blocks and the prediction blocks. The input image is sometimes referred to as the current image, which is currently being encoded. The input block is sometimes referred to as the current block or the block being encoded, which is currently being encoded.
[0058] When the prediction mode is intra mode, the intra prediction unit 120 can also use the pixel values of blocks that have already been encoded / decoded in the vicinity of the current block as reference pixels. The intra prediction unit 120 can perform spatial prediction using the reference pixels and generate prediction samples for the input block through spatial prediction. Here, intra prediction can mean in-screen prediction.
[0059] When the prediction mode is intermode, the motion prediction unit 111 can search the reference image for the region that best matches the input block during the motion prediction process, and derive a motion vector using the searched region. The reference image can be stored in the reference picture buffer 190.
[0060] The motion compensation unit 112 can generate prediction blocks by performing motion compensation using motion vectors. Here, inter-prediction can mean inter-screen prediction or motion compensation.
[0061] The subtractor 125 can generate a residual block using the difference between the input block and the predicted block. The residual block is also called the residual signal. The residual signal can represent the difference between the original signal and the predicted signal. The residual signal may also be a signal generated by transforming, quantizing, or both transforming the difference between the original signal and the predicted signal. The residual block may be a residual signal on a block-by-block basis.
[0062] The transformation unit 130 can perform a transformation on the remaining blocks to generate a transformation coefficient and output the transformation coefficient. Here, the transformation coefficient may be a coefficient value generated by performing a transformation on the remaining blocks. When the transformation skip mode is applied, the transformation unit 130 can also omit the transformation on the remaining blocks.
[0063] By applying quantization to the conversion coefficients or residual signal, a quantized level can be generated. In the following embodiments, the quantized level may also be referred to as a conversion coefficient.
[0064] The quantization unit 140 can generate a quantized level by quantizing the conversion coefficients or residual signal based on quantization parameters, and can output the quantized level. In this case, the quantization unit 140 can quantize the conversion coefficients using a quantization matrix.
[0065] The entropy coding unit 150 can generate a bitstream and output it by performing entropy coding using a probability distribution on values calculated by the quantization unit 140 or coding parameter values calculated in the coding process. The entropy coding unit 150 can perform entropy coding on information about image pixels and information for decoding the image. For example, information for decoding the image may include syntax elements.
[0066] When entropy coding is applied, symbols with a high probability of occurrence are assigned fewer bits, and symbols with a low probability of occurrence are assigned more bits, thereby reducing the size of the bit sequence for the symbols 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 (VLC) table. Alternatively, the entropy coding unit 150 can derive a binarization method for the target symbols and a probability model for the target symbols / bins, 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-shaped coefficients into one-dimensional vector forms via a transform coefficient scanning method in order to encode the transformation coefficient level.
[0068] Coding parameters can include not only information encoded by the encoder and signaled to the decoder (such as flags and indices), like syntactic elements, but also information derived during the encoding or decoding process, and can represent information necessary when encoding or decoding an image. For example, block size, block depth, block partitioning information, unit size, unit depth, unit partitioning information, quadtree partitioning flag, binary tree partitioning flag, binary tree partitioning direction, in-screen prediction mode, in-screen prediction direction, reference sample filtering method, prediction block boundary filtering method, filter tap, filter coefficient, inter-screen prediction mode, motion information, motion vector, reference image index, inter-screen prediction direction, inter-screen 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, interpolation filter type, motion vector size, accuracy of motion vector representation, transformation type, transformation size, whether additional (quadratic) transformation is used information, presence or absence of residual signal information, coded block pattern, coded block flag. The encoding parameters may include at least one value or combination of the following: Flag (CBF), quantization parameters, quantization matrix, in-loop filter information, in-loop filter application information, in-loop filter coefficients, binarization / inverse binarization method, context model, context bin, bypass bin, transformation coefficients, transformation coefficient level, transformation 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 for the luminance signal or chrominance signal.
[0069] Here, signaling a flag or index can mean, in an encoder, entropy encoding the flag or index and including it in the bitstream, and in a decoder, entropy decoding the flag or index from the bitstream.
[0070] When the encoding device 100 performs encoding using interpretation, the encoded current image can be used as a reference image for other images to be processed later. Therefore, the encoding device 100 can further restore or decode the encoded current image and store the restored or decoded image as a reference image.
[0071] The quantized levels can be dequantized in the dequantization unit 160 and inverse transformed in the inverse transform unit 170. The dequantized and / or inversely transformed coefficients can be combined with the predicted block via the adder 175. By combining the dequantized and inversely transformed coefficients with the predicted block, a reconstructed block can be generated. Here, the dequantized and / or inversely transformed coefficients mean coefficients that have undergone at least one of dequantization and / or inverse transformation, and can mean the reconstructed residual block.
[0072] The reconstructed block can pass through the filter section 180. The filter section 180 can apply at least one of the following to the reconstructed block or the reconstructed image: a deblocking filter, a sample adaptive offset (SAO), or an adaptive loop filter (ALF). The filter section 180 is also called an in-loop filter.
[0073] A deblocking filter can remove block distortion that occurs at the boundaries between blocks. To determine whether or not to apply a deblocking filter, it is possible to determine whether or not to apply a deblocking filter to the block based on the pixels contained in some of the columns or rows within the block. When applying a deblocking filter to a block, different filters can be applied depending on the required deblocking filtering strength.
[0074] Sample-adaptive offsetting can be used to compensate for encoding errors by adding an appropriate offset value to pixel values. Sample-adaptive offsetting can correct the offset from the original image on a pixel-by-pixel basis for deblocked images. One method is to divide the pixels contained in the image into a certain number of regions, determine the regions to be offsetted, and apply the offset to those regions, or to apply the offset while considering the edge information of each pixel.
[0075] Adaptive loop filters can perform filtering based on a comparison between the reconstructed image and the original image. After dividing the pixels in the image into predetermined groups, the filter to be applied to each group can be determined, allowing for differential filtering of each group. Information related to whether or not to apply an adaptive loop filter can be signaled per coding unit (CU), and the shape and filter coefficients of the applied adaptive loop filter may differ depending on the block.
[0076] The restored block or image that has passed through the filter unit 180 can be stored in the reference picture buffer 190. Figure 2 is a block diagram showing a configuration according to one 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 Figure 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 can receive the bitstream output from the encoding device 100. The decoding device 200 can receive the bitstream stored on a computer-readable recording medium or the bitstream streamed via a wired / wireless transmission medium. The decoding device 200 can perform decoding on the bitstream in intra-mode or inter-mode. The decoding device 200 can also generate a restored image or a decoded image through decoding and can output a restored image or a decoded image.
[0079] If the prediction mode used for decoding is intra-mode, the switch can be switched to intra-mode. If the prediction mode used for decoding is inter-mode, the switch can be switched to inter-mode.
[0080] The decoding device 200 can decode the input bitstream, obtain the reconstructed residual block, and generate a predicted block. Once the reconstructed residual block and the predicted block are obtained, the decoding device 200 can generate the reconstructed block to be decoded by adding the reconstructed residual block and the predicted block. The block to be decoded is sometimes referred to as the current block.
[0081] The entropy decoding unit 210 can generate symbols by performing entropy decoding based on a probability distribution for the bitstream. The generated symbols may include symbols in quantized level form. Here, the entropy decoding method may be the inverse of the entropy coding method described above.
[0082] The entropy decoding unit 210 can convert one-dimensional vector-shaped coefficients into two-dimensional block-shaped coefficients by a conversion coefficient scanning method in order to decode the conversion coefficient level.
[0083] The quantized levels can be dequantized by the inverse quantization unit 220 and inversely transformed by the inverse transformation unit 230. The quantized levels are the result of inverse quantization or inverse transformation and can be generated as restored residual blocks. At this time, the inverse quantization unit 220 can apply a quantization matrix to the quantized levels.
[0084] When intra mode is used, the intra prediction unit 240 can generate predicted blocks by performing spatial prediction using the pixel values of already decoded blocks near the block to be decoded.
[0085] When intermode is used, the motion compensation unit 250 can generate a prediction block by performing motion compensation using the motion vector and the reference image stored in the reference picture buffer 270.
[0086] The adder 255 can generate a restored block by adding the restored residual block and the predicted block. The filter unit 260 can apply at least one of the following to the restored block or restored image: a deblocking filter, a sample-adaptive offset, and an adaptive loop filter. The filter unit 260 can output the restored image. The restored block or restored image is stored in the reference picture buffer 270 and can be used for interpretation.
[0087] Figure 3 is a schematic diagram showing the image partitioning structure when an image is encoded and decoded. Figure 3 schematically shows an embodiment in which one unit is divided into multiple subunits.
[0088] To efficiently divide images, coding units (CUs) can be used in encoding and decoding. Coding units can be used as the basic unit for image encoding / decoding. Furthermore, coding units can be used as the unit that distinguishes between in-frame and inter-frame modes during image encoding / decoding. Coding units can be the basic unit used for predictive, transformive, quantized, inverse transformive, inverse quantized, or encoding / decoding of transform coefficients.
[0089] Referring to Figure 3, image 300 is sequentially divided into Largest Coding Unit (LCU) units, and the division structure is determined at the LCU level. Here, LCU can be used interchangeably with Coding Tree Unit (CTU). The division of a unit can mean the division of the block corresponding to the unit. Block division information may include information about the depth of the unit. Depth information can indicate the number and / or extent to which the unit is divided. A single unit can be hierarchically divided with depth information based on a tree structure. Each divided subunit can have depth information. Depth information is information indicating the size of the CU and can be stored for each CU.
[0090] The partition structure can refer to the distribution of coding units (CUs) within LCU310. Such a distribution can be determined by whether or not a single CU is divided into multiple CUs (2 or more positive integers, including 2, 4, 8, 16, etc.). The width and height of the CUs generated by the partition are half the width and half the height of the original CU, respectively, or they can be smaller than the width and height of the original CU, depending on the number of divisions. A CU can be recursively partitioned into multiple CUs. Partitioning of a CU can be performed recursively up to a predetermined depth or size. For example, the depth of the LCU may be 0, and the depth of the Smallest Coding Unit (SCU) may be a predefined maximum depth. Here, as mentioned above, the LCU may be the coding unit with the largest coding unit size, and the SCU may be the coding unit with the smallest coding unit size. Partitioning starts from LCU310, and each time the width and / or height of a CU decreases due to partitioning, the depth of the CU increases by 1.
[0091] Furthermore, information regarding whether or not a CU is partitioned can be represented by the partitioning information of the CU. The partitioning information can be 1 bit of information. All CUs except SCUs can contain partitioning information. For example, if the value of the partitioning information is the first value, the CU does not need to be partitioned, and if the value of the partitioning information is the second value, the CU may be partitioned.
[0092] Referring to Figure 3, an LCU with a depth of 0 can be 64x64 pixels. 0 is the minimum depth. An SCU with a depth of 3 can be 8x8 pixels. 3 is the maximum depth. CUs of 32x32 blocks and 16x16 blocks can be represented with depths of 1 and 2, respectively.
[0093] For example, if one coding unit is divided into four coding units, the width and height of the four divided coding units can be half the size of the original coding unit. As an example, if a 32x32 coding unit is divided into four coding units, each of the four divided coding units can be 16x16 in size. When one coding unit is divided into four coding units, the coding unit can be said to have been divided in a quad-tree manner.
[0094] For example, when one coding unit is divided into two coding units, the width or height of the two divided coding units can be half the size of the original coding unit. As an example, when a 32x32 coding unit is vertically divided into two coding units, the two divided coding units can each be 16x32 in size. When one coding unit is divided into two coding units, the coding unit can be said to have been divided in a binary-tree manner. Figure 3, LCU320, is an example of an LCU to which both quad-tree and binary-tree divisions are applied.
[0095] Figure 4 is a diagram illustrating an embodiment of the in-screen prediction processing. The in-screen prediction mode can be a non-directional mode or a directional mode. A non-directional mode is a DC mode or a planar mode, and a directional mode can be a prediction mode with a specific direction or angle. The in-screen prediction mode can be represented by at least one of the mode number, mode value, number of modes, and mode angle. The number of in-screen prediction modes can be one to M, including the non-directional and directional modes.
[0096] The number of in-screen prediction modes can be fixed at N, regardless of the block size. Alternatively, the number of in-screen prediction modes may vary depending on the block size and / or the type of color component. For example, the number of in-screen prediction modes may increase as the block size increases. Or, the number of in-screen prediction modes for a luma component block may be greater than the number of in-screen prediction modes for a color difference component block.
[0097] A step may be taken to check whether the samples contained in the restored neighboring blocks, which are used to predict the current block on screen, are available as reference samples for the current block. If there are samples that are not available as reference samples for the current block, the sample values of the samples that are not available as reference samples can be replaced with values obtained by copying and / or interpolating at least one sample value from the samples contained in the restored neighboring blocks, and then used as reference samples for the current block.
[0098] A filter can be applied to at least one of the reference sample or prediction sample based on at least one of the in-screen prediction mode and the current block size during in-screen prediction.
[0099] In planar mode, when generating a prediction block for the current block, the sample value of the prediction target sample can be generated using the weighted sum of the upper and left reference samples of the current block, based on the position of the prediction target sample within the prediction block. In DC mode, the average of the upper and left reference samples of the current block can be used when generating a prediction block for the current block. In directional mode, the prediction block can be generated using the upper, left, upper right, and / or lower left reference samples of the current block. Interpolation in real units can also be performed to generate the prediction sample value.
[0100] The current block's in-screen prediction mode can be predicted from the in-screen prediction modes of nearby blocks and then entropy-coded / decoded. If the current block and nearby blocks have the same in-screen prediction mode, a predetermined flag can be used to signal that the current block and nearby blocks have the same in-screen prediction mode. Additionally, indicator information can be signaled for the in-screen prediction mode of multiple nearby blocks that is the same as the current block's in-screen prediction mode. If the current block and nearby blocks have different in-screen prediction modes, the current block's in-screen prediction mode information can be entropy-coded / decoded based on the nearby blocks' in-screen prediction modes.
[0101] Figure 5 is a diagram illustrating the in-screen prediction according to the present invention. The in-screen prediction for the current block may include an in-screen prediction mode derivation step (S510), a reference sample configuration step (S520), and / or an in-screen prediction execution step (S530).
[0102] In step S510, the in-screen prediction mode of the current block can be derived. The in-screen prediction mode of the current block can be derived by using the in-screen prediction modes of neighboring blocks, by entropy coding / decoding the in-screen prediction mode of the current block from the bitstream, by using the coding parameters of neighboring blocks, or by using the in-screen prediction modes of the color components. According to the method using the in-screen prediction modes of neighboring blocks, the in-screen prediction mode of the current block can be derived using at least one of the in-screen prediction modes of neighboring blocks, a combination of one or more in-screen prediction modes of neighboring blocks, and one or more in-screen prediction modes derived using MPMs.
[0103] In step S520, at least one of the following is performed: reference sample selection and reference sample filtering, thereby configuring the reference samples.
[0104] In step S530, in-screen prediction can be performed by performing at least one of non-directional prediction, directional prediction, position-based prediction, and inter-color component prediction. If directional prediction is performed, predictions with different directions can be performed for each predetermined unit containing one or more samples in the current block. The predetermined unit may be at least one of, for example, a single sample, a sample group, a line, and a block. Inter-color component prediction may include a step of reconstructing a color component block, a step of deriving prediction parameters, and / or a step of performing inter-color component prediction. Further filtering of the prediction samples can be performed in step S530.
[0105] One or more restored neighboring blocks can be used to derive the in-screen prediction mode of the current block. The position of the restored 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, if the coordinates of the upper-left corner sample of the current block of size WxH are (0,0), then the neighboring block may be at least one of the blocks adjacent to the (-1,H-1), (W-1,-1), (W,-1), (-1,H), and (-1,-1) coordinates, and the neighboring blocks of the block. In this case, W and H may represent the width W and height H of the current block or the number of samples.
[0106] The in-screen prediction mode for an available neighboring block can be replaced with a predetermined in-screen prediction mode. The predetermined in-screen prediction mode may be, for example, DC mode, Planar mode, vertical mode, horizontal mode, and / or diagonal mode. For example, a neighboring block can be determined to be unavailable if it is located outside the boundary of at least one predetermined unit such as a picture, slice, tile, or CTU (Coding Tree Unit), or if it is predicted across screens, or if it is encoded in PCM mode. Alternatively, if a neighboring block is unavailable, the in-screen prediction mode of the unavailable neighboring block may not be replaced, and the unavailable neighboring block may not be used.
[0107] The current in-screen prediction mode of a block can be derived using the statistical values of the in-screen prediction modes of neighboring blocks at a given position or of the in-screen prediction modes of two or more neighboring blocks. In this specification, the statistical value can mean at least one of the mean, maximum, minimum, mode, median, weighted mean, and interpolated value.
[0108] Alternatively, the in-screen prediction mode of the current block can be derived based on the size of neighboring blocks. For example, the in-screen prediction mode of a relatively large neighboring block can be derived as the in-screen prediction mode of the current block. Alternatively, a relatively large weight can be assigned to the in-screen prediction mode of a relatively large block and statistical values can be calculated.
[0109] Alternatively, it can be considered whether the in-screen prediction mode of a neighboring block is directional or not. For example, if the in-screen prediction mode of a neighboring block is non-directional, the non-directional mode can be derived as the in-screen prediction mode of the current block. Alternatively, the in-screen prediction mode of the current block can be derived using the in-screen prediction modes of other neighboring blocks, excluding the non-directional mode.
[0110] To derive the current block's in-screen prediction mode, one or more Most Probable Mode (MPM) lists can be constructed using the in-screen prediction modes of neighboring blocks. The number N of candidate modes included in the MPM list can be fixed or determined based on the size and / or shape of the current block. The MPM lists can be constructed so that there are no overlapping modes. If the number of available candidate modes is less than N, modes obtained by adding or subtracting a predetermined offset from a predetermined candidate mode, such as a directional mode, can be added to the one or more MPM lists. Alternatively, at least one of the horizontal mode, vertical mode, 45-degree mode, 135-degree mode, 225-degree mode, and non-directional mode can be added to the MPM list. The predetermined offset can be 1, 2, 3, 4, or a positive integer.
[0111] The MPM list can be structured in a predetermined order based on the positions of neighboring blocks. For example, the predetermined order may be the order of blocks adjacent to the left, top, bottom left corner, top right corner, and top left corner of the current block. Non-directional modes can be included at any position in the MPM list. For example, they can be added after the in-screen prediction modes of blocks adjacent to the left and top.
[0112] In another embodiment, the in-screen prediction mode of the current block can be derived using the in-screen prediction mode derived using the MPM list and the in-screen prediction modes of neighboring blocks. For example, if the in-screen prediction mode derived using the MPM list is Pred_mpm, Pred_mpm can be modified using the in-screen prediction modes of neighboring blocks. For example, if Pred_mpm is greater than the in-screen prediction mode of neighboring blocks (or the statistical value of two or more in-screen prediction modes), Pred_mpm can be increased by n; otherwise, it can be decreased by n. In this case, n can be a predetermined integer such as +1, +2, +3, 0, -1, -2, -3, etc. The in-screen prediction mode of the current block can be derived from the modified Pred_mpm. Alternatively, if at least one of Pred_mpm and the in-screen prediction modes of neighboring blocks is a non-directional mode, the in-screen prediction mode of the current block may be derived as the non-directional mode. Or, conversely, the in-screen prediction mode of the current block may be derived as a directional mode.
[0113] As another embodiment for deriving an in-screen prediction mode, the in-screen prediction mode of the current block can be derived using the in-screen prediction modes of other color components. For example, if the current block is a color difference block, the in-screen prediction mode of the luminance block corresponding to the color difference block can be used. There may be one or more corresponding luminance blocks. The corresponding luminance block can be determined based on at least one of the size, shape, and / or coding parameters of the color difference block. Alternatively, the corresponding luminance block can be determined based on at least one of the size, shape, and / or coding parameters of the luminance block.
[0114] A luminance block corresponding to a color difference block may contain multiple partitions. All or some of these partitions may have different in-screen prediction modes. The in-screen prediction mode of a color difference block can be derived based on all or some of the multiple partitions within the corresponding luminance block. In this case, some partitions can be selectively used based on a comparison of block size, shape, depth information, etc., between the color difference block and the luminance block (all or some of the multiple partitions). Partitions at positions within the luminance block corresponding to predetermined positions within the color difference block may be selectively used. The predetermined positions may refer to corner sample positions (e.g., upper left sample) or central sample positions within the color difference block.
[0115] The method for deriving an in-screen prediction mode between color components according to the present invention is not limited to using the in-screen prediction mode of the corresponding luminance block. For example, the in-screen prediction mode of a color difference block can also be derived by using or sharing at least one of the mpm_idx or MPM list of the corresponding luminance block.
[0116] Figure 6 is an illustrative diagram illustrating the relationship between luminance blocks and color difference blocks. In the example shown in Figure 6, the ratio between the color components is 4:2:0, and the luminance block corresponding to the color difference block can be at least one of A, B, C, and D.
[0117] In the example shown in Figure 6, the in-screen prediction mode of the color difference block can be derived using the in-screen prediction mode of luminance block A corresponding to the upper left position (0,0) within the color difference block, or the in-screen prediction mode of luminance block D corresponding to the central sample position (nS / 2,nS / 2) within the color difference block. The predetermined position within the color difference block is not limited to (0,0) and (nS / 2,nS / 2). For example, the predetermined position may be the upper right, lower left, and / or lower right corner sample position within the color difference block.
[0118] The predetermined position can be selected according to the shape of the color difference block. For example, if the color difference block is square, the predetermined position may be the central sample position. For example, if the color difference block is rectangular, the predetermined position may be the upper left sample position. In the above examples, the predetermined position may be reversed when the color difference block is square and when it is rectangular.
[0119] In another embodiment, the in-screen prediction mode of a color difference block can be derived using statistical values of one or more in-screen prediction modes within a luminance block corresponding to the size of the color difference block.
[0120] In the example shown in Figure 6, for example, the mode corresponding to the average of the in-screen prediction modes of luminance blocks A and D, or the mode corresponding to the average of the in-screen prediction modes of A, B, C, and D within the luminance block corresponding to the size of the color difference block, can be derived as the in-screen prediction mode of the color difference block.
[0121] If multiple in-screen prediction modes exist for a luminance block, all or some of them can be selected. This selection may be based on a predetermined position within a color difference block, or on the size, shape, and / or depth of the color difference block and / or luminance block. The in-screen prediction mode of a color difference block can be derived using the selected in-screen prediction modes of the luminance block.
[0122] For example, by comparing the size of luminance block A corresponding to the upper left sample position (0,0) within the color difference block with the size of luminance block D corresponding to the central sample position (nS / 2, nS / 2) within the color difference block, the in-screen prediction mode of the relatively larger luminance block D can be used to derive the in-screen prediction mode of the color difference block.
[0123] Alternatively, if a luminance block corresponding to a predetermined position within a color difference block is larger than or equal to the color difference block, the in-screen prediction mode of the color difference block can be derived using the in-screen prediction mode of the corresponding luminance block.
[0124] Alternatively, if the size of the color difference block falls within a predetermined range, the in-screen prediction mode of the color difference block can be derived using the in-screen prediction mode of the luminance block corresponding to the sample position (0,0) at the upper left corner of the color difference block.
[0125] Alternatively, if the size of the color difference block falls within a predetermined range, the size of the luminance block corresponding to predetermined positions (0,0) and (nS / 2,nS / 2) within the color difference block can be compared, and the in-screen prediction mode of the larger block can be used to derive the in-screen prediction mode of the color difference block.
[0126] The predetermined range can be derived based on at least one of the following: information signaled via the bitstream, information regarding the size (and / or depth) of the blocks (chrominance blocks and / or luminance blocks), and information predefined by the encoder / decoder.
[0127] Alternatively, if the color difference block is rectangular in shape, the in-screen prediction mode of the color difference block can be derived using the in-screen prediction mode of the luminance block corresponding to the central sample position (nS / 2, nS / 2) within the color difference block.
[0128] Alternatively, among the multiple partitions within the luminance block, a partition having the same shape as the chrominance block can be used. For example, if the chrominance block is square or non-square, then among the multiple partitions within the luminance block, a square or non-square partition can be used.
[0129] In the example explained with reference to Figure 6, deriving the in-screen prediction mode of the chrominance block using the in-screen prediction mode of the luminance block includes cases where the in-screen prediction mode of the luminance block is used directly as the in-screen prediction mode of the chrominance block. Furthermore, it is not limited to using the in-screen prediction mode of the luminance block; information used when deriving the in-screen prediction mode of the luminance block, including the mpm_idx and MPM list of the luminance block, may also be used.
[0130] Alternatively, an MPM list for a color difference block can be constructed using the in-screen prediction mode of the luminance block corresponding to the predetermined position. In this case, the mpm_idx information for the color difference block can be encoded and signaled. The MPM list for a color difference block can be constructed in a similar manner to the MPM list for a luminance block. However, the MPM candidates for a color difference block may include the in-screen prediction mode of a neighboring color difference block and / or the in-screen prediction mode of the corresponding luminance block.
[0131] If the MPM flag is 0, a secondary MPM list containing one or more in-screen prediction modes can be constructed, and the in-screen 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 in-screen 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 in-screen prediction modes of neighboring blocks, similar to the primary MPM list. In this case, the in-screen prediction modes included in the primary MPM list do not need to be included in the secondary MPM list. The number of MPM lists is not limited to one or two; up to N MPM lists can be used.
[0132] If the current block's in-screen prediction mode is not included in any of the multiple MPM lists, the current block's luminance component in-screen prediction mode can be encoded / decoded. Additionally, the chrominance component in-screen prediction mode can be derived or encoded / decoded based on the corresponding luminance component in-screen prediction mode.
[0133] Currently, if a block is divided into multiple subblocks, at least one of the methods described above can be applied to derive the in-screen prediction mode for each of the divided subblocks.
[0134] The size and / or shape of a subblock can be a predetermined size and / or shape (e.g., 4x4), or it can be determined according to the size and / or shape of the current block. Alternatively, the size of a subblock can be determined based on whether the current block's neighboring blocks are divided, or based on the in-screen prediction mode of the current block's neighboring blocks. For example, the current block can be divided based on boundaries where the in-screen prediction modes of neighboring blocks are different. Alternatively, the current block can be divided based on whether the neighboring blocks are in-screen encoded blocks or cross-screen encoded blocks.
[0135] An indicator (e.g., NDIP_flag) can be encoded / decoded to show that the current block's in-screen prediction mode is derived using the in-screen prediction modes of neighboring blocks. This indicator can be encoded / decoded for at least one unit of the current block or subblock. In this case, the indicator can only be encoded / decoded if the size of the current block or subblock falls within a predetermined size or range of predetermined sizes.
[0136] The determination of whether the current block size falls within a specified size can be made based on the current block's width or length. For example, if the width or length is divisible, the current block size can be determined to fall within a specified size.
[0137] If a block is currently divided into multiple subblocks, the in-screen prediction modes of the multiple subblocks may be derived in a zigzag order or in parallel. The in-screen prediction modes of the subblocks can be derived by at least one of the methods used to derive the in-screen prediction modes of the current block. In this case, the neighboring blocks of the current block may be used as the neighboring blocks of each subblock, or the subblocks within the current block may be used as the neighboring blocks of each subblock.
[0138] The in-screen prediction mode of a subblock belonging to the current block can be derived using the average of the in-screen prediction mode of the current block and the in-screen prediction modes of the blocks adjacent to the left and above the (0,0) position sample of each subblock. For example, if the in-screen prediction mode of the current block is greater than the average, half of the average can be subtracted from the derived in-screen prediction mode; if it is less than or equal to the average, it can be added.
[0139] Information regarding in-screen predictions can be signaled via at least one of the following: VPS (video parameter set), SPS (sequence parameter set), PPS (picture parameter set), APS (adaptation parameter set), slice header, and tile header. Below a given block size, at least one of the in-screen prediction information may not be signaled. In this case, information regarding in-screen predictions from a previously encoded / decoded block (e.g., a higher block) can be used.
[0140] Based on the derived in-screen prediction mode, a reference sample for in-screen prediction can be constructed. In the following description, the current block may mean the prediction block, or a subblock having a smaller size / shape than the prediction block. The reference sample can be constructed using one or more restored samples or combinations 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 the reconstructed sample lines used to construct the reference sample may vary depending on the position of the current block within the coding tree block. Each reconstructed sample on multiple reconstructed sample lines can be used directly as a reference sample. Alternatively, a predetermined filter can be applied to the reconstructed samples, and the filtered reconstructed samples can be used to generate the reference sample. Reconstructed samples to which a filter is applied may belong to the same reconstructed sample line or to different reconstructed sample lines.
[0142] The configured reference sample can be represented by ref[m,n], and a nearby restored sample or a filtered sample can be represented by rec[m,n]. In this case, 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 in the current block can be set to (-1,-1).
[0143] To construct the aforementioned reference sample, the availability of a nearby reconstructed sample can be determined. If the nearby reconstructed sample is located outside of at least one region of the picture, slice, tile, and CTU, it can be determined to be unavailable. Alternatively, when performing a constrained intra-prediction for the current block, if the nearby reconstructed sample is located in a block encoded / decoded between screens, it can be determined to be unavailable.
[0144] If the reconstructed samples in the vicinity are deemed unavailable, the unavailable samples can be replaced with available reconstructed samples in the vicinity. For example, starting from the position of the lower left sample, the unavailable samples can be filled using adjacent available samples. Alternatively, the unavailable samples can be filled using a combination of available samples. For example, the average values of the available samples located at both ends of the unavailable sample can be used to fill the unavailable sample.
[0145] Alternatively, unavailable samples can be filled using information from available reference samples. In this case, unavailable samples can be filled with arbitrary values instead of adjacent available sample values. The arbitrary value may be the mean of the available sample values, or it may be a value that takes into account the gradient of the available sample values. Alternatively, both the mean and the gradient may be used. The gradient can be determined based on the difference between adjacent available samples, or it may be determined based on the difference between the mean and the available sample values. In addition to the mean, a weighted sum using the maximum, minimum, median, or arbitrary weights can be used. The arbitrary weights can be determined based on the distance between available samples and unavailable samples.
[0146] These methods can be applied to both the upper and left-side reference samples, or to only one direction. They can also be applied when constructing the reference sample line of the current block using multiple restored sample lines.
[0147] Based on at least one of the current block's in-screen prediction mode or its size / shape, it is possible to determine whether or not to apply filtering to the configured reference samples. If filtering is applied, the type of filter may change depending on at least one of the current block's in-screen prediction mode, size, and shape.
[0148] Based on the derived in-screen prediction mode and reference sample, an in-screen prediction can be performed for the current block.
[0149] In DC mode, the average of one or more of the configured reference samples can be used. In this case, filtering can be applied to one or more prediction samples located at the current block boundary. DC prediction can be performed differently based on at least one of the current block's size and shape. For example, the range of reference samples used in DC mode can be determined based on the current block's size and / or shape.
[0150] Figure 7 is a diagram illustrating DC prediction based on block size and / or shape. As shown in Figure 7(a), if the current block is a square, DC prediction can be performed using the mean values of the reference samples above and to the left of the current block.
[0151] If the current block is not square, neighboring samples adjacent to the left or above the current block can be selectively used. For example, as shown in Figure 7(b), if the current block is rectangular, DC prediction can be performed using the mean of reference samples adjacent to the larger of the width and height of the current block.
[0152] Alternatively, if the current block size is a predetermined size or falls within a predetermined range, a predetermined sample can be selected from the reference samples above or to the left of the current block, and DC prediction can be performed using the mean value of the selected sample. The predetermined size can 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 can mean a critical value for selecting the reference sample of the current block. The critical value can be realized by at least one of the minimum or maximum value. The minimum and / or maximum value may be a predetermined fixed value in the encoder / decoder, or it may be a variable value encoded and signaled by the encoder.
[0153] As mentioned earlier, the mean of one or more reference samples can be used for DC prediction. To calculate the mean, division by the number of reference samples can be performed. n If there are n (where n is a positive integer), the division can be replaced by a binary shift operation. For non-square blocks, if all the upper and left reference samples are used, the number of reference samples is 2 n This is not always the case; in this instance, a shift operation cannot be used instead of a division operation. Therefore, as in the above embodiment, the upper or left side 2 n By using individual reference samples, division can be replaced with a shift operation.
[0154] In planner mode, a weighted sum can be used that takes into account the distance from one or more of the configured reference samples, depending on the position of the current block's target sample on the screen.
[0155] In directional mode, one or more reference samples located on or near a predetermined angular line at the position of the sample to be predicted on the screen can be used.
[0156] In location-based in-screen prediction mode, a reconstructed sample block generated based on encoded / decoded or derived location information can be used as the in-screen prediction block for the current block. Alternatively, the decoder can search for and derive a reconstructed sample block to be used as the in-screen prediction block for the current block.
[0157] In-screen prediction for color difference signals can be performed using the restored luminance signal of the current block. Alternatively, in-screen prediction for other color difference signals (Cr) can be performed using one restored color difference signal (Cb) or its residual signal (Cb) from the current block.
[0158] In-screen prediction can be performed by combining one or more of the above prediction methods. For example, an in-screen prediction block for the current block can be constructed via a weighted sum of a block predicted using a predetermined non-directional in-screen prediction mode and a block predicted using a predetermined directional in-screen prediction mode. In this case, the weights can be applied differently depending on at least one of the in-screen prediction mode of the current block, the size of the block, and the position of the sample. Alternatively, in the case of a color difference block, an in-screen prediction block for the color difference block can be constructed via a weighted sum of a block predicted using a predetermined in-screen prediction mode and a block predicted using the restored signal of the luminance block. In this case, the predetermined in-screen prediction mode may be, for example, one of the modes used to derive the in-screen prediction mode of the color difference block. In the case of a color difference block, whether or not to construct the final prediction block using the weighted sum of the two prediction blocks as described above can be signaled by encoded information.
[0159] In directional mode, the configured reference samples can be reconstructed based on the directional prediction mode. For example, if the directional prediction mode is a mode that uses all reference samples located on the left and above, a one-dimensional array can be constructed for the left or above reference samples. Alternatively, the left reference samples can be moved to construct the above reference samples, or the above reference samples can be constructed using a weighted sum of one or more left reference samples.
[0160] Currently, different directional in-screen predictions may be performed for each predetermined sample group unit within a block. The predetermined sample group unit may be a block, subblock, line, or single sample.
[0161] According to embodiments of the present invention, in-screen prediction between color components can be performed. Figure 8 is a diagram illustrating the in-screen prediction execution process between color components. In-screen prediction between color components may include a color component block reconstruction step (S810), a prediction parameter derivation step (S820), and / or an in-screen prediction execution step (S830). The color components may represent at least one of a luminance (luma) signal, a chroma signal, Red, Green, Blue, Y, Cb, and Cr. Prediction for the first color component can be performed using at least one of a second color component, a third color component, and a fourth color component. In this case, the color component signal used for prediction may be at least one of the original signal, the reconstructed signal, the residual signal, and the prediction signal.
[0162] When performing in-screen prediction for a second color component target block, at least one sample from the first color component corresponding to the target block and / or a sample from a neighboring block of the corresponding block can be used. For example, when performing in-screen prediction for a color difference component block Cb or Cr, the restored luminance component block Y corresponding to the color difference component block can be used. Alternatively, when performing in-screen prediction for a Cr component block, the Cb component block can be used. Or, when performing in-screen prediction for a fourth color component block, at least one combination from the first color component block, second color component block, and third color component block corresponding to the block can be used.
[0163] Whether or not to perform inter-color component in-screen prediction can be determined based on at least one of the size and shape of the target block. For example, if the size of the target block is the CTU size, greater than or equal to a predetermined size, or falls within the range of a predetermined size, inter-color component in-screen prediction can be performed on the target block. Alternatively, if the shape of the target block is a predetermined shape, inter-color component in-screen prediction can 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 in-screen prediction does not need to be performed. If the predetermined shape is rectangular, the above-described embodiment can operate in reverse.
[0164] Alternatively, whether or not to perform inter-color component in-screen prediction may be determined based on at least one encoding parameter from the corresponding block and neighboring blocks of the block to be predicted. For example, if the corresponding block is predicted inter-screen under a CIP (Constrained intra prediction) environment, inter-color component in-screen prediction may not be performed. Alternatively, if the in-screen prediction mode of the corresponding block corresponds to a predetermined mode, inter-color component in-screen prediction may be performed. Alternatively, whether or not to perform inter-color component in-screen prediction can also be determined based on at least one of the CBF information of the corresponding block and neighboring blocks. The encoding parameter is not limited to the prediction mode of the block, and various parameters used for encoding / decoding as described above may be used.
[0165] The following describes the color component block reconstruction step S810. When predicting the second color component block using the first color component block, the first color component block can be reconstructed. For example, if the color space of an image is YCbCr and the ratio between color components is one of 4:4:4, 4:2:2, or 4:2:0, the sizes of the color component blocks may differ. Therefore, when predicting the second color component block using first color component blocks of different sizes, the first color component block can be reconstructed to make the sizes of the two blocks the same. In this case, the reconstructed block may include at least one of the samples of the first color component corresponding block and the samples of the neighboring blocks. Figure 9 is an illustrative diagram illustrating the reconstruction of color component blocks.
[0166] In Figure 9(a), p1[x,y] can represent a sample at the (x,y) position of the first color component block. In Figure 9(b), p1'[x,y] can represent a sample at the (x,y) position of the block reconstructed from the first color component block.
[0167] If the size of the first color component block is larger than the size of the second color component block, the first color component block can be downsampled and reconstructed into a block of the same size as the second color component block. This downsampling can be performed by applying an N-tap filter to one or more samples (where N is an integer of 1 or more). In this case, at least one of the following equations 1 to 5 can be used. When one of several downsampling methods is used selectively, the encoder can select one downsampling method as a predetermined method. For example, the encoder can select the downsampling method that has the optimal effect. The selected downsampling method can be encoded and signaled to the decoder. The signaled information may be index information indicating the downsampling 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 [Equation 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 embodiments of equations 1 to 5 described above. 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 adjacent samples. The adjacent 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 the mean or weighted mean using two or more samples.
[0170] Alternatively, the downsampling may be performed by selecting a specific sample from one or more samples. In this case, at least one of the following formulas 6 to 9 can be used. [Formula 6] p1'[x, y] = p1[2x, 2y] [Equation 7] p1'[x, y] = p1[2x, 2y+1] [Equation 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 upsampled to reconstruct a block of the same size as the second color component block. In this case, the following formula 10 can be used. [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 can be applied to one or more samples. For example, a filter can be applied to one or more samples included in at least one of the first color component corresponding block, the neighboring block of the corresponding block, the second color component target block, and the neighboring block of the target block.
[0173] In the aforementioned reference sample configuration step, an indicator corresponding to a predetermined line among multiple reference sample lines can be signaled. In this case, the reconstruction process 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 or the corresponding first color component corresponding block falls within the boundary of a predetermined region, the reference samples used for reconstruction can be selected differently. In this case, the number of upper reference sample lines and the number of left reference sample lines may differ from each other. The predetermined region may be, for example, at least one of a picture, slice, tile, CTU, and CU.
[0175] For example, if the upper boundary of the first color component corresponding block corresponds to the boundary of the predetermined region, the upper reference sample can be omitted, and reconstruction can be performed using only the left reference sample. If the left boundary of the first color component corresponding block corresponds to the boundary of the predetermined region, the left reference sample can be omitted, and reconstruction can be performed using only the upper reference sample. Alternatively, N upper reference sample lines and M left reference sample lines can be used, in which case N may be less than M. For example, if the upper boundary corresponds to the boundary of the predetermined region, N may be 1, and if the left boundary corresponds to the boundary of the predetermined region, M may be 1.
[0176] Alternatively, reconstruction can 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 correspond to the boundary of the predetermined region.
[0177] Figure 10 illustrates an embodiment in which reconstruction is performed using multiple upper and / or left-side reference sample lines.
[0178] As shown in Figure 10(a), reconstruction can be performed using four upper reference sample lines and four left-side reference sample lines.
[0179] For example, if the upper or left boundary of the block corresponding to the first color component corresponds to the boundary of the predetermined area, the number of upper and left reference sample lines used for reconstruction may differ from each other. For example, as shown in Figures 10(b) to (d), 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 example above; N upper reference sample lines and M left-side reference sample lines may be used. N and M may be the same or different. If the upper and left-side 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 can be set to be smaller than M. This is because storing upper reference sample lines requires more resources (memory) than storing left-side reference sample lines.
[0181] Alternatively, as shown in Figure 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] In performing the aforementioned reconstruction, the reference sample reconstruction of the first color component-corresponding block can be performed differently depending on the size, shape, and at least one encoding parameter of at least one of the blocks among 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 blocks corresponding to the first color component or neighboring blocks, the reference sample can be reconstructed using samples from blocks whose encoding mode is inter-screen encoding mode, without using samples from blocks whose encoding mode is inter-screen encoding mode.
[0184] Figure 11 is an illustrative diagram illustrating the reference samples used for reconstruction depending on the in-screen prediction mode or coding parameters of the corresponding block. Depending on the in-screen prediction mode of the first color component corresponding block, the reconstruction of the reference samples of the first color component block can be performed differently. For example, if the in-screen prediction mode of the corresponding block is a non-directional mode such as DC mode or Planar mode, or a directional mode that uses both the upper and left reference samples, reconstruction can be performed using at least one of the reference samples located on the upper and left sides, as shown in Figure 11(a). Alternatively, if the in-screen prediction mode of the corresponding block is a directional mode that uses the upper and upper right reference samples, reconstruction can be performed using at least one of the reference samples located on the upper and upper right sides, as shown in Figure 11(b). Alternatively, if the in-screen prediction mode of the corresponding block is a directional mode that uses the left and lower left reference samples, reconstruction can be performed using at least one of the reference samples located on the left and lower left sides, as shown in Figure 11(c).
[0185] Alternatively, the reconstruction of the reference sample in the first color component-corresponding block can be performed differently depending on at least one quantization parameter in the first color component-corresponding block or the neighboring block. For example, as shown in Figure 11(d), reconstruction can be performed using a reference sample belonging to the upper block, where the quantization parameter value (QP) of the neighboring block is relatively small.
[0186] Alternatively, if the shape of the block corresponding to the second color component is rectangular, reconstruction can be performed using a reference sample near the square-shaped block corresponding to the first color component.
[0187] Alternatively, if the second color component target block is divided into two blocks (for example, two 16x8 blocks) and the first color component corresponding block is, for example, a 32x16 block, then reconstruction can be performed using a neighboring reference sample of the 32x32 block. In this case, the neighboring reference sample of the reconstructed 32x32 block can be shared as the reference sample of the first color component block corresponding to the second 16x8 block located lower among the second color component corresponding blocks.
[0188] The following describes the prediction parameter derivation step in step S820. The prediction parameters can be derived using at least one of the reference samples from the reconstructed first color component corresponding block and the reference sample from the second color component prediction target block. Hereinafter, the first color component and the first color component block can refer to the reconstructed first color component and the reconstructed first color component block.
[0189] Figure 12 is an illustrative diagram illustrating the reconstructed first-color component corresponding block when the second-color component prediction target block is 4x4. In this case, there can be N reference sample lines.
[0190] The prediction parameters can be derived using the upper and left reference samples of the reconstructed first color component corresponding block or the second color component prediction target block, as shown in Figure 12(a).
[0191] For example, prediction parameters can be derived by adaptively using the reconstructed reference sample of the first color component based on the in-screen prediction mode of the block corresponding to the first color component. In this case, the reference sample of the second color component can also be used adaptively based on the in-screen prediction mode of the block corresponding to the first color component.
[0192] If the in-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 the upper and left reference samples, then the upper and left reference samples of the first color component corresponding block can be used, as shown in Figure 12(a).
[0193] If the in-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 Figure 12(b) or (c).
[0194] If the in-screen prediction mode of the first color component corresponding block is a directional mode using a left-side reference sample, the left-side reference sample of the first color component corresponding block can be used, as shown in Figure 12(d) or (e).
[0195] Alternatively, if the in-screen prediction mode of the block corresponding to the first color component is a directional mode, the reference sample used for prediction for each mode can be used as the reference sample for the first color component. For example, if the in-screen prediction mode is a vertical mode, the reference sample shown in Figure 12(b) can be used. If the in-screen prediction mode is a horizontal mode, the reference sample shown in Figure 12(d) can be used. If the in-screen prediction mode is an upper-right diagonal mode, the reference sample shown in Figure 12(c) can be used. If the in-screen prediction mode is a lower-left diagonal mode, the reference sample shown in Figure 12(e) can be used. If the in-screen prediction mode is a mode that exists between the vertical mode and the upper-right diagonal mode, the reference sample shown in Figure 12(f) can be used. If the in-screen prediction mode is a directional mode corresponding to a 45-degree diagonal, at least one of the upper-right or lower-left reference samples can be used as shown in Figure 12(g). The reference samples used according to the in-screen prediction mode can be stored and used in the form of a look-up table.
[0196] The prediction parameters may be derived by adaptively using reference samples of the first or second color component, depending on the size and / or shape of the first color component block and / or the second color component block.
[0197] For example, if the size of the second color component target block is 64x64, then 32, 16, or 8 reference samples from the upper or left side of the first or second color component block can be used. As described above, if the size of the second color component target block is a predetermined size, then the reference samples of the first or second color component block can be used adaptively. The predetermined size is not limited to 64x64, and may be a size signaled via the bitstream or derived based on the encoding parameters of the current block and neighboring blocks.
[0198] Alternatively, if the shape of the second color component target block is rectangular, a reference sample adjacent to the longer side (horizontal or vertical) 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] Alternatively, if the shape of the second color component target block is rectangular, a reference sample of a square block can be used. For example, if the shape of the target block is 32x8, a reference sample located near a 32x32 block can be used.
[0200] The prediction parameters can be derived using the reference samples of the reconstructed first color component block and the second color component block. The prediction parameters can be derived based on at least one of the following: the relationship between the reference samples of the color components, the amount of change, the mean, and the distribution. At least one of the following methods can be used: LS (Least Square) or LMS (Least Mean Square).
[0201] When deriving prediction parameters using the LMS method, the prediction parameters can be at least one of a, b, alpha, or beta. Using the following formula 11, the prediction parameters that minimize the error between the first color component reference sample and the second color component reference sample can be derived.
number
[0202] In the above formula 11, p2 n This shows the second color component reference sample, p1' n can represent the reference sample for the reconstructed first color component. N can represent the horizontal or vertical number of reference samples used, and a and b can represent the prediction parameters.
[0203] At this time, the relationship between the reference samples can be calculated using the following formula 12.
number
[0204] In the above equation 12, BitDepth can represent the bit depth. p1' can represent a reconstructed sample of the first color component, and p2 can represent a sample of the second color component. Figure 13 is a diagram illustrating the samples of the first and second color components.
[0205] When deriving prediction parameters, if there are regions where no reference samples exist, the prediction parameters can be derived using only the existing reference samples.
[0206] One or more of the aforementioned prediction parameters can be derived. For example, a first prediction parameter can be derived from a reference sample whose value satisfies a specific condition. A second prediction parameter can be derived from a reference sample that does not satisfy the specific condition. The specific condition may be that the value of the reference sample is smaller than the statistical value of the reference sample (e.g., the mean).
[0207] According to another embodiment of the present invention, prediction parameters may not be derived using a reference sample, and default parameters may be used instead. These default parameters can be defined in the encoder and decoder. For example, 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 color component prediction between Y, Cb, and Cr, prediction parameters for Cb and Cr can be derived from Y, respectively. Alternatively, prediction parameters for Cr can be derived from Cb. Or, prediction parameters for Cr can be used to predict Cb without deriving them separately.
[0210] The following describes the color component prediction execution step S830. As mentioned above, once the prediction parameters are derived, in-screen prediction between color components can be performed using at least one of the derived prediction parameters.
[0211] For example, by applying the derived prediction parameters to the restored signal of the restored first color component using the following formula 13, predictions can be made for the target block of the second color component.
number
[0212] In the above equation 13, p2[x,y] may be a predicted block of the second color component target block. p1'[x,y] may be a first color component block or a reconstructed first color component block.
[0213] Alternatively, predictions for the second color component target block can be made by applying the derived prediction parameters to the reconstructed residual signal of the first color component using the following formula 14.
number
[0214] In the above equation 14, p1'_residual can represent the residual signal of the first color component. Also, p2_pred can represent the signal predicted by performing in-screen prediction on the target block of the second color component.
[0215] If there is one or more derived prediction parameters, these one or more prediction parameters can be applied to the restored sample of the first color component. For example, if the restored sample of the first color component satisfies certain conditions, the first prediction parameter derived from a reference sample that satisfies the certain conditions can be applied to perform in-screen prediction between color components. If the restored sample of the first color component does not satisfy the certain conditions, the second prediction parameter derived from a reference sample that does not satisfy the certain conditions can be applied to perform in-screen prediction between color components. The certain conditions may include the case where the value of the reference sample is smaller than the statistical value (e.g., mean) of the reference sample of the first color component.
[0216] The aforementioned color component inter-prediction method can also be applied to the screen-to-screen prediction mode. For example, when performing screen-to-screen prediction for the current block, screen-to-screen prediction can be performed for the first color component, and color component inter-prediction can be performed for the second color component. For example, the first color component may be a luminance component, and the second color component may be a color difference component. Furthermore, the color component inter-prediction can be performed adaptively according to the coding parameters of the first color component. For example, it can be determined whether or not to perform the color component inter-prediction based on the CBF information of the first color component. The CBF information may be information indicating the presence or absence of a residual signal. That is, if the CBF of the first color component is 1, color component inter-prediction can be performed for the second color component. If the CBF of the first color component is 0, screen-to-screen prediction can be performed without performing color component inter-prediction for the second color component. Alternatively, a flag indicating whether or not to perform the color component inter-prediction can be signaled.
[0217] These embodiments can be carried out in a similar manner in the encoder and decoder. The order in which these embodiments are applied may differ between the encoder and the decoder, or the order in which the embodiments are applied may be the same between the encoder and the decoder.
[0218] The above embodiments can be applied to both the luminance and color difference signals, and the above embodiments can be applied to both the luminance and color difference signals in the same manner.
[0219] The shape of the block to which the above-described embodiments of the present invention are applied can be square or non-square.
[0220] The embodiments of the present invention described above can be applied depending on the size of at least one of the following: coding block, prediction block, transformation block, block, current block, coding unit, prediction unit, transformation unit, unit, and current unit. Here, size may be defined as a minimum size and / or maximum size for which these embodiments are applicable, or as a fixed size to which the embodiments are applicable. Furthermore, the first embodiment can be applied for a first size, and the second embodiment can be applied for a second size. In other words, these embodiments can be applied in combination depending on the size. Furthermore, the embodiments of the present invention described above can only be applied if the size is greater than or equal to the minimum size and less than or equal to the maximum size. In other words, these embodiments can only be applied if the size of the block falls within a certain range.
[0221] For example, the above embodiment can be applied only when the current block size is 8x8 or larger. For example, the above embodiment can be applied only when the current block size is 4x4. For example, the above embodiment can be applied only when the current block size is 16x16 or smaller. For example, the above embodiment can be applied only when the current block size is 16x16 or larger and 64x64 or smaller.
[0222] The embodiments of the present invention described above can be applied according to the temporal layer. A separate identifier is signaled to identify the temporal layer to which these embodiments are applicable, and these embodiments can be applied to the temporal layer identified by the identifier. Here, the identifier may be defined as the lowest and / or highest temporal layer to which the embodiments are applicable, or as indicating a specific layer to which the embodiments are applied. Alternatively, a fixed temporal layer to which the embodiments are applied may be defined.
[0223] For example, the embodiment can be applied only when the current image's temporal hierarchy is at the lowest level. For example, the embodiment can be applied only when the current image's temporal hierarchy identifier is 1 or greater. For example, the embodiment can be applied only when the current image's temporal hierarchy is at the highest level.
[0224] A slice type to which the above-described embodiments of the present invention apply is defined, and the embodiments of the present invention can be applied according to the slice type.
[0225] In the embodiments described above, these methods are illustrated in a flowchart in a series of steps or units; however, the present invention is not limited to the order of these steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, a person with ordinary skill in the art will understand that the steps shown in the flowchart are not exclusive, and that other steps may be included, or one or more steps in the flowchart may be omitted without affecting the scope of the present invention.
[0226] The embodiments described above include examples of various aspects. It is not possible to describe all possible combinations for demonstrating various aspects, but a person with ordinary skill in the art will be able to recognize that other combinations are possible. Therefore, the present invention can be said to include all various substitutions, modifications, and changes that fall within the scope of the following claims.
[0227] The embodiments of the present invention described above are realized in the form of program instructions that can be executed via various computer components and can be recorded on a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc., individually or in combination. The program instructions recorded on the computer-readable recording medium may be specially designed and configured for the present invention, or may be publicly known and usable by those skilled in the field of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and hardware devices specially configured to store and execute program instructions, such as ROMs, RAMs, and flash memory. Examples of program instructions include not only machine code produced by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices may be configured to operate as one or more software modules to perform the processing according to the present invention, and vice versa.
[0228] Although the present invention has been described above with reference to specific components, limited embodiments, and drawings, these are provided only to aid in a more general understanding of the invention, and the invention is not limited to these embodiments. A person with ordinary skill in the art to which the invention pertains can make various modifications and variations from this description.
[0229] Therefore, the concept of the present invention should not be limited to the embodiments described above, and not only the claims described later, but also all modifications that are equivalent or equivalent to these claims should be considered to fall within the scope of the concept of the present invention. [Industrial applicability]
[0230] This invention can be used to encode / decode images.
Claims
1. In image decoding methods, The current step of deriving the in-screen prediction mode for a color difference block, wherein the in-screen prediction between color components is applied to the current color difference block. The steps include: deriving a luminance reference sample of the luminance block associated with the current color difference block; The steps include: deriving a downsampled luminance reference sample based on the aforementioned luminance reference sample; The steps include: deriving a color difference reference sample for the current color difference block; The steps include: deriving prediction parameters based on the downsampled luminance reference sample and the chrominance reference sample; A step of generating a prediction block based on the prediction parameters, wherein the prediction parameters include a scaling factor a and an offset b relating to the relationship between the luminance block and the current color difference block, The downsampled luminance reference sample includes a left-side downsampled luminance reference sample and an upper-side downsampled luminance reference sample. Based on the fact that the upper boundary of the luminance block coincides with the boundary of the coding tree unit (CTU), The left-side downsampled luminance reference sample is derived using six luminance reference samples within three left-side luminance sample lines, and the upper-side downsampled luminance reference sample is derived using three luminance reference samples within one upper-side luminance sample line, and The prediction parameters are derived based on (i) the left downsampled luminance reference sample derived using the six luminance reference samples in the three left luminance sample lines, and (ii) the upper downsampled luminance reference sample derived using the three luminance reference samples in the one upper luminance sample line. Image decoding method.
2. Based on the fact that the upper boundary of the luminance block does not overlap with the boundary of the CTU, the left-side downsampled luminance reference sample is derived using six luminance reference samples, and the upper-side downsampled luminance reference sample is derived using six luminance reference samples. The method according to claim 1.
3. In image encoding methods, The current step is to determine the in-screen prediction mode for the color difference block, The steps include: deriving a luminance reference sample of the luminance block associated with the current color difference block; The steps include: deriving a downsampled luminance reference sample based on the aforementioned luminance reference sample; The steps include: deriving a color difference reference sample for the current color difference block; The steps include: deriving prediction parameters based on the downsampled luminance reference sample and the chrominance reference sample; A step of generating a prediction block for the current color difference block based on the prediction parameters, wherein the prediction parameters include a scaling factor a and an offset b relating to the relationship between the luminance block and the current color difference block. The step includes encoding image information that includes information related to the in-screen prediction mode, The downsampled luminance reference sample includes a left-side downsampled luminance reference sample and an upper-side downsampled luminance reference sample. Based on the fact that the upper boundary of the luminance block coincides with the boundary of the coding tree unit (CTU), The left-side downsampled luminance reference sample is derived using six luminance reference samples within three left-side luminance sample lines, and the upper-side downsampled luminance reference sample is derived using three luminance reference samples within one upper-side luminance sample line, and The prediction parameters are derived based on (i) the left downsampled luminance reference sample derived using the six luminance reference samples in the three left luminance sample lines, and (ii) the upper downsampled luminance reference sample derived using the three luminance reference samples in the one upper luminance sample line. Image encoding method.
4. In a method for transmitting image data, A step of obtaining a bitstream of encoded image information, wherein the encoded image information is generated based on determining the in-screen prediction mode of the current color difference block, deriving a luminance reference sample of a luminance block associated with the current color difference block, deriving a downsampled luminance reference sample based on the luminance reference sample, deriving a color difference reference sample for the current color difference block, deriving prediction parameters based on the downsampled luminance reference sample and the color difference reference sample, generating a prediction block for the current color difference block based on the prediction parameters, wherein the prediction parameters include scaling coefficients a and offset b relating to the relationship between the luminance block and the current color difference block, and encoding image information including information relating to the in-screen prediction mode. The step of transmitting image data including the bitstream is included, The downsampled luminance reference sample includes a left-side downsampled luminance reference sample and an upper-side downsampled luminance reference sample. Based on the fact that the upper boundary of the luminance block coincides with the boundary of the coding tree unit (CTU), The left-side downsampled luminance reference sample is derived using six luminance reference samples within three left-side luminance sample lines, and the upper-side downsampled luminance reference sample is derived using three luminance reference samples within one upper-side luminance sample line, and The prediction parameters are derived based on (i) the left downsampled luminance reference sample derived using the six luminance reference samples in the three left luminance sample lines, and (ii) the upper downsampled luminance reference sample derived using the three luminance reference samples in the one upper luminance sample line. Transmission method.