Image encoding / decoding method and device
The method improves image coding/decoding performance by determining and correcting intrascreen prediction modes for image blocks based on their color components, leading to enhanced prediction accuracy and coding efficiency.
Patent Information
- Application Number
- JP2024109817
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-09-07
- Filing Date
- 2024-07-08
- Publication Date
- 2025-04-21
- Estimated Expiration
- 2039-09-09
AI Technical Summary
Existing image coding/decoding methods require improved performance for image processing, particularly in intrascreen prediction, where color components play a crucial role.
The method determines an intrascreen prediction mode for a target block, generates a prediction block based on this mode, and corrects it by referring to candidate groups of prediction modes that include directional, non-directional, color, and color copy modes, depending on the color component of the target block.
This approach efficiently induces intrascreen prediction modes, improves prediction accuracy, and enhances coding performance by selectively using reference pixel lines and filtering techniques.
Smart Images

Figure 0007665844000003 
Figure 0007665844000004 
Figure 0007665844000005
Abstract
Description
[Technical field]
[0001] The present invention relates to an image encoding / decoding method and device. [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 insufficient.
[0003] Thus, in the conventional image encoding / decoding methods and apparatus, there is a need for improved performance for image processing, particularly image encoding or image decoding. Summary of the Invention [Problem to be solved by the invention]
[0004] SUMMARY OF THE PRESENT EMBODIMENT An object of the present invention is to provide a method and apparatus for deriving an intra 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 device that performs correction to intra 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 prediction block for the current block based on the intra-frame prediction mode, and correct the prediction block.
[0008] In the image encoding / decoding method and device 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 state information of the current block.
[0009] In the image encoding / decoding method and apparatus according to the present invention, when 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 when the color component of the target block is a chrominance 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 can be referenced.
[0010] In the image encoding / decoding method and apparatus according to the present invention, the prediction mode candidates may 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 identifying one of a plurality of categories can be obtained, and second information identifying an intra-screen prediction mode of the target block within a category according to 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 obtained when a 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 method further includes a step of configuring reference pixels to be used for the intra-screen prediction, and the reference pixels may belong to all or a part of a plurality of reference pixel lines supported by the decoding device.
[0016] In the image encoding / decoding method and apparatus according to the present invention, the method and apparatus may further include performing at least one of a weighting filter or an interpolation filter on the constructed reference pixels.
[0017] In the image encoding / decoding method and apparatus according to the present invention, the step of correcting the prediction 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, state information, an encoding mode, an intra-screen prediction mode, whether or not sub-block-based intra-screen prediction is applied, or a reference pixel line. Effect of the Invention
[0018] According to the present invention, it is possible to efficiently derive 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 a predicted block, thereby improving coding performance. [Brief description 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. [Diagram 2] 1 is a block diagram showing the configuration of an image encoding device according to an embodiment of the present invention; [Diagram 3] 1 is a block diagram showing the configuration of an image decoding device according to an embodiment of the present invention; [Figure 4]4A to 4C are exemplary diagrams showing various division forms that can be obtained by the block division unit of the present invention; [Diagram 5] FIG. 2 is an exemplary diagram illustrating a prediction mode in intra prediction according to an embodiment of the present invention. [Figure 6] 1 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-screen 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] 1 is a diagram illustrating an example of a compensation 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-screen prediction according to an embodiment of the present invention. [Figure 11] 1 is a diagram illustrating an example of an arbitrary pixel used in predicted pixel correction according to an embodiment of the present invention; [Figure 12] 11 is a diagram 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 PREFERRED EMBODIMENTS
[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 prediction block for the current block based on the intra-frame prediction mode, and correct the prediction block.
[0023] In the image encoding / decoding method and device 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 state information of the current block.
[0024] In the image encoding / decoding method and apparatus according to the present invention, when 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 when the color component of the target block is a chrominance 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 can be referenced.
[0025] In the image encoding / decoding method and apparatus according to the present invention, the prediction mode candidates may 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 identifying one of a plurality of categories can be obtained, and second information identifying an intra-screen prediction mode of the target block within a category according to 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 obtained when a 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 method further includes a step of configuring reference pixels to be used for the intra-screen prediction, and the reference pixels may belong to all or a part of a plurality of reference pixel lines supported by the decoding device.
[0031] In the image encoding / decoding method and apparatus according to the present invention, the method and apparatus may further include performing at least one of a weighting filter or an interpolation filter on the constructed reference pixels.
[0032] In the image encoding / decoding method and apparatus according to the present invention, the step of correcting the prediction 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, state information, an encoding mode, an intra-screen prediction mode, whether or not sub-block-based intra-screen 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 has 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 named a second element, and similarly, the second element can be named a first element, without departing from the scope of the present invention. The term "and / or" includes any combination of two or more associated listed items or two or more associated listed items.
[0035] When an element is said to be "coupled" or "connected" to another element, it should be understood that the element may be directly coupled or connected to the other element, but there may be other elements between them. In contrast, when an element is said to be "directly coupled" or "directly connected" to another element, it should be understood that there are no other elements between them.
[0036] The terms used in the present invention are merely used to describe certain embodiments and are not intended to limit the present invention. A singular expression includes a plural expression unless the context clearly indicates otherwise. In the present invention, the terms "include" or "have" 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 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 having ordinary skill in the art to which the present invention belongs. Terms defined in commonly used dictionaries should be interpreted as being consistent 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 expressly defined in the present invention.
[0038] Typically, a picture may be configured with one or more color spaces depending on the color format of the image. Depending on the color format, a picture may be configured with one or more pictures having a certain size or one or more pictures having different sizes. For example, in a YCbCr color configuration, color formats such as 4:4:4, 4:2:2, 4:2:0, and monochrome (configured with only Y) may be supported. For example, in the case of YCbCr4:2:0, a picture may be configured with one luminance component (Y in this example) and two chrominance components (Cb / Cr in this example). In this case, the composition ratio of the chrominance component to the luminance component may be 1:2 horizontally. For example, in the case of 4:4:4, the horizontal and vertical composition ratios may be the same. When a picture is 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 may mean an image that is encoded by itself without using a reference picture, P image type may mean an image that is encoded using a reference picture but allows only forward prediction, and B image type may mean an image that is encoded using a reference picture and allows forward / backward prediction, but depending on the encoding settings, some of the above types may be combined (P and B 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, the 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 the decoded information. Here, the implicit processing can be understood as processing the encoding / decoding information in the same process or rule in the encoder and decoder.
[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 a user terminal 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 smart phone, or a TV, or a server terminal 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 and wireless communication networks, a memory (120, 125) for storing various programs and data for inter or intra prediction to encode or decode an image, or a processor (110, 115) for executing a program to perform calculations and control.
[0043] In addition, the image coded into a bit stream 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. In addition, the image coded into a bit stream 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 described above may be separate devices, but may be implemented as a single image encoding / decoding device. In this case, a part of the configuration of the image encoding device is substantially the same technical element as a part of the configuration of the image decoding device, and can be implemented to include at least the same structure or perform at least the same function.
[0045] Therefore, in the following detailed description of technical elements and their operating principles, duplicated 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 realized using a prediction module, which is a software module, and may generate a prediction block for a block to be coded using an intra prediction method or an inter prediction method. The prediction unit 200 may generate a prediction block by predicting a target block to be coded in an image. In other words, the prediction unit 200 may predict a pixel value of each pixel of a target block to be coded in an image using intra prediction or inter prediction, and generate a prediction block having a predicated pixel value of each pixel. In addition, the prediction unit 200 may transmit information required for generating a prediction block, such as information on a prediction mode such as an intra prediction mode or an inter prediction mode, to the coding unit, so that the coding unit may code information on the prediction mode. At this time, a processing unit in which prediction is performed and a processing unit in which a prediction method and specific contents are determined may be determined according to coding settings. For example, a prediction method, a prediction mode, etc. may be determined in a prediction unit, and prediction may be performed in a conversion unit.
[0050] The inter-prediction unit may distinguish between temporal prediction and spatial prediction based on the reference picture. Temporal prediction is a prediction method for finding motion from a picture that is temporally different from the current picture, and spatial prediction may be 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 may be managed in an integrated manner through a reference picture list, or may be managed by dividing the encoding mode.
[0051] In addition, the inter-screen prediction unit may classify the motion models into a motion model and a non-motion model according to the motion prediction method. In the case of the motion model, prediction is performed considering only translation, and in the case of the non-motion model, prediction is performed considering not only translation but also rotation, perspective, zoom in / out, etc. When assuming unidirectional prediction, one motion vector may be required in the case of the motion model, but one or more motion information (e.g., one motion vector + rotation angle / scale factor, two or more motion vectors, etc. Next, assuming that two or more motion vectors are used) may be required in the case of the non-motion motion model. In the case of 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, lower left vertex, etc. of the target block, and the position of the area to be predicted of the target block may be obtained in pixel units or sub-block units (an integer of 2 or more, such as 4×4, 8×8, etc.) according to the motion model. The inter-screen prediction unit may commonly apply some processes described below and separately apply some processes according to the motion model.
[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 coding 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 constructed from a reference picture according to a coding setting and included in at least one of the reference picture lists.
[0053] The reference picture constructing unit in the inter prediction unit may include a reference picture interpolation unit, and may perform an interpolation process for decimal pixels according to the 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 section in the inter-frame prediction section is a process of searching for blocks that have 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. The motion compensation section 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 of selecting optimal motion information of a target block. The motion information may be coded according to a motion information coding mode such as a skip mode, a merge mode, or a competition mode. The modes may be configured by combining modes supported according to a motion model, and examples thereof may include skip mode (movement), skip mode (non-movement), merge mode (movement), merge mode (non-movement), competition mode (movement), and competition mode (non-movement). Some of the modes may be included in a candidate group 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 target block from at least one candidate block, and when two or more candidate blocks are supported, optimal candidate selection information can be generated. In the skip mode (without residual signal) and the merge mode (with residual signal), the predicted value can be used as the motion information of the target block as is, and in the competitive mode, difference value information between the motion information of the target block and the predicted value can be generated.
[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, top, top left, top right, bottom left blocks, etc.), motion information of blocks temporally adjacent to the target block (e.g., left, right, top, bottom, top left, top right, bottom left, bottom right blocks, etc., including a block <center> in another image corresponding to or corresponding to the target block), and mixed motion information of spatial candidates and temporal candidates (e.g., information obtained by using the motion information of spatially adjacent blocks and the motion information of temporally adjacent blocks as an average value, median, etc. of two or more candidates. Motion information may be obtained in units of the target block or sub-blocks of the target block), etc. may be included in the candidate group.
[0058] There may be a priority order for the configuration of the motion information predictor candidate group. The order of inclusion in the configuration of the predictor candidate group may be determined according to the priority order, and the configuration of the candidate group 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 candidates and temporal candidates, but other modifications 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 can generate a residual block by subtracting a prediction block from a target block. That is, the subtraction unit 205 can calculate the difference between the pixel value of each pixel of a target block to be coded and the predicted pixel value of each pixel of a prediction block generated via a prediction unit to generate a residual block that is a block-shaped residual signal. The subtraction unit 205 can also generate a residual block based on a unit other than a block unit acquired via a block division unit 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 a transform coefficient can be obtained by transforming a residual block having a residual signal transmitted from the subtraction unit, and 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 thereto, and various transform techniques that are improvements or modifications of these may be used.
[0063] At least one of the transformation techniques may be supported, and at least one detailed transformation technique may be supported for each of the transformation techniques, where the detailed transformation techniques may be configured such that a portion of the basis vectors is 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 a part of the detailed conversion techniques. For example, DCT-2, DCT-8, and DST-7 can be configured as a group of candidate conversion techniques to perform conversion.
[0065] The transformation can be horizontal / vertical, for example, a spatial domain pixel value can be transformed to 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, for a total of two-dimensional transform.
[0066] The conversion can be performed using one fixed conversion technique, or the conversion technique can be adaptively selected according to the encoding setting. In this case, in the adaptive case, the conversion technique can be selected using an explicit or implicit method. In the explicit case, each conversion technique selection information or conversion technique set selection information applied in the horizontal and vertical directions can be generated in units such as blocks. In the implicit case, the encoding setting can be defined according to the image type (I / P / B), color components, block size / shape / position, intra-screen prediction mode, etc., and a predetermined conversion technique can be selected according to the encoding setting.
[0067] Also, depending on the encoding settings, some of the transformations may be omitted, meaning that one or more of the horizontal / vertical units may be omitted, either explicitly or implicitly.
[0068] The transform unit can transmit the information necessary to generate a transform block to the encoder so that it can be encoded, 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, but 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, Quantization Weighted Matrix, etc., 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., the quantization parameter is 0, i.e., lossless compression environment). As another example, the quantization process can be omitted when the compression performance by quantization is not exhibited depending on the characteristics of the image. In this case, the area in the quantization block (M×N) where the quantization process is omitted is the entire area or a partial area (M / 2×N / 2, M×N / 2, M / 2×N, etc.), and the quantization omission selection information can be determined implicitly or explicitly.
[0072] The quantization unit can transmit the information necessary to generate a quantization block to the encoding unit so that it can be encoded, and the resulting information can be recorded in a bitstream and transmitted to the decoder, and the decoding unit of the decoder can parse the corresponding 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, but the residual signal may be transformed to generate a residual block having transform coefficients without performing the quantization process, the residual signal of the residual block may be only subjected to the quantization process without transforming it into transform coefficients, and both the transform and quantization processes may not be performed. 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 inversely using the transform method used by the transform unit 210.
[0076] The adder 230 reconstructs the current block by adding the prediction block predicted by the prediction unit 200 and the residual block reconstructed by the inverse transform unit 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 coding the next block of the current block or another block or another 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 may remove block noise occurring at a boundary between blocks from a restored picture. The ALF may perform filtering based on a value obtained by comparing an image restored after a block is filtered through a deblocking filter with an original image. The SAO may restore an offset difference between a residual block to which the deblocking filter is applied and an original image in pixel units. Such post-processing filters may be applied to a restored picture or block.
[0078] The coded picture buffer 240 can store the 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 that 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 outputs the quantized coefficient sequence by encoding it 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 encoded data including encoding information transmitted from each component and output it as a bit stream.
[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] Moreover, 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 the quantized coefficients and the decoding information to be transmitted to each component.
[0085] The prediction unit 310 may generate a prediction block based on data transferred 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 induction process.
[0087] The inverse quantization unit 315 may 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] At this time, 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, the inverse quantization unit 315 and the inverse transform unit 320 can use the same processes and inverse transforms shared with the transform unit 210 and the quantization unit 215, or can reverse the transform and quantization processes using information on 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 transformation processes may be added to the prediction block derived by the prediction unit 310 to generate a reconstructed image block.
[0091] The filter 330 may also apply a deblocking filter to the reconstructed image blocks to remove blocking artifacts if necessary, and another 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 may be stored in a decoded picture buffer 335 .
[0093] Although not shown, the image encoding / decoding device may further include a block division unit.
[0094] The image may 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 mean a basic (or starting) unit for prediction, transformation, quantization, etc. in an 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 a color format (YCbCr in this example), and the size of each block may be determined according to a 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 more coding blocks according to a certain restriction, and may be set as a starting unit for division into lower units. In the present invention, a block may be understood as a broad concept including various shapes such as a triangle and a circle, without being limited to a rectangular shape.
[0095] It should be understood that the following description is for one color component, but can be changed and applied to other color components in proportion to the ratio according to the color format (e.g., in the case of YCbCr4:2:0, the horizontal and 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 (e.g., in the case of Cb / Cr, depending on the block division result of Y) is possible, independent block division is 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 according to the color components.
[0096] In the block division section, blocks can be expressed as M×N, and the maximum and minimum of each block are The value can be obtained within the range. For example, if you set the maximum value of the block to 256x256 and the minimum value to 4x4, the size 2 m ×2 n (in this example, m and n are integers from 2 to 8), or a block of size 2m×2m (in this example, m and n are integers from 2 to 128), or a block of size m×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 range in which the blocks such as the maximum and minimum values are supported may occur more than once.
[0097] For example, information on the maximum and minimum sizes of blocks may be generated, and information on the maximum and minimum sizes of blocks 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 in 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 / transformation / 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 / length ratio (block shape) that a block can have, and a boundary value condition for this may be set. In this case, only blocks that are equal to or less than an arbitrary boundary value (k) may be supported, and k may be defined based on the width / length ratio such as A / B (A is the longer or same value of the width and length, and B is the remaining value), and may be a real number equal to or greater than 1, such as 1.5, 2, 3, 4, etc. As in the above example, a restriction condition for the shape of one block in an image may be supported, or one or more restriction conditions may be supported depending on the partition 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 the 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 be a prediction block in the case of a prediction unit, a transform block in the case of a transformation unit, a quantization block in the case of a quantization unit, etc. However, without being limited thereto, a block unit can be further defined according to other components. In the present invention, the case where the input and output of each component are rectangular in shape will be mainly described, but some components can have input / output of other shapes (e.g., right-angled triangle, 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 size, and when the optimal size and shape by dividing the block 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. When 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 divide the coding block into at least one prediction block / transform block / quantization block. In addition, 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 unit and a lower unit) with other blocks, or may have an independent relationship. As an example, the prediction block may be a higher unit of the transform block, or may be a unit independent of the transform block, and various relationship settings are possible depending on the type of block.
[0103] Depending on the encoding setting, it may be determined whether or not to combine the upper unit and the lower unit. Here, combining between units means that the upper unit is not divided into the lower unit, and the encoding process (e.g., prediction unit, transform unit, inverse transform unit, etc.) of the lower unit is performed on the block (size and shape) of the upper unit. In other words, it may mean that the division process in a plurality of 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 may 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 may be performed on a coding block (when the coding block is combined with a prediction block), and a transform and inverse transform process may be performed on a transform block that is the same as or smaller than the coding block.
[0106] For example, a prediction process may be performed on a prediction block that is the same size as or smaller than the coding block (when the coding block is combined with a transformation block), and transformation and inverse transformation processes may be performed on the coding block.
[0107] For example, a prediction process may 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 transformation and inverse transformation processes may be performed on the prediction block.
[0108] As an example, the prediction process may be performed using a prediction block that is the same as or smaller than the coding block (if neither block is combined), and the transformation and inverse transformation processes may be performed using a transformation block that is the same as or smaller than the coding block.
[0109] Although various cases regarding coding, prediction, and transformation blocks are described in the above examples, the present invention is not limited to these.
[0110] The combination between the units may be supported as a fixed setting in an image, or may be supported as an adaptive setting in consideration of various coding factors, which may include image type, color components, coding mode (Intra / Inter), partition setting, block size / shape / position, horizontal / vertical length ratio, prediction related information (e.g., intra prediction mode, inter prediction mode, etc.), transform related information (e.g., transform technique selection information, etc.), quantization related information (e.g., quantization region selection information, quantized transform coefficient coding information, etc.), 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 a component to which the block belongs (e.g., prediction-related information and 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 is 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 manner 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. In the tree-based division, the division type may be determined based on various types of information (e.g., whether or not to divide, tree type, division direction, etc.), and in the index-based division, the division type may be determined 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 Fig. 4 is obtained by one division execution (or process), but this is not limited to this, and it may be obtained by multiple division operations. Also, additional division patterns not shown in Fig. 4 are possible.
[0116] (Tree-based partitioning) In the tree-based partitioning of the present invention, a quad tree (QT), a binary tree (BT), a ternary tree (TT), etc. can be supported. 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 means a method (n) in which a block is divided into two in both the horizontal and vertical directions (i.e., into four), BT means a method (b to g) in which a block is divided into two in either the horizontal or vertical direction, and TT means a method (h to m) in which a block is divided into thirds in either the horizontal or vertical direction.
[0118] Here, in the case of QT, a method (o, p) of dividing the image into four parts by limiting the dividing direction to either horizontal or vertical can be supported. In addition, in the case of BT, only the method (b, c) of dividing the image into equal parts, or only the method (d to g) of dividing the image into non-uniform parts, or both methods can be mixed. In addition, in the case of TT, only the method (h, j, k, m) of dividing the image into a specific direction (1:1:2, 2:1:1, etc. in the left-right or top-bottom direction) can be supported, or only the method (i, l) of dividing the image into the center (1:2:1, etc.) can be supported, or both methods can be mixed. In addition, a method (q) of dividing the image into four parts (i.e., 16 parts) in the horizontal and vertical directions can be supported.
[0119] In addition, the tree method may support z-division methods limited to the horizontal division direction (b, d, e, h, i, j, o), z-division methods limited to the vertical division direction (c, f, g, k, l, m, p), or a combination of both methods, where z can be 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 coding settings, one or more of the tree splitting methods may be supported, for example, QT may be supported, or QT / BT may be supported, or QT / BT / TT may be supported.
[0122] The above example is an example of a case where the basic tree division is QT, and BT and TT are included in the additional division method depending on the presence or absence of other tree support, but various modifications are possible. In this case, information on the presence or absence of other tree support (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 according to the encoding settings, or can be explicitly determined in units of sequences, pictures, slices, tile groups, tiles, bricks, 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 and 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, which may be information that can occur when division is performed.
[0124] When multiple tree partitions are supported, various partition information configurations are possible. The following is an example of how partition information is configured at one depth level (i.e., the supported partition depth may be set to one or more, allowing recursive partitioning, but for the sake of convenience, the following description will be given).
[0125] As an example (1), information on whether or not division is to be performed is confirmed. At this time, if division is not to be performed, the division is terminated.
[0126] If a split is to be performed, the selection information regarding the type of split (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 split direction information is further checked according to the type of split selected, and the next step is proceeded to (if additional splitting is possible because the split depth has not reached the maximum, etc., it starts from the beginning again, if splitting is not possible, the splitting ends).
[0127] As an example (2), information on whether or not a split is to be performed for a partial tree method (QT) is confirmed, and the process moves to the next step. At this time, if splitting is not to be performed, information on whether or not a split is to be performed for a partial tree method (BT) is confirmed. At this time, if splitting is not to be performed, information on whether or not a split is to be performed for a partial tree method (TT) is confirmed. At this time, if splitting is not to be performed, the splitting ends.
[0128] If partial tree-based (QT) splitting is to be performed, proceed to the next step. Also, if partial tree-based (BT) splitting is to be performed, check the split direction information and proceed to the next step. Also, if partial tree-based (TT) splitting is to be performed, check the split direction information and proceed to the next step.
[0129] As an example (3), check information about whether or not a split is to be performed for some tree methods (QT). If the split is not to be performed, check information about whether or not a split is to be performed for some tree methods (BT and TT). If the split is not to be performed, the split ends.
[0130] If some tree-based (QT) splitting is performed, proceed to the next step. Also, if some tree-based (BT and TT) splitting 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 are examples that explain the case where the splitting of the current step is unrelated to the splitting result of the previous step, but it is also possible to set the splitting of the current step to be dependent on the splitting result of the previous step.
[0132] For example, in the cases of 1 to 3, if some tree-based splitting (QT) was performed in the previous step and was transferred 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, and other tree-based splits (BT or TT) were performed and moved to the current step, it is possible to set the partial tree-based splits (BT and TT) except for the partial tree-based split (QT) to be supported in subsequent steps including the current step.
[0134] In the above cases, this means that the tree structure supported by block partitioning can be adaptive, which means that the partitioning information structure described above can also be configured differently. (The example described below is assumed to be example 3.) In other words, in the above example, if partitioning of some tree methods (QT) has not been performed in the previous step, the partitioning process can be performed in the current step without considering some tree methods (QT). In addition, partitioning information related to related tree methods (e.g., information on whether partitioning is performed, partitioning direction information, etc. In this example, <qt>In this case, the information about whether or not the data is split can be removed.
[0135] The above example concerns adaptive partitioning information configuration for cases where block partitioning is permitted (e.g., the block size is within the range between the maximum and minimum values, the partitioning depth of each tree method does not reach the maximum depth <allowable depth>, etc.), 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, the partitioning depth of each tree method reaches the maximum depth, etc.).
[0136] As mentioned above, in the present invention, the tree-based division can be performed using a recursive method. For example, if the division flag of a coding block with a division depth of k is 0, the coding block is coded in a coding block with a division depth of k, and if the division flag of a coding block with a division depth of k is 1, the coding block is coded in N sub-coding blocks (where N is an integer equal to or greater than 2, such as 2, 3, 4, etc.) with a division depth of k+1 according to the division 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 a division range and an allowable division depth.
[0138] In this case, the bitstream structure for expressing the partition information may be selected from one or more scanning methods. For example, the bitstream of the partition information may be configured based on the order of partition depth, or the bitstream of the partition information may be configured based on whether or not it is partitioned.
[0139] For example, when the order of division depth is used as a criterion, this refers to 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 there is division, this refers to 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 can be set individually for each tree, or 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 according to a given first tree is not equal to the maximum coding block, an 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 may be supported, and some configuration information may be implicit.
[0143] (Index-based partitioning) In the index-based splitting of the present invention, a constant split index (CSI) scheme and a variable split index (VSI) 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. Here, k may be an integer equal to or greater than 2, such as 2, 3, or 4. In particular, 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 directions selected from the group consisting of horizontal, vertical, and diagonal (e.g., upper left to lower right or lower left to upper right).
[0145] The index-based CSI partitioning scheme of the present invention may include candidates partitioned into z 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 may be 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] In addition, 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, 4, etc., but restrictions may be imposed when x and y are both 1 (because a already exists). Although FIG. 4 shows a 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 one of some diagonal directions (top left to bottom right) or some diagonal directions (bottom left to top right), where w may be an integer greater than or equal to 2, such as 2 or 3.
[0148] Referring to Fig. 4, the partitioning pattern may be divided into symmetrical partitioning pattern (b) and asymmetrical partitioning pattern (d, e) according to the length ratio of each subblock, and into partitioning pattern (k, m) biased in a specific direction and partitioning pattern (k) arranged in the center. The partitioning pattern may be defined according to various coding elements including the subblock shape as well as the length ratio of the subblocks, and the supported partitioning pattern may be implicitly or explicitly determined according to the coding setting. Therefore, a candidate group in the index-based partitioning method may 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 through division 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, 8, etc. 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 subblock, or may include candidates that are partitioned by fixing the horizontal and vertical lengths of the subblock. Since the horizontal or vertical length of the subblock is fixed, it may have a feature that allows equal partitioning 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 settings, only the CSI scheme may be supported, or only the VSI scheme may be supported, or both schemes may be supported, and information about the supported schemes 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, a set of candidates may consist of two or more of the index splits.
[0155] For example, a candidate group such as {a, b, c}, {a, b, c, n}, {a to g, n} may be constructed, but this may be an example in which a candidate group is constructed based on block shapes that are predicted to occur frequently based on general statistical characteristics, such as a block shape that is divided into two in the horizontal or vertical direction, or a block shape that is divided into two in both the horizontal and vertical directions.
[0156] Alternatively, a set of candidates such as {a, b}, {a, o}, {a, b, o} or {a, c}, {a, p}, {a, c, p} can be constructed, which include candidates that are divided into two and four in the horizontal and vertical directions, respectively. This can be an example of constructing a set of candidates based on block shapes that are predicted to be frequently divided in a particular direction.
[0157] Alternatively, a candidate group such as {a, o, p} or {a, n, q} can be constructed, but an example of constructing the candidate group may be a block shape that is predicted to have a large number of divisions having a smaller size than the block before division.
[0158] Alternatively, a candidate group such as {a, r, s} can be constructed, but it may be determined that an optimal division result that can be obtained in a rectangular shape has been obtained from the block before division using another method (tree method), and a non-rectangular division form is constructed as a candidate group.
[0159] As in the above examples, various candidate set configurations are possible, and more than one candidate set configuration may be supported by considering various coding factors.
[0160] Once the candidate set has been constructed, various partition configurations are possible.
[0161] For example, index selection information can be generated from a candidate group including a non-split candidate (a) and split candidates (b to s).
[0162] Alternatively, information indicating whether or not a division is to occur (whether or not the division type is a) can be generated, and if a division is to occur (if not a), index selection information can be generated from a candidate group consisting of candidates to be divided (b to s).
[0163] The partition information can be configured in various ways other than those described above, and binary bits can be assigned to the index of each candidate in the candidate group 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 partitioning patterns that are predicted to occur frequently into a candidate set.
[0165] Also, since the amount of bits for expressing index information can increase according to the number of supported candidate groups, this method may be suitable for single hierarchical division (e.g., division depth is limited to 0) rather than hierarchical division (recursive division) of a tree-based method. In other words, this method may support one division operation, or may be 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 is also possible to set 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, it is not limited to the above example, and other modified examples are possible.
[0167] Next, a case will be considered in which block division is determined mainly based on the type of block among the coding elements.
[0168] First, coding blocks are obtained through a splitting process. Here, the splitting process can use a tree-based splitting method, 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 type of tree. Depending on the coding settings, various combinations of each tree type such as QT / QT+BT / QT+BT+TT are possible.
[0169] The example described below shows the process in which a prediction block and a transformation block are finally divided 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] As an example (1), a prediction block may be set with the same size as the coding block to perform a prediction process, and a transformation block may be set with the same size as the coding block (or the 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, there is no separate partition information.
[0171] As an example (2), a prediction block may be set with the same size as the coding block, and a prediction process may be performed. In the case of a transformation block, a transformation block may be obtained through a division process based on the coding block (or the prediction block), and a transformation and inverse transformation process may be performed based on the obtained size.
[0172] Here, the splitting process can use a tree-based splitting method, and splitting results such as a (no split), b, c (BT), i, l (TT), and n (QT) can be obtained according to the type of tree in Fig. 4. Depending on the encoding settings, various combinations of each tree type such as QT / BT / QT+BT / QT+BT+TT are possible.
[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, d, etc. 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 it 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 Fig. 4 can be obtained according to the type of index. Depending on the coding settings, various candidate groups such as {a, b, c, n}, {a to g, n}, and {a, r, s} can be configured.
[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 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 prediction block can be set as it is, and transformation and inverse transformation processes can be performed. This example may be a case where the transformation block is set as the size of the obtained prediction block, or vice versa (the prediction block is set as the size of the transformation block).
[0177] Here, the splitting process can use a tree-based splitting method, and splitting forms such as a (no split), b, c (BT), and n (QT) in Fig. 4 can be obtained according to the type of tree. Various combinations of each tree type such as QT / BT / QT+BT are possible according to the encoding settings.
[0178] Here, an index-based splitting method can be used for the splitting process, and split forms such as a (no split), b, c, n, o, and p in Fig. 4 can be obtained according to the type of index. Depending on the coding setting, various candidate groups 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} can be configured. In addition, among the index-based splitting methods, the VSI method may be used alone or in combination with the CSI method to configure the candidate group.
[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. In addition, 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 partitioning process can use a tree-based partitioning method or an index-based partitioning method, and a candidate group can be constructed in the same or similar manner as in the fourth example.
[0181] The above examples describe some cases that may occur 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 modified examples are possible. In addition, block division settings may be determined taking into account not only the type of block but also various coding elements.
[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, transformation block, quantization block, etc.), division state, coding mode (Intra / Inter), prediction related information (intra-screen prediction mode, inter-screen prediction mode, etc.), transformation related information (transformation technique selection information, etc.), quantization related information (quantization area selection information, quantized transformation coefficient coding information, etc.), etc.
[0183] FIG. 5 is an example diagram showing a prediction mode 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). At this time, the directional modes can be classified into gradient (e.g., dy / dx) or angle information (Degree).
[0185] In the case of non-directional mode, prediction may be made by averaging adjacent reference pixels of the block, interpolation, etc., and in the case of directional mode, prediction may be made 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] In general, 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 of 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), and 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 made through extrapolation in the (right → left) direction. Alternatively, in a state in which both the left and right blocks are available, prediction can be made through extrapolation in a predetermined direction (left → right or right → left), or prediction can be made by interpolation of both blocks. In the present invention, it is assumed that coding is performed according to a raster scan or z-scan order, and referenceable pixels are located in the left, top, top left, top right, and bottom left directions.
[0189] In addition, a prediction mode that supports this may be included, in which a reconstructed block of another color space that has already been coded may be used to predict a target block by using the correlation between color spaces. For example, in the case of a chrominance component, a predicted block of the target block may be generated using a reconstructed block of a luminance component corresponding to the target block. That is, a predicted block may be generated based on a reconstructed block in consideration of the correlation between color spaces, and may be included as an intra-frame prediction mode for the chrominance component.
[0190] In the case of the chrominance component, the prediction mode candidate group may have the same candidate group as the prediction mode candidate group of the luminance component, or some modes of the prediction mode candidate group of the luminance component and additional prediction modes (color copy mode, color mode) for the chrominance component may be included in the prediction mode candidate group. Here, the color copy mode may be a prediction mode related to a method of obtaining data for generating a prediction block from an area located in another color space, and the color mode may be a prediction mode related to a method of obtaining a prediction mode from an area located in another color space. In the case of the color copy mode and the color mode, m and n modes (m and n are integers of 0, 1, 2, 3 or more) 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, and 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, etc.). <1> left, <2> Upper side, <3> Left + upper area, etc.) can be used to provide 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 (e.g., the positions of corresponding blocks) for obtaining a prediction mode can be predefined. <1> center, <2> upper left side, <3> upper right side, <4> Lower left, <5> It can support the lower 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 candidates of supported intra-frame prediction modes. A prediction mode candidate group may be configured by configuring all or a part of the prediction mode candidates. In this case, the prediction mode candidate group may be configured according to the size, shape (horizontal / vertical length ratio) of a block, etc.
[0195] For example, the number of prediction mode candidates may be determined according to the size of a block. In this case, the size of a block may be classified into one of two or more ranges based on one or more predetermined threshold sizes (A×B, C×D, etc.), and the number of candidates may be determined as one of 11, 35, 67, etc., according to the classified range, or the presence or absence of support and the number of color copy modes, color modes, etc. may be determined. In this case, the threshold size may be expressed as width (W), height (H), W×H, etc., and W and H may be integers of 2 or more, 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 / length ratio of the block). In this case, the width / length ratio of the block may be classified into one of two or more ranges 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 more, such as 1, 2, 4, 8, 16, etc., or a decimal value between 0 and 1, such as 1, 1 / 2, 1 / 4, 1 / 8, 1 / 16, etc.
[0197] In the present invention, it is assumed that 95 prediction modes as shown in FIG. 5 are supported for directional and non-directional modes, and that a color mode and a color copy mode can be supported. In addition, it is assumed that 67 directional and non-directional modes are supported as a prediction mode candidate group for a luminance component, and a total of eight prediction mode candidates, including four directional and non-directional modes, one color mode, and three color copy modes, are supported as a prediction mode candidate group for a chrominance component, but this is not limited thereto. There may be a predetermined configuration criterion for selecting a mode included in the prediction mode candidate group other than the assumed one.
[0198] Next, an example of a configuration of a prediction mode candidate group based on the horizontal / vertical length ratio of a block will be shown. [Table 1]
[0199] The above table is set on the basis that prediction modes 0 and 1 and prediction modes 2 to 66 are included in a prediction mode candidate group when the block shape is square. When the block shape is rectangular, the prediction modes to be added or removed from the square block prediction mode candidate group (excluding non-directional modes) can be configured as shown in the above table, which may be an example set under the assumption that it is advantageous in terms of prediction accuracy to set prediction modes wider for longer block lengths than for shorter block lengths, but configurations that contradict this are also possible.
[0200] The reference pixel configuration unit can configure reference pixels to be used in 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 matrix (such as a primary or secondary array), 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 the reference pixels.
[0201] The following description will be given assuming that the blocks to the left, above, above left, above right, and below left of the target block are used for intra-screen prediction, but this is not limited to the above, and other configurations of block candidate groups may also be used for intra-screen prediction.
[0202] For example, the candidate group of neighboring blocks for the reference pixel is an example of a case following 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 include right, bottom, bottom right blocks, etc.) can be included.
[0203] On the other hand, the pixels adjacent to the target block can be classified into at least one reference pixel hierarchy, but the pixels closest to the target block are ref_0 {pixels whose pixel value differs from the boundary pixels of the target block by 1. p(-1,-1) to p(2m-1,-1), p(-1,0) to p(-1,2n-1)}, the next adjacent pixels {pixels whose pixel value differs from the boundary pixels of the target block by 2. 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 value differs from the boundary pixels of the target block by 3. 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 hierarchies depending on the distance of the pixels 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 group in order starting from the reference pixel line closest to the target block, but this is not limited thereto. For example, when N is 3,<ref_0、ref_1、ref_2> The candidate group can be constructed in the following manner, or<ref_0、ref_1、ref_3> ,<ref_0、ref_2、ref_3> ,<ref_1、ref_2、ref_3> It is also possible for the candidate set to be constructed in a non-sequential manner, such as by excluding the most adjacent reference pixel line.
[0205] Prediction can be performed using all of the reference pixel lines in the candidate set, or prediction can be performed using a portion of the reference pixel lines (one or more).
[0206] For example, depending on the encoding setting, one of the multiple reference pixel lines is selected, and intra-screen prediction can be performed using the reference pixel line, or two or more of the multiple reference pixel lines are selected, and intra-screen prediction can be performed using the reference pixel lines (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 determined implicitly or explicitly. For example, if it is implicit, it means that it is determined based on an encoding setting defined according to any one or a combination of two or more elements 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, the case where intra prediction is performed using the nearest reference pixel line will be mainly described. However, the reference pixel line referred to in the 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, and the setting of intra prediction can also be determined accordingly.
[0209] The reference pixel construction unit for intra-screen 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 the reference pixels to classify the reference pixels into available and unavailable reference pixels. Here, the availability of the reference pixels is determined to be unavailable when at least one of the following conditions is satisfied:
[0211] For example, if it is located outside the picture boundary, if it does not belong to the same division unit as the target block (for example, units such as slices and tiles that cannot refer to each other. However, if units such as slices and tiles have the characteristic that they can refer to each other, exceptions are made even if they are not the same division unit), or if encoding is not complete, it can be determined that it is unusable. In other words, if none of the above conditions are satisfied, it can be determined that it is usable.
[0212] In addition, the use of reference pixels can be restricted by coding settings. For example, even if it is determined that the reference pixels are usable based on the above conditions, the use of the reference pixels can be restricted depending on whether or not limited intra-screen prediction (e.g., constrained_intra_pred_flag) is performed. The limited intra-screen prediction can be performed when it is intended to prohibit the use of a block reconstructed by referring to another image as a reference pixel in order to prevent error propagation to external factors such as a 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-picture 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 or not to use it 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 is generally set to be possible, but is not limited thereto.
[0216] Since the reference pixels are composed of one or more blocks, after checking the reference pixel possibility, 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] When the reference pixel candidate block is available, the pixel at the corresponding position can be included in the reference pixel memory of the current block. At this time, the pixel data can be directly copied or can be included in the reference pixel memory after a process such as reference pixel filtering or reference pixel interpolation. Also, when the reference pixel candidate block is unavailable, a pixel obtained through a reference pixel generation process can be included in the reference pixel memory of the current block.
[0218] Next, examples are given of generating reference pixels for unavailable block locations using various methods.
[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 a pixel distribution in the image). In particular, this can be an example applied when all of the reference pixel candidate blocks are unavailable.
[0220] Alternatively, the reference pixels may be generated from a region of the image that has already been coded, in particular from at least one available block adjacent to the unavailable block, using at least one of methods such as extrapolation, interpolation, and copying.
[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 completing the construction of the reference pixels, 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 reference pixel filtering and reference pixel interpolation can be performed. Reference pixel filtering can precede or follow reference pixel interpolation, or they can be combined at the same time.
[0223] Reference pixel filtering may be a process performed for the purpose of reducing degradation remaining in the reference pixels. The reference pixel filtering may be any of a number of filters that can be distinguished by setting various filter tap lengths and coefficients, such as [1, 2, 1] / 4, [2, 3, 6, 3, 2] / 16, etc. Also, a number of filtering operations may be performed by using different types of filters.
[0224] The reference pixel filtering can be explicitly determined, or it can be implicitly determined according to the coding settings. Here, the coding settings 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), the reference pixel line selection information, whether or not intra prediction is applied on a subblock basis, the intra prediction mode, etc.
[0225] The reference pixel interpolation is not performed in a prediction mode in which only integer unit pixels are referenced, but can be performed in a prediction mode in which decimal unit pixels are referenced.
[0226] The pixel position where the 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 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 the interpolation of fractional unit pixels, and the latter case is an example in which the input pixels are made different for each step (for example, integer pixels are used for 1 / 2 units, integer and 1 / 2 unit pixels are used for 1 / 4 units, etc.), 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 the coding settings. Here, the coding settings can be defined based on the state information of the current block, the image type, the color components, the reference pixel line selection information, whether or not intra prediction is applied on a subblock basis, the 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 according to the encoding settings. In this case, 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 it is also possible that the filter candidate set supported according to the color component is defined to be different (for example, some of the filter types are the same or different, and the length of the filter tab is 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 prediction mode candidates. In general, the optimal mode in terms of coding cost can be determined using a rate-distortion technique that considers block distortion (e.g., distortion between a target block and a reconstructed block, SAD (Sum of Absolute Difference), SSD (Sum of Square Difference, etc.)) 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 prediction mode candidates, or may predict the prediction mode and encode information related thereto. 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 classified into a plurality of categories (k, where k is an integer of 2, 3, 4 or more) and managed. For example, when classified into two categories, one category can be configured with prediction modes expected to match the prediction mode of a target block, and the other category can be configured with prediction modes 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 expected to match the prediction mode of a target block.
[0235] In the above example, the prediction modes are classified into two categories, and may be classified into more than two categories. When classified into three categories, the first category may be configured with a prediction mode that is expected to be highly likely to match the prediction mode of the target block, the second category may be configured with a prediction mode that is expected to be generally likely to match the prediction mode of the target block, and the third category may be configured with a prediction mode that is expected to be less likely to match the prediction mode of the target block. That is, the second category may be configured with a prediction mode that is expected to be consistent with the prediction mode of the target block among prediction modes that do not belong to the first category, and the third category may be configured with a prediction mode that does not belong to the first category and the second category.
[0236] As another example of category classification, classification according to prediction method is possible. For example, it can be classified into an extrapolation prediction method, an interpolation / average prediction method, a copy prediction method, etc. Here, the extrapolation prediction method can mean a directional mode, the interpolation / average prediction method can mean a non-directional mode, the copy prediction method can be classified into 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, but for convenience of explanation, it is assumed that it is classified into a directional / non-directional mode.
[0237] When classified into two categories according to the prediction method, a directional / non-directional mode can be configured in the first category, and a color copy mode can be configured in the second category. Alternatively, a directional mode can be configured in the first category, and a non-directional mode can be configured in the second category. The former case can be applied to intra-prediction of a chrominance component, and the latter case can be applied to intra-prediction of a luminance component. It is assumed that the color copy mode is applicable to the intra-prediction mode of a chrominance component in the part described below, but it should be understood that even if the color copy mode is not included, the application is limited to the intra-prediction mode of a luminance component and not limited to the intra-prediction mode of a luminance component.
[0238] If classified into three categories, the first category may be configured with a directional mode, the second category may be configured with a non-directional mode, and the third category may be configured with a color copy mode. Alternatively, the first category may be configured with a predetermined mode (e.g., vertical, horizontal, diagonal A mode, etc.) among the directional modes, the second category may be configured with a predetermined mode (e.g., diagonal B mode, etc.) among the directional modes, and the third category may be configured with a color copy mode. Here, the diagonal A mode may be configured with a diagonal mode that uses only integer pixels during prediction, and the diagonal B mode may be configured with a diagonal mode that uses integer pixels and decimal pixels during prediction, but is not limited thereto.
[0239] The above description is an example of the configuration of categories, and is not limited thereto, and classification can be performed according to various predetermined criteria. In addition, a plurality of predetermined criteria can be mixed and applied to the configuration of categories.
[0240] When the prediction mode is divided into a plurality of categories, selection information regarding which category the prediction mode of the target block is generated in 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 regarding the category selection and the candidate selection within a category. Next, a case in which 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 index assignment and binarization for each category can be configured in a form in which they are applied.
[0242] * Multiple syntax elements to assist in category selection In this example, the values of the syntax elements supported for category selection can have values of 0 or 1 (values greater than 1 are also possible).
[0243] As an example, one syntax element (the first syntax element) is <0> was assigned, and for the third category <1> In this case, the syntax element may be assigned as follows: <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. <0> , <1> may be assigned.
[0244] As an example, one syntax element (the first syntax element) is <0> is assigned, and for the second and third categories <1> In this case, the syntax element may be assigned as follows: <1> If the value is 0, another syntax element (second syntax element) for selecting a detailed category to select either the second category or the third category can be supported, and the syntax element is <0> , <1> may be assigned.
[0245] The above example is one example regarding 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 is smaller or equal to b and c, and b is smaller or equal to c. In this example, it is assumed that a is an integer between 1 and 5, b is an integer between 3 and 8, and c is a 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, and k-th Exp-Golomb binarization may be applied to the prediction modes belonging to the categories.
[0247] In the following examples, the configuration and setting of categories will be described as being fixed, but they can be adaptively set (e.g., the number of categories, the configuration of related flags, etc.) according to various coding elements. Here, the coding elements can 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 can 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 a prediction mode, and the prediction modes are encoded based on category selection information and candidate selection information within the category. However, an example in which criteria for classification of categories according to prediction methods are mixed for category configuration is also possible. In addition, when the second category is removed from the first and second categories, or when the explanations regarding the first and second categories are integrated, an explanation consisting of two categories can be derived, so detailed explanations 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] The target block can have a high correlation with its neighboring blocks, and not only can prediction be performed using neighboring reference pixels, but also the prediction mode of the neighboring blocks can be used to predict the prediction mode of the target block. Therefore, the prediction mode of the neighboring blocks of the target block can be selected as a candidate to be included in the first or second category. In this case, all or a part of the prediction modes of the left, upper, upper left, upper right, and lower left blocks of the target block can be considered as candidates to be included in the (prior) category. As an example, (left / upper), (left / upper / upper right), (left / upper / lower left), (left / upper / upper left / lower right / upper left), etc. can be considered.
[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 certain direction (in this example, left and top blocks) are divided into multiple sub-blocks, a sub-block at a specific position (e.g., L3 for the left block, U3 for the top 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, is in an unavailable position, or is in a coding mode), <intra inter>are different), it is not necessary to select a prediction mode for the block in that direction.
[0253] Alternatively, a (subblock) priority order for prediction mode selection can be supported (e.g., L3→L0→L1→L2, etc.), whereby the prediction mode of the available subblock with the highest priority can be selected as the prediction mode for the direction. If the prediction modes of the subblocks at all positions are unavailable, no prediction mode needs to be selected for the block in the direction.
[0254] In addition, a priority order for including prediction modes obtained from blocks in each direction in a category can be supported, for example, left→upper→upper right→lower left→upper left, left→upper→lower left→upper right→upper left, or upper→left→lower left→upper right→upper left, but is not limited thereto.
[0255] Many prediction modes are included in the prediction mode candidate group, and among them, there may be a prediction mode that generally occurs frequently. For example, vertical and horizontal edges may be image characteristics that can be found frequently, and flat areas such as backgrounds can also be found frequently. Therefore, a certain prediction mode that is expected to occur frequently may be selected as a candidate to be included in the first or second category.
[0256] As candidates for the predetermined prediction mode expected to occur frequently, non-directional prediction modes such as Planar (0), DC mode (1), horizontal (18), vertical (50), and diagonal modes (2, 34, 66, etc.) may be targeted. A priority order for including the prediction modes in categories may be supported. For example, a priority order such as Planar→DC→Ver→Hor may be set, but is 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 (eg, 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 the configuration of the (prior) category. However, when the number of prediction mode candidates is large, the above configuration may experience difficulties 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 mode of FIG. 5), the above configuration may fail to predict.
[0259] For this reason, prediction modes induced based on prediction modes of adjacent blocks and a predetermined prediction mode can be considered in constructing a category candidate group. As an example, prediction modes with k intervals based on the prediction mode (directional mode in this example) can be considered as induced prediction modes, and can be selected as candidates included in the first or second category. Here, k can be an integer of 1, 2, 3, 4 or more.
[0260] Here, when the prediction mode of the neighboring block or the prediction mode based on the predetermined prediction mode is assumed to be Z, there may be priorities of the induced prediction modes such as Z-1, Z+1, Z-2. In this example, it is assumed that the priorities are determined in the order of absolute values such as 1, 2 (based on one absolute value) and a <-> sign is followed by a <+> sign, but is not limited thereto. That is, this means that the interval information for filling the induced prediction mode does not have to start from 1 (e.g., integers such as 4, 8, 12, etc.). In addition, the k intervals 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 adjacent 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. This example assumes that X has a priority over Y, and <-> signs and <+> signs alternate, or one sign (negative numbers in this example) is induced (based on one absolute value) before the other sign (positive numbers in this example), but is not limited thereto.
[0262] In addition, a plurality of modes (X, Y in this example) can be used as the reference mode of the induced mode, or a predetermined mode (i.e., one 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 shape is a horizontally long rectangle, the mode of the upper block of the left and upper blocks is set as the reference mode, and if the shape is a vertically long rectangle, the mode of the left block is set as the reference mode. Or vice versa), and the inclination information of the prediction mode (e.g., a mode further inclined 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 may include prediction modes of blocks adjacent to a given prediction mode, as well as prediction modes derived based on the prior prediction mode.
[0264] Each category may include at least one prediction mode among a given prediction mode, prediction modes of blocks adjacent to the given prediction mode, and derived prediction modes, and for convenience of explanation, are referred to as Group_A, Group_B, and Group_C, respectively.
[0265] For example, the first category can consist of Group_A, the second category can consist of Group_A, Group_B, and Group_C, and the third category can consist of the remaining modes (which in this case can also be seen as Group_C).
[0266] Or, 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] Or, 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 category division, and in the case of Group_A and Group_B that 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 various category divisions is not limited to the above example, and is possible.
[0269] Next, it is assumed that a priority of prediction modes for category configuration is supported, and when 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 in 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, when the number of prediction modes in the first category is one, the prediction mode belonging to Group_A may be Planar (0th index), and as the number of prediction modes increases, Group_A may be configured with a lower-ranked prediction mode.
[0272] In addition, 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 configure Group_C using the remaining prediction modes from the next prediction mode (n+1 index) of the prediction mode (n index) finally configured in the second category.
[0274] The numbers of prediction modes in the first to third categories (in this example, when the prediction mode candidate group has 67 candidates) can be set in various ways, 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 setting a prediction mode already present in the candidate set as the reference mode.
[0276] Meanwhile, the prediction mode of the neighboring block may be difficult to obtain depending on the state of the neighboring block (e.g., division unit boundary, whether or not it is coded, coding mode, etc.). Here, the state of the neighboring block may 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, and the above priority order example may be described assuming that all of the neighboring blocks are available.
[0277] Also, the prediction modes of adjacent blocks can be obtained from two or more blocks, but the above priority order example can be explained assuming that the prediction modes of each block do not overlap.
[0278] Moreover, assuming that the prediction modes of adjacent blocks do not overlap with the given prediction mode, an example of the priority order can be explained.
[0279] The priority of 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, indexes corresponding to the overlapping prediction modes and indexes related to the induced modes can be removed. Alternatively, a plurality of priorities considering the above factors can be 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 a target block (e.g., block size, shape, etc.).
[0282] A process of unifying the prediction mode candidates into a common prediction mode candidate group for prediction mode encoding may precede the encoding process. For example, the 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. At this time, 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 include a mapping process within the predetermined range, and the mapping may be performed based on the direction of the prediction mode. For example, in the case of a prediction mode that is outside the predetermined range, a mapping process may be performed for a prediction mode that has similar characteristics to the prediction mode (e.g., when the edge direction is the same, i.e., 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 an encoding unit and included in a bitstream.
[0285] In the above description, the unit for performing 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), a 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 a coding block.
[0287] As an example, when 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 a 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 a target block for (setting of reference pixel area / execution of prediction), etc.
[0289] Alternatively, an encoding block can be set as a target block (prediction mode encoding / configuring a prediction mode candidate group), and a prediction block or transformation block can be set as a target block (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 configuration 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 realize 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, and the processes may be changed to an order other 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. The prediction mode decoding unit can be performed by adopting the same method used in the prediction mode encoding unit in reverse.
[0293] FIG. 7 is a flowchart showing a correction method for intra prediction according to an embodiment of the present invention.
[0294] 7, an intra prediction mode of a current block is determined (S700), and a prediction block is generated based on the intra prediction mode (S710). A correction setting of 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 of the prediction modes can be determined.
[0296] In the case of the luminance component, a prediction mode candidate group consisting of directional modes and non-directional modes can be referenced, and in the case of the chrominance component, a prediction mode candidate group in which directional modes, non-directional modes, and color modes or color copy modes are supported can be referenced.
[0297] In this case, the prediction method may be classified into a directional mode / a non-directional mode / a color copy mode, and each method may use an extrapolation, an interpolation, or an average copy method, but is not limited thereto and may be modified in other ways. 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 prediction can be set differently according to each prediction method, and in the case of extrapolation, at least one of the blocks to the left, above, above left, above right, and below left of the target block can be set as the reference area, and in the case of interpolation, at least one of the blocks to the right, below, and below right of the target block can be set as the reference area. In this case, if the adjacent area is not coded, it can be filled by induction from one or more pixels of the coded area. In addition, in the case of copying, the corresponding block in a color space different from the target block can be set as the reference area.
[0299] A prediction block can be generated based on the data of the reference region and an intra-frame prediction mode.
[0300] The correction for the predicted block may be performed to reduce the occurrence of discontinuous boundary characteristics between the predicted block generated according to a certain prediction mode and adjacent blocks. However, since performing the correction according to the characteristics of the image may have a counterproductive effect, it is necessary to perform the correction in consideration of various coding factors.
[0301] Whether or not to support correction for a predicted block can be determined by explicitly generating related information or by implicitly determining it. Even if it is determined to support correction in a higher unit such as a sequence or a picture, the correction setting for the target block can be defined based on the image type, color components, state information of the target block, coding mode, intra prediction mode, whether or not intra prediction in sub-block units is applied, reference pixel line selection information, etc. Also, setting information related to correction (e.g., a flag for whether or not to perform block-based correction, weight information 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 correction is performed, the number of reference pixels used for correction, positions, weights, 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 described above 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 certain prediction mode group. For example, the prediction mode 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 group may further include prediction modes derived from the prediction mode group (e.g., modes with k intervals based on directional modes, where k is an integer with an absolute value of 1, 2, 3, 4, or more).
[0305] The size of the target block for which correction is supported may be smaller than or equal to a first threshold size, where the first threshold size may refer to the maximum size that the target block can have.
[0306] Also, 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 a minimum size that the target block can have.
[0307] Here, the first threshold size and the second 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. Here, the first threshold size may be greater than or equal to the second threshold size.
[0308] FIG. 8 is a layout diagram of pixels of a target block and neighboring blocks according to an embodiment of the present invention.
[0309] 8, the block is made up of pixels (a to p) in a target 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 target block are corrected, and the pixels in the adjacent blocks can be used as a reference for the correction.
[0310] In this case, the reference pixels of the neighboring blocks may be one of values obtained by performing a reference pixel pre-processing process (e.g., reference pixel filtering) or not, which may be determined on a block-by-block basis or on a pixel-by-pixel basis.
[0311] The following is a mathematical formula for applying the correction to the predicted pixel to obtain the corrected pixel:
[0312] Z=(z*w0)+(a*w1)+(b*w2)+(c*w3)
[0313] Here, z and Z respectively denote a predicted pixel and a correction pixel, a to c denote reference pixels used for correction, and w0 to w3 denote 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, the weights may be assigned values including 0 that take normalization into consideration.
[0314] The positions and the number of the reference pixels may be determined according to 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 (e.g., <-1, -1>) outside the target block, the upper reference pixel (e.g.,<x、-1> ), and may be set to the left reference pixel (eg, <-1,y>) of the target block that corresponds or corresponds to the y component of the target pixel.
[0316] Here, for 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 setting weights 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 having a negative sign may be assigned to w0 and a weight having a positive sign (i.e., the opposite sign) may be assigned to w3 to reflect the degree of change of 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 may be introduced, 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 of the current block, or reference pixels corresponding to the start point of the prediction direction of the current block (for example,<x+y+1、-1> ), it may be set to a reference pixel (e.g., <-1, x+y+1>) corresponding to or equivalent to 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., when interpolation is required in decimal units), it may be set to one of the methods of replacing it with one adjacent reference pixel, or obtaining it by interpolating using reference pixels adjacent to both sides.
[0319] Here, in the case of the diagonal mode in the upper right direction, 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 how much the target pixel changes from the reference pixel located on the line in the prediction direction (e.g., w1 and w2 are 0). In the case of the diagonal mode in the lower left direction, the related description of the mode can be introduced, so detailed description will be omitted.
[0320] FIG. 9 is an exemplary diagram illustrating a compensation 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 to be used for intra-screen prediction is selected from the multiple reference pixel lines described above, and will be described based on that configuration, but it can also be applied to a configuration in which they are mutually coupled.
[0322] 9, (a) shows an example of correction in a horizontal or vertical mode, in particular, a case where reference pixels of two or more reference pixel lines are used for correction.
[0323] If the prediction mode of the target block is the vertical mode, a * By setting a and a as reference pixels, the accuracy of correction can be improved. * Applying weighted average to a ** After being obtained, it can be applied to the correction formula described above.
[0324] This can be for the same reason that neighboring reference pixels of the current block are used as prediction pixels, since block division is not performed with boundaries that precisely separate image characteristics.
[0325] If the prediction mode of the target block is horizontal mode, b * can be set as the reference pixel to improve the accuracy of correction, and b and b * Applying weighted average to b ** After being obtained, it can be applied to the correction formula mentioned above.
[0326] 9, (b) shows an example of correction in a diagonal mode, in particular, 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 the reference pixel, the accuracy of correction can be improved, or a and a * Applying weighted average to a ** After being obtained, it can be applied to the correction formula described above.
[0328] In addition to the b at the opposite side of the prediction start point, * By setting b as the reference pixel, the accuracy of correction can be improved, or b and b * Applying weighted average to b ** After being obtained, it can be applied to the correction formula described above.
[0329] In the case of a diagonal mode, reference pixels obtained based on one or more reference pixels of the prediction start point or the opposite side of the prediction start point can be used for correction, and 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 correction method for 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-screen prediction mode (S910), and correction of the predicted block can be performed (S920).
[0333] For the correction of the predicted block, the blocks adjacent to the current block may be configured to be biased in a particular direction (eg, the upper left direction), which occurs due to the coding order in the raster scan or Z scan method.
[0334] In addition to performing prediction and correction on reference pixels biased in a specific direction, the accuracy of prediction 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 for correcting the target block may be determined from among pixels aa to ii in Fig. 8. In particular, a pixel belonging to an area in which encoding has not yet been completed among blocks adjacent to the target block may be set as the arbitrary pixel.
[0336] Or, 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 completely coded, and therefore may be included in any pixel selection target.
[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 in (a) the bottom right pixel in the target block, in (b) the bottom right pixel outside the target block, in (c) the lower and left pixels outside the target block, in (d) the lower pixel outside the target block, and in (e) the right pixel outside the target block is defined as an arbitrary pixel (X, X1, X2).
[0339] Whether or not to use an arbitrary pixel for correction can be determined by explicitly generating related information or by implicitly determining it. Even if it is determined to use an arbitrary pixel in a higher unit such as a sequence or a picture, the setting for the arbitrary pixel can be defined based on the image type, color component, state information of the target block, coding mode, intra prediction mode, whether or not intra prediction is applied in sub-block units, reference pixel line selection information, etc. Also, setting information for the arbitrary pixel (for example, a flag or the like regarding whether or not to use an arbitrary pixel in block units for correction) 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-screen prediction mode for performing correction using an arbitrary pixel may be determined depending on whether it belongs to a certain prediction mode group. For example, the prediction group may be configured with planar, DC, horizontal, vertical, diagonal modes (e.g., upper right direction, lower right direction, lower left direction mode, etc., modes 2, 34, and 66 in FIG. 5), and color copy modes. Alternatively, the prediction mode may be further configured to 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 first threshold size, the first threshold size being the maximum size the target block can have, or may be larger than or equal to a second threshold size, the second threshold size being 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, so 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 a given 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 a given division value (e.g. quantization, with the quantized value being used when used for correction) can be coded.
[0346] Alternatively, two or more data candidate values for an arbitrary 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. As an example, when a pixel value at an arbitrary pixel position is 67, a first candidate value obtained from an adjacent region (e.g., upper region) of the target block is 70, and a second candidate value obtained from an adjacent region (e.g., left region) of the target block is 85, and thus a total of two candidates are supported, candidate value selection information (e.g., selected as a first candidate value, 1-bit flag) may be encoded. In this case, the method described in the example below may be used to obtain the candidate value. The candidate value may be supported as an integer of 2, 3, 4 or more.
[0347] The above example may be a case where 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 side, or left side 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] In addition, 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 acquired by a predetermined process (e.g., maximum value, minimum value, median value, etc.) among the plurality of reference pixels can be acquired as the data value of the arbitrary pixel position. Alternatively, a value acquired by a predetermined process (e.g., weighted average, etc.) among the plurality of reference pixels can be acquired as the data value of the arbitrary pixel position.
[0352] Next, a method for obtaining a data value at an arbitrary pixel position based on multiple reference pixels will be described. Assuming that A, E, and M in Fig. 8 are used as reference pixels, they will be called x, y, and z in the example described below. [Table 2]
[0353] Candidates 0 to 2 in the table refer to cases where a reference pixel at a predetermined position is obtained as a data value at an arbitrary pixel position. Candidates 3 to 6 refer to cases where data at an arbitrary pixel position is obtained by reflecting the degree of change of the target block. In particular, they may correspond to cases where the degree of change of the target block is obtained 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 a number of pixels assuming that the target block has a square shape, and can be modified according to the horizontal / vertical length ratio of the block. Also, the data value of an arbitrary 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 a process of interpolating between an arbitrary pixel and a reference pixel corresponding to the block above, and then shows a process of performing correction using reference pixels to the left, right, top, top left, and top right of the target block obtained thereby.
[0357] The above process can be applied when performing compensation by reflecting the variation of reference pixels in the left and right directions when the prediction mode of the target block is the vertical mode, which is different from the conventional case where compensation is performed based on the variation of reference pixels in the left direction.
[0358] Referring to Figure 12, (c) shows a 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 compensation by reflecting the variation of reference pixels in the upper and lower directions when the prediction mode of the target block is a horizontal mode, which is different from the conventional case where compensation is performed based on the variation of reference pixels in the upper direction.
[0360] Referring to Figure 12, (e) shows a process of interpolating between an arbitrary pixel and reference pixels corresponding to the blocks to the left and above, 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 denote a predicted pixel and a correction pixel, a to e denote reference pixels used for correction, and w0 to w5 denote 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, the weights may be assigned values including 0 that take normalization into consideration.
[0364] The positions and the number of the reference pixels can be determined according to the prediction mode of the target block, and various cases are possible as shown in Fig. 12. The explanation of other correction settings can be derived from the previous formulas, so detailed explanation will be omitted.
[0365] In various embodiments, correction has been described in terms of intra-prediction. Here, the correction has been described as being performed after obtaining a predicted block, but the correction may be performed in the intra-prediction process (i.e., a predicted block generation process).
[0366] In addition, the flag information generated in the compensation process may be encoded / decoded in a configuration separate from the intra-picture prediction mode, but may be combined with or dependent on the intra-picture prediction mode, i.e., it should be understood that the flag information is not limited to an additional or subsequent part after the intra-picture prediction process.
[0367] The methods of the present invention may be embodied in the form of program instructions that can be executed by various computing 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 they may be 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 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 and devices may be realized in such a manner that all or part of their configurations or functions are combined or separated.
[0370] While the present invention has been described above with reference to preferred embodiments, it will be understood by those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit and scope of the present 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 by performing intra-screen prediction of the current block based on the intra-screen prediction mode; The intra prediction mode of the target block is determined to be a mode in a prediction mode candidate group; When the color component of the target block is a chrominance component, the prediction mode candidate group is classified into a first category including at least one non-directional mode and at least one directional mode, and a second category including three color copy modes; An image decoding method, wherein the color copy mode is an intra-screen prediction mode that uses correlation between the target block of the chrominance component and a corresponding block of the luminance component, and whether the color copy mode is supported for the target block is determined based on a slice type and a comparison of the block size with a threshold.
2. determining an intra prediction mode for a current block; generating a prediction block of the current block based on the intra prediction mode; The intra prediction mode of the current block is coded to a mode within a prediction mode candidate set; When the color component of the target block is a chrominance component, the prediction mode candidate group is classified into a first category including at least one non-directional mode and at least one directional mode, and a second category including three color copy modes; An image encoding method, wherein the color copy mode is an intra-screen prediction mode that uses correlation between the target block of the chrominance component and a corresponding block of the luminance component, and whether the color copy mode is supported for the target block is determined based on a slice type and a comparison of the block size with a threshold.
3. A method for transmitting a bitstream generated by an image coding method, comprising the steps of: The image encoding method comprises: determining an intra prediction mode for a current block; generating a prediction block of the current block based on the intra prediction mode; The intra prediction mode of the current block is coded to a mode within a prediction mode candidate set; When the color component of the target block is a chrominance component, the prediction mode candidate group is classified into a first category including at least one non-directional mode and at least one directional mode, and a second category including three color copy modes; A method in which the color copy mode is an intra-screen prediction mode that uses correlation between the target block of the chrominance component and a corresponding block of the luminance component, and whether the color copy mode is supported for the target block is determined based on a slice type and a comparison of a block size and a threshold.
Citation Information
Patent Citations
Intra prediction image generating device, image decoding device, and image coding device
WO2018116925A1