Image encoding / decoding method and apparatus

By determining and correcting intra-frame prediction modes for image blocks based on color components and using selective reference pixels and filters, the method improves image encoding/decoding efficiency and accuracy, addressing inefficiencies in existing technologies.

JP2026010184APending Publication Date: 2026-01-21INST OF IMAGE TECH INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025178983
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-09-07
Filing Date
2025-10-23
Publication Date
2026-01-21

AI Technical Summary

Technical Problem

Existing image encoding/decoding methods lack efficiency and accuracy in intra-frame prediction, particularly for different color components, leading to suboptimal performance in multimedia data processing.

Method used

The method determines an intra-frame prediction mode for a current block, generates a predicted block based on this mode, and corrects it using reference pixels and filters, considering the color component as luminance or chrominance, with classification of prediction modes and selective use of reference pixel lines and filters.

Benefits of technology

This approach enhances the efficiency and accuracy of intra-frame prediction, improving coding performance by selectively utilizing reference pixel lines and filters, thereby enhancing the overall image processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026010184000001_ABST
    Figure 2026010184000001_ABST
Patent Text Reader

Abstract

A method and apparatus for deriving an intra-prediction mode according to a color component are provided.SOLUTION: An image encoding / decoding method and device determine an intra-prediction mode of a target block, generate a prediction block of the target block based on the intra-prediction mode, and correct the generated prediction block. In addition, when the color component of the target block is a luma component, a prediction mode candidate group composed of a directional mode and a non-directional mode may be referred to, and when the color component of the target block is a chroma component, a prediction mode candidate group in which at least one of a directional mode, a non-directional mode, a color mode, or a color copy mode is supported may be referred to.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an image encoding / decoding method and apparatus. [Background technology]

[0002] With the spread of the Internet and mobile terminals and the development of information and communication technology, the use of multimedia data is rapidly increasing. Therefore, in order to perform various services and operations through image prediction in various systems, the need for improving the performance and efficiency of image processing systems is greatly increasing, but the results of research and development that can respond to this trend are currently insufficient.

[0003] Thus, in the prior art image encoding / decoding methods and devices, there is a need for performance improvements in image processing, particularly image encoding or image decoding. Summary of the Invention [Problem to be solved by the invention]

[0004] SUMMARY OF THE INVENTION An object of the present invention is to provide a method and apparatus for deriving an intra-frame prediction mode according to color components.

[0005] An object of the present invention is to provide a method and device for constructing reference pixels for intra-frame prediction.

[0006] An object of the present invention is to provide an image encoding / decoding method and apparatus that performs correction on intra-frame prediction using any pixel. [Means for solving the problem]

[0007] The image encoding / decoding method and apparatus according to the present invention can determine an intra-frame prediction mode for a current block, generate a predicted block for the current block based on the intra-frame prediction mode, and correct the predicted block.

[0008] In the image encoding / decoding method and apparatus according to the present invention, the intra prediction mode of the current block can be determined to be a mode within a prediction mode candidate group according to the state information of the current block.

[0009] In the image encoding / decoding method and apparatus according to the present invention, if the color component of the target block is a luminance component, a prediction mode candidate group consisting of a directional mode and a non-directional mode can be referenced, and if the color component of the target block is a chrominance component, a prediction mode candidate group supporting at least one of a directional mode, a non-directional mode, a color mode, or a color copy mode can be referenced.

[0010] In the image encoding / decoding method and apparatus according to the present invention, the prediction mode candidates can be classified into a plurality of categories in consideration of the maximum number of prediction modes that can be included in each category or the priority order.

[0011] In the image encoding / decoding method and apparatus according to the present invention, the prediction mode candidates can be classified into a first category including a non-directional mode and a directional mode, and a second category including a color copy mode.

[0012] In the image encoding / decoding method and apparatus according to the present invention, first information that identifies one of a plurality of categories can be obtained, and second information that identifies the intra-screen prediction mode of the target block within the category determined by the first information can be obtained.

[0013] In the image encoding / decoding method and apparatus according to the present invention, the intra prediction mode of the current block can be determined from the identified category based on the first information and the second information.

[0014] In the image encoding / decoding method and apparatus according to the present invention, the second information may not be acquired when the category according to the first information includes only one prediction mode.

[0015] In the image encoding / decoding method and apparatus according to the present invention, the step of configuring reference pixels to be used for the intra-frame prediction may further include the step of configuring reference pixels to be used for the intra-frame prediction, and the reference pixels may belong to all or part of a plurality of reference pixel lines supported by the decoding device.

[0016] The image encoding / decoding method and apparatus according to the present invention may further include applying at least one of a weighting filter and an interpolation filter to the constructed reference pixels.

[0017] In the image encoding / decoding method and apparatus according to the present invention, the step of correcting the predicted block is selectively performed based on predetermined encoding information, and the encoding information may include at least one of an image type, a color component, status information, an encoding mode, an intra-frame prediction mode, whether or not sub-block-based intra-frame prediction is applied, or a reference pixel line. [Effects of the Invention]

[0018] According to the present invention, it is possible to efficiently induce an intra-frame prediction mode.

[0019] According to the present invention, it is possible to improve the efficiency of intra-frame prediction through selective use of reference pixel lines and predetermined filtering.

[0020] According to the present invention, the accuracy of intra prediction can be improved by correcting the predicted block, and coding performance can be improved. [Brief explanation of the drawings]

[0021] [Figure 1] 1 is a conceptual diagram illustrating an image encoding and decoding system according to an embodiment of the present invention; [Figure 2] 1 is a block diagram showing the configuration of an image encoding device according to an embodiment of the present invention. [Figure 3] 1 is a block diagram showing the configuration of an image decoding device according to an embodiment of the present invention; [Figure 4]10A to 10C are exemplary diagrams showing various division forms that can be obtained by the block division unit of the present invention; [Figure 5] 10 is an exemplary diagram illustrating a prediction mode in intra-frame prediction according to an embodiment of the present invention; [Figure 6] FIG. 2 is a layout diagram of a target block and its adjacent blocks according to an embodiment of the present invention. [Figure 7] 1 is a flowchart illustrating a method for correcting intra prediction according to an embodiment of the present invention. [Figure 8] FIG. 2 is a layout diagram of pixels of a current block and neighboring blocks according to an embodiment of the present invention. [Figure 9] 10 is a diagram illustrating a correction method based on multiple reference pixel lines according to an embodiment of the present invention; [Figure 10] 1 is a flowchart illustrating a method for correcting intra prediction according to an embodiment of the present invention. [Figure 11] 10 is an exemplary diagram of an arbitrary pixel used for predicted pixel correction according to an embodiment of the present invention; [Figure 12] 10A and 10B are diagrams illustrating an example in which correction is performed based on an arbitrary pixel according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION

[0022] The image encoding / decoding method and apparatus according to the present invention can determine an intra-frame prediction mode for a current block, generate a predicted block for the current block based on the intra-frame prediction mode, and correct the predicted block.

[0023] In the image encoding / decoding method and apparatus according to the present invention, the intra prediction mode of the current block can be determined to be a mode within a prediction mode candidate group according to the state information of the current block.

[0024] In the image encoding / decoding method and apparatus according to the present invention, if the color component of the target block is a luminance component, a group of prediction mode candidates consisting of a directional mode and a non-directional mode can be referenced, and if the color component of the target block is a chrominance component, a group of prediction mode candidates supporting at least one of a directional mode, a non-directional mode, a color mode, or a color copy mode can be referenced.

[0025] In the image encoding / decoding method and apparatus according to the present invention, the prediction mode candidates can be classified into a plurality of categories in consideration of the maximum number of prediction modes that can be included in each category or the priority order.

[0026] In the image encoding / decoding method and apparatus according to the present invention, the prediction mode candidates can be classified into a first category including a non-directional mode and a directional mode, and a second category including a color copy mode.

[0027] In the image encoding / decoding method and apparatus according to the present invention, first information that identifies one of a plurality of categories can be obtained, and second information that identifies the intra-screen prediction mode of the target block within the category determined by the first information can be obtained.

[0028] In the image encoding / decoding method and apparatus according to the present invention, the intra prediction mode of the current block can be determined from the identified category based on the first information and the second information.

[0029] In the image encoding / decoding method and apparatus according to the present invention, the second information may not be acquired when the category according to the first information includes only one prediction mode.

[0030] In the image encoding / decoding method and apparatus according to the present invention, the step of configuring reference pixels to be used for the intra-frame prediction may further include the step of configuring reference pixels to be used for the intra-frame prediction, and the reference pixels may belong to all or part of a plurality of reference pixel lines supported by the decoding device.

[0031] The image encoding / decoding method and apparatus according to the present invention may further include applying at least one of a weighting filter and an interpolation filter to the constructed reference pixels.

[0032] In the image encoding / decoding method and apparatus according to the present invention, the step of correcting the predicted block is selectively performed based on predetermined encoding information, and the encoding information may include at least one of an image type, a color component, status information, an encoding mode, an intra-frame prediction mode, whether or not sub-block-based intra-frame prediction is applied, or a reference pixel line.

[0033] [Mode for carrying out the invention] Since the present invention can be modified in various ways and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description, but it should be understood that the present invention is not limited to the specific embodiments, and includes all modifications, equivalents, and alternatives within the spirit and technical scope of the present invention.

[0034] The terms "first," "second," etc. may be used to describe various elements, but these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, a first element can be termed a second element, and similarly, a second element can be termed a first element, without departing from the scope of the present invention. The term "and / or" includes a combination of two or more related listed items or any of two or more related listed items.

[0035] When a component is said to be "coupled" or "connected" to another component, it should be understood that the component may be directly coupled or connected to the other component, but there may be other components between them. Conversely, when a component is said to be "directly coupled" or "directly connected" to another component, it should be understood that there are no other components between them.

[0036] The terms used in the present invention are merely used to describe specific embodiments and do not limit the present invention. A singular expression includes a plural expression unless the context clearly indicates otherwise. In the present invention, the terms "comprise" or "have" and the like specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or possibility of addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0037] Unless otherwise defined, all terms used herein, including technical or scientific terms, are meant to be the same as commonly understood by a person of ordinary skill in the art to which the present invention pertains. Terms defined in commonly used dictionaries should be interpreted in accordance with the meaning they have in the context of the relevant art, and should not be interpreted in an ideal or overly formal sense unless explicitly defined in the present invention.

[0038] Typically, an image may be configured with one or more color spaces depending on its color format. Depending on the color format, it may be configured with one or more pictures of a fixed size or one or more pictures of different sizes. For example, in a YCbCr color configuration, color formats such as 4:4:4, 4:2:2, 4:2:0, and monochrome (composed of only Y) are supported. For example, in the case of YCbCr 4:2:0, it may be configured with one luminance component (Y in this example) and two chrominance components (Cb / Cr in this example). In this case, the horizontal / vertical ratio of the chrominance component to the luminance component may be 1:2. For example, in the case of 4:4:4, the horizontal and vertical ratios may be the same. When configured with one or more color spaces as in the above example, the picture may be divided into each color space.

[0039] Images can be classified into I, P, B, etc. depending on the image type (e.g., picture type, slice type, tile group type, tile type, brick type, etc.), where I image type can mean an image that is coded by itself without using a reference picture, P image type can mean an image that is coded using a reference picture but allows only forward prediction, and B image type can mean an image that is coded using a reference picture and allows forward / backward prediction, but depending on the coding settings, some of the above types may be combined (P and B may be combined) or image types with other configurations may be supported.

[0040] Various encoding / decoding information generated in the present invention can be processed explicitly or implicitly. Here, explicit processing can be understood as generating encoding / decoding information in the form of a sequence, slice, tile group, tile, brick, block, sub-block, etc. and recording it in a bitstream, and parsing related information in the decoder at the same level as the encoder to restore decoded information. Here, implicit processing can be understood as processing encoding / decoding information in the encoder and decoder using the same process or rule.

[0041] FIG. 1 is a conceptual diagram showing an image encoding and decoding system according to an embodiment of the present invention.

[0042] Referring to FIG. 1, the image encoding device 105 and the decoding device 100 may be user terminals such as a personal computer (PC), a notebook computer, a personal digital assistant (PDA), a portable multimedia player (PMP), a PlayStation Portable (PSP), a wireless communication terminal, a smartphone, or a TV, or may be server terminals such as an application server or a service server, and may include various devices including a communication device such as a communication modem for communicating with various devices or wired or wireless communication networks, memories (120, 125) for storing various programs and data for inter or intra prediction to encode or decode an image, or processors (110, 115) for executing programs, performing calculations, and control.

[0043] Furthermore, the image coded into a bitstream by the image coding device 105 can be transmitted to the image decoding device 100 in real time or non-real time via a wired or wireless communication network (Network) such as the Internet, a short-range wireless communication system, a wireless LAN network, a WiBro network, or a mobile communication network, or via various communication interfaces such as a cable or a Universal Serial Bus (USB), and can be restored and played back by being decoded by the image decoding device 100. Furthermore, the image coded into a bitstream by the image coding device 105 can be transmitted from the image coding device 105 to the image decoding device 100 via a computer-readable recording medium.

[0044] The image encoding device and the image decoding device may be separate devices, but may be implemented as a single image encoding / decoding device. In this case, some components of the image encoding device may be substantially the same technical elements as some components of the image decoding device, and may be implemented to include at least the same structure or perform at least the same functions.

[0045] Therefore, in the following detailed description of the technical elements and their operating principles, redundant descriptions of corresponding technical elements will be omitted. Also, since the image decoding device corresponds to a computing device that applies the image coding method performed in the image coding device to decoding, the following description will focus on the image coding device.

[0046] The computing device may include a memory for storing a program or software module for implementing the image encoding method and / or the image decoding method, and a processor coupled to the memory for executing the program, where the image encoding device may be referred to as an encoder and the image decoding device may be referred to as a decoder.

[0047] FIG. 2 is a block diagram showing the configuration of an image encoding device according to an embodiment of the present invention.

[0048] Referring to FIG. 2, the image encoding device 20 may include a prediction unit 200, a subtraction unit 205, a transformation unit 210, a quantization unit 215, an inverse quantization unit 220, an inverse transformation unit 225, an addition unit 230, a filter unit 235, an encoded picture buffer 240, and an entropy encoding unit 245.

[0049] The prediction unit 200 may be implemented using a prediction module, which is a software module, and may generate a predicted block for a block to be coded using intra prediction or inter prediction. The prediction unit 200 may generate a predicted block by predicting a target block to be currently coded in an image. In other words, the prediction unit 200 may predict pixel values ​​of each pixel of a target block to be coded in an image using intra prediction or inter prediction, and generate a predicted block having predicated pixel values ​​of each generated pixel. The prediction unit 200 may also transmit information required for generating a predicted block, such as information about a prediction mode (e.g., intra prediction mode or inter prediction mode), to the coding unit, allowing the coding unit to code the information about the prediction mode. In this case, the processing unit in which prediction is performed and the processing unit in which the prediction method and specific contents are determined may be determined according to coding settings. For example, the prediction method, prediction mode, etc. may be determined in prediction units, and prediction may be performed in transform units.

[0050] The inter-picture prediction unit can distinguish between temporal prediction and spatial prediction based on reference pictures. Temporal prediction is a prediction method for finding motion from a picture temporally different from the current picture, while spatial prediction is a prediction method for finding motion from a current picture (an area where encoding has been completed, a predetermined area adjacent to the target block) that is temporally the same as the current picture. This can be managed either collectively through a reference picture list or by differentiating the encoding modes.

[0051] In addition, the inter-frame prediction unit may distinguish between a motion model and a non-motion model according to the motion prediction method. The motion model performs prediction by considering only translation, while the non-motion model performs prediction by considering not only translation but also rotation, perspective, zoom in / out, and other motions. Assuming unidirectional prediction, the motion model may require one motion vector, while the non-motion model may require one or more motion information (e.g., one motion vector + rotation angle / scale factor, two or more motion vectors, etc.; next, assume two or more motion vectors are used). In the non-motion motion model, each motion vector may be information applied to a predetermined position of the target block, such as the upper left vertex, upper right vertex, or lower left vertex of the target block, and the position of the region to be predicted of the target block may be obtained in pixel units or sub-block units (an integer equal to or greater than two, such as 4×4 or 8×8). Depending on the motion model, the inter-frame prediction unit may commonly apply some of the processes described below and separately apply some of the processes described below.

[0052] The inter prediction unit may include a reference picture construction unit, a motion estimation unit, a motion compensation unit, a motion information determination unit, and a motion information encoding unit. The reference picture construction unit may include pictures coded before or after the current picture in reference picture lists L0 and L1. A prediction block may be obtained from a reference picture included in the reference picture list, and the current picture may also be composed of reference pictures according to encoding settings and included in at least one of the reference picture lists.

[0053] The reference picture construction unit in the inter prediction unit may include a reference picture interpolation unit and may perform an interpolation process for fractional pixels according to interpolation accuracy. For example, an 8-tap DCT-based interpolation filter may be applied to a luminance component, and a 4-tap DCT-based interpolation filter may be applied to a chrominance component.

[0054] The motion estimation part in the inter-frame prediction part is a process of searching for a block that has a high correlation with the target block through a reference picture, and various methods such as FBMA (Full search-based block matching algorithm) and TSS (Three step search) can be used, and the motion compensation part refers to a process of obtaining a prediction block through a motion estimation process.

[0055] A motion information determination unit in the inter prediction unit may perform a process for selecting optimal motion information for a current block. The motion information may be coded using motion information coding modes such as skip mode, merge mode, and competition mode. The modes may be configured by combining modes supported according to a motion model, and examples thereof may include skip mode (motion), skip mode (non-motion), merge mode (motion), merge mode (non-motion), competition mode (motion), and competition mode (non-motion). Some of the modes may be included in the candidate set depending on coding settings.

[0056] The motion information coding mode can obtain a predicted value of motion information (motion vector, reference picture, prediction direction, etc.) of a current block from at least one candidate block, and when two or more candidate blocks are supported, optimal candidate selection information can be generated. The skip mode (without residual signal) and the merge mode (with residual signal) can use the predicted value as the motion information of the current block, and the competitive mode can generate difference value information between the motion information of the current block and the predicted value.

[0057] The candidate group for the motion information prediction value of the target block is adaptive according to the motion information coding mode and may have various configurations. The candidate group may include motion information of blocks spatially adjacent to the target block (e.g., left, upper, upper left, upper right, and lower left blocks), motion information of blocks temporally adjacent to the target block (e.g., left, right, upper, lower, upper left, upper right, lower left, and lower right blocks including a block <center> in another image corresponding to or corresponding to the target block), and mixed motion information of spatial and temporal candidates (e.g., information obtained by using the average value, median value, etc. of two or more candidates using the motion information of spatially adjacent blocks and the motion information of temporally adjacent blocks; motion information may be obtained in units of the target block or sub-blocks of the target block).

[0058] There may be a priority order for constructing a group of motion information predictor candidates. The order of inclusion in constructing a group of predictor candidates may be determined according to the priority order, and the construction of the group of candidates may be completed when the number of candidates (determined according to the motion information coding mode) is filled according to the priority order. In this case, the priority order may be determined in the order of motion information of spatially adjacent blocks, motion information of temporally adjacent blocks, and mixed motion information of spatial and temporal candidates, but other variations are also possible.

[0059] For example, spatially adjacent blocks may be included in the candidate set in the order left-top-top-top-bottom-left-top block, etc., and temporally adjacent blocks may be included in the candidate set in the order bottom-right-middle-right-bottom block, etc.

[0060] The subtraction unit 205 may subtract a prediction block from a current block to generate a residual block. That is, the subtraction unit 205 may calculate the difference between the pixel value of each pixel of the current block to be coded and the predicted pixel value of each pixel of the prediction block generated via the prediction unit to generate a residual block, which is a block-shaped residual signal. The subtraction unit 205 may also generate a residual block based on a unit other than a block unit obtained via a block division unit (to be described later).

[0061] The transform unit 210 can transform a signal belonging to the spatial domain into a signal belonging to the frequency domain. A signal obtained through the transform process is called a transformed coefficient. For example, a transform block having transform coefficients can be obtained by transforming a residual block having a residual signal transmitted from the subtraction unit. The input signal is determined according to the coding setting and is not limited to a residual signal.

[0062] The transform unit may transform the residual block using a transform technique such as a Hadamard transform, a discrete sine transform (DST based-transform), or a discrete cosine transform (DCT based-transform), but is not limited to these, and various improved and modified transform techniques may be used.

[0063] At least one of the transformation techniques may be supported, and each of the transformation techniques may support at least one detailed transformation technique, where the detailed transformation techniques may be configured such that some of the basis vectors are different for each transformation technique.

[0064] For example, in the case of DCT, one or more detailed conversion techniques from DCT-1 to DCT-8 can be supported, and in the case of DST, one or more detailed conversion techniques from DST-1 to DST-8 can be supported. A group of candidate conversion techniques can be configured by configuring some of the detailed conversion techniques. For example, DCT-2, DCT-8, and DST-7 can be configured as candidate conversion techniques for conversion.

[0065] The transformation can be horizontal or vertical. For example, a spatial domain pixel value can be transformed into the frequency domain using a one-dimensional transform in the horizontal direction (using a DCT-2 transform technique) and a one-dimensional transform in the vertical direction (using a DST-7 transform technique), resulting in a total of two-dimensional transformation.

[0066] Transformation can be performed using a single fixed transform technique, or by adaptively selecting a transform technique according to encoding settings. In this case, in the adaptive case, the transform technique can be selected using an explicit or implicit method. In the explicit case, selection information for each transform technique or transform technique set applied in the horizontal and vertical directions can be generated in units such as blocks. In the implicit case, encoding settings can be defined according to the image type (I / P / B), color components, block size / shape / position, intra-frame prediction mode, etc., and a predetermined transform technique can be selected accordingly.

[0067] Also, some of the conversions may be omitted depending on the encoding settings, which means that one or more horizontal / vertical units may be omitted explicitly or implicitly.

[0068] The transform unit can transmit the information necessary to generate a transform block to the encoder to encode it, and then record the information into a bitstream and transmit it to the decoder, and the decoding unit of the decoder can parse the information and use it in the inverse transform process.

[0069] The quantization unit 215 may quantize an input signal. At this time, a signal obtained through the quantization process is called a quantized coefficient. For example, a residual block having a residual transform coefficient transmitted from a transform unit may be quantized to obtain a quantized block having a quantized coefficient. However, the input signal is determined according to a coding setting, and is not limited to a residual transform coefficient.

[0070] The quantization unit may quantize the transformed residual block using a quantization technique such as Dead Zone Uniform Threshold Quantization or Quantization Weighted Matrix, but is not limited thereto, and various improved and modified quantization techniques may be used.

[0071] The quantization process can be omitted depending on the encoding settings. For example, the quantization process (including the inverse process) can be omitted depending on the encoding settings (e.g., a quantization parameter of 0, i.e., a lossless compression environment). As another example, the quantization process can be omitted if the compression performance of quantization is not exhibited depending on the characteristics of the image. In this case, the region in the quantization block (M×N) where the quantization process is omitted is the entire region or a partial region (M / 2×N / 2, M×N / 2, M / 2×N, etc.), and the quantization omission selection information can be implicitly or explicitly determined.

[0072] The quantization unit can transmit the information necessary to generate a quantization block to the encoding unit to encode it, and then record the information into a bitstream and transmit it to the decoder, and the decoding unit of the decoder can parse the information and use it in the inverse quantization process.

[0073] In the above example, the explanation is based on the assumption that the residual block is transformed and quantized through a transform unit and a quantization unit. However, the residual signal may be transformed to generate a residual block having transform coefficients without performing the quantization process. Alternatively, the residual signal of the residual block may be subjected to only the quantization process without converting it into transform coefficients, or both the transform and quantization processes may be omitted. This can be determined according to the settings of the encoder.

[0074] The inverse quantization unit 220 inverse quantizes the residual block quantized by the quantization unit 215. That is, the inverse quantization unit 220 inverse quantizes the quantized frequency coefficient sequence to generate a residual block having frequency coefficients.

[0075] The inverse transform unit 225 inversely transforms the residual block dequantized by the inverse quantization unit 220. That is, the inverse transform unit 225 inversely transforms the frequency coefficients of the dequantized residual block to generate a residual block having pixel values, i.e., a reconstructed residual block. Here, the inverse transform unit 225 can perform inverse transform by using the transform method used by the transform unit 210 in reverse.

[0076] The adder 230 reconstructs the current block by adding the prediction block predicted by the predictor 200 and the residual block reconstructed by the inverse transformer 225. The reconstructed current block is stored in the coding picture buffer 240 as a reference picture (or reference block), and can be used as a reference picture when encoding the next block of the current block or another block or picture following the current block.

[0077] The filter unit 235 may include one or more post-processing filter processes, such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF). The deblocking filter can remove block artifacts that occur at boundaries between blocks from a reconstructed picture. The ALF can perform filtering based on a value obtained by comparing an image reconstructed after a block is filtered through a deblocking filter with an original image. The SAO can restore an offset difference between a residual block to which the deblocking filter is applied and an original image on a pixel-by-pixel basis. Such post-processing filters can be applied to a reconstructed picture or block.

[0078] The coded picture buffer 240 can store blocks or pictures reconstructed through the filter unit 235. The reconstructed blocks or pictures stored in the coded picture buffer 240 can be provided to the prediction unit 200, which performs intra prediction or inter prediction.

[0079] The entropy coding unit 245 scans the generated quantized frequency coefficient sequence according to various scanning methods to generate a quantized coefficient sequence, and then encodes and outputs the quantized coefficient sequence using an entropy coding technique, etc. The scan pattern can be set to one of various patterns such as zigzag, diagonal, raster, etc. Also, the entropy coding unit 245 can generate coded data including coding information transmitted from each component and output the coded data as a bitstream.

[0080] FIG. 3 is a block diagram showing the configuration of an image decoding device according to an embodiment of the present invention.

[0081] Referring to FIG. 3, the image decoding device 30 may include an entropy decoding unit 305, a prediction unit 310, an inverse quantization unit 315, an inverse transform unit 320, an adder / subtractor 325, a filter 330, and a decoded picture buffer 335.

[0082] The prediction unit 310 can further include an intra-frame prediction module and an inter-frame prediction module.

[0083] First, when an image bitstream transmitted from the image encoding device 20 is received, it can be transmitted to the entropy decoding unit 305 .

[0084] The entropy decoding unit 305 can decode the bitstream to generate decoded data including quantized coefficients and decoding information to be transmitted to each component.

[0085] The prediction unit 310 may generate a prediction block based on data received from the entropy decoding unit 305. In this case, the prediction unit 310 may construct a reference picture list using a default construction technique based on reference images stored in the decoded picture buffer 335.

[0086] The inter prediction unit may include a reference picture construction unit, a motion compensation unit, and a motion information decoding unit, some of which may perform the same process as the encoder, and some of which may perform a reverse process.

[0087] The inverse quantization unit 315 can inverse quantize the quantized transform coefficients provided as a bitstream and decoded by the entropy decoding unit 305 .

[0088] The inverse transform unit 320 may apply an inverse transform technique such as an inverse DCT, an inverse integer transform, or a similar concept to the transform coefficients to generate residual blocks.

[0089] In this case, the inverse quantization unit 315 and the inverse transform unit 320 can be realized in various ways by reversing the processes performed by the transform unit 210 and the quantization unit 215 of the image encoding device 20 described above. For example, they can use the same processes and inverse transforms shared by the transform unit 210 and the quantization unit 215, or can reverse the transform and quantization processes using information about the transform and quantization processes from the image encoding device 20 (e.g., transform size, transform shape, quantization type, etc.).

[0090] The residual block that has undergone the inverse quantization and inverse transform processes may be added to the prediction block derived by the prediction unit 310 to generate a reconstructed image block. This addition may be performed by the adder / subtractor 325.

[0091] The filter 330 may also apply a deblocking filter to the reconstructed image blocks to remove blocking artifacts if necessary, and a separate loop filter may also be used before or after the decoding process to further improve the video quality.

[0092] The reconstructed and filtered image blocks can be stored in the decoded picture buffer 335 .

[0093] Although not shown, the image encoding / decoding device may further include a block dividing unit.

[0094] The image can be divided into blocks of various units and sizes through the block division unit. A basic coding unit (or maximum coding unit, Coding Tree Unit, CTU) may refer to a basic (or starting) unit for prediction, transformation, quantization, etc. in the image coding process. In this case, the basic coding unit may be composed of one luminance basic coding block (or maximum coding block, Coding Tree Block, CTB) and two basic chrominance coding blocks according to the color format (YCbCr in this example), and the size of each block may be determined according to the color format. A coding block (CB) may be obtained according to the division process. A coding block may be understood as a unit that is not divided into further coding blocks according to certain restrictions, and may be set as a starting unit for division into lower units. In the present invention, a block is not limited to a rectangular shape but may be understood as a broad concept including various shapes such as a triangle and a circle.

[0095] Although the following description focuses on one color component, it should be understood that it can be changed and applied to other color components in proportion to the ratio according to the color format (for example, in the case of YCbCr4:2:0, the horizontal to vertical length ratio of the luminance component and the chrominance component is 2:1). It should also be understood that although block division that depends on other color components (for example, in the case of Cb / Cr, depending on the block division result of Y) is possible, independent block division is also possible for each color component. It should also be understood that while one common block division setting (taking into consideration the proportionality to the length ratio) can be used, individual block division settings can be used depending on the color component.

[0096] In the block division part, blocks can be expressed as M × N, and the maximum and minimum values ​​of each block can be obtained within the range. For example, if the maximum value of a block is set to 256 × 256 and the minimum value is set to 4 × 4, the size is 2 m ×2 n (in this example, m and n are integers from 2 to 8), or a block of size 2m x 2m (in this example, m and n are integers from 2 to 128), or a block of size m x m (in this example, m and n are integers from 4 to 256). Here, m and n may or may not be the same, and the ranges supported by the blocks, such as the maximum and minimum values, may occur more than once.

[0097] For example, information on the maximum and minimum block sizes may be generated, and information on the maximum and minimum block sizes in a partial partition setting may be generated. Here, the former may be information on the range of the maximum and minimum sizes that can be generated within an image, and the latter may be information on the maximum and minimum sizes that can be generated based on a partial partition setting. Here, the partition setting may be defined by an image type (I / P / B), color components (YCbCr, etc.), block type (encoding / prediction / transform / quantization, etc.), partition type (Index or Type), partition method (QT, BT, TT, etc. in the tree method, SI2, SI3, SI4, etc. in the index method), etc.

[0098] In addition, there may be restrictions on the width / height ratio (block shape) that a block can have, and a boundary value condition for this can be set. In this case, only blocks that are equal to or less than a given boundary value (k) can be supported, and k can be defined based on the width / height ratio such as A / B (A is the longer or same value of the width or height, and B is the remaining value), and can be a real number greater than or equal to 1, such as 1.5, 2, 3, or 4. As in the above example, a restriction on the shape of one block in an image is supported, or more than one restriction can be supported depending on the division setting.

[0099] In summary, whether or not block division is supported can be determined based on the range and conditions described above and the division settings described below, etc. For example, if a candidate (child block) resulting from division of a block (parent block) satisfies the supported block conditions, the division can be supported, and if not, the division cannot be supported.

[0100] The block division unit can be set in relation to each component of the image encoding device and decoding device, and the size and shape of the block can be determined through this process. At this time, the set block can be defined differently depending on the component, and can correspond to a prediction block in the case of a predictor, a transform block in the case of a transformer, a quantization block in the case of a quantizer, etc. However, without being limited thereto, block units can be further defined according to other components. In the present invention, the case where the input and output of each component are rectangular will be mainly described, but some components can have inputs / outputs of other shapes (e.g., right-angled triangles, etc.).

[0101] The size and shape of the initial (or starting) block of the block division unit can be determined from the upper unit. The initial block can be divided into blocks of smaller sizes, and once the optimal size and shape for the block division is determined, the block can be determined as the initial block of the lower unit. Here, the upper unit can be a coding block, and the lower unit can be a prediction block or a transformation block, but is not limited thereto, and various variations are possible. Once the initial block of the lower unit is determined as in the above example, a division process can be performed to find a block of the optimal size and shape, like the upper unit.

[0102] In summary, the block division unit can divide a basic coding block (or a maximum coding block) into at least one coding block, and can divide the coding block into at least one prediction block / transform block / quantization block. Furthermore, the prediction block can be divided into at least one transform block / quantization block, and the transform block can be divided into at least one quantization block. Here, some blocks may have a subordinate relationship (i.e., defined by a higher-order unit and a lower-order unit) with other blocks, or an independent relationship. For example, the prediction block may be a higher-order unit of the transform block, or may be a unit independent of the transform block. Various relationship settings are possible depending on the type of block.

[0103] Depending on the encoding setting, whether or not to combine the upper unit and the lower unit may be determined. Here, combining between units means that the upper unit is not divided into the lower unit, but the encoding process (e.g., prediction unit, transform unit, inverse transform unit, etc.) of the lower unit is performed using the block (size and shape) of the upper unit. In other words, it may mean that the division process of multiple units is shared, and the division information is generated in one of the units (e.g., the upper unit).

[0104] For example, prediction, transformation, and inverse transformation processes can be performed on a coding block (when the coding block is combined with a prediction block and a transformation block).

[0105] For example, a prediction process can be performed on a coding block (when the coding block is combined with a prediction block), and a transform and inverse transform process can be performed on a transform block that is the same size as or smaller than the coding block.

[0106] For example, a prediction process can be performed using a prediction block that is the same size as or smaller than the coding block (when the coding block is combined with a transform block), and a transform and inverse transform process can be performed on the coding block.

[0107] For example, a prediction process can be performed on a prediction block that is the same size as or smaller than the coding block (when the prediction block is combined with a transformation block), and a transformation and inverse transformation process can be performed on the prediction block.

[0108] As an example, the prediction process can be performed using a prediction block that is the same as or smaller than the coding block (if neither block is combined), and the transform and inverse transform processes can be performed using a transform block that is the same as or smaller than the coding block.

[0109] Although various cases regarding coding, prediction, and transformation blocks have been described in the above examples, the present invention is not limited to these.

[0110] The combination between the units may be supported by a fixed setting for an image or by an adaptive setting in consideration of various coding factors, which may include an image type, color components, a coding mode (Intra / Inter), a partition setting, a block size / shape / position, a width / height ratio, prediction-related information (e.g., an intra prediction mode, an inter prediction mode, etc.), transform-related information (e.g., transform technique selection information, etc.), and quantization-related information (e.g., quantization region selection information, quantized transform coefficient coding information, etc.).

[0111] As described above, when a block having an optimal size and shape is found, mode information (e.g., partition information, etc.) for the block can be generated. The mode information can be recorded in a bitstream together with information generated in the component to which the block belongs (e.g., prediction-related information, transformation-related information, etc.) and transmitted to a decoder, where it can be parsed into units of the same level and used in the image decoding process.

[0112] In the following, the division method will be described, and for convenience of explanation, it is assumed that the initial block is square in shape, but this is not limited to this, as it can be applied in the same or similar way when the initial block is rectangular in shape.

[0113] The block division unit may support various types of division. For example, it may support tree-based division or index-based division, or other methods. Tree-based division may determine the division type based on various types of information (e.g., whether or not to divide, tree type, division direction, etc.), while index-based division may determine the division type based on predetermined index information.

[0114] FIG. 4 is an exemplary diagram showing various division forms that can be obtained by the block division unit of the present invention.

[0115] In this example, it is assumed that the division pattern shown in Figure 4 is obtained by one division execution (or process), but this is not limited to this and it can be obtained by multiple division operations. Also, additional division patterns not shown in Figure 4 are possible.

[0116] (tree-based partitioning) The tree-based partitioning of the present invention can support quad trees (QT), binary trees (BT), ternary trees (TT), etc. When one tree type is supported, it is called single-tree partitioning, and when two or more tree types are supported, it is called multi-tree partitioning.

[0117] QT refers to a method (n) in which a block is divided into two parts horizontally and vertically (i.e., into four parts), BT refers to a method (b to g) in which a block is divided into two parts in one of the horizontal or vertical directions, and TT refers to a method (h to m) in which a block is divided into three parts in one of the horizontal or vertical directions.

[0118] Here, in the case of QT, a four-quarter division scheme (o, p) can be supported, with the division direction limited to either horizontal or vertical. In addition, in the case of BT, only equal-sized schemes (b, c) or non-uniform-sized schemes (d to g) can be supported, or a combination of both schemes can be supported. In addition, in the case of TT, only schemes (h, j, k, m) with a biased division arrangement (e.g., 1:1:2, 2:1:1 in the left-to-right or top-to-bottom direction) can be supported, or only schemes (i, l) with a centered arrangement (e.g., 1:2:1) can be supported, or a combination of both schemes can be supported. In addition, a four-quarter division scheme (i.e., 16 divisions) in both horizontal and vertical directions (q) can also be supported.

[0119] The tree method may support z-division in the horizontal direction (b, d, e, h, i, j, o), z-division in the vertical direction (c, f, g, k, l, m, p), or a combination of both methods, where z is an integer equal to or greater than 2, such as 2, 3, or 4.

[0120] In the present invention, it is assumed that QT supports n, BT supports b and c, and TT supports i and l.

[0121] Depending on the encoding settings, one or more of the tree splitting methods can be supported, for example, QT can be supported, or QT / BT can be supported, or QT / BT / TT can be supported.

[0122] The above example is an example in which the basic tree division is QT, and BT and TT are included in the additional division method depending on whether other trees are supported, but various modifications are possible. In this case, information on whether other trees are supported (bt_enabled_flag, tt_enabled_flag, bt_tt_enabled_flag, etc., which can have a value of 0 or 1, where 0 means not supported and 1 means supported) can be implicitly determined depending on the encoding settings, or can be explicitly determined in units of sequence, picture, slice, tile group, tile, brick, etc.

[0123] The division information may include information on whether or not to divide (tree_part_flag, or qt_part_flag, bt_part_flag, tt_part_flag, or bt_tt_part_flag, which may have a value of 0 or 1, where 0 indicates no division and 1 indicates division). In addition, depending on the division method (BT or TT), information on the division direction (dir_part_flag, or bt_dir_part_flag, tt_dir_part_flag, or bt_tt_dir_part_flag, which may have a value of 0 or 1, where 0 indicates <horizontal> and 1 indicates <vertical>) may be added, and this may be information that can be generated when division is performed.

[0124] When multiple tree partitions are supported, various partition information configurations are possible. The following will be described as an example of how partition information is configured at one depth level (i.e., for the sake of convenience, although recursive partitioning may be possible if the supported partition depth is set to one or more).

[0125] As an example (1), information on whether or not division is required is checked. If division is not required, the division is terminated.

[0126] If splitting is to be performed, the selection information regarding the type of splitting (for example, tree_idx. If it is 0, it is QT, if it is 1, it is BT, if it is 2, it is TT) is checked. At this time, the splitting direction information is further checked according to the type of splitting selected, and the process moves to the next step (if additional splitting is possible because the splitting depth has not reached the maximum, it starts again from the beginning, and if splitting is not possible, it ends the splitting).

[0127] As an example (2), check the information as to whether or not the split is for a partial tree method (QT) and move to the next step. At this time, if the split is not to be performed, check the information as to whether or not the split is for a partial tree method (BT). At this time, if the split is not to be performed, check the information as to whether or not the split is for a partial tree method (TT). At this time, if the split is not to be performed, the split ends.

[0128] If partial tree splitting (QT) is to be performed, proceed to the next step. Also, if partial tree splitting (BT) is to be performed, check the split direction information and proceed to the next step. Also, if partial tree splitting (TT) is to be performed, check the split direction information and proceed to the next step.

[0129] As an example (3), check whether or not a split is required for some tree methods (QT). If splitting is not required, check whether or not a split is required for some tree methods (BT and TT). If splitting is not required, the splitting is terminated.

[0130] If a partial tree-based split (QT) is performed, proceed to the next step. If a partial tree-based split (BT and TT) is performed, check the split direction information and proceed to the next step.

[0131] The above examples may have tree splitting priority (examples 2 and 3) or not (example 1), but various variations are possible. Also, the above examples illustrate cases where the splitting of the current step is independent of the splitting results of the previous step, but it is also possible to set the splitting of the current step to depend on the splitting results of the previous step.

[0132] For example, in examples 1 to 3, if some tree-based splitting (QT) was performed in the previous step and was moved to the current step, the same tree-based splitting (QT) can be supported in the current step.

[0133] On the other hand, if some tree-based splits (QT) were not performed in the previous step, but other tree-based splits (BT or TT) were performed and then moved to the current step, it is possible to set the partial tree-based splits (BT and TT) to be supported in subsequent steps including the current step, except for the partial tree-based split (QT).

[0134] In the above case, it means that the tree structure supported by block division can be adaptive, and therefore the above division information structure can also be configured differently. (The following example assumes the third example.) In other words, in the above example, if division of some tree methods (QT) has not been performed in the previous step, the current step can perform the division process without considering some tree methods (QT). In addition, division information related to the related tree methods (e.g., information on whether or not there is a division, division direction information, etc.) is also used. In this example, <qt>In this case, the information about whether it is a split or not can be removed and configured.

[0135] The above example concerns adaptive partitioning information configuration when block partitioning is allowed (e.g., the block size is within the range between the maximum and minimum values, or the partitioning depth of each tree method does not reach the maximum depth <allowable depth>), but adaptive partitioning information configuration is also possible when block partitioning is restricted (e.g., the block size is not within the range between the maximum and minimum values, or the partitioning depth of each tree method reaches the maximum depth).

[0136] As already mentioned, in the present invention, tree-based partitioning can be performed using a recursive method. For example, if the partition flag of a coding block with a partition depth of k is 0, the coding block is coded using a coding block with a partition depth of k, and if the partition flag of a coding block with a partition depth of k is 1, the coding block is coded using N sub-coding blocks (where N is an integer equal to or greater than 2, such as 2, 3, or 4) with a partition depth of k+1 according to the partitioning method.

[0137] The sub-coding block is again set as a coding block (k+1) and can be divided into a sub-coding block (k+2) through the above process. Such a hierarchical division method can be determined according to division settings such as the division range and the allowable division depth.

[0138] In this case, the bitstream structure for expressing the partition information can be selected from one or more scanning methods. For example, the bitstream of the partition information can be configured based on the order of the partition depth, or based on whether or not there is a partition.

[0139] For example, when the order of division depth is used as the criterion, this is a method of obtaining division information at the current level depth based on the first block, and then obtaining division information at the next level depth.When the criterion is whether or not a block is divided, this means a method of preferentially obtaining additional division information for blocks divided based on the first block, and other additional scanning methods can be considered.

[0140] The maximum block size and the minimum block size can be set to a common setting regardless of the type of tree (or all trees), or they can be set individually for each tree, or they can be set to a common setting for two or more trees. In this case, the maximum block size can be set to be equal to or smaller than the maximum coding block. If the maximum block size of a given first tree is not the same as the maximum coding block, implicit division is performed using a given second tree method until the maximum block size of the first tree is reached.

[0141] A common partition depth may be supported regardless of the type of tree, or an individual partition depth may be supported for each tree, or a common partition depth may be supported for two or more trees, or a partition depth may be supported for some trees and not for other trees.

[0142] Explicit syntax elements for the configuration information can be supported, and some configuration information may be implicit.

[0143] (index-based partitioning) In the index-based division of the present invention, a CSI (Constant Split Index) scheme and a VSI (Variable Split Index) scheme can be supported.

[0144] The CSI scheme may be a scheme in which k sub-blocks are obtained by division in a predetermined direction, where k may be an integer equal to or greater than 2, such as 2, 3, or 4. Specifically, the CSI scheme may be a division scheme in which the size and shape of the sub-blocks are determined based on the value of k, regardless of the size and shape of the block. Here, the predetermined direction may be one or a combination of two or more of horizontal, vertical, and diagonal directions (e.g., from upper left to lower right or from lower left to upper right).

[0145] The index-based CSI partitioning scheme of the present invention can include z partition candidates in either the horizontal or vertical direction, where z is an integer equal to or greater than 2, such as 2, 3, or 4, and one of the horizontal or vertical lengths of each sub-block may be the same, and the other may be the same or different. The horizontal or vertical length ratio of the sub-blocks is A1:A2:...:A Z A1 to A Z can be an integer equal to or greater than 1, such as 1, 2, 3, etc.

[0146] Also, candidates for division into x and y in the horizontal and vertical directions, respectively, may be included. In this case, x and y may be integers equal to or greater than 1, such as 1, 2, 3, or 4, but restrictions may be imposed if x and y are both 1 (because a already exists). Although Fig. 4 shows the case where the horizontal or vertical length ratio of each sub-block is the same, candidates including cases where they are different may also be included.

[0147] In addition, it may include candidates that are divided into w in either a partial diagonal direction (top left → bottom right) or a partial diagonal direction (bottom left → top right), where w may be an integer greater than or equal to 2, such as 2 or 3.

[0148] 4, the partitioning pattern can be classified into a symmetrical partitioning pattern (b) and an asymmetrical partitioning pattern (d, e) according to the length ratio of each sub-block, and into a partitioning pattern (k, m) biased in a specific direction and a partitioning pattern (k) arranged in the center. The partitioning pattern can be defined according to various coding factors including the sub-block shape as well as the length ratio of the sub-blocks, and the supported partitioning pattern can be implicitly or explicitly determined depending on the coding setting. Therefore, a group of candidates for the index-based partitioning scheme can be determined based on the supported partitioning pattern.

[0149] Meanwhile, the VSI method may be a method in which one or more sub-blocks are obtained by dividing a sub-block in a predetermined direction while the width w or height h of the sub-block is fixed, where w and h may be integers equal to or greater than 1, such as 1, 2, 4, or 8. In particular, the VSI method may be a division method in which the number of sub-blocks is determined based on the size and shape of the block and the value of w or n.

[0150] The index-based VSI partitioning method of the present invention may include candidates that are partitioned by fixing either the horizontal or vertical length of the sub-block, or may include candidates that are partitioned by fixing both the horizontal and vertical lengths of the sub-block. Since the horizontal or vertical length of the sub-block is fixed, it may have a feature that allows equal division in the horizontal or vertical direction, but is not limited thereto.

[0151] If the block before division is M×N and the horizontal length of the sub-block is fixed (w), or the vertical length is fixed (h), or the horizontal and vertical lengths are fixed (w, h), the number of sub-blocks obtained can be (M*N) / w, (M*N) / h, or (M*N) / w / h, respectively.

[0152] Depending on the coding configuration, only the CSI method may be supported, or only the VSI method may be supported, or both methods may be supported, and information about the supported methods may be implicitly or explicitly specified.

[0153] In the present invention, it is assumed that the CSI scheme is supported.

[0154] Depending on the encoding settings, the set of candidates may include two or more of the index splits.

[0155] For example, a candidate group such as {a, b, c}, {a, b, c, n}, or {a to g, n} can be constructed. However, this may be an example of constructing a candidate group based on block shapes that are predicted to occur frequently based on general statistical characteristics, such as block shapes that are divided into two in the horizontal or vertical direction, or divided into two in both the horizontal and vertical directions.

[0156] Alternatively, a candidate group such as {a, b}, {a, o}, {a, b, o} or {a, c}, {a, p}, {a, c, p} can be constructed, which includes candidates divided into two and four in the horizontal and vertical directions, respectively. This can be an example of constructing a candidate group based on block shapes that are predicted to be frequently divided in a specific direction.

[0157] Alternatively, a candidate group such as {a, o, p} or {a, n, q} can be constructed, but an example of constructing a candidate group may be a block shape that is predicted to result in many divisions having a size smaller than the block before division.

[0158] Alternatively, a candidate group such as {a, r, s} can be constructed, but it may be determined that the optimal division result, which can be obtained as a rectangular shape using another method (tree method) from the block before division, has been obtained, and a non-rectangular division form may be constructed as a candidate group.

[0159] As in the above example, various candidate group configurations are possible, and more than one candidate group configuration can be supported taking into account various coding factors.

[0160] Once the candidate set has been constructed, various partition information configurations are possible.

[0161] For example, index selection information can be generated from a candidate group including a candidate (a) that is not divided and candidates (b to s) that are divided.

[0162] Alternatively, information indicating whether or not a division is to be performed (whether the division type is a or not) can be generated, and if division is to be performed (if not a), index selection information can be generated from a candidate group consisting of candidates to be divided (b to s).

[0163] Various methods other than those described above can be used to configure the partition information, and binary bits can be assigned to the index of each candidate in the candidate group, except for the information indicating whether or not the candidate is partitioned, using various methods such as fixed-length binarization, variable-length binarization, etc. If the number of candidate groups is two, one bit can be assigned to the index selection information, and if the number is three or more, one or more bits can be assigned to the index selection information.

[0164] Unlike the tree-based partitioning method, the index-based partitioning method can be a method of selectively configuring candidate partitioning patterns that are predicted to occur frequently.

[0165] Also, since the number of bits for expressing index information can increase depending on the number of supported candidate groups, this method may be suitable for single-level division (e.g., division depth is limited to 0) rather than tree-based hierarchical division (recursive division). That is, it may be a method that supports one division operation, or a method in which sub-blocks obtained through index-based division cannot be further divided.

[0166] In this case, it may mean that further division into blocks of the same type having a smaller size is not possible (for example, a coding block obtained by an index division method cannot be further divided into coding blocks), but it may also mean that further division into blocks of other types is not possible (for example, division of a coding block into not only coding blocks but also prediction blocks is not possible). Of course, this is not limited to the above example, and other variations are possible.

[0167] Next, a case where block division is determined mainly based on the type of block among the coding elements will be considered.

[0168] First, coding blocks are obtained through a splitting process. Here, a tree-based splitting method can be used for the splitting process, and splitting results such as a (no split), n (QT), b, c (BT), i, l (TT) as shown in Figure 4 can be obtained depending on the tree type. Depending on the coding settings, various combinations of tree types such as QT, QT+BT, and QT+BT+TT are possible.

[0169] The example described below shows the process of finally dividing a prediction block and a transformation block based on the coding block obtained by the above process, and assumes that prediction, transformation, and inverse transformation processes are performed based on each division size.

[0170] For example (1), a prediction block may be set to the same size as the coding block to perform a prediction process, and a transformation block may be set to the same size as the coding block (or prediction block) to perform a transformation and inverse transformation process. Since the prediction block and the transformation block are set based on the coding block, no separate partition information is generated.

[0171] For example, (2) a prediction block may be set to the same size as the coding block and a prediction process may be performed. In the case of a transform block, a transform block may be obtained through a division process based on the coding block (or the prediction block), and a transform and inverse transform process may be performed based on the obtained size.

[0172] Here, a tree-based splitting method can be used for the splitting process, and splitting results such as a (no split), b, c (BT), i, l (TT), and n (QT) can be obtained depending on the tree type. Depending on the encoding settings, various combinations of tree types are possible, such as QT / BT / QT+BT / QT+BT+TT.

[0173] Here, the splitting process can use an index-based splitting method, and depending on the type of index, splitting results such as a (no split), b, c, and d in Figure 4 can be obtained. Depending on the encoding settings, various candidate sets such as {a, b, c} and {a, b, c, d} can be constructed.

[0174] As an example (3), in the case of a prediction block, a prediction block can be obtained by performing a division process based on a coding block, and a prediction process can be performed based on the obtained size. In the case of a transformation block, the size of the coding block can be set as is and transformation and inverse transformation processes can be performed. This example may correspond to a case where the prediction block and the transformation block have an independent relationship with each other.

[0175] Here, the splitting process can use an index-based splitting method, and splitting results such as a (no split), b to g, n, r, and s in Figure 4 can be obtained depending on the type of index. Depending on the encoding settings, various candidate groups can be configured, such as {a, b, c, n}, {a to g, n}, and {a, r, s}.

[0176] As an example (4), in the case of a prediction block, a prediction block can be obtained by performing a division process based on the coding block, and a prediction process can be performed based on the obtained size. In the case of a transformation block, the size of the prediction block can be set as is, and then the transformation and inverse transformation processes can be performed. In this example, the transformation block may be set as is the size of the obtained prediction block, or vice versa (the prediction block is set as is the size of the transformation block).

[0177] Here, a tree-based splitting method can be used for the splitting process, and splitting patterns such as a (no split), b, c (BT), and n (QT) can be obtained depending on the tree type. Depending on the encoding settings, various combinations of tree types such as QT / BT / QT+BT are possible.

[0178] Here, an index-based splitting method can be used for the splitting process, and splitting patterns such as a (no split), b, c, n, o, and p in Fig. 4 can be obtained depending on the type of index. Depending on the coding setting, various candidate sets can be configured, such as {a, b}, {a, c}, {a, n}, {a, o}, {a, p}, {a, b, c}, {a, o, p}, {a, b, c, n}, and {a, b, c, n, p}. Furthermore, among the index-based splitting methods, the VSI method may be used alone or in combination with the CSI method to configure the candidate sets.

[0179] As an example (5), in the case of a prediction block, a prediction block can be obtained by performing a division process based on a coding block, and a prediction process can be performed based on the obtained size. Also, in the case of a transformation block, a prediction block can be obtained by performing a division process based on a coding block, and a transformation process and an inverse transformation process can be performed based on the obtained size. This example may be a case where a prediction block and a transformation block are each divided based on a coding block.

[0180] Here, the division process can use a tree-based division method or an index-based division method, and the candidate group can be constructed in the same or similar manner as in Example 4.

[0181] The above examples illustrate some possible cases depending on whether the division process of each type of block is shared, but the present invention is not limited to these examples and various variations are possible. Furthermore, block division settings may be determined taking into consideration not only the type of block but also various coding factors.

[0182] In this case, the coding elements may include image type (I / P / B), color components (YCbCr), block size / shape / position, block horizontal / vertical length ratio, block type (coding block, prediction block, transform block, quantization block, etc.), division state, coding mode (Intra / Inter), prediction-related information (intra-frame prediction mode, inter-frame prediction mode, etc.), transformation-related information (transformation technique selection information, etc.), quantization-related information (quantization region selection information, quantized transformation coefficient coding information, etc.), etc.

[0183] FIG. 5 is an exemplary diagram showing prediction modes in intra prediction according to an embodiment of the present invention.

[0184] 5, 95 prediction modes can be supported for intra prediction, of which 93 are directional modes and 2 are non-directional modes (DC, Planar). In this case, the directional modes can be classified into gradient (e.g., dy / dx) or angle information (Degree).

[0185] In the non-directional mode, prediction may be performed by averaging adjacent reference pixels of the block, interpolation, etc., and in the directional mode, prediction may be performed by extrapolating adjacent reference pixels of the block, interpolation, etc.

[0186] In directional mode, the direction can be vertical (up → down / down → up), horizontal (left → right / right → left), diagonal A (top left → bottom right / bottom right → top left), or diagonal B (top right → bottom left / bottom left → top right).

[0187] Generally, when encoding is performed using raster scan, etc., adjacent blocks may exist in the left, top, top left, top right, and bottom left directions, and a non-directional mode using these as the starting point or reference pixel for prediction, or a prediction mode in the vertical (top → bottom), horizontal (left → right), diagonal A (top left → bottom right), diagonal B-1 (top right → bottom left), or diagonal B-2 (bottom left → top right) directions may be supported. If a scan other than raster scan is supported, the directional mode may be defined differently.

[0188] For example, in a horizontal mode in which the left block is unavailable and the right block is unavailable, prediction can be performed through extrapolation in the (right-to-left) direction. Alternatively, in a state in which both the left and right blocks are available, prediction can be performed through extrapolation in a predetermined direction (left-to-right or right-to-left), or prediction can be performed by interpolation of both blocks. In this invention, we will assume that encoding is performed in raster scan or z-scan order, and that referenceable pixels are located in the left, top, top-left, top-right, and bottom-left directions.

[0189] In addition, a reconstructed block of another coded color space may be used to predict a current block by using the correlation between color spaces, and a prediction mode supporting this may be included. For example, in the case of a chrominance component, a predicted block of the current block may be generated using a reconstructed block of a luminance component corresponding to the current block. That is, a predicted block may be generated based on a reconstructed block by taking into account the correlation between color spaces, and this may be included as an intra-frame prediction mode for the chrominance component.

[0190] For the chrominance component, the prediction mode candidate group may have the same candidate group as the prediction mode candidate group for the luma component, or may include some modes from the prediction mode candidate group for the luma component and additional prediction modes for the chrominance component (color copy mode, color mode). Here, the color copy mode may be a prediction mode related to a method of obtaining data for generating a prediction block from a region located in another color space, and the color mode may be a prediction mode related to a method of obtaining a prediction mode from a region located in another color space. For the color copy mode and the color mode, m and n modes (m and n are integers of 0, 1, 2, 3, or greater) may be supported, respectively.

[0191] If one color copy mode is supported, a predetermined data acquisition method for generating a predicted block can be predefined. If two or more color copy modes are supported, the data acquisition method for generating a predicted block can be differentiated (e.g., the position to be referenced for correlation acquisition). <1> left, <2> Upper side, <3> Left side + upper area, etc.) can be used for support.

[0192] When one color mode is supported, a predetermined position for obtaining a prediction mode can be predefined. When two or more color modes are supported, multiple positions for obtaining a prediction mode (e.g., the positions of corresponding blocks) can be predefined. <1> center, <2> upper left side, <3> upper right side, <4> Lower left side, <5> It can support the bottom right side, etc.

[0193] All or some of the prediction modes described in the above examples may be included in the prediction mode candidate set for the luminance component or the chrominance component, and other additional modes may be included in the prediction mode candidate set.

[0194] The prediction mode may refer to all supported intra-frame prediction mode candidates. A prediction mode candidate group may be configured by configuring all or some of the supported intra-frame prediction mode candidates. In this case, the prediction mode candidate group may be configured according to the size, shape (horizontal / vertical length ratio), etc. of a block.

[0195] For example, the number of prediction mode candidate groups may be determined according to the size of a block. In this case, the block size may be classified into one of two or more ranges divided based on one or more predetermined threshold sizes (A×B, C×D, etc.), and the number of candidate groups may be determined according to the classified range, such as 11, 35, 67, etc., or the presence or absence and number of support for a color copy mode or a color mode may be determined. In this case, the threshold sizes may be expressed as width (W), height (H), W×H, etc., where W and H may be integers equal to or greater than 2, such as 4, 8, 16, 32, 64, etc.

[0196] Alternatively, a group of prediction mode candidates may be determined according to the shape of a block (or the width / height ratio of the block). In this case, the width / height ratio of the block may be classified into one of two or more ranges defined based on one or more predetermined thresholds, and a group of candidates may be determined according to the classified range. In this case, the threshold may be expressed as W / H (or H / W), etc., and may have an integer value of 1 or greater, such as 1, 2, 4, 8, or 16, or a decimal value between 0 and 1, such as 1, 1 / 2, 1 / 4, 1 / 8, or 1 / 16.

[0197] In the present invention, it is assumed that 95 prediction modes are supported for directional and non-directional modes, as shown in FIG. 5, and that color modes and color copy modes are also supported. It is also assumed that 67 directional and non-directional modes are supported as prediction mode candidates for the luminance component, and a total of eight prediction mode candidates are supported for the chrominance component, including four directional and non-directional modes, one color mode, and three color copy modes, but this is not limiting. There may be predetermined configuration criteria for selecting modes included in the prediction mode candidates other than those assumed above.

[0198] Next, an example of a configuration of prediction mode candidates based on the horizontal / vertical length ratio of a block will be shown. [Table 1]

[0199] The above table is set based on the case where prediction modes 0 and 1 and prediction modes 2 to 66 are included in the prediction mode candidate group when the block shape is square. When the block shape is rectangular, the candidate configuration as shown in the above table is possible for prediction modes to be added to or excluded from the prediction mode candidate group for square blocks (excluding non-directional modes), and this may be an example set under the assumption that configuring prediction modes more widely for longer blocks than for shorter blocks is advantageous in terms of prediction accuracy, but configurations that contradict this are also possible.

[0200] The reference pixel configuration unit can configure reference pixels used for intra-frame prediction. At this time, the reference pixels are stored in a temporary memory (for example, an array <array>It can be managed through a primary, secondary array, etc., and can be generated and removed for each intra-frame prediction process, and the size of the temporary memory can be determined according to the configuration of reference pixels.

[0201] The following description assumes that the blocks to the left, above, above left, above right, and below left of the target block are used for intra-frame prediction, but this is not limited to this, and block candidate groups of other configurations may also be used for intra-frame prediction.

[0202] For example, the candidate group of neighboring blocks for the reference pixel is an example of a case where the candidate group follows a raster or Z scan, and depending on the supported scan order, some of the candidate group can be removed, or other candidate block groups (e.g., additional configurations such as right, bottom, and bottom right blocks) can be included.

[0203] Meanwhile, pixels adjacent to the target block can be classified into at least one reference pixel hierarchy. The pixels closest to the target block are ref_0 {pixels whose pixel values ​​differ by 1 from the boundary pixels of the target block. p(-1,-1) to p(2m-1,-1), p(-1,0) to p(-1,2n-1)}, the next adjacent pixels {pixels whose pixel values ​​differ by 2 from the boundary pixels of the target block. p(-2,-2) to p(2m,-2), p(-2,-1) to p(-2,2n)} are ref_1, and the next adjacent pixels {pixels whose pixel values ​​differ by 3 from the boundary pixels of the target block. p(-3,-3) to p(2m+1,-3), p(-3,-2) to p(-3,2n+1)} can be classified into ref_2, etc. In other words, the reference pixels can be classified into multiple reference pixel hierarchy levels depending on the distance of the pixel adjacent to the boundary pixels of the target block.

[0204] The number of supported reference pixel lines may be N or more, where N may be an integer of 1, 2, 3, 4, or more. In this case, the reference pixel lines are generally included in the reference pixel line candidate set in order from the reference pixel line closest to the target block, but this is not limitative. For example, if N is 3,<ref_0、ref_1、ref_2> The candidate group can be constructed in this way, or<ref_0、ref_1、ref_3> ,<ref_0、ref_2、ref_3> ,<ref_1、ref_2、ref_3> Alternatively, the candidate group may be constructed in a non-sequential manner, such as by excluding the most adjacent reference pixel line.

[0205] Prediction can be performed using all reference pixel lines in the candidate group, or using only some (one or more) of the reference pixel lines.

[0206] For example, depending on the encoding setting, one of a plurality of reference pixel lines may be selected and intra-frame prediction may be performed using that reference pixel line, or two or more of the plurality of reference pixel lines may be selected and intra-frame prediction may be performed using that reference pixel line (for example, by applying a weighted average to the data of each reference pixel line).

[0207] Here, the selection of the reference pixel line may be implicitly or explicitly determined. For example, if it is implicit, it means that it is determined based on an encoding setting defined according to one or a combination of two or more factors such as an image type, a color component, a size / shape / position of a block, etc. Also, if it is explicit, it means that reference pixel line selection information may be generated in units such as a block.

[0208] In the present invention, a case where intra prediction is performed using the nearest reference pixel line will be mainly described. However, the reference pixel line referenced for prediction can be considered as one of the main coding elements of the present invention. That is, the setting of intra prediction can be determined regardless of the selected reference pixel line, or the setting of intra prediction can be determined accordingly.

[0209] The reference pixel construction unit for intra-frame prediction of the present invention may include a reference pixel generation unit, a reference pixel interpolation unit, a reference pixel filter unit, etc., and may be configured by including all or part of the above components.

[0210] The reference pixel construction unit can check the availability of reference pixels to classify them into available reference pixels and unavailable reference pixels. Here, the availability of reference pixels is determined to be unavailable when at least one of the following conditions is satisfied:

[0211] For example, if the block is located outside the picture boundary, if it does not belong to the same division unit as the target block (for example, units that cannot refer to each other, such as slices or tiles. However, if units such as slices or tiles have the characteristic of being able to refer to each other, exceptions are made even if they are not the same division unit), or if encoding has not been completed, it can be determined to be unusable. In other words, if none of the above conditions are met, it can be determined to be usable.

[0212] In addition, the use of reference pixels can be restricted by coding settings. For example, even if it is determined that reference pixels are usable based on the above conditions, the use of reference pixels can be restricted depending on whether limited intra-frame prediction (e.g., constrained_intra_pred_flag) is performed. The limited intra-frame prediction can be performed when prohibiting the use of blocks reconstructed by reference from other images as reference pixels in order to prevent error propagation to external factors such as the communication environment.

[0213] If constrained intra prediction is deactivated (eg, constrained_intra_pred_flag=0 in I picture type, or P or B picture type), all reference pixel candidate blocks are available for use.

[0214] Alternatively, when constrained intra-frame prediction is activated (e.g., constrained_intra_pred_flag=1 in P or B image type), the reference pixel candidate block can be assumed to be a condition for determining whether to use it or not depending on the coding mode (Mode_Intra, Mode_InterD, Mode_InterC), but the above condition can also be determined by various other coding elements.

[0215] Here, Mode_Intra, Mode_Inter_D, and Mode_Inter_C may respectively mean intra prediction, inter prediction (such as block matching) referring to another picture, and inter prediction referring to the current picture. In the case of Mode_Intra, reference is possible, and in the case of Mode_Inter, reference is not possible, but this is not limiting.

[0216] Since the reference pixels are composed of one or more blocks, after checking the possibility of the reference pixels, they can be classified into three cases: <all usable>, <some usable>, and <all unusable>. In the remaining cases except for the case where all are usable, the reference pixels of the unusable candidate block positions can be filled or generated.

[0217] If a reference pixel candidate block is available, the pixel at that position can be included in the reference pixel memory of the current block. At this time, the pixel data can be copied directly or can be included in the reference pixel memory after undergoing processes such as reference pixel filtering and reference pixel interpolation. Also, if a reference pixel candidate block is unavailable, pixels obtained through a reference pixel generation process can be included in the reference pixel memory of the current block.

[0218] Next, examples of generating reference pixels for unavailable block locations using various methods are given.

[0219] For example, a reference pixel can be generated using an arbitrary pixel value. Here, the arbitrary pixel value can be one pixel value (e.g., a minimum value, a maximum value, a median value, etc. of a pixel value range) belonging to a pixel value range (e.g., a pixel value range based on a bit depth or a pixel value range according to pixel distribution in the image). In particular, this can be an example applied when all reference pixel candidate blocks are unavailable.

[0220] Alternatively, reference pixels may be generated from a region of the image that has already been coded, or more specifically, from at least one usable block adjacent to the unusable block, using at least one of extrapolation, interpolation, copying, and the like.

[0221] In the above example, the reference pixels can target adjacent areas centered on the target block, and can also include areas corresponding to the target block (the area from which prediction data is obtained or its adjacent areas) in other color spaces referenced in some prediction modes (e.g., color copy mode, etc.).

[0222] After the construction of the reference pixels is completed, reference pixel filtering or reference pixel interpolation can be performed. For example, only reference pixel filtering can be performed, only reference pixel interpolation can be performed, or both reference pixel filtering and reference pixel interpolation can be performed. Reference pixel filtering can precede or follow reference pixel interpolation, or they can be performed simultaneously.

[0223] Reference pixel filtering may be a process performed to reduce degradation remaining in the reference pixels. The reference pixel filtering may be one of a number of filters that can be distinguished by various filter tap lengths and coefficient settings, such as [1, 2, 1] / 4, [2, 3, 6, 3, 2] / 16, etc. Also, multiple filtering may be performed using different types of filters.

[0224] Whether or not to perform reference pixel filtering can be determined explicitly, or whether or not to perform reference pixel filtering can be determined implicitly according to encoding settings, which can be defined based on the state information of the target block (such as the size, shape, and position of the block), the image type (I / P / B), the color components (Y / Cb / Cr), reference pixel line selection information, whether or not intra prediction is applied on a subblock basis, the intra prediction mode, etc.

[0225] Reference pixel interpolation is not performed in prediction modes that refer only to integer unit pixels, but can be performed in prediction modes that refer to decimal unit pixels.

[0226] The pixel position where interpolation is performed (i.e., which decimal unit is to be interpolated) can be determined based on the prediction mode (e.g., the directionality of the prediction mode, such as dy / dx) and the positions of the reference pixel and the predicted pixel. In this case, one filter can be applied regardless of the precision of the decimal unit, or one of multiple filters (e.g., assuming a filter in which the mathematical formulas used to determine the filter coefficients or the lengths of the filter taps are differentiated) can be selected and applied according to the decimal unit.

[0227] The former case is an example in which integer unit pixels are used as input for interpolation of fractional unit pixels, and the latter case is an example in which input pixels are made different for each step (for example, integer pixels are used for 1 / 2 units, and integer and 1 / 2 unit pixels are used for 1 / 4 units), but is not limited to these, and the present invention will mainly describe the former case.

[0228] For the reference pixel interpolation, fixed filtering or adaptive filtering can be performed, which can be determined according to encoding settings. Here, the encoding settings can be defined based on state information of the current block, image type, color components, reference pixel line selection information, whether sub-block-based intra prediction is applied, intra prediction mode, etc.

[0229] Fixed filtering can perform reference pixel interpolation using one filter, while adaptive filtering can perform reference pixel interpolation using any of a plurality of filters.

[0230] In the case of adaptive filtering, one of a plurality of filters can be implicitly or explicitly determined depending on the encoding setting. The type of filter can be configured by selecting one or more from a 4-tap DCT-IF filter, a 4-tap cubic filter, a 4-tap Gaussian filter, a 6-tap Wiener filter, an 8-tap Kalman filter, etc., and the supported filter candidate set can be defined to be different depending on the color component (for example, some of the filter types can be the same or different, and the filter tab length can be short or long, etc.).

[0231] The prediction block generator may generate a prediction block according to at least one prediction mode and may use reference pixels according to the prediction mode. In this case, the reference pixels may be used in a method such as extrapolation, or in a method such as interpolation, DC, or copy, depending on the prediction mode.

[0232] The prediction mode determination unit performs a process of selecting an optimal mode from a group of multiple prediction mode candidates. Generally, the optimal mode can be determined in terms of coding cost using a rate-distortion technique that takes into account block distortion (e.g., distortion between a target block and a reconstructed block, such as SAD (Sum of Absolute Difference) or SSD (Sum of Square Difference)) and the amount of bits generated according to the mode. A prediction block generated based on the prediction mode determined through the above process can be transmitted to a subtraction unit and an addition unit.

[0233] The prediction mode encoding unit may encode the prediction mode selected by the prediction mode determination unit. The prediction mode encoding unit may encode index information corresponding to the prediction mode from a group of candidate prediction modes, or may predict the prediction mode and encode information related to the prediction mode. The former may be a method applied to a luminance component, and the latter may be a method applied to a chrominance component, but is not limited thereto.

[0234] When predicting and encoding a prediction mode, it can be managed by classifying it into a plurality of categories (k, where k is an integer of 2, 3, 4, or more). For example, when it is classified into two categories, one category can be configured with prediction modes that are expected to match the prediction mode of a target block, and the other category can be configured with prediction modes that are expected to be less likely to match the prediction mode. In other words, the other category can be configured with prediction modes that are not selected as modes that are expected to match the prediction mode of a target block.

[0235] In the above example, prediction modes are classified into two categories, but they can also be classified into more categories. When classified into three categories, the first category can be configured with prediction modes that are expected to have a high probability of matching with the prediction mode of the target block, the second category can be configured with prediction modes that are expected to have a normal probability of matching with the prediction mode of the target block, and the third category can be configured with prediction modes that are expected to have a low probability of matching with the prediction mode of the target block. That is, the second category can be configured with prediction modes that are expected to match with the prediction mode of the target block among prediction modes that do not belong to the first category, and the third category can be configured with prediction modes that do not belong to the first or second category.

[0236] As another example of category classification, classification by prediction method is possible. For example, they can be classified into an extrapolation-based prediction method, an interpolation / average-based prediction method, a copy-based prediction method, etc. Here, the extrapolation-based prediction method may refer to a directional mode, the interpolation / average-based prediction method may refer to a non-directional mode, and the copy-based prediction method may be classified as a color copy mode, and various other classifications are possible. In the case of a color mode, since a prediction mode is induced in another color space, it can be distinguished from the directional or non-directional mode. However, for convenience of explanation, it is assumed that the color mode is classified as a directional / non-directional mode.

[0237] When classified into two categories according to the prediction method, a directional / non-directional mode may be configured in the first category, and a color copy mode may be configured in the second category. Alternatively, a directional mode may be configured in the first category, and a non-directional mode may be configured in the second category. The former may be applicable to intra-prediction of a chrominance component, and the latter may be applicable to intra-prediction of a luminance component. In the following description, if a color copy mode is included, it is assumed that the mode is applicable to an intra-prediction mode of a chrominance component. However, even if a color copy mode is not included, it should be understood that the mode is not limited to an intra-prediction mode of a luminance component and is not applicable.

[0238] If classified into three categories, the first category can be configured as a directional mode, the second category can be configured as a non-directional mode, and the third category can be configured as a color copy mode. Alternatively, the first category can be configured as a predetermined mode among the directional modes (e.g., vertical, horizontal, diagonal A mode, etc.), the second category can be configured as a predetermined mode among the directional modes (e.g., diagonal B mode, etc.), and the third category can be configured as a color copy mode. Here, the diagonal A mode can be configured as a diagonal mode that uses only integer pixels during prediction, and the diagonal B mode can be configured as a diagonal mode that uses integer pixels and fractional pixels during prediction, but is not limited to this.

[0239] The above description is an example of the construction of categories, and is not limited thereto, and classification can be performed according to various predetermined criteria. Furthermore, a plurality of predetermined criteria can be mixed and applied to the construction of categories.

[0240] When prediction modes are classified into a plurality of categories, selection information regarding which category the prediction mode of a target block belongs to may be generated, and candidate selection information within each category may be generated. If there is only one candidate within a category, the candidate selection information may be omitted. Various syntax elements may be configured for the category selection and candidate selection within a category. Next, a case where three categories are supported is assumed.

[0241] *One syntax element supports category selection In this example, the value of the syntax element supported for category selection can have a value of 0 to 2 (a value greater than or equal to 1). As an example, for the first to third categories, <0> , <10> , <11> In other words, one syntax element for category selection is supported, and the index assignment and binarization for each category can be configured in a format in which they are applied.

[0242] * Multiple syntax elements support category selection In this example, the value of the syntax element supported for category selection can have a value of 0 or 1 (values ​​greater than 1 are also possible).

[0243] As an example, one syntax element (first syntax element) is <0> is assigned, and for the third category <1> At this time, the syntax element <0> If the value of , another syntax element (second syntax element) for selecting a detailed category to select one of the first and second categories can be supported, and the syntax element is <0> , <1> may be assigned.

[0244] As an example, one syntax element (first syntax element) is <0> is assigned, and for the second and third categories <1> At this time, the syntax element <1> If the value is , another syntax element (second syntax element) for selecting a detailed category can be supported, which selects either the second or third category. <0> , <1> may be assigned.

[0245] The above example is one example of the configuration of syntax elements for category selection, and various modifications and configurations are possible.

[0246] Each of the categories may include at least one prediction mode. The number of prediction modes in the first to third categories may be a, b, and c, where a may be smaller or equal to b and c, and b may be smaller or equal to c. In this example, a is assumed to be an integer between 1 and 5, b is assumed to be an integer between 3 and 8, and c is assumed to be the number obtained by subtracting the number of a and b from the number of prediction mode candidates. Variable-length binarization or fixed-length binarization, such as truncated rice binarization, truncated binary binarization, or k-th Exp-Golomb binarization, may be applied to the prediction modes belonging to the categories.

[0247] In the examples described below, it is assumed that the category configuration and setting are fixed, but adaptive setting (e.g., the number of categories, the configuration of related flags, etc.) is possible according to various coding elements. Here, the coding elements may be defined based on color components (luminance / chrominance), block state information (e.g., block size, shape, horizontal / vertical length ratio, position, etc.), image type (I / P / B), whether intra prediction is applied in sub-block units, reference pixel line selection information, etc. As an example, the number of categories may be determined to be either two or three based on the coding information.

[0248] Next, an example will be considered in which prediction modes are divided into a plurality of categories 3 based on the possibility of matching with the prediction mode, and the prediction mode is encoded based on category selection information and candidate selection information within the category. However, an example in which criteria for classifying categories according to prediction methods are mixed for category configuration is also possible. In addition, if the second category is removed from the first and second categories or the explanations of the first and second categories are integrated, an explanation consisting of two categories can be derived, and therefore a detailed explanation thereof will be omitted.

[0249] FIG. 6 is a layout diagram of a target block and its adjacent blocks according to one embodiment of the present invention.

[0250] A current block may have a high correlation with its neighboring blocks, and not only may prediction be performed using neighboring reference pixels, but the prediction modes of the neighboring blocks may also be used to predict the current block's prediction mode. Therefore, the prediction modes of the neighboring blocks of the current block may be selected as candidates for the first or second category. In this case, all or some of the prediction modes of the left, upper, upper left, upper right, and lower left blocks of the current block may be considered as candidates for the (prior) category. Examples of such prediction modes include (left / top), (left / top / upper right), (left / upper / lower left), and (left / upper / upper left / lower right / upper left).

[0251] When considering prediction modes of neighboring blocks as candidates to be included in a category, at least one prediction mode can be selected from blocks in each direction, for example, one of L0 to L3 can be selected for the left block, and one of U0 to U3 can be selected for the top block.

[0252] Considering the case where adjacent blocks in a predetermined direction (in this example, left and upper blocks) are divided into multiple sub-blocks, sub-blocks at specific positions (e.g., L3 for the left block, U3 for the upper block) can be defined to select a prediction mode. If the prediction mode of the block at that position is unavailable (e.g., the block is not coded, or is in an unreferenceable position), the coding mode <intra inter>are different), it is not necessary to select a prediction mode for the block in that direction.

[0253] Alternatively, a (sub-block) priority order for prediction mode selection can be supported (e.g., L3 → L0 → L1 → L2, etc.), so that the prediction mode of the sub-block with the highest priority can be selected as the prediction mode for the corresponding direction. If the prediction modes of the sub-blocks at all positions are unavailable, no prediction mode needs to be selected for the block in the corresponding direction.

[0254] In addition, a priority order for including prediction modes acquired from blocks in each direction in a category can be supported, for example, but not limited to, left → top → top right → bottom left → top left, left → top → bottom left → top right → top left, or top → left → bottom left → top right → top left.

[0255] The prediction mode candidate group includes many prediction modes, and among these, there may be prediction modes that commonly occur. For example, vertical and horizontal edges may be frequently found image characteristics, and flat areas such as backgrounds may also be frequently found. Therefore, a predetermined prediction mode that is expected to occur frequently may be selected as a candidate to be included in the first or second category.

[0256] The candidates for the predetermined prediction mode that is expected to occur frequently may include non-directional prediction modes such as Planar (0), DC mode (1), horizontal (18), vertical (50), and diagonal modes (2, 34, 66, etc.). Priorities for including the prediction modes in categories may be supported. For example, priorities may be set in the order of Planar → DC → Ver → Hor, but are not limited thereto.

[0257] If all or some of the prediction modes of the neighboring blocks are unavailable, at least one of the predetermined prediction modes (for example, Planar, DC, etc.) can be used instead.

[0258] In the above description, the prediction modes of the neighboring blocks of the target block and a predetermined prediction mode are considered for constructing a (prior) category. However, when the number of candidate prediction modes is large, the above configuration may experience difficulty in efficiently predicting the prediction mode of the target block. For example, when there is a difference of only 1 or 2 in the directional mode (based on the prediction modes of FIG. 5), the above configuration may fail to predict.

[0259] For this reason, prediction modes induced based on the prediction modes of neighboring blocks and a predetermined prediction mode can be considered when configuring category candidates. For example, prediction modes spaced by k intervals based on the prediction mode (in this example, a directional mode) can be considered as induced prediction modes and selected as candidates to be included in the first or second category. Here, k can be an integer of 1, 2, 3, 4, or more.

[0260] Here, assuming that the prediction mode of a neighboring block or a prediction mode based on a predetermined prediction mode is Z, there may be priorities of induced prediction modes such as Z-1, Z+1, and Z-2. In this example, it is assumed that the priorities are determined in order of absolute values ​​such as 1 and 2 (based on one absolute value) and that a <-> sign follows a <+> sign, but this is not limiting. That is, this means that the interval information for satisfying the induced prediction mode does not need to start from 1 (e.g., an integer such as 4, 8, or 12). In addition, the k interval between the prediction mode of the neighboring block and the prediction mode induced based on the predetermined prediction mode may or may not be the same.

[0261] Also, assuming that the prediction modes of neighboring blocks or prediction modes based on a predetermined prediction mode are X and Y, there may be a priority order of induced prediction modes, such as X-1, X+1, Y-1, Y+1 or X-1, Y-1, X+1, Y+1, etc. In this example, it is assumed that X has a priority order before Y, and <-> signs and <+> signs appear alternately, or one sign (negative numbers in this example) is induced (based on one absolute value) before another sign (positive numbers in this example) is induced, but is not limited to this.

[0262] Furthermore, a plurality of modes (X, Y in this example) can be used as the reference mode of the induced mode, or a predetermined mode among them (i.e., any of X and Y) can be used as the reference mode. This can be classified according to a predetermined criterion, and can be determined based on the position of the acquired block (e.g., the mode of a specific block of either the left block or the upper block is set as the reference mode), the shape of the target block (e.g., if the target block has a horizontally long rectangular shape, the mode of the upper block of the left and upper blocks is set as the reference mode, or if the target block has a vertically long rectangular shape, the mode of the left block is set as the reference mode, or vice versa), and tilt information of the prediction mode (e.g., a mode further tilted in a specific direction <left or right, up or down> based on the vertical or horizontal mode is set as the reference mode).

[0263] In summary, the (prior) category can include prediction modes of blocks adjacent to a given prediction mode, as well as prediction modes derived based on the previous prediction mode.

[0264] Each category may include at least one prediction mode among a predetermined prediction mode, prediction modes of blocks adjacent to the predetermined prediction mode, and induced prediction modes, and for convenience of explanation, they are referred to as Group_A, Group_B, and Group_C, respectively.

[0265] For example, the first category can be made up of Group_A, the second category can be made up of Group_A, Group_B, and Group_C, and the third category can be made up of the remaining modes (which in this case can also be seen as Group_C).

[0266] Alternatively, Group_B can be configured in the first category, Group_A, Group_B, and Group_C can be configured in the second category, and the remaining modes can be configured in the third category.

[0267] Alternatively, Group_A and Group_B can be configured in the first category, Group_A, Group_B and Group_C can be configured in the second category, and the remaining modes can be configured in the third category.

[0268] The above example is one example of the configuration of modes by dividing into categories, and in the case of Group_A and Group_B, which are included in multiple categories, the remaining modes that are not configured in the preceding category can be understood as being configured in the subsequent category. Also, the configuration of modes by dividing into various categories is not limited to the above example, and is possible.

[0269] Next, it is assumed that the priority of prediction modes for category configuration is supported, and when the configuration of modes is completed for the number of priority categories (e.g., the first category) based on the category priority (e.g., a 1-2-3 category order), the remaining modes are configured for the lower priority categories (e.g., the second category, the third category, etc.).

[0270] In the example below, Planar (assuming 0th index assignment) → L → A → DC → <l-1> →<L+1>→ <a-1> →<A+1>→ <l-2> →<L+2>→- <a-2>→<A+2>→Ver→Hor→ <ver-4>→<Ver+4>→ <hor-4>→<Hor+4> Assume that priorities such as:

[0271] For example, if the number of prediction modes in the first category is one, the prediction mode belonging to Group_A may be Planar (index 0), and as the number of prediction modes increases, Group_A may be configured with a lower-ranked prediction mode.

[0272] Also, when the number of prediction modes in the second category is one, the prediction modes belonging to Group_B can be the next prediction mode (index m+1) after the prediction mode (index m) finally configured in the first category, and as the number of prediction modes increases, Group_B can be configured with lower-ranked prediction modes.

[0273] Also, the third category may be configured as Group_C using the remaining prediction modes from the next prediction mode (index n+1) of the prediction mode (index n) finally configured in the second category.

[0274] The number of prediction modes in the first to third categories (in this example, when the group of prediction mode candidates is 67) can be set to various values ​​such as (1, 5, 61), (2, 4, 61), or (4, 8, 55), and can be determined based on the number of prediction mode candidates.

[0275] The predetermined prediction mode in the above example may be a mode that is fixedly supported regardless of the encoding environment, and the induced prediction mode may be obtained by using a prediction mode that is already in the candidate group as the reference mode.

[0276] Meanwhile, it may be difficult to obtain the prediction mode of a neighboring block depending on the state of the neighboring block (e.g., a division unit boundary, whether it is coded, the coding mode, etc.). Here, the state of the neighboring block can be classified into (1) a case where all of the neighboring blocks are unavailable, (2) a case where some of the neighboring blocks are unavailable, and (3) a case where all of the neighboring blocks are available. The above priority example can be explained assuming that all of the neighboring blocks are available.

[0277] Furthermore, the prediction modes of adjacent blocks can be obtained from two or more blocks, but the above example of priority can be explained assuming that the prediction modes of each block do not overlap.

[0278] Furthermore, an example of the priority order can be explained assuming that the prediction modes of adjacent blocks do not overlap with the predetermined prediction mode.

[0279] The priority for the category configuration may be adaptively set in consideration of the above factors. For example, an index corresponding to a prediction mode of a neighboring block may be removed from the priority, and an index related to a mode induced by using the prediction mode of the neighboring block as a reference mode may also be removed. This explanation may be commonly applied not only when the prediction mode of the neighboring block is a directional mode but also when it is a non-directional mode.

[0280] In addition, when prediction modes of adjacent blocks overlap, an index corresponding to the overlapping prediction mode and an index related to the induced mode can be removed. Alternatively, multiple priorities taking the above factors into consideration are supported, and categories can be configured accordingly.

[0281] In the intra prediction of the present invention, it has been mentioned that some of the supported prediction modes can be configured as a prediction mode candidate group, which may mean that individual prediction modes (e.g., directional modes) can be supported depending on state information of the target block (e.g., block size, shape, etc.).

[0282] For prediction mode encoding, a process of unifying the prediction modes into a common prediction mode candidate group may precede the encoding process. For example, prediction mode candidates may be unified into a predetermined range for prediction mode encoding, and prediction mode encoding may be performed based on the unified prediction mode candidate group. In this case, the predetermined range may be configured with prediction modes corresponding to numbers 0 to 66 in FIG. 5, but is not limited thereto.

[0283] The unification process may involve a mapping process within the predetermined range, and the mapping may be performed based on the directionality of the prediction mode. For example, in the case of a prediction mode outside the predetermined range, a mapping process may be performed on a prediction mode having similar characteristics to the prediction mode (e.g., when the edge direction is the same, i.e., including when the prediction start point and prediction direction are different but the edge direction is the same), and various other methods may be supported.

[0284] The prediction-related information generated by the above process can be transmitted to the encoding unit and included in the bitstream.

[0285] In the above description, the unit for intra prediction is called a target block, and the target block can be set in various block units depending on the block setting.

[0286] As an example, when a coding block is the same unit as a prediction block or a transformation block (i.e., when a coding block is immediately set as a prediction block or a transformation block), the target block for intra-screen prediction for setting a reference pixel area, configuring reference pixels (reference pixel filtering / reference pixel interpolation), configuring a prediction mode candidate group, performing prediction, prediction mode coding, etc. can be selected as the coding block.

[0287] As an example, if a coding block is a unit that may or may not be the same as a prediction block or a transformation block (i.e., the coding block can be divided into two or more sub-blocks (prediction blocks or transformation blocks)), the target block for intra-screen prediction can be set to any one of the coding block, prediction block, and transformation block.

[0288] For example, an encoding block can be set as the target block for (prediction mode encoding / configuration of prediction mode candidate group / configuration of reference pixels), and a prediction block or transformation block can be set as the target block for (setting of reference pixel area / execution of prediction), etc.

[0289] Alternatively, an encoding block can be set as the target block in (prediction mode encoding / configuring a group of prediction mode candidates), and a prediction block or transformation block can be set as the target block in (setting a reference pixel area / configuring reference pixels / performing prediction), etc.

[0290] In summary, the target block can be set to one of a coding block, a prediction block, and a transformation block, and the target block unit of the detailed structure can be determined according to the coding setting.

[0291] In an image decoding method according to an embodiment of the present invention, intra prediction may be configured as follows: The intra prediction of the predictor may include a prediction mode decoding step, a reference pixel construction step, and a prediction block generation step. Also, the image decoding apparatus may be configured to include a prediction mode decoding unit, a reference pixel construction unit, and a prediction block generation unit that implement the prediction mode decoding step, the reference pixel construction step, and the prediction block generation step. Some of the above-described processes may be omitted, or other processes may be added, or the processes may be arranged in a different order than the order described above.

[0292] The reference pixel construction unit and prediction block generation unit of the image decoding device perform the same functions as the corresponding units of the image encoding device, so detailed explanations will be omitted, and the prediction mode decoding unit can be performed by adopting the method used in the prediction mode encoding unit in reverse.

[0293] FIG. 7 is a flowchart showing a method for correcting intra-frame prediction according to an embodiment of the present invention.

[0294] 7, an intra-frame prediction mode for a current block is determined (S700), and a prediction block is generated based on the intra-frame prediction mode (S710). A correction setting for the prediction block is determined (S720), and the prediction block is corrected (S730).

[0295] The intra prediction of the current block can be selected from a group of prediction mode candidates acquired based on the state information of the current block, and one prediction mode from among them can be determined.

[0296] In the case of the luminance component, a prediction mode candidate group consisting of directional and non-directional modes can be referenced, and in the case of the chrominance component, a prediction mode candidate group in which directional and non-directional modes are supported as well as color mode or color copy mode can be referenced.

[0297] In this case, the prediction method may be classified into a directional mode, a non-directional mode, and a color copy mode, and each method may use an extrapolation, an interpolation, or an average copy method, but is not limited thereto and other variations are possible. For example, depending on the setting of the reference pixel area, the directional mode may support not only extrapolation but also interpolation (bidirectional prediction).

[0298] In summary, the reference area for intra-frame prediction can be set differently depending on the prediction method. In the case of extrapolation, at least one of the blocks to the left, above, upper left, upper right, or lower left of the target block can be set as the reference area. In the case of interpolation, at least one of the blocks to the right, below, or lower right of the target block can also be set as the reference area. In this case, if an adjacent area is not coded, it can be filled by induction from one or more pixels of a coded area. In addition, in the case of copying, a corresponding block in a color space different from the target block can be set as the reference area.

[0299] A predicted block can be generated based on the data of the reference region and an intra-frame prediction mode.

[0300] Correction to a predicted block may be performed to reduce the occurrence of discontinuous boundary characteristics between a predicted block generated according to a predetermined prediction mode and an adjacent block. However, since performing correction according to image characteristics may have an adverse effect, it is necessary to perform correction taking into account various coding factors.

[0301] Whether or not to support correction for a predicted block can be determined by explicitly generating related information or implicitly determining it. Even if it is determined that correction is supported in a higher unit such as a sequence or a picture, correction settings for a current block can be defined based on the image type, color components, state information of the current block, coding mode, intra prediction mode, whether or not sub-block-based intra prediction is applied, reference pixel line selection information, etc. Furthermore, setting information related to correction (e.g., a flag indicating whether or not block-based correction is performed, weight information to be applied to correction, etc.) can be explicitly generated in a lower unit (e.g., the former information is a block, a sub-block, etc.) or a higher unit (e.g., the latter information is a sequence, a picture, a slice, a tile, etc.).

[0302] The correction settings may include whether or not correction is performed, the number, position, and weight of reference pixels used for correction, etc. Even if correction is performed, correction may be performed on all or part of the pixels in the target block. For example, if the target block is m×n, correction may be performed on 1 to (m×n) pixels.

[0303] Here, whether or not (pixel-by-pixel) correction is applied, the number (1 to 5) of reference pixels used for correction (when correction is performed), their positions, weights, etc. can be set based not only on the correction settings but also on the positions of pixels within the block, etc.

[0304] Here, the intra prediction mode for which correction is supported may be determined depending on whether it belongs to a predetermined prediction mode group. For example, the prediction mode group may include planar, DC, horizontal, vertical, and diagonal modes (e.g., upper right, lower right, and lower left modes, e.g., modes 2, 34, and 66 in FIG. 5), and color copy modes. Alternatively, the prediction mode group may further include prediction modes derived from the prediction mode group (e.g., modes spaced by k based on the directional mode, where k is an integer with an absolute value of 1, 2, 3, 4, or greater).

[0305] The target block for which correction is supported may be smaller than or equal to a predetermined first threshold size, where the first threshold size may refer to the maximum size that the target block can have.

[0306] In addition, the block for which correction is supported may be larger than or equal to a second threshold size, where the second threshold size may refer to the minimum size that the target block can have.

[0307] Here, the first threshold size and the second threshold size can be expressed as width (W), height (H), W×H, W*H, etc., where W and H can be integers of 4, 8, 16, 32 or more. Here, the first threshold size can be greater than or equal to the second threshold size.

[0308] FIG. 8 is a layout diagram of pixels in a target block and neighboring blocks according to an embodiment of the present invention.

[0309] 8, the image is made up of pixels (a to p) in the current block, pixels (A to Q) in adjacent blocks for which coding has been completed, and pixels (aa to ii) in adjacent blocks for which coding has not been completed. Here, the pixels in the current block are corrected, and the pixels in the adjacent blocks can be used as reference for correction.

[0310] In this case, the reference pixels of the neighboring blocks may be one of the values ​​obtained by performing a reference pixel pre-processing process (e.g., reference pixel filtering) or not, and may be determined on a block-by-block basis or on a pixel-by-pixel basis.

[0311] The following equations show how corrections are applied to predicted pixels to obtain corrected pixels:

[0312] Z=(z*w0)+(a*w1)+(b*w2)+(c*w3)

[0313] Here, z and Z respectively represent predicted pixels and correction pixels, a to c represent reference pixels used for correction, and w0 to w3 represent weights applied to the correction. The reference pixels and weights may be determined according to the number of reference pixels used for correction. In this case, weights may be assigned values ​​including 0 taking normalization into consideration.

[0314] The positions and number of the reference pixels may be determined depending on the prediction mode of the current block.

[0315] For example, when the prediction mode of the target block is Planar, DC, vertical, or horizontal mode, the a, b, and c are the upper left reference pixel outside the target block (e.g., <-1, -1>), the upper reference pixel of the target block corresponding to or corresponding to the x component of the target pixel (e.g.,<x、-1> ), can be set to the left reference pixel of the target block (eg, <-1, y>) that corresponds to or corresponds to the y component of the target pixel.

[0316] Here, in the case of Planar DC mode, weights can be assigned to w2 and w3 to reflect the degree of variation of the reference pixels above and to the left of the target block. This can be an example of weighting based on how much the x and y components of the target pixel vary from the corresponding reference pixel (e.g., w1 is 0).

[0317] Here, in the case of vertical mode, a weight with a negative sign may be assigned to w0 and a weight with a positive sign (i.e., an opposite sign) may be assigned to w3 to reflect the degree of change in the reference pixel corresponding to the prediction direction. This may be an example of weight setting based on how much the reference pixel corresponding to the y component of the target pixel changes from the upper-left reference pixel (e.g., w2 is 0). In the case of horizontal mode, the related description in vertical mode can be used, so detailed description will be omitted.

[0318] Alternatively, when the prediction mode of the current block is a diagonal mode, the a, b, and c are reference pixels on the upper left side outside the current block, or reference pixels corresponding to or corresponding to the starting point of the prediction direction of the current block (for example,<x+y+1、-1> ), it can be set to a reference pixel (e.g., <-1, x+y+1>) corresponding to or on the opposite side of the starting point of the prediction direction of the current block. At this time, if the reference pixel is not obtained in integer units (i.e., if interpolation is required in decimal units), it can be set to one of the methods of replacing it with one adjacent reference pixel or interpolating it using reference pixels adjacent to both sides.

[0319] Here, in the case of the diagonal mode from the top right, a weight can be assigned to w3 to reflect the degree of change of the reference pixel located on the opposite side of the pixel located at the start point of the prediction direction. This can be an example of weight setting based on the degree of change from the reference pixel located on the line in the prediction direction of the target pixel (e.g., w1 and w2 are 0). In the case of the diagonal mode from the bottom left, the related description of the mode can be used, so detailed description will be omitted.

[0320] FIG. 9 is an exemplary diagram illustrating a correction method based on multiple reference pixel lines according to an embodiment of the present invention.

[0321] The example described below can be a configuration that can be supported separately from the configuration in which a reference pixel line used for intra-screen prediction is selected from the multiple reference pixel lines described above, and will be described based on that, but it can also be applied to a configuration in which they are interconnected.

[0322] 9, (a) shows an example of correction in a horizontal or vertical mode, specifically, an example in which reference pixels of two or more reference pixel lines are used for correction.

[0323] If the prediction mode of the target block is vertical mode, a * By setting a and a as reference pixels, the accuracy of correction can be improved. * Applying weighted average to a ** After obtaining the above, it can be applied to the correction formula described above.

[0324] This can be for the same reason as using neighboring reference pixels of the current block as prediction pixels, since block division is not performed so as to have boundaries that accurately separate image characteristics.

[0325] If the prediction mode of the target block is horizontal mode, b * can be set as a reference pixel to improve the accuracy of correction, and b and b * Applying weighted averaging to b ** can be applied to the correction formula described above.

[0326] 9, (b) shows an example of correction in a diagonal mode, specifically, a case where reference pixels of two or more reference pixel lines are used for correction.

[0327] If the prediction mode of the target block is in the lower left direction, a is added to the prediction start point position a. * By setting a as a reference pixel, the accuracy of correction can be improved, or a and a * Applying weighted average to a ** After obtaining the above, it can be applied to the correction formula described above.

[0328] In addition to b at the opposite side of the starting point of the prediction, * By setting b as the reference pixel, the accuracy of correction can be improved, or b and b * Applying weighted averaging to b ** After obtaining the above, it can be applied to the correction formula described above.

[0329] In the diagonal mode, reference pixels obtained based on one or more reference pixels at the start point of prediction or on the opposite side of the start point can be used for correction. In this case, the reference pixels can be selected from pixels located on a direction line of the prediction mode.

[0330] In the above example, when a reference pixel located on a multiple reference pixel line is used for correction, whether or not it is supported can be determined based on the image type, color component, state information of the target block, intra-screen prediction mode, whether or not a sub-block-based intra-screen prediction mode is applied, reference pixel line selection information, etc.

[0331] FIG. 10 is a flowchart showing a method for correcting intra-frame prediction according to an embodiment of the present invention.

[0332] Referring to FIG. 10, an arbitrary pixel for correction of a target block is obtained (S900), a correction setting is determined based on the target block and an intra-frame prediction mode (S910), and the predicted block can be corrected (S920).

[0333] For the correction of the predicted block, the blocks adjacent to the current block may be biased in a particular direction (for example, the upper left direction), which occurs due to the coding order according to the raster scan or Z scan method.

[0334] In addition to performing prediction and correction on reference pixels biased in a specific direction, prediction accuracy can be improved by using data of an area in which encoding has not been completed. For this purpose, a process of obtaining arbitrary pixels can be performed. In this case, the number of arbitrary pixels can be 1, 2, or an integer greater than or equal to 1.

[0335] For example, the arbitrary pixel used to correct the current block can be determined from among pixels aa to ii in Fig. 8. In particular, a pixel belonging to an area of ​​a block adjacent to the current block that has not yet been coded can be set as the arbitrary pixel.

[0336] Alternatively, it may be determined from among pixels a to p in Fig. 8. In particular, the current block also belongs to pixels that have not yet been coded, and therefore may be included in any pixel selection targets.

[0337] FIG. 11 is a diagram illustrating an example of an arbitrary pixel used for predictive pixel correction according to an embodiment of the present invention.

[0338] Referring to FIG. 11, an example diagram is shown in which (a) the bottom right pixel in the target block, (b) the bottom right pixel outside the target block, (c) the bottom and left pixels outside the target block, (d) the bottom pixel outside the target block, and (e) the right pixel outside the target block are defined as arbitrary pixels (X, X1, X2).

[0339] Whether or not to perform correction using a given pixel can be determined by explicitly generating related information or implicitly determining it. Even if it is determined to use a given pixel in a higher unit such as a sequence or a picture, the setting for the given pixel can be defined based on the image type, color component, state information of the current block, coding mode, intra-frame prediction mode, whether or not intra-frame prediction is applied in sub-block units, reference pixel line selection information, etc. Furthermore, setting information for the given pixel (for example, a flag indicating whether or not to perform correction using a given pixel in block units) can be explicitly generated.

[0340] The settings relating to the arbitrary pixel can include whether or not the arbitrary pixel is to be used (that is, whether or not the arbitrary pixel is to be used for correction), the number of arbitrary pixels, the position, and the like.

[0341] Here, the intra-frame prediction mode for performing correction using a given pixel may be determined depending on whether the pixel belongs to a predetermined prediction mode group. For example, the prediction group may be configured with planar, DC, horizontal, vertical, diagonal modes (e.g., upper right, lower right, lower left modes, etc., modes 2, 34, and 66 in FIG. 5), and color copy modes. Alternatively, the prediction mode may further include a prediction mode derived from the prediction mode group (e.g., a mode having an interval of k based on a directional mode, where k is an integer having an absolute value of 1, 2, 3, 4, or more).

[0342] The target block to be corrected using a given pixel may be smaller than or equal to a predetermined first threshold size, where the first threshold size may represent the maximum size the target block can have, or may be larger than or equal to a predetermined second threshold size, where the second threshold size may represent the minimum size the target block can have. Here, the threshold size may be expressed as width (W), height (H), W×H, W*H, etc., where W and H may be integers of 4, 8, 16, 32, or more, and the first threshold size may be larger than or equal to the second threshold size.

[0343] The above description can be understood as belonging to or combined with the correction setting described in the previous embodiment, and therefore a duplicated description will be omitted. In the example described below, it is assumed that an arbitrary pixel is set to (a) in FIG.

[0344] Since the encoding of any pixel position is not yet complete, the pixel value of that position can be obtained by various methods.

[0345] For example, data for any pixel location can be explicitly coded: either the pixel value at that location can be coded as is (e.g., based on bit depth), or a value obtained by dividing it by a predetermined value (e.g., quantization, and the quantized value is used when used for correction) can be coded.

[0346] Alternatively, two or more data candidate values ​​for a given pixel position may be obtained from an adjacent coded region of the target block, and index information for the data candidate values ​​may be constructed and encoded. For example, if the pixel value at a given pixel position is 67, a first candidate value obtained from an adjacent region (e.g., the upper region) of the target block is 70, and a second candidate value obtained from an adjacent region (e.g., the left region) of the target block is 85, resulting in a total of two candidates, then candidate value selection information (e.g., a 1-bit flag selected as the first candidate value) may be encoded. In this case, the method described in the example below may be used to obtain the candidate value. The candidate values ​​may be integers of 2, 3, 4, or more.

[0347] In the above example, it may be the case that information about data at any pixel position is explicitly encoded, and data at any pixel position can be obtained implicitly.

[0348] For example, the reference pixel may be obtained from a reference pixel at a predetermined position or from a reference pixel corresponding to or corresponding to an arbitrary pixel position. As an example of the predetermined position, the reference pixel may be obtained from a reference pixel at the upper left, upper, or left position outside the target block (A, E, M in FIG. 8), or from a reference pixel at a position (upper right, lower left) based on the width or height of the target block at the position (I, Q in FIG. 8).

[0349] Further, as an example of a reference pixel corresponding to an arbitrary pixel position, a reference pixel corresponding to the x or y component of an arbitrary pixel (for example,<x、-1> ,<-1,y>,<x+y+1、-1> , <-1, x+y+1>, etc.

[0350] The data value of one of the reference pixels at the position can be directly obtained as the data value of the arbitrary pixel position, or a value derived based on two or more reference pixels (e.g., a weighted average based on distance) can be obtained as the data value of the arbitrary pixel position.

[0351] For example, a reference pixel at a predetermined position among a plurality of reference pixels used for an arbitrary pixel position can be acquired as the data value of the arbitrary pixel position. Alternatively, a value among the plurality of reference pixels acquired by a predetermined process (e.g., maximum value, minimum value, median value, etc.) can be acquired as the data value of the arbitrary pixel position. Alternatively, a value among the plurality of reference pixels acquired by a predetermined process (e.g., weighted average, etc.) can be acquired as the data value of the arbitrary pixel position.

[0352] Next, we will explain how to obtain the data value of an arbitrary pixel position based on multiple reference pixels. Assume that A, E, and M in Figure 8 are used as reference pixels, and in the example below, they will be called x, y, and z. [Table 2]

[0353] Candidates 0 to 2 in the table indicate cases where a reference pixel at a predetermined position is acquired as a data value at an arbitrary pixel position. Candidates 3 to 6 indicate cases where data at an arbitrary pixel position is acquired by reflecting the degree of change of the target block. Specifically, these can correspond to cases where the degree of change of the target block is acquired based on a reference pixel at a predetermined position.

[0354] It should be understood that the above example is an example of a formula derived from multiple pixels, assuming that the target block is square, and that the formula can be modified depending on the horizontal / vertical length ratio of the block. Also, the data value at any pixel position is not limited to the above example, and can be obtained by various methods.

[0355] FIG. 12 is a diagram illustrating an example of correction based on an arbitrary pixel according to an embodiment of the present invention.

[0356] Referring to Figure 12, (a) shows the process of interpolating between an arbitrary pixel and a reference pixel corresponding to the upper block, and then shows the process of performing correction using reference pixels to the left, right, top, upper left, and upper right of the target block obtained thereby.

[0357] The above process can be applied when performing correction by reflecting the degree of variation of reference pixels in the left and right directions when the prediction mode of the current block is a vertical mode, which is different from the conventional case where correction is performed based on the degree of variation of reference pixels in the left direction.

[0358] Referring to Figure 12, (c) shows the process of interpolating between an arbitrary pixel and a reference pixel corresponding to the block to the left, and then performing correction using reference pixels above, below, to the left, upper left, and lower left of the target block obtained thereby.

[0359] The above process can be applied when performing correction by reflecting the degree of variation of reference pixels in the upper and lower directions when the prediction mode of the current block is a horizontal mode, which is different from the conventional case where correction is performed based on the degree of variation of reference pixels in the upper direction.

[0360] Referring to Figure 12, (e) shows the process of interpolating between an arbitrary pixel and reference pixels corresponding to the blocks to the left and above it, and then performing correction using reference pixels in the above, below, left, right, upper left, upper right, lower left, and lower right directions of the target block obtained thereby.

[0361] Next, the formula for applying correction to the predicted pixel to obtain the corrected pixel is shown, where the reference pixel may be an arbitrary pixel or a reference pixel obtained based on an arbitrary pixel, which may be different from the previous formula.

[0362] Z=(z*w0)+(a*w1)+(b*w2)+(c*w3)+(d*w4)+(e*w5)

[0363] Here, z and Z respectively represent predicted pixels and correction pixels, a to e represent reference pixels used for correction, and w0 to w5 represent weights applied to correction. The reference pixels and weights may be determined according to the number of reference pixels used for correction. In this case, weights may be assigned values ​​including 0, taking normalization into consideration.

[0364] The positions and number of the reference pixels can be determined according to the prediction mode of the current block, and various cases are possible, as shown in Figure 12. The explanation of other correction settings can be derived from the previous equations, so detailed explanations will be omitted.

[0365] In various embodiments, correction has been described using intra prediction. Here, the correction has been described as being performed after obtaining a predicted block, but correction may be performed by being reflected in the intra prediction process (i.e., the predicted block generation process).

[0366] In addition, the flag information generated in the correction process may be coded / decoded in a configuration separate from the intra-frame prediction mode, or may be combined with or dependent on the intra-frame prediction mode. In other words, it should be understood that the flag information is not limited to an additional or subsequent part after the intra-frame prediction process.

[0367] The methods of the present invention may be embodied in the form of program instructions that can be executed by various computer means and stored on computer-readable media. The computer-readable media may include, alone or in combination with program instructions, data files, data structures, and the like. The program instructions stored on the computer-readable media may be those specially designed and constructed for the purposes of the present invention, or those well known and available to those skilled in the computer software arts.

[0368] Examples of computer-readable media may include hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, etc. Examples of program instructions may include not only machine language code produced by a compiler, but also high-level language code that can be executed by a computer using an interpreter, etc. The above-mentioned hardware devices may be configured to operate as at least one software module to perform the operations of the present invention, and vice versa.

[0369] Furthermore, the above-described methods or devices may be realized in such a manner that all or part of their components or functions are combined or separated.

[0370] While the present invention has been described above with reference to preferred embodiments, those skilled in the art will appreciate that various modifications and variations can be made to the present invention without departing from the spirit and scope of the invention as set forth in the following claims. [Industrial Applicability]

[0371] The present invention can be used to encode / decode video signals. < / l-2> < / a-1> < / l-1> < / intra> < / array> < / qt>

Claims

1. determining an intra prediction mode for a current block; generating a prediction block of the current block based on the intra prediction mode; and correcting the predicted block; An image decoding method, wherein the intra prediction mode of the current block is determined to be a mode within a prediction mode candidate group according to state information of the current block.

2. If the color component of the target block is a luminance component, a prediction mode candidate group consisting of a directional mode and a non-directional mode is referenced, The image decoding method of claim 1 , wherein, when the color component of the current block is a chrominance component, a prediction mode candidate group that supports at least one of a directional mode, a non-directional mode, a color mode, or a color copy mode is referenced.

3. The image decoding method according to claim 2 , wherein the prediction mode candidate group is classified into a plurality of categories in consideration of a maximum number of prediction modes that can be included in each category or a priority order.

4. The image decoding method according to claim 2 , wherein the group of candidate prediction modes is classified into a first category including a non-directional mode and a directional mode, and a second category including a color copy mode.

5. obtaining first information identifying one of a plurality of categories; and acquiring second information that identifies an intra-frame prediction mode of the current block within a category defined by the first information, The image decoding method according to claim 3 , wherein the intra prediction mode of the current block is determined from the identified category based on the first information and the second information.

6. The image decoding method according to claim 5 , wherein the second information is not acquired when a category according to the first information includes only one prediction mode.

7. The method further includes configuring reference pixels used in the intra prediction; The image decoding method of claim 1 , wherein the reference pixels belong to all or part of a plurality of reference pixel lines supported by a decoding device.

8. The image decoding method according to claim 7 , further comprising the step of performing at least one of a weighting filter or an interpolation filter on the constructed reference pixels.

9. the step of correcting the predicted block is selectively performed based on predetermined coding information; The image decoding method of claim 1, wherein the encoding information includes at least one of an image type, a color component, state information, an encoding mode, an intra-frame prediction mode, whether or not sub-block-based intra-frame prediction is applied, or a reference pixel line.

Citation Information

Patent Citations

  • Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method, moving image decoding method, and program

    JP2008271371A

  • Intra-prediction method, and encoder and decoder using same

    US20140056352A1

  • Method and apparatus of directional intra prediction

    US20140092980A1

  • Intra prediction mode-based image processing method and apparatus therefor

    US20180234679A1

  • Dynamic image encoding device, dynamic image decoding device, dynamic image encoding method, and dynamic image decoding method

    WO2012096150A1