Image processing method and apparatus therefor
By using parameters of the current block and surrounding blocks to determine the filtering and filter type for non-square blocks, the problem of blurred filtering criteria in intra-frame prediction mode is solved, prediction accuracy is improved, memory consumption is reduced, and image quality is improved.
Patent Information
- Application Number
- CN202311209039.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2016-09-30
- Filing Date
- 2017-09-28
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2037-09-28
AI Technical Summary
In existing still or moving image compression techniques, the determination of reference sample filtering and filter type for non-square blocks in intra-frame prediction modes suffers from ambiguity, affecting prediction accuracy.
By using parameters of the current block and surrounding blocks, including edge length, quantization parameters, number of samples, distance between predicted samples and reference samples, it determines whether to perform filtering and the type of filter, independently processes the filtering of the top and left reference samples, and avoids defining separate tables for non-square blocks.
It improves prediction accuracy, reduces encoder/decoder memory consumption, and enhances prediction performance for artifacts and fine images.
Smart Images

Figure CN117255194B_ABST
Abstract
Description
[0001] Division Statement
[0002] This application is a divisional application of the invention patent application with PCT international application number PCT / KR2017 / 010778, international application date September 28, 2017, application number 201780073917.6 entering the Chinese national phase, and invention name “Image processing method and device thereof”. Technical Field
[0003] The present invention relates to a method for processing a still image or a moving image, and more particularly, to a method for encoding / decoding a still image or a moving image based on an intra-frame prediction mode and a device supporting the method. Background Art
[0004] Compression coding refers to a series of signal processing techniques used to transmit digitized information over communication lines or to store information in a form suitable for storage media. Media such as pictures, images, and audio can be compressed, and specifically, compression coding of pictures is called video compression.
[0005] The next generation of video content is assumed to have high dimensionality, high spatial resolution, and high frame rate. Processing such content will lead to a dramatic increase in memory storage, memory access rate, and processing power.
[0006] Therefore, there is a need to design a coding tool for efficiently processing next-generation video content. Summary of the Invention
[0007] Technical issues
[0008] In existing still image or motion image compression technologies, a block-based video compression method is used. Specifically, in intra-frame prediction mode, when the current processing block is a non-square block, there is a problem of ambiguous criteria for determining whether to perform reference sample filtering and / or the filter type.
[0009] To solve this problem, an object of the present invention is to provide a method and apparatus capable of improving prediction accuracy by determining whether to perform reference sample filtering and / or filtering type using parameters related to a current block and / or parameters related to surrounding blocks of the current block.
[0010] In addition, an object of the present invention is to provide a method and apparatus for determining whether to perform filtering and / or the filter type based on the length of a side of a current block, the number of samples, a quantization parameter, or the distance between a prediction sample and a reference sample as parameters of the current block.
[0011] In addition, an object of the present invention is to provide a method and apparatus for determining whether to perform filtering and / or the filter type based on a quantization parameter of a surrounding block as a surrounding block parameter, the number of residual coefficients, a flag indicating whether there are residual coefficients, or block boundary-related information.
[0012] Furthermore, an object of the present invention is to provide a method and apparatus for separately determining whether to filter top and left reference samples, or for determining whether referencing is possible before determining whether to perform filtering.
[0013] Furthermore, an object of the present invention is to provide a method and apparatus for determining whether to perform filtering and / or the filter type on a non-square block using a table for square blocks without defining a separate table for the non-square block.
[0014] The technical objectives to be achieved in the present invention are not limited to the above-described technical objectives, and other technical objectives not described above can be obviously understood by a person skilled in the art in the art to which the present invention pertains from the following description.
[0015] Technical Solution
[0016] In one aspect of the present invention, a video decoding method includes obtaining an intra-frame prediction mode for a current block; obtaining reference samples for generating a prediction block for the current block using adjacent samples of the current block; determining whether to perform filtering on the reference samples; filtering the reference samples when it is determined that filtering is to be performed; and generating a prediction block using the reference samples or filtered reference samples based on the intra-frame prediction mode. The current block is a non-square block, the reference samples include left reference samples and samples located to the left and below the left of a left vertical edge of the current block, and top reference samples include samples located at the top and above the right of a top horizontal edge of the current block, and one of the left reference samples and the top reference samples includes a top-left sample of the current block. In the step of determining whether to perform filtering, whether to perform filtering is determined based on at least one of a current block parameter or a surrounding block parameter and the intra-frame prediction mode, the current block parameter being a parameter related to the current block, and the surrounding block parameter being a parameter related to blocks surrounding the current block.
[0017] Preferably, the current block parameter includes at least one of a horizontal edge length indicating a length of a horizontal edge of the current block or a vertical edge length indicating a length of a vertical edge of the current block. In the step of determining whether to perform filtering, whether to perform filtering is determined based on the length of the edge having a larger value or the length of the edge having a smaller value between the horizontal edge length and the vertical edge length.
[0018] Preferably, in the step of determining whether to perform filtering, whether to perform filtering on the top reference sample is determined based on the horizontal edge length, and whether to perform filtering on the left reference sample is determined based on the vertical edge length. In the filtering step, the top reference sample and the left reference sample are filtered independently.
[0019] Preferably, the current block parameter includes the number of samples of the current block. In the step of determining whether to perform filtering, when filtering is performed in an intra prediction mode based on a predefined condition, it is determined that filtering is to be performed on a first square block having the same number of samples as the number of samples or a second square block being a largest block among the square blocks having a number of samples less than the number of samples.
[0020] Preferably, the current block parameter includes a first quantization parameter related to a quantization rate of the current block. In the step of determining whether to perform filtering, filtering is determined to be performed when the first quantization parameter is greater than a first threshold. In the filtering step, a filter type is determined based on whether the first quantization parameter is greater than the first threshold.
[0021] Preferably, the current block parameter includes at least one of a vertical distance between a prediction sample in the current block and a top reference sample, or a horizontal distance between the prediction block and a left reference sample. In the step of determining whether to perform filtering, filtering is determined to be performed when the vertical distance is greater than a second threshold, when the horizontal distance is greater than a third threshold, or when the vertical distance is greater than the second threshold and the horizontal distance is greater than the third threshold. In the filtering step, a filter type is determined based on whether the vertical distance is greater than the second threshold and / or whether the horizontal distance is greater than the third threshold.
[0022] Preferably, the surrounding block parameters include a second quantization parameter related to a quantization rate of the surrounding blocks. In the step of determining whether to perform filtering, it is determined that filtering is to be performed when the second quantization parameter is greater than a fourth threshold. In the filtering step, a filter type is determined based on whether the second quantization parameter is greater than the fourth threshold.
[0023] Preferably, the surrounding block parameters include the number of residual coefficients of the surrounding blocks. In the step of determining whether to perform filtering, when the number of residual coefficients is greater than a fifth threshold, it is determined that filtering is to be performed. In the filtering step, the filter type is determined based on whether the number of residual coefficients is greater than the fifth threshold.
[0024] Preferably, the surrounding block parameters include a flag indicating whether a residual coefficient exists in the surrounding blocks. In the step of determining whether to perform filtering, when the flag indicates that a residual coefficient exists, it is determined that filtering is to be performed.
[0025] Preferably, the surrounding block parameters include an edge parameter indicating whether at least one of the top reference sample or the left reference sample is associated with a sample belonging to a different surrounding block. In the step of determining whether to perform filtering, when the edge parameter indicates that at least one of the top reference sample or the left reference sample is associated with a sample belonging to a different surrounding block, it is determined that filtering is to be performed.
[0026] Preferably, the surrounding block parameter includes the number of different surrounding samples to which the reference sample belongs. In the step of determining whether to perform filtering, when the number of different surrounding samples is greater than a sixth threshold, it is determined that filtering is to be performed. In the filtering step, a filter type is determined based on whether the number of different surrounding samples is greater than the sixth threshold.
[0027] Preferably, the video decoding method further includes confirming whether the top reference sample and the left reference sample are reference-capable. In the step of determining whether to perform filtering, if one of the top reference sample and the left reference sample is reference-capable, determining whether to perform filtering is based on the length of an edge adjacent to the reference-capable sample among a horizontal edge length indicating a length of a horizontal edge of the current block or a vertical edge length indicating a length of a vertical edge of the current block; otherwise, determining whether to perform filtering is based on the length of the edge having a larger value or the length of the edge having a smaller value among the horizontal edge length and the vertical edge length, or independently determining whether to perform filtering on the top reference sample and the left reference sample based on the horizontal edge length and the vertical edge length.
[0028] In one aspect of the present invention, an apparatus for decoding a video includes: an intra-prediction unit configured to generate a prediction block for a current block based on an intra-prediction mode. The intra-prediction unit includes: an intra-prediction mode acquisition unit configured to obtain an intra-prediction mode for the current block; a reference sample acquisition unit configured to obtain reference samples for generating the prediction block; a reference sample filtering unit configured to determine whether to perform filtering on the reference samples and, when filtering is determined to be performed, filter the reference samples; and a prediction block generation unit configured to generate the prediction block using the reference samples of the current block or the filtered reference samples. The current block is a non-square block. The reference samples include a left reference sample and a top reference sample, the left reference sample including samples located to the left and below the left vertical edge of the current block, the top reference sample including samples located at the top and above the right of the top horizontal edge of the current block, and one of the left reference sample and the top reference sample including the top-left sample of the current block. In the step of determining whether to perform filtering, whether to perform filtering is determined based on at least one of a current block parameter or a surrounding block parameter and an intra prediction mode, the current block parameter being a parameter related to the current block and the surrounding block parameter being a parameter related to surrounding blocks of the current block.
[0029] Technical Effects
[0030] According to an embodiment of the present invention, prediction accuracy can be improved by using at least one of current block parameters (i.e., parameters related to the current block) or surrounding block parameters (i.e., parameters related to the surrounding blocks) to determine whether to perform reference sample filtering and the filtering type when the current block is a non-square block.
[0031] Furthermore, according to an embodiment of the present invention, a predefined table for square blocks is used in determining whether to perform reference sample filtering and the type of filtering. Therefore, since there is no need to store a separate table for non-square blocks, additional memory consumption of the encoder / decoder can be reduced.
[0032] In addition, according to an embodiment of the present invention, since current block parameters (edge length, quantization parameter, number of samples, or distance between a prediction sample and a reference sample) and / or surrounding block parameters (quantization parameter, number of residual coefficients, presence or absence of residual coefficients (Cbf) or boundary-related information) are used, prediction performance in blocks in which artifacts are mixed or blocks of fine images can be improved.
[0033] Furthermore, according to an embodiment of the present invention, since current block parameters and surrounding block parameters are combined and used, prediction performance can be further improved.
[0034] Furthermore, according to an embodiment of the present invention, since whether to perform filtering on the top reference sample and the left reference sample and the filtering type are independently determined, prediction performance can be further improved.
[0035] Effects that can be obtained in the present invention are not limited to the above-described effects, and other technical effects not described above can be obviously understood by those skilled in the art in the art to which the present invention pertains from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are included herein as a part of the specification for helping to understand the present invention, provide embodiments of the present invention, and together with the following description, explain the technical features of the present invention.
[0037] Figure 1 A schematic block diagram of an encoder that performs encoding of a still image or a video signal is illustrated as an embodiment to which the present invention is applied.
[0038] Figure 2 A schematic block diagram of a decoder that performs decoding of a still image or a video signal as an embodiment to which the present invention is applied is illustrated.
[0039] Figure 3 This is a diagram for describing a division structure of a coding unit that can be applied to the present invention.
[0040] Figure 4 is a diagram for describing a prediction unit that can be applied to the present invention.
[0041] Figure 5 FIG. 1 is a diagram illustrating an intra prediction method according to an embodiment of the present invention.
[0042] Figure 6 Prediction directions according to intra prediction modes are illustrated.
[0043] Figure 7 1 is a diagram illustrating a quadtree binary tree (hereinafter referred to as "QTBT") block partitioning structure to which the present invention is applied.
[0044] Figure 8 1 and 2. Shown are a current processing block and reference samples for generating a prediction block of the current processing block when the current processing block is a square block according to an embodiment of the present invention.
[0045] Figure 9 1 and 2. A current processing block and reference samples for generating a prediction block of the current processing block when the current processing block is a non-square block according to an embodiment of the present invention are shown.
[0046] Figure 10 is a block diagram of an intra prediction unit according to an embodiment of the present invention.
[0047] Figure 11 A flowchart of a video decoding method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0048] Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings. Figure 1 The description that has been described above is intended to describe exemplary embodiments of the present invention and is not intended to describe the only embodiments in which the present invention may be practiced. The following description includes specific details in order to provide a complete understanding of the present invention. However, it should be understood that one skilled in the art may practice the present invention without these specific details.
[0049] In some cases, to prevent the technical concept of the present invention from being unclear, well-known structures or devices may be omitted, or well-known structures or devices may be drawn as block diagrams focusing on the core functions of the structures or devices.
[0050] In addition, although conventional terms that are currently widely used are selected as terms in the present invention as much as possible, terms arbitrarily selected by the applicant are used in specific cases. Since the meaning of the terms in such cases will be clearly described in the corresponding parts of the specification, it should be understood that the present invention is not simply explained by the terms used only in the description of the present invention, but the meaning of the terms should be understood.
[0051] The specific terms used in the following description may be provided to help understand the present invention. In addition, within the scope of the technical concept of the present invention, the specific terms may be modified into other forms. For example, signal, data, sample, picture, frame and block, etc. may be appropriately replaced and interpreted in each encoding process.
[0052] In this specification, a “block” or a “unit” refers to a unit in which encoding / decoding processes such as prediction, transform, and / or quantization are performed, and may be composed of a multi-dimensional array of samples (or pixels).
[0053] A "block" or "unit" may refer to a multidimensional array of samples for a luma component or a multidimensional array of samples for a chroma component. In addition, a "block" or "unit" may collectively refer to a multidimensional array of samples for a luma component and a multidimensional array of samples for a chroma component.
[0054] For example, "block" or "unit" may be interpreted as including all of the coding blocks (CB), coding tree blocks (CTB), prediction blocks (PB) (or prediction units (PU)), and transform blocks (TB) (or transform units (TU)). A coding block (CB) refers to an array of samples on which encoding / decoding is performed, a coding tree block (CTB) is configured with multiple coding blocks, a prediction block (PB) refers to an array of samples to which the same prediction is applied, and a transform block (TB) refers to an array of samples to which the same transform is applied.
[0055] In addition, unless otherwise specified in the specification, "block" or "unit" may be interpreted as meaning a syntax structure used in the encoding / decoding process of an array of samples of a luma component and / or chroma component. In this case, a syntax structure refers to zero or more syntax elements present in a bitstream in a specific order. A syntax element refers to a data element present in a bitstream.
[0056] For example, "block" or "unit" may be interpreted as including the following meanings: a coding unit (CU) including a coding block (CB) and a syntax structure for encoding the corresponding coding block (CB); a coding tree unit (CTU) configured with multiple coding units; a prediction unit (PU) including a prediction block (PB) and a syntax structure for prediction of the corresponding prediction block (PB); and a transform unit (TU) including a transform block (TB) and a syntax structure for transforming the corresponding transform block (TB).
[0057] In addition, in this specification, "block" or "unit" is not limited to an array of samples (or picture elements, pixels) in the form of a square or rectangle, and may refer to an array of samples (or picture elements, pixels) in the form of a polygon with three or more vertices. In this case, it can be called a polygonal block or polygonal unit.
[0058] In addition, hereinafter, in this specification, pixels or picture elements are generally referred to as samples. In addition, using samples may mean using pixel values or picture element values.
[0059] Furthermore, hereinafter, unless otherwise described, a current block to which the techniques proposed in this specification are applied indicates a non-square block.
[0060] Figure 1 A schematic block diagram of an encoder that performs encoding of a still image or a video signal is illustrated as an embodiment to which the present invention is applied.
[0061] refer to Figure 1 The encoder 100 may include a video segmentation unit 110, a subtractor 115, a transform unit 120, a quantization unit 130, a dequantization unit 140, an inverse transform unit 150, a filtering unit 160, a decoded picture buffer (DPB) 170, a prediction unit 180, and an entropy coding unit 190. In addition, the prediction unit 180 may include an inter-prediction unit 181 and an intra-prediction unit 182.
[0062] The video splitting unit 110 splits an input video signal (or picture or frame) input to the encoder 100 into one or more processing units.
[0063] The subtractor 115 generates a residual signal (or residual block) by subtracting the prediction signal (or prediction block) output by the prediction unit 180 (i.e., the inter-frame prediction unit 181 or the intra-frame prediction unit 182) from the input video signal. The generated residual signal (or residual block) is sent to the transformation unit 120.
[0064] The transform unit 120 generates transform coefficients by applying a transform scheme (e.g., discrete cosine transform (DCT), discrete sine transform (DST), graph-based transform (GBT), or Karhunen-Loeve transform (KLT)) to the residual signal (or residual block). In this case, the transform unit 120 can generate transform coefficients by performing transform using a prediction mode applied to the residual block and a transform scheme determined based on the size of the residual block.
[0065] The quantization unit 130 quantizes the transform coefficients and transmits them to the entropy coding unit 190 , and the entropy coding unit 190 performs an entropy coding operation on the quantized signal and outputs it as a bitstream.
[0066] In addition, the quantized signal output by the quantization unit 130 can be used to generate a prediction signal. For example, a residual signal can be reconstructed by applying dequantization and inverse transformation to the quantized signal via the dequantization unit 140 and the inverse transformation unit 150. The reconstructed signal can be generated by adding the reconstructed residual signal to the prediction signal output by the inter-frame prediction unit 181 or the intra-frame prediction unit 182.
[0067] Furthermore, during such a compression process, adjacent blocks are quantized using different quantization parameters. Consequently, artifacts may appear, indicating block boundaries. This phenomenon is known as blocking artifacts, and is an important factor in assessing image quality. To reduce such artifacts, a filtering process can be performed. Through such filtering, blocking artifacts are removed and the error of the current image is simultaneously reduced, thereby improving image quality.
[0068] The filtering unit 160 applies filtering to the reconstructed signal and outputs it through a playback device or sends it to the decoded picture buffer 170. The filtered signal sent to the decoded picture buffer 170 can be used as a reference picture in the inter-frame prediction unit 181. As described above, using the filtered picture as a reference picture in the inter-picture prediction mode can improve the coding rate and image quality.
[0069] The decoded picture buffer 170 may store the filtered picture so as to use it as a reference picture in the inter prediction unit 181 .
[0070] The inter-frame prediction unit 181 performs temporal prediction and / or spatial prediction with reference to the reconstructed picture to remove temporal redundancy and / or spatial redundancy. In this case, since the reference picture used for prediction is a transformed signal that has undergone quantization or dequantization in units of blocks during previous encoding / decoding, block artifacts or ringing artifacts may occur.
[0071] Therefore, in order to solve the performance degradation attributable to the discontinuity or quantization of such a signal, by applying a low-pass filter to the inter-frame prediction unit 181, the signal between pixels can be interpolated in sub-pixel units. In this case, sub-pixels refer to virtual pixels generated by applying an interpolation filter, and integer pixels refer to actual pixels existing in the reconstructed picture. Linear interpolation, bilinear interpolation, Wiener filter, etc. can be applied as the interpolation method.
[0072] Interpolation filters can be applied to reconstructed pictures and can improve the accuracy of prediction. For example, the inter-frame prediction unit 181 can generate interpolation pixels by applying interpolation filters to integer pixels and perform prediction by using an interpolation block including the interpolation pixels as a prediction block.
[0073] The intra-frame prediction unit 182 predicts the current block with reference to samples adjacent to the block to be encoded. The intra-frame prediction unit 182 can perform the following processing to perform intra-frame prediction. First, the intra-frame prediction unit 182 can prepare the reference samples necessary to generate the prediction signal. In addition, the intra-frame prediction unit 182 can use the prepared reference samples to generate the prediction signal. In addition, the intra-frame prediction unit 182 can encode the prediction mode. In this case, the reference samples can be prepared through reference sample padding and / or reference sample filtering. Because the reference samples undergo the prediction and reconstruction process, there may be quantization errors. Therefore, in order to reduce such errors, a reference sample filtering process can be performed for each prediction mode used for intra-frame prediction.
[0074] The prediction signal (or prediction block) generated by the inter prediction unit 181 or the intra prediction unit 182 may be used to generate a reconstructed signal (or reconstructed block), or may be used to generate a residual signal (or residual block).
[0075] Figure 2 A schematic block diagram of a decoder that performs decoding of a still image or a video signal is illustrated as an embodiment to which the present invention is applied.
[0076] Reference Figure 2 , the decoder 200 may include an entropy decoding unit 210, a dequantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a decoded picture buffer (DPB) 250, and a prediction unit 260. In addition, the prediction unit 260 may include an inter-frame prediction unit 261 and an intra-frame prediction unit 262.
[0077] Furthermore, the reconstructed video signal output by the decoder 200 may be played back by a playback device.
[0078] The decoder 200 receives Figure 1The entropy decoding unit 210 performs an entropy decoding operation on the received signal.
[0079] The dequantization unit 220 obtains a transform coefficient from the entropy-decoded signal using the quantization step size information.
[0080] The inverse transform part 230 inversely transforms the transform coefficients by applying an inverse transform scheme to obtain a residual signal (or a residual block).
[0081] The adder 235 adds the obtained residual signal (or residual block) to the prediction signal (or prediction block) output by the prediction unit 260 (ie, the inter prediction unit 261 or the intra prediction unit 262 ), thereby generating a reconstructed signal (or reconstructed block).
[0082] The filtering unit 240 applies filtering to the reconstructed signal (or reconstructed block) and outputs the filtered signal to a playback device or transmits the filtered signal to the decoded picture buffer 250. The filtered signal transmitted to the decoded picture buffer 250 may be used as a reference picture in the inter-frame prediction unit 261.
[0083] In this specification, the embodiments described in the filtering unit 160, the inter prediction unit 181, and the intra prediction unit 182 of the encoder 100 may be equally applied to the filtering unit 240, the inter prediction unit 261, and the intra prediction unit 262 of the decoder, respectively.
[0084] Generally, a block-based image compression method is used in compression technology for still images or videos (eg, HEVC). The block-based image compression method processes an image by dividing the image into specific block units, and can reduce memory usage and computational load.
[0085] Figure 3 This is a diagram for describing a division structure of a coding unit that can be applied to the present invention.
[0086] The encoder divides a single image (or picture) into coding tree units (CTUs) in a quadrilateral form and encodes the CTUs one by one in sequence in a raster scan order.
[0087] In HEVC, the size of a CTU can be determined as one of 64×64, 32×32, and 16×16. The encoder can select and use the size of a CTU based on the resolution or characteristics of the input video signal. A CTU includes a coding tree block (CTB) for the luma component and CTBs for the two corresponding chroma components.
[0088] A CTU can be split using a quadtree structure. That is, a CTU can be split into four units, each of which has a square shape and half the horizontal size and half the vertical size, to generate a coding unit (CU). This quadtree structure splitting can be performed recursively. That is, a CU is hierarchically split from a CTU using a quadtree structure.
[0089] A CU is a basic unit for processing an input video signal (e.g., encoding in which intra / inter prediction is performed). A CU includes a coding block (CB) for a luminance component and CBs for two chrominance components corresponding to the luminance component. In HEVC, the CU size can be determined as one of 64×64, 32×32, 16×16, and 8×8.
[0090] Reference Figure 3 The root node of the quadtree is associated with a CTU. The quadtree is partitioned until a leaf node is reached. A leaf node corresponds to a CU.
[0091] This is described in more detail. A CTU corresponds to a root node and has a minimum depth (ie, depth=0) value. Depending on the characteristics of the input video signal, a CTU may not be partitioned. In this case, a CTU corresponds to a CU.
[0092] The CTU can be split in a quadtree form. As a result, a lower node is generated, that is, a depth of 1 (depth=1). In addition, a node (i.e., a leaf node) that belongs to a lower node of depth 1 and is no longer split corresponds to a CU. For example, in Figure 3 In (b), CU(a), CU(b) and CU(j) corresponding to nodes a, b and j have been split once from the CTU and have a depth of 1.
[0093] At least one of the nodes with a depth of 1 may be split in a quadtree form. As a result, a lower node with a depth of 1 (ie, depth = 2) is generated. In addition, nodes (ie, leaf nodes) that belong to the lower node with a depth of 2 and are no longer split correspond to CUs. For example, in Figure 3 In (b), CU(c), CU(h) and CU(i) corresponding to nodes c, h and i have been split twice from the CTU and have a depth of 2.
[0094] In addition, at least one of the nodes with a depth of 2 may be split again in a quadtree form. As a result, a lower node with a depth of 3 (ie, depth=3) is generated. In addition, nodes (ie, leaf nodes) that belong to the lower node with a depth of 3 and are no longer split correspond to CUs. For example, in Figure 3In (b), CU(d), CU(e), CU(f) and CU(g) corresponding to nodes d, e, f and g have been split three times from the CTU and have a depth of 3.
[0095] In the encoder, the maximum size or minimum size of the CU can be determined based on the characteristics of the video image (e.g., resolution) or by considering the coding rate. In addition, information about the maximum size or minimum size or information that can derive the information can be included in the bitstream. The CU with the maximum size is called the largest coding unit (LCU), and the CU with the smallest size is called the smallest coding unit (SCU).
[0096] In addition, a CU having a tree structure can be hierarchically partitioned with a predetermined maximum depth information (or maximum level information). In addition, each partitioned CU can have depth information. Since the depth information indicates the partition count and / or partition degree of the CU, the depth information may include information about the size of the CU.
[0097] Since the LCU is partitioned in a quadtree shape, the size of the SCU can be obtained by using the size of the LCU and the maximum depth information. Or conversely, the size of the LCU can be obtained by using the size of the SCU and the maximum depth information of the tree.
[0098] For a single CU, information indicating whether the corresponding CU is split (e.g., a split CU flag (split_cu_flag)) can be forwarded to the decoder. This split information is included in all CUs except the SCU. For example, when the value of the flag indicating whether to split is "1", the corresponding CU is further split into four CUs, and when the value of the flag indicating whether to split is "0", the corresponding CU is no longer split and the processing for the corresponding CU can be performed.
[0099] As described above, a CU is a basic unit of encoding in which intra prediction or inter prediction is performed. HEVC divides a CU into prediction units (PUs) to more efficiently encode an input video signal.
[0100] PU is the basic unit for generating a prediction block, and even in a single CU, a prediction block can be generated in different ways in units of PUs. However, intra prediction and inter prediction are not used together for PUs belonging to a single CU, and PUs belonging to a single CU are encoded by the same prediction method (i.e., intra prediction or inter prediction).
[0101] The PU is not partitioned in a quadtree structure, but is partitioned once in a predetermined shape in a single CU. This will be described below with reference to the accompanying drawings.
[0102] Figure 4is a diagram for describing a prediction unit that can be applied to the present invention.
[0103] The PU is partitioned differently depending on whether the intra prediction mode or the inter prediction mode is used as the encoding mode of the CU to which the PU belongs.
[0104] Figure 4 (a) in FIG. 1 illustrates a PU when using intra prediction mode, and Figure 4 (b) in FIG. 1 illustrates a PU when the inter prediction mode is used.
[0105] Reference Figure 4 In (a), assuming that the size of a single CU is 2N×2N (N=4, 8, 16, and 32), the single CU can be partitioned into two types (ie, 2N×2N or N×N).
[0106] In this case, if a single CU is partitioned into PUs of a 2N×2N shape, this means that only one PU exists in the single CU.
[0107] In addition, if a single CU is split into N×N shaped PUs, the single CU is split into four PUs, and a different prediction block is generated for each PU unit. However, such PU splitting can be performed only when the size of the CB for the luma component of the CU is the minimum size (i.e., when the CU is an SCU).
[0108] Reference Figure 4 In (b), assuming that the size of a single CU is 2N×2N (N=4, 8, 16, and 32), a single CU can be partitioned into eight PU types (i.e., 2N×2N, N×N, 2N×N, N×2N, nL×2N, nR×2N, 2N×nU, and 2N×nD).
[0109] Like in intra prediction, N×N shaped PU partitioning can be performed only when the size of the CB for the luma component of the CU is the minimum size (ie, the case where the CU is an SCU).
[0110] Inter prediction supports PU partitioning in a 2N×N shape partitioned in the horizontal direction and an N×2N shape partitioned in the vertical direction.
[0111] In addition, inter-frame prediction supports PU partitions of nL×2N, nR×2N, 2N×nU, and 2N×nD shapes as asymmetric motion partitioning (AMP). In this case, "n" refers to 1 / 4 of 2N. However, if the CU to which the PU belongs is the smallest CU, AMP cannot be used.
[0112] In order to efficiently encode the input video signal in a single CTU, the optimal partitioning structure of the coding unit (CU), prediction unit (PU), and transform unit (TU) can be determined based on the minimum rate-distortion value through the following process. For example, regarding the optimal CU partitioning process in a 64×64 CTU, the rate-distortion cost can be calculated by partitioning from a 64×64 CU to an 8×8 CU. The detailed process is as follows.
[0113] 1) Determine the optimal partition structure of PUs and TUs that generates the minimum rate-distortion value by performing inter / intra prediction, transform / quantization, dequantization / inverse transform, and entropy coding on a 64×64 CU.
[0114] 2) The optimal partitioning structure of PU and TU is determined to partition the 64×64 CU into four CUs of 32×32 size and generate the minimum rate-distortion value for each 32×32 CU.
[0115] 3) The optimal partitioning structure of PU and TU is determined to further partition the 32×32 CU into four CUs of 16×16 size, and generate the minimum rate-distortion value of each 16×16 CU.
[0116] 4) The optimal partitioning structure of PU and TU is determined to further partition the 16×16 CU into four CUs of 8×8 size, and generate the minimum rate-distortion value of each 8×8 CU.
[0117] 5) Determine the optimal partition structure of the CU in the 16×16 block by comparing the rate-distortion value of the 16×16 CU obtained in process 3) with the sum of the rate-distortion values of the four 8×8 CUs obtained in process 4). This process is also performed in the same manner for the remaining three 16×16 CUs.
[0118] 6) Determine the optimal partition structure of the CU in the 32×32 block by comparing the rate-distortion value of the 32×32 CU obtained in process 2) with the sum of the rate-distortion values of the four 16×16 CUs obtained in process 5). This process is also performed in the same manner for the remaining three 32×32 CUs.
[0119] 7) Finally, the optimal partitioning structure of the CU in the 64×64 block is determined by comparing the rate-distortion value of the 64×64 CU obtained in process 1) with the sum of the rate-distortion values of the four 32×32 CUs obtained in process 6).
[0120] In the intra prediction mode, a prediction mode is selected in units of PUs, and prediction and reconstruction are performed on the selected prediction mode in units of actual TUs.
[0121] TU refers to a basic unit for performing actual prediction and reconstruction. TU includes a transform block (TB) for a luma component and TBs for two chroma components corresponding to the luma component.
[0122] exist Figure 3 In the example of , as in the example where one CTU is partitioned in a quadtree structure to generate CUs, TUs are hierarchically partitioned from one CU to be encoded in a quadtree structure.
[0123] Since the TU is partitioned in a quadtree structure, the TU partitioned from the CU can be partitioned into smaller and lower TUs. In HEVC, the size of the TU can be determined as one of 32×32, 16×16, 8×8, and 4×4.
[0124] Return to reference Figure 3 , assuming that the root node of the quadtree is associated with a CU. Split the quadtree until a leaf node is reached, and the leaf node corresponds to a TU.
[0125] This is described in more detail. A CU corresponds to a root node and has a minimum depth (ie, depth=0) value. Depending on the characteristics of the input image, a CU may not be split. In this case, a CU corresponds to a TU.
[0126] The CU can be split in a quadtree form. As a result, a lower node with a depth of 1 (depth=1) is generated. In addition, the nodes (i.e., leaf nodes) that belong to the lower node with a depth of 1 and are no longer split correspond to TUs. For example, in Figure 3 In (b), TU(a), TU(b), and TU(j) corresponding to nodes a, b, and j have been split once from the CU and have a depth of 1.
[0127] At least one of the nodes with a depth of 1 can be split again in a quadtree form. As a result, a lower node with a depth of 2 (i.e., depth=2) is generated. In addition, the nodes (i.e., leaf nodes) that belong to the lower node with a depth of 2 and are no longer split correspond to TUs. For example, in Figure 3 In (b), TU(c), TU(h) and TU(i) corresponding to nodes c, h and i have been split twice from the CU and have a depth of 2.
[0128] In addition, at least one of the nodes with a depth of 2 may be split again in a quadtree form. As a result, a lower node with a depth of 3 (ie, depth=3) is generated. In addition, nodes (ie, leaf nodes) that belong to the lower node with a depth of 3 and are no longer split correspond to CUs. For example, in Figure 3 In (b), TU(d), TU(e), TU(f) and TU(g) corresponding to nodes d, e, f and g have been split three times from the CU and have a depth of 3.
[0129] A TU with a tree structure may be hierarchically partitioned with predetermined maximum depth information (or maximum level information). In addition, each partitioned TU may have depth information. The depth information may include information about the size of the TU, as it indicates the number and / or degree of partitioning of the TU.
[0130] Information indicating whether the corresponding TU has been split relative to one TU (e.g., a split TU flag "split_transform_flag") may be transmitted to the decoder. Split information is included in all TUs except the minimum-sized TU. For example, if the value of the flag indicating whether the TU has been split is "1," the corresponding TU is split into four TUs. If the value of the flag indicating whether the TU has been split is "0," the corresponding TU is no longer split.
[0131] predict
[0132] In order to reconfigure the current processing unit on which decoding is performed, a decoded portion of the current picture or other pictures including the current processing unit may be used.
[0133] A picture (slice) that uses only the current picture for reconstruction (i.e., only performs intra prediction on it) may be called an intra-picture or I-picture (slice). A picture (slice) that uses at most one motion vector and reference index for prediction of each unit may be called a predicted picture or P-picture (slice). A picture (slice) that uses at most two motion vectors and reference indexes may be called a bi-predictive picture or B-picture (slice).
[0134] Intra-frame prediction refers to a prediction method that derives the pixel values of the current processing block from data elements (e.g., sample values) of the same decoded picture (or slice). In other words, intra-frame prediction refers to a method that predicts the pixel values of the current processing block with reference to a reconstructed area within the current picture.
[0135] Inter-frame prediction refers to a method of deriving a prediction value of a currently processed block based on data elements (e.g., sample values or motion vectors) of a picture other than the current picture. In other words, inter-frame prediction refers to a method of predicting pixel values of the currently processed block by referring to a reconstructed region within another reconstructed picture other than the current picture.
[0136] Hereinafter, intra prediction is described in more detail.
[0137] Intra-frame prediction (or prediction within a frame)
[0138] Figure 5 This is a diagram illustrating an embodiment to which the present invention is applied, and an intra-frame prediction method.
[0139] Reference Figure 5 , the decoder derives the intra prediction mode of the current processing block (S501).
[0140] Intra-frame prediction can have a prediction direction for the position of the reference sample used for prediction, depending on the prediction mode. Intra-frame prediction modes with a prediction direction are called intra-frame angular prediction modes (Intra_Angular prediction mode). In contrast, intra-frame prediction modes without a prediction direction include intra-frame planar prediction mode (INTRA_PLANAR) and intra-frame DC prediction mode (INTRA_DC).
[0141] Table 1 illustrates intra prediction modes and related names.
[0142] [Table 1]
[0143]
[0144] In intra prediction, prediction is performed on the current processing block based on the derived prediction mode. The reference samples used for prediction and the detailed prediction method vary depending on the prediction mode. If the current block is in intra prediction mode, the decoder derives the prediction mode of the current block to perform prediction.
[0145] The decoder checks whether neighboring samples of the current processing block can be used for prediction, and constructs reference samples to be used for prediction ( S502 ).
[0146] In intra-frame prediction, the adjacent samples of the current processing block mean samples adjacent to the left boundary of the current processing block of nS×nS size, a total of 2×nS samples adjacent to the lower left of the current processing block, samples adjacent to the top boundary of the current processing block, a total of 2×nS samples adjacent to the upper right of the current processing block, and one sample adjacent to the upper left of the current processing block.
[0147] However, some neighboring samples of the current processing block have not yet been encoded or may not be available. In this case, the decoder can construct reference samples to be used for prediction by replacing unavailable samples with available samples.
[0148] The decoder may perform filtering on the reference samples based on the intra prediction mode ( S503 ).
[0149] Whether to perform filtering on the reference samples may be determined based on the size of the current processing block. In addition, the filtering method of the reference samples may be determined based on a filtering flag transmitted by the encoder.
[0150] The decoder generates a prediction block for the current processing block based on the intra prediction mode and the reference samples (S504). That is, the decoder generates a prediction block for the current processing block (i.e., generates prediction samples within the current processing block) based on the intra prediction mode derived in the intra prediction mode derivation step (S501) and the reference samples obtained in the reference sample configuration step (S502) and the reference sample filtering step (S503).
[0151] If the current processing block has been encoded in the INTRA_DC mode, in order to minimize the discontinuity of the boundaries between the processing blocks, the left boundary samples (i.e., the samples adjacent to the left boundary in the prediction block) and the top boundary samples (i.e., the samples adjacent to the top boundary in the prediction block) of the prediction block can be filtered in step S504.
[0152] Furthermore, in step S504 , with respect to the vertical mode and the horizontal mode of the intra angular prediction mode, filtering may be applied to the left boundary sample or the top boundary sample as in the INTRA_DC mode.
[0153] More specifically, if the currently processed block has been encoded in vertical or horizontal mode, the value of the prediction sample can be derived based on the value of the reference sample located in the prediction direction. In this case, boundary samples that are not located in the prediction direction among the left boundary samples or top boundary samples of the prediction block can be adjacent to reference samples not used for prediction. In other words, the distance to the reference sample not used for prediction can be closer than the distance to the reference sample used for prediction.
[0154] Therefore, depending on whether the intra prediction direction is vertical or horizontal, the decoder can adaptively apply filtering to the left boundary samples or the top boundary samples. That is, if the intra prediction direction is vertical, the decoder can apply filtering to the left boundary samples, and if the intra prediction direction is horizontal, the decoder can apply filtering to the top boundary samples.
[0155] Figure 6 Prediction directions according to intra prediction modes are illustrated.
[0156] As described above, in HEVC, a prediction block of a current block is generated using a total of 35 prediction methods for intra prediction, and the 35 prediction methods include 33 angular prediction methods and 2 non-angular prediction methods.
[0157] In the case of the 33 angular prediction modes, when a prediction sample is calculated from a reference sample, the reference sample value is copied to the corresponding prediction sample by considering directionality.
[0158] In contrast, in each of DC mode and planar mode, ie, two non-angular prediction methods, the prediction sample is calculated as the average and weighted sum of adjacent reference samples.
[0159] Figure 7 1 is a diagram illustrating a quadtree binary tree (hereinafter referred to as "QTBT") block partitioning structure according to an embodiment of the present invention.
[0160] Quadtree Binary Tree (QTBT)
[0161] QTBT refers to a coding block structure that combines a quadtree structure with a binary tree structure. Specifically, in the QTBT block partitioning structure, an image is encoded in units of CTUs. The CTUs are partitioned using a quadtree. The leaf nodes of the quadtree are additionally partitioned using a binary tree.
[0162] In the following, reference is made to Figure 7 Describes the QTBT structure and the syntax of the segmentation flags that support it.
[0163] Reference Figure 7 , the current block can be split in a QTBT structure. That is, the CTU can first be split hierarchically in a quadtree format. In addition, the leaf nodes of the quadtree that are no longer split in a quadtree format can be split hierarchically in a binary tree format.
[0164] The encoder can signal a split flag to determine whether to split the quadtree in a QTBT structure. In this case, the quadtree split can be adjusted (or limited) by the MinQTLumaISlice, MinQTChromaISlice, or MinQTNonISlice values. In this case, MinQTLumaISlice indicates the minimum size of the quadtree leaf nodes for luma components in I-slices. MinQTLumaChromaISlice indicates the minimum size of the quadtree leaf nodes for chroma components in I-slices. MinQTNonISlice indicates the minimum size of the quadtree leaf nodes in non-I-slices.
[0165] In the quadtree structure of QTBT, the luma component and chroma component can have independent partitioning structures in the I-slice. For example, in the case of an I-slice of the QTBT structure, the partitioning structures of the luma component and the chroma component can be determined differently. To support this partitioning structure, MinQTLumaISlice and MinQTChromaISlice can have different values.
[0166] For another example, in a non-I slice of a QTBT, the partitioning structure of the luma component and the chroma component of the quadtree structure may be determined identically. For example, in the case of a non-I slice, the quadtree partitioning structure of the luma component and the chroma component may be adjusted by the MinQTNonISlice value.
[0167] In the QTBT structure, the leaf nodes of the quadtree can be split in a binary tree. In this case, the binary tree splitting can be adjusted (or limited) by MaxBTDepth, MaxBTDepthISliceL, and MaxBTDepthISliceC. In this case, MaxBTDepth indicates the maximum depth of the binary tree splitting of the leaf nodes based on the quadtree in non-I-slices. MaxBTDepthISliceL indicates the maximum depth of the binary tree splitting of the luma component in I-slices. MaxBTDepthISliceC indicates the maximum depth of the binary tree splitting of the chroma component in I-slices.
[0168] Furthermore, in an I-slice of a QTBT, MaxBTDepthISliceL and MaxBTDepthISliceC may have different values in the I-slice because the luma component and the chroma component may have different structures.
[0169] In the case of the partition structure of QTBT, the quadtree structure and the binary tree structure can be used together. In this case, the following rules can be applied.
[0170] First, MaxBTSize is less than or equal to MaxQTSize. In this case, MaxBTSize indicates the maximum size of a binary tree partition, while MaxQTSize indicates the maximum size of a quadtree partition.
[0171] Secondly, the leaf node of QT becomes the root of BT.
[0172] Third, once a split into BT is performed, it cannot be split into QT again.
[0173] Fourth, BT defines vertical segmentation and horizontal segmentation.
[0174] Fifth, MaxQTDepth and MaxBTDepth have been previously defined. In this case, MaxQTDepth indicates the maximum depth of the quadtree partition, while MaxBTDepth indicates the maximum depth of the binary tree partition.
[0175] Sixth, MaxBTSize and MinQTSize may differ depending on the stripe type.
[0176] Figure 81 and 2. Shown are a current processing block and reference samples for generating a prediction block of the current processing block when the current processing block is a square block according to an embodiment of the present invention.
[0177] Reference Figure 7 In the QTBT segmentation structure, the current processing block (coding block) can correspond to a square block or a non-square block. A square block is a square block with the same width, length, and height. A non-square block is a rectangular block with different widths, lengths, and heights. In the following, the case where the current processing block is a square block is first described.
[0178] exist Figure 8 In FIG, the current processing block (hereinafter referred to as the current block for convenience) 8010 is a square block with an N×N size. Figure 8 In the block shown in , N corresponds to 4.
[0179] When performing intra prediction, the reference samples 8020 that can be referred to include neighboring samples of the current block 8010. Figure 8 , when the size of the current block 8010 is N×N, the reference samples 8020 may include 2N samples at the top of the current block 8010, 2N samples to the left of the current block 8010, and 1 sample at the upper left of the current block 8010. That is, the reference samples 8020 may include a maximum of 4N+1 samples. In some cases, if all surrounding reference samples 8020 are not present, all reference samples 8020 may be padded with values in the middle of the range of pixel values that can be present. In addition, if only some surrounding reference samples 8020 are available, padding may be performed to replace unavailable samples with available samples.
[0180] In intra prediction, the reference sample 8020 corresponds to a reconstructed sample because it is reconstructed after quantization is performed on the reference sample. Therefore, the reference sample 8020 includes quantization error. To reduce the prediction error attributable to the quantization error, reference sample filtering (or intra-frame smoothing) can be performed. Reference sample filtering can prevent potential visual artifacts in the derived prediction block due to differences between samples. To this end, a low-pass filter can be used.
[0181] Before prediction is performed, it is first determined whether filtering will be performed on the reference sample 8020 based on the size, prediction mode, and pixel value of the current block 8010. Table 2 below shows whether filtering is performed (applied) according to the size of the current block 8010 (or prediction block) and the intra prediction mode in the encoder / decoder. Table 2 below can be predefined in the encoder / decoder.
[0182] [Table 2]
[0183]
[0184] In Table 2, numbers 0 to 34 in the vertical axis indicate intra prediction modes, and 4×4, 8×8, 16×16, and 32×32 in the horizontal axis indicate the size of the current block 8010 .
[0185] Referring to Table 2, in DC mode (mode 1), horizontal mode (mode 10), and vertical mode (mode 26), filtering is always not performed regardless of the size of the current block 8010. In DC mode, the reference sample 8020 is not filtered to prevent distortion of the value of the filtered reference sample.
[0186] In blocks with small sizes (e.g., 4×4 or 8×8), filtering is performed only in very limited prediction modes. As the size of the block increases, the restrictions on filtering decrease. If the block size is large enough (e.g., 32×32), filtering can be performed in all modes except DC mode, horizontal mode (mode 10), and vertical mode (mode 26). In addition, the filter type can be determined based on the size of the prediction block, the prediction mode, and the value of the reference sample 8020.
[0187] A prediction block of the current block 8010 is generated using a reference sample 8020 of the current block 8010. Thereafter, the decoder reconstructs the current block 8010 by combining the prediction block and the received residual signal.
[0188] Figure 9 1 and 2. A current processing block and reference samples for generating a prediction block of the current processing block when the current processing block is a non-square block according to an embodiment of the present invention are shown.
[0189] exist Figure 9 In the example, the current block is a non-square block 9010. Figure 7 and Figure 8 As described in the description of , in the QTBT partition structure, the current processing block may correspond to a non-square block. For example, the non-square block 9010 may have a size of 2N×N or 2N×hN (h=half). In addition, as described in the description of Figure 8 As described in the description of , in a square block, whether filtering is to be performed on a reference sample is determined based on the size of the current block (i.e., the length N of one side) according to Table 2. However, the width length and height length of the non-square block 9010 are different. Therefore, in the case of the non-square block 9010, unlike a square block, since the lengths of the two sides are different, it is unclear based on which side length whether filtering is to be performed according to Table 2.
[0190] First, the reference samples of the non-square block 9010 are described. The reference samples include a top (upper) reference sample 9020 and a left reference sample 9030. The top reference sample 9020 may also be referred to as an upper boundary sample, and the left reference sample 9030 may also be referred to as a left boundary sample.
[0191] Top reference sample 9020 is a reference sample adjacent to the top of the current block. Top reference sample 9020 includes samples located on the upper (top) side and the upper right side of the top horizontal edge (i.e., the upper horizontal edge) of the current block. For example, when the position of upper left sample 9040 is [X][Y] = [-1][-1], top reference sample 9020 has a position of [X][-1]. That is, top reference sample 9020 is adjacent to the upper side of the current block, and the reference samples are arranged horizontally.
[0192] Left reference sample 9030 is a reference sample adjacent to the left side of the current block. Left reference sample 9030 includes samples located to the left and below the left of the left vertical edge (i.e., the left vertical edge) of the current block. For example, when the position of the top left sample 9040 is [X][Y] = [-1][-1], left reference sample 9030 has a position of [-1][y]. That is, left reference sample 9030 is adjacent to the left side of the current block, and the reference samples are arranged vertically.
[0193] The lengths of top reference sample 9020 and left reference sample 9030 can be determined to be appropriate based on the current block and surrounding blocks. For example, when the current block has a size of 2N×N, the maximum length of the top / left reference sample can be 4N, i.e., twice the length of one side. Furthermore, top reference sample 9020 and left reference sample 9030 can have different lengths.
[0194] In this case, the upper left sample 9040 may be included in one of the top reference sample 9020 or the left reference sample 9030 and processed. Figure 9 It is shown that the upper left sample 9040 is included in the left reference sample 9030. The upper left sample 9040 may be included in the top reference sample 9020 and processed.
[0195] Reference Figure 5As described above, a prediction block is generated using a reference sample. Intra-frame prediction for reconstructing a video using the generated prediction block can be performed by an intra-frame prediction unit. Specifically, the intra-frame prediction unit can obtain an intra-frame prediction mode of the current block (refer to S501), and can obtain reference samples for generating a prediction block of the current block using adjacent samples of the current block (refer to S502). Thereafter, the intra-frame prediction unit can determine whether to perform filtering on the reference sample. When it is determined that filtering is to be performed, the intra-frame prediction unit can filter the reference sample (refer to S503). Thereafter, the intra-frame prediction unit can generate a prediction block using an unfiltered reference sample or a filtered reference sample (refer to S504).
[0196] The following describes the criteria for determining whether to perform reference sample filtering and the filter type for the non-square block 9010. In addition to the method for determining whether to perform filtering / filter type, the filtering process can be performed in the same manner as the existing HEVC filtering method. In the decoder (video decoding device), the intra prediction mode can be sent by the encoder as a factor.
[0197] In the following embodiments, in the process of determining whether to perform filtering and determining the filter type by the intra prediction unit, the current block parameters and / or surrounding block parameters are used together with the intra prediction mode. The current block parameters are parameters related to the current block. The surrounding block parameters are parameters related to the surrounding blocks of the current block.
[0198] The current block parameters include (i) the length of the edge (horizontal edge or vertical edge) of the current block, (ii) the number of samples (pixels) of the current block, (iii) the quantization rate (QP) of the current block, and / or (iv) the distance information between the prediction sample and the reference sample.
[0199] The surrounding block parameters include (i) quantization rate (QP) of the surrounding block, (ii) surrounding block related information of the residual coefficient, (iii) boundary / edge related information of the surrounding block, and / or (iv) partition information of the surrounding block.
[0200] The following embodiments may be used to determine whether to perform filtering and / or the filter type on the reference samples of the non-square block 9010 .
[0201] Implementation 1: Using the side length of the current block
[0202] In Embodiment 1, the intra prediction unit uses current block parameters when determining whether to perform filtering and / or the filter type. The current block parameters include the side length of the current block. In addition, in Embodiment 1, no separate table is defined when determining whether to perform filtering, and Table 2 corresponding to the table related to square blocks is used.
[0203] The current block parameters may include the horizontal side length (i.e., the length of the horizontal edge) and / or the vertical side length (i.e., the length of the vertical edge) of the current block. That is, the intra prediction unit may determine whether to perform reference sample filtering based on the longer side (i.e., the length of the edge with a larger value) or the smaller side (i.e., the length of the edge with a smaller value) among the side lengths of the current block. The side length of the current block corresponds to the number of samples (picture elements or pixels) included in one side of the current block.
[0204] As a first method using side length, the intra-frame prediction unit can determine whether to perform filtering based on the longer length of the horizontal side and the vertical side. For example, when the length of the horizontal side is 8, the length of the vertical side is 16, and the prediction mode is 14, because the longer length is 16, whether to perform filtering is determined based on the same criteria as the case of the 16×16 block in Table 2. That is, according to Table 2, because reference sample filtering is performed for the 16×16 block in prediction mode 14, filtering is performed on the reference samples of the 8×16 block. For another example, when the length of the horizontal side is 32, the length of the vertical side is 8, and the prediction mode is 10, based on the 32×32 block in Table 2, no filtering is performed on the reference samples of the 32×8 block. If it is determined that filtering is to be performed, a one-dimensional binomial filter can be used as a smoothing filter. The one-dimensional binomial filter can include a 1-2-1 filter or a 1-4-6-4-1 filter.
[0205] Referring to Table 2, as the size of the prediction block increases, the likelihood of filtering being performed increases. Therefore, if the determination of whether to perform filtering is based on the length of the larger side, the reference sample can be further smoothed according to the rule that allows smoothing as the block size increases. In addition, if the current block is a noisy block and artifacts are mixed with the prediction sample, error propagation can be reduced.
[0206] As a second method using side length, the intra-frame prediction unit can determine whether to perform filtering based on the shorter length of the horizontal side and the vertical side. For example, when the length of the horizontal side is 8, the length of the vertical side is 16, and the prediction mode is 14, because the shorter length is 8, whether to perform filtering is determined based on the same criteria as the 8×8 block in Table 2. That is, according to Table 2, because reference sample filtering is not performed for the 8×8 block in all prediction modes, filtering is not performed on the reference samples of the 8×16 block. For another example, when the length of the horizontal side is 32, the length of the vertical side is 8, and the prediction mode is 2, filtering is performed on the reference samples of the 32×8 block according to the 8×8 block in Table 2. If it is determined that filtering is to be performed, a one-dimensional binomial filter can be used as a smoothing filter. The one-dimensional binomial filter can include a 1-2-1 filter or a 1-4-6-4-1 filter.
[0207] Referring to Table 2, as the size of the prediction block decreases, the likelihood of filtering being performed decreases. Therefore, if the determination of whether to apply filtering is based on smaller edges, the smoothing effect can be prevented according to the rule that limits the application of filtering as the block size decreases. In addition, if it is necessary to apply the complex characteristics of the reference sample to the prediction block without any change, a more accurate prediction sample can be generated by reducing the likelihood of filtering.
[0208] In Embodiment 1, no separate table is defined, and Table 2 related to square blocks is used in the process of determining whether to perform filtering. If a separate table is defined for determining whether to perform reference sample filtering of non-square blocks 9010, additional memory is consumed to store the table. In Embodiment 1, since no separate additional table is defined for non-square blocks 9010 and the table for square blocks is used in the process of determining whether to perform reference sample filtering of non-square blocks 9010, memory of the encoder and decoder can be reduced.
[0209] Implementation 2: Using the number of samples in the current block
[0210] In embodiment 2, the intra prediction unit uses the current block parameters in determining whether to perform filtering and / or the filter type. The current block parameters include the number of samples (pixels) of the current block. In embodiment 2, as in embodiment 1, Table 2 is used in determining whether to perform filtering.
[0211] If there is a square block having the same number of samples as the number of samples included in the current block, whether to perform filtering is determined by applying the same criterion as that of the square block.
[0212] If there is no square block having the same number of samples as the current block, whether to perform filtering is determined based on the block having the largest size among the square blocks having a smaller number of samples than the current block. That is, this is described according to a different method. If there is no square block having the same number of samples as the current block, whether to perform filtering is determined based on the length of the smaller side of the current block (i.e., the same criteria as for the square block corresponding to the smaller side length).
[0213] For example, when the length of the top edge of the current block is 8 and the length of the left edge is 32 (i.e., the current block is an 8×32 block), the number of samples included in the current block is the same as the number of samples included in the 16×16 block. Therefore, in this case, the same criteria as those for the 16×16 block are applied to the current block. If the prediction mode is Mode 14, since reference sample filtering is performed on the 16×16 block according to Table 2, reference sample filtering is performed on the 32×8 block (i.e., the current block).
[0214] For another example, when the length of the top edge of the current block is 16 and the length of its left edge is 8 (i.e., the current block is a 16×8 block), there is no square block with the same number of samples as the current block. The number of pixels in a 16×8 block is smaller than that in a 16×16 block, but larger than that in an 8×8 block. Therefore, in this case, whether to perform reference sample filtering on the current block is determined based on the criteria for an 8×8 block. Referring to Table 2, when the prediction mode is 14, filtering is not performed on the reference samples of the 8×8 block. Therefore, reference sample filtering on the current block (16×8 block) is not performed.
[0215] If filtering is to be performed, a one-dimensional binomial filter may be used as a smoothing filter. The one-dimensional binomial filter may include a 1-2-1 filter or a 1-4-6-4-1 filter.
[0216] Implementation 3: Using the quantization parameters of the current block / surrounding blocks
[0217] In embodiment 3, the intra prediction unit uses parameters of the current block or surrounding blocks in determining whether to perform filtering and / or the filter type. The current block / surrounding block parameters include quantization parameters of the current block / surrounding blocks.
[0218] In quantization, a specific range of input values is mapped to a single representative value for the input data. For example, in an encoder, the residual block of a current block is transformed into a signal in the frequency domain. Thus, a transform block can be obtained, and the coefficients of the transform block (transform coefficients) can be quantized.
[0219] The quantization parameter (QP) is related to the quantization rate (QP_step) of the coding block. The quantization rate can be expressed as a quantization range. As the quantization rate increases, the number of representative values representing the data decreases. The data compression rate can be adjusted by changing the quantization rate. Since the quantization rate is a real value, a quantization parameter (i.e., an integer value) can be used instead of the quantization rate for ease of calculation. For example, the quantization parameter can have an integer value from 0 to 51, and the transform coefficients of the current block or surrounding blocks can be quantized based on the integer value. The quantization parameter of each coding block can be sent from the encoder to the decoder. That is, the decoder can parse the quantization parameter of each coding block.
[0220] In embodiment 3, whether to perform filtering on the reference samples of the current block is determined based on the quantization parameter of the current block (hereinafter, the QP of the current block) or the quantization parameter of the surrounding blocks (hereinafter, the QP of the surrounding blocks). Unless otherwise described below, the QP includes both the QP of the current block and the QP of the surrounding blocks. The following method can be applied to both the QP of the current block and the QP of the surrounding blocks.
[0221] Specifically, when the QP of the current block or surrounding blocks is greater than (or greater than or equal to) a threshold (QP threshold), the intra prediction unit may determine to perform reference sample filtering of the current block. In addition, if the intra prediction unit determines to perform filtering, a strong smoothing filter, that is, a filter with a strong filtering strength, may be applied.
[0222] If the QP of the current block or surrounding blocks is less than (or less than or equal to) a threshold, the intra prediction unit may determine not to perform reference sample filtering of the current block. However, when the QP is less than the threshold, the intra prediction unit may determine to perform reference sample filtering. In this case, the intra prediction unit may apply a weak smoothing filter, that is, a filter with a weak filtering strength.
[0223] A one-dimensional binomial filter can be used as a weak smoothing filter. A one-dimensional binomial filter can include a 1-2-1 filter or a 1-4-6-4-1 filter. An averaging filter or other types of linear / nonlinear weighted filters can be used as a strong smoothing filter.
[0224] The QP threshold can be determined as a value previously agreed upon between the encoder and decoder. Furthermore, the threshold can be included in the VPS, SPS, PPS, slice header, or block header and can be sent from the encoder to the decoder. The decoder can determine whether to perform reference sample filtering and the filter type based on the received threshold.
[0225] Since the number of representative values representing data increases as QP decreases, detailed features of the image are better preserved. Therefore, by applying weak filtering to fine or subtle images (i.e., images with large variations in sample values within a block), the accuracy of the predicted block can be improved. Furthermore, since the number of representative values decreases as QP increases, many errors, such as blocking artifacts, occur. Therefore, in such cases, the accuracy of the predicted block can be improved by applying strong filtering.
[0226] Implementation 4: Using residual coefficient information of surrounding blocks
[0227] In embodiment 4, surrounding block parameters are used in determining whether to perform filtering and / or the type of filter. The surrounding block parameters include information related to residual coefficients of the surrounding blocks. The residual coefficient related information includes the number of residual coefficients of the surrounding blocks and / or a flag indicating whether residual coefficients exist in the surrounding blocks (coded block flag, Cbf).
[0228] The reference sample is configured with samples around the current block, which have been decoded by encoding. Therefore, each surrounding block including the reconstructed reference sample includes Cbf and residual coefficients. Information about Cbf and residual coefficients is sent from the encoder to the decoder.
[0229] The residual coefficient indicates the coefficient of the transform block that has been quantized after the residual block is transformed into the frequency region. The residual block is a block obtained by subtracting the prediction block from the original coding block in the encoder. Cbf is a flag indicating whether there are residual coefficients in the surrounding blocks. In other words, Cbf indicates whether there are one or more coefficients (i.e., residual coefficients) in the transform block of the surrounding blocks after being quantized. For example, when Cbf is 1, this may mean that there are residual coefficients.
[0230] When the Cbf of the surrounding blocks indicates the presence of residual coefficients, the intra-frame prediction unit can determine to perform reference sample filtering, and when the Cbf of the surrounding blocks indicates the absence of residual coefficients, the intra-frame prediction unit can determine not to perform filtering. That is, if there are residual coefficients, this means that the reference samples used for prediction are complex or may include noise. Therefore, in this case, reference sample filtering can be performed to improve prediction accuracy. If it is determined that reference sample filtering is to be performed, strong filtering (strong smoothing filter) can be applied.
[0231] When the number of residual coefficients is greater than (or greater than or equal to) a threshold, the intra-frame prediction unit may determine to perform reference sample filtering. This is because if the number of residual coefficients is large, this indicates that the complexity of the image is large. In this case, strong filtering may be applied. In addition, when the number of residual coefficients is less than (or less than or equal to) a threshold, the intra-frame prediction unit may determine not to perform filtering or may determine to apply filtering, but to apply weak filtering (weak smoothing filter).
[0232] A one-dimensional binomial filter can be used as a weak smoothing filter. A one-dimensional binomial filter can include a 1-2-1 filter or a 1-4-6-4-1 filter. An averaging filter or other types of linear / nonlinear weighted filters can be used as a strong smoothing filter.
[0233] The threshold value for the number of residual coefficients can be determined as a value previously agreed upon between the encoder and decoder. Furthermore, the threshold value can be included in the VPS, SPS, PPS, slice header, or block header and sent from the encoder to the decoder. The decoder can determine whether to perform reference sample filtering and the filter type based on the received threshold value.
[0234] If the residual of the surrounding blocks decreases (i.e., the number of residual coefficients decreases), this indicates that the homogeneity of the predicted block and the original block of the surrounding blocks is high. In this case, the intra-frame prediction unit can generate a relatively accurate prediction block (prediction value) even though it uses only a weak smoothing filter. However, as the residual of the surrounding blocks increases (i.e., the number of residual coefficients increases), the image of the surrounding blocks may be a detailed image or may include many errors such as noise or artifacts. Therefore, the intra-frame prediction unit can use a strong smoothing filter to improve the accuracy of the prediction block.
[0235] Implementation 5: Using border / edge information of surrounding blocks
[0236] In embodiment 5, surrounding block parameters are used in determining whether to perform filtering and / or the type of filter. The surrounding block parameters indicate information related to the boundaries or edges of surrounding blocks.
[0237] The reference sample includes a plurality of samples. The plurality of samples belong to different surrounding samples adjacent to the current block. The boundary-related information includes a parameter indicating whether a boundary or edge of a surrounding block is included in the reference sample (hereinafter referred to as a boundary parameter or edge parameter) or the number of different surrounding samples including the block boundary in the reference sample (hereinafter referred to as the number of boundary samples).
[0238] The intra prediction unit may determine whether to perform reference sample filtering and / or the filter type based on the edge parameter. The edge parameter indicates whether the boundary of the surrounding blocks is included in the reference sample. Specifically, the edge parameter indicates whether at least one of the top reference sample 9020 or the left reference sample 9030 is configured with samples belonging to different surrounding samples. For example, when the edge parameter is 1, it may indicate that the boundary of the surrounding blocks is included in the reference sample.
[0239] When the edge parameter indicates that at least one of the top reference sample 9020 or the left reference sample 9030 is configured with a sample belonging to a different surrounding sample, the intra-frame prediction unit may determine to perform reference sample filtering. In this case, a strong smoothing filter may be used. If not, the intra-frame prediction unit does not perform reference sample filtering, or performs reference sample filtering but may determine to use a weak smoothing filter.
[0240] In addition, when the number of boundary samples is greater than (or greater than or equal to) a threshold, the intra prediction unit may determine to perform reference sample filtering based on the number of boundary samples. If not, the intra prediction unit does not perform reference sample filtering, or performs reference sample filtering but may determine to use a weak smoothing filter.
[0241] The threshold for the number of boundary samples can be determined as a value previously agreed upon between the encoder and decoder. The threshold can be included in the VPS, SPS, PPS, slice header, or block header and sent from the encoder to the decoder. The decoder can determine whether to perform reference sample filtering and the filter type based on the received threshold.
[0242] A one-dimensional binomial filter can be used as a weak smoothing filter. A one-dimensional binomial filter can include a 1-2-1 filter or a 1-4-6-4-1 filter. An averaging filter or other types of linear / nonlinear weighted filters can be used as a strong smoothing filter.
[0243] As the size of the surrounding blocks of the current block decreases, the number of surrounding block boundaries included in the reference samples increases. As the number of block boundaries increases, the likelihood of errors such as artifacts occurring increases. Therefore, when the boundaries of the surrounding blocks are included in the reference samples or the number of surrounding blocks including boundaries is greater than a threshold, the intra-frame prediction unit can improve the accuracy of the predicted block by filtering the reference samples using a strong smoothing filter.
[0244] Implementation 6: Using the distance information between the prediction sample of the current block and the reference sample
[0245] In embodiment 6, current block parameters are used in determining whether to perform filtering and / or the filter type. The current block parameters include distance information between the prediction sample and the reference sample. Specifically, the distance information includes the vertical distance (hereinafter referred to as the vertical distance) between the current sample to be predicted in the prediction block (hereinafter referred to as the prediction sample) and the top reference sample 9020 and / or the horizontal distance (hereinafter referred to as the horizontal distance) between the prediction sample and the left reference sample 9030.
[0246] The intra-frame prediction unit can adaptively determine whether to perform reference sample filtering and / or the filter type based on the position of the prediction sample within the current block. For example, when the length of a side of the current block is N, the intra-frame prediction unit can determine to perform reference sample filtering when generating the prediction value of the prediction sample when at least one of the x-coordinate or y-coordinate of the prediction sample is greater than N / 2. In this case, the intra-frame prediction unit can use a strong smoothing filter.
[0247] That is, the intra-frame prediction unit can determine whether to perform reference sample filtering for each prediction sample. When at least one of the horizontal distance or vertical distance of each prediction sample is greater than a threshold value (or threshold distance), the intra-frame prediction unit can determine to perform reference sample filtering in the process of generating the prediction value of the corresponding prediction sample. In this case, the intra-frame prediction unit can use a strong smoothing filter. If not, the intra-frame prediction unit does not perform reference sample filtering in the process of generating the prediction value of the corresponding prediction sample, or determines to perform filtering but can use a weak smoothing filter.
[0248] The threshold value for each of the vertical distance and / or horizontal distance can be determined as a value previously agreed upon between the encoder and decoder. The threshold value can be included in the VPS, SPS, PPS, slice header, or block header and sent from the encoder to the decoder. The decoder can determine whether to perform reference sample filtering and the filter type based on the received threshold value.
[0249] A one-dimensional binomial filter can be used as a weak smoothing filter. A one-dimensional binomial filter can include a 1-2-1 filter or a 1-4-6-4-1 filter. An averaging filter or other types of linear / nonlinear weighted filters can be used as a strong smoothing filter.
[0250] As the distance between the prediction sample and the reference sample increases, the accuracy of the prediction decreases. In addition, as the distance increases, the likelihood that unnecessary information such as noise will propagate increases. Therefore, using a strong smoothing filter for prediction samples with a large distance from the reference sample can improve prediction accuracy.
[0251] Embodiment 7: Combination of Embodiments 1 to 6
[0252] Whether to perform reference sample filtering and / or the filter type may be determined by combining one or more criteria in Embodiments 1 to 6.
[0253] For example, a new criterion may be defined that combines the length of the longer side of the current block (Implementation 1) and information about the boundary of surrounding blocks (Implementation 5). Another example may be defined that combines the length of the shorter side of the current block (Implementation 1), the number of samples of the current block (Implementation 2), and the quantization parameters of the current block and surrounding blocks (Implementation 3). Combining the above implementations can further improve prediction accuracy.
[0254] Embodiment 8: Determine whether to filter the top reference sample and the left reference sample independently and / or filter Differential
[0255] Embodiment 8 is based on Embodiment 1. In Embodiment 8, the intra prediction unit determines whether to perform filtering and / or the filter type on the top reference sample 9020 and the left reference sample 9030 based on the length of each side of the current block. Table 2 is also used in Embodiment 8.
[0256] Specifically, return to reference Figure 9 , whether to perform filtering and / or the type of filtering on the top reference sample 9020 is determined based on the horizontal edge length (horizontal edge length) of the current block. Whether to perform filtering and / or the type of filtering on the left reference sample 9030 is determined based on the vertical edge length (vertical edge length). That is, the criterion based on the length of the left side (or vertical edge) is applied to the left reference sample 9030. The criterion based on the length of the top side (or horizontal edge) is applied to the top reference sample 9020. Figure 9 As shown, as a result, reference sample filtering may be applied to the left reference sample 9030, and reference sample filtering may not be applied to the top reference sample 9020. Therefore, the two reference samples may be filtered independently.
[0257] For example, when the vertical side length is 16 and the prediction mode is 8, it can be determined according to the 16×16 block of Table 2 that filtering is performed on the left reference sample 9030. If the horizontal side length is 8 and the prediction mode is 8, it can be determined according to the 8×8 block of Table 2 that filtering is not performed on the top reference sample 9020.
[0258] As in Embodiment 1, the upper left sample 9040 may be included in any one of the left reference sample 9030 and the top reference sample 9020 . Figure 9 It is shown that the upper left sample is included in the left reference sample 9030 and is processed.
[0259] The contents described in Embodiment 1 can be applied to the same contents (filter type, etc.) except that it is separately determined whether to apply filtering to left reference sample 9030 and top reference sample 9020. For example, a strong smoothing filter (averaging filter or other type of linear / nonlinear weighting filter) can be applied to left reference sample 9030.
[0260] Implementation 9: First determine whether reference to a reference sample is possible
[0261] In embodiment 9, whether reference to each reference sample is possible (whether each reference sample can be used to generate a prediction block) is first determined before embodiments 1 to 8. This embodiment can be applied to the process of obtaining / generating reference samples before reference sample filtering.
[0262] In some cases, intra-frame prediction (Intra mode) methods may not use reference samples in the process of generating the predicted block. For example, cases where reference samples cannot be used include when the current block is at the edge of the image or when a neighboring block has already been decoded in Inter-frame prediction mode (Inter mode) (this is limited to certain cases).
[0263] Therefore, in embodiment 9, the intra prediction unit first determines whether reference to each of the top reference sample 9020 and the left reference sample 9030 is possible.
[0264] Specifically, 1) if reference to only left reference sample 9030 is possible between left reference sample 9030 and top reference sample 9020, the intra prediction unit determines whether to perform reference sample filtering based on the length of the left side (vertical side), and if reference to only top reference sample 9020 is possible, determines whether to perform reference sample filtering based on the length of the top side (horizontal side). In this case, whether to perform filtering is determined based on the length of the referenceable left or top side, but the application of filtering after determining whether to perform filtering is applied to both left reference sample 9030 and top reference sample 9020. For a detailed method of determining whether to apply filtering based on side length, refer to the description of Embodiment 7 or Embodiment 1.
[0265] 2) If reference to both the left reference sample and the top reference sample is possible, or reference to both the left reference sample and the top reference sample is impossible, the intra prediction unit may determine whether to perform reference sample filtering and / or filter type according to the criteria of Embodiments 1 to 8. In addition, for another example, if reference to the left / top reference sample 9020 is impossible, the intra prediction unit may fill all reference samples with a default value (1<<(bitDepth-1)) and use them to generate a prediction block. For example, in the case of an 8-bit image, the reference samples may be filled with 128 values, and in the case of a 10-bit image, the reference samples may be filled with 512 values.
[0266] All the methods of Embodiments 1 to 9 may be performed in an intra prediction unit of an encoder or a decoder.
[0267] Figure 10 is a block diagram of an intra prediction unit according to an embodiment of the present invention.
[0268] The intra prediction unit 10010 generates a prediction block of the current block based on the intra prediction mode. The intra prediction unit 10010 is included in an encoder (video encoding device) and / or a decoder (video decoding device).
[0269] The intra prediction unit 10010 includes an intra prediction mode acquisition unit 10020 , a reference sample acquisition unit 10030 , a reference sample filtering unit 10040 and a prediction block generation unit 10050 .
[0270] The intra-frame prediction mode acquisition unit 10020 obtains the intra-frame prediction mode of the current block. The intra-frame prediction mode acquisition unit 10020 can perform Figure 5 S501 processing.
[0271] After obtaining the intra prediction mode, the reference sample acquisition unit 10030 obtains the reference sample for generating the prediction block. The reference sample acquisition unit 10030 may perform Figure 5 S502 processing.
[0272] After obtaining the reference sample, the reference sample filtering unit 10040 determines whether to perform filtering on the reference sample. If it is determined to perform filtering, the reference sample filtering unit 10040 filters the reference sample. If it is determined not to perform filtering on the reference sample, the reference sample filtering unit 10040 does not filter the reference sample.
[0273] The current block processed in the intra prediction unit 10010 may correspond to a square block or a non-square block. If the current block is a non-square block, the reference sample filtering unit 10040 determines whether to perform filtering based on the current block parameters and / or surrounding block parameters and the intra prediction mode. For details on the current block parameters and surrounding block parameters, refer to Figure 9 That is, if the current block is a non-square block, the reference sample filtering unit 10040 may determine whether to perform reference sample filtering and / or the filter type according to the criteria of Embodiments 1 to 8.
[0274] The prediction block generation unit 10050 generates a prediction block of the current block using a reference sample that has not been filtered or a reference sample that has been filtered. The prediction block generation unit 10050 may perform Figure 5 S504 processing.
[0275] Figure 11 A flowchart of a video decoding method according to an embodiment of the present invention is shown.
[0276] Video decoding is performed by a video decoding device (decoder).
[0277] The video decoding apparatus obtains the intra-frame prediction mode of the current block (S11010). This process can be Figure 1 The processing of S501 is performed identically or similarly, and therefore, a detailed description thereof is omitted.
[0278] The video decoding apparatus obtains reference samples for generating a prediction block of the current block using adjacent samples of the current block (S11020). This process can be performed with Figure 5 The S502 process is performed in the same or similar manner, and its detailed description is omitted. In addition, in this step, it is possible to perform Figure 9 The method of implementation mode 9.
[0279] Thereafter, the video decoding apparatus determines whether to perform filtering on the reference sample ( S11030 ), and filters the reference sample when it is determined that filtering is to be performed ( S11040 ).
[0280] In the step of determining whether to perform filtering (S11030), the video decoding apparatus determines whether to perform filtering based on current block parameters (i.e., parameters related to the current block) and / or surrounding block parameters (i.e., parameters related to surrounding blocks of the current block) and the intra prediction mode. For details of the current block parameters and surrounding block parameters, refer to Figure 9 Related description.
[0281] Thereafter, the video decoding apparatus generates a prediction block using the reference sample or the filtered reference sample based on the intra prediction mode (S11050). This process can be performed with Figure 5 The processing of S504 is performed identically or similarly, so its detailed description is omitted.
[0282] In the aforementioned embodiments, the elements and features of the present invention have been combined in a specific form. Unless otherwise expressly stated, each element or feature can be considered to be optional. Each element or feature can be implemented in a form not combined with another element or feature. In addition, some elements and / or features can be combined to form embodiments of the present invention. The order of the operations described in the embodiments of the present invention can be changed. Some elements or features of the embodiments can be included in another embodiment, or can be replaced by corresponding elements or features of another embodiment. Obviously, embodiments can be constructed by combining claims that do not have a clear reference relationship in the claims, or embodiments can be included as new claims by amendment after submitting the application.
[0283] Embodiments according to the present invention may be implemented by various means, for example, hardware, firmware, software, or a combination thereof. In the case of hardware implementation, one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, and / or microprocessors may be used to implement embodiments of the present invention.
[0284] In the case of implementation by firmware or software, the embodiments of the present invention may be implemented in the form of modules, procedures, or functions for performing the above-mentioned functions or operations. The software code may be stored in a memory and driven by a processor. The memory may be located inside or outside the processor and may exchange data with the processor through various known means.
[0285] It is obvious to those skilled in the art that the present invention can be implemented in other specific forms without departing from the basic characteristics of the present invention. Therefore, the detailed description should not be interpreted as limiting, but should be interpreted as being illustrative in all aspects. The scope of the present invention should be determined by a reasonable analysis of the appended claims, and all variations within the equivalent scope of the present invention are included within the scope of the present invention.
[0286] Industrial Applicability
[0287] The above-described preferred embodiments of the present invention have been disclosed for illustrative purposes, and those skilled in the art may improve, change, substitute, or add various other embodiments without departing from the technical spirit and scope of the present invention disclosed in the appended claims.
Claims
1. A video decoding method performed by a video decoding apparatus, the video decoding method comprising: Get the intra prediction mode of the current block; Obtaining reference samples for intra prediction based on neighboring samples of the current block; filtering the reference samples based on determining that filtering is to be performed on the reference samples; as well as generating a prediction block of the current block based on the intra prediction mode and the filtered or unfiltered reference samples, wherein whether to perform filtering on the reference samples is determined based on a distance between the current block and the reference samples and based on a first parameter representing a size of the current block, wherein the distance comprises at least one of a vertical distance between a prediction sample in the current block and a top reference sample of the current block or a horizontal distance between a prediction sample in the current block and a left reference sample of the current block, wherein the size comprises a length of a horizontal edge of the current block and a length of a vertical edge of the current block, and Wherein, when the intra prediction mode is a horizontal mode or a vertical mode, filtering the reference samples is skipped regardless of the size of the current block.
2. The video decoding method according to claim 1, in, Whether to perform filtering on the reference sample is further determined based on a second parameter associated with a neighboring block of the current block.
3. The video decoding method according to claim 1, further determining whether to perform filtering on a left reference sample of the current block based on the length of the horizontal edge of the current block, determining whether to perform filtering on a top reference sample of the current block further based on the length of the vertical edge of the current block, and Each of the left reference samples and the top reference samples is filtered independently.
4. The video decoding method according to claim 1, in, further determining whether to perform filtering on the reference sample based on the first square block or the second square block satisfying a predefined filtering performance condition, The first square block is a square block having the same number of pixels as that of the current block, and The second square block is the largest square block among square blocks having a smaller number of pixels than the number of pixels of the current block.
5. The video decoding method according to claim 1, in, Whether to perform filtering on the reference sample is further determined based on whether a first quantization parameter related to a quantization rate of the current block is greater than a first threshold.
6. The video decoding method according to claim 1, in, further determining whether to perform filtering on the reference sample based on whether at least one of a first filtering performance condition or a second filtering performance condition is satisfied, The first filtering performance condition is that the vertical distance is greater than a second threshold, and The second filtering performance condition is that the horizontal distance is greater than a third threshold.
7. The video decoding method according to claim 1, in, Whether to perform filtering on the reference sample is further determined based on whether a second quantization parameter related to a quantization rate of a neighboring block of the current block is greater than a fourth threshold.
8. The video decoding method according to claim 1, in, Whether to perform filtering on the reference sample is further determined based on whether the number of residual coefficients of neighboring blocks of the current block is greater than a fifth threshold.
9. The video decoding method according to claim 1, in, Whether to perform filtering on the reference sample is further determined based on a flag specifying whether a residual coefficient exists in a neighboring block of the current block.
10. The video decoding method according to claim 1, in, Whether to perform filtering on the reference samples is further determined based on an edge parameter that specifies whether one or more of a top reference sample and a left reference sample of the current block are configured with samples belonging to different neighboring blocks of the current block.
11. The video decoding method according to claim 1, in, Whether to perform filtering on the reference samples is further determined based on whether the number of different neighboring blocks of the current block to which one or more of the top reference sample and the left reference sample of the current block belongs is greater than a sixth threshold.
12. The video decoding method according to claim 1, further comprising: Determine whether the top reference sample and the left reference sample of the current block can be used for reference, wherein, when one of the top reference sample and the left reference sample is available for reference, determining whether to perform filtering on the reference sample is further based on a length of an edge adjacent to the available reference sample among a horizontal edge and a vertical edge of the current block; Otherwise, determining whether to perform filtering on the reference sample is further based on the length of the longer or shorter edge among the horizontal edge and the vertical edge, or determining whether to perform filtering on the reference sample independently for each of the top reference sample and the left reference sample, further based on the length of the horizontal edge and the length of the vertical edge.
13. The video decoding method according to claim 1, wherein: The current block is square.
14. A video encoding method performed by a video encoding device, the video encoding method comprising: determining an intra prediction mode for a current block; Obtaining reference samples for intra prediction based on neighboring samples of the current block; filtering the reference samples based on determining that filtering is to be performed on the reference samples; as well as generating a prediction block of the current block based on the intra prediction mode and the filtered or unfiltered reference samples, wherein whether to perform filtering on the reference samples is determined based on a distance between the current block and the reference samples and based on a first parameter representing a size of the current block, wherein the distance comprises at least one of a vertical distance between a prediction sample in the current block and a top reference sample of the current block or a horizontal distance between a prediction sample in the current block and a left reference sample of the current block, wherein the size comprises a length of a horizontal edge of the current block and a length of a vertical edge of the current block, and Wherein, when the intra prediction mode is a horizontal mode or a vertical mode, filtering the reference samples is skipped regardless of the size of the current block.
15. A non-transitory computer-readable recording medium storing instructions that, when executed by a processor, cause the processor to perform a video encoding method to generate a bitstream, the video encoding method comprising: determining an intra prediction mode for a current block; Obtaining reference samples for intra prediction based on neighboring samples of the current block; filtering the reference samples based on determining that filtering is to be performed on the reference samples; as well as generating a prediction block of the current block based on the intra prediction mode and the filtered or unfiltered reference samples, wherein whether to perform filtering on the reference samples is determined based on a distance between the current block and the reference samples and based on a first parameter representing a size of the current block, wherein the distance comprises at least one of a vertical distance between a prediction sample in the current block and a top reference sample of the current block or a horizontal distance between a prediction sample in the current block and a left reference sample of the current block, wherein the size comprises a length of a horizontal edge of the current block and a length of a vertical edge of the current block, and Wherein, when the intra prediction mode is a horizontal mode or a vertical mode, filtering the reference samples is skipped regardless of the size of the current block.
Citation Information
Patent Citations
Method and apparatus for performing intra-prediction using adaptive filter
CN102939761A
Intra-prediction method, and encoder and decoder using same
CN103621079A