Image encoding method, image decoding method, and apparatuses therefor
By determining the filter type and coefficients based on distance and size during image encoding and decoding, and optimizing intra-frame prediction, the problem of low encoding and decoding efficiency for high-resolution or high-quality images is solved, achieving more efficient image compression and decoding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-10-31
- Publication Date
- 2026-03-31
AI Technical Summary
Existing image encoding and decoding technologies are inefficient when processing high-resolution or high-quality images, making it difficult to effectively compress and decode them.
The filter type and filter coefficients are determined based on the distance between the current sample and the reference sample in the current block and the size of the current block. Low-pass filters, Gaussian filters, bilateral filters, uniform filters, bilinear interpolation filters, cubic filters and discrete cosine transform filters are used to optimize the intra-frame prediction process of the image.
It improves the efficiency and quality of image encoding and decoding, especially in the processing of high-resolution or high-quality images, achieving more efficient compression and decoding effects.
Smart Images

Figure CN116156166B_ABST
Abstract
Description
[0001] This application is a divisional application of the application filed with the State Intellectual Property Office on October 31, 2018, entitled "Image Encoding Method, Image Decoding Method and Apparatus", with application number 201880084999.9. Technical Field
[0002] The method and apparatus according to embodiments can encode or decode images using coding units of various shapes included in the image. The method and apparatus according to embodiments include an intra-frame prediction method and apparatus. Background Technology
[0003] As hardware capable of reproducing and storing high-resolution or high-quality image content is developed and made available, the demand for codecs that can efficiently encode or decode high-resolution or high-quality image content is increasing. Encoded image content can be reproduced through decoding. Recently, methods for efficiently compressing content such as high-resolution or high-quality images have been implemented. For example, methods for efficiently compressing images are performed by processing images that will be encoded via arbitrary methods.
[0004] Various data units can be used to compress images, and inclusion relationships can exist between these data units. Data units can be divided using various methods to determine the size of the data units used for image compression, and as data units optimized according to the characteristics of the image are determined, encoding or decoding of the image can be performed. Summary of the Invention
[0005] Technical solution
[0006] An image decoding method according to an embodiment includes: obtaining information about transform coefficients of a current block from a bitstream; determining a filter for the current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block; obtaining a prediction block of the current block including prediction samples of the current sample generated using the determined filter; obtaining a residual block of the current block based on the obtained information about the transform coefficients of the current block; and recovering the current block based on the prediction block and the residual block of the current block.
[0007] The step of determining a filter for a current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block may include: determining the type of filter and the coefficients of the filter for the current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block.
[0008] The filter type can be one of the following: low-pass filter, Gaussian filter, bilateral filter, uniform filter, bilinear interpolation filter, cubic filter, and Discrete Cosine Transform (DCT) filter.
[0009] The number of taps in the filter used for the current sample is a predetermined value, or it is determined based on at least one of the distance between the current sample and the reference sample and the size of the current block. The predetermined value can be an integer equal to or greater than 4.
[0010] The step of determining a filter for a current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block may include: determining a plurality of filters for the current block based on at least one of the size of the current block and the distance between a sample and a reference sample in the current block; and determining a filter corresponding to the current sample among the plurality of filters for the current block.
[0011] The step of determining multiple filters for the current block based on at least one of the size of the current block and the distance between the current sample and the reference sample in the current block may include: determining multiple filters for the current block based on the ratio of the height or width of the current block and the distance between the sample and the reference sample in the current block.
[0012] The step of determining a filter for a current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block may include: determining a first reference sample corresponding to a sample in the current block based on the intra-prediction mode of the current block; determining a plurality of filters for the current block based on the distance between the sample and the first reference sample; and determining the filter corresponding to the current sample among the plurality of filters for the current block.
[0013] The step of determining a filter for a current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block may include: determining the number of filters for the current block based on the size of the current block, and determining a filter for the current block corresponding to the number of filters; and determining a filter for the current sample among the filters for the current block based on the distance between the current sample and the reference sample and the size of the current block.
[0014] The step of determining a filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block may include: further determining a filter for the current sample based on at least one of the intra-prediction mode of the current block and the shape of the current block.
[0015] The step of further determining the filter for the current sample based on at least one of the intra-prediction mode of the current block and the shape of the current block may include:
[0016] When the intra-prediction mode of the current block is a predetermined intra-prediction mode, a filter for the current sample is determined based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0017] The step of further determining the filter for the current sample based on at least one of the intra-prediction mode of the current block and the shape of the current block may include:
[0018] When the width of the current block is less than or equal to a predetermined first value and the height of the current block is less than or equal to a predetermined second value, a filter for the current sample is determined based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0019] The step of determining a filter for a current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block may include: determining a first filter for the current sample when the distance between the current sample and the reference sample is less than a predetermined value, and determining a second filter for the current sample when the distance between the current sample and the reference sample is greater than a predetermined value, wherein the smoothing intensity of the first filter may be less than the smoothing intensity of the second filter.
[0020] The image encoding method according to an embodiment includes: determining a filter for the current sample based on at least one of the distance between the current sample and a reference previous sample in the current block and the size of the current block; generating a prediction block of the current block including prediction samples of the current sample generated using the determined filter; and encoding information about the transform coefficients of the current block based on the prediction block of the current block.
[0021] An image decoding apparatus according to an embodiment includes: a processor that obtains information about transform coefficients of a current block from a bitstream; determines a filter for the current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block; obtains a prediction block of the current block including prediction samples of the current sample generated using the determined filter; obtains a residual block of the current block based on the obtained information about the transform coefficients of the current block; and recovers the current block based on the prediction block and the residual block of the current block.
[0022] According to embodiments of this disclosure, a computer program relating to an image decoding method can be recorded on a computer-readable recording medium. Attached Figure Description
[0023] Figure 1a The figure shows a block diagram of an image decoding apparatus according to various embodiments.
[0024] Figure 1b The illustration shows a flowchart of an image decoding method according to various embodiments.
[0025] Figure 1c The illustration shows a block diagram of an image decoder according to various embodiments.
[0026] Figure 1d The figure shows a block diagram of an image decoding apparatus according to various embodiments.
[0027] Figure 2a The figure shows a block diagram of an image encoding apparatus according to various embodiments.
[0028] Figure 2b The illustration shows a flowchart of an image encoding method according to various embodiments.
[0029] Figure 2c The illustration shows a block diagram of an image decoder according to various embodiments.
[0030] Figure 2d The figure shows a block diagram of an image encoding apparatus according to various embodiments.
[0031] Figure 3 The illustration shows the process of determining at least one coding unit as the image decoding device divides the current coding unit according to an embodiment.
[0032] Figure 4 The illustration shows the process of determining at least one coding unit by dividing an image decoding apparatus according to an embodiment into coding units having a non-square shape.
[0033] Figure 5 The illustration shows the process by which an image decoding apparatus according to an embodiment divides coding units based on at least one of block shape information and division shape pattern information.
[0034] Figure 6 The illustration shows a method by which an image decoding apparatus determines a predetermined encoding unit from an odd number of encoding units according to an embodiment.
[0035] Figure 7 The illustration shows the order in which multiple coding units are processed when the image decoding device divides the current coding unit and determines multiple coding units according to an embodiment.
[0036] Figure 8 The illustration illustrates the process of determining that the current coding unit is divided into an odd number of coding units when the coding unit cannot be processed by the image decoding device in a predetermined order, according to an embodiment.
[0037] Figure 9 The illustration shows the process of determining at least one coding unit as the image decoding device divides the first coding unit according to an embodiment.
[0038] Figure 10 The illustrated image encoding apparatus, according to an embodiment, restricts the shape into which the second encoding unit can be divided when the second encoding unit, which has a non-square shape and is determined by dividing the first encoding unit, satisfies predetermined conditions.
[0039] Figure 11 The illustration shows the process by which an image decoding device divides encoding units with square shapes when the division shape pattern information cannot indicate that the encoding unit is divided into four square shapes, according to an embodiment.
[0040] Figure 12 The processing order of the multiple coding units illustrated in the embodiment can vary depending on the process of dividing the coding units.
[0041] Figure 13 The illustration shows the process, according to an embodiment, where the depth of a coding unit is determined as the shape and size of the coding unit vary, when multiple coding units are recursively divided.
[0042] Figure 14 The illustration, according to an embodiment, shows a depth that can be determined based on the shape and size of the coding unit and an index (partindex, hereinafter referred to as PID) used to distinguish the coding unit.
[0043] Figure 15 The illustration shows how multiple encoding units are determined based on multiple predetermined data units included in the image, according to an embodiment.
[0044] Figure 16 The illustration shows a processing block used as a criterion for determining the order of reference coding units included in a frame, according to an embodiment.
[0045] Figure 17This is a diagram used to illustrate the intra-frame prediction mode according to an embodiment.
[0046] Figure 18 For the purpose of illustrating embodiments of the present disclosure, an image decoding apparatus generates a predicted sample of the current sample by using different filters based on at least one of the distance between the current sample and a reference sample and the size of the current block.
[0047] Figure 19 For the purpose of illustrating embodiments of the present disclosure, the encoding (decoding) order between coding units is determined as forward or reverse based on the encoding order flag, and the right reference line or top reference line can be used for intra-frame prediction according to the determined encoding (decoding) order.
[0048] Best mode
[0049] Video decoding methods according to various embodiments include: obtaining information about transform coefficients of a current block from a bitstream; determining a filter for the current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block; obtaining a prediction block of the current block including prediction samples of the current sample generated using the determined filter; obtaining a residual block of the current block based on the obtained information about the transform coefficients of the current block; and recovering the current block based on the prediction block and the residual block of the current block.
[0050] The video coding method according to various embodiments includes: determining a filter for the current sample based on at least one of the distance between the current sample and a reference previous sample in the current block and the size of the current block; generating a prediction block of the current block including prediction samples of the current sample generated using the determined filter; and encoding information about the transform coefficients of the current block based on the prediction block of the current block.
[0051] A video decoding apparatus according to various embodiments includes: a processor that obtains information about transform coefficients of a current block from a bitstream; determines a filter for the current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block; obtains a prediction block of the current block including prediction samples of the current sample generated using the determined filter; obtains a residual block of the current block based on the obtained information about the transform coefficients of the current block; and recovers the current block based on the prediction block and the residual block of the current block.
[0052] According to another aspect of this disclosure, a computer-readable recording medium has thereon recorded a program for performing methods according to various embodiments. Detailed Implementation
[0053] The advantages and features of the disclosed embodiments, as well as the methods for achieving these advantages and features, will become more apparent from the following description of the embodiments and the accompanying drawings. However, this disclosure is not limited to the embodiments disclosed below, and can be implemented in various different forms. These embodiments are provided only to make the disclosure more complete and to fully inform those skilled in the art of the scope of the invention.
[0054] The terminology used in this specification will be briefly described, and the disclosed embodiments will be described in detail.
[0055] The terminology used in this specification has been selected from commonly used terms that are likely to be widely used in consideration of the functions of this disclosure, but may be changed according to the intent or precedent of those skilled in the art, the emergence of new technologies, etc. Furthermore, some terms may be arbitrarily chosen by the applicant, and in such cases, the meaning of the chosen terms will be described in detail in the accompanying description of the invention. Therefore, the terminology used in this disclosure should be defined based on the meaning of the terms and the description throughout the specification, and not merely on the names of the terms.
[0056] Unless the singular form of an expression has a distinctly different meaning in the context, the singular form of an expression includes the plural form.
[0057] In the specification, when a component includes a certain constituent element, unless there is an explicit description to the contrary, the component may further include other constituent elements, without excluding other constituent elements.
[0058] Additionally, the term "device" as used in this specification refers to a software or hardware component, and a "device" performs a predetermined function. However, the term "device" is not limited to software or hardware. A "device" may be configured to reside in an addressable storage medium or to reproduce one or more processors. Thus, as an embodiment, a "device" includes components such as software components, object-oriented software components, class components, and task components, and may include processes, functions, attributes, steps, subroutines, program code segments, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, or variables. The functionality provided within a component and a "device" may be combined from a smaller number of components and "devices," or may be divided by additional components and "devices."
[0059] According to embodiments of this disclosure, "processor" can be implemented as a processor and memory. The term "processor" should be interpreted broadly to include general-purpose processors, central processing units, microprocessors, digital signal processors, controllers, microcontrollers, state machines, etc. In some contexts, "processor" can refer to application-specific integrated circuits, programmable logic devices, field-programmable gate arrays, etc. The term "processor" refers to a combination of processing devices, such as a combination of a digital signal processor and a microprocessor, a combination of multiple microprocessors, a combination of one or more microprocessors combined with a discrete cosine transform core, or any other combination of such devices.
[0060] The term "memory" should be interpreted broadly to include any electronic component capable of storing electronic information. The term memory can refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM, programmable ROM, erasable programmable ROM, electrically erasable programmable ROM, flash memory, magnetic or optical data memory, registers, etc. If a processor can read information from and / or write information to a memory, then the memory is said to be in electronic communication with the processor. Memory integrated into the processor is in electronic communication with the processor.
[0061] Hereinafter, “image” can refer to a still image such as a video or a moving image such as a video (i.e., the video itself).
[0062] In the following text, a "sample" refers to a sampling location assigned to an image and to be processed. For example, pixel values in the spatial domain of an image or transform coefficients in the transform domain can be samples. A unit comprising at least one sample can be defined as a block.
[0063] In the following description, embodiments will be detailed with reference to the accompanying drawings, so that those skilled in the art to which this disclosure pertains can readily implement it. Furthermore, for the purpose of clearly describing this disclosure in the drawings, parts unrelated to the description have been omitted.
[0064] The image encoding apparatus and image decoding apparatus, image encoding method and image decoding method will be described in detail below with reference to Figures 1 to 19. Figures 3 to 16 A method for determining data units of an image according to an embodiment is described, with reference to Figures 1-2 and... Figures 17 to 19 The image encoding or image decoding method and apparatus are described, wherein, according to embodiments, a filter is determined based on at least one of the distance to a reference sample and the size of the current block, and intra-frame prediction is adaptively performed using the determined filter.
[0065] Hereinafter, an image coding / decoding method and apparatus according to an embodiment of the present disclosure, which adaptively performs intra-frame prediction using coding units of various shapes, will be described with reference to FIG1 and 2.
[0066] Figure 1a This is a block diagram of an image decoding apparatus according to various embodiments.
[0067] Image decoding apparatus 100 according to various embodiments may include a receiver 105, an intra-frame predictor 110, and an image decoder 115.
[0068] The acquirer 105, intra-predictor 110, and image decoder 115 may include at least one processor. Additionally, the acquirer 105, intra-predictor 110, and image decoder 115 may include memory storing instructions to be executed by the at least one processor. The image decoder 115 may be implemented in hardware separate from the acquirer 105 and intra-predictor 110, or may include both the acquirer 105 and intra-predictor 110.
[0069] The acquirer 105 can obtain information about the transform coefficients of the current block from the bit stream. The acquirer 105 can also obtain information about the prediction mode and the intra-frame prediction mode of the current block from the bit stream.
[0070] The acquirer 105 may include information indicating whether the prediction mode for the current block is an intra-prediction mode or an inter-prediction mode. The information regarding the intra-prediction mode for the current block may be information about the intra-prediction mode applied to the current block among a plurality of intra-prediction modes. For example, the intra-prediction mode may be one of a DC mode, a planar mode, and at least one angular mode having a prediction direction. Angular modes may include a horizontal mode, a vertical mode, and a diagonal mode, and may include modes having a predetermined direction other than the horizontal, vertical, and diagonal directions. For example, the number of angular modes may be 65 or 33.
[0071] When the prediction mode of the current block is intra-prediction mode, the intra-predictor 110 can be activated.
[0072] Intra-predictor 110 can perform intra-prediction on the current block based on the intra-prediction mode of the current block. Intra-predictor 110 can determine a reference sample for the current sample from 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 can use the reference sample for the current sample to generate the predicted sample value of the current sample. Here, the reference sample may include samples from the reference lines adjacent to the left or top of the current block. The reference sample for the current sample may include at least one sample from the reference lines adjacent to the current block. When there is only one reference sample for the current sample, intra-predictor 110 can use that reference sample to generate the predicted sample value of the current sample. Simultaneously, when there are two or more reference samples for the current sample, intra-predictor 110 can generate the predicted sample of the current sample by applying a filter to the sample values of the two or more reference samples for the current sample. Here, the coefficients of the filter can be integers. To ensure the filter coefficients are integers, scaling is applied to the filter coefficients, and scaled filter coefficients can be used. When scaling the filter coefficients and using scaled filter coefficients, a subsequent descaling process can be performed based on the degree of scaling of the filter coefficients. The filter accuracy can be 1 / 32th of a pixel.
[0073] The intra-predictor 110 can determine a filter for the current sample based on at least one of the size of the current block and the distance between the current sample and a reference sample. The intra-predictor 110 can determine at least one filter candidate applicable to the current sample, and determine a filter for the current sample from the at least one filter candidate based on at least one of the distance between the current sample and a reference sample in the current block and the size of the current block. Here, the distance between the current sample and the reference sample can be the distance between the current sample and a reference sample located in the vertical direction of the current sample, or the distance between the current sample and a reference sample located in the horizontal direction of the current block. In this case, the distance between the current sample and the reference sample can correspond to the position coordinate value of the current sample in the current block. Therefore, it can be seen that the intra-predictor 110 determines a filter for the current sample based on at least one of the size of the current block and the distance between the current sample and the reference sample.
[0074] The intra-prediction unit 110 can determine the type of filter and the coefficients of the filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block. Here, the filter type can be one of a low-pass filter, a Gaussian filter, a bilateral filter, a uniform filter, a bilinear interpolation filter, a cubic filter, a [1 2 1] filter, and a Discrete Cosine Transform (DCT) filter. Here, the Discrete Cosine Transform filter can be a 4-tap Discrete Cosine Transform Interpolation Filter (DCT-IF) used to compensate for sub-pixel motion of the chroma component. Alternatively, a new filter can be generated by combining two or more filters, and a newly created filter can be added as the filter type. Furthermore, it is not limited to the filter types listed above; various types of filters can be used as the filter type for the current sample.
[0075] The number of taps in the filter used for the current sample can be a predetermined value. Here, the predetermined value can be 4, that is, the filter used for the current sample can be a 4-tap filter, but it is not limited to this. The predetermined value can be 1 or greater, preferably one of various integer values of 2 or greater.
[0076] Furthermore, the number of filter taps used for the current sample can be determined based on at least one of the distance between the current sample and the reference sample and the size of the current block. For example, when the distance between the current sample and the reference sample is less than a predetermined value, the intra-predictor 110 can determine the number of filter taps as a predetermined first number of taps. When the distance between the current sample and the reference sample is greater than a predetermined value, the intra-predictor 110 can determine the number of filter taps as a predetermined second number of taps. Here, the predetermined first number of taps can be less than the predetermined second number of taps.
[0077] The intra-frame predictor 110 can determine a plurality of filters for the current block based on at least one of the size of the current block and the distance between at least one sample in the current block and a reference sample. In other words, the plurality of filters for the current block can include at least one filter candidate that can be used for the current sample.
[0078] The intra-predictor 110 can determine the filter corresponding to the current sample from among a plurality of filters used for the current block. Here, the intra-predictor 110 can determine the filter corresponding to the current sample from among a plurality of filters used for the current block based on the ratio of the size (height or width) of the current block to the distance between at least one sample in the current block and the position of the current sample in the current block (or the distance between the current sample and a reference sample).
[0079] Intra-predictor 110 can determine a first reference sample corresponding to a sample in the current block based on the intra-prediction mode of the current block. For example, intra-predictor 110 can determine a reference sample that intersects the extension of the intra-prediction direction from the current sample according to the intra-prediction mode of the current block as the first reference sample. Intra-predictor 110 can determine a plurality of filters for the current block based on the distance between the sample and the first reference sample. Intra-predictor 110 can determine a filter corresponding to the current sample from a plurality of filters for the current block.
[0080] The intra-predictor 110 can determine the number of filters for the current block based on the size of the current block, and determine the filters for the current block corresponding to the number of filters. For example, when the height or width of the current block is less than a predetermined value, the image decoding device 100 can determine the number of filters for the current block to be one. When the number of filters for the current block is determined to be one, the intra-predictor 110 can determine the filters for the current block based on the size of the current block and the current intra-prediction mode. In other words, the intra-predictor 110 can determine a threshold based on the size of the current block, and determine an intra-prediction mode index difference based on the index difference between the current intra-prediction mode and the vertical and horizontal modes, and determine the filters for the current block by comparing the determined intra-prediction mode index difference with the threshold.
[0081] Additionally, when the index of the intra-prediction mode of the current block is an odd number, the intra-predictor 110 can determine the first filter as the filter for the current block, and when the index of the intra-prediction mode of the current block is an even number, it can determine the second filter as the filter for the current block.
[0082] The intra-frame predictor 110 can determine the range of distances between the samples to which each filter is applied and the reference sample based on the size of the current block. For example, when the height and width of the current block are both greater than or equal to 32, the distance between the samples of the current block used by filter f0 and the reference sample can be [0, 2), and the distance between the samples of the current block used by filter f1 and the reference sample can be [2, 4), and the distance between the samples of the current block used by filter f2 and the reference sample can be [4, 8), and the distance between the samples of the current block used by filter f3 and the reference sample can be [8, 16), and the distance between the samples of the current block used by filter f4 and the reference sample can be [16, size). Otherwise, when the height or width of the current block is less than 32, the distance between the sample point of the current block used by filter f0 and the reference sample point can be [0, 1), and the distance between the sample point of the current block used by filter f1 and the reference sample point can be [1, 2), and the distance between the sample point of the current block used by filter f2 and the reference sample point can be [2, 3), and the distance between the sample point of the current block used by filter f3 and the reference sample point can be [3, 4], and the distance between the sample point of the current block used by filter f4 and the reference sample point can be [4, size).
[0083] The intra-frame predictor 110 can determine the filter for the current sample in the filter for the current block based on at least one of the distance between the current sample and the reference sample and the size of the current block.
[0084] The intra predictor 110 can further determine the filter to be used for the current sample based on at least one of the intra prediction mode of the current block and the shape of the current block.
[0085] For example, when the intra-prediction mode of the current block is a predetermined intra-prediction mode, the intra-predictor 110 can determine the filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block. Here, the predetermined intra-prediction mode can be one of the angle modes other than DC mode and planar mode. Specifically, the predetermined intra-prediction mode can be one of the remaining angle modes other than diagonal mode.
[0086] For example, when the prediction mode of the current block is a horizontal or vertical mode, the intra-predictor 110 can perform intra-prediction without using any filters (e.g., bilinear interpolation filters or [1, 2, 1] reference filters, etc.) on the reference samples to generate the prediction samples for the current block. When the prediction mode of the current block is a diagonal mode with an angle that is a multiple of 45 degrees, the intra-predictor 110 can perform intra-prediction by using a [1, 2, 1] reference sample filter to generate the prediction samples for the current block. When the prediction mode of the current block is an angular mode other than the aforementioned modes, the intra-predictor 110 can determine the filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0087] The intra-frame predictor 110 may further determine a filter for the current sample based on whether the current block is a square or a rectangle, and based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0088] Additionally, the intra-predictor 110 may further determine a filter for the current sample based on the ratio of the height to the width of the current block, and based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0089] When the width of the current block is less than or equal to a predetermined first value, and the height of the current block is less than or equal to a predetermined second value, the intra-predictor 110 can determine a first filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block. Conversely, when the width of the current block is greater than the predetermined first value, or the height of the current block is greater than the predetermined second value, the intra-predictor 110 can determine a second filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0090] When the distance between the current sample and the reference sample is less than a predetermined value, the intra-frame predictor 110 can determine a first filter for the current sample, and when the distance between the current sample and the reference sample is greater than the predetermined value, the intra-frame predictor 110 can determine a second filter for the current sample. Here, the smoothing intensity of the first filter can be less than the smoothing intensity of the second filter.
[0091] Intra-frame predictor 110 can obtain a prediction block for the current block, which includes prediction samples of the current samples generated using the determined filter.
[0092] Image decoder 115 can obtain the residual block of the current block based on information about the transform coefficients of the current block. In other words, image decoder 115 can perform inverse quantization and inverse transform based on information about the transform coefficients of the current block to obtain residual samples of the residual block of the current block from the bitstream.
[0093] Image decoder 115 can recover the current block based on the prediction block and the residual block of the current block. Image decoder 115 can generate recovered samples in the current block by using the sample values of the predicted samples in the prediction block of the current block and the sample values of the residual samples in the residual block of the current block, and can generate the recovered block of the current block based on the recovered samples.
[0094] Simultaneously, the image decoding apparatus 100 can determine a filter for the current sample based on at least one of the size of the current block and the distance between the current sample and the reference sample, and obtain flag information from the bitstream indicating whether to perform intra-frame prediction appropriately. The apparatus can also determine whether to determine a filter for the current sample based on the flag information and at least one of the size of the current block and the distance between the current sample and the reference sample. Here, the flag information can be obtained block-by-block, particularly by maximum coding unit. Alternatively, the flag information can be obtained frame-by-frame.
[0095] Furthermore, the image decoding device 100 can obtain marking information that is applied to both the luminance component and the chrominance component. Alternatively, the image decoding device 100 can obtain marking information that is applied separately to either the luminance component or the chrominance component.
[0096] The image decoding device 100 can determine a set of filters that are applied together to the luminance component and the chrominance component. Additionally, the image decoding device 100 can determine a set of filters applied on a component-by-component basis.
[0097] Furthermore, the image decoding apparatus 100 can determine whether to determine a filter for the current sample based on at least one of the size of the current block and the distance between the current sample and the reference sample, without obtaining flag information from the bitstream. For example, when the prediction mode of the current block is a predetermined intra-prediction mode, the image decoding apparatus 100 can determine to adaptively perform intra-prediction by determining a filter for the current sample based on at least one of the size of the current block and the distance between the current sample and the reference sample.
[0098] Furthermore, the image decoding apparatus 100 can determine whether to adaptively perform intra-frame prediction based on the weighted values of the reference sample and the filter, using information from neighboring blocks, without obtaining flag information from the bitstream. For example, the image decoding apparatus 100 can determine a filter for a first sample in a neighboring block based on the size of the neighboring block and the distance between the first sample and the reference sample in the neighboring block, and determine whether to determine a filter for the current sample based on at least one of the size of the current block and the distance between the current sample and the reference sample, based on the flag information of the neighboring blocks, wherein the flag information of the neighboring blocks indicates whether to adaptively perform intra-frame prediction based on the filter for the first sample in the neighboring block. Additionally, when the size of the current block is the size of a predetermined first block, the image decoding apparatus 100 can determine a filter for the current sample based on at least one of the size of the current block and the distance between the current sample and the reference sample, and determine whether to perform intra-frame prediction based on the filter for the current sample. When the size of the current block is the size of a predetermined second block, the image decoding device 100 can perform existing intra-frame prediction without determining the filter for the current sample based on the size of the current block and the distance between the current sample and the reference sample.
[0099] The image decoding apparatus 100 can determine a filter for the current sample based on at least one of the size of the current block and the distance between the current sample and a reference sample, and can perform intra-frame prediction by combining encoding / decoding tools based on intra-frame prediction for the current sample with similar intra-frame prediction encoding / decoding tools. Furthermore, the image decoding apparatus 100 can assign priorities among multiple intra-frame prediction encoding / decoding tools, and can perform intra-frame prediction according to the priorities among the encoding / decoding tools. In other words, when using an encoding / decoding tool with high priority, a low-priority encoding / decoding tool may not be used, and when not using a high-priority encoding / decoding tool, a low-priority encoding / decoding tool may be used.
[0100] Figure 1b The illustration shows a flowchart of an image decoding method according to various embodiments.
[0101] In operation S105, the image decoding device 100 can obtain information about the transform coefficients of the current block from the bit stream.
[0102] In operation S110, the image decoding device 100 can determine a filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0103] In operation S115, the image decoding device 100 can obtain a prediction block of the current block, which includes prediction samples of the current samples generated by using the determined filter.
[0104] In operation S120, the image decoding device 100 can obtain the residual block of the current block based on information about the transform coefficients of the current block.
[0105] In operation S125, the image decoding device 100 can recover the current block based on the prediction block and the residual block of the current block.
[0106] Figure 1c The figure shows a block diagram of an image decoder 6000 according to various embodiments.
[0107] The image decoder 6000 according to various embodiments performs the operations performed when the image decoder 115 of the image decoding device 100 decodes the image data.
[0108] refer to Figure 1c The entropy decoder 6150 parses the encoded image data to be decoded and the encoding information required for decoding from the bitstream 6050. The encoded image data consists of quantized transform coefficients. The dequantizer 6200 and the inverse transform 6250 recover the residual data from the quantized transform coefficients.
[0109] The intra-predictor 6400 performs intra-prediction per block. Figure 1c The intra-frame predictor 6400 can correspond to Figure 1a Intra-frame predictor 110.
[0110] The inter-frame predictor 6350 performs inter-frame prediction block by block using a reference image obtained from the recovery frame buffer 6300. The spatial domain data for the current image block can be recovered by adding the prediction data and residual data for each block generated by the intra-frame predictor 6400 or the inter-frame predictor 6350, and the deblocking unit 6450 and the sample adaptive offset actuator 6500 can output a filtered recovered image 6600 by performing loop filtering on the recovered spatial domain data. Additionally, the recovered image stored in the recovery frame buffer 6300 can be output as a reference image.
[0111] In order for the decoder (not shown) of the image decoding device 100 to decode image data, the step-by-step operation of the image decoder 6000 according to various embodiments can be performed in blocks.
[0112] Figure 1d The figure shows a block diagram of an image decoding apparatus 100 according to an embodiment.
[0113] The image decoding apparatus 100 according to an embodiment may include a memory 120 and at least one processor 125 connected to the memory 120. The image decoding apparatus 100 according to an embodiment may operate as a separate processor or may operate under the control of a central processing unit. Additionally, the memory 120 of the image decoding apparatus 100 may store data received from an external source and data generated by the processor. The processor 125 of the image decoding apparatus 100 may obtain information about the current block from the bitstream, determine a filter for the current sample based on at least one of the distance between the current sample and a reference sample in the current block and the size of the current block, obtain a prediction block of the current block including prediction samples of the current sample generated using the determined filter, obtain a residual block of the current block based on information about the transform coefficients of the current block, and recover the current block based on the prediction block and the residual block.
[0114] Figure 2a The figure shows a block diagram of an image encoding apparatus according to various embodiments.
[0115] Image encoding apparatus 150 according to various embodiments may include an intra-frame predictor 155 and an image encoder 160.
[0116] The intra-predictor 155 and image encoder 160 may include at least one processor. Additionally, the intra-predictor 155 and image encoder 160 may include memory storing instructions to be executed by the at least one processor. The implementation may be carried out by hardware other than the intra-predictor 155 and image encoder 160, or may include the intra-predictor 155 and image encoder 160 themselves.
[0117] The intra-frame predictor 155 can determine the filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0118] Intra-frame predictor 155 can generate a prediction block that includes prediction samples of the current sample generated using a filter for the current sample.
[0119] The intra-frame predictor 155 can determine the type of filter and the coefficients of the filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0120] The number of taps in the filter used for the current sample can be a predetermined value. Here, the predetermined value can be an integer of 4 or greater. Alternatively, the number of taps in the filter used for the current sample can be determined based on at least one of the distance between the current sample and the reference sample and the size of the current block.
[0121] The intra-frame predictor 155 can determine multiple filters for the current block based on at least one of the size of the current block and the distance between the sample points in the current block and the reference sample points.
[0122] The intra-frame predictor 155 can determine the filter corresponding to the current sample from among multiple filters used for the current block.
[0123] Intra-predictor 155 can determine a first reference sample corresponding to a sample in the current block based on the intra-prediction mode of the current block. Intra-predictor 155 can determine a plurality of filters for the current block based on the distance between the sample in the current block and the first reference sample. Intra-predictor 155 can determine the filter corresponding to the current sample from among the plurality of filters for the current block.
[0124] The intra-predictor 155 can determine the number of filters for the current block based on the size of the current block, and determine the filters for the current block corresponding to the number of filters. The intra-predictor 155 can also determine the filters for the current sample based on at least one of the distance between the current sample and the reference sample and the size of the current block.
[0125] When the intra prediction mode of the current block is a predetermined intra prediction mode, the intra predictor 155 can determine the filter for the current sample based on at least one of the distance between the current sample and the reference sample in the current block and the size of the current block.
[0126] When the distance between the current sample and the reference sample is less than a predetermined value, the intra-predictor 155 can determine a first filter for the current sample, and when the distance between the current sample and the reference sample is greater than a predetermined value, the intra-predictor 110 can determine a second filter for the current sample. Here, the smoothing intensity of the first filter can be less than the smoothing intensity of the second filter.
[0127] Image encoder 160 can encode information about the transform coefficients of the current block based on the prediction block of the current block. In other words, image encoder 160 can generate a residual block of the current block based on the original block and the prediction block of the current block, and encode information about the transform coefficients of the current block by transforming and quantizing the residual block of the current block. Image encoder 160 can encode information about the prediction mode of the current block and information about the intra-prediction mode of the current block.
[0128] The image encoder 160 can generate a bit stream that includes information about the transform coefficients of the current block, and output the bit stream.
[0129] Figure 2bThis is a flowchart of an image encoding method according to various embodiments.
[0130] In operation S150, the image encoding device 150 may determine a filter for the current sample based on at least one of the distance between the current sample and the reference sample and the size of the current block.
[0131] In operation S155, the image encoding device 150 can generate a prediction block for the current block, which includes prediction samples of the current samples generated using the determined filter. In operation S160, the image encoding device 150 can encode information about the transform coefficients of the current block based on the prediction block of the current block.
[0132] Figure 2c The illustration shows a block diagram of an image encoder according to various embodiments.
[0133] The image encoder 7000 according to various embodiments performs operations performed when the image encoder 160 of the image encoding device 150 decodes image data.
[0134] In other words, the intra-predictor 7200 performs intra-prediction block by block on the current image 7050, and the inter-predictor 7150 performs inter-prediction block by block using the current image 7050 of each block and a reference image obtained from the recovery frame buffer 7100.
[0135] Residual data can be generated by subtracting the prediction data for each block output from the intra-frame predictor 7200 or the inter-frame predictor 7150 from the data of the block encoded for the current image 7050, and the transformer 7250 and the quantizer 7300 can output block-quantized transform coefficients by performing transform and quantization on the residual data. Figure 2c The intra-frame predictor 7200 can correspond to Figure 2a Intra-frame predictor 155.
[0136] The dequantizer 7450 and inverse transform 7500 can recover the spatial domain residual data by performing dequantization and inverse transform on the quantized transform coefficients. The recovered spatial domain residual data can be added to the prediction data for each block output from the intra-frame predictor 7200 or the inter-frame predictor 7150 to recover the spatial domain data for the current image 7050. The deblocking unit 7550 and the sample adaptive offset actuator generate a filtered recovered image by performing intra-loop filtering on the recovered spatial domain data. The resulting recovered image is stored in the recovered image buffer 7100. The recovered image stored in the recovered image buffer 7100 can be used as a reference image for inter-frame prediction of another image. The entropy encoder 7350 can entropy encode the quantized transform coefficients, and the entropy-encoded coefficients can be output as a bitstream 7400.
[0137] In order for the image encoder 7000 according to various embodiments to be applied to the image encoding apparatus 150, the step-by-step operation of the image encoder 7000 according to various embodiments can be performed in blocks.
[0138] Figure 2d This is a block diagram of the image encoding apparatus 150 according to an embodiment.
[0139] The image encoding apparatus 150 according to an embodiment may include a memory 165 and at least one processor 170 connected to the memory 165. The image encoding apparatus 150 according to an embodiment may operate as a separate processor, or it may operate under the control of a central processing unit. Furthermore, the memory 165 of the image encoding apparatus 150 may store data received from external sources and data generated by the processor.
[0140] The processor 170 of the image encoding apparatus 150 can determine a filter for the current sample based on at least one of the distance between the current sample and the reference previous sample in the current block and the size of the current block, and generate a prediction block of the current block including prediction samples of the current sample generated using the determined filter, and encode information about the transform coefficients of the current block based on the prediction block of the current block.
[0141] The division of coding units will be described in detail below according to embodiments of the present disclosure.
[0142] First, a picture can be divided into one or more stripes. A strip can be a sequence of one or more Coding Tree Units (CTUs). The concept contrasting with a CTU is a Coding Tree Block (CTB).
[0143] A maximum coding block (CTB) is an N×N block containing N×N samples (N is an integer). Each color component can be divided into one or more maximum coding blocks.
[0144] When the image has three sample arrays (sample arrays by Y, Cr, and Cb components), the Maximum Coding Unit (CTU) is a unit that includes the maximum coding block for the luma sample and two maximum coding blocks for the corresponding chroma sample, along with a syntax structure for encoding the luma and chroma samples. When the image is monochrome, the maximum coding unit is a unit that includes the maximum coding block for monochrome samples and a syntax structure for encoding the monochrome samples. When the image is encoded using color planes that separate each color component, the maximum coding unit is a unit that includes a syntax structure for encoding the corresponding image and its samples.
[0145] A maximum coding block (CTB) can be divided into an MxN coding block consisting of MxN samples (M and N are integers).
[0146] When the image has sample arrays based on Y, Cr, and Cb components, the Coding Unit (CU) is a coded block comprising a coded block for luminance samples and two coded blocks for their corresponding chrominance samples, along with a syntax structure for encoding the luminance and chrominance samples. When the image is monochrome, the Coding Unit is a unit comprising a coded block for monochrome samples and a syntax structure for encoding the monochrome samples. When the image is encoded using color planes that separate each color component, the Coding Unit is a unit comprising the corresponding image and a syntax structure for encoding the samples of that image.
[0147] As stated above, the maximum coding block and the maximum coding unit are distinct concepts, and the coding block and the coding unit are different concepts. In other words, the (maximum) coding unit refers to the (maximum) coding block that includes the corresponding samples and the data structure that includes the corresponding syntax structure. However, those skilled in the art will understand that the (maximum) coding unit or (maximum) coding block refers to a block of a predetermined size that includes a predetermined number of samples. Therefore, in the following description, the maximum coding block and the maximum coding unit, or the coding block and the coding unit, are mentioned without distinction unless otherwise stated.
[0148] An image can be divided into maximum coding units (CTUs). The size of a CTU can be determined based on information obtained from the bitstream. A CTU can be a square of the same size, but is not limited to this.
[0149] For example, information about the maximum size of a luminance-coded block can be obtained from the bitstream. For example, information about the maximum size of a luminance-coded block indicates that the maximum size of the luminance-coded block can be one of 16×16, 32×32, 64×64, 128×128, and 256×256.
[0150] For example, information about the difference between the maximum size of the luma coding block that can be divided into two and the size of the luma block can be obtained from the bitstream. This difference in luma block size indicates the difference between the size of the maximum luma coding unit and the maximum luma coding block that can be divided into two. Therefore, by combining the information about the maximum size of the luma coding block that can be divided into two obtained from the bitstream and the information about the difference in luma block sizes, the size of the maximum luma coding unit can be determined. Using the size of the maximum luma coding unit, the size of the maximum chroma coding unit can be determined. For example, when the color format Y:Cb:Cr ratio is 4:2:0, the size of the chroma block can be half the size of the luma block, and similarly, the size of the maximum chroma coding unit can be half the size of the maximum luma coding unit.
[0151] According to an embodiment, information about the maximum size of a luminance coding block capable of binary splitting is obtained from the bitstream, thus allowing the maximum size of such a block to be variably determined. In contrast, the maximum size of a luminance coding block capable of ternary splitting can be fixed. For example, the maximum size of a luminance coding block capable of ternary splitting in an I-strip could be 32×32, and the maximum size of a luminance coding block capable of ternary splitting in a P-strip or B-strip could be 64×64.
[0152] Furthermore, the maximum coding unit can be hierarchically divided into coding units based on the partition shape pattern information obtained from the bitstream. As partition shape pattern information, at least one of the following can be obtained from the bitstream: information indicating whether quadsplit is performed, information indicating whether multi-partitioning is performed, information indicating the partition direction, and information indicating the partition type.
[0153] For example, information indicating whether a quad split has occurred can indicate whether the current coding unit has been quad-split (QUAD_SPLIT).
[0154] When the current coding unit is not quad-partitioned, the information indicating whether the current coding unit is multi-partitioned can indicate whether the current coding unit will no longer be partitioned (NO_SPLIT) or will be partitioned into two or three parts.
[0155] When the current coding unit is divided into two or three parts, the division direction information indicates whether the current coding unit is divided in a horizontal or vertical direction.
[0156] When the current coding unit is divided horizontally or vertically, the division type information indicates whether the current coding unit is divided into two or three parts.
[0157] Based on the partitioning direction and partitioning type information, the partitioning mode of the current coding unit can be determined. When the current coding unit is partitioned into two horizontally, the partitioning mode can be determined as two-horizontal partition (SPLIT_BT_HOR); when it is partitioned into three horizontally, the partitioning mode is three-horizontal partition (SPLIT_TT_HOR); when it is partitioned into two vertically, the partitioning mode can be determined as two-vertical partition (SPLIT_BT_VER); and when it is partitioned into three vertically, the partitioning mode can be determined as three-vertical partition (SPLIT_BT_VER).
[0158] Image decoding device 100 can obtain partitioning pattern information from a binary string in a bitstream. The shape of the bitstream received by image decoding device 100 can include fixed-length binary code, unary code, truncated unary code, and predetermined binary code, etc. The binary string indicates information by arranging binary numbers. The binary string can consist of at least one bit. Image decoding device 100 can obtain partitioning pattern information corresponding to the binary string based on partitioning rules. Image decoding device 100 can determine, based on a binary string, whether to partition the coding unit into four parts, whether not to partition, or the partitioning direction and type.
[0159] A coding unit can be less than or equal to the largest coding unit. For example, the largest coding unit is the coding unit with the largest size, and it is also one of the coding units. When the partitioning shape pattern information regarding the partitioning pattern indicates that no partitioning is to be performed, the coding units determined within the largest coding unit have the same size as the largest coding unit. When the partitioning pattern information regarding the largest coding unit indicates that partitioning is to be performed, the largest coding unit can be divided into coding units. Furthermore, when partitioning is performed based on the partitioning pattern information regarding coding units, a coding unit can be divided into coding units with smaller sizes. However, image partitioning is not limited to this, and the largest coding unit and coding units may not be distinguished. Figures 3 to 16 The division of coding units is described in more detail.
[0160] Additionally, one or more prediction blocks for prediction can be determined from the coding unit. A prediction block can be equal to or smaller than the coding unit. Additionally, one or more transform blocks for transform can be determined from the coding unit. A transform block can be equal to or smaller than the coding unit.
[0161] The shapes and sizes of the transform blocks and the prediction blocks can be independent of each other.
[0162] According to another embodiment, the coding unit can perform prediction by being used as a prediction block. Alternatively, the coding unit can perform transformation by being used as a transform block.
[0163] exist Figures 3 to 16 The partitioning of coding units is described in more detail. The current block and neighboring blocks in this disclosure can refer to one of the maximum coding unit, coding unit, prediction block, and transform block. Furthermore, the current block or current coding unit is the block currently being decoded or encoded, or the block currently being partitioned. Neighboring blocks can be blocks that were recovered before the current block. Neighboring blocks can be spatially or temporally adjacent to the current block. Neighboring blocks can be located at one of the following positions: lower left, left, upper left, upper, upper right, right, and lower right of the current block.
[0164] Figure 3 The process of determining at least one coding unit by dividing the current coding unit according to an embodiment of the image decoding apparatus 100 is illustrated.
[0165] The block shape can include 4N×4N, 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N. Here, N can be a positive integer. The block shape information is information indicating at least one of the following: the shape, orientation, width-to-height ratio, and dimensions of the coding unit.
[0166] The shape of the encoding unit can be square or non-square. When the width and height of the encoding unit are the same (i.e., when the block shape of the encoding unit is 4N×4N), the image decoding device 100 can determine the block shape information of the encoding unit as square. The image decoding device 100 can also determine the shape of the encoding unit as non-square.
[0167] When the width and height of the coding unit are different (i.e., when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N), the image decoding device 100 can determine that the block shape information of the coding unit is not square. When the shape of the coding unit is not square, the image decoding device 100 can determine the ratio of width to height in the block shape information of the coding unit to be 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. Furthermore, based on the width and height of the coding unit, the image decoding device 100 can determine whether the coding unit is horizontal or vertical. Furthermore, based on at least one of the width, height, and area of the coding unit, the image decoding device 100 can determine the size of the coding unit.
[0168] According to one embodiment, the image decoding apparatus 100 can determine the shape of the coding unit using block shape information, and can determine the form in which the coding unit is divided using partitioning pattern information. In other words, the partitioning method of the coding unit indicated by the partitioning pattern information can be determined based on which block shape is indicated by the block shape information used by the image decoding apparatus 100.
[0169] Image decoding device 100 can obtain partition shape pattern information from the bitstream. However, it is not limited to this, and image decoding device 100 and image encoding device 150 can determine predetermined partition shape pattern information based on block shape information. Image decoding device 100 can determine predetermined partition shape pattern information for the largest or smallest coding unit. For example, for the largest coding unit, image decoding device 100 can determine the partition form pattern information as quad split. And, for the smallest coding unit, image decoding device 100 can determine the partition form pattern information as "no split". Specifically, image decoding device 100 can determine the size of the largest coding unit to be 256×256. Image decoding device 100 can determine the predetermined partition shape pattern information as quad split. Quad split is a partition form pattern that divides both the width and height of the coding unit into two equal parts. Image decoding device 100 can obtain a coding unit of size 128×128 from the largest coding unit of size 256×256 based on the partition shape pattern information. Furthermore, the image decoding device 100 can determine the size of the smallest coding unit to be 4x4. The image decoding device 100 can obtain partitioning pattern information indicating "no partitioning" for the smallest coding unit.
[0170] According to an embodiment, the image decoding device 100 can use block shape information indicating that the current coding unit has a square shape. For example, the image decoding device 100 can determine whether to leave the square coding unit undivided, divide it vertically, divide it horizontally, or divide it into four coding units, etc., based on partitioning pattern information. (See also...) Figure 3 When the block shape information of the current coding unit 300 shows a square shape, the decoder 120 may not divide the coding unit 310a with the same size as the current coding unit 300 based on the partitioning pattern information indicating that it should not be divided, or it may determine the coding units 310b, 310c, 310d, 310e and 310f, etc., that are divided based on the partitioning pattern information indicating a predetermined partitioning method.
[0171] Reference Figure 3Image decoding apparatus 100 can, according to one embodiment, determine two coding units 310b by vertically dividing the current coding unit 300 based on partitioning pattern information indicating vertical division. Image decoding apparatus 100 can determine two coding units 310c that horizontally divide the current coding unit 300 based on partitioning pattern information indicating horizontal division. Image decoding apparatus 100 can determine four coding units 310d that vertically and horizontally divide the current coding unit 300 based on partitioning pattern information indicating that the coding unit is divided in both vertical and horizontal directions. According to an embodiment, image decoding apparatus 100 can determine three coding units 310e that vertically divide the current coding unit 300 based on partitioning shape pattern information indicating that the coding unit is divided into three (ternary) parts in the vertical direction. Image decoding apparatus 100 can determine three coding units 310f that horizontally divide the current coding unit 300 based on partitioning shape pattern information indicating that the coding unit is divided into three (ternary) parts in the horizontal direction. However, the partitioning form of the coding unit used to divide the square should not be construed as limited to the forms described above, but can include various forms that can be indicated by partitioning form pattern information. The predetermined partitioning forms of the coding unit for dividing the square are specifically described below with reference to various embodiments.
[0172] Figure 4 The illustration shows the process of determining at least one coding unit by dividing a non-square-shaped coding unit according to an image decoding apparatus 100 of one embodiment.
[0173] According to one embodiment, the image decoding apparatus 100 can use block shape information indicating that the current coding unit has a non-square shape. The image decoding apparatus 100 can determine, based on partitioning pattern information, whether to partition the current coding unit without dividing it into a non-square shape or to partition the current coding unit in a predetermined manner. (See also...) Figure 4 When the block shape information of the current encoding unit 400 or 450 indicates a non-square shape, the image decoding device 100 can determine an encoding unit 410 or 460 with the same size as the current encoding unit 400 or 450 based on the partitioning pattern information indicating no partitioning, or it can determine the partitioned encoding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, and 480c based on the partitioning pattern information indicating a predetermined partitioning method. The predetermined partitioning method for partitioning non-square encoding units is described in detail below with reference to various embodiments.
[0174] According to one embodiment, the image decoding apparatus 100 can use partitioning pattern information to determine the form of partitioned coding units. In this case, the partitioning pattern information can indicate the number of at least one coding unit generated by partitioning the coding units. (See also...) Figure 4 When the partitioning pattern information indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 can determine the two coding units 420a, 420b or 470a, 470b included in the current coding unit by partitioning the current coding unit 400 or 450 based on the partitioning pattern information.
[0175] According to one embodiment, when the image decoding device 100 divides a non-square current coding unit 400 or 450 based on partitioning pattern information, the image decoding device 100 may divide the current coding unit by considering the position of the long side of the non-square current coding unit 400 or 450. For example, the image decoding device 100 may consider the shape of the current coding unit 400 or 450 and divide the current coding unit 400 or 450 by the direction of the long side of the current coding unit 400 or 450 to determine multiple coding units.
[0176] According to one embodiment, when the partitioning pattern information indicates that the coding unit is divided (ternary split) into an odd number of blocks, the image decoding device 100 can determine the odd number of coding units included in the current coding unit 400 or 450. For example, when the partitioning pattern information indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding device 100 can divide the current coding unit 400 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480c.
[0177] According to one embodiment, the width-to-height ratio of the current encoding unit 400 or 450 can be 4:1 or 1:4. When the width-to-height ratio is 4:1, since the width is greater than the height, the block shape information can be horizontal. When the width-to-height ratio is 1:4, since the width is shorter than the height, the block shape information can be vertical. The image decoding device 100 can determine whether to divide the current encoding unit into an odd number of blocks based on the partitioning pattern information. Furthermore, the image decoding device 100 can determine the partitioning direction of the current encoding unit 400 or 450 based on the block shape information of the current encoding unit 400 or 450. For example, when the current encoding unit 400 is vertical, the image decoding device 100 can determine encoding units 430a, 430b, and 430c by dividing the current encoding unit 400 horizontally. Similarly, when the current encoding unit 450 is horizontal, the image decoding device 100 can determine encoding units 480a, 480b, and 480c by dividing the current encoding unit vertically.
[0178] According to one embodiment, the image decoding apparatus 100 can determine an odd number of coding units included in the current coding unit 400 or 450, and the sizes of the determined coding units are not necessarily the same. For example, the size of a predetermined coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c may be different from the sizes of the other coding units 430a, 430c, 480a, and 480c. In other words, the coding units determined by dividing the current coding unit 400 or 450 can have multiple types of sizes, and depending on the situation, the odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c can each have different sizes.
[0179] According to one embodiment, when the partitioning pattern information indicates that the coding unit is divided into an odd number of blocks, the image decoding device 100 can determine the odd number of coding units included in the current coding unit 400 or 450. Furthermore, the image decoding device 100 can impose a predetermined restriction on at least one coding unit among the odd number of coding units generated by the partitioning. (Refer to...) Figure 4The image decoding apparatus 100 can make the decoding process for the central coding units 430b and 480b among the three coding units 430a, 430b, and 430c or 480a, 480b, and 480c generated by dividing the current coding units 400 or 450 different from the decoding process for the other coding units 430a, 430c, 480a, and 480c. For example, unlike the other coding units 430a, 430c, 480a, and 480c, the image decoding apparatus 100 can restrict the central coding units 430b and 480b from being divided again or only divided a predetermined number of times.
[0180] Figure 5 The illustration shows the process by which an image decoding apparatus 100 according to an embodiment divides coding units based on at least one of block shape information and partitioning pattern information.
[0181] According to one embodiment, the image decoding apparatus 100 can determine, based on at least one of block shape information and partitioning pattern information, whether to divide the square first coding unit 500 into multiple coding units or to determine not to divide it. According to one embodiment, when the partitioning pattern information indicates that the first coding unit 500 is divided horizontally, the image decoding apparatus 100 can determine the second coding unit 510 by dividing the first coding unit 500 horizontally. The terms first coding unit, second coding unit, and third coding unit used in one embodiment are terms used to understand the pre- and post-partition relationships between coding units. For example, the second coding unit can be determined by dividing the first coding unit, and the third coding unit can be determined by dividing the second coding unit. In the following, it will be understood that the relationship between the first coding unit, second coding unit, and third coding unit used is based on the above-described characteristics.
[0182] According to one embodiment, the image decoding apparatus 100 can determine, based on partitioning pattern information, whether to divide the determined second coding unit 510 into multiple coding units or to determine not to divide it. (See also...) Figure 5The image decoding apparatus 100 can divide a non-square-shaped second coding unit 510, determined by dividing the first coding unit 500, into at least one third coding unit 520a, 520b, 520c, and 520d, or not divide the second coding unit 510, based on the division pattern information. The image decoding apparatus 100 can obtain the division pattern information and can divide the first coding unit 500 into multiple second coding units (e.g., 510) of various forms based on the obtained division pattern information. Furthermore, the second coding unit 510 can be divided according to the way the first coding unit 500 is divided based on the division pattern information. According to one embodiment, when the first coding unit 500 is divided into a second coding unit 510 based on the division pattern information regarding the first coding unit 500, the second coding unit 510 can also be divided into third coding units (e.g., 520a, 520b, 520c, and 520d, etc.) based on the division pattern information regarding the second coding unit 510. In other words, coding units can be recursively partitioned based on partitioning pattern information associated with each coding unit. Therefore, square coding units can be determined from non-square coding units, and non-square coding units can be determined by recursively partitioning square coding units.
[0183] Reference Figure 5 A predetermined coding unit (e.g., a centrally located coding unit or a square-shaped coding unit) among an odd number of third coding units 520b, 520c, and 520d, determined by dividing a non-square-shaped second coding unit 510, can be recursively divided. According to one embodiment, a square third coding unit 520b, which is one of the odd number of third coding units 520b, 520c, and 520d, can be horizontally divided into a plurality of fourth coding units. A non-square-shaped fourth coding unit 530b or 530d, one of the plurality of fourth coding units 530a, 530b, 530c, and 530d, can be further divided into a plurality of coding units. For example, a non-square fourth coding unit 530b or 530d can be further divided into an odd number of coding units. Methods for recursively dividing coding units will be described later with reference to various embodiments.
[0184] According to one embodiment, the image decoding device 100 can divide the third coding units 520a, 520b, 520c, and 520d into multiple coding units based on partitioning pattern information. Furthermore, the image decoding device 100 can determine not to divide the second coding unit 510 based on the partitioning pattern information. According to one embodiment, the image decoding device 100 can divide the non-square-shaped second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 can impose a predetermined restriction on a predetermined number of third coding units in the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 can restrict the central coding unit 520c in the odd number of third coding units 520b, 520c, and 520d to a set number of times it can be divided or not divided.
[0185] Reference Figure 5 The image decoding device 100 may restrict the central encoding unit 520c from being divided into four encoding units (520b, 520c, and 520d) within the odd number of third encoding units 520b, 520c, and 520d included in the non-square-shaped second encoding unit 510. This restriction may limit the division method (e.g., dividing into only four encoding units or dividing in a manner corresponding to the division of the second encoding unit 510), or limit the number of divisions (e.g., dividing only n times, where n>0). However, the restrictions on the central encoding unit 520c are merely illustrative embodiments and should not be construed as limiting it to the above-described embodiments. Instead, they should be interpreted as including various restrictions that allow the central encoding unit 520c to be decoded differently from the other encoding units 520b and 520d.
[0186] According to one embodiment, the image decoding device 100 can obtain partitioning pattern information for dividing the current coding unit from a predetermined position within the current coding unit.
[0187] Figure 6 The illustration shows a method for determining a predetermined coding unit from an odd number of coding units according to an embodiment of an image decoding apparatus 100.
[0188] Reference Figure 6 The partitioning pattern information of the current coding units 600 and 650 can be obtained from samples located at predetermined positions (e.g., samples 640 and 690 located at the center) among a plurality of samples included in the current coding units 600 and 650. However, the predetermined position within the current coding unit 600 from which at least one of such partitioning pattern information can be obtained should not be construed as being limited to... Figure 6The central position shown is used, while the predetermined position can be interpreted as including various positions that can be included within the current coding unit 600 (e.g., top, bottom, left, right, upper left, lower left, upper right, or lower right, etc.). The image decoding device 100 can obtain the partitioning pattern information obtained from the predetermined position to determine whether to divide the current coding unit into coding units of various shapes and sizes or to determine not to partition it.
[0189] According to one embodiment, when the current coding unit is divided into a predetermined number of coding units, the image decoding device 100 can select one of the coding units. Various methods for selecting one coding unit from a plurality of coding units are possible, and these various methods will be described later with reference to the following various embodiments.
[0190] According to one embodiment, the image decoding device 100 can divide the current encoding unit into multiple encoding units and determine the encoding unit at a predetermined position.
[0191] According to one embodiment, the image decoding apparatus 100 can use information indicating the positions of each of the odd-numbered coding units to determine the central coding unit among the odd-numbered coding units. (See also...) Figure 6 The image decoding apparatus 100 can divide the current encoding unit 600 or the current encoding unit 650 to determine an odd number of encoding units 620a, 620b, and 620c or an odd number of encoding units 660a, 660b, and 660c. The image decoding apparatus 100 can use information about the positions of the odd number of encoding units 620a, 620b, and 620c or the odd number of encoding units 660a, 660b, and 660c to determine the central encoding unit 620b or the central encoding unit 660b. For example, the image decoding apparatus 100 can determine the positions of encoding units 620a, 620b, and 620c based on information indicating the positions of predetermined samples included in encoding units 620a, 620b, and 620c to determine the centrally located encoding unit 620b. Specifically, the image decoding device 100 can determine the positions of the encoding units 620a, 620b and 620c based on the information indicating the positions of the samples 630a, 630b and 630c at the upper left side of the encoding units 620a, 620b and 620c, and determine the encoding unit 620b located in the center.
[0192] According to one embodiment, the information indicating the positions of the samples 630a, 630b, and 630c included at the upper left end of the encoding units 620a, 620b, and 620c may include information about the position or coordinates of the encoding units 620a, 620b, and 620c within the frame. According to another embodiment, the information indicating the positions of the samples 630a, 630b, and 630c included at the upper left end of the encoding units 620a, 620b, and 620c may include information indicating the width or height of the encoding units 620a, 620b, and 620c included in the current encoding unit 600, which may correspond to information indicating the difference between the coordinates of the encoding units 620a, 620b, and 620c within the frame. That is, the image decoding device 100 can directly use information about the position or coordinates of the encoding units 620a, 620b, and 620c within the frame, or use information about the width or height of the encoding unit corresponding to the difference between the coordinates, to determine the centrally located encoding unit 620b.
[0193] According to one embodiment, information indicating the position of the sample point 630a at the upper left end of the upper encoding unit 620a can indicate (xa, ya) coordinates; information indicating the position of the sample point 630b at the upper left end of the central encoding unit 620b can indicate (xb, yb) coordinates; and information indicating the position of the sample point 630c at the upper left end of the lower encoding unit 620c can indicate (xc, yc) coordinates. The image decoding device 100 can use the coordinates of the samples 630a, 630b, and 630c at the upper left end included in the encoding units 620a, 620b, and 620c respectively to determine the central encoding unit 620b. For example, by arranging the coordinates of the sample points 630a, 630b, and 630c at the upper left end in ascending or descending order, the coding unit 620b, which includes the coordinates of the sample point 630b located in the center (i.e., (xb, yb)), can be determined as the central 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 samples 630a, 630b, and 630c at the upper left can refer to coordinates indicating their absolute positions within the frame. Furthermore, (dxb, dyb) coordinates, which indicate the relative position of the sample 630b at the upper left of the central encoding unit 620b relative to the sample 630a at the upper left of the upper encoding unit 620a, and (dxc, dyc) coordinates, which indicate the relative position of the sample 630c at the upper left of the lower encoding unit 620c relative to the sample 630a at the upper left of the upper encoding unit 620a, can be used. Moreover, the method of determining the predetermined position of an encoding unit by using the information indicating the positions of the samples included in the encoding unit as the coordinates of those samples should not be construed as limited to the methods described above, but rather as allowing the use of various arithmetic methods employing the coordinates of the samples.
[0194] According to one embodiment, the image decoding device 100 can divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, and 620c, and can determine an encoding unit from the encoding units 620a, 620b, and 620c according to a predetermined standard. For example, the image decoding device 100 can select an encoding unit 620b with a different size from the encoding units 620a, 620b, and 620c.
[0195] According to one embodiment, the image decoding device 100 can use (xa, ya) coordinates (indicating the position of the sample point 630a at the upper left end of the upper encoding unit 620a), (xb, yb) coordinates (indicating the position of the sample point 630b at the upper left end of the central encoding unit 620b), and (xc, yc) coordinates (indicating the position of the sample point 630c at the upper left end of the lower encoding unit 620c) to determine the width and height of each encoding unit 620a, 620b, and 620c. The image decoding device 100 can use the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the encoding units 620a, 620b, and 620c to determine the respective dimensions of each encoding unit 620a, 620b, and 620c. According to one embodiment, the image decoding device 100 can determine the width of the upper encoding unit 620a as the width of the current encoding unit 600. The image decoding apparatus 100 can determine the height of the upper encoding unit 620a as yb-ya. According to one embodiment, the image decoding apparatus 100 can determine the width of the central encoding unit 620b as the width of the current encoding unit 600. The image decoding apparatus 100 can determine the height of the central encoding unit 620b as yc-yb. According to one embodiment, the image decoding apparatus 100 can determine the width or height of the lower encoding unit using the width or height of the current encoding unit and the width and height of the upper encoding unit 620a and the central encoding unit 620b. The image decoding apparatus 100 can determine encoding units with dimensions different from the dimensions of other encoding units based on the determined widths and heights of the encoding units 620a, 620b, and 620c. (Refer to...) Figure 6 The image decoding apparatus 100 can determine a central encoding unit 620b, which has a size different from that of the upper encoding unit 620a and the lower encoding unit 620c, as an encoding unit at a predetermined position. However, the process by which the image decoding apparatus 100 determines an encoding unit with a size different from that of other encoding units is only one embodiment of determining an encoding unit at a predetermined position using the size of the encoding unit determined based on sample coordinates. Therefore, various processes can be used to determine an encoding unit at a predetermined position by comparing the size of the encoding unit determined according to predetermined sample coordinates.
[0196] The image decoding apparatus 100 can use (xd, yd) coordinates (indicating the position of sample 670a at the upper left of the left coding unit 660a), (xe, ye) coordinates (indicating the position of sample 670b at the upper left of the central coding unit 660b), and (xf, yf) coordinates (indicating the position of sample 670c at the upper left of the right coding unit 660c) to determine the width or height of each coding unit 660a, 660b, and 660c. The image decoding apparatus 100 can also use (xd, yd), (xe, ye), and (xf, yf) coordinates (indicating the positions of coding units 660a, 660b, and 660c) to determine the dimensions of each coding unit 660a, 660b, and 660c.
[0197] According to one embodiment, the image decoding device 100 can determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 can determine the height of the left coding unit 660a as the height of the current coding unit 650. According to one embodiment, the image decoding device 100 can determine the width of the central coding unit 660b as xf-xe. The image decoding device 100 can determine the height of the central coding unit 660b as the height of the current coding unit 600. According to one embodiment, the image decoding device 100 can determine the width or height of the right coding unit 660c using the width or height of the current coding unit 650 and the width and height of the left coding unit 660a and the central coding unit 660b. The image decoding device 100 can determine coding units with dimensions different from the dimensions of other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. (Refer to...) Figure 6 The image decoding apparatus 100 can determine a central coding unit 660b as a coding unit at a predetermined position, the central coding unit 660b having a size different from the left coding unit 660a and the right coding unit 660c. However, the process by which the image decoding apparatus 100 determines a coding unit with a size different from the other coding units is only one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates. Therefore, various processes can be used to determine a coding unit at a predetermined position by comparing the size of the coding unit determined according to the predetermined sample coordinates.
[0198] However, the position of the sample points considered in order to determine the position of the coding unit should not be interpreted as limited to the upper left end, but can be interpreted as using information about the position of any sample points included in the coding unit.
[0199] According to one embodiment, the image decoding apparatus 100 can select a coding unit at a predetermined position from an odd number of coding units determined by dividing the current coding unit, taking into account the form of the current coding unit. For example, if the current coding unit has a non-square shape whose width is greater than its height, the image decoding apparatus 100 can determine the coding unit at the predetermined position based on the horizontal direction. In other words, the image decoding apparatus 100 can determine one coding unit from those located at different positions in the horizontal direction and restrict that coding unit. If the current coding unit has a non-square shape whose height is greater than its width, the image decoding apparatus 100 can determine the coding unit at the predetermined position based on the vertical direction. In other words, the image decoding apparatus 100 can determine one coding unit from those located at different positions in the vertical direction and restrict that coding unit.
[0200] According to one embodiment, the image decoding apparatus 100 can use information indicating the positions of each of an even number of coding units to determine the coding unit at a predetermined position within the even number of coding units. The image decoding apparatus 100 can determine the even number of coding units by dividing (binary-split) the current coding unit, and can use information about the positions of the even number of coding units to determine the coding unit at the predetermined position. A specific process for this can be found in reference [reference needed]. Figure 6 The process of determining the coding unit at a predetermined position (e.g., the central position) from an odd number of coding units, described in detail, will not be repeated here.
[0201] According to one embodiment, when a current coding unit having a non-square shape is divided into multiple coding units, predetermined information about the coding unit at a predetermined position can be used during the division process to determine the coding unit at the predetermined position from among the multiple coding units. For example, during the division process, the image decoding apparatus 100 can use at least one of block shape information and division pattern information stored in the sample points included in the central coding unit to determine the central coding unit from among the multiple coding units that divide the current coding unit.
[0202] Reference Figure 6The image decoding device 100 can divide the current coding unit 600 into multiple coding units 620a, 620b, and 620c based on partitioning pattern information, and can determine the central coding unit 620b from among the multiple coding units 620a, 620b, and 620c. Furthermore, the image decoding device 100 can determine the central coding unit 620b by considering the position of the obtained partitioning pattern information. That is, partitioning pattern information can be obtained from the sample point 640 located at the center of the current coding unit 600, and the coding unit 620b including the sample point 640 when the current coding unit 600 is divided into multiple coding units 620a, 620b, and 620c can be determined as the central coding unit based on the partitioning pattern information. However, the information used to determine the central coding unit should not be interpreted as limited to partitioning pattern information; rather, various types of information can be used in the process of determining the central coding unit.
[0203] According to one embodiment, predetermined information for identifying a coding unit at a predetermined position can be obtained from predetermined samples included in the coding unit to be determined. (See also...) Figure 6 The image decoding apparatus 100 can use partitioning pattern information obtained from samples at predetermined positions within the current encoding unit 600 (e.g., samples located at the center of the current encoding unit 600) to determine an encoding unit at a predetermined position (e.g., a central encoding unit among multiple encoding units 620a, 620b, and 620c determined by partitioning the current encoding unit 600). That is, the image decoding apparatus 100 can determine the samples at the predetermined positions considering the block shape of the current encoding unit 600, and can determine an encoding unit 620b that includes samples from which predetermined information (e.g., partitioning pattern information) can be obtained among the multiple encoding units 620a, 620b, and 620c determined by partitioning the current encoding unit 600, and impose predetermined restrictions on that encoding unit 620b. (Refer to...) Figure 6 According to one embodiment, the image decoding apparatus 100 can determine a sample 640 located at the center of the current encoding unit 600 as a sample that can be used to obtain predetermined information, and can impose predetermined restrictions on the encoding unit 620b including the sample 640 during the decoding process. However, the position of the sample that can obtain predetermined information should not be interpreted as limited to the above-described position, but can be interpreted as any sample included in the encoding unit 620b determined for setting restrictions.
[0204] According to one embodiment, the location of a sample point from which predetermined information can be obtained can be determined based on the shape of the current encoding unit 600. According to one embodiment, block shape information can determine whether the shape of the current encoding unit is square or non-square, and the location of a sample point from which predetermined information can be obtained can be determined based on this shape. For example, the image decoding apparatus 100 can use at least one of the width and height information of the current encoding unit to determine a sample point located on a boundary that bisects at least one of the width and height of the current encoding unit as a sample point from which predetermined information can be obtained. According to another example, when the block shape information of the current encoding unit indicates a non-square shape, the image decoding apparatus 100 can determine one of the sample points adjacent to the boundary that bisects the long side of the current encoding unit as a sample point from which predetermined information can be obtained.
[0205] According to one embodiment, when a current coding unit is divided into multiple coding units, the image decoding apparatus 100 can use partitioning pattern information to determine the coding unit located at a predetermined position among the multiple coding units. According to one embodiment, the image decoding apparatus 100 can obtain partitioning pattern information from samples included at predetermined positions within the coding units, and can divide the multiple coding units generated by dividing the current coding unit using partitioning pattern information obtained from samples included at predetermined positions in each of the multiple coding units. In other words, the coding units can be recursively divided using partitioning pattern information obtained from samples included at predetermined positions in each coding unit. (See also...) Figure 5 The recursive partitioning process of the coding unit has been described in detail, so it will not be repeated here.
[0206] According to one embodiment, the image decoding apparatus 100 can determine at least one coding unit by dividing the current coding unit, and can determine the order in which the at least one coding unit is decoded according to a predetermined block (e.g., the current coding unit).
[0207] Figure 7 The illustration shows the order in which multiple coding units are processed when the image decoding device 100 divides the current coding unit to determine multiple coding units according to an embodiment.
[0208] According to one embodiment, the image decoding device 100 can determine the second coding units 710a and 710b by dividing the first coding unit 700 vertically according to the division pattern information, determine the second coding units 730a and 730b by dividing the first coding unit horizontally, or determine the second coding units 750a, 750b, 750c, and 750d by dividing the first coding unit 700 vertically and horizontally.
[0209] Reference Figure 7The image decoding apparatus 100 can determine an order such that the second coding units 710a and 710b, determined by dividing the first coding unit 700 in a vertical direction, are processed in a horizontal direction 710c. The image decoding apparatus 100 can also process the second coding units 730a and 730b, determined by dividing the first coding unit 700 in a horizontal direction, in a vertical direction 730c. The image decoding apparatus 100 can determine the second coding units 750a, 750b, 750c, and 750d, determined by dividing the first coding unit 700 in both vertical and horizontal directions, based on a predetermined order (e.g., raster scan order or z scan order 750e, etc.) after the coding units in one row are processed.
[0210] According to one embodiment, the image decoding apparatus 100 can recursively divide encoding units. (See also...) Figure 7 The image decoding device 100 can determine multiple coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d by dividing the first coding unit 700, and can recursively divide the determined multiple coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. The method of dividing the multiple coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d can be a method corresponding to the method of dividing the first coding unit 700. Therefore, the multiple coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d can each be independently divided into multiple coding units. (Refer to...) Figure 7 The image decoding device 100 can divide the first coding unit 700 in the vertical direction to determine the second coding units 710a and 710b, and further, it can determine whether to divide the second coding units 710a and 710b or not.
[0211] According to one embodiment, the image decoding device 100 can divide the second encoding unit 710a on the left side into third encoding units 720a and 720b in the horizontal direction, while it can leave the second encoding unit 710b on the right side undivided.
[0212] According to one embodiment, the processing order of the coding units can be determined based on the coding unit partitioning process. In other words, the processing order of the partitioned coding units can be determined based on the processing order of the coding units before partitioning. The image decoding apparatus 100 can determine the processing order of the third coding units 720a and 720b, which are determined by partitioning the second coding unit 710a on the left, separately from the second coding unit 710b on the right. Since the third coding units 720a and 720b are determined by partitioning the second coding unit 710a on the left in a horizontal direction, the third coding units 720a and 720b can be processed in a vertical direction 720c. Furthermore, the processing order of the second coding unit 710a on the left and the second coding unit 710b on the right corresponds to the horizontal direction 710c. Therefore, after the third coding units 720a and 720b included in the second coding unit 710a on the left are processed in a vertical direction 720c, the coding unit 710b on the right can be processed. The above content is only used to illustrate the process of determining the processing order of each coding unit based on the coding units before partitioning, and should not be interpreted as limited to the above embodiments. Rather, it should be interpreted as applicable to various methods in which coding units determined by partitioning in various forms can be processed independently in a predetermined order.
[0213] Figure 8 The illustration shows a process, according to one embodiment, determining that the current encoding unit will be divided into an odd number of encoding units when the image decoding device 100 cannot process the encoding units in a predetermined order.
[0214] According to one embodiment, the image decoding apparatus 100 determines that the current coding unit is divided into an odd number of coding units based on the obtained block shape information and partitioning pattern information. (See also...) Figure 8 The first encoding unit 800, which has a square shape, can be divided into non-square second encoding units 810a and 810b. The second encoding units 810a and 810b can each be independently divided into third encoding units 820a, 820b, 820c, 820d, and 820e. According to one embodiment, in the second encoding unit, the image decoding device 100 can horizontally divide the left encoding unit 810a to determine a plurality of third encoding units 820a and 820b, and can divide the right encoding unit 810b into an odd number of third encoding units 820c, 820d, and 820e.
[0215] According to one embodiment, the image decoding device 100 can determine whether the third encoding units 820a, 820b, 820c, 820d, and 820e can be processed in a predetermined order to determine whether there exists an odd number of encoding units. (See also...) Figure 8The image decoding device 100 can recursively divide the first coding unit 800 to determine the third coding units 820a, 820b, 820c, 820d, and 820e. The image decoding device 100 can determine whether the first coding unit 800, the second coding units 810a and 810b, or the third coding units 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units in the division pattern based on the division pattern information. For example, the coding unit located on the right side of the second coding units 810a and 810b can be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the multiple encoding units included in the first encoding unit 800 can be a predetermined order (e.g., z-scan order 830). The image decoding device 100 can determine whether the third encoding units 820c, 820d, and 820e, which are determined by dividing the second encoding unit 810b on the right into an odd number of units, meet the condition that they can be processed in the predetermined order.
[0216] According to one embodiment, the image decoding apparatus 100 can determine whether the third encoding units 820a, 820b, 820c, 820d, and 820e included in the first encoding unit 800 satisfy a condition that they can be processed in a predetermined order. This condition relates to whether at least one of the width and height of the second encoding units 810a and 810b can be halved according to the boundaries of the third encoding units 820a, 820b, 820c, 820d, and 820e. For example, the third encoding units 820a and 820b, determined by halving the height of the non-square-shaped left-side second encoding unit 810a, can satisfy the condition. The boundaries of the third encoding units 820c, 820d, and 820e, determined by dividing the right-side second encoding unit 810b into three encoding units, cannot halve the width or height of the right-side second encoding unit 810b; therefore, it can be determined that the third encoding units 820c, 820d, and 820e do not satisfy the condition. The image decoding apparatus 100 can determine that the failure to meet this condition constitutes a discontinuity in the scanning order, and can determine, based on the determination result, that the second coding unit 810b on the right is divided into an odd number of coding units. According to one embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 can impose predetermined restrictions on the coding units at predetermined positions among the divided coding units. Since these restrictions or predetermined positions have been described in detail with reference to various embodiments, they will not be repeated here.
[0217] Figure 9 The illustration shows the process of determining at least one coding unit by dividing a first coding unit 900 according to an image decoding apparatus 100 of one embodiment.
[0218] According to one embodiment, the image decoding apparatus 100 can divide the first coding unit 900 based on partitioning pattern information obtained from a receiver (not shown). The square first coding unit 900 can be divided into four coding units having a square shape or into multiple coding units with non-square shapes. For example, referring to... Figure 9 When the first coding unit 900 is square and the partitioning pattern information indicates that it is divided into non-square coding units, the image decoding device 100 can divide the first coding unit 900 into multiple non-square coding units. Specifically, when the partitioning pattern information indicates that an odd number of coding units are determined by dividing the first coding unit 900 in a horizontal or vertical direction, the image decoding device 100 can divide the square-shaped first coding unit 900 into an odd number of coding units, that is, second coding units 910a, 910b, and 910c determined by vertical partitioning or second coding units 920a, 920b, and 920c determined by horizontal partitioning.
[0219] According to one embodiment, the image decoding apparatus 100 can determine whether second encoding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first encoding unit 900 satisfy a condition that they can be processed in a predetermined order. This condition relates to whether at least one of the width and height of the first encoding unit 900 can be divided in half according to the boundaries of the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c. (Refer to...) Figure 9 The boundaries of the second encoding units 910a, 910b, and 910c, determined by dividing the first encoding unit 900 into a square shape vertically, cannot halve the width of the first encoding unit 900. Therefore, it can be determined that the first encoding unit 900 does not meet the condition for processing in a predetermined order. Furthermore, the boundaries of the second encoding units 920a, 920b, and 920c, determined by dividing the first encoding unit 900 into a square shape horizontally, cannot halve the height of the first encoding unit 900. Therefore, it can be determined that the first encoding unit 900 does not meet the condition for processing in a predetermined order. The image decoding device can determine that this condition is not met as a disconnection in the scanning order. Based on the determination result, it can determine that the first encoding unit 900 is divided into an odd number of encoding units. According to one embodiment, when the encoding unit is divided into an odd number of encoding units, the image decoding device 100 can impose predetermined restrictions on the encoding units at predetermined positions among the divided encoding units. Since these restrictions or predetermined positions have been described in detail with reference to various embodiments, they will not be repeated here.
[0220] According to one embodiment, the image decoding device 100 can divide a first coding unit to determine various forms of coding units.
[0221] Reference Figure 9 The image decoding device 100 can divide the square-shaped first coding unit 900 and the non-square-shaped first coding unit 930 or 950 into various forms of coding units.
[0222] Figure 10 The illustration shows that, according to one embodiment, when the image decoding device 100 divides the second coding unit, which is a non-square shape determined by dividing the first coding unit 1000, and the conditions are met, the form in which the second coding unit can be divided is limited.
[0223] According to one embodiment, the image decoding apparatus 100 can determine, based on partitioning pattern information obtained from a receiver (not shown), that a square-shaped first coding unit 1000 is divided into non-square-shaped second coding units 1010a, 1010b, 1020a, and 1020b. The second coding units 1010a, 1010b, 1020a, and 1020b can be divided independently. Thus, the image decoding apparatus 100 can determine, based on the partitioning pattern information of each of the second coding units 1010a, 1010b, 1020a, and 1020b, whether to divide the second coding units 1010a, 1010b, 1020a, and 1020b into multiple coding units or to determine not to divide them. According to one embodiment, the image decoding apparatus 100 can determine third coding units 1012a and 1012b by horizontally partitioning the left-side second coding unit 1010a, which is a non-square shape determined by vertically partitioning the first coding unit 1000. However, the image decoding device 100 can horizontally divide the left second coding unit 1010a and then restrict the right coding unit 1010b from being divided in the same horizontal direction as the left second coding unit 1010a. When determining the third coding units 1014a and 1014b by dividing the right second coding unit 1010b in the same direction, the left second coding unit 1010a and the right second coding unit 1010b can be horizontally divided independently to determine the third coding units 1012a, 1012b, 1014a, and 1014b. However, this is the same result as when the image decoding device 100 divides the first coding unit 1000 into four square-shaped second coding units 1030a, 1030b, 1030c, and 1030d based on the partitioning pattern information, which may be inefficient from the perspective of image decoding.
[0224] According to one embodiment, the image decoding apparatus 100 can determine third coding units 1022a, 1022b, 1024a, and 1024b by dividing a non-square-shaped second coding unit 1020a or 1020b, which is determined by dividing the first coding unit 1000 horizontally, in a vertical direction. However, when one of the second coding units (e.g., the upper second coding unit 1020a) is divided vertically, for the reasons stated above, the image decoding apparatus 100 can restrict another second coding unit (e.g., the lower coding unit 1020b) from being divided in the same vertical direction as the direction in which the upper second coding unit 1020a is divided.
[0225] Figure 11 The illustration shows the process by which an image decoding device 100 divides the encoding units into square shapes when the partitioning pattern information cannot indicate that the encoding units are divided into four square shapes, according to one embodiment.
[0226] According to one embodiment, the image decoding device 100 can determine second coding units 1110a, 1110b, 1120a, and 1120b, etc., based on partitioning the first coding unit 1100 in partitioning pattern information. The partitioning pattern information may include information about various forms in which the coding units can be divided; however, in some cases, the inclusion of various forms may not include information for dividing the coding unit into four square coding units. Based on this partitioning pattern information, the image decoding device 100 cannot divide the square-shaped first coding unit 1100 into four square-shaped second coding units 1130a, 1130b, 1130c, and 1130d. Based on the partitioning pattern information, the image decoding device 100 can determine non-square-shaped second coding units 1110a, 1110b, 1120a, and 1120b, etc.
[0227] According to one embodiment, the image decoding device 100 can independently divide non-square-shaped second coding units 1110a, 1110b, 1120a, and 1120b, etc. Each of the second coding units 1110a, 1110b, 1120a, and 1120b is divided in a predetermined order using a recursive method, which can be a division method corresponding to the method of dividing the first coding unit 1100 based on division pattern information.
[0228] For example, the image decoding device 100 can determine square-shaped third coding units 1112a and 1112b by horizontally dividing the left second coding unit 1110a, and can determine square-shaped third coding units 1114a and 1114b by horizontally dividing the right second coding unit 1110b. Furthermore, the image decoding device 100 can determine square-shaped third coding units 1116a, 1116b, 1116c, and 1116d by horizontally dividing both the left second coding unit 1110a and the right second coding unit 1110b. In this case, the coding units can be determined in the same form as the first coding unit 1100, which is divided into four square-shaped second coding units 1130a, 1130b, 1130c, and 1130d.
[0229] According to another example, the image decoding device 100 can determine square-shaped third coding units 1122a and 1122b by dividing the upper second coding unit 1120a vertically, and can determine square-shaped third coding units 1124a and 1124b by dividing the lower second coding unit 1120b vertically. Furthermore, the image decoding device 100 can determine square-shaped third coding units 1126a, 1126b, 1126a, and 1126b by dividing both the upper and lower second coding units 1120a and 1120b vertically. In this case, coding units can be determined in shapes similar to the second coding units 1130a, 1130b, 1130c, and 1130d that divide the first coding unit 1100 into four square shapes.
[0230] Figure 12 The processing order among multiple coding units according to one embodiment can be changed according to the coding unit division process.
[0231] According to one embodiment, the image decoding apparatus 100 can divide the first coding unit 1200 based on partitioning pattern information. When the block shape is square and the partitioning pattern information indicates that the first coding unit 1200 is divided in at least one direction, either horizontal or vertical, the image decoding apparatus 100 can determine the second coding unit (e.g., 1210a, 1210b, 1220a, and 1220b, etc.) by dividing the first coding unit 1200. (See also...) Figure 12The non-square-shaped second coding units 1210a, 1210b, 1220a, and 1220b, determined by dividing the first coding unit 1200 only horizontally or vertically, can be independently divided based on the division pattern information of each second coding unit 1210a, 1210b, 1220a, and 1220b. For example, the image decoding device 100 can 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 by horizontally, and can 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 by horizontally. (Already combined) Figure 11 The division process of the second coding units 1210a, 1210b, 1220a and 1220b is described in detail, so it will not be repeated here.
[0232] According to one embodiment, the image decoding apparatus 100 can process the encoding units in a predetermined order. (Already combined) Figure 7 The characteristics of processing coded units in a predetermined order have been described, and will not be repeated here. (See reference...) Figure 12 The image decoding device 100 can divide a first encoding unit 1200 into square shapes to determine four third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d into square shapes. According to one embodiment, the image decoding device 100 can determine the processing order of the third encoding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d based on the division of the first encoding unit 1200.
[0233] According to one embodiment, the image decoding apparatus 100 can determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b, which are generated by dividing in the vertical direction, in the horizontal direction, respectively. The third coding units 1216a, 1216b, 1216c, and 1216d can be processed in the following order 1217: first, the third coding units 1216a and 1216c included in the left second coding unit 1210a are processed in the vertical direction, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed in the vertical direction.
[0234] According to one embodiment, the image decoding apparatus 100 can determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b, which are generated by dividing in the horizontal direction, into vertical directions, respectively. The third coding units 1226a, 1226b, 1226c, and 1226d can be processed in the following order 1227: first, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the vertical direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the vertical direction.
[0235] Reference Figure 12 By dividing the second coding units 1210a, 1210b, 1220a, and 1220b respectively, square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d can be determined. The second coding units 1210a and 1210b determined by vertical division and the second coding units 1220a and 1220b determined by horizontal division are divided in different ways. However, according to the third coding units determined later, the first coding unit 1200 can be divided into coding units of the same shape. Based on this, by recursively dividing the coding units according to the division pattern information in different processes, even if multiple coding units of the same shape are determined in the result, the image decoding device 100 can process these determined multiple coding units of the same shape in different orders.
[0236] Figure 13 The illustration shows the process of determining the depth of a coding unit as the shape and size of the coding unit changes when recursively dividing coding units to determine multiple coding units, according to one embodiment.
[0237] According to one embodiment, the image decoding apparatus 100 can determine the depth of the coding unit based on a predetermined reference. For example, the predetermined reference may be the length of the long side of the coding unit. When the length of the long side of the current coding unit is divided by 2n (n>0) times the length of the long side of the coding unit before division, the image decoding apparatus 100 can determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before division. Hereinafter, the coding unit with increased depth is referred to as a coding unit with a lower depth.
[0238] Reference Figure 13Based on block shape information indicating a square shape according to one embodiment (e.g., the block shape information may indicate '0: SQUARE'), the image decoding apparatus 100 can determine a second encoding unit 1302, a third encoding unit 1304, etc., with a lower depth by dividing a first encoding unit 1300 of a square shape. Assuming the size of the first encoding unit 1300 of the square shape is 2N×2N, the second encoding unit 1302, determined by dividing the width and height of the first encoding unit 1300 by a factor of 1 / 2, can have a size of N×N. Furthermore, the third encoding unit 1304, determined by dividing the width and height of the second encoding unit 1302 by a factor of 1 / 2, can have a size of N / 2×N / 2. In this case, the width and height of the third encoding unit 1304 are respectively equivalent to 1 / 4 times the width and height of the first encoding unit 1300. When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, which is half the width and height of the first coding unit 1300, can be D+1, and the depth of the third coding unit 1304, which is one-quarter the width and height of the first coding unit 1300, can be D+2.
[0239] According to one embodiment, the image decoding device 100 can determine the lower-level depth of the first encoding unit 1310 or 1320 that divides the non-square shape based on block shape information indicating a non-square shape (for example, the block shape information may indicate '1: NS_VER', which indicates a non-square shape with a height greater than its width, or '2: NS_HOR', which indicates a non-square shape with a width greater than its height).
[0240] The image decoding apparatus 100 can determine the second encoding unit (e.g., second encoding units 1302, 1312, and 1322, etc.) by dividing the width and height of the first encoding unit 1310 having an N×2N size. In other words, the image decoding apparatus 100 can determine the second encoding unit 1302 having an N×N size or the second encoding unit 1322 having an N×N / 2 size by dividing the first encoding unit 1310 in the horizontal direction, or it can determine the second encoding unit 1312 having an N / 2×N size by dividing in both the horizontal and vertical directions.
[0241] According to one embodiment, the image decoding apparatus 100 can determine a second encoding unit (e.g., 1302, 1312, and 1322, etc.) by dividing the width and height of a first encoding unit 1320 having a size of 2N×N. That is, the image decoding apparatus 100 can determine a second encoding unit 1302 having a size of N×N or a second encoding unit 1312 having a size of N / 2×N by dividing the first encoding unit 1320 in a vertical direction, or it can determine a second encoding unit 1322 having a size of N×N / 2 by dividing it in both a horizontal and vertical direction.
[0242] According to one embodiment, the image decoding apparatus 100 can determine a third encoding unit (e.g., 1304, 1314, and 1324, etc.) by dividing the width and height of a second encoding unit 1302 having an N×N size. In other words, the image decoding apparatus 100 can determine a third encoding unit 1302 having an N / 2×N / 2 size, a third encoding unit 1314 having an N / 4×N / 2 size, or a third encoding unit 1324 having an N / 2×N / 4 size by dividing the second encoding unit 1302 in the vertical and horizontal directions.
[0243] According to one embodiment, the image decoding apparatus 100 can determine a third encoding unit (e.g., 1304, 1314, and 1324, etc.) by dividing the width and height of a second encoding unit 1312 having an N / 2×N size. That is, the image decoding apparatus 100 can determine a third encoding unit 1304 having an N / 2×N / 2 size or a third encoding unit 1324 having an N / 2×N / 4 size by dividing the second encoding unit 1312 in a horizontal direction, or it can determine a third encoding unit 1314 having an N / 4×N / 2 size by dividing the second encoding unit 1312 in both a vertical and horizontal direction.
[0244] According to one embodiment, the image decoding apparatus 100 can also determine a third encoding unit (e.g., 1304, 1314, and 1324, etc.) by dividing the width and height of the second encoding unit 1322 having an N×N / 2 size. In other words, the image decoding apparatus 100 can determine a third encoding unit 1304 having an N / 2×N / 2 size or a second encoding unit 1304 having an N / 4×N / 2 size by dividing the second encoding unit 1322 in a vertical direction, or it can determine a third encoding unit 1324 having an N / 2×N / 4 size by dividing the second encoding unit 1322 in both a vertical and horizontal direction.
[0245] According to one embodiment, the image decoding apparatus 100 can divide the encoding units (e.g., 1300, 1302, or 1304) into square-shaped units in a horizontal or vertical direction. For example, a first encoding unit 1310 with an N×2N size can be determined by dividing the first encoding unit 1300 with a 2N×2N size vertically, or a first encoding unit 1320 with a 2N×N size can be determined by dividing the first encoding unit 1300 with a 2N×2N size horizontally. According to one embodiment, when the depth is determined based on the longest side of the encoding unit, the depth of the encoding unit determined by dividing the first encoding unit 1300 with a 2N×2N size horizontally or vertically can be the same as the depth of the first encoding unit 1300.
[0246] According to one embodiment, the width and height of the third coding unit 1314 or 1324 can be equivalent 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 height and width of the first coding unit 1310 or 1320, can be D+1, and the depth of the third coding unit 1314 or 1324, which is 1 / 4 times that of the first coding unit 1310 or 1320, can be D+2.
[0247] Figure 14 The illustration shows, according to one embodiment, a depth that can be determined based on the shape and size of the coding unit and a part index (hereinafter referred to as PID) used to distinguish the coding unit.
[0248] According to one embodiment, the image decoding device 100 can determine second coding units of various shapes by dividing a first coding unit 1400 having a square shape. (See also...) Figure 14 The image decoding device 100 can determine second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d by dividing the first coding unit 1400 in at least one of the vertical and horizontal directions according to the partitioning pattern information. That is, the image decoding device 100 can determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d based on the partitioning pattern information for the first coding unit 1400.
[0249] According to one embodiment, the depths of second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406, determined based on the partitioning pattern information of the square-shaped first coding unit 1400, can be determined based on the length of the longer side. For example, the length of one side of the square-shaped first coding unit 1400 is the same as the length of the longer side of the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b. Therefore, the depths of the first coding unit 1400 and the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b can be considered to be the same (D). Conversely, when the image decoding device 100 divides the first encoding unit 1400 into four square-shaped second encoding units 1406a, 1406b, 1406c, and 1406d based on the partitioning pattern information, the length of one side of the square-shaped second encoding units 1406a, 1406b, 1406c, and 1406d is half the length of one side of the first encoding unit 1400. Therefore, the depth of the second encoding units 1406a, 1406b, 1406c, and 1406d can be one depth deeper than the depth D of the first encoding unit 1400, i.e., D+1.
[0250] According to one embodiment, the image decoding device 100 can horizontally divide a first encoding unit 1410, whose length is greater than its width, into a plurality of second encoding units 1412a, 1412b, 1414a, 1414b, and 1414c based on partitioning pattern information. According to another embodiment, the image decoding device 100 can horizontally divide a first encoding unit 1420, whose width is greater than its length, into a plurality of second encoding units 1422a, 1422b, 1424a, 1424b, and 1424c based on partitioning pattern information.
[0251] According to one embodiment, the depths of second coding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, and 1406, determined based on the partitioning pattern information of the non-square-shaped first coding unit 1410 or 1420, can be determined based on the length of the longer side. For example, the length of one side of the square-shaped second coding units 1412a and 1412b is half the length of one side of the non-square-shaped first coding unit 1410, whose height is greater than its width. Therefore, the depth of the square-shaped second coding units 1412a and 1412b is a depth D+1 that is one depth deeper than the depth D of the non-square-shaped first coding unit 1410.
[0252] Furthermore, the image decoding device 100 can divide the non-square-shaped first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the partitioning pattern information. The odd number of second coding units 1414a, 1414b, and 1414c may include non-square-shaped second coding units 1414a and 1414c and square-shaped second coding unit 1414b. In this case, the length of the longer side of the non-square-shaped second coding units 1414a and 1414c and the length of one side of the square-shaped second coding unit 1414b are equal to half the length of one side of the first coding unit 1410. Therefore, the depth of the second coding units 1414a, 1414b, and 1414c is a depth D+1, which is one depth deeper than the depth D of the first coding unit 1410. The image decoding device 100 can determine the depth of the coding unit associated with the first coding unit 1420, which is a non-square shape with a width greater than its height, in a manner corresponding to the manner in which the depth of the coding unit associated with the first coding unit 1410 is determined.
[0253] According to one embodiment, for determining the index PID used to distinguish the divided coding units, when the sizes of an odd number of divided coding units are different from each other, the image decoding device 100 can determine the index based on the size ratio between the coding units. (See also...) Figure 14 In the odd-numbered coding units 1414a, 1414b, and 1414c, the width of the central coding unit 1414b can be the same as the widths of the other coding units 1414a and 1414c; however, its height can be twice the height of the other coding units 1414a and 1414c. In other words, in this case, the central coding unit 1414b can include two other coding units 1414a and 1414c. Therefore, depending on the scanning order, if the partial index PID of the central coding unit 1414b is 1, the partial index of the coding unit 1414c in the next sequence can be 3, increasing from 1 to 2. In other words, there can be discontinuities in the index values. According to one embodiment, the image decoding apparatus 100 can determine whether the odd-numbered coding units have the same size as each other based on whether discontinuities in the indices used to distinguish the coding units exist.
[0254] According to one embodiment, the image decoding apparatus 100 can determine whether to use a specific partitioning method based on the values of indices used to distinguish multiple coding units determined by partitioning the current coding unit. (See also...) Figure 14The image decoding apparatus 100 can determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b, and 1414c by dividing a first coding unit 1410 into rectangular shapes with a height greater than its width. The image decoding apparatus 100 can distinguish multiple coding units using the PID of each coding unit. According to one embodiment, the PID can be obtained from samples at predetermined positions in each coding unit (e.g., samples at the upper left end).
[0255] According to one embodiment, the image decoding apparatus 100 can use an index for distinguishing coding units to determine the coding unit at a predetermined position among the coding units determined by the division. According to one embodiment, when the division pattern information for a first coding unit 1410 of a rectangular shape with a height greater than its width indicates that the first coding unit 1410 is divided into three coding units, the image decoding apparatus 100 can divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding apparatus 100 can assign an index to each of the three coding units 1414a, 1414b, and 1414c. The image decoding apparatus 100 can compare the indices of each coding unit to determine the central coding unit among the odd number of divided coding units. The image decoding apparatus 100 can determine, based on the index of the coding unit, the coding unit 1414b having an index corresponding to the central value of the index as the central coding unit among the coding units determined by dividing the first coding unit 1410. According to one embodiment, when determining the index of the coding units used to distinguish the division, the image decoding device 100 can determine the index based on the size ratio between the coding units when the sizes of the coding units are different from each other. (See also...) Figure 14The width of the coding unit 1414b generated by dividing the first coding unit 1410 is the same as the width of the other coding units 1414a and 1414c, but its height can be twice the height of the other coding units 1414a and 1414c with the same height. In this case, if the PID of the coding unit 1414b located in the center is 1, the index of the coding unit 1414 in the next sequence is 3, which is increased by 2. In this case, when the increment changes as the index increases uniformly, the image decoding device 100 can determine that the division is performed by using multiple coding units including coding units with different sizes from the other coding units. According to one embodiment, when the division pattern information indicates that the division is performed with an odd number of coding units, the image decoding device 100 can divide the current coding unit using a form in which the coding unit with a predetermined position in the odd number of coding units (e.g., the central coding unit) has a size different from the size of the other coding units. In this case, the image decoding device 100 can use the index PID of the coding unit to determine the central coding unit with a different size. However, the indexes, the size or position of the coding unit to be determined are predetermined for the purpose of illustrating an embodiment. The determination of the coding unit should not be construed as being limited, but rather as allowing the use of various indexes, coding unit positions and sizes.
[0256] According to one embodiment, the image decoding apparatus 100 may use predetermined data units that are recursively divided by the starting encoding unit.
[0257] Figure 15 The illustration shows the determination of multiple coding units based on multiple predetermined coding units included in the image, according to one embodiment.
[0258] According to one embodiment, a predetermined data unit can be defined as a data unit in which coding units are recursively divided using partitioning pattern information. In other words, a predetermined data unit can be equivalent to the highest-depth coding unit used in determining the multiple coding units of the current frame. Hereinafter, for ease of explanation, these predetermined data units will be referred to as reference data units.
[0259] According to one embodiment, the reference data unit can indicate a predetermined size and shape. According to another embodiment, the reference encoding unit can include M×N samples. Here, M and N can be the same as each other, or they can be integers represented as a multiplier of 2. In other words, the reference data unit can display a square or non-square shape and can subsequently be divided into an integer number of encoding units.
[0260] According to one embodiment, the image decoding device 100 can divide the current frame into multiple reference data units. According to another embodiment, the image decoding device 100 can use partitioning pattern information for each reference data unit to partition the multiple reference data units used to divide the current frame. This partitioning process of the reference data units can correspond to a partitioning process using a quad-tree structure.
[0261] According to one embodiment, the image decoding apparatus 100 can predetermine the minimum size that a reference data unit included in the current frame can have. Thus, the image decoding apparatus 100 can determine reference data units of various sizes that are equal to or greater than the minimum size, and can determine at least one encoding unit based on the determined reference data units using partitioning pattern information.
[0262] Reference Figure 15 The image decoding device 100 can use either a square-shaped reference coding unit 1500 or a non-square-shaped reference coding unit 1502. According to one embodiment, the shape and size of the reference coding unit can be determined by various data units (e.g., sequence, picture, slice, slice segment, and maximum coding unit, etc.) that may include at least one reference coding unit.
[0263] According to one embodiment, the receiver (not shown) of the image decoding apparatus 100 can obtain at least one of information about the shape of a reference coding unit and information about the size of the reference coding unit from the bitstream based on the various data units. Figure 3 The process of dividing the current coding unit 300 is described in detail, describing the process of determining at least one coding unit included in the square-shaped reference coding unit 1500, and through Figure 4 The process of dividing the current coding unit 400 or 450 is described in detail in the process of including at least one coding unit in the non-square-shaped reference coding unit 1502, so it will not be repeated here.
[0264] According to one embodiment, the image decoding apparatus 100 can use an index for identifying the size and shape of a reference coding unit to determine the size and shape of the reference coding unit based on a set of data units predetermined according to predetermined conditions. In other words, for each strip, strip segment, or maximum coding unit that is a data unit among the various data units (e.g., sequence, frame, strip, strip segment, and maximum coding unit, etc.) that satisfies predetermined conditions (e.g., a data unit with a size less than or equal to the strip), the receiver (not shown) can obtain only the index for identifying the size and shape of the reference coding unit from the bitstream. The image decoding apparatus 100 can use the index to determine the size and shape of the reference data unit for each data unit that satisfies the predetermined conditions. When information about the shape and size of the reference coding unit is obtained and used from the bitstream based on relatively small data units, the efficiency of bitstream usage may be poor. Therefore, it is possible to obtain and use only the index, rather than directly obtaining information about the shape and size of the reference coding unit. In this case, at least one of the size and shape of the reference coding unit corresponding to the index indicating the size and shape of the reference coding unit can be predetermined. In other words, the image decoding device 100 can determine at least one of the dimensions and shapes of the reference coding units included in the data unit used as the reference for obtaining the index by selecting at least one of the dimensions and shapes of the predetermined reference coding units based on the index.
[0265] According to one embodiment, the image decoding apparatus 100 may use at least one reference coding unit included in a maximum coding unit. In other words, the maximum coding unit for dividing the image may include at least one reference coding unit, and the coding unit can be determined through a recursive partitioning process of each reference coding unit. According to one embodiment, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to one embodiment, the size of the reference coding unit may be the size obtained by partitioning the maximum coding unit n times according to a quadtree structure. In other words, the image decoding apparatus 100 may determine the reference coding unit by partitioning the maximum coding unit n times according to a quadtree structure, and may partition the reference coding unit based on at least one of block shape information and information about the partitioning pattern according to various embodiments.
[0266] Figure 16 The illustration shows a processing block according to one embodiment, which serves as a reference for determining the order of reference coding units included in screen 1600.
[0267] According to one embodiment, the image decoding apparatus 100 can determine at least one processing block for dividing a screen. A processing block is a data unit that includes at least one reference coding unit for dividing the image, and the at least one reference coding unit included in the processing block can be determined in a specific order. In other words, the determination order of the at least one reference coding unit determined in each processing block can be equivalent to one of the various types of orders in which reference coding units can be determined, and the determination order of the reference coding units determined in each processing block can vary depending on the processing block. The determination order of the reference coding units determined in each processing block can be raster scan, Z-scan, N-scan, up-right diagonal scan, horizontal scan, and vertical scan; however, the determineable order should not be construed as limited to the scan order.
[0268] According to one embodiment, the image decoding apparatus 100 can determine the size of at least one processing block included in an image by obtaining information about the size of the processing block. The image decoding apparatus 100 can determine the size of at least one processing block included in the image by obtaining information about the processing block from a bitstream. The size of this processing block can be a predetermined size of a data unit indicated by the information about the size of the processing block.
[0269] According to one embodiment, the receiver (not shown) of the image decoding apparatus 100 can obtain information about the size of a processing block from the bitstream based on each predetermined data unit. For example, the information about the size of the processing block can be obtained from the bitstream based on data units such as images, sequences, frames, stripes, and strip segments. In other words, the receiver (not shown) can obtain information about the size of the processing block from the bitstream based on the plurality of data units respectively, and the image decoding apparatus 100 can use the obtained information about the size of the processing block to determine the size of at least one processing block used to divide the frame. The size of such processing block can be an integer multiple of the size of a reference coding unit.
[0270] According to one embodiment, the image decoding apparatus 100 can determine the sizes of processing blocks 1602 and 1612 included in the frame 1600. For example, the image decoding apparatus 100 can determine the size of the processing block based on information about the size of the processing block obtained from the bitstream. (See also...) Figure 16According to one embodiment, the image decoding apparatus 100 may determine the lateral dimension of processing blocks 1602 and 1612 to be four times the lateral dimension of the reference coding unit, and the vertical dimension to be four times the vertical dimension of the reference coding unit. The image decoding apparatus 100 may determine the order in which at least one reference coding unit is determined within at least one processing block.
[0271] According to one embodiment, the image decoding apparatus 100 can determine the respective processing blocks 1602 and 1612 included in the frame 1600 based on the size of the processing blocks, and can determine the determination order of at least one reference coding unit included in the processing blocks 1602 and 1612. According to one embodiment, the determination of the reference coding unit may include the determination of the size of the reference coding unit.
[0272] According to one embodiment, the image decoding apparatus 100 can obtain information about the determined order of at least one reference coding unit included in at least one processing block from the bitstream, and can determine the determined order of the at least one reference coding unit based on the obtained information about the determined order. The information about the determined order can be determined based on the determined order or direction of the reference coding units within the processing block. In other words, the determined order of the reference coding units can be determined independently in each processing block.
[0273] According to one embodiment, the image decoding apparatus 100 can obtain information about the determined order of reference coding units from the bitstream based on each specific data unit. For example, a receiver (not shown) can obtain information about the determined order of reference coding units from the bitstream based on each data unit of an image, sequence, frame, strip, strip segment, processing block, etc. The information about the determined order of reference coding units indicates the determined order of reference coding units within a processing block; therefore, information about the determined order can be obtained based on each specific data unit comprising an integer number of processing blocks.
[0274] The image decoding device 100 can determine at least one reference coding unit based on an order determined according to an embodiment.
[0275] According to one embodiment, a receiver (not shown) can obtain information from the bitstream regarding the determined order of reference coding units as information related to processing blocks 1602 and 1612. The image decoding apparatus 100 can determine the order of at least one reference coding unit included in said processing blocks 1602 and 1612, and can determine at least one reference coding unit included in the frame 1600 based on the determined order of the coding units. (Refer to...) Figure 16The image decoding apparatus 100 can determine the determination order 1604 and 1614 of at least one reference coding unit associated with each processing block 1602 and 1612. For example, when information about the determination order of reference coding units is obtained according to each processing block, the determination order of reference coding units associated with each processing block 1602 and 1612 can be different for each processing block. When the determination order 1604 of reference coding units associated with processing block 1602 is a raster scan order, the reference coding units included in processing block 1602 can be determined according to the raster scan order. Conversely, when the determination order 1614 of reference coding units associated with other processing blocks 1612 is the reverse of the raster scan order, the reference coding units included in processing block 1612 are determined in the reverse order of the raster scan order.
[0276] Image decoding apparatus 100 can decode at least one determined coding unit according to one embodiment. Image decoding apparatus 100 can decode an image based on a reference coding unit determined through the above embodiment. Methods for decoding the reference coding unit can include various methods for decoding an image.
[0277] According to one embodiment, the image decoding apparatus 100 can obtain and use block shape information indicating the shape of the current coding unit or partitioning pattern information indicating the method of partitioning the current coding unit from the bitstream. The partitioning pattern information can be included in the bitstream associated with various data units. For example, the image decoding apparatus 100 can use partitioning pattern information included in a sequence parameter set, picture parameter set, video parameter set, slice header, and slice segment header. Furthermore, the image decoding apparatus 100 can obtain and use the syntax element corresponding to the partitioning pattern information from the bitstream based on the maximum coding unit, the reference coding unit, and the processing block.
[0278] The following describes in detail a method for determining partitioning rules according to an embodiment of the present disclosure.
[0279] Image decoding device 100 can determine the segmentation rules of an image. The segmentation rules can be predetermined between image decoding device 100 and image encoding device 150. Image decoding device 100 can determine the segmentation rules based on information obtained from the bitstream. Image decoding device 100 can determine the segmentation rules based on information obtained from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header. Image decoding device 100 can determine the segmentation rules differently depending on the frame, slice, temporal layer, maximum coding unit, or coding unit.
[0280] Image decoding apparatus 100 can determine partitioning rules based on the block shape of the coding unit. The block shape may include the size, shape, width-to-height ratio, and orientation of the coding unit. Image encoding apparatus 150 and image decoding apparatus 100 can pre-determine the partitioning rules based on the block shape of the coding unit. However, this is not a limitation. Image decoding apparatus 100 can also determine partitioning rules based on information obtained from the bitstream received from image decoding apparatus 150.
[0281] The shape of the encoding unit can be either square or non-square. When the width and height of the encoding unit are the same, the image decoding device 100 can determine the shape of the encoding unit as square. Furthermore, when the width and height of the encoding unit are different, the image decoding device 100 can determine the shape of the encoding unit as non-square.
[0282] The size of the encoding unit can include various sizes such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, ..., 256×256. The size of the encoding unit can be classified according to the length of its long side, the length of its short side, or its area. The image decoding device 100 can apply the same classification rule to encoding units classified into the same group. For example, the image decoding device 100 can classify encoding units with the same long side length into the same size. Furthermore, the image decoding device 100 can apply the same classification rule to encoding units with the same long side length.
[0283] The width-to-height ratio of the coding unit can include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, or 16:1, etc. Furthermore, the orientation of the coding unit can include horizontal and vertical directions. A horizontal orientation indicates that the width of the coding unit is greater than its height. A vertical orientation indicates that the width of the coding unit is less than its height.
[0284] The image decoding apparatus 100 can adaptively determine the partitioning rules based on the size of the coding unit. The image decoding apparatus 100 can determine the permissible partitioning patterns based on different coding unit sizes. For example, the image decoding apparatus 100 can determine whether a partition is permissible based on the size of the coding unit. The image decoding apparatus 100 can determine the partitioning direction based on the size of the coding unit. The image decoding apparatus 100 can determine the permissible partitioning type based on the size of the coding unit.
[0285] The partitioning rule determined based on the size of the coding unit can be a partitioning rule predetermined between the image encoding device 2300 and the image decoding device 100. Furthermore, the image decoding device 100 can determine the partitioning rule based on information obtained from the bitstream.
[0286] The image decoding apparatus 100 can adaptively determine the partitioning rules based on the position of the coding units. The image decoding apparatus 100 can adaptively determine the partitioning rules based on the position occupied by the coding units in the image.
[0287] Furthermore, the image decoding apparatus 100 can determine partitioning rules to prevent coding units generated through different partitioning methods from having the same block shape. However, it is not limited to this; coding units generated through different partitioning methods can have the same block shape. Coding units generated through different partitioning methods can have different decoding processing orders. (Already combined) Figure 12 The decoding process order has been described, so it will not be repeated here.
[0288] In the following text, see references Figures 17-18 The present invention will describe in detail an image coding / decoding method and apparatus for determining a filter for a current sample based on at least one of the distance between a current sample and a reference sample in the current block and the size of the current block, and performing intra-frame prediction based on the determined filter.
[0289] Figure 17 This is a diagram used to illustrate the intra-frame prediction mode according to an embodiment.
[0290] refer to Figure 17According to the embodiments, the intra-frame prediction modes may include a planar mode (mode 0) and a DC mode (mode 1). Additionally, the intra-frame prediction modes may include angular modes (modes 2 to 66) with a prediction direction. Angular modes may include a diagonal mode (mode 2 or 66), a horizontal mode (mode 18), and a vertical mode (mode 50).
[0291] The above text has already referenced Figure 17 Intra-prediction modes according to embodiments are described, but not limited thereto, and intra-prediction modes of various shapes can be obtained by adding new intra-prediction modes or subtracting existing intra-prediction modes, and it will be understood by those skilled in the art that the mode number of each intra-prediction mode may vary depending on the circumstances.
[0292] Figure 18 For the purpose of illustrating embodiments of the present disclosure, an image decoding apparatus generates a predicted sample of the current sample by using different filters based on at least one of the distance between the current sample and a reference sample and the size of the current block.
[0293] refer to Figure 18 The image decoding device 100 can generate predicted sample values for the samples in the current block by using reference sample 1820, so as to perform intra-frame prediction on the current block 1800.
[0294] For example, the image decoding apparatus 100 can determine the predicted sample value px,y of the current sample 1810 of the current block 1800 according to Equation 1 by using a reference sample that intersects with the extension line 1830 of the prediction direction of the intra-prediction mode of the current block 1800 from the current sample 1810 and its adjacent samples. Here, x,y can be based on the position of the upper left sample of the current block, which refers to the x-coordinate and y-coordinate of the current sample.
[0295] [Formula 1]
[0296] p x,y =f k,0 *a -1 +f k,1 *a0+f k,2 *a1+f k,3 *a2
[0297] At this point, fk,i can refer to the (i+1)th (0<=i<=3) filter coefficient of the (k+1)th filter in a filter set comprising M+1 filters (M being an integer). a0 can refer to the sample value of the reference sample point intersecting the extension line 1830 from the current sample point 1810, and a-1 can refer to the sample value of the reference sample point directly to the left of the reference sample point intersecting the extension line 1830 from the current sample point 1810, and a1 can refer to the sample value of the reference sample point directly to the right of the reference sample point intersecting the extension line 1830 from the current sample point 1810, and a2 can refer to the sample value of the reference sample point located second to the right of the reference sample point intersecting the extension line 1830 from the current sample point 1810.
[0298] In the preceding text, Equation 1 has described how to generate the predicted sample value of the current sample point using reference sample point values a0, a-1, a1, and a2. However, this is not the only method described, and those skilled in the art will understand that the predicted value of the current sample point can be generated based on a0 by using the sample point values of various neighboring reference sample points. For example, the predicted sample value of the current sample point can be generated using a-2, a-1, a0, and a1. Alternatively, the predicted sample value of the current sample point can be generated using a0, a1, a2, and a3.
[0299] The image decoding apparatus 100 can determine the filters to be used for the current sample 1810 among a plurality of filters fk (0 <= k <= M) based on the distance between the current sample 1810 and a reference sample and the size of the current block 1800. For example, the image decoding apparatus 100 can predetermine the range of each of the plurality of filters fk (0 <= k <= M) to be used by multiplying the size of the current block by a predetermined ratio, and determine the filters to be used within the range of samples including the current sample 1810 as the filters to be used for the current sample 1810. For example, the number of filters included in the filter set can be four. In other words, the filter set can include filters f0, f1, f2, and f3.
[0300] When the distance between the current sample point 1810 and the reference sample point located above the current sample point 1810 is [0, size / 4), or the distance between the current sample point 1810 and the reference sample point located to the left of the current sample point 1810 is [0, size / 4), the image decoding device 100 can determine f0 as the filter for the current sample point 1810. Here, size can be the size (height or width) of the current block 1800. When the distance between the current sample point 1810 and the reference sample point located above the current sample point 1810 is [size / 4, size / 2) and the distance between the current sample point 1810 and the reference sample point located to the left of the current sample point 1810 is [size / 4, size), or the distance between the current sample point 1810 and the reference sample point located to the left of the current sample point 1810 is [size / 4, size / 2) and the distance between the current sample point 1810 and the reference sample point located above the current sample point 1810 is [size / 4, size), the image decoding device 100 can determine f1 as the filter for the current sample point 1810. When the distance between the current sample point 1810 and the reference sample point located above the current sample point 1810 is [size / 2, 3*size / 4) and the distance between the current sample point 1810 and the reference sample point located to the left of the current sample point 1810 is [size / 2, size), or the distance between the current sample point 1810 and the reference sample point located to the left of the current sample point 1810 is [size / 2, 3*size / 4) and the distance between the current sample point 1810 and the reference sample point located above the current sample point 1810 is [size / 2, size), the image decoding device 100 can determine f2 as the filter for the current sample point 1810.
[0301] When the distance between the current sample point 1810 and the reference sample point located above the current sample point 1810 is [3*size / 4, size) and the distance between the current sample point 1810 and the reference sample point located to the left of the current sample point 1810 is [3*size / 4, size)), the image decoding device 100 can determine f3 as the filter for the current sample point 1810.
[0302] In other words, reference Figure 18When the current sample point 1810 is located in the first region 1850, the image decoding device 100 can determine f0 as the filter for the current sample point 1810. When the current sample point 1810 is located in the second region 1860, the image decoding device 100 can determine f1 as the filter for the current sample point 1810. When the current sample point 1810 is located in the third region 1870, the image decoding device 100 can determine f2 as the filter for the current sample point 1810. When the current sample point 1810 is located in the fourth region 1880, the image decoding device 100 can determine f4 as the filter for the current sample point 1810.
[0303] Here, among the smoothing intensities of filters f0, f1, f2, and f3, the smoothing intensity of filter f0, which is closest to the reference sample, can be the smallest, and the smoothing intensity of filter f0, which is farthest from the reference sample, can be the largest.
[0304] The above text has already referenced Figure 18 The image decoding apparatus 100 is described as performing intra-frame prediction on the current block by using four filters on the current block, but it is not limited thereto, and those skilled in the art will understand that the image decoding apparatus 100 can perform intra-frame prediction on the current block by using various numbers of filters. Here, the range of samples used for each filter can be determined differently based on the number of filters. For example, refer to... Figure 18 When the number of filters used for the current block 1800 is determined to be three, the image decoding device 100 can combine the third region 1870 and the fourth region 1880 together, and when the current sample 1810 is located in the third region 1870 or the fourth region 1880, the image decoding device 100 can determine f3 as the filter used for the current sample 1810.
[0305] In addition, the image decoding device 100 can predetermine the range of each used sample point of fk (0<=k<=M) based on the distance between the sample points in the current block and the reference sample points, and determine the filter used for the current sample point as the filter used for the current sample point within the range of sample points including the current sample point.
[0306] For example, when the minimum vertical and horizontal distance between the current sample and the reference sample is less than 4, the image decoding device 100 can determine f0 as the filter for the current sample. When the minimum vertical and horizontal distance between the current sample and the reference sample is greater than or equal to 4 and less than 8, the image decoding device 100 can determine f1 as the filter for the current sample. When the minimum vertical and horizontal distance between the current sample and the reference sample is greater than or equal to 8 and less than 16, the image decoding device 100 can determine f2 as the filter for the current sample. When the minimum vertical and horizontal distance between the current sample and the reference sample is greater than or equal to 16 and less than 32, the image decoding device 100 can determine f3 as the filter for the current sample. When the minimum vertical and horizontal distance between the current sample and the reference sample is greater than or equal to 32 and less than 64, the image decoding device 100 can determine f4 as the filter for the current sample. When the minimum distance between the vertical and horizontal distances between the current sample and the reference sample is greater than 64, the image decoding apparatus 100 can determine f5 as the filter for the current sample. In this case, the image decoding apparatus 100 can change the number of filters used for the current block according to the size of the current block. It has been described that the image decoding apparatus 100 can predetermine the range of each of the multiple filters fk (0 <= k <= M) used based on the minimum distance between the vertical and horizontal distances between the current sample and the reference sample, but it is not limited thereto. Those skilled in the art will understand that the image decoding apparatus 100 can determine the distance between reference samples that intersect with the extension of the prediction direction from the current sample based on the intra-frame prediction mode of the current block, and predetermine the range of each of the multiple filters fk (0 <= k <= M) used based on the distance between the reference samples.
[0307] Furthermore, it has been described that the image decoding apparatus 100 can predetermine the range of each used sample point of a plurality of filters fk (0 <= k <= M) by multiplying the size of the current block by a predetermined ratio, or predetermine the range of each used sample point of fk (0 <= k <= M) based on the distance between the sample point in the current block and the reference sample point. However, it is not limited thereto. Those skilled in the art will understand that the image decoding apparatus 100 can determine the range of each used sample point of a plurality of filters based on various methods of at least one of the size of the current block and the distance between the sample point in the current block and the reference sample point.
[0308] Furthermore, the image decoding device 100 can determine the number of filters for the current block based on the size (height or width) of the current block, and determine the filters corresponding to the number of filters. For example, if the size of the current block is greater than or equal to a predetermined size, the image decoding device 100 can determine filters f0, f1, f2, ..., and fM-1 as filters for the current block. When the size of the current block is less than the predetermined size, the image decoding device 100 can determine the number of filters for the current block to be a predetermined number K (K is an integer) less than M. In this case, the video decoding device 100 can determine the predetermined number K filters based on a predetermined combination among various possible combinations of filters f0, f1, f2, ..., and fM-1. For example, the image decoding device 100 can determine filters f0, f1, f2, ..., and fK-1 as filters for the current block. For example, when the number of filters for the current block is determined to be two, the image decoding device 100 can determine filters f0 and f1 as filters for the current block. In addition, when the number of filters used for the current block is determined to be two, the image decoding device 100 can determine filters f0 and fM-1 as filters used for the current block.
[0309] For example, the image decoding apparatus 100 may determine a set of 4-tap filters, including filters f0, f1, f2, and f3, for performing intra-frame prediction on the current block, as follows: For example, the image decoding apparatus 100 may determine the coefficients of filter f0 as {-2, 126, 4, 0}. (The coefficients of the filter refer to the coefficients of the filter applied to a predetermined fractional pixel position.) The image decoding apparatus 100 may determine the coefficients of filter f1 as {12, 99, 18, -1}. The image decoding apparatus 100 may determine the coefficients of filter f2 as {21, 82, 23, 2}. The image decoding apparatus 100 may determine the coefficients of filter f3 as {31, 63, 33, 1}. Here, filter f0 may be the filter with the weakest smoothing strength among filters f0, f1, f2, and f3, and filter f3 may be the filter with the strongest smoothing strength among filters f0, f1, f2, and f3. At the same time, the coefficient values of the filter are not limited to those listed above. Those skilled in the art will understand that the coefficient values of the filter can be slightly changed (e.g., +1 to 5, -1 to 5) for use.
[0310] Simultaneously, the image decoding device 100 can determine the number of reference samples used to determine the predicted sample value of the current sample based on the distance between the current sample and the reference sample. The image decoding device 100 can then perform filtering on the current sample using reference samples corresponding to the number of reference samples.
[0311] For example, when the distance between the current sample point and the reference sample point is greater than or equal to a predetermined distance, the image decoding device 100 can generate a predicted sample point value for the current sample point by performing filtering on the current sample point using M reference sample points. When the distance between the current sample point and the reference sample point is less than the predetermined distance, the image decoding device 100 can generate a predicted sample point value for the current sample point by performing filtering on the current sample point using less than M reference sample points. For example, when the distance between the current sample point and the reference sample point is less than the predetermined distance, the image decoding device 100 can generate a predicted sample point value for the current sample point by performing filtering on the current sample point using one or two reference sample points. When the distance between the current sample point and the reference sample point is greater than or equal to the predetermined distance, the image decoding device 100 can generate a predicted sample point value for the current sample point by performing filtering on the current sample point using four or more reference sample points.
[0312] The image decoding apparatus 100 can determine the number of reference samples used to perform filtering on the current sample by adjusting the number of taps in the filter. For example, when the distance between the current sample and the reference samples is greater than or equal to a predetermined distance, the image decoding apparatus 100 can determine a filter with four or more taps as the filter for the current sample. When the distance between the current sample and the reference samples is less than the predetermined distance, the image decoding apparatus 100 can determine a one-tap filter or a two-tap filter as the filter for the current sample. Here, the image decoding apparatus 100 may choose not to perform filtering instead of using a one-tap filter.
[0313] In addition, the image decoding device 100 can determine the number of reference samples to be used to perform filtering on the current sample by fixing the number of filter taps and adjusting some filter coefficient values.
[0314] For example, the image decoding apparatus 100 may determine the number of filter taps to be 4, and when the distance between the current sample and the reference sample is less than a predetermined distance, determine the coefficients of the filter used for the current sample to be {0, 128, 0, 0}. When the distance between the current sample and the reference sample is greater than or equal to the predetermined distance, the image decoding apparatus 100 may determine the coefficients of the filter used for the current sample to be {32, 63, 31, 1}.
[0315] The image decoding device 100 can determine the filter for the current sample from the filters used for the current block based on the position of the current sample in the current block, the intra-prediction mode, and the size of the current block.
[0316] For example, when the x-axis coordinate value of the current sample point is less than a predetermined value, or when the y-axis coordinate value of the current sample point is less than a predetermined value, the image decoding device 100 can determine to use the first filter; otherwise, it can determine to use the second filter.
[0317] Here, the smoothing intensity of the first filter is less than that of the second filter, and it can have a sharp characteristic. The predetermined value can be 8, but is not limited to this, and can be one of various values that are multiples of 4.
[0318] When the index value of the intra-prediction mode of the current block is less than or equal to the index value of mode 34, the image decoding device 100 can determine whether the width of the current block is less than or equal to a first value and the height of the current block is less than or equal to a second value. Here, the first value can be less than the second value. For example, the first value can be 16 and the second value can be 32.
[0319] When the index value of the intra-prediction mode of the current block is greater than the index value of mode 34, the image decoding device 100 can determine whether the width of the current block is less than or equal to a first value and whether the height of the current block is less than or equal to a second value. Here, the first value can be less than the second value. The first value can be 16, and the second value can be 32.
[0320] The image decoding device 100 can determine the filters for the current block based on the width and height of the current block. For example, when the width of the current block is less than or equal to a first value and the height of the current block is less than or equal to a second value, the image decoding device 100 can determine f0 and f1 as filters for the current block. When the width of the current block is greater than the first value or the width of the current block is greater than the second value, the image decoding device 100 can determine f2 and f3 as filters for the current block.
[0321] Figure 19 For the purpose of illustrating embodiments of the present disclosure, the encoding (decoding) order between encoding units is determined as forward or reverse based on the encoding order flag, and the right-side reference line or the top-side reference line can be used for intra-frame prediction according to the determined encoding (decoding) order.
[0322] refer to Figure 19The largest coding unit 1950 is divided into multiple coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984, and 1986. The largest coding unit 1950 corresponds to the highest node 1900 in the tree structure. Furthermore, the multiple coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984, and 1986 correspond to multiple nodes 1906, 1908, 1910, 1912, 1918, 1920, 1922, 1924, 1930, 1932, 1934, and 1936, respectively. The upper segment coding sequence markers 1902, 1914, and 1926 in the indicator tree structure correspond to arrows 1952, 1964, and 1976, and the upper segment coding sequence markers 1904, 1916, and 1928 correspond to arrows 1954, 1966, and 1978.
[0323] The upper segment encoding order flag indicates the encoding order of the two upper encoding units in a four-unit encoding block at the same depth. When the upper segment encoding order flag is 0, encoding is performed in the forward direction. Conversely, when the upper segment encoding order flag is 1, encoding is performed in the reverse direction.
[0324] Similarly, the next segment coding order flag indicates the coding order of the two coding units in the next segment out of four coding units at the same depth. When the next segment coding order flag is 0, coding is performed in the forward direction. Conversely, when the next segment coding order flag is 1, coding is performed in the reverse direction.
[0325] For example, the upper segment encoding sequence flag 1914 is 0, so the encoding order between encoding units 1968 and 1970 is determined in a forward direction from left to right. Conversely, the lower segment encoding sequence flag 1916 is 1, so the encoding order between encoding units 1972 and 1974 is determined in a reverse direction from right to left.
[0326] According to the embodiment, the upper segment encoding sequence flag and the lower segment encoding sequence flag can be set to have the same value. For example, when the upper segment encoding sequence flag 1902 is determined to be 1, the lower segment encoding sequence flag 1904 corresponding to the upper segment encoding sequence flag 1902 can also be determined to be 1. By determining the values of the upper segment encoding sequence flag and the lower segment encoding sequence flag with 1 bit, the amount of information in the encoding sequence information is also reduced.
[0327] According to an embodiment, the upper and lower segment coding order flags of the current coding unit can be determined by referring to at least one of the upper and lower segment coding order flags applied to coding units with a depth less than the current coding unit. For example, the upper segment coding order flag 1926 and lower segment coding order flag 1928 applied to coding units 1980, 1982, 1984, and 1986 can be determined based on the lower segment coding order flag 1916 applied to coding units 1972 and 1974. Therefore, the upper segment coding order flag 1926 and lower segment coding order flag 1928 can be determined to have the same value as coding order flag 1916. Since the values of the upper and lower segment coding order flags are determined from the upper coding unit of the current coding unit, the coding order information is not obtained from the bitstream. Therefore, the amount of information in the coding order information is also reduced.
[0328] Here, data including samples from the right adjacent coding unit 1958 that have been decoded before the current coding unit 1986 and data 1980 and 1982 including samples from the upper adjacent coding unit can be used. Therefore, the image decoding apparatus 100 can perform prediction according to the embodiments of this disclosure by using data including samples (right reference line) from the right adjacent coding unit 1958 and data including samples (upper reference line) from the upper adjacent coding units 1980 and 1982.
[0329] In other words, it has already been referenced Figures 17-18 A method and apparatus are described for determining a filter to be used for a current sample based on at least one of the size of the current block and the distance between the current sample and a reference sample, and for adaptively performing intra-frame prediction based on the determined filter. The method also describes performing intra-frame prediction based on a reference sample adjacent to the upper or left corner of the current block, provided that encoding and decoding are performed according to the encoding and decoding order of existing coding units. However, this method is not limited to these descriptions, and those skilled in the art will understand that... Figure 19 As shown, when the encoding / decoding order between some adjacent coding units is the reverse order of the right coding unit or the left coding unit, intra-frame prediction can be performed based on reference samples adjacent to the upper or right corner of the current block.
[0330] According to various embodiments of this disclosure, prediction accuracy can be improved by adaptively determining the filter used on the previous sample based on the distance between the current sample point and the reference sample point, and prediction blocks with natural patterns can be generated.
[0331] In other words, prediction accuracy can be improved by using filters with low smoothing intensity and sharp characteristics on samples close to the reference sample. Conversely, natural-patterned prediction blocks can be generated by using filters with high smoothing intensity on samples far from the reference sample.
[0332] In addition, the efficiency of the transformation can be improved by generating prediction blocks with natural patterns and high prediction accuracy to indicate sudden prediction errors.
[0333] Various embodiments of this disclosure have been described to date. It will be understood by those skilled in the art that this disclosure may be implemented in modified forms without departing from its essential characteristics. These embodiments should be considered only in a descriptive sense and not for limiting purposes. Therefore, the scope of this disclosure is not defined by its detailed description but by the appended claims, and all differences within this scope will be construed as being included in this disclosure.
[0334] Embodiments of this disclosure can be written as computer programs and implemented using a general-purpose digital computer that executes the programs using computer-readable recording media. Examples of computer-readable recording media include magnetic storage media (e.g., ROM, floppy disk, hard disk, etc.), optical recording media (e.g., CD-ROM or DVD), etc.
Claims
1. An image decoding method characterized by, comprising the steps of: determining a sample of a left block as a reference sample according to an intra prediction mode of a current block; selecting a first filter among a plurality of filters when an x-coordinate value representing a position of a current sample in an x-axis of the current block is less than or equal to a predetermined value; selecting a second filter among the plurality of filters when the x-coordinate value is greater than the predetermined value; applying one of the first filter and the second filter to the reference sample to generate a prediction sample for the current sample, wherein the first filter comprises a first filter coefficient and a second filter coefficient, the second filter comprises a third filter coefficient and a fourth filter coefficient, a smoothing strength of the first filter is less than a smoothing strength of the second filter, the current block is a luma block or a chroma block.
2. An image coding method characterized by, comprising the steps of: determining a sample of a left block as a reference sample according to an intra prediction mode of a current block; selecting a first filter among a plurality of filters when an x-coordinate value representing a position of a current sample in an x-axis of the current block is less than or equal to a predetermined value; selecting a second filter among the plurality of filters when the x-coordinate value is greater than the predetermined value; applying one of the first filter and the second filter to the reference sample to generate a prediction sample for the current sample, wherein the first filter comprises a first filter coefficient and a second filter coefficient, the second filter comprises a third filter coefficient and a fourth filter coefficient, a smoothing strength of the first filter is less than a smoothing strength of the second filter, the current block is a luma block or a chroma block.
3. An image decoding apparatus characterized by comprising: comprising: a processor configured to: determine a sample of a left block as a reference sample according to an intra prediction mode of a current block; select a first filter among a plurality of filters when an x-coordinate value representing a position of a current sample in an x-axis of the current block is less than or equal to a predetermined value; select a second filter among the plurality of filters when the x-coordinate value is greater than the predetermined value; apply one of the first filter and the second filter to the reference sample to generate a prediction sample for the current sample, wherein the first filter comprises a first filter coefficient and a second filter coefficient, the second filter comprises a third filter coefficient and a fourth filter coefficient, a smoothing strength of the first filter is less than a smoothing strength of the second filter, the current block is a luma block or a chroma block.
Citation Information
Patent Citations
Image encoding / decoding method and apparatus for same
CN103404151A
Intraframe prediction performance improvement encoding method
CN106170093A