Image encoding method and apparatus, and image decoding method and apparatus
Patent Information
- Application Number
- KR1020247042667
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2017-09-28
- Filing Date
- 2018-09-27
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2038-09-27
Smart Images

Figure 112024143096261-PAT00022_ABST
Abstract
Description
Technology Field
[0001] A method and apparatus according to one embodiment can encode or decode an image using various forms of encoding units included in the image. A method and apparatus according to one embodiment includes an intra-prediction method and apparatus. Background Technology
[0002] With the development and widespread adoption of hardware capable of playing and storing high-resolution or high-quality video content, the need for codecs that effectively encode or decode such content is increasing. Encoded video content can be played back by decoding. Recently, methods to effectively compress such high-resolution or high-quality video content are being implemented. For example, efficient video compression methods are being implemented through a process of processing the video to be encoded in an arbitrary manner.
[0003] Various data units may be used to compress images, and inclusion relationships may exist between these data units. To determine the size of the data units used for such image compression, data units may be divided by various methods, and image encoding or decoding can be performed by determining an optimized data unit based on the characteristics of the image. means of solving the problem
[0004] A video decoding method according to one embodiment comprises: a step of obtaining information regarding a transformation coefficient of a current block from a bitstream; a step of generating an intra-predicted value of a current sample based on the position of a current sample within the current block and an intra-predicted mode of the current block; a step of determining a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and a step of generating a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample; a step of generating a prediction block of the current block including the filtered predicted sample value of the current sample; a step of obtaining a residual block of the current block based on the obtained information regarding the transformation coefficient of the current block; and a step of restoring the current block based on the prediction block of the current block and the residual block of the current block.
[0005] The step of generating an intra-predicted value of the current sample based on the location of the current sample within the current block and the intra-predicted mode of the current block may include: determining a source reference sample corresponding to the current sample based on the location of the current sample and the intra-predicted mode of the current block; and generating an intra-predicted value of the current sample based on the sample value of the source reference sample.
[0006] The first weight for the filtering reference sample can be determined based on the distance between the filtering reference sample and the current sample.
[0007] The first weight for the filtering reference sample may decrease as the distance between the filtering reference sample and the current sample increases.
[0008] The filtering reference sample may include at least one of a circular reference sample located in the horizontal direction of the current sample and a circular reference sample located in the vertical direction of the current sample.
[0009] If the intra prediction mode of the current block above is angular mode,
[0010] The filtering reference sample is characterized by including at least one of the adjacent samples on the left and upper sides of the current block located on a line passing through the current sample, and the line may be oriented in the opposite direction to the predicted direction indicated by the angular mode.
[0011] The step of determining a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and generating a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample, may include: a step of determining at least one second intra-predicted mode; and a step of using the determined at least one second intra-predicted mode to determine a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and generating a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample.
[0012] The above at least one second intra prediction mode may be determined per picture unit or per block unit.
[0013] The above at least one second intra prediction mode can be determined as at least one of the intra prediction mode, an intra prediction mode representing a direction opposite to the prediction direction indicated by the intra prediction mode, a horizontal mode, and a vertical mode.
[0014] The first weight and the second weight may be normalized values.
[0015] The step of determining a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and generating a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample, may include, when the intra-predicted mode is a predetermined intra-predicted mode, determining a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and generating a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample.
[0016] A video encoding method according to one embodiment comprises: generating an intra-predicted value of a current sample based on the position of a current sample within a current block and an intra-predicted mode of the current block; determining a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and generating a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample; generating a prediction block of the current block including the filtered predicted sample value of the current sample; and encoding information regarding a transformation coefficient of the current block based on the prediction block of the current block.
[0017] An image decoding device according to one embodiment includes a processor that obtains information regarding a transformation coefficient of a current block from a bitstream, generates an intra-predicted value of the current sample based on the position of the current sample within the current block and an intra-predicted mode of the current block, determines a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, generates a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample, generates a prediction block of the current block including the filtered predicted sample value of the current sample, obtains a residual block of the current block based on the obtained information regarding the transformation coefficient of the current block, and restores the current block based on the prediction block of the current block and the residual block of the current block.
[0018] A computer program for an image decoding method according to one embodiment of the present disclosure may be recorded on a computer-readable recording medium. Brief explanation of the drawing
[0019] FIG. 1a illustrates a block diagram of an image decoding device according to various embodiments. FIG. 1b illustrates a flowchart of an image decoding method according to various embodiments. FIG. 1c illustrates a flowchart of an image decoding method according to various embodiments. FIG. 1d illustrates a block diagram of an image decoding unit according to various embodiments. FIG. 2a illustrates a block diagram of an image encoding device according to various embodiments. FIG. 2b illustrates a flowchart of an image encoding method according to various embodiments. FIG. 2c illustrates a flowchart of an image decoding method according to various embodiments. FIG. 2d illustrates a block diagram of an image decoding unit according to various embodiments. FIG. 3 illustrates a process in which an image decoding device divides a current encoding unit to determine at least one encoding unit according to one embodiment. FIG. 4 illustrates a process in which an image decoding device, according to one embodiment, divides a non-square encoding unit to determine at least one encoding unit. FIG. 5 illustrates a process in which an image decoding device divides a encoding unit based on at least one of block form information and division form mode information according to one embodiment. FIG. 6 illustrates a method for an image decoding device to determine a predetermined encoding unit among an odd number of encoding units according to one embodiment. FIG. 7 illustrates the order in which a plurality of encoding units are processed when an image decoding device determines a plurality of encoding units by dividing a current encoding unit according to one embodiment. FIG. 8 illustrates a process in which, according to one embodiment, an image decoding device determines that the current encoding unit is divided into an odd number of encoding units when the encoding unit cannot be processed in a predetermined order. FIG. 9 illustrates a process in which an image decoding device divides a first encoding unit to determine at least one encoding unit according to one embodiment. FIG. 10 illustrates that, according to one embodiment, when a video decoding device determines a second encoding unit in a non-square shape by dividing a first encoding unit and satisfies a predetermined condition, the shape in which the second encoding unit can be divided is limited. FIG. 11 illustrates the process of a video decoder dividing square-shaped encoding units when, according to one embodiment, the divided shape mode information cannot be divided into four square-shaped encoding units. FIG. 12 illustrates that, according to one embodiment, the processing order between a plurality of encoding units may vary depending on the division process of the encoding unit. FIG. 13 illustrates a process in which, according to one embodiment, a encoding unit is recursively divided to determine a plurality of encoding units, and the depth of the encoding unit is determined as the shape and size of the encoding unit change. FIG. 14 illustrates a depth and part index (hereinafter PID) for distinguishing between coding units that can be determined according to the shape and size of the coding units according to one embodiment. FIG. 15 illustrates that a plurality of encoding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment. FIG. 16 illustrates a processing block that serves as a criterion for determining the order of determination of reference encoding units included in a picture according to one embodiment. FIG. 17 is a diagram illustrating intra-prediction modes according to one embodiment. FIG. 18 is a diagram illustrating a method for an image decoding device to generate a reconstructed sample using original reference samples, according to one embodiment of the present disclosure. FIGS. 19a and 19b are drawings illustrating a method for an image decoder to generate a reconstructed sample using original reference samples according to the prediction direction of the intra-prediction mode of the current block, according to one embodiment of the present disclosure. FIG. 20 is a diagram illustrating a method for an image decoding device to generate a reconstructed sample using original reference samples, according to one embodiment of the present disclosure. FIG. 21 is a diagram illustrating the process of an image decoding device performing intra prediction for a current block using original reference samples and reconstructed samples according to one embodiment of the present disclosure. FIG. 22 is a diagram illustrating the process of an image decoder performing a weighted prediction using the original reference sample and the reconstructed reference samples of the left adjacent line and the upper adjacent line. FIG. 23 is a diagram illustrating the process of a video decoder performing a weighted prediction using the predicted value generated by performing intra prediction using the original reference sample and the reconstructed reference samples of the left adjacent line and the upper adjacent line. FIG. 24 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is one of DC mode, planar mode, or vertical mode. FIG. 25 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is a diagonal mode in the lower-left direction. FIG. 26 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is a diagonal mode in the upper right direction. FIG. 27 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is an angular mode adjacent to a diagonal mode in the lower-left direction. FIG. 28 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is an angular mode adjacent to a diagonal mode in the upper right direction. FIG. 29 is a diagram illustrating that, according to one embodiment of the present disclosure, the encoding (decoding) order between encoding units is determined in a forward or reverse direction based on an encoding order flag, and a right or upper reference line may be used for intra prediction according to the determined encoding (decoding) order. Specific details for implementing the invention
[0020] Best form for carrying out the invention
[0021] A video decoding method according to various embodiments comprises: a step of obtaining information regarding a transformation coefficient of a current block from a bitstream; a step of generating an intra-predicted value of a current sample based on the position of a current sample within the current block and an intra-predicted mode of the current block; a step of determining a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and a step of generating a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample; a step of generating a predicted block of the current block including the filtered predicted sample value of the current sample; a step of obtaining a residual block of the current block based on the obtained information regarding the transformation coefficient of the current block; and a step of restoring the current block based on the predicted block of the current block and the residual block of the current block.
[0022] A video encoding method according to various embodiments comprises: generating an intra-predicted value of a current sample based on the position of a current sample within a current block and an intra-predicted mode of the current block; determining a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and generating a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample; generating a prediction block of the current block including the filtered predicted sample value of the current sample; and encoding information regarding a transformation coefficient of the current block based on the prediction block of the current block.
[0023] A video decoding device according to various embodiments includes a processor that obtains information regarding a transformation coefficient of a current block from a bitstream, generates an intra-predicted value of the current sample based on the position of the current sample within the current block and an intra-predicted mode of the current block, determines a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, generates a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample, generates a prediction block of the current block including the filtered predicted sample value of the current sample, obtains a residual block of the current block based on the obtained information regarding the transformation coefficient of the current block, and restores the current block based on the prediction block of the current block and the residual block of the current block.
[0024] It may include a computer-readable recording medium on which a program for implementing a method according to various embodiments is recorded.
[0025] Form for carrying out the invention
[0026] The advantages and features of the disclosed embodiments and the methods for achieving them will become clear by referring to the embodiments described below in conjunction with the accompanying drawings. However, the present disclosure is not limited to the embodiments disclosed below but may be implemented in various different forms, and the embodiments are provided merely to make the present disclosure complete and to fully inform those skilled in the art of the scope of the invention.
[0027] The terms used in this specification will be briefly explained, and the disclosed embodiments will be described in detail.
[0028] The terms used in this specification have been selected to be as widely used and general as possible, taking into account their functions in the present disclosure; however, these may vary depending on the intent of those skilled in the art, case law, the emergence of new technologies, etc. Additionally, in specific cases, terms have been selected at the applicant's discretion, and in such cases, their meanings will be described in detail in the relevant description of the invention. Therefore, terms used in this disclosure should be defined not merely by their names, but based on their meanings and the content throughout the present disclosure.
[0029] Singular expressions in this specification include plural expressions unless the context clearly indicates that they are singular.
[0030] When a part of a specification is described as "including" a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.
[0031] Additionally, the term "part" as used in the specification refers to a software or hardware component, and the "part" performs certain roles. However, the meaning of "part" is not limited to software or hardware. The "part" may be configured to reside in an addressable storage medium or configured to run on one or more processors. Thus, by example, the "part" includes components such as software components, object-oriented software components, class components, and task components, as well as processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. The functions provided within the components and "parts" may be combined into a smaller number of components and "parts" or further separated into additional components and "parts."
[0032] According to one embodiment of the present disclosure, the “part” may be implemented as a processor and 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, and the like. In some contexts, “processor” may refer to an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), and the like. The term “processor” may also refer to a combination of processing devices, such as, 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 any other combination of such configurations.
[0033] The term "memory" should be interpreted broadly to include any electronic component capable of storing electronic information. The term memory may also refer to various types of processor-readable media, such as Random Access Memory (RAM), Read-Only Memory (ROM), Non-Volatile Random Access Memory (NVRAM), Programmable Read-Only Memory (PROM), Erasable-Programmable Read-Only Memory (EPROM), Electrically Erasable PROM (EEPROM), Flash Memory, Magnetic or Optical Data Storage Devices, Registers, etc. If a processor can read information from memory and / or write information to memory, the memory is said to be in an electronic communication state with the processor. Memory integrated into a processor is in an electronic communication state with the processor.
[0034] Hereinafter, "image" may refer to a static image, such as a still image of a video, or a dynamic image, such as a moving image, that is, the video itself.
[0035] Hereinafter, "sample" refers to data assigned to a sampling location in an image that is subject to processing. For example, pixel values in an image in a spatial domain or transformation coefficients in a transformation domain may be samples. A unit containing at least one of these samples may be defined as a block.
[0036] Below, embodiments are described in detail with reference to the attached drawings so that those skilled in the art can easily implement the present disclosure. In addition, parts of the drawings that are irrelevant to the description are omitted to clearly explain the present disclosure.
[0037] Hereinafter, with reference to FIGS. 1 to 29, an image encoding device and an image decoding device, an image encoding method and an image decoding method are described in detail according to one embodiment. With reference to FIGS. 3 to 16, a method for determining a data unit of an image is described according to one embodiment, and with reference to FIGS. 1, FIG. 2, FIGS. 17 to 29, an encoding or decoding method and device are described according to one embodiment for determining a filtering reference sample to be applied to a filter and a weight of the filter, and adaptively performing intra prediction based on the filtering reference sample and the weight of the filter.
[0038] Hereinafter, with reference to FIGS. 1 and 2, an encoding / decoding method and apparatus for adaptively performing intra prediction based on various forms of encoding units according to one embodiment of the present disclosure are described in detail.
[0039] FIG. 1a illustrates a block diagram of an image decoding device according to various embodiments.
[0040] An image decoding device (100) according to various embodiments may include an acquisition unit (105), an intra prediction unit (110), and an image decoding unit (115).
[0041] The acquisition unit (105), intra prediction unit (110), and image decoding unit (115) may include at least one processor. Additionally, the acquisition unit (105), intra prediction unit (110), and image decoding unit (115) may include a memory that stores instructions to be executed by at least one processor. The image decoding unit (115) may be implemented as separate hardware from the acquisition unit (105) and intra prediction unit (110), or may include the acquisition unit (105) and intra prediction unit (110).
[0042] The acquisition unit (105) can acquire information regarding the conversion coefficient of the current block from the bitstream. The acquisition unit (105) can acquire information regarding the prediction mode of the current block and information regarding the intra prediction mode of the current block from the bitstream.
[0043] The acquisition unit (105) may include information regarding the prediction mode of the current block, such as information indicating an intra mode or an inter prediction mode. The information regarding the intra prediction mode of the current block may be information regarding the intra prediction mode applied to the current block among a plurality of intra prediction modes. For example, the intra prediction mode may be one of a DC mode, a planar mode, and at least one angular mode having a prediction direction. The angular mode may include a horizontal mode, a vertical mode, and a diagonal mode, and may include a mode having a predetermined direction excluding the horizontal direction, the vertical direction, and the diagonal direction. For example, the number of angular modes may be 65 or 33.
[0044] The intra prediction unit (110) can be activated when the prediction mode of the current block is the intra prediction mode.
[0045] The intra prediction unit (110) can determine an original reference sample related value based on the location of the current sample within the current block and the intra prediction mode of the current block. That is, the intra prediction unit (110) can determine at least one original reference sample among the reference samples based on the location of the current sample within the current block and the intra prediction mode of the current block, and can determine an original reference sample related value based on the determined at least one original reference sample. The original reference samples are samples of the surrounding blocks of the current block, and the original reference samples may include samples of the left adjacent block or samples of the upper adjacent block of the current block. For example, the original reference samples may include samples of a predetermined line in the vertical direction adjacent to the left of the current block or samples of a predetermined line in the horizontal direction adjacent to the upper side of the current block. However, the original reference samples are not limited to including samples of the left adjacent block or samples of the upper adjacent block of the current block, but may include samples of the upper adjacent block or samples of the right adjacent block of the current block.
[0046] The intra prediction unit (110) can generate an intra prediction value for the current sample based on the location of the current sample within the current block and the intra prediction mode of the current block. That is, the intra prediction unit (110) can determine a source reference sample corresponding to the current sample based on the location of the current sample and the intra prediction mode of the current block. The intra prediction unit (110) can generate an intra prediction value for the current sample based on the sample value of the source reference sample. The intra prediction unit (110) can determine at least one filtering reference sample to be filtered and the weight of the filter based on at least one of the intra prediction mode of the current block, the location of the current sample within the current block, and the location of the reference sample of the current block, and can determine a filtering reference sample-related value based on the filtering reference sample and the weight of the filter.
[0047] For example, if the intra prediction mode of the current block is one of the planar, DC, horizontal, and vertical modes, the intra prediction unit (110) can determine at least one of the following as a filtering reference sample: a sample adjacent to the upper-left corner of the current block, an adjacent sample of the current block located in the upper direction of the current block, and an adjacent sample of the current block located in the left direction of the current block.
[0048] The intra prediction unit (110) can determine at least one of the adjacent samples on the left and upper sides of the current block and the sample adjacent to the upper-left corner of the current block, located on a line passing through the current sample within the current block, as a filtering reference sample when the intra prediction mode of the current block is an angular mode including a diagonal mode. At this time, the line may be oriented in a direction opposite to the prediction direction indicated by the angular mode.
[0049] The intra prediction unit (110) can determine the number of filter taps to apply to the filtering reference sample based on at least one of the intra prediction mode of the current block and the size of the current block.
[0050] Additionally, the intra prediction unit (110) is not limited to determining the weight of the filter to be applied to the filtering reference sample based on at least one of the intra prediction mode of the current block, the position of the current sample within the current block, and the position of the reference sample, and can determine the weight of the filter to be applied to the filtering reference sample based on the size of the current block.
[0051] The intra prediction unit (110) can determine some of the samples within the reference line adjacent to the current block as filtering reference samples based on the horizontal and vertical components of the prediction direction specified by the intra prediction mode.
[0052] The intra prediction unit (110) can determine a filtering reference sample related value based on at least one filtering reference sample to be filtered and the weight of the filter, based on at least one of the intra prediction mode of the current block, the position of the current sample within the current block, and the position of the reference sample of the current block, when the intra prediction mode of the current block is a predetermined intra prediction mode.
[0053] The intra prediction unit (110) determines at least one intra prediction mode and, using the determined at least one intra prediction mode, can determine the weights of the filtering reference sample and the filter to be applied based on at least one of the position of the current sample within the current block and the position of the reference sample of the current block. The intra prediction unit (110) can determine a value related to the filtering reference sample based on the weights of the filtering reference sample and the filter.
[0054] At this time, at least one intra prediction mode may be determined per picture unit or per block unit. At least one intra prediction mode may be an intra prediction mode determined based on the intra prediction mode of the current block, or a predetermined intra prediction mode. The predetermined intra prediction mode may be at least one of a horizontal mode and a vertical mode.
[0055] The intra prediction unit (110) can obtain a prediction block of the current block containing a prediction sample of the current block based on at least one of the original reference sample related value and the filtering reference sample related value. For example, the intra prediction unit (110) can determine whether to perform an intra prediction for the current sample using both the original reference sample related value and the filtering reference sample value, or determine one of the original reference sample related value and the filtering reference sample related value and determine whether to perform an intra prediction for the current sample based on the determined value. The intra prediction unit (110) can obtain a prediction block of the current block containing a prediction sample of the current sample based on the determination.
[0056] The intra prediction unit (110) can determine the sample value of at least one filtering reference sample to be filtered, a first weight for the filtering reference sample, and a second weight for the intra prediction value of the current sample based on the position of the current sample within the current block. The first weight for the filtering reference sample can be determined based on the distance between the filtering reference sample and the current sample. For example, the first weight can be determined based on the distance between the filtering reference sample and the current sample relative to the size of the current block. In this case, the size of the current block may refer to the height or width of the current block. The first weight may become smaller as the distance between the filtering reference sample and the current sample increases. The second weight can also be determined in a manner similar to the first weight. The first weight and the second weight may be normalized values.
[0057] At this time, the filtering reference sample may include at least one of a source reference sample located in the horizontal direction of the current sample and a source reference sample located in the vertical direction of the current sample. Meanwhile, if the intra prediction mode of the current block is an angular mode, the filtering reference sample may include at least one of adjacent samples located to the left and above the current block located on a line passing through the current sample. At this time, the line may be oriented in a direction opposite to the prediction direction indicated by the angular mode.
[0058] The intra prediction unit (110) can generate a filtered predicted sample value of the current sample based on a sample value of a filtering reference sample to be filtered, an intra predicted value of the current sample, a first weight for the filtering reference sample, and a second weight for the intra predicted value of the current sample. For example, the intra prediction unit (110) can generate a filtered predicted sample value of the current sample based on a sample value of a filtering reference sample to be filtered, an intra predicted value of the current sample, a first weight for the filtering reference sample, and a second weight for the intra predicted value of the current sample only when the intra prediction mode of the current block is a predetermined intra prediction mode.
[0059] For example, the intra prediction unit (110) can determine at least one second intra prediction mode, and using at least one second intra prediction mode, determine a sample value of at least one filtering reference sample to be filtered based on the position of the current sample within the current block, a first weight for the filtering reference sample, and a second weight for the intra prediction value of the current sample, and generate a filtered prediction sample value of the current sample based on the sample value of the filtering reference sample to be filtered, the intra prediction value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra prediction value of the current sample. At this time, at least one second intra prediction mode may be determined per picture unit or per block unit. At least one second intra prediction mode may be determined as at least one of the intra prediction mode of the current block, an intra prediction mode representing the opposite direction of the prediction direction indicated by the intra prediction mode of the current block, a horizontal mode, and a vertical mode.
[0060] The intra prediction unit (110) can generate a prediction block of the current block containing filtered prediction sample values of the current block.
[0061] The intra prediction unit (110) can obtain a prediction sample of the current block by performing filtering based on a first weight for the original reference sample related value, a second weight for the filtering reference sample related value, the original reference sample related value, and the filtering reference sample related value.
[0062] The intra prediction unit (110) can determine a second weight for the filtering reference sample related value to be smaller as the distance from the filtering reference sample to the current sample increases.
[0063] The image decoder (115) can obtain a residual block of the current block based on information regarding the transform coefficients of the current block. That is, the image decoder (115) can obtain a residual sample regarding the residual block of the current block by performing inverse quantization and inverse transform based on information regarding the transform coefficients of the current block from the bitstream.
[0064] The image decoding unit (115) can restore the current block based on the prediction block of the current block and the residual block of the current block. The image decoding unit (115) can generate a restoration sample within the current block using the sample value of the prediction sample within the prediction block of the current block and the sample value of the residual sample within the residual block of the current block, and can generate a restoration block of the current block based on the restoration sample.
[0065] Meanwhile, the image decoding device (100) obtains flag information from the bitstream indicating whether to adaptively perform intra prediction based on the filtering reference sample and the weight of the filter, and can determine whether to adaptively perform intra prediction based on the filtering reference sample and the weight of the filter based on the flag information. At this time, the flag information can be obtained block by block, and in particular, can be obtained per maximum encoding unit.
[0066] Additionally, the image decoding device (100) can obtain flag information that is commonly applied to the luminance component and the chrominance component. Alternatively, the image decoding device (100) can obtain flag information that is applied to the luminance component or the chrominance component, respectively.
[0067] Alternatively, the image decoder (100) may determine whether to adaptively perform intra prediction based on the filtering reference sample and the weight of the filter without obtaining flag information from the bitstream. For example, the image decoder (100) may determine to adaptively perform intra prediction based on the filtering reference sample and the weight of the filter when the prediction mode of the current block is a predetermined intra prediction mode.
[0068] Alternatively, the image decoder (100) may determine whether to adaptively perform intra prediction based on filtering reference samples and filter weights using information from surrounding blocks without obtaining flag information from the bitstream. For example, the image decoder (100) may determine whether to adaptively perform intra prediction based on filtering reference samples and filter weights for the current block based on flag information from surrounding blocks indicating whether to adaptively perform intra prediction based on filtering reference samples and filter weights for surrounding blocks of the current block.
[0069] Alternatively, the image decoder (100) may determine whether to adaptively perform intra prediction based on the weights of the filtering reference samples and filters based on the size of the current block. For example, when the size of the current block is a predetermined first block size, the image decoder (100) may adaptively perform intra prediction based on the weights of the filtering reference samples and filters, and when the size of the current block is a predetermined second block size, the image decoder (100) may not adaptively perform intra prediction based on the weights of the filtering reference samples and filters, but may perform conventional intra prediction.
[0070] The image decoding device (100) can perform intra prediction by combining an intra prediction decoding tool similar to an adaptive intra prediction decoding tool based on filtering reference samples and weights of filters. Alternatively, the image decoding device (100) can assign priorities among multiple intra prediction decoding tools and perform intra prediction according to the priorities among the decoding tools. That is, when a decoding tool with a high priority is used, a decoding tool with a low priority may not be used, and when a decoding tool with a high priority is not used, a decoding tool with a low priority may be used.
[0071] FIG. 1b illustrates a flowchart of an image decoding method according to various embodiments.
[0072] In step S105, the image decoder (100) can obtain information regarding the conversion coefficients of the current block.
[0073] In step S110, the image decoder (100) determines at least one filtering reference sample to be filtered and the weight of the filter based on at least one of the intra prediction mode of the current block, the location of the current sample within the current block, and the location of the reference sample of the current block, and can determine a filtering reference sample related value based on the filtering reference sample to be filtered and the weight of the filter.
[0074] In step S115, the image decoder (100) can determine the original reference sample related value based on the position of the current sample within the current block and the intra prediction mode of the current block.
[0075] In step S120, the image decoder (100) can obtain a prediction block of the current block containing a prediction sample of the current sample based on at least one of the original reference sample related value and the filtering reference sample related value.
[0076] In step S125, the image decoder (100) can obtain a residual block of the current block based on information regarding the conversion coefficient of the current block.
[0077] In step S130, the image decoding device (100) can restore the current block based on the predicted block of the current block and the residual block of the current block.
[0078] FIG. 1c illustrates a flowchart of an image decoding method according to various embodiments.
[0079] In step S155, the image decoder (100) can obtain information regarding the transformation coefficients of the current block.
[0080] In step S160, the image decoder (100) can generate an intra prediction value for the current sample based on the position of the current sample within the current block and the intra prediction mode of the current block.
[0081] In step S165, the image decoder (100) determines a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and can generate a filtered predicted sample value of the current sample based on the sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample.
[0082] In step S170, the image decoder (100) can generate a prediction block of the current block containing the filtered prediction sample value of the current sample.
[0083] In step S175, the image decoder (100) can obtain a residual block of the current block based on information regarding the conversion coefficient of the current block.
[0084] In step S180, the image decoding device (100) can restore the current block based on the predicted block of the current block and the residual block of the current block.
[0085] FIG. 1d illustrates a block diagram of an image decoding unit (6000) according to various embodiments.
[0086] The image decoding unit (6000) according to various embodiments performs the operations of encoding image data in the image decoding unit (115) of the image decoding device (100).
[0087] Referring to FIG. 1d, the entropy decoder (6150) parses encoded image data to be decoded and encoding information required for decoding from the bitstream (6050). The encoded image data is quantized transform coefficients, and the inverse quantization unit (6200) and inverse transform unit (6250) recover residual data from the quantized transform coefficients.
[0088] The intra prediction unit (6400) performs intra predictions block by block. The intra prediction unit (6400) of FIG. 1d may correspond to the intra prediction unit (110) of FIG. 1a.
[0089] The inter prediction unit (6350) performs inter prediction using reference images obtained from the restored picture buffer (6300) for each block. By adding the prediction data and retention data for each block generated by the intra prediction unit (6400) or the inter prediction unit (6350), spatial region data for the block of the current image is restored, and the deblocking unit (6450) and the SAO execution unit (6500) can perform loop filtering on the restored spatial region data to output a filtered restored image (6600). Additionally, the restored images stored in the restored picture buffer (6300) can be output as reference images.
[0090] In order to decode image data in a decoding unit (not shown) of an image decoding device (100), step-by-step operations of the image decoding unit (6000) according to various embodiments can be performed block by block.
[0091] FIG. 2a illustrates a block diagram of an image encoding device according to various embodiments.
[0092] An image encoding device (150) according to various embodiments may include an intra prediction unit (155) and an image encoding unit (160).
[0093] The intra prediction unit (155) and the image encoding unit (160) may include at least one processor. Additionally, the intra prediction unit (155) and the image encoding unit (160) may include a memory that stores instructions to be executed by at least one processor. The intra prediction unit (155) and the image encoding unit (160) may be implemented as separate hardware, or the intra prediction unit (155) and the image encoding unit (160) may be included.
[0094] The intra prediction unit (155) can determine the filtering reference sample to be filtered and the weight of the filter based on at least one of the intra prediction mode of the current block, the location of the current sample within the current block, and the location of the reference sample of the current block, and can determine the filtering reference sample related value based on the filtering reference sample to be filtered and the weight of the filter. The intra prediction unit (155) can determine the original reference sample related value based on the location of the current sample within the current block and the intra prediction mode of the current block.
[0095] The intra prediction unit (155) can generate a prediction block of the current block containing a prediction sample of the current sample based on at least one of the original reference sample related value and the filtering reference sample related value.
[0096] Alternatively, the intra prediction unit (155) may generate an intra prediction value of the current sample based on the position of the current sample within the current block and the intra prediction mode of the current block. The intra prediction unit (155) may determine a sample value of at least one filtering reference sample to be filtered, a first weight for the filtering reference sample, and a second weight for the intra prediction value of the current sample based on the position of the current sample within the current block. The intra prediction unit (155) may generate a filtered prediction sample value of the current sample based on the sample value of the filtering reference sample to be filtered, the intra prediction value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra prediction value of the current sample. The intra prediction unit (155) may generate a prediction block of the current block containing the filtered prediction sample value of the current sample.
[0097] The image encoding unit (160) can encode information regarding the transform coefficients of the current block based on the prediction block of the current block. That is, the image encoding unit (160) can generate a residual block of the current block based on the original block of the current block and the prediction block of the current block, and can encode information regarding the transform coefficients of the current block by transforming and quantizing the residual block of the current block. The image encoding unit (160) can encode information regarding the prediction mode of the current block and information regarding the intra prediction mode of the current block.
[0098] The video encoding unit (160) can generate a bitstream containing information regarding the conversion coefficients of the current block and output the bitstream.
[0099] FIG. 2b illustrates a flowchart of an image encoding method according to various embodiments.
[0100] In step S205, the image encoding device (150) determines at least one filtering reference sample to be filtered and the weight of the filter based on at least one of the intra prediction mode of the current block, the position of the current sample within the current block, and the position of the reference sample of the current block, and can determine a filtering reference sample related value based on the filtering reference sample to be filtered and the weight of the filter.
[0101] In step S210, the image encoding device (150) can determine the original reference sample related value based on the position of the current sample within the current block and the intra-prediction mode of the current block.
[0102] In step S215, the image encoding device (150) can generate a prediction block of the current block containing a prediction sample of the current sample based on at least one of the original reference sample related value and the filtering reference sample related value.
[0103] In step S220, the image encoding device (150) can encode information regarding the transformation coefficients of the current block based on the prediction block of the current block.
[0104] FIG. 2c illustrates a flowchart of an image encoding method according to various embodiments.
[0105] In step S250, the video encoding device (150) can generate an intra-predicted value of the current sample based on the position of the current sample within the current block and the intra-predicted mode of the current block.
[0106] In step S255, the image encoding device (150) determines a sample value of at least one filtering reference sample to be filtered and a first weight for the filtering reference sample and a second weight for the intra-predicted value of the current sample based on the position of the current sample within the current block, and can generate a filtered predicted sample value of the current sample based on the determined sample value of the filtering reference sample to be filtered, the intra-predicted value of the current sample, the first weight for the filtering reference sample, and the second weight for the intra-predicted value of the current sample.
[0107] In step S260, the image encoding device (150) can generate a prediction block of the current block containing the filtered prediction sample value of the current sample.
[0108] In step S265, the image encoding device (150) can encode information regarding the transformation coefficients of the current block based on the prediction block of the current block.
[0109] FIG. 2d illustrates a block diagram of an image encoding unit according to various embodiments.
[0110] According to various embodiments, the image encoding unit (7000) performs the tasks of encoding image data in the image encoding unit (160) of the image encoding device (150).
[0111] That is, the intra prediction unit (7200) performs intra prediction block by block in the current image (7050), and the inter prediction unit (7150) performs inter prediction block by block using the current image (7050) and the reference image obtained from the restored picture buffer (7100).
[0112] Residue data is generated by subtracting the prediction data for each block output from the intra prediction unit (7200) or the inter prediction unit (7150) from the data for the block being encoded in the current image (7050), and the conversion unit (7250) and the quantization unit (7300) can perform conversion and quantization on the residue data to output quantized conversion coefficients for each block. The intra prediction unit (7200) of FIG. 2d may correspond to the intra prediction unit (155) of FIG. 2a.
[0113] The inverse quantization unit (7450) and the inverse transform unit (7500) can restore residual data in the spatial domain by performing inverse quantization and inverse transform on the quantized transform coefficients. The restored residual data in the spatial domain is restored as spatial domain data for a block of the current image (7050) by adding it to the prediction data for each block output from the intra prediction unit (7200) or the inter prediction unit (7150). The deblocking unit (7550) and the SAO execution unit perform in-loop filtering on the restored spatial domain data to generate a filtered restored image. The generated restored image is stored in the restored picture buffer (7100). The restored images stored in the restored picture buffer (7100) can be used as reference images for inter prediction of other images. The entropy encoding unit (7350) entropies the quantized transform coefficients, and the entropy-encoded coefficients can be output as a bitstream (7400).
[0114] In order for the image encoding unit (7000) according to various embodiments to be applied to the image encoding device (150), the step-by-step operations of the image encoding unit (7000) according to various embodiments can be performed block by block.
[0115] In the following, the division of a encoding unit according to one embodiment of the present disclosure will be described in detail.
[0116] First, a single picture can be divided into one or more slices. A single slice can be a sequence of one or more Coding Tree Units (CTUs). In contrast to the Coding Tree Unit (CTU), there is a Coding Tree Block (CTB).
[0117] A maximum encoding block (CTB) refers to an NxN block containing NxN samples (N is an integer). Each color component can be divided into one or more maximum encoding blocks.
[0118] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), the maximum encoding unit (CTU) is a unit comprising a maximum encoding block for luminance samples and two corresponding maximum encoding blocks for chroma samples, and syntax structures used to encode the luminance samples and chroma samples. When a picture is a monochrome picture, the maximum encoding unit is a unit comprising a maximum encoding block for monochrome samples and syntax structures used to encode the monochrome samples. When a picture is encoded in color planes separated by color components, the maximum encoding unit is a unit comprising the picture and syntax structures used to encode the samples of the picture.
[0119] A single maximum coding block (CTB) can be divided into MxN coding blocks containing MxN samples (M and N are integers).
[0120] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) is a unit comprising a coding block for luminance samples and two coding blocks for corresponding chroma samples, and syntax structures used to encode the luminance samples and chroma samples. When a picture is a monochrome picture, a coding unit is a unit comprising a coding block for monochrome samples and syntax structures used to encode the monochrome samples. When a picture is a picture encoded in color planes separated by color components, a coding unit is a unit comprising the picture and syntax structures used to encode the samples of the picture.
[0121] As explained above, the maximum encoding block and the maximum encoding unit are distinct concepts, and the encoding block and the encoding unit are distinct concepts. That is, the (maximum) encoding unit refers to a data structure that includes the (maximum) encoding block containing the corresponding sample and the corresponding syntax structure. However, since a person skilled in the art can understand that the (maximum) encoding unit or the (maximum) encoding block refers to a block of a predetermined size containing a predetermined number of samples, the maximum encoding block and the maximum encoding unit, or the encoding block and the encoding unit, are referred to without distinction in the following specification unless there are special circumstances.
[0122] The image can be divided into Coding Tree Units (CTUs). The size of the CTU can be determined based on information obtained from the bitstream. The shape of the CTU can be a square of equal size, but it is not limited to this.
[0123] For example, information about the maximum size of a luma-encoded block can be obtained from a bitstream. For example, the maximum size of a luma-encoded block indicated by the information about the maximum size of a luma-encoded block may be one of 16x16, 32x32, 64x64, 128x128, or 256x256.
[0124] For example, information regarding the maximum size of a two-divisionable luminance coding block and the difference in luminance block size can be obtained from a bitstream. The information regarding the difference in luminance block size may represent the size difference between the maximum luminance coding unit and the maximum two-divisionable luminance coding block. Therefore, by combining the information regarding the maximum size of the two-divisionable luminance coding block obtained from the bitstream with the information regarding the difference in luminance block size, the size of the maximum luminance coding unit can be determined. Using the size of the maximum luminance coding unit, the size of the maximum chroma coding unit can also be determined. For example, if the Y:Cb:Cr ratio according to the color format is 4:2:0, the size of the chroma block may be half the size of the luminance block, and similarly, the size of the maximum chroma coding unit may be half the size of the maximum luminance coding unit.
[0125] According to one embodiment, information regarding the maximum size of a binary splittable luminous code block is obtained from a bitstream, so the maximum size of the binary splittable luminous code block can be determined variably. Alternatively, the maximum size of a ternary splittable luminous code block can be fixed. For example, the maximum size of a ternary splittable luminous code block in slice I may be 32x32, and the maximum size of a ternary splittable luminous code block in slice P or slice B may be 64x64.
[0126] Additionally, the maximum encoding unit can be hierarchically divided into encoding units based on splitting mode information obtained from the bitstream. As splitting mode information, at least one of information indicating whether it is a quad split, information indicating whether it is a multi-split, splitting direction information, and splitting type information can be obtained from the bitstream.
[0127] For example, information indicating whether quad splitting is performed can indicate whether the current encoding unit will be quad split or not.
[0128] If the current encoding unit is not quad-splitting, information indicating multi-splitting can indicate whether the current encoding unit will no longer be split (NO_SPLIT) or whether it will be binary / ternary split.
[0129] If the current encoding unit is binary or binary split, the splitting direction information indicates that the current encoding unit is split in either the horizontal or vertical direction.
[0130] If the current encoding unit is split horizontally or vertically, the split type information indicates that the current encoding unit is split into binary split or binary split.
[0131] The splitting mode of the current encoding unit can be determined based on the splitting direction information and the splitting type information. The splitting mode when the current encoding unit is binary split in the horizontal direction can be determined as binary horizontal splitting (SPLIT_BT_HOR), when it is territorial split in the horizontal direction as territorial horizontal splitting (SPLIT_TT_HOR), when it is binary split in the vertical direction as binary vertical splitting (SPLIT_BT_VER), and when it is territorial split in the vertical direction as territorial vertical splitting (SPLIT_BT_VER).
[0132] The image decoding device (100) can obtain splitting mode information from a bitstream from a single empty string. The form of the bitstream received by the image decoding device (100) may include a fixed-length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The empty string represents information as a sequence of binary numbers. The empty string may consist of at least one bit. The image decoding device (100) can obtain splitting mode information corresponding to the empty string based on a splitting rule. Based on the single empty string, the image decoding device (100) can determine whether to quad split the encoding unit, whether not to split it, or the splitting direction and splitting type.
[0133] A coding unit may be smaller than or equal to a maximum coding unit. For example, since the maximum coding unit is a coding unit having the maximum size, it is also a coding unit. If the segmentation mode information for the maximum coding unit indicates that it is not segmented, the coding unit determined from the maximum coding unit has the same size as the maximum coding unit. If the segmentation mode information for the maximum coding unit indicates that it is segmented, the maximum coding unit may be segmented into coding units. Additionally, if the segmentation mode information for a coding unit indicates segmentation, the coding units may be segmented into coding units of smaller size. However, the segmentation of the image is not limited to this, and the maximum coding unit and the coding unit may not be distinguished. The segmentation of coding units is explained in more detail in FIGS. 3 through 16.
[0134] Additionally, one or more prediction blocks for prediction may be determined from the coding unit. The prediction blocks may be equal to or smaller than the coding unit. Additionally, one or more transformation blocks for transformation may be determined from the coding unit. The transformation blocks may be equal to or smaller than the coding unit.
[0135] The shape and size of the transformation block and the prediction block may not be related to each other.
[0136] In another embodiment, prediction can be performed using the encoding unit as a prediction block. Additionally, conversion can be performed using the encoding unit as a conversion block.
[0137] The division of the encoding unit is described in more detail in FIGS. 3 through 16. The current block and surrounding block of the present disclosure may represent one of the maximum encoding unit, the encoding unit, the prediction block, and the transformation block. Additionally, the current block or the current encoding unit is a block currently undergoing decoding or encoding, or a block currently undergoing division. The surrounding block may be a block restored prior to the current block. The surrounding block may be spatially or temporally adjacent to the current block. The surrounding block may be located on one of the lower-left, left, upper-left, upper, upper-right, right, or lower-right sides of the current block.
[0138] FIG. 3 illustrates a process in which an image decoding device (100) divides a current encoding unit to determine at least one encoding unit according to one embodiment.
[0139] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N. Here, N may be a positive integer. Block shape information is information indicating at least one of the shape, orientation, width, and height ratio or size of the encoding unit.
[0140] The shape of the encoding unit may include square and non-square. When the width and height of the encoding unit are the same (i.e., when the block shape of the encoding unit is 4Nx4N), the image decoder (100) may determine the block shape information of the encoding unit as square. The image decoder (100) may determine the shape of the encoding unit as non-square.
[0141] When the width and height of the encoding unit are different (i.e., when the block shape of the encoding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the image decoder (100) can determine the block shape information of the encoding unit as non-square. When the shape of the encoding unit is non-square, the image decoder (100) can determine the ratio of the width and height among the block shape information of the encoding unit as at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, or 32:1. Additionally, based on the width and height of the encoding unit, the image decoding device (100) can determine whether the encoding unit is in a horizontal direction or a vertical direction. Additionally, based on at least one of the width, height, or width of the encoding unit, the image decoding device (100) can determine the size of the encoding unit.
[0142] According to one embodiment, the image decoding device (100) can determine the form of the encoding unit using block form information and can determine how the encoding unit is divided using division form mode information. That is, depending on what block form the block form information used by the image decoding device (100) represents, the method of dividing the encoding unit represented by the division form mode information can be determined.
[0143] The video decoder (100) can obtain split-form mode information from the bitstream. However, it is not limited thereto, and the video decoder (100) and the video encoding device (150) can determine pre-agreed split-form mode information based on block form information. The video decoder (100) can determine pre-agreed split-form mode information for a maximum encoding unit or a minimum encoding unit. For example, the video decoder (100) can determine the split-form mode information for the maximum encoding unit as quad split. Additionally, the video decoder (100) can determine the split-form mode information for the minimum encoding unit as "not split." Specifically, the video decoder (100) can determine the size of the maximum encoding unit to be 256x256. The video decoder (100) can determine the pre-agreed split-form mode information as quad split. Quad split is a split-form mode that divides both the width and height of the encoding unit into two equal parts. The image decoder (100) can obtain a 128x128 size encoding unit from a 256x256 size encoding unit based on the division mode information. Additionally, the image decoder (100) can determine the size of the minimum encoding unit to be 4x4. The image decoder (100) can obtain division mode information indicating "not divided" for the minimum encoding unit.
[0144] According to one embodiment, the image decoding device (100) may use block shape information indicating that the current encoding unit is in the shape of a square. For example, the image decoding device (100) may determine whether to not divide the square encoding unit, to divide it vertically, to divide it horizontally, or to divide it into four encoding units, etc., according to the division shape mode information. Referring to FIG. 3, when the block shape information of the current encoding unit (300) indicates a square shape, the decoding unit (120) may not divide the encoding unit (310a) having the same size as the current encoding unit (300) according to the division shape mode information indicating that it is not divided, or may determine the divided encoding units (310b, 310c, 310d, 310e, 310f, etc.) based on the division shape mode information indicating a predetermined division method.
[0145] Referring to FIG. 3, the image decoding device (100) can determine two encoding units (310b) that divide the current encoding unit (300) in the vertical direction based on splitting form mode information indicating that it is divided in the vertical direction according to one embodiment. The image decoding device (100) can determine two encoding units (310c) that divide the current encoding unit (300) in the horizontal direction based on splitting form mode information indicating that it is divided in the horizontal direction. The image decoding device (100) can determine four encoding units (310d) that divide the current encoding unit (300) in the vertical direction and the horizontal direction based on splitting form mode information indicating that it is divided in the vertical direction and the horizontal direction. The image decoding device (100) can determine three encoding units (310e) that divide the current encoding unit (300) in the vertical direction based on splitting form mode information indicating that it is divided ternary in the vertical direction according to one embodiment. The image decoding device (100) can determine three encoding units (310f) that divide the current encoding unit (300) horizontally based on division form mode information indicating horizontal division. However, the division form in which the square encoding unit can be divided should not be interpreted as being limited to the form described above, and may include various forms that the division form mode information can represent. The specific division forms in which the square encoding unit is divided will be described in detail below through various embodiments.
[0146] FIG. 4 illustrates a process in which, according to one embodiment, an image decoding device (100) divides a non-square-shaped encoding unit to determine at least one encoding unit.
[0147] According to one embodiment, the image decoding device (100) may use block shape information indicating that the current encoding unit is in a non-square shape. The image decoding device (100) may determine whether to not divide the current encoding unit of the non-square shape or to divide it in a predetermined way according to the division shape mode information. Referring to FIG. 4, when the block shape information of the current encoding unit (400 or 450) indicates a non-square shape, the image decoding device (100) may determine an encoding unit (410 or 460) having the same size as the current encoding unit (400 or 450) based on division shape mode information indicating that it is not divided, or determine divided encoding units (420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c) based on division shape mode information indicating a predetermined division method. A predetermined division method in which a non-square encoding unit is divided will be specifically described below through various embodiments.
[0148] According to one embodiment, the image decoding device (100) can determine the form in which the encoding unit is divided using the division form mode information, and in this case, the division form mode information may indicate the number of at least one encoding unit generated by dividing the encoding unit. Referring to FIG. 4, when the division form mode information indicates that the current encoding unit (400 or 450) is divided into two encoding units, the image decoding device (100) can determine two encoding units (420a, 420b, or 470a, 470b) included in the current encoding unit by dividing the current encoding unit (400 or 450) based on the division form mode information.
[0149] According to one embodiment, when an image decoding device (100) divides a current encoding unit (400 or 450) in a non-square shape based on division shape mode information, the image decoding device (100) may divide the current encoding unit by considering the position of the long side of the current encoding unit (400 or 450) in a non-square shape. For example, the image decoding device (100) may determine a plurality of encoding units by dividing the current encoding unit (400 or 450) in a direction that divides the long side of the current encoding unit (400 or 450) by considering the shape of the current encoding unit (400 or 450).
[0150] According to one embodiment, when the segmentation mode information indicates that the encoding unit is divided into an odd number of blocks (terminal segmentation), the image decoder (100) can determine an odd number of encoding units included in the current encoding unit (400 or 450). For example, when the segmentation mode information indicates that the current encoding unit (400 or 450) is divided into three encoding units, the image decoder (100) can divide the current encoding unit (400 or 450) into three encoding units (430a, 430b, 430c, 480a, 480b, 480c).
[0151] According to one embodiment, the ratio of the width to the height of the current encoding unit (400 or 450) may be 4:1 or 1:4. When the ratio of the width to the height is 4:1, the block shape information may be in the horizontal direction because the width is longer than the height. When the ratio of the width to the height is 1:4, the block shape information may be in the vertical direction because the width is shorter than the height. The image decoder (100) may determine to divide the current encoding unit into an odd number of blocks based on the division shape mode information. Additionally, the image decoder (100) may determine the division direction of the current encoding unit (400 or 450) based on the block shape information of the current encoding unit (400 or 450). For example, if the current encoding unit (400) is in a vertical direction, the image decoding device (100) can determine the encoding units (430a, 430b, 430c) by dividing the current encoding unit (400) in a horizontal direction. Also, if the current encoding unit (450) is in a horizontal direction, the image decoding device (100) can determine the encoding units (480a, 480b, 480c) by dividing the current encoding unit (450) in a vertical direction.
[0152] According to one embodiment, the image decoding device (100) may determine an odd number of encoding units included in the current encoding unit (400 or 450), and the sizes of the determined encoding units may not all be the same. For example, among the determined odd number of encoding units (430a, 430b, 430c, 480a, 480b, 480c), the size of a certain encoding unit (430b or 480b) may have a different size from the other encoding units (430a, 430c, 480a, 480c). That is, the current encoding unit (400 or 450) can be divided and determined as a encoding unit, and the encoding unit can have multiple types of sizes, and in some cases, an odd number of encoding units (430a, 430b, 430c, 480a, 480b, 480c) may each have different sizes.
[0153] According to one embodiment, when the segmentation mode information indicates that the encoding unit is divided into an odd number of blocks, the image decoding device (100) can determine the odd number of encoding units included in the current encoding unit (400 or 450), and furthermore, the image decoding device (100) can impose a predetermined limit on at least one encoding unit among the odd number of encoding units generated by the segmentation. Referring to FIG. 4, the image decoding device (100) can perform the decoding process for the central encoding unit (430b, 480b) among the three encoding units (430a, 430b, 430c, 480a, 480b, 480c) generated by the segmentation of the current encoding unit (400 or 450) differently from the other encoding units (430a, 430c, 480a, 480c). For example, the video decoding device (100) may restrict the centrally located encoding unit (430b, 480b) from being further divided unlike other encoding units (430a, 430c, 480a, 480c), or restrict it to being divided only a predetermined number of times.
[0154] FIG. 5 illustrates a process in which an image decoding device (100) divides a encoding unit based on at least one of block form information and division form mode information according to one embodiment.
[0155] According to one embodiment, the image decoding device (100) may determine whether to divide a square-shaped first encoding unit (500) into encoding units or not to divide it based on at least one of block shape information and division shape mode information. According to one embodiment, if the division shape mode information indicates that the first encoding unit (500) is divided in a horizontal direction, the image decoding device (100) may divide the first encoding unit (500) in a horizontal direction to determine a second encoding unit (510). The first encoding unit, the second encoding unit, and the third encoding unit used according to one embodiment are terms used to understand the relationship before and after division between the encoding units. For example, if the first encoding unit is divided, the second encoding unit may be determined, and if the second encoding unit is divided, the third encoding unit may be determined. In the following, the relationship between the first encoding unit, the second encoding unit, and the third encoding unit used may be understood as following the features described above.
[0156] According to one embodiment, the image decoding device (100) may determine whether to divide the determined second encoding unit (510) into encoding units or not to divide it based on the division shape mode information. Referring to FIG. 5, the image decoding device (100) may divide the determined non-square second encoding unit (510) into at least one third encoding unit (520a, 520b, 520c, 520d, etc.) by dividing the first encoding unit (500) based on the division shape mode information, or may not divide the second encoding unit (510). The image decoding device (100) can obtain segmentation mode information, and the image decoding device (100) can divide a first encoding unit (500) based on the obtained segmentation mode information to divide a plurality of second encoding units (e.g., 510) of various forms, and the second encoding units (510) can be divided according to the method in which the first encoding unit (500) was divided based on the segmentation mode information. According to one embodiment, when the first encoding unit (500) is divided into a second encoding unit (510) based on the segmentation mode information for the first encoding unit (500), the second encoding unit (510) can also be divided into a third encoding unit (e.g., 520a, 520b, 520c, 520d, etc.) based on the segmentation mode information for the second encoding unit (510). That is, the encoding unit can be recursively partitioned based on partitioning mode information associated with each encoding unit. Thus, a square encoding unit can be determined from a non-square encoding unit, and a non-square encoding unit can be determined by recursively partitioning this square encoding unit.
[0157] Referring to FIG. 5, among the odd number of third encoding units (520b, 520c, 520d) determined by dividing a second encoding unit (510) of a non-square shape, a predetermined encoding unit (e.g., a central encoding unit or a square encoding unit) may be recursively divided. According to one embodiment, a square-shaped third encoding unit (520b), which is one of the odd number of third encoding units (520b, 520c, 520d), may be divided horizontally into a plurality of fourth encoding units. A non-square-shaped fourth encoding unit (530b or 530d), which is one of the plurality of fourth encoding units (530a, 530b, 530c, 530d), may again be divided into a plurality of encoding units. For example, a non-square fourth encoding unit (530b or 530d) may be further divided into an odd number of encoding units. Methods that can be used for the recursive division of encoding units will be described later through various embodiments.
[0158] According to one embodiment, the image decoding device (100) may divide each of the third encoding units (520a, 520b, 520c, 520d, etc.) into encoding units based on the division shape mode information. Additionally, the image decoding device (100) may decide not to divide the second encoding unit (510) based on the division shape mode information. According to one embodiment, the image decoding device (100) may divide the non-square second encoding unit (510) into an odd number of third encoding units (520b, 520c, 520d). The image decoding device (100) may place a certain limit on a certain third encoding unit among the odd number of third encoding units (520b, 520c, 520d). For example, the video decoding device (100) may limit the encoding unit (520c) located in the middle of the odd number of third encoding units (520b, 520c, 520d) so that it is not further divided or is limited to being divided a set number of times.
[0159] Referring to FIG. 5, the image decoding device (100) may limit the middle encoding unit (520c) among the odd number of third encoding units (520b, 520c, 520d) included in the second encoding unit (510) of a non-square shape to no longer be divided, to be divided into a predetermined division form (e.g., divided into only 4 encoding units or divided into a form corresponding to the divided form of the second encoding unit (510)), or to be divided only a predetermined number of times (e.g., divided only n times, n > 0). However, the above limitation on the middle encoding unit (520c) is merely a simple example and should not be interpreted as being limited to the above-described examples, but should be interpreted as including various limitations that allow the middle encoding unit (520c) to be decoded differently from the other encoding units (520b, 520d).
[0160] According to one embodiment, the image decoding device (100) can obtain splitting form mode information used to split the current encoding unit at a predetermined location within the current encoding unit.
[0161] FIG. 6 illustrates a method for an image decoding device (100) to determine a predetermined encoding unit among an odd number of encoding units according to one embodiment.
[0162] Referring to FIG. 6, the segmentation mode information of the current encoding unit (600, 650) can be obtained from a sample at a specific location among a plurality of samples included in the current encoding unit (600, 650) (e.g., a sample located in the center (640, 690)). However, the specific location within the current encoding unit (600) where at least one of such segmentation mode information can be obtained should not be interpreted as being limited to the center location shown in FIG. 6, and should be interpreted as including various locations within the current encoding unit (600) (e.g., top, bottom, left, right, top-left, bottom-left, top-right, or bottom-right, etc.). The image decoding device (100) can obtain the segmentation mode information obtained from the specific location and decide whether to divide the current encoding unit into encoding units of various shapes and sizes or not to divide it.
[0163] According to one embodiment, the image decoding device (100) may select one of the encoding units when the current encoding unit is divided into a predetermined number of encoding units. There may be various methods for selecting one of the multiple encoding units, and such methods will be described later through various embodiments below.
[0164] According to one embodiment, the image decoding device (100) can divide the current encoding unit into a plurality of encoding units and determine the encoding unit at a predetermined position.
[0165] According to one embodiment, the image decoding device (100) may use information indicating the location of each of the odd number of encoding units to determine the encoding unit located in the middle among the odd number of encoding units. Referring to FIG. 6, the image decoding device (100) may divide the current encoding unit (600) or the current encoding unit (650) to determine the odd number of encoding units (620a, 620b, 620c) or the odd number of encoding units (660a, 660b, 660c). The image decoding device (100) may determine the middle encoding unit (620b) or the middle encoding unit (660b) by using information regarding the location of the odd number of encoding units (620a, 620b, 620c) or the odd number of encoding units (660a, 660b, 660c). For example, the image decoding device (100) can determine the centrally located encoding unit (620b) by determining the positions of the encoding units (620a, 620b, 620c) based on information indicating the positions of a predetermined sample included in the encoding units (620a, 620b, 620c). Specifically, the image decoding device (100) can determine the centrally located encoding unit (620b) by determining the positions of the encoding units (620a, 620b, 620c) based on information indicating the positions of the upper-left samples (630a, 630b, 630c) of the encoding units (620a, 620b, 620c).
[0166] According to one embodiment, information indicating the location of the upper-left sample (630a, 630b, 630c) included in each of the encoding units (620a, 620b, 620c) may include information regarding the location or coordinates within the picture of the encoding units (620a, 620b, 620c). According to one embodiment, information indicating the location of the upper-left sample (630a, 630b, 630c) included in each of the encoding units (620a, 620b, 620c) may include information indicating the width or height of the encoding units (620a, 620b, 620c) included in the current encoding unit (600), and such width or height may correspond to information indicating the difference between coordinates within the picture of the encoding units (620a, 620b, 620c). That is, the image decoding device (100) can determine the centrally located encoding unit (620b) by directly using information about the position or coordinates of the encoding units (620a, 620b, 620c) within the picture, or by using information about the width or height of the encoding unit corresponding to the difference value between the coordinates.
[0167] According to one embodiment, information indicating the location of the upper left sample (630a) of the upper encoding unit (620a) may be represented by the (xa, ya) coordinates, information indicating the location of the upper left sample (530b) of the middle encoding unit (620b) may be represented by the (xb, yb) coordinates, and information indicating the location of the upper left sample (630c) of the lower encoding unit (620c) may be represented by the (xc, yc) coordinates. The image decoding device (100) can determine the middle encoding unit (620b) using the coordinates of the upper left samples (630a, 630b, 630c) included in each of the encoding units (620a, 620b, 620c). For example, when the coordinates of the upper-left samples (630a, 630b, 630c) are sorted in ascending or descending order, the encoding unit (620b) containing the coordinates (xb, yb) of the sample (630b) located in the middle can be determined as the encoding unit located in the middle among the encoding units (620a, 620b, 620c) determined by dividing the current encoding unit (600). However, the coordinates indicating the position of the upper-left samples (630a, 630b, 630c) may represent absolute positions within the picture, and furthermore, based on the position of the upper-left sample (630a) of the upper-left of the upper-left of the middle encoding unit (620b), the (dxb, dyb) coordinates, which represent the relative position of the upper-left sample (630b) of the middle encoding unit (620b), and the (dxc, dyc) coordinates, which represent the relative position of the upper-left sample (630c) of the lower encoding unit (620c) may also be used. In addition, the method of determining the encoding unit of a predetermined position by using the coordinates of the corresponding sample as information indicating the position of the sample included in the encoding unit should not be interpreted as being limited to the method described above, but should be interpreted as various arithmetic methods that can utilize the coordinates of the sample.
[0168] According to one embodiment, the image decoding device (100) can divide the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c) and select an encoding unit among the encoding units (620a, 620b, 620c) according to a predetermined criterion. For example, the image decoding device (100) can select an encoding unit (620b) of a different size among the encoding units (620a, 620b, 620c).
[0169] According to one embodiment, the image decoding device (100) can determine the width or height of each of the encoding units (620a, 620b, 620c) using the (xa, ya) coordinates, which are information indicating the location of the upper left sample (630a) of the upper encoding unit (620a), the (xb, yb) coordinates, which are information indicating the location of the upper left sample (630b) of the middle encoding unit (620b), and the (xc, yc) coordinates, which are information indicating the location of the upper left sample (630c) of the lower encoding unit (620c). The image decoding device (100) can determine the size of each of the encoding units (620a, 620b, 620c) using the (xa, ya), (xb, yb), and (xc, yc) coordinates, which are information indicating the location of the encoding units (620a, 620b, 620c). According to one embodiment, the image decoding device (100) may determine the width of the upper encoding unit (620a) as the width of the current encoding unit (600). The image decoding device (100) may determine the height of the upper encoding unit (620a) as yb-ya. According to one embodiment, the image decoding device (100) may determine the width of the middle encoding unit (620b) as the width of the current encoding unit (600). The image decoding device (100) may determine the height of the middle encoding unit (620b) as yc-yb. According to one embodiment, the image decoding device (100) may determine the width or height of the lower encoding unit using the width or height of the current encoding unit and the width and height of the upper encoding unit (620a) and the middle encoding unit (620b). The video decoding device (100) can determine a encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (620a, 620b, 620c).Referring to FIG. 6, the image decoding device (100) can determine a middle encoding unit (620b) having a size different from that of the upper encoding unit (620a) and the lower encoding unit (620c) as the encoding unit of a predetermined position. However, since the process of the image decoding device (100) described above determining the encoding unit having a size different from other encoding units is merely one embodiment of determining the encoding unit of a predetermined position using the size of the encoding unit determined based on sample coordinates, various processes of determining the encoding unit of a predetermined position by comparing the size of the encoding unit determined according to the predetermined sample coordinates may be used.
[0170] The image decoding device (100) can determine the width or height of each of the encoding units (660a, 660b, 660c) using the (xd, yd) coordinates, which are information indicating the location of the upper-left sample (670a) of the left encoding unit (660a), the (xe, ye) coordinates, which are information indicating the location of the upper-left sample (670b) of the middle encoding unit (660b), and the (xf, yf) coordinates, which are information indicating the location of the upper-left sample (670c) of the right encoding unit (660c). The image decoding device (100) can determine the size of each of the encoding units (660a, 660b, 660c) using the (xd, yd), (xe, ye), and (xf, yf) coordinates, which are information indicating the location of the encoding units (660a, 660b, 660c).
[0171] According to one embodiment, the image decoding device (100) may determine the width of the left encoding unit (660a) as xe-xd. The image decoding device (100) may determine the height of the left encoding unit (660a) as the height of the current encoding unit (650). According to one embodiment, the image decoding device (100) may determine the width of the middle encoding unit (660b) as xf-xe. The image decoding device (100) may determine the height of the middle encoding unit (660b) as the height of the current encoding unit (600). According to one embodiment, the image decoding device (100) may determine the width or height of the right encoding unit (660c) using the width or height of the current encoding unit (650) and the width and height of the left encoding unit (660a) and the middle encoding unit (660b). The image decoding device (100) can determine a encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (660a, 660b, 660c). Referring to FIG. 6, the image decoding device (100) can determine a middle encoding unit (660b) having a different size from the left encoding unit (660a) and the right encoding unit (660c) as the encoding unit of a predetermined position. However, since the process of the image decoding device (100) described above determining a encoding unit having a different size from other encoding units is merely one embodiment of determining the encoding unit of a predetermined position using the size of the encoding unit determined based on sample coordinates, various processes of determining the encoding unit of a predetermined position by comparing the size of the encoding unit determined according to the predetermined sample coordinates may be used.
[0172] However, the sample location considered to determine the location of the encoding unit should not be interpreted as being limited to the upper left corner described above, and can be interpreted as allowing the use of information regarding the location of any sample included in the encoding unit.
[0173] According to one embodiment, the image decoding device (100) may select an encoding unit at a predetermined position among an odd number of encoding units determined by dividing the current encoding unit, taking into account the shape of the current encoding unit. For example, if the current encoding unit is a non-square shape where the width is longer than the height, the image decoding device (100) may determine an encoding unit at a predetermined position according to the horizontal direction. That is, the image decoding device (100) may determine one of the encoding units at different positions in the horizontal direction and place a restriction on that encoding unit. If the current encoding unit is a non-square shape where the height is longer than the width, the image decoding device (100) may determine an encoding unit at a predetermined position according to the vertical direction. That is, the image decoding device (100) may determine one of the encoding units at different positions in the vertical direction and place a restriction on that encoding unit.
[0174] According to one embodiment, the image decoding device (100) may use information indicating the location of each of the even number of encoding units to determine the encoding unit at a predetermined location among the even number of encoding units. The image decoding device (100) may determine the even number of encoding units by dividing (binary division) the current encoding unit and may determine the encoding unit at a predetermined location using information regarding the locations of the even number of encoding units. Since the specific process for this may correspond to the process of determining the encoding unit at a predetermined location (e.g., the middle location) among the odd number of encoding units described above in FIG. 6, it is omitted.
[0175] According to one embodiment, when a current encoding unit in a non-square shape is divided into a plurality of encoding units, certain information regarding the encoding unit at a certain position may be used during the division process to determine the encoding unit at a certain position among the plurality of encoding units. For example, the image decoding device (100) may use at least one of block shape information and division shape mode information stored in a sample included in the middle encoding unit during the division process to determine the encoding unit located in the middle among the encoding units into which the current encoding unit is divided into a plurality of encoding units.
[0176] Referring to FIG. 6, the image decoding device (100) can divide the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c) based on the division form mode information, and can determine the encoding unit (620b) located in the middle among the plurality of encoding units (620a, 620b, 620c). Furthermore, the image decoding device (100) can determine the encoding unit (620b) located in the middle by considering the location where the division form mode information is obtained. That is, the segmentation mode information of the current encoding unit (600) can be obtained from a sample (640) located in the middle of the current encoding unit (600), and based on the segmentation mode information, if the current encoding unit (600) is divided into a plurality of encoding units (620a, 620b, 620c), the encoding unit (620b) containing the sample (640) can be determined as the encoding unit located in the middle. However, the information used to determine the encoding unit located in the middle should not be interpreted as being limited to segmentation mode information, and various types of information may be used in the process of determining the encoding unit located in the middle.
[0177] According to one embodiment, a predetermined information for identifying a coding unit at a predetermined location may be obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, an image decoding device (100) may use a segmentation mode information obtained from a sample at a predetermined location within the current coding unit (600) (for example, a sample at the center of the current coding unit (600)) to determine a coding unit at a predetermined location (for example, a coding unit located in the center of the multiple divided coding units) among a plurality of coding units (620a, 620b, 620c) determined by dividing the current coding unit (600). That is, the image decoding device (100) can determine a sample at the predetermined position by considering the block shape of the current encoding unit (600), and the image decoding device (100) can determine a encoding unit (620b) containing a sample from which certain information (e.g., division shape mode information) can be obtained among a plurality of encoding units (620a, 620b, 620c) from which the current encoding unit (600) is divided and determined, and can impose a certain limit. Referring to FIG. 6, according to one embodiment, the image decoding device (100) can determine a sample (640) located in the middle of the current encoding unit (600) as a sample from which certain information can be obtained, and the image decoding device (100) can impose a certain limit on the encoding unit (620b) containing such a sample (640) during the decoding process. However, the location of the sample from which the specified information can be obtained should not be interpreted as being limited to the location described above, but can be interpreted as samples at any location included in the encoding unit (620b) to be determined for the purpose of imposing a limit.
[0178] According to one embodiment, the location of a sample from which a predetermined information can be obtained may be determined according to the shape of the current encoding unit (600). According to one embodiment, block shape information may determine whether the shape of the current encoding unit is square or non-square, and may determine the location of a sample from which a predetermined information can be obtained according to the shape. For example, the image decoding device (100) may determine a sample located on a boundary that divides at least one of the width and height of the current encoding unit in half using at least one of the information regarding the width and height of the current encoding unit as a sample from which a predetermined information can be obtained. As another example, if the block shape information related to the current encoding unit indicates that it is a non-square shape, the image decoding device (100) may determine one of the samples adjacent to the boundary that divides the long side of the current encoding unit in half as a sample from which a predetermined information can be obtained.
[0179] According to one embodiment, when the image decoding device (100) divides the current encoding unit into a plurality of encoding units, it may use division form mode information to determine the encoding unit at a predetermined position among the plurality of encoding units. According to one embodiment, the image decoding device (100) may obtain division form mode information from a sample at a predetermined position included in the encoding unit, and the image decoding device (100) may divide the plurality of encoding units generated by dividing the current encoding unit using the division form mode information obtained from a sample at a predetermined position included in each of the plurality of encoding units. That is, the encoding unit may be recursively divided using the division form mode information obtained from a sample at a predetermined position included in each of the encoding units. Since the recursive division process of the encoding unit has been described in detail through FIG. 5, a detailed explanation will be omitted.
[0180] According to one embodiment, the image decoding device (100) can determine at least one encoding unit by dividing the current encoding unit, and can determine the order in which the at least one encoding unit is decoded according to a predetermined block (e.g., the current encoding unit).
[0181] FIG. 7 illustrates the order in which a plurality of encoding units are processed when an image decoding device (100) divides a current encoding unit to determine a plurality of encoding units according to one embodiment.
[0182] According to one embodiment, the image decoding device (100) may determine a second encoding unit (710a, 710b) by dividing a first encoding unit (700) in a vertical direction according to the splitting form mode information, determine a second encoding unit (730a, 730b) by dividing the first encoding unit (700) in a horizontal direction, or determine a second encoding unit (750a, 750b, 750c, 750d) by dividing the first encoding unit (700) in both a vertical and a horizontal direction.
[0183] Referring to FIG. 7, the image decoding device (100) can determine the order of processing the determined second encoding units (710a, 710b) in the horizontal direction (710c) by dividing the first encoding unit (700) in the vertical direction. The image decoding device (100) can determine the processing order of the determined second encoding units (730a, 730b) in the vertical direction (730c) by dividing the first encoding unit (700) in the horizontal direction. The image decoding device (100) can determine the second encoding unit (750a, 750b, 750c, 750d) determined by dividing the first encoding unit (700) into vertical and horizontal directions, according to a predetermined order in which encoding units located in one row are processed and then encoding units located in the next row are processed (e.g., raster scan order or z scan order (750e), etc.).
[0184] According to one embodiment, the image decoding device (100) can recursively divide the encoding units. Referring to FIG. 7, the image decoding device (100) can divide the first encoding unit (700) to determine a plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d), and can recursively divide each of the determined plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d). A method of dividing multiple encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may be a method corresponding to a method of dividing the first encoding unit (700). Accordingly, the multiple encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may each be independently divided into multiple encoding units. Referring to FIG. 7, the image decoding device (100) may determine the second encoding units (710a, 710b) by dividing the first encoding unit (700) in a vertical direction, and furthermore, may determine whether to independently divide or not divide each of the second encoding units (710a, 710b).
[0185] According to one embodiment, the image decoding device (100) may divide the second encoding unit (710a) on the left side horizontally into third encoding units (720a, 720b), and may not divide the second encoding unit (710b) on the right side.
[0186] According to one embodiment, the processing order of the encoding units may be determined based on the process of dividing the encoding units. In other words, the processing order of the divided encoding units may be determined based on the processing order of the encoding units immediately before they are divided. The image decoding device (100) may determine the processing order of the third encoding units (720a, 720b), which are determined by dividing the second encoding unit (710a) on the left, independently of the second encoding unit (710b) on the right. Since the third encoding units (720a, 720b) are determined by dividing the second encoding unit (710a) on the left in a horizontal direction, the third encoding units (720a, 720b) may be processed in a vertical direction (720c). In addition, since the processing order of the second encoding unit (710a) on the left and the second encoding unit (710b) on the right corresponds to the horizontal direction (710c), the third encoding unit (720a, 720b) included in the second encoding unit (710a) on the left can be processed in the vertical direction (720c) before the right encoding unit (710b) is processed. The above description is intended to explain the process in which the processing order of the encoding units is determined according to the encoding unit before division, and therefore should not be interpreted as being limited to the above-described embodiment, but should be interpreted as being used in various ways in which encoding units determined by division in various forms can be processed independently according to a predetermined order.
[0187] FIG. 8 illustrates a process in which, according to one embodiment, an image decoding device (100) determines that the current encoding unit is divided into an odd number of encoding units when the encoding unit cannot be processed in a predetermined order.
[0188] According to one embodiment, the image decoding device (100) may determine that the current encoding unit is divided into an odd number of encoding units based on acquired segmentation mode information. Referring to FIG. 8, a square-shaped first encoding unit (800) may be divided into non-square-shaped second encoding units (810a, 810b), and the second encoding units (810a, 810b) may each be independently divided into third encoding units (820a, 820b, 820c, 820d, 820e). According to one embodiment, the image decoding device (100) can determine a plurality of third encoding units (820a, 820b) by dividing the left encoding unit (810a) among the second encoding units in a horizontal direction, and the right encoding unit (810b) can be divided into an odd number of third encoding units (820c, 820d, 820e).
[0189] According to one embodiment, the image decoding device (100) can determine whether there exists an odd number of divided encoding units by determining whether the third encoding units (820a, 820b, 820c, 820d, 820e) can be processed in a predetermined order. Referring to FIG. 8, the image decoding device (100) can determine the third encoding units (820a, 820b, 820c, 820d, 820e) by recursively dividing the first encoding unit (800). The video decoding device (100) can determine whether the first encoding unit (800), the second encoding unit (810a, 810b), or the third encoding unit (820a, 820b, 820c, 820d, 820e) are divided into an odd number of encoding units based on at least one of block form information and division form mode information. For example, the encoding unit located on the right among the second encoding units (810a, 810b) may be divided into an odd number of third encoding units (820c, 820d, 820e). The order in which a plurality of encoding units included in the first encoding unit (800) are processed may be a predetermined order (e.g., z-scan order (830)), and the image decoding device (100) may determine whether the right second encoding unit (810b) is divided into an odd number of determined third encoding units (820c, 820d, 820e) can be processed according to the predetermined order.
[0190] According to one embodiment, the image decoding device (100) can determine whether the third encoding unit (820a, 820b, 820c, 820d, 820e) included in the first encoding unit (800) satisfies a condition that the third encoding unit (820a, 820b, 820c, 820d, 820e) can be processed in a predetermined order, and the condition relates to whether at least one of the width and height of the second encoding unit (810a, 810b) is divided in half according to the boundary of the third encoding unit (820a, 820b, 820c, 820d, 820e). For example, the third encoding unit (820a, 820b) determined by dividing the height of the left second encoding unit (810a) in a non-square shape in half can satisfy the condition. Since the boundaries of the third encoding units (820c, 820d, 820e), which are determined by dividing the right second encoding unit (810b) into three encoding units, do not divide the width or height of the right second encoding unit (810b) in half, the third encoding units (820c, 820d, 820e) may be determined not to satisfy the condition. In the case of such non-satisfaction of the condition, the image decoding device (100) determines that there is a disconnection in the scan order, and based on the result of the determination, the right second encoding unit (810b) may be determined to be divided into an odd number of encoding units. According to one embodiment, when the image decoding device (100) is divided into an odd number of encoding units, it may place a certain restriction on the encoding unit at a certain position among the divided encoding units, and since the details of such restriction or the certain position, etc., have been described in detail through various embodiments, a detailed explanation will be omitted.
[0191] FIG. 9 illustrates a process in which an image decoding device (100) divides a first encoding unit (900) to determine at least one encoding unit according to one embodiment.
[0192] According to one embodiment, the image decoding device (100) may divide the first encoding unit (900) based on the segmentation shape mode information obtained through a receiver (not shown). The first encoding unit (900) in a square shape may be divided into four square-shaped encoding units or into a plurality of non-square-shaped encoding units. For example, referring to FIG. 9, the first encoding unit (900) is square and the segmentation shape mode information indicates that it is divided into non-square encoding units, so the image decoding device (100) may divide the first encoding unit (900) into a plurality of non-square encoding units. Specifically, when the splitting mode information indicates that the first encoding unit (900) is divided in a horizontal or vertical direction to determine an odd number of encoding units, the image decoding device (100) can divide the square-shaped first encoding unit (900) into an odd number of encoding units, such as a second encoding unit (910a, 910b, 910c) determined by dividing in a vertical direction or a second encoding unit (920a, 920b, 920c) determined by dividing in a horizontal direction.
[0193] According to one embodiment, the image decoding device (100) can determine whether the second encoding unit (910a, 910b, 910c, 920a, 920b, 920c) included in the first encoding unit (900) satisfies a condition that the second encoding unit (910a, 910b, 910c, 920a, 920b, 920c) can be processed in a predetermined order, and the condition relates to whether at least one of the width and height of the first encoding unit (900) is divided in half according to the boundary of the second encoding unit (910a, 910b, 910c, 920a, 920b, 920c). Referring to FIG. 9, the boundaries of the second encoding units (910a, 910b, 910c), which are determined by dividing the square-shaped first encoding unit (900) in the vertical direction, do not divide the width of the first encoding unit (900) in half, so the first encoding unit (900) may be determined not to satisfy the condition of being processed in a predetermined order. Additionally, the boundaries of the second encoding units (920a, 920b, 920c), which are determined by dividing the square-shaped first encoding unit (900) in the horizontal direction, do not divide the width of the first encoding unit (900) in half, so the first encoding unit (900) may be determined not to satisfy the condition of being processed in a predetermined order. The image decoding device (100) determines that if these conditions are not satisfied, there is a disconnection in the scan order, and based on the result of the determination, the first encoding unit (900) may be divided into an odd number of encoding units. According to one embodiment, when the image decoding device (100) is divided into an odd number of encoding units, it may place a certain restriction on the encoding unit at a certain position among the divided encoding units. Since the details of such restriction or the certain position have been described in detail through various embodiments, a detailed explanation will be omitted.
[0194] According to one embodiment, the image decoding device (100) can divide the first encoding unit to determine various forms of encoding units.
[0195] Referring to FIG. 9, the image decoding device (100) can divide a square-shaped first encoding unit (900) and a non-square-shaped first encoding unit (930 or 950) into various types of encoding units.
[0196] FIG. 10 illustrates that, according to one embodiment, when a video decoding device (100) divides a first encoding unit (1000) and a second encoding unit of a non-square shape determined by the division satisfies a predetermined condition, the shape in which the second encoding unit can be divided is limited.
[0197] According to one embodiment, the image decoding device (100) may decide to divide a square-shaped first encoding unit (1000) into non-square-shaped second encoding units (1010a, 1010b, 1020a, 1020b) based on division shape mode information obtained through a receiver (not shown). The second encoding units (1010a, 1010b, 1020a, 1020b) may be divided independently. Accordingly, the image decoding device (100) may decide to divide into a plurality of encoding units or not divide based on division shape mode information related to each of the second encoding units (1010a, 1010b, 1020a, 1020b). According to one embodiment, the image decoding device (100) may determine a third encoding unit (1012a, 1012b) by dividing the left second encoding unit (1010a), which is a non-square shape determined by dividing the first encoding unit (1000) in the vertical direction, in the horizontal direction. However, when the image decoding device (100) divides the left second encoding unit (1010a) in the horizontal direction, the right second encoding unit (1010b) may be restricted so that it cannot be divided in the same horizontal direction as the left second encoding unit (1010a). If the right second encoding unit (1010b) is divided in the same direction to determine the third encoding unit (1014a, 1014b), the left second encoding unit (1010a) and the right second encoding unit (1010b) may be divided independently in the horizontal direction to determine the third encoding unit (1012a, 1012b, 1014a, 1014b). However, this is the same result as the image decoding device (100) dividing the first encoding unit (1000) into four square-shaped second encoding units (1030a, 1030b, 1030c, 1030d) based on the division shape mode information, and this may be inefficient in terms of image decoding.
[0198] According to one embodiment, the image decoding device (100) may determine a third encoding unit (1022a, 1022b, 1024a, 1024b) by dividing a first encoding unit (1000) in a horizontal direction and a second encoding unit (1020a or 1020b) in a non-square shape in a vertical direction. However, if the image decoding device (100) divides one of the second encoding units (e.g., the upper second encoding unit (1020a)) in a vertical direction, it may restrict the other second encoding unit (e.g., the lower encoding unit (1020b)) from being divided in the same vertical direction as the upper second encoding unit (1020a) in accordance with the above-described reason.
[0199] FIG. 11 illustrates the process of a video decoder (100) dividing square-shaped encoding units when, according to one embodiment, the divided shape mode information cannot be divided into four square-shaped encoding units.
[0200] According to one embodiment, the image decoding device (100) can determine the second encoding unit (1110a, 1110b, 1120a, 1120b, etc.) by dividing the first encoding unit (1100) based on the division shape mode information. The division shape mode information may include information on various shapes in which the encoding unit can be divided, but the information on various shapes may not include information for dividing into four square-shaped encoding units. According to this division shape mode information, the image decoding device (100) cannot divide the square-shaped first encoding unit (1100) into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d). Based on the segmented form mode information, the image decoding device (100) can determine a non-square second encoding unit (1110a, 1110b, 1120a, 1120b, etc.).
[0201] According to one embodiment, the image decoding device (100) can independently divide each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) in a non-square shape. Each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) can be divided in a predetermined order through a recursive method, and this may be a division method corresponding to the method in which the first encoding unit (1100) is divided based on division shape mode information.
[0202] For example, the image decoding device (100) can determine a square-shaped third encoding unit (1112a, 1112b) by dividing the left second encoding unit (1110a) in a horizontal direction, and can determine a square-shaped third encoding unit (1114a, 1114b) by dividing the right second encoding unit (1110b) in a horizontal direction. Furthermore, the image decoding device (100) can determine a square-shaped third encoding unit (1116a, 1116b, 1116c, 1116d) by dividing both the left second encoding unit (1110a) and the right second encoding unit (1110b) in a horizontal direction. In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).
[0203] As another example, the video decoding device (100) may determine a square-shaped third encoding unit (1122a, 1122b) by dividing the upper second encoding unit (1120a) in a vertical direction, and determine a square-shaped third encoding unit (1124a, 1124b) by dividing the lower second encoding unit (1120b) in a vertical direction. Furthermore, the video decoding device (100) may determine a square-shaped third encoding unit (1126a, 1126b, 1126a, 1126b) by dividing both the upper second encoding unit (1120a) and the lower second encoding unit (1120b) in a vertical direction. In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).
[0204] FIG. 12 illustrates that, according to one embodiment, the processing order between a plurality of encoding units may vary depending on the division process of the encoding unit.
[0205] According to one embodiment, the image decoding device (100) may divide a first encoding unit (1200) based on division shape mode information. When the block shape is square and the division shape mode information indicates that the first encoding unit (1200) is divided in at least one of the horizontal direction and the vertical direction, the image decoding device (100) may divide the first encoding unit (1200) to determine a second encoding unit (e.g., 1210a, 1210b, 1220a, 1220b, etc.). Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) in a non-square shape determined by dividing the first encoding unit (1200) only in the horizontal direction or the vertical direction may be divided independently based on the division shape mode information for each. For example, the video decoding device (100) can determine the third encoding unit (1216a, 1216b, 1216c, 1216d) by dividing the second encoding unit (1210a, 1210b) generated by dividing the first encoding unit (1200) in the vertical direction, and can determine the third encoding unit (1226a, 1226b, 1226c, 1226d) by dividing the second encoding unit (1220a, 1220b) generated by dividing the first encoding unit (1200) in the horizontal direction, respectively, in the horizontal direction. Since the process of dividing these second encoding units (1210a, 1210b, 1220a, 1220b) has been described in detail in relation to FIG. 11, a detailed explanation will be omitted.
[0206] According to one embodiment, the image decoding device (100) can process encoding units in a predetermined order. Since the characteristics of processing encoding units in a predetermined order have been described in detail in relation to FIG. 7, a detailed explanation will be omitted. Referring to FIG. 12, the image decoding device (100) can divide a square-shaped first encoding unit (1200) to determine four square-shaped third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d). According to one embodiment, the image decoding device (100) can determine the processing order of the third encoding unit (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) according to the form in which the first encoding unit (1200) is divided.
[0207] According to one embodiment, the image decoding device (100) can determine the third encoding unit (1216a, 1216b, 1216c, 1216d) by dividing the second encoding unit (1210a, 1210b) generated by dividing in the vertical direction into the horizontal direction, and the image decoding device (100) can process the third encoding unit (1216a, 1216b, 1216c, 1216d) according to the order (1217) of first processing the third encoding unit (1216a, 1216c) included in the left second encoding unit (1210a) in the vertical direction, and then processing the third encoding unit (1216b, 1216d) included in the right second encoding unit (1210b) in the vertical direction.
[0208] According to one embodiment, the image decoding device (100) can determine the third encoding unit (1226a, 1226b, 1226c, 1226d) by dividing the second encoding unit (1220a, 1220b) generated by dividing in the horizontal direction into the vertical direction, and the image decoding device (100) can process the third encoding unit (1226a, 1226b, 1226c, 1226d) according to the order (1227) of first processing the third encoding unit (1226a, 1226b) included in the upper second encoding unit (1220a) in the horizontal direction, and then processing the third encoding unit (1226c, 1226d) included in the lower second encoding unit (1220b) in the horizontal direction.
[0209] Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) are each divided to determine the square-shaped third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d). The second encoding unit (1210a, 1210b) determined by dividing in the vertical direction and the second encoding unit (1220a, 1220b) determined by dividing in the horizontal direction are divided into different forms, but according to the third encoding unit (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) determined thereafter, the result is that the first encoding unit (1200) is divided into encoding units of the same form. Accordingly, the image decoding device (100) recursively divides the encoding unit through different processes based on the division form mode information, so that even if the encoding units of the same form are determined as a result, the multiple encoding units determined in the same form can be processed in different orders.
[0210] FIG. 13 illustrates a process in which, according to one embodiment, a encoding unit is recursively divided to determine a plurality of encoding units, and the depth of the encoding unit is determined as the shape and size of the encoding unit change.
[0211] According to one embodiment, the image decoding device (100) may determine the depth of the encoding unit according to a predetermined standard. For example, the predetermined standard may be the length of the long side of the encoding unit. The image decoding device (100) may determine that if the length of the long side of the current encoding unit is divided by 2n (n>0) times the length of the long side of the encoding unit before division, the depth of the current encoding unit is increased by n compared to the depth of the encoding unit before division. In the following, the encoding unit with increased depth is expressed as a lower depth encoding unit.
[0212] Referring to FIG. 13, according to one embodiment, based on block shape information indicating that it is a square shape (for example, the block shape information may indicate '0: SQUARE'), an image decoding device (100) can determine a second encoding unit (1302), a third encoding unit (1304), etc. of a lower depth by dividing a first encoding unit (1300) that is square in shape. If the size of the first encoding unit (1300) that is square in shape is 2Nx2N, the second encoding unit (1302), which is determined by dividing the width and height of the first encoding unit (1300) by half, may have a size of NxN. Furthermore, the third encoding unit (1304), which is determined by dividing the width and height of the second encoding unit (1302) by half, may have a size of N / 2xN / 2. In this case, the width and height of the third encoding unit (1304) correspond to 1 / 4 times the width and height of the first encoding unit (1300). When the depth of the first encoding unit (1300) is D, the depth of the second encoding unit (1302), which is 1 / 2 times the width and height of the first encoding unit (1300), may be D+1, and the depth of the third encoding unit (1304), which is 1 / 4 times the width and height of the first encoding unit (1300), may be D+2.
[0213] According to one embodiment, based on block shape information representing a non-square shape (for example, the block shape information may represent '1: NS_VER' indicating that the height is longer than the width, or '2: NS_HOR' indicating that the width is longer than the height), the image decoding device (100) may divide a first encoding unit (1310 or 1320) that is a non-square shape to determine a second encoding unit (1312 or 1322), a third encoding unit (1314 or 1324), etc. of a lower depth.
[0214] The image decoding device (100) can determine a second encoding unit (e.g., 1302, 1312, 1322, etc.) by dividing at least one of the width and height of a first encoding unit (1310) of size Nx2N. That is, the image decoding device (100) can determine a second encoding unit (1302) of size NxN or a second encoding unit (1322) of size NxN / 2 by dividing the first encoding unit (1310) in a horizontal direction, and can also determine a second encoding unit (1312) of size N / 2xN by dividing it in a horizontal direction and a vertical direction.
[0215] According to one embodiment, the image decoding device (100) may determine a second encoding unit (e.g., 1302, 1312, 1322, etc.) by dividing at least one of the width and height of a first encoding unit (1320) of size 2NxN. That is, the image decoding device (100) may determine a second encoding unit (1302) of size NxN or a second encoding unit (1312) of size N / 2xN by dividing the first encoding unit (1320) in the vertical direction, and may determine a second encoding unit (1322) of size NxN / 2 by dividing it in the horizontal and vertical directions.
[0216] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by dividing at least one of the width and height of a second encoding unit (1302) of size NxN. That is, the image decoding device (100) may determine a third encoding unit (1304) of size N / 2xN / 2 by dividing the second encoding unit (1302) in a vertical direction and a horizontal direction, or determine a third encoding unit (1314) of size N / 4xN / 2, or determine a third encoding unit (1324) of size N / 2xN / 4.
[0217] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by dividing at least one of the width and height of a second encoding unit (1312) of size N / 2xN. That is, the image decoding device (100) may determine a third encoding unit (1304) of size N / 2xN / 2 or a third encoding unit (1324) of size N / 2xN / 4 by dividing the second encoding unit (1312) in a horizontal direction, or determine a third encoding unit (1314) of size N / 4xN / 2 by dividing it in a vertical direction and a horizontal direction.
[0218] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by dividing at least one of the width and height of a second encoding unit (1322) of size NxN / 2. That is, the image decoding device (100) may determine a third encoding unit (1304) of size N / 2xN / 2 or a third encoding unit (1314) of size N / 4xN / 2 by dividing the second encoding unit (1322) in the vertical direction, or determine a third encoding unit (1324) of size N / 2xN / 4 by dividing it in the vertical and horizontal directions.
[0219] According to one embodiment, the image decoding device (100) may divide square-shaped encoding units (e.g., 1300, 1302, 1304) in a horizontal or vertical direction. For example, a first encoding unit (1300) of size 2Nx2N may be divided in a vertical direction to determine a first encoding unit (1310) of size Nx2N, or divided in a horizontal direction to determine a first encoding unit (1320) of size 2NxN. According to one embodiment, when the depth is determined based on the length of the longest side of the encoding unit, the depth of the encoding unit determined by dividing the first encoding unit (1300) of size 2Nx2N in a horizontal or vertical direction may be the same as the depth of the first encoding unit (1300).
[0220] According to one embodiment, the width and height of the third encoding unit (1314 or 1324) may correspond to 1 / 4 times the width and height of the first encoding unit (1310 or 1320). If the depth of the first encoding unit (1310 or 1320) is D, the depth of the second encoding unit (1312 or 1322), which is 1 / 2 times the width and height of the first encoding unit (1310 or 1320), may be D+1, and the depth of the third encoding unit (1314 or 1324), which is 1 / 4 times the width and height of the first encoding unit (1310 or 1320), may be D+2.
[0221] FIG. 14 illustrates a depth and part index (hereinafter PID) for distinguishing between coding units that can be determined according to the shape and size of the coding units according to one embodiment.
[0222] According to one embodiment, the image decoding device (100) can determine various shapes of second encoding units by dividing a square-shaped first encoding unit (1400). Referring to FIG. 14, the image decoding device (100) can determine second encoding units (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) by dividing the first encoding unit (1400) in at least one of a vertical direction and a horizontal direction according to the division shape mode information. That is, the image decoding device (100) can determine the second encoding unit (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) based on the segmented form mode information for the first encoding unit (1400).
[0223] According to one embodiment, the depth of the second encoding unit (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d), which is determined according to the segmented shape mode information for the first encoding unit (1400) in a square shape, can be determined based on the length of the long side. For example, since the length of one side of the first encoding unit (1400) in a square shape and the length of the long side of the second encoding unit (1402a, 1402b, 1404a, 1404b) in a non-square shape are the same, the depth of the first encoding unit (1400) and the second encoding unit (1402a, 1402b, 1404a, 1404b) in a non-square shape can be considered to be the same as D. In contrast, when the video decoding device (100) divides the first encoding unit (1400) into four square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) based on the division shape mode information, since the length of one side of the square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) is half the length of one side of the first encoding unit (1400), the depth of the second encoding units (1406a, 1406b, 1406c, 1406d) may be a depth of D+1, which is one depth lower than the depth D of the first encoding unit (1400).
[0224] According to one embodiment, the image decoding device (100) may divide a first encoding unit (1410), in which the height is longer than the width, into a plurality of second encoding units (1412a, 1412b, 1414a, 1414b, 1414c) by dividing it in a horizontal direction according to the division shape mode information. According to one embodiment, the image decoding device (100) may divide a first encoding unit (1420), in which the width is longer than the height, into a plurality of second encoding units (1422a, 1422b, 1424a, 1424b, 1424c) by dividing it in a vertical direction according to the division shape mode information.
[0225] According to one embodiment, a second encoding unit (1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, 1424c) determined according to the segmented shape mode information for a first encoding unit (1410 or 1420) of a non-square shape may have its depth determined based on the length of the longer side. For example, since the length of one side of the square-shaped second encoding unit (1412a, 1412b) is half the length of one side of the non-square-shaped first encoding unit (1410) in which the height is longer than the width, the depth of the square-shaped second encoding unit (1412a, 1412b) is D+1, which is one depth lower than the depth D of the non-square-shaped first encoding unit (1410).
[0226] Furthermore, the image decoding device (100) may divide a first encoding unit (1410) in a non-square shape into an odd number of second encoding units (1414a, 1414b, 1414c) based on the division shape mode information. The odd number of second encoding units (1414a, 1414b, 1414c) may include a second encoding unit (1414a, 1414c) in a non-square shape and a second encoding unit (1414b) in a square shape. In this case, since the length of the longer side of the non-square second encoding unit (1414a, 1414c) and the length of one side of the square second encoding unit (1414b) are half the length of one side of the first encoding unit (1410), the depth of the second encoding unit (1414a, 1414b, 1414c) may be a depth of D+1, which is one depth lower than the depth D of the first encoding unit (1410). The image decoding device (100) may determine the depth of the encoding units associated with the non-square first encoding unit (1420), in a manner corresponding to the above method of determining the depth of the encoding units associated with the first encoding unit (1410).
[0227] According to one embodiment, when determining an index (PID) for distinguishing divided encoding units, the video decoding device (100) may determine the index based on the size ratio between the encoding units when the odd number of divided encoding units are not of the same size. Referring to FIG. 14, the encoding unit (1414b) located in the middle among the odd number of divided encoding units (1414a, 1414b, 1414c) may have the same width as the other encoding units (1414a, 1414c) but may have twice the height of the other encoding units (1414a, 1414c). That is, in this case, the encoding unit (1414b) located in the middle may include two of the other encoding units (1414a, 1414c). Accordingly, if the index (PID) of the encoding unit (1414b) located in the middle according to the scan order is 1, the encoding unit (1414c) located in the next order may have an index of 3, which is an increase of 2. That is, there may be a discontinuity in the index values. According to one embodiment, the image decoding device (100) may determine whether the encoding units divided into an odd number are not of the same size based on whether there is a discontinuity in the index for distinguishing between these divided encoding units.
[0228] According to one embodiment, the image decoding device (100) may determine whether a plurality of encoding units determined by dividing from the current encoding unit are divided into a specific division form based on the value of an index for distinguishing the plurality of encoding units. Referring to FIG. 14, the image decoding device (100) may divide a first encoding unit (1410) in the shape of a rectangle whose height is greater than its width to determine an even number of encoding units (1412a, 1412b) or an odd number of encoding units (1414a, 1414b, 1414c). The image decoding device (100) may use an index (PID) representing each encoding unit to distinguish each of the plurality of encoding units. According to one embodiment, the PID may be obtained from a sample at a predetermined position of each encoding unit (e.g., the upper left sample).
[0229] According to one embodiment, the image decoding device (100) can determine a coding unit at a predetermined position among the coding units determined by division using an index for distinguishing the coding units. According to one embodiment, if the division shape mode information for a first coding unit (1410) in the form of a rectangle whose height is longer than its width indicates that it is divided into three coding units, the image decoding device (100) can divide the first coding unit (1410) into three coding units (1414a, 1414b, 1414c). The image decoding device (100) can assign an index to each of the three coding units (1414a, 1414b, 1414c). The image decoding device (100) can compare the indices for each coding unit to determine the middle coding unit among the odd number of divided coding units. The image decoding device (100) may determine a encoding unit (1414b) having an index corresponding to the middle value among the indices based on the indices of the encoding units, as the encoding unit at the middle position among the encoding units determined by dividing the first encoding unit (1410). According to one embodiment, when determining an index for distinguishing the divided encoding units, the image decoding device (100) may determine the index based on the size ratio between the encoding units if the encoding units are not of the same size. Referring to FIG. 14, the encoding unit (1414b) generated by dividing the first encoding unit (1410) may have the same width as the other encoding units (1414a, 1414c) but may have a height twice that of the other encoding units (1414a, 1414c). In this case, if the index (PID) of the encoding unit (1414b) located in the middle is 1, the encoding unit (1414c) located in the next order may have an index of 3, which is increased by 2.In cases where the index increases uniformly but the rate of increase changes, such as in this case, the image decoding device (100) may determine that the current encoding unit is divided into a plurality of encoding units, including encoding units having different sizes from other encoding units. In one embodiment, if the division type mode information indicates that the current encoding unit is divided into an odd number of encoding units, the image decoding device (100) may divide the current encoding unit in such a way that the encoding unit at a predetermined position among the odd number of encoding units (e.g., the middle encoding unit) has a different size from other encoding units. In this case, the image decoding device (100) may determine the middle encoding unit having a different size by using an index (PID) for the encoding unit. However, the aforementioned index, the size or position of the encoding unit at a predetermined position to be determined, is specific for the purpose of explaining one embodiment and should not be interpreted as being limited thereto, and should be interpreted as allowing various indices, positions, and sizes of encoding units to be used.
[0230] According to one embodiment, the image decoding device (100) may use a predetermined data unit in which recursive division of the encoding unit begins.
[0231] FIG. 15 illustrates that a plurality of encoding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment.
[0232] According to one embodiment, a predetermined data unit may be defined as a data unit in which the encoding unit begins to recursively divide using the division form mode information. That is, it may correspond to the highest depth encoding unit used in the process of determining multiple encoding units that divide the current picture. For convenience of explanation, such a predetermined data unit will be referred to as a reference data unit below.
[0233] According to one embodiment, the reference data unit may have a predetermined size and shape. According to one embodiment, the reference encoding unit may include MxN samples. Here, M and N may be the same and may be integers expressed as powers of 2. That is, the reference data unit may have a square or non-square shape and may subsequently be divided into an integer number of encoding units.
[0234] According to one embodiment, the image decoding device (100) can divide the current picture into a plurality of reference data units. According to one embodiment, the image decoding device (100) can divide the current picture into a plurality of reference data units using division form mode information for each reference data unit. This division process of reference data units may correspond to a division process using a quad-tree structure.
[0235] According to one embodiment, the image decoding device (100) can predetermine the minimum size that a reference data unit included in the current picture may have. Accordingly, the image decoding device (100) can determine reference data units of various sizes having a size greater than or equal to the minimum size, and can determine at least one encoding unit using segmentation form mode information based on the determined reference data unit.
[0236] Referring to FIG. 15, the image decoding device (100) may use a square-shaped reference encoding unit (1500) or a non-square-shaped reference encoding unit (1502). According to one embodiment, the shape and size of the reference encoding unit may be determined according to various data units (e.g., sequence, picture, slice, slice segment, maximum encoding unit, etc.) that may include at least one reference encoding unit.
[0237] According to one embodiment, a receiving unit (not shown) of an image decoding device (100) may obtain at least one of information regarding the shape of a reference encoding unit and information regarding the size of a reference encoding unit from a bitstream for each of the various data units. The process of determining at least one encoding unit included in a square-shaped reference encoding unit (1500) has been described in detail through the process of dividing the current encoding unit (300) of FIG. 3, and the process of determining at least one encoding unit included in a non-square-shaped reference encoding unit (1502) has been described in detail through the process of dividing the current encoding unit (400 or 450) of FIG. 4, so a detailed explanation is omitted.
[0238] According to one embodiment, an image decoding device (100) may use an index to identify the size and shape of a reference encoding unit in order to determine the size and shape of a reference encoding unit according to a portion of data units that are predetermined based on a predetermined condition. That is, a receiver (not shown) may obtain only an index for identifying the size and shape of a reference encoding unit for each slice, slice segment, maximum encoding unit, etc., among the various data units (e.g., sequence, picture, slice, slice segment, maximum encoding unit, etc.) from the bitstream, as a data unit that satisfies a predetermined condition (e.g., a data unit having a size smaller than or equal to a slice). By using the index, the image decoding device (100) can determine the size and shape of a reference data unit for each data unit that satisfies the predetermined condition. When information regarding the form of the reference encoding unit and information regarding the size of the reference encoding unit are obtained from the bitstream for each data unit of a relatively small size and used, the utilization efficiency of the bitstream may be poor; therefore, instead of directly obtaining information regarding the form of the reference encoding unit and information regarding the size of the reference encoding unit, only the index may be obtained and used. In this case, at least one of the size and form of the reference encoding unit corresponding to the index representing the size and form of the reference encoding unit may be predetermined. That is, the image decoding device (100) can determine at least one of the size and form of the reference encoding unit included in the data unit that serves as the basis for obtaining the index by selecting at least one of the predetermined size and form of the reference encoding unit according to the index.
[0239] According to one embodiment, the image decoding device (100) may utilize at least one reference encoding unit included in one maximum encoding unit. That is, the maximum encoding unit that divides the image may include at least one reference encoding unit, and the encoding unit may be determined through a recursive division process of each reference encoding unit. According to one embodiment, at least one of the width and height of the maximum encoding unit may correspond to an integer multiple of at least one of the width and height of the reference encoding unit. According to one embodiment, the size of the reference encoding unit may be the size obtained by dividing the maximum encoding unit n times according to a quad tree structure. That is, the image decoding device (100) may determine the reference encoding unit by dividing the maximum encoding unit n times according to a quad tree structure, and according to various embodiments, the reference encoding unit may be divided based on at least one of block form information and division form mode information.
[0240] FIG. 16 illustrates a processing block that serves as a criterion for determining the order of determination of reference encoding units included in a picture (1600) according to one embodiment.
[0241] According to one embodiment, the image decoding device (100) may determine at least one processing block for dividing a picture. A processing block is a data unit that includes at least one reference encoding unit for dividing an image, and the at least one reference encoding unit included in the processing block may be determined in a specific order. That is, the determination order of at least one reference encoding unit determined in each processing block may correspond to one of the various types of order in which the reference encoding unit may be determined, and the determination order of the reference encoding unit determined in each processing block may differ from one processing block to another. The determination order of the reference encoding unit determined in each processing block may be one of various orders such as raster scan, Z-scan, N-scan, up-right diagonal scan, horizontal scan, and vertical scan, but the order that can be determined should not be interpreted as being limited to the above scan orders.
[0242] According to one embodiment, the image decoding device (100) may determine the size of at least one processing block included in the image by obtaining information about the size of a processing block. The image decoding device (100) may determine the size of at least one processing block included in the image by obtaining information about the size of a processing block from a bitstream. The size of such a processing block may be a predetermined size of a data unit indicated by the information about the size of the processing block.
[0243] According to one embodiment, a receiving unit (not shown) of an image decoding device (100) can obtain information regarding the size of a processing block from a bitstream for each specific data unit. For example, information regarding the size of a processing block can be obtained from the bitstream in data units such as an image, sequence, picture, slice, or slice segment. That is, the receiving unit (not shown) can obtain information regarding the size of a processing block from the bitstream for each of the various data units, and the image decoding device (100) can determine the size of at least one processing block for dividing a picture using the obtained information regarding the size of the processing block, and the size of such a processing block may be an integer multiple of a reference coding unit.
[0244] According to one embodiment, the image decoding device (100) can determine the size of the processing blocks (1602, 1612) included in the picture (1600). For example, the image decoding device (100) can determine the size of the processing blocks based on information about the size of the processing blocks obtained from the bitstream. Referring to FIG. 16, according to one embodiment, the image decoding device (100) can determine the width of the processing blocks (1602, 1612) to be four times the width of the reference encoding unit and the height to be four times the height of the reference encoding unit. The image decoding device (100) can determine the order in which at least one reference encoding unit is determined within at least one processing block.
[0245] According to one embodiment, the image decoding device (100) can determine each processing block (1602, 1612) included in the picture (1600) based on the size of the processing block, and can determine the order of determination of at least one reference encoding unit included in the processing block (1602, 1612). According to one embodiment, the determination of the reference encoding unit may include the determination of the size of the reference encoding unit.
[0246] According to one embodiment, the image decoding device (100) can obtain information regarding the determination order of at least one reference encoding unit included in at least one processing block from a bitstream, and can determine the order in which at least one reference encoding unit is determined based on the information regarding the determination order obtained. The information regarding the determination order may be defined as the order or direction in which reference encoding units are determined within the processing block. That is, the order in which reference encoding units are determined may be determined independently for each processing block.
[0247] According to one embodiment, the image decoding device (100) can obtain information regarding the determination order of reference encoding units for each specific data unit from a bitstream. For example, a receiver (not shown) can obtain information regarding the determination order of reference encoding units from a bitstream for each data unit such as an image, sequence, picture, slice, slice segment, processing block, etc. Since the information regarding the determination order of reference encoding units indicates the determination order of reference encoding units within a processing block, the information regarding the determination order can be obtained for each specific data unit containing an integer number of processing blocks.
[0248] The image decoding device (100) can determine at least one reference encoding unit based on the order determined according to one embodiment.
[0249] According to one embodiment, a receiver (not shown) may obtain information regarding the order of determining reference encoding units as information related to processing blocks (1602, 1612) from a bitstream, and an image decoder (100) may determine the order of determining at least one reference encoding unit included in the processing blocks (1602, 1612) and determine at least one reference encoding unit included in the picture (1600) according to the order of determining the encoding units. Referring to FIG. 16, the image decoder (100) may determine the order of determining at least one reference encoding unit (1604, 1614) related to each processing block (1602, 1612). For example, if information regarding the order of determining reference encoding units is obtained for each processing block, the order of determining reference encoding units related to each processing block (1602, 1612) may differ for each processing block. If the reference encoding unit determination order (1604) associated with the processing block (1602) is the raster scan order, the reference encoding unit included in the processing block (1602) may be determined according to the raster scan order. Conversely, if the reference encoding unit determination order (1614) associated with another processing block (1612) is the reverse order of the raster scan order, the reference encoding unit included in the processing block (1612) may be determined according to the reverse order of the raster scan order.
[0250] According to one embodiment, the image decoding device (100) can decode at least one reference encoding unit determined. The image decoding device (100) can decode an image based on the reference encoding unit determined through the above-described embodiment. The method of decoding the reference encoding unit may include various methods for decoding an image.
[0251] According to one embodiment, the image decoding device (100) may obtain and use block form information indicating the form of the current encoding unit or division form mode information indicating a method of dividing the current encoding unit from a bitstream. The division form mode information may be included in a bitstream associated with various data units. For example, the image decoding device (100) may use the division form mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header. Furthermore, the image decoding device (100) may obtain and use syntax elements corresponding to the block form information or division form mode information from the bitstream for each maximum encoding unit, reference encoding unit, and processing block.
[0252] A method for determining a division rule according to one embodiment of the present disclosure will be described in detail below.
[0253] The image decoding device (100) can determine the segmentation rule of the image. The segmentation rule may be predetermined between the image decoding device (100) and the image encoding device (150). The image decoding device (100) can determine the segmentation rule of the image based on information obtained from a bitstream. The image decoding device (100) can determine the segmentation rule based on information obtained from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header. The image decoding device (100) can determine the segmentation rule differently depending on the frame, slice, temporal layer, maximum encoding unit, or encoding unit.
[0254] The image decoding device (100) can determine a partitioning rule based on the block shape of the encoding unit. The block shape may include the size, shape, ratio of width and height, and orientation of the encoding unit. The image encoding device (150) and the image decoding device (100) may predetermine to determine a partitioning rule based on the block shape of the encoding unit. However, they are not limited thereto. The image decoding device (100) can determine a partitioning rule based on information obtained from a bitstream received from the image encoding device (150).
[0255] The shape of the encoding unit may include square and non-square. When the width and height of the encoding unit are the same, the image decoder (100) may determine the shape of the encoding unit as square. Additionally, when the width and height of the encoding unit are not the same, the image decoder (100) may determine the shape of the encoding unit as non-square.
[0256] The size of the encoding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256. The size of the encoding unit may be classified according to the length of the long side, the length of the short side, or the width of the encoding unit. The image decoder (100) may apply the same partitioning rule to encoding units classified into the same group. For example, the image decoder (100) may classify encoding units having the same long side length into the same size. Additionally, the image decoder (100) may apply the same partitioning rule to encoding units having the same long side length.
[0257] The ratio of width to height of a encoding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, or 16:1, etc. Additionally, the direction of the encoding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the width of the encoding unit is longer than the height. The vertical direction may indicate a case where the width of the encoding unit is shorter than the height.
[0258] The image decoder (100) can adaptively determine a splitting rule based on the size of the encoding unit. The image decoder (100) can determine different acceptable splitting mode types based on the size of the encoding unit. For example, the image decoder (100) can determine whether splitting is allowed based on the size of the encoding unit. The image decoder (100) can determine the splitting direction according to the size of the encoding unit. The image decoder (100) can determine an acceptable splitting type according to the size of the encoding unit.
[0259] Determining the division rule based on the size of the encoding unit may be a division rule predetermined between the image encoding device (150) and the image decoding device (100). Additionally, the image decoding device (100) may determine the division rule based on information obtained from the bitstream.
[0260] The image decoder (100) can adaptively determine a partitioning rule based on the position of the encoding unit. The image decoder (100) can adaptively determine a partitioning rule based on the position occupied by the encoding unit in the image.
[0261] Additionally, the video decoding device (100) can determine a splitting rule so that encoding units generated by different splitting paths do not have the same block shape. However, this is not limited thereto, and encoding units generated by different splitting paths may have the same block shape. Encoding units generated by different splitting paths may have different decoding processing orders. Since the decoding processing order has been explained together with FIG. 12, a detailed explanation is omitted.
[0262] With reference to FIGS. 17 to 29 below, an image encoding / decoding method and apparatus for determining a filtering reference sample to be applied and a weight of the filter, and adaptively performing intra prediction based on the filtering reference sample and the weight of the filter, will be described in detail.
[0263] FIG. 17 is a diagram illustrating intra-prediction modes according to one embodiment.
[0264] Referring to FIG. 17, intra prediction modes according to one embodiment may include a planar mode (mode 0) and a DC mode (mode 1). Additionally, the intra prediction modes may include angular modes (modes 2 through 66) having a prediction direction. The angular modes may include a diagonal mode (mode 2 or mode 66), a horizontal mode (mode 18), and a vertical mode (mode 50).
[0265] Although intra prediction modes according to one embodiment have been described above with reference to FIG. 17, they are not limited thereto. It is easy for those skilled in the art to understand that various forms of intra prediction modes may be provided by adding new intra prediction modes or subtracting existing intra prediction modes, and that the mode numbers of each intra prediction mode may vary depending on the case.
[0266] FIG. 18 is a diagram illustrating a method for an image decoding device to generate a reconstructed sample using original reference samples, according to one embodiment of the present disclosure.
[0267] Referring to FIG. 18, the image decoding device (100) can generate reconstructed samples (1820) using original reference samples (1810) to perform intra prediction for the current block (1800).
[0268] For example, the image decoding device (100) can generate a reconstructed reference sample (1835) corresponding to the location of the original reference sample using the original reference sample (1830). The image decoding device (100) can generate a reconstructed reference sample (1845) corresponding to the location of the original reference sample (1840) using the original reference sample (1830) and the original reference sample (1840). In a similar manner, the image decoding device (100) can generate a reconstructed reference sample (1855) at a location corresponding to the original reference sample (1850). At this time, the reconstructed reference sample (1855) can be generated using the original reference sample (1850) and the original reference samples located to the left of the reference sample (1850) among the original reference samples (1810). That is, the image decoding device (100) generates a reconstructed reference sample a' based on the following mathematical formula 1. n It can generate.
[0269]
[0270] Here, a' n may refer to a reference sample located n units away from the leftmost reconstructed reference sample among the reconstructed reference samples of the upper adjacent line of the current block. i can refer to a reference sample located i units away from the leftmost original reference sample among the original reference samples of the upper adjacent line of the current block. W i is a i It can refer to the filter weights applied to the sample.
[0271] A reconstructed reference sample can be generated by performing filtering on at least one original reference sample as described above.
[0272] With reference to FIG. 18, an example of how a reconstructed reference sample is generated has been described, but is not limited thereto, and a reconstructed reference sample can be generated by performing filtering using a filter with the same weight and number of filter taps. For example, a reconstructed reference sample can be generated by performing filtering using a [1, 4] filter.
[0273] Alternatively, the image decoder (100) may generate a reconstructed reference sample by adaptively determining the weights and number of filter taps of the filter according to the location of the original reference sample or the intra-prediction mode of the current block, and by performing filtering based on the weights and number of filter taps of the filter. Alternatively, the reconstructed reference sample may generate a reconstructed reference sample by adaptively determining the weights and number of filter taps of the filter according to the size of the current block, and by performing filtering based on the weights and number of filter taps of the filter.
[0274] FIGS. 19a and 19b are drawings for illustrating a method, according to one embodiment of the present disclosure, in which an image decoding device (100) generates a reconstructed sample using original reference samples according to the prediction direction of the intra prediction mode of the current block.
[0275] Referring to FIGS. 19a and 19b, when the direction of the intra prediction mode of the current block is the prediction direction (1905), the image decoder (100) can determine the original reference samples (1925) of the upper adjacent line to be filtered in order to generate the reconstructed reference samples (1920) of the upper adjacent line based on the x-axis direction (1930) of the prediction direction (1905). For example, when the direction of the intra prediction mode of the current block is the prediction direction (1905), the image decoder (100) can determine the reconstructed sample a' according to Equation 2 as follows. j It can generate.
[0276]
[0277] Here, a'j may refer to a reference sample located j units away from the leftmost reconstructed reference sample among the reconstructed reference samples of the upper adjacent line of the current block. i can refer to a source reference sample located i units away from the leftmost source reference sample among the source reference samples of the upper adjacent line of the current block. W i is a i It can refer to the filter weights applied to the sample.
[0278] When the direction of the intra prediction mode of the current block is the prediction direction (1910), the image decoder (100) can determine the original reference samples (1925) of the upper adjacent line to be filtered in order to generate the reconstructed reference samples (1920) of the upper adjacent line based on the x-axis direction (1935) of the prediction direction (1910). When the direction of the intra prediction mode of the current block is the prediction direction (1910), the image decoder (100) can determine the reconstructed sample a' according to Equation 3 as follows. j It can generate.
[0279]
[0280] Here, a' j may refer to an original reference sample located j away from the leftmost reconstructed reference sample among the reconstructed reference samples of the upper adjacent line of the current block. i can mean an original reference sample located i units away from the leftmost original reference sample among the original reference samples of the upper adjacent line of the current block, and N can mean the distance of the sample furthest away from the leftmost reconstructed reference sample.
[0281] When the direction of the intra prediction mode of the current block is the prediction direction (1915), the image decoder (100) can determine the original reference samples (1925) of the upper adjacent line to be filtered in order to generate the reconstructed reference samples (1920) of the upper adjacent line based on the x-axis direction (1935) of the prediction direction (1915). When the direction of the intra prediction mode of the current block is the prediction direction (1915), the image decoder (100) can determine the reconstructed sample a' according to Equation 4 as follows. j It can generate.
[0282]
[0283] Here, a' j may refer to an original reference sample located j away from the leftmost reconstructed reference sample among the reconstructed reference samples of the upper adjacent line of the current block. i can mean an original reference sample located i units away from the leftmost original reference sample among the original reference samples of the upper adjacent line of the current block, and N can mean the distance of the sample furthest away from the leftmost reconstructed reference sample.
[0284] The image decoding device (100) can generate reconstruction reference samples of the left adjacent line in a manner similar to generating reconstruction reference samples of the upper adjacent line.
[0285] When the direction of the intra prediction mode of the current block is the prediction direction (1905), the video decoding device (100) can determine the original reference samples (1945) of the left adjacent line to be filtered to generate the reconstructed reference samples (1940) of the left adjacent line based on the y-axis direction (1950) of the prediction direction (1905).
[0286] When the direction of the intra prediction mode of the current block is the prediction direction (1910), the image decoding device (100) can determine the original reference samples (1945) of the left adjacent line to be filtered to generate the reconstruction reference samples (1940) of the left adjacent line based on the y-axis direction (1950) of the prediction direction (1910).
[0287] When the direction of the intra-prediction mode of the current block is the prediction direction (1915), the image decoding device (100) can determine the original reference samples (1945) of the left adjacent line to be filtered to generate the reconstruction reference samples (1940) of the left adjacent line based on the y-axis direction (1955) of the prediction direction (1915).
[0288] FIG. 20 is a diagram illustrating a method for an image decoding device to generate a reconstructed sample using original reference samples, according to one embodiment of the present disclosure.
[0289] Referring to FIG. 20, the image decoder (100) performs an intra prediction for the current block (2000) using original reference samples a0,..., a N Samples reconstructed using a'0,..., a' N It can generate.
[0290] When the prediction direction of the intra-prediction mode of the current block (2000) is a direction from left to right (i.e., the prediction direction is located in the first quadrant in FIG. 19a), the image decoder (100) can generate a reconstructed reference sample (2015) corresponding to the location of the original reference sample using the original reference sample (2010). The image decoder (100) can generate a reconstructed reference sample (2025) corresponding to the location of the original reference sample (2020) using the original reference sample (2010) and the original reference sample (2020). In a similar manner, the image decoder (100) can generate a reconstructed reference sample (2035) corresponding to the location of the original reference sample (2030). At this time, a reconstructed reference sample (2035) can be generated using the original reference sample (2030) and the original reference sample (2031) immediately adjacent to the left among the original reference samples. That is, the image decoding device (100) generates a reconstructed reference sample a' based on the following mathematical formula 5. j It can generate.
[0291]
[0292] Here, a' j can mean a reconstructed reference sample located j away from the leftmost reconstructed reference sample among the reconstructed reference samples of the upper adjacent line of the current block, and a j or a j-1 can mean a source reference sample located j or j-1 away from the leftmost source reference sample among the source reference samples of the upper adjacent line of the current block.
[0293] When the prediction direction of the intra-prediction mode of the current block (2000) is a direction from right to left (i.e., the prediction direction is a direction located in the second or third quadrant in FIG. 19a), the image decoder (100) can generate a reconstructed reference sample (2045) corresponding to the location of the original reference sample using the original reference sample (2040). The image decoder (100) can generate a reconstructed reference sample (2055) corresponding to the location of the original reference sample (2050) using the original reference sample (2040) and the original reference sample (2050). In a similar manner, the image decoder (100) can generate a reconstructed reference sample (2035) corresponding to the location of the original reference sample (2030). At this time, a reconstructed reference sample (2035) can be generated using the original reference sample (2030) and the original reference sample (2032) immediately adjacent to the right among the original reference samples. That is, the image decoding device (100) can generate a reconstructed reference sample a'j based on the following mathematical formula 6.
[0294]
[0295] Here, a' j can mean a reconstructed reference sample located j away from the leftmost reconstructed reference sample among the reconstructed reference samples of the upper adjacent line of the current block, and a j or a j+1 can mean a source reference sample located j or j+1 away from the leftmost source reference sample among the source reference samples of the upper adjacent line of the current block.
[0296] The image decoder (100) can generate reconstruction reference samples of the left adjacent line in a manner similar to generating reconstruction reference samples of the upper adjacent line. The image decoder (100) can generate reconstruction reference samples of the left adjacent line in a manner similar to generating reconstruction reference samples of the upper adjacent line when the y-axis direction of the prediction direction of the intra prediction mode of the current block is a direction from bottom to top (i.e., the prediction direction is located in the first quadrant or the second quadrant in FIG. 19a) and the x-axis direction is a direction from right to left.
[0297] The image decoder (100) can generate reconstruction reference samples of the left adjacent line in a manner similar to generating reconstruction reference samples of the upper adjacent line. The image decoder (100) can generate reconstruction reference samples of the left adjacent line in a manner similar to generating reconstruction reference samples of the upper adjacent line when the y-axis direction of the prediction direction of the intra prediction mode of the current block is a direction from top to bottom (i.e., the prediction direction is located in the third quadrant in FIG. 19a) and the x-axis direction is a direction from left to right.
[0298] If the image decoding device (100) is in a non-directional DC mode, a planar mode, or a vertical mode having only a vertical component and a horizontal mode having a horizontal component, the reconstruction reference sample a' of the left or upper adjacent line is based on the following mathematical formula 7. j It can generate.
[0299]
[0300] Here, a' j can mean a reference sample located j away from the leftmost reconstructed reference sample among the reconstructed reference samples of the upper adjacent line of the current block, and a j-1 , a jor a j+1 can mean a source reference sample located j-1, j, or j+1 away from the leftmost source reference sample among the source reference samples of the upper adjacent line of the current block.
[0301] The image decoding device (100) generates reconstructed samples by performing filtering on the original reference sample, and performs intra prediction for the current block using the reconstructed samples, thereby achieving the effect of performing intra prediction by referencing various reference samples compared to performing intra prediction using the original reference sample.
[0302] FIG. 21 is a diagram illustrating the process of an image decoding device performing intra prediction for a current block using original reference samples and reconstructed samples according to one embodiment of the present disclosure.
[0303] The image decoder (100) can generate a predicted value of the current sample within the current block using original reference samples and reconstructed reference samples. For example, if the intra prediction mode of the current block (2100) is a vertical mode, the image decoder (100) can generate a predicted value of the current sample (2110) using the original reference sample (2121) and the reconstructed reference sample (2131) located above the current sample (2110). For example, the image decoder (100) generates a predicted value p of the current sample based on Equation 9. n It can generate.
[0304]
[0305] Here, p n represents the predicted value of the current sample, and a n represents the original reference sample used for the prediction of the current sample, and a' nrepresents a reconstructed reference sample used for predicting the current sample, and w represents a weight and can have a value between 0 and 1. Also, f can represent a prediction function such as a 4-tap filter. Here, w may be a fixed value, but is not limited thereto, and may have a different value for each sample of the current block, and may be a value based on the distance from the original reference sample or the reconstructed reference sample.
[0306] Above, the image decoding device (100) predicts the value p of the current sample based on mathematical formula 9. n Although the content regarding the generation of the value of at once has been described, it is not limited thereto. The image decoding device (100) first generates an initial prediction value by performing intra prediction using the original reference sample as in the prior art, and then performs filtering using the initial prediction value and the reconstructed reference sample to generate the final prediction value p' of the current sample. n It can generate the value of.
[0307] With reference to FIG. 21, it has been described that the image decoder (100) performs intra prediction for the current block using both original reference samples and reconstructed reference samples, but is not limited thereto and may perform intra prediction for the current block using only original reference samples. Alternatively, the image decoder (100) may perform intra prediction for the current block using only reconstructed samples.
[0308] With reference to FIG. 21, the first intra prediction mode of the current block for determining the original reference sample used for intra prediction among the original reference samples and the second intra prediction mode for determining the reconstructed reference sample used for intra prediction among the reconstructed reference samples are described on the premise that they are identical, but are not limited thereto, and the second intra prediction mode may be determined separately from the first intra prediction mode. For example, an intra prediction mode for the reconstructed reference sample may be determined for each block or for each intra prediction mode of the current block for determining the original reference sample used for intra prediction among the original reference samples. Alternatively, the second intra prediction mode may be determined on a picture-by-picture basis.
[0309] FIG. 22 is a diagram illustrating the process of an image decoder performing a weighted prediction using the original reference sample and the reconstructed reference samples of the left adjacent line and the upper adjacent line.
[0310] The image decoding device (100) determines a source reference sample to be used for intra prediction among source reference prediction samples based on the intra prediction mode of the current block (2200), determines a reconstructed sample of the left adjacent line and a reconstructed sample of the upper adjacent line of the current block (2200) to be used for intra prediction regardless of the intra prediction mode of the current block (2200), and can generate a prediction value for the current sample (2210) by performing a weighted prediction for the current sample (2210) using the source reference sample and the reconstructed reference samples.
[0311] For example, referring to FIG. 22, when the intra prediction mode of the current block is a vertical mode, the image decoder (100) has a source reference sample a located in the vertical direction of the current sample (2210) among the source reference samples (2220) of the upper adjacent line. jIt can determine. The image decoding device (100) has a reconstructed reference sample a' located in the vertical direction of the current sample (2210). j It can determine. In addition, the image decoding device (100) can determine the reconstructed reference sample b' located in the horizontal direction of the current sample (2210). i It can determine. The image decoding device (100) determines the original reference sample a determined above. j and reconstructed reference sample a' j, b' i A predicted value of the current sample (2210) can be generated using [this]. That is, the image decoder (100) generates a predicted value p of the current sample based on the following mathematical formula 10. ij It can generate.
[0312]
[0313] Here, p ij represents the predicted value of the current sample at position (i,j), and a j represents the original reference sample used for the prediction of the current sample, and a' j may refer to a reconstructed reference sample of the upper adjacent line used for the prediction of the current sample, and b' i represents a reconstructed reference sample of the left adjacent line used for the prediction of the current sample. Also, f represents a prediction function such as a 4-tap filter. In this case, w1, w2, and w3 can be determined for each sample and can be determined based on the distance between the original reference sample or the reconstructed reference sample and the current sample.
[0314] With reference to FIG. 22, the process of performing a weighted prediction by an image decoder (100) using a reconstructed reference sample of a left adjacent line located in the horizontal direction of the original reference sample and the current sample, and a reconstructed reference sample of an upper adjacent line located in the vertical direction of the current sample has been described, but is not limited thereto, and a prediction direction for selecting a reconstructed reference sample for the current sample can be determined by considering the gradient change of the reference sample. That is, the image decoder (100) can determine the gradient direction of the reference sample having the same change trend as the gradient value of the reference sample as the prediction direction for selecting a reconstructed reference sample for the current sample.
[0315] FIG. 23 is a diagram illustrating the process of a video decoder performing a weighted prediction using the predicted value generated by performing intra prediction using the original reference sample and the reconstructed reference samples of the left adjacent line and the upper adjacent line.
[0316] The image decoder (100) can generate an intermediate prediction value for the current sample within the current block by performing an intra prediction based on the original reference prediction sample based on the intra prediction mode of the current block (2300). The image decoder (100) can determine at least one reference sample among the reconstructed reference samples of the left adjacent line and at least one reference sample among the reconstructed reference samples of the upper adjacent line, regardless of the intra prediction mode of the current block (2300). The image decoder (100) can generate a final prediction value for the current sample within the current block (2300) using the intermediate prediction value for the current sample within the current block (2300), the reconstructed reference sample of the left adjacent line, and the reconstructed reference sample of the upper adjacent line.
[0317] The image decoding device (100) determines the final predicted value p' of the current sample within the current block based on mathematical formula 11. ij It can generate.
[0318]
[0319] At this time, p ij can refer to the median predicted value of the sample located at (i,j) within the current block, generated by performing intra prediction using original reference samples according to the intra prediction mode of . C ij is p ij , a' i and a' j It refers to a matrix containing the filter coefficients applied to. Ca' i [i,j] is a' i It can be a two-dimensional matrix containing filter coefficients applied to Ca' j [i,j] is a' j It can be a two-dimensional matrix containing filter coefficients applied to. Cp ij [i,j] is p ij It can mean a two-dimensional matrix containing filter coefficients applied to.
[0320] For example, referring to FIG. 23, the image decoder is Ca i '[i,j](2310), Ca j [i,j] (2320) and Cp ij A final predicted value of the current sample within the current block (2300) can be generated using [i,j] (2330). However, the filter coefficients disclosed in FIG. 23 are not normalized coefficients, but a person skilled in the art can easily understand that when the image decoding device (100) actually uses the filter coefficients disclosed in FIG. 23, the coefficients generated by performing normalization (i.e., performing an operation corresponding to dividing the filter coefficients by 16) can be finally used.
[0321] That is, the image decoding device (100) determines the final predicted value p' of the current sample based on the following mathematical formula 12. ij can decide.
[0322]
[0323] At this time, p ij can represent the median predicted value of the sample located at (i,j) within the current block, generated by performing intra prediction using original reference samples according to the intra prediction mode of . Ca [i,j] is a' i and a' j It can be a 2D matrix containing filter coefficients applied to. Cp[i,j] is p ij It can mean a two-dimensional matrix containing filter coefficients applied to.
[0324] Meanwhile, with reference to FIG. 23, the process of performing a weighted prediction using the prediction value generated by the image decoding device (100) performing intra prediction using the original reference sample, the reconstructed sample of the left adjacent line located in the horizontal direction of the current sample, and the reconstructed reference sample of the upper adjacent line in the vertical direction of the current sample has been described, but is not limited thereto, and a person skilled in the art can easily understand that a weighted prediction can be performed using the original reference sample of the left adjacent line located in the horizontal direction of the current sample and the original reference sample of the upper adjacent line in the vertical direction of the current sample instead of the reconstructed reference sample.
[0325] FIG. 24 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is one of DC mode, planar mode, or vertical mode.
[0326] Referring to FIG. 24, the image decoder (100) has an intermediate predicted value P(x,y) of the current sample (2405) in the current block (2400) and a sample value R of the left adjacent reference sample (2415) of the current sample (2405). -1,y , sample value R of the upper-left adjacent reference sample (2420) of the current block -1,-1 and sample value R of the upper adjacent reference sample (2410) of the current sample (2405) x,-1 The final predicted value P'(x,y) of the current sample (2405) can be determined using this.
[0327] At this time, the image decoding device (100) can determine the intermediate predicted sample value P(x,y) of the current sample (2405) based on intra prediction according to the conventional intra prediction mode of the current block.
[0328] For example, the image decoding device (100) can determine the final predicted sample value P'(x,y) of the current sample based on the following mathematical formula 13.
[0329]
[0330] At this time, if the intra prediction mode of the current block is one of DC mode, planar mode, horizontal mode, or vertical mode, wT, wL, and wTL can be determined according to the following mathematical formula 14. Here, width and height may represent the width and height of the current block, respectively.
[0331]
[0332] predModeIntra indicates the intra prediction mode of the current block, and INTRA_DC can indicate the DC mode.
[0333] FIG. 25 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is a diagonal mode in the lower-left direction.
[0334] Referring to FIG. 25, the image decoding device (100) has an intermediate predicted value P(x',y') of the current sample (2505) and a sample value R of a sample (2510) located on a line extending in the lower left diagonal direction from the current sample (2505). (-1,y) and sample value R of sample (2515) located on the line opposite to the line facing the lower left diagonal direction from the current sample (2505). (x,-1) The predicted value P(x',y') of the current sample (2505) can be generated using this.
[0335] At this time, the image decoding device (100) can determine the intermediate predicted sample value P(x',y') of the current sample (2505) based on intra prediction according to the conventional intra prediction mode of the current block (diagonal mode in the lower left direction). The diagonal mode in the lower left direction may be mode 2.
[0336] For example, the image decoding device (100) can determine the final predicted sample value P'(x',y') of the current sample based on mathematical formulas 15 and 16 as follows.
[0337]
[0338]
[0339] FIG. 26 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is a diagonal mode in the upper right direction.
[0340] Referring to FIG. 26, the image decoding device (100) has an intermediate predicted value P(x',y') of the current sample (2605) and a sample value R of a sample (2610) located on a line extending in the upper right diagonal direction from the current sample (2605). (x,-1) and sample value R of sample (2615) located opposite the direction of the line facing the upper right diagonal direction from the current sample (2605). (-1,y)The predicted value P'(x',y') of the current sample (2605) can be generated using this.
[0341] At this time, the image decoding device (100) can determine the intermediate predicted sample value P(x',y') of the current sample (2605) based on intra prediction according to the conventional intra prediction mode of the current block (diagonal mode in the upper right direction). The diagonal mode in the upper right direction may be mode 66.
[0342] For example, the image decoding device (100) can determine the final predicted sample value P'(x',y') of the current sample based on mathematical formulas 17 to 18 as follows.
[0343]
[0344]
[0345] FIG. 27 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is an angular mode adjacent to a diagonal mode in the lower-left direction.
[0346] Referring to FIG. 27, the image decoder (100) has an intermediate predicted value P(x',y') of the current sample (2705) in the current block (2700) and a sample value R of the sample (2710) located opposite the direction of the line facing the lower left direction according to the angular mode from the current sample (2705). (x,-1) The predicted value of the current sample (2705) can be generated using this. The angular mode adjacent to the diagonal mode in the lower left direction may be one of the modes 3 to 10.
[0347] At this time, the image decoding device (100) can determine the intermediate predicted sample value P(x',y') of the current sample (2705) based on intra prediction according to the conventional intra prediction mode of the current block (angular mode in the lower left direction).
[0348] For example, the image decoding device (100) can determine the final predicted sample value P'(x',y') of the current sample based on mathematical formulas 19 to 20 as follows.
[0349]
[0350]
[0351] Meanwhile, if coordinate x represents a prime sample location, Rx is based on the sample values of two adjacent integer samples and the distance between coordinate x and the adjacent integer sample. -1 The sample value of can be determined.
[0352] FIG. 28 is a diagram illustrating the process of a video decoder performing position-based intra prediction of a current sample when the intra prediction mode of the current block is an angular mode adjacent to a diagonal mode in the upper right direction.
[0353] Referring to FIG. 28, the image decoder (100) has an intermediate predicted value P(x',y') of the current sample (2805) and a sample value R of a sample (2810) located opposite the direction of the line facing the upper right direction according to the angular mode from the current sample (2805). (-1,y) The predicted value of the current sample (2805) can be generated using this. The angular mode adjacent to the diagonal mode in the upper right direction may be one of the modes 58 to 65.
[0354] At this time, the image decoding device (100) can determine the intermediate predicted sample value P(x',y') of the current sample (2805) based on intra prediction according to the conventional intra prediction mode of the current block (an angular mode in the upper right direction).
[0355] For example, the image decoding device (100) can determine the final predicted sample value P'(x',y') of the current sample based on mathematical formulas 21 to 22 as follows.
[0356]
[0357]
[0358] Meanwhile, if coordinate y represents the location of a prime sample, R is based on the sample values of two adjacent integer samples and the distance between coordinate y and the adjacent integer sample. -1,y The sample value of can be determined.
[0359] With reference to FIGS. 17 to 28, a method and apparatus for determining the weights of a filtering reference sample and a filter to be applied, based on the premise that the current block is a square, and adaptively performing intra prediction based on the weights of the filtering reference sample and the filter, have been described. However, it can be easily understood by those skilled in the art that the image decoding device (100) can similarly determine the weights of a filtering reference sample and a filter to be applied even when the current block is a rectangle, and adaptively perform intra prediction based on the weights of the filtering reference sample and the filter. In this case, when the current block is a rectangle of size WxH (W is width, H is height), the number of samples in the upper adjacent reference line of the current block may be 2W, and the number of samples in the left adjacent reference line may be 2H. However, not limited thereto, when the current block is a rectangle of size WxH (W is width, H is height), the number of reference samples in the upper adjacent reference line of the current block may be W+H, and the number of reference samples in the left adjacent reference line may be W+H.
[0360] FIG. 29 is a diagram illustrating that, according to one embodiment of the present disclosure, the encoding (decoding) order between encoding units is determined in a forward or reverse direction based on an encoding order flag, and a right or upper reference line may be used for intra prediction according to the determined encoding (decoding) order.
[0361] Referring to FIG. 29, the maximum encoding unit (2950) is divided into a plurality of encoding units (2956, 2958, 2960, 2962, 2968, 2970, 2972, 2974, 2980, 2982, 2984, 2986). The maximum encoding unit (2950) corresponds to the top node (2900) of the tree structure. And multiple encoding units (2956, 2958, 2960, 2962, 2968, 2970, 2972, 2974, 2980, 2982, 2984, 2986) each correspond to multiple nodes (2906, 2908, 2910, 2912, 2918, 2920, 2922, 2924, 2930, 2932, 2934, 2936). In the tree structure, the upper encoding order flags (2902, 2914, 2926) indicating the encoding order correspond to the arrows (2952, 2964, 2976), and the upper encoding order flags (2904, 2916, 2928) correspond to the arrows (2954, 2966, 2978).
[0362] The top encoding order flag indicates the encoding order of the top two encoding units among four encoding units of the same depth. If the top encoding order flag is 0, encoding is performed in the forward direction. Conversely, if the top encoding order flag is 1, encoding is performed in the reverse direction.
[0363] Likewise, the bottom encoding order flag indicates the encoding order of the two bottom encoding units among the four encoding units of the same depth. If the bottom encoding order flag is 0, encoding is performed in the forward direction. Conversely, if the bottom encoding order flag is 1, encoding is performed in the reverse direction.
[0364] For example, since the upper encoding order flag (2914) is 0, the encoding order between the encoding units (2968, 2970) is determined in the forward direction from left to right. And since the lower encoding order flag (2916) is 1, the encoding order between the encoding units (2972, 2974) is determined in the reverse direction from right to left.
[0365] According to an embodiment, the upper encoding sequence flag and the lower encoding sequence flag may be set to have the same value. For example, if the upper encoding sequence flag (2902) is determined to be 1, the lower encoding sequence flag (2904) corresponding to the upper encoding sequence flag (2902) may also be determined to be 1. Since the values of the upper encoding sequence flag and the lower encoding sequence flag are determined by 1 bit, the amount of encoding sequence information is reduced.
[0366] According to an embodiment, the upper encoding sequence flag and the lower encoding sequence flag of the current encoding unit may be determined by referring to at least one of the upper encoding sequence flag and the lower encoding sequence flag applied to an encoding unit with a depth lower than that of the current encoding unit. For example, the upper encoding sequence flag (2926) and the lower encoding sequence flag (2928) applied to encoding units (2980, 2982, 2984, 2986) may be determined based on the lower encoding sequence flag (2916) applied to encoding units (2972, 2974). Thus, the upper encoding sequence flag (2926) and the lower encoding sequence flag (2928) may be determined to have the same value as the encoding sequence flag (2916). Since the values of the upper encoding sequence flag and the lower encoding sequence flag are determined from the upper encoding unit of the current encoding unit, encoding sequence information is not obtained from the bitstream. Therefore, the amount of information regarding encoding sequence information is reduced.
[0367] At this time, since the image decoding device (100) has data of samples included in the right adjacent encoding unit (2958) that was decoded earlier than the current encoding unit (2986) and data of samples included in the upper adjacent encoding unit (2980, 2982), it can perform a prediction according to an embodiment of the present disclosure using the data of samples (right reference line) included in the right adjacent encoding unit (2958) and the data of samples (upper reference line) included in the upper adjacent encoding unit (2980, 2982).
[0368] That is, with reference to FIGS. 17 to 28, a method and apparatus for determining the weights of the filtering reference samples and filters to be applied to the filter, and adaptively performing intra prediction based on the weights of the filtering reference samples and filters have been described. Although the description describes performing intra prediction based on original reference samples adjacent to the upper or left corner of the current block on the premise that decoding is performed according to the decoding order of the conventional encoding unit, it is not limited thereto. A person skilled in the art can easily understand that when the decoding order between some adjacent encoding units is in the reverse order of the right encoding unit and the left encoding unit as shown in FIG. 29, intra prediction can be performed based on original reference samples adjacent to the upper or right corner of the current block.
[0369] According to various embodiments of the present disclosure, information on reference samples that were not used in conventional intra-prediction is utilized, thereby improving the accuracy of the prediction. Additionally, during the process of reconstructing the original reference samples, a reference smoothing effect is applied to the reconstructed reference samples, and thus, the accuracy of the prediction can be improved. Furthermore, since it is possible to generate various prediction blocks by selectively utilizing the reconstructed reference samples and the original reference samples, a more efficient prediction block can be selected, thereby improving the accuracy of the prediction. Moreover, according to various embodiments of the present disclosure, by generating prediction blocks with natural patterns, the occurrence of abrupt prediction errors is corrected, and thus, the efficiency of the transformation can be improved.
[0370] Various embodiments have been described above. Those skilled in the art will understand that the present disclosure may be implemented in modified forms without departing from the essential nature of the present disclosure. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present disclosure is defined by the claims, not by the foregoing description, and all variations within the scope of the claims should be interpreted as being included in the present disclosure.
[0371] Meanwhile, the embodiments of the present disclosure described above can be written as a program that can be executed on a computer and can be implemented on a general-purpose digital computer that operates the program using a computer-readable recording medium. A computer-readable recording medium includes storage media such as magnetic storage media (e.g., ROM, floppy disk, hard disk, etc.) and optical reading media (e.g., CD-ROM, DVD, etc.).
Claims
Claim 1 A method for image decoding characterized by comprising: a step of generating an intra-predicted sample of a current sample within a current block; a step in which, if the intra-predicted mode of the current block is a directional mode of the upper-right prediction direction, a left-reference sample among a plurality of left-reference samples of the current block is determined based on the position of the current sample and the intra-predicted mode of the current block, a first weight for the reference sample is determined based on the X-coordinate component of the position of the current sample, and a second weight for an upper-reference sample among a plurality of upper-reference samples of the current block is determined to be 0; a step of obtaining a modified intra-predicted sample of the current sample based on the first weight, the left-reference sample, the second weight, the intra-predicted sample, and a third weight for the intra-predicted sample; and a step of restoring the current block using the modified intra-predicted sample of the current sample. Claim 2 A video encoding method characterized by comprising: a step of generating an intra-predicted sample of a current sample within a current block; a step in which, if the intra-predicted mode of the current block is a directional mode of the upper-right prediction direction, a left-reference sample among a plurality of left-reference samples of the current block is determined based on the position of the current sample and the intra-predicted mode of the current block, a first weight for the reference sample is determined based on the X-coordinate component of the position of the current sample, and a second weight for an upper-reference sample among a plurality of upper-reference samples of the current block is determined to be 0; a step of obtaining a modified intra-predicted sample of the current sample based on the first weight, the left-reference sample, the second weight, the intra-predicted sample, and a third weight for the intra-predicted sample; and a step of encoding the current block using the modified intra-predicted sample of the current sample. Claim 3 A non-transient computer-readable recording medium that records a bitstream generated by the image encoding method of paragraph 2.
Citation Information
Patent Citations
Per-sample prediction encoding apparatus and method
KR1020170078683A
Image encoding method and apparatus, and image decoding method and apparatus
KR102514436B1
Improved video intra-prediction using position-dependent prediction combination for video coding
WO2017058635A1