Video encoding method and device, and video decoding method and device
By identifying and utilizing the reference sample availability of image blocks for intra prediction and inverse quantization inverse transformation, the problem of inefficient image encoding in the prior art is solved, and more efficient image encoding and decoding is achieved.
Patent Information
- Application Number
- CN202080045559.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-21
- Filing Date
- 2020-06-19
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2040-06-19
AI Technical Summary
When the existing image encoding and decoding methods process high-resolution or high-quality images, it is difficult to effectively utilize the characteristics of the image to perform optimal data unit division and encoding, resulting in insufficiency of encoding.
By identifying the availability of the upper left reference sample point of the current block and searching for reference samples on the left, upper and right reference lines in a direction away from the upper left reference sample point, the availability of the remaining reference samples is determined, and combined with intra prediction and inverse quantization inverse transformation, the prediction and reconstruction block of the image block are generated.
The efficiency of image encoding and decoding is improved, especially in high-resolution or high-quality image processing, and the encoding unit division can be more accurately utilized to improve the encoding efficiency.
Smart Images

Figure CN114073091B_ABST
Abstract
Description
Technical Field
[0001] A method and apparatus according to an embodiment can encode or decode an image by using coding units of various shapes included in the image.A method and apparatus according to an embodiment include an intra prediction method and apparatus. Background Art
[0002] As hardware capable of reproducing and storing high-resolution or high-quality image content has been developed and has become popular, there is a great demand for codecs that can effectively encode or decode high-resolution or high-quality image content. The encoded image content can be decoded to be reproduced. Currently, methods for effectively compressing high-resolution or high-quality image content are being implemented. For example, an effective image compression method is implemented by a process in which the image to be encoded is processed according to a predetermined method.
[0003] Various data units may be used to compress an image, and there may be an inclusion relationship between the data units. The data units to be used to compress the image may be divided by various methods, and the image may be encoded or decoded by determining the optimal data unit according to the characteristics of the image. Summary of the invention
[0004] Technical issues
[0005] According to an embodiment of the present disclosure, an image decoding method includes: when a prediction mode of a current block is an intra mode, determining a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; in addition to the upper left reference sample, sequentially searching for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample, and determining sample values of remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample, obtaining a prediction block of the current block by performing intra prediction on the current block; obtaining residual data of the current block from a bitstream, and obtaining a residual block of the current block by inverse quantizing and inverse transforming the residual data of the current block, wherein the residual block of the current block includes the sample value of the upper left reference sample of the current block and the sample value of the remaining reference samples except the upper left reference sample. a coefficient of a block; and obtaining a reconstructed block of the current block based on a prediction block of the current block and a residual block of the current block, wherein the step of determining a sample value of an upper left reference sample of the current block comprises: when the upper left reference sample is identified as available, determining a reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determining a value based on a bit depth of a sample as the sample value of the upper left reference sample, and the step of determining sample values of remaining reference samples of the current block except the upper left reference sample comprises: when the reference sample in the current search position is identified as unavailable, determining a value based on a bit depth of a sample or a sample value of a reference sample in a previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determining a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0006] According to an embodiment of the present disclosure, an image decoding device includes: at least one processor configured to: when a prediction mode of a current block is an intra mode, determine a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; search for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample in sequence, and determine the sample values of the remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; obtain a prediction block of the current block by performing intra prediction on the current block based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample; obtain residual data of the current block from a bitstream, and obtain a residual block of the current block by dequantizing and inverse transforming the residual data of the current block, wherein the residual block of the current block includes coefficients of the current block; and a reconstructed block of the current block obtained by combining a prediction block and a residual block of the current block, wherein, when the at least one processor determines the sample value of the upper left reference sample of the current block, the at least one processor is further configured to: when the upper left reference sample is identified as available, determine the reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determine a value based on the bit depth of the sample as the sample value of the upper left reference sample, and when the at least one processor determines the When determining sample values of remaining reference samples of the current block except the upper left reference sample of the current block, the at least one processor is further configured to: when the reference sample in the current search position is identified as unavailable, determine a value based on the bit depth of the sample or a sample value of the reference sample in the previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determine a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0007] According to an embodiment of the present disclosure, an image encoding method includes: when a prediction mode of a current block is an intra mode, determining a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; in addition to the upper left reference sample, sequentially searching for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample, and determining sample values of remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample, obtaining a prediction block of the current block by performing intra prediction on the current block; generating a residual block including coefficients of the current block based on the prediction block of the current block, and generating transform coefficients of the current block by transforming and quantizing the residual block; and generating a bitstream including information about transform coefficients of the current block, wherein the step of determining a sample value of an upper left reference sample of the current block comprises: when the upper left reference sample is identified as available, determining a reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determining a value based on the bit depth of a sample as the sample value of the upper left reference sample, and the step of determining sample values of remaining reference samples of the current block except the upper left reference sample comprises: when the reference sample in the current search position is identified as unavailable, determining a value based on the bit depth of a sample or a sample value of a reference sample in a previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determining a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0008] A computer program for an image decoding method / image encoding method according to an embodiment of the present disclosure is recorded on a computer-readable recording medium.
[0009] Solution to the problem
[0010] According to an embodiment of the present disclosure, an image decoding method includes: when a prediction mode of a current block is an intra mode, determining a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; in addition to the upper left reference sample, sequentially searching for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample, and determining sample values of remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; based on the determined sample value of the upper left reference sample of the current block and the determined sample values of remaining reference samples except the upper left reference sample, obtaining a prediction block of the current block by performing intra prediction on the current block; obtaining residual data of the current block from a bitstream, and obtaining a residual block of the current block by dequantizing and inverse transforming the residual data of the current block, wherein the residual block of the current block includes the sample value of the current block. a coefficient of a block; and obtaining a reconstructed block of the current block based on a prediction block of the current block and a residual block of the current block, wherein the step of determining a sample value of an upper left reference sample of the current block comprises: when the upper left reference sample is identified as available, determining a reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determining a value based on a bit depth of a sample as the sample value of the upper left reference sample, and the step of determining sample values of remaining reference samples of the current block except the upper left reference sample comprises: when the reference sample in the current search position is identified as unavailable, determining a value based on a bit depth of a sample or a sample value of a reference sample in a previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determining a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0011] According to an embodiment of the present disclosure, an image decoding device includes: at least one processor configured to: when a prediction mode of a current block is an intra mode, determine a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; search for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample in sequence, and determine the sample values of the remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; obtain a prediction block of the current block by performing intra prediction on the current block based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample; obtain residual data of the current block from a bitstream, and obtain a residual block of the current block by dequantizing and inverse transforming the residual data of the current block, wherein the residual block of the current block includes coefficients of the current block; and a reconstructed block of the current block obtained by combining a prediction block and a residual block of the current block, wherein, when the at least one processor determines the sample value of the upper left reference sample of the current block, the at least one processor is further configured to: when the upper left reference sample is identified as available, determine the reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determine a value based on the bit depth of the sample as the sample value of the upper left reference sample, and when the at least one processor determines the When determining sample values of remaining reference samples of the current block except the upper left reference sample of the current block, the at least one processor is further configured to: when the reference sample in the current search position is identified as unavailable, determine a value based on the bit depth of the sample or a sample value of the reference sample in the previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determine a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0012] According to an embodiment of the present disclosure, an image encoding method includes: when a prediction mode of a current block is an intra mode, determining a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; in addition to the upper left reference sample, sequentially searching for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample, and determining sample values of remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample, obtaining a prediction block of the current block by performing intra prediction on the current block; generating a residual block including coefficients of the current block based on the prediction block of the current block, and generating transform coefficients of the current block by transforming and quantizing the residual block; and generating a bitstream including information about transform coefficients of the current block, wherein the step of determining a sample value of an upper left reference sample of the current block comprises: when the upper left reference sample is identified as available, determining a reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determining a value based on the bit depth of a sample as the sample value of the upper left reference sample, and the step of determining sample values of remaining reference samples of the current block except the upper left reference sample comprises: when the reference sample in the current search position is identified as unavailable, determining a value based on the bit depth of a sample or a sample value of a reference sample in a previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determining a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0013] A computer program for an image decoding method / image encoding method according to an embodiment of the present disclosure may be recorded on a computer-readable recording medium. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1a is a block diagram of an image decoding apparatus according to various embodiments.
[0015] Figure 1b is a flowchart of an image decoding method according to various embodiments.
[0016] Figure 1c is a block diagram of an image decoder according to various embodiments.
[0017] Figure 2a is a block diagram of an image encoding apparatus according to various embodiments.
[0018] Figure 2b is a flowchart of an image encoding method according to various embodiments.
[0019] Figure 2c is a block diagram of an image encoder according to various embodiments.
[0020] Figure 3a is a diagram for describing a process in which the image decoding apparatus 100 determines sample values of reference samples to be stored in a reference buffer for intra prediction according to an embodiment.
[0021] Figure 3b is a diagram for describing a method of determining a sample value of a corresponding reference sample (and configuring a reference buffer) performed by the image decoding apparatus 100 when the image decoding apparatus 100 uses a reference sample spaced apart from a current block 200 for intra prediction according to an embodiment.
[0022] Figure 3c 2 is a diagram for describing a method of configuring a single buffer that can determine sample values of corresponding reference samples, which is performed by the image decoding apparatus 100 when the image decoding apparatus 100 performs intra prediction using reference samples spaced apart from a current block 200 according to an embodiment.
[0023] Figure 3d A pseudo code for implementing an operation of configuring an upper reference line buffer performed by the image decoding apparatus 100 according to an embodiment is shown.
[0024] Figure 4a to Figure 4g 2 is a diagram for describing a process in which the image decoding apparatus 100 determines reference samples (pixels) around a corner of a current block 200 when the image decoding apparatus 100 performs intra prediction on the current sample in an angle mode according to an embodiment.
[0025] Figure 5a A diagram for describing a split unit coding order (SUCO) method for determining a coding (decoding) order between coding units as forward or backward based on a coding order flag according to an embodiment of the present disclosure and for describing that a right reference line can be used for intra-frame prediction according to a coding (decoding) order based on the SUCO method.
[0026] Figure 5b is a diagram for describing a SUCO status determined based on the availability of a left neighboring area and a right neighboring area according to the SUCO method.
[0027] Figure 6 A process of determining at least one coding unit by splitting a current coding unit, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0028] Figure 7A process of determining at least one coding unit by splitting a non-square coding unit, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0029] Figure 8 A process of splitting a coding unit based on at least one of block shape information and division shape pattern information, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0030] Fig. 9 A method of determining a predetermined coding unit from among odd-numbered coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0031] Fig.10 An order in which a plurality of coding units are processed when an image decoding apparatus determines a plurality of coding units by splitting a current coding unit according to an embodiment is illustrated.
[0032] Fig.11 A process of determining that a current coding unit is to be split into an odd number of coding units when coding units cannot be processed in a predetermined order, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0033] Fig.12 A process of determining at least one coding unit by splitting a first coding unit, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0034] Fig.13 It is shown that according to an embodiment, when a second coding unit having a non-square shape determined by splitting a first coding unit by an image decoding apparatus satisfies a predetermined condition, shapes into which the second coding unit may be split are restricted.
[0035] Fig.14 A process of splitting a square coding unit when division shape pattern information indicates that the square coding unit is not to be split into four square coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0036] Fig.15 It is shown that a processing order among a plurality of coding units may be changed according to a process of dividing the coding units according to an embodiment.
[0037] Fig.16 A process of determining a depth of a coding unit when a shape and a size of a coding unit are changed when a coding unit is recursively split so that a plurality of coding units are determined according to an embodiment is illustrated.
[0038] Fig.17 Depth that may be determined based on the shape and size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.
[0039] Fig.18 It is shown that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment.
[0040] Fig.19 A processing block serving as a unit for determining an order of reference coding units included in a picture according to an embodiment is illustrated.
[0041] Best Mode
[0042] According to an embodiment of the present disclosure, an image decoding method includes: when a prediction mode of a current block is an intra mode, determining a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; in addition to the upper left reference sample, sequentially searching for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample, and determining sample values of remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; based on the determined sample value of the upper left reference sample of the current block and the determined sample values of remaining reference samples except the upper left reference sample, obtaining a prediction block of the current block by performing intra prediction on the current block; obtaining residual data of the current block from a bitstream, and obtaining a residual block of the current block by dequantizing and inverse transforming the residual data of the current block, wherein the residual block of the current block includes the sample value of the current block. a coefficient of a block; and obtaining a reconstructed block of the current block based on a prediction block of the current block and a residual block of the current block, wherein the step of determining a sample value of an upper left reference sample of the current block comprises: when the upper left reference sample is identified as available, determining a reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determining a value based on a bit depth of a sample as the sample value of the upper left reference sample, and the step of determining sample values of remaining reference samples of the current block except the upper left reference sample comprises: when the reference sample in the current search position is identified as unavailable, determining a value based on a bit depth of a sample or a sample value of a reference sample in a previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determining a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0043] The step of determining sample values of remaining reference samples of the current block except the upper left reference sample may include: when availability of the reference sample in the current search position is identified from the remaining reference samples except the upper left reference sample, when it is identified that intra prediction is performed by not using reference samples reconstructed according to the inter mode and by using only reference samples reconstructed according to the intra mode, when a prediction mode of a reference block including the reference sample in the current search position is the inter mode, identifying the reference sample in the current search position as unavailable.
[0044] The step of determining sample values of remaining reference samples of the current block except the top-left reference sample may include: when identifying availability of the reference sample in the current search position from the remaining reference samples except the top-left reference sample, when the reference sample in the current search position is located outside the picture, included in a different slice from the current block, or included in a different tile from the current block, identifying the reference sample in the current search position as unavailable.
[0045] The step of obtaining the prediction block of the current block may include: when the intra-frame prediction mode of the current block is the DC mode, identifying the availability of the left neighboring area and the right neighboring area of the current block; and based on the identified availability of the left neighboring area and the right neighboring area of the current block, obtaining the prediction sample value of the sample in the current block by using the sample of at least one reference line determined among the left reference line, the upper reference line and the right reference line of the current block.
[0046] The step of obtaining the predicted sample value of the sample in the current block may include: when the left neighboring area is identified as available and the right neighboring area is identified as unavailable, obtaining the predicted sample value of the sample in the current block based on an average value of the determined sample value of the reference sample of the left reference line and the determined sample value of the reference sample of the upper reference line.
[0047] The step of obtaining the predicted sample value of the sample in the current block may include: when the right neighboring area is identified as available and the left neighboring area is identified as unavailable, obtaining the predicted sample value of the sample in the current block based on an average value of the sample value of the reference sample of the determined upper reference line and the sample value of the reference sample of the determined right reference line.
[0048] The step of obtaining the predicted sample value of the sample in the current block may include: when the right neighboring area and the left neighboring area are identified as available, obtaining the predicted sample value of the sample in the current block based on the average value of the sample value of the reference sample of the determined upper reference line and the sample value of the reference sample of the determined right reference line.
[0049] When the coordinate value of the sample point at the upper left corner of the current block is (0, 0), the coordinate value of the upper left reference sample point of the current block may be (-1, -1).
[0050] The step of obtaining the predicted block of the current block may include: when the intra prediction mode of the current block is the angle mode, performing filtering using an N-tap interpolation filter (N is a natural number greater than 1) by using a first reference sample of the at least one reference line and sample values of neighboring samples adjacent to the first reference sample, and obtaining a predicted sample value of the current sample based on a result of the filtering, wherein the first reference sample is connected to an extended line from the current sample in the current block in an intra prediction direction indicated by the angle mode or in a direction opposite to the intra prediction direction, the sample values of the neighboring samples may be sample values of coordinates modified by clipping the coordinates of the neighboring samples, and when the coordinate value of the sample at the upper left corner of the current block is (0, 0), a lower limit of a clipped range may be -1, and an upper limit of the clipped range may be a value based on at least one of a height and a width of the current block.
[0051] The search direction of the upper reference line may be a right direction from the upper left reference sample point, the search direction of the left reference line may be a lower direction from the upper left reference sample point, the search direction of the right reference line may be a lower direction from the upper right reference sample point of the current block, and when the coordinate value of the sample point at the upper left corner of the current block is (0, 0), the x coordinate value of the upper right reference sample point of the current block may be the width of the current block, and the y coordinate value may be -1.
[0052] The image decoding method may also include: obtaining one or more coding units by hierarchically dividing the current image based on a division shape pattern, wherein one of the one or more coding units may be the current block, and the division shape pattern may be based on a division type including one of quadruple division, binary division and ternary division.
[0053] When the division direction of the first coding unit is a vertical direction, the decoding order of the left second coding unit and the right second coding unit divided according to the division direction can be determined in the order of the left second coding unit and then the right second coding unit or in the order of the right second coding unit and then the left second coding unit.
[0054] The value based on the bit depth of the sample may be a median value within a range of sample values indicated by the bit depth of the sample.
[0055] According to an embodiment of the present disclosure, an image decoding device includes: at least one processor configured to: when a prediction mode of a current block is an intra mode, determine a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; search for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample in sequence, and determine the sample values of the remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; obtain a prediction block of the current block by performing intra prediction on the current block based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample; obtain residual data of the current block from a bitstream, and obtain a residual block of the current block by dequantizing and inverse transforming the residual data of the current block, wherein the residual block of the current block includes coefficients of the current block; and a reconstructed block of the current block obtained by combining a prediction block and a residual block of the current block, wherein, when the at least one processor determines the sample value of the upper left reference sample of the current block, the at least one processor is further configured to: when the upper left reference sample is identified as available, determine the reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determine a value based on the bit depth of the sample as the sample value of the upper left reference sample, and when the at least one processor determines the When determining sample values of remaining reference samples of the current block except the upper left reference sample of the current block, the at least one processor is further configured to: when the reference sample in the current search position is identified as unavailable, determine a value based on the bit depth of the sample or a sample value of the reference sample in the previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determine a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0056] According to an embodiment of the present disclosure, an image encoding method includes: when a prediction mode of a current block is an intra mode, determining a sample value of an upper left reference sample of the current block by identifying the availability of an upper left reference sample of the current block; in addition to the upper left reference sample, sequentially searching for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample, and determining sample values of remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples; based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample, obtaining a prediction block of the current block by performing intra prediction on the current block; generating a residual block including coefficients of the current block based on the prediction block of the current block, and generating transform coefficients of the current block by transforming and quantizing the residual block; and generating a bitstream including information about transform coefficients of the current block, wherein the step of determining a sample value of an upper left reference sample of the current block comprises: when the upper left reference sample is identified as available, determining a reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample; and when the upper left reference sample is identified as unavailable, determining a value based on the bit depth of a sample as the sample value of the upper left reference sample, and the step of determining sample values of remaining reference samples of the current block except the upper left reference sample comprises: when the reference sample in the current search position is identified as unavailable, determining a value based on the bit depth of a sample or a sample value of a reference sample in a previous search position as the sample value of the reference sample in the current search position; and when the reference sample in the current search position is identified as available, determining a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0057] A computer program for an image decoding method / image encoding method according to an embodiment of the present disclosure may be recorded on a computer-readable recording medium. DETAILED DESCRIPTION
[0058] From the following description of the embodiments of the present disclosure in conjunction with the accompanying drawings, the advantages and features of the embodiments of the present disclosure set forth herein and the methods for realizing them will be apparent. However, the present disclosure is not limited to the embodiments of the present disclosure set forth herein, and can be implemented in many different forms. The embodiments of the present disclosure are only provided so that the present disclosure will be thorough and complete and will fully convey the scope of the present disclosure to those of ordinary skill in the art.
[0059] The terms used herein will be briefly described, and then the embodiments of the present disclosure set forth herein will be described in detail.
[0060] In this specification, when possible, common terms that are currently widely used are selected in consideration of the functions of the present disclosure, but non-common terms may be selected based on the intentions of those skilled in the art, precedents, or new technologies, etc. Some terms may be selected arbitrarily by the applicant. In this case, the meanings of these terms will be explained in detail in the corresponding parts of the present disclosure. Therefore, the terms used here should not be defined based on their names but on their meanings and the entire context of the present disclosure.
[0061] As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0062] It will be understood that when an element is referred to as “comprising” another element, the element may further include other elements unless otherwise stated.
[0063] The term "unit" used here should be understood as a software component or hardware component that performs a predetermined function. However, the term "unit" is not limited to software or hardware. The term "unit" can be configured to be stored in an addressable storage medium or reproduce one or more processors. Therefore, the term "unit" can include, for example, components (such as software components, object-oriented software components, class components and task components), processes, functions, attributes, procedures, subroutines, program code fragments, drivers, firmware, microcodes, circuits, data, databases, data structures, tables, arrays and parameters. The functions provided in components and "units" can be combined into a small number of components and "units", or can be divided into subcomponents and "subunits".
[0064] According to an embodiment of the present disclosure, a "unit" may be implemented with a processor and a memory. The term "processor" should be broadly interpreted to include a general-purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, etc. In some cases, a "processor" may refer to an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), etc. The term "processor" may refer to a combination of processing devices, for example, a combination of a DSP and a microprocessor, a combination of multiple microprocessors, a combination of one or more microprocessors combined with a DSP core, or a combination of any other configuration.
[0065] The term "memory" should be interpreted broadly to include any electronic component capable of storing electronic information. The term "memory" may refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage devices, registers, etc. When a processor is able to read information from and / or write information to the memory, the memory may be said to be in electronic communication with the processor. Memory integrated into a processor is in electronic communication with the processor.
[0066] The term "image" when used herein should be understood to include static images (such as still images of a video) as well as moving pictures (ie, dynamic images) as a video.
[0067] The term "sample" when used herein refers to data assigned to a sampling position of an image, that is, data to be processed. For example, a sample may be a pixel value in a spatial domain and a transform coefficient in a transform domain. A unit including at least one such sample may be defined as a block. Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that a person of ordinary skill in the art can easily implement the embodiments of the present disclosure. In addition, parts not related to the description will be omitted in the drawings to clearly describe the present disclosure.
[0068] In the following, with reference to FIGS. 1 to Fig.19 An image encoding apparatus and an image decoding apparatus as well as an image encoding method and an image decoding method according to embodiments are described in detail.
[0069] Will refer to Figures 6 to 19 A method for determining a data unit of an image according to an embodiment is described, and reference will be made to Figures 1a to 5b An encoding method and apparatus or an image decoding method and apparatus for efficiently performing intra prediction in consideration of availability of identifying neighboring reference samples according to an embodiment is described.
[0070] In the following, reference is made to Figures 1a to 5b An image encoding method and apparatus or an image decoding method and apparatus for efficiently performing intra prediction in consideration of availability of identifying neighboring reference samples according to an embodiment of the present disclosure is described in detail.
[0071] Figure 1a is a block diagram of an image decoding apparatus according to various embodiments.
[0072] The image decoding apparatus 100 according to various embodiments may include an obtainer 105 and an image decoder 110 .
[0073] The obtainer 105 and the image decoder 110 may include at least one processor. In addition, the obtainer 105 and the image decoder 110 may include a memory storing instructions to be executed by the at least one processor.
[0074] The image decoder 110 may be implemented as hardware separate from the obtainer 105 , or may include the obtainer 105 .
[0075] The image decoder 110 may include an intra predictor 115. In this case, the image decoder 110 may be implemented as hardware separate from the intra predictor 115.
[0076] The intra predictor 115 may obtain a predicted block of the current block by performing intra prediction on the current block using reference samples included in a neighboring region of the current block.
[0077] The image decoder 110 may obtain a reconstructed block of the current block based on the prediction block of the current block obtained by the intra predictor 115 .
[0078] When the prediction mode of the current block is the intra mode, the intra predictor 115 may identify the availability of the upper left reference sample of the current block, and may determine the sample value of the upper left reference sample of the current block. The reason for performing this operation is to determine the sample value of the reference sample used for intra prediction of the current block. Here, the sample value of the reference sample determined for intra prediction of the current block may be stored in a reference buffer. The reference buffer may have a one-dimensionally arranged shape. That is, the intra predictor 115 may determine the sample value of the reference sample, and may configure the reference buffer based on the determined sample value of the reference sample. The intra predictor 115 may determine the sample value of the reference sample, and may store the determined sample value of the reference sample in a corresponding position in the reference buffer.
[0079] In addition, marking may be performed on the reference samples stored in the reference buffer. For example, the first reference sample stored in the reference buffer may be marked as “available for intra prediction” or “unavailable for intra prediction”. The intra predictor 115 may perform intra prediction on the current block by using the samples marked as “available for intra prediction” among the reference samples stored in the reference buffer.
[0080] Hereinafter, according to an embodiment, a method is described in detail, according to which the intra-frame predictor 115 can determine a sample value of a reference sample, store the determined sample value in a reference buffer, perform marking on the stored sample, and perform intra-frame prediction based on the stored sample.
[0081] When it is identified that the upper left reference sample is available, the intra predictor 115 may determine the sample value reconstructed for the upper left reference sample as the sample value of the upper left reference sample. Here, when the coordinate value of the upper left corner sample of the current block is (0,0), the coordinate value of the upper left reference sample may be (-1,-1). That is, the upper left reference sample may represent a pixel directly adjacent to the upper left side of the upper left corner sample of the current block.
[0082] When it is identified that the upper left reference sample is not available, the intra predictor 115 may determine a default value (such as 0 or a value based on the bit depth of the sample) as the sample value of the upper left reference sample. For example, the value based on the bit depth of the sample may be a median value or a maximum value in the range of sample values indicated by the bit depth of the sample. That is, when the bit depth is 8, in the range (0-255) of the sample value indicated by the bit depth of the sample, the value based on the bit depth of the sample may be 128 (or 127) (as a median value), or may be 255 (as a maximum value). Alternatively, when it is identified that the upper left reference sample is not available, the intra predictor 115 may determine a default value (such as a median value, a maximum value, or a minimum value of the bit depth of the sample indicated for each of luma and chroma when a tool such as an adaptive bit depth is applied) as the sample value of the upper left reference sample. For example, when the bit depth of samples indicated for each of luma and chroma is N, the median of the bit depth may be indicated as (1<<(N−1)), and when N is 10 bits, the median may be 512.
[0083] The intra predictor 115 may identify whether the reference sample in the current position is available as follows. That is, when the current position is outside the picture, the intra predictor 115 may identify that the reference sample in the corresponding position is not available, and when the current position is inside the picture, the intra predictor 115 may identify that the reference sample in the corresponding position is available. When the current position is included in a different slice from the current block, the intra predictor 115 may identify that the reference sample in the corresponding position is not available, and when the current position is included in the same slice as the current block, the intra predictor 115 may identify that the reference sample in the corresponding position is available.
[0084] When the current position is included in a different tile from the current block, the intra predictor 115 may recognize that the reference sample in the corresponding position is unavailable. When the current position is included in the same tile as the current block, the intra predictor 115 may recognize that the reference sample in the corresponding position is available.
[0085] When the current position is located on a different side from the current block based on a virtual boundary (for example, when the current position is located on a different side from the current block based on a boundary of a window in a 360-degree image, or is located in a different flexible tile from the current block based on a boundary of a flexible tile having a boundary inside a coding tree unit (CTU) or a maximum coding unit), the intra predictor 115 may recognize that the reference sample in the corresponding position is not available, and when the situation is not as described above, the intra predictor 115 may recognize that the reference sample in the corresponding position is available. That is, the flexible tile may be a plurality of tiles divided from an image and having different sizes from each other, and when the flexible tile is used, the boundary between the flexible tiles may be inside the CTU.
[0086] When it is identified that constrained intra prediction (CIP) is used, the intra predictor 115 may identify that the reference sample in the corresponding position is not available when the corresponding position is encoded in the inter mode. In addition, when the corresponding position is encoded in the intra mode, the reference sample in the corresponding position may be identified as available. Here, CIP may mean that for intra prediction of the current block, when the neighboring block is encoded in the inter mode, intra prediction is performed by not using the samples of the corresponding neighboring block encoded in the inter mode and by using only the samples of the neighboring block encoded in the intra mode, so as to prevent error propagation. Here, a CIP activation flag may be obtained from the bitstream, and whether the CIP is used may be identified based on the corresponding CIP activation flag. In addition, the prediction mode of the neighboring block may be identified based on the prediction mode information of the neighboring block (e.g., the neighboring coding unit including the reference sample in the corresponding position) obtained from the bitstream.
[0087] When there are reconstructed samples for the current position, the intra predictor 115 may recognize that reference samples in the corresponding position are available.
[0088] The intra predictor 115 may identify the availability of reference samples in the corresponding position by combining the above-mentioned various situations.
[0089] In addition to the top left reference sample, the intra predictor 115 may sequentially search for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the top left reference sample. The intra predictor 115 may determine sample values of the remaining reference samples of the current block except the top left reference sample by identifying availability of the searched reference samples.
[0090] Here, the reference line may represent a row or column including a plurality of reference sample points, and may be a row or column directly adjacent to a corner row or corner column of the current block, a column directly adjacent to the left side of a left corner column of the current block, a row directly adjacent to the upper side of an upper corner row, or a column directly adjacent to the right side of a right corner column. Here, the length of the reference line may be greater than the height or width of the current block. Sample points that are not directly adjacent to the current block may be referenced according to a prediction direction. Therefore, the length of the reference line may be greater than the height or width of the current block.
[0091] For example, the length of the reference line may be a value obtained by summing the height and width of the current block, but is not limited thereto and may have various values.
[0092] For example, when the coordinate value of the upper left corner of the current block is (0, 0), the x coordinate of the reference sample included in the left reference line of the current block may be -1, and the y coordinate may be a value in the range from -1 (or 0) to a value obtained by subtracting 1 from a value obtained by summing the height and width of the current block, the y coordinate of the reference sample included in the upper reference line of the current block may be -1, and the x coordinate may be a value in the range from -1 (or 0) to a value obtained by subtracting 1 from a value obtained by summing the height and width of the current block. The x coordinate of the reference sample included in the right reference line of the current block may be the width of the current block, and the y coordinate may be a value in the range from -1 (or 0) to a value obtained by subtracting 1 from a value obtained by summing the height and width of the current block.
[0093] Here, the search direction of the upper reference line may be the right direction from the upper left reference sample point, the search direction of the left reference line may be the lower direction from the upper left reference sample point, and the search direction of the right reference line may be the lower direction from the upper right reference sample point of the current block. When the coordinate value of the sample point at the upper left corner of the current block is (0,0), the x coordinate of the upper right reference sample point of the current block may be the width of the current block, and the y coordinate may be -1.
[0094] When the reference sample in the current search position is identified as unavailable, the intra predictor 115 may determine a default value or a sample value of the reference sample in the previous search position as the sample value of the reference sample in the current search position. Here, the default value may be the same as the default value described above. For example, the default value may be a value based on the bit depth of the sample, and may be a median or maximum value of a range of sample values indicated by the bit depth of the sample.
[0095] When the reference sample in the current search position is identified as available, the intra predictor 115 may determine the reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0096] As described above, when the intra predictor 115 identifies the availability of the reference sample in the current search position from the reference samples other than the upper left reference sample, and when it is identified that intra prediction (i.e., CIP) is performed by not using the reference samples reconstructed in the inter mode but by using only the reference samples reconstructed in the intra mode, when the prediction mode of the reference block including the reference sample in the current search position corresponds to the inter mode, the intra predictor 115 may identify that the reference sample in the current search position is unavailable. Alternatively, when the intra predictor 115 identifies the availability of the reference sample in the current search position from the reference samples other than the upper left reference sample, the intra predictor 115 may determine that the reference sample in the current search position is unavailable when the reference sample in the current search position is outside the picture, included in a different slice from the current block, included in a different tile from the current block, or located on a different side from the current block based on a virtual boundary.
[0097] When the intra predictor 115 identifies the availability of a reference sample in a current search position from reference samples other than the upper left reference sample, the intra predictor 115 may identify that the reference sample in the current search position is unavailable when there is a reconstructed sample value for the reference sample in the current search position.
[0098] The intra predictor 115 may recognize the availability of reference samples in the current search position by combining the above-mentioned various situations.
[0099] The intra predictor 115 may obtain a prediction block of the current block by performing intra prediction on the current block based on the determined sample value of the upper left reference sample of the current block and the determined sample value of the reference sample other than the upper left reference sample. Here, the determined sample value of the upper left reference sample of the current block and the determined sample value of the reference sample other than the upper left reference sample may be stored in a reference buffer, and all reference samples stored in the reference buffer may be marked as “available for intra prediction”.
[0100] Therefore, when the intra predictor 115 performs intra prediction by using the reference samples stored in the reference buffer, the intra predictor 115 may not additionally recognize the availability of the reference samples stored in the reference buffer, and may freely use all the reference samples stored in the reference buffer to perform intra prediction. That is, after the sample value of the upper left reference sample stored in the reference buffer is determined as a reliable value according to the above series of methods regardless of the availability of the reference samples, the intra predictor 115 may sequentially search for the remaining reference samples except the upper left reference sample according to the availability of the reference samples, and may determine the sample values of the remaining reference samples as reliable values regardless of the availability of the reference samples in the current search position. Therefore, all the reference samples stored in the reference buffer may be determined to be available for intra prediction, and therefore, intra prediction may be performed by freely using all the reference samples stored in the reference buffer.
[0101] However, the present disclosure is not limited thereto. Even when all reference samples stored in the reference buffer are marked as available, the reference samples in the predetermined position may have a possibility that their sample values may not be properly derived for intra prediction, and therefore, whether the reference samples stored in the reference buffer can be used for intra prediction may be additionally identified as needed.
[0102] The image decoder 110 may determine at least one coding unit by hierarchically dividing the current image. For example, the image decoder 110 may determine at least one coding unit by hierarchically dividing the current image based on a division shape pattern of the current image. Here, the division shape pattern may indicate whether to perform division, at least one of a division direction and a division type. The division type may indicate one of a binary division, a ternary division and a quaternary division. The obtainer 105 may obtain information about the division shape pattern of the current image, and the image decoder 110 may determine at least one coding unit by hierarchically dividing the current image based on the obtained information about the division shape pattern of the current image. Here, the current block on which the intra predictor 115 performs intra prediction may be one of the determined at least one coding unit.
[0103] When the division direction of the first coding unit is a vertical direction, the image decoder 110 may determine the decoding order of the left second coding unit and the right second coding unit divided according to the division direction as the order of the left second coding unit and then the right second coding unit, or as the order of the right second coding unit and then the left second coding unit. Here, a method of determining whether the encoding order and the decoding order of the divided right coding unit and the left coding unit are determined to be forward or backward is referred to as a division unit coding order (SUCO) method.
[0104] When the SUCO method is not applied, the image decoder 110 may determine the decoding order of the second coding unit as the order of the left second coding unit and then the right second coding unit (forward). However, when the SUCO method is applied, the image decoder 110 may determine the decoding order of the second coding unit as the order of the left second coding unit and then the right second coding unit (forward) or the order of the right second coding unit and then the left second coding unit (backward). Figure 5a Detailed aspects about the SUCO method are described.
[0105] By considering the decoding order of the coding unit when the SUCO method is applied, the reference samples available for intra prediction may not be limited to the left neighboring area and the upper neighboring area, and may also include the right neighboring area. However, the left neighboring area and the right neighboring area may not always be available, and therefore, the intra predictor 115 may recognize the availability of the left neighboring area and the right neighboring area by considering the decoding order, and may perform intra prediction on the current block by considering the availability of the left neighboring area and the right neighboring area.
[0106] For example, when the reference buffer is configured as described above when the intra prediction mode of the current block is a direct current (DC) mode, sample values of reference samples of all left reference lines, upper reference lines, and right reference lines of the current block stored in the reference buffer may be defined. Therefore, the intra predictor 115 may perform intra prediction on the current block without additionally identifying availability. That is, when the intra prediction mode of the current block is a DC mode, the intra predictor 115 may determine a predicted sample value of a sample in the current block by using an average value of reference samples in all directions (left, upper, and right directions).
[0107] When the SUCO method is applied, the intra predictor 115 may recognize a condition according to the SUCO method. Figure 5b The situation according to the SUCO method is described in detail. Here, the identification of the situation according to the SUCO method may correspond to the identification of the availability of the left neighboring area and the upper neighboring area of the current block.
[0108] The intra predictor 115 may obtain the predicted sample value of the sample in the current block by using the sample of at least one of the left reference line, the upper reference line, and the right reference line of the current block based on the availability of the left neighboring area and the right neighboring area of the current block. For example, the intra predictor 115 may identify one of various situations LR_00, LR_01, LR_10, and LR_11 according to the SUCO method, and based on the identified situation according to the SUCO method, may obtain the predicted sample value of the sample in the current block by using the sample of at least one of the left reference line, the upper reference line, and the right reference line of the current block.
[0109] When the left neighboring area is identified as available and the right neighboring area is identified as unavailable, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the left reference line and the average value of the sample value of the reference sample of the upper reference line. For example, when the condition according to the SUCO method is LR_10, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the left reference line and the average value of the sample value of the reference sample of the upper reference line.
[0110] Alternatively, when the left neighboring area of the current block is identified as unavailable and the right neighboring area is identified as available, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the right reference line and the average value of the sample value of the reference sample of the upper reference line. For example, when the condition according to the SUCO method is LR_01, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the right reference line and the average value of the sample value of the reference sample of the upper reference line.
[0111] Alternatively, when the left neighboring area of the current block is identified as available and the right neighboring area is identified as available, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the left reference line, the sample value of the reference sample of the right reference line, and the average value of the sample value of the reference sample of the upper reference line. For example, when the condition according to the SUCO method is LR_11, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the left reference line, the sample value of the reference sample of the right reference line, and the average value of the sample value of the reference sample of the upper reference line.
[0112] Alternatively, when the left neighboring area of the current block is identified as unavailable and the right neighboring area is identified as unavailable, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the average value of the sample value of the reference sample of the upper reference line. For example, when the condition according to the SUCO method is LR_00, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the average value of the sample value of the reference sample of the upper reference line. However, it is not limited thereto. When the condition according to the SUCO method is LR_00, the intra predictor 115 may obtain the predicted sample value of the sample in the current block based on the average value of the sample value of the reference sample of the left reference line and the sample value of the reference sample of the upper reference line.
[0113] As described above, when the intra prediction mode is the DC mode, the intra predictor 115 may obtain the predicted sample value of the sample in the current block by using the sample of at least one reference line among the left reference line, the upper reference line, and the right reference line of the current block based on the availability of the left neighboring area and the right neighboring area of the current block. However, the present disclosure is not limited thereto. Regardless of the availability of the neighboring area of the current block, the predicted sample value of the sample in the current block may be obtained by using the sample of at least one reference line determined among the left reference line, the upper reference line, and the right reference line of the block.
[0114] In addition, when the intra-frame prediction mode is the DC mode, the intra-frame predictor 115 can obtain the predicted sample value of the sample in the current block by using the sample of at least one reference line among the left reference line, the upper reference line and the right reference line of the current block based not only on the availability of the left neighboring area and the availability of the right neighboring area, but also on the availability of the upper neighboring area.
[0115] Hereinafter, according to an embodiment, a method of efficiently signaling a chroma intra prediction mode performed by the image decoding apparatus 100 is described.
[0116] The chroma intra prediction mode may include a total of five modes, namely, a direct mode (DM), a DC mode, a vertical mode, and a horizontal mode. Here, the direct mode (referred to as DM or DM mode) represents an intra prediction mode that uses the luma intra prediction mode intact as the chroma intra prediction mode. When the intra prediction mode indicated by DM overlaps with the remaining four modes, the mode among the four modes (the mode overlapping with the intra prediction mode indicated by DM) may be replaced by another mode, or one bit may be saved via truncated binarization. However, in this case, dependence on DM may occur, and an additional context model may be required. Therefore, in the following, a simple method of signaling a chroma intra prediction mode is described.
[0117] When the number of candidates for the chroma intra prediction mode remains five, DM is selected as the same intra prediction mode as the remaining candidates for the intra prediction mode, and overlap may be allowed. Here, the information about whether the chroma intra prediction mode is DM may be encoded as a 1-bit flag based on the binary arithmetic of the context. When the chroma intra prediction mode is not DM, the remaining four candidates for the intra prediction mode may be encoded as 2 bits by fixed length coding (FLC).
[0118] Therefore, the obtainer 105 may obtain a 1-bit flag indicating whether the chroma intra prediction mode is DM from the bitstream, and may identify whether the chroma intra prediction mode is DM based on the value of the information on whether the chroma intra prediction mode is DM, wherein the information is obtained by performing binary arithmetic decoding based on a context model. Here, when binary arithmetic decoding based on a context model is performed, one context model may be used.
[0119] When it is identified that the chroma intra prediction mode of the current block is not DM, the obtainer 105 can obtain 2-bit information about the chroma intra prediction mode from the bitstream, can determine its value by debinarizing the 2-bit information according to the FLC, and can obtain the chroma intra prediction mode corresponding to the value. Therefore, the dependence on DM can be eliminated, various comparison operations can be reduced, and the chroma intra prediction mode can be signaled in a simple manner without using an additional context model.
[0120] The intra-frame predictor 115 may perform intra-frame prediction by using reference samples that are spaced apart from the current block and do not directly contact the current block. For example, when the coordinate value of the upper left corner of the current block is (0,0), reference samples having coordinate values of (-2,-1), (-1,-2), (width of the current block, -2), etc. may be used. Here, the length of the left reference line buffer and the upper reference line buffer may be extended according to the intra-frame prediction method or the intra-frame prediction mode. The intra-frame predictor 115 may increase the length of the reference line buffer, identify the availability of the reference sample, and determine the reconstructed sample value for the corresponding reference sample as the sample value of the reference sample according to the availability of the reference sample. When the reference sample is not available, the sample value of the reference sample may be determined as a default value or a sample value of another available reference sample. Here, the determined sample value of the reference sample may be stored in the reference line buffer.
[0121] The following will refer to Figure 3b and 3C describe a method of using a sample value of a reference line buffer in another direction closer to the current block or determining a corresponding reference sample without changing the length of the reference line buffer.
[0122] When the intra prediction mode is the angle mode, the intra predictor 115 may perform intra prediction on the current sample in the current block by using an N-tap interpolation filter and the sample values of a plurality of reference samples required for filtering. That is, the intra predictor 115 may obtain the predicted sample value of the current sample in the current block by filtering the reference samples intersecting the extended line from the current sample in the intra prediction direction (or the opposite direction) and the reference samples adjacent to the aforementioned reference samples using the N-tap interpolation filter. Here, the following will refer to Figure 4a to Figure 4gA method of determining sample values of reference samples to be used for intra prediction performed by the intra predictor 115 when reference samples intersecting a line extended from a current sample in an intra prediction direction (or the opposite direction) are located around a corner of the current block is described.
[0123] The obtainer 105 may obtain residual data of the current block from the bitstream. Here, the residual data may include information on a transform coefficient of the current block.
[0124] The image decoder 110 may dequantize and inversely transform the residual data of the current block to obtain a residual block of the current block, wherein the residual block of the current block includes the coefficients of the current block.
[0125] The image decoder 110 may obtain a reconstructed block of the current block based on the prediction block of the current block and the residual block of the current block. For example, the image decoder 110 may obtain a reconstructed sample value of the current sample in the reconstructed block by summing the predicted sample value of the current sample in the prediction block with the residual sample value of the current sample in the residual block, and may obtain the reconstructed block of the current block based on the reconstructed sample value.
[0126] Figure 1b is a flowchart of an image decoding method according to various embodiments.
[0127] In operation S105, when the prediction mode of the current block is the intra mode, the image decoding apparatus 100 may determine the sample value of the upper left reference sample of the current block by identifying the availability of the upper left reference sample of the current block. For example, when the upper left reference sample is identified as available, the image decoding apparatus 100 may determine the reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample. When the upper left reference sample is identified as unavailable, the image decoding apparatus 100 may determine the value based on the bit depth of the sample as the sample value of the upper left reference sample.
[0128] In operation S110, the image decoding apparatus 100 may sequentially search for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample in addition to the upper left reference sample of the current block, and may determine sample values of the remaining reference samples of the current block except for the upper left reference sample by identifying the availability of the searched reference samples. For example, when the reference sample in the current search position is identified as unavailable, the image decoding apparatus 100 may determine a value based on the bit depth of the sample or a sample value of the reference sample in the previous search position as the sample value of the reference sample in the current search position.
[0129] When the reference sample in the current search position is identified as available, the image decoding apparatus 100 may determine the reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0130] In operation S115, the image decoding apparatus 100 may obtain a predicted block of the current block by performing intra prediction on the current block based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample.
[0131] In operation S120, the image decoding apparatus 100 may obtain residual data of the current block from a bitstream, and may obtain a residual block of the current block including coefficients of the current block by dequantizing and inverse transforming the residual data of the current block.
[0132] In operation S125, the image decoding apparatus 100 may obtain a reconstructed block of the current block based on the prediction block of the current block and the residual block of the current block.
[0133] Figure 1c is a block diagram of an image decoder 6000 according to various embodiments.
[0134] The image decoder 6000 according to various embodiments may perform operations performed by the obtainer 105 and the image decoder 110 of the image decoding apparatus 100 to decode image data.
[0135] Reference Figure 1c , the entropy decoder 6150 parses the encoded image data to be decoded and the encoding information required for decoding from the bit stream 6050. The encoded image data is a quantized transform coefficient, and the inverse quantizer 6200 and the inverse transformer 6250 reconstruct residual data from the quantized transform coefficient.
[0136] The intra predictor 6400 performs intra prediction on each block in the block. The inter predictor 6350 performs inter prediction on each block by using a reference image obtained from the reconstructed picture buffer 6300. The prediction data for each block generated by the intra predictor 6400 or the inter predictor 6350 and the residual data are added to reconstruct the data in the spatial domain of the block for the current image, and the deblocker 6450 and the sample adaptive offset (SAO) executor 6500 may perform loop filtering on the reconstructed data in the spatial domain so that the filtered reconstructed image 6600 may be output. In addition, the reconstructed image stored in the reconstructed picture buffer 6300 may be output as a reference image.
[0137] In order for the obtainer 105 and the image decoder 110 of the image decoding apparatus 100 to decode the image data, the operation of the image decoder 6000 according to various embodiments may be performed on each block.
[0138] For example, the operation of the intra predictor 6400 may correspond to the operation of the intra predictor 115 .
[0139] Figure 2ais a block diagram of an image encoding apparatus according to various embodiments.
[0140] The image encoding apparatus 150 according to various embodiments may include an image encoder 155 and a bitstream generator 170 .
[0141] The image encoder 155 and the bitstream generator 170 may include at least one processor. In addition, the image encoder 155 and the bitstream generator 170 may include a memory storing instructions to be executed by the at least one processor. The image encoder 155 may be implemented as hardware separate from the bitstream generator 170, or may include the bitstream generator 170.
[0142] The image encoder 155 may determine at least one coding unit by hierarchically dividing the current image. For example, the image encoder 155 may determine at least one coding unit by hierarchically dividing the current image based on a division shape pattern of the current image. The current block on which the intra predictor 160 performs intra prediction may be one of the determined at least one coding unit.
[0143] Here, the division shape mode may indicate at least one of whether to divide, a division direction, and a division type. The division type may indicate one of binary division, ternary division, and quaternary division.
[0144] The image encoder 155 may encode information about a division shape pattern of a current image, and the bitstream generator 170 may generate a bitstream including the encoded information about a division shape pattern of the current image.
[0145] The image encoder 155 may include an intra predictor 160. Here, the image encoder 155 and the intra predictor 160 may be implemented as hardware separate from each other.
[0146] The intra predictor 160 may obtain a predicted block of the current block by performing intra prediction on the current block using reference samples included in a neighboring region of the current block.
[0147] When the prediction mode of the current block is the intra mode, the intra predictor 160 may determine the sample value of the upper left reference sample of the current block by identifying the availability of the upper left reference sample of the current block. The reason for performing this operation is to determine the sample value of the reference sample used for intra prediction of the current block. Here, the sample value of the reference sample determined for intra prediction of the current block may be stored in a reference buffer. The reference buffer may have a one-dimensionally arranged shape. That is, the intra predictor 160 may determine the sample value of the reference sample, and may configure the reference buffer based on the sample value of the determined reference sample. In addition, marking may be performed on the reference samples stored in the reference buffer. For example, the first reference sample stored in the reference buffer may be marked as "available for intra prediction" or "unavailable for intra prediction". The intra predictor 160 may perform intra prediction on the current block by using the sample marked as "available for intra prediction" among the reference samples stored in the reference buffer.
[0148] When it is identified that the upper left reference sample is available, the intra predictor 160 may determine the sample value reconstructed for the upper left reference sample as the sample value of the upper left reference sample. Here, when the coordinate value of the upper left corner sample of the current block is (0,0), the coordinate value of the upper left reference sample may be (-1,-1). That is, the upper left reference sample may represent a pixel directly adjacent to the upper left side of the upper left corner sample of the current block.
[0149] When it is recognized that the upper left reference sample is not available, the intra predictor 160 may determine a default value (such as 0 or a value based on the bit depth of the sample) as the sample value of the upper left reference sample. For example, the value based on the bit depth of the sample may be a median value or a maximum value within the range of sample values indicated by the bit depth of the sample. That is, when the bit depth is 8, in the range of sample values (0-255) indicated by the bit depth of the sample, the value based on the bit depth of the sample may be 128 (or 127) (as a median value), or may be 255 (as a maximum value).
[0150] Alternatively, when the upper left reference sample is identified as unavailable, the intra predictor 160 may determine a default value (such as a median value of a color scale) as a sample value of the upper left reference sample.
[0151] The intra predictor 160 may identify whether the reference sample in the current position is available as follows. That is, when the current position is outside the picture, the intra predictor 160 may identify that the reference sample in the corresponding position is not available, and when the current position is inside the picture, the intra predictor 160 may identify that the reference sample in the corresponding position is available. When the current position is included in a different slice from the current block, the intra predictor 160 may identify that the reference sample in the corresponding position is not available, and when the current position is included in the same slice as the current block, the intra predictor 160 may identify that the reference sample in the corresponding position is available.
[0152] When the current position is included in a different tile from the current block, the intra predictor 160 may recognize that the reference sample in the corresponding position is unavailable. When the current position is included in the same tile as the current block, the intra predictor 160 may recognize that the reference sample in the corresponding position is available.
[0153] When the predetermined position is located on a different side from the current block based on a virtual boundary (for example, when the predetermined position belongs to a different window from the current block based on a boundary of a window in a 360-degree image, or is located in a different flexible tile from the current block based on a boundary of a flexible tile having a boundary within a CTU or a maximum coding unit), the intra-frame predictor 160 may recognize that the reference samples in the corresponding position are unavailable, and when the situation is not as described above, the intra-frame predictor 160 may recognize that the reference samples in the corresponding position are available.
[0154] When it is identified that CIP is used, the intra predictor 160 may identify that the reference samples in the corresponding position are unavailable when the corresponding position is encoded in the inter mode. In addition, when the corresponding position is encoded in the intra mode, the reference samples in the corresponding position may be identified as available. Here, CIP may mean that for intra prediction of the current block, when the neighboring block is encoded in the inter mode, intra prediction is performed by not using the samples of the corresponding neighboring block encoded in the inter mode and by using only the samples of the neighboring block encoded in the intra mode, so as to prevent error propagation. It may be identified whether CIP is used, and a CIP activation flag may be generated based on whether CIP is used and stored in the bitstream.
[0155] After a prediction mode of a neighboring block (eg, a neighboring coding unit including a reference sample in a corresponding position) is identified, information about the prediction mode of the neighboring block may be generated based on the identified prediction mode and may be included in a bitstream.
[0156] When the intra predictor 160 identifies availability of a reference sample in a current search position from reference samples other than the upper left reference sample, when there is a reconstructed sample value for the reference sample in the current search position, the intra predictor 160 may identify that the reference sample in the current search position is unavailable.
[0157] The intra predictor 160 may identify the availability of reference samples in the current search position by combining the above-mentioned various conditions.
[0158] In addition to the top left reference sample, the intra predictor 160 may sequentially search for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the top left reference sample. The intra predictor 160 may determine sample values of the remaining reference samples of the current block except the top left reference sample by identifying availability of the searched reference samples.
[0159] For example, when the coordinate value of the upper left corner of the current block is (0, 0), the x coordinate of the reference sample included in the left reference line of the current block may be -1, and the y coordinate may be a value in the range from -1 to a value obtained by subtracting 1 from a value obtained by summing the height and width of the current block, the y coordinate of the reference sample included in the upper reference line of the current block may be -1, and the x coordinate may be a value in the range from -1 to a value obtained by subtracting 1 from a value obtained by summing the height and width of the current block. The x coordinate of the reference sample included in the right reference line of the current block may be the width of the current block, and the y coordinate may be a value in the range from -1 to a value obtained by subtracting 1 from a value obtained by summing the height and width of the current block.
[0160] Here, the search direction of the upper reference line may be the right direction from the upper left reference sample point, the search direction of the left reference line may be the lower direction from the upper left reference sample point, and the search direction of the right reference line may be the lower direction from the upper right reference sample point of the current block. When the coordinate value of the sample point at the upper left corner of the current block is (0,0), the x coordinate of the upper right reference sample point of the current block may be the width of the current block, and the y coordinate may be -1.
[0161] When the reference sample in the current search position is identified as unavailable, the intra predictor 160 may determine a default value or a sample value of the reference sample in the previous search position as the sample value of the reference sample in the current search position. Here, the default value may be the same as the default value described above. For example, the default value may be a value based on the bit depth of the sample, and may be a median or maximum value in the range of sample values indicated by the bit depth of the sample.
[0162] When the reference sample in the current search position is identified as available, the intra predictor 160 may determine the reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0163] As described above, when the intra predictor 160 identifies the availability of the reference sample in the current search position from the reference samples other than the upper left reference sample, and when it is identified that intra prediction is performed by not using the reference samples reconstructed in the inter mode and by using only the reference samples reconstructed in the intra mode, when the prediction mode of the reference block including the reference sample in the current search position corresponds to the inter mode, the intra predictor 115 may identify that the reference sample in the current search position is unavailable. Alternatively, when the intra predictor 160 identifies the availability of the reference sample in the current search position from the reference samples other than the upper left reference sample, when the reference sample in the current search position is outside the picture, included in a different slice from the current block, included in a different tile from the current block, or located on a different side from the current block based on a virtual boundary, the intra predictor 160 may determine that the reference sample in the current search position is unavailable.
[0164] When the intra predictor 160 identifies availability of a reference sample in a current search position from reference samples other than the upper left reference sample, when there is a reconstructed sample value for the reference sample in the current search position, the intra predictor 160 may identify that the reference sample in the current search position is unavailable.
[0165] The intra predictor 160 may recognize the availability of reference samples in the current search position by combining the above-mentioned various situations.
[0166] The intra predictor 160 may obtain a prediction block of the current block by performing intra prediction on the current block based on the determined sample value of the upper left reference sample of the current block and the determined sample value of the reference sample other than the upper left reference sample. Here, the determined sample value of the upper left reference sample of the current block and the determined sample value of the reference sample other than the upper left reference sample may be stored in a reference buffer, and all reference samples stored in the reference buffer may be marked as "available for intra prediction". Therefore, when the intra predictor 160 performs intra prediction by using the reference samples stored in the reference buffer, the intra predictor 160 may not additionally identify the availability of the reference samples stored in the reference buffer, and may freely use all reference samples stored in the reference buffer to perform intra prediction. That is, after determining the sample value of the upper left reference sample to be stored in the reference buffer, the intra predictor 160 may sequentially search for the remaining reference samples other than the upper left reference sample, and may always determine the sample values of the remaining reference samples regardless of the availability of the reference samples in the current search position. Therefore, all reference samples stored in the reference buffer may be determined to be available for intra prediction, and therefore, intra prediction may be performed by freely using all reference samples stored in the reference buffer. However, the present disclosure is not limited thereto. Even when all reference samples stored in the reference buffer are marked as available, reference samples in a predetermined position may have a possibility that their sample values may not be properly derived for intra prediction, and therefore, whether the reference samples stored in the reference buffer may be used for intra prediction may be additionally identified as needed.
[0167] When the division direction of the first coding unit is a vertical direction, the image encoder 155 may determine the encoding order of the left second coding unit and the right second coding unit divided according to the division direction as an order of the left second coding unit and then the right second coding unit or an order of the right second coding unit and then the left second coding unit. When the SUCO method is not applied, the image encoder 155 may determine the encoding order of the second coding unit as an order of the left second coding unit and then the right second coding unit. However, when the SUCO method is applied, the image encoder 155 may determine the encoding order of the second coding unit as an order of the left second coding unit and then the right second coding unit or an order of the right second coding unit and then the left second coding unit. The following will refer to Figure 5b Detailed aspects about the SUCO method are described.
[0168] By considering the encoding order of the coding unit when the SUCO method is applied, the reference samples available for intra prediction may not be limited to the left neighboring area and the upper neighboring area, and may also include the right neighboring area. However, the left neighboring area and the right neighboring area may not always be available, and the intra predictor 160 may recognize the availability of the left neighboring area and the right neighboring area by considering the decoding order, and may perform intra prediction on the current block by considering the availability of the neighboring area.
[0169] For example, when the reference buffer is configured as described above when the intra prediction mode of the current block is the DC mode, the sample values of the reference samples of all left reference lines, upper reference lines, and right reference lines of the current block stored in the reference buffer may be defined. Therefore, the intra predictor 115 may perform intra prediction on the current block without additionally identifying availability. That is, when the intra prediction mode of the current block is the DC mode, the intra predictor 160 may determine the predicted sample value of the sample in the current block by using the average value of the reference samples in all directions (left, upper, and right directions).
[0170] However, when the SUCO method is applied, the intra predictor 160 may recognize a condition according to the SUCO method and refer to Figure 5b The situation according to the SUCO method is described in detail. Here, the identification of the situation according to the SUCO method may correspond to the identification of the availability of the left neighboring area and the upper neighboring area of the current block.
[0171] The intra predictor 160 may obtain the predicted sample value of the sample in the current block by using the sample of at least one of the left reference line, the upper reference line, and the right reference line of the current block based on the availability of the left neighboring area and the right neighboring area of the current block. For example, the intra predictor 160 may identify one of various situations LR_00, LR_01, LR_10, and LR_11 according to the SUCO method, and based on the identified situation according to the SUCO method, may obtain the predicted sample value of the sample in the current block by using the sample of at least one of the left reference line, the upper reference line, and the right reference line of the current block.
[0172] When the left neighboring area is identified as available and the right neighboring area is identified as unavailable, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the left reference line and the average value of the sample value of the reference sample of the upper reference line. For example, when the condition according to the SUCO method is LR_10, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the left reference line and the average value of the sample value of the reference sample of the upper reference line.
[0173] Alternatively, when the left neighboring area of the current block is identified as unavailable and the right neighboring area is identified as available, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the right reference line and the average value of the sample value of the reference sample of the upper reference line. For example, when the condition according to the SUCO method is LR_01, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the right reference line and the average value of the sample value of the reference sample of the upper reference line.
[0174] Alternatively, when the left neighboring area of the current block is identified as available and the right neighboring area is identified as available, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the left reference line, the sample value of the reference sample of the right reference line, and the average value of the sample value of the reference sample of the upper reference line. For example, when the condition according to the SUCO method is LR_11, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the sample value of the reference sample of the left reference line, the sample value of the reference sample of the right reference line, and the average value of the sample value of the reference sample of the upper reference line.
[0175] Alternatively, when the left neighboring area of the current block is identified as unavailable and the right neighboring area is identified as unavailable, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the average value of the sample values of the reference samples of the upper reference line. For example, when the condition according to the SUCO method is LR_00, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the average value of the sample values of the reference samples of the upper reference line. However, it is not limited thereto. When the condition according to the SUCO method is LR_00, the intra predictor 160 may obtain the predicted sample value of the sample in the current block based on the average value of the sample values of the reference samples of the left reference line and the sample values of the reference samples of the upper reference line.
[0176] As described above, when the intra prediction mode is the DC mode, the intra predictor 160 may obtain the predicted sample value of the sample in the current block by using the sample of at least one reference line among the left reference line, the upper reference line, and the right reference line of the current block based on the availability of the left neighboring area and the right neighboring area of the current block. However, the present disclosure is not limited thereto. Regardless of the availability of the neighboring area of the current block, the predicted sample value of the sample in the current block may be obtained by using the sample of at least one reference line determined among the left reference line, the upper reference line, and the right reference line of the block.
[0177] In addition, when the intra-frame prediction mode is the DC mode, the intra-frame predictor 160 can obtain the predicted sample value of the sample in the current block by using the sample of at least one reference line among the left reference line, the upper reference line and the right reference line of the current block based not only on the availability of the left neighboring area and the availability of the upper neighboring area, but also on the availability of the right neighboring area.
[0178] Hereinafter, according to an embodiment, a method of efficiently signaling a chroma intra prediction mode performed by the image encoding apparatus 150 is described.
[0179] The chroma intra prediction mode may include a total of five modes, namely, DM, DC mode, vertical mode and horizontal mode. Here, DM represents an intra prediction mode that uses the luma intra prediction mode as is as an intra prediction mode for the chroma intra prediction mode. When the intra prediction mode indicated by DM overlaps with the remaining four modes, one of the four modes (the mode overlapping with the intra prediction mode indicated by DM) may be replaced by another mode, or one bit may be saved via truncated binarization. However, in this case, dependency on DM may occur, and an additional context model may be required. Therefore, in the following, a simple method of signaling a chroma intra prediction mode is described.
[0180] When the number of candidates for the chroma intra prediction mode remains five, overlap may be allowed when DM is selected as the same intra prediction mode as the remaining candidates for the intra prediction mode. Here, information on whether the chroma intra prediction mode is DM may be encoded as a 1-bit flag based on binary arithmetic encoding of the context. When the chroma intra prediction mode is not DM, the remaining four candidates for the intra prediction mode may be encoded as 2 bits by FLC.
[0181] Therefore, the image encoder 155 may perform binary arithmetic coding based on the context model on the 1-bit flag indicating whether the chroma intra prediction mode is DM. When the chroma intra prediction mode of the current block is not DM, the image encoder 155 may binarize the 2-bit information about the chroma intra prediction mode according to the FLC. The bitstream generator 170 may generate a bitstream, wherein the bitstream includes at least one of the 1-bit flag indicating whether the chroma intra prediction mode is binary arithmetic coded DM and the 2-bit information about the chroma intra prediction mode.
[0182] Therefore, the dependence on DM can be eliminated, various comparison operations can be reduced, and the chroma intra prediction mode can be signaled in a simple manner without using an additional context model.
[0183] The image encoding apparatus 150 may generate binary bits for signaling a chroma intra prediction mode according to the following pseudo code.
[0184] [Pseudocode]
[0185]
[0186] The intra predictor 160 may perform intra prediction by using reference samples that are spaced apart from the current block and do not directly contact the current block. For example, when the coordinate value of the upper left corner of the current block is (0,0), reference samples having coordinate values (-2,-1), (-1,-2), (width of the current block, -2), etc. may be used. Here, the length of the left reference line buffer and the upper reference line buffer may be extended according to the intra prediction method or the intra prediction mode. The intra predictor 160 may increase the length of the reference line buffer, identify the availability of the reference sample, and determine the reconstructed sample value for the corresponding reference sample as the sample value of the reference sample according to the availability of the reference sample. When the reference sample is not available, the sample value of the reference sample may be determined as a default value or a sample value of another available reference sample. Here, the determined sample value of the reference sample may be stored in the reference line buffer.
[0187] The following will refer to Figure 3b and 3C describe a method of using a sample value of a reference line buffer in another direction closer to the current block or determining a corresponding reference sample without changing the length of the reference line buffer.
[0188] When the intra prediction mode is the angle mode, the intra predictor 160 may perform intra prediction on the current sample in the current block by using an N-tap interpolation filter and the sample values of a plurality of reference samples required for filtering. That is, the intra predictor 160 may obtain the predicted sample value of the current sample in the current block by filtering the reference samples intersecting the extended line from the current sample in the intra prediction direction (or the opposite direction) and the reference samples adjacent to the aforementioned reference samples using the N-tap interpolation filter. Here, the following will refer to Figure 4a to Figure 4g A method of determining sample values of reference samples to be used for intra prediction performed by the intra predictor 160 when reference samples intersecting a line extended from a current sample in an intra prediction direction (or the opposite direction) are located around a corner of the current block is described.
[0189] The image encoder 155 may generate a residual block including coefficients of the current block based on the prediction block of the current block. The image encoder 155 may obtain residual sample values (coefficient values) of current samples in the residual block of the current block by subtracting the original sample values of the current samples in the original block of the current block from the predicted sample values of the current samples in the prediction block of the current block, and may generate the residual block of the current block based on the residual sample values of the current samples.
[0190] The image encoder 155 may generate at least one transform coefficient of the current block by transforming and quantizing the residual block of the current block.
[0191] The bitstream generator 170 may generate a bitstream including information about a transform coefficient of a current block.
[0192] Figure 2b is a flowchart of an image encoding method according to various embodiments.
[0193] In operation S155, when the prediction mode of the current block is the intra mode, the image encoding apparatus 150 may determine the sample value of the upper left reference sample of the current block by identifying the availability of the upper left reference sample of the current block. For example, when the upper left reference sample is identified as available, the image encoding apparatus 150 may determine the reconstructed sample value for the upper left reference sample as the sample value of the upper left reference sample. When the upper left reference sample is identified as unavailable, the image encoding apparatus 150 may determine the value based on the bit depth of the sample as the sample value of the upper left reference sample.
[0194] In operation S160, the image encoding apparatus 150 may sequentially search for reference samples of at least one of a left reference line, an upper reference line, and a right reference line of the current block in a direction away from the upper left reference sample, except for the upper left reference sample, and may determine sample values of the remaining reference samples of the current block except for the upper left reference sample by identifying the availability of the searched reference samples. For example, when the reference sample in the current search position is identified as unavailable, the image encoding apparatus 150 may determine a value based on the bit depth of the sample or a sample value of the reference sample in the previous search position as the sample value of the reference sample in the current search position. When the reference sample in the current search position is identified as available, the image encoding apparatus 150 may determine a reconstructed sample value for the reference sample in the current search position as the sample value of the reference sample in the current search position.
[0195] In operation S165, the image encoding apparatus 150 may obtain a predicted block of the current block by performing intra prediction on the current block based on the determined sample value of the upper left reference sample of the current block and the determined sample values of the remaining reference samples except the upper left reference sample.
[0196] In operation S170, the image encoding apparatus 150 may generate a residual block including a coefficient of the current block based on the prediction block of the current block, and may generate a transform coefficient of the current block by transforming and quantizing the residual block.
[0197] In operation S175, the image encoding apparatus 150 may generate a bitstream including information about a transformation coefficient of a current block.
[0198] Figure 2cis a block diagram of an image encoder according to various embodiments.
[0199] The image encoder 7000 according to various embodiments may perform operations performed by the image encoder 155 and the bitstream generator 170 of the image encoding apparatus 150 to encode image data.
[0200] That is, the intra predictor 7200 performs intra prediction on each of the blocks of the current image 7050 , and the inter predictor 7150 performs inter prediction on each of the blocks by using the current image 7050 and a reference image obtained from the reconstructed picture buffer 7100 .
[0201] Residual data may be generated by subtracting prediction data for each block from data for a block to be encoded in the current image 7050, wherein the prediction data is output from the intra predictor 7200 or the inter predictor 7150. In addition, the transformer 7250 and the quantizer 7300 may output quantized transform coefficients for each block by performing transform and quantization on the residual data. The inverse quantizer 7450 and the inverse transformer 7500 may reconstruct residual data in the spatial domain by performing inverse quantization and inverse transform on the quantized transform coefficients. The reconstructed residual data in the spatial domain may be added to the prediction data output from the intra predictor 7200 or the inter predictor 7150 for each block, and thus may be reconstructed into data in the spatial domain for the block of the current image 7050. The deblocker 7550 and the SAO executor generate a filtered reconstructed image by performing in-loop filtering on the reconstructed data in the spatial domain. The generated reconstructed image is stored in the reconstructed picture buffer 7100. The reconstructed image stored in the reconstructed picture buffer 7100 may be used as a reference image for inter prediction for another image. The entropy encoder 7350 may entropy encode the quantized transform coefficients, and may output the entropy encoded coefficients as a bitstream 7400 .
[0202] In order to implement the image encoder 7000 according to various embodiments in the image encoding apparatus 150, operations of the image encoder 7000 according to various embodiments may be performed on each of the blocks. For example, operations of the intra predictor 7200 may correspond to operations of the intra predictor 160.
[0203] Figure 3a is a diagram for describing a process in which the image decoding apparatus 100 determines sample values of reference samples to be stored in a reference buffer for intra prediction according to an embodiment.
[0204] When the image decoding apparatus 100 generates a reference buffer, the image decoding apparatus 100 may define an initial value of a predetermined position, and according to a predetermined data unit based on the predetermined position, the sample value of the reference sample may be stored in the buffer by identifying the availability of the reference sample. Here, the predetermined data unit may be defined as a pixel unit, a unit based on a minimum coding unit, or the like. For example, the size (height and width) of the minimum coding unit may be 4, and the size of the unit based on the minimum coding unit may be 1×4 or 4×1, depending on the direction of searching the data unit. When it is identified that a reference sample in the next search position of the position where the initial value is defined is available, the image decoding apparatus 100 may store the reconstructed sample value in a position corresponding to the reference sample in the reference buffer. When it is identified that a reference sample in the next search position of the position where the initial value is defined is not available, the image decoding apparatus 100 may store the defined initial value in a position corresponding to the reference sample in the reference buffer. Similarly, the reference sample value of the reference sample in the next search position of the next search position may be stored in the corresponding position of the reference sample.
[0205] Reference Figure 3a , when the coordinates of the upper left corner of the current block are (0,0), and R(x,y) represents a reference sample located at the coordinates (x,y), the upper left reference sample 205 of the current block may be defined as R(-1,-1).
[0206] The image decoding apparatus 100 may identify the availability of the upper left reference sample 205, and when the image decoding apparatus 100 identifies that the upper left reference sample 205 is available, the image decoding apparatus 100 may determine an available value (reconstructed value) as the sample value of the upper left reference sample 205, and may store the corresponding sample value in the reference buffer. When the image decoding apparatus 100 identifies that the upper left reference sample 205 is not available, a default value may be filled in the reference buffer. Here, the default value may be 0, the median value of the color scale, or the median or maximum value within the range of sample values indicated by the sample bit depth, but is not limited thereto.
[0207] After determining the sample value of the upper left reference sample 205 (and storing it in the reference buffer), the image decoding device 100 may sequentially identify the availability of each predetermined data unit of the reference buffer of the left reference line 210, the upper reference line 215, and the right reference line 220, and when the predetermined data unit of the reference buffer of the left reference line 210, the upper reference line 215, and the right reference line 220 is identified as available, the reconstructed sample value of the data unit may be stored in the reference buffer. When the predetermined data unit is identified as unavailable (for example, when the data unit is not encoded, CIP is performed, or the data unit is encoded in an inter-frame prediction mode), the image decoding device 100 may fill the pixels of the current data unit with a default value, fill the pixels of the current data by filling the last value stored in the buffer, or store the sample value of the previous data unit in the reference buffer.
[0208] The image decoding apparatus 100 may identify availability of reference samples before determining sample values of reference samples to be stored in a reference buffer, and may identify availability according to the following conditions.
[0209] For example, the image decoding apparatus 100 may identify the availability of the reference sample by identifying whether the CIP is applied and by identifying the prediction mode. When the CIP is applied and the prediction mode of the neighboring block including the reference sample is the inter prediction mode, the image decoding apparatus 100 may identify that the reference sample is not available. When the CIP is not applied, the image decoding apparatus 100 may not identify the prediction mode of the neighboring block including the reference sample. That is, the image decoding apparatus 100 may not identify the availability based on the prediction mode.
[0210] When the position of the reference sample is outside the picture, the image decoding apparatus 100 may recognize that the corresponding reference sample is unavailable, and when the position of the reference sample is inside the picture, the image decoding apparatus 100 may recognize that the corresponding reference sample is available.
[0211] When the position of the reference sample is included in a different slice from the current block 200, the image decoding apparatus 100 may identify the corresponding reference sample as unavailable, and when the position of the reference sample is included in the same slice as the current block 200, the image decoding apparatus 100 may identify the corresponding reference sample as available.
[0212] When the position of the reference sample is included in a parallel block different from the current block 200, the image decoding device 100 may identify the corresponding reference sample as unavailable, and when the position of the reference sample is included in the same parallel block as the current block 200, the image decoding device 100 may identify the corresponding reference sample as available.
[0213] When the position of the reference sample is included in a parallel block different from the current block 200, the image decoding device 100 may identify the corresponding reference sample as unavailable, and when the position of the reference sample is included in the same parallel block as the current block 200, the image decoding device 100 may identify the corresponding reference sample as available.
[0214] When the position of the reference sample is located on a different side from the current block 200 based on the virtual boundary, the image decoding apparatus 100 may identify the corresponding reference sample as unavailable. For example, the virtual boundary may be a boundary of a window area in a 360-degree image or a boundary of a flexible tile (a boundary located inside a maximum coding unit). When the reference sample is located on the same side as the current block based on the virtual boundary, the image decoding apparatus 100 may identify the corresponding reference sample as available.
[0215] When CIP is to be used, the image decoding device 100 may identify the corresponding reference sample as unavailable when the position of the reference sample is encoded in the intra mode, and may identify the corresponding reference sample as available when the position of the reference sample is encoded in the inter mode.
[0216] The image decoding apparatus 100 may identify whether a reference sample is reconstructed according to a decoding order, and may identify whether a corresponding reference sample is available based on whether the reference sample is reconstructed.
[0217] The image decoding apparatus 100 may recognize the availability of reference samples by using various combinations of the above-mentioned conditions.
[0218] Above, by referring to Figure 3a , describes the following method: According to the method, the image decoding device 100 may determine the sample value of the upper left reference sample 205 of the current block 200 by identifying the availability of the upper left reference sample 205, may sequentially search for reference samples of at least one of the left reference line, the upper reference line, and the right reference line of the current block in a direction away from the upper left reference sample 205, and may determine the sample values of the remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference sample. However, it is not limited to this. It will be understood by those of ordinary skill in the art that reference samples of different predetermined positions other than the upper left reference sample 205 may be determined, reference samples may be sequentially searched in a direction away from the corresponding reference sample, and sample values of the remaining reference samples except the reference sample in the predetermined position may be determined by identifying the availability of the searched reference sample.
[0219] Previously, the image decoding apparatus may recognize the availability of a reference sample in a predetermined position, and then, when the reference sample is available, the information of the upper reference line and the left reference line corresponding to the height and width of the current block may be stored intact in the reference buffer. However, in this case, when the availability of the stored reference sample is recognized, there is a possibility that an unavailable area exists. Therefore, the corresponding image decoding apparatus may have difficulty in supporting the use of CIP. Therefore, a new method of storing sample values in a reference buffer is required.
[0220] When there is no available reference sample in the current position, the image decoding device may fill the reference buffer with a default value, or may fill the reference buffer with a sample value of the nearest position (the first or last value of a block with information) by searching for a sample with an available sample value from a position where there is no available reference sample. However, in this case, there is a problem that the sample with the sample value may not be used appropriately, or the current position must be stored until a sample with an available sample value is searched. Therefore, in order to solve these problems, as described above with reference to Figure 3a As described above, the image decoding device 100 can identify the availability of the upper left reference sample 205, and determine the sample value of the upper left reference sample 205 of the current block. In addition, the image decoding device 100 can sequentially search for reference samples of at least one of the left reference line, the upper reference line, and the right reference line of the current block in a direction away from the upper left reference sample 205, and can determine the sample values of the remaining reference samples of the current block except the upper left reference sample by identifying the availability of the searched reference samples. Therefore, the image decoding device 100 can efficiently store the sample values in the reference buffer, and all the reference samples stored in the reference buffer can be marked as available for intra-frame prediction, and therefore, the image decoding device can efficiently perform intra-frame prediction without additionally marking the availability. In addition, the above reference can be performed Figure 3a The operation of the image decoding apparatus 100 is described, and based on the sample values stored in the reference buffer according to the performed operation, the image decoding apparatus 100 may support the use of CIP.
[0221] Figure 3b is a diagram for describing a method of determining a sample value of a corresponding reference sample (and configuring a reference buffer) performed by the image decoding apparatus 100 when the image decoding apparatus 100 uses a reference sample spaced apart from a current block 200 for intra prediction according to an embodiment.
[0222] The image decoding apparatus 100 may separately include a reference buffer for an upper reference line, a reference buffer for a left reference line, and a reference buffer for a right reference line. In this case, the length of each buffer may be the sum of the height and width of the current block. In addition, the image decoding apparatus 100 may increase the length of the reference buffer to determine a sample value of a previously unused reference sample, and store the sample value in the reference buffer. For example, the reference buffer for the upper reference line, the reference buffer for the left reference line, and the reference buffer for the right reference line may store sample values such as R(-2,-1), R(-1,-2), R(width,-2), etc. When the reference sample in the corresponding position is available, the reconstructed value may be determined as the sample value of the reference sample in the corresponding position, and the determined sample value of the reference sample in the corresponding position may be stored in the reference buffer. When the reference sample in the corresponding position is not available, a default value may be determined as the sample value of the reference sample in the corresponding position, and the determined sample value of the reference sample in the corresponding position may be stored in the reference buffer. According to an embodiment, the length of the reference buffer for the reference line may not always be extended, and the length of the reference buffer for the reference line may be extended according to intra prediction.
[0223] Reference Figure 3b , the image decoding apparatus 100 may replace the reference samples spaced apart from the current block 200 with sample values stored in a reference buffer of another reference line.
[0224] The image decoding apparatus 100 may replace the sample value of the reference sample 230 with the sample value of the reference sample 225. For example, when the image decoding apparatus 100 determines the sample value of the reference sample 230, the image decoding apparatus 100 may access the sample value of the reference sample 225 stored in the reference buffer of the left reference line, and may determine the sample value of the reference sample 230 as the sample value of the reference sample 225, and store the sample value of the reference sample 225 in the reference buffer of the upper reference line. The sample value of each sample may be determined (and stored in the reference buffer) by performing a one-to-one matching manner, but is not limited thereto. The sample value calculated for the sub-pixel unit according to the intra prediction direction may be determined (and stored in the reference buffer) via N-tap (N is a natural number equal to or greater than 2) interpolation.
[0225] Figure 3c 2 is a diagram for describing a method of configuring a single reference buffer performed by the image decoding device 100 when the image decoding device 100 uses reference samples spaced apart from the current block 200 for intra-frame prediction according to an embodiment, wherein the single reference buffer is configured to determine a sample value of a corresponding reference sample.
[0226] Optionally, refer to Figure 3c, the image decoding apparatus 100 may store the sample values of the reference samples in a single line buffer 235. In this case, when one line is extended in order to determine the sample values of the reference samples spaced apart from the current block 200, the sample values stored in the line buffer 235 by continuously increasing or decreasing the sample index may be accessed. For example, the image decoding apparatus 100 may increase the index R(-1, -1) of the line buffer 235 by 1, and may determine the sample value of R(0, -1) indicated by the corresponding index as the sample value of R(-2, -1). Similarly, the image decoding apparatus 100 may increase the index R(width, -1) of the line buffer 235 by 1, and may determine the sample value of R(width, 0) indicated by the corresponding index as the sample value of R(width+1, -1).
[0227] By configuring a single line buffer 235, the image decoding device 100 can obtain an effect similar to that obtained by storing sample values of reference samples separately in a reference buffer in each direction, and when sample values of reference samples spaced apart from the current block 200 are to be used, the image decoding device 100 can access sample values of reference samples stored in the line buffer 235 at positions close to the current block 200, and therefore, intra-frame prediction can be efficiently performed.
[0228] Figure 3d A pseudo code for implementing an operation of configuring an upper reference line buffer performed by the image decoding apparatus 100 according to an embodiment is shown.
[0229] Reference Figure 3d , the image decoding apparatus 100 may identify the availability of the upper left reference pixel of the current block, and when the upper left reference pixel of the current block is available (if (IS_AVAIL…), the value of the upper left reference pixel may be stored in the reference buffer (copy (up-1,…).
[0230] When unavailable (else), the image decoding apparatus 100 may store a default value in the reference buffer.
[0231] Thereafter, the image decoding apparatus 100 may perform an operation of filling the reference buffer in the upper direction (the reference buffer of the upper reference line) as follows.
[0232] The image decoding apparatus 100 may determine the pixel value of the reference pixel in the search position by performing a search operation from the upper left reference pixel in the right direction. Here, the image decoding apparatus 100 may check the availability of each predetermined unit, and when the predetermined unit is available, the pixel value of the pixel of the corresponding unit may be stored in the buffer, and when the predetermined unit is not available, the reference buffer may be filled by directly filling the previously stored pixel value into the current search position. Here, the predetermined unit may be defined as a single pixel unit, a plurality of pixel units, the size of the minimum coding unit, etc.
[0233] In addition, the image decoding device 100 may replace the pixel value up[-2] of R(-2,-1) in the reference buffer in the upper direction relative to the current block with the pixel value LEFT[0] of R(-1,0) stored in the reference buffer in the left direction, and the replaced value may be stored in the reference buffer in the upper direction. However, this is not limited to this. When the pixel of R(-2,-1) is available, the pixel value of the pixel of R(-2,-1) may be stored intact in the reference buffer in the upper direction. Alternatively, the pixel value of the pixel of R(-2,-1) may be determined as the pixel value up[-1] of the pixel of R(-1,-1), and the determined pixel value may be stored in the reference buffer in the upper direction. (That is, the pixel value up[-1] of the pixel of R(1,-1) may be filled and stored).
[0234] Figure 4a to Figure 4g is a diagram for describing a process of determining reference samples (pixels) around a corner of a current block 200 performed by the image decoding apparatus 100 when the image decoding apparatus 100 performs intra prediction on the current sample in an angle mode according to an embodiment.
[0235] Reference Figure 4a to Figure 4g , when the image decoding apparatus 100 performs intra prediction on the current sample in the angle mode, the image decoding apparatus 100 may obtain a predicted sample value of the current sample by using N-tap interpolation (N is a natural number equal to or greater than 2) for at least two reference samples 250, wherein the at least two reference samples 250 include reference samples intersecting an extension line from the current sample in the prediction direction 245 and neighboring reference samples. In this case, the image decoding apparatus 100 may use reference samples around the corners of the current block 200, and hereinafter, a method of determining reference samples to be used therein is described.
[0236] Reference Figure 4a, the image decoding device 100 can obtain a predicted sample value obtained by interpolation using four reference samples 250 as a predicted sample value of the current sample 240, wherein the four reference samples 250 include reference samples intersecting with an extension line from the current sample in a prediction direction 245.
[0237] like Figure 4b As shown in , when the reference sample is located at the upper left corner of the current block 200, the image decoding apparatus 100 may fill the sample value of the reference sample 255 in the position (-1, -1) based on the position of the upper left corner of the current block, and may store the sample value of the reference sample 260 in the position (-2, -1) in the reference buffer. Here, the sample value may not be additionally stored in the reference buffer, and the coordinates may be clipped so as to obtain the same effect as padding. That is, when the lower limit in the clipping range of the x coordinate is set to -1, and when the reference sample in the position where the x coordinate is -2 is to be accessed, the reference sample in the position where the x coordinate is -1 may be accessed via coordinate clipping, and thus, the sample value of the reference sample 260 in the position (-2, -1) may be obtained, similar to when the sample value of the reference sample 255 in the position (-1, -1) is padded.
[0238] Reference Figure 4c , when the image decoding apparatus 100 performs intra prediction on the current sample 240 in the prediction direction 245, the image decoding apparatus 100 may use the sample value of the reference sample 265 in the position (-1, 0) instead of the sample value of the reference sample 260 in the position (-2, -1). For example, when the reference sample 260 is not available, the sample value of the reference sample 265 may be used. However, this is not limited thereto, and the sample value of the reference sample 265 may be used regardless of the availability of the reference sample 260.
[0239] Hereinafter, a process of determining reference samples around the upper right corner of the current block 200 performed by the image decoding apparatus 100 when the image decoding apparatus 100 can use sample values of reference samples in a right neighboring area is described.
[0240] Reference Figure 4d , the image decoding apparatus 100 may use the sample value of the reference sample at the position (width+1,-1). Here, when the reference sample 268 at the position (width+1,-1) is available, the sample value of the reference sample at the corresponding position may be stored in the pixel buffer and may be used for intra prediction of the current sample 240. Optionally, similar to the reference Figure 4bAs described, the sample value of the reference sample 268 in the position (width + 1, -1) may be stored by filling the sample value of the reference sample in the position (width, -1), or the sample value of the sample in the position (width, -1) stored in the reference buffer may be accessed via coordinate clipping.
[0241] Reference Figure 4e , when the reference sample 268 is not available in the process of performing intra prediction on the current sample 240 according to the prediction direction 245, the image decoding apparatus 100 may use the sample value of the reference sample 270. Here, the sample value of the reference sample 268 may be replaced by the sample value of the reference sample 270 and may be stored in the reference buffer. However, regardless of the availability of the reference sample 268, the image decoding apparatus 100 may use the sample value of the reference sample 270.
[0242] Reference Figure 4f When the image decoding device 100 uses a large number of reference samples in the right direction of the upper right corner of the current block 200 when performing intra-frame prediction on the current sample 240 according to the prediction direction 245, the image decoding device 100 can use the sample value of the reference sample 275 in the position (width -1, -1).
[0243] Reference Figure 4g , similar to the reference above Figure 4b As described, the image decoding device 100 can store the pixel value of the reference pixel 285 in the position (width, -2) by filling the pixel value of the reference pixel 280 in the position (width, -1), or can access the pixel value of the pixel in the position (width, -1) stored in the reference buffer through coordinate clipping.
[0244] Figure 5a A diagram for describing a SUCO method for determining a coding (decoding) order between coding units as forward or backward based on a coding order flag and for describing that a right reference line can be used for intra prediction according to a coding (decoding) order based on the SUCO method.
[0245] Reference Figure 5a, the maximum coding unit 1950 may be divided into a plurality of coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984, and 1986. The maximum coding unit 1950 may correspond to the uppermost node 1900 of the tree structure. In addition, the plurality of coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984, and 1986 may correspond to the plurality of nodes 1906, 1908, 1910, 1912, 1918, 1920, 1922, 1924, 1930, 1932, 1934, and 1936, respectively. The upper coding order flags 1902, 1914, and 1926 and the lower coding order flags 1904, 1916, and 1928 indicating the coding order in the tree structure may correspond to arrows 1952, 1964, and 1976 and arrows 1954, 1966, and 1978, respectively.
[0246] The upper coding order flag may indicate the coding order of two upper coding units among four coding units having the same depth. When the upper coding order flag is 0, encoding may be performed in a forward direction. Conversely, when the upper coding order flag is 1, encoding may be performed in a backward direction.
[0247] Similarly, the lower coding order flag may indicate the coding order of two lower coding units among four coding units having the same depth. When the lower coding order flag is 0, encoding may be performed in a forward direction. Conversely, when the lower coding order flag is 1, encoding may be performed in a backward direction.
[0248] For example, because the upper coding order flag 1914 is 0, the coding order between coding units 1968 and 1970 can be determined as forward left to right. In addition, because the lower coding order flag 1916 is 1, the coding order between coding units 1972 and 1974 can be determined as backward right to left.
[0249] According to an embodiment, the upper coding order flag and the lower coding order flag may be configured to have the same value as each other. For example, when the upper coding order flag 1902 is determined to be 1, the lower coding order flag 1904 corresponding to the upper coding order flag 1902 may also be determined to be 1. Because the values of the upper coding order flag and the lower coding order flag are determined to be one bit, the amount of coding order information can be reduced.
[0250] According to an embodiment, the upper coding order flag and the lower coding order flag of the current coding unit may be determined with reference to at least one of the upper coding order flag and the lower coding order flag applied to the coding unit having a lower depth than the current coding unit. For example, the upper coding order flag 1926 and the lower coding order flag 1928 applied to the coding units 1980, 1982, 1984, and 1986 may be determined based on the lower coding order flag 1916 applied to the coding units 1972 and 1974. Therefore, the upper coding order flag 1926 and the lower coding order flag 1928 may be determined to be the same value as the lower coding order flag 1916. Because the values of the upper coding order flag and the lower coding order flag are determined from the upper coding unit of the current coding unit, the coding order information may not be obtained from the bitstream. Therefore, the amount of coding order information may be reduced.
[0251] Here, data of samples included in the right adjacent coding unit 1958 decoded before the current coding unit 1986 is available, and therefore, the image decoding device 100 can perform intra-frame prediction according to an embodiment of the present disclosure by using data of samples (right reference line) included in the right adjacent coding unit 1958.
[0252] Figure 5b is a diagram for describing a SUCO status determined based on the availability of a left neighboring area and a right neighboring area according to the SUCO method.
[0253] Reference Figure 5b , as mentioned above Figure 5a As described, according to the encoding / decoding order (forward or backward) of the coding unit determined based on the SUCO method, the position of the available reference sample for the current block 200 may be changed. Therefore, the image decoding apparatus 100 may determine the SUCO status by considering the decoding order recognition availability. Figure 5b , the SUCO state may be one of LR_10, LR_01, LR_11, and LR_00. Here, L / R represents left / right, and 0 / 1 indicates whether there is an available reference sample. The SUCO state may be determined by identifying the availability of a sample at a predetermined position (e.g., a sample immediately to the left of the upper left corner sample / a sample immediately to the right of the upper right corner sample in the case of a left area) from the neighboring samples of the current block 200 (e.g., whether a neighboring block including the corresponding sample is reconstructed), but is not limited thereto.
[0254] When the image decoding apparatus 100 does not use the SUCO method, LR_01 and LR_11 may not appear. However, when the image decoding apparatus 100 uses the SUCO method, LR_01 and LR_11 may appear, and during intra prediction, reference samples different from available reference samples when the SUCO method is not used may need to be considered. Therefore, the image decoding apparatus 100 can appropriately determine reference samples for intra prediction by considering the SUCO situation, and thus can efficiently perform intra prediction. This aspect is described above, and therefore will not be described in detail.
[0255] Hereinafter, the division of coding units will be described in detail according to an embodiment of the present disclosure.
[0256] The image may be divided into maximum coding units. The size of each maximum coding unit may be determined based on information obtained from a bitstream. The shape of each maximum coding unit may be a square shape of the same size. However, the embodiment is not limited thereto. In addition, the maximum coding unit may be hierarchically divided into a plurality of coding units based on the division shape pattern information obtained from the bitstream. The division shape pattern information may include at least one of information indicating whether the division will be performed, division direction information, and division type information. The information indicating whether the division will be performed indicates whether the coding unit will be divided. The division direction information indicates that the division will be performed in the horizontal direction or in the vertical direction. The division type information indicates that the coding unit will be divided by using one of binary division, ternary division, and quaternary division.
[0257] For ease of description, in the present disclosure, it is assumed that the division shape mode information includes information indicating whether division is to be performed, division direction information, and division type information, but the present disclosure is not limited thereto. The image decoding apparatus 100 may obtain the division shape mode information from the bit stream as a binary bit string. The image decoding apparatus 100 may determine whether to divide the coding unit, the division direction, and the division type based on the one binary bit string.
[0258] The coding unit may be smaller than or equal to the maximum coding unit. For example, when the division shape pattern information indicates that division will not be performed, the coding unit has the same size as the maximum coding unit. When the division shape pattern information indicates that division will be performed, the maximum coding unit may be divided into coding units of a lower depth. In addition, when the division shape pattern information about the coding unit of the lower depth indicates division, the coding unit of the lower depth may be divided into smaller coding units. However, the division of the image is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished. Reference will be made to Figures 6 to 19 The division of coding units is described in more detail.
[0259] In addition, the coding unit may be divided into prediction units for prediction of an image. The prediction units may all be equal to or smaller than the coding unit. In addition, the coding unit may be divided into transformation units for transformation of an image. The transformation units may all be equal to or smaller than the coding unit. The shapes and sizes of the transformation units and the prediction units may be independent of each other. The coding unit may be distinguished from the prediction unit and the transformation unit, but the coding unit, the prediction unit, and the transformation unit may be equal to each other. The division of the prediction unit and the transformation unit may be performed in the same manner as the division of the coding unit. Figures 6 to 19 The division of the coding unit is described in detail. The current block and the neighboring block of the present disclosure may indicate one of the maximum coding unit, the coding unit, the prediction unit, and the transformation unit. In addition, the current block or the current coding unit is a block to be decoded or encoded currently or a block to be divided currently. The neighboring block may be a block reconstructed before the current block. The neighboring block may be adjacent to the current block in space or time. The neighboring block may be located at one of the lower left side, left side, upper left side, upper side, upper right side, right side, and lower right side of the current block.
[0260] Figure 6 A process of determining at least one coding unit by splitting a current coding unit, performed by the image decoding apparatus 100 according to an embodiment, is illustrated.
[0261] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, or N×4N. Here, N may be a positive integer. The block shape information is information indicating at least one of a shape, a direction, an aspect ratio, or a size of a coding unit.
[0262] The shape of the coding unit may include a square and a non-square. When the width length and height length of the coding unit are the same (that is, when the block shape of the coding unit is 4N×4N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a square. The image decoding apparatus 100 may determine the shape of the coding unit as a non-square.
[0263] When the width length and height length of the coding unit are different from each other (that is, when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, or N×4N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a non-square shape. When the shape of the coding unit is non-square, the image decoding apparatus 100 may determine the aspect ratio in the block shape information of the coding unit as at least one of 1:2, 2:1, 1:4, 4:1, 1:8, or 8:1. In addition, the image decoding apparatus 100 may determine whether the coding unit is in the horizontal direction or in the vertical direction based on the width length and height length of the coding unit. In addition, the image decoding apparatus 100 may determine the size of the coding unit based on at least one of the width length, height length, or area of the coding unit.
[0264] According to an embodiment, the image decoding apparatus 100 may determine the shape of the coding unit by using the block shape information, and may determine the division method of the coding unit by using the division shape pattern information. That is, the method of dividing the coding unit indicated by the division shape pattern information may be determined based on the block shape indicated by the block shape information used by the image decoding apparatus 100.
[0265] The image decoding device 100 may obtain the division shape pattern information from the bitstream. However, the embodiment is not limited thereto, and the image decoding device 100 and the image encoding device 150 may obtain the pre-agreed division shape pattern information based on the block shape information. The image decoding device 100 may obtain the pre-agreed division shape pattern information for the maximum coding unit or the minimum coding unit. For example, the image decoding device 100 may determine the division shape pattern information for the maximum coding unit as a quadruple division. In addition, the image decoding device 100 may determine the division shape pattern information for the minimum coding unit as "no division is performed". Specifically, the image decoding device 100 may determine the size of the maximum coding unit to be 256×256. The image decoding device 100 may determine the pre-agreed division shape pattern information as a quadruple division. Quaternary division is a division shape pattern in which the width and height of the coding unit are both divided into two equal parts. The image decoding device 100 may obtain a coding unit of 128×128 size from a maximum coding unit of 256×256 size based on the division shape pattern information. Also, the image decoding apparatus 100 may determine the size of the minimum coding unit to be 4 × 4. The image decoding apparatus 100 may obtain division shape pattern information indicating “do not perform division” with respect to the minimum coding unit.
[0266] According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current coding unit has a square shape. For example, the image decoding apparatus 100 may determine whether to not split the square coding unit, whether to vertically split the square coding unit, whether to horizontally split the square coding unit, or whether to split the square coding unit into four coding units based on the split shape mode information. Figure 6 When the block shape information of the current coding unit 300 indicates a square shape, the image decoder 110 may not divide the coding unit 310a having the same size as the current coding unit 300 based on the division shape pattern information indicating that division is not performed, or may determine the coding unit 310b, 310c or 310d divided based on the division shape pattern information indicating a predetermined division method.
[0267] Reference Figure 6According to an embodiment, the image decoding apparatus 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that the division is performed in the vertical direction. The image decoding apparatus 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that the division is performed in the horizontal direction. The image decoding apparatus 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical direction and the horizontal direction based on the division shape pattern information indicating that the division is performed in the vertical direction and the horizontal direction. However, the division method of the square coding unit is not limited to the aforementioned method, and may include various methods that may be indicated by the division shape pattern information. A predetermined division method for dividing a square coding unit will be described in detail below with respect to various embodiments.
[0268] Figure 7 A process of determining at least one coding unit by splitting a non-square coding unit, performed by the image decoding apparatus 100 according to an embodiment, is illustrated.
[0269] According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding apparatus 100 may determine whether to not divide the non-square current coding unit or whether to divide the non-square current coding unit by using a predetermined division method based on the division shape pattern information. Referring to FIG. 4 , when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding apparatus 100 may determine a coding unit 410 or 460 having the same size as the current coding unit 400 or 450 based on the division shape pattern information indicating that division is not performed, or may determine coding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c divided based on the division shape pattern information indicating a predetermined division method. The predetermined division method for dividing the non-square coding unit will be described in detail below with respect to various embodiments.
[0270] According to an embodiment, the image decoding apparatus 100 may determine a division method of a coding unit by using division shape pattern information, and in this case, the division shape pattern information may indicate the number of one or more coding units generated by dividing the coding unit. Referring to FIG. 4 , when the division shape pattern information indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding apparatus 100 may determine two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by dividing the current coding unit 400 or 450 based on the division shape pattern information.
[0271] According to an embodiment, when the image decoding apparatus 100 splits the non-square current coding unit 400 or 450 based on the split shape pattern information, the image decoding apparatus 100 may split the current coding unit in consideration of the position of the long side of the non-square current coding unit 400 or 450. For example, the image decoding apparatus 100 may determine a plurality of coding units by splitting the current coding unit 400 or 450 in a direction in which the long side of the current coding unit 400 or 450 is split in consideration of the shape of the current coding unit 400 or 450.
[0272] According to an embodiment, when the division shape pattern information indicates that the coding unit is divided (ternary division) into an odd number of blocks, the image decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 400 or 450. For example, when the division shape pattern information indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding apparatus 100 may divide the current coding unit 400 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480c.
[0273] According to an embodiment, the ratio of the width and height of the current coding unit 400 or 450 may be 4:1 or 1:4. When the ratio of the width and the height is 4:1, because the width length is greater than the height length, the block shape information may be in the horizontal direction. When the ratio of the width and the height is 1:4, because the width length is less than the height length, the block shape information may be in the vertical direction. The image decoding apparatus 100 may determine the current coding unit to be divided into an odd number of blocks based on the division shape mode information. In addition, the image decoding apparatus 100 may determine the division direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is in the vertical direction, the image decoding apparatus 100 may determine the coding units 430a to 430c by dividing the current coding unit 400 in the horizontal direction. In addition, when the current coding unit 450 is in the horizontal direction, the image decoding apparatus 100 may determine the coding units 480a to 480c by dividing the current coding unit 450 in the vertical direction.
[0274] According to an embodiment, the image decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and not all determined coding units may have the same size. For example, a predetermined coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have a size different from that of other coding units 430a and 430c or 480a and 480c. That is, the coding unit determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, all odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.
[0275] According to an embodiment, when the division shape pattern information indicates that the coding unit is divided into an odd number of blocks, the image decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and further, may apply a predetermined restriction to at least one coding unit among the odd number of coding units generated by dividing the current coding unit 400 or 450. Referring to FIG. 4 , the image decoding apparatus 100 may set a decoding process for a coding unit 430b or 480b located at the center of three coding units 430a, 430b, and 430c or 480a, 480b, and 480c generated by dividing the current coding unit 400 or 450 to be different from decoding processes for other coding units 430a and 430c or 480a and 480c. For example, unlike other coding units 430a and 430c or 480a and 480c, the image decoding apparatus 100 may restrict the coding unit 430b or 480b at the center position from being further split or being split only a predetermined number of times.
[0276] Figure 8 A process of splitting a coding unit based on at least one of block shape information and division shape pattern information, performed by the image decoding apparatus 100 according to an embodiment, is illustrated.
[0277] According to an embodiment, the image decoding apparatus 100 may determine whether to divide the square first coding unit 500 into a plurality of coding units or not to divide the square first coding unit 500 based on at least one of the block shape information and the division shape mode information. According to an embodiment, when the division shape mode information indicates that the first coding unit 500 is divided in the horizontal direction, the image decoding apparatus 100 may determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The first coding unit, the second coding unit, and the third coding unit used according to the embodiment are terms for helping to understand the relationship between the coding unit before and after the coding unit is divided. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit follows the above description.
[0278] According to an embodiment, the image decoding apparatus 100 may determine whether to split the determined second coding unit 510 into a plurality of coding units or not to split the determined second coding unit 510 based on at least one of the block shape information and the division shape mode information. Referring to FIG. 5 , the image decoding apparatus 100 may split the non-square second coding unit 510 determined by splitting the first coding unit 500 into one or more third coding units 520a, 520b, 520c, or 520d based on at least one of the block shape information and the division shape mode information, or may not split the second coding unit 510. The image decoding apparatus 100 may obtain at least one of the block shape information and the division shape mode information, and the image decoding apparatus 100 may split the first coding unit 500 into a plurality of second coding units (e.g., 510) of various shapes based on at least one of the obtained block shape information and the division shape mode information. The second coding unit 510 may be obtained according to a method of splitting the first coding unit 500 based on at least one of the block shape information and the division shape mode information. According to an embodiment, when the first coding unit 500 is divided into the second coding unit 510 based on at least one of the block shape information and the division shape mode information for the first coding unit 500, the second coding unit 510 may also be divided into third coding units (e.g., 520a, 520b, 520c, and 520d) based on at least one of the block shape information and the division shape mode information for the second coding unit 510. That is, the coding units may be recursively divided based on at least one of the block shape information and the division shape mode information for each coding unit. Therefore, square coding units may be determined by dividing non-square coding units, and non-square coding units may be determined by recursively dividing square coding units.
[0279] Reference Figure 8, a predetermined coding unit (e.g., a coding unit located at a central position or a square coding unit) among the odd-numbered third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510 may be recursively divided. According to an embodiment, a non-square third coding unit 520b among the odd-numbered third coding units 520b, 520c, and 520d may be divided into a plurality of fourth coding units in the horizontal direction. A non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d may be divided into a plurality of coding units again. For example, a non-square fourth coding unit 530b or 530d may be divided into an odd-numbered coding unit again. A method that can be used to recursively divide coding units will be described below with respect to various embodiments.
[0280] According to an embodiment, the image decoding apparatus 100 may divide each of the third coding unit 520a, or 520b, 520c, and 520d into coding units based on at least one of the block shape information and the division shape mode information. In addition, the image decoding apparatus 100 may determine not to divide the second coding unit 510 based on at least one of the block shape information and the division shape mode information. According to an embodiment, the image decoding apparatus 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding apparatus 100 may impose a predetermined restriction on a predetermined third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding apparatus 100 may limit the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d to no longer be divided or to be divided a configurable number of times.
[0281] Reference Figure 8 , the image decoding device 100 may limit the third coding unit 520c at the center position among the odd third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to no longer be divided, to be divided by using a predetermined division method (for example, only divided into four coding units or divided by using the division method of the second coding unit 510), or to be divided only a predetermined number of times (for example, only divided n times (where n>0)). However, the limitation on the third coding unit 520c at the center position is only according to the embodiment, and therefore, should not be interpreted as being limited to the above-mentioned embodiment, but should be interpreted as including various limitations for decoding the third coding unit 520c at the center position differently from the other third coding units 520b and 520d.
[0282] According to an embodiment, the image decoding apparatus 100 may obtain at least one of block shape information and division shape pattern information for dividing the current coding unit from a predetermined position in the current coding unit.
[0283] Fig. 9 A method of determining a predetermined coding unit from among odd-numbered coding units, performed by the image decoding apparatus 100 according to an embodiment, is illustrated.
[0284] Reference Fig. 9 , at least one of the block shape information and the division shape mode information about the current coding unit 600 or 650 may be obtained from a sample at a predetermined position among a plurality of samples included in the current coding unit 600 or 650 (e.g., a sample 640 or 690 at a center position). However, the predetermined position in the current coding unit 600 where at least one of the block shape information and the division shape mode information may be obtained should not be construed as being limited to Figure 6 , and should be interpreted as including various positions (e.g., above, below, left, right, upper left, lower left, upper right, and lower right positions) included in the current coding unit 600. The image decoding apparatus 100 may obtain at least one of the block shape information and the division shape mode information from a predetermined position, and may determine whether to divide the current coding unit into coding units of various shapes and sizes or not to divide the current coding unit.
[0285] According to an embodiment, when the current coding unit is divided into a predetermined number of coding units, the image decoding apparatus 100 may select one of the coding units. As will be described below with respect to various embodiments, various methods may be used to select one of the plurality of coding units.
[0286] According to an embodiment, the image decoding apparatus 100 may split a current coding unit into a plurality of coding units, and may determine a coding unit at a predetermined position.
[0287] According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a center position among the odd-numbered coding units using information indicating the positions of the odd-numbered coding units. Fig. 9, the image decoding apparatus 100 may determine the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The image decoding apparatus 100 may determine the intermediate coding unit 620b or the intermediate coding unit 660b by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. For example, the image decoding apparatus 100 may determine the coding unit 620b of the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of predetermined samples included in the coding units 620a, 620b, and 620c. In detail, the image decoding apparatus 100 may determine the coding unit 620b at the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c.
[0288] According to an embodiment, the information indicating the positions of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include information about the positions or coordinates of the coding units 620a, 620b, and 620c in the picture. According to an embodiment, the information indicating the positions of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include information indicating the width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and the width or height may correspond to the information indicating the difference between the coordinates of the coding units 620a, 620b, and 620c in the picture. That is, the image decoding apparatus 100 may determine the coding unit 620b at the center position by directly using the information about the positions or coordinates of the coding units 620a, 620b, and 620c in the picture or by using the information about the width or height of the coding unit corresponding to the difference between the coordinates.
[0289] According to an embodiment, information indicating the position of the upper left sample point 630a of the upper coding unit 620a may include coordinates (xa, ya), information indicating the position of the upper left sample point 630b of the middle coding unit 620b may include coordinates (xb, yb), and information indicating the position of the upper left sample point 630c of the lower coding unit 620c may include coordinates (xc, yc). The image decoding apparatus 100 may determine the middle coding unit 620b by using the coordinates of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c. For example, when the coordinates of the upper left sample points 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the sample point 630b at the center position may be determined as the coding unit at the center position among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the upper left sample points 630a, 630b, and 630c may include coordinates indicating absolute positions in the picture, or coordinates (dxb, dyb) indicating the relative position of the upper left sample point 630b of the middle coding unit 620b relative to the position of the upper left sample point 630a of the upper coding unit 620a and coordinates (dxc, dyc) indicating the relative position of the upper left sample point 630c of the lower coding unit 620c relative to the position of the upper left sample point 630a of the upper coding unit 620a may be used. The method of determining the coding unit at a predetermined position by using the coordinates of the sample points included in the coding unit as information indicating the positions of the sample points should not be interpreted as being limited to the above method, but should be interpreted as including various arithmetic methods capable of using the coordinates of the sample points.
[0290] According to an embodiment, the image decoding apparatus 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select one of the coding units 620a, 620b, and 620c based on a predetermined criterion. For example, the image decoding apparatus 100 may select a coding unit 620b having a size different from that of other coding units from among the coding units 620a, 620b, and 620c.
[0291] According to an embodiment, the image decoding apparatus 100 may determine the width or height of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya) as information indicating the position of the upper left sample point 630a of the upper coding unit 620a, the coordinates (xb, yb) as information indicating the position of the upper left sample point 630b of the middle coding unit 620b, and the coordinates (xc, yc) as information indicating the position of the upper left sample point 630c of the lower coding unit 620c. The image decoding apparatus 100 may determine the size of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the image decoding apparatus 100 may determine the width of the upper coding unit 620a as the width of the current coding unit 600. The image decoding apparatus 100 may determine the height of the upper coding unit 620a as yb-ya. According to an embodiment, the image decoding apparatus 100 may determine the width of the intermediate coding unit 620b as the width of the current coding unit 600. The image decoding apparatus 100 may determine the height of the intermediate coding unit 620b as yc-yb. According to an embodiment, the image decoding apparatus 100 may determine the width or height of the lower coding unit 620c by using the width or height of the current coding unit 600 or the width or height of the upper coding unit 620a and the intermediate coding unit 620b. The image decoding apparatus 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 620a to 620c. Referring to Figure 6 , the image decoding apparatus 100 may determine the middle coding unit 620b having a size different from the sizes of the upper coding unit 620a and the lower coding unit 620c as the coding unit at the predetermined position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units performed by the image decoding apparatus 100 corresponds only to an example of determining the coding unit at the predetermined position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining the coding unit at the predetermined position by comparing the size of the coding unit determined based on the coordinates of the predetermined sample points may be used.
[0292] The image decoding apparatus 100 may determine the width or height of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd) as information indicating the position of the upper left sample point 670a of the left coding unit 660a, the coordinates (xe, ye) as information indicating the position of the upper left sample point 670b of the middle coding unit 660b, and the coordinates (xf, yf) as information indicating the position of the upper left sample point 670c of the right coding unit 660c. The image decoding apparatus 100 may determine the size of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the coding units 660a, 660b, and 660c.
[0293] According to an embodiment, the image decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width of the middle coding unit 660b as xf-xe. The image decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 or the width or height of the left coding unit 660a and the middle coding unit 660b. The image decoding device 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 660a to 660c. Referring to Fig. 9 , the image decoding apparatus 100 may determine the middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as the coding unit at the predetermined position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units, performed by the image decoding apparatus 100, corresponds only to an example of determining the coding unit at the predetermined position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining the coding unit at the predetermined position by comparing the size of the coding unit determined based on the coordinates of the predetermined sample points may be used.
[0294] However, the position of the sample considered in determining the position of the coding unit is not limited to the above-mentioned upper left position, and information on predetermined positions of the samples included in the coding unit may be used.
[0295] According to an embodiment, the image decoding device 100 may select a coding unit at a predetermined position from an odd number of coding units determined by dividing the current coding unit based on the shape of the current coding unit. For example, when the current coding unit has a non-square shape in which the width is greater than the height, the image decoding device 100 may determine a coding unit at a predetermined position along the horizontal direction. That is, the image decoding device 100 may determine one of the coding units at different positions along the horizontal direction and impose restrictions on the coding unit. When the current coding unit has a non-square shape in which the height is greater than the width, the image decoding device 100 may determine a coding unit at a predetermined position along the vertical direction. That is, the image decoding device 100 may determine one of the coding units at different positions along the vertical direction and may impose restrictions on the coding unit.
[0296] According to an embodiment, the image decoding apparatus 100 may use information indicating respective positions of even-numbered coding units to determine a coding unit at a predetermined position among the even-numbered coding units. The image decoding apparatus 100 may determine the even-numbered coding units by dividing (dividing into two; binary division) the current coding unit, and may determine the coding unit at the predetermined position by using information about the positions of the even-numbered coding units. Operations related thereto may be similar to those already described above with respect to Figure 6 The operation of determining a coding unit at a predetermined position (eg, a center position) among odd-numbered coding units corresponds to the operation described in detail, and thus a detailed description thereof will not be provided here.
[0297] According to an embodiment, when a non-square current coding unit is split into a plurality of coding units, predetermined information about a coding unit at a predetermined position may be used in a splitting operation to determine a coding unit at a predetermined position among the plurality of coding units. For example, the image decoding apparatus 100 may use at least one of block shape information and split shape pattern information stored in samples included in an intermediate coding unit in a splitting process to determine a coding unit at a center position among the plurality of coding units determined by splitting the current coding unit.
[0298] Reference Fig. 9, the image decoding apparatus 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on at least one of the block shape information and the division shape mode information, and may determine the coding unit 620b at the center position among the plurality of coding units 620a, 620b, and 620c. In addition, the image decoding apparatus 100 may determine the coding unit 620b at the center position in consideration of the position where at least one of the block shape information and the division shape mode information is obtained. That is, at least one of the block shape information and the division shape mode information about the current coding unit 600 may be obtained from a sample point 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on at least one of the block shape information and the division shape mode information, the coding unit 620b including the sample point 640 may be determined as the coding unit at the center position. However, information for determining the coding unit at the center position is not limited to at least one of the block shape information and the division shape pattern information, and the coding unit at the center position may be determined using various types of information.
[0299] According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample point included in a coding unit to be determined. Figure 6 , the image decoding apparatus 100 may determine a coding unit at a predetermined position (e.g., a coding unit at a center position of the divided coding units) among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, using at least one of the block shape information and the division shape pattern information obtained from the sample at a predetermined position in the current coding unit 600 (e.g., a sample at a center position of the divided coding unit 600). That is, the image decoding apparatus 100 may determine the sample at the predetermined position based on the block shape of the current coding unit 600, may determine the coding unit 620b including the sample for which the predetermined information (e.g., at least one of the block shape information and the division shape pattern information) may be obtained from the plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may impose a predetermined restriction on the coding unit 620b. Referring to Fig. 9 According to an embodiment, in a decoding operation, the image decoding apparatus 100 may determine a sample 640 at a center position of a current coding unit 600 as a sample from which predetermined information may be obtained, and may impose a predetermined restriction on a coding unit 620b including the sample 640. However, the position of the sample from which the predetermined information may be obtained is not limited to the above-mentioned position, and may include any position of the sample included in the coding unit 620b to be determined as subject to restriction.
[0300] According to an embodiment, the position of the sample at which the predetermined information can be obtained may be determined based on the shape of the current coding unit 600. According to an embodiment, the block shape information may indicate whether the current coding unit has a square shape or a non-square shape, and the position of the sample at which the predetermined information can be obtained may be determined based on the shape. For example, the image decoding apparatus 100 may determine a sample located on a boundary for dividing at least one of the width and the height of the current coding unit in half as a sample at which the predetermined information can be obtained by using at least one of the information about the width of the current coding unit and the information about the height of the current coding unit. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding apparatus 100 may determine one of the samples adjacent to the boundary for dividing the long side of the current coding unit in half as a sample at which the predetermined information can be obtained.
[0301] According to an embodiment, when a current coding unit is divided into a plurality of coding units, the image decoding device 100 may use at least one of block shape information and division shape pattern information to determine a coding unit at a predetermined position in the plurality of coding units. According to an embodiment, the image decoding device 100 may obtain at least one of block shape information and division shape pattern information from a sample at a predetermined position in the coding unit, and may divide a plurality of coding units generated by dividing the current coding unit by using at least one of block shape information and division shape pattern information, wherein at least one of block shape information and division shape pattern information is obtained from a sample at a predetermined position in each of the plurality of coding units. That is, the coding unit may be recursively divided based on at least one of block shape information and division shape pattern information, wherein at least one of block shape information and division shape pattern information is obtained from a sample at a predetermined position in each coding unit. As has been described above, Fig. 9 An operation of recursively splitting the coding unit is described, and thus a detailed description thereof will not be provided here.
[0302] According to an embodiment, the image decoding apparatus 100 may determine one or more coding units by splitting a current coding unit, and may determine an order in which to decode the one or more coding units based on a predetermined block (for example, the current coding unit).
[0303] Fig.10 An order in which a plurality of coding units are processed when the image decoding apparatus 100 determines a plurality of coding units by splitting a current coding unit according to an embodiment is illustrated.
[0304] According to an embodiment, based on at least one of the block shape information and the division shape pattern information, the image decoding device 100 may determine the second coding units 710a and 710b by dividing the first coding unit 700 in a vertical direction, may determine the second coding units 730a and 730b by dividing the first coding unit 700 in a horizontal direction, or may determine the second coding units 750a, 750b, 750c and 750d by dividing the first coding unit 700 in vertical and horizontal directions.
[0305] Reference Fig.10 , the image decoding apparatus 100 may determine to process the second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction in a horizontal direction order 710c. The image decoding apparatus 100 may determine to process the second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction in a vertical direction order 730c. The image decoding apparatus 100 may determine to process the second coding units 750a to 750d determined by dividing the first coding unit 700 in the vertical direction and the horizontal direction in a predetermined order (for example, in a raster scan order or a zigzag scan order 750e), wherein the coding units in one row are processed and then the coding units in the next row are processed in the predetermined order.
[0306] According to an embodiment, the image decoding apparatus 100 may recursively divide the coding unit. Fig.10 , the image decoding apparatus 100 may determine a plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d by dividing the first coding unit 700, and may recursively divide each of the determined plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d. A division method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may correspond to a division method of the first coding unit 700. In this way, each of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may be independently divided into a plurality of coding units. Referring to Fig.10 , the image decoding apparatus 100 may determine the second coding units 710a and 710b by splitting the first coding unit 700 in a vertical direction, and may determine whether to independently split or not split each of the second coding units 710a and 710b.
[0307] According to an embodiment, the image decoding apparatus 100 may determine the third coding units 720a and 720b by splitting the left second coding unit 710a in a horizontal direction, and may not split the right second coding unit 710b.
[0308] According to an embodiment, the processing order of the coding units may be determined based on the operation of dividing the coding units. In other words, the processing order of the coding units after the division may be determined based on the processing order of the coding units immediately before the division. The image decoding apparatus 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the left second coding unit 710a independently of the right second coding unit 710b. Since the third coding units 720a and 720b are determined by dividing the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b may be processed in a vertical direction order 720c. Since the left second coding unit 710a and the right second coding unit 710b are processed in a horizontal direction order 710c, the right second coding unit 710b may be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in a vertical direction order 720c. The operation of determining the processing order of coding units based on the coding units before splitting is not limited to the above example, and coding units split and determined to be various shapes may be independently processed in a predetermined order using various methods.
[0309] Fig.11 1 and 2. A process of determining that a current coding unit is to be split into an odd number of coding units, performed by the image decoding apparatus 100, is illustrated when coding units cannot be processed in a predetermined order according to an embodiment.
[0310] According to an embodiment, the image decoding apparatus 100 may determine that the current coding unit is to be split into an odd number of coding units based on the obtained block shape information and the division shape pattern information. Figure 8 , the square first coding unit 800 may be divided into non-square second coding units 810a and 810b, and the second coding units 810a and 810b may be independently divided into third coding units 820a and 820b and 820c to 820e. According to an embodiment, the image decoding apparatus 100 may determine a plurality of third coding units 820a and 820b by dividing the left second coding unit 810a in the horizontal direction, and may divide the right second coding unit 810b into an odd number of third coding units 820c to 820e.
[0311] According to an embodiment, the image decoding apparatus 100 may determine whether any coding unit is split into an odd number of coding units by determining whether the third coding units 820a and 820b and 820c to 820e can be processed in a predetermined order. Fig.11, the image decoding apparatus 100 may determine the third coding units 820a and 820b and 820c to 820e by recursively dividing the first coding unit 800. The image decoding apparatus 100 may determine whether any one of the following coding units will be divided into an odd number of coding units based on at least one of the block shape information and the division shape mode information: the first coding unit 800, the second coding units 810a and 810b, or the third coding units 820a and 820b and 820c, 820d, and 820e. For example, the right second coding unit 810b of the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the multiple coding units included in the first coding unit 800 can be a predetermined order (for example, a zigzag scanning order 830), and the image decoding device 100 can determine whether the third coding units 820c, 820d and 820e determined by dividing the right second coding unit 810b into an odd number of coding units meet the conditions for processing in the predetermined order.
[0312] According to an embodiment, the image decoding apparatus 100 may determine whether the third coding units 820a and 820b and 820c to 820e included in the first coding unit 800 satisfy a condition for processing in a predetermined order, and the condition is related to whether at least one of the width and height of the second coding units 810a and 810b is divided in half along the boundary of the third coding units 820a and 820b and 820c to 820e. For example, the third coding units 820a and 820b determined when the height of the left second coding unit 810a of a non-square shape is divided in half may satisfy the condition. Because the boundary of the third coding units 820c to 820e determined when the right second coding unit 810b is divided into three coding units fails to divide the width or height of the right second coding unit 810b in half, it may be determined that the third coding units 820c to 820e do not satisfy the condition. When the condition is not satisfied as described above, the image decoding apparatus 100 may determine that the scanning order is discontinuous, and may determine that the right second coding unit 810b is divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may impose a predetermined restriction on the coding unit at a predetermined position in the divided coding unit. The restriction or the predetermined position has been described above with respect to various embodiments, so a detailed description thereof will not be provided here.
[0313] Fig.12 A process of determining at least one coding unit by splitting the first coding unit 900 , performed by the image decoding apparatus 100 according to an embodiment, is illustrated.
[0314] According to an embodiment, the image decoding apparatus 100 may divide the first coding unit 900 based on at least one of the block shape information and the division shape mode information obtained by the obtainer 105. The square first coding unit 900 may be divided into four square coding units, or may be divided into a plurality of non-square coding units. Fig.12 , when the block shape information indicates that the first coding unit 900 is a square and the division shape pattern information indicates that the first coding unit 900 is divided into non-square coding units, the image decoding apparatus 100 may divide the first coding unit 900 into a plurality of non-square coding units. In detail, when the division shape pattern information indicates that an odd number of coding units is determined by dividing the first coding unit 900 in a horizontal direction or a vertical direction, the image decoding apparatus 100 may divide the square first coding unit 900 into an odd number of coding units (for example, second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in a vertical direction, or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in a horizontal direction).
[0315] According to an embodiment, the image decoding apparatus 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition for processing in a predetermined order, and the condition is related to whether at least one of the width and height of the first coding unit 900 is divided in half along a boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Fig.12 , because the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the first coding unit 900 in the vertical direction do not divide the width of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not meet the condition for processing in a predetermined order. In addition, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the first coding unit 900 in the horizontal direction do not divide the height of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not meet the condition for processing in a predetermined order. When the condition is not satisfied as described above, the image decoding apparatus 100 may determine that the scanning order is not continuous, and may determine that the first coding unit 900 is divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may impose a predetermined restriction on the coding unit at a predetermined position in the divided coding unit. The restriction or the predetermined position has been described above with respect to various embodiments, and thus a detailed description thereof will not be provided here.
[0316] According to an embodiment, the image decoding apparatus 100 may determine coding units of various shapes by splitting the first coding unit.
[0317] Reference Fig.12 , the image decoding apparatus 100 may divide the square first coding unit 900 or the non-square first coding unit 930 or 950 into coding units of various shapes.
[0318] Fig.13 It is shown that shapes into which the second coding unit may be split are restricted when a second coding unit having a non-square shape determined by splitting the first coding unit 1000 by the image decoding apparatus 100 satisfies a predetermined condition according to an embodiment.
[0319] According to an embodiment, the image decoding apparatus 100 may determine whether to divide the square first coding unit 1000 into non-square second coding units 1010a and 1010b, or 1020a and 1020b, based on at least one of the block shape information and the division shape mode information obtained by the obtainer 105. The second coding units 1010a and 1010b, or 1020a and 1020b may be independently divided. Therefore, the image decoding apparatus 100 may determine whether to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b into a plurality of coding units or not to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b, based on at least one of the block shape information and the division shape mode information about each of the second coding units 1010a and 1010b, or 1020a and 1020b. According to an embodiment, the image decoding apparatus 100 may determine the third coding units 1012a and 1012b by splitting the non-square left second coding unit 1010a determined by splitting the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the left second coding unit 1010a is split in the horizontal direction, the image decoding apparatus 100 may limit the right second coding unit 1010b to not be split in the horizontal direction in which the left second coding unit 1010a is split. When the third coding units 1014a and 1014b are determined by splitting the right second coding unit 1010b in the same direction, since the left second coding unit 1010a and the right second coding unit 1010b are independently split in the horizontal direction, the third coding units 1012a and 1012b, or 1014a and 1014b may be determined. However, this situation has the same effect as the situation in which the image decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c and 1030d based on at least one of the block shape information and the division shape pattern information, and may be inefficient in terms of image decoding.
[0320] According to an embodiment, the image decoding apparatus 100 may determine the third coding units 1022a and 1022b, or 1024a and 1024b, by vertically splitting the non-square second coding unit 1020a or 1020b determined by horizontally splitting the first coding unit 1000. However, when the second coding unit (e.g., the upper second coding unit 1020a) is split in the vertical direction, the image decoding apparatus 100 may limit another second coding unit (e.g., the lower second coding unit 1020b) to not be split in the vertical direction in which the upper second coding unit 1020a is split for the above-mentioned reason.
[0321] Fig.14 A process of splitting a square coding unit performed by the image decoding apparatus 100 when the division shape pattern information indicates that the square coding unit is not to be split into four square coding units according to an embodiment is illustrated.
[0322] According to an embodiment, the image decoding apparatus 100 may determine the second coding units 1110a and 1110b, or 1120a and 1120b, etc. by dividing the first coding unit 1100 based on at least one of the block shape information and the division shape pattern information. The division shape pattern information may include information about various methods of dividing the coding unit, but the information about the various division methods may not include information for dividing the coding unit into four square coding units. Based on the division shape pattern information, the image decoding apparatus 100 does not divide the square first coding unit 1100 into four square coding units 1130a, 1130b, 1130c, and 1130d. The image decoding apparatus 100 may determine the non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc. based on the division shape pattern information.
[0323] According to an embodiment, the image decoding apparatus 100 may independently divide the non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc. Each of the second coding units 1110a and 1110b, or 1120a and 1120b, etc. may be recursively divided in a predetermined order, and the division method may correspond to a method of dividing the first coding unit 1100 based on at least one of block shape information and division shape mode information.
[0324] For example, the image decoding apparatus 100 may determine square third coding units 1112a and 1112b by dividing the left second coding unit 1110a in the horizontal direction, and may determine square third coding units 1114a and 1114b by dividing the right second coding unit 1110b in the horizontal direction. In addition, the image decoding apparatus 100 may determine square third coding units 1116a, 1116b, 1116c, and 1116d by dividing both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction. In this case, coding units having the same shape as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0325] As another example, the image decoding apparatus 100 may determine the third coding units 1122a and 1122b of the square shape by dividing the upper second coding unit 1120a in the vertical direction, and may determine the third coding units 1124a and 1124b of the square shape by dividing the lower second coding unit 1120b in the vertical direction. In addition, the image decoding apparatus 100 may determine the third coding units 1126a, 1126b, 1126c, and 1126d of the square shape by dividing both the upper second coding unit 1120a and the lower second coding unit 1120b in the vertical direction. In this case, a coding unit having the same shape as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0326] Fig.15 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of dividing a coding unit.
[0327] According to an embodiment, the image decoding apparatus 100 may divide the first coding unit 1200 based on at least one of the block shape information and the division shape mode information. When the block shape information indicates a square shape and the division shape mode information indicates that the first coding unit 1200 is divided in at least one of the horizontal direction and the vertical direction, the image decoding apparatus 100 may determine the second coding units 1210a and 1210b, or 1220a and 1220b, etc. by dividing the first coding unit 1200. Fig.15 , the non-square second coding units 1210a and 1210b, or 1220a and 1220b determined by dividing the first coding unit 1200 only in the horizontal direction or the vertical direction may be independently divided based on at least one of the block shape information and the division shape pattern information about each coding unit. For example, the image decoding device 100 may determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and may determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction. As has been described above, Fig.13 An operation of dividing the second coding units 1210a and 1210b, or 1220a and 1220b is described, and thus a detailed description thereof will not be provided here.
[0328] According to an embodiment, the image decoding apparatus 100 may process the coding units in a predetermined order. Fig.10 The operation of processing the encoding units in a predetermined order is described, and thus a detailed description thereof will not be provided here. Fig.15 , the image decoding apparatus 100 may determine four square third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d by dividing the square first coding unit 1200. According to an embodiment, the image decoding apparatus 100 may determine a processing order of the third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d based on a division method of the first coding unit 1200.
[0329] According to an embodiment, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can process the third coding units 1216a, 1216b, 1216c and 1216d in the following processing order 1217: first, the third coding units 1216a and 1216c included in the left second coding unit 1210a are processed in the vertical direction, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed in the vertical direction.
[0330] According to an embodiment, the image decoding device 100 can determine the third coding units 1226a, 1226b, 1226c and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction, and can process the third coding units 1226a, 1226b, 1226c and 1226d in the following processing order 1227: first, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the horizontal direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the horizontal direction.
[0331] Reference Fig.15, square third coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d may be determined by dividing the second coding units 1210a and 1210b, and 1220a and 1220b, respectively. Although the second coding units 1210a and 1210b determined by splitting the first coding unit 1200 in the vertical direction are different from the second coding units 1220a and 1220b determined by splitting the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c, and 1216d and the third coding units 1226a, 1226b, 1226c, and 1226d split from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b ultimately show the same shape of coding units split from the first coding unit 1200. Therefore, by recursively splitting the coding units in different ways based on at least one of the block shape information and the split shape pattern information, the image decoding apparatus 100 may process a plurality of coding units in different orders even if the coding units are ultimately determined to have the same shape.
[0332] Fig.16 A process of determining a depth of a coding unit when a shape and a size of a coding unit are changed when a coding unit is recursively split to determine a plurality of coding units according to an embodiment is illustrated.
[0333] According to an embodiment, the image decoding device 100 may determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before being divided is 2n (n>0) times the length of the long side of the current coding unit after being divided, the image decoding device 100 may determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before being divided. In the following description, a coding unit with an increased depth is represented as a coding unit of a lower depth.
[0334] Reference Fig.16According to an embodiment, the image decoding apparatus 100 may determine a second coding unit 1302 and a third coding unit 1304 of a lower depth by dividing a square first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may be represented as "0: SQUARE"). Assuming that the size of the square first coding unit 1300 is 2N×2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 into 1 / 2 may have a size of N×N. In addition, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 into 1 / 2 may have a size of N / 2×N / 2. In this case, the width and height of the third coding unit 1304 are 1 / 4 of the width and height of the first coding unit 1300. When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302 whose width and height are 1 / 2 of the width and height of the first coding unit 1300 may be D+1, and the depth of the third coding unit 1304 whose width and height are 1 / 4 of the width and height of the first coding unit 1300 may be D+2.
[0335] According to an embodiment, the image decoding device 100 can determine the second coding unit 1312 or 1322 of the lower depth, and the third coding unit 1314 or 1324 by dividing the non-square first coding unit 1310 or 1320 based on block shape information indicating a non-square shape (for example, the block shape information can be represented as "1: NS_VER" indicating a non-square shape with a height greater than a width, or can be represented as "2: NS_HOR" indicating a non-square shape with a width greater than a height).
[0336] The image decoding apparatus 100 may determine the second coding unit 1302, 1312, or 1322 by splitting at least one of the width and the height of the first coding unit 1310 having a size of N×2N. That is, the image decoding apparatus 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1322 having a size of N×N / 2 by splitting the first coding unit 1310 in a horizontal direction, or may determine the second coding unit 1312 having a size of N / 2×N by splitting the first coding unit 1310 in horizontal and vertical directions.
[0337] According to an embodiment, the image decoding apparatus 100 may determine the second coding unit 1302, 1312, or 1322 by dividing at least one of the width and the height of the first coding unit 1320 having a size of 2N×N. That is, the image decoding apparatus 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1312 having a size of N / 2×N by dividing the first coding unit 1320 in a vertical direction, or may determine the second coding unit 1322 having a size of N×N / 2 by dividing the first coding unit 1320 in horizontal and vertical directions.
[0338] According to an embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width and the height of the second coding unit 1302 having a size of N×N. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2×N / 2, the third coding unit 1314 having a size of N / 4×N / 2, or the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1302 in the vertical direction and the horizontal direction.
[0339] According to an embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width and the height of the second coding unit 1312 having a size of N / 2×N. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2×N / 2 or the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1312 in a horizontal direction, or may determine the third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1312 in a vertical direction and a horizontal direction.
[0340] According to an embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width and the height of the second coding unit 1322 having a size of N×N / 2. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2×N / 2 or the third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1322 in a vertical direction, or may determine the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1322 in a vertical direction and a horizontal direction.
[0341] According to an embodiment, the image decoding apparatus 100 may split the square coding unit 1300, 1302, or 1304 in a horizontal direction or a vertical direction. For example, the image decoding apparatus 100 may determine the first coding unit 1310 having a size of N×2N by splitting the first coding unit 1300 having a size of 2N×2N in a vertical direction, or may determine the first coding unit 1320 having a size of 2N×N by splitting the first coding unit 1300 in a horizontal direction. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by splitting the first coding unit 1300 having a size of 2N×2N in a horizontal direction or a vertical direction may be the same as the depth of the first coding unit 1300.
[0342] According to an embodiment, the width and height of the third coding unit 1314 or 1324 may be 1 / 4 of the width and height of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322 whose width and height are 1 / 2 of the width and height of the first coding unit 1310 or 1320 may be D+1, and the depth of the third coding unit 1314 or 1324 whose width and height are 1 / 4 of the width and height of the first coding unit 1310 or 1320 may be D+2.
[0343] Fig.17 Depth that may be determined based on the shape and size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.
[0344] According to an embodiment, the image decoding apparatus 100 may determine second coding units of various shapes by dividing the square first coding unit 1400. Fig.14 , the image decoding apparatus 100 may determine the second coding units 1402a and 1402b, the second coding units 1404a and 1404b, and the second coding units 1406a, 1406b, 1406c, and 1406d by dividing the first coding unit 1400 in at least one of the vertical direction and the horizontal direction based on the division shape pattern information. That is, the image decoding apparatus 100 may determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d based on the division shape pattern information of the first coding unit 1400.
[0345] According to an embodiment, the depths of the second coding units 1402a and 1402b, the second coding units 1404a and 1404b, and the second coding units 1406a, 1406b, 1406c, and 1406d determined based on the division shape pattern information of the square first coding unit 1400 may be determined based on the lengths of their long sides. For example, since the length of the side of the square first coding unit 1400 is equal to the length of the long side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b may have the same depth, for example, D. However, when the image decoding device 100 divides the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c and 1406d based on the division shape pattern information, because the length of the side of the square second coding units 1406a, 1406b, 1406c and 1406d is 1 / 2 of the length of the side of the first coding unit 1400, the depth of the second coding units 1406a, 1406b, 1406c and 1406d can be D+1, which is 1 lower than the depth D of the first coding unit 1400.
[0346] According to an embodiment, the image decoding apparatus 100 may determine a plurality of second coding units 1412a and 1412b and 1414a, 1414b, and 1414c by dividing the first coding unit 1410 having a height greater than its width in a horizontal direction based on the division shape pattern information. According to an embodiment, the image decoding apparatus 100 may determine a plurality of second coding units 1422a and 1422b and 1424a, 1424b, and 1424c by dividing the first coding unit 1420 having a width greater than its height in a vertical direction based on the division shape pattern information.
[0347] According to an embodiment, the depths of the second coding units 1412a and 1412b and 1414a, 1414b and 1414c, or 1422a and 1422b and 1424a, 1424b and 1424c, determined based on the division shape pattern information of the non-square first coding unit 1410 or 1420, may be determined based on the lengths of their long sides. For example, since the lengths of the sides of the square second coding units 1412a and 1412b are 1 / 2 of the lengths of the long sides of the first coding unit 1410 having a non-square shape whose height is greater than the width, the depths of the square second coding units 1412a and 1412b are D+1, which is 1 lower than the depth D of the non-square first coding unit 1410.
[0348] In addition, the image decoding apparatus 100 may divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division shape pattern information. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are 1 / 2 of the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c may be D+1 which is 1 lower than the depth D of the non-square first coding unit 1410. The image decoding apparatus 100 may determine the depths of the coding units split from the first coding unit 1420 having a non-square shape having a width greater than a height by using the above-described method of determining the depths of the coding units split from the first coding unit 1410 .
[0349] According to an embodiment, when the odd-numbered split coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for identifying the split coding units based on a size ratio between the coding units. Fig.17 , the width of the coding unit 1414b at the center position among the odd-numbered divided coding units 1414a, 1414b, and 1414c may be equal to the width of the other coding units 1414a and 1414c and its height may be twice the height of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the center position may include two other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the center position is 1 based on the scanning order, the PID of the coding unit 1414c located at a position adjacent to the coding unit 1414b may increase by 2 and may thus be 3. That is, there may be discontinuity in the PID value. According to an embodiment, the image decoding apparatus 100 may determine whether the odd-numbered divided coding units do not have equal sizes based on whether there is discontinuity in the PID for identifying the divided coding units.
[0350] According to an embodiment, the image decoding apparatus 100 may determine whether to use a specific splitting method based on a PID value for identifying a plurality of coding units determined by splitting a current coding unit. Fig.14, the image decoding apparatus 100 may determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b, and 1414c by dividing the first coding unit 1410 having a rectangular shape having a height greater than a width. The image decoding apparatus 100 may use the PID to identify the corresponding coding unit. According to an embodiment, the PID may be obtained from a sample point at a predetermined position of each coding unit (e.g., an upper left sample point).
[0351] According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a predetermined position among the divided coding units by using a PID for distinguishing coding units. According to an embodiment, when the division shape pattern information of the first coding unit 1410 having a rectangular shape having a height greater than its width indicates that the coding unit is divided into three coding units, the image decoding apparatus 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding apparatus 100 may assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding apparatus 100 may compare the PIDs of the odd-numbered divided coding units to determine a coding unit at a center position among the coding units. The image decoding apparatus 100 may determine the coding unit 1414b corresponding to the PID and the intermediate value among the PIDs of the coding units as the coding unit at the center position among the coding units determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for distinguishing the divided coding units based on a size ratio between the coding units. Fig.14, the width of the coding unit 1414b generated by dividing the first coding unit 1410 may be equal to the width of the other coding units 1414a and 1414c, and the height thereof may be twice the height of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c located at the adjacent position to the coding unit 1414b may increase by 2 and thus may be 3. When the PID is not uniformly increased as described above, the image decoding apparatus 100 may determine that the coding unit is divided into a plurality of coding units, wherein the plurality of coding units include coding units having sizes different from those of the other coding units. According to an embodiment, when the division shape pattern information indicates that the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may divide the current coding unit in such a manner that a coding unit at a predetermined position (e.g., a coding unit at a center position) among the odd number of coding units has a size different from that of the other coding units. In this case, the image decoding apparatus 100 may determine the coding units at the center position having different sizes by using the PIDs of the coding units. However, the PID of the coding unit at the predetermined position and the size or position are not limited to the above-mentioned examples, and various PIDs and various positions and sizes of the coding unit may be used.
[0352] According to an embodiment, the image decoding apparatus 100 may use a predetermined data unit in which the coding unit is recursively split.
[0353] Fig.18 It is illustrated that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment.
[0354] According to an embodiment, a predetermined data unit may be defined as a data unit for recursively dividing a coding unit by starting with at least one of block shape information and division shape mode information. That is, the predetermined data unit may correspond to a coding unit for determining a highest depth of a plurality of coding units divided from a current picture. In the following description, for ease of explanation, the predetermined data unit is referred to as a reference data unit.
[0355] According to an embodiment, the reference data unit may have a predetermined size and a predetermined size shape. According to an embodiment, the reference data unit may include M×N samples. Here, M and N may be equal to each other and may be an integer represented as a power of 2. That is, the reference data unit may have a square shape or a non-square shape and may be divided into an integer number of coding units.
[0356] According to an embodiment, the image decoding apparatus 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding apparatus 100 may divide the plurality of reference data units divided from the current picture by using the division shape pattern information of each reference data unit. The operation of dividing the reference data unit may correspond to the division operation using a quadtree structure.
[0357] According to an embodiment, the image decoding apparatus 100 may predetermine a minimum size allowed for a reference data unit included in the current picture. Therefore, the image decoding apparatus 100 may determine various reference data units having a size equal to or larger than the minimum size, and may determine one or more coding units by using block shape information and division shape mode information with reference to the determined reference data units.
[0358] Reference Fig.18 , the image decoding apparatus 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined based on various data units (e.g., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.) that may include one or more reference coding units.
[0359] According to an embodiment, the obtainer 105 of the image decoding apparatus 100 may obtain at least one of reference coding unit shape information and reference coding unit size information for each of various data units from a bitstream. Figure 6 The operation of dividing the current coding unit 300 describes the operation of dividing the square reference coding unit 1500 into one or more coding units, and the above has been about Figure 7 The operation of splitting the current coding unit 400 or 450 describes an operation of splitting the non-square reference coding unit 1502 into one or more coding units. Therefore, a detailed description thereof will not be provided here.
[0360] According to an embodiment, the image decoding apparatus 100 may determine the size and shape of the reference coding unit using a PID for identifying the size and shape of the reference coding unit according to some data units predetermined based on a predetermined condition. That is, the obtainer 105 may obtain only the PID for identifying the size and shape of the reference coding unit for each slice, each slice segment, or each maximum coding unit from the bitstream, wherein each slice, each slice segment, or each maximum coding unit is a data unit (e.g., a data unit having a size equal to or smaller than a slice) among various data units (e.g., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.) that satisfies the predetermined condition. The image decoding apparatus 100 may determine the size and shape of the reference coding unit for each data unit that satisfies the predetermined condition by using the PID. When the reference coding unit shape information and the reference coding unit size information are obtained and used from the bitstream according to each data unit having a relatively small size, the efficiency of using the bitstream may not be high, and therefore, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the reference coding unit size information. In this case, at least one of the sizes and shapes of the reference coding units corresponding to the PID for identifying the sizes and shapes of the reference coding units may be predetermined. That is, the image decoding apparatus 100 may determine at least one of the sizes and shapes of the reference coding units included in the data unit serving as the unit for obtaining the PID by selecting at least one of the sizes and shapes of the reference coding units predetermined based on the PID.
[0361] According to an embodiment, the image decoding device 100 may use one or more reference coding units included in the maximum coding unit. That is, the maximum coding unit divided from the picture may include one or more reference coding units, and the coding unit may be determined by recursively dividing each reference coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to an embodiment, the size of the reference coding unit may be obtained by dividing the maximum coding unit n times based on a quadtree structure. That is, according to various embodiments, the image decoding device 100 may determine the reference coding unit by dividing the maximum coding unit n times based on a quadtree structure, and the reference coding unit may be divided based on at least one of the block shape information and the division shape mode information.
[0362] Fig.19 A processing block serving as a criterion for determining an order of reference coding units included in the picture 1600 according to an embodiment is illustrated.
[0363] According to an embodiment, the image decoding device 100 may determine one or more processing blocks divided from a picture. A processing block is a data unit including one or more reference coding units divided from a picture, and one or more reference coding units included in the processing block may be determined according to a specific order. That is, the determination order of one or more reference coding units determined in each processing block in the processing block may correspond to one of various types of orders for determining the reference coding units, and may vary according to the processing block. The determination order of the reference coding units determined for each processing block may be one of various orders, for example, a raster scanning order, a zigzag scan, an N-shaped scan, an upper right diagonal scan, a horizontal scan, and a vertical scan, but is not limited to the aforementioned scanning order.
[0364] According to an embodiment, the image decoding apparatus 100 may obtain processing block size information and may determine the size of one or more processing blocks included in a picture. The image decoding apparatus 100 may obtain processing block size information from a bitstream and may determine the size of one or more processing blocks included in a picture. The size of the processing block may be a predetermined size of a data unit indicated by the processing block size information.
[0365] According to an embodiment, the obtainer 105 of the image decoding device 100 may obtain the processing block size information from the bitstream according to each specific data unit. For example, the processing block size information may be obtained from the bitstream according to data units such as an image, a sequence, a picture, a slice, a slice segment, etc. That is, the obtainer 105 may obtain the processing block size information from the bitstream according to each of the various data units, and the image decoding device 100 may determine the size of one or more processing blocks divided from the picture by using the obtained processing block size information. The size of the processing block may be an integer multiple of the size of the reference coding unit.
[0366] According to an embodiment, the image decoding apparatus 100 may determine the size of the processing blocks 1602 and 1612 included in the picture 1600. For example, the image decoding apparatus 100 may determine the size of the processing block based on processing block size information obtained from a bitstream. Fig.19 According to an embodiment, the image decoding apparatus 100 may determine the width of the processing blocks 1602 and 1612 to be four times the width of the reference coding unit, and may determine the height of the processing blocks 1602 and 1612 to be four times the height of the reference coding unit. The image decoding apparatus 100 may determine the determination order of one or more reference coding units in one or more processing blocks.
[0367] According to an embodiment, the image decoding apparatus 100 may determine the processing blocks 1602 and 1612 included in the picture 1600 based on the size of the processing blocks, and may determine a determination order of one or more reference coding units in the processing blocks 1602 and 1612. According to an embodiment, the determination of the reference coding unit may include determination of the size of the reference coding unit.
[0368] According to an embodiment, the image decoding apparatus 100 may obtain determination order information of one or more reference coding units included in one or more processing blocks from a bitstream, and may determine a determination order for one or more reference coding units based on the obtained determination order information. The determination order information may be defined as an order or direction for determining the reference coding units in the processing block. That is, the determination order of the reference coding units may be determined independently for each processing block.
[0369] According to an embodiment, the image decoding apparatus 100 may obtain the determination order information of the reference coding unit from the bitstream according to each specific data unit. For example, the obtainer 105 may obtain the determination order information of the reference coding unit from the bitstream according to each data unit (such as an image, a sequence, a picture, a slice, a slice segment, or a processing block). Because the determination order information of the reference coding unit indicates the order of the reference coding unit in the processing block, the determination order information may be obtained for each specific data unit including an integer number of processing blocks.
[0370] According to an embodiment, the image decoding apparatus 100 may determine one or more reference coding units based on the determined determination order.
[0371] According to an embodiment, the obtainer 105 may obtain the determination order information of the reference coding units from the bitstream as the information related to the processing blocks 1602 and 1612, and the image decoding apparatus 100 may determine the determination order of one or more reference coding units included in the processing blocks 1602 and 1612, and may determine one or more reference coding units included in the picture 1600 based on the determination order. Fig.19, the image decoding apparatus 100 may respectively determine determination orders 1604 and 1614 of one or more reference coding units in the processing blocks 1602 and 1612. For example, when determination order information of the reference coding units is obtained for each processing block, different types of determination order information of the reference coding units may be obtained for the processing blocks 1602 and 1612. When the determination order 1604 of the reference coding units in the processing block 1602 is a raster scan order, the reference coding units included in the processing block 1602 may be determined according to the raster scan order. Conversely, when the determination order 1614 of the reference coding units in another processing block 1612 is a reverse raster scan order, the reference coding units included in the processing block 1612 may be determined according to the reverse raster scan order.
[0372] According to an embodiment, the image decoding apparatus 100 may decode the determined one or more reference coding units. The image decoding apparatus 100 may decode the image based on the reference coding units determined as described above. The method of decoding the reference coding units may include various image decoding methods.
[0373] According to an embodiment, the image decoding device 100 may obtain block shape information indicating the shape of the current coding unit or division shape pattern information indicating the division method of the current coding unit from the bitstream, and may use the obtained information. The block shape information or the division shape pattern information may be included in the bitstream associated with various data units. For example, the image decoding device 100 may use the block shape information or the division shape pattern information included in the sequence parameter set, the picture parameter set, the video parameter set, the slice header, the slice segment header, the parallel block header, or the parallel block group header. In addition, the image decoding device 100 may obtain a syntax element corresponding to the block shape information or the division shape pattern information from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may use the obtained syntax element.
[0374] Various embodiments have been described above. It will be appreciated by those skilled in the art that the present disclosure may be implemented in many different forms without departing from the basic features of the present disclosure. Therefore, the embodiments of the present disclosure set forth herein should be considered only in a descriptive sense, and not for the purpose of limitation. The scope of the present disclosure is set forth in the claims rather than in the foregoing description, and all differences falling within the scope equivalent to the claims should be interpreted as being included in the present disclosure.
[0375] The above-mentioned embodiments of the present disclosure may be written as a computer executable program and implemented by a general-purpose digital computer that operates the program via a computer-readable recording medium. The computer-readable recording medium may include storage media such as magnetic storage media (e.g., ROM, floppy disk, hard disk, etc.) and optical recording media (e.g., CD-ROM, DVD, etc.).
Claims
1. An image decoding method, include: When the current prediction mode of the current block is an intra mode, determining a first sample value of an upper left reference sample of the current block by identifying a first availability of an upper left reference sample of the current block; Searching for remaining reference sample points of at least one reference line in sequence from a plurality of reference lines except the upper left reference sample point, wherein the plurality of reference lines include a left reference line of the current block, an upper reference line of the current block, and a right reference line of the current block; Determine second sample values of remaining reference samples of the current block except the upper left reference sample by identifying second availability of the remaining reference samples that are searched; Based on a first sample value of an upper left reference sample of the current block and second sample values of remaining reference samples of the current block except the upper left reference sample, perform intra prediction on the current block to obtain a prediction block of the current block; Obtain residual data of the current block from a bitstream; Obtaining a residual block of the current block using residual data of the current block obtained from a bitstream; and Obtaining a reconstructed block of the current block based on the prediction block of the current block and the residual block of the current block, The step of determining the first sample value of the upper left reference sample of the current block comprises: When the upper left reference sample is not available, determining a first value obtained based on the sample bit depth as a first sample value of the upper left reference sample, The step of determining the second sample point values of the remaining reference sample points of the current block except the upper left reference sample point comprises: When the current reference sample in the current search position is not available, determining a second value obtained based on a sample value of a previous reference sample in a previous search position as the current sample value of the current reference sample in the current search position, The first search direction of the upper reference line is the right direction relative to the upper left reference sample point. The second search direction of the left reference line is the first downward direction relative to the upper left reference sample point. The third search direction of the right reference line is the second downward direction relative to the upper right reference sample point of the current block, and When the coordinate value of the upper left corner sample point of the current block is (0, 0), the x-axis coordinate value of the upper right reference sample point of the current block is the width of the current block, and the y-axis coordinate value of the upper right reference sample point of the current block is -1.
2. An image decoding device, include: The intra predictor is configured to: when a current prediction mode of a current block is an intra mode, determine a first sample value of an upper left reference sample of the current block by identifying a first availability of an upper left reference sample of the current block, sequentially search for remaining reference samples of at least one reference line from a plurality of reference lines except the upper left reference sample, wherein the plurality of reference lines include a left reference line of the current block, an upper reference line of the current block, and a right reference line of the current block, determine second sample values of remaining reference samples of the current block except the upper left reference sample by identifying a second availability of the searched remaining reference samples, and perform intra prediction on the current block based on the first sample value of the upper left reference sample of the current block and the second sample values of remaining reference samples of the current block except the upper left reference sample to obtain a prediction block of the current block; and The obtainer is configured to obtain residual data of the current block from a bitstream, The residual block of the current block is obtained by the image decoding device using the residual data of the current block obtained from the bit stream, and the reconstructed block of the current block is obtained by the image decoding device based on the prediction block of the current block and the residual block of the current block, Wherein, when the intra-frame predictor determines the first sample value of the upper left reference sample of the current block, the intra-frame predictor is further configured to: When the upper left reference sample is not available, determining a first value obtained based on the sample bit depth as a first sample value of the upper left reference sample, Wherein, when the intra-frame predictor determines the second sample value of the remaining reference samples of the current block except the upper left reference sample, the intra-frame predictor is further configured to: When the current reference sample in the current search position is not available, determining a second value obtained based on a sample value of a previous reference sample in a previous search position as the current sample value of the current reference sample in the current search position, The first search direction of the upper reference line is the right direction relative to the upper left reference sample point. The second search direction of the left reference line is the first downward direction relative to the upper left reference sample point. The third search direction of the right reference line is the second downward direction relative to the upper right reference sample point of the current block, and When the coordinate value of the upper left corner sample point of the current block is (0, 0), the x-axis coordinate value of the upper right reference sample point of the current block is the width of the current block, and the y-axis coordinate value of the upper right reference sample point of the current block is -1.
3. An image encoding method, include: When the prediction mode of the current block is an intra mode, determining a first sample value of an upper left reference sample of the current block by identifying a first availability of an upper left reference sample of the current block; Searching for remaining reference sample points of at least one reference line in sequence from a plurality of reference lines except the upper left reference sample point, wherein the plurality of reference lines include a left reference line of the current block, an upper reference line of the current block, and a right reference line of the current block; Determine second sample values of remaining reference samples of the current block except the upper left reference sample by identifying second availability of the remaining reference samples that are searched; Performing intra prediction on the current block based on a first sample value of an upper left reference sample of the current block and second sample values of remaining reference samples except the upper left reference sample to obtain a prediction block of the current block; and generating a bitstream including residual data of the current block based on the prediction block of the current block, The step of determining the first sample value of the upper left reference sample of the current block comprises: When the upper left reference sample is not available, determining a first value obtained based on the sample bit depth as a first sample value of the upper left reference sample, The step of determining the second sample point values of the remaining reference sample points of the current block except the upper left reference sample point comprises: When the current reference sample in the current search position is not available, determining a second value obtained based on a sample value of a previous reference sample in a previous search position as the current sample value of the current reference sample in the current search position, The first search direction of the upper reference line is the right direction relative to the upper left reference sample point. The second search direction of the left reference line is the first downward direction relative to the upper left reference sample point. The third search direction of the right reference line is the second downward direction relative to the upper right reference sample point of the current block, and When the coordinate value of the upper left corner sample point of the current block is (0, 0), the x-axis coordinate value of the upper right reference sample point of the current block is the width of the current block, and the y-axis coordinate value of the upper right reference sample point of the current block is -1.
4. A method for transmitting a bit stream generated by an image encoding method, the method include: Send bitstream, Wherein, the image encoding method comprises: When the prediction mode of the current block is an intra mode, determining a first sample value of an upper left reference sample of the current block by identifying a first availability of an upper left reference sample of the current block; Searching for remaining reference sample points of at least one reference line in sequence from a plurality of reference lines except the upper left reference sample point, wherein the plurality of reference lines include a left reference line of the current block, an upper reference line of the current block, and a right reference line of the current block; Determine second sample values of remaining reference samples of the current block except the upper left reference sample by identifying second availability of the remaining reference samples that are searched; Performing intra prediction on the current block based on a first sample value of an upper left reference sample of the current block and second sample values of remaining reference samples except the upper left reference sample to obtain a prediction block of the current block; and generating a bitstream including residual data of the current block based on the prediction block of the current block, The step of determining the first sample value of the upper left reference sample of the current block comprises: When the upper left reference sample is not available, determining a first value obtained based on the sample bit depth as a first sample value of the upper left reference sample, The step of determining the second sample point values of the remaining reference sample points of the current block except the upper left reference sample point comprises: When the current reference sample in the current search position is not available, determining a second value obtained based on a sample value of a previous reference sample in a previous search position as the current sample value of the current reference sample in the current search position, The first search direction of the upper reference line is the right direction relative to the upper left reference sample point. The second search direction of the left reference line is the first downward direction relative to the upper left reference sample point. The third search direction of the right reference line is the second downward direction relative to the upper right reference sample point of the current block, and When the coordinate value of the upper left corner sample point of the current block is (0, 0), the x-axis coordinate value of the upper right reference sample point of the current block is the width of the current block, and the y-axis coordinate value of the upper right reference sample point of the current block is -1.
Citation Information
Patent Citations
Method and device for intra prediction video
US20140334542A1
Interpolation filters for intra prediction in video coding
US20180091825A1
Intra prediction method and device in video coding system
US20180213224A1