Video decoding method, video encoding method, and apparatus
The video decoding and encoding methods optimize data unit determination and intra-prediction techniques to enhance the efficiency of compressing and decompressing high-definition video content, addressing the challenges of existing technologies in handling high-resolution video.
Patent Information
- Application Number
- JP2024124998
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2017-09-28
- Filing Date
- 2024-07-31
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2038-09-27
AI Technical Summary
Existing video encoding and decoding technologies face challenges in efficiently compressing and decompressing high-resolution or high-definition video content, particularly in determining optimal data units for video compression based on video characteristics.
A video decoding method that involves acquiring transform coefficients from a bitstream, generating intra-predicted values using filtering reference samples and weight values, and restoring blocks based on these values, while a video encoding method generates intra-prediction values and applies filtering processes to enhance compression efficiency.
Improves the efficiency of encoding and decoding high-resolution video by optimizing data unit determination and intra-prediction techniques, leading to enhanced compression performance.
Smart Images

Figure 2024147826000001_ABST
Abstract
Description
[Technical field]
[0001] The method and apparatus according to the present invention may encode or decode an image using various types of coding units included in the image. The method and apparatus according to the present invention may include an intra prediction method and apparatus. [Background technology]
[0002] Due to the development and spread of hardware capable of playing and storing high-resolution or high-quality video content, the need for a codec that effectively encodes or decodes high-resolution or high-quality video content is increasing. Encoded video content can also be played back by being decoded. Recently, methods for effectively compressing such high-resolution or high-quality video content have been implemented. For example, an efficient video compression method has been implemented through a process of processing a video to be encoded in a random manner.
[0003] Various data units may be used to compress an image, and there may be an inclusion relationship between such data units. In order to determine the size of the data units used for such image compression, the data units are divided in various ways, and an optimized data unit is determined according to the characteristics of the image, and the image is encoded or decoded. Summary of the Invention [Means for solving the problem]
[0004] According to an embodiment, a video decoding method includes: acquiring information on transform coefficients of a current block from a bitstream; generating an intra-predicted value of the current sample based on a position of the current sample in the current block and an intra-prediction mode of the current block; determining a sample value of at least one filtered reference sample to be filtered, a first weighted value for the filtered reference sample, and a second weighted value for the intra-predicted value of the current sample based on the position of the current sample in the current block; generating a filtered predicted sample value of the current sample based on a first weighted value of the filtered reference sample, an intra predicted value of the current sample, a first weighted value related to the filtered reference sample, and a second weighted value related to the intra predicted value of the current sample; generating a predicted block of the current block including the filtered predicted sample value of the current sample; obtaining a residual block of the current block based on information related to the obtained transform coefficients of the current block; and reconstructing the current block based on the predicted 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 position of the current sample within the current block and the intra-prediction mode of the current block may include a step of determining an original reference sample corresponding to the current sample based on the position of the current sample and the intra-prediction mode of the current block, and a step of generating an intra-predicted value of the current sample based on a sample value of the original reference sample.
[0006] The first weight for the filtering reference sample is also determined based on a distance between the filtering reference sample and the current sample.
[0007] The first weight associated with the filtering reference sample becomes smaller as the distance between the filtering reference sample and the current sample increases.
[0008] The filtered reference samples may include at least one of an original reference sample located in a horizontal direction of the current sample and an original reference sample located in a vertical direction of the current sample.
[0009] When the intra prediction mode of the current block is an angular mode, the filtering reference sample may include at least one of the neighboring samples to the left and above of the current block located on a line passing through the current sample, and the line may be oriented in the prediction direction indicated by the angular mode and in the opposite direction.
[0010] determining a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for an intra predicted value of the current sample based on a 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample, the step of: determining at least one second intra prediction mode; and determining, based on a position of the current sample in the current block, a sample value of at least one filtered reference sample to be filtered, a first weighted value for the filtered reference sample, and a second weighted value for the intra predicted value of the current sample using the at least one second intra prediction mode determined based on the position of the current sample in the current block, and generating a filtered predicted sample value of the current sample based on the determined sample value of the filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighted value for the filtered reference sample, and the second weighted value for the intra predicted value of the current sample.
[0011] The at least one second intra prediction mode may be determined on a picture-by-picture basis or may also be determined on a block-by-block basis.
[0012] The at least one second intra prediction mode is also determined to be at least one of the intra prediction mode, an intra prediction mode indicating a prediction direction opposite to that indicated by the intra prediction mode, a horizontal mode, and a vertical mode.
[0013] The first weighted value and the second weighted value are also normalized values.
[0014] determining a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for the intra predicted value of the current sample based on a 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample, In the case where the current sample is in the intra prediction mode, the method may include determining a sample value of at least one filtered reference sample to be filtered, a first weighted value for the filtered reference sample, and a second weighted value for the intra predicted value of the current sample, based on a 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighted value for the filtered reference sample, and the second weighted value for the intra predicted value of the current sample.
[0015] An image encoding method according to an embodiment includes: generating an intra predicted value of a current sample based on a position of the current sample within a current block and an intra prediction mode of the current block; determining a sample value of at least one filtered reference sample to be filtered, a first weighted value for the filtered reference sample, and a second weighted value 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighted value for the filtered reference sample, and the second weighted value for the intra predicted value of the current sample; generating a predicted block of the current block including the filtered predicted sample value of the current sample; and encoding information related to transform coefficients of the current block based on the predicted block of the current block.
[0016] According to an embodiment, a video decoding apparatus includes a processor that acquires information related to transform coefficients of a current block from a bitstream, generates an intra predicted value of the current sample based on a position of the current sample in the current block and an intra prediction mode of the current block, determines a sample value of at least one filtered reference sample to be filtered, a first weighted value related to the filtered reference sample, and a second weighted value related to the intra predicted value of the current sample based on the position of the current sample in the current block, generates a filtered predicted sample value of the current sample based on the determined sample value of the filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighted value related to the filtered reference sample, and the second weighted value related to the intra predicted value of the current sample, generates a predictive block of the current block including the filtered predicted sample value of the current sample, acquires a residual block of the current block based on the acquired information related to transform coefficients of the current block, and reconstructs the current block based on the predictive block of the current block and the residual block of the current block.
[0017] A computer program relating to the video decoding method according to an embodiment of the present disclosure may also be recorded on a computer-readable recording medium. [Brief description of the drawings]
[0018] [Figure 1A] 2 is a block diagram of a video decoding device according to various embodiments. [Figure 1B] 4 is a flowchart of a video decoding method according to various embodiments. [Figure 1C] 4 is a flowchart of a video decoding method according to various embodiments. [Figure 1D] 4A and 4B are block diagrams of a video decoder according to various embodiments. [Figure 2A] 1 is a block diagram of a video encoding device according to various embodiments; [Figure 2B]4 is a flowchart of a video encoding method according to various embodiments. [Figure 2C] 4 is a flowchart of a video decoding method according to various embodiments. [Figure 2D] 4A and 4B are block diagrams of a video decoder according to various embodiments. [Diagram 3] 1 is a diagram illustrating a process in which a video decoding apparatus divides a current coding unit and determines at least one coding unit, according to an embodiment. [Figure 4] 1 is a diagram illustrating a process in which a video decoding apparatus divides a non-square coding unit and determines at least one coding unit, according to an embodiment. [Diagram 5] 1 is a diagram illustrating a process in which a video decoding apparatus divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment. [Figure 6] 1 is a diagram illustrating a method for a video decoding apparatus to determine a predetermined coding unit among an odd number of coding units, according to an embodiment. [Figure 7] 1 is a diagram illustrating an order in which a plurality of coding units are processed when a video decoding apparatus divides a current coding unit to determine the plurality of coding units, according to an embodiment; [Figure 8] 11 is a diagram illustrating a process of determining that a current coding unit is divided into an odd number of coding units when a video decoding apparatus is unable to process coding units in a predetermined order, according to an embodiment. [Figure 9] 1 is a diagram illustrating a process in which a video decoding apparatus divides a first coding unit and determines at least one coding unit, according to an embodiment. [Figure 10] 11 is a diagram illustrating that, according to one embodiment, a video decoding device restricts the form in which a second coding unit may be divided when a non-square second coding unit determined by dividing a first coding unit satisfies a certain condition. [Figure 11]13 is a diagram illustrating a process in which a video decoding apparatus divides a square-shaped coding unit when division mode information does not indicate division into four square-shaped coding units, according to one embodiment. [Figure 12] 1 is a diagram illustrating that a processing order among a plurality of coding units may differ depending on a division process of the coding units, according to an embodiment. [Figure 13] 11 is a diagram illustrating a process of determining a depth of a coding unit according to changes in the shape and size of the coding unit when the coding unit is recursively divided to determine multiple coding units according to one embodiment. [Figure 14] 1 is a diagram illustrating a depth determined according to a type and size of a coding unit and an index (PID: part index) for a coding unit partition, according to an embodiment. [Figure 15] 1 is a diagram illustrating a plurality of coding units being determined based on a plurality of predetermined data units included in a picture, according to an embodiment; [Figure 16] 1 is a diagram illustrating processing blocks that are used as a reference to determine a determination order of reference coding units included in a picture, according to an embodiment; [Figure 17] 1 is a diagram illustrating an intra prediction mode according to an embodiment. [Figure 18] 1 is a diagram illustrating a method in which a video decoding apparatus generates reconstructed samples using original reference samples according to an embodiment of the present disclosure. [Figure 19A] 11 is a diagram illustrating a method for generating a reconstructed sample using an original reference sample according to a prediction direction of an intra-prediction mode of a current block, according to an embodiment of the present disclosure. [Figure 19B] 11 is a diagram illustrating a method for generating a reconstructed sample using an original reference sample according to a prediction direction of an intra-prediction mode of a current block, according to an embodiment of the present disclosure. [Figure 20]1 is a diagram illustrating a method in which a video decoding apparatus generates reconstructed samples using original reference samples according to an embodiment of the present disclosure. [Figure 21] 11 is a diagram illustrating a process in which a video decoding apparatus performs intra prediction on a current block using original reference samples and reconstructed samples, according to an embodiment of the present disclosure. [Figure 22] 13 is a diagram illustrating a process in which a video decoding apparatus performs weighted prediction using original reference samples and reconstructed reference samples of a left adjacent line and an upper adjacent line. [Diagram 23] 13 is a diagram illustrating a process in which a video decoding device performs weighted prediction using a predicted value generated by performing intra prediction using original reference samples and reconstructed reference samples of a left adjacent line and an upper adjacent line. [Figure 24] 13 is a diagram illustrating a process in which a video decoding apparatus performs position-based intra prediction of a current sample when an intra prediction mode of a current block is one of a DC mode, a planar mode, and a vertical mode. [Diagram 25] 13 is a diagram illustrating a process in which a video decoding apparatus performs position-based intra prediction of a current sample when an intra prediction mode of a current block is a diagonal mode in a bottom-left direction. [Figure 26] 13 is a diagram illustrating a process in which a video decoding apparatus performs position-based intra prediction of a current sample when an intra prediction mode of a current block is a diagonal mode in an upper right direction. [Figure 27] 13 is a diagram illustrating a process in which a video decoding apparatus performs position-based intra prediction of a current sample when an intra prediction mode of a current block is an angular mode adjacent to a diagonal mode in a lower-left direction. [Figure 28]13 is a diagram illustrating a process in which a video decoding apparatus performs position-based intra prediction of a current sample when an intra prediction mode of a current block is an angular mode adjacent to a diagonal mode in an upper right direction. [Figure 29] This is a diagram to explain that according to one embodiment of the present disclosure, the encoding / decoding order between coding units is determined to be forward or backward based on the encoding order flag, and the reference line on the right or upper side can be used for intra prediction depending on the determined encoding / decoding order. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] According to various embodiments, a video decoding method includes the steps of: acquiring information related to transform coefficients of a current block from a bitstream; generating an intra prediction value of the current sample based on a position of the current sample in the current block and an intra prediction mode of the current block; determining a sample value of at least one filtered reference sample to be filtered, a first weighting value related to the filtered reference sample, and a second weighting value related to the intra prediction value of the current sample based on the position of the current sample in the current block; generating a filtered predicted sample value of the current sample based on a filtered reference sample value, an intra predicted value of the current sample, a first weighting value related to the filtered reference sample, and a second weighting value related to the intra predicted value of the current sample; generating a predicted block of the current block including the filtered predicted sample value of the current sample; obtaining a residual block of the current block based on information related to the obtained transform coefficients of the current block; and reconstructing the current block based on the predicted block of the current block and the residual block of the current block.
[0020] A video encoding method according to various embodiments includes: generating an intra predicted value of a current sample based on a position of the current sample within a current block and an intra prediction mode of the current block; determining a sample value of at least one filtered reference sample to be filtered, a first weighted value for the filtered reference sample, and a second weighted value 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighted value for the filtered reference sample, and the second weighted value for the intra predicted value of the current sample; generating a predictive block of the current block including the filtered predicted sample value of the current sample; and encoding information related to transform coefficients of the current block based on the predictive block of the current block.
[0021] According to various embodiments, a video decoding apparatus includes a processor that acquires information related to transform coefficients of a current block from a bitstream, generates an intra predicted value of the current sample based on a position of the current sample in the current block and an intra prediction mode of the current block, determines a sample value of at least one filtered reference sample to be filtered, a first weighted value related to the filtered reference sample, and a second weighted value related to the intra predicted value of the current sample based on the position of the current sample in the current block, generates a filtered predicted sample value of the current sample based on the determined sample value of the filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighted value related to the filtered reference sample, and the second weighted value related to the intra predicted value of the current sample, generates a predictive block of the current block including the filtered predicted sample value of the current sample, acquires a residual block of the current block based on the acquired information related to transform coefficients of the current block, and reconstructs the current block based on the predictive block of the current block and the residual block of the current block.
[0022] The present invention may include a computer readable recording medium having a program recorded thereon for implementing the methods according to various embodiments.
[0023] The advantages, features, and methods of achieving the disclosed embodiments will become clear with reference to the following embodiments in conjunction with the accompanying drawings. However, the present disclosure is not limited to the embodiments disclosed below, and may be embodied in various different forms, but the present embodiments are provided only to make the disclosure complete and to fully convey the scope of the invention to those skilled in the art to which the disclosure pertains.
[0024] The terms used in this specification are briefly explained, and the disclosed embodiments are specifically explained.
[0025] The terms used in this specification are currently common terms that are selected as much as possible while taking into consideration the functions in this disclosure, but they may differ depending on the intentions of engineers in the relevant fields, precedents, or the emergence of new technologies. In addition, in certain cases, the applicant may arbitrarily select terms, and in such cases, the meanings of the terms will be described in detail in the description of the invention. Therefore, the terms used in this disclosure must be defined based on the meanings that the terms have and the overall content of this disclosure, rather than simply by the names of the terms.
[0026] In this specification, the singular expression includes the plural expression unless the context clearly specifies otherwise.
[0027] Throughout the specification, when a part "comprises" a certain element, this does not mean to exclude other elements, but means that the part may further include other elements, unless specifically stated to the contrary.
[0028] Also, the term "module" used in the specification means a software component or a hardware component, and a "module" performs a certain function. However, the meaning of "module" is not limited to software or hardware. A "module" may be configured to exist on a recording medium that can be addressed, or may be configured to execute one or more processors. Thus, by way of example, a "module" includes components such as software components, object-oriented software components, class components, and task components, as well as processes, functions, attributes, procedures, subroutines, program code segments, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. The functionality provided within the components and "modules" may be combined into fewer components and "modules" or may be further separated into additional components and "modules."
[0029] According to one embodiment of the present disclosure, the "unit" may also be embodied by a processor and a memory. The term "processor" should be broadly interpreted to include a general purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, and the like. In some environments, the term "processor" may also 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 in conjunction with a DSP core, or any other such configuration.
[0030] The term "memory" should be interpreted broadly to include any electronic component capable of storing electronic information. The term "memory" may refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile 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, and registers. Memory is in electronic communication with a processor if the processor can read information from and / or write information to the memory. Memory that is integrated with the processor is in electronic communication with the processor.
[0031] Hereinafter, "image" can refer to both a static image, such as a stopped video, and a moving image, ie, a moving image, such as the video itself.
[0032] Hereinafter, a "sample" refers to data assigned to a sampling position of an image and to data to be processed. For example, in a spatial domain image, a pixel value and a transform coefficient in a transform domain are also samples. A unit including at least one such sample can be defined as a block.
[0033] Hereinafter, the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present disclosure. In order to clearly explain the present disclosure, the drawings will omit parts that are not related to the description.
[0034] Hereinafter, a video encoding device, a video decoding device, a video encoding method, and a video decoding method according to an embodiment will be described in detail with reference to Figures 1 to 29. A method for determining a data unit of a video according to an embodiment will be described with reference to Figures 3 to 16. An encoding method or a decoding method for determining a filtering reference sample and a filter weight value to be applied with a filter and performing adaptive intra prediction based on the filtering reference sample and the filter weight value, and an apparatus therefor will be described with reference to Figures 1, 2, and 17 to 29.
[0035] Hereinafter, with reference to FIG. 1 and FIG. 2, an encoding / decoding method and apparatus for adaptively performing intra prediction based on various types of coding units according to an embodiment of the present disclosure will be described in detail.
[0036] FIG. 1A illustrates a block diagram of a video decoder device according to various embodiments.
[0037] A video decoding device 100 according to various embodiments may include an acquisition unit 105, an intra prediction unit 110, and a video decoding unit 115.
[0038] The acquisition unit 105, the intra prediction unit 110, and the video decoding unit 115 may include at least one processor. Also, the acquisition unit 105, the intra prediction unit 110, and the video decoding unit 115 may include a memory that stores instructions executed by the at least one processor. The video decoding unit 115 may be implemented as hardware separate from the acquisition unit 105 and the intra prediction unit 110, or may include the acquisition unit 105 and the intra prediction unit 110.
[0039] The acquiring unit 105 may acquire information related to transform coefficients of the current block from the bitstream. The acquiring unit 105 may acquire information related to a prediction mode of the current block and information related to an intra prediction mode of the current block from the bitstream.
[0040] The acquisition unit 105 may acquire information indicating an intra mode or an inter prediction mode as the information related to the prediction mode of the current block. The information related to the intra prediction mode of the current block may also be information related to an 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.
[0041] The intra prediction unit 110 is also activated when the prediction mode of the current block is an intra prediction mode.
[0042] The intra prediction unit 110 may determine an original reference sample related value based on the position of the current sample in the current block and the intra prediction mode of the current block. That is, the intra prediction unit 110 may determine at least one original reference sample among the reference samples based on the position of the current sample in the current block and the intra prediction mode of the current block, and may determine an original reference sample related value based on the determined at least one original reference sample. The original reference sample is a sample of a neighboring block of the current block, and the original reference sample may include a sample of a left neighboring block of the current block or a sample of an upper neighboring block. For example, the original reference sample may include a sample of a predetermined vertical line adjacent to the left side of the current block, or a sample of a predetermined horizontal line adjacent to the upper side of the current block. However, the original reference sample is not limited to including a sample of a left neighboring block or a sample of an upper neighboring block of the current block, and may include a sample of an upper neighboring block or a right neighboring block of the current block.
[0043] The intra prediction unit 110 may generate an intra prediction value for a current sample based on a position of the current sample in the current block and an intra prediction mode of the current block. That is, the intra prediction unit 110 may determine an original reference sample corresponding to the current sample based on a position of the current sample and an intra prediction mode of the current block. The intra prediction unit 110 may generate an intra prediction value for the current sample based on a sample value of the original reference sample. The intra prediction unit 110 may determine at least one filtering reference sample to be applied with a filter and a filter weighting value based on at least one of the intra prediction mode of the current block, the position of the current sample in the current block, and the position of the reference sample of the current block, and may determine a filtering reference sample-related value based on the filtering reference sample and the filter weighting value.
[0044] For example, if the intra prediction mode of the current block is one of planar, DC, horizontal and vertical modes, the intra prediction unit 110 may determine at least one of a sample adjacent to the upper left corner of the current block, a neighboring sample of the current block located in the upper direction of the current block, and a neighboring sample of the current block located in the left direction of the current block as a filtering reference sample.
[0045] When the intra prediction mode of the current block is an angular mode including a diagonal mode, the intra prediction unit 110 may determine, as a filtering reference sample, at least one of adjacent samples on the left and upper sides of the current block located on a line passing through the current sample in the current block and a sample adjacent to the upper left corner of the current block, where the line may be in the prediction direction indicated by the angular mode or in the opposite direction.
[0046] The intra prediction unit 110 may determine the number of taps of a filter to be applied to a filtered reference sample based on at least one of an intra prediction mode of the current block and a size of the current block.
[0047] In addition, the intra prediction unit 110 is not limited to determining the filter weighting value to be applied to the filtered 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, but may determine the filter weighting value to be applied to the filtered reference sample based on the size of the current block.
[0048] The intra prediction unit 110 may determine some of the samples in the reference line adjacent to the current block as filtered reference samples based on the horizontal and vertical components of the prediction direction specified by the intra prediction mode.
[0049] When the intra prediction mode of the current block is a predetermined intra prediction mode, the intra prediction unit 110 can determine at least one filtering reference sample to be filtered and a filtering reference sample related value based on a filter weighting value 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.
[0050] The intra prediction unit 110 may determine at least one intra prediction mode, and may determine a filtering reference sample and a filter weighting value to be applied to a filter based on at least one of a position of a current sample in a current block and a position of a reference sample of the current block using the determined at least one intra prediction mode. The intra prediction unit 110 may determine a filtering reference sample-related value based on the filtering reference sample and the filter weighting value.
[0051] In this case, the at least one intra prediction mode is determined for each picture unit or for each block unit. The at least one intra prediction mode is an intra prediction mode determined based on an intra prediction mode of a current block or is a predetermined intra prediction mode. The predetermined intra prediction mode is at least one of a horizontal mode and a vertical mode.
[0052] The intra prediction unit 110 may obtain a prediction block of the current block including a prediction sample of the current block based on at least one of the original reference sample-related value and the filtered reference sample-related value. For example, the intra prediction unit 110 may determine whether to perform intra prediction for the current sample using both the original reference sample-related value and the filtered reference sample-related value, or may determine one of the original reference sample-related value and the filtered reference sample-related value and determine whether to perform intra prediction for the current sample based on the determined value. The intra prediction unit 110 may obtain a prediction block of the current block including a prediction sample of the current sample based on the determination.
[0053] The intra prediction unit 110 may determine a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for the intra prediction value of the current sample based on the position of the current sample within the current block. The first weighting value for the filtered reference sample may also be determined based on a distance between the filtered reference sample and the current sample. For example, the first weighting value may also be determined based on a distance between the filtered reference sample and the current sample relative to a size of the current block. In this case, the size of the current block refers to the height or width of the current block. The first weighting value may be smaller as the distance between the filtered reference sample and the current sample increases. The second weighting value may also be determined in a manner similar to that of the first weighting value. The first weighting value and the second weighting value may also be normalized values.
[0054] In this case, the filtering reference sample may include at least one of an original reference sample located in a horizontal direction of the current sample and an original reference sample located in a vertical direction of the current sample. Meanwhile, when the intra prediction mode of the current block is an angular mode, the filtering reference sample may include at least one of neighboring samples on the left and upper sides of the current block located on a line passing through the current sample. In this case, the line may be in the prediction direction indicated by the angular mode and in the opposite direction.
[0055] The intra prediction unit 110 may generate a filtered predicted sample value of the current sample based on a sample value of a filtered reference sample to which a filter is applied, an intra predicted value of the current sample, a first weighted value related to the filtered reference sample, and a second weighted value related to the intra predicted value of the current sample. For example, the intra prediction unit 110 may generate a filtered predicted sample value of the current sample based on a sample value of a filtered reference sample to which a filter is applied, an intra predicted value of the current sample, a first weighted value related to the filtered reference sample, and a second weighted value related to the intra predicted value of the current sample only when the intra prediction mode of the current block is a predetermined intra prediction mode.
[0056] For example, the intra prediction unit 110 may determine at least one second intra prediction mode, and determine a sample value of at least one filtered reference sample to be filtered based on a position of a current sample in a current block using the at least one second intra prediction mode, a first weighting value related to the filtered reference sample, and a second weighting value related to the intra prediction value of the current sample, and generate a filtered prediction sample value of the current sample based on the determined sample value of the filtered reference sample to be filtered, the intra prediction value of the current sample, the first weighting value related to the filtered reference sample, and the second weighting value related to the intra prediction value of the current sample. At this time, the at least one second intra prediction mode may be determined for each picture unit or each block unit. The at least one second intra prediction mode may also be determined as at least one of an intra prediction mode of the current block, an intra prediction mode indicating a direction opposite to a prediction direction indicated by the intra prediction mode of the current block, a horizontal mode, and a vertical mode.
[0057] The intra prediction unit 110 may generate a prediction block of the current block including filtered prediction sample values of the current block.
[0058] The intra prediction unit 110 can perform filtering based on a first weighting value related to the original reference sample related value, a second weighting value related to the filtered reference sample related value, the original reference sample related value, and the filtered reference sample related value to obtain a predicted sample of the current block.
[0059] The intra prediction unit 110 may determine that the second weight value for the filtered reference sample related value is smaller as the distance from the filtered reference sample to the current sample increases.
[0060] The video decoding unit 115 may obtain a residual block of the current block based on information related to the transform coefficients of the current block. That is, the video decoding unit 115 may obtain residual samples related to the residual block of the current block by performing inverse quantization and inverse transform based on information related to the transform coefficients of the current block from the bitstream.
[0061] The video decoding unit 115 may reconstruct the current block based on the prediction block of the current block and the residual block of the current block. The video decoding unit 115 may generate reconstructed samples in the current block using sample values of prediction samples in the prediction block of the current block and sample values of residual samples in the residual block of the current block, and may generate a reconstructed block of the current block based on the reconstructed samples.
[0062] Meanwhile, the video decoding apparatus 100 may acquire flag information indicating whether or not to adaptively perform intra prediction based on a filtering reference sample and a filter weighting value from a bitstream, and may determine whether or not to adaptively perform intra prediction based on the filtering reference sample and the filter weighting value based on the flag information. In this case, the flag information may be acquired for each block, and in particular, for each maximum coding unit.
[0063] In addition, the video decoding apparatus 100 may obtain flag information commonly applied to the luminance component and the chrominance component, or may obtain flag information individually applied to the luminance component or the chrominance component.
[0064] Alternatively, the video decoding apparatus 100 may determine whether to adaptively perform intra prediction based on a filtered reference sample and a filter weight value without acquiring flag information from a bitstream. For example, when a prediction mode of a current block is a predetermined intra prediction mode, the video decoding apparatus 100 may determine to adaptively perform intra prediction based on a filtered reference sample and a filter weight value.
[0065] Alternatively, the video decoding device 100 may determine whether to adaptively perform intra prediction based on a filtered reference sample and a filter weight using information of a neighboring block without acquiring flag information from a bitstream. For example, the video decoding device 100 may determine whether to adaptively perform intra prediction for a current block based on a filtered reference sample and a filter weight based on flag information of a neighboring block indicating whether to adaptively perform intra prediction for a neighboring block of a current block based on a filtered reference sample and a filter weight.
[0066] Alternatively, the video decoding device 100 may determine whether to adaptively perform intra prediction based on the size of the current block, the filtered reference sample, and the filter weighting value. For example, when the size of the current block is a predetermined first block size, the video decoding device 100 may adaptively perform intra prediction based on the filtered reference sample and the filter weighting value, and when the size of the current block is a predetermined second block size, the video decoding device 100 may perform conventional intra prediction without adaptively performing intra prediction based on the filtered reference sample and the filter weighting value.
[0067] The video decoding device 100 may perform intra prediction by combining intra prediction encoding / decoding tools similar to an adaptive intra prediction encoding / decoding tool based on a filtering reference sample and a filter weight value. Alternatively, the video decoding device 100 may assign priorities to a plurality of intra prediction encoding / decoding tools and perform intra prediction according to the priorities among the encoding / decoding tools. That is, when an encoding / decoding tool with a high priority is used, an encoding / decoding tool with a low priority is not used, and when an encoding / decoding tool with a high priority is not used, an encoding / decoding tool with a low priority is used.
[0068] FIG. 1B illustrates a flowchart of a video decoding method according to various embodiments.
[0069] In operation S105, the video decoding apparatus 100 may obtain information related to transform coefficients of a current block.
[0070] At step S110, the video decoding device 100 determines at least one filtered reference sample to be applied with a filter and a filter weighting value 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 may determine a filtered reference sample related value based on the filtered reference sample to be applied with the filter and the filter weighting value.
[0071] In operation S115, the video decoding apparatus 100 may determine an 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.
[0072] In operation S120, the video decoding apparatus 100 may obtain a prediction block of a current block including a prediction sample of a current sample based on at least one of an original reference sample-related value and a filtered reference sample-related value.
[0073] In operation S125, the video decoding apparatus 100 may obtain a residual block of the current block based on information related to the transform coefficients of the current block.
[0074] In operation S130, the video decoding apparatus 100 may reconstruct the current block based on the prediction block of the current block and the residual block of the current block.
[0075] FIG. 1C illustrates a flowchart of a video decoding method according to various embodiments.
[0076] In operation S155, the video decoding apparatus 100 may obtain information related to transform coefficients of a current block.
[0077] In operation S160, the video decoding apparatus 100 may 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.
[0078] At step S165, the video decoding device 100 determines a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for the intra predicted value of the current sample based on the position of the current sample within the current block, and may generate a filtered predicted sample value of the current sample based on the sample value of the filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample.
[0079] In operation S170, the video decoding apparatus 100 may generate a prediction block of the current block including a filtered prediction sample value of the current sample.
[0080] In operation S175, the video decoding apparatus 100 may obtain a residual block of the current block based on information related to the transform coefficients of the current block.
[0081] In operation S180, the video decoding apparatus 100 may reconstruct the current block based on the prediction block of the current block and the residual block of the current block.
[0082] FIG. 1D illustrates a block diagram of a video decoder 6000 according to various embodiments.
[0083] The video decoder 6000 according to various embodiments performs the same operations as those performed in the video decoder 115 of the video decoding device 100 to encode video data.
[0084] 1D, the entropy decoding unit 6150 parses the coded image data to be decoded and coding information required for decoding from the bitstream 6050. The coded image data is quantized transform coefficients, and the inverse quantization unit 6200 and the inverse transform unit 6250 restore residual data from the quantized transform coefficients.
[0085] The intra prediction unit 6400 performs intra prediction for each block. The intra prediction unit 6400 in FIG 1D corresponds to the intra prediction unit 110 in FIG 1A.
[0086] The inter prediction unit 6350 performs inter prediction for each block using a reference image acquired from the reconstructed picture buffer 6300. By adding prediction data and residual data related to each block generated by the intra prediction unit 6400 or the inter prediction unit 6350, spatial domain data related to a block of a current image is reconstructed, and the deblocking unit 6450 and the SAO performing unit 6500 may perform loop filtering on the reconstructed spatial domain data and output a filtered reconstructed image 6600. In addition, the reconstructed image stored in the reconstructed picture buffer 6300 may also be output as a reference image.
[0087] In a decoder (not shown) of the video decoder 100, in order to decode video data, the step-by-step operations of the video decoder 6000 according to various exemplary embodiments are also performed for each block.
[0088] FIG. 2A illustrates a block diagram of a video encoding device according to various embodiments.
[0089] According to various exemplary embodiments, the video encoding device 150 may include an intra prediction unit 155 and a video encoding unit 160.
[0090] The intra prediction unit 155 and the video encoding unit 160 may include at least one processor. Also, the intra prediction unit 155 and the video encoding unit 160 may include a memory that stores instructions executed by the at least one processor. The intra prediction unit 155 and the video encoding unit 160 may be implemented as separate hardware or may include the intra prediction unit 155 and the video encoding unit 160.
[0091] The intra prediction unit 155 may determine a filtering reference sample to be filtered and a filter weighting value based on at least one of an intra prediction mode of a current block, a position of a current sample in the current block, and a position of a reference sample of the current block, and may determine a filtering reference sample-related value based on the filtering reference sample to be filtered and the filter weighting value. The intra prediction unit 155 may determine an original reference sample-related value based on a position of a current sample in the current block and an intra prediction mode of the current block.
[0092] The intra prediction unit 155 may generate a prediction block of the current block including a prediction sample of the current sample based on at least one of the original reference sample-related value and the filtered reference sample-related value.
[0093] Alternatively, the intra prediction unit 155 may generate an intra prediction value of the current sample based on a position of the current sample in the current block and an intra prediction mode of the current block. The intra prediction unit 155 may determine a sample value of at least one filtered reference sample to be filtered, a first weighting value related to the filtered reference sample, and a second weighting value related to the intra prediction value of the current sample based on a position of the current sample in the current block. The intra prediction unit 155 may generate a filtered prediction sample value of the current sample based on a sample value of the filtered reference sample to be filtered, the intra prediction value of the current sample, the first weighting value related to the filtered reference sample, and the second weighting value related to the intra prediction value of the current sample. The intra prediction unit 155 may generate a prediction block of the current block including the filtered prediction sample value of the current sample.
[0094] The image encoding unit 160 may encode information related to transform coefficients of the current block based on the predicted block of the current block. That is, the image encoding unit 160 may generate a residual block of the current block based on the original block of the current block and the predicted block of the current block, transform and quantize the residual block of the current block, and encode information related to the transform coefficients of the current block. The image encoding unit 160 may encode information related to a prediction mode of the current block and information related to an intra prediction mode of the current block.
[0095] The image encoder 160 may generate a bitstream including information related to the transform coefficients of the current block and output the bitstream.
[0096] FIG. 2B illustrates a flow chart of a video encoding method according to various embodiments.
[0097] In step S205, the video encoding device 150 may determine at least one filtered reference sample to be filtered and a filter weighting value 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 may determine a filtered reference sample related value based on the filtered reference sample to be filtered and the filter weighting value.
[0098] In operation S210, the video encoding device 150 may determine an original reference sample-related value based on a position of a current sample within a current block and an intra-prediction mode of the current block.
[0099] In operation S215, the image encoding apparatus 150 may generate a prediction block of the current block including a prediction sample of the current sample based on at least one of the original reference sample-related value and the filtered reference sample-related value.
[0100] In operation S220, the image encoding device 150 may encode information related to transform coefficients of the current block based on the predicted block of the current block.
[0101] FIG. 2C illustrates a flowchart of a video encoding method according to various embodiments.
[0102] In operation S250, the image encoding device 150 may generate an intra-prediction value of the current sample based on a position of the current sample within the current block and an intra-prediction mode of the current block.
[0103] In step S255, the video encoding device 150 determines a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for the intra predicted value of the current sample based on the position of the current sample within the current block, and may generate a filtered predicted sample value of the current sample based on the determined sample value of the filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample.
[0104] In operation S260, the video encoding device 150 may generate a prediction block of the current block including a filtered prediction sample value of the current sample.
[0105] In operation S265, the image encoding device 150 may encode information related to transform coefficients of the current block based on the predicted block of the current block.
[0106] FIG. 2D illustrates a block diagram of a video encoder according to various embodiments.
[0107] The image encoder 7000 according to various embodiments performs the same operations as those performed by the image encoder 160 of the image encoder 150 in encoding image data.
[0108] That is, the intra prediction unit 7200 performs intra prediction for each block in the current image 7050, and the inter prediction unit 7150 performs inter prediction for each block using the current image 7050 and a reference image obtained from the reconstructed picture buffer 7100.
[0109] Residual data is generated by subtracting prediction data for each block output from the intra predictor 7200 or inter predictor 7150 from data for a block to be encoded in the current image 7050, and the transformer 7250 and quantizer 7300 transform and quantize the residual data to output quantized transform coefficients for each block. The intra predictor 7200 of FIG 2D corresponds to the intra predictor 155 of FIG 2A.
[0110] The inverse quantization unit 7450 and the inverse transform unit 7500 may perform inverse quantization and inverse transform on the quantized transform coefficients to restore spatial domain residual data. The restored spatial domain residual data is added to prediction data for each block output from the intra prediction unit 7200 or the inter prediction unit 7150 to restore spatial domain data for a block of the current image 7050. The deblocking unit 7550 and the SAO performing 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 image stored in the restored picture buffer 7100 is also used as a reference image for inter prediction of another image. The entropy coding unit 7350 performs entropy coding on the quantized transform coefficients, and the entropy coded coefficients are also output as a bitstream 7400.
[0111] Since the image encoder 7000 according to various embodiments is applied to the image encoder 150, the operations of the image encoder 7000 according to various embodiments are also performed for each block.
[0112] In the following, the division of coding units according to one embodiment of the present disclosure will be described in detail.
[0113] First, a picture is divided into one or more slices. A slice is also a sequence of one or more coding tree units (CTUs). A coding tree block (CTB) is a concept that is contrasted with a coding tree unit (CTU).
[0114] A maximal coding block (CTB) means an NxN block containing NxN samples, where N is an integer. Each color component is also divided into one or more maximal coding blocks.
[0115] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), the largest coding unit (CTU) is a unit that includes the largest coded block of luma samples, the two largest coded blocks of corresponding chroma samples, and a syntax structure used to code the luma samples and chroma samples. When a picture is a monochrome picture, the largest coding unit is a unit that includes the largest coded block of monochrome samples and a syntax structure used to code the monochrome samples. When a picture is a picture that is coded into color planes separated by color components, the largest coding unit is a unit that includes the picture and a syntax structure used to code the samples of the picture.
[0116] One maximal coding block (CTB) is also divided into MxN coding blocks containing MxN samples (M, N are integers).
[0117] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) is a unit including a coding block of luma samples, two coding blocks of corresponding chroma samples, and a syntax structure used to code the luma samples and chroma samples. When a picture is a monochrome picture, a coding unit is a unit including a coding block of monochrome samples and a syntax structure used to code the monochrome samples. When a picture is a picture coded into color planes separated by color components, a coding unit is a unit including the picture and a syntax structure used to code the samples of the picture.
[0118] As described above, the largest coding block and the largest coding unit are distinct concepts, and the coding block and the coding unit are distinct concepts. That is, the (largest) coding unit means the (largest) coding block including the sample and the data structure including the corresponding syntax structure. However, since a person skilled in the art can understand that the (largest) coding unit or the (largest) coding block refers to a block of a predetermined size including a predetermined number of samples, in the following description, the largest coding block and the largest coding unit, or the coding block and the coding unit, will be referred to without distinction unless there is a special reason.
[0119] The image is also divided into maximum coding units (CTUs), the size of which is also determined based on information obtained from the bitstream, and the shape of the maximum coding units may have a square shape of the same size, but is not limited thereto.
[0120] For example, information regarding a maximum size of a luma coding block may be obtained from a bitstream, and the maximum size of the luma coding block indicated by the information regarding the maximum size of the luma coding block may be one of 16x16, 32x32, 64x64, 128x128, and 256x256.
[0121] For example, information on the maximum size of a luma coding block that can be divided into two and the luma block size difference may be obtained from the bitstream. The information on the luma block size difference may indicate a size difference between the luma maximum coding unit and the maximum luma coding block that can be divided into two. Therefore, the size of the luma maximum coding unit may be determined by combining the information on the maximum size of a luma coding block that can be divided into two obtained from the bitstream and the information on the luma block size difference. The size of the chroma maximum coding unit is also determined by using the size of the luma maximum coding unit. For example, if the Y:Cb:Cr ratio is 4:2:0 according to the color format, the chroma block size is half the luma block size, and similarly, the size of the chroma maximum coding unit is half the size of the luma maximum coding unit.
[0122] According to an embodiment, information on the maximum size of a luma coding block that can be binary split is obtained from a bitstream, so that the maximum size of a luma coding block that can be binary split is variably determined. In contrast, the maximum size of a luma coding block that can be ternary split may be fixed. For example, the maximum size of a luma coding block that can be ternary split in an I slice is 32x32, and the maximum size of a luma coding block that can be ternary split in a P slice or a B slice is 64x64.
[0123] The maximum coding unit is also hierarchically divided into coding units based on the partition mode information acquired from the bitstream. As the partition mode information, at least one of information indicating whether or not a quad split is performed, information indicating whether or not a multi-partition is performed, partition direction information, and partition type information is also acquired from the bitstream.
[0124] For example, the information indicating whether or not a current coding unit is quad-split may indicate whether the current coding unit is quad-split (QUAD_SPLIT) or not.
[0125] If the current coding unit is not split into quads, the information indicating whether or not the current coding unit is to be split further may indicate whether the current coding unit is to be split further (NO_SPLIT) or whether the current coding unit is to be split into binary / ternary.
[0126] If the current coding unit is binary-divided or ternary-divided, the division direction information indicates that the current coding unit is divided in one of the horizontal and vertical directions.
[0127] If the current coding unit is divided horizontally or vertically, the partition type information indicates that the current coding unit is to be divided by binary partitioning or ternary partitioning.
[0128] The split mode of the current coding unit is also determined by the split direction information and the split type information. If the current coding unit is split horizontally into binary, the split mode is determined as binary horizontal split (SPLIT_BT_HOR), if the current coding unit is split horizontally into ternary, the split mode is determined as ternary horizontal split (SPLIT_TT_HOR), if the current coding unit is split vertically into binary, the split mode is determined as binary vertical split (SPLIT_BT_VER), and if the current coding unit is split vertically into ternary, the split mode is determined as ternary vertical split (SPLIT_BT_VER).
[0129] The video decoding apparatus 100 may obtain partition mode information from one bin string from a bitstream. The format of the bitstream received by the video decoding apparatus 100 may include a fixed length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The bin string indicates information as a sequence of binary numbers. The bin string is also composed of at least one bit. The video decoding apparatus 100 may obtain partition mode information corresponding to the bin string based on a partition rule. The video decoding apparatus 100 may determine whether to partition a coding unit into quads or not, or a partition direction and a partition type, based on one bin string.
[0130] The coding unit is smaller than or equal to the maximum coding unit. For example, the maximum coding unit is also a coding unit having a maximum size, and is therefore also one of the coding units. If the partition mode information related to the maximum coding unit indicates that it is not partitioned, the coding unit determined as the maximum coding unit has the same size as the maximum coding unit. If the partition mode information related to the maximum coding unit indicates that it is partitioned, the maximum coding unit is also partitioned into coding units. Also, if the partition mode information related to the coding unit indicates partitioning, the coding unit is further partitioned into coding units of smaller sizes. However, the partitioning of the image is not limited thereto, and the maximum coding unit and the coding units are not differentiated. The partitioning of the coding units will be described in more detail with reference to FIG. 3 to FIG. 16.
[0131] Also, one or more prediction blocks for prediction are determined from the coding unit, the prediction blocks being the same as or smaller than the coding unit. Also, one or more transform blocks for transformation are determined from the coding unit, the transform blocks being the same as or smaller than the coding unit.
[0132] The shapes and sizes of the transformation block and the prediction block are independent of each other.
[0133] In another embodiment, the coding unit may be a prediction block, and the coding unit may be a transform block, and the coding unit may be a transform block.
[0134] The division of the coding unit will be described in more detail in FIG. 3 to FIG. 16. The current block and the neighboring block in the present disclosure may indicate one of the largest coding unit, the coding unit, the prediction block, and the transformation block. The current block or the current coding unit is a block currently being decoded or encoded, or a block currently being divided. The neighboring block is also a block that was restored before the current block. The neighboring block is spatially or temporally adjacent to the current block. The neighboring block may be located at one of the lower left side, the left side, the upper left side, the upper side, the upper right side, the right side, and the lower right side of the current block.
[0135] FIG. 3 illustrates a process in which a video decoding apparatus 100 divides a current coding unit and determines at least one coding unit according to an embodiment.
[0136] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N, where N is a positive integer. The block shape information is information indicating at least one of the shape, direction, width and height ratio, or size of a coding unit.
[0137] The shape of the coding unit may include a square and a non-square. If the width and height of the coding unit are the same (i.e., the block shape of the coding unit is 4Nx4N), the video decoding device 100 may determine the block shape information of the coding unit as a square. The video decoding device 100 may also determine the shape of the coding unit to be a non-square.
[0138] When the width and height of a coding unit are different (i.e., when the block shape of the coding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the video decoding apparatus 100 may determine the block shape information of the coding unit as non-square. When the shape of the coding unit is non-square, the video decoding apparatus 100 may determine the ratio of the width and height in the block shape information of the coding unit to at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. Based on the width and height of the coding unit, the video decoding apparatus 100 may determine whether the coding unit is horizontal or vertical. Based on at least one of the width, height, and width of the coding unit, the video decoding apparatus 100 may determine the size of the coding unit.
[0139] The video decoding device 100 according to an embodiment may determine the type of the coding unit using block type information, and may determine the type in which the coding unit is to be partitioned using partition type mode information. That is, the partitioning method of the coding unit indicated by the partition type mode information may be determined depending on the block type indicated by the block type information used by the video decoding device 100.
[0140] The video decoding device 100 may acquire partition mode information from a bitstream. However, the present invention is not limited thereto, and the video decoding device 100 and the video encoding device 150 may determine pre-agreed partition mode information based on the block format information. The video decoding device 100 may determine pre-agreed partition mode information for the maximum coding unit or the minimum coding unit. For example, the video decoding device 100 may determine the partition mode information for the maximum coding unit as quad partition. Also, the video decoding device 100 may determine the partition mode information for the minimum coding unit as "no partition". Specifically, the video decoding device 100 may determine the size of the maximum coding unit to be 256x256. The video decoding device 100 may determine the pre-agreed partition mode information to be quad partition. The quad partition is a partition mode in which both the width and height of the coding unit are divided into two equal parts. Based on the partition mode information, the video decoding device 100 may obtain a coding unit of 128x128 size from the maximum coding unit of 256x256 size. Also, the video decoding device 100 may determine the size of the minimum coding unit to be 4x4. The video decoding device 100 may obtain partition mode information indicating "no partition" for the minimum coding unit.
[0141] According to an embodiment, the video decoding apparatus 100 may use block shape information indicating that the current coding unit is square. For example, the video decoding apparatus 100 may determine whether to not split the square coding unit, to split it vertically, to split it horizontally, or to split it into four coding units, according to the partition shape mode information. Referring to FIG. 3, when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may not split the coding unit 310a having the same size as the current coding unit 300 according to the partition shape mode information indicating no partition, or may determine the divided coding units 310b, 310c, 310d, 310e, and 310f according to the partition shape mode information indicating a predetermined partition method.
[0142] Referring to FIG. 3, the video decoding device 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the partition mode information indicating division in the vertical direction, according to an embodiment. The video decoding device 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the partition mode information indicating division in the horizontal direction. The video decoding device 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the partition mode information indicating division in the vertical and horizontal directions. The video decoding device 100 may determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the partition mode information indicating ternary division in the vertical direction, according to an embodiment. The video decoding device 100 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the partition mode information indicating ternary division in the horizontal direction. However, the division pattern into which the square coding unit may be divided is not limited to the above-mentioned pattern, and may include various patterns that can be indicated by the division pattern mode information. The predetermined division patterns into which the square coding unit may be divided will be described in detail below through various embodiments.
[0143] FIG. 4 illustrates a process in which a video decoding apparatus 100 divides a non-square coding unit and determines at least one coding unit according to an embodiment.
[0144] According to an embodiment, the video decoding apparatus 100 may use block shape information indicating that the current coding unit is non-square. The video decoding apparatus 100 may determine whether to not split the non-square current coding unit or to split it in a predetermined manner according to the partition mode information. Referring to FIG. 4, when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the video decoding apparatus 100 may determine a coding unit 410 or 460 having the same size as the current coding unit 400 or 450 according to the partition mode information indicating no partition, or may determine partitioned coding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, and 480c according to the partition mode information indicating a predetermined partition method. The predetermined partition method for partitioning a non-square coding unit will be described in detail below through various embodiments.
[0145] According to an embodiment, the video decoding apparatus 100 may determine a manner in which a coding unit is divided using the partition mode information, and in this case, the partition mode information may indicate the number of at least one coding unit generated by dividing the coding unit. Referring to FIG 4, when the partition mode information indicates that the current coding unit 400 or 450 is divided into two coding units, the video decoding apparatus 100 may divide the current coding unit 400 or 450 based on the partition mode information and determine two coding units 420a, 420b or 470a, 470b included in the current coding unit.
[0146] When the video decoding device 100 according to an embodiment divides the non-square shaped current coding unit 400 or 450 based on the division shape mode information, the video decoding device 100 may divide the current coding unit in consideration of a position of a long side of the non-square shaped current coding unit 400 or 450. For example, the video decoding device 100 may divide the current coding unit 400 or 450 in a direction dividing the long side of the current coding unit 400 or 450 in consideration of the shape of the current coding unit 400 or 450 to determine a plurality of coding units.
[0147] According to an embodiment, when the partition mode information indicates that the coding unit is to be partitioned into an odd number of blocks (ternary partitioning), the video decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450. For example, when the partition mode information indicates that the current coding unit 400 or 450 is to be partitioned into three coding units, the video decoding device 100 may partition the current coding unit 400 or 450 into three coding units 430a, 430b, 430c, 480a, 480b, and 480c.
[0148] According to an embodiment, the width-to-height ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the width-to-height ratio is 4:1, the width is greater than the height, so the block shape information is also horizontal. When the width-to-height ratio is 1:4, the width is smaller than the height, so the block shape information is also vertical. The video decoding apparatus 100 may determine to divide the current coding unit into an odd number of blocks based on the partition shape mode information. In addition, the video decoding apparatus 100 may determine a partition direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is vertical, the video decoding apparatus 100 may divide the current coding unit 400 in the horizontal direction to determine coding units 430a, 430b, and 430c. Also, if the current coding unit 450 is horizontal, the video decoding apparatus 100 may divide the current coding unit 450 vertically to determine coding units 480a, 480b, and 480c.
[0149] According to an embodiment, the video decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and the determined coding units may not all have the same size. For example, in the determined odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c, the size of a given coding unit 430b or 480b may be different from the other coding units 430a, 430c, 480a, and 480c. That is, the coding units that may be determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, the odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c may have different sizes.
[0150] According to an embodiment, when the partition mode information indicates that a coding unit is partitioned into an odd number of blocks, the video decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and may further impose a certain restriction on at least one coding unit among the odd number of coding units generated by partitioning. Referring to FIG 4, the video decoding device 100 may perform a decoding process for the central coding unit 430b, 480b among three coding units 430a, 430b, 430c, 480a, 480b, 480c generated by partitioning the current coding unit 400 or 450 differently from the other coding units 430a, 430c, 480a, 480c. For example, the video decoding device 100 may limit the centrally located coding units 430b and 480b from being further divided, unlike the other coding units 430a, 430c, 480a, and 480c, or may limit the coding units 430b and 480b to being divided only a predetermined number of times.
[0151] FIG. 5 illustrates a process in which a video decoding apparatus 100 divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment.
[0152] According to an embodiment, the video decoding apparatus 100 may determine whether or not to divide the square-shaped first coding unit 500 into coding units based on at least one of the block shape information and the partition shape mode information. According to an embodiment, if the partition shape mode information indicates that the first coding unit 500 is to be partitioned horizontally, the video decoding apparatus 100 may partition the first coding unit 500 horizontally to determine the second coding unit 510. According to an embodiment, the first coding unit, the second coding unit, and the third coding unit used are terms used to understand the partitioning context between the coding units. For example, if the first coding unit is partitioned, the second coding unit may be determined, and if the second coding unit is partitioned, the third coding unit may be determined. In the following, the relationship between the first coding unit, the second coding unit, and the third coding unit used may be understood to be according to the above-mentioned characteristics.
[0153] According to an embodiment, the video decoding apparatus 100 may determine whether or not to divide the determined second coding unit 510 into coding units based on the partition mode information. Referring to FIG. 5, the video decoding apparatus 100 may divide the first coding unit 500 based on the partition mode information, and divide the determined non-square second coding unit 510 into at least one third coding unit 520a, 520b, 520c, 520d, or may not divide the second coding unit 510. The video decoding apparatus 100 may acquire partition mode information, and may divide the first coding unit 500 based on the acquired partition mode information, for example, into a plurality of second coding units 510 of various types, and the second coding units 510 may also be divided according to the manner in which the first coding unit 500 was divided based on the partition mode information. According to an embodiment, when the first coding unit 500 is divided into the second coding unit 510 based on the division mode information related to the first coding unit 500, the second coding unit 510 is also divided into, for example, third coding units 520a, 520b, 520c, and 520d based on the division mode information related to the second coding unit 510. That is, the coding units are also divided recursively based on the division mode information related to each coding unit. Thus, in a non-square coding unit, a square coding unit is determined, and such a square coding unit is recursively divided to determine a non-square coding unit.
[0154] Referring to FIG. 5, in the odd number of third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510, a predetermined coding unit (e.g., a coding unit located in the middle or a square coding unit) is also divided recursively. According to an embodiment, the square third coding unit 520b, which is one of the odd number of third coding units 520b, 520c, and 520d, is divided horizontally into a plurality of fourth coding units. The non-square fourth coding unit 530b or 530d, which is one of the plurality of fourth coding units 530a, 530b, 530c, and 530d, is also divided into a plurality of coding units. For example, the non-square fourth coding unit 530b or 530d is further divided into an odd number of coding units. A method used for recursive division of coding units will be described below through various embodiments.
[0155] The video decoding device 100 according to an embodiment may divide each of the third coding units 520a, 520b, 520c, and 520d into coding units based on the division mode information. The video decoding device 100 may also determine not to divide the second coding unit 510 based on the division mode information. The video decoding device 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d according to an embodiment. The video decoding device 100 may place a predetermined restriction on a certain third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the video decoding device 100 may restrict the coding unit 520c located in the middle of the odd number of third coding units 520b, 520c, and 520d so that it is not further divided, or may restrict it to be divided a settable number of times.
[0156] 5, the video decoding apparatus 100 may restrict the coding unit 520c located in the middle of the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to not be further divided or to be divided into a predetermined division form (e.g., divided into only four coding units or divided into a form corresponding to the division form of the second coding unit 510), or to be divided into a predetermined number of times (e.g., divided into n times, n>0). However, the above restriction on the coding unit 520c located in the middle is merely a simple embodiment, and should not be construed as being limited to the above embodiment, but should be construed as including various restrictions in which the coding unit 520c located in the middle is decoded differently from the other coding units 520b and 520d.
[0157] The video decoding apparatus 100 according to an embodiment may obtain partition mode information used to partition the current coding unit at a predetermined position within the current coding unit.
[0158] FIG. 6 illustrates a method for a video decoding apparatus 100 to determine a predetermined coding unit from among an odd number of coding units according to an embodiment.
[0159] 6, the partition mode information of the current coding unit 600, 650 is also obtained from a sample at a predetermined position (e.g., samples 640, 690 located in the middle) among a plurality of samples included in the current coding unit 600, 650. However, the predetermined position in the current coding unit 600 from which at least one of the partition mode information is obtained is not limited to the center position shown in FIG. 6, and the predetermined position may include various positions (e.g., top end, bottom end, left end, right end, top left end, bottom left end, top right end, bottom right end, etc.) included in the current coding unit 600. The video decoding apparatus 100 may obtain the partition mode information obtained from the predetermined position and determine whether to partition the current coding unit into coding units of various types and sizes or not to divide the current coding unit.
[0160] According to an embodiment, when a current coding unit is divided into a predetermined number of coding units, the video decoding apparatus 100 may select one of the coding units. There are various methods for selecting one of the multiple coding units, and the methods will be described below in the following various embodiments.
[0161] According to an embodiment, the video decoding apparatus 100 may divide a current coding unit into a plurality of coding units and determine a coding unit at a predetermined position.
[0162] According to an embodiment, the video decoding apparatus 100 may use information indicating the positions of the odd coding units to determine a coding unit located in the middle of the odd coding units. Referring to FIG 6, the video decoding apparatus 100 may divide a current coding unit 600 or a current coding unit 650 to determine odd coding units 620a, 620b, and 620c or odd coding units 660a, 660b, and 660c. The video decoding apparatus 100 may determine the middle coding unit 620b or the middle coding unit 660b using information regarding the positions of the odd coding units 620a, 620b, and 620c or the odd coding units 660a, 660b, and 660c. For example, the video decoding device 100 can determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of predetermined samples included in the coding units 620a, 620b, and 620c to determine the center coding unit 620b. Specifically, the video decoding device 100 can determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c to determine the center coding unit 620b.
[0163] According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may include information related to the positions or coordinates of the coding units 620a, 620b, and 620c in a picture. According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may include information indicating a width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and such width or height corresponds to information indicating a difference between the coordinates of the coding units 620a, 620b, and 620c in a picture. That is, the video decoding device 100 can determine the coding unit 620b located in the middle by directly using information related to the positions or coordinates of the coding units 620a, 620b, and 620c within the picture, or by using information related to the width or height of the coding unit corresponding to the coordinate difference value.
[0164] According to an embodiment, information indicating a position of the top left sample 630a of the top coding unit 620a may indicate (xa, ya) coordinates, information indicating a position of the top left sample 530b of the middle coding unit 620b may indicate (xb, yb) coordinates, and information indicating a position of the top left sample 630c of the bottom coding unit 620c may indicate (xc, yc) coordinates. The video decoding device 100 may determine the middle coding unit 620b using the coordinates of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the top left samples 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the middle sample 630b may be determined as the middle coding unit among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the top left samples 630a, 630b, and 630c may indicate coordinates indicating absolute positions within a picture, and further, the (dxb, dyb) coordinates indicating the relative position of the top left sample 630b of the middle coding unit 620b and the (dxc, dyc) coordinates indicating the relative position of the top left sample 630c of the bottom coding unit 620c may be used. Furthermore, this should not be interpreted as being limited to the method described above of determining a coding unit at a predetermined position by using the coordinates of a sample as information indicating the position of the sample included in the coding unit, but should be interpreted as various arithmetic methods that can use the coordinates of the sample.
[0165] According to an embodiment, the video decoding device 100 may divide a current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select a coding unit from among the coding units 620a, 620b, and 620c according to a predetermined criterion. For example, the video decoding device 100 may select a coding unit 620b having a different size from the coding units 620a, 620b, and 620c.
[0166] According to an embodiment, the video decoding device 100 may determine the width or height of each of the coding units 620a, 620b, and 620c using (xa, ya) coordinates indicating the position of the top left sample 630a of the top coding unit 620a, (xb, yb) coordinates indicating the position of the top left sample 630b of the middle coding unit 620b, and (xc, yc) coordinates indicating the position of the top left sample 630c of the bottom coding unit 620c. The video decoding device 100 may determine the size of each of the coding units 620a, 620b, and 620c using (xa, ya), (xb, yb), and (xc, yc) coordinates indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the video decoding device 100 may determine the width of the top coding unit 620a as the width of the current coding unit 600. The video decoding apparatus 100 may determine the height of the top coding unit 620a as yb-ya. The video decoding apparatus 100 according to an embodiment may determine the width of the middle coding unit 620b as the width of the current coding unit 600. The video decoding apparatus 100 may determine the height of the middle coding unit 620b as yc-yb. The video decoding apparatus 100 according to an embodiment may determine the width or height of the bottom coding unit using the width or height of the current coding unit and the widths and heights of the top coding unit 620a and the middle coding unit 620b. The video decoding apparatus 100 may determine a coding unit having a different size from other coding units based on the determined widths and heights of the coding units 620a, 620b, and 620c. Referring to FIG. 6, the video decoding apparatus 100 may determine the middle coding unit 620b having a different size from the top coding unit 620a and the bottom coding unit 620c as a coding unit at a predetermined position. However, the above-mentioned process in which the video decoding device 100 determines coding units having different coding units and different sizes is merely one embodiment in which the coding unit at a predetermined position is determined using the size of the coding unit determined based on sample coordinates, and various other processes may also be used to determine the coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates.
[0167] The video decoding device 100 may determine the width or height of each of the coding units 660a, 660b, and 660c using the (xd, yd) coordinates indicating the position of the top left sample 670a of the left coding unit 660a, the (xe, ye) coordinates indicating the position of the top left sample 670b of the middle coding unit 660b, and the (xf, yf) coordinates indicating the position of the top left sample 670c of the right coding unit 660c. The video decoding device 100 may determine the size of each of the coding units 660a, 660b, and 660c using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the coding units 660a, 660b, and 660c.
[0168] According to an embodiment, the video decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The video decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. The video decoding device 100 according to an embodiment may determine the width of the middle coding unit 660b as xf-xe. The video decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 600. The video decoding device 100 according to an embodiment may determine the width or height of the right coding unit 660c using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the middle coding unit 660b. The video decoding device 100 may determine a coding unit having a size different from other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. 6, the video decoding apparatus 100 may determine a middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as a coding unit at a predetermined position. However, the above-described process of determining coding units having different coding units and different sizes by the video decoding apparatus 100 is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and various processes of determining a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates may also be used.
[0169] However, the position of the sample considered to determine the position of the coding unit is not to be interpreted as being limited to the upper left end as mentioned above, but may also be interpreted as information related to the position of any sample included in the coding unit being used.
[0170] According to an embodiment, the video decoding apparatus 100 may select a coding unit at a predetermined position among an odd number of coding units determined by dividing the current coding unit, taking into consideration the shape of the current coding unit. For example, if the current coding unit is non-square in shape with a width greater than its height, the video decoding apparatus 100 may determine a coding unit at a predetermined position along the horizontal direction. That is, the video decoding apparatus 100 may determine one of the coding units at different positions in the horizontal direction and set a restriction on the coding unit. If the current coding unit is non-square in shape with a height greater than its width, the video decoding apparatus 100 may determine a coding unit at a predetermined position along the vertical direction. That is, the video decoding apparatus 100 may determine one of the coding units at different positions in the vertical direction and set a restriction on the coding unit.
[0171] The video decoding apparatus 100 according to an embodiment may use information indicating the positions of each of the even number of coding units to determine a coding unit at a predetermined position among the even number of coding units. The video decoding apparatus 100 may determine the even number of coding units by dividing (binary dividing) the current coding unit, and may determine the coding unit at a predetermined position by using information regarding the positions of the even number of coding units. A detailed process related thereto corresponds to the process of determining a coding unit at a predetermined position (e.g., a middle position) among the odd number of coding units described in FIG. 6, and therefore will not be described in detail.
[0172] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, in order to determine a coding unit at a predetermined position among the plurality of coding units, the video decoding apparatus 100 may use predetermined information related to the coding unit at a predetermined position during the division process. For example, in order to determine a coding unit at a center among the plurality of coding units into which the current coding unit is divided, the video decoding apparatus 100 may use at least one of block shape information and partition shape mode information stored in a sample included in the center coding unit during the division process.
[0173] 6, the video decoding apparatus 100 may divide a current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, and may determine a coding unit 620b located in the middle of the plurality of coding units 620a, 620b, and 620c. Furthermore, the video decoding apparatus 100 may determine a coding unit 620b located in the middle by considering a position where the partition mode information is acquired. That is, the partition mode information of the current coding unit 600 is also acquired from a sample 640 located in the middle of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, the coding unit 620b including the sample 640 may be determined as the coding unit located in the middle. However, information used to determine the coding unit located in the middle is not limited to the partition mode information, and various information may be used in the process of determining the coding unit located in the middle.
[0174] According to an embodiment, the predetermined information for identifying the coding unit at the predetermined position is also obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, the video decoding device 100 may use partition mode information obtained from a sample at a predetermined position in the current coding unit 600 (e.g., a sample located at the middle of the current coding unit 600) to determine a coding unit at a predetermined position (e.g., a coding unit located at the middle of the coding units divided into a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600). That is, the video decoding device 100 may determine the sample at the predetermined position by considering the block format of the current coding unit 600, and may determine a coding unit 620b including a sample from which predetermined information (e.g., partition mode information) is obtained among the plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may set a predetermined restriction. 6, the video decoding apparatus 100 according to an embodiment may determine a sample 640 located in the middle of a current coding unit 600 as a sample from which certain information may be acquired, and may set a certain restriction in a decoding process for a coding unit 620b including such a sample 640. However, the position of the sample from which certain information may be acquired is not limited to the above position, but may be a sample at any position included in the coding unit 620b determined to set the restriction.
[0175] According to an embodiment, the position of the sample from which the predetermined information can be obtained is also determined according to the shape of the current coding unit 600. According to an embodiment, the block shape information may determine whether the shape of the current coding unit is square or non-square, and may determine the position of the sample from which the predetermined information can be obtained according to the shape. For example, the video decoding apparatus 100 may determine, using at least one of information related to the width and information related to the height of the current coding unit, a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as a sample from which the predetermined information can be obtained. For another example, when the block shape information related to the current coding unit indicates that the current coding unit is non-square, the video decoding apparatus 100 may determine one of the samples adjacent to a boundary that divides the long side of the current coding unit in half as a sample from which the predetermined information can be obtained.
[0176] When a current coding unit is divided into a plurality of coding units, the video decoding apparatus 100 according to an embodiment may use partition mode information to determine a coding unit at a predetermined position among the plurality of coding units. The video decoding apparatus 100 according to an embodiment may acquire partition mode information from a sample at a predetermined position included in the coding unit, and may divide a plurality of coding units generated by dividing the current coding unit using partition mode information acquired from a sample at a predetermined position included in each of the plurality of coding units. That is, the coding units are also recursively divided using partition mode information acquired from a sample at a predetermined position included in each of the coding units. The recursive division process of the coding unit has been described with reference to FIG. 5, and therefore a detailed description thereof will be omitted.
[0177] A video decoding device 100 according to one embodiment can divide a current coding unit and determine at least one coding unit, and can determine the order in which such at least one coding unit is decoded by a predetermined block (e.g., the current coding unit).
[0178] FIG. 7 illustrates an order in which a plurality of coding units are processed when a video decoding apparatus 100 divides a current coding unit and determines the plurality of coding units, according to an embodiment.
[0179] According to one embodiment, the video decoding device 100 may, based on the partition mode information, partition the first coding unit 700 vertically to determine the second coding units 710a and 710b, partition the first coding unit 700 horizontally to determine the second coding units 730a and 730b, or partition the first coding unit 700 vertically and horizontally to determine the second coding units 750a, 750b, 750c, and 750d.
[0180] 7, the video decoding device 100 may determine the order such that the second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction are processed in the horizontal direction (710c). The video decoding device 100 may determine the processing order of the second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction to be the vertical direction (730c). The video decoding device 100 may determine the processing order of the second coding units 750a, 750b, 750c, and 750d determined by dividing the first coding unit 700 in the vertical and horizontal directions according to a predetermined order (e.g., raster scan order or z scan order (750e)) in which the coding units located in one row are processed and then the coding units located in the next row are processed.
[0181] According to an embodiment, the video decoding apparatus 100 may recursively divide the coding units. Referring to FIG. 7, the video decoding apparatus 100 may divide the first coding unit 700 to determine a plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d, and may recursively divide each of the determined coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. A method of dividing the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d corresponds to a method of dividing the first coding unit 700. Thus, the multiple coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d are also divided into multiple coding units independently. Referring to FIG 7, the video decoding device 100 may divide the first coding unit 700 in the vertical direction to determine the second coding units 710a and 710b, and may further determine whether or not to divide each of the second coding units 710a and 710b independently.
[0182] In an embodiment, the video decoding apparatus 100 may divide the second coding unit 710a on the left side in the horizontal direction into third coding units 720a and 720b, and may not divide the second coding unit 710b on the right side.
[0183] According to an embodiment, the processing order of the coding units is also determined based on the division process of the coding units. In other words, the processing order of the divided coding units is also determined based on the processing order of the coding units immediately before the division. The video decoding device 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the second coding unit 710a on the left side, independently of the second coding unit 710b on the right side. Since the second coding unit 710a on the left side is divided in the horizontal direction and the third coding units 720a and 720b are determined, the third coding units 720a and 720b are also processed in the vertical direction (720c). In addition, since the order in which the second coding unit 710a on the left side and the second coding unit 710b on the right side are processed corresponds to the horizontal direction (710c), the third coding units 720a and 720b included in the second coding unit 710a on the left side are processed in the vertical direction (720c), and then the right coding unit 710b is processed. The above content is intended to explain a process in which the processing order of the coding units is determined based on the coding units before division, and should not be construed as being limited to the above embodiment, but should be construed as being used in various methods in which the coding units determined by being divided in various forms are processed independently in a predetermined order.
[0184] FIG. 8 illustrates a process in which a video decoding apparatus 100 determines that a current coding unit is to be divided into an odd number of coding units when the coding units cannot be processed in a predetermined order, according to an embodiment.
[0185] The video decoding apparatus 100 according to an embodiment may determine that the current coding unit is divided into an odd number of coding units based on the acquired division mode information. Referring to FIG. 8, a square-shaped first coding unit 800 is also divided into non-square-shaped second coding units 810a and 810b, and the second coding units 810a and 810b are also independently divided into third coding units 820a, 820b, 820c, 820d, and 820e. The video decoding apparatus 100 according to an embodiment may divide the left coding unit 810a of the second coding unit in the horizontal direction to determine a plurality of third coding units 820a and 820b, and may divide the right coding unit 810b into an odd number of third coding units 820c, 820d, and 820e.
[0186] According to an embodiment, the video decoding apparatus 100 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e can be processed in a predetermined order, and may determine whether there is an odd number of coding units. Referring to FIG. 8, the video decoding apparatus 100 may recursively divide the first coding unit 800 to determine the third coding units 820a, 820b, 820c, 820d, and 820e. The video decoding apparatus 100 may determine whether the first coding unit 800, the second coding unit 810a, 810b, or the third coding unit 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units in the division type based on at least one of the block type information and the division type mode information. For example, in the second coding units 810a and 810b, the coding units located on the right side are also divided into an odd number of third coding units 820c, 820d, and 820e. The order in which the multiple coding units included in the first coding unit 800 are processed may be a predetermined order (e.g., z scan order (830)), and the video decoding device 100 may determine whether the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into an odd number of units satisfy a condition for being processed in the predetermined order.
[0187] According to an embodiment, the video decoding apparatus 100 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e included in the first coding unit 800 satisfy a condition for being processed in a predetermined order, the condition being related to whether at least one of the width and height of the second coding units 810a and 810b is divided in half along the boundary between the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the third coding units 820a and 820b determined by dividing the height of the non-square left second coding unit 810a in half may satisfy the condition. It is also determined that the third coding units 820c, 820d, and 820e, which are determined by dividing the right second coding unit 810b into three coding units, do not satisfy the condition because the boundary of the third coding units 820c, 820d, and 820e does not divide the width or height of the right second coding unit 810b in half. If such a condition is not satisfied, the video decoding device 100 may determine that there is a disconnection in the scanning order, and may determine that the right second coding unit 810b is divided into an odd number of coding units based on the determination result. When the coding units are divided into an odd number of coding units, the video decoding device 100 according to an embodiment may impose a certain restriction on a coding unit at a predetermined position among the divided coding units. The content of such a restriction or the predetermined position has been described through various embodiments, and detailed description thereof will be omitted.
[0188] FIG. 9 illustrates a process in which a video decoding apparatus 100 divides a first coding unit 900 to determine at least one coding unit, according to an embodiment.
[0189] The video decoding apparatus 100 according to an embodiment may divide the first coding unit 900 based on the division mode information acquired through a receiving unit (not shown). The square-shaped first coding unit 900 may be divided into four square-shaped coding units or into a plurality of non-square-shaped coding units. For example, referring to FIG. 9, if the first coding unit 900 is a square and the division mode information indicates that the first coding unit 900 is to be divided into non-square coding units, the video decoding apparatus 100 may divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the division mode information indicates that the first coding unit 900 is to be divided horizontally or vertically to determine an odd number of coding units, the video decoding device 100 can divide the square-shaped first coding unit 900 into second coding units 910a, 910b, and 910c determined by dividing it vertically, or second coding units 920a, 920b, and 920c determined by dividing it horizontally, as an odd number of coding units.
[0190] According to an embodiment, the video decoding apparatus 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition to be processed in a predetermined order, and the condition relates to whether at least one of the width and height of the first coding unit 900 is divided in half along the boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to FIG. 9, the boundary of the second coding units 910a, 910b, and 910c determined by dividing the square-shaped first coding unit 900 in the vertical direction does not divide the width of the first coding unit 900 in half, so it is also determined that the first coding unit 900 does not satisfy the condition to be processed in a predetermined order. In addition, since the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction do not divide the width of the first coding unit 900 in half, it is determined that the first coding unit 900 does not satisfy the condition to be processed in a predetermined order. If such a condition is not satisfied, the video decoding device 100 may determine that the scanning order is broken, and may determine that the first coding unit 900 is divided into an odd number of coding units based on the determination result. When the coding unit is divided into an odd number of coding units, the video decoding device 100 according to an embodiment may impose a predetermined restriction on a coding unit at a predetermined position among the divided coding units, and the content of such a restriction or the predetermined position has been described through various embodiments, and detailed description thereof will be omitted.
[0191] According to an embodiment, the video decoding apparatus 100 may divide the first coding unit and determine various types of coding units.
[0192] 9, the video decoding apparatus 100 may divide a square-shaped first coding unit 900, a non-square-shaped first coding unit 930, or a non-square-shaped first coding unit 950 into various types of coding units.
[0193] FIG. 10 illustrates that, in one embodiment, a video decoding device 100 restricts the manner in which a second coding unit may be divided when a non-square second coding unit determined by dividing a first coding unit 1000 satisfies a certain condition.
[0194] The video decoding device 100 according to an embodiment may determine to divide the square-shaped first coding unit 1000 into non-square-shaped second coding units 1010a, 1010b, 1020a, and 1020b based on the division mode information acquired through a receiving unit (not shown). The second coding units 1010a, 1010b, 1020a, and 1020b may be divided independently. Thus, the video decoding device 100 may determine whether to divide the first coding unit 1000 into a plurality of coding units or not to divide the first coding unit 1000 based on the division mode information related to each of the second coding units 1010a, 1010b, 1020a, and 1020b. The video decoding device 100 according to an embodiment may determine the third coding units 1012a and 1012b by dividing the left non-square-shaped second coding unit 1010a determined by dividing the first coding unit 1000 vertically in the horizontal direction. However, when the video decoding device 100 divides the left second coding unit 1010a in the horizontal direction, the right second coding unit 1010b may be restricted so as not to be divided horizontally in the same direction as the left second coding unit 1010a is divided. If the right second coding unit 1010b is divided in the same direction and the third coding units 1014a and 1014b are determined, the left second coding unit 1010a and the right second coding unit 1010b may be divided independently in the horizontal direction to determine the third coding units 1012a, 1012b, 1014a, and 1014b. However, this is the same result as when the video decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on the division mode information, and this is inefficient in terms of video decoding.
[0195] According to an embodiment, the video decoding device 100 may vertically divide the non-square second coding unit 1020a or 1020b, which is determined by dividing the first coding unit 1000 in the horizontal direction, to determine the third coding units 1022a, 1022b, 1024a, and 1024b. However, when the video decoding device 100 divides one of the second coding units (e.g., the upper second coding unit 1020a) in the vertical direction, the video decoding device 100 may restrict the other second coding units (e.g., the lower coding unit 1020b) from being divided vertically in the same direction as the upper second coding unit 1020a, for the above-mentioned reasons.
[0196] FIG. 11 illustrates a process in which the video decoding apparatus 100 divides a square-shaped coding unit when the division mode information does not indicate division into four square-shaped coding units, according to one embodiment.
[0197] According to an embodiment, the video decoding device 100 may divide the first coding unit 1100 into second coding units 1110a, 1110b, 1120a, and 1120b based on the division mode information. The division mode information may include information related to various types into which the coding unit may be divided, and the information related to various types may include information for dividing the coding unit into four square coding units. According to such division mode information, the video decoding device 100 may not divide the square-shaped first coding unit 1100 into four square-shaped second coding units 1130a, 1130b, 1130c, and 1130d. Based on the division mode information, the video decoding device 100 may determine the non-square-shaped second coding units 1110a, 1110b, 1120a, and 1120b.
[0198] According to an embodiment, the video decoding apparatus 100 may independently divide the non-square second coding units 1110a, 1110b, 1120a, and 1120b. The second coding units 1110a, 1110b, 1120a, and 1120b are divided in a predetermined order through a recursive method, which corresponds to the method of dividing the first coding unit 1100 based on the division mode information.
[0199] For example, the video decoding device 100 may divide the left second coding unit 1110a in the horizontal direction to determine square third coding units 1112a and 1112b, and may divide the right second coding unit 1110b in the horizontal direction to determine square third coding units 1114a and 1114b. Furthermore, the video decoding device 100 may divide both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction to determine square third coding units 1116a, 1116b, 1116c, and 1116d. In this case, the coding units may be determined in the same form as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.
[0200] For another example, the video decoding device 100 may vertically divide the top second coding unit 1120a to determine square third coding units 1122a and 1122b, and may vertically divide the bottom second coding unit 1120b to determine square third coding units 1124a and 1124b. Furthermore, the video decoding device 100 may vertically divide both the top second coding unit 1120a and the bottom second coding unit 1120b to determine square third coding units 1126a, 1126b, 1126a, and 1126b. In this case, the coding units may be determined in the same form as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.
[0201] FIG. 12 illustrates that a processing order among multiple coding units may vary depending on a division process of the coding units, according to an embodiment.
[0202] According to an embodiment, the video decoding apparatus 100 may divide the first coding unit 1200 based on the partition mode information. When the block shape is a square and the partition mode information indicates that the first coding unit 1200 is partitioned in at least one of the horizontal and vertical directions, the video decoding apparatus 100 may divide the first coding unit 1200 to determine, for example, second coding units 1210a, 1210b, 1220a, and 1220b. Referring to FIG. 12, the non-square second coding units 1210a, 1210b, 1220a, and 1220b determined by partitioning the first coding unit 1200 only in the horizontal or vertical direction are also independently divided based on the partition mode information associated therewith. For example, the video decoding apparatus 100 may determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 vertically, and may determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 horizontally. The process of dividing the second coding units 1210a, 1210b, 1220a, and 1220b has been described with reference to FIG. 11, and a detailed description thereof will be omitted.
[0203] The video decoding device 100 according to an embodiment may process the coding units in a predetermined order. The characteristics related to the processing of the coding units in a predetermined order have been described with reference to FIG. 7, and therefore detailed description thereof will be omitted. Referring to FIG. 12, the video decoding device 100 may divide the square-shaped first coding unit 1200 to determine four square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The video decoding device 100 according to an embodiment may determine the processing order of the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d according to the manner in which the first coding unit 1200 is divided.
[0204] According to one embodiment, the video decoding device 100 can horizontally divide the second coding units 1210a and 1210b, which have been generated by dividing them vertically, to determine the third coding units 1216a, 1216b, 1216c, and 1216d. The video decoding device 100 can process the third coding units 1216a, 1216b, 1216c, and 1216d in an order (1217) of first vertically processing the third coding units 1216a and 1216c included in the left second coding unit 1210a, and then vertically processing the third coding units 1216b and 1216d included in the right second coding unit 1210b.
[0205] According to one embodiment, the video decoding device 100 can vertically divide the second coding units 1220a and 1220b generated by dividing them horizontally to determine the third coding units 1226a, 1226b, 1226c, and 1226d, and the video decoding device 100 can process the third coding units 1226a, 1226b, 1226c, and 1226d in an order (1227) of first horizontally processing the third coding units 1226a and 1226b included in the upper second coding unit 1220a, and then horizontally processing the third coding units 1226c and 1226d included in the lower second coding unit 1220b.
[0206] 12, the second coding units 1210a, 1210b, 1220a, and 1220b are each divided to determine square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The second coding units 1210a and 1210b determined by dividing in the vertical direction and the second coding units 1220a and 1220b determined by dividing in the horizontal direction are divided in different shapes, but the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d determined thereafter ultimately result in the first coding unit 1200 being divided into coding units of the same shape. As a result, the video decoding device 100 recursively divides the coding units through different processes based on the division type mode information, so that even if coding units of the same type are determined as a result, multiple coding units determined to be of the same type can be processed in different orders from each other.
[0207] FIG. 13 illustrates a process of determining the depth of a coding unit according to changes in the shape and size of the coding unit when a coding unit is recursively divided to determine a plurality of coding units, according to one embodiment.
[0208] According to an embodiment, the video decoding apparatus 100 may determine the depth of a coding unit according to a predetermined criterion. For example, the predetermined criterion may be the long side length of the coding unit. When the long side length of the current coding unit is divided into 2n (n>0) times the long side length of the coding unit before division, the video decoding apparatus 100 may determine that the depth of the current coding unit is increased by n from the depth of the coding unit before division. Hereinafter, the coding unit with the increased depth will be referred to as a coding unit of a lower depth.
[0209] Referring to FIG. 13, according to an embodiment, the video decoding apparatus 100 may divide the square-shaped first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may indicate "0:SQUARE"), and determine the second coding unit 1302, the third coding unit 1304, etc., of a lower depth. If the size of the square-shaped first coding unit 1300 is 2Nx2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by 1 / 2 may have a size of NxN. Furthermore, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 by 1 / 2 may have a size of N / 2xN / 2. In this case, the width and height of the third coding unit 1304 correspond to 1 / 4 times that of the first coding unit 1300. If the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, which is 1 / 2 the width and height of the first coding unit 1300, is also D+1, and the depth of the third coding unit 1304, which is 1 / 4 the width and height of the first coding unit 1300, is also D+2.
[0210] According to one embodiment, based on block shape information indicating a non-square shape (for example, the block shape information may indicate "1:NS_VER" indicating a non-square shape in which the height is greater than the width, or "2:NS_HOR" indicating a non-square shape in which the width is greater than the height), the video decoding device 100 may divide the first coding unit 1310 or 1320, which is non-square, and determine a second coding unit 1312 or 1322, a third coding unit 1314 or 1324, etc., of a lower depth.
[0211] The video decoding device 100 may divide at least one of the width and height of the first coding unit 1310 having a size of Nx2N to determine, for example, the second coding units 1302, 1312, and 1322. That is, the video decoding device 100 may divide the first coding unit 1310 in the horizontal direction to determine the second coding unit 1302 having a size of NxN or the second coding unit 1322 having a size of NxN / 2, or may divide the first coding unit 1310 in the horizontal and vertical directions to determine the second coding unit 1312 having a size of N / 2xN.
[0212] The video decoding device 100 according to an embodiment may divide at least one of the width and height of the first coding unit 1320 having a size of 2NxN to determine, for example, the second coding units 1302, 1312, and 1322. That is, the video decoding device 100 may divide the first coding unit 1320 vertically to determine the second coding unit 1302 having a size of NxN or the second coding unit 1312 having a size of N / 2xN, and may divide the first coding unit 1320 horizontally and vertically to determine the second coding unit 1322 having a size of NxN / 2.
[0213] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1302 having a size of NxN to determine, for example, the third coding units 1304, 1314, and 1324. That is, the video decoding device 100 may divide the second coding unit 1302 in the vertical and horizontal directions to determine the third coding unit 1304 having a size of N / 2xN / 2, the third coding unit 1314 having a size of N / 4xN / 2, or the third coding unit 1324 having a size of N / 2xN / 4.
[0214] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1312 having a size of N / 2xN to determine, for example, the third coding units 1304, 1314, and 1324. That is, the video decoding device 100 may divide the second coding unit 1312 in the horizontal direction to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1324 having a size of N / 2xN / 4, or may divide the second coding unit 1312 in the vertical and horizontal directions to determine the third coding unit 1314 having a size of N / 4xN / 2.
[0215] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1322 having a size of NxN / 2 to determine, for example, the third coding units 1304, 1314, and 1324. That is, the video decoding device 100 may divide the second coding unit 1322 vertically to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1314 having a size of N / 4xN / 2, or may divide the second coding unit 1322 vertically and horizontally to determine the third coding unit 1324 having a size of N / 2xN / 4.
[0216] The video decoding apparatus 100 according to an embodiment may divide, for example, square-shaped coding units 1300, 1302, and 1304 in the horizontal or vertical direction. For example, the first coding unit 1300 having a size of 2Nx2N may be divided vertically to determine a first coding unit 1310 having a size of Nx2N, or may be divided horizontally to determine a first coding unit 1320 having a size of 2NxN. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 having a size of 2Nx2N in the horizontal or vertical direction may be the same as the depth of the first coding unit 1300.
[0217] According to an embodiment, the width and height of the third coding unit 1314 or 1324 corresponds to 1 / 4 times that of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322, which is 1 / 2 times the width and height of the first coding unit 1310 or 1320, is also D+1, and the depth of the third coding unit 1314 or 1324, which is 1 / 4 times the width and height of the first coding unit 1310 or 1320, is also D+2.
[0218] FIG. 14 illustrates a depth determined according to the type and size of a coding unit and an index (PID: part index) for coding unit partitioning according to one embodiment.
[0219] According to an embodiment, the video decoding apparatus 100 may divide the square-shaped first coding unit 1400 to determine various types of second coding units. Referring to FIG 14, the video decoding apparatus 100 may divide the first coding unit 1400 in at least one of a vertical direction and a horizontal direction according to the partition mode information to determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d. That is, the video decoding apparatus 100 may determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d based on the partition mode information related to the first coding unit 1400.
[0220] According to an embodiment, the depths of the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d determined by the division mode information related to the square-shaped first coding unit 1400 are also determined based on the long side length. For example, since the length of one side of the square-shaped first coding unit 1400 is the same as the long side length of the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b, the depths of the first coding unit 1400 and the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b can be regarded as being the same as D. In contrast, when the video decoding device 100 divides the first coding unit 1400 into four square-shaped second coding units 1406a, 1406b, 1406c, and 1406d based on the division mode information, the length of one side of the square-shaped second coding units 1406a, 1406b, 1406c, and 1406d is half the length of one side of the first coding unit 1400, so the depth of the second coding units 1406a, 1406b, 1406c, and 1406d is also a depth of D+1, which is one depth lower than the depth D of the first coding unit 1400.
[0221] The video decoding apparatus 100 according to an embodiment may divide a first coding unit 1410 having a height greater than its width in a horizontal direction according to the division mode information, and divide the first coding unit 1410 into a plurality of second coding units 1412a, 1412b, 1414a, 1414b, and 1414c. The video decoding apparatus 100 according to an embodiment may divide a first coding unit 1420 having a width greater than its height in a vertical direction according to the division mode information, and divide the first coding unit 1420 into a plurality of second coding units 1422a, 1422b, 1424a, 1424b, and 1424c.
[0222] According to an embodiment, the depths of the second coding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, and 1424c determined by the division mode information related to the non-square first coding unit 1410 or 1420 are also determined based on the long side length. For example, the length of one side of the square second coding units 1412a and 1412b is ½ times the length of one side of the non-square first coding unit 1410 whose height is greater than its width, so the depths of the square second coding units 1412a and 1412b are D+1, which is one depth lower than the depth D of the non-square first coding unit 1410.
[0223] Furthermore, the video decoding device 100 can divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division mode information. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, the long side length of the non-square second coding units 1414a and 1414c and the side length of the square second coding unit 1414b are 1 / 2 times the side length of the first coding unit 1410, so the depths of the second coding units 1414a, 1414b, and 1414c are also a depth of D+1, which is one depth lower than the depth D of the first coding unit 1410. The video decoding device 100 may determine the depth of a coding unit related to a non-square first coding unit 1420, whose width is greater than its height, in a manner corresponding to the above-mentioned manner for determining the depth of a coding unit related to the first coding unit 1410.
[0224] In determining an index (PID) for partitioning a divided coding unit, the video decoding apparatus 100 according to an embodiment may determine an index based on a ratio of sizes between the coding units when the coding units divided into an odd number of coding units are not the same size. Referring to FIG. 14, the coding unit 1414b located in the middle of the coding units 1414a, 1414b, and 1414c divided into an odd number of coding units has the same width as the other coding units 1414a and 1414c, but is twice as high as the other coding units 1414a and 1414c, which have different heights. That is, in this case, the coding unit 1414b located in the middle may include two of the other coding units 1414a and 1414c. Therefore, if the index (PID) of the coding unit 1414b located in the middle according to the scanning order is 1, the index of the coding unit 1414c located next in the order is 3, which is increased by 2. That is, discontinuity of the index value is present. According to one embodiment, the video decoding device 100 can determine whether coding units divided into an odd number of parts are not the same size as each other based on the existence of index discontinuity for such partitioning between the divided coding units.
[0225] According to an embodiment, the video decoding apparatus 100 may determine whether the current coding unit is divided into a specific division type based on the value of an index for distinguishing the plurality of coding units determined by dividing the current coding unit. Referring to FIG. 14, the video decoding apparatus 100 may divide a rectangular first coding unit 1410 whose height is greater than its width to determine even coding units 1412a, 1412b or odd coding units 1414a, 1414b, 1414c. The video decoding apparatus 100 may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to an embodiment, the PID may also be obtained from a sample at a predetermined position (e.g., the top left sample) of each coding unit.
[0226] The video decoding apparatus 100 according to an embodiment may determine a coding unit at a predetermined position among the coding units determined by dividing the coding units using an index for dividing the coding units. According to an embodiment, when the division mode information related to the rectangular first coding unit 1410 whose height is greater than its width indicates that the first coding unit 1410 is divided into three coding units, the video decoding apparatus 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The video decoding apparatus 100 may assign an index related to each of the three coding units 1414a, 1414b, and 1414c. The video decoding apparatus 100 may compare the indexes related to each coding unit to determine a middle coding unit among the odd number of coding units. The video decoding apparatus 100 may determine the coding unit 1414b having an index corresponding to a middle value among the indexes based on the indexes of the coding units as a coding unit at a middle position among the coding units determined by dividing the first coding unit 1410. In determining an index for partitioning the divided coding units, the video decoder 100 according to an embodiment may determine the index based on a ratio between the sizes of the coding units when the coding units are not the same size. Referring to FIG. 14, a coding unit 1414b generated by dividing a first coding unit 1410 has the same width as other coding units 1414a and 1414c, but is twice as high as other coding units 1414a and 1414c, which have different heights. In this case, if the index (PID) of the coding unit 1414b located in the middle is 1, the index of the coding unit 1414c located next thereto is 3, which is an increase of 2. In such a case, when the indexes are uniformly increased and the increase widths are different, the video decoder 100 may determine that the coding unit has been divided into a plurality of coding units including a coding unit having a different size from other coding units.According to an embodiment, when the division mode information indicates that the current coding unit is divided into an odd number of coding units, the video decoding apparatus 100 may divide the current coding unit into a form in which a coding unit at a predetermined position (e.g., a middle coding unit) among the odd number of coding units has a different size from other coding units. In this case, the video decoding apparatus 100 may determine a middle coding unit having a different size using an index (PID) related to the coding units. However, the index and the size or position of the coding unit at the predetermined position to be determined are specific for describing an embodiment, and should not be construed as being limited thereto, and various indexes, positions and sizes of coding units may be used.
[0227] The video decoding apparatus 100 according to an embodiment may use a predetermined data unit from which recursive division of a coding unit begins.
[0228] FIG. 15 illustrates a number of coding units being determined according to a number of predetermined data units included in a picture, according to one embodiment.
[0229] According to an embodiment, the predetermined data unit is also defined as a data unit into which the coding unit starts to be recursively divided using the division mode information. That is, the predetermined data unit corresponds to a coding unit of the highest depth used in the process of determining a plurality of coding units into which the current picture is divided. Hereinafter, for convenience of explanation, such a predetermined data unit is referred to as a reference data unit.
[0230] According to an embodiment, the reference data unit may have a predetermined size and shape. According to an embodiment, the reference coding unit may include MxN samples, where M and N may be the same as each other or may be integers expressed by a power of 2. That is, the reference data unit may have a square or non-square shape, and then be divided into an integer number of coding units.
[0231] The video decoding apparatus 100 according to an embodiment may divide a current picture into a plurality of reference data units. The video decoding apparatus 100 according to an embodiment may divide a plurality of reference data units into which the current picture is divided, using partition mode information associated with each of the reference data units. The division process of the reference data units corresponds to a division process using a quad-tree structure.
[0232] According to an embodiment, the video decoding apparatus 100 may determine in advance a minimum size that a reference data unit included in a current picture may have, and may determine various sizes of reference data units that are equal to or larger than the minimum size, and may determine at least one coding unit using partition mode information based on the determined reference data unit.
[0233] 15, the video decoding apparatus 100 may use a square-shaped reference coding unit 1500 or a non-square-shaped reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined according to various data units (e.g., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.) including at least one reference coding unit.
[0234] A receiving unit (not shown) of the video decoding apparatus 100 according to an embodiment may obtain at least one of information related to the type of the base coding unit and information related to the size of the base coding unit from a bitstream for each of the various data units. Since the process of determining at least one coding unit included in the square-shaped base coding unit 1500 has been described through the process of dividing the current coding unit 300 in Fig. 3, and the process of determining at least one coding unit included in the non-square-shaped base coding unit 1502 has been described through the process of dividing the current coding unit 400 or 450 in Fig. 4, detailed description thereof will be omitted.
[0235] The video decoding apparatus 100 according to an embodiment may use an index for identifying the size and type of the reference coding unit in order to determine the size and type of the reference coding unit according to a certain data unit that is predetermined based on a predetermined condition. That is, a receiving unit (not shown) may acquire only an index for identifying the size and type of the reference coding unit for each data unit such as a slice, a slice segment, or a maximum coding unit as a data unit that satisfies a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the various data units (e.g., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.) from a bitstream. The video decoding apparatus 100 may determine the size and type of the reference data unit for each data unit that satisfies the predetermined condition by using the index. When information related to the type of the reference coding unit and information related to the size of the reference coding unit are acquired from the bitstream for each data unit of a relatively small size and used, the bitstream is not used efficiently. Therefore, instead of directly acquiring information related to the type of the reference coding unit and information related to the size of the reference coding unit, only the index may be acquired and used. In this case, at least one of the size and type of the reference coding unit corresponding to the index indicating the size and type of the reference coding unit is predefined. That is, the video decoding apparatus 100 may determine at least one of the size and type of the reference coding unit included in the data unit serving as a reference for index acquisition by selecting at least one of the size and type of the predefined reference coding unit according to the index.
[0236] The video decoding apparatus 100 according to an embodiment may use at least one reference coding unit included in one maximum coding unit. That is, the maximum coding unit into which a video is divided may include at least one reference coding unit, and coding units may be determined through a recursive division process of each reference coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit corresponds to an integer multiple of at least one of the width and height of the reference coding unit. According to an embodiment, the size of the reference coding unit is also a size obtained by dividing the maximum coding unit n times according to a quad tree structure. That is, the video decoding apparatus 100 may determine the base coding unit by dividing the maximum coding unit n times according to a quad tree structure, and may divide the base coding unit based on at least one of block configuration information and partition configuration mode information according to various embodiments.
[0237] FIG. 16 illustrates processing blocks that are responsible for determining a determination order of reference coding units included in a picture 1600 according to one embodiment.
[0238] The video decoding apparatus 100 according to an embodiment may determine at least one processing block for dividing a picture. The processing block is a data unit including at least one reference coding unit for dividing an image, and the at least one reference coding unit included in the processing block may be determined in a specific order. That is, the determination order of the at least one reference coding unit determined in each processing block corresponds to one of various orders in which the reference coding unit may be determined, and the determination order of the reference coding unit determined in each processing block may be different for each processing block. The determination order of the reference coding unit determined for 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 may be determined is not limited to the scan order.
[0239] According to an embodiment, the video decoding device 100 may obtain information related to processing block sizes and determine the size of at least one processing block included in the video. The video decoding device 100 may obtain information related to processing block sizes from a bitstream and determine the size of at least one processing block included in the video. Such a processing block size is also a predetermined size of a data unit indicated by the information related to the processing block size.
[0240] A receiving unit (not shown) of the video decoding device 100 according to an embodiment may acquire information related to a processing block size from a bitstream for each specific data unit. For example, the information related to the processing block size may be acquired from the bitstream for each data unit such as an image, a sequence, a picture, a slice, a slice segment, etc. That is, the receiving unit (not shown) may acquire information related to a processing block size from the bitstream for each of the many data units, and the video decoding device 100 may determine at least one processing block size for dividing a picture using the acquired information related to the processing block size, and such a processing block size may be an integer multiple of a reference coding unit.
[0241] The video decoding device 100 according to an embodiment may determine the size of the processing blocks 1602 and 1612 included in the picture 1600. For example, the video decoding device 100 may determine the processing block size based on information related to the processing block size acquired from a bitstream. Referring to FIG. 16, the video decoding device 100 according to an embodiment may determine the width of the processing blocks 1602 and 1612 to be four times the width of a reference coding unit and the height of the processing blocks 1602 and 1612 to be four times the height of the reference coding unit. The video decoding device 100 may determine an order in which at least one reference coding unit is determined within at least one processing block.
[0242] According to an embodiment, the video decoding device 100 may determine each of the processing blocks 1602 and 1612 included in the picture 1600 based on the processing block size, and may determine a determination order of at least one reference coding unit included in the processing blocks 1602 and 1612. According to an embodiment, the determination of the reference coding unit may include determining a reference coding unit size.
[0243] The video decoding apparatus 100 according to an embodiment may acquire information on a determination order of at least one reference coding unit included in at least one processing block from a bitstream, and may determine an order in which at least one reference coding unit is determined based on the acquired information on the determination order. The information on the determination order may also be defined as an order or direction in which the reference coding units are determined in the processing block. That is, the order in which the reference coding units are determined may be determined independently for each processing block.
[0244] The video decoding apparatus 100 according to an embodiment may obtain information related to a determination order of the reference coding units for each specific data unit from a bitstream. For example, a receiving unit (not shown) may obtain information related to a determination order of the reference coding units from a bitstream for each data unit path such as an image, a sequence, a picture, a slice, a slice segment, a processing block, etc. Since the information related to the determination order of the reference coding units indicates a determination order of the reference coding units in a processing block, the information related to the determination order is also obtained for each specific data unit including an integer number of processing blocks.
[0245] The video decoding device 100 may determine at least one reference coding unit based on the order determined according to an embodiment.
[0246] According to an embodiment, a receiving unit (not shown) may acquire information related to a base coding unit determination order as information related to the processing blocks 1602 and 1612 from a bitstream, and the video decoding apparatus 100 may determine an order for determining at least one base coding unit included in the processing blocks 1602 and 1612, and may determine at least one base coding unit included in the picture 1600 according to the determination order of the coding units. Referring to FIG. 16, the video decoding apparatus 100 may determine a determination order (1604, 1614) of at least one base coding unit related to each of the processing blocks 1602 and 1612. For example, when information related to the determination order of the base coding units is acquired for each processing block, the determination order of the base coding units for each of the processing blocks 1602 and 1612 may differ for each processing block. When the reference coding unit determination order 1604 for the processing block 1602 is the raster scan order, the reference coding units included in the processing block 1602 are also determined by the raster scan order. On the other hand, when the reference coding unit determination order (1614) for another processing block 1612 is the reverse of the raster scan order, the reference coding units included in the processing block 1612 are also determined by the reverse of the raster scan order.
[0247] The video decoding apparatus 100 may decode at least one reference coding unit determined according to an embodiment. The video decoding apparatus 100 may decode video based on the reference coding unit determined through the above-described embodiment. The method of decoding the reference coding unit may include various methods of decoding video.
[0248] The video decoding apparatus 100 according to an embodiment may acquire and use block type information indicating a type of a current coding unit or partition type mode information indicating a method of dividing the current coding unit from a bitstream. The partition type mode information may also be included in a bitstream related to various data units. For example, the video decoding apparatus 100 may use partition type mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, or a slice segment header. Furthermore, the video decoding apparatus 100 may acquire and use a syntax element corresponding to block type information or partition type mode information from the bitstream for each of a maximum coding unit, a reference coding unit, and a processing block.
[0249] A method for determining a division rule according to an embodiment of the present disclosure will now be described in detail.
[0250] The video decoding device 100 may determine a video partitioning rule. The partitioning rule is also predefined between the video decoding device 100 and the video encoding device 150. The video decoding device 100 may determine the video partitioning rule based on information acquired from a bitstream. The video decoding device 100 may determine the partitioning rule based on information acquired 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 video decoding device 100 may determine the partitioning rule differently depending on a frame, a slice, a temporal layer, a maximum coding unit, or a coding unit.
[0251] The video decoding device 100 may determine the partition rule based on a block type of the coding unit. The block type may include a size, a shape, a ratio of width and height, and an orientation of the coding unit. The video encoding device 150 and the video decoding device 100 may determine in advance to determine the partition rule based on the block type of the coding unit. However, the present invention is not limited thereto. The video decoding device 100 may determine the partition rule based on information acquired from a bitstream received from the video encoding device 150.
[0252] The shape of the coding unit may include a square and a non-square. If the width and height of the coding unit are the same, the video decoding device 100 may determine the shape of the coding unit to be a square. If the width and height of the coding unit are not the same, the video decoding device 100 may determine the shape of the coding unit to be a non-square.
[0253] The size of the coding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256. The size of the coding unit may also be classified according to the long side length, short side length, or width of the coding unit. The video decoding device 100 may apply the same division rule to coding units classified into the same group. For example, the video decoding device 100 may classify coding units having the same long side length into the same size. In addition, the video decoding device 100 may apply the same division rule to coding units having the same long side length.
[0254] The ratio of the width and height of the coding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, or 16:1, etc. The direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction indicates that the length of the coding unit width is greater than the height. The vertical direction indicates that the length of the coding unit width is smaller than the height.
[0255] The video decoding device 100 may adaptively determine a partitioning rule based on the size of the coding unit. The video decoding device 100 may determine an allowable partitioning mode differently based on the size of the coding unit. For example, the video decoding device 100 may determine whether partitioning is allowed based on the size of the coding unit. The video decoding device 100 may determine a partitioning direction according to the size of the coding unit. The video decoding device 100 may determine an allowable partitioning type according to the size of the coding unit.
[0256] Determining the partitioning rule based on the size of the coding unit is also a default partitioning rule between the video encoding device 150 and the video decoding device 100. In addition, the video decoding device 100 can determine the partitioning rule based on information obtained from the bitstream.
[0257] The video decoding device 100 can adaptively determine the partitioning rule based on the position of the coding unit. The video decoding device 100 can adaptively determine the partitioning rule based on the position that the coding unit occupies in the video.
[0258] Furthermore, the video decoding device 100 may determine a division rule such that the coding units generated in different division paths do not have the same block type. However, the present invention is not limited thereto, and the coding units generated in different division paths may have the same block type. The coding units generated in different division paths may have different decoding process orders. The decoding process order has been described with reference to FIG. 12, and therefore will not be described in detail.
[0259] Hereinafter, with reference to Figures 17 to 29, a video encoding / decoding method and device therefor will be described in detail, in which a filtering reference sample and a filter weighting value to be applied to a filter are determined, and intra prediction is performed adaptively based on the filtering reference sample and the filter weighting value.
[0260] FIG. 17 is a diagram illustrating an intra prediction mode according to an embodiment.
[0261] 17, an intra prediction mode according to an embodiment may include a planar mode (0-times mode) and a DC mode (1-times mode). The intra prediction mode may also include an angular mode (2-times to 66-times mode) having a prediction direction. The angular mode may include a diagonal mode (2-times mode or 66-times mode), a horizontal mode (18-times mode), and a vertical mode (50-times mode).
[0262] Although an intra-prediction mode according to one embodiment has been described above with reference to FIG. 17, the present invention is not limited thereto, and it will be readily understood by those skilled in the art that various types of intra-prediction modes can be provided by adding new intra-prediction modes or removing existing intra-prediction modes, and that the mode number of each intra-prediction mode may differ depending on the case.
[0263] FIG. 18 is a diagram illustrating a method in which a video decoding apparatus generates reconstructed samples using original reference samples according to an embodiment of the present disclosure.
[0264] Referring to FIG. 18, the video decoding device 100 may generate reconstructed samples 1820 using original reference samples 1810 to perform intra prediction on a current block 1800.
[0265] For example, the video decoding apparatus 100 may generate a reconstructed reference sample 1835 corresponding to the position of the original reference sample 1830, using the original reference sample 1830. The video decoding apparatus 100 may generate a reconstructed reference sample 1845 corresponding to the position of the original reference sample 1840, using the original reference sample 1830 and the original reference sample 1840. The video decoding apparatus 100 may generate a reconstructed reference sample 1855 at a position corresponding to the original reference sample 1850 in a similar manner. In this case, the video decoding apparatus 100 may generate a reconstructed reference sample 1855 using the original reference sample 1850 and an original reference sample located to the left of the reference sample 1850 in the original reference sample 1810. That is, the video decoding apparatus 100 may calculate a reconstructed reference sample a' based on the following Equation (1). n can be generated.
[0266]
number
[0267] The reconstructed reference sample may also be generated by filtering at least one original reference sample, as described above.
[0268] Although an example of generating the reconstructed reference sample has been described with reference to Fig. 18, the present invention is not limited thereto, and the reconstructed reference sample may also be generated by filtering using a filter having the same weight and number of filter taps, for example, the reconstructed reference sample may also be generated by filtering using a [1,4] filter.
[0269] Alternatively, the video decoding apparatus 100 may adaptively determine filter weights and a number of filter taps according to the position of the original reference sample or the intra prediction mode of the current block, and perform filtering based on the filter weights and the number of filter taps to generate a reconstructed reference sample. Alternatively, the reconstructed reference sample may be adaptively determined filter weights and a number of filter taps according to the size of the current block, and perform filtering based on the filter weights and the number of filter taps to generate a reconstructed reference sample.
[0270] 19A and 19B are diagrams illustrating a method in which a video decoding device 100 generates a reconstructed sample using an original reference sample according to a prediction direction of an intra-prediction mode of a current block according to one embodiment of the present disclosure.
[0271] 19A and 19B, when the direction of the intra prediction mode of the current block is the prediction direction (1905), the video decoding device 100 may determine an original reference sample 1925 of an upper adjacent line on which filtering is performed to generate a reconstructed reference sample 1920 of an upper adjacent line, based on an 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 video decoding device 100 may generate a reconstructed sample a'j according to Equation (2) below.
[0272]
number
[0273] When the direction of the intra prediction mode of the current block is the prediction direction (1910), the video decoding device 100 may determine an original reference sample 1925 of an upper adjacent line, on which filtering is performed to generate a reconstructed reference sample 1920 of an 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 video decoding device 100 may determine a reconstructed sample a' according to Equation (3) below. j can be generated.
[0274]
number
[0275] When the direction of the intra prediction mode of the current block is the prediction direction (1915), the video decoding device 100 may determine an original reference sample 1925 of an upper adjacent line on which filtering is performed to generate a reconstructed reference sample 1920 of an 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 video decoding device 100 may determine a reconstructed sample a' according to Equation (4) below. j can be generated.
[0276]
number
[0277] The video decoding apparatus 100 may generate reconstructed reference samples for the left adjacent line in a manner similar to that for generating reconstructed reference samples for the upper adjacent line.
[0278] 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 sample 1945 of the left adjacent line that is filtered to generate a reconstructed reference sample 1940 of the left adjacent line based on the y-axis direction (1950) of the prediction direction (1905).
[0279] When the direction of the intra prediction mode of the current block is the prediction direction (1910), the video decoding device 100 can determine the original reference sample 1945 of the left adjacent line that is filtered to generate a reconstructed reference sample 1940 of the left adjacent line based on the y-axis direction (1950) of the prediction direction (1910).
[0280] When the direction of the intra prediction mode of the current block is the prediction direction (1915), the video decoding device 100 can determine the original reference sample 1945 of the left adjacent line that is filtered to generate a reconstructed reference sample 1940 of the left adjacent line based on the y-axis direction (1955) of the prediction direction (1915).
[0281] FIG. 20 is a diagram illustrating a method in which a video decoding apparatus generates a reconstructed sample using an original reference sample according to an embodiment of the present disclosure.
[0282] Referring to FIG. 20, the video decoding apparatus 100 uses an original reference sample a 0 , …, a N Sample a' reconstructed using 0 , …, a' N can be generated.
[0283] When the prediction direction of the intra prediction mode of the current block 2000 is from the left to the right (i.e., the prediction direction is a direction located in the first quadrant in FIG. 19A), the video decoding apparatus 100 may generate a reconstructed reference sample 2015 corresponding to the position of the original reference sample by using the original reference sample 2010. The video decoding apparatus 100 may generate a reconstructed reference sample 2025 corresponding to the position of the original reference sample 2020 by using the original reference sample 2010 and the original reference sample 2020. The video decoding apparatus 100 may generate a reconstructed reference sample 2035 at a position corresponding to the original reference sample 2030 in a similar manner. In this case, the reconstructed reference sample 2035 may be generated by using the original reference sample 2030 and the original reference sample 2031 adjacent to the left of the original reference samples. That is, the video decoding apparatus 100 may generate a reconstructed reference sample a'j based on the following Equation (5).
[0284]
number
[0285] When the prediction direction of the intra prediction mode of the current block 2000 is from the right to the left (i.e., the prediction direction is a direction located in the second or third quadrant in FIG. 19A), the video decoding apparatus 100 may generate a reconstructed reference sample 2045 corresponding to the position of the original reference sample by using the original reference sample 2040. The video decoding apparatus 100 may generate a reconstructed reference sample 2055 corresponding to the position of the original reference sample 2050 by using the original reference sample 2040 and the original reference sample 2050. The video decoding apparatus 100 may generate a reconstructed reference sample 2035 at a position corresponding to the original reference sample 2030 in a similar manner. In this case, the video decoding apparatus 100 may generate a reconstructed reference sample 2035 by using the original reference sample 2030 and the original reference sample 2032 adjacent to the right of the original reference samples. That is, the video decoding apparatus 100 may calculate a reconstructed reference sample a' based on the following Equation (6): j can be generated.
[0286]
number
[0287] The video decoding apparatus 100 may generate a reconstructed reference sample for a left adjacent line in a manner similar to that of generating a reconstructed reference sample for an upper adjacent line. When the y-axis direction of the prediction direction of the intra prediction mode of the current block is from the bottom to the top (i.e., the prediction direction is a direction located in the first or second quadrant in FIG. 19A), the video decoding apparatus 100 may generate a reconstructed reference sample for a left adjacent line in a manner similar to that of generating a reconstructed reference sample for an upper adjacent line when the x-axis direction is from the right to the left.
[0288] The video decoding apparatus 100 may generate a reconstructed reference sample for a left adjacent line in a manner similar to that of generating a reconstructed reference sample for an upper adjacent line. When a y-axis direction of a prediction direction of an intra prediction mode of a current block is a direction from the top to the bottom (i.e., a direction in which the prediction direction is located in the third quadrant in FIG. 19A), the video decoding apparatus 100 may generate a reconstructed reference sample for a left adjacent line in a manner similar to that of generating a reconstructed reference sample for an upper adjacent line when an x-axis direction is a direction from the left to the right.
[0289] When the video decoding device 100 is in a DC mode with no directionality, a planar mode, or a vertical mode having only a vertical component and a horizontal mode having a horizontal component, the video decoding device 100 calculates a reconstructed reference sample a′ of the left or upper adjacent line based on Equation (7) as follows: j can be generated.
[0290]
number
[0291] The video decoding device 100 performs filtering on the original reference samples to generate reconstructed samples, and performs intra prediction on the current block using the reconstructed samples, thereby achieving the effect of performing intra prediction by referring to a wider variety of reference samples than when performing intra prediction using the original reference samples.
[0292] FIG. 21 is a diagram illustrating a process in which a video decoding apparatus according to an embodiment of the present disclosure performs intra prediction on a current block using original reference samples and reconstructed samples.
[0293] The video decoding apparatus 100 may generate a predicted value of a current sample in a current block using an original reference sample and a reconstructed reference sample. For example, when the intra prediction mode of the current block 2100 is a vertical mode, the video decoding apparatus 100 may generate a predicted value of the current sample 2110 using an original reference sample 2121 and a reconstructed reference sample 2131 located above the current sample 2110. For example, the video decoding apparatus 100 may generate a predicted value p of the current sample based on Equation (8). n can be generated.
[0294]
number
[0295] As described above, the video decoding device 100 calculates the predicted value p n In the above description, the video decoding device 100 generates the final predicted value p' of the current sample in a single step, but the present invention is not limited thereto. The video decoding device 100 may generate an initial predicted value by performing intra prediction using original reference samples, and perform filtering using the initial predicted value and the reconstructed reference samples, as in the conventional technology. n It is possible to generate values of
[0296] Although the video decoding device 100 has been described as performing intra prediction for the current block using both original reference samples and reconstructed reference samples with reference to FIG. 21, the present invention is not limited thereto, and may perform intra prediction for the current block using only original reference samples, or may perform intra prediction for the current block using only reconstructed samples.
[0297] With reference to FIG. 21, it has been described on the assumption that 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 the same, but the present invention is not limited thereto, and the second intra prediction mode is determined separately from the first intra prediction mode. For example, the intra prediction mode for the reconstructed reference sample may be determined for each block or for the 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.
[0298] FIG. 22 is a diagram illustrating a process in which a video decoding apparatus performs weighted prediction using original reference samples and reconstructed reference samples of a left adjacent line and an upper adjacent line.
[0299] The video decoding device 100 determines an original reference sample to be used for intra prediction among the original reference prediction samples based on the intra prediction mode of the current block 2200, determines a reconstructed sample of a left adjacent line and a reconstructed sample of an 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 performs weighted prediction on the current sample 2210 using the original reference sample and the reconstructed reference sample to generate a predicted value related to the current sample 2210.
[0300] For example, referring to FIG. 22, when the intra prediction mode of the current block is the vertical mode, the video decoding apparatus 100 selects an original reference sample a2220 located vertically of the current sample 2210 from the original reference sample 2220 of the upper adjacent line. j The video decoding apparatus 100 determines a reconstructed reference sample a′ located vertically to the current sample 2210. jIn addition, the video decoding apparatus 100 may determine a reconstructed reference sample b′ located in the horizontal direction of the current sample 2210. i The video decoding device 100 can determine the original reference sample a j , and the reconstructed reference sample a' j , b' i That is, the video decoding apparatus 100 can generate a predicted value p ij can be generated.
[0301]
number
[0302] Although the process of the video decoding apparatus 100 performing weighted prediction using an original reference sample, a reconstructed reference sample of a horizontally adjacent line to the left of the current sample, and a reconstructed reference sample of a vertically adjacent line to the top of the current sample has been described with reference to Fig. 22, the present invention is not limited thereto, and may determine a prediction direction for selecting a reconstructed reference sample for the current sample in consideration of a gradient change of the reference sample. That is, the video decoding apparatus 100 may determine a gradient direction of a reference sample having the same change tendency as a gradient value of the reference sample as a prediction direction for selecting a reconstructed reference sample for the current sample.
[0303] Figure 23 is a diagram illustrating a process in which a video decoding device performs weighted prediction using a predicted value generated by performing intra prediction using original reference samples and reconstructed reference samples of the left adjacent line and the upper adjacent line.
[0304] The video decoding apparatus 100 may generate an intermediate predicted value for a current sample in the current block by performing intra prediction based on original reference prediction samples according to an intra prediction mode of the current block 2300. The video decoding apparatus 100 may determine at least one reference sample among reconstructed reference samples of a left adjacent line and at least one reference sample among reconstructed reference samples of an upper adjacent line regardless of the intra prediction mode of the current block 2300. The video decoding apparatus 100 may generate a final predicted value for a current sample in the current block 2300 using the intermediate predicted value for the current sample in the current block 2300, the reconstructed reference sample of the left adjacent line, and the reconstructed reference sample of the upper adjacent line.
[0305] The video decoding device 100 calculates the final predicted value p' of the current sample in the current block based on Equation (10). ij can be generated.
[0306]
number
[0307] For example, referring to FIG. 23, a video decoding device includes a Ca i '[i,j]2310, Ca' j [i,j]2320 and Cp ij [i,j] 2330 to generate a final predicted value of the current sample in the current block 2300. However, those skilled in the art can easily understand that the filter coefficients disclosed in Fig. 23 may be unnormalized coefficients, or, when the video decoding device 100 actually uses the filter coefficients disclosed in Fig. 23, coefficients generated by performing normalization (i.e., performing an operation corresponding to an operation of dividing the filter coefficients by 16) may be ultimately used.
[0308] That is, the video decoding device 100 calculates the final predicted value p′ of the current sample based on the following Equation (11): ij can be determined.
[0309]
number
[0310] Meanwhile, with reference to FIG. 23, a process has been described in which the video decoding device 100 performs weighted prediction using a predicted value generated by performing intra prediction using an original reference sample, a reconstructed sample of a left adjacent line located horizontally of the current sample, and a reconstructed reference sample of a vertically upper adjacent line of the current sample. However, the present invention is not limited thereto, and it would be easily understood by those skilled in the art that weighted prediction can be performed using an original reference sample of a left adjacent line located horizontally of the current sample and an original reference sample of a vertically upper adjacent line of the current sample instead of the reconstructed reference sample.
[0311] FIG. 24 is a diagram illustrating a process in which a video decoding apparatus performs position-based intra prediction of a current sample when an intra prediction mode of a current block is one of a DC mode, a planar mode, and a vertical mode.
[0312] 24, the video decoding apparatus 100 calculates an intermediate predicted value P(x,y) of a current sample 2405 in a current block 2400, a sample value R of a left adjacent reference sample 2415 of the current sample 2405, and -1,y , the sample value R of the upper left adjacent reference sample 2420 of the current block -1,-1 , and the sample value R of the upper adjacent reference sample 2410 of the current sample 2405 x,-1 Using this, the final prediction P'(x,y) for the current sample 2405 can be determined.
[0313] In this case, the video decoding apparatus 100 may determine an intermediate predicted sample value P(x, y) of the current sample 2405 based on intra prediction according to the intra prediction mode of the current block.
[0314] For example, the video decoding apparatus 100 may determine the final predicted sample value P'(x, y) of the current sample based on Equation 12 below.
[0315]
number
[0316]
number
[0317] FIG. 25 is a diagram illustrating a process in which a video decoding apparatus performs position-based intra prediction on a current sample when an intra prediction mode of a current block is a diagonal mode in a lower-left direction.
[0318] Referring to FIG. 25, the video decoding device 100 can generate a predicted value P(x',y') of the current sample 2505 using an intermediate predicted value P(x',y') of the current sample 2505, a sample value R(-1,y) of a sample 2510 located on a line diagonally downward from the current sample 2505, and a sample value R(x,-1) of a sample 2515 located on a line in the opposite direction to the line diagonally downward from the current sample 2505.
[0319] In this case, the video decoding apparatus 100 may determine an intermediate predicted sample value P(x', y') of the current sample 2505 based on intra prediction according to the conventional intra prediction mode (lower left diagonal mode) of the current block. The lower left diagonal mode is also a two-time mode.
[0320] For example, the video decoding apparatus 100 may determine the final predicted sample value P'(x', y') of the current sample based on Equation (14) and Equation (15) below.
[0321]
number
[0322]
number
[0323] Referring to FIG. 26, the video decoding device 100 can generate a predicted value P'(x',y') of the current sample 2605 using an intermediate predicted value P(x',y') of the current sample 2605, a sample value R(x,-1) of a sample 2610 located on a line extending diagonally from the current sample 2605 to the upper right, and a sample value R(-1,y) of a sample 2615 located in the opposite direction of the line extending diagonally from the current sample 2605 to the upper right.
[0324] In this case, the video decoding device 100 may determine an intermediate predicted sample value P(x', y') of the current sample 2605 based on intra prediction according to the intra prediction mode (diagonal mode in the upper right direction) of the current block. The diagonal mode in the upper right direction is also a 66-fold mode.
[0325] For example, the video decoding apparatus 100 may determine the final predicted sample value P'(x', y') of the current sample based on the following Equations (16) and (17).
[0326]
number
[0327]
number
[0328] 27, the video decoding apparatus 100 may generate a prediction value of a current sample 2705 in a current block 2700 by using an intermediate prediction value P(x',y') of the current sample 2705 and a sample value R(x,-1) of a sample 2710 located in the opposite direction of a line extending in a lower left direction according to the angular mode from the current sample 2705. The angular mode adjacent to the diagonal mode in the lower left direction may be one of 3-fold to 10-fold modes.
[0329] In this case, the video decoding apparatus 100 may determine an intermediate predicted sample value P(x', y') of the current sample 2705 based on intra prediction according to the intra prediction mode (angular mode in the lower left direction) of the current block.
[0330] For example, the video decoding apparatus 100 may determine the final predicted sample value P'(x', y') of the current sample based on the following Equations (18) and (19).
[0331]
number
[0332]
number
[0333] FIG. 28 is a diagram illustrating a process in which a video decoding apparatus performs position-based intra prediction of a current sample when an intra prediction mode of a current block is an angular mode adjacent to a diagonal mode in an upper right direction.
[0334] 28, the video decoding apparatus 100 may generate a predicted value of a current sample 2805 by using an intermediate predicted value P(x',y') of the current sample 2805 and a sample value R(-1,y) of a sample 2810 located in the opposite direction of a line extending from the current sample 2805 toward the upper right direction according to the angular mode. The angular mode adjacent to the diagonal mode toward the upper right direction is one of the 58th to 65th modes.
[0335] In this case, the video decoding apparatus 100 may determine an intermediate predicted sample value P(x', y') of the current sample 2805 based on intra prediction according to the intra prediction mode (angular mode in the upper right direction) of the current block.
[0336] For example, the video decoding apparatus 100 may determine the final predicted sample value P'(x', y') of the current sample based on the following Equations (20) and (21).
[0337]
number
[0338]
number
[0339] As described above, with reference to FIG. 17 to FIG. 28, a method and an apparatus for determining a filtering reference sample and a filter weighting value to be applied with a filter, and performing adaptive intra prediction based on the filtering reference sample and the filter weighting value, on the assumption that the current block is a square, have been described. However, a person skilled in the art can easily understand that the video decoding device 100 can determine a filtering reference sample and a filter weighting value to be applied with a filter in a similar manner, and perform adaptive intra prediction based on the filtering reference sample and the filter weighting value, even when the current block is a rectangle. In this case, if the current block is a rectangle with a size of WxH (W is width, H is height), the number of samples of the upper adjacent reference line of the current block is 2W, and the number of samples of the left adjacent reference line is 2H. However, the present invention is not limited thereto, and if the current block is a rectangle with a size of WxH (W is width, H is height), the number of reference samples of the upper adjacent reference line of the current block is W+H, and the number of reference samples of the left adjacent reference line is W+H.
[0340] Figure 29 is a diagram to explain that, according to one embodiment of the present disclosure, the encoding / decoding order between coding units is determined to be forward or reverse based on the encoding order flag, and the reference line on the right or upper side can be used for intra prediction depending on the determined encoding / decoding order.
[0341] 29, a maximum coding unit 2950 is divided into a plurality of coding units 2956, 2958, 2960, 2962, 2968, 2970, 2972, 2974, 2980, 2982, 2984, and 2986. The maximum coding unit 2950 corresponds to a top node 2900 of the tree structure. And, the plurality of coding units 2956, 2958, 2960, 2962, 2968, 2970, 2972, 2974, 2980, 2982, 2984, and 2986 correspond to a plurality of nodes 2906, 2908, 2910, 2912, 2918, 2920, 2922, 2924, 2930, 2932, 2934, and 2936, respectively. In the tree structure, top end coding order flags 2902, 2914, and 2926 indicating the coding order correspond to the arrows (2952, 2964, and 2976), and top end coding order flags 2904, 2916, and 2928 correspond to the arrows (2954, 2966, and 2978).
[0342] The top coding order flag indicates the coding order of the top two coding units among four coding units of the same depth. If the top coding order flag is 0, coding is performed in the forward direction. Conversely, if the top coding order flag is 1, coding is performed in the reverse direction.
[0343] Similarly, the bottom coding order flag indicates the coding order of the two coding units located at the bottom among four coding units of the same depth. If the bottom coding order flag is 0, coding is performed in the forward direction. Conversely, if the coding order flag is 1, coding is performed in the reverse direction.
[0344] For example, because the top edge coding order flag 2914 is 0, the coding order between coding units 2968 and 2970 is determined in the forward direction, from left to right, and because the bottom edge coding order flag 2916 is 1, the coding order between coding units 2972 and 2974 is determined in the reverse direction, from right to left.
[0345] According to one embodiment, the top edge encoding order flag and the bottom edge encoding order flag are also set to have the same value. For example, when the top edge encoding order flag 2902 is determined to be 1, the bottom edge encoding order flag 2904 corresponding to the top edge encoding order flag 2902 may also be determined to be 1. Since the values of the top edge encoding order flag and the bottom edge encoding order flag are determined in one bit, the amount of information of the encoding order information is reduced.
[0346] According to an embodiment, the top and bottom coding order flags of the current coding unit are also determined by referring to at least one of the top and bottom coding order flags applied to coding units having a lower depth than the current coding unit. For example, the top and bottom coding order flags 2926 and 2928 applied to coding units 2980, 2982, 2984, and 2986 are also determined based on the bottom coding order flag 2916 applied to coding units 2972 and 2974. Thus, the top and bottom coding order flags 2926 and 2928 may be determined to be the same value as the coding order flag 2916. Since the values of the top and bottom coding order flags are determined from coding units above the current coding unit, no coding order information is obtained from the bitstream. Thus, the amount of information of the coding order information is reduced.
[0347] At this time, since the video decoding device 100 has access to data of samples included in the right adjacent coding unit 2958 that was decoded before the current coding unit 2986 and data of samples included in the upper adjacent coding units 2980 and 2982, the video decoding device 100 can perform prediction according to an embodiment of the present disclosure using data of samples included in the right adjacent coding unit 2958 (right reference line) and data of samples included in the upper adjacent coding units 2980 and 2982 (upper reference line).
[0348] That is, with reference to Figures 17 to 28, a method and device for determining a filtering reference sample and a filter weighting value to be applied to a filter, and adaptively performing intra prediction based on the filtering reference sample and the filter weighting value have been described. The content of performing intra prediction based on an original reference sample adjacent to the upper or left corner of a current block has been described assuming that encoding / decoding is performed according to the encoding / decoding order related to a conventional coding unit. However, the present invention is not limited thereto, and it will be easily understood by those skilled in the art that, when the encoding / decoding order between some adjacent coding units is in the reverse order of the right coding unit and the left coding unit as in Figure 29, intra prediction can be performed based on an original reference sample adjacent to the upper or right corner of a current block.
[0349] According to various embodiments of the present disclosure, information of reference samples that have not been used in conventional intra prediction is used, so prediction accuracy is improved, and in the process of reconstructing the original reference samples, a reference smoothing effect is applied to the reconstructed reference samples, so prediction accuracy is improved. In addition, since various prediction blocks can be generated by selectively using the reconstructed reference samples and the original reference samples, a more efficient prediction block can be selected, so prediction accuracy is improved. In addition, according to various embodiments of the present disclosure, a prediction block of a natural pattern is generated, so that a sudden prediction error is corrected, and therefore conversion efficiency is improved.
[0350] The above description focuses on various embodiments. Those skilled in the art to which the present disclosure pertains can understand that the present disclosure may be embodied in modified forms without departing from the essential characteristics of the present disclosure. Therefore, the disclosed embodiments should be considered from an explanatory perspective, not a limiting one. The scope of the present disclosure is defined in the claims, not the above description, and all differences within the scope of the equivalents should be interpreted as being included in the present disclosure.
[0351] Meanwhile, the above-mentioned embodiments of the present disclosure can be created into a computer-executable program and can be embodied in a general-purpose digital computer that runs the program using a computer-readable recording medium. The computer-readable recording medium includes recording media such as magnetic recording media (e.g., ROM (read-only memory), floppy disk, hard disk, etc.) and optically readable media (e.g., CD-ROM (compact disc read only memory), DVD (digital versatile disc), etc.).
[0352] The present disclosure includes the following inventions. (Supplementary Note 1) Obtaining information relating to transform coefficients of a current block from a bitstream; generating an intra-predicted value of the current sample based on a position of the current sample within the current block and an intra-prediction mode of the current block; determining a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for an intra predicted value of the current sample based on a 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample; generating a predicted block of the current block including the filtered predicted sample values of the current sample; obtaining a residual block of the current block based on information related to the transform coefficients of the obtained current block; reconstructing the current block based on a predicted block of the current block and a residual block of the current block. (Supplementary Note 2) The step of generating an intra-predicted value of the current sample based on a position of the current sample in the current block and an intra-prediction mode of the current block includes: determining an original reference sample corresponding to the current sample based on a position of the current sample and an intra-prediction mode of the current block; and generating an intra-prediction value of the current sample based on a sample value of the original reference sample. (Supplementary Note 3) The video decoding method according to Supplementary Note 1, wherein the first weight value for the filtering reference sample is determined based on a distance between the filtering reference sample and the current sample. (Supplementary Note 4) The video decoding method according to Supplementary Note 3, wherein the first weight value for the filtering reference sample is determined based on a distance between the filtering reference sample and the current sample relative to a size of the current block. (Supplementary Note 5) The video decoding method according to Supplementary Note 3, wherein the first weight value for the filtering reference sample decreases as the distance between the filtering reference sample and the current sample increases. (Supplementary Note 6) The video decoding method of Supplementary Note 1, characterized in that the filtered reference sample includes at least one of an original reference sample located in the horizontal direction of the current sample and an original reference sample located in the vertical direction of the current sample. (Supplementary Note 7) If the intra prediction mode of the current block is an angular mode, The video decoding method of claim 1, wherein the filtering reference sample includes at least one of the neighboring samples on the left and upper sides of the current block that are located on a line passing through the current sample, the line extending in a prediction direction indicated by the angular mode and in an opposite direction. (Supplementary Note 8) The step of determining a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for an intra predicted value of the current sample based on a 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample, may include determining at least one second intra-prediction mode; determining a sample value of at least one filtered reference sample to be filtered, a first weighted value for the filtered reference sample, and a second weighted value for the intra predicted value of the current sample based on a position of the current sample in the current block using the determined at least one second intra prediction mode, and generating a filtered predicted sample value of the current sample based on the determined sample value of the filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighted value for the filtered reference sample, and the second weighted value for the intra predicted value of the current sample. (Supplementary Note 9) The video decoding method according to Supplementary Note 8, wherein the at least one second intra prediction mode is determined on a picture-by-picture basis or on a block-by-block basis. (Supplementary Note 10) The video decoding method described in Supplementary Note 1, characterized in that the at least one second intra prediction mode is determined to at least one of the intra prediction mode, an intra prediction mode indicating the opposite prediction direction to the prediction direction indicated by the intra prediction mode, a horizontal mode, and a vertical mode. (Supplementary Note 11) The video decoding method according to Supplementary Note 1, wherein the first weighting value and the second weighting value are normalized values. (Supplementary Note 12) The step of determining a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for an intra predicted value of the current sample based on a 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample, may include: When the intra prediction mode is a predetermined intra prediction mode, the video decoding method of claim 1 further comprises determining a sample value of at least one filtered reference sample to be filtered, a first weighted value for the filtered reference sample, and a second weighted value for the intra prediction value of the current sample based on a position of the current sample within the current block, and generating a filtered prediction sample value of the current sample based on the determined sample value of the filtered reference sample to be filtered, the intra prediction value of the current sample, the first weighted value for the filtered reference sample, and the second weighted value for the intra prediction value of the current sample. (Supplementary Note 13) A step of generating an intra-predicted value of a current sample based on a position of the current sample in a current block and an intra-prediction mode of the current block; determining a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for an intra predicted value of the current sample based on a 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample; generating a predicted block of the current block including the filtered predicted sample values of the current sample; encoding information relating to transform coefficients of the current block based on the predicted block of the current block. (Appendix 14) Obtaining information related to transform coefficients of a current block from the bitstream; generating an intra prediction value of the current sample based on a position of the current sample within the current block and an intra prediction mode of the current block; determining a sample value of at least one filtered reference sample to be filtered, a first weighting value for the filtered reference sample, and a second weighting value for an intra predicted value of the current sample based on a 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 filtered reference sample to be filtered, the intra predicted value of the current sample, the first weighting value for the filtered reference sample, and the second weighting value for the intra predicted value of the current sample; generating a predicted block of the current block including the filtered predicted sample values of the current sample; obtaining a residual block of the current block based on information related to the obtained transform coefficients of the current block; 11. A video decoding apparatus comprising: a processor for reconstructing the current block based on a predicted block of the current block and a residual block of the current block.
Claims
1. obtaining an intra-prediction sample of a current sample of a current block using a first reference sample corresponding to the current sample, the first reference sample being determined based on a position of the current sample and an intra-prediction mode of the current block; determining a second reference sample from among a plurality of neighboring samples located to the left of the current block based on the position of the current sample and the mode indicating the prediction direction of the top direction, when the intra prediction mode of the current block is a mode indicating a prediction direction of an upward direction; determining a second weighted value for the second reference sample based on an x-coordinate of the position of the current sample; and obtaining a modified intra prediction sample of the current sample based on the second reference sample, the intra prediction sample of the current sample, the second weighted value for the second reference sample, and the first weighted value for the intra prediction sample of the current sample; determining a third reference sample from among a plurality of neighboring samples located above the current block based on a position of the current sample and the mode indicating the leftward prediction direction when the intra prediction mode of the current block is a mode indicating a leftward prediction direction; determining a third weighted value for the third reference sample based on a y coordinate of the position of the current sample; and obtaining a modified intra prediction sample of the current sample based on the third reference sample, the intra prediction sample of the current sample, the third weighted value for the third reference sample, and the first weighted value for the intra prediction sample of the current sample; reconstructing the current block using the modified intra-predicted samples of the current sample and residual samples of the current sample; The method of claim 1, wherein the current block has one of a square shape and a non-square shape.
2. obtaining an intra-prediction sample of a current sample of a current block using a first reference sample corresponding to the current sample, the first reference sample being determined based on a position of the current sample and an intra-prediction mode of the current block; determining a second reference sample from among a plurality of neighboring samples located to the left of the current block based on a position of the current sample and a mode indicating an upward prediction direction, when the intra prediction mode of the current block is a mode indicating an upward prediction direction; determining a second weighted value for the second reference sample based on an x-coordinate of the position of the current sample; obtaining a modified intra prediction sample of the current sample based on the second reference sample, the intra prediction sample of the current sample, the second weighted value for the second reference sample, and the first weighted value for the intra prediction sample of the current sample; determining a third reference sample from among a plurality of neighboring samples located above the current block based on a position of the current sample and the mode indicating the leftward prediction direction when the intra prediction mode of the current block is a mode indicating a leftward prediction direction; determining a third weighted value for the third reference sample based on a y coordinate of the position of the current sample; and obtaining a modified intra prediction sample of the current sample based on the third reference sample, the intra prediction sample of the current sample, the third weighted value for the third reference sample, and the first weighted value for the intra prediction sample of the current sample; encoding the current block using the modified intra-predicted sample of the current sample, The image encoding method, wherein the current block has one of a square shape and a non-square shape.
3. An apparatus for transmitting a bitstream generated by the video encoding method according to claim 2.
Citation Information
Patent Citations
Video Decoding Method
JP7532450B2
Improved video intra-prediction using position-dependent prediction combination for video coding
WO2017058635A1
