Intraframe prediction method and apparatus

By determining intraframe prediction modes and applying selective filtering and correction, the method improves encoding/decoding efficiency for high-resolution images, addressing inefficiencies in existing image compression techniques.

JP7603126B2Active Publication Date: 2024-12-19GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2023182099
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-07-02
Filing Date
2023-10-23
Publication Date
2024-12-19
Estimated Expiration
2039-06-25

AI Technical Summary

Technical Problem

Existing image compression techniques face inefficiencies in handling high-resolution, high-quality images, particularly in intraframe prediction, which affects encoding and decoding processes.

Method used

The method involves determining the intraframe prediction mode for a current block, selecting a pixel line for prediction, and applying filtering based on encoding parameters, with options for correcting predicted pixels and segmenting blocks for improved efficiency.

Benefits of technology

This approach enhances encoding/decoding efficiency by allowing selective filtering and correction of predicted pixels, improving intraframe prediction accuracy and reducing data compression complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007603126000009
    Figure 0007603126000009
  • Figure 0007603126000010
    Figure 0007603126000010
  • Figure 0007603126000011
    Figure 0007603126000011
Patent Text Reader

Abstract

To provide an encoding / decoding method and apparatus for improving the encoding / decoding efficiency used for intra-frame prediction referring to multiple pixel lines.SOLUTION: An image encoding apparatus includes a prediction unit, a subtraction unit, a transform unit, a quantization unit, an inverse quantization unit, an inverse transform unit, an addition unit, a loop filter unit, a memory and / or an encoding unit. The apparatus derives an intra-frame prediction mode of a current block, determines a pixel line to be used for the intra-frame prediction of the current block among multiple pixel lines, and carries out the intra-frame prediction of the current block on the basis of the intra-frame prediction mode and the pixel line. In addition, a first reference pixel of the determined pixel line is selectively filtered, and a prediction pixel of the current block is selectively corrected, so that the accuracy of the intra-frame prediction is improved.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to image encoding and decoding techniques, and more particularly to an encoding / decoding method and apparatus used for intraframe prediction. [Background technology]

[0002] Recently, the demand for high-resolution, high-quality images, such as high definition (HD) images and ultra high definition (UHD) images, is increasing in various application fields, and therefore highly efficient image compression techniques are being considered.

[0003] There are various image compression techniques, such as an inter-frame prediction technique that predicts pixel values ​​contained in a current picture from pictures before and after the current picture, an intra-frame prediction technique that predicts pixel values ​​contained in a current picture using pixel information in the current picture, and an entropy coding technique that assigns short codes to information that occurs frequently and long codes to information that occurs less frequently, etc. Furthermore, by using these image compression techniques, image data can be effectively compressed and transmitted or stored. Summary of the Invention [Problem to be solved by the invention]

[0004] The present invention relates to image encoding and decoding techniques, and more particularly to an encoding / decoding method and apparatus used for intraframe prediction. [Means for solving the problem]

[0005] According to the intra-frame prediction method and apparatus of the present invention, it is possible to derive an intra-frame prediction mode for a current block, determine a pixel line to be used for intra-frame prediction of the current block among a plurality of pixel lines, and perform intra-frame prediction of the current block based on the intra-frame prediction mode and the determined pixel line.

[0006] According to the intra-frame prediction method and apparatus of the present invention, filtering can be performed on the first reference pixels of the determined pixel line.

[0007] According to the intraframe prediction method and device of the present invention, filtering can be selectively performed based on a first flag that indicates whether or not filtering is to be performed on a first reference image used in intraframe prediction.

[0008] According to the intra prediction method and apparatus of the present invention, the first flag can be derived from a decoding device based on coding parameters of the current block, the coding parameters may include at least one of a block size, a component type, an intra prediction mode, or whether to perform intra prediction on a sub-block basis.

[0009] According to the intra-frame prediction method and apparatus of the present invention, the predicted pixels of the current block by the intra-frame prediction can be corrected.

[0010] According to the intra-frame prediction method and apparatus of the present invention, the correction may further include determining at least one of a second reference pixel or a weighting value used in the correction based on the position of the predicted pixel of the current block.

[0011] According to the present invention, the position of the pixel line of the current block is , the intra-frame prediction mode of the current block, or a sub-block of the current block whether to perform intra-frame prediction based on at least one of the above. The forward step can be selectively carried out.

[0012] According to the present invention, the intraframe prediction method and apparatus uses a sub-block of the current block as a unit. a second flag indicating whether to perform division; a division direction; determining the subblocks based on at least one of the information on the number of divisions or the information on the number of divisions; This can be done.

[0013] According to the intraframe prediction method and apparatus of the present invention, a predetermined default mode or a plurality of M Based on the PM candidates, the intra-frame prediction mode can be derived. Effect of the Invention

[0014] According to the present invention, the coding / decoding efficiency is improved by prediction in units of sub-blocks. It is possible to do so.

[0015] According to the present invention, intra-frame prediction based on a plurality of pixel lines is performed. The encoding / decoding efficiency can be improved.

[0016] According to the present invention, intra-frame prediction is performed by performing filtering on a reference image. The encoding / decoding efficiency can be improved.

[0017] According to the present invention, the intra-frame prediction pixels are corrected, so that the intra-frame prediction coding / decoding is performed. This can improve the signal efficiency.

[0018] According to the present invention, the intra-frame prediction mode is selected based on the default mode or the MPM candidate. By deriving it, the coding / decoding efficiency of the intra-frame prediction mode can be improved. [Brief description of the drawings]

[0019] [Figure 1] 1 is a block diagram showing an image encoding device according to an embodiment of the present invention; [Diagram 2]1 is a block diagram showing an image decoding device according to an embodiment of the present invention; [Diagram 3] FIG. 1 is a schematic diagram showing a tree-based block shape. [Figure 4] FIG. 1 is a schematic diagram showing a type-based block shape. [Diagram 5] 1 is a schematic diagram showing various block shapes obtainable by the split block section of the present invention. FIG. [Figure 6] FIG. 2 is a schematic diagram illustrating tree-based partitioning according to an embodiment of the present invention; [Figure 7] FIG. 2 is a schematic diagram illustrating tree-based partitioning according to an embodiment of the present invention; [Figure 8] FIG. 2 illustrates a block splitting process according to an embodiment of the present invention. [Figure 9] 1 is a schematic diagram showing predefined intra-frame prediction modes in an image encoding / decoding device; [Figure 10] FIG. 13 shows an example of comparing pixels between color spaces to obtain correlation information. [Figure 11] FIG. 2 is a schematic diagram showing a reference pixel arrangement used in intra-frame prediction. [Figure 12] FIG. 2 is a schematic diagram showing a reference pixel range used in intra-frame prediction. [Figure 13] FIG. 2 is a diagram showing blocks adjacent to a current block involved in generating a predicted block. [Figure 14] FIG. 13 is a diagram showing a partial example of checking division information of each block. [Figure 15] FIG. 13 is a diagram showing a partial example of checking division information of each block. [Figure 16] 1A to 1C are schematic diagrams showing various situations of a divided block. [Figure 17] FIG. 2 is a diagram showing an example of a divided block according to an embodiment of the present invention. [Figure 18] FIG. 11 is a diagram showing various examples relating to setting of intra-frame prediction mode candidate groups of a block for generating prediction information (in this example, the prediction block is 2N×N). [Figure 19]FIG. 11 is a diagram showing various examples relating to setting of intra-frame prediction mode candidate groups of a block for generating prediction information (in this example, the prediction block is N×2N). [Figure 20] FIG. 2 is a diagram showing an example of a divided block according to an embodiment of the present invention. [Figure 21] 11A to 11C are diagrams showing various examples relating to setting of intra-frame prediction mode candidate groups for blocks for which prediction information is to be generated. [Figure 22] 11A to 11C are diagrams showing various examples relating to setting of intra-frame prediction mode candidate groups for blocks for which prediction information is to be generated. [Figure 23] FIG. 13 is a diagram showing an example of generating a prediction block based on a prediction mode of an adjacent block. [Figure 24] FIG. 13 is a diagram showing an example of generating a prediction block based on a prediction mode of an adjacent block. [Diagram 25] FIG. 13 is a diagram showing an example of generating a prediction block based on a prediction mode of an adjacent block. [Figure 26] FIG. 2 is a schematic diagram illustrating a relationship between a current block and adjacent blocks. [Figure 27] FIG. 13 is a diagram showing intra-frame prediction taking into account the directionality of the prediction mode. [Figure 28] FIG. 13 is a diagram showing intra-frame prediction taking into account the directionality of the prediction mode. [Figure 29] FIG. 2 is a schematic diagram showing a reference pixel arrangement used in intra-frame prediction. [Diagram 30] FIG. 2 is a schematic diagram showing a reference pixel arrangement; [Diagram 31] FIG. 2 is a schematic diagram showing a reference pixel arrangement; [Diagram 32] FIG. 2 is a schematic diagram showing a reference pixel arrangement; [Diagram 33] FIG. 2 is a schematic diagram showing a reference pixel arrangement; [Diagram 34] FIG. 2 is a schematic diagram showing a reference pixel arrangement; [Diagram 35] FIG. 2 is a schematic diagram showing a reference pixel arrangement; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0020] According to the intra-frame prediction method and apparatus of the present invention, it is possible to derive an intra-frame prediction mode for a current block, determine a pixel line to be used for intra-frame prediction of the current block among a plurality of pixel lines, and perform intra-frame prediction of the current block based on the intra-frame prediction mode and the determined pixel line.

[0021] According to the intra-frame prediction method and apparatus of the present invention, filtering can be performed on the first reference pixels of the determined pixel line.

[0022] According to the intraframe prediction method and device of the present invention, the filtering can be selectively performed based on a first flag that indicates whether or not to perform filtering on a first reference image used in the intraframe prediction.

[0023] According to the intra prediction method and apparatus of the present invention, the first flag can be derived from a decoding device based on coding parameters of a current block, the coding parameters may include at least one of a block size, a component type, an intra prediction mode, or whether to perform intra prediction on a sub-block basis.

[0024] According to the intra-frame prediction method and apparatus of the present invention, the predicted pixels of the current block by the intra-frame prediction can be corrected.

[0025] According to the intra-frame prediction method and apparatus of the present invention, the correction may further include determining at least one of a second reference pixel or a weighting value used in the correction based on the position of the predicted pixel of the current block.

[0026] According to the present invention, the position of the pixel line of the current block is , the intra-frame prediction mode of the current block, or a sub-block of the current block whether to perform intra-frame prediction based on at least one of the above. The forward step can be selectively carried out.

[0027] According to the present invention, the intraframe prediction method and apparatus uses a sub-block of the current block as a unit. a second flag indicating whether to perform division; a division direction; determining the subblocks based on at least one of the information on the number of divisions or the information on the number of divisions; This can be done.

[0028] According to the intraframe prediction method and apparatus of the present invention, a predetermined default mode or a plurality of M Based on the PM candidates, the intra-frame prediction mode can be derived.

[0029] The present invention is susceptible to various modifications and has various embodiments. A specific embodiment will now be described with reference to the drawings. However, the present invention is not limited to the specific embodiment. All modifications, equivalents or equivalents falling within the spirit and technical scope of the present invention are intended to be included without being limited to the above. It should be understood to include alternatives.

[0030] Terms such as first, second, A, B, etc. are used herein to describe various elements. Although these elements may be used, they should not be limited by these terms. These terms are merely used to distinguish one element from another. Without departing from the scope, a first element may be referred to as a second element, and similarly, a second element may be referred to as a may be referred to as the first element. The term "and / or" refers to the combination of two or more associated items. The item may include any one of a number of related items.

[0031] When an element is "connected" or "coupled" to another element, this Although the elements may be directly connected or coupled to each other, there may be other elements between them. It should also be understood that one element is "directly connected" or "directly connected" to another element. When referring to "closely coupled," it should be understood that there are no other elements between them.

[0032] The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to limit the present invention. Unless the context clearly dictates otherwise, the singular forms include the plural forms. In this application, terms such as "comprise" or "have" refer to features, numbers, steps, etc. described in the specification. means that there is a presence of a function, structure, component, or combination thereof; One or more other features, numbers, steps, operations, structural elements, components, or combinations thereof. This does not preclude the possibility that other restrictions may exist or be added.

[0033] Unless otherwise defined, all terms used herein include technical or scientific terms. The meaning is the same as that generally understood by a person skilled in the art. Defined terms should be interpreted based on the contextual meaning of the relevant art; and Unless expressly defined in this application, the term should not be construed in an imagined or overly formal sense. It should not be.

[0034] The video encoding device and the video decoding device are implemented on a personal computer (PC). er), laptops, personal digital assistants (PDAs) Digital Assistant), Portable Multimedia Player (PM P: Portable Multimedia Player), portable game console ( PSP: Play Station Portable, wireless communication terminal (Wirele ss Communication Terminal), Smartphone The device may be a user terminal such as a mobile phone, a television, a virtual reality device (VR), an augmented reality device (AR), a mixed reality device (MR), a head mounted display (HMD), a smart glass, or a server terminal such as an application server and a service server. It may include various devices. For example, a communication device includes a communication modem for communicating with various devices or wired and wireless networks. The memory stores various programs and data used for intra-frame prediction or inter-frame prediction to encode or decode an image or to encode or decode an image. The processor executes a program to perform computing and control. In addition, the image coded into a bit stream by the image coding device is transmitted in real time or non-real time to an image decoding device via various communication interfaces such as wired and wireless communication networks (Networks) such as the Internet, a local area network, a wireless LAN network, a WiBro network, a mobile communication network, etc., or cables, a Universal Serial Bus (USB), etc., and is subsequently decoded by the image decoding device, restored to an image, and played back.

[0035] Furthermore, the image encoded into a bitstream by the image encoding device may be transmitted from the encoding device to the decoding device via a computer-readable storage medium.

[0036] The image encoding device and the image decoding device may each be an independent device, but may also be configured as one image encoding / decoding device in some cases. In this case, some configurations of the image encoding device and some configurations of the image decoding device are realized by technical elements that are substantially the same as those of the image decoding device, at least by including the same structure or performing the same function.

[0037] Therefore, in the following detailed description of the technical elements and their operating principles, redundant descriptions of the technical elements will be omitted.

[0038] In addition, since the image decoding device corresponds to a computing device that applies the image coding method executed in the image coding device for decoding, the following description will focus on the image coding device.

[0039] The computing device comprises a memory for storing a program or software module for implementing the image encoding method and / or the image decoding method, and a processor connected to the memory for executing the program. An image encoding device may be called an encoder, and an image decoding device may be called a decoder.

[0040] In general, the images may be organized into a series of still images, which may be grouped into groups of pictures (GOPs), and each still image may be referred to as a picture. In this case, a picture may represent either a frame or a field in a progressive signal or an interlaced signal. When encoding / decoding is performed in units of frames, an image may be represented by a "frame", and when encoding / decoding is performed in units of fields, an image may be represented by a "field". In the present invention, a progressive signal is assumed for explanation, but the present invention is also applicable to an interlaced signal. As a higher-level concept, a GOP or a sequence may be used as a unit. Furthermore, each picture may be divided into predetermined regions such as slices, tiles, and blocks. Furthermore, one GOP may include units such as an I-picture, a P-picture, and a B-picture. An I-picture is a picture that is encoded / decoded by itself without using a reference picture. Also, P pictures and B pictures use reference pictures for motion detection. Motion Estimation and Motion Compensation It can also refer to a picture that is encoded / decoded by performing P In the case of pictures, I-pictures and P-pictures may be used as reference pictures. For B pictures, I and P pictures may be used as reference pictures. However, the above definition may vary depending on the encoding / decoding settings.

[0041] Here, the picture that is referred to for encoding / decoding is called a reference picture. The referenced block or pixel is called the reference picture. The reference pixels are called the Reference Block and the Reference Pixel. Reference Data is also used in the spatial domain. Not only pixel values ​​in the frequency domain, but also in) and various coding / decoding information generated and determined during the coding / decoding process. For example, the prediction unit may include intraframe prediction-related information or motion-related information, and the conversion unit may include Transformation-related information in the inverse transform unit, quantization information in the quantization unit / inverse quantization unit, and encoding information Encoding / decoding related information (context information) in the decoding section, The information may be filtering-related information.

[0042] The smallest unit of an image may be a pixel. The number of bits for encoding is called the bit depth. The depth can be 8 bits and more bit depths can be supported depending on the encoding settings. The bit depth can be set based on the color space. At least one bit depth and color format of the image must be supported. You can set at least one color space based on the Color Format. Based on the color format, one or more pictures or other images of a particular size can be For example, the YCbCr ratio may be 4:2. If it is 0, the luma component (Y in the example) and the two chrominance components ( In this case, the composition ratio of the color difference components to the luminance components is Alternatively, the horizontal to vertical ratio may be 1:2. As another example, in the case of 4:4:4, The horizontal and vertical components may be the same. As in the example above, if the picture consists of more than one color space, If the picture consists of:

[0043] In the present invention, some of the color formats (YCbCr in this example) The following description will be based on the color space of the color table (Y in this example). Similar operations (settings dependent on the specific color space) can be performed between However, some differences may occur for each color space (settings independent of a specific color space). In other words, the settings that depend on each color space are proportional to the composition ratio of each component, or the composition ratio of each component. May mean ratio-dependent settings (e.g. 4:2:0, 4:2:2, 4:4:4, etc.) The settings independent of each color space are settings that are unrelated to the composition ratio of each component, or the corresponding color space settings. In the present invention, the encoder / decoder may set For some configurations, there may be independent settings or dependent settings.

[0044] Syntax elements or configuration information required for the image coding process nt) is a unit of video, sequence, picture, slice, tile, block, etc. The video parameter set may be determined by the video Set,VPS), Sequence Parameter Set (Sequence Parameter S et,SPS), Picture Parameter Set , PPS), slice header, tile header, block header, etc. The decoder may then store the data in a stream and transmit it to the encoder. The configuration information transmitted from the encoder can be restored by parsing and used in the image decoding process. Also, related information is transmitted to the bitstream in the form of supplemental enhancement information (SEI) or metadata, etc., and parsed for use. Each parameter set may have a unique ID value, and a lower parameter set may have the ID value of the higher parameter set to which it refers. For example, a lower parameter set may refer to information of one or more higher parameter sets having the same ID value. When one unit in the above examples of various units includes one or more other units, the unit may be called a higher unit, and the included units may be called lower units.

[0045] The setting information generated in the units may include contents that are set independently in each corresponding unit, or may include contents that are determined by dependent settings of the previous unit, the subsequent unit, or the higher unit. Here, the dependent settings may be understood as representing the setting information of the corresponding unit by flag information (e.g., if the 1-bit flag is 1, it is executed, and if it is 0, it is not executed). The flag information indicates the setting of the previous unit, the subsequent unit, or the higher unit. In the present invention, the setting information will be described based on an example of independent settings, but may also include an example of adding to or replacing the content of the setting information of the previous, subsequent, or higher unit of the current unit.

[0046] Fig. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention, and Fig. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.

[0047] As shown in Fig. 1, the image coding device may include a prediction unit, a subtraction unit, a transformation unit, a quantization unit, an inverse quantization unit, an inverse transformation unit, an addition unit, a loop filter unit, a memory, and / or a coding unit. Some of the above structures may not be included, and some or all of them may be selectively included as necessary. Some other configurations not shown may also be included.

[0048] As shown in Fig. 2, the image decoding device may include a decoding unit, a prediction unit, an inverse quantization unit, an inverse transform unit, an adder unit, a loop filter unit, and / or a memory. Some of the above structures may not be included, and some or all of them may be selectively included as necessary. Some other configurations not shown may also be included.

[0049] The image encoding device and the image decoding device may be separate devices, or may be configured as one image encoding / decoding device as necessary. In this case, some configurations of the image encoding device are realized by including at least the same structure or performing the same function as some configurations of the image decoding device, if the technical elements are substantially the same. Therefore, in the following detailed description of the technical elements and their operation principles, etc., duplicated descriptions of the technical elements will be omitted. In addition, since the image decoding device corresponds to a computing device that uses the image encoding method executed by the image encoding device for decoding, the following description will focus on the image encoding device. The image encoding device may be called an encoder, and the image decoding device may be called a decoder.

[0050] The prediction unit may include an intra prediction unit for performing intra prediction and an inter prediction unit for performing inter prediction. Intra prediction may determine an intra prediction mode using pixels of adjacent blocks of a current block as reference pixels, and generate a predicted block using the intra prediction mode. Inter prediction may determine motion information of a current block using one or more reference images, perform motion compensation using the motion information, and generate a predicted block. For a current block (encoding unit or prediction unit), it is determined whether to use intra prediction or inter prediction, and specific information according to each prediction method (e.g., intra prediction mode, motion vector, reference image, etc.) is stored. In this case, prediction is performed based on the encoding / decoding settings. and a processing unit that determines the prediction method and specific contents. For example, the prediction unit (or the encoding unit) can select a prediction method, a prediction mode, etc. The prediction block unit (or the coding unit, the transform unit) determines the prediction. Execute.

[0051] The subtractor subtracts the predicted block from the current block to obtain a residual block. That is, the subtractor generates an image of each pixel in the current block to be coded. The difference between the raw value and the predicted pixel value of each pixel of the predicted block generated by the predictor is calculated, and the residual The residual block is generated by subtracting the residual signal (Residual S ignal).

[0052] The transform unit is capable of transforming a signal belonging to the spatial domain into a signal belonging to the frequency domain. The signal obtained by the transformation process is called the transformed coefficient. For example, the residual block having the residual signal received from the subtractor is called a residual block. By performing a transform on the block, a transform block having transform coefficients can be obtained. , determining the input signal based on the coding settings, which is not limited to the residual signal.

[0053] The transformation section includes the Hadamard transform and the discrete sine transform. DST Based-Transform: Discret e Sine Transform) or Discrete Cosine Transform (DCT-based transform: DC T Based-Transform: Discrete Cosine Trans The residual block can be transformed using a transform technique such as The invention is not limited to this and various transformation techniques can be used to make improvements and modifications. do.

[0054] For example, at least one of the conversion techniques may be supported; and Each transformation technique supports at least one detail transformation technique. At least one detail transformation technique uses different basis vectors (basis vectors) for each transformation method. For example, DST-based conversion and The transformation techniques can be DST-I, DST-II, and DCT-based transformations. -II, DST-III, DST-V, DST-VI, DST-VII, DST-VII In the case of DCT, DCT-I, DCT -II, DCT-III, DCT-V, DCT-VI, DCT-VII, DCT-VII It can support detail conversion techniques such as I.

[0055] One of the transformations (e.g., one transformation technique and one detail transformation technique) is called a basic transformation technique. Therefore, additional transformation techniques (e.g., multiple transformation techniques, multiple detailed transformation techniques) can be used. It can support sequences, pictures, slices, tiles, etc. As a result, it is possible to determine whether to support additional transformation techniques. In addition, if conversion technology is added, related information can be generated. The conversion technique selection information can be determined in units of a block or the like, and related information can be generated.

[0056] You can perform transformations in the horizontal and vertical directions. For example, you can use the basis vectors of a transformation as By using the Perform the original transform, which converts pixel values ​​in the spatial domain to the frequency domain.

[0057] It can also perform horizontal / vertical transformations self-adaptively. Also, based on a single encoding setting, it can decide whether to perform self-adaptive transformation. For example, in the case of intra-frame prediction, if the prediction mode is horizontal mode, DCT-I can be applied horizontally and DST-I can be applied vertically. If the prediction mode is vertical mode, DST-VI can be applied horizontally and DCT-VI can be applied vertically. In the case of diagonal down left, DCT-II can be applied horizontally and DCT-V can be applied vertically. In the case of diagonal down right, DST-I can be applied horizontally and DST-VI can be applied vertically.

[0058] The size and shape of each transform block can be determined based on the coding cost of each candidate size and shape of the transform block. Coding can be performed on information such as image data of each determined transform block and the size and shape of each determined transform block.

[0059] A square in the transform format can be transformed into a basic transform format, and an additional transform format (e.g., a rectangular shape) can be supported. Whether or not an additional transform format is supported can be determined for each unit, such as a sequence, a picture, a slice, or a tile, and related information can be generated for each unit. Transform format selection information can be determined for each unit, such as a block, and related information can be generated.

[0060] Also, the supported transform block format can be determined based on the coding information. In this case, the coding information corresponds to slice type, coding mode, block size and shape, block division method, etc. That is, the transform format can be supported based on at least one coding information, and various transform formats can be supported based on at least one coding information. The former may be implicit, and the latter may be explicit. In the explicit case, self-adaptive selection information for indicating an optimal candidate group among multiple candidate groups can be generated and recorded in the bitstream. In the present invention including the example, when the coding information is explicitly generated, the corresponding information is recorded in the bitstream in various units. It should also be understood that the decoder analyzes the related information in various units and restores the decoded information. It should also be understood that when the coding / decoding information is processed implicitly, the encoder and the decoder are processed by the same process and rules.

[0061] As an example, the supported rectangular shape transformations can be determined based on the slice type: for an I slice, the supported transformations may be square transformations, and for a P / B slice, the transformations may be square or rectangular shape transformations.

[0062] As an example, the supported rectangular shape transforms can be determined based on the coding mode: for Intra, the supported transform type may be a square shape transform, and for Inter, the supported transform type may be a square or rectangular shape transform.

[0063] As an example, the supported rectangular shaped transforms can be determined based on the size and shape of the blocks: the transform type supported for blocks of a given size or larger may be a square shaped transform, and the transform type supported for blocks below the given size may be a square or rectangular shaped transform.

[0064] For example, a supported rectangular transformation can be determined according to the block division method. If the block to be transformed is a block obtained by a quad tree division method, the supported transformation format is a square transformation. If the block is a block obtained by a binary tree division method, the supported transformation format is a square transformation. The transformation type used is a square or rectangular shape transformation.

[0065] The above example shows that a conversion format is supported based on one piece of encoding information. You can also configure support for additional conversion formats by combining multiple pieces of information. The above examples are not limited to those listed above and may support additional transformation formats based on various encoding settings. This is an example showing how to port the RGB signal, and various modifications can be implemented.

[0066] Depending on the coding settings or image characteristics, the conversion process can be omitted. For example, Depending on the encoding settings (assuming lossless compression in this example), the conversion process (reverse processing process) Another example is the use of a filter that changes the image based on its characteristics. If the conversion process does not provide sufficient compression performance, the conversion process can be omitted. The omitted transformation may be a whole unit, or one of a horizontal unit and a vertical unit. Also, based on the size and shape of the block, such omissions may be supported. The administrator can decide whether to support the system or not.

[0067] For example, in a setting where horizontal and vertical transformation omissions are bundled, If lag is 1, no transformation is performed in the horizontal and vertical directions. If lag is 0, no transformation is performed in the horizontal and vertical directions. You can perform transformations in the vertical direction. You can set it to perform horizontal and vertical transformations independently. In , if the first transformation omission flag is 1, no transformation is performed in the horizontal direction. If the second conversion omission flag is 1, the conversion is performed in the horizontal direction. If the second conversion omission flag is 1, the conversion is performed in the vertical direction. If it is 0, no transformation is performed.

[0068] If the block size corresponds to range A, conversion omission can be supported. If B is supported, conversion omission is not supported. For example, if the horizontal length of a block is If the length is greater than M or the vertical length is greater than N, the conversion omission flag is not supported. In addition, if the horizontal length of the block is less than m or the vertical length of the block is If M(m) and N(n) are the same, the conversion omission flag is supported. The settings related to conversion can be set in units of sequences, pictures, slices, etc. The determination can be made.

[0069] If it supports additive transformation techniques, it shall support the transformation technique based on at least one coding information. In this case, the coding information includes slice type, coding mode, and It can accommodate various coding modes, block sizes and shapes, prediction modes, etc.

[0070] As an example, support for a transformation technique can be determined based on the encoding mode. ntra, the supported transformation techniques are DCT-I, DCT-III, DCT -VI, DST-II, DST-III. Inter supports The transformation technique used may be DCT-II, DCT-III, DST-III.

[0071] As an example, support for a transformation strategy can be determined based on slice type. For I slices, the supported transform techniques are DCT-I, DCT-II, DCT-I For P slices, the supported transform techniques are DCT-V, DS For B slices, the supported conversion techniques are: It may be DCT-I, DCT-II, or DST-III.

[0072] As an example, support for a transformation technique can be determined based on a prediction mode. The transformation techniques supported in mode A may be DCT-1, DCT-II. The transformation techniques supported in mode B may be DCT-1, DST-1. The transformation technique supported by prediction mode C may be DCT-I. In this case, the prediction Modes A and B may be directional modes, and prediction mode C may be a non-directional mode.

[0073] As an example, the support of transform techniques may depend on the size and shape of the block. The transform technique supported for blocks of a certain size or more may be DCT-II. The transform technique supported for blocks of less than a certain size may be DCT-II, DST-V. The transform techniques supported for blocks of a certain size or more but less than a certain size may be DCT-I, DCT-II, DST-I. The transform techniques supported for square shapes may be DCT-1, DCT-II, and the transform techniques supported for rectangular shapes may be DCT-1, DST-1.

[0074] The above example shows that a transform format is supported based on one piece of coding information, and a combination of multiple pieces of information can be used to set support for additional transform formats. The above example is not limited to the above example, and other examples may be used. The transform unit also transmits information required for generating a transform block to the coding unit to code the information, records the information in a bitstream, and then transmits the information to the decoder. The decoding unit of the decoder analyzes the information and uses it in the inverse transform process.

[0075] The quantization unit can quantize the input signal. The signal obtained by the quantization process is called a quantized coefficient. For example, a quantized block having quantized coefficients can be obtained by performing quantization on a residual block having residual transform coefficients received from a transform unit. In this case, the input signal is determined based on a coding setting. The coding setting is not limited to the residual transform coefficients.

[0076] The quantization unit may quantize the transformed residual block using quantization techniques such as Dead Zone Uniform Threshold Quantization, Quantization Weighted Matrix, etc., but is not limited thereto, and may use various quantization techniques for improvement and correction.

[0077] The quantization unit can also send information required for generating the quantization blocks to the encoding unit to encode the information, include the information in a bitstream, and then send the information to the decoder, where the decoding unit analyzes the information for use in the inverse quantization process.

[0078] Although the above example has been described on the assumption that the transform unit and the quantization unit perform transform and quantization on the residual block, the residual signal of the residual block can be transformed to generate a residual block having transform coefficients. In addition, the quantization process does not have to be performed. Not only can the residual signal of the residual block be not transformed into transform coefficients but only the quantization process can be performed, and the transform and quantization processes can be omitted. This can be determined by the settings of the encoder.

[0079] The encoding unit may generate a quantization coefficient sequence, a transform coefficient sequence, or a signal sequence based on a quantization coefficient, a transform coefficient, or a residual signal of a residual block generated by scanning according to at least one scanning order (e.g., zigzag scanning, vertical scanning, horizontal scanning, etc.). The encoding unit may also perform encoding using at least one entropy coding technique. In this case, information on an operation order may be determined based on an encoding setting (e.g., an encoding mode, a prediction mode, etc.), and related information may be generated implicitly or explicitly. For example, one of a plurality of scanning orders may be selected based on an intraframe prediction mode. In this case, the scanning pattern may be selected from various patterns such as zigzag, diagonal linear, raster, etc. It can be set to one of the options.

[0080] Also, the encoding unit 10 generates encoded data including the encoded information transmitted from each component, and converts the encoded data into a bit stream. This is a multiplexer (MUX). In this case, the coding technique is the Exponential Golomb method. ntial Golomb), Context Adaptive Variable Length Coding (CAVLC: Cont ext Adaptive Variable Length Coding, Context Adaptive Binary Arithmetic Coding (CABAC) Encoding can be performed using methods such as arithmetic coding (DTC) or arithmetic coding. The present invention is not limited to this, and various improvements and modifications of the encoding techniques may be used. It is possible.

[0081] Syntax of the residual block data and information generated in the encoding / decoding process Perform entropy coding on the elements (Syntax) (in this example, In the case of CABAC, the entropy coding device is er), Context Modeler, Binary Arithmetic Code In this case, the binary arithmetic coder may be provided. The binary arithmetic coding unit is a regular coding unit. e) and a Bypass Coding Engine. In this case, the regular encoding unit may be a component related to the context modeler. In addition, the bypass encoder may be a component independent of the context modeler.

[0082] Since the syntax elements input to the entropy coding device do not have to be binary values, Therefore, if the syntax element is not a binary value, the binarization unit performs a binary By performing the binary conversion, a bin string consisting of 0 or 1 is generated. In this case, bin represents a bit consisting of 0 or 1. The encoding can be performed by a binary arithmetic encoder, where the probability of occurrence of 0 and 1 is Based on this, one of the regular or bypass encoders can be selected. This can be determined according to the encoding / decoding settings. If the data has the same frequency of 0 and 1, a bypass coding unit can be used. If the data is different, the regular encoding section can be used. By text modeling (or updating context information), the next regular coding part is executed. At this time, it can be used as a reference.

[0083] In this case, the context is information about the probability of occurrence of a bin. The ring inputs the bins resulting from the binarization and calculates the bins required for binary arithmetic coding. This is the process of estimating probabilities. To perform probability estimation, use the bin syntax element: , the position index of the bin in the bin string, and the size of the bin relative to the surrounding blocks. For this purpose, the probability of being included in at least one context can be used. For example, the surrounding blocks can use a combination of flags to Depending on whether the context table is set to 0 or not, the context table will be updated with information for some flags. It is possible.

[0084] When performing binarization on syntax elements, various methods can be used. For example: For example, Fixed Length Binarization and Variable Length Binarization Variable Length Binarization In the case of variable length binarization, unary binarization (T runcated unary binarization, truncated rice binarization (Tr uncated Rice Binarization, Kth exponential Golomb Binarization In the present invention, the binarization process of the syntax elements not only includes the binarization mentioned in the above examples, but also includes other additional binarization methods.

[0085] The inverse quantization unit and the inverse transform unit may be implemented by inversely performing the processes of the transform unit and the quantization unit. For example, the inverse quantization unit may perform inverse quantization on the quantized transform coefficients generated by the quantization unit. The inverse transform unit may perform an inverse transform on the dequantized transform coefficients to generate a reconstructed residual block.

[0086] The adder reconstructs the current block by adding the predicted block and the reconstructed residual block. The reconstructed block is stored in a memory and used as reference data (for the prediction section, the filter section, etc.).

[0087] The loop filter unit may include at least one post-processing filter member such as a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), etc. The deblocking filter can remove block distortion occurring at the boundary between blocks in the restored image. The ALF can perform filtering based on a value obtained by comparing the restored image with an input image. In detail, the ALF can perform filtering based on a value obtained by comparing the restored image and the input image after filtering the blocks with the deblocking filter. Also, the ALF can perform filtering based on a value obtained by comparing the restored image and the input image after filtering the blocks with the SAO.

[0088] The memory can store the reconstructed block or picture. The reconstructed block or picture stored in the memory can be provided to a prediction unit that performs intraframe prediction or interframe prediction. In detail, the encoder can treat a storage space in a queue format of the compressed bitstream as a coded picture buffer (CPB) and a space for storing a decoded image in picture units as a decoded picture buffer (DPB). In the case of the CPB, the decoding units are stored according to the decoding order. Also, the decoder can emulate the decoding operation. In the emulation process, the compressed bitstream can be stored, and the decoding process restores the bitstream output from the CPB and stores the restored image in the DPB. In the encoding and decoding process of the subsequent images, the pictures stored in the DPB can be referenced.

[0089] The decoding unit can be realized by performing the process in the encoding unit in reverse, for example, by receiving a quantized coefficient sequence, a transform coefficient sequence, or a signal sequence from a bitstream, performing decoding, analyzing the decoded data including the decoding algorithm, and sending the decoded data to each component.

[0090] On the other hand, although not shown in the image encoding device and image decoding device in Fig. 1 and Fig. 2, they may include a division block unit. Information related to a basic coding unit can be obtained from the picture division unit. The basic coding unit can represent a basic (or starting) unit used for prediction, transformation, quantization, etc. in the image encoding / decoding process. In this case, the coding unit can configure one luminance coding block and two chrominance coding blocks based on the color format (YCbCr in this example). Also, the size of each block can be determined based on the color format. In the example described later, The following description will be based on a block (luminance component in this example). ,Assuming that each unit is obtained after determining the unit, similar settings The following description will be given on the assumption that the present invention can be applied to other types of blocks.

[0091] A division block section can be set for each element of the image encoding device and decoding device. This process also allows the size and shape of the blocks to be determined. In this case, different blocks can be defined based on the setting unit. The measurement block corresponds to the conversion block in the case of the conversion unit, the conversion block in the case of the conversion unit, and the quantization block in the case of the quantization unit. The present invention is not limited to this, and may further define block units by other components. The size and shape of a block can be determined by its horizontal and vertical lengths. It may be limited.

[0092] In the divided block section, the blocks can be expressed as M×N. For example, the shape of the block may be a square. If the maximum block size is 256x256 and the minimum is 8x8, then m ×2 m (In this example, m is a positive number from 3 to 8. For example, 8×8 , 16×16, 32×32, 64×64, 128×128, 256×256), A block of size 2m x 2m (in this example, m is a positive number between 4 and 128) or represents a block of size m × m (in this example, m is a positive number from 8 to 256). Alternatively, the shape of the block may be square and rectangular. If the range of the block is the same as in the example above, the size will be 2 m ×2 n A block (in this example , m and n are integers from 3 to 8. For example, the horizontal to vertical ratio is up to 2:1. So, 8×8, 8×16, 16×8, 16×16, 16×32, 32×16, 32× 32, 32x64, 64x32, 64x64, 64x128, 128x64, 128x1 28, 128x256, 256x128, 256x256. According to the method, the ratio of horizontal to vertical is not limited or may be a maximum value. Or, a block of size 2m×2n (in the example, m and n (where m is an integer between 4 and 128) or a block of size m × n A block (where m and n are integers from 8 to 256) can be obtained.

[0093] Based on the encoding / decoding settings (e.g., block type, partitioning method, partitioning settings, etc.) , it is possible to determine the blocks that can be obtained. For example, coding blocks Block) is size 2 m ×2 n , and the predicted block (Predict A transformation block is a block of size 2m×2n or m×n. The lock (Transform Block) is size 2 m ×2 n This is a block. Based on the above settings, information such as block size and range (e.g. index and double It is possible to generate numerical information.

[0094] Based on the type of block, the range (in this example, the maximum and minimum values) Also, in some blocks, the range information of the block can be explicitly For some blocks, the range information of the block is implicitly determined. For example, the relevant information can be specified in the coding block and the transformation block. The prediction block can be generated automatically and the relevant information can be processed implicitly. Cut.

[0095] In the explicit case, at least one range information can be generated. In the case of a lock, maximum and minimum value information can be generated as range information. Or based on the difference between the maximum value and a predetermined minimum value (e.g., 8) (e.g., the maximum value and It is possible to generate a minimum value based on the difference between the indexes that generate the minimum value. In addition, multiple range information relating to the horizontal and vertical lengths of the rectangular block can be generated.

[0096] In the implicit case, range information can be obtained based on the encoding / decoding settings (e.g., block type, partitioning method, partitioning settings, etc.). For example, in the case of a predicted block, in a coding block (in this example, the maximum size of the coding block is M×N and the minimum size is m×n) as a higher unit, maximum and minimum value information is obtained from a candidate group (in this example, M×N and m / 2×n / 2) obtained by partitioning settings of the predicted block (in this example, quadtree partitioning + partitioning depth is 0).

[0097] The size and shape of the initial (or starting) block of the division block unit may be determined by the upper unit. In the case of a coding block, the basic coding block obtained from the picture division unit may be the initial block. In the case of a prediction block, the coding block may be the initial block. In the case of a transform block, the coding block or the prediction block may be the initial block. This may be determined by the encoding / decoding setting. For example, when the coding mode is Intra, the prediction block may be the upper unit of the transform block. In the case of Inter, the prediction block may be a unit independent of the transform block. The initial block may be divided into small blocks to be used as the starting unit of division. When the optimal size and shape of each block by division is determined, the block may be determined as the initial block of the lower unit. For example, in the former case, it may be a coding block. In the latter case (lower unit), it may be a prediction lock or a transform block. In the above example, when determining the initial block of the lower unit, a division process may be performed to search for a block (e.g., upper unit) having an optimal size and shape.

[0098] In short, the division block unit can divide a basic coding unit (or a maximum coding unit) into at least one coding unit (or a sub-coding unit). The coding unit may also be divided into at least one prediction unit and may also be divided into at least one transform unit. The coding unit may be divided into at least one coding block, and the coding block may be divided into at least one prediction block and may also be divided into at least one transform block. The prediction unit may be divided into at least one prediction block, and the transform unit may be divided into at least one transform block.

[0099] As shown in the above example, when a block having an optimal size and shape is found by mode determination, mode information (e.g., partition information) used for the mode can be generated. The mode information can be recorded in a bitstream together with information (e.g., prediction-related information, transformation-related information, etc.) generated in a component to which the block belongs and transmitted to a decoder. In addition, the decoder analyzes the information at the same level and uses it in the image encoding process.

[0100] Below, examples of partitioning schemes are described, and are described assuming that the initial blocks have a square shape, although the same or similar examples are applicable for rectangular cases.

[0101] The division block unit can support various division methods. For example, it can support tree-based division or type-based division. Other methods can also be used. In the case of tree-based division, the division information can be generated using a division flag. In the case of type-based division, the division information can be generated using index information of block shapes included in a predetermined candidate group.

[0102] FIG. 3 is a schematic diagram showing a tree-based block shape.

[0103] Referring to FIG. 3, a represents an example of obtaining one undivided 2N×2N, and b represents an example of obtaining one undivided 2N×2N. Here is an example of getting 2N×N by splitting some of the flags (in this example, a horizontal split of the binary tree): where c is the N×2 tree divided by the split flag (which in this example is a vertical split of the binary tree). N, d is a partial division flag (in this example, a quad-tree division or a binary tree division). This shows an example of obtaining four N×N trees by dividing the tree into four N×N trees. Based on the type of the block, the shape of the block to be acquired can be determined. For example, When performing quadtree division, possible candidate blocks may be a and d. When performing tree splitting, possible candidate blocks may be a, b, c and d. For quadtrees, one split flag is supported. If the corresponding flag is "0", then a If we can get d, and the corresponding flag is "1", we can get d. supports multiple split flags, one of which indicates whether splitting is performed or not. There may be two flags to indicate whether it is a horizontal / vertical split. One of them is whether overlapping horizontal / vertical splits are allowed. If overlapping is allowed, the available candidate blocks are The locks may be a, b, c, and d. If overlap is not allowed, the available The candidate blocks may be a, b, and c. A quadtree is a tree-based basic partitioning scheme. Also, the tree splitting method (which is a binary tree in this example) can be a tree-based A flag indicating that additional tree splits are allowed may be implicitly or implicitly included in the splitting scheme. can perform multiple tree splits if explicitly activated. This partitioning method allows for recursive partitioning. In other words, the divided blocks can be reset as the initial blocks and the tree-based division can be performed. This depends on the splitting settings such as splitting range and splitting allowable depth. This may be an example of a hierarchical division scheme.

[0104] FIG. 4 is a schematic diagram showing type-based block shapes.

[0105] As shown in Figure 4, based on the type, the divided blocks are divided into one divided shape (example a in the example), two divided shapes (b, c, d, e, f and g in the example) and four partition shapes (h in this example). For example, the candidate groups are a, b, c, and It may be composed of n or a, b to g, n or a, n, q, etc., but is not limited thereto. The embodiment may further include the examples described below. Therefore, various modifications can be implemented. The flag indicating that symmetric partition is allowed is active. When the block is resized, the supported blocks may be a, b, c, and h as shown in FIG. Flag indicating that asymmetric partition is allowed. When the tag is activated, the supported blocks are all of the blocks a through h shown in Figure 4. In the former case, the relevant information (in this example, a flag indicating that symmetric division is allowed) In the latter case, the relevant information (in the example, non- A flag indicating whether symmetric splitting is allowed can be explicitly generated. The tree-based partitioning may be a scheme that supports first-order partitioning. Therefore, further partitioning cannot be performed on the blocks obtained by type-based partitioning. This may be an example where the splitting depth tolerance is zero (e.g., single-layer splitting). .

[0106] FIG. 5 is a schematic diagram showing various block shapes obtainable by the split block section of the present invention. do.

[0107] Referring to FIG. 5, blocks a to s can be obtained according to the partition setting and partitioning method. It may also have additional block features not shown.

[0108] As an example, tree-based partitioning can tolerate asymmetric partitioning. For example, in the case of a binary tree, blocks b and c (split into multiple blocks in this example) shown in FIG. 5 can tolerate asymmetric partitioning. Or, blocks b to g (split into multiple blocks in this example) shown in FIG. 5 can tolerate asymmetric partitioning. Depending on the encoding / decoding settings, when the flag indicating that asymmetric division is permitted is explicitly or implicitly deactivated, the obtainable candidate block may be b or c (assuming that overlapping division in the horizontal and vertical directions is not permitted in this example). Also, when the flag indicating that asymmetric division is permitted is activated, the obtainable candidate block may be b, d, e (horizontal division in this example) or c, f, g (vertical division in this example). This example corresponds to determining the division direction by the horizontal or vertical division flag, and determining the block shape based on the flag indicating that asymmetric division is permitted. However, the present invention is not limited to this and may be converted to other examples.

[0109] As an example, the added tree splitting can be used for tree-based splitting. For example, splitting of ternary tree, quad tree, octree, etc. can be performed to obtain n split blocks (in this example, n is 3, 4, 8, n is an integer). In the case of ternary tree, the supported blocks (split into multiple blocks in this example) may be h to m. In the case of quad tree, the supported blocks may be n to p. In the case of octree, the supported blocks may be q. Based on the encoding / decoding settings, it can be implicitly determined whether to support the tree-based splitting or the related information can be explicitly generated. Also, based on the encoding / decoding settings, binary tree or quad tree splitting can be used alone. Or, binary tree and quad tree splitting can be mixed. For example, in the case of a binary tree, blocks at b and c shown in FIG. 5 can be obtained. In the case of a mixture of a binary tree and a ternary tree (assuming that the range of use of the binary tree and the range of use of the ternary tree overlap in this example), blocks such as b, c, i, and l can be obtained. If a flag indicating that further division other than the current tree is permitted is explicitly or implicitly deactivated based on the encoding / decoding settings, the obtainable candidate block may be b or c. If activated, the obtainable candidate block is b, i or b, h, i, j (horizontal division in this example) or c, l or c, k, l, m (vertical division in this example). This example corresponds to determining the division direction by the horizontal or vertical division flag, and determining the block shape based on the flag indicating that additional division is permitted. However, the present invention is not limited to this and may be transformed into other examples.

[0110] As an example, type-based blocks can allow non-rectangular partitions. For example, partitions according to the shapes of r and s are possible. When combined with the type-based block candidate group, blocks a, b, c, h, r, s or blocks a to h, r, s may be supported blocks. Also, blocks supporting n partitions such as h to m (e.g., n is an integer, in this example, 3 other than 1, 2 and 4) may be included in the candidate group.

[0111] Based on the encoding / decoding settings, the division method can be determined.

[0112] As an example, the partitioning scheme may be determined based on the type of block. For example, the coding block and the transform block may use tree-based partitioning. The prediction block may use type-based partitioning. In addition, a combination of the two types of partitioning schemes may be used. For example, the prediction block may use a partitioning scheme that combines tree-based partitioning and type-based partitioning. In addition, the partitioning schemes may differ depending on at least one scope applied to the block.

[0113] For example, the division method can be determined based on the size of the block. A specific range between the maximum and minimum values ​​of the block (for example, a×b to c×d, where the latter is large) In the case of a certain range (e.g., The division method (×f to g×h) can be performed based on the type. Expression-based range information can be explicitly generated or implicitly determined.

[0114] As an example, the division method is determined based on the shape of the block (or the block before division). For example, if the block shape is a square, tree-based partitioning and A type-based partition can be performed, or if the blocks are rectangular, a treebase partition can be used. A split of the resource can be performed.

[0115] The partitioning settings can be determined based on the encoding / decoding settings.

[0116] As an example, the partitioning settings can be determined based on the type of block. For example, In tree-based partitioning, the coding block and the prediction block are partitioned using a quadtree. The transformation block can use a binary tree. Or, the coding block can use In the prediction block, the allowable partitioning depth may be m. In the transform block, the allowable division depth may be o. Also, m, n and The o's may be the same or different.

[0117] For example, the partitioning setting can be determined based on the size of the block. A quadtree partition can be performed on a range of points (e.g., a×b to c×d), but A range (e.g., e×f to g×h. In this example, assume that c×d is greater than g×h. In this case, the range is the maximum length of the block. The ranges may include all ranges between the upper and lower values. For example, the minimum value of a particular range may be The minimum value of a particular range may be equal to the maximum value of the particular range, or the minimum value of a particular range may be equal to the maximum value of the particular range. If there are overlapping ranges, the division with the larger maximum value is used. The method may have a priority. That is, in a partitioning method with a priority, the partitioning result may be Based on this, it can be determined whether to execute a partitioning scheme with a lower priority. In this case, it is possible to explicitly generate or implicitly determine range information based on the tree type. This can be done.

[0118] As another example, in a particular range of blocks (same as in the previous example), several candidates You can perform type-based partitioning with groups. In some candidate groups (in this example, at least one setting is the same as the previous one), In this case, a type-based partitioning can be performed with the candidate groups being different from each other. In this case, the range may include the entire range between the maximum and minimum values ​​of the block. The ranges may have non-overlapping settings.

[0119] As an example, the division setting can be determined based on the shape of the block. If the block has a square shape, a quadtree partition can be performed. If x is a rectangle, a binary tree decomposition can be performed.

[0120] For example, encoding / decoding information (e.g. slice type, color components, encoding mode, etc.) For example, if the slice type is I, If P is in a certain range (e.g., a×b to c×d), then in a certain range (e.g., e×f to g×h), and if B, then in a certain range (say, i×j to k×l), If the slice type is I, it can perform a quadtree split. The allowed split depth of a (or binary tree) split may be m. If the slice type is P, the allowed split depth may be n. If the slice type is B, the allowed split depth may be o. m and o may be the same or different. Some slice types may have settings that are the same as other slices (e.g., P and B slices).

[0121] As another example, when a color component is a luminance component, the allowable depth of the quadtree (or binary tree) division can be m. When the color component is a chrominance component, it can be n. m and n can be the same or different. Also, the division range of the quadtree (or binary tree) when the color component is a luminance component (e.g., a×b to c×d) and the division range of the quadtree (or binary tree) when the color component is a chrominance component (e.g., e×f to g×h) can be the same or different.

[0122] As another example, if the coding mode is Intra, the division depth of the quadtree (or binary tree) may be m. If it is Inter, it may be n (assuming that n is greater than m in this example). Also, m and n may be the same or different. Furthermore, the range of quadtree (or binary tree) division when the coding mode is Intra and the range of quadtree (or binary tree) division when the coding mode is Inter may be the same or different.

[0123] In the above example, based on the encoding / decoding information, the information regarding whether to support the self-adaptive split candidate group setting can be explicitly generated or implicitly determined.

[0124] According to the above example, it has been described that the partitioning method and partitioning setting are determined based on the encoding / decoding setting. In the above example, it is shown that the data may be converted into other formats depending on the status of each element. Also, the partitioning method and partitioning setting can be determined based on a combination of multiple elements. For example, the partitioning method and partitioning setting can be determined based on the type, size, shape, encoding / decoding information, etc. of the block.

[0125] Also, in the above example, by determining elements related to the division method, settings, etc., or explicitly generating information, it is possible to determine whether or not to allow the adaptation situation in the above example.

[0126] In the above partition setting, the partition depth refers to the number of spatial partitions based on the initial block (in this example, the partition depth of the initial block is 0). Also, as the partition depth increases, the blocks that can be partitioned become smaller. The setting related to the depth can be changed based on the partitioning method. For example, in a tree-based partitioning method, a common depth can be used as the quadtree partitioning depth and the binary tree partitioning depth, or a separate depth according to the tree type can be used.

[0127] In the above example, when using a separate division depth based on the type of tree, the division depth can be set to 0 at the division start position of the tree (in this example, the block before division). The division depth can be calculated centered on the division start position, without being based on the division range of each tree (the maximum value in this example).

[0128] FIG. 6 is a schematic diagram illustrating tree-based partitioning according to an embodiment of the present invention.

[0129] FIG. 1 shows an example of quadtree and binary tree division. Specifically, the top left block of FIG. 1 shows a quadtree division, the top right block and bottom left block show a quadtree and binary tree division, and the bottom right block shows a binary tree division. In the drawings, solid lines (in this example, Quad1) represent the boundaries when divided into a quadtree. Dotted lines (in this example, Binary1) represent the boundaries when divided into a binary tree. Thick solid lines (in this example, Binary2) represent the boundaries when divided into a binary tree. The dotted lines and the thick solid lines represent the boundaries when the tree is divided into binary trees. This is the difference.

[0130] As an example, the allowable depth of the quadtree division of the upper left block is 3. If the current block is N× If N, perform the splits until one of the horizontal or vertical splits reaches (N>>3). Continue and generate partition information until you generate partition information for (N>>2). This is the same as the example below. The maximum and minimum values ​​of the quadtree are N×N, (N>>3)×(N> >3) When performing tree splitting, the horizontal and vertical lengths are 1 / 2 It can be split into four blocks. When splitting is activated, the value of the split flag is If splitting is deactivated, the value of the split flag must be "0". According to this setting, the split flag of the top left block is generated together with the top left block of b. There is a possibility that this will happen.

[0131] As an example, for the upper right block, the quadtree partitioning allowable depth is 0, and the binary tree partitioning allowable depth is The available depth is 4, and the maximum and minimum values ​​of the quadtree division are N×N, (N>>2)×(N>> 2) and the maximum and minimum values ​​of the binary tree are (N>>1)×(N>>1), (N>>3)× (Assume N>>3) The upper right block performs quadtree partitioning on the initial block. When a row is inserted, it is divided into four blocks each having a length of 1 / 2 the horizontal and vertical lengths. The size of the divided blocks is (N>>1)×(N>>). This is the binary tree division. (In this example, the partition depth is larger than the minimum partition depth of the quadtree partition.) In other words, the example shows that quadtree division and binary tree division cannot be used in an overlapping manner. In this example, the binary tree division information is composed of a plurality of division flags. Some flags are horizontal split flags (in this example, the flag corresponding to x in x / y). Some flags may be vertical split flags (in the example, the split in x / y) The split flag can be set in a similar way to the quadtree split (e.g. For example, whether to perform activation. In this example, the two flags are In the drawings, when flag information is generated using "-", , "-" may correspond to implicit handling of flags. Here, the maximum number of tree splits If additional splitting cannot be performed according to conditions such as the minimum value and split depth, the flag is implicit. According to this setting, the division flag of the upper right block is May be generated along with a lock.

[0132] As an example, for the bottom left block, the quadtree partitioning allowable depth is 3, and the binary tree partitioning allowable depth is 1. The available depth is 2, and the maximum and minimum values ​​of the quadtree division are N×N, (N>>3)×(N>>3 ), and the sum of the maximum and minimum values ​​of the binary tree partitions is (N>>2)×(N>>2), (N>>4)× (N>>4), and in the overlapping range, the partitioning priority is given to the quadtree partitioning. The bottom right block is assumed to be horizontally , is divided into four blocks each having a length equal to 1 / 2 the vertical length. The size of the block is (N>>1)×(N>>). This is based on the example setup, This means that tree splitting and quadtree splitting can be performed. There may be cases where the 2-ary tree partitions can overlap. In this case, the four priority-determined partitions are Based on the quadtree splitting, it can be decided whether to perform a binary tree split. If quadtree partitioning is performed, do not perform binary tree partitioning. If quadtree partitioning is not performed, do not perform binary tree partitioning. Can perform tree splitting. If not, splitting based on the above settings. Even if the execution requirements are met, it may not be possible to perform the quadtree partitioning. The division information may consist of multiple division flags. Some flags are division flags ( In the example, the flags may be the x in x / y. Direction flag (in this example, it corresponds to y in x / y. Based on x, y information is generated. The split flag may be similar to a quadtree split. In this example, the horizontal and vertical divisions cannot be activated to overlap each other. In the drawing, when the flag information is generated as '-', the '-' may have a setting similar to the above example. According to this setting, the split flag of the bottom left block may be generated together with the bottom left block of b.

[0133] As an example, (assuming that for the bottom right block, the binary tree division allowable depth is 5, and the maximum and minimum values ​​of the binary tree division are N×N, (N>>2)×(N>>3)) when performing binary tree division on the initial block, the bottom right block is divided into two blocks with 1 / 2 the horizontal and vertical lengths. The split flag in this example may be set to be the same as that of the bottom left block. In the drawings, when the flag information is generated as "-", "-" may have a similar setting to the above example. In this example, it indicates that the horizontal and vertical minimum values ​​of the binary tree are set differently. According to this setting, the split flag of the bottom right block may be generated together with the bottom right block of b.

[0134] As shown in the above example, after determining block information (e.g., type, size, shape, position, slice type, color components, etc.), the division method and division settings can be determined based on this, and the division process can be performed.

[0135] FIG. 7 is a schematic diagram illustrating tree-based partitioning according to an embodiment of the present invention.

[0136] With reference to block a and block b, the thick solid line L0 represents the largest coding block. The blocks divided by the thick solid line and other lines L1 to L5 represent divided coding blocks. The numbers in the blocks represent the positions of the divided sub-blocks (in this example, in raster scan order). The number of "-"s represents the division depth of the block. The numbers on the borders between blocks represent the number of divisions. For example, when divided into four (in this example, a quad tree), the order is UL(0)-UR(1)-DL(2)-DR(3). When divided into two (in this example, a binary tree), the order is L or U(0)-R or D(1). This may be defined for each division depth. In the example described later, a case in which the number of obtainable coding blocks is limited is shown.

[0137] As an example, assume that the largest coding block of a is 64×64, the smallest coding block is 16×16, and quadtree partitioning is used. In this case, the size of 2-0, 2-1, 2-2 blocks (size 16×16 in this example) is equal to the size of the smallest coding block, so they may not be partitioned into smaller blocks, such as 2-3-0, 2-3-1, 2-3-2, 2-3-3 blocks (size 8×8 in this example). In this case, one candidate group, which is a 16×16 block, can be obtained in blocks 2-0, 2-1, 2-2, and 2-3, so no block partitioning information is generated.

[0138] As an example, assume that the maximum coding block of b is 64×64, the horizontal or vertical length of the minimum coding block is 8, and the allowable division depth is 3. In this case, the 1-0-1-1 (in this example, size 16×16, division depth 3) block satisfies the minimum coding condition and can be divided into smaller blocks. However, it may not be divided into blocks with deeper division depths (in this example, 1-0-1-0-0 and 1-0-1-0-1 blocks) because it is equal to the allowable division. In this case, in the 1-0-1-0 and 1-0-1-1 blocks, one candidate group, which is a 16×8 block, can be obtained, so no block division information is generated.

[0139] As shown in the above example, quadtree or binary tree partitioning can be supported based on encoding / decoding, or a mixture of quadtree and binary tree partitioning can be supported. For example, one or two of the above methods can be supported based on block size, partition depth, etc. If the block belongs to the first block range, it supports quadtree. If the block belongs to the second block range, binary tree partitioning can be supported. If multiple division methods are supported, the maximum coding block size of each method can be set as follows: Enable at least one of the following settings: minimum encoding block size, allowable decomposition depth, etc. The ranges may be set to overlap each other, or may be set to not overlap each other. Alternatively, one range may be set to include the other range. The settings can be made by single or mixed factors such as slice type, encoding mode, color components, etc. This may be decided.

[0140] As an example, the split setting can be determined based on the slice type. In the case of ice, the supportable splitting settings are the supportable splitting range for the quadtree. 128x128 to 32x32, and the supported range of partitions for binary trees is 32x3 2 to 8x8. For P / Bslice, the supported partitioning settings are quadtrees, The range of partitioning that can be supported in the case of The supported division range is from 64x64 to 8x8.

[0141] As an example, the partitioning setting can be determined based on the encoding mode. In terms of supported split settings, if is Intra, for binary trees, 64 It can support a division range of 64x to 8x8 and an allowable division depth of 2. When the encoding mode is Inter, the supported splitting configurations are can support a division range of 32x32 to 8x8 and an allowable division depth of 3. can.

[0142] As an example, the split settings can be determined based on the color components. The supported range for 1-ary trees is 256x256 to 64x64, and for binary trees is 256x256 to 64x64. The supported division range for is from 64x64 to 16x16. In the case of the quadtree, the same settings as for the luminance component are supported (in this example, the chrominance format (The length of each block is set based on the size of the tree.) For binary trees, the supported split ranges are The range is from 64x64 to 4x4 (in this example, the range for the luminance component is similar). (Assume the resolution is 128x128 to 8x8, 4:2:0).

[0143] In the above example, various partitioning settings based on block type are described. Some blocks can be combined with other blocks to perform the division process. For example, when combining a coding block and a transformation block to form one unit, A partitioning process is performed to obtain the optimal block size and shape. This is and the optimal size and shape of the transform block. Alternatively, a coding block and a transform block may be combined to form one unit. A prediction block and a transformation block may be combined to form one unit. A coding block, a prediction block and a transformation block are combined to form one unit. Other blocks may be combined.

[0144] In the present invention, it will be explained that each block is provided with an independent division setting. You can also combine multiple units into one unit to share a single split setting. This is also fine.

[0145] In the above process, the generated information is the sequence, picture, , slice, tile, etc., into the bitstream as at least one unit. The decoder also parses the relevant information from the bitstream.

[0146] In the image encoding / decoding process, the input pixel value and the output pixel value may differ. In addition, by performing a pixel value adjustment process, it is possible to prevent distortion due to erroneous operation. The pixel value adjustment method is a process of adjusting pixel values ​​that exceed a pixel value range to within the pixel value range, and may be called clipping. [Table 1]

[0147] Table 1 shows an exemplary code of a clipping function (Clip_x) for performing pixel value adjustment. Referring to Table 1, an input pixel value (pixel_val), a minimum value (minI) and a maximum value (maxI) of an allowable pixel value range can be input as parameters of the clipping function (Clip_x). In this case, when described based on a bit depth (bit_depth), the minimum value (minI) may be 0, and the maximum value (maxI) may be (2bit_depth-1). When the clipping function (Clip_x) is executed, an input pixel value (pixel_val, parameter A) less than the minimum value (minI) is changed to the minimum value (minI). Also, an input pixel value greater than the maximum value maxI (parameter C) can be changed to the maximum value (maxI). Therefore, an output value (output) can be returned as a pixel value-adjusted output pixel value (pixel_val').

[0148] In this case, the pixel value range is determined by the bit depth, but depending on the type and characteristics of the image, the pixel values ​​constituting the image (e.g., picture, slice, tile, block, etc.) are different, so they are not necessarily generated within all pixel value ranges. This can be used in the image encoding / decoding process while referring to the range of pixel values ​​constituting the actual image.

[0149] For example, in the pixel value adjustment method according to Table 1, the minimum value (minI) of the clipping function can be used as the minimum value among the pixel values ​​that make up the actual image, and the maximum value (maxI) of the clipping function can be used as the maximum value among the pixel values ​​that make up the actual image.

[0150] In short, the image encoding / decoding device can use a pixel value adjustment method based on bit depth and / or a pixel value adjustment method based on a range of pixel values ​​constituting an image. In the encoder / decoder, flag information for determining whether to support a self-adaptive pixel value adjustment method can be supported. If the flag information is "1", pixel value adjustment method selection information can be generated. If the flag information is "0", a predetermined pixel value adjustment method (in this example, a method based on bit depth) can be set as a basic pixel value adjustment method. When the pixel value adjustment method selection information indicates a pixel value adjustment method based on a range of pixel values ​​constituting an image, it may include pixel value related information of the image. For example, it may include information on minimum and maximum values ​​of color components related to each image and intermediate values ​​described later. The information generated during adjustment is recorded and transmitted in units of video, sequence, picture, slice, tile, block, etc. of the encoder. In addition, the information recorded in the decoder can be analyzed to restore related information in related units.

[0151] On the other hand, in the above process, the pixel value range including the minimum and maximum pixel values ​​can be changed (determined or defined) by pixel value adjustment based on the bit depth or pixel value range based on the pixel value range constituting the image. The additional pixel value range can also be changed (determined or defined). For example, the maximum and minimum values ​​of the pixel values ​​constituting the actual image can be changed, and the intermediate values ​​for constituting the pixel values ​​can also be changed.

[0152] In other words, in the pixel value adjustment process based on bit depth, minI is the minimum pixel value of the image. where I represents the pixel value, maxI represents the maximum pixel value of the image, I represents the color component, and media nI represents the central pixel value of the image. minI can be 0, and maxI is (1< <bit_depth-1)-1であってもよく、midIは、1<<(bit_dep th-1). Also, other forms including the above examples may be used based on the encoding / decoding settings. In this case, medianI can be obtained. The median is a descriptive term in the present invention. In the image encoding / decoding process, the pixel value is changed (determined) by the pixel value adjustment process. This refers to one of the pixel value range information that is defined as a pixel value range.

[0153] For example, in a pixel value adjustment process based on the range of pixel values ​​that make up an image, I may be the minimum pixel value of the image, and maxI may be the maximum pixel value of the image. , medianI may be the central pixel value of the image. It is the average value of the pixel values ​​of the image, and is the value located at the center when aligning with the image pixels. Alternatively, the value may be obtained based on a pixel value range of the image. In inI and maxI, medianI can be derived. anI may be a pixel value lying within the pixel value range of the image.

[0154] Specifically, medianI is, for example, (minI+maxI) / 2 or (minI+m axI)>>1, (minI+maxI+1) / 2, (minI+maxI+1)>>1 Based on the pixel value range information of the image (in this example, minI, maxI), Also, other examples, including the above, may be used based on the encoding / decoding settings. It is also possible to obtain median I in the form

[0155] Next, an embodiment of the pixel value adjustment process (intermediate values ​​in this example) will be described.

[0156] As an example, the basic bit depth is 8 bits (0 to 255), and the image is composed of A pixel value adjustment process based on the range of pixel values ​​to be applied (in the example, the minimum value is 10, The maximum value is 190. Select the (average) intermediate value 100 from the minimum and maximum values. The current block position is the first block in the image (picture in this example). If it is a block, the adjacent blocks (in this example, the left, bottom left, top left, , top, top right) does not exist. Therefore, for the reference image, the padding is done with the middle value 100. The reference image can be used to perform intra-frame prediction processing based on a prediction mode. The process can be carried out.

[0157] As an example, the basic bit depth is about 10 bits (0 to 1023), and the image A pixel value adjustment process based on the range of pixel values ​​that make up the and the associated syntax element exists). If it is the first block in a slice or tile in the example, There are adjacent blocks (in this example, left, bottom left, top left, top, top right) that are used for decoding. Therefore, the reference image can be padded with the intermediate value 600. The reference image can be used to perform an intra-frame prediction process based on a prediction mode. Cut.

[0158] As an example, the basic bit depth is 10 bits, and the range of pixel values ​​that make up an image is A pixel value adjustment process based on the range (in this example, the intermediate value is 112 and the associated syntax Select the coding mode of the neighboring blocks (intraframe prediction / frame prediction) The pixels of the corresponding block are used in predicting the current block based on the interframe prediction method. Activate the setting that determines whether the corresponding block can be When the coding mode is intra-frame prediction, it can be used as a reference pixel for the current block. It is not available for intra-frame prediction. If this setting is disabled, the current block The current block can be used as a pixel of the current block, regardless of the coding mode of the corresponding block. The related syntax element is constrained_intra_pred_flag, which can occur in P or B image types). If the current block is located on the left side of the image, there are no neighboring blocks (left, bottom left, top left in this example) that can be used for coding / decoding. There are neighboring blocks (right and top right in this example) that can be used for coding / decoding, but they are disabled by the above setting because the coding mode of the block is inter-frame prediction. Therefore, there are no reference pixels available. The reference pixels can be padded with an intermediate value (112 in this example). That is, since there are no reference pixels available, they can be padded with an intermediate value in the image pixel value range. The reference images can be used to perform an intra-frame prediction process based on the prediction mode.

[0159] In the above embodiment, the prediction unit shows all cases related to the intermediate value, which may be included in another setting of video encoding / decoding. In addition, the present invention is not limited to the above embodiment, and modifications and extensions can be performed in various cases.

[0160] In the present invention, the pixel value adjustment process is applicable to an encoding / decoding process by a prediction unit, a transformation unit, a quantization unit, an inverse quantization unit, an inverse transformation unit, a filter unit, a memory, and the like. For example, an input pixel in the pixel value adjustment method may be a reference pixel (Reference Sample) or a predicted pixel (Prediction Sample) in a prediction process, or may be a reconstructed pixel (Reconstructed Sample) in a transformation, quantization, inverse transformation, and inverse quantization process. The pixel may be a reconstructed pixel in a loop filtering process, or may be a pixel stored in a memory. In this case, in the transformation, quantization, inverse transformation, and inverse quantization process, the reconstructed pixel may be a reconstructed pixel before applying a loop filter. The reconstructed pixel in the loop filter may be a reconstructed pixel to which the loop filter is applied. The reconstructed pixel in the deblocking filter process may be a reconstructed pixel to which a decoding filter is applied. The reconstructed pixel in the SAO process may be a reconstructed pixel to which SAO is applied. The reconstructed pixel in the ALF process may be a reconstructed pixel to which ALF is applied. Although various examples of the above cases have been described, the present invention is not limited thereto and is applicable to the input, intermediate and output steps of any encoding / decoding process that invokes a pixel value adjustment process.

[0161] In the example described below, it is assumed that a clipping function Clip_Y for the luminance component and clipping functions Clip_Cb and Clip_Cr for the color difference components Cb and Cr are supported.

[0162] In the present invention, the prediction unit can be classified into intra-frame prediction and inter-frame prediction, and the intra-frame prediction and inter-frame prediction can be defined as follows.

[0163] Intraframe prediction may be a technique for generating a predicted value from a region that completes encoding / decoding of the current image (e.g., a picture, slice, tile, etc.), and interframe prediction may be a technique for generating a predicted value from an image (e.g., a picture, slice, tile, etc.) that has completed encoding / decoding one image prior to the current image.

[0164] Also, the intraframe prediction may be a technique for generating a predicted value from an area that completes encoding / decoding of the current image, but may exclude prediction methods such as a method of generating a predicted value from a reference image, block matching, template matching, etc. The interframe prediction may be a technique for generating a predicted value from at least one image that completes encoding / decoding, and the image that completes encoding / decoding may be configured to include the current image.

[0165] If the encoding / decoding settings follow one of the above definitions, and the first definition follows Let us assume the following example. Also, the predicted value is obtained by prediction in the spatial domain. Although the above description assumes that the above values ​​are set as values, the present invention is not limited to this.

[0166] FIG. 8 illustrates a block division process according to an embodiment of the present invention. 1 shows examples of sizes and shapes of blocks obtained from basic coding blocks by the method.

[0167] In the drawings, the thick solid lines represent basic coding blocks, and the thick dotted lines represent quadtree division boundaries. The double solid lines represent symmetric binary tree partition boundaries, the solid lines represent ternary tree partition boundaries, and the thin dotted lines represent , which represent the asymmetric binary tree division boundaries. All lines other than the thick solid lines represent the divisions made by each division method. The following division settings (e.g. division type, division information, division information setting order, etc.) The present invention is not limited to the above-mentioned examples, and may have various conversion examples.

[0168] For ease of explanation, we will use the basic coding block (2N x 2N, 128 x 128). Then, the top left, top right, bottom left and bottom right blocks (NxN, 64×64) are divided into separate blocks. The following explanation will be given assuming that the initial block has a partition setting. The division operation (division depth 0->1, i.e., the division depth has increased by 1) results in four subdivisions. Also, for the quadtree partitioning setting, the maximum coding block is 128 × 12 Assume that the number of pixels is 8, the minimum coding block is 8×8, and the maximum decomposition depth is 4. This is the setting that is generally applied to each block.

[0169] (1st time, upper left block, A1-A6) In this example, if we support a single tree partition (in this example, a quadtree), then Block division settings (e.g. maximum coding block, minimum coding block, division depth block) The size and shape of the available blocks can be determined by the following: In this case, one block is divided by dividing (performing two divisions in the horizontal and vertical directions, respectively). When the block can be obtained, the partition information required for one partition operation (according to the 4Mx4N before partition, The division depth is increased by 1) is a flag indicating whether division is to be performed (in this example, If it is 0, x divisions are performed, if it is 1, o divisions are performed). The number of candidates that can be obtained is 4M × 4 N and 2M×2N.

[0170] (2 times, top right block, A7 to A11) In this example, when supporting multi-tree partitioning (in this example, quad-trees and binary trees), Multiple block division settings allow you to determine the size and shape of the blocks that can be obtained. In this example, in the case of a binary tree, the maximum coding block is 64×64, and Assume that the length of a small coding block is four and the maximum decomposition depth is four.

[0171] In this example, the number of blocks obtained by division is two or more (in this example, it is two or four). In some cases, the partitioning information required for one partitioning operation (increasing the quadtree partition depth by 1) is A flag indicating whether to split, a flag indicating the split type, a flag indicating the split shape, and a flag indicating the split direction. The available candidates are 4M×4N, 4M×2N, 2M×4N, and 4M×N. / 4M×3N, 4M×3N / 4M×N, M×4N / 3M×4N, 3M×4N / M×4N be.

[0172] The quadtree division range and the binary tree division range overlap (i.e., in the current step, (The range in which both 1-tree and 2-tree partitioning can be used), the current block (the state before partitioning) This is the block obtained by quadtree division (if the parent block < division depth is 1 less than the current block) If the block is a block obtained by quadtree division, the division information is divided into the following In other words, blocks can be obtained by a plurality of division methods and by each division setting. If so, split information can be generated in the following categories: [Table 2]

[0173] In the above table, a is a flag indicating whether or not to perform quad-tree division, and if it is 1, quad-tree division (QT) is performed. If the flag is 0, b is checked. b is a flag indicating whether or not to perform binary tree division. If b is 0, no division is performed in the block (no division). If b is 1, binary tree division is performed.

[0174] c is a flag indicating the division direction. If it is 0, it represents horizontal division (hor). If it is 1, it represents vertical division (ver). d represents the division format flag. If it is 0, it represents symmetric division (SBT: Symmetric Binary Tree). If it is 1, it represents asymmetric division (ABT: Asymmetric Binary Tree). Only when d is 1, is information on the subdivision ratio (1 / 4 or 3 / 4) in the asymmetric division checked. If it is 0, in the left / right blocks or top / bottom blocks, the ratio of the left block to the top block is 1 / 4, and the ratio of the top block to the bottom block is 3 / 4. If it is 1, the ratios are reversed.

[0175] (2) When only binary tree division can be performed In the above table, division information can be expressed by flags b to e other than a.

[0176] In FIG. 8, in the case of block A7, quadtree partitioning can be performed on the pre-partitioned blocks (A7 to A11) (i.e., quadtree partitioning can be performed, but results in binary tree partitioning rather than quadtree partitioning), so this corresponds to the generation of partitioning information in (1).

[0177] Also, in the case of A8 to A11, quadtree partitioning is not performed in the pre-partitioned blocks (A8 to A11), but if binary tree partitioning is performed (i.e., block<A8からA11> (When quadtree division can no longer be performed in (2)), this corresponds to the generation of division information in (2).

[0178] (3rd time, lower left block, A12 to A15) In this example, multi-tree partitioning (in this example, quad-tree, binary tree, and ternary tree) is supported, and the size and shape of the block that can be obtained can be determined by multiple block partitioning settings. In this example, in the case of binary tree / ternary tree, it is assumed that the maximum coding block is 64×64, the length of one side of the minimum coding block is 4, and the maximum partitioning depth is 4.

[0179] In this example, if the number of blocks that can be obtained by division is two or more (in this example, 2, 3, and 4), the division information required for one division operation is a flag indicating whether to perform division, a flag indicating the type of division, a flag indicating the division shape, and a flag indicating the division direction, and the obtainable candidates are 4M x 4N, 4M x 2N, 2M x 4N, 4M x N / 4M x 2N / 4M x N, M x 4N / 2M x 4N / M x 4N.

[0180] When the quadtree division range overlaps with the binary / ternary tree division range and the current block is a block obtained by quadtree division, the division information may include: [Table 3]

[0181] In the above table, a is a flag indicating whether or not to perform quadtree division. If it is 1, If the flag is 0, a binary tree split is performed or a ternary tree split is performed. Check the flag b, which indicates whether to perform 1-tree division. If b is 0, If it is 1, perform a binary or ternary tree split.

[0182] c is a flag indicating the split direction. If it is 0, it indicates a horizontal split. If it is 1, it indicates a vertical split. Represents a split. d is a flag that indicates the split type. If it is 0, it is binary split (BT). If it is 1, it represents ternary tree partitioning (TT).

[0183] (2) When only binary / ternary tree division is feasible In the above table, division information can be expressed by flags b to d other than a.

[0184] In FIG. 8, the A12 and A15 blocks are pre-divided blocks A12 to A15. This corresponds to the case where quadtree division can be performed using the Respond.

[0185] In addition, A13 and A14 are divided into pre-divided blocks A13 and A14 in a quadtree. Since it is a ternary tree rather than a regular tree, it corresponds to the generation of the partition information in (2).

[0186] (4th inning, lower left block, A16-A20) In this example, multi-tree partitioning (in this example, quad-trees, binary trees, and ternary trees) is supported. , determining the size and shape of the blocks that can be obtained by multiple block division settings; In this example, in the case of a binary tree / ternary tree, the maximum coding block is 64 x 64. Assume that the length of one side of the minimum coding block is 4 and the maximum division depth is 4.

[0187] In this example, the division (in this example, 2, 3, 4) results in two or more blocks. When the above information is obtained, the partition information required for one partition operation is A flag indicating the division type, a flag indicating the division format, and a flag indicating the division direction. The available candidates are 4M×4N, 4M×2N, 2M×4N, 4M×N / 4M×3N, 4M×3N / 4M×N, M×4N / 3M×4N, 3M×4N / M×4N, 4M×N / 4M ×2N / 4M×N, M×4N / 2M×4N / M×4N.

[0188] The split range of the quadtree overlaps with the split range of the binary / ternary tree, and the current block is If the block is obtained by tree partitioning, the partition information may include: [Table 4]

[0189] In the above table, a is a flag indicating whether or not to perform quadtree division. If it is 1, If the flag is 0, it indicates whether to perform binary tree division. If b is 0, no further division is performed on the block. If it is 1, perform a binary or ternary tree split.

[0190] c is a flag indicating the split direction. If it is 0, it indicates a horizontal split. If it is 1, it indicates a vertical split. It represents a partition. d is a flag that indicates the type of partition. If it is 0, it represents a ternary tree partition. If it is 1, If present, it represents a binary tree partition. If d is 1, check the flag e corresponding to the partition format. If e is 0, a symmetric split is performed. If e is 1, an asymmetric split is performed. If so, the information on the ratio of detailed divisions in the asymmetric division is checked. This is the same as the above example.

[0191] (2) When only binary / ternary tree splitting can be performed In the above table, division information can be expressed by flags b to f other than a.

[0192] In FIG. 8, block A20 corresponds to the generation of partition information in (1) since quadtree partitioning can be performed on preliminary partition blocks A16 to A19.

[0193] In the case of A16 to A19, binary tree partitioning rather than quad tree partitioning is performed on the preliminary partitioned blocks A16 to A19, and this corresponds to the generation of partition information in (2).

[0194] Next, the intra-frame prediction of the prediction section in the present invention will be described.

[0195] FIG. 9 is a diagram showing examples of intra-frame prediction modes predefined in the image encoding / decoding device.

[0196] Referring to FIG. 9, 67 prediction modes are configured to be a prediction mode candidate group used for intra-frame prediction. Here, 65 prediction modes are directional modes (2 to 66), and 2 prediction modes are non-directional modes (DC, planar). In this case, the directional modes may be divided into gradient (e.g., dy / dx) or angle information (degrees). All or some of the prediction modes described in the above example may be included in the prediction mode candidate group of the luminance component or chrominance component, and other additional modes may be included in the prediction mode candidate group.

[0197] In addition, by utilizing the correlation between color spaces, a restored block of another color space that has completed encoding / decoding can be used to predict the current block, and a prediction mode that supports this may be included. For example, in the case of a chrominance component, a predicted block of the current block can be generated using a restored block of a luminance component corresponding to the current block. In other words, a predicted block can be generated based on a restored block in consideration of the correlation between color spaces.

[0198] The prediction mode candidate groups can be self-adaptively determined based on the encoding / decoding settings. The number of candidate groups can be increased to improve prediction accuracy, or decreased to reduce the amount of bits for each prediction mode.

[0199] For example, one of candidate group A (67, with 65 directional modes and 2 non-directional modes), candidate group B (35, with 33 directional modes and 2 non-directional modes), and candidate group C (18, with 17 directional modes and 1 non-directional mode) can be selected, and the candidate group can be self-adaptively selected or determined based on the size and shape of the block.

[0200] Also, the prediction mode candidate group may have various settings based on the encoding / decoding settings. For example, as shown in FIG. 2, in FIG. 9, the prediction mode candidate group is set by a mode equalization method. Or, in FIG. 9, the candidate group can be set by a method in which the number of modes between 18 and 34 is greater than the number of modes between 2 and 18. Or, it may be the other way around. Also, the candidate group can be self-adaptively set based on the shape of the block (i.e., square, rectangular_horizontal length, rectangular_vertical length). For example, if the width of the current block is greater than the height, the intraframe prediction mode belonging to 2 to 15 is not used, and the intraframe prediction mode belonging to 67 to 80 can be substituted. Also, in FIG. 9, the number of modes between 18 and 34 is greater than the number of modes between 2 and 18. Or, it may be the other way around. Also, the candidate group can be self-adaptively set based on the shape of the block (i.e., square, rectangular_horizontal length, rectangular_vertical length). For example, if the width of the current block is greater than the height, the intraframe prediction mode belonging to 2 to 15 is not used, and the intraframe prediction mode belonging to 67 to 80 is substituted. If the width of the current block is less than its height, use intra prediction modes from 53 to 66. Instead, the replacement can be performed in an intraframe prediction mode ranging from -14 to -1.

[0201] In the present invention, unless otherwise stated, a given prediction mode candidate having the same mode interval Intra-frame prediction is performed using the complementary group (candidate group A). After the child is modified, it can be used in the self-adaptive intra-frame prediction.

[0202] FIG. 9 shows prediction modes supported when the shape of a block is square or rectangular. In addition, when the shape of the block is rectangular, the supported prediction modes are A prediction mode different from the example may be used. For example, the number of prediction mode candidate groups may be different. Or, the number of prediction mode candidate groups is the same, but the block length is longer. Conversely, the prediction modes may be distributed or reversed. As shown in Figure 9, regardless of the block shape, the prediction mode is set as (equal spacing between directional modes), but also applicable to other situations It is.

[0203] The index to be assigned to the prediction mode can be set in various ways. In the case of the mode, the preset priority information is based on the angle or inclination information of the prediction mode. Depending on the mode, the index assigned to each mode can be determined. For example, x The modes corresponding to the x-axis or y-axis (modes 18 and 50 in FIG. 9) have a high priority. Also, the angle difference may be set to 45 degrees or -45 degrees depending on the horizontal or vertical mode. The diagonal modes (modes 2, 34, 66) may have the following priorities: Based on the diagonal mode, the diagonal mode having an angle difference of 22.5 degrees or -22.5 degrees is , may have the following priorities: such a scheme (next is 11.25 degrees or -11. 25 degrees, etc.) or in a variety of other ways.

[0204] Alternatively, the indexes may be assigned in a particular directional order based on a given prediction mode. For example, as shown in Figure 9, from one diagonal mode (mode 2), In the following example, the index can be assigned along the direction of the given prediction mode. As an example, indexes are assigned in a clockwise direction based on the above.

[0205] In addition, the non-directional prediction mode has priority over the directional mode in assigning index information. Or, index information can be allocated between directional modes. can assign index information at the end. This is done by setting In this example, the most preferred prediction mode for the non-directional mode may be determined based on the Example of index allocation first (using low index allocation. Mode 0 is average This section explains the above points.

[0206] Various examples of indexes assigned to prediction modes have been described above. The indexes may be assigned in other settings without being limited to the above example. You may do so.

[0207] In the above example, in which an index is assigned to a prediction mode, the priority information is explained. As explained above, the priority information is not only used to assign indexes to prediction modes. For example, the priority information may be used in the encoding / decoding process of the prediction mode. , MPM setting, etc., and in the encoding / decoding process of the prediction mode It is possible to support multiple sets of priority information.

[0208] A method for deriving the intra-frame prediction mode (particularly, the luminance component) of the current block will be described below. do.

[0209] The current block may use a default mode predefined in the image encoding / decoding device. The default mode may be a directional mode or a non-directional mode. For example, the directional mode may include at least one of a vertical mode, a horizontal mode, or a diagonal mode. The non-directional mode may include at least one of a planar mode or a DC mode. If it is determined that the current block uses the default mode, the intra-frame prediction mode of the current block may be set as the default mode.

[0210] Alternatively, the intra prediction mode of the current block may be derived based on a plurality of MPM candidates. First, a predetermined MPM candidate may be selected from the prediction mode candidate group. The number of MPM candidates may be three, four, five or more. The MPM candidate may be derived based on the intra prediction mode of a neighboring block adjacent to the current block. The neighboring block may be a block adjacent to at least one of the left side, top end, top left end, bottom left end, or top right end of the current block.

[0211] Specifically, the MPM candidates can be determined based on whether the intra-frame prediction mode (candIntraPredModeA) of the left block and the intra-frame prediction mode (candIntraPredModeB) of the top block are the same, and whether candIntraPredModeA and candIntraPredModeB are non-directional modes.

[0212] For example, if candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is not a non-directional mode, the MPM candidates of the current block may include at least one of candIntraPredModeA, (candIntraPredModeA-n), (candIntraPredModeA+n) or a non-directional mode, where n may be 1, 2 or a larger integer. The non-directional mode may include at least one of a planar mode or a DC mode. For example, the MPM candidates of the current block may be determined as shown in Table 2 below. The index in Table 2 indicates, but is not limited to, the position or priority of the MPM candidate. For example, the DC mode may be assigned index1 or index4. [Table 5]

[0213] Alternatively, if candIntraPredModeA and candIntraPredModeB are different and neither candIntraPredModeA nor candIntraPredModeB is a non-directional mode, the MPM candidates of the current block may include at least one of candIntraPredModeA, candIntraPredModeB, (maxAB-n), (maxAB+n), or a non-directional mode. Here, maxAB represents the maximum value of candIntraPredModeA and candIntraPredModeB, and n may be 1, 2, or a larger integer. The non-directional mode may include at least one of a planar mode and a DC mode. For example, the MPM candidates of the current block may be determined as shown in Table 3 below. The index in Table 3 indicates the position or priority of the MPM candidate, but is not limited thereto. For example, the largest index may be assigned to the DC mode. If the difference between candIntraPredModeA and candIntraPredModeB is within a predetermined threshold range, the MPM candidate 1 in Table 3 is applied. Otherwise, the MPM candidate 2 is applied. Here, the threshold range may be from 2 to 62 inclusive. [Table 6]

[0214] or candIntraPredModeA and candIntraPredMode B is different, and candIntraPredModeA and candIntraPre If only one of dModeB is a non-directional mode, the MPM candidate for the current block is maxAB, (maxAB-n), (maxAB+n) or one of the non-directional modes where maxAB may include at least one of candIntraPredM represents the maximum value of odeA and candIntraPredModeB, and n is 1, 2 or The non-directional modes may be any of the planar modes and DC modes. For example, as shown in Table 4, the MPM of the current block may include at least one of the following: The index in Table 4 indicates the position or priority of the MPM candidate. However, this is not limited to this. For example, the DC mode can be assigned index 0 or the maximum Assign an index. [Table 7]

[0215] or candIntraPredModeA and candIntraPredMode B is different and candIntraPredModeA and candIntraPred If ModeB is a non-directional mode, the MPM candidates of the current block are non-directional. vertical mode, vertical mode, horizontal mode, (vertical mode -m), (vertical mode +m), (horizontal The horizontal mode may include at least one of (horizontal mode -m) or (horizontal mode +m), where: m may be an integer of 1, 2, 3, 4 or greater. For example, the following Table 5 shows at least one of the following modes: In this way, the MPM candidates for the current block can be determined. M indicates the position or priority of the candidate, but is not limited to this. For example, in horizontal mode, You can assign x1 or you can assign the maximum index. [Table 8]

[0216] Among the multiple MPM candidates, the MPM candidate indicated by the MPM index is currently The MPM index may be set to the intra prediction mode of the block. The signal can be encoded by an encoding device.

[0217] As described above, the default mode or one of the MPM candidates can be selectively used. By using the signal from the encoding device, the intra-frame prediction mode can be derived. A selection can be made based on a flag that is currently It can indicate whether the intra prediction mode of the current block should be the default mode. If the flag is a first value, the intra prediction mode of the current block is set to the default mode. Otherwise, the intra prediction mode of the current block is derived from the MPM candidates. It is possible to signal information such as whether to issue a new product, the MPM index, etc. can.

[0218] The chrominance component may have a candidate group that is the same as the prediction mode candidate group of the luminance component, or may be configured by some modes of the prediction mode candidate group of the luminance component, in which case the prediction mode candidate group of the chrominance component may have a fixed configuration or a variable (or self-adaptive) configuration.

[0219] (Fixed candidate group composition vs. variable candidate group composition) As an example of a fixed configuration, some of the modes of the prediction mode candidate group for the luminance component (e.g., assuming that the modes are DC mode, planar mode, vertical mode, horizontal mode, or diagonal mode, and assuming that the diagonal mode is at least one of DL, UL, and UR, where DL predicts from the bottom right to the top right, UL predicts from the top left to the bottom right, and UR predicts from the top right to the bottom left, assumed to be modes 2, 34, and 66 in Figure 9, respectively, or may be other diagonal modes) are configured as a prediction mode candidate group for the chrominance component, and intra-frame prediction is performed.

[0220] As an example of a variable configuration, some modes (for example, DC mode, planar mode, vertical mode, horizontal mode, and diagonal UR mode are assumed to be the modes that are usually selected as the basic prediction mode candidate group) of the prediction mode candidate group for the luminance component are configured as the basic prediction mode candidate group for the chrominance component. There is a possibility that the modes included in the candidate group may not accurately reflect the characteristics of the chrominance component, and in order to improve this, the prediction mode candidate group configuration for the chrominance component may be changed.

[0221] For example, at least one prediction mode of a luminance component block or sub-block at the same position as or corresponding to a chrominance component block (Example 1 below) can be included in a basic prediction mode candidate group. Or, some modes can be replaced to form a new prediction mode candidate group (Example 2 below). For example, a position corresponding to a chrominance component <depending on color format> in a luminance component represents a block at a predetermined position when it is not composed of one block but is divided into multiple sub-blocks by block division. In this case, the position of the predetermined block is determined at the top left, top right, bottom left, bottom right, middle, top middle, bottom middle, left middle, right middle, etc. in the luminance component block corresponding to the chrominance component block. If they are distinguished by coordinates within the image, the top left may be a position including the (0,0) coordinates, the top right may be a position including the (blk_width-1,0) coordinates, the bottom left may be a position including the (0,blk_height-1) coordinates, the bottom right may be a position including the (blk_width-1,blk_height-1) coordinates, the center may be a position including one of the coordinates (blk_width / 2-1,blk_height / 2-1), (blk_width / 2,blk_height / 2-1), (blk_width / 2-1,blk_height / 2), and (blk_width / 2,blk_height / 2), and the top middle may be a position including one of the coordinates (blk_width / 2-1,0) and (blk_width / 2,0). The center bottom may be a position including one of the coordinates of (blk_width / 2-1, blk_height-1), (blk_width / 2, blk_height-1), the center left may be a position including one of the coordinates of (0, blk_height / 2-1), (0, blk_height / 2), and the center right may be a position including one of the coordinates of (blk_width-1, blk_height / 2-1), (blk_width-1, blk_height / 2). That is, it means a block including the coordinate position. The above blk_width and blk_height refer to the horizontal and vertical lengths of the luminance block. The coordinates are not limited to the above and may include others.In the following description, the prediction mode (or color mode) of the luminance component to be added to the prediction mode candidate group of the chrominance component is added at least one prediction mode based on a predetermined priority (for example, upper left-upper right-lower left-lower right-middle). When adding two prediction modes, the mode of the upper left block and the mode of the upper right block are added based on the above setting. In this case, if the blocks at the upper left and upper right positions are composed of one block, the lower left block mode with the next priority is added.

[0222] Or, the neighboring blocks located to the left, above, top left, top right, bottom left, etc., with the current block as the center. block or a subblock of the corresponding block (if the adjacent block consists of several blocks) At least one prediction mode (may refer to adjacent blocks for a given block) When multiple modes are included in the prediction mode candidate group for the chrominance component, the candidates are selected according to the priority. A block of a given priority as a complement, and a subblock of a given priority located within the subblock The prediction mode of the subblock may be included in the base prediction mode candidate group. Alternatively, a new prediction mode candidate group can be constructed by replacing some of the modes. It can be achieved.

[0223] If additional content is added to the above description, the block of luminance components or the adjacent block (luminance block The prediction mode may include at least one of the following prediction modes: In the following example, the prediction mode for the luminance component may include one more mode. Here, an example is given in which the prediction mode of the luminance component includes the prediction mode of the chrominance component. The derived prediction mode (e.g., the adjacent mode of the mode, the directional mode, for example, the horizontal If mode 18 is the prediction mode for the luminance component, modes 17, 19, 16, etc. The prediction modes of the chrominance components correspond to the derived prediction modes. When a candidate group is selected, the priority of the candidate group configuration is determined from the prediction mode of the luminance component to the luminance component. (may be set according to the order from the prediction mode of the component to the derived mode) or adjacent The prediction modes derived from the prediction modes of the blocks are classified into a prediction mode candidate group for the chrominance components. Detailed explanations of examples including the above will be omitted, but the following description will be given with similar or different configurations. can be applied.

[0224] As an example (1), the prediction mode of the luminance component is If it matches one of the candidates, the composition of the candidate groups is the same (the number of candidate groups remains unchanged). If they do not match, the composition of the candidate groups will be different (the number of candidate groups will increase). do).

[0225] If the configuration of the candidate groups in the above example is the same, the prediction mode index is The index may be the same or another index may be assigned. For example, the index of the prediction mode candidate group for the chrominance component may be determined by the decoding setting. If index is plane 0, DC1, vertical 2, horizontal 3, diagonal UR4, the luminance component is horizontal In some cases, the configuration of the prediction mode candidate group remains unchanged, and the index of each prediction mode is The coordinates may remain unchanged or may be changed to other indices (horizontal 0, plane 1, The above index reassignment may be performed by: In the prediction mode encoding / decoding process, a small number of mode bits (small bits) are used. Here is an example of the process that is performed to generate a This is also fine.

[0226] If the candidate group configuration in the above example is different, the prediction mode index remains unchanged. If the index remains the same, it may be added or a different index may be assigned. For example, if the index configuration of the prediction mode candidate group is the same as the above example, If the prediction mode is diagonal DL, the configuration of the prediction mode candidate group is increased by 1. In addition, the index of the prediction mode of the current candidate group remains unchanged, and the newly added Either the index of the selected mode is the final one (in this example, the diagonal DL5) or can assign other indices (in the example, diagonal DL0, plane 1, DC2, Vertical 3, Horizontal 4, Diagonal UL5).

[0227] As an example (2), the prediction mode of the luminance component is a prediction mode candidate group of the chrominance component. If it matches one of the modes, the configuration of the candidate group is the same (the modes of the candidate group remain unchanged), and if it does not match, the configuration of the candidate group is different (at least one of the modes of the candidate group is replaced).

[0228] When the configuration of the candidate group in the above example is the same, the index of the prediction mode may be the same or other indexes may be assigned. For example, when the index of the prediction mode candidate group of the chrominance component is plane 0, DC1, vertical 2, horizontal 3, diagonal UR4, when the prediction mode of the luminance component is vertical, the configuration of the prediction mode candidate group remains unchanged, and the index of each prediction mode remains unchanged. Or, other indexes may be assigned (in this example, vertical 0, horizontal 1, diagonal UL2, plane 3, DC4. It may be an example where the directional mode is located in front when the mode of the luminance component is directional mode, or an example where the non-directional mode is located in front when the luminance component is non-directional, but is not limited thereto).

[0229] When the configuration of the candidate group in the above example is different, the mode in which the index of the prediction mode remains unchanged remains unchanged, and the index of the replaced mode can be assigned to the changed mode, or the index different from the current can be assigned to multiple prediction modes.For example, when the index configuration of the prediction mode candidate group is the same as the above example, and the prediction mode of the luminance component is diagonal DL, one mode (diagonal UL in this example) of the prediction mode candidate group is replaced.In addition, the prediction mode index of the current candidate group remains unchanged.The index of the replaced mode is assigned, and the index of the newly added mode (for example, diagonal DL4) is set. Or assign other indices (in the example, diagonal DL0, plane 1, DC2, vertical (3), horizontal 4).

[0230] In the above description, an example of index resetting is shown for the purpose of allocating fewer mode bits, but this is only an example by encoding / decoding setting, and other examples may be included. If the prediction mode index remains unchanged, binarization can be performed in which a small number of bits are assigned to a small index. Alternatively, binarization can be performed in which bits are assigned regardless of the size of the index. For example, if the reset prediction mode candidate group is plane 0, DC1, vertical 2, horizontal 3, and diagonal DL4, even if a large index is assigned to the diagonal DL, it can be set to fewer mode bits than other prediction modes because it is a mode obtained from the luminance component.

[0231] The prediction mode may be a supported mode regardless of the image type. It can be determined whether the prediction mode is a supported mode based on some image types (for example, the image I type is a supported mode, but the image types P or B are not supported modes).

[0232] The contents described in the above examples are merely examples, and may have additional or modified examples. In addition, the encoding / decoding settings described in the above examples may be implicitly determined or may explicitly include related information in units of video, sequence, picture, slice, tile, etc.

[0233] (Getting predicted values ​​in the same color space vs. getting predicted values ​​in other color spaces) In the case of the intraframe prediction mode described in the above example, a prediction mode is described in which data used to generate a prediction block is obtained from adjacent areas at the same time and in the same space (e.g., extrapolation, interpolation, averaging, etc.).

[0234] It is also possible to support a prediction mode in which data used to generate a prediction block is obtained from areas in different spaces at the same time.

[0235] For example, the above example uses the correlation between color spaces to predict blocks from other color spaces. In this case, the prediction mode may be a method of obtaining the data used to generate YCbC. For example, the correlation between color spaces is Y and Cb, Y and Cr, and Cb and Cr. That is, for the color difference components Cb and Cr, the luminance corresponding to the current block can be expressed as The reconstructed block of the chrominance v s Luma is the basic component in the examples given below) or some chrominance components (Cr or Cb) The reconstructed blocks of some chrominance components (Cb or Cr) corresponding to the current block are In this case, the other color space can be generated as a prediction block of (Cr or Cb). The reconstruction block can be generated directly as the prediction block (i.e., no correction is performed). Or, the block obtained by considering the correlation between colors is generated as a predicted block. (For example, a correction is performed on the current reconstruction block. P=a*R+ In b, a and b represent the values ​​to be corrected. R and P represent various color spaces. (Represents the value obtained between and the predicted value for the current color space).

[0236] In this example, the data obtained by using the correlation between color spaces is used as a prediction for the current block. The data is used as a predicted value of the existing current block. A correction value that corrects the other color space (for example, the residual value of another color space is used as the correction value. In other words, The measured values ​​are used, and correction is performed on the predicted values. The sum of these predicted values ​​is also a predicted value. In the present invention, the former can be used as the However, the present invention is not limited to this, and may use the same correction value or a converted correction value. It is also possible.

[0237] The prediction modes may be modes that are supported regardless of the image type. For example, image type I is a supported mode, but image types P or B are Supported mode or not based on type It is also possible to determine

[0238] (Parts compared to obtain correlation information) In the above example, the correlation information between color spaces (a, b, etc.) does not explicitly include correlation information. may be either implicitly derived or may be compared to obtain correlation information. The area to be processed may be 1) a block corresponding to the current block of the chrominance component and the luminance component. Or, 2) the neighboring area of ​​the current block of the chrominance component (e.g., the left block, the upper block, It may be an area adjacent to blocks corresponding to the left upper block, the right upper block, the left lower block, etc. and the luminance component. The former is an example in the case of explicit processing, and the latter is an example in the case of implicit processing. The former is an example in the case of explicit processing, and the latter is an example in the case of implicit processing. The former is an example in the case of explicit processing, and the latter is an example in the case of implicit processing.

[0239] For example, relevant information is obtained by comparing at least one pixel value in each color space (in this case, the pixel values (Pixel Value) to be compared may be pixel values obtained from one pixel (Pixel) in each color space, or may be pixel values obtained from a plurality of pixels. It is a pixel value derived by a filtering process such as weighted averaging. That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference That is, the number of pixels referred to or used for comparing one pixel value in each color space may be one pixel vs. one pixel, one pixel vs. a plurality of pixels, etc. In this case, the former may be a color space for generating a predicted value, and the latter may be a color space used as a reference. The above example may be based on a color format. Or, one pixel value of a color component is compared with one pixel value corresponding to the luminance component in a manner independent of the color format, and one pixel value of the color difference component is filtered <a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter, etc.> for a plurality of pixels of the luminance component. Compare with the obtained pixel value, and based on the encoding / decoding setting, one of the two methods can be used. In the above, examples of color difference and luminance are described, but color difference <cb>and color difference <cr>(It may have an example of the conversion.)

[0240] In the above example, the area to be compared when implicitly obtaining related information may be the nearest pixel line of the current block of the current color component (e.g., the pixels included in p[-1,-1] to p[blk_width-1,-1], p[-1,0] to p[-1,blk_height-1]) and its corresponding pixel lines of another color space, or multiple pixel lines of the current block of the current color component (e.g., in the above case, the pixels included in multiple pixel lines including p[-2,-2] to p[blk_width-1,-2], p[-2,-1] to p[-2,blk_height-1]) and its corresponding pixel lines of another color space.

[0241] Specifically, assume that the color format is 4:2:0. To compare the pixel value of one pixel in the current color space (chrominance in this example), the pixel value of one pixel at a predetermined position (selected from the top left, top right, bottom left, and bottom right in the 2×2) in the corresponding four pixels (one pixel of the chrominance component corresponds to four pixels in the 2×2 of the luminance component) in another color space (luminance in this example) can be used. Or, to compare the pixel value of one pixel in the chromaticity space, the pixel value obtained by performing filtering on multiple pixels in the luminance space (for example, at least two pixels of the corresponding 2×2 pixels) can be used.

[0242] In short, the parameter information can be derived from the reconstructed pixels of the neighboring regions of the current block or the corresponding reconstructed pixels of other color spaces, that is, at least one parameter can be generated based on the related information (e.g., a or b, a1, b1 or a2, b2, etc.), and may be a value that is multiplied or added with the reconstructed block in other color spaces (e.g., a, a1, a2 / b, b1, b2).

[0243] In this case, the comparison process can be performed after checking the availability of the pixels compared in the above example. For example, if the neighboring region is available, it can be acted on the pixel being compared. If the neighboring region is unavailable, it may be determined by the encoding / decoding settings. For example, if a pixel in the neighboring region is unavailable, it can be excluded in the process of obtaining the color space correlation information. Or, the unavailable region can be padded before being included in the comparison process. This may be determined by the encoding / decoding settings.

[0244] For example, it may be an example where a region including pixels of at least one color space is unavailable when it is excluded in the process of obtaining correlation information between color spaces. More specifically, it may be an example where pixels of two color spaces are unavailable or pixels of two color spaces are unavailable. This may be determined by the encoding / decoding settings.

[0245] Alternatively, in the unavailable regions, after padding the data for comparison (or an operation similar to the reference pixel padding process), various padding methods can be used when performing a process to obtain correlation information between color spaces. For example, it can be padded with a predetermined pixel value (e.g., the midpoint of the bit depth 1<<(bit_depth-1), the minimum and maximum values ​​of the actual pixels of the image, the average value of the actual pixels of the image, the midpoint, etc.), or it can be padded with a value obtained by performing filtering (an operation similar to the reference pixel filtering process) on the neighboring pixels or neighboring pixels. Alternatively, other methods may be used.

[0246] FIG. 10 shows an example of comparing pixels between color spaces to obtain correlation information. For ease of explanation, assume that a 4:4:4 color format is used. The subsequent process (i.e., the conversion process by the component ratio) is performed based on the component ratio of the batch. explain.

[0247] R0 represents an example where both color space regions can be used. Since these are regions where the pixels are available, the pixels in the corresponding regions are used to obtain relevant information in the comparison hypothesis. It is possible.

[0248] R1 represents an example where one of the color space regions on either side is unavailable (in this example, The adjacent spaces of the current color space are available, and the corresponding areas of other color spaces are unavailable. (The unusable area is padded in various ways, and then the unusable area is compared. It can be used in the process.

[0249] R2 represents an example where one of the color space regions on either side is unavailable (in this example, Adjacent areas of the color space are not available, whereas corresponding areas of other color spaces are available. Because there are unusable areas on one side, the comparison process is limited to two color spaces. The area cannot be used.

[0250] R3 represents an example where neither of the two color space regions can be used. Pad out the impossible areas, so that they can be used in the comparison process.

[0251] R4 represents an example where neither of the color space regions on either side can be used. Since there are areas that cannot be used, the comparison process uses the areas corresponding to the color spaces on both sides. It cannot be used.

[0252] Also, unlike FIG. 10, the adjacent area of ​​the current block or the area corresponding to another color space If neither is available, various configurations can be made.

[0253] As an example, a and b may be assigned predetermined values ​​(in this example, a is 1 and b is 0). In this case, it may mean to keep one mode. This mode uses the prediction block of the current block to pad the data of another color space. In this case, when performing prediction mode encoding / decoding, The occurrence (or selection) probability or priority may be set differently than in the current case (e.g. For example, the selection probability is considered to be a low probability or the priority is set to a low priority. If the prediction mode is selected, the correlation information is low in accuracy, so the prediction block obtained by the prediction mode is The accuracy of the prediction mode may be extremely low. (This is not possible.)

[0254] For example, there is no data to compare with, so the current block’s predicted block is may not support the mode that pads the data of the color space. This mode is supported if there is at least one available region. In this case, when performing prediction mode encoding / decoding, the mode may be replaced by another mode. In the former case, the number of prediction mode candidate groups is maintained, and the former case does not allow the change of the prediction mode candidate groups. The latter is a setting in which the number of prediction mode candidate groups is reduced. Good too.

[0255] The conversion is not limited to the above examples, and may include various other examples.

[0256] In the above example, if the area is not available, the encoding / decoding has not been completed. If the object is not in the image (e.g., picture, slice, tile, etc.) boundary, it is outside the image boundary (i.e., The current block and the region are not included in the same image. Also, the encoding / decoding settings (for example, constrained_intra_pred_flag, etc.) For example, for P or B slice / type, the unavailable ones can be added based on when the above flag is 1 and the coding mode of the corresponding region is Inter).

[0257] In the example described below, the above-mentioned limitation may occur when generating a prediction block of a current block using reconstruction data of another color space after obtaining related information by comparing color spaces, that is, as described above, when the area of ​​another color space corresponding to the current block is unavailable, the use of the mode may be limited or unavailable.

[0258] The parameter representing the correlation information between color spaces obtained by the above process and the reconstruction data of the other color space corresponding to the current block can be used to generate a predicted value of the current block. In this case, the reconstruction data of the other color space used to predict the current block can be a pixel value of a pixel at a predetermined position or a pixel value obtained by a filtering process.

[0259] For example, in the case of 4:4:4, a pixel value corresponding to a pixel in the luminance space can be used to generate a predictive value of one pixel in the chromaticity space. Alternatively, a pixel value obtained by performing filtering on a plurality of pixels (e.g., pixels located in the left, right, up, down, top left, top right, bottom left, bottom right, etc. directions with the corresponding pixel as the center. For example, when using 5-tap and 7-tap filters, it may be understood that there are two and three pixels on the left, right, up, and down, respectively, with the corresponding pixel as the center) can be used to generate a predicted value of one pixel in the chromaticity space.

[0260] For example, in the case of 4:2:0, a pixel value of one pixel at a predetermined position (selected from the upper left, upper right, lower left, and lower right) in four corresponding pixels in the luminance space (one pixel of the chrominance component corresponds to 2×2 pixels of the luminance component) can be used to generate a predicted value of one pixel in the chromaticity space. Alternatively, a pixel value obtained by performing filtering on a plurality of pixels in the luminance space (for example, at least two pixels of the corresponding 2×2 pixels, or pixels located in directions such as left, right, upper, lower, upper left, upper right, lower left, and lower right with the 2×2 pixel as the center) can be used to generate a predicted value of one pixel in the chromaticity space.

[0261] In essence, by applying (e.g. multiplying or adding) the parameters representing the correlation information obtained by the above process to pixel values ​​obtained in another color space, a pixel value can be obtained and used as a predicted value for the pixel in the current color space.

[0262] In the above examples, some color formats, some pixel value acquisition processes, etc. are described, but the present invention is not limited thereto, and the same examples or modified examples can be used in other cases.

[0263] The contents described in (Obtaining predictions in the same color space vs. obtaining predictions in different color spaces) are applicable to fixed vs. variable candidate group configurations. For example, the candidate groups may include a replacement mode for predictions when predictions cannot be obtained in the other color space.

[0264] According to the above example, in the case of the above prediction mode, related information (for example, information on whether it is supported, parameter information, etc.) may be included for each image, sequence, picture, slice, and tile.

[0265] In short, the method (the above method is a method for obtaining data used to generate a prediction block from adjacent areas in the same space at the same time based on the encoding / decoding settings) The prediction modes (mode A) involved in the prediction are grouped into a prediction mode candidate group. In addition to the mode, the prediction mode candidate group is also determined by the method (the above method is for the same time, different space (a method for obtaining data used to generate a predicted block from a region in It may also include a prediction mode (B_mode).

[0266] In the above example, the prediction mode candidate group is constructed using only mode A or only mode B. In addition, by using Mode A and Mode B together, the prediction mode candidate group can be created. In addition, the setting information related to the prediction mode candidate group configuration can be specified. Alternatively, the information regarding the prediction mode candidate group configuration can be implicitly determined in advance. It can be determined.

[0267] For example, regardless of some encoding / decoding settings (in this example, image type), They may have the same configuration, or may have a single configuration based on some encoding / decoding settings. (For example, in the I image type, mode A, mode B_1 <color mode>, The prediction mode candidate group is configured with mode B_2 <color copy mode>, and the P image type is In this case, a prediction mode candidate group is formed by mode A and mode B_1, and in the B image type, In this case, mode A and mode B_2 form a prediction mode candidate group, etc.

[0268] In the present invention, the prediction mode candidate group for the luminance component is as shown in FIG. The prediction mode candidate groups for the color difference components are the horizontal, vertical, and diagonal modes (see FIG. Plane in 9, DC, Color Mode 1, Color Mode 2, Color Mode 3, Color Copy -mode 1, color copy mode 2, adjacent block mode 1 (left block), adjacent mode 2 (upper block)) will be described as an example, but various other prediction mode candidates It may have a group structure.

[0269] In the image coding method according to the embodiment of the present invention, the intra-frame prediction is configured as follows: The intra-frame prediction of the prediction unit may include a reference pixel arrangement step, a predicted block generation step, and a The method may include a prediction mode determination step and a prediction mode coding step. The image encoding device includes a reference image arrangement step, a prediction block generation step, a prediction mode A reference pixel arrangement unit for implementing the determination step and the prediction mode encoding step, The process may be configured to include a block generation unit and a prediction mode coding unit. Some steps may be omitted, others may be added, and the steps may be performed in a different order than the above. The transformation may be performed in another order.

[0270] In the image decoding method according to the embodiment of the present invention, the intra-frame prediction is performed as follows: The intra-frame prediction of the prediction unit may include a prediction mode decoding step, a reference pixel arrangement step, and a The image decoding device may include a prediction block generating step and a prediction block generating step. In order to realize the code decoding step, the reference pixel arrangement step, and the prediction block generation step, The prediction mode decoding unit, the reference pixel arrangement unit, and the prediction block generation unit may be configured to include the above. Some steps in the above process may be omitted and other steps may be added. Alternatively, the order may be changed to another order other than the above order.

[0271] In the step of generating the predicted block, the current block (e.g., the coding block) is It is possible to perform intra-frame prediction on a per-frame basis (such as a block, predicted block, or transformed block). Alternatively, intra-frame prediction can be performed in units of a predetermined sub-block. For this purpose, the current block is divided into sub-blocks and an intra-frame prediction is performed. The flag can be encoded by the encoding device to If the flag is a first value, the current block may be divided into multiple sub-blocks. Otherwise, the current block is not divided into multiple sub-blocks. This splitting may be an additional splitting performed after the tree-structure based splitting described above. Sub-blocks belonging to a current block may share one intra-frame prediction mode but may place different reference pixels for each sub-block, or the sub-blocks may use the same intra-frame prediction mode and reference pixels, or the sub-blocks may use the same reference pixels but different intra-frame prediction modes for each sub-block.

[0272] The division may be performed in the vertical or horizontal direction. The division direction may be determined based on a flag signaled from the encoding device. For example, if the flag is a first value, the division may be performed in the horizontal direction. Otherwise, the division may be performed in the vertical direction. Alternatively, the division direction may be determined based on the size of the current block. For example, if the height of the current block is greater than a predetermined threshold, the division may be performed in the horizontal direction. Also, if the width of the current block is greater than a predetermined threshold, the division may be performed in the vertical direction. Here, the threshold may be a fixed value predefined in the encoding / decoding device. Alternatively, the threshold may be determined based on information related to block size (e.g., the size of the maximum transform block, the size of the maximum coding block, etc.). The information related to the block size may be signaled at at least one level of a sequence, a picture, a slice, a tile, a brick, or a CTU row.

[0273] The number of sub-blocks can be variably determined according to the size, shape, division depth, intra-frame prediction mode, etc. of the current block. For example, if the current block is 4×8 or 8×4, the current block may be divided into two sub-blocks. Or, if the current block is 8×8 or more, the current block may be divided into four sub-blocks.

[0274] In the present invention, the encoder will be mainly described, and a detailed description of the decoder will be omitted since it can be derived based on the operation of the encoder.

[0275] 11 is a schematic diagram showing a reference pixel arrangement used for intra-frame prediction. It will be taken as an example that the size and shape (M×N) of the current block used for prediction is obtained from the divided block unit, and intra-frame prediction can be supported within the range of 4×4 to 128×128. In general, intra-frame prediction can be performed in a prediction block unit, but intra-frame prediction can be performed in units of coding blocks or transform blocks based on the setting of the division block unit. After checking the block information, the reference pixel arrangement unit can arrange reference pixels to be used in predicting the current block. In this case, a temporary memory (e.g., an array <array>The reference pixels can be managed by a plurality of arrays (such as a main array, a main array, or a sub-array). In each intra-frame prediction process of the block, the reference pixels are generated and deleted. The capacity of the temporary memory may be determined according to the arrangement of the reference pixels.

[0276] In this example, the left block, the upper block, the upper left block, the right block, and the lower left block are used for predicting the current block, but are not limited thereto. Block candidate groups having other configurations can be used for predicting the current block. For example, the candidate group of neighboring blocks for the reference pixels may be an example of a raster or Z scan. In addition, some of the candidate groups may be removed according to the scan order, or other block candidate groups (for example, an upper block, a lower block, a lower right block, etc. may be additionally arranged) may be included.

[0277] Alternatively, a block corresponding to the current block in another color space (e.g., if the current block belongs to Cr, the other color space corresponds to Y or Cb) (e.g., if they have the same coordinates or corresponding coordinates based on the composition ratio of color components in each color space) is used to predict the current block. Also, for ease of explanation, the predetermined positions (left, top, top left, As an example, we will explain how to configure one block by dividing the two parts into two parts (upper right, lower left). There may be at least one block, i.e., at the given location, There may be multiple sub-blocks obtained by dividing a block.

[0278] In other words, the neighboring regions of the current block are the reference regions used for the intra-frame prediction of the current block. Also, based on the prediction mode, the current block in the other color space may be the position of the reference pixel. It is also possible to consider the area corresponding to the lock as the position of the reference pixel. Thus, the positions of reference pixels defined based on the prediction mode, method, etc. can be determined. For example, when generating a prediction block using a method such as block matching, the reference pixel The position of the current block in the current image is the area where the previous coding / decoding was completed or the coding / decoding The area included in the search range in the completed area (for example, the left side, top, side, upper left side or upper right side, etc.

[0279] As shown in FIG. 11, the reference pixels used for predicting the current block are the left block, the top block, 11, the neighboring pixels in the upper left block, upper right block, and lower left block (Ref _L, Ref_T, Ref_TL, Ref_TR, Ref_BL). In this case, the reference pixel is generally the pixel of the neighboring block that is closest to the current block (see Fig. 11a), but may include other pixels (FIG. 11b and other outlined pixels). That is, the first pixel line a adjacent to the current block, the second pixel line a adjacent to the first pixel line, A pixel line b, a third pixel line adjacent to the second pixel line, or a fourth pixel line adjacent to the third pixel line At least one of the four pixel lines can be used. For example, the encoding / decoding settings According to the determination, the plurality of pixel lines may include all of the first to fourth pixel lines; may include other pixel lines other than the third pixel line, or the plurality of pixel lines may include , it may include only the first pixel line and the fourth pixel line.

[0280] The current block is framed by selectively referring to one of the multiple pixel lines. In this case, intra prediction can be performed using the inter-frame signaled by the encoder. The selection can be performed based on the current block index (refIdx). The size, shape, and division type of the block, and whether the intra-frame prediction mode is non-directional , based on the angle of the intraframe prediction mode, etc., any one of the multiple pixel lines For example, the intra-frame prediction mode can be a planar mode or a DC mode. If the current block size (width) is 1, only the first pixel line may be used. If the pixel height is less than or equal to a certain threshold, only the first pixel line may be used. When the intra-frame prediction mode is greater than a predetermined threshold angle (or less than a predetermined threshold angle) Alternatively, only the first pixel line may be used. It may be the angle of an intra-frame prediction mode corresponding to mode 2 or mode 66.

[0281] In addition, the pixels adjacent to the current block may be classified into at least one reference pixel layer. The pixel closest to the current block is ref_0 (the pixel value of the boundary pixel of the current block). Pixels whose difference from p(-1,-1) is 1. The pixel value of the next adjacent pixel (p(-1, 2n-1)) is the pixel value of the boundary pixel of the current block. The difference is 2. p(-2,-2) to p(2m,-2), p(-2,-1) to p(-2 , 2n)) is ref_1. The next adjacent pixel (the pixel value of the boundary pixel of the current block) The difference is 3. p(-3,-3) to p(2m+1,-3), p(-3,-2) to p( -3, 2n+1) is ref_2, etc. That is, the reference pixels are the boundaries of the current block. A pixel may be classified into multiple reference pixel layers based on the distance of its neighboring pixels.

[0282] In addition, it is possible to set different reference pixel layers for each adjacent block. For example, if the current block and the block adjacent to the top edge are used as reference blocks, Reference pixels from layer ref_0 can be used, and when the block adjacent to the upper end is used as the reference block, reference pixels from layer ref_1 can be used.

[0283] In this case, generally, the reference pixel set referred to when performing intraframe prediction belongs to a neighboring block adjacent to the current block. The neighboring blocks are pixels located at the lower left, left, upper left, upper end, and upper right end, and belong to layer ref_0 (pixels closest to the boundary pixels). Unless otherwise specified, these pixels are considered to be the pixels. However, only some pixels belonging to the neighboring blocks can be used as the reference pixel set. Or, pixels belonging to two or more layers can be used as the reference pixel set. Here, the reference pixel set or layer can be implicitly determined (pre-set in the encoding / decoding device) or explicitly determined (information for the determination can be received from the encoding device).

[0284] Here, the maximum number of supported reference pixel layers is described as 3 as an example, but may have a value greater than this number. The number of reference pixel layers and the number of reference pixel sets (which may also be called reference pixel candidate groups) according to the positions of referenceable neighboring blocks may be set differently based on the size, shape, prediction mode, image type (I / P / B, in this case, image is a picture, slice, tile, etc.), color component, etc. of the block, and may also be included in the related information in units of sequence, picture, slice, and tile.

[0285] The present invention will be described by way of example in which a low index (increasing by 1 from 0) is assigned from the reference pixel layer closest to the current block, but the present invention is not limited thereto. In addition, by using the above index setting (when selecting one of a plurality of reference pixel sets, binarization in which a short bit is assigned to a low index, etc.), it is possible to generate information related to the reference pixel arrangement described below.

[0286] In addition, when two or more reference pixel layers are supported, each reference pixel included in the two or more reference pixel layers can be used for weighted averaging.

[0287] For example, a prediction block can be generated using reference pixels. The reference pixels are obtained from a weighted sum of pixels in layer ref_0 (nearest pixel layer) and layer ref_1 (next pixel layer) in FIG. 11. In this case, the pixels to which the weighted sum is applied in each reference pixel layer based on a prediction mode (e.g., a directional prediction mode) may be integer pixels or decimal pixels. Also, a weight value (e.g., 7:1, 3:1, 2:1, 1:1) is applied to a prediction block obtained by using reference pixels of a first reference pixel layer and a prediction block obtained by using reference pixels of a second reference pixel layer, respectively, to obtain one prediction block. In this case, a prediction block by a reference pixel layer adjacent to the current block may have a higher weight value.

[0288] Generally, in the above example, the nearest pixels of the adjacent block can be used as reference pixels, but are not limited thereto. For example, various numbers may be used (for example, ref_0 and ref_1 are selected as reference pixel layers, and a predicted pixel value is generated by performing a method such as weighted addition by ref_0 and ref_1, that is, the implicit case).

[0289] In addition, the information related to the reference pixel arrangement (e.g., selection information related to the reference pixel layer or set, etc.) may not include predetermined information (e.g., when the reference pixel layer is preset as ref_0). For example, the reference pixel layer may be arranged as ref_1, ref_2, ref_3, etc., but is not limited thereto.

[0290] The above example describes the reference pixel arrangement, but this can be combined with various encoding / decoding information to determine the intraframe prediction setting. In this case, the encoding / decoding information is Image type, color components, size and shape of the current block, prediction mode (type of prediction mode The prediction mode includes the following: Also, the encoding / decoding information of the neighboring blocks and the encoding / decoding information of the current block and the neighboring blocks are By combining the information, the intra-frame prediction setting (in this example, the reference pixel arrangement setting ) can be determined.

[0291] FIG. 12 is a schematic diagram showing a reference pixel range used in intra-frame prediction. The reference pixel range is determined by the block size, shape, and prediction mode configuration (in this example, the prediction mode The position indicated by the arrow in FIG. The position is the pixel used for prediction.

[0292] Referring to FIG. 12, the A, A', B, B', and C pixels are 8×2, 2×8, 8×4, 4× 8, refers to the pixel located at the bottom right corner of the 8x8 block. To perform prediction of this pixel, The pixels AT, AL, BT, BL, CT, and CL used in the upper and left blocks The reference pixel range of the block can be confirmed.

[0293] For example, if the reference pixels are A and A' pixels (rectangular block), p(0,-1) to It is in the range of p(9,-1), p(-1,0) to p(-1,9), p(-1,-1) If the reference pixels are B and B' pixels (rectangular block), p(0,-1) to p(11 ,-1), p(-1,0) to p(-1,11), p(-1,-1). If the target pixel is a C pixel (square block), then p(0,-1) to p(15,-1), It is in the range p(-1,0) to p(-1,15) to p(-1,-1).

[0294] The range information of the reference pixels obtained in the above process (e.g., P(-1,-1), P(M+N -1,-1), P(-1,N+M-1), etc., are used for the intraframe prediction process (e.g., reference pixel It can be used in the process of filtering, predictive pixel generation, etc. The case of porting is not limited to the above, and may include other cases.

[0295] The reference pixel arrangement unit for intra-frame prediction is composed of a reference pixel generation unit, a reference pixel interpolation unit, and a reference pixel filter unit. The image forming apparatus may be provided with a filter unit, etc., or may be provided with all or part of the above configuration.

[0296] The reference pixel allocation unit checks the availability of reference pixels and A classification can be made for available and unavailable reference pixels. For example, If a block (or a reference pixel candidate block) at a given location is available, the corresponding block If the block cannot be used, the block is used as a reference pixel. It cannot be used as a pixel.

[0297] If at least one of the following conditions is met, the reference pixel is determined to be unavailable: For example, it may be located outside the picture boundary, or may not belong to the same division unit as the current block (e.g., slice, tile, etc.), encoding / decoding is not complete, If any one of the following conditions is met, the use of the service will be restricted depending on the encryption / decryption settings. In other words, if the above conditions are not met, it is determined that the device is available. .

[0298] Also, the use of reference pixels is limited to the encoding / decoding settings. For example, Perform intra-frame prediction (e.g., constrained_intra_pred_flag) The use of reference pixels can be restricted based on whether or not the device is connected to the Internet. When performing error-robust coding / decoding against external factors, the image is referenced from other images. When trying to prohibit the use of reconstructed blocks as reference pixels, Intra-frame prediction can be performed.

[0299] When the limited intra prediction is deactivated (e.g., constrained_intra_pred_flag=0 in I picture type or P or B picture type), all reference pixel candidate blocks are available. When it is activated (e.g., constrained_intra_pred_flag=1 in P or B picture type), it is possible to determine whether to use the reference pixels of the corresponding block based on the coding mode (intraframe or interframe) of the reference pixel candidate block. That is, if the coding mode of a block is Intra, the block can be used regardless of whether the limited intra prediction is activated. In the case of Inter, it is determined whether the limited intra prediction is available (deactivated) or unavailable (activated) based on whether it is activated.

[0300] Also, limited intraframe prediction can be applied based on the coding mode of a reconstructed block corresponding to the current block in another color space. For example, the current block belongs to some chrominance components Cb and Cr. Also, availability can be determined based on the coding mode of a block that has completed encoding / decoding of a luminance component Y corresponding to the current block. The above example may be an example in which a reconstructed block in another color space is used as a reference pixel. Also, an example in which the coding mode is independently determined based on the color space may be used.

[0301] In this case, when the reference pixel candidate block completes encoding / decoding using some prediction method (e.g., prediction is performed by block matching or template matching in the current image), it can be determined whether to use the reference pixel based on the encoding / decoding settings.

[0302] For example, when encoding / decoding is performed using the prediction method, it can be determined that the corresponding block is available when the coding mode is Intra, or it can be allowed to accept a special case where the corresponding block is unavailable even if it is Intra.

[0303] For example, when encoding / decoding is performed using the prediction method, if the encoding mode is set to Inter, it can be determined that the corresponding block is unavailable. Or, even if the encoding mode is Inter, a special case in which the corresponding block is available can be allowed.

[0304] That is, based on the encoding / decoding settings, it is possible to decide whether to make exceptions to what is available depending on the encoding mode.

[0305] Limited intra prediction may be a setting that applies to some image types (eg, P or B slice / tile types, etc.).

[0306] According to the availability of reference pixels, the reference pixel candidate blocks can be classified as follows: all reference pixel candidate blocks are available, some reference pixels are available, and none of the reference pixels are available. In all other cases except when all reference pixel candidate blocks are available, the unavailable reference pixels at the candidate block positions can be padded or generated.

[0307] If a reference pixel candidate block is available, a pixel at a given position of the block (assuming in this example that the pixel is adjacent to the current block) can be stored in the reference pixel memory of the current block, in which case the pixel data at the corresponding block position can be stored in the reference pixel memory by a process such as direct copy or reference pixel filtering.

[0308] If the reference pixel candidate block is not available, the reference pixel generation process The resulting pixels can be stored in the reference pixel memory of the current block.

[0309] In short, when a reference pixel candidate block is available, the reference pixel is arranged. If the reference pixel candidate block is unavailable, the reference pixel generating It is possible.

[0310] Below are examples of padding reference pixels at unavailable block positions in various ways. vinegar.

[0311] For example, a reference pixel can be generated with an arbitrary pixel value. It may also be a pixel value that belongs to a range (e.g., a pixel value adjustment process based on bit depth). or pixel value adjustment process based on pixel value range information of the image, such as minimum, maximum, and median values In detail, this is the value derived from all the reference pixel candidate blocks. This may be an application example where the above-mentioned method is not available.

[0312] Or, reference pixels can be generated from an image that has completed encoding / decoding. Generate reference pixels from at least one available block adjacent to the unavailable block. In this case, it is possible to construct a new model by using at least one of the following methods: extrapolation, interpolation, copying, etc. The reference pixel generation (or copy, extrapolation) direction can be clockwise or counterclockwise. It may be clockwise or may depend on the encoding / decoding settings. The reference pixel generation direction within a block may be along a predetermined direction or along an unavailable block. Or, in other color spaces, For the area corresponding to the current block, a method similar to the above example can be used. The padding of the neighboring reference pixels of the current block in the current color space is as follows: If the process is the same, then in other color spaces, the block M×N corresponding to the current block m×n is Therefore, various other methods including the above method (e.g., Pla Extrapolation of surrounding pixels in vertical, horizontal, diagonal, etc. directions, such as nar interpolation, averaging, etc. In this case, the padding direction is from the surrounding pixels of the block corresponding to the current block to the block (pointing toward the inside of the image) can generate a corresponding region. A prediction mode for generating a prediction block from the spatial region is not excluded from the candidate group. It may be an example of including it in the candidate group.

[0313] In addition, after completing the placement of the reference pixels through the process of checking the availability of the reference pixels, A reference pixel can be generated by linearly interpolating the reference pixels. After the filtering process is performed, the reference pixel interpolation process can be performed. Alternatively, the filtering process can be performed only on the located reference pixels. In short, it can be performed before the prediction block generation process.

[0314] In this case, horizontal, vertical, and some diagonal modes (e.g. diagonal right down, diagonal left down, diagonal In the case of non-directional mode, color mode, color copy mode, etc., the interpolation process No. For other modes (other diagonal modes), interpolation can be performed.

[0315] Supported prediction mode candidate groups (or total number of prediction modes), prediction mode setting ( For example, the interpolation accuracy is determined based on the prediction mode direction angle, prediction mode interval, etc. can be done.

[0316] For fractional reference pixel interpolation, one predefined filter (e.g., 2-tap linear interpolation) is used. filter) can be used, and one of multiple filter candidate groups (e.g., 4 The following filters can be used: tap cubic filter, 4-tap Gaussian filter, 6-tap Wiener filter, 8-tap Kalman filter.

[0317] When one of multiple filter candidate groups is used, the filter selection information may be explicitly generated or may be implicitly determined and may depend on the encoding / decoding settings (e.g., interpolation accuracy, block size, shape, prediction mode, etc.).

[0318] For example, the interpolation filter to be used can be determined based on a range of block sizes, the interpolation filter to be used can be determined based on the interpolation accuracy, and the interpolation filter can be determined based on the characteristics of the prediction mode (e.g., directional information, etc.).

[0319] Specifically, according to the block size range, a predetermined interpolation filter a is used in range A, a predetermined interpolation filter b is used in range B, an interpolation filter c among a plurality of interpolation filters C is used in range C, an interpolation filter d among a plurality of interpolation filters D is used in range D, a predetermined interpolation filter is used in some h, and one of a plurality of interpolation filters can be used in some ranges. In this case, using one interpolation filter belongs to the implicit case, and using one of the plurality of interpolation filters belongs to the explicit case. The size of the block for which division is performed for the block size range may be M×N (in this example, M and N are 4, 8, 16, 32, 64, 128, etc. That is, M and N may be the minimum or maximum value of each block size range).

[0320] The interpolation related information may be included in units of a video, a sequence, a picture, a slice, a tile, a block, etc. The interpolation process may be a process performed by a reference pixel placement unit, or may be a process performed by a prediction block generation unit.

[0321] In addition, after arranging the reference pixels, filtering is performed on the reference pixels. This improves prediction accuracy by reducing degradation remaining after the encoding / decoding process. In this case, the filter used may be a low-pass filter. Whether or not filtering is applied can be determined based on the encoding / decoding settings. If filtering is applied, fixed filtering or self-adaptive filtering can be applied. In addition, encoding / decoding settings can be defined based on the size, shape, prediction mode, etc. of the block.

[0322] Fixed filtering refers to the application of a predetermined filter to the reference pixel filter section. Self-adaptive filtering refers to applying one of a plurality of filters to the reference pixel filter unit. In this case, the self-adaptive filtering can implicitly determine one of a plurality of filters based on the encoding / decoding setting or can explicitly generate the selection information. The filter candidate group may include a 3-tap (e.g., [1,2,1] / 4) or 5-tap (e.g., [2,3,6,3,2]) filter, etc.

[0323] As an example, in some settings (block range A), no filtering may be applied.

[0324] As an example, in some settings (block range B, some modes C), no filtering may be applied, and in some settings (block range B, some modes D), filtering may be applied using a predefined filter (3-tap filter).

[0325] For example, in some settings (block range E, some modes F) it may not be applied, and in some settings (block range E, some modes G) a given filter (3 types) may be applied. You can apply filtering using several settings (block In the range E and some modes H, the filter is filtered by a given filter (5-tap filter). In some settings (block range E, some modes I), You can select one of several filters to perform the filtering.

[0326] As an example, for some settings (block range J, some mode K), a given filter (5-tap filter) can be used to apply filtering, and a predefined filter can be used. Further filtering can be applied using a 3-tap filter, i.e. Multiple filtering processes can be performed. For more information, see Pre-filtering. Further filtering can be applied based on the results.

[0327] In the above example, the size of the blocks to be divided for the block size range is MxN (In this example, M and N may be 4, 8, 16, 32, 64, 128, etc. That is, M and N may be the minimum or maximum values ​​of each block size range. In addition, the prediction mode can be set to directional mode, non-directional mode, color mode, or color copy mode. In addition, the horizontal or vertical mode / diagonal mode can be roughly classified as Mode (45 degree interval) / Mode 1 adjacent to horizontal or vertical mode, Mode 2 adjacent to horizontal or vertical mode Mode 2 (the mode interval is slightly longer than the previous mode interval), etc. As mentioned above, depending on the classification mode, you can choose whether to apply filtering or not. The type of tag can be determined.

[0328] Also, in the above example, the automatic estimation is performed based on multiple factors such as block range, prediction mode, etc. However, the above factors are not always necessary. In addition, the self-adaptive filter may be based on at least one factor. In addition, the present invention is not limited to the above examples, and may include various conversion examples. It is possible to refer to a video, sequence, picture, slice, tile, or block as a unit. The pixel filter may include related information.

[0329] The filtering can be selectively performed based on a predetermined flag. The flag indicates whether to filter the reference pixels and perform intra-frame prediction. The flag may be signaled by encoding the flag by an encoding device, or Based on the coding parameters of the current block, the decoder can derive the flag. The coding parameters include the location / area of ​​the reference pixel, the block size, the component type, At least one of intraframe prediction and intraframe prediction mode in subblock units This may include whether one applies.

[0330] For example, if the reference pixel of the current block is the first pixel line adjacent to the current block, , filtering can be performed on the reference pixels. Otherwise, Or, if the number of pixels belonging to the current block is If it is greater than a certain threshold, filtering can be performed on the reference pixels. If not, filtering may not be performed on the reference pixels. The value may be a value previously agreed upon by the encoding / decoding device, or may be 16, 32, 64 or a larger value. Alternatively, if the size of the current block is greater than a certain threshold, the reference block may be Filtering can be performed on the pixels. Otherwise, on the reference pixels. The threshold may be expressed as M×N, and the encoding / decoding M and N are integers of 8, 16, 32 or larger. The number threshold or the size threshold may be one of the number threshold or the size threshold or Even if the combination of these is set to perform filtering on the reference pixels, Or, if the current block is a luminance component, perform filtering on the reference pixels. Otherwise, filtering may not be performed on the reference pixels. Alternatively, if the current block does not perform the intra-frame prediction in sub-block units (i.e., the current block is not divided into a plurality of sub-blocks), filtering may be performed on the reference pixels. Otherwise, filtering may not be performed on the reference pixels. Alternatively, if the intra-frame prediction mode of the current block is a non-directional mode or a predetermined directional mode, filtering may be performed on the reference pixels. Otherwise, filtering may not be performed on the reference pixels. Here, the non-directional mode may be a planar mode or a DC mode. However, filtering of the reference pixels may be limited to be performed in the DC mode of the non-directional mode. The directional mode may represent an intra-frame prediction mode that refers to integer pixels. For example, the directional mode may include at least one of the intra-frame prediction modes corresponding to modes -14, -12, -10, -6, 2, 18, 34, 50, 66, 72, 78, and 80 shown in FIG. 9. However, the directional mode may be limited not to include the horizontal mode and the vertical mode corresponding to modes 18 and 50, respectively.

[0331] When filtering is performed on a reference pixel based on the flag, filtering can be performed by a filter defined in advance in the encoding / decoding device. The number of taps of the filter may be 1, 2, 3, 4, 5, or a larger number. Based on the position of the reference pixel, the number of filter taps can be variably determined. For example, a 1-tap filter can be applied to a reference pixel corresponding to at least one of the lowermost end, uppermost end, leftmost side, and rightmost side of a pixel line, and a 3-tap filter can be applied to the remaining reference pixels. Also, based on the position of the reference pixel, the filter strength can be variably determined. For example, a filtering strength s1 can be applied to a reference pixel corresponding to at least one of the lowermost end, uppermost end, leftmost side, and rightmost side of a pixel line, and a filtering strength s2 (s1 < s2) can be applied to the remaining reference pixels. The filter strength may be signaled from the encoding device or may be determined by the above encoding parameters. When applying an n-tap filter to a reference pixel, the filter can be applied to the current reference pixel and (n - 1) surrounding reference pixels. The surrounding reference pixels can represent pixels in at least one direction of the upper end, lower end, left side, or right side of the current reference pixel. The surrounding reference pixels may belong to the same pixel line as the current reference pixel, and a part of the surrounding reference pixels may belong to a pixel line different from the current reference pixel.

[0332] For example, when the current reference pixel is located on the left side of the current block, the surrounding reference pixels may be adjacent pixels in at least the upper or lower direction of the current reference pixel. Or, when the current reference pixel is located on the upper end of the current block, the surrounding reference pixels may be adjacent pixels in at least one of the left and right directions of the current reference pixel. Or, when the current reference pixel is located at the upper left end of the current block, the surrounding reference pixels may be adjacent pixels in at least one of the lower or right directions of the current reference pixel. The ratio of the coefficients of the filter may be [1:2:1], [1:3:1], or [1:4:1].

[0333] The prediction block generator generates a prediction block based on at least one prediction mode, and can use reference pixels based on an intra-frame prediction mode. In this case, the reference pixels may be used in a method such as extrapolation (directional mode) based on the prediction mode, or may be used in a method such as interpolation, DC, or copy (non-directional mode). Also, as described above, the current block can use filtered or unfiltered reference pixels.

[0334] FIG. 13 is a diagram showing blocks adjacent to a current block involved in generating a predicted block.

[0335] For example, in the case of directional modes, there are horizontal modes and some diagonal modes (diagonal top right. Horizontal (including non-diagonal lines) and the mode of the bottom left block + left block (Ref_ in Figure 13 In horizontal mode, the left block can be used. In horizontal and vertical modes, the left block + top left block + top block (in Fig. 13) In vertical mode, the upper block can be used. A vertical and some diagonal modes can be used. In the mode with the top block + top right block (diagonal left bottom. Includes diagonals other than vertical), 13) can be used as reference pixels. In directional mode, the left block and the top block (Ref_L, Ref_T in FIG. 13) Or the reference pixels in the lower left block, left block, upper left block, upper block, and upper right block ( Ref_BL, Ref_L, Ref_TL, Ref_T, Ref_TR in Figure 13) Or, in the case of a color space correlation mode (color copy mode), other A restoration block of the color space of Ref_Col (not shown in FIG. 12, but in the present invention, It is called "parallel reference of blocks in different spaces at the same time" (Collocated reference , which represents the approximation (i.e., the difference between the pixel values) can be used as reference pixels.

[0336] The reference pixels used in intra-frame prediction may be divided into several concepts. The reference pixels used in intra-frame prediction are classified as first and second reference pixels. The first reference pixel may be a pixel directly used in generating a predicted value of the current block. The second reference pixel may be a pixel indirectly used in generating a predicted value of the current block. Alternatively, the first reference pixel may be used to generate the prediction values ​​of all pixels of the current block. The second reference pixel may be a pixel used to generate a predicted value of a part of pixels in the current block. Alternatively, the first reference pixel may be a pixel that is used to generate the primary predictor of the current block. The second reference pixel may be a pixel used in generating an auxiliary prediction value of the current block. Alternatively, the first reference pixel (unconditional) may be a pixel used in the construction of the current block. The second reference pixel may be a pixel located in the region of the starting point of the prediction direction. The pixel may not be located at the starting point of the (required) prediction direction.

[0337] As shown in the above example, the reference images can be divided by various definitions, but based on the prediction mode, In some cases, the definition is not differentiated. varies depending on the prediction mode.

[0338] The reference pixels described in the above example may be the first reference image. can further participate in the generation of the prediction block. . In the mode between the top left block + top block + top right block (including diagonals other than horizontal), The reference pixels Ref_TL, Ref_T, and Ref_TR in FIG. In horizontal mode, the upper left block + upper block + upper right block (Ref in Figure 13) In vertical mode, you can use the left top + left + The reference pixels of the lower left block (Ref_TL, Ref_T, and Ref_TR in FIG. 13) are In vertical mode, the top left block + left block + bottom left block (Figure 13) The reference pixels Ref_TL, Ref_L, and Ref_BL in the A mode between vertical and some diagonal modes (diagonal left down, including diagonals other than vertical), Top block + left block + bottom left block (Ref_TL, Ref_L, R in Figure 13) ef_BL) can be used as a reference pixel. In addition, in the non-directional mode and the color copy mode, the first reference A prediction block can be generated using the image or using the first and second reference pixels. .

[0339] In addition, the second reference pixels include not only pixels that have been completely coded / decoded but also pixels that are not coded in the current block. The conversion example may also include a pixel in (in this example, a predicted pixel). That is, the primary predicted value may be a pixel for generating an auxiliary predicted value. In the present invention, the example of using a pixel that has completed encoding / decoding as the second reference pixel is mainly described, but is not limited thereto. The conversion example may also include a pixel that has not completed encoding / decoding (in this example, a predicted pixel).

[0340] In order to compensate for the shortcomings of the current prediction mode, a prediction block can be generated or corrected using multiple reference pixels.

[0341] For example, the directional mode is a mode used for predicting the directionality of a corresponding block using some reference pixels (first reference pixels), but it may not accurately reflect changes in the block. This may cause a decrease in prediction accuracy. In this case, if a prediction block is generated or corrected using additional reference pixels (second reference pixels), the prediction accuracy can be improved.

[0342] Therefore, in the following example, a prediction block is generated using various reference pixels in the above example, but the present invention is not limited to the above example. Even if terms such as the first and second reference pixels are not used, they can be derived and understood from the above definition.

[0343] The setting of generating a prediction block using additional reference pixels can be determined explicitly or set implicitly. In the case of explicit setting, the unit may include a video, a sequence, a picture, a slice, a tile, etc. In the following example, the implicit processing is described, but the present invention is not limited thereto. Also, other modifications (explicit or mixed) examples may be included.

[0344] According to the prediction mode, the prediction block can be generated in various ways. In particular, the prediction method can be generated based on the positions of the reference pixels used in the prediction mode. Also, the prediction method can be determined based on the pixel positions in the block.

[0345] The horizontal mode will now be described.

[0346] For example, if the left block is used as the reference pixel (Ref_L in FIG. 13), then the nearest pixel (1300 in FIG. 13) is used (eg, extrapolated) to generate a prediction block in the horizontal direction.

[0347] Also, a prediction block can be generated (or corrected; the generation may involve the final prediction value, and the correction may not involve all pixels) by using reference pixels adjacent to the current block corresponding to the horizontal direction. In detail, the prediction value is corrected using the nearest pixel corresponding to the block (1310 in FIG. 13; other pixels 1320 and 1330 may also be considered). Meanwhile, the change degree or gradient information of the pixel (for example, pixel value change degree or gradient information such as R0-T0, T0-TL, T2-TL, T2-T0, T2-T1, etc.) can be fed back to the correction process.

[0348] In this case, the pixels to be corrected may be all pixels in the current block, or may be limited to some of the pixels (for example, a single pixel that does not have a specific shape or is in an irregular position may be determined as the unit. As in the example described below, a pixel having a certain shape such as a line is determined as the unit. For ease of explanation, in the example described below, a pixel unit with a line as the unit will be described as an example). When the correction pixel is used only for some of the pixels, the unit can be determined to be at least one line corresponding to the prediction mode direction. For example, the pixels corresponding to a to d may be included in the correction target. Furthermore, the pixels corresponding to e to h may also be included in the correction target. Also, Regardless of the position of the line, the correction information obtained from the adjacent pixels of the block is applied in the same manner. Or, the correction information can be applied differently on a line-by-line basis. In addition, the greater the distance between the adjacent pixels, the less correction information may be applied. (For example, by setting large division values ​​such as L1-TL, L0-TL, etc. based on distance. can be done.)

[0349] In this case, the pixels included in the correction target may have only one setting in one image. Or it can be self-adaptively determined by various encoding / decoding elements.

[0350] Taking self-adaptive decision as an example, we decide which pixels to correct based on the size of the block. In blocks smaller than 8x8, no lines are corrected. For blocks larger than 8x and smaller than 32x32, only one pixel line is corrected. For blocks larger than 32x32, two pixel lines can be corrected. The definition of the block size ranges follows from the above description of the invention.

[0351] Or the shape of the block (e.g., square, rectangle. Specifically, the rectangle with the longest horizontal length The pixel to be corrected can be determined based on the pixel shape (rectangle with a long vertical length). For example, in the case of an 8x4 block, two pixel lines (a to h in Fig. 13) ) for a 4x8 block, the correction can be performed for one pixel line (Figure In 13, corrections can be made for a to d). In the case of 8×4, the horizontal When the shape of the block extended in the direction is determined to be horizontal mode, the direction of the current block is In the case of 4×8, the shape of the block extended vertically depends on the horizontal model. The direction of the current block is determined by the current block's direction, which does not depend too much on the upper block. The opposite setting to the above is also possible.

[0352] Alternatively, the pixel to be corrected can be determined based on the prediction mode. In the vertical mode, a pixel line may be the correction target. In other modes, The b pixel lines may be correction targets. As mentioned above, some modes (For example, in non-directional mode DC, color copy mode, etc.), the pixel to be corrected is specified in pixels (e.g., a through d, e, i, m) rather than in rectangular shapes. This is explained in detail in the examples below.

[0353] In addition to the above, it can apply self-adaptive settings based on the encoding / decoding elements added. In the above, the limitations on the horizontal mode have been mainly described, but the present invention is not limited to the above example. The same or similar settings may be applied to other modes. / The above example can be realized by combining multiple elements, rather than a single decoding element. .

[0354] For vertical mode, various directions can be applied to the prediction method of horizontal mode, so a detailed explanation is required. In the following example, the same explanation as for the horizontal mode will be omitted.

[0355] The diagonal mode (Diagonal upright) will be described below.

[0356] For example, the left block and the lower left block are reference pixels (first reference pixels or main reference pixels). 13), the block corresponding to the Ref_L and Ref_BL in FIG. For example, extrapolation, etc.) is used to calculate the diagonal direction using the nearest neighboring pixels (1300 and 1340 in FIG. 13). A prediction block is generated in the 3D direction.

[0357] In addition, the reference pixel adjacent to the current block located diagonally opposite the current block (the second reference pixel or are auxiliary reference pixels, and Ref_T, Ref_TR in FIG. 13) can be used to generate (or correct) a predicted block. In particular, the nearest neighbor pixels (1310 and 1330 in FIG. 13, and 1320 may also be considered) corresponding to the block can be used to correct the predicted value, and the weighted average value of the auxiliary reference pixels and the main reference pixels (e.g., the distance difference between the predicted pixel and the main reference pixel, the predicted pixel and the auxiliary reference pixel on the x-axis or the y-axis) can be obtained based on at least one of them. Examples of weights applied to the main reference pixels and the auxiliary reference pixels may include 15:1 to 8:8. If there are two or more auxiliary reference pixels, examples of weights may include similar weights between the auxiliary reference pixels, such as 14:1:1, 12:2:2, 10:3:3, 8:4:4, etc., or the auxiliary reference pixels may have different weights, such as 12:3:1, 10:4:2, 8:6:2, etc. In this case, different weights are determined based on the degree of proximity of gradient information, etc., in the direction of the current prediction mode with respect to the corresponding predicted pixel as the center (i.e., it is determined which current prediction mode gradient the gradient of the predicted pixel and each auxiliary reference pixel is closest to), and this can be fed back to the correction process.

[0358] In this case, the filtering may have one setting in one image or may self-adaptively determine the filtering by different encoding / decoding elements.

[0359] Take self-adaptive decision as an example, and can determine the pixel (for example, the number of pixels) to apply filtering based on the position of the pixel to be corrected.If prediction mode is diagonal mode (mode 2 in this example) and the pixel to be corrected is c, use L3 (the first reference pixel in this example) to perform prediction, and use T3 (the second reference pixel in this example) to perform correction.That is, one first reference pixel and one second reference pixel can be used for one pixel prediction.

[0360] Or, when the prediction mode is a diagonal mode (mode 3 in this example) and the pixel to be corrected is b, prediction can be performed using L1* (or L2*, which is the first reference pixel in this example) obtained by performing interpolation on the pixels of the fractional units of L1 and L2, and correction can be performed using T2 (which is the second reference pixel in this example), or correction can be performed using T3. Or, correction can be performed using T2 and T3, or correction can be performed using T2* (or T3*) obtained by performing interpolation on the pixels of the fractional units of T2 and T3 obtained based on the directionality of the prediction mode. That is, to predict one pixel, one first reference pixel (assuming L1* in this example, if the pixels directly used are considered to be L1 and L2, it is considered to be two pixels. Or it is considered to be two or more pixels based on the filter used to perform the interpolation on L1*) and two second reference pixels (in this example, in the case of T2 and T3, L1* is considered to be one pixel) can be used.

[0361] In short, at least one first reference pixel and at least one second reference pixel can be used for one pixel prediction, which may depend on the prediction mode and the position of the predicted pixel.

[0362] When the correction pixels are applied to some pixels in a limited manner, the corrected pixels may be determined for at least one horizontal line or vertical line based on the intra-frame prediction mode direction. For example, the pixels corresponding to a, e, i, m or the pixels corresponding to a to d may be included in the correction target. Furthermore, the pixels corresponding to b, f, j, n or the pixels corresponding to e to h may also be included in the correction target. In the case of some diagonal up right, the pixels in the horizontal line unit may be corrected. In the case of some diagonal down left, pixels in vertical lines can be corrected, but this is not limited thereto.

[0363] In addition to the above, it can apply self-adaptive settings based on the encoding / decoding elements added. In the above, the diagonal up right The following mainly describes the limitations of the above examples, but does not limit the scope of the above examples. The settings can be applied to other modes. Also, the combination of one encoding / decoding element The above example can be realized by a plurality of elements, rather than by a single element.

[0364] In the case of diagonal down left, the prediction method for the diagonal top right Since different directions may be applied to

[0365] The diagonal up left case will be explained below.

[0366] For example, the left block, the top left block, and the top block are reference pixels (first reference pixels or main Reference pixels. Used as Ref_L, Ref_TL, and Ref_T in FIG. In this case, the nearest neighbor pixel (1300, 1310 in FIG. 13) corresponding to the block (e.g., extrapolated) is 310, 1320) to generate a prediction block in the diagonal direction.

[0367] In addition, the reference pixel adjacent to the current block at the diagonal matching position (the second reference pixel) Primary or auxiliary reference pixels. Ref_L, Ref_TL, and Ref_T in FIG. 13. The positions are The prediction block can be generated (or corrected) using the main reference pixel In detail, the nearest pixel corresponding to the block (located to the left of 1300 in FIG. 13) the pixel located to the left, above, or at the upper left of 1320; the pixel located above 1310 The prediction value can be corrected using the auxiliary reference pixels and the main reference pixels. The weighted average value of pixels (for example, the ratio of the weights of the main reference pixel and the auxiliary reference pixel is 7 :1 to 4:4, etc. When there are more than two auxiliary reference pixels, examples of weights are: For auxiliary reference pixels, such as 14:1:1, 12:2:2, 10:3:3, 8:4:4, etc. They may all have the same weighting, or may be weighted in a ratio such as 12:3:1, 10:4:2, 8:6:2, etc. In this case, the auxiliary reference pixels adjacent to the main reference pixel may have different weights. (e.g., linear extrapolation) or linear extrapolation. This can be fed back into the correction process.

[0368] When the corrected pixels are applied to a limited number of pixels, the pixels are used in the prediction mode. The pixel to be corrected is determined for each horizontal or vertical line adjacent to the reference pixel. In this case, horizontal and vertical lines can be considered simultaneously, and , overlapping is allowed. For example, the pixels corresponding to a through d and the pixels corresponding to a, e, i, and m The pixels corresponding to the overlapping areas (a) may be included in the correction target. The pixels corresponding to b, f, j, and n (a, b, e, f overlapping) are The target may be included in the

[0369] The non-directional mode (DC) will be described below.

[0370] For example, among the left block, top block, top left block, top right block, and bottom left block, When at least one of the pixels is used as a reference pixel, the nearest pixel of the block ( 13) (pixels 1300 and 1310 in FIG. 13) are used (for example, averaging) to obtain a prediction block. A lock can be created.

[0371] Alternatively, the adjacent pixel of the reference pixel (the second reference pixel of the reference pixel or the auxiliary reference pixel, as shown in FIG. 13) The positions of Ref_L and Ref_T in this example are the same as the main reference pixel. Or, in addition to the main reference pixel, it also includes the pixel at the next closest position. (similar to the case of the "gonal up left") to generate a predicted block (or In particular, the prediction value can be corrected by using pixels at the same or similar positions as the main reference pixels of the corresponding block. Also, the weighted average value of the auxiliary reference pixels and the main reference pixels (for example, the ratio of the weights of the main reference pixels and the auxiliary reference pixels may be 15:1 to 8:8, etc. If there are two or more auxiliary reference pixels, the weights may be 14:1:1, 12:2:2, 10:3:3, 8:4:4, etc., with similar weights for the auxiliary reference pixels, or 12:3:1, 10:4:2, 8:6:2, etc.) can be fed back to the correction process.

[0372] The filtering may have one setting in one image or may be determined by different encoding / decoding elements.

[0373] Taking the case of self-adaptive determination as an example, a filter can be determined based on the size of a block. For the pixels located at the upper left, upper and left ends of a current block (assuming in this example that the pixel located at the upper left end filters the pixels located to the left and above the pixel, the pixel located at the upper end filters the pixels above the pixel, and the pixel at the left end filters the pixels to the left of the pixel), in a block smaller than 16×16, some filtering settings are used (in this example, filtering is applied according to a weighting ratio of 8:4:4, 12:4), and in a block larger than 16×16, some filtering settings are used (in this example, filtering is applied according to a weighting ratio of 10:3:3, 14:2).

[0374] Alternatively, a filter can be determined based on the shape of the block. For example, for a 16x8 block, a pixel located at the top of the current block can use some filtering settings (in this example, it is assumed that filtering is performed on the upper left, upper, and upper right pixels of the pixel. In other words, it is recognized as an example in which the pixel to which filtering is applied changes. The filtering weight ratio is 10::2:2:2), and a pixel located at the left end of the current block can use some filtering settings (in this example, filtering is performed on the pixel to the left of the pixel. The filtering weight ratio is 12:4). This is an example of multiple pixels at the top of the block that can be applied to a block shape with a long horizontal length. Also, the opposite setting can be realized.

[0375] When the corrected pixels are limited to a few pixels, the corrected pixels may be determined in units of horizontal or vertical lines adjacent to the reference pixels used in the prediction mode. In this case, horizontal and vertical lines may be considered simultaneously, and overlapping may be allowed. For example, the pixels corresponding to a through d and the pixels corresponding to a, e, i, and m (a overlapping) may be included in the correction target. Furthermore, the pixels corresponding to e through h and the pixels corresponding to b, f, j, and n (a, b, e, f overlapping) may be included in the correction target.

[0376] In addition to the above, self-adaptive settings can be applied based on the encoding / decoding elements added. Although the above mainly describes restrictions on the non-directional mode, the same or similar settings can be applied to other modes, not just limitedly applied in the above example. Also, the above example can be realized by a combination of multiple elements, not just one encoding / decoding element.

[0377] The color copy mode will be described below.

[0378] For the color copy mode, the prediction block is generated in a different manner from the prediction method of the current prediction mode, but the prediction block can be generated (or corrected) using reference pixels in a similar or similar manner. Since the contents of the predicted block can be obtained, obtaining the contents of the predicted block is omitted.

[0379] For example, a block corresponding to the current block in a different color space is treated as a reference pixel (first reference pixel). The pixel is used (e.g., copied) as the reference pixel or main reference pixel to generate the predicted block. It can be achieved.

[0380] Or, a reference pixel (a second reference pixel or an auxiliary reference pixel) of a block adjacent to the current block. Ref_L, Ref_T, Ref_TL, Ref_TR, Ref_BL in Figure 13) A prediction block can be generated (or corrected) by using The predicted value is compensated for using the nearest neighboring pixels (1300, 1310 in FIG. 13) corresponding to the In addition, the weighted average value of the auxiliary reference pixel and the main reference pixel (for example, Examples of weighted ratios of main reference pixels to auxiliary reference pixels are 15:1 to 8:8, etc. If there are two or more auxiliary reference pixels, examples of weighting are 14:1:1, 12:2:2, Such as 10:3:3, 8:4:4, etc., may have similar weightings in the auxiliary reference pixels. Or, the ratio of the auxiliary reference pixels is different, such as 12:3:1, 10:4:2, 8:6:2, etc. The correction process can be fed back using a weighting factor (which may be weighted according to the input signal).

[0381] Or, a pixel of a block adjacent to the block obtained in another color space (a second reference pixel or Auxiliary reference pixels. The picture in Figure 13 is a reference pixel that corresponds to the current block in another color space. If we assume that the block is a pixel, the pixels are Ref_L, Ref_T, Ref_TL, R. ef_TB, Ref_BL, and Ref_R, Ref_BR, and Re not shown in FIG. f_B) can be used to generate (or correct) a predicted block. The pixel to be set and its surrounding pixels (for example, the first reference pixel or the first reference pixel in a different color space) The pixel and the second reference pixel, that is, when weighted averaging is applied within a block, In this case, the first reference pixel to be corrected and the first reference pixel to which the filtering is applied are required. At the block boundary, the first reference pixel to be corrected and filtering are applied. a first reference pixel and a second reference pixel are required), and This can be fed back into the process.

[0382] If the above two cases occur simultaneously, the pixels of the neighboring blocks of the current block are used. Not only can the pixel values ​​be interpolated using pixels in a prediction block obtained in another color space, but the pixel values ​​can also be interpolated using pixels in a prediction block obtained in another color space. It is also possible to perform correction on the pixel to be corrected and its surrounding pixels (e.g., correction target Pixels in the neighboring block of the get pixel and pixels in the current block neighboring the correction target pixel ) is filtered (e.g., at the correction target position, using an MxN mask) In this case, the mask is a pixel and the pixels above, below, left, right , top left, top right, bottom left, bottom right, etc.) , and feeds it back into the correction process.

[0383] The example involves applying filtering after obtaining a prediction of the current block in another color space. It indicates that filtering has been performed in the corresponding color space before obtaining the predicted value. can also be the predicted value of the current block. In this case, this is the same as the above example only in terms of order. Note that although it is different from the above, the filtering target is the same.

[0384] In this case, the filtering has only one setting in one image; or The filtering can be determined self-adaptively by various encoding / decoding elements. Cut.

[0385] For example, for self-adaptive decisions, based on the prediction mode, settings for filtering The determination can be made. Specifically, it can adaptively perform filtering based on the detailed color in the color copy mode. It can perform self - adaptive filtering based on the copy mode setting. For example, in some color copy modes (in this example, when obtaining a set of correlation information from the adjacent regions of the current block and the adjacent regions of the blocks corresponding to different color spaces), several filtering settings <1> can be used. In some color copy modes (in this example, when obtaining multiple sets of correlation information compared to the above mode, that is, a1 and b1, a2 and b2), several filtering settings <2> can be used.

[0386] In the above filtering settings, it can be determined whether to apply filtering. For example, according to the filtering settings, filtering <1> can be applied or filtering <2> can be not applied. Or, A filter <1> or B filter <2> can be used. Or, filtering can be applied to all the pixels on the left side and the upper side of the current block, or filtering can be applied to some of the pixels on the left side and the upper side.

[0387] If the pixels to be corrected are limited to several pixels, the pixels to be corrected can be determined in units of horizontal lines or vertical lines. The horizontal line or vertical line is adjacent to the reference pixels used in the prediction mode (in this example, it is an auxiliary reference pixel, different from the above example). In this case, the horizontal line and the vertical line can be considered simultaneously, and overlap can be allowed.

[0388] For example, the pixels corresponding to a to d and the pixels corresponding to a, e, i, m (a overlapping) may be included in the correction target. Further, the pixels corresponding to e to h and the pixels corresponding to b, f, j, n (a, b, e, f overlapping) may also be included in the correction target.

[0389] In short, the main reference pixels used to generate the predicted block can be obtained from another color space, and the auxiliary reference pixels for correcting the predicted block can be obtained from blocks adjacent to the current block in the current color space, or from blocks adjacent to the corresponding block in the other color space, or from some pixels of the predicted block of the current block, i.e. some pixels in the predicted block are used to correct some pixels in the predicted block.

[0390] In addition to the above, self-adaptive settings can be applied based on the encoding / decoding elements added. Although the above mainly describes restrictions on the non-directional mode, the same or similar settings can be applied to other modes, not just limitedly applied in the above example. Also, the above example can be realized by a combination of multiple elements, not just one encoding / decoding element.

[0391] This is an example of obtaining a predicted block of a current block using correlation between color spaces, but since the blocks for obtaining correlation are obtained from adjacent regions of the current block and adjacent regions of a corresponding block in a different color space, filtering can be applied to block boundaries.

[0392] According to the encoding / decoding setting, a prediction block is often generated using multiple reference pixels. In particular, based on the encoding / decoding setting, it can be determined whether to support the use of a second reference pixel to generate or correct the prediction block.

[0393] As an example, the prediction process may decide whether to use additional pixels, either implicitly or explicitly. If it is explicit, the above information may be included for each video, sequence, picture, slice, tile, or block.

[0394] As an example, determining whether to use additional pixels in the prediction process may involve The method may be applicable to all prediction modes or to some prediction modes. ,Several prediction modes are available: horizontal, vertical, several diagonal modes, non-directional modes, color The mode may be at least one of the following:

[0395] As an example, determining whether to use additional pixels in the prediction process may involve It may be applicable to all blocks or to some blocks. Several blocks can be defined based on block size, shape, etc. The blocks are MxN (e.g., M and N are of length 8, 16, 32, 64, etc. For a square, the lengths are 8x8, 16x16, 32x32, 64x64, etc. (If the shape is the same as the original shape, it may have a 2:1 rectangular shape, a 4:1 rectangular shape, etc.)

[0396] Also, depending on some encoding / decoding settings, additional pixels are used in the prediction process. In this case, the encoding / decoding settings are Also, based on the flag, Therefore, additional reference pixels can be used in a limited way in the prediction process.

[0397] For example, the use of the area including the second reference pixel is restricted by the flag (i.e., Areas padded using processes such as reference pixel padding based on the above flags) In this case, the second reference pixels can be restricted from being used in the prediction process. The factors are applicable to the prediction process regardless of the flags.

[0398] In addition to the above examples, various applications and combinations of one or more elements may be used. Also, in the above example, some conditions related to the color copy mode may be included. In addition to color copying, the example also uses multiple reference pixels in a similar or transformative manner. The present invention is applicable to prediction modes in which a prediction block is generated or corrected using the above-mentioned method.

[0399] According to the above example, in each prediction mode, a prediction block is generated or corrected using multiple reference pixels. Although a setting for each prediction mode has been described, multiple settings can be used for each prediction mode. In other words, the filtering setting candidate group is multiple in order to generate the selection information. It may be configured as follows.

[0400] In short, it explicitly or implicitly processes information about whether filtering should be performed. When filtering is performed, information related to the filtering selection information is The information can be processed explicitly or implicitly. When the information is processed explicitly, it can be processed in the form of video, The above information is included in units of sequences, pictures, slices, tiles, and blocks. Good too.

[0401] The generated predicted block can be corrected. The predicted block correction process will be described below. This section explains the process.

[0402] The correction process can be performed based on predetermined reference pixels and weights. In this case, the pixel to be corrected is determined based on the position of the pixel in the current block (hereinafter referred to as the current pixel). The reference pixels and weights can be determined by the intra prediction mode of the current block. The reference pixels and weights can be determined based on:

[0403] If the intra-frame prediction mode of the current block is a non-directional mode, the reference image of the current pixel is The elements refL and refT may belong to the first pixel line adjacent to the current block; and , may be located on the same horizontal / vertical line as the current pixel. The weight is The weighting factor may include at least one of a first weighting value wL, a second weighting value wT in the y-axis direction, or a third weighting value wTL in the diagonal direction. The first weighting value may refer to a weighting value applied to a left reference pixel. The second weighting value may refer to a weighting value applied to a top reference pixel. The third weighting value may refer to a weighting value applied to a top left reference pixel. Here, the first weighting value and the second weighting value may be determined based on position information of the current pixel and a predetermined scaling factor (nScale). The scaling factor may be determined according to a width W and a height H of the current block. For example, the first weighting value wL[x] of the current pixel predPixel[x][y] may be determined as (32>>((x<<1)>>nScale)), and the second weighting value (wT[x]) may be determined as (32>>((y<<1)>>nScale)). The third weighting value wTL[x][y] may be determined as ((wL[x]>>4)+(wT[y]>>4)). However, if the intra prediction mode is a planar mode, the third weighting value may be determined as 0. The scaling factor may be ((Log2(nTbW)+Log2(nTbH)-2)>>2).

[0404] When the intra prediction mode of the current block is the vertical / horizontal mode, the reference pixels refL and refT of the current pixel may belong to a first pixel line adjacent to the current block and may be located on the same horizontal / vertical line as the current pixel. In the vertical mode, the first weighted value wL[x] of the current pixel predPixel[x][y] may be determined as (32>>((x<<1)>>nScale)), the second weighted value (wT[y]) may be determined as 0, and the third weighted value wTL[x][y] may be determined to be equal to the first weighted value. Also, in the horizontal mode, the first weighted value wL[x] of the current pixel predPixel[x][y] may be determined as 0, the second weighted value wT[y] may be determined as (32>>((y<<1)>>nScale)), and the third weighted value wTL[x][y] may be determined to be equal to the second weighted value.

[0405] When the intra prediction mode of the current block is a diagonal mode, the reference pixels refL and refT of the current pixel may belong to a first pixel line adjacent to the current block and may be located on the same diagonal as the current pixel. Here, the diagonal has the same angle as the intra prediction mode of the current block. The diagonal may represent a diagonal from the lower left corner to the upper right corner. Alternatively, the diagonal may represent a diagonal from the upper left corner to the lower right corner. In this case, the first weighted value wL[x] of the current pixel predPixel[x][y] may be determined as (32>>((x<<1)>>nScale)), the second weighted value wT[y]) may be determined as (32>>((y<<1)>>nScale)), and the third weighted value wTL[x][y] may be determined as 0.

[0406] If the intra prediction mode of the current block is mode 10 or less, the reference pixels refL and refT of the current pixel may belong to a first pixel line adjacent to the current block and may be located on the same diagonal as the current pixel. Here, the diagonal has the same angle as the intra prediction mode of the current block. In this case, the reference pixels may be limited. Thus, only one of the left reference pixel or the top reference pixel of the current block is used. The first weighted value wL[x] of the current pixel predPixel[x][y] may be determined as 0, the second weighted value wT[y] may be determined as (32>>((y<<1)>>nScale), and the third weighted value wTL[x][y] may be determined as 0.

[0407] If the intra prediction mode of the current block is mode 58 or higher, the reference pixels refL and refT of the current pixel may belong to a first pixel line adjacent to the current block and may be located on the same diagonal as the current pixel. Here, the diagonal has the same angle as the intra prediction mode of the current block. In this case, the reference pixels may be limited. Thus, only one of the left reference pixel or the top reference pixel of the current block is used. The first weighted value wL[x] of the current pixel predPixel[x][y] may be determined as (32>>((x<<1)>>nScale)), the second weighted value wT[y] may be determined as 0, and the third weighted value wTL[x][y] may be determined as 0.

[0408] Determined reference pixels refL[x][y], refT[x][y] and weights wL[x] Based on wT[y] and wTL[x][y], the current pixel predPixels[x][ y]) can be corrected as in Equation 1 below.

[0409] [Formula 1] predPixels[x][y]=clip1Cmp((refL[x][y]*w L[x]+refT[x][y]*wT[y]-p[-1][-1]*wTL[x][y ]+(64-wL[x]-wT[y]+wTL[x][y])*predPixels[ x][y]+32)>>6) However, the current block does not perform intra-frame prediction based on sub-block units. The above correction process can be performed only if the reference pixel of the current block is the first pixel line. The correction process can be performed only if the current block is in the frame. The correction process can be performed only if the prediction mode corresponds to a specific mode. Here, the specific mode may be a non-directional mode, a vertical mode, a horizontal mode, a predetermined first threshold mode, at least one of a mode less than a predetermined threshold mode and a mode greater than a predetermined second threshold mode. The first threshold mode may be 8, 9, 10, 11 or 12; The second threshold mode may be 56, 57, 58, 59 or 60.

[0410] The prediction mode determination unit is a process for selecting an optimal mode from a group of prediction mode candidates. Block distortion (i.e., distortion of the current block and the reconstructed block. Absolute difference Sum of Absolute Difference (SAD), squared difference Sum of Square Difference (SSD) and corresponding models Rate-Distortion technology is used to reduce the amount of generated bits. The mode with the best coding cost can be determined. The prediction block generated in the prediction mode can be sent to a subtraction unit and an addition unit.

[0411] The prediction mode encoding unit performs encoding for the prediction mode selected by the prediction mode determination unit. In the prediction mode candidate group, the inter-prediction mode corresponding to the prediction mode can be executed. By performing coding on the index information or performing prediction on the prediction mode, In the former case, it is possible to encode information about the In the latter case, the prediction mode is directly encoded without using the By performing prediction on the mode, the information obtained based on the mode prediction information and the prediction information is The former is an example applied to the chrominance component. However, the present invention is not limited to this and may have other examples.

[0412] When performing prediction for a prediction mode and performing encoding, the predicted value (or The predicted information is called the Most Probable Mode (MPM). In this case, a predetermined prediction mode (for example, a DC mode, a planar mode, etc.) may be used. mode, vertical mode, horizontal mode, diagonal mode, etc.) or spatially adjacent blocks (e.g. For example, the left block, the top block, the top left block, the top right block, the bottom left block, etc. In this example, the diagonal mode is set to the upper right diagonal (Diagonal al up right), Diagonal down right, It represents the diagonal down left, mode 9 in Figure 9, mode 2 and mode 66.

[0413] In addition, the MPM candidate group is divided into two groups, one for each mode derived from the modes included in the MPM candidate group and the other for each mode derived from the modes included in the MPM candidate group. For example, for directional modes included in the MPM candidate group, , modes with a mode spacing difference of a (e.g., a is zero, such as 1, -1, 2, -2, etc.) For modes including mode 10 in FIG. 9, the derived modes are mode 9, mode 11, mode 8, mode 12, etc.) are again (or additionally) included in the MPM candidate group.

[0414] The above example may correspond to configuring an MPM candidate group in multiple modes. Also, the MPM candidate group (or the number of MPM candidate groups) may be determined based on the encoding / decoding settings (e.g., prediction mode candidate group, image type, block size, block shape, etc.) and may include at least one mode.

[0415] The prediction modes for constructing the MPM candidate group may have a priority. The order of the prediction modes included in the MPM candidate group may be determined based on the priority. The construction of the MPM candidate group may be completed after padding the number of MPM candidate groups based on the priority. In this case, the priority may be, in order, the prediction mode of the spatially neighboring block, the predetermined prediction mode, the mode derived from the prediction mode first included in the MPM candidate group, but may have other modifications.

[0416] When encoding the prediction mode of the current block using the MPM, information (eg, most_probable_mode_flag) regarding whether the prediction mode matches the MPM may be generated.

[0417] If it matches with the MPM (e.g., most_probable_mode_flag=1), MPM index information (e.g., mpm_idx) can be additionally generated based on the MPM configuration. For example, if the MPM configuration has one prediction mode, additional MPM index information is not generated. If the MPM configuration has multiple prediction modes, index information corresponding to the prediction mode of the current block can be generated in the MPM candidate group.

[0418] If there is no match with the MPM (e.g., most_probable_mode_flag=0), non-MPM index information (e.g., non_mpm_idx) corresponding to the prediction mode of the current mode may be generated in the remaining prediction mode candidate groups (or non-MPM candidate groups) other than the MPM candidate group in the prediction mode candidate group. This may be an example of configuring non-MPMs into one group.

[0419] When the non-MPM candidate group is composed of a plurality of groups, information related to which group the prediction mode of the current block belongs to may be generated. For example, the non-MPM is composed of A and B groups (A is composed of m prediction modes, B is composed of n prediction modes, and the non-MPM is composed of m+n prediction modes. n is greater than m. Assume that the mode of A is a directional mode and has an even interval, and the mode of B is a directional mode and does not have an even interval), and if the prediction mode of the current block matches the prediction mode of the A group (e.g., non_mpm_A_flag=1), index information corresponding to the prediction mode of the current block may be generated in the A group candidate group, and if it does not match (e.g., non_mpm_A_flag=0), index information corresponding to the prediction mode of the current block may be generated in the remaining prediction mode candidate group (or B group candidate group). As in the above example, the non-MPM may be configured to be at least one prediction mode candidate group. Also, the non-MPM configuration may be determined by the prediction mode candidate group. For example, when the number of prediction mode candidate groups is 35 or less, the number of non-MPMs may be one, and in other cases, the number of non-MPMs may be two or more.

[0420] As in the above example, the purpose of supporting non-MPM is to reduce the number of mode bits when the non-MPM consists of multiple groups, when the number of prediction modes is large, and when the prediction modes are not predicted by the MPM. The aim is to reduce the amount of

[0421] When performing prediction mode encoding (or prediction mode decoding) of the current block using MPM, In this case, each prediction mode candidate group (e.g., MPM candidate group, non-MPM candidate group, etc.) ) can be generated separately, and a binarization table applied to each candidate group can be generated separately. Alternatively, the binarization method described above may be used alone.

[0422] The prediction-related information generated by the prediction mode coding unit is transmitted to the coding unit, and the bit It can be recorded in the stream.

[0423] FIG. 14 illustrates an example of a tree-based partition block according to one embodiment of the present invention.

[0424] In FIG. 14, i represents a quadtree division, and ii represents a horizontal division in the binary tree division. In the figure, A to C are the initial blocks. represents a block (a block before being divided, e.g., a coding tree unit), and the above The numbers after the letters represent the partition numbers when performing the split. The numbers 0 to 3 are in the upper left block, upper right block, lower left block, and lower right block, respectively. In the case of a binary tree, 0 and 1 are assigned to the left / top block and the right / bottom block, respectively. Can be assigned.

[0425] Referring to FIG. 14, the letters and numbers obtained in the segmentation process are used to identify the corresponding blocks. It is possible to check the state or information of the division performed to obtain the

[0426] For example, in FIG. 14, block A00 is divided into quadtrees with respect to initial block A. After executing the above, the top left block of the four blocks obtained (add 0 to A) is A0 The top left block (0 (Add A0 to A1).

[0427] Or, in ii of FIG. 14, block B10 is partitioned into binary trees with respect to the initial block B. After performing the horizontal division in, the lower block (1 to B) of the two obtained blocks is Add) The two blocks obtained by performing horizontal splitting in binary tree partitioning on B1. This is the upper block of the lock (add 0 to B1).

[0428] The above partitioning allows the partitioning status and information of each block (e.g., partitioning settings supported, Supported range of blocks such as minimum and maximum size, etc. For details, see Support range by division method>, Allowable division depth<For details, see Support range by division method>, Allowable division depth Port range>, Split flag <For more information, see Split flag by split method>, Image type P / B>, encoding mode <intra inter>To check the division status and information of blocks You can also find out the necessary encoding / decoding settings and information for the current block (subblock). Before the division process to obtain the block, the current block is divided into blocks (parent blocks). For example, in the case of block A31 in FIG. 14i, The adjacent blocks may include A30, A12, and A13, and A30 was selected in the previous division step. It can be determined that A12 and A31 belong to the same block A3. In this case, in the previous step of dividing A3, A12 and A13 are divided into another block. A1 belongs to A1, and A12 and A13 are in the same block A only in the preceding process of the previous process. You can check that it belongs.

[0429] The above example illustrates one splitting operation: quadranting a quadtree or horizontal / vertical splitting a binary tree. Therefore, we will continue to illustrate multiple tree-based partitioning in the examples below. Reveal.

[0430] FIG. 15 illustrates an example of multiple tree-based partition blocks according to one embodiment of the present invention.

[0431] As shown in Figure 15, the letters and numbers obtained in the division process can identify the division state or information performed to obtain the corresponding blocks. In this example, each letter does not mean one initial block, but the number represents the information related to the division.

[0432] For example, for block A1A1B0, if we perform quadtree division on the initial block, we get the top right block A1. If we perform quadtree division on block A1, we get the top right block (add A1 to A1). If we perform horizontal division in binary tree division on block A1A1, we get the top block (add B0 to A1A1).

[0433] Optionally, for block A3B1C1, if a quadtree split is performed on the initial block, then we get a bottom right block A3; if a horizontal split in binary tree split is performed on block A3, then we get a bottom block (adding B1 to A3); if a vertical split in binary tree split is performed on A3B1, then we get a right block (adding C1 to A3B1).

[0434] In this example, the division information can be used to ascertain relationship information between the current block and the adjacent block, such as in which step the current block and the adjacent block are the same, according to the division step of each block.

[0435] 14 and 15 show some examples of checking the division information of each block. The division information of each block can be checked using various information and combinations of information for checking the division information (e.g., a division flag, depth information, depth information maximum value, block range, etc.). This allows you to check the relationships between the blocks.

[0436] FIG. 16 is a schematic diagram showing various situations of the divided blocks.

[0437] Generally, since various texture information exists in an image, it is difficult to perform encoding / decoding with one encoding / decoding method. For example, some regions may have regions with strong edge components in a specific direction. Some regions may have complex regions with no edge components. In order to effectively perform encoding for this, block division plays an important role.

[0438] The purpose of block partitioning is to effectively partition an image into regions based on its characteristics. However, when using only one partitioning method (e.g., quadtree partitioning), it is difficult to perform partitioning that adequately reflects the characteristics of the image.

[0439] As shown in Fig. 16, it can be confirmed that images containing various textures are divided based on quadtree division and binary tree division. a to e may only support quadtree division. f to j may only support binary tree division.

[0440] In this example, the partitions obtained by the quad-tree division are called UL, UR, DL, and DR. Also, the binary tree division will be explained based on this.

[0441] In Fig. 16, a indicates a texture form for which quadtree division provides optimal characteristics. The texture is divided into four parts by one quadtree division (Div_HV), and encoding / decoding is performed for each block. At the same time, as shown in Fig. 16f, when binary tree division is used, three divisions (two Div_V, one Div_H) may be required compared to the quadtree. There is.

[0442] FIG. 16b shows that the texture is divided into upper and lower regions of the block. At b of 16, if quadtree division is used, one division (Div_HV) is required. In FIG. 16g, a single division Div_H is performed using binary tree division. Assume that partitioning requires a 1-bit flag and binary tree partitioning requires 2 or more bits of flag. In this way, when it comes to flag bits, a quadtree is found to be effective, and each block Encoding / decoding information (e.g., information for representing texture information (representing texture information for decoding (residual signal, coding coefficients, information indicating whether coding coefficients exist, etc.) Prediction information (e.g., intraframe prediction related information, interframe prediction related information), transformation information (e.g., For example, transformation type information, transformation division information, etc. are generated. In this case, the texture information is Since the information is generated by dividing similar regions, the quad-tree division is more efficient than the binary tree division. It's not very efficient.

[0443] In other cases, as shown in Figure 16, which tree is more effective based on the texture type? From the above example, it is possible to determine whether the size of the variable block and the various division methods are It can be seen that the support for the image is sufficiently important. The validity region according to the feature can be divided.

[0444] Below, the implementation of quadtree and binary tree partitioning is analyzed in detail.

[0445] Referring to FIG. 16b, the block adjacent to the lower right block (current block) (e.g., The left block is the current block. The upper block has different characteristics from the current block. It is clear that some blocks (in this example, the left block) ), but the properties of quadtree partitioning suggest that partitioning may have been performed. be.

[0446] In this case, the current block has similar characteristics to the left block, so it will be encoded similarly. In order to effectively reduce this, the intraframe prediction model can generate 1 / decoded information. mode (e.g., most probable mode, i.e., to reduce the amount of bits for the prediction mode of the current block) (information to predict the mode of the current block from the neighboring blocks), and the motion information prediction mode ( For example, information for skip mode, merge mode, and decrement of mode bits. When generating a 3D block (e.g., a conflict mode), the information in the left block is useful for reference. That is, the coding information of the current block is taken from one of the left block or the upper block. (e.g., intraframe prediction information, interframe prediction information, filter information, coefficient information, etc.) When considering this, you can refer to the exact information (in this example, it is the left block).

[0447] As shown in FIG. 16(e), one small block in the bottom right corner (the current block divided by two) Similarly, the current block is the block obtained by dividing the left block or It has similar characteristics to the upper block of the upper block. This allows the corresponding block Improve the coding performance by referencing the coding information from (the upper block in this example) It is possible.

[0448] Conversely, as shown in j in FIG. 16, the rightmost block (which divides the current block twice) In this example, the block above does not exist, so if you refer to only the left block, the current block is different from the left block. It can be confirmed that the block has the property. A block may be similar to a neighboring block, and binary tree partitioning has a high probability of having different characteristics from neighboring blocks. stomach.

[0449] In detail, when some blocks (x) and their adjacent blocks (y) are the same block before being divided, in the case of quadtree division, some blocks (x) may have similar characteristics to the adjacent block (y) that is the same as the block before being divided, or may have different characteristics. Conversely, in the case of binary tree, some blocks (x) often have different characteristics from the adjacent block (y) that is the same as the block before being divided. In other words, in the case of similar characteristics, there is no need to perform block division, and the blocks are finally determined before being divided, but they are often divided because they have different characteristics.

[0450] In addition to the above examples, in FIG. 16i, the bottom right block x and the bottom left block y may have the following relationship: they are defined when no division is performed because the image characteristics of the top block are similar, and they are defined after division into the bottom left block and the bottom right block because the image characteristics of the bottom block are different.

[0451] In short, in the case of quadtree partitioning, if the adjacent block adjacent to the current block has the same parent block as the current block, it is divided unconditionally into 1 / 2 quadtree characteristics in the horizontal and vertical directions, so it may have similar characteristics to the current block or different characteristics.In the case of binary tree partitioning, if the adjacent block adjacent to the current block has the same parent block as the current block, horizontal or vertical partitioning can be performed based on image characteristics, so partitioning means partitioning based on different characteristics.

[0452] (quadtree splitting) Compared to the current block, neighboring blocks (assumed to be, but not limited to, the left block and the top block in this example) that have the same block before division may have similar or different characteristics to the current block.

[0453] In addition, neighboring blocks that are different from the current block before division may have similar or different characteristics to the current block.

[0454] (binary tree division) Compared to the current block, an adjacent block (assumed to be the left block or the top block in this example; since it is a binary tree, the maximum number of candidates is one) that has the same block before division may have different characteristics.

[0455] In addition, neighboring blocks that are different from the current block in terms of the blocks before division may have similar or different characteristics to the current block.

[0456] In the following, it is assumed that the above assumptions are the main assumptions of the present invention. According to the above, there are two cases: (1) when the characteristics of the neighboring block are similar to or different from the current block, and (2) when the characteristics of the neighboring block are different from the characteristics of the current block.

[0457] Referring again to FIG.

[0458] As an example (the current block is A1A2), since the block A1 before division of the A1A2 block is different from the block A0 before division (initial block), the A0 block (left block) in the adjacent block can be classified as a normal case (i.e., a case where it is not known whether the characteristics are similar or different from the current block).

[0459] For the adjacent A1A0 block (upper block), the block before the division of A1A2 block Since block A1 is the same as block A1 before the division of block A1A0, check the division method. In this case, since it is a quadtree partition (A), it is classified as the ordinary case.

[0460] As an example (current block is A2B0B1), A2B0B in the adjacent block For block 0 (upper block), block A2B0 before division of block A2B0B1 Since A2B0B1 is the same as the block A2B0B1 before the division, the division method is Let’s check. In this case, it is a binary tree partition (B), so it is classified as an exceptional case.

[0461] As an example (current block is A3B1C0), in the adjacent block, A3B1 Block A3B1 before the division of block C0 is the same as block A3 before the division of block A3B0. Because of the difference, the A3B0 block (the upper right block in this example) is the normal case. It is classified as follows.

[0462] As described in the example above, by classifying adjacent blocks into normal and exceptional cases, In the normal case, the coding information of the neighboring blocks is It is unclear whether it can be used as coding information. Forcefully determine whether the coding information of the adjacent block can be used as the coding information of the current block. Determine.

[0463] According to the above classification, a method of obtaining a prediction method for a current block from adjacent blocks is used. can be done.

[0464] In other words, whether the current block is the same as the adjacent block before division (A ) to check.

[0465] If the result of A is the same, the current block (if the result is the same, the current block as well Since the adjacent blocks are also defined in the same division method, only the current block is Check the division method (B) of the

[0466] If the result of A is different, it terminates (stops).

[0467] If the result of B is a quadtree partition, mark the adjacent block as normal and terminate (stop). .

[0468] If the result of B is a binary tree partition, mark the adjacent block as an exceptional state and terminate (stop). do.

[0469] The above example is for the intraframe prediction mode prediction candidate group (related to the most probable mode) of the present invention. Candidate group configuration preferences (e.g., candidate group configuration preferences) are applicable. Supports the setting of exceptional prediction candidate groups based on the state of the neighboring blocks. In the case of a block, lowering the priority or eliminating a candidate group derived from the block. can be done.

[0470] In this case, the adjacent blocks to which the setting applies are limited to the same space or It is applicable to deriving other color spaces of the same image. For example, In other words, the block division state derived by the color copy mode is The above settings can be executed depending on the state.

[0471] Other than the above example, the examples described later are based on the relationship between blocks (in the above event, the split block This is an example of self-adaptively setting encoding / decoding settings (e.g., prediction candidate group setting, reference pixel setting, etc.) based on a block information (identifying the relative relationship between the current block and other blocks using block information, etc.).

[0472] In this example (luminance component), it is assumed that when there are 35 intra-frame prediction modes predefined in the encoding / decoding device, three candidates are selected from adjacent blocks (left and top in this example) to form an MPM candidate group.

[0473] One candidate can be added to the left block L0 and the top block T0 to form two candidates. If a group of candidates cannot be formed in each block, it can be padded with DC mode, planar mode, vertical mode, horizontal mode, diagonal mode, etc. After padding two candidates through the above process, padding the remaining one candidate with various numbers can be considered.

[0474] For example, if the padded candidates in a block are the same, the mode is replaced with the adjacent mode (e.g., if the same mode is k_mode, it is k_mode-2, k_mode-2, k_mode+1, k_mode+2, etc.) in a manner that does not overlap with the modes included in the candidate group. Alternatively, if the padded candidates in each block are the same or different, the candidate group can be formed by adding a planar mode, a DC mode, a vertical mode, a horizontal mode, and a diagonal mode.

[0475] Through the above process, an intra-frame prediction mode candidate group (normal case) can be constructed. The candidate group constructed in this way belongs to the normal case. Also, an intra-frame prediction mode candidate group (exceptional case) can be self-adaptively constructed based on neighboring blocks.

[0476] For example, if an adjacent block is marked as an exceptional state, the candidate group derived from the block may be eliminated. If a left block is marked as an exceptional state, the candidate group may be composed of an upper block and a predetermined prediction mode (e.g., a DC block, a planar block, a vertical block, a horizontal block, a diagonal block, a mode derived from the upper block, etc.). If an MPM candidate group is composed of three or more MPM candidates, the above example may also be applied in a similar / similar manner.

[0477] The following explanation is based on the following assumption: In this example (chrominance component), there are five intra-frame prediction modes (in this example, DC mode, planar mode, vertical mode, horizontal mode, and color mode), and the encoding / decoding is performed by forming a candidate group with the ordered prediction modes after self-adaptively determining the priority (i.e., the encoding / decoding is performed directly without using MPM).

[0478] First, the color mode is given the highest priority (in this example, index 0; 1 bit is assigned for "0"), and the other modes (in this example, planar, vertical, horizontal, and DC) are given low priority (in this example, indexes 1 to 4 respectively; 3 bits are assigned for "100", "101", "110", and "111").

[0479] If the color mode matches one of the other prediction modes of the candidate group (DC, planar, vertical, horizontal), the priority given to the matched prediction mode (in this example, indexes 1 to 4) can be assigned to the predetermined prediction mode (e.g., diagonal mode, etc.). If there is no match, the candidate group construction is terminated.

[0480] The above process allows for the construction of a candidate group for the intra-frame prediction mode. Such an example corresponds to the usual case, where the color mode is automatically calculated based on the block from which it was obtained. A self-adaptive candidate group can be constructed.

[0481] In this example, the block corresponding to the current block in the other color space from which the color mode is obtained is Since the block is structured to be one block (i.e., undivided), this is commonly referred to as If it is multiple blocks (i.e. split into two or more), it is an exceptional case. As mentioned above, the following hypothetical example may be the case. For example, whether the parent block of the current block and the adjacent block are the same, the division method, etc. Unlike the example where classification is performed based on , there is a high possibility that the characteristics of the current block will differ. That is, based on the relationship between blocks, This is understood to be an example of self-adaptively determining encoding / decoding settings.

[0482] For example, if the corresponding block is expressed as an exceptional state, then the block In this case, the priority of the prediction mode derived from the prediction mode can be lowered. Assign one of the modes (plane, DC, vertical, horizontal) to high priority and assign low priority to the modes above. It is possible to assign the image to other prediction modes and color modes not included in the degree.

[0483] For ease of explanation, the above example is described with some assumptions, but is not limited to these. The same or similar applications are applicable to the above-described various embodiments of the present invention.

[0484] In other words, if there is a block in the neighboring block that is described as an exceptional state, the candidate group Loop A can be used. If there is a block marked as an exceptional state, then the candidate Group B can be used. The above classification is divided into two cases, but in exceptional cases Based on the state and block position, the intra-frame prediction candidate group configuration is automatically performed for each block. It can be realized adaptively.

[0485] In addition, in the above example, we assume tree-based partitioning in the partitioning method. In particular, the above example is based on the results of at least one tree-based partitioning method. A block is set as a coding block, and the block is also called a prediction block, a transformation block, etc. This may be an example of directly performing prediction, transformation, etc. without splitting into

[0486] Another example of a partitioning setting is to use a tree-based partitioning to obtain the coding blocks and The objective of the present invention is to obtain at least one prediction block based on the obtained coding block.

[0487] For example, a tree-based partition (a quadtree in this example) is used to partition the coding blocks ( In addition, the prediction block is divided into two parts based on type (not supported in this example). (possible candidate types are 2N×2N, 2N×N, N×2N, and N×N) In this case, one coding block (in this example, the block is a parent block) The prediction blocks are assumed to be blocks. In this case, the above exceptional conditions are also applied to the predicted block. It is possible.

[0488] As shown in FIG. 16g, a coding block (thick solid line) is divided into two prediction blocks (thin solid lines). If there exists a boundary between the lower block and the upper block, the lower block has different characteristics from the upper block. The lock coding information is not referenced or the priority is lowered.

[0489] FIG. 17 shows an example of a divided block according to an embodiment of the present invention. The block (maximum coding block, 8N x 8N) is divided into coding blocks based on a quadtree. Here is an example of obtaining a block (shaded block, 2N x 2N). The obtained coded block is Based on the group-based partitioning, the image is divided into at least one prediction block (2N×2N, 2N×N, N×2N, N×N).

[0490] Hereinafter, intra-frame prediction mode candidate group setting in the case of obtaining rectangular blocks (2N×N sum N×2N) will be described.

[0491] FIG. 18 shows various examples of setting of intra-frame prediction mode candidate groups for a block for generating prediction information (in this example, the prediction block is 2N×N).

[0492] In this example, if (luminance component) has 67 intraframe prediction modes, select 6 candidates from the neighboring blocks (in this example, left, top, top left, top right, bottom left) and place them in the MPM candidate group.

[0493] Referring to FIG. 13, four candidates can be arranged in the order L3-T3-B0-R0-TL, and two candidates can be arranged in a given mode (eg, plane, DC). In the above configuration, if the maximum number (6 in this example) is not padded, it may include prediction modes derived from prediction modes included in the candidate group (for example, in the case of k_mode, it may be k_mode-2, k_mode-2, k_mode+1, k_mode+2, etc.), predetermined modes (for example, vertical, horizontal, diagonal, etc.), etc.

[0494] In this example, for spatially adjacent blocks, it is assumed that the priority of the candidate group is left block-upper block-lower left block-upper right block-upper left block of the current block (more specifically, the sub-blocks located below the left block and to the right of the upper block), and for a given mode, the order is planar-DC-vertical-horizontal-diagonal mode.

[0495] As shown in Fig. 18a, similar to the candidate group setting in the above example, the current block (2NxN, PU0) can configure a candidate group in the order of l1-t3-l2-tr-tl (other contents are omitted because they are duplicated). In this example, the adjacent blocks of the current block may be blocks that have completed encoding / decoding (encoding blocks, that is, prediction blocks in other encoding blocks).

[0496] Different from the above, if the position of the current block corresponds to PU1, at least one intra-frame prediction mode candidate group can be set. In general, the closer the block is to the current block, the more likely it is that the block has characteristics similar to those of the current block. Therefore, it is most advantageous to arrange the candidate group according to the corresponding block (1). In addition, it is necessary to arrange the candidate group in order to perform parallel processing of encoding / decoding (2).

[0497] If the current block is PU1, in the candidate setting in (1), as shown in b of FIG. 18, the candidate group (where k can be derived from c7 or tr) is arranged in the order of l3-c7-bl-k-l1, and in the candidate group setting in (2), as shown in c of FIG. 18, the candidate group (where k can be derived from tr, etc.) can be arranged in the order of l3-bl-k-l1. The above two examples differ in whether or not the candidate group of the intraframe prediction mode of the upper block is included. That is, in the former case, in order to improve the encoding / decoding efficiency of the intraframe prediction mode, the intraframe prediction mode of the upper block is included in the candidate group. In the latter case, since it is not yet determined whether the encoding / decoding is completed, the intraframe prediction mode of the upper block that cannot be referenced is excluded from the candidate group for parallel processing.

[0498] FIG. 19 shows various examples of setting intra-frame prediction mode candidate groups for a block for generating prediction information (in this example, the prediction block is N×2N).

[0499] In this example, if the (luminance component) has 67 intraframe prediction modes, Six candidates are selected from the blocks (in this example, left, top, top left, top right, bottom left) and the MP Place in M ​​candidate group.

[0500] Referring to FIG. 13, one candidate is arranged in the order of L3-L2-L1-L0 (upper block). The order of T3-T2-T1-T0 (upper block) constitutes one candidate. The order is B0-R0-TL (top left block, top right block, bottom left block). Place two candidates in a given mode (e.g., Planar, DC) In the above configuration, if the maximum number is not padded, the candidate group The prediction modes may include prediction modes derived from prediction modes included in the group, predetermined modes, etc. In this case, the priority of the candidate group configuration is: Left block - Top block - Plane block - DC The order may be block-lower left block-upper right block-upper left block.

[0501] As shown in Fig. 19a, similar to the candidate group setting in the above example, the current block ( N×2N. PU0) arranges candidates in the order of l3-l2-l1-l0, and t1-t0. You can arrange the candidates in the order bl-t2-tl, and arrange two candidates in the order bl-t2-tl. In this case, the adjacent blocks of the current block are blocks that have completed encoding / decoding (encoding blocks). The block may be a prediction block of another coding block.

[0502] If different from the above, and the current block position corresponds to PU1, then at least one In the above example, (1) and (2) can be used to set the intra-frame prediction mode candidate group. and (2) can be placed.

[0503] If the current block is PU1, in the candidate group setting in (1), As shown in b, we arrange the candidate groups in the order of c13-c9-c5-c1, and t3-t2 The candidate groups are arranged in the order of k-tr-t1, and two candidate groups (bl or (k is derived from c13, etc.) and in the candidate group setting in (2), As shown in Fig. 19c, the candidate groups are arranged in the order of t3-t2 and k-tr-t1. We can arrange two candidate groups (k can be derived from bl, etc.) in the order of The above two examples are based on whether the candidate group for the intra-frame prediction mode of the upper block is included or not. In other words, in the former case, the coding / decoding efficiency of the intra-frame prediction mode is improved. In order to achieve this, the intra prediction mode of the left block is included in the candidate group. In this case, it is not yet determined whether the encoding / decoding will be completed, so there is no possibility of parallel processing. In order to do this, we eliminate the intra prediction modes of the left block that cannot be referenced from the candidate group. .

[0504] Therefore, the candidate group configuration can be determined based on the setting of the candidate group configuration. In this example, the candidate group configuration setting (in this example, the candidate group for parallel processing The configuration settings can be implicitly determined, or the relevant information can be stored in the video, sequence, It is possible to explicitly record in units such as pictures, slices, tiles, etc.

[0505] The above is summarized below: Assuming that relevant information is implicitly determined or explicitly generated do.

[0506] Check the intraframe prediction mode candidate group configuration setting (A) at the early stage of encoding / decoding. do.

[0507] The result of the check for A is based on the setting of the preceding prediction block in the same coding block. If possible, include the intra prediction mode of the block in the candidate group (end).

[0508] If the confirmation result for A is that it is prohibited to refer to the setting of a preceding prediction block in the same coding block, the intra-frame prediction mode of that block is excluded from the candidate group (end).

[0509] For ease of explanation, the above examples are described with certain assumptions, but are not limited thereto and the same or similar applications may be applied to the above various embodiments of the present invention.

[0510] FIG. 20 shows an example of block division according to an embodiment of the present invention. In detail, an example is shown in which a basic coding block (maximum coding block) is divided based on a binary tree (or a plurality of tree-based divisions) to obtain a coding block (shaded block A×B). The obtained coding block is set as a prediction block.

[0511] In this case, the motion information prediction candidate group setting in the case of obtaining a rectangular block (AxB, A≠B) will be described.

[0512] FIG. 21 shows various examples relating to setting of intra-frame prediction mode candidate groups of blocks (in this example, coding blocks, 2N×N) for generating prediction information.

[0513] The following assumptions are used for explanation. In the example (luminance component), when there are 67 intraframe prediction modes, 6 candidates are selected from adjacent blocks (left, top, top left, top right, bottom left in the example) and arranged in the MPM candidate group. If the non-MPM candidate group is configured to have multiple groups (A and B in the example, A is a non-MPM candidate, and the mode that is more likely to predict the prediction mode of the current block belongs to A), 16 candidates are arranged in the A group, and 45 candidates are arranged in the B group.

[0514] In this case, group A may include candidates classified according to a certain rule (e.g., composed of equidistant modes in directional modes) that are not included in the modes of the MPM candidate group, or may include candidates that are not included in the final MPM candidate group based on the MPM candidate group priority, etc. Group B may be composed of candidates in the MPM candidate group and the non-MPM candidate group that are not included in group A.

[0515] As shown in a of Figure 21, a current block (CU0 or PU0, assuming a size of 2NxN and horizontal / vertical ratio of 2:1) can have a candidate group of six candidates in the following order: l1-t3-planar-DC-l2-tr-tl-l1*-t3*-l2*-tr*-tl*-vertical-horizontal-diagonal mode. In the above example, * represents a mode derived from the prediction mode of each block (e.g., additive modes such as +1, -1, etc.).

[0516] Also, as shown in b of Figure 21, the current block (CU1 or PU1, size is 2N x N) can form a candidate group with six candidates in the order of l3-c7-planar-DC-bl-k-l1-l3*-c7*-bl*-k*-l1*-vertical-horizontal-diagonal mode.

[0517] In this example, if the setting of (2) in Figure 18 is applied, as shown in b in Figure 21, the prediction mode candidate group for the upper block will be excluded or its priority will be lowered depending on l3-planar-DC-bl-k-l1-c7-l3*-bl*-k*-l1*-vertical-horizontal-diagonal-c7*, and therefore there is a possibility that it will be included in group A.

[0518] However, it may be a rectangular block, and the block is divided into coding units. In that the 1st pixel is divided into 1st pixel and immediately set as a prediction unit without further division. , which is different from FIG. 18. Therefore, as shown in FIG. 18, the candidate group configuration setting is 2) may not be applicable to settings such as

[0519] However, in the case of k in FIG. 21, the encoding / decoding is not completed at that position. Therefore, it can be derived from adjacent blocks that have completed encoding / decoding.

[0520] FIG. 22 shows a block for generating prediction information (in this example, an encoding block N×2N). 11 shows various examples relating to setting of an intra-frame prediction mode candidate group.

[0521] The following explanation is based on the following assumptions. In this example (chrominance component), five intra-frame prediction modes are used. In this example, DC mode, flat mode, vertical mode, horizontal mode, color copy mode If the prediction mode is a prediction mode that is a priority, the candidate prediction modes are arranged according to the priority. The group is self-adaptively determined and encoding / decoding is performed.

[0522] In this case, based on the neighboring blocks (in this example, left, top, top left, top right, bottom left) The priority will be described as an example in which the priority is determined by

[0523] As shown in FIG. 13, the left block L3, the top block T3, the top left block TL, the top right block In the bottom left block R0, the first level candidate can be determined. In this case, the prediction modes having the block are selected as the first level candidates. If multiple modes have the same frequency, a certain priority (e.g., color copy) is assigned to each mode. mode-plane-vertical-horizontal-DC).

[0524] In this example, the mode from the neighboring block (the mode is the prediction mode of the current block and The estimated mode is used to determine the priority (i.e., the amount of bits to be allocated). For example, for the first level, it is "0". For the second to fourth levels, it is "1". 00, 101, 110, 111) and the prediction mode In terms of execution, the MPM candidate setting (in this example, the first bit is determined as 0 or 1. If it is 1, then two bits need to be added. According to the encoding / decoding settings, the first bit For the remaining bits, bypass coding or normal coding can be performed. This is considered similar to the conventional technique (which allows bypass coding to be performed using a single bit).

[0525] As shown in FIG. 22a, the current block (CU0 or PU0, which is of size N×2N) , and horizontal / vertical is assumed to be 1:2) is l3, t1, t1, t2, b1 blocks In the query, first level candidates can be determined.

[0526] Also, as shown in FIG. 22B, the current block (CU1 or PU1, size N×2N ) determines the first-level candidates in c13, t3, t1, tr, and k blocks. It is possible.

[0527] In this example, when the setting (2) in FIG. 19 is applied, the current block CU1 is The first level candidates can be determined in blocks t3, t1, tr, and k. , the block corresponding to the current block in another color space in which the color copy mode is obtained If the color code is not configured to be a single block, then at a given priority, Lower the priority of the copy mode and set the priority to Planar-Vertical-Horizontal-DC-Color Copy. As mentioned above, the following hypothetical example may be used. is based on whether the parent blocks of the current block and the adjacent block are the same, the division method, etc. However, when there are multiple blocks corresponding to different color spaces, the characteristics of the current block are more likely to differ from those of the current block. In other words, this is understood as an example of self-adaptively determining encoding / decoding settings based on the relationship between blocks.

[0528] However, it may be a rectangular block, which is divided into coding units and is immediately set as a prediction unit without further division, which is different from Fig. 19. Therefore, the candidate group configuration setting as shown in Fig. 19 may not be applied to this example.

[0529] However, in the case of k in FIG. 22, since the encoding / decoding is not completed at that position, it can be derived from adjacent blocks where the encoding / decoding is completed.

[0530] For ease of explanation, the above example is described with some assumptions, but is not limited to these. The above various embodiments of the present invention may have the same or similar applications.

[0531] In the embodiments of FIGS. 21 and 22, it is assumed that M×N (M≠N) blocks divided by binary tree division are generated consecutively.

[0532] In the above, the cases shown in Fig. 14 to Fig. 16 (examples of setting candidate groups by determining the relationship between the current block and adjacent blocks, etc.) may occur. That is, in Fig. 21 and Fig. 21, the adjacent blocks before division of CU0 and CU1 are the same, and CU0 and CU1 can be obtained by horizontal division or vertical division of binary tree division.

[0533] Also, in the embodiment shown in FIG. 18 and FIG. 19, it is assumed that after the coding block is divided, multiple rectangular shaped prediction blocks for the coding block are generated.

[0534] In the above, the cases described in Figures 14 to 16 may occur. Therefore, a conflict with the examples in Figures 18 and 19 may occur. For example, in Figure 18, in the case of PU1, it is possible to determine whether to use the information of PU0. In Figures 14 to 16, the characteristics of PU1 are different from those of PU0, so the information of PU0 is not used.

[0535] Regarding the above, the candidate group can be configured if there is no collision based on the settings of the initial stage of encoding / decoding. The candidate group for motion information prediction can be set based on various other encoding / decoding settings.

[0536] The above example will be used to explain the setting of the prediction mode candidate group. In addition, it can be set to restrict the use of reference pixels from neighboring blocks in which an exceptional state is indicated for predicting the current block.

[0537] For example, when a prediction block is generated by dividing the first reference pixels and the second reference pixels according to an embodiment of the present invention, if the second reference pixels are included in a block indicated as an exceptional state, generation of the prediction block using the second reference pixels may be restricted, i.e., the prediction block may be generated using only the first reference pixels.

[0538] In essence, the above example may be regarded as one element of the encoding / decoding settings involving the use of second reference pixels.

[0539] Various cases relating to the setting of intra-frame prediction mode candidate groups according to the present invention will now be described.

[0540] In this example, there are 67 intra-frame prediction modes, consisting of, but not limited to, 65 directional modes and two non-directional modes: Planar and DC. In this example, the MPM candidate group has six We assume that the candidates include, but are not limited to, the MPM candidate group. The candidate group may be composed of 4, 5 or 7 candidates. In addition, the priority is set according to the priority of the MPM candidate group. This refers to the order in which candidates are selected for the MPM candidate group. may be considered as elements for determining the settings of the entropy coding / decoding, etc. The following examples will be explained with a focus on the intensity component, but the color difference components may be the same, similar, or modified. It is also possible to carry out the application.

[0541] The intra-frame prediction mode candidate group (e.g., MPM candidate group, etc.) of the present invention includes The modes to be used include prediction modes of spatially adjacent blocks, a predetermined prediction mode, and a candidate prediction mode. The prediction mode may be a prediction mode derived from the prediction mode. In this case, the encoding / decoding setting Determining rules (e.g., priorities, etc.) for forming candidate groups based on can be done.

[0542] In the examples given below, a fixed candidate group configuration is illustrated.

[0543] As an example (1), an intra-frame prediction mode candidate group (in this example, an MPM candidate group) is used. It is possible to support fixed priorities for configuring a loop. For example, 1 For example, the prediction mode of spatially neighboring blocks can be When a node is added to the candidate group, the left block (L3 in FIG. 13) - the upper block ( T3 in Figure 13) - Lower Left Block (B0 in Figure 13) - Upper Right Block ( The order of the prediction mode is from the top left block (R0 in FIG. 13) to the top left block (TL in FIG. 13). When added to the candidate group, the order is Planar-DC-Vertical-Horizontal-Diagonal mode. In addition, the above examples may be combined. For example, the left block - the top block - the bottom block The order is face block - DC block - bottom left block - top right block - top left block. If the number of candidates cannot be padded by running the candidates according to priority, the prediction model included Derivation mode of the code (e.g. +1, -1 in left block mode, +1 in top block mode, -1, etc.), vertical mode, horizontal mode, diagonal mode, etc. may have the following priorities:

[0544] In the above example, if the prediction modes of spatially adjacent blocks are added to the candidate group, In this case, the candidate mode is left block-upper block-lower left block-upper right block-upper left block. In addition, the prediction mode of the left block (L3 in FIG. 12) is determined according to the order. If there is no corresponding block, the next higher priority block is included in the candidate group. The prediction mode that is the block (T3 in FIG. 13) is included in the candidate group. The prediction mode of the corresponding block is not available. If there is an overlap with an included mode or if the order jumps to the next block.

[0545] Another example is adding the prediction modes of spatially neighboring blocks to the candidate group. In this case, the order is left block - top block - bottom left block - top right block - top left block. A candidate group can be constructed. In this case, the prediction mode for the left block is first , L3, but is unavailable or overlapped. If the mode exists, the next sub-blocks L2, L1, and L0 of the left block are selected in that order. Similarly, the same or similar settings are used to pad the prediction mode candidates for the left block. Block (T3-T2-T1-T0), bottom left block (B0-B1-B2-B3), top right Apply to the block (R0-R1-R2-R3), the top left block (TL). For example, L3 -If you are unable to add the target to the candidate group even after executing the commands in the order L2-L1-L0, try the following: You can execute blocks in order.

[0546] The self-adaptive candidate group configuration will be described in the following example. The self-adaptive candidate group configuration may be determined according to the state of the current block (e.g., the size and shape of the block), the state of the neighboring block (e.g., the size and shape of the block, prediction mode, etc.), or the relationship between the current block and the neighboring block.

[0547] As an example (3), a self-adaptive priority for configuring the intra prediction mode candidate group (which in this example is the MPM candidate group) can be supported. Priority can be set based on frequency, i.e., frequently occurring modes may have a high priority, and less frequently occurring prediction modes may have a low priority.

[0548] For example, the priority can be set based on the frequency of prediction modes of spatially neighboring blocks.

[0549] A predefined priority to be used when the frequency is the same can be supported. For example, if the modes that occur twice in the left block, the top block, the bottom left block, the top right block, and the top left block are mode 6 and mode 31, respectively (assuming that one prediction mode is obtained for each block), and the mode that occurs once is mode 14, then in this example (assuming that the mode that occurred in the block that appeared in the previous order in the order of left block-top block-bottom left block-top right block-top left block is mode 6), mode 6 and mode 31 are included as first and second candidates.

[0550] Plane and DC are included as the third and fourth candidates. Also, mode 14, which is a prediction mode having a frequency of once, is included as the fifth candidate. Then, modes 5 and 7 derived from the first and second candidates, and modes 30 and 32, can be arranged in the next priority. Also, modes 13 and 15, which are modes derived from the fifth candidate, are arranged in the next priority. Then, the vertical mode, horizontal mode, and diagonal mode may have the next priority.

[0551] That is, for prediction modes with a frequency of 2 or more, a higher priority is assigned than the planar mode and DC mode. For prediction modes with a frequency of 1, a lower priority is assigned than the planar mode and DC mode. Derived modes and predetermined modes such as those in the above example are assigned lower priority.

[0552] In short, the predetermined priority (for example, the order is left block-upper block-plane block-DC block-lower left block-upper right block-upper left block) is set by considering the statistical characteristics of a general image, and the self-adaptive priority (in this example, included in the candidate group according to frequency) performs some modification of the predetermined priority (in this example, fixed plane and DC are arranged in front of the mode with a frequency of 2 or more times and arranged in the back of the mode with a frequency of 1 time) by considering some characteristics of the image.

[0553] In addition, not only can the priority for candidate group configuration be determined based on the frequency, but also the setting of binarization and entropy encoding / decoding for each candidate belonging to the MPM candidate group can be determined based on the frequency. As an example, binarization of MPM candidates having m frequencies can be determined based on the frequency. Or, context information for the candidates can be self-adaptively determined according to the frequency. That is, in this example, context information that sets the selection probability of the mode as high can be used. That is, when m is 1 to 4 (in this example, the maximum frequency is 4 because two of the total six candidates include non-directional modes), different context information can be set.

[0554] The 0 in the bin index (the order of each bit when one or more bits are set based on the binarization setting. For example, when the MPM candidate is "010", the first bin to the third bin may be 0, 1, 0) indicates that the candidate is an MP M (if one bin...

Claims

1. An intra-frame prediction method applied to a decoding device, comprising: deriving an intra prediction mode for a current block; determining a pixel line to be used for intra-frame prediction of the current block among a plurality of pixel lines; performing intra prediction of the current block based on the intra prediction mode and the determined pixel line; and correcting predicted pixels of the current block according to the intra-frame prediction mode; performing intra-frame prediction of the current block, The intra-frame prediction method includes performing the intra-frame prediction on a sub-block basis of a current block, the sub-block being determined based on at least one of a second flag indicating whether or not to perform division, division direction information, or division number information.

2. The correction is The method further includes determining at least one of a second reference pixel or a weighting value used in the compensation based on a position of the predicted pixel of the current block. The intraframe prediction method according to claim 1 .

3. The correction is selectively performed based on at least one of a position of a pixel line of the current block, an intra-frame prediction mode of the current block, and whether intra-frame prediction is performed on a sub-block basis of the current block. The intraframe prediction method according to claim 2 .

4. the pixel line is a reference pixel line and is determined based on the size and shape of the current block; The intraframe prediction method according to claim 1 .

5. The method further includes performing filtering on the first reference pixel of the determined pixel line. The intraframe prediction method according to claim 1 .

6. The filtering is selectively performed based on a first flag indicating whether or not filtering is performed on a first reference image used in intra-frame prediction. The intraframe prediction method according to claim 5 .

7. the first flag is derived by the decoding device based on coding parameters of the current block; The encoding parameters include at least one of a block size, a component type, an intraframe prediction mode, and whether or not to apply intraframe prediction in units of subblocks. The intraframe prediction method according to claim 6.

8. An intraframe prediction method applied to an encoding device, comprising: deriving an intra prediction mode for a current block; determining a pixel line to be used for intra-frame prediction of the current block among a plurality of pixel lines; performing intra prediction of the current block based on the intra prediction mode and the determined pixel line; and correcting predicted pixels of the current block according to the intra-frame prediction mode; performing intra-frame prediction of the current block, The intra-frame prediction method includes performing the intra-frame prediction on a sub-block basis of a current block, the sub-block being determined based on at least one of a second flag indicating whether or not to perform division, division direction information, or division number information.

9. The correction is The method further includes determining at least one of a second reference pixel or a weighting value used in the compensation based on a position of a predicted pixel of the current block. The intraframe prediction method according to claim 8.

10. The correction is selectively performed based on at least one of a position of a pixel line of the current block, an intra-frame prediction mode of the current block, or whether intra-frame prediction is performed on a sub-block basis of the current block. The intraframe prediction method according to claim 9 .

11. the pixel line is a reference pixel line and is determined based on the size and shape of the current block; The intraframe prediction method according to claim 8.

12. The method further includes performing filtering on the first reference pixel of the determined pixel line. The intraframe prediction method according to claim 8.

13. The filtering is selectively performed based on a first flag indicating whether or not filtering is performed on a first reference image used in intra-frame prediction. The intraframe prediction method according to claim 12.

14. The method further includes encoding the first flag based on an encoding parameter of the current block and including the first flag in a bitstream; The encoding parameters include at least one of a block size, a component type, an intraframe prediction mode, and whether or not to apply intraframe prediction in units of subblocks. The intraframe prediction method according to claim 13.

15. A decoding device, comprising: a prediction mode decoding unit configured to derive an intra-frame prediction mode of the current block; a reference pixel arrangement unit configured to determine a pixel line to be used for intra-frame prediction of the current block among a plurality of pixel lines; and a prediction block generator configured to perform intra-frame prediction of the current block based on the intra-frame prediction mode and the determined pixel line, and to correct a prediction pixel of the current block based on the intra-frame prediction mode; performing intra-frame prediction of the current block, performing the intra prediction on a sub-block basis of the current block, the sub-block being determined based on at least one of a second flag indicating whether or not to perform division, division direction information, or division number information; Decryption device.

16. 1. An encoding device, comprising: a prediction mode determination unit configured to derive an intra-frame prediction mode of a current block; a reference pixel arrangement unit configured to determine a pixel line to be used for intra-frame prediction of the current block among a plurality of pixel lines; and a prediction block generator configured to perform intra-frame prediction of the current block based on the intra-frame prediction mode and the determined pixel line, and to correct a prediction pixel of the current block based on the intra-frame prediction mode; performing intra-frame prediction of the current block, performing the intra prediction on a sub-block basis of the current block, the sub-block being determined based on at least one of a second flag indicating whether or not to perform division, division direction information, or division number information; Encoding device.

17. A computing device, a memory for storing a program executable by a processor; A computing device comprising: a processor that, when the program is executed, executes the intra-frame prediction method according to any one of claims 1 to 7 or the intra-frame prediction method according to any one of claims 8 to 14.

18. A computer storage medium having a program for causing a computer to execute the intraframe prediction method according to any one of claims 1 to 7 or the intraframe prediction method according to any one of claims 8 to 14.

Citation Information

Patent Citations

  • Video decoder, video decoding method, video encoder, video encoding method and computer readable recording medium

    JP2018050195A

  • Video encoding method and decoding method, apparatuses therefor, programs therefor, and storage media which store the programs

    US20100027655A1

  • Image encoding / decoding method and device, and recording medium in which bitstream is stored

    US20190222837A1

  • Moving-image decoder, moving-image decoding method, moving-image encoder, moving-image encoding method, and computer readable recording medium

    US20190230374A1

  • Video signal processing method and device

    US20190313116A1