Image encoding / decoding method and apparatus, and recording medium storing bit stream
By constructing reference samples through the intra-frame prediction method, the compression efficiency problem of high-resolution and high-quality image data is solved, more efficient image encoding and decoding is achieved, and transmission and storage costs are reduced.
Patent Information
- Application Number
- CN202310724569.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2016-08-01
- Filing Date
- 2017-08-01
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2037-08-01
AI Technical Summary
The increase in the amount of high-resolution and high-quality image data leads to higher transmission and storage costs, requiring efficient image encoding/decoding technology to improve compression efficiency.
Through the intra-frame prediction method, the prediction mode of the current block is derived, the adjacent reconstruction sample line is selected, the reference sample is constructed, and the image encoding/decoding is performed based on the intra-frame prediction mode and the reference sample, including steps such as weighted sum, sample replacement and block partitioning.
Improves image compression efficiency and reduces transmission and storage costs.
Smart Images

Figure CN116506607B_ABST
Abstract
Description
[0001] This application is a divisional application of a patent application with an application date of August 1, 2017, application number 201780047717.3, and invention name “Image encoding / decoding method and device and recording medium for storing bit stream”. Technical Field
[0002] The present invention relates to a method and apparatus for encoding / decoding an image, and more particularly to a method and apparatus for encoding / decoding an image using intra-frame prediction, and a recording medium storing a bitstream generated by the image encoding method / apparatus of the present invention. Background Art
[0003] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, has increased in various application fields. However, the amount of image data with higher resolution and higher quality has increased compared to conventional image data. Therefore, when image data is transmitted by using a medium such as conventional wired and wireless broadband networks, or when image data is stored by using conventional storage media, the cost of transmission and storage increases. In order to solve these problems arising as the resolution and quality of image data increase, efficient image encoding / decoding technology is required to obtain images with higher resolution and higher quality.
[0004] Image compression technology includes various technologies, including: inter-frame prediction technology for predicting pixel values included in the current picture from a previous picture or a subsequent picture of the current picture; intra-frame prediction technology for predicting pixel values included in the current picture by using pixel information in the current picture; transformation and quantization technology for compressing residual signal energy; entropy coding technology for assigning short codes to values with high frequency of occurrence and long codes to values with low frequency of occurrence, etc. Image data can be effectively compressed by using such image compression technology and can be transmitted or stored. Summary of the Invention
[0005] Technical issues
[0006] An object of the present invention is to provide a method and apparatus for encoding and decoding an image to improve compression efficiency.
[0007] Another object of the present invention is to provide a method and apparatus for encoding and decoding an image using intra-frame prediction to improve compression efficiency.
[0008] Another object of the present invention is to provide a recording medium storing a bit stream generated by the image encoding method / apparatus of the present invention.
[0009] Technical Solution
[0010] An image decoding method according to the present invention may include: deriving an intra-frame prediction mode of a current block; selecting at least one reconstructed sample line adjacent to the current block; constructing a reference sample using at least one reconstructed sample included in the at least one reconstructed sample line; and performing intra-frame prediction for the current block based on the intra-frame prediction mode and the reference sample.
[0011] In the image decoding method of the present invention, the at least one reconstructed sample line may include at least one of reconstructed sample lines adjacent to an upper side and a left side of the current block.
[0012] In the image decoding method of the present invention, the number of reconstructed sample lines adjacent to the upper and left sides of the current block may be determined based on at least one of the size, shape, and intra prediction mode of the current block.
[0013] In the image decoding method of the present invention, a weighted sum of the at least one reconstructed sample may be used to derive a reference sample.
[0014] In the image decoding method of the present invention, the weighted sum may be performed based on at least one of an intra prediction mode and a distance between the current block and the reconstructed sample line.
[0015] In the image decoding method of the present invention, the step of constructing a reference sample may further include: searching for a reconstructed sample similar to the current block from reconstructed samples included in at least one of an upper row and a left column adjacent to the current block; and replacing at least one reconstructed sample included in the reconstructed sample line with the searched reconstructed sample.
[0016] The image decoding method of the present invention may further include dividing the current block into a plurality of sub-blocks, and performing intra-frame prediction on each of the plurality of sub-blocks according to a reference sample constructed based on the current block.
[0017] In the image decoding method of the present invention, when intra prediction is performed on one of the multiple subblocks using a reference sample constructed based on the current block, the intra prediction may be performed after compensating for reference samples not adjacent to the one subblock.
[0018] In the image decoding method of the present invention, the step of performing intra-frame prediction may include: using the at least one reconstructed sample, predicting at least one sample among the samples included in the right column, the samples included in the bottom row, and the bottom-right samples within the current block; and using the predicted at least one sample to predict the remaining samples within the current block.
[0019] An image decoding device according to the present invention may include an intra-frame predictor, wherein the intra-frame predictor is configured to: derive an intra-frame prediction mode of a current block, select at least one reconstructed sample line adjacent to the current block, construct a reference sample using at least one reconstructed sample included in the at least one reconstructed sample line, and perform intra-frame prediction for the current block based on the intra-frame prediction mode and the reference sample.
[0020] An image encoding method according to the present invention may include: determining an intra-frame prediction mode of a current block; selecting at least one reconstructed sample line adjacent to the current block; constructing a reference sample using at least one reconstructed sample included in the at least one reconstructed sample line; and performing intra-frame prediction for the current block based on the intra-frame prediction mode and the reference sample.
[0021] In the image encoding method of the present invention, the at least one reconstructed sample line may include at least one of reconstructed sample lines adjacent to an upper side and a left side of the current block.
[0022] In the image encoding method of the present invention, the number of reconstructed sample lines adjacent to the upper side and the left side may be determined based on at least one of the size, shape, and intra prediction mode of the current block.
[0023] In the image encoding method of the present invention, a weighted sum of the at least one reconstructed sample may be used to derive a reference sample.
[0024] In the image encoding method of the present invention, the weighted sum may be performed based on at least one of an intra prediction mode and a distance between the current block and the reconstructed sample line.
[0025] In the image encoding method of the present invention, the step of constructing a reference sample may include: searching for a reconstructed sample similar to the current block from reconstructed samples included in at least one of an upper row and a left column adjacent to the current block; and replacing at least one reconstructed sample included in the reconstructed sample line with the searched reconstructed sample.
[0026] The image encoding method of the present invention may further include dividing the current block into a plurality of sub-blocks, and performing intra-frame prediction on each of the plurality of sub-blocks according to a reference sample constructed based on the current block.
[0027] In the image encoding method of the present invention, when intra prediction is performed on one of the multiple subblocks using a reference sample constructed based on the current block, the intra prediction may be performed after compensating for reference samples not adjacent to the one subblock.
[0028] An image encoding device according to the present invention may include an intra-frame predictor, wherein the intra-frame predictor is configured to: determine an intra-frame prediction mode of a current block, select at least one reconstructed sample line adjacent to the current block, construct a reference sample using at least one reconstructed sample included in the at least one reconstructed sample line, and perform intra-frame prediction for the current block based on the intra-frame prediction mode and the reference sample.
[0029] According to the present invention, a recording medium can store a bit stream generated by an image encoding method, wherein the image encoding method may include: determining an intra-frame prediction mode of a current block; selecting at least one reconstructed sample line adjacent to the current block; constructing a reference sample using at least one reconstructed sample included in the at least one reconstructed sample line; and performing intra-frame prediction for the current block based on the intra-frame prediction mode and the reference sample.
[0030] Beneficial effects
[0031] According to the present invention, a method and apparatus for encoding and decoding an image to improve compression efficiency can be provided.
[0032] According to the present invention, a method and apparatus for encoding and decoding an image using intra prediction to improve compression efficiency can be provided.
[0033] According to the present invention, there can be provided a recording medium storing a bit stream generated by the image encoding method / apparatus of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a block diagram showing the configuration of an encoding device according to an embodiment of the present invention.
[0035] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment of the present invention.
[0036] Figure 3 is a diagram schematically illustrating a partition structure of an image when encoding and decoding the image.
[0037] Figure 4 is a diagram illustrating a form of a prediction unit (PU) that may be included in a coding unit (CU).
[0038] Figure 5 is a diagram illustrating a form of a transform unit (TU) that may be included in a coding unit (CU).
[0039] Figure 6 is a diagram for explaining an embodiment of a process of intra prediction.
[0040] Figure 7is a diagram depicting a method for performing intra prediction on a current block according to an embodiment of the present invention.
[0041] Figure 8 is a diagram depicting a method for deriving an intra prediction mode of a current block from neighboring blocks.
[0042] Figure 9 is an exemplary diagram depicting adjacent reconstructed sample lines that may be used for intra prediction of a current block.
[0043] Figure 10 is a diagram depicting an embodiment of reconstructing a reference sample.
[0044] Figure 11 is a diagram depicting another embodiment of reconstructing a reference sample.
[0045] Figure 12 is a diagram depicting another embodiment of reconstructing a reference sample.
[0046] Figure 13 is a diagram depicting an embodiment of encoding / decoding a plurality of prediction blocks generated by splitting a current block.
[0047] Figure 14 is a diagram illustrating another embodiment of encoding / decoding a plurality of prediction blocks generated by splitting a current block.
[0048] Figure 15 is a diagram depicting a method of replacing unavailable reconstruction samples with available reconstruction samples.
[0049] Figure 16 is a diagram depicting another method of replacing unavailable reconstruction samples with available reconstruction samples.
[0050] Figure 17 is an exemplary diagram depicting the filling of reference samples when one or more reconstruction sample lines are used.
[0051] Figure 18 is a diagram depicting filtering of reference samples including padded unavailable reference samples.
[0052] Figure 19 is a diagram depicting filtering of reference samples including unavailable reference samples.
[0053] Figure 20 It is depicted from P ref Generate a 1D reference sample array p 1,ref Schematic diagram of an embodiment of the present invention.
[0054] Figure 21 is a diagram depicting intra prediction according to an embodiment of the present invention.
[0055] Figure 22 is a diagram depicting intra prediction according to another embodiment of the present invention.
[0056] Figure 23 is a diagram depicting intra prediction according to another embodiment of the present invention. DETAILED DESCRIPTION
[0057] The present invention may be modified in various ways, and there are various embodiments of the present invention, examples of which will now be provided and described in detail with reference to the accompanying drawings. However, although the exemplary embodiments may be interpreted as including all modifications, equivalents, or alternatives within the technical concept and technical scope of the present invention, the present invention is not limited thereto. In various aspects, similar reference numerals refer to the same or similar functions. In the drawings, the shapes and sizes of elements may be exaggerated for clarity. In the following detailed description of the present invention, reference is made to the accompanying drawings, which illustrate specific embodiments in which the present invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to implement the present disclosure. It should be understood that the various embodiments of the present disclosure, although different, are not necessarily mutually exclusive. For example, specific features, structures, and characteristics described herein in conjunction with one embodiment may be implemented in other embodiments without departing from the spirit and scope of the present disclosure. In addition, it should be understood that the position or arrangement of the various elements within each disclosed embodiment may be modified without departing from the spirit and scope of the present disclosure. Therefore, the following detailed description should not be taken in a limiting sense, and the scope of the present disclosure is defined solely by the appended claims (and, where appropriately interpreted, along with the full scope of equivalents required by the claims).
[0058] The terms "first," "second," and the like used in the specification may be used to describe various components, but the components should not be construed as being limited to these terms. These terms are used only to distinguish one component from other components. For example, a "first" component may be named a "second" component, and a "second" component may be similarly named a "first" component without departing from the scope of the present invention. The term "and / or" includes a combination of multiple items or any one of the multiple items.
[0059] It should be understood that in this specification, when an element is merely referred to as being “connected to” or “coupled to” another element rather than being “directly connected to” or “directly coupled to” another element, it may be “directly connected to” or “directly coupled to” another element, or connected to or coupled to another element with other elements interposed therebetween. Conversely, it should be understood that when an element is referred to as being “directly coupled to” or “directly connected to” another element, there are no intervening elements.
[0060] In addition, the components shown in the embodiments of the present invention are shown independently to represent different characteristic functions. Therefore, it does not mean that each component is composed of a constituent unit of separated hardware or software. In other words, for convenience, each component includes each of the enumerated components. Therefore, at least two components in each component can be combined to form a component, or a component can be divided into multiple components to perform each function. Without departing from the essence of the present invention, the embodiments of combining each component and the embodiments of dividing a component are also included in the scope of the present invention.
[0061] The terms used in this specification are only used to describe specific embodiments and are not intended to limit the present invention. Unless there is a significantly different meaning in the context, the expressions used in the singular include plural expressions. In this specification, it should be understood that the terms such as "including", "having" etc. are intended to represent the presence of features, numbers, steps, actions, elements, parts or combinations thereof disclosed in the specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, elements, parts or combinations thereof may be present or may be added. In other words, when a particular element is referred to as being "comprising", elements other than the corresponding elements are not excluded, but additional elements may be included in an embodiment of the present invention or within the scope of the present invention.
[0062] In addition, some components may not be essential components for performing the basic functions of the present invention, but may be optional components that only improve its performance. The present invention can be implemented by including only the essential components for achieving the essence of the present invention without including components that improve performance. Structures that include only the essential components without including optional components that only improve performance are also included in the scope of the present invention.
[0063] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. When describing exemplary embodiments of the present invention, well-known functions or structures will not be described in detail because they may unnecessarily obscure the understanding of the present invention. The same constituent elements in the drawings are represented by the same reference numerals, and repeated descriptions of the same elements will be omitted.
[0064] In the following text, "image" may refer to a frame that makes up a video, or may refer to the video itself. For example, "encoding or decoding of an image, or both encoding and decoding of an image" may refer to "encoding or decoding of a video, or both encoding and decoding of a video," and may also refer to "encoding or decoding of one of the images in a video, or both encoding and decoding of that one image." Here, "frame" and "image" may have the same meaning.
[0065] Terminology Description
[0066] Encoder: May refer to a device that performs encoding.
[0067] Decoder: May refer to a device that performs decoding.
[0068] Parsing: may refer to determining the value of a syntax element by performing entropy decoding, or may refer to the entropy decoding itself.
[0069] Block: may refer to an M×N matrix of samples. Here, M and N are positive integers, and a block may refer to a two-dimensional matrix of samples.
[0070] Sample: is a basic unit of a block and may indicate a value ranging from 0 to 2Bd-1 according to a bit depth (Bd). In the present invention, a sample may refer to a pixel.
[0071] Unit: This refers to a unit used in image encoding and decoding. When encoding and decoding an image, a unit can be a region created by partitioning an image. Furthermore, when an image is partitioned into sub-divided units during encoding or decoding, a unit can refer to a sub-divided unit. When encoding and decoding an image, predetermined processing can be performed on each unit. A unit can be partitioned into sub-units smaller than the unit. Depending on its function, a unit can refer to a block, macroblock, coding tree unit, coding tree block, coding unit, coding block, prediction unit, prediction block, transform unit, transform block, and so on. To distinguish a unit from a block, a unit can include a luma component block, a chroma component block of a luma component block, and syntax elements for each color component block. A unit can have various sizes and shapes, and specifically, a unit can be a two-dimensional geometric figure such as a rectangle, square, trapezoid, triangle, pentagon, and so on. Unit information can also include at least one of the following: unit type, unit size, unit depth, encoding and decoding order of the unit, and so on, indicating a coding unit, prediction unit, transform unit, and so on.
[0072] Reconstructed neighboring unit: may refer to a reconstructed unit that was previously encoded or decoded in space / time, and the reconstructed unit is adjacent to the encoding / decoding target unit. Here, the reconstructed neighboring unit may refer to a reconstructed neighboring block.
[0073] Neighboring Block: This may refer to a block adjacent to the encoding / decoding target block. A block adjacent to the encoding / decoding target block may refer to a block having a border that touches the encoding / decoding target block. A neighboring block may refer to a block located at a vertex adjacent to the encoding / decoding target block. A neighboring block may refer to a reconstructed neighboring block.
[0074] Cell depth: may refer to the degree to which a cell is partitioned. In a tree structure, a root node may be the highest node and a leaf node may be the lowest node.
[0075] Symbol: can refer to the syntax elements, coding parameters, transform coefficient values, etc. of the encoding / decoding target unit.
[0076] Parameter set: This refers to header information in the bitstream structure. A parameter set can include at least one of a video parameter set, a sequence parameter set, a picture parameter set, or an adaptation parameter set. Furthermore, a parameter set can include slice header information, tile header information, and so on.
[0077] Bitstream: May refer to a string of bits that includes coded image information.
[0078] Transformation unit (TU): This refers to the basic unit used for encoding / decoding of a residual signal, such as transformation, inverse transformation, quantization, dequantization, and transform coefficient encoding / decoding. A TU can be partitioned into multiple small TUs. TUs can have various sizes and shapes. Specifically, the shape of a TU can be a two-dimensional geometric figure, such as a rectangle, square, trapezoid, triangle, or pentagon.
[0079] Scaling: This refers to the process of multiplying a factor by a transform coefficient level to produce a transform coefficient. Scaling may also be referred to as inverse quantization.
[0080] Quantization parameter: may refer to a value used when scaling transform coefficient levels during quantization and inverse quantization. Here, the quantization parameter may be a value mapped to a quantization step size.
[0081] Delta quantization parameter: may refer to the difference between the predicted quantization parameter and the quantization parameter of the encoding / decoding target unit.
[0082] Scan: This refers to a method of reordering the order of coefficients within a block or matrix. For example, reordering a two-dimensional matrix into a one-dimensional matrix may be called a scan, and reordering a one-dimensional matrix into a two-dimensional matrix may be called a scan or an inverse scan.
[0083] Transform coefficient: may refer to a coefficient value generated after performing a transform. In the present invention, a quantized transform coefficient level may be referred to as a transform coefficient, wherein the quantized transform coefficient level is a transform coefficient to which quantization is applied.
[0084] Non-zero transform coefficient: may refer to a transform coefficient whose value is not 0, or may refer to a transform coefficient level whose value is not 0.
[0085] Quantization matrix: may refer to a matrix used in quantization and inverse quantization to enhance the subject quality or object quality of an image. The quantization matrix may be referred to as a scaling list.
[0086] Quantization matrix coefficient: may refer to each element of the quantization matrix. Quantization matrix coefficient may also be referred to as matrix coefficient.
[0087] Default matrix: may refer to a predetermined quantization matrix predefined in an encoder and a decoder.
[0088] Non-default matrix: may refer to a quantization matrix sent / received by the user rather than pre-defined in the encoder and decoder.
[0089] Coding tree unit: may include one coding tree unit for the luma component (Y) and two related coding tree units for the chroma components (Cb, Cr). Each coding tree unit may be partitioned using at least one partitioning method such as a quadtree or a binary tree to configure sub-units such as coding units, prediction units, and transform units. A coding tree unit is used as a term to refer to a pixel block, which is a processing unit in the decoding / encoding process of an image (e.g., partitioning of an input image).
[0090] Coding tree block: may be used as a term for indicating one of a Y coding tree unit, a Cb coding tree unit, and a Cr coding tree unit.
[0091] Figure 1 is a block diagram showing the configuration of an encoding device according to an embodiment of the present invention.
[0092] The encoding apparatus 100 may be a video encoding apparatus or an image encoding apparatus. A video may include one or more images. The encoding apparatus 100 may encode the one or more images of the video in a temporal order.
[0093] Reference Figure 1 , the encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra-frame prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180 and a reference picture buffer 190.
[0094] The encoding device 100 may encode the input picture in intra mode or inter mode, or in both intra mode and inter mode. In addition, the encoding device 100 may generate a bit stream by encoding the input picture, and may output the generated bit stream. When intra mode is used as the prediction mode, the switch 115 may switch to intra. When inter mode is used as the prediction mode, the switch 115 may switch to inter. Here, intra mode may be referred to as intra prediction mode, and inter mode may be referred to as inter prediction mode. The encoding device 100 may generate a prediction block for an input block of the input picture. In addition, after generating the prediction block, the encoding device 100 may encode the residual between the input block and the prediction block. The input picture may be referred to as a current image, wherein the current image is the target of current encoding. The input block may be referred to as a current block or a coding target block, wherein the current block or the coding target block is the target of current encoding.
[0095] When the prediction mode is intra mode, the intra prediction unit 120 may use the pixel values of the previously encoded block adjacent to the current block as reference pixels. The intra prediction unit 120 may perform spatial prediction using the reference pixels and may generate prediction samples of the input block using spatial prediction. Here, intra prediction may refer to prediction within a frame.
[0096] When the prediction mode is inter mode, the motion prediction unit 111 may search for an area that best matches the input block from the reference picture in the motion prediction process and derive a motion vector by using the searched area. The reference picture may be stored in the reference picture buffer 190.
[0097] The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector. Here, a motion vector may be a two-dimensional vector used for inter-frame prediction. In addition, a motion vector may indicate the offset between the current picture and the reference picture. Here, inter-frame prediction may refer to prediction between frames.
[0098] The subtractor 125 may generate a residual block by using a residual between the input block and the prediction block. The residual block may be referred to as a residual signal.
[0099] The transform unit 130 may generate a transform coefficient by transforming the residual block and may output the transform coefficient. Here, the transform coefficient may be a coefficient value generated by transforming the residual block. In the transform skip mode, the transform unit 130 may skip transforming the residual block.
[0100] Quantized transform coefficient levels may be generated by applying quantization to transform coefficients. Hereinafter, in embodiments of the present invention, quantized transform coefficient levels may be referred to as transform coefficients.
[0101] The quantization unit 140 may generate quantized transform coefficient levels by quantizing the transform coefficients according to the quantization parameter, and may output the quantized transform coefficient levels. Here, the quantization unit 140 may quantize the transform coefficients by using a quantization matrix.
[0102] The entropy coding unit 150 may generate a bitstream by performing entropy coding on the value calculated by the quantization unit 140 or the encoding parameter value calculated in the encoding process according to the probability distribution, and may output the generated bitstream. The entropy coding unit 150 may perform entropy coding on information used to decode an image and may perform entropy coding on information of pixels of the image. For example, the information used to decode an image may include syntax elements, etc.
[0103] When entropy coding is applied, a symbol is represented by allocating a small number of bits to a symbol with a high probability of occurrence and a large number of bits to a symbol with a low probability of occurrence, thereby reducing the size of the bit stream for encoding the target symbol. Therefore, the compression performance of the image coding can be improved by entropy coding. For entropy coding, the entropy coding unit 150 can use coding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC) and context-adaptive binary arithmetic coding (CABAC). For example, the entropy coding unit 150 can perform entropy coding by using a variable length coding / code (VLC) table. In addition, the entropy coding unit 150 can derive a binarization method of the target symbol and a probability model of the target symbol / binary bit, and then perform arithmetic coding by using the derived binarization method or the derived probability model.
[0104] To encode the transform coefficient levels, the entropy encoding unit 150 may convert the two-dimensional block-form coefficients into a one-dimensional vector form using a transform coefficient scanning method. For example, the two-dimensional coefficients may be converted into a one-dimensional vector form by scanning the coefficients of the block using an upper right scan. Depending on the size of the transform unit and the intra-frame prediction mode, the two-dimensional block-form coefficients may be scanned in the column direction using a vertical scan, and the two-dimensional block-form coefficients may be scanned in the row direction using a horizontal scan, without using an upper right scan. That is, which scanning method to use, among upper right scan, vertical scan, and horizontal scan, may be determined based on the size of the transform unit and the intra-frame prediction mode.
[0105] The coding parameters may include information (such as syntax elements) encoded by the encoder and sent to the decoder, and may include information that can be derived during the encoding or decoding process. The coding parameters may refer to information necessary for encoding or decoding an image. For example, the coding parameters may include at least one value or combination of the following items: block size, block depth, block partition information, unit size, unit depth, unit partition information, partition flag in quadtree form, partition flag in binary tree form, partition direction in binary tree form, intra-frame prediction mode, intra-frame prediction direction, reference sample filtering method, prediction block boundary filtering method, filter taps, filter coefficients, inter-frame prediction mode, motion information, motion vector, reference picture index, inter-frame prediction direction, inter-frame prediction indicator, reference picture list, motion vector predictor, motion vector candidate list, information on whether to use motion merge mode, motion merge candidate, motion merge candidate list, information on whether to use skip mode, interpolation filtering a filter type, a motion vector size, an accuracy of motion vector representation, a transform type, a transform size, information on whether an additional (secondary) transform is used, information on whether a residual signal exists, a coding block mode, a coding block flag, a quantization parameter, a quantization matrix, in-loop filter information, information on whether a filter is applied in the loop, in-loop filter coefficients, a binarization / debinarization method, a context model, a context binary bit, a bypass binary bit, a transform coefficient, a transform coefficient level, a transform coefficient level scanning method, an image display / output order, a slice identification information, a slice type, a slice partition information, a parallel block identification information, a parallel block type, a parallel block partition information, a picture type, a bit depth, and information on a luminance signal or a chrominance signal.
[0106] The residual signal may refer to the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a residual signal of a block unit.
[0107] When the encoding apparatus 100 performs encoding using inter-frame prediction, the encoded current picture can be used as a reference picture for another picture to be processed later. Therefore, the encoding apparatus 100 can decode the encoded current picture and store the decoded picture as a reference picture. To perform decoding, inverse quantization and inverse transformation can be performed on the encoded current picture.
[0108] The quantized coefficients may be dequantized by the dequantization unit 160 and may be inversely transformed by the inverse transform unit 170. The dequantized and inversely transformed coefficients may be added to the prediction block by the adder 175, thereby generating a reconstructed block.
[0109] The reconstructed block may pass through the filter unit 180. The filter unit 180 may apply at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or the reconstructed picture. The filter unit 180 may be referred to as an in-loop filter.
[0110] A deblocking filter removes block distortion that occurs at block boundaries. To determine whether to operate the deblocking filter, the decision to apply the deblocking filter to the current block can be made based on the pixels included in a number of rows or columns within the block. When applying the deblocking filter to a block, a strong or weak filter can be applied depending on the desired deblocking filter strength. Furthermore, when applying the deblocking filter, horizontal and vertical filtering can be processed in parallel.
[0111] Sample adaptive offset adds an optimal offset value to pixel values to compensate for coding errors. Sample adaptive offset corrects the offset between the deblocking filtered image and the original image for each pixel. To perform offset correction on a specific image, a method can be used that applies an offset based on edge information for each pixel, or a method can be used that partitions the image pixels into a predetermined number of regions, determines the regions where offset correction will be performed, and applies the offset correction to the determined regions.
[0112] The adaptive loop filter can perform filtering based on a value obtained by comparing the reconstructed picture with the original picture. The pixels of the image can be partitioned into predetermined groups, a filter applied to each of the predetermined groups is determined, and different filtering can be performed on each of the predetermined groups. Information on whether the adaptive loop filter is applied to the luminance signal can be sent for each coding unit (CU). The shape and filter coefficients of the adaptive loop filter applied to each block can be different. In addition, an adaptive loop filter with the same form (fixed form) can be applied regardless of the characteristics of the target block.
[0113] The reconstructed block passed through the filter unit 180 may be stored in the reference picture buffer 190 .
[0114] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment of the present invention.
[0115] The decoding device 200 may be a video decoding device or an image decoding device.
[0116] refer to Figure 2 , the decoding apparatus 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 .
[0117] The decoding apparatus 200 may receive the bitstream output from the encoding apparatus 100. The decoding apparatus 200 may decode the bitstream in an intra mode or an inter mode. In addition, the decoding apparatus 200 may generate a reconstructed picture by performing decoding and may output the reconstructed picture.
[0118] When the prediction mode used in decoding is intra mode, the switch may be switched to intra mode. When the prediction mode used in decoding is inter mode, the switch may be switched to inter mode.
[0119] The decoding device 200 may obtain a reconstructed residual block from the input bitstream and may generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding device 200 may generate a reconstructed block as a decoding target block by adding the reconstructed residual block and the prediction block. The decoding target block may be referred to as a current block.
[0120] The entropy decoding unit 210 may generate symbols by performing entropy decoding on the bitstream according to the probability distribution. The generated symbols may include symbols having quantized transform coefficient levels. Here, the entropy decoding method may be similar to the entropy encoding method described above. For example, the entropy decoding method may be the inverse process of the entropy encoding method described above.
[0121] To decode the transform coefficient levels, the entropy decoding unit 210 may perform transform coefficient scanning, thereby converting the coefficients in one-dimensional vector form into a two-dimensional block form. For example, the coefficients in a block may be scanned using an upper right scan to convert the coefficients in one-dimensional vector form into a two-dimensional block form. Depending on the size of the transform unit and the intra-frame prediction mode, vertical scanning and horizontal scanning may be used instead of upper right scanning. In other words, the use of upper right scanning, vertical scanning, or horizontal scanning may be determined based on the size of the transform unit and the intra-frame prediction mode.
[0122] The quantized transform coefficient levels may be dequantized by the dequantization unit 220 and inversely transformed by the inverse transform unit 230. The quantized transform coefficient levels are dequantized and inversely transformed to generate a reconstructed residual block. Here, the dequantization unit 220 may apply a quantization matrix to the quantized transform coefficient levels.
[0123] When the intra mode is used, the intra prediction unit 240 may generate a prediction block by performing spatial prediction using pixel values of a previously decoded block adjacent to a decoding target block.
[0124] When the inter mode is used, the motion compensation unit 250 may generate a prediction block by performing motion compensation using both a motion vector stored in the reference picture buffer 270 and a reference picture.
[0125] The reconstructed residual block may be added to the prediction block by the adder 255. The block generated by adding the reconstructed residual block to the prediction block may pass through the filter unit 260. The filter unit 260 may apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or the reconstructed picture. The filter unit 260 may output the reconstructed picture. The reconstructed picture may be stored in the reference picture buffer 270 and may be used for inter-frame prediction.
[0126] Figure 3 is a diagram schematically illustrating a partition structure of an image when encoding and decoding the image. Figure 3 An embodiment of partitioning a unit into multiple subunits is schematically shown.
[0127] To efficiently partition an image, coding units (CUs) may be used in encoding and decoding. Here, a coding unit may refer to a unit for encoding. The unit may be a combination of 1) a syntax element and 2) a block containing image samples. For example, "partitioning a unit" may refer to "partitioning blocks associated with a unit." Block partition information may include information about the unit's depth. The depth information may indicate the number of times a unit is partitioned, the degree to which the unit is partitioned, or both.
[0128] Reference Figure 3 , the image 300 is partitioned sequentially for each largest coding unit (LCU), and a partition structure is determined for each LCU. Here, LCU and coding tree unit (CTU) have the same meaning. A unit may have depth information based on a tree structure and may be partitioned hierarchically. Each partitioned sub-unit may have depth information. The depth information indicates the number of times the unit is partitioned or the degree of partitioning of the unit, or both, and therefore, the depth information may include information about the size of the sub-unit.
[0129] The partition structure may refer to the distribution of coding units (CUs) in the LCU 310. A CU may be a unit for efficiently encoding / decoding an image. The distribution may be determined based on whether one CU is to be partitioned into multiple (positive integers equal to or greater than 2, including 2, 4, 8, 16, etc.). The width size and height size of the partitioned CU may be half the width size and half the height size of the original CU, respectively. Alternatively, the width size and height size of the partitioned CU may be smaller than the width size and height size of the original CU, respectively, depending on the number of partitions. The partitioned CU may be recursively partitioned into multiple further partitioned CUs, wherein, in the same partitioning method, the width size and height size of the further partitioned CU are smaller than the width size and height size of the partitioned CU.
[0130] Here, the partitioning of the CU may be recursively performed up to a predetermined depth. The depth information may be information indicating the size of the CU and may be stored in each CU. For example, the depth of the LCU may be 0, and the depth of the smallest coding unit (SCU) may be a predetermined maximum depth. Here, the LCU may be a coding unit having the largest size as described above, and the SCU may be a coding unit having the smallest size.
[0131] Whenever the LCU 310 begins to be partitioned and the width and height of the CU are reduced by partitioning, the depth of the CU increases by 1. In the case of a CU that cannot be partitioned, the CU may have a size of 2N×2N for each depth. In the case of a CU that can be partitioned, a CU with a size of 2N×2N may be partitioned into multiple CUs of N×N size. Whenever the depth increases by 1, the size of N is halved.
[0132] For example, when one coding unit is partitioned into four sub-coding units, the width and height of one of the four sub-coding units may be half the width and half the height of the original coding unit, respectively. For example, when a 32×32 sized coding unit is partitioned into four sub-coding units, each of the four sub-coding units may have a size of 16×16. When one coding unit is partitioned into four sub-coding units, the coding unit may be partitioned in a quadtree form.
[0133] For example, when one coding unit is partitioned into two sub-coding units, the width size or the height size of one of the two sub-coding units may be half the width size or half the height size of the original coding unit, respectively. For example, when a 32×32-sized coding unit is partitioned vertically into two sub-coding units, each of the two sub-coding units may have a size of 16×32. For example, when a 32×32-sized coding unit is partitioned horizontally into two sub-coding units, each of the two sub-coding units may have a size of 32×16. When one coding unit is partitioned into two sub-coding units, the coding unit may be partitioned in a binary tree form.
[0134] Reference Figure 3 , the size of an LCU with a minimum depth of 0 may be 64×64 pixels, and the size of an SCU with a maximum depth of 3 may be 8×8 pixels. Here, a CU with 64×64 pixels may be represented by a depth of 0 (as an LCU), a CU with 32×32 pixels may be represented by a depth of 1, a CU with 16×16 pixels may be represented by a depth of 2, and a CU with 8×8 pixels may be represented by a depth of 3 (as an SCU).
[0135] In addition, information about whether a CU is to be partitioned may be indicated by its partition information. The partition information may be 1-bit information. The partition information may be included in all CUs except the SCU. For example, when the partition information value is 0, the CU may not be partitioned, and when the partition information value is 1, the CU may be partitioned.
[0136] Figure 4 is a diagram illustrating a form of a prediction unit (PU) that may be included in a coding unit (CU).
[0137] The CU that is no longer partitioned among the multiple CUs partitioned from the LCU may be partitioned into at least one prediction unit (PU). This process may also be called partitioning.
[0138] A PU may be a basic unit for prediction. A PU may be encoded and decoded in any of skip mode, inter mode, and intra mode. A PU may be partitioned in various ways depending on the mode.
[0139] In addition, the coding unit may not be partitioned into a plurality of prediction units, and the coding unit and the prediction unit may have the same size.
[0140] like Figure 4 As shown, in skip mode, a CU may not be partitioned. In skip mode, a 2N×2N mode 410 having the same size as a CU without partitions may be supported.
[0141] In inter mode, eight partition types are supported within a CU. For example, in inter mode, 2N×2N mode 410, 2N×N mode 415, N×2N mode 420, N×N mode 425, 2N×nU mode 430, 2N×nD mode 435, nL×2N mode 440, and nR×2N mode 445 are supported. In intra mode, 2N×2N mode 410 and N×N mode 425 are supported.
[0142] A coding unit may be partitioned into one or more prediction units. A prediction unit may be partitioned into one or more sub-prediction units.
[0143] For example, when a prediction unit is partitioned into four sub-prediction units, the width and height of one of the four sub-prediction units may be half the width and half the height of the original prediction unit. For example, when a 32×32 prediction unit is partitioned into four sub-prediction units, each of the four sub-prediction units may have a size of 16×16. When a prediction unit is partitioned into four sub-prediction units, the prediction unit may be partitioned in a quadtree format.
[0144] For example, when a prediction unit is partitioned into two sub-prediction units, the width size or height size of one of the two sub-prediction units may be half the width size of the original prediction unit or half the height size of the original prediction unit. For example, when a 32×32-sized prediction unit is partitioned vertically into two sub-prediction units, each of the two sub-prediction units may have a size of 16×32. For example, when a 32×32-sized prediction unit is partitioned horizontally into two sub-prediction units, each of the two sub-prediction units may have a size of 32×16. When a prediction unit is partitioned into two sub-prediction units, the prediction unit may be partitioned in a binary tree form.
[0145] Figure 5 is a diagram illustrating a form of a transform unit (TU) that may be included in a coding unit (CU).
[0146] A transform unit (TU) may be a basic unit for transform, quantization, inverse transform, and inverse quantization within a CU. A TU may have a square shape or a rectangular shape, etc. A TU may be determined depending on the size of the CU or the form of the CU, or both.
[0147] A CU that is no longer partitioned among the multiple CUs partitioned from the LCU may be partitioned into at least one TU. Here, the partition structure of the TU may be a quadtree structure. For example, Figure 5 As shown, a CU 510 can be partitioned one or more times according to a quadtree structure. Partitioning a CU at least once may be referred to as recursive partitioning. By performing partitioning, a CU 510 can be formed from TUs of various sizes. Alternatively, the CU can be partitioned into at least one TU based on the number of vertical lines used to partition the CU, the number of horizontal lines used to partition the CU, or both. The CU can be partitioned into TUs that are symmetrical to each other, or into TUs that are asymmetrical to each other. To partition the CU into symmetrical TUs, information on the size / shape of the TUs can be signaled, and information on the size / shape of the TUs can be derived from the information on the size / shape of the CU.
[0148] In addition, the coding unit may not be partitioned into transformation units, and the coding unit and the transformation unit may have the same size.
[0149] One coding unit may be partitioned into at least one transformation unit, and one transformation unit may be partitioned into at least one sub-transformation unit.
[0150] For example, when a transform unit is partitioned into four sub-transformation units, the width and height of one of the four sub-transformation units may be half the width and half the height of the original transform unit, respectively. For example, when a 32×32 transform unit is partitioned into four sub-transformation units, each of the four sub-transformation units may have a size of 16×16. When a transform unit is partitioned into four sub-transformation units, the transform unit may be partitioned in a quadtree form.
[0151] For example, when a transform unit is partitioned into two sub-transformation units, the width size or height size of one of the two sub-transformation units may be half the width size or half the height size of the original transform unit, respectively. For example, when a transform unit of size 32×32 is partitioned vertically into two sub-transformation units, each of the two sub-transformation units may have a size of 16×32. For example, when a transform unit of size 32×32 is partitioned horizontally into two sub-transformation units, each of the two sub-transformation units may have a size of 32×16. When a transform unit is partitioned into two sub-transformation units, the transform unit may be partitioned in a binary tree form.
[0152] When performing the transformation, the residual block may be transformed using at least one of the predetermined transformation methods. For example, the predetermined transformation methods may include discrete cosine transform (DCT), discrete sine transform (DST), KLT, etc. The transformation method to be applied to the residual block may be determined by using at least one of inter-frame prediction mode information of the prediction unit, intra-frame prediction mode information of the prediction unit, and the size / shape of the transform block. Information indicating the transformation method may be signaled.
[0153] Figure 6 is a diagram for explaining an embodiment of a process of intra prediction.
[0154] The intra prediction mode may be a non-directional mode or a directional mode. The non-directional mode may be a DC mode or a planar mode. The directional mode may be a prediction mode having a specific direction or angle, and the number of directional modes may be M, where M is equal to or greater than 1. The directional mode may be indicated as at least one of a mode number, a mode value, and a mode angle.
[0155] The number of intra prediction modes may be N (where N is equal to or greater than 1), including a non-directional mode and a directional mode.
[0156] The number of intra prediction modes may vary depending on the size of the block. For example, when the size is 4×4 or 8×8, the number may be 67, when the size is 16×16, the number may be 35, when the size is 32×32, the number may be 19, and when the size is 64×64, the number may be 7.
[0157] Regardless of the size of the block, the number of intra prediction modes may be fixed to N. For example, regardless of the size of the block, the number may be fixed to at least one of 35 or 67.
[0158] The number of intra prediction modes may differ depending on the type of color component. For example, the number of prediction modes may differ depending on whether the color component is a luma signal or a chroma signal.
[0159] Intra-coding and / or decoding may be performed by using sample values or encoding parameters included in the reconstructed neighboring blocks.
[0160] In order to encode / decode a current block in intra prediction, it is possible to identify whether a sample included in a reconstructed neighboring block can be used as a reference sample for an encoding / decoding target block. When there are samples that cannot be used as reference samples for the encoding / decoding target block, the sample values are copied and / or interpolated into the samples that cannot be used as reference samples by using at least one of the samples included in the reconstructed neighboring block. Thus, the samples that cannot be used as reference samples can be used as reference samples for the encoding / decoding target block.
[0161] In intra-frame prediction, a filter may be applied to at least one of a reference sample or a prediction sample based on at least one of an intra-frame prediction mode and the size of a target block for encoding / decoding. Here, the target block for encoding / decoding may refer to a current block and may refer to at least one of a coding block, a prediction block, and a transform block. The type of filter applied to the reference sample or prediction sample may differ depending on at least one of the intra-frame prediction mode and the size / shape of the current block. The type of filter may also differ depending on at least one of the number of filter taps, the value of the filter coefficient, or the filter strength.
[0162] In the non-directional planar mode in the intra-frame prediction mode, when generating a prediction block of the encoding / decoding target block, the sample value in the prediction block can be generated by using the weighted sum of the upper reference sample of the current sample, the left reference sample of the current sample, the upper right reference sample of the current block, and the lower left reference sample of the current block according to the sample position.
[0163] In the non-directional DC mode of the intra prediction mode, when generating a prediction block for the encoding / decoding target block, the prediction block may be generated by averaging the upper reference sample of the current block and the left reference sample of the current block. In addition, filtering may be performed on one or more upper rows and one or more left columns adjacent to the reference sample in the encoding / decoding block using the reference sample values.
[0164] In the case of multi-directional mode (angular mode) in the intra prediction mode, a prediction block can be generated by using upper right and / or lower left reference samples, and the directional mode can have different directions. In order to generate prediction sample values, interpolation of real units can be performed.
[0165] In order to perform the intra-frame prediction method, the intra-frame prediction mode of the current prediction block can be predicted from the intra-frame prediction mode of the neighboring prediction block adjacent to the current prediction block. In the case of predicting the intra-frame prediction mode of the current prediction block by using the mode information predicted from the neighboring intra-frame prediction mode, when the current prediction block and the neighboring prediction block have the same intra-frame prediction mode, the following information can be sent by using predetermined flag information: the current prediction block and the neighboring prediction block have the same intra-frame prediction mode. When the intra-frame prediction mode of the current prediction block is different from the intra-frame prediction mode of the neighboring prediction block, the intra-frame prediction mode information of the encoding / decoding target block can be encoded by performing entropy coding.
[0166] Figure 7 is a diagram depicting a method for performing intra prediction on a current block according to an embodiment of the present invention.
[0167] like Figure 7 As shown, intra prediction may include: deriving an intra prediction mode ( S1210 ), constructing a reference sample ( S1220 ) and / or performing intra prediction ( S1230 ).
[0168] In the step of deriving the intra-frame prediction mode (S1210), the intra-frame prediction mode of the neighboring block may be used, the intra-frame prediction mode of the current block may be decoded from the bitstream (e.g., entropy decoding), and / or the intra-frame prediction mode of the current block may be derived using the encoding parameters of the neighboring block. Alternatively, in the step of deriving the intra-frame prediction mode (S1210), the intra-frame prediction mode of the current block may be derived using the intra-frame prediction mode of the neighboring block, a combination of one or more intra-frame prediction modes of the neighboring block, and / or an intra-frame prediction mode derived through the MPM.
[0169] In the step of constructing reference samples ( S1220 ), reference samples may be constructed by performing reference sample selection and / or reference sample filtering.
[0170] In the step of performing intra prediction (S1230), intra prediction can be performed on the current block using non-directional prediction, directional prediction, prediction based on position information, and / or prediction based on luma / chroma signals. In the step of performing intra prediction (S1230), filtering can also be performed on the prediction samples. If directional prediction is performed, different directional predictions can be performed based on one or more sample units. For example, the one or more sample units can be a single sample, a sample group, a row, and / or a sub-block.
[0171] Hereinafter, the step of deriving the intra prediction mode (S1210) will be described in more detail.
[0172] As described above, in order to derive the intra prediction mode of the current block, at least one of the following methods may be used: a method of using the intra prediction mode of one or more neighboring blocks, a method of decoding the intra prediction mode of the current block from a bitstream, and a method of using encoding parameters of neighboring blocks. The neighboring blocks may be one or more blocks reconstructed before encoding / decoding the current block.
[0173] If the neighboring block is located outside the boundary of at least one predetermined unit (such as a picture, slice, tile, and coding tree unit (CTU)), or the PCM mode or inter-frame prediction has been applied to the neighboring block, the neighboring block may be determined to be unavailable. The intra-frame prediction mode corresponding to the unavailable neighboring block may be replaced by the DC mode, the planar mode, or a predetermined intra-frame prediction mode.
[0174] The size of the current block may be W×H, where W and H are positive integers and may be equal to or different from each other. W and / or H may be, for example, at least one of 2, 4, 8, 16, 32, 64, 128, 256, and 512.
[0175] Figure 8 is a diagram depicting a method for deriving an intra prediction mode of a current block from neighboring blocks.
[0176] exist Figure 8 In the present disclosure, the a to k marked on the neighboring blocks may represent the intra-frame prediction mode or the number of intra-frame prediction modes of the neighboring blocks. The positions of the neighboring blocks used to derive the intra-frame prediction mode of the current block may be predefined fixed positions. Alternatively, information about the positions of the neighboring blocks may be derived through encoding / decoding. In the present disclosure, encoding / decoding may include entropy encoding and entropy decoding.
[0177] When using the intra prediction mode of a neighboring block, a specific mode of the neighboring block can be derived as the intra prediction mode of the current block. For example, the intra prediction mode i, f, b, g, h, j, l, or e of a neighboring block adjacent to a predetermined position of the current block can be derived as the intra prediction mode of the current block. The predetermined position can be encoded / decoded from the bitstream or can be derived based on encoding parameters.
[0178] Alternatively, one or more neighboring blocks of the current block may be selected. The selection may be made based on information explicitly signaled via the bitstream. Alternatively, the selection may be made based on criteria preset between the encoder and decoder. The intra-prediction mode of the current block may be derived from the intra-prediction modes of the selected one or more neighboring blocks. For example, the intra-prediction mode of the current block may be derived using statistics of the intra-prediction modes of the selected neighboring blocks. For example, the statistics may include a minimum value, a maximum value, an average value, a weighted average value, a most frequently occurring value, and / or a median value.
[0179] For example, the statistical values of part or all of the intra prediction modes b, f, g, i, and j of the neighboring blocks may be derived as the intra prediction mode of the current block.
[0180] Alternatively, the intra prediction mode of the current block may be derived by combining the intra prediction modes of one or more neighboring blocks. The intra prediction mode may be represented as at least one of a mode number, a mode value, and a mode angle. For example, the average of one or more intra prediction modes of neighboring blocks may be derived as the intra prediction mode of the current block. The average of two intra prediction modes may be at least one of the middle number between the two mode numbers, the median of the two mode values, and the middle angle between the two mode angles.
[0181] For example, a mode corresponding to the average of the mode values of the intra prediction modes i and f of the neighboring blocks to which the left and upper samples adjacent to the sample (0, 0) of the current block belong may be derived as the intra prediction mode of the current block. For example, the intra prediction mode Pred_mode of the current block may be derived by at least one of the methods (1), (2), and (3) described in [Equation 1].
[0182] [Equation 1]
[0183] Pred_mode=(i+f)>>1(1)
[0184] Pred_mode=(i+f+1)>>1(2)
[0185] Pred_mode=(i+f) / 2(3)
[0186] Alternatively, if the intra prediction mode i of the neighboring block is a non-directional mode, the intra prediction mode of the current block may be derived as intra prediction mode i. Alternatively, if the intra prediction mode f of the neighboring block is a directional mode, the intra prediction mode of the current block may be derived as intra prediction mode f.
[0187] Alternatively, the intra prediction mode of the current block may be derived as a mode corresponding to an average value of at least one of the mode values of the intra prediction modes b, f, g, i, and j of the neighboring blocks. For example, the intra prediction mode Pred_mode of the current block may be derived by at least one of the methods (1), (2), (3), and (4) described in [Equation 2].
[0188] [Equation 2]
[0189] Pred_mode=(f+g+i+j+2)>>2(1)
[0190] Pred_mode=(b+f+g+i+j) / 5(2)
[0191] Pred_mode=(i+f+k+l+2)>>2(3)
[0192] Pred_mode=(b+f+k+i+l) / 5(4)
[0193] Alternatively, a mode corresponding to an average value of available intra prediction modes of adjacent neighboring blocks may be derived as the intra prediction mode of the current block. For example, if the left neighboring block of the current block is located outside the boundary of a picture, tile, slice, and / or CTU, or corresponds to at least one of a PCM mode or an inter prediction mode and is therefore unavailable, a mode corresponding to statistical values of intra prediction modes (e.g., f and g) of upper neighboring blocks may be derived as the intra prediction mode of the current block.
[0194] For example, a weighted average or a weighted sum may be used as a statistical value of the intra-frame prediction mode of the neighboring block. Here, the weight may be assigned based on the directionality of the intra-frame prediction mode of the neighboring block. For example, a mode to which a relatively large weight is assigned may be predefined or signaled. For example, a mode to which a relatively large weight is assigned may be at least one of a vertical direction mode, a horizontal direction mode, and a non-directional mode. The same weight or different weights may be assigned to these modes. For example, the weighted sum of intra-frame prediction modes i and f may be derived as the intra-frame prediction mode Pred_mode of the current block by the following [Equation 3]. In the following [Equation 3], mode f may be a mode to which a relatively large weight is assigned (e.g., a vertical direction mode).
[0195] [Equation 3]
[0196] Pred_mode=(i+3×f+2)>>2
[0197] Alternatively, the weights used for the weighted sum may be determined based on the sizes of the neighboring blocks. For example, if the size of the block above the current block is larger than the size of the block to the left of the current block, a larger weight may be assigned to the intra-frame prediction mode of the above neighboring block. Alternatively, a larger weight may be assigned to the intra-frame prediction mode of the smaller neighboring block.
[0198] Alternatively, if one or more intra-frame prediction modes of the neighboring blocks are non-directional modes, the non-directional mode may be derived as the intra-frame prediction mode of the current block. Alternatively, the intra-frame prediction mode of the current block may be derived using the intra-frame prediction modes of the neighboring blocks other than the non-directional mode. If all intra-frame prediction modes of the neighboring blocks are non-directional modes, the intra-frame prediction mode of the current block may be derived as at least one of the DC mode and the planar mode.
[0199] Alternatively, the intra prediction mode of the current block may be derived using the most probable mode (MPM) based on the intra prediction modes of neighboring blocks. If the MPM is used, one or more pieces of information about the intra prediction mode of the current block may be encoded / decoded.
[0200] If MPM is used, an MPM list can be configured. The MPM list may include intra prediction modes derived based on the intra prediction modes of neighboring blocks. The MPM list may include N candidate modes. N is a positive integer and may vary depending on the size and / or shape of the current block. Alternatively, information about N may be signaled via the bitstream.
[0201] For example, the intra prediction mode of the current block derived using one or more intra prediction modes of neighboring blocks may be a candidate mode included in the MPM list.
[0202] exist Figure 8 In the example shown, the intra prediction mode of the neighboring blocks at the same position of (-1, H-1), (W-1, -1), (W, -1), (-1, H) and (-1, -1) adjacent to the current block can be used. For example, the MPM list can be generated in the order of j, g, plane, DC, l, k and b. Alternatively, the MPM list can be generated in the order of i, f, plane, DC, l, k and b. Repeated patterns can be included once in the MPM list. If the MPM list is not filled due to the presence of repeated patterns, additional candidate modes can be included in the list based on the patterns included in the list. For example, a pattern corresponding to +N or -N (N is a positive integer, such as 1) of the pattern included in the list can be added to the list. Alternatively, at least one of the modes not included in the list among the horizontal mode, vertical mode, 45 degree mode, 135 degree mode and 225 degree mode can be added to the list.
[0203] An indicator (eg, prev_intra_luma_pred_flag) indicating whether the same mode as the intra prediction mode of the current block exists in the derived MPM list may be encoded in a bitstream or may be decoded from a bitstream.
[0204] If the indicator indicates that the same mode as the intra prediction mode of the current block exists in the MPM list, index information (e.g., mpm_idx) indicating which mode the mode is among the modes included in the MPM list may be encoded in the bitstream or decoded from the bitstream. The intra prediction mode of the current block may be derived based on the decoded index information.
[0205] If the indicator indicates that there is no mode identical to the intra-frame prediction mode of the current block in the MPM list, information about the intra-frame prediction mode of the current block may be encoded in the bitstream or decoded from the bitstream. The intra-frame prediction mode of the current block may be derived based on the decoded information about the intra-frame prediction mode of the current block. Here, the intra-frame prediction modes not included in the MPM list may be arranged in at least one of ascending or descending order. Alternatively, one or more intra-frame prediction modes among the intra-frame prediction modes not included in the MPM list may be grouped into one or more groups. For example, modes corresponding to +N or -N (N is a positive integer, for example, 1, 2, or 3) of the intra-frame prediction modes included in the MPM list may be grouped into one group. Here, the group may include a predetermined number (for example, 8 or 16) of intra-frame prediction modes, and the modes included in the group may not be included in the MPM list.
[0206] Alternatively, a predetermined candidate in the derived MPM list may be derived as the intra prediction mode of the current block. For example, the mode corresponding to list 0, which is the first mode in the MPM list, may be derived as the intra prediction mode of the current block. Alternatively, an index corresponding to a predetermined mode in the list may be encoded / decoded, and the corresponding mode may be derived as the intra prediction mode of the current block.
[0207] Regarding the configuration of the MPM list, one MPM list may be generated for a block of a predetermined size. If the block of the predetermined size is divided into a plurality of sub-blocks, each of the plurality of sub-blocks may use the MPM list.
[0208] For example, if the current block corresponds to a block of a predetermined size, an MPM list may be generated for the current block. If the current block is divided into one or more subblocks, an intra prediction mode may be derived for each subblock using the constructed MPM list.
[0209] Regarding the configuration of the MPM list, the MPM list may be generated for each of the sub-blocks into which a block of a predetermined size is divided.
[0210] For example, if the current block corresponds to a block of a predetermined size, an MPM list may be generated for each subblock of the current block using intra prediction modes of neighboring blocks of the current block.
[0211] Alternatively, the intra prediction mode of the current block may be derived using at least one of the intra prediction mode of the current block derived through the MPM and the intra prediction mode of the neighboring block.
[0212] For example, if the intra prediction mode of the current block derived through the MPM is Pred_mpm, the intra prediction mode of the current block may be derived by changing Pred_mpm to a specific mode using one or more intra prediction modes of neighboring blocks.
[0213] For example, Pred_mpm may be increased or decreased by N by comparing Pred_mpm with the magnitude of the intra-prediction mode of a neighboring block. Here, N may be a predetermined integer, such as +1, +2, +3, 0, -1, -2, or -3. For example, if Pred_mpm is smaller than the intra-prediction mode of a neighboring block and / or a statistical value of the intra-prediction mode of one or more neighboring blocks, Pred_mpm may be increased. Alternatively, if Pred_mpm is larger than the intra-prediction mode of a neighboring block, Pred_mpm may be decreased. Alternatively, the intra-prediction mode of the current block may be derived based on Pred_mpm and / or a value compared with Pred_mpm.
[0214] exist Figure 8 In the example shown, for example, if Pred_mpm is less than the mode value of f, Pred_mpm+1 may be derived as the intra-frame prediction mode of the current block. Alternatively, if Pred_mpm is less than the average of the mode values of f and i, Pred_mpm+1 may be derived as the intra-frame prediction mode of the current block. Alternatively, if Pred_mpm is less than the average of the mode values of f and i, 1 / 2 of the difference between Pred_mpm and the average value may be increased. For example, Pred_mpm+{((f+i+1)>>1-Pred_mpm+1)>>1} may be derived as the intra-frame prediction mode of the current block.
[0215] Alternatively, if one of Pred_mpm and the mode of the neighboring block is a non-directional mode and the other is a directional mode, the non-directional mode may be derived as the intra prediction mode of the current block, or the directional mode may be derived as the intra prediction mode of the current block.
[0216] As mentioned above, the intra prediction mode of the current block can be derived by encoding / decoding. Here, the intra prediction mode of the neighboring block may not be used. For example, the intra prediction mode of the current block can be derived by entropy encoding / decoding the bitstream.
[0217] For example, if the current block is divided into lower layer blocks or subblocks, the intra prediction mode of each of the subblocks may be derived using at least one of the aforementioned methods for deriving the intra prediction mode of the current block.
[0218] The size of the current block and the size of the sub-block may be M×N. M and N may be the same positive integer or different positive integers. For example, the size of the current block or sub-block may be at least one of CTU, CU, SU (signaling unit), QTMax, QTMin, BTMax, BTMin, 4×4, 8×8, 16×16, 32×32, 64×64, 128×128, 256×256, 4×8, 8×16, 16×8, 32×64, 32×8, and 4×32. Here, QTMax and QTMin may respectively represent the maximum size and minimum size allowed for partitioning into a quadtree, and BTMax and BTMin may respectively represent the maximum size and minimum size allowed for partitioning into a binary tree. In the following, the size of a sub-block may mean the partition structure of the sub-block.
[0219] The subblock size may vary depending on the size of the current block. For example, 1 / N of the horizontal and vertical sizes of the current block may be the subblock size. N may be a positive integer and may be at least one of 2, 4, 8, 16, 32, and 64. For example, if the size of the current block is 32×32 and N in 1 / N of the horizontal and vertical sizes of the current block is 4, the subblock size may be 8×8.
[0220] Alternatively, the sub-block size may be a predetermined fixed size regardless of the size of the current block. For example, the sub-block size may be a minimum size regardless of the size of the current block, and may be, for example, 4×4.
[0221] Alternatively, the sub-block size may be determined based on a partition structure of a neighboring block of the current block. For example, if the adjacent neighboring block is partitioned, the sub-block size may be determined by partitioning the current block.
[0222] The subblock size may be determined based on the intra prediction mode of the neighboring blocks of the current block. For example, the subblock size may be determined by dividing the block into subblocks based on a boundary where the intra prediction modes of the neighboring blocks become different.
[0223] The subblock size may be determined based on encoding parameters of neighboring blocks. For example, the subblock size may be determined by dividing a block into subblocks based on whether the neighboring block is an intra-coded block or an inter-coded block.
[0224] At least one of the current block size, the subblock size, and N by which the current block is divided may be fixed to a predetermined value.
[0225] For example, in a case where a predetermined fixed size of a current block is 16×16, if the size of the current block is 16×16, the current block may be divided into subblocks and an intra prediction mode for each subblock may be derived.
[0226] For example, in the case where the predetermined fixed size of the current block is CTU and N is 4, if the size of the current block is CTU, the intra prediction mode can be derived based on subblocks, where each subblock is obtained by dividing the latitude and longitude of the CTU by 4.
[0227] One or more sub-blocks may be further divided into smaller blocks. For example, if the size of the current block is 32×32 and the sub-block size is 16×16, each of the one or more sub-blocks may be divided into smaller blocks, wherein the size of each smaller block is 8×8, 4×4, 16×8, 4×16, etc.
[0228] At least one of the current block size, the subblock size, and N by which the current block is divided may be encoded / decoded.
[0229] The partition structure of the subblocks of the current block may be encoded / decoded. The subblocks into which the current block is divided may have different sizes and / or shapes. In addition, an intra prediction mode may be derived for each subblock.
[0230] An indicator (e.g., a flag) indicating that the intra-frame prediction mode of the current block is derived using the intra-frame prediction mode of the neighboring block can be encoded / decoded. For example, the indicator can be NDIP_flag (neighborhood-dependent intra-frame prediction). The indicator can be encoded / decoded for at least one of the current block or each sub-block. The indicator can be encoded / decoded only when the current block size or sub-block size corresponds to a predetermined size or a predetermined size range. The predetermined size can be, for example, 64×64 or BTMax. As described above, the current block can be divided into a plurality of sub-blocks. The sub-block division structure can be predefined or encoded / decoded.
[0231] If NDIP_flag is 1 for the current block, the intra prediction mode of the current block or the intra prediction mode of each subblock of the current block may be derived using the intra prediction mode of the neighboring block. In this case, at least one of prev_intra_luma_pred_flag, mpm_idx, rem_intra_luma_pred_mode, intra_chroma_pred_mode, split_flag, QB_flag, quadtree_flag, binarytree_flag, and Btype_flag may not be encoded / decoded for the current block and / or subblock.
[0232] For example, if NDIP_flag is 1 for the current block, the intra prediction mode of the current block may be decoded, and then the intra prediction mode of each subblock may be derived using the decoded intra prediction mode and the intra prediction mode of the neighboring block. Here, at least one of prev_intra_luma_pred_flag, mpm_idx, rem_intra_luma_pred_mode, intra_chroma_pred_mode, split_flag, QB_flag, quadtree_flag, binarytree_flag, and Btype_flag of the subblock may not be encoded / decoded.
[0233] If NDIP_flag is 0 for the current block, information about at least one of an intra prediction mode of the current block or subblock and split information of the subblock may be encoded / decoded.
[0234] Among the subblocks of the current block, the intra prediction mode of the first subblock can be derived in a different manner than that of other subblocks. The first subblock can be one of multiple subblocks in the current block. For example, the first subblock can be the first subblock in a Z scan order.
[0235] The intra-frame prediction mode of the first sub-block may be referred to as an initial mode. For example, if the intra-frame prediction mode of each sub-block is derived as the average of the intra-frame prediction modes of the blocks to the left and above the sub-block, the initial mode may be derived using different methods. The different methods for deriving the initial mode may be at least one of the methods for deriving an intra-frame prediction mode according to the present invention.
[0236] For example, the Nth (e.g., first) mode listed in the MPM list may be derived as the initial mode. Alternatively, the most frequently occurring intra-frame prediction mode among the intra-frame prediction modes of one or more neighboring blocks of the current block may be used as the initial mode. Alternatively, the intra-frame prediction mode encoded / decoded for the current block may be derived as the initial mode. Alternatively, the intra-frame prediction mode encoded / decoded for the first sub-block may be derived as the initial mode.
[0237] Regarding deriving intra-frame prediction modes for subblocks in the current block, intra-frame prediction modes for one or more subblocks may be derived in an arbitrary order. The arbitrary order may be a scanning order, and the scanning may correspond to at least one of a raster scan, an upper right scan, a vertical scan, a horizontal scan, a diagonal scan, and a zigzag scan. The number of subblocks for which intra-frame prediction modes are derived in the scanning order may be one or more. The arbitrary order may be adaptively determined based on the intra-frame prediction modes of neighboring blocks.
[0238] Now, a detailed description will be given of the reference sample constructing step S1220.
[0239] In intra-frame prediction of a current block or a sub-block having a smaller size and / or shape than the current block, reference samples can be constructed for prediction. The following description is given in the context of a current block, and the current block can represent a sub-block. Reference samples can be constructed using one or more reconstructed samples or a combination of samples adjacent to the current block. In addition, filtering can be applied when constructing reference samples. Here, each reconstructed sample on a plurality of reconstructed sample lines can be used as is to construct the reference samples. Alternatively, reference samples can be constructed after filtering between samples on the same reconstructed sample line. Alternatively, reference samples can be constructed after filtering between samples on different reconstructed sample lines. The constructed reference samples can be represented by ref[m,n], and the reconstructed neighboring samples or samples obtained by filtering the reconstructed neighboring samples can be represented by rec[m,n]. Here, m or n can be a predetermined integer value.
[0240] Figure 9 is an exemplary diagram depicting a line of neighboring reconstructed samples that may be used for intra prediction of a current block.
[0241] The plurality of reconstructed sample lines may be, for example, one or more left and / or upper reconstructed sample lines adjacent to the current block. One or more reconstructed sample lines may be used to construct one or more reference samples. Figure 9 In the example shown, reference samples for intra prediction of a 4×4 current block can be constructed by selecting at least one of a plurality of left and / or upper reconstructed sample lines adjacent to the current block. Here, the same or different reconstructed sample lines can be used to construct the left reference samples and the upper reference samples. Figure 9 In the example shown, in directional prediction modes other than horizontal, vertical, and / or diagonal directions, one or more reconstructed samples on one reconstructed sample line may be used to construct reference samples for the current block.
[0242] For example, if the size of the current block is W (width) × H (height), if the position of the top left sample in the current block is (0, 0), the relative position of the top left reference sample closest to the sample position can be set to (-1, -1). To derive the reference sample of the current block, a weighted sum of one or more neighboring reconstructed samples can be used. Here, the distance from the reconstructed sample to the current block and the directionality of the intra prediction mode of the current block can be considered.
[0243] For example, when constructing reference samples for the current coding block using one or more reconstructed sample lines adjacent to the current block, the reference samples can be constructed by assigning different weights according to the distance from the current block and the directionality of the intra-frame prediction mode of the current block. The following [Equation 4] describes an example of using two reconstructed sample lines adjacent to the current block to construct reference samples using a weighted sum. The weighted sum can be calculated based on information about the current block (intra-frame prediction mode, size, shape and / or partition information of the current block) and / or information about the neighboring blocks (intra-frame prediction mode, size, shape and / or partition information of the neighboring blocks). For example, a filter (e.g., a 3-tap filter, a 5-tap filter, a 7-tap filter and / or an N-tap filter) applied to the weighted sum can be selected taking into account at least one of the above information.
[0244] [Equation 4]
[0245] ref[-1,-1]=(rec[-2,-1]+2×rec[-1,-1]+rec[-1,-2]+2)>>2
[0246] ref[x,-1]=(rec[x,-2]+3×rec[x,-1]+2)>>2, (x=0~W+H-1)
[0247] ref[-1,y]=(rec[-2,y]+3×rec[-1,y]+2)>>2, (y=0~W+H-1)
[0248] Alternatively, the reference sample may be constructed using at least one of an average value, a maximum value, a minimum value, a median value, and a most frequently occurring value of a plurality of reconstructed samples based on at least one of a distance from the current block and an intra-prediction mode of the current block. The plurality of reconstructed samples used may be filtered reconstructed samples from the same or different reconstructed sample lines.
[0249] Alternatively, a reference sample may be constructed based on changes (variations) in the values of a plurality of consecutive reconstructed samples on the same reconstructed sample line and / or different reconstructed sample lines. For example, a reference sample may be constructed based on at least one of the following: whether the difference between the values of two consecutive reconstructed samples is equal to or greater than a threshold, whether the values of two consecutive reconstructed samples change continuously or discontinuously, and the like. For example, if the difference between rec[-1, -1] and rec[-2, -1] is equal to or greater than a threshold, ref[-1, -1] may be determined to be rec[-1, -1] or a value obtained by applying a weighted average with a predetermined weight assigned to rec[-1, -1]. For example, if the values of the plurality of consecutive reconstructed samples change by n each time when the plurality of consecutive reconstructed samples are closer to the current block, the reference sample ref[-1, -1] may be determined to be rec[-1, -1]-n.
[0250] For example, the intra prediction block of the current coding block may be constructed by using one or more reconstructed sample lines adjacent to the current block and assigning different weights according to the distance and / or directionality from the current block. Figure 9 As shown, if the number of one or more reconstructed sample lines adjacent to the current block is 4, all four reconstructed sample lines are available, and the intra prediction direction of the current block is the upper left diagonal (45 degrees), the weighted sum of the four reconstructed samples rec[-4, -4], rec[-3, -3], rec[-2, -2] and rec[-1, -1] can be used to derive the prediction sample Pred(0,0) of the sample position (0,0) in the current block. As described above, in order to calculate the weighted sum, the accuracy of the filter can be adaptively selected based on at least one of the information about the current block (the intra prediction mode, size, shape and / or partition information of the current block) and / or the information about the neighboring blocks (the intra prediction mode, size, shape and / or partition information of the neighboring blocks). The tap length of the filter applied to the calculation of the weighted sum may be equal to or different from the number of the one or more reconstructed sample lines used. In Figure 9 In the example shown, Pred(0,0) can be derived using the following [Equation 5], for example.
[0251] [Equation 5]
[0252] Pred(0,0)=(w1×rec[-4,-4]+w2×rec[-3,-3]+w3×rec[-2,-2]+w4×rec[-1,-1])
[0253] In [Equation 5], the sum of weights w1 to w4 may or may not be 1. In addition, each of the weights may be positive or negative. For example, if the precision of the filter used to calculate the weighted sum is 4 bits, a shift may be performed to avoid rounding errors involved in decimal calculations. For example, in [Equation 6] below, weight w1 may be 1, weight w2 may be 2, weight w3 may be 5, and weight w4 may be 8. In addition, a shift of 4 and an offset of 8 (1<<(shift-1)) may be applied.
[0254] [Equation 6]
[0255] Pred(0,0)=(w1×rec[-4,-4]+w2×rec[-3,-3]+w3×rec[-2,-2]+w4×rec[-1,-1]+offset)>>shift
[0256] For example, before constructing the prediction sample, reference sample filtering may be performed on one or more reconstructed samples rec[-1, -1], rec[-2, -2], rec[-3, -3], and rec[-4, -4] from each reconstructed sample line or reconstructed sample lines different from each other, and the weighted sum may be calculated using the filtered values. Here, reference sample filtering may be performed by selectively applying any filter (e.g., at least one of a 3-tap filter, a 5-tap filter, a 7-tap filter, and an N-tap filter) based on at least one of information about the current block (intra-prediction mode, size, shape, and / or partition information of the current block) and / or information about the neighboring block (intra-prediction mode, size, shape, and / or partition information of the neighboring block).
[0257] For example, when constructing prediction samples using one or more reconstructed sample lines adjacent to the current block, the prediction samples may be constructed using at least one of an average value, a maximum value, a minimum value, a median value, or a most frequently occurring value of the one or more reconstructed sample lines, taking into account the distance from the current block and / or according to the directionality of the intra-frame prediction mode. Here, for the reconstructed samples on the multiple reconstructed sample lines used, reference sample filtering is performed on each reconstructed sample line or on reconstructed sample lines that are different from each other, and the average value, the maximum value, the minimum value, the median value, or the most frequently occurring value may be calculated using the filtered values to generate a prediction block.
[0258] For example, after detecting the reconstructed block most similar to the current block from the neighboring reconstructed samples rec[m, n], intra prediction can be performed using information obtained from the reconstructed block. At least one piece of position information (m, n) about the block most similar to the current block can be entropy encoded / decoded, or can be implicitly derived by performing the same operation in the decoder and the encoder.
[0259] For example, a prediction block most similar to the current block may be predicted from reconstructed samples, and a residual signal of the current block may be generated using a difference between the current block and the prediction block most similar to the current block detected from neighboring reconstructed samples.
[0260] For example, after deriving a prediction block most similar to the current block from the reconstructed samples, one or more reconstructed sample lines adjacent to the derived reconstructed samples may be used as reference samples for the current block. Alternatively, the reference samples for the current block may be derived using at least one of the following: one or more reference sample lines of the current block, or one or more reference sample lines adjacent to the prediction block most similar to the current block.
[0261] For example, the reference sample of the current coding block can be constructed using a weighted sum of the following items: a reference sample line determined to be the best among one or more reference sample lines available for the current block, and a reference sample line determined to be the best among one or more reference sample lines adjacent to a predicted block most similar to the current block derived from the reconstructed samples.
[0262] For example, an upper reference sample of the current block may be constructed from a reference sample line selected from one or more reference sample lines available for the current block. Furthermore, a left reference sample of the current block may be constructed from a reference sample line selected from one or more reference sample lines adjacent to a predicted block most similar to the current block derived from the reconstructed sample. The selected reference sample line may be the reference sample line determined to be the best among the one or more reference sample lines.
[0263] For example, a first residual signal may be obtained by performing intra prediction on the current block, a second residual signal may be obtained by applying an optimal intra prediction mode obtained from the intra prediction to a predicted block derived from the reconstructed samples that is most similar to the current block, and a difference between the first residual signal and the second residual signal may be used to generate a residual signal for the current block.
[0264] The length of the reference sample line can be different for each reconstructed sample line. For example, reconstructed sample line n can be constructed to be m samples longer or shorter than reconstructed sample line n-1.
[0265] Alternatively, each reference sample line can be reconstructed by shifting according to the intra-frame prediction mode. For example, if no reference sample exists at a position referenced by the intra-frame prediction mode, the corresponding reference sample line can be shifted so that a reference sample exists at that position. Which reference sample line is shifted and how much it is shifted can be determined based on the intra-frame prediction mode, the prediction angle, and / or the position of the reference sample line.
[0266] As described above, information indicating whether only the closest reference sample line is used or multiple reference sample lines are used to construct reference samples can be encoded / decoded. For example, the information can be encoded / decoded at at least one of a sequence level, a picture level, a slice level, a tile level, a CTU level, a CU level, a PU level, and a TU level. In addition, information regarding the availability of multiple reference sample lines can be signaled at a higher level.
[0267] Reference samples may be selected for intra prediction of the current block. For example, reference samples immediately to the left and / or above the current block may be used. Alternatively, the best reference sample for the current block may be constructed by searching all available reconstructed samples in the left column and / or above row that have already been reconstructed.
[0268] Figure 10 is a diagram depicting an embodiment of reconstructing a reference sample. Figure 10 In FIG, the portion surrounded by a thick line represents the current block. In addition, each grid represents a sample, and the shading of the grid may represent the sample value of the sample. That is, grids with similar shading may correspond to samples with similar sample values.
[0269] like Figure 10 As shown in (a), the reference samples above the current block may have a relatively low correlation with the current block. In this case, a reference sample with a high correlation with the current block may be detected from all available reconstructed samples in the row above the current block. The detected reference samples with a high correlation may be used to reconstruct the reference samples above the current block or all reference samples required for intra prediction of the current block. Figure 10 In the example shown in (a) of FIG, the reference samples at position a to position b in the upper row can be detected as reference samples with high correlation. Then, as Figure 10 As shown in (b), the upper reference sample of the current block can be reconstructed by shifting the detected reference sample with high correlation.
[0270] exist Figure 10 In the example shown, the information about the reference sample shift (i.e., the information about the horizontal shift) may have a positive integer value or a negative integer value. In addition, the default value of the information about the reference sample shift may be 0. The information about the reference sample shift may be encoded / decoded or may be implicitly derived in the encoder / decoder.
[0271] For example, when the position of the top left sample in the current block is (0, 0), if the best upper reference sample is located to the left of the position (-1, -1), the information about the reference sample shift may have a negative value. Furthermore, if the best upper reference sample is located to the right of the position (-1, -1), the information about the reference sample shift may have a positive value. Alternatively, the information may have a negative sign and a positive sign in a manner opposite to the above case. Furthermore, the negative sign and the positive sign may be determined based on any reference sample other than the position (-1, -1).
[0272] The unit for shifting the reference sample may be determined based on at least one piece of encoding information from among the following: intra prediction mode, block size and shape of the current block and / or neighboring blocks, and / or size, shape and / or partition information of the transform unit. For example, the reference sample may be shifted in units of one pixel or any number of pixels.
[0273] For example, if the relative position of the upper left sample in the current block is (0, 0), the best upper reference sample of the current block can be constructed using a predetermined unit within a search range about (-1, -1). The predetermined unit can be at least one of a pixel and a unit based on the block size. The unit based on the block size can be, for example, 1 / 2 or 1 / 4 of the block size. In addition, the block can be any type of block including a transform block. The search range can be an area including all upper reconstructed samples that can be used for the current block. Alternatively, the search range can be predefined in the encoder / decoder. Alternatively, information about the search range can be encoded / decoded, or can be implicitly derived in the same manner in the encoder / decoder.
[0274] For example, the size of the current block may be 8×8, and the shift unit may be 1 / 2 of the current block size, that is, 4. In this case, the encoder / decoder can reconstruct the best upper reference sample by shifting four pixels at a time within the configured search range. Here, for example, in order to encode a shift of one pixel unit (four pixels), the information on the reference sample shift may have a value of 1. For example, in order to encode a shift of two pixel units (8 pixels), the information on the reference sample shift may have a value of 2.
[0275] For example, the size of the current block may be 8×8, and the shift unit may be 1 / 4 of the current block size, that is, 2. In this case, the encoder / decoder can reconstruct the best upper reference sample by shifting two pixels at a time within the configured search range. Here, for example, in order to encode a shift of one pixel unit (two pixels), the information on the reference sample shift may have a value of 1.
[0276] Figure 11 is a diagram illustrating another embodiment of reconstructing a reference sample. Figure 11 In FIG, the portion surrounded by a thick line represents the current block. In addition, each grid represents a sample, and the shading of the grid may represent the sample value of the sample. That is, grids with similar shading may correspond to samples with similar sample values.
[0277] like Figure 11 As shown in (a), the reference samples located on the left side of the current block may have a relatively low correlation with the current block. In this case, a reference sample with a high correlation with the current block may be detected from all available reconstructed samples located in the left column of the current block. The detected reference samples with a high correlation may be used to reconstruct the left reference samples of the current block or all reference samples required for intra prediction of the current block. Figure 11 In the example shown in (a), the reference samples at position a to position b in the left column can be detected as reference samples with high correlation. Figure 11As shown in (b), the left reference sample of the current block can be reconstructed by shifting the detected reference samples with high correlation.
[0278] exist Figure 11 In the example shown, the information about the reference sample shift (i.e., the information about the vertical shift) can have a positive integer value or a negative integer value. In addition, the default value of the information about the reference sample shift can be 0. The information about the reference sample shift can be encoded / decoded or can be implicitly derived in the encoder / decoder.
[0279] For example, when the position of the top left sample in the current block is (0, 0), if the best upper reference sample is above the position (-1, -1), the information about the reference sample shift may have a negative value. Furthermore, if the best upper reference sample is below the position (-1, -1), the information about the reference sample shift may have a positive value. Alternatively, the information may have a negative sign and a positive sign in a manner opposite to the above case. Furthermore, the negative sign and the positive sign may be determined based on any reference sample other than the position (-1, -1).
[0280] The unit for shifting the reference sample may be determined based on at least one piece of encoding information from among the following: intra prediction mode, block size and shape of the current block and / or neighboring blocks, and / or size, shape and / or partition information of the transform unit. For example, the reference sample may be shifted in units of one pixel or any number of pixels.
[0281] For example, if the relative position of the top left sample in the current block is (0, 0), the optimal left reference sample of the current block can be constructed using a predetermined unit within a search range about (-1, -1). The predetermined unit can be at least one of a pixel and a unit based on the block size. The unit based on the block size can be, for example, 1 / 2 or 1 / 4 of the block size. In addition, the block can be any type of block including a transform block. The search range can be an area including all left reconstructed samples that can be used for the current block. Alternatively, the search range can be predefined in the encoder / decoder. Alternatively, information about the search range can be encoded / decoded, or can be implicitly derived in the encoder / decoder in the same manner.
[0282] For example, the size of the current block may be 8×8, and the shift unit may be 1 / 2 of the current block size, that is, 4. In this case, the encoder / decoder can reconstruct the best left reference sample by shifting four pixels at a time within the configured search range. Here, for example, in order to encode a shift of one pixel unit (four pixels), the information on the reference sample shift may have a value of 1. For example, in order to encode a shift of two pixel units (8 pixels), the information on the reference sample shift may have a value of 2.
[0283] For example, the size of the current block may be 8×8, and the shift unit may be 1 / 4 of the current block size, that is, 2. In this case, the encoder / decoder can reconstruct the best left reference sample by shifting two pixels at a time within the configured search range. Here, for example, in order to encode a shift of one pixel unit (two pixels), the information on the reference sample shift may have a value of 1.
[0284] The shifting of the reference samples for the current block may be applied to the available reconstructed samples located in the upper row or the available reconstructed samples located in the left column. Alternatively, the shifting may be applied to both the available reconstructed samples located in the upper row and the available reconstructed samples located in the left column. Alternatively, the shifting of the reference samples may be applied to at least one of the luma and chroma signal components.
[0285] The shift of the reference samples of the current block can be applied to the available reconstructed samples located on the left and / or above at the same time. For example, a positive shift based on the same shift information can mean a rightward shift of the reconstructed samples located on the above side, and an upward shift of the reconstructed samples located on the left side.
[0286] When reconstructing the reference samples of the current block using one or more reconstructed sample lines adjacent to the current block, reconstructing the reference samples by shifting of the reference samples may also be applied.
[0287] For example, when reconstructing the reference samples of the current block using one or more reconstructed sample lines, for each of the reconstructed sample lines, the shift of the reference samples according to the present invention can be applied to at least one of the upper direction and the left direction to reconstruct the reference samples. The encoder can construct the reference samples of the current block from any reconstructed sample line that minimizes the RD basic cost function.
[0288] For example, when reconstructing reference samples of a current block using one or more reconstructed sample lines, the reference samples may be reconstructed by applying a shift of the reference samples within an area configured by the one or more reconstructed sample lines. For example, when up to four lines of upper and / or left reconstructed samples are available, the area configured by the four reconstructed sample lines may be searched for the optimal upper and / or left reference samples of the current block. In this case, information (e.g., motion information) according to the horizontal and / or vertical shift may be encoded / decoded to be transmitted, or may be implicitly derived in the encoder / decoder.
[0289] When reconstructing reference samples of a current block using one or more reconstruction sample lines, the reference samples to be reconstructed may be divided by arbitrary units (pixels or any block size unit) and reconstructed from different reconstruction sample lines for each unit (interval).
[0290] When shifting reference samples at any position (upper or left), if all reference samples required for the current block are available at the shifted position, the reference sample shifting may be performed. Alternatively, if all or part of the reference samples required for the current block are unavailable at the shifted position, the reference sample shifting may be performed after filling the unavailable reference samples with adjacent available reference samples. For example, if all or part of the reference samples are located outside the boundaries of a picture, tile, slice, CTU, and / or CU, the corresponding reference samples may be determined to be unavailable.
[0291] After constructing reference samples for intra prediction of a current coding block, the reference samples of the current coding block may be reconstructed by exchanging and / or replacing the reference samples in units of one or more reference samples.
[0292] Figure 12 is a diagram illustrating another embodiment of reconstructing a reference sample. Figure 12 In FIG, the portion surrounded by a thick line represents the current block. In addition, each grid represents a sample, and the shading of the grid may represent the sample value of the sample. That is, grids with similar shading may correspond to samples with similar sample values.
[0293] like Figure 12 As shown in (a), after constructing the reference samples, the reference samples of part A and part B, each including four pixels, may be interchanged or replaced. For example, the reference samples may be interchanged or replaced so as to reconstruct a reference sample having a high correlation with the current block. For example, Figure 12 As shown in (b), the values of part A can be replaced by the values of part B. Alternatively, the reference sample of part A can be interchanged with the reference sample of part B.
[0294] In intra prediction of a current block, the current block may be divided into one or more prediction blocks according to the size and / or shape of the current block. When the prediction blocks refer to the same reference sample, intra prediction of one or more prediction blocks in the current block may be performed in parallel.
[0295] Figure 13 is a diagram depicting an embodiment of encoding / decoding a plurality of prediction blocks generated by splitting a current block.
[0296] like Figure 13 As shown in FIG, the 8×8 current block can be divided into two 8×4 prediction blocks. In the intra prediction of each prediction block, the same reference sample as the upper reference sample used for the first prediction block can be used to perform intra prediction on the second prediction block. As a result, intra encoding / decoding of the first prediction block and the second prediction block can be performed simultaneously.
[0297] Figure 14is a diagram illustrating another embodiment of encoding / decoding a plurality of prediction blocks generated by splitting a current block.
[0298] exist Figure 13 In the example shown, the upper reference sample for the first prediction block may have a low correlation with the second prediction block. Figure 14 In the example shown, after the upper reference samples for the first prediction block are compensated, the compensated upper reference samples are referenced as the upper reference samples for the second prediction block. Figure 14 As shown, the second prediction block can be encoded / decoded based on the reference samples obtained by compensating the upper reference samples used for the first prediction block. Here, the compensation value used for compensation can be calculated from the adjacent reconstructed samples. For example, the compensation value can be the difference A (A=ab) between the left reconstructed samples a and b. The compensation value can be used as is or after being scaled to any size according to the same rules in the encoder / decoder.
[0299] The aforementioned method is also applicable when intra prediction is performed in parallel for one or more blocks. Figure 13 and Figure 14 If each of the prediction blocks shown in is an (8×4) block, intra prediction may be performed in parallel using the same reference samples according to the aforementioned method.
[0300] If intra prediction is performed in parallel for one or more blocks, the upper-right sample of the second prediction block (or the block below) may not be available. In this case, the upper-right reference sample of the first prediction block (or the block above) can be copied. Alternatively, the reference sample of the second prediction block (or the block below) can be derived by compensating the upper-right reference sample of the first prediction block (or the block above). The compensation value used for compensation can be the difference value A calculated from the adjacent reconstructed samples or the scaled difference value A'.
[0301] In reference Figure 14 In the described example, the neighboring reconstructed samples for calculating the compensation value and / or the scaling factor for scaling can be determined based on the shape, size and / or position of the current block, the first prediction block and / or the second prediction block, the position of any standard sample, and / or the position of the current prediction sample.
[0302] Figure 13 and 14 The case where the current block is divided horizontally is shown. However, the current block can be divided vertically into one or more prediction blocks. If the current block is divided vertically into multiple prediction blocks and each prediction block is processed in parallel, the prediction blocks can be processed in the same manner as the reference blocks. Figure 13 and Figure 14The left reference sample of the second prediction block is derived from the left reference sample of the first prediction block in a manner similar to the above. In this case, the left reference sample of the first prediction block can also be compensated. In addition, the compensation value used for compensation can be the horizontal difference or the scaled difference between adjacent reconstructed samples.
[0303] After constructing the reference samples according to the aforementioned various methods, the coding mode with the minimum cost function value according to rate-distortion optimization may be determined as the intra prediction mode of the current block.
[0304] Information indicating that the reference sample and / or prediction sample has been constructed according to at least one of the aforementioned various methods may be encoded / decoded, or may be implicitly derived in the encoder / decoder. If information about the reference sample shift is explicitly encoded / decoded, at least one of the following entropy coding methods may be used. In addition, after binarization of the entropy-coded information, the binarized information may be finally encoded / decoded using CABAC (ae(v)).
[0305] - Truncated Rice binarization method
[0306] -Kth order Exponential Columbus binarization method
[0307] -Limited K-th order exponential Columbus binarization method
[0308] -Fixed length binarization method
[0309] -Unary Binarization Method
[0310] - Truncated unary binarization method
[0311] When selecting a reference sample, a decision may be made regarding the availability of a block including the reference sample and / or padding. For example, if a block including the reference sample is available, the reference sample may be used. Meanwhile, if the block including the reference sample is unavailable, the unavailable reference sample may be replaced with one or more available adjacent reference samples through padding.
[0312] If the reference sample exists outside at least one of a picture boundary, a tile boundary, a slice boundary, a CTB boundary, and a predetermined boundary, it may be determined that the reference sample is unavailable.
[0313] In case that the current block is encoded through CIP (Constrained Intra Prediction), if a block including a reference sample is encoded / decoded in an inter prediction mode, it may be determined that the reference sample is unavailable.
[0314] Figure 15 is a diagram depicting a method for replacing unavailable reconstruction samples with available reconstruction samples.
[0315] If it is determined that the adjacent reconstructed samples are unavailable, the unavailable samples can be replaced by the adjacent available reconstructed samples. Figure 15 As shown, when there are available samples and unavailable samples, one or more available samples may be used to replace the unavailable samples.
[0316] The sample values of the unavailable samples may be replaced with the sample values of the available samples in a predetermined order. Available samples adjacent to the unavailable samples may be used to replace the unavailable samples. In the absence of adjacent available samples, the first available sample or the closest available sample may be used. The order of replacing the unavailable samples may be from the bottom left to the top right. Alternatively, the order of replacing the unavailable samples may be from the top right to the bottom left. Alternatively, the order of replacing the unavailable samples may be from the top left to the top right and / or the bottom left. Alternatively, the order of replacing the unavailable samples may be from the top right and / or the bottom left to the top left.
[0317] like Figure 15 As shown in FIG, unavailable samples can be replaced in the order from the bottom left sample position 0 to the top right sample. In this case, the values of the first four unavailable samples can be replaced with the value of the first occurring or closest available sample a. The values of the next 13 unavailable samples can be replaced with the value of the last available sample b.
[0318] Alternatively, a combination of available samples may be used to replace an unavailable sample. For example, the average value of the available samples adjacent to both ends of the unavailable sample may be used to replace the unavailable sample. Figure 15 In the example, the first four unavailable samples can be filled with the value of available sample a, and the next 13 unavailable samples can be filled with the average of available sample b and available sample c. Alternatively, the 13 unavailable samples can be filled with any value between the value of available sample b and the value of available sample c. In this case, the unavailable sample can be replaced with a difference value. For example, when the unavailable sample is closer to available sample a, the value of the unavailable sample can be replaced with a value close to the value of available sample a. Similarly, when the unavailable sample is closer to available sample b, the value of the unavailable sample can be replaced with a value close to the value of available sample b. In other words, the value of the unavailable sample can be determined based on the distance from the unavailable sample to available samples a and / or b.
[0319] In order to replace the unavailable samples, one or more of a variety of methods including the above methods may be selectively applied. The method for replacing the unavailable samples may be signaled by information included in the bitstream, or a method predetermined by the encoder and decoder may be used. Alternatively, the method for replacing the unavailable samples may be derived by a predetermined scheme. For example, the method for replacing the unavailable samples may be selected based on the difference between the values of the available samples a and b and / or the number of unavailable samples. For example, the method for replacing the unavailable samples may be selected based on a comparison between the difference between the values of the two available samples and a threshold, and / or a comparison between the number of unavailable samples and a threshold. For example, if the difference between the values of the two available samples is greater than a threshold, and / or if the number of unavailable samples is greater than a threshold, the value of the unavailable sample may be replaced with a different value.
[0320] The method for replacing unusable samples may be selected based on a predetermined unit. For example, the method for replacing unusable samples may be selected based on at least one of a video, a sequence, a picture, a slice, a tile, a CTU, a CU, a PU, and a TU. Here, the method for replacing unusable samples may be selected based on information signaled based on the predetermined unit or information derived based on the predetermined unit. Alternatively, a method predetermined by the encoder and decoder may be applied.
[0321] Figure 16 is a diagram depicting another method for replacing unavailable reconstructed samples with available reconstructed samples.
[0322] exist Figure 16 In the example shown, the size of the current block is 8×8, and eight samples included in the block C above and to the right of the current block among the upper reference samples are unavailable. Figure 16 As shown in (a), the values of the 8 unavailable samples can be replaced by the sample value b of the available sample closest to the 8 unavailable samples. Or as Figure 16 As shown in (b), the values of the eight unavailable samples can be replaced by the value b' instead of the value b.
[0323] The value b' may be derived, for example, based on the gradient of the reference samples included in the block B. To calculate the value b', for example, the following pseudo code may be used.
[0324] [Table 1]
[0325]
[0326] First, the average value of the reference samples included in block B may be calculated. If the size of the current block is 8×8, eight reconstructed samples above the current block may be used when calculating the average value. Subsequently, b' may be derived by considering the gradient between the calculated average value and the sample value b.
[0327] After calculating the difference delta between the calculated average value and the sample value b, if the difference delta is greater than 0, it can be considered that the values of the eight reference samples included in block B are gradually decreasing. Therefore, b' can be derived by reflecting the decrement of the sample value b. If the difference delta is less than 0, it can be considered that the values of the eight reference samples included in block B are gradually increasing. Therefore, b' can be derived by reflecting the increment of the sample value b.
[0328] In pseudo code, the average value avg. can be the average value of as many available reference samples as the width of the current block. That is, in Figure 16 In , avg. may be the average value of eight reference samples included in block B. However, the number of reference samples used in calculating the average value is not limited thereto. For example, in Figure 16 In the example, the average value may be calculated using at least one of the eight reference samples included in block B. For example, avg. may be the average value of K available reference samples near the unavailable reference sample. For example, the average value may be calculated using only four right reference samples among the eight reference samples included in block B.
[0329] Furthermore, the difference delta in the pseudocode is calculated using the sample value b of one available reference sample, which should not be construed as limiting. For example, the difference delta can be calculated using at least one of the eight reference samples included in block B. For example, the at least one reference sample used to calculate the difference delta may be P available reference samples near the unavailable reference sample. For example, the average of the P reference samples may be used as the difference delta. The number P of available reference samples used to calculate the difference delta may be less than the number K of available reference samples used to calculate the average.
[0330] Furthermore, any other statistical value may be used instead of the average of the K available reference samples and / or the average of the P available reference samples used to derive the difference delta. The statistical value may be, for example, at least one of a weighted average, a maximum value, a minimum value, a median value, or a most frequently occurring value. If a weighted average is used, a weight may be determined based on the position of each of the available reference samples and / or the unavailable reference samples. For example, the weight may be inversely proportional to the distance between the available reference sample and the unavailable reference sample.
[0331] The value b' can be calculated by compensating the sample value b of the available reference sample with the gradient corresponding to the difference delta. The compensation value used for compensation can be the difference delta or the value scaled_delta obtained by scaling the difference delta using a scaling factor. The value scaled_delta can be greater than or less than delta.
[0332] exist Figure 16 In the example shown in (a), the values of the eight unavailable reference samples located at the lower left of the current block can be replaced by the sample value a of the available reference sample. Figure 16 The method described in (b) can replace the values of eight unavailable reference samples located below and to the left of the current block with the sample value a'. These methods can be applied to all of the upper reference samples and the left reference samples or to only one direction. The direction to which the method is applied can be determined based on the encoding information specifying the size, shape, and intra-frame prediction mode of the current block.
[0333] In addition, Figure 16 In the example shown, the values of the upper right or lower left unavailable reference samples can be uniformly replaced by the value a' or b'. Alternatively, different values can be applied to the unavailable reference samples by gradually scaling the initially obtained difference delta.
[0334] In case of using at least one reconstructed sample line adjacent to the current block, a padding method may also be adaptively applied.
[0335] Figure 17 is an exemplary diagram depicting the filling of reference samples when one or more reconstruction sample lines are used.
[0336] If multiple (e.g., up to four) reconstructed sample lines are used to generate reference samples for the current coding block, the upper right reference sample or the lower left reference sample on each reconstructed sample line may be unavailable. After generating reference samples for the unavailable reference samples according to the aforementioned method, the reconstructed sample line that is optimal in terms of RD may be set as the reference sample for the current block.
[0337] exist Figure 17 In the example shown, when up to four reconstructed sample lines are used to generate reference samples for the current block, the reconstructed samples in the dashed boxes may be unavailable. Information about the outermost available reconstructed samples (the reconstructed samples in the thick solid boxes) among the available reconstructed samples on the four reconstructed sample lines can be used to generate reference samples for the positions of the unavailable upper-right or lower-left reconstructed samples.
[0338] For example, to generate an unavailable reference sample located in the upper right corner of the current block, at least one of the four available reconstructed samples in the thick solid line box in the upper right corner of the current block may be used. For example, the non-reference sample may be filled by using at least one of the maximum value, minimum value, median value, average value, weighted average value, and most frequently occurring value of the N available reconstructed samples in the thick solid line box in the upper right corner. N may be, for example, 4.
[0339] Similarly, at least one of the four available reconstructed samples in the thick solid line box at the lower left of the current block may be used for the unavailable reference sample at the lower left of the current block.
[0340] Or, in Figure 17 In the example shown, one or more available reference samples, including or excluding the available reconstruction samples in the bold solid-line box, may be used to generate unusable reference samples.
[0341] For one or more constructed reference samples, whether to apply filtering and / or the type of filtering may be determined in different ways based on at least one of the intra prediction mode, size, and / or shape of the current block. Furthermore, filtering may be applied to at least one of the luma component and the chroma component.
[0342] For multiple reference sample lines, for example, whether to apply filtering may be determined differently. For example, filtering may be applied to a first adjacent reference sample line, and filtering may not be applied to a second adjacent reference sample line.
[0343] Furthermore, for example, both filtered and unfiltered values may be used for the same reference sample. For example, at least one different filter among a 3-tap filter, a 5-tap filter, a 7-tap filter, and an N-tap filter may be selected and applied based on at least one of the intra prediction mode, size, and / or shape of the current block. Here, N may be an integer.
[0344] For example, when the values of unavailable samples are replaced with the same values by using the values of neighboring available reference samples, the filtered reference sample values of the reference samples whose values have been replaced with the same values can all be equal despite reference sample filtering. Furthermore, since the filtered reference sample values are equal, if intra prediction is performed on the current block using a weighted sum of the reference sample values, the same predicted sample values can always be obtained. Therefore, in this case, the amount of computational effort of the encoder / decoder can be reduced by skipping the reference sample filtering operation and / or skipping the operation of deriving predicted sample values.
[0345] Figure 18 is a diagram depicting filtering of reference samples including padded unavailable reference samples.
[0346] like Figure 18 As shown in (a), the unavailable reference samples at the lower left and upper right of the current block can be filled with any value. Figure 18 In , the position of the upper left sample adjacent to the current block is (-1, -1). Figure 18 (b) shows the adjacent lower left and upper right reference samples in a one-dimensional array. Figure 18In the reference samples of the one-dimensional array shown in (b) of FIG, the padded lower left and upper right reference samples may not be filtered. Here, the padded lower left sample is included in block A, and the padded upper right sample is included in block B. The remaining samples except the padded lower left and upper right reference samples may be filtered. As described above, at least one different filter may be selected from a 3-tap filter, a 5-tap filter, a 7-tap filter, and an N-tap filter based on at least one of the information about the current block and / or the information about the neighboring blocks (intra-frame prediction mode, block size, block shape, size of the transform unit, and / or partitioning information). Here, N may be an integer. In the reference Figure 18 In the described example, the size of the one-dimensional array is (4×nTbs+1), where nTbs may be the width or height of the current block or the transform block.
[0347] Figure 19 This is a diagram illustrating filtering of reference samples including unavailable reference samples. For example, if the size of the current block is 8×8 and the lower left reference sample included in block A and the upper right reference sample in block B are unavailable, the values of the adjacent available reference samples may be used to replace the unavailable reference samples with the same values.
[0348] Figure 19 (a) shows an example of filtering all reference samples including padded reference samples, Figure 19 (b) shows an example of filtering reference samples other than the padded reference samples.
[0349] like Figure 19 As shown in (b), the reference samples replaced with the same value may not be subjected to reference sample filtering. Here, reference sample filtering may be applied only to the remaining reference samples other than the reference samples of block A or block B. Alternatively, reference sample filtering may be applied only to the reference samples other than the leftmost and / or rightmost reference samples among the remaining reference samples other than the reference samples of block A or block B. As described above, at least one different filter may be selected from a 3-tap filter, a 5-tap filter, a 7-tap filter, and an N-tap filter based on at least one of the information about the current block and / or the information about the neighboring blocks (intra-frame prediction mode, block size, block shape, size of the transform unit, and / or partition information). Here, N may be an integer.
[0350] For example, after replacing the value of the unavailable reference sample with the same value using the value of the available reference sample, the same reference sample value may be used to perform intra prediction. In this case, the operation of calculating the weighted sum according to distance and / or directionality may be skipped.
[0351] In the case of using one or more reconstructed sample lines adjacent to the current block, if each reconstructed sample line includes unavailable reference samples, a reference Figure 19 Described method.
[0352] If the reference samples are padded or filtered according to at least one of the aforementioned methods, information indicating the padding or filtering may be encoded / decoded, or the information indicating the padding or filtering may be implicitly derived in the encoder / decoder. If this information is explicitly encoded / decoded, at least one of the following entropy coding methods may be used. Furthermore, after binarization of the entropy-coded information, the binarized information may be finally encoded / decoded using CABAC(ae(v)).
[0353] - Truncated Rice binarization method
[0354] -Kth order Exponential Columbus binarization method
[0355] -Limited K-th order exponential Columbus binarization method
[0356] -Fixed length binarization method
[0357] -Unary Binarization Method
[0358] - Truncated unary binarization method
[0359] Now, a detailed description will be given of the step of performing intra prediction (S1230).
[0360] Intra prediction may be performed on the current block or subblock based on the derived intra prediction mode and the reference sample. In the following detailed description, the current block may refer to a subblock.
[0361] For example, non-directional intra prediction may be performed as intra prediction. The non-directional mode may be, for example, at least one of a DC mode and a planar mode.
[0362] If the non-directional mode is DC mode, intra prediction may be performed using the average of one or more of the constructed reference samples. Here, filtering may be applied to one or more prediction samples located at the boundary of the current block. The number of averages may be 1 or greater, and different averages may be used to perform prediction depending on the location of the target sample for prediction. Different reference samples may be used depending on at least one of the size or shape of the current block. For example, if the block size is larger than a predetermined size, one adjacent reference sample line may be used, while if the block size is smaller than the predetermined size, two adjacent reference sample lines may be used.
[0363] If the non-directional mode is the planar mode, intra prediction may be performed using a weighted sum calculated in consideration of distances from one or more constructed reference samples according to a position of a target sample for intra prediction in a current block.
[0364] As the intra prediction, for example, directional intra prediction may be performed. The directional mode may be, for example, at least one of a horizontal mode, a vertical mode, and a mode having a predetermined angle.
[0365] If the direction mode is the horizontal and / or vertical mode, intra prediction may be performed using at least one reference sample located on a horizontal and / or vertical line at the position of a target sample for intra prediction.
[0366] If the directional mode is a mode with a predetermined angle, intra prediction can be performed using one or more samples located on a line at a predetermined angle relative to the position of the target sample for intra prediction and adjacent to the line. Here, N reference samples can be used. N can be a positive integer (such as 2, 3, 4, 5, and 6), and intra prediction can be performed by applying an N-tap filter (such as a 2-tap filter, a 3-tap filter, a 4-tap filter, a 5-tap filter, and a 6-tap filter). Here, one or more reference sample lines can be used, and different filter types can be applied to each reference sample line. Intra prediction can be performed by calculating a weighted average of the values obtained by applying the filter to each line. The number of reference sample lines used for directional prediction may differ according to at least one of the directional mode, the size of the current block, and the shape of the current block.
[0367] Alternatively, intra prediction can be performed based on position information. The position information can be encoded / decoded, and the reconstructed sample block at that position can be derived as the intra prediction block for the current block. Alternatively, a block similar to the current block found by the decoder can be derived as the intra prediction block for the current block.
[0368] Alternatively, intra prediction may be performed based on the luma signal and / or the chroma signal. For example, intra prediction for a chroma signal may be performed using the reconstructed luma signal of the current block. For example, intra prediction for a chroma signal Cb of the current block may be performed using the reconstructed chroma signal Cb of the current block.
[0369] Intra-frame prediction can be performed by using one or more of the various intra-frame prediction methods described above in combination. For example, an intra-frame prediction block can be constructed for the current block by weighting a block predicted using a predetermined non-directional intra-frame prediction mode and a block predicted using a predetermined directional intra-frame prediction mode. Here, different weights can be applied according to at least one of the intra-frame prediction mode, block size, shape, and / or sample position of the current block.
[0370] Alternatively, regarding combined use of one or more intra prediction modes, a prediction block may be constructed using a weighted sum of a value predicted using the intra prediction mode of the current block and a value predicted using a predetermined mode included in the MPM list.
[0371] Alternatively, intra prediction may be performed using one or more reference sample sets. For example, intra prediction may be performed on the current block using a weighted sum of a block that is intra predicted using reference samples obtained without applying filtering to the constructed reference samples and a block that is intra predicted using reference samples obtained by applying filtering to the constructed reference samples.
[0372] In the intra prediction process, a filtering operation may be performed using neighboring reconstructed samples. Here, the filtering operation may be performed or not performed based on at least one of the intra prediction mode, block size, shape, and / or sample position of the current block. The filtering operation may be included in the intra prediction process and thus performed as a single step.
[0373] When performing intra prediction by dividing the current block into subblocks and deriving the intra prediction mode for each subblock using the intra prediction mode of a neighboring block, filtering may be applied to each subblock of the current block. For example, a low-pass filter may be applied to the entire current block. Alternatively, a filter may be applied to samples located at the boundary of each subblock. Alternatively, a filter may be applied to the predicted block or reconstructed block of each subblock, and one or more samples of the subblock to which the filter is applied may be used in intra prediction of subsequent subblocks.
[0374] When the current block is divided into subblocks and intra prediction is performed on each subblock, each subblock may refer to at least one of a coding / decoding block, a prediction block, and a transform block. For example, if the size of the current block is 64×64 and the size of the subblock is 16×16, an intra prediction mode as a prediction block for each subblock may be derived and / or intra prediction may be performed on the prediction block. If each of the one or more subblocks is further divided into 8×8 or 4×4 blocks, each of the 8×8 or 4×4 blocks may be a transform block, and intra prediction may be performed on the blocks obtained by further division using the intra prediction mode of the 16×16 block.
[0375] In directional intra prediction, at least one of N directional modes may be used to encode / decode the current block. Here, N may be a positive integer such as 33 or 65.
[0376] In directional intra prediction, the constructed reference samples can be reconstructed according to the directional prediction mode. For example, if the directional prediction mode is a mode that uses all of the left reference samples and the upper reference samples, a unidirectional array can be constructed using either the left reference samples or the upper reference samples.
[0377] Figure 20 It is depicted from P ref Generate a 1D reference sample array p 1,ref Schematic diagram of an embodiment of the present invention.
[0378] For example, Figure 20 As shown, one or more of the left reference samples can be used to construct a 1D array of upper reference samples. The upper reference samples can be constructed using different samples other than the left samples according to a directional pattern. The upper reference samples can be constructed by shifting the left reference samples, or by using a weighted sum of one or more left reference samples.
[0379] In directional intra prediction, real-number-based interpolation prediction can be performed. For example, as follows, based on the angle parameter (intraPredAngle) corresponding to each directional prediction mode, the offset (iIdx) and / or weight (iFact) used for predicting sample interpolation can be determined according to the position of the sample in the current block.
[0380] For example, assuming that interpolation is performed in units of 1 / 32 pixels, the offset and weight of a direction pattern having a vertical direction can be determined by the following [Equation 7].
[0381] [Equation 7]
[0382] iIdx=((y+1)×intraPredAngle)>>5
[0383] iFact=((y+1)×intraPredAngle)&31
[0384] Different prediction sample values can be determined according to the value of iFact in [Equation 7]. For example, if iFact is not 0, the reference sample array P 1,ref The predicted position in is not based on integer positions (complete sample positions) but on real number positions. Therefore, the predicted sample value at the target sample position (x, y) can be generated using multiple reference samples adjacent to the real number position (e.g., two adjacent reference samples on the left and right) using the following [Equation 8]. Here, the multiple adjacent reference samples can be 4 or 6 adjacent reference samples on the left and right.
[0385] [Equation 8]
[0386] Prediction sample [x][y] = ((32-iFact)×p1, ref[x+iIdx+1]+iFact×p1, ref[x+iIdx+2]+16)>>5
[0387] For example, if iFact is 0, the predicted sample value can be generated by the following [Equation 9]. Alternatively, the reference sample array P can be used. 1,ref and left and right reference samples to apply a 3-tap [1 / 4:2 / 4:1 / 4] filter.
[0388] [Equation 9]
[0389] Prediction sample [x][y] = p1, ref[x+iIdx+1]
[0390] In at least one of the horizontal mode and / or the vertical mode in the directional prediction mode, filtering may not be performed on the reference samples. Furthermore, interpolation prediction may not be required for the reference samples. Furthermore, since prediction can be performed using only the upper reference samples or the left reference samples, the process of constructing a one-dimensional array for the reference samples may not be necessary.
[0391] Now, a description will be given of steps of performing non-directional prediction according to the present invention.
[0392] In planar mode, intra prediction may be performed by calculating a weighted sum according to the location of a target intra prediction sample in a current block in consideration of distances from one or more constructed reference samples.
[0393] Figure 21 is a diagram depicting intra prediction according to an embodiment of the present invention.
[0394] The size of the current block may be 8×8, and the intra prediction mode of the current block may be planar mode. In planar mode, Figure 21 As shown, the weighted sum of the upper right reference sample TR and the lower left reference sample BL of the current block can be used to derive the lower right sample K in the current block. The weighted sum can be calculated based on at least one of the information about the current block and / or the information about the neighboring blocks (intra-frame prediction mode, block size, shape, size of the transform unit and / or partition information). Figure 21 In the example shown, the weighted sum of TR and BL is used to derive sample K, which should not be construed as limiting. For example, sample K can be derived by the average, minimum, maximum, or any weighted sum of TR and BL.
[0395] exist Figure 21 In the example shown, after replacing the samples included in the bottom row of the current block (in block A) with BL and replacing the samples included in the right column of the current block (in block B) with TR, the target prediction sample at the position (x, y) in the current block can be predicted as a weighted sum based on the positions of the samples. For example, [Equation 10] can be used.
[0396] [Equation 10]
[0397] pred[x, y]=(b×L+a×TR+d×T+c×BL+8)>>4
[0398] Alternatively, in another embodiment, for example, the samples in the bottom row (block A) of the current block may be derived as a weighted sum of the distances according to BL and K, and the samples in the right column (block B) of the current block may be derived as a weighted sum of the distances according to TR and K. Furthermore, the prediction target sample at any position (x, y) in the current block may be predicted as a weighted sum based on the position of each sample. Here, for example, [Equation 10] may be used, and a weighted sum of the distances according to TR and K and a weighted sum of the distances according to BL and K may be used instead of TR values and BL values, respectively.
[0399] Figure 22 is a diagram depicting intra prediction according to another embodiment of the present invention.
[0400] like Figure 22 As shown, intra prediction may be performed in a combination of the planar mode and the DC mode to generate an intra prediction block for the current block.
[0401] exist Figure 22 In the figure, the thick solid line represents the current 8×8 block.
[0402] like Figure 22 As shown in (a), after calculating the average value using at least one of the reference samples adjacent to the current block, 3-tap or 2-tap filtering may be performed on the boundary pixels (shadow pixels) in the left column and upper row within the current block based on the adjacent reference samples. For example, the filter used in the filtering may have Figure 22 Any shape among the shapes shown on the right in (a).
[0403] Then, if Figure 22 As shown in (b), after calculating the average value DCVal using at least one of the reference samples adjacent to the current block, intra prediction may be performed on a target prediction block (hereinafter referred to as a "center block") including one or more samples adjacent to the center of the current block. The target prediction block may be the same as the 8×8 current block, or the size and / or shape of the target prediction block may be smaller, for example, 2×2, 3×3, 4×4, etc.
[0404] For example, as in planar mode, the lower-right sample K in the current block can be derived using a weighted sum of the upper-right reference sample TR and the lower-left reference sample BL of the current block. The weighted sum can be calculated based on at least one of information about the current block and / or information about neighboring blocks (intra-frame prediction mode, block size, shape, transform unit size, and / or partition information). The use of the weighted sum of TR and BL to derive sample K should not be construed as limiting. For example, sample K can be derived using the average, minimum, maximum, or any other weighted sum of TR and BL.
[0405] For example, samples included in the bottom row of the current block (in block A) may be replaced with BL, and samples included in the right column of the current block (in block B) may be replaced with TR. Alternatively, samples included in the bottom row of the current block (in block A) may be derived as a weighted sum of distances according to BL and K, and samples included in the right column of the current block (in block B) may be derived as a weighted sum of distances according to TR and K.
[0406] Then, the blocks to the left, right, above, and below the center block of the current block can be predicted ( Figure 22 Then, the remaining blocks (in Figure 22 For example, intra prediction may be performed on the remaining blocks independently or in parallel.
[0407] As previously described, edge pixels in the current block and center blocks of any size can be predicted. Furthermore, if each subblock includes at least one target prediction sample, intra prediction can be performed per subblock using at least one of the predicted neighboring sample values. Intra prediction can be performed based on at least one of the information about the current block and / or neighboring blocks (intra prediction mode, block size, shape, transform unit size, and / or partition information).
[0408] For example, Figure 22 Each of the four sub-blocks (blocks marked with "1") shown in (c) of FIG. 1 has information on prediction performed on the center, top, bottom, left, and / or right sides according to the above method. Therefore, intra prediction can be performed on each sub-block independently or in parallel. It is also possible to perform intra prediction on each sub-block based on information on neighboring samples for which intra prediction has been performed, for example, by calculating a weighted sum. Figure 22 The four sub-blocks shown in (d) (blocks marked with "2") are subjected to intra prediction per sub-block independently or in parallel.
[0409] Figure 23 is a diagram illustrating intra prediction according to another embodiment of the present invention.
[0410] After generating reference samples for the current block, the current block may be divided into one or more sub-blocks according to the size and / or shape of the current block. Subsequently, intra prediction may be performed by changing the positions of the sub-blocks. Figure 23 The described method is applicable to non-directional prediction as well as directional prediction.
[0411] For example, Figure 23 As shown, intra prediction can be performed for the 8×8 current block. Here, after randomly changing the positions of the four sub-blocks obtained by dividing the current block, intra prediction can be performed. Figure 23 The current block shown in is divided into four sub-blocks, but the division of the current block is not limited thereto. The current block may be divided into N sub-blocks, where N is equal to or greater than 2.
[0412] For example, the current block may be divided into four subblocks. In addition, after reordering sample values within the current block in each subblock obtained by dividing the current block according to the same rule defined in the encoder / decoder, intra prediction may be performed.
[0413] For example, after dividing the current block into two or more subblocks, the positions of the subblocks may be changed or the coded samples of the subblocks may be reordered. Alternatively, the position change of the subblocks and the reordering of the samples in the subblocks may be performed simultaneously.
[0414] Instructions have been followed as per reference Figure 21 、 Figure 22 and Figure 23 Information indicating that intra-frame prediction is performed using at least one of the described methods may be encoded / decoded or may be implicitly derived in the encoder / decoder. If this information is explicitly encoded / decoded, at least one of the following entropy encoding methods may be used. Furthermore, after binarization of the entropy-coded information, the binarized information may be finally encoded / decoded using CABAC (ae(v)).
[0415] - Truncated Rice binarization method
[0416] -Kth order Exponential Columbus binarization method
[0417] -Limited K-th order exponential Columbus binarization method
[0418] -Fixed length binarization method
[0419] -Unary Binarization Method
[0420] - Truncated unary binarization method
[0421] Intra-frame encoding / decoding processing may be performed for each of the luminance signal and the chrominance signal. For example, in the intra-frame encoding / decoding processing, at least one method of deriving an intra-frame prediction mode, dividing blocks, constructing reference samples, and performing intra-frame prediction may be applied differently to the luminance signal and the chrominance signal.
[0422] The intra-frame encoding / decoding process may be performed identically for the luma signal and the chroma signal. For example, when the intra-frame encoding / decoding process is applied to the luma signal, at least one of deriving an intra-frame prediction mode, partitioning blocks, constructing reference samples, and performing intra-frame prediction may be applied identically to the chroma signal.
[0423] The method can be performed in the same manner in both the encoder and the decoder. For example, in intra-frame encoding / decoding processing, at least one of the methods of deriving an intra-frame prediction mode, partitioning a block, constructing a reference sample, and performing intra-frame prediction can be applied in the same manner in both the encoder and the decoder. Furthermore, the order in which these methods are applied can be different in the encoder and the decoder. For example, when performing intra-frame encoding / decoding on a current block, the encoder can encode the intra-frame prediction mode determined by performing at least one intra-frame prediction after constructing a reference sample.
[0424] Embodiments of the present invention may be applied based on the size of at least one of a coding block, a prediction block, a block, and a unit. Here, the size may be defined as a minimum size and / or a maximum size for the embodiment to be applied, and may be defined as a fixed size to which the embodiment is applied. Furthermore, the first embodiment may be applied at a first size, and the second embodiment may be applied at a second size. In other words, the embodiments may be applied multiple times depending on the size. Furthermore, the embodiments of the present invention may be applied only when the size is equal to or greater than the minimum size and equal to or less than the maximum size. In other words, the embodiments may be applied only when the block size is within a predetermined range.
[0425] For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or greater than 8×8. For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or greater than 16×16. For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or greater than 32×32. For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or greater than 64×64. For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or greater than 128×128. For example, the embodiment is applicable only when the size of the encoding / decoding target block is 4×4. For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or less than 8×8. For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or less than 16×16. For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or greater than 8×8 and equal to or less than 16×16. For example, the embodiment is applicable only when the size of the encoding / decoding target block is equal to or larger than 16×16 and equal to or smaller than 64×64.
[0426] The embodiments of the present invention can be applied according to time layers. An identifier for identifying a time layer to which the embodiments are applicable can be signaled, and the embodiments can be applied to the time layer specified by the identifier. Here, the identifier can be defined as indicating the minimum layer and / or maximum layer to which the embodiments are applicable, and can be defined as indicating a specific layer to which the embodiments are applicable.
[0427] For example, the embodiment may be applied only when the temporal layer of the current picture is the lowest layer. For example, the embodiment may be applied only when the temporal layer identifier of the current picture is zero. For example, the embodiment may be applied only when the temporal layer identifier of the current picture is equal to or greater than 1. For example, the embodiment may be applied only when the temporal layer of the current picture is the highest layer.
[0428] As described in the embodiments of the present invention, a reference picture set used in the processes of reference picture list construction and reference picture list modification may use at least one of the reference picture lists L0, L1, L2, and L3.
[0429] According to an embodiment of the present invention, when the deblocking filter calculates the boundary strength, at least one to a maximum of N motion vectors of the encoding / decoding target block may be used. Here, N indicates a positive integer equal to or greater than 1, such as 2, 3, 4, etc.
[0430] In motion vector prediction, embodiments of the present invention may be applied when a motion vector has at least one of a 16-pixel (16-pel) unit, an 8-pixel (8-pel) unit, a 4-pixel (4-pel) unit, an integer-pixel (integer-pel) unit, a 1 / 2-pixel (1 / 2-pel) unit, a 1 / 4-pixel (1 / 4-pel) unit, a 1 / 8-pixel (1 / 8-pel) unit, a 1 / 16-pixel (1 / 16-pel) unit, a 1 / 32-pixel (1 / 32-pel) unit, and a 1 / 64-pixel (1 / 64-pel) unit. Furthermore, when performing motion vector prediction, a motion vector may be optionally used for each pixel unit.
[0431] A stripe type to which the embodiments of the present invention are applicable may be defined, and the embodiments of the present invention may be applied according to the stripe type.
[0432] For example, when the slice type is T (three-way prediction)-slice, a prediction block can be generated by using at least three motion vectors and can be used as a final prediction block of an encoding / decoding target by calculating a weighted sum of the at least three prediction blocks. For example, when the slice type is Q (four-way prediction)-slice, a prediction block can be generated by using at least four motion vectors and can be used as a final prediction block of an encoding / decoding target block by calculating a weighted sum of the at least four prediction blocks.
[0433] The embodiments of the present invention are applicable to inter-frame prediction and motion compensation methods using motion vector prediction, as well as inter-frame prediction and motion compensation methods using skip mode, merge mode, and the like.
[0434] The shape of a block to which an embodiment of the present invention is applied may have a square shape or a non-square shape.
[0435] In the above embodiments, these methods are described based on a flow chart having a series of steps or units, but the present invention is not limited to the order of these steps. On the contrary, some steps can be performed simultaneously with other steps or in a different order. In addition, it should be understood by those skilled in the art that the steps in the flow chart do not exclude each other without affecting the scope of the present invention, and other steps can be added to the flow chart, or some of the steps can be deleted from the flow chart.
[0436] The embodiments include various aspects of the examples. It is not possible to describe all possible combinations of the various aspects, but those skilled in the art will be able to recognize different combinations. Therefore, the present invention includes all replacements, modifications and changes within the scope of the claims.
[0437] The embodiments of the present invention can be implemented in the form of program instructions that can be executed by various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium can include program instructions, data files, data structures, etc. individually, or can include a combination of program instructions, data files, data structures, etc. The program instructions recorded in the computer-readable recording medium can be specially designed and constructed for the present invention or well known to those of ordinary skill in the field of computer software technology. Examples of computer-readable recording media include magnetic recording media (such as hard disks, floppy disks, and magnetic tapes), optical data storage media (such as CD-ROMs or DVD-ROMs), magneto-optical media (such as floppy disks), and hardware devices (such as read-only memories (ROMs), random access memories (RAMs), and flash memories) that are specially constructed to store and implement program instructions. Examples of program instructions include not only machine language codes formatted by a compiler, but also high-level language codes that can be implemented by a computer using an interpreter. The hardware device can be configured to be operated by one or more software modules or vice versa to perform processing according to the present invention.
[0438] Although the present invention has been described in terms of specific items (such as, detailed elements and limited embodiments and drawings), they are only provided to help a more general understanding of the present invention, and the present invention is not limited to the above embodiments. It will be understood by those skilled in the art that various modifications and changes can be made from the above description.
[0439] Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and the full scope of the appended claims and their equivalents should fall within the scope and spirit of the present invention.
[0440] Industrial Applicability
[0441] The present invention can be used when encoding / decoding an image.
Claims
1. An image decoding method, comprising: Derivation of intra prediction mode for the current block; determining a search range of reference samples for intra prediction of the current block; determining the reference sample for the intra prediction of the current block in the search range of the reference samples; generating a prediction block by performing the intra prediction on the current block based on the intra prediction mode and the reference sample, wherein the reference samples are separated from each other by a predetermined sample unit in the search range, wherein the current block is obtained by partitioning a coding tree block based on partition information signaled from a bitstream, The partition information includes a partition flag indicating whether to partition the coding tree block.
2. The method according to claim 1, in, The search range is determined based on the intra prediction mode of the current block and a size of the current block.
3. The method according to claim 1, in, The predetermined sample unit is determined based on the size of the current block.
4. The method according to claim 1, in, The predetermined sample unit is determined to be a half or a quarter of the size of the current block.
5. An image encoding method, comprising: determining an intra prediction mode for a current block; determining a search range of reference samples for intra prediction of the current block; determining the reference sample for the intra prediction of the current block in the search range of the reference samples; generating a prediction block by performing the intra prediction on the current block based on the intra prediction mode and the reference sample, wherein the reference samples are separated from each other by a predetermined sample unit in the search range, The current block is obtained by dividing the coding tree block. The partition information includes a partition flag indicating whether to partition the coding tree block. The partition information is encoded into the bit stream.
6. The method according to claim 5, in, The search range is determined based on the intra prediction mode of the current block and a size of the current block.
7. The method according to claim 5, in, The predetermined sample unit is determined based on the size of the current block.
8. The method according to claim 5, in, The predetermined sample unit is determined to be a half or a quarter of the size of the current block.
9. A method for transmitting a bit stream generated by an image encoding method, the encoding method comprising: determining an intra prediction mode for a current block; determining a search range of reference samples for intra prediction of the current block; determining the reference sample for the intra prediction of the current block in the search range of the reference samples; generating a prediction block by performing the intra prediction on the current block based on the intra prediction mode and the reference sample, wherein the reference samples are separated from each other by a predetermined sample unit in the search range, The current block is obtained by dividing the coding tree block. The partition information includes a partition flag indicating whether to partition the coding tree block. The partition information is encoded into the bit stream.
10. The method according to claim 9, in, The search range is determined based on the intra prediction mode of the current block and a size of the current block.
11. The method according to claim 9, in, The predetermined sample unit is determined based on the size of the current block.
12. The method according to claim 9, in, The predetermined sample unit is determined to be a half or a quarter of the size of the current block.
Citation Information
Patent Citations
Image encoding / decoding method and apparatus for same
CN103404151A
Method of decoding moving pictures in intra prediction
CN104702950A