Image encoding / decoding method
By deducing the encoding information of image blocks from adjacent blocks, the problem of high-resolution image transmission and storage costs is solved, and more efficient image encoding and decoding is achieved.
Patent Information
- Application Number
- CN202210817457.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2016-08-01
- Filing Date
- 2017-07-18
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2037-07-18
AI Technical Summary
The prior art increases transmission and storage costs and limited encoding efficiency when processing high-resolution and high-quality images.
Image encoding/decoding efficiency is improved by deriving the encoding information of the current block from the reconstruction block adjacent to the current block, including the transformation scheme of the motion vector difference and residual signal.
Improves image encoding/decoding efficiency, reduces transmission and storage costs, and is suitable for high resolution and high quality images.
Smart Images

Figure CN115052142B_ABST
Abstract
Description
[0001] This application is a divisional application of a patent application with application date of July 18, 2017, application number 201780048129.1, and title “Image encoding / decoding method”. Technical Field
[0002] The present invention relates to a method and apparatus for encoding / decoding an image. More particularly, the present invention relates to a method and apparatus for deriving encoding information of a current block by using encoding information of neighboring blocks. Background Art
[0003] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, has increased in various application fields. However, image data with higher resolution and quality increases the amount of data compared with conventional image data. Therefore, when image data is transmitted by using a medium such as conventional wired and wireless broadband networks, or when image data is stored by using conventional storage media, the cost of transmission and storage increases. In order to solve these problems occurring as the resolution and quality of image data increase, an efficient image encoding / decoding technology is needed for images with higher resolution and higher quality.
[0004] The image compression technology includes various technologies, including: an inter-frame prediction technology for predicting pixel values included in the current picture from a previous picture or a subsequent picture of the current picture; an intra-frame prediction technology for predicting pixel values included in the current picture by using pixel information in the current picture; a transform and quantization technology for compressing the energy of a residual signal; an entropy coding technology for assigning short codes to values with high occurrence frequencies and assigning long codes to values with low occurrence frequencies; etc. Image data can be effectively compressed by using such image compression technology and can be transmitted or stored.
[0005] In conventional motion compensation, only spatial motion vector candidates, temporal motion vector candidates, and zero motion vector candidates are added to a motion vector candidate list to be used, and only unidirectional prediction and bidirectional prediction are used, so there is a limitation in improving encoding efficiency. Summary of the invention
[0006] Technical issues
[0007] An object of the present invention is to provide a method and device for deriving coding information of a current block from a reconstructed block adjacent to the current block.
[0008] Another object of the present invention is to provide a method and apparatus for encoding / decoding a difference between a motion vector difference adjacent to a current block and a motion vector difference of a current block.
[0009] Technical Solution
[0010] According to the present invention, an image encoding method includes: generating a prediction signal of a current block; generating a residual signal of the current block based on the prediction signal; determining a transform scheme for transforming the residual signal; and performing quantization on the residual signal. Here, the transform includes a primary transform and a secondary transform, and at least one of the primary transform scheme and the secondary transform scheme is derived from a coded reconstruction block adjacent to the current block.
[0011] According to the present invention, an image decoding method includes: obtaining a quantized residual signal of a current block; performing inverse quantization on the quantized residual signal; and determining a transform scheme for inverse transforming the residual signal. Here, the inverse transform includes a primary transform and a secondary transform, and at least one of the primary transform scheme and the secondary transform scheme is derived from a decoded reconstructed block adjacent to the current block.
[0012] In an image encoding method or an image decoding method, when a prediction signal is generated through intra prediction, at least one of a primary transform scheme and a secondary transform scheme may be derived from a neighboring block having the same intra prediction mode as that of a current block.
[0013] In an image encoding method or an image decoding method, when a primary transform scheme of a neighboring block having the same intra prediction mode as that of a current block indicates transform skip, a primary transform scheme and a secondary transform scheme of the current block may be determined as transform skip.
[0014] In the image encoding method or the image decoding method, a secondary transform scheme may be derived from a neighboring block having a primary transform scheme identical to that of a current block.
[0015] In the image encoding method or the image decoding method, when a prediction signal is generated through inter prediction, at least one of a primary transform scheme and a secondary transform scheme is derived from a neighboring block having motion information identical to that of a current block.
[0016] In the image encoding method or the image decoding method, the motion information may include at least one of a motion vector, a reference picture index, and a reference picture direction.
[0017] Technical Effects
[0018] According to the present invention, encoding / decoding efficiency can be improved by providing a method and apparatus for deriving encoding information of a current block from a reconstructed block adjacent to the current block.
[0019] According to the present invention, encoding / decoding efficiency can be improved by a method and apparatus for encoding / decoding a difference between a motion vector difference adjacent to a current block and a motion vector difference of a current block. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a block diagram showing the configuration of an encoding device according to an embodiment of the present invention.
[0021] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment of the present invention.
[0022] Figure 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded.
[0023] Figure 4 is a diagram illustrating a form of a prediction unit (PU) that may be included in a coding unit (CU).
[0024] Figure 5 is a diagram illustrating a form of a transform unit (TU) that may be included in a coding unit (CU).
[0025] Figure 6 is a diagram for explaining an embodiment of a process of intra prediction.
[0026] Figure 7 is a diagram for explaining an embodiment of a process of inter-frame prediction.
[0027] Figure 8 is a diagram for explaining a transform set according to an intra prediction mode.
[0028] Fig. 9 is a diagram for explaining the process of conversion.
[0029] Fig.10 is a diagram for explaining scanning of quantized transform coefficients.
[0030] Fig.11 is a diagram for explaining block partitioning.
[0031] Fig.12 is a diagram illustrating an example of encoding / decoding units according to a partitioned form of a block.
[0032] Fig.13 is a flowchart illustrating a process of determining whether to decode information of a binary tree partition.
[0033] Fig.14 is a flowchart illustrating a process of determining whether to decode information of a binary tree partition.
[0034] Figures 15 to 17 is a diagram illustrating an example of a case where binary tree partitioning is no longer performed for blocks having a predetermined size or smaller.
[0035] Fig.18is a flowchart illustrating a process of determining whether to derive encoding information of a residual signal of a current block from a neighboring block when the current block is encoded through intra prediction.
[0036] Fig.19 is a flowchart illustrating a process of determining whether to derive encoding information of a residual signal of a current block from a neighboring block when the current block is encoded through inter-frame prediction.
[0037] Fig. 20 is a flowchart showing the decoding process of the motion vector of the current block.
[0038] Fig.21 is a diagram illustrating an example of deriving spatial motion vector candidates.
[0039] Fig. 22 is a diagram illustrating an example of deriving a temporal motion vector candidate.
[0040] Fig.23 is a diagram illustrating derivation of a second motion vector difference. DETAILED DESCRIPTION
[0041] Invention Mode
[0042] Various modifications may be made to the present invention, and there are various embodiments of the present invention, wherein examples of the embodiments will now be provided with reference to the accompanying drawings and examples of the embodiments will be described in detail. However, the present invention is not limited thereto, although the exemplary embodiments may be interpreted as including all modifications, equivalents or alternative forms within the technical concept and technical scope of the present invention. Similar reference numerals refer to functions that are identical or similar in all respects. In the accompanying drawings, the shapes and sizes of the elements may be exaggerated for clarity. In the following detailed description of the present invention, reference is made to the drawings that illustrate specific embodiments in which the present invention may be implemented by way of illustration. These embodiments are described in sufficient detail to enable those skilled in the art to implement the present disclosure. It should be understood that the various embodiments of the present disclosure, although different, are not necessarily mutually exclusive. For example, without departing from the spirit and scope of the present disclosure, the specific features, structures and characteristics associated with one embodiment described herein may be implemented in other embodiments. In addition, it should be understood that the position or arrangement of the various elements within each disclosed embodiment may be modified without departing from the spirit and scope of the present disclosure. Therefore, the following detailed description will not be made in a limiting sense, and the scope of the present disclosure is limited only by the appended claims (with the full range of equivalents claimed by the claims, in the case of appropriate interpretation).
[0043] The terms "first", "second", etc. used in the specification may be used to describe various components, but these components are not interpreted as being limited to the terms. The terms are only used to distinguish one component from another component. For example, without departing from the scope of the present invention, the "first" component may be referred to as the "second" component, and the "second" component may also be similarly referred to as the "first" component. The term "and / or" includes a combination of multiple items or any one of the multiple items.
[0044] It will be understood that in this specification, when an element is simply referred to as being “connected to” or “coupled to” another element rather than being “directly connected to” or “directly coupled to” another element, it may be “directly connected to” or “directly coupled to” another element, or connected to or coupled to another element with other elements interposed therebetween. Conversely, it will be understood that when an element is referred to as being “directly coupled to” or “directly coupled to” another element, there are no intervening elements.
[0045] In addition, the components shown in the embodiments of the present invention are shown independently to present characteristic functions different from each other. Therefore, this does not mean that each component is constituted with a component unit of separate hardware or software. In other words, for convenience, each component includes each of the enumerated components. Therefore, at least two components in each component can be combined to form a component, or a component can be divided into multiple components to perform each function. Without departing from the essence of the present invention, the embodiment in which each component is combined and the embodiment in which a component is divided are also included in the scope of the present invention.
[0046] The terms used in this specification are only used to describe specific embodiments and are not intended to limit the present invention. Expressions used in the singular include plural expressions unless it has a significantly different meaning in the context. In this specification, it will be understood that terms such as "including ...", "having ..." etc. are intended to indicate the existence of features, quantities, steps, behaviors, elements, parts, or combinations thereof disclosed in the specification, and are not intended to exclude the possibility that one or more other features, quantities, steps, behaviors, elements, parts, or combinations thereof may exist or may be added. In other words, when a particular element is referred to as "included", elements other than the corresponding element are not excluded, but other elements may be included in embodiments of the present invention or in the scope of the present invention.
[0047] In addition, some components may not be indispensable components for performing the necessary functions of the present invention, but optional components that only improve their performance. The present invention can be implemented by only including the indispensable components for implementing the essence of the present invention and excluding the components used when improving performance. The structure that only includes the indispensable components and excludes the optional components used when only improving performance is also included in the scope of the present invention.
[0048] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing the exemplary embodiments of the present invention, well-known functions or structures will not be described in detail because they will unnecessarily obscure the understanding of the present invention. The same components in the accompanying drawings are represented by the same reference numerals, and repeated descriptions of the same components will be omitted.
[0049] In addition, hereinafter, an image may mean a picture constituting a video, or may mean a video itself. For example, “encode or decode an image or encode and decode it” may mean “encode or decode a video or encode and decode it”, and may mean “encode or decode one image among a plurality of images of a video or encode and decode it”. Here, a picture and an image may have the same meaning.
[0050] Terminology Description
[0051] Encoder: Can mean a device that performs encoding.
[0052] Decoder: May mean a device that performs decoding.
[0053] Parsing: may mean determining the value of a syntax element by performing entropy decoding, or may mean the entropy decoding itself.
[0054] Block: can be meant as a sample point of an M×N matrix. Here, M and N are positive integers, and a block can be meant as a sample point matrix in a two-dimensional form.
[0055] Sample: is a basic unit of a block and may indicate a value ranging from 0 to 2 Bd − 1 according to a bit depth (Bd). A sample may mean a pixel in the present invention.
[0056] Unit: may mean a unit for encoding and decoding an image. When encoding and decoding an image, a unit may be a region generated by partitioning one image. In addition, a unit may mean a sub-division unit when one image is partitioned into a plurality of sub-division units during encoding or decoding. When encoding and decoding an image, a predetermined process for each unit may be performed. One unit may be partitioned into sub-units having a size smaller than that of the unit. Depending on the function, a unit may mean a block, a macroblock, a coding tree unit, a coding tree block, a coding unit, a coding block, a prediction unit, a prediction block, a transform unit, a transform block, and the like. In addition, in order to distinguish a unit from a block, a unit may include a luminance component block, a chrominance component block of a luminance component block, and a syntax element of each color component block. A unit may have various sizes and shapes, and specifically, the shape of a unit may be a two-dimensional geometric figure such as a rectangle, a square, a trapezoid, a triangle, a pentagon, and the like. In addition, the unit information may include at least one of a unit type (indicating a coding unit, a prediction unit, a transform unit, and the like), a unit size, a unit depth, an order in which a unit is encoded and decoded, and the like.
[0057] Reconstruction neighboring unit: may mean a reconstruction unit that has been previously encoded or decoded in space / time, and the reconstruction unit is adjacent to the encoding / decoding target unit. Here, the reconstruction neighboring unit may mean a reconstruction neighboring block.
[0058] Neighboring block: may mean a block adjacent to the encoding / decoding target block. A block adjacent to the encoding / decoding target block may mean a block having a boundary in contact with the encoding / decoding target block. A neighboring block may mean a block located at an adjacent vertex of the encoding / decoding target block. A neighboring block may mean a reconstructed neighboring block.
[0059] Unit depth: It can mean the degree to which a unit is partitioned. In a tree structure, the root node can be the highest node and the leaf node can be the lowest node.
[0060] Symbol: It can mean the syntax element, coding parameter, value of transform coefficient, etc. of the encoding / decoding target unit.
[0061] Parameter set: may refer to header information in the structure of a bitstream. A parameter set may include at least one of a video parameter set, a sequence parameter set, a picture parameter set, or an adaptation parameter set. In addition, a parameter set may refer to slice header information and tile header information, etc.
[0062] Bitstream: can mean a string of bits that includes encoded image information.
[0063] Prediction unit: may mean a basic unit when performing inter-frame prediction or intra-frame prediction and compensation for prediction. One prediction unit may be partitioned into a plurality of partitions. In this case, each of the plurality of partitions may be a basic unit when performing prediction and compensation, and each partition partitioned from the prediction unit may be a prediction unit. In addition, one prediction unit may be partitioned into a plurality of small prediction units. The prediction unit may have various sizes and shapes, and specifically, the shape of the prediction unit may be a two-dimensional geometric figure such as a rectangle, a square, a trapezoid, a triangle, a pentagon, etc.
[0064] Prediction unit partition: may refer to the shape of the partitioned prediction unit.
[0065] Reference picture list: may mean a list including at least one reference picture, wherein the at least one reference picture is used for inter prediction or motion compensation. The type of the reference picture list may be List Combined (LC), List 0 (L0), List 1 (L1), List 2 (L2), List 3 (L3), etc. At least one reference picture list may be used for inter prediction.
[0066] Inter prediction indicator: may mean one of the following: the inter prediction direction (unidirectional prediction, bidirectional prediction, etc.) of the encoding / decoding target block in the case of inter prediction, the number of reference pictures used to generate the prediction block through the encoding / decoding target block, and the number of reference blocks used to perform inter prediction or motion compensation through the encoding / decoding target block.
[0067] Reference picture index: may mean the index of a specific reference picture in a reference picture list.
[0068] Reference picture: may mean a picture that a specific unit refers to for inter-frame prediction or motion compensation. A reference image may be referred to as a reference picture.
[0069] Motion vector: is a two-dimensional vector used for inter-frame prediction or motion compensation, and may mean an offset between an encoding / decoding target picture and a reference picture. For example, (mvX, mvY) may indicate a motion vector, mvX may indicate a horizontal component, and mvY may indicate a vertical component.
[0070] Motion vector candidate: may mean a unit that becomes a prediction candidate when predicting a motion vector, or may mean a motion vector of the unit.
[0071] Motion vector candidate list: may mean a list configured by using motion vector candidates.
[0072] Motion vector candidate index: may mean an indicator indicating a motion vector candidate in a motion vector candidate list. The motion vector candidate index may be referred to as an index of a motion vector predictor.
[0073] Motion information: may mean a motion vector, a reference picture index, and an inter prediction indicator, and information including at least one of reference picture list information, a reference picture, a motion vector candidate, a motion vector candidate index, and the like.
[0074] Merge candidate list: may mean a list configured by using merge candidates.
[0075] Merge candidates: may include spatial merge candidates, temporal merge candidates, combined merge candidates, combined bi-predictive merge candidates, zero merge candidates, etc. The merge candidates may include motion information such as prediction type information, reference picture index for each list, motion vector, etc.
[0076] Merge index: may mean information indicating a merge candidate in a merge candidate list. In addition, the merge index may indicate a block of a derived merge candidate among reconstructed blocks that are spatially / temporally adjacent to the current block. In addition, the merge index may indicate at least one piece of motion information among multiple pieces of motion information of the merge candidate.
[0077] Transform unit: may mean a basic unit when encoding / decoding similar to transform, inverse transform, quantization, inverse quantization, and transform coefficient encoding / decoding is performed on a residual signal. One transform unit may be partitioned into a plurality of small transform units. The transform unit may have various sizes and shapes. Specifically, the shape of the transform unit may be a two-dimensional geometric figure such as a rectangle, a square, a trapezoid, a triangle, a pentagon, etc.
[0078] Scaling: may refer to the process of multiplying a factor by the transform coefficient levels, as a result of which transform coefficients may be generated. Scaling may also be referred to as inverse quantization.
[0079] Quantization parameter: may mean a value used when scaling transform coefficient levels during quantization and inverse quantization. Here, the quantization parameter may be a value mapped to a step size of quantization.
[0080] Delta quantization parameter: It can be defined as the difference between the quantization parameter of the encoding / decoding target unit and the predicted quantization parameter.
[0081] Scan: may mean a method of sorting the order of coefficients within a block or matrix. For example, the operation of sorting a two-dimensional matrix into a one-dimensional matrix may be called scanning, and the operation of sorting a one-dimensional matrix into a two-dimensional matrix may be called scanning or inverse scanning.
[0082] Transform coefficient: may mean a coefficient value generated after performing a transform. In the present invention, a quantized transform coefficient level (ie, a transform coefficient to which quantization is applied) may be referred to as a transform coefficient.
[0083] Non-zero transform coefficient: may mean a transform coefficient whose value is not zero, or may mean a transform coefficient level whose value is not zero.
[0084] Quantization matrix: may refer to a matrix used in quantization and inverse quantization to improve the subject quality or object quality of an image. A quantization matrix may be referred to as a scaling list.
[0085] Quantization matrix coefficient: may refer to each element of the quantization matrix. Quantization matrix coefficient may be referred to as matrix coefficient.
[0086] Default matrix: may mean a predetermined quantization matrix that is predefined in an encoder and a decoder.
[0087] Non-default matrix: may mean a quantization matrix sent / received by the user without being pre-defined in the encoder and decoder.
[0088] Coding tree unit: may be composed of one luminance component (Y) coding tree unit and two associated chrominance component (Cb, Cr) coding tree units. Each coding tree unit may be partitioned by using at least one partitioning method (such as quadtree, binary tree, etc.) to constitute sub-units such as coding units, prediction units, transform units, etc. Coding tree unit may be used as a term for indicating a pixel block (wherein a pixel block is a processing unit in the decoding / encoding process of an image, such as a partition of an input image).
[0089] Coding tree block: may be used as a term used to indicate one of a Y coding tree unit, a Cb coding tree unit, and a Cr coding tree unit.
[0090] Figure 1 is a block diagram showing the configuration of an encoding device according to an embodiment of the present invention.
[0091] The encoding device 100 may be a video encoding device or an image encoding device. A video may include one or more images. The encoding device 100 may encode one or more images of a video in a time sequence.
[0092] Reference Figure 1 , the encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra-frame prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180 and a reference picture buffer 190.
[0093] The encoding device 100 may encode the input picture in an intra mode or an inter mode or both the intra mode and the inter mode. In addition, the encoding device 100 may generate a bit stream by encoding the input picture, and may output the generated bit stream. When the intra mode is used as a prediction mode, the switch 115 may switch to intra. When the inter mode is used as a prediction mode, the switch 115 may switch to inter. Here, the intra mode may be referred to as an intra prediction mode, and the inter mode may be referred to as an inter prediction mode. The encoding device 100 may generate a prediction block of an input block of the input picture. In addition, after generating the prediction block, the encoding device 100 may encode the residual between the input block and the prediction block. The input picture may be referred to as a current image as a target of current encoding. The input block may be referred to as a current block or may be referred to as a coding target block as a target of current encoding.
[0094] When the prediction mode is the intra mode, the intra prediction unit 120 may use the pixel value of the previous encoding block adjacent to the current block as a reference pixel. The intra prediction unit 120 may perform spatial prediction by using the reference pixel, and may generate a prediction sample of the input block by using the spatial prediction. Here, intra prediction may mean intra-frame prediction.
[0095] When the prediction mode is the inter mode, the motion prediction unit 111 may search for an area that best matches the input block from the reference picture in the motion prediction process and may derive a motion vector by using the searched area. The reference picture may be stored in the reference picture buffer 190.
[0096] The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector. Here, the motion vector may be a two-dimensional vector for inter-frame prediction. In addition, the motion vector may indicate an offset between a current picture and a reference picture. Here, inter-frame prediction may mean inter-frame prediction.
[0097] When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 may generate a prediction block by applying an interpolation filter to a partial area in the reference picture. In order to perform inter-frame prediction or motion compensation based on the coding unit, it may be determined which method is used for the motion prediction and compensation method of the prediction unit in the coding unit among the skip mode, merge mode, AMVP mode, and current picture reference mode. Inter-frame prediction or motion compensation may be performed according to each mode. Here, the current picture reference mode may mean a prediction mode using a pre-reconstructed area of the current picture with the encoding target block. In order to specify the pre-reconstructed area, a motion vector for the current picture reference mode may be defined. Whether the encoding target block is encoded according to the current picture reference mode may be encoded by using the reference picture index of the encoding target block.
[0098] The subtractor 125 may generate a residual block by using a residual between the input block and the prediction block. The residual block may be referred to as a residual signal.
[0099] The transform unit 130 may generate a transform coefficient by transforming the residual block, and may output the transform coefficient. Here, the transform coefficient may be a coefficient value generated by transforming the residual block. In the transform skip mode, the transform unit 130 may skip transforming the residual block.
[0100] The quantized transform coefficient levels may be generated by applying quantization to the transform coefficients. Hereinafter, in an embodiment of the present invention, the quantized transform coefficient levels may be referred to as transform coefficients.
[0101] The quantization unit 140 may generate quantized transform coefficient levels by quantizing the transform coefficients according to the quantization parameters, and may output the quantized transform coefficient levels. Here, the quantization unit 140 may quantize the transform coefficients by using a quantization matrix.
[0102] The entropy encoding unit 150 may generate a bitstream by performing entropy encoding on the value calculated by the quantization unit 140 or the encoding parameter value calculated in the encoding process according to the probability distribution, and may output the generated bitstream. The entropy encoding unit 150 may perform entropy encoding on information for decoding an image, and may perform entropy encoding on information of pixels of the image. For example, the information for decoding an image may include a syntax element, etc.
[0103] When entropy coding is applied, a symbol is represented by allocating a small number of bits to a symbol with a high probability of occurrence and a large number of bits to a symbol with a low probability of occurrence, thereby reducing the size of a bit stream for encoding a target symbol. Therefore, by entropy coding, the compression performance of image coding can be improved. For entropy coding, the entropy coding unit 150 may use coding methods such as exponential Golomb, context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC). For example, the entropy coding unit 150 may perform entropy coding by using a variable length coding / code (VLC) table. In addition, the entropy coding unit 150 may derive a binarization method of the target symbol and a probability model of the target symbol / binary bit, and may then perform arithmetic coding by using the derived binarization method or the derived probability model.
[0104] In order to encode the transformation coefficient level, the entropy coding unit 150 may change the coefficients in the two-dimensional block form into a one-dimensional vector form by using a transformation coefficient scanning method. For example, by scanning the coefficients of the block with an upper right scan, the coefficients in the two-dimensional form may be changed into a one-dimensional vector. Depending on the size of the transformation unit and the intra-frame prediction mode, a vertical direction scan for scanning the coefficients in the two-dimensional block form in the column direction and a horizontal direction scan for scanning the coefficients in the two-dimensional block form in the row direction may be used instead of using an upper right scan. That is, depending on the size of the transformation unit and the intra-frame prediction mode, it may be determined which scanning method among the upper right scan, the vertical direction scan, and the horizontal direction scan will be used.
[0105] Coding parameters may include information such as syntax elements that are encoded by the encoder and sent to the decoder, and may include information that can be derived in the encoding or decoding process. Coding parameters may mean information necessary to encode or decode an image. For example, coding parameters may include at least one value or combination of the following items: block size, block depth, block partition information, unit size, unit depth, unit partition information, partition flag in quadtree form, partition flag in binary tree form, partition direction in binary tree form, intra-frame prediction mode, intra-frame prediction direction, reference sample filtering method, prediction block boundary filtering method, filter taps, filter coefficients, inter-frame prediction mode, motion information, motion vector, reference picture index, inter-frame prediction direction, inter-frame prediction indicator, reference picture list, motion vector predictor, motion vector candidate list, information on whether motion merge mode is used, motion merge candidate, motion merge candidate list, information on whether skip mode is used, interpolation filter type type, motion vector size, accuracy of motion vector representation, transform type, transform size, information on whether an additional (secondary) transform is used, information on whether a residual signal exists, coding block pattern, coding block flag, quantization parameter, quantization matrix, filter information within the loop, information on whether the filter is applied within the loop, filter coefficients within the loop, binarization / debinarization method, context model, context binary bit, bypass binary bit, transform coefficient, transform coefficient level, transform coefficient level scanning method, image display / output order, slice identification information, slice type, slice partition information, parallel block identification information, parallel block type, parallel block partition information, picture type, bit depth, and information of luminance signal or chrominance signal.
[0106] The residual signal may mean the difference between the original signal and the prediction signal. Alternatively, the residual signal may be a signal generated by transforming the difference between the original signal and the prediction signal. Alternatively, the residual signal may be a signal generated by transforming and quantizing the difference between the original signal and the prediction signal. The residual block may be a residual signal of a block unit.
[0107] When the encoding device 100 performs encoding by using inter-frame prediction. The encoded current picture may be used as a reference picture for another image to be processed subsequently. Therefore, the encoding device 100 may decode the encoded current picture and may store the decoded image as a reference picture. In order to perform decoding, inverse quantization and inverse transformation may be performed on the encoded current picture.
[0108] The quantized coefficients may be dequantized by the dequantization unit 160, and may be inversely transformed by the inverse transform unit 170. The dequantized and inversely transformed coefficients may be added to the prediction block by the adder 175, and thus a reconstructed block may be generated.
[0109] The reconstructed block may pass through the filter unit 180. The filter unit 180 may apply at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or the reconstructed picture. The filter unit 180 may be referred to as a loop filter.
[0110] The deblocking filter can remove block distortion that occurs at the boundary between blocks. In order to determine whether the deblocking filter is executed, it can be determined whether the deblocking filter is applied to the current block based on the pixels in a number of rows or columns included in the block. When the deblocking filter is applied to the block, a strong filter or a weak filter can be applied according to the required deblocking filter strength. In addition, when the deblocking filter is applied, horizontal filtering and vertical filtering can be processed in parallel.
[0111] Sample adaptive offset can add an optimal offset value to a pixel value to compensate for a coding error. Sample adaptive offset can correct the offset between a deblocked filtered image and an original picture for each pixel. In order to perform offset correction on a specific picture, a method of applying an offset considering edge information of each pixel can be used, or a method of partitioning pixels of an image into a predetermined number of regions, determining the region where offset correction is to be performed, and applying offset correction to the determined region can be used.
[0112] The adaptive loop filter may perform filtering based on a value obtained by comparing the reconstructed picture with the original picture. The pixels of the image may be partitioned into predetermined groups, a filter applied to each group is determined, and different filtering may be performed in each group. Information about whether the adaptive loop filter is applied to the luminance signal may be sent for each coding unit (CU). The shape and filter coefficients of the adaptive loop filter applied to each block may vary. In addition, an adaptive loop filter having the same form (fixed form) may be applied without considering the characteristics of the target block.
[0113] The reconstructed block passed through the filter unit 180 may be stored in the reference picture buffer 190 .
[0114] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment of the present invention.
[0115] The decoding device 200 may be a video decoding device or an image decoding device.
[0116] Reference Figure 2 , the decoding device 200 may include an entropy decoding unit 210, a dequantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260 and a reference picture buffer 270.
[0117] The decoding apparatus 200 may receive a bitstream output from the encoding apparatus 100. The decoding apparatus 200 may decode the bitstream in an intra mode or an inter mode. In addition, the decoding apparatus 200 may generate a reconstructed picture by performing decoding, and may output the reconstructed picture.
[0118] When the prediction mode used in decoding is the intra mode, the switch may be switched to intra. When the prediction mode used in decoding is the inter mode, the switch may be switched to inter.
[0119] The decoding device 200 may obtain a reconstructed residual block from the input bit stream and may generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding device 200 may generate a reconstructed block as a decoding target block by adding the reconstructed residual block to the prediction block. The decoding target block may be referred to as a current block.
[0120] The entropy decoding unit 210 may generate symbols by performing entropy decoding on the bit stream according to the probability distribution. The generated symbols may include symbols with quantized transform coefficient levels. Here, the entropy decoding method may be similar to the above-mentioned entropy encoding method. For example, the entropy decoding method may be an inverse process of the above-mentioned entropy encoding method.
[0121] In order to decode the transform coefficient level, the entropy decoding unit 210 may perform transform coefficient scanning, whereby the coefficients in the one-dimensional vector form may be changed into the two-dimensional block form. For example, by scanning the coefficients of the block with an upper right scan, the coefficients in the one-dimensional vector form may be changed into the two-dimensional block form. Depending on the size of the transform unit and the intra-frame prediction mode, vertical direction scanning and horizontal direction scanning may be used instead of using the upper right scan. That is, depending on the size of the transform unit and the intra-frame prediction mode, it may be determined which scanning method is used among the upper right scan, the vertical direction scan, and the horizontal direction scan.
[0122] The quantized transform coefficient levels may be dequantized by the dequantization unit 220 and may be inversely transformed by the inverse transform unit 230. The quantized transform coefficient levels are dequantized and inversely transformed to generate a reconstructed residual block. Here, the dequantization unit 220 may apply a quantization matrix to the quantized transform coefficient levels.
[0123] When the intra mode is used, the intra prediction unit 240 may generate a prediction block by performing spatial prediction using pixel values of a previously decoded block adjacent to a decoding target block.
[0124] When the inter-frame mode is used, the motion compensation unit 250 may generate a prediction block by performing motion compensation, wherein the motion compensation uses both the reference picture stored in the reference picture buffer 270 and the motion vector. When the value of the motion vector is not an integer, the motion compensation unit 250 may generate a prediction block by applying an interpolation filter to a partial area in the reference picture. In order to perform motion compensation, based on the coding unit, which method is used by the motion compensation method of the prediction unit in the coding unit may be determined among the skip mode, the merge mode, the AMVP mode, and the current picture reference mode. In addition, motion compensation may be performed according to the mode. Here, the current picture reference mode may mean a prediction mode using a previously reconstructed area within the current picture with the decoding target block. The previously reconstructed area may not be adjacent to the decoding target block. In order to indicate the previously reconstructed area, a fixed vector may be used for the current picture reference mode. In addition, a flag or index indicating whether the decoding target block is a block decoded according to the current picture reference mode may be sent with a signal and may be derived by using the reference picture index of the decoding target block. The current picture for the current picture reference mode may be present at a fixed position (e.g., a position where the reference picture index is 0 or the last position) within the reference picture list for the decoding target block. In addition, the current picture may be variably located within the reference picture list, for which a reference picture index indicating the position of the current picture may be signaled.
[0125] The reconstructed residual block may be added to the prediction block by the adder 255. A block generated by adding the reconstructed residual block and the prediction block may pass through the filter unit 260. The filter unit 260 may apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or the reconstructed picture. The filter unit 260 may output the reconstructed picture. The reconstructed picture may be stored in the reference picture buffer 270 and may be used for inter-frame prediction.
[0126] Figure 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded. Figure 3 An embodiment of partitioning a unit into a plurality of sub-units is schematically shown.
[0127] In order to effectively partition an image, a coding unit (CU) may be used in encoding and decoding. Here, a coding unit may mean a unit for encoding. A unit may be a combination of 1) a syntax element and 2) a block including image samples. For example, "partition of a unit" may mean "partition of blocks associated with a unit". Block partition information may include information about the depth of the unit. The depth information may indicate the number of times a unit is partitioned or the degree to which a unit is partitioned, or both.
[0128] Reference Figure 3 , the image 300 is sequentially partitioned for each maximum coding unit (LCU), and the partition structure is determined for each LCU. Here, LCU and coding tree unit (CTU) have the same meaning. A unit may have depth information based on a tree structure and may be hierarchically partitioned. Each partitioned sub-unit may have depth information. The depth information indicates the number of times the unit is partitioned or the degree to which the unit is partitioned, or both, and therefore, the depth information may include information about the size of the sub-unit.
[0129] The partition structure may mean the distribution of coding units (CUs) in the LCU 310. A CU may be a unit for efficiently encoding an image. The distribution may be determined based on whether a CU will be partitioned multiple times (a positive integer equal to or greater than 2, including 2, 4, 8, 16, etc.). The width dimension and height dimension of the partitioned CU may be half the width dimension and half the height dimension of the original CU, respectively. Optionally, depending on the number of partitions, the width dimension and height dimension of the partitioned CU may be smaller than the width dimension and height dimension of the original CU, respectively. The partitioned CU may be recursively partitioned into multiple further partitioned CUs, wherein, according to the same partitioning method, the further partitioned CU has a width dimension and a height dimension that are smaller than the width dimension and the height dimension of the partitioned CU.
[0130] Here, partitioning of the CU may be recursively performed up to a predetermined depth. The depth information may be information indicating the size of the CU and may be stored in each CU. For example, the depth of the LCU may be 0, and the depth of the minimum coding unit (SCU) may be a predetermined maximum depth. Here, the LCU may be a coding unit having a maximum size as described above, and the SCU may be a coding unit having a minimum size.
[0131] Whenever the LCU 310 starts to be partitioned and the width and height dimensions of the CU are reduced by the partitioning operation, the depth of the CU increases by 1. In the case of a CU that cannot be partitioned, the CU may have a 2N×2N size for each depth. In the case of a CU that can be partitioned, a CU having a 2N×2N size may be partitioned into a plurality of N×N sized CUs. Whenever the depth increases by 1, the size of N is halved.
[0132] For example, when one coding unit is partitioned into four sub-coding units, the width size and height size of one of the four sub-coding units may be half the width size and half the height size of the original coding unit, respectively. For example, when a 32×32-sized coding unit is partitioned into four sub-coding units, each of the four sub-coding units may have a 16×16 size. When one coding unit is partitioned into four sub-coding units, the coding unit may be partitioned in a quadtree form.
[0133] For example, when one coding unit is partitioned into two sub-coding units, the width size or height size of one of the two sub-coding units may be half the width size or half the height size of the original coding unit, respectively. For example, when a 32×32-sized coding unit is partitioned vertically into two sub-coding units, each of the two sub-coding units may have a size of 16×32. For example, when a 32×32-sized coding unit is partitioned horizontally into two sub-coding units, each of the two sub-coding units may have a size of 32×16. When one coding unit is partitioned into two sub-coding units, the coding unit may be partitioned in a binary tree form.
[0134] Reference Figure 3 , the size of an LCU having a minimum depth of 0 may be 64×64 pixels, and the size of an SCU having a maximum depth of 3 may be 8×8 pixels. Here, a CU having 64×64 pixels (ie, LCU) may be represented by a depth of 0, a CU having 32×32 pixels may be represented by a depth of 1, a CU having 16×16 pixels may be represented by a depth of 2, and a CU having 8×8 pixels (ie, SCU) may be represented by a depth of 3.
[0135] In addition, information about whether a CU will be partitioned may be indicated by partition information of the CU. The partition information may be 1-bit information. The partition information may be included in all CUs except the SCU. For example, when the value of the partition information is 0, the CU may not be partitioned, and when the value of the partition information is 1, the CU may be partitioned.
[0136] Figure 4 is a diagram illustrating a form of a prediction unit (PU) that may be included in a coding unit (CU).
[0137] A CU that is no longer partitioned among a plurality of CUs partitioned from an LCU may be partitioned into at least one prediction unit (PU). This process may also be referred to as partitioning.
[0138] PU may be a basic unit for prediction. PU may be encoded and decoded in any one of skip mode, inter mode, and intra mode. PU may be partitioned in various forms according to the mode.
[0139] Also, a coding unit may not be partitioned into a plurality of prediction units, and the coding unit and the prediction unit may have the same size.
[0140] like Figure 4 As shown, in the skip mode, the CU may not be partitioned. In the skip mode, a 2N×2N mode 410 having the same size as a non-partitioned CU may be supported.
[0141] In inter mode, eight partition modes may be supported in a CU. For example, in inter mode, 2N×2N mode 410, 2N×N mode 415, N×2N mode 420, N×N mode 425, 2N×nU mode 430, 2N×nD mode 435, nL×2N mode 440, and nR×2N mode 445 may be supported. In intra mode, 2N×2N mode 410 and N×N mode 425 may be supported.
[0142] One coding unit may be partitioned into one or more prediction units. One prediction unit may be partitioned into one or more sub-prediction units.
[0143] For example, when one prediction unit is partitioned into four sub-prediction units, the width size and height size of one of the four sub-prediction units may be half the width size and half the height size of the original prediction unit. For example, when a 32×32-sized prediction unit is partitioned into four sub-prediction units, each of the four sub-prediction units may have a 16×16 size. When one prediction unit is partitioned into four sub-prediction units, the prediction unit may be partitioned in a quadtree form.
[0144] For example, when one prediction unit is partitioned into two sub-prediction units, the width size or height size of one of the two sub-prediction units may be half the width size or half the height size of the original prediction unit. For example, when a 32×32-sized prediction unit is partitioned vertically into two sub-prediction units, each of the two sub-prediction units may have a size of 16×32. For example, when a 32×32-sized prediction unit is partitioned horizontally into two sub-prediction units, each of the two sub-prediction units may have a size of 32×16. When one prediction unit is partitioned into two sub-prediction units, the prediction unit may be partitioned in a binary tree form.
[0145] Figure 5 is a diagram illustrating a form of a transform unit (TU) that may be included in a coding unit (CU).
[0146] A transform unit (TU) may be a basic unit for transform, quantization, inverse transform, and inverse quantization within a CU. A TU may have a square or rectangular shape, etc. A TU may be independently determined according to a size of a CU or a form of a CU, or both.
[0147] The CU that is no longer partitioned among the CUs partitioned from the LCU may be partitioned into at least one TU. Here, the partition structure of the TU may be a quadtree structure. For example, Figure 5 As shown, a CU 510 may be partitioned one or more times according to a quadtree structure. The case where a CU is partitioned at least once may be referred to as recursive partitioning. By partitioning, a CU 510 may be formed by TUs of various sizes. Alternatively, a CU may be partitioned into at least one TU according to the number of vertical lines for partitioning the CU or the number of horizontal lines for partitioning the CU, or both. The CU may be partitioned into TUs that are symmetrical to each other, or may be partitioned into TUs that are asymmetrical to each other. In order to partition the CU into TUs that are symmetrical to each other, information on the size / shape of the TU may be sent with a signal and may be derived from the information on the size / shape of the CU.
[0148] Also, a coding unit may not be partitioned into transformation units, and the coding unit and the transformation unit may have the same size.
[0149] One coding unit may be partitioned into at least one transformation unit, and one transformation unit may be partitioned into at least one sub-transformation unit.
[0150] For example, when one transformation unit is partitioned into four sub-transformation units, the width size and height size of one of the four sub-transformation units may be half the width size and half the height size of the original transformation unit, respectively. For example, when a 32×32-sized transformation unit is partitioned into four sub-transformation units, each of the four sub-transformation units may have a 16×16 size. When one transformation unit is partitioned into four sub-transformation units, the transformation unit may be partitioned in a quadtree form.
[0151] For example, when one transformation unit is partitioned into two sub-transformation units, the width size or the height size of one of the two sub-transformation units may be half the width size or half the height size of the original transformation unit, respectively. For example, when a 32×32-sized transformation unit is vertically partitioned into two sub-transformation units, each of the two sub-transformation units may have a size of 16×32. For example, when a 32×32-sized transformation unit is horizontally partitioned into two sub-transformation units, each of the two sub-transformation units may have a size of 32×16. When one transformation unit is partitioned into two sub-transformation units, the transformation unit may be partitioned in a binary tree form.
[0152] When performing the transformation, the residual block may be transformed by using at least one of the predetermined transformation methods. For example, the predetermined transformation method may include discrete cosine transform (DCT), discrete sine transform (DST), KLT, etc. Which transformation method is applied to transform the residual block may be determined by using at least one of the following items: inter-frame prediction mode information of the prediction unit, intra-frame prediction mode information of the prediction unit, and the size / shape of the transform block. Information indicating the transformation method may be sent by signal.
[0153] Figure 6 is a diagram for explaining an embodiment of a process of intra prediction.
[0154] The intra prediction mode may be a non-directional mode or a directional mode. The non-directional mode may be a DC mode or a planar mode. The directional mode may be a prediction mode having a specific direction or angle, and the number of directional modes may be M which is equal to or greater than 1. The directional mode may be indicated as at least one of a mode number, a mode value, and a mode angle.
[0155] The number of intra prediction modes may be N which is equal to or greater than 1, including non-directional modes and directional modes.
[0156] The number of intra prediction modes may vary depending on the size of the block. For example, when the size of the block is 4×4 or 8×8, the number of intra prediction modes may be 67, when the size of the block is 16×16, the number of intra prediction modes may be 35, when the size of the block is 32×32, the number of intra prediction modes may be 19, and when the size of the block is 64×64, the number of intra prediction modes may be 7.
[0157] The number of intra prediction modes may be fixed to N regardless of the size of the block. For example, the number of intra prediction modes may be fixed to at least one of 35 or 67 regardless of the size of the block.
[0158] The number of intra prediction modes may vary depending on the type of color component. For example, the number of prediction modes may vary depending on whether the color component is a luminance signal or a chrominance signal.
[0159] Intra-coding and / or decoding may be performed by using sample values or encoding parameters included in the reconstructed neighboring blocks.
[0160] In order to encode / decode the current block according to intra prediction, it is possible to identify whether a sample included in a reconstructed neighboring block can be used as a reference sample of a coding / decoding target block. When there are samples that cannot be used as reference samples of a coding / decoding target block, by using at least one sample among the samples included in the reconstructed neighboring block, sample values are copied and / or interpolated to the samples that cannot be used as reference samples, whereby the samples that cannot be used as reference samples can be used as reference samples of a coding / decoding target block.
[0161] In intra prediction, based on at least one of the intra prediction mode and the size of the encoding / decoding target block, a filter may be applied to at least one of the reference sample or the prediction sample. Here, the encoding / decoding target block may mean the current block, and may mean at least one of the encoding block, the prediction block, and the transform block. The type of filter applied to the reference sample or the prediction sample may vary depending on at least one of the intra prediction mode or the size / shape of the current block. The type of filter may vary depending on at least one of the number of filter taps, the filter coefficient value, or the filter strength.
[0162] In a non-directional planar mode among intra prediction modes, when a prediction block of an encoding / decoding target block is generated, a sample value in the prediction block may be generated according to the sample position by using a weighted sum of an upper reference sample of a current sample, a left reference sample of the current sample, an upper right reference sample of the current block, and a lower left reference sample of the current block.
[0163] In the non-directional DC mode among the intra prediction modes, when generating a prediction block of a coding / decoding target block, the prediction block may be generated by the average of the upper reference sample of the current block and the left reference sample of the current block. In addition, filtering may be performed on one or more upper rows and one or more left columns adjacent to the reference sample in the coding / decoding block by using the reference sample value.
[0164] In the case of multiple directional modes (angle modes) among intra prediction modes, a prediction block may be generated by using an upper right reference sample and / or a lower left reference sample, and the multiple directional modes may have different directions. In order to generate prediction sample values, interpolation of real units may be performed.
[0165] In order to perform the intra prediction method, the intra prediction mode of the current prediction block may be predicted from the intra prediction mode of the neighboring prediction block adjacent to the current prediction block. In the case of predicting the intra prediction mode of the current prediction block by using the mode information predicted from the neighboring intra prediction mode, when the current prediction block and the neighboring prediction block have the same intra prediction mode, information that the current prediction block and the neighboring prediction block have the same intra prediction mode may be transmitted by using predetermined flag information. When the intra prediction mode of the current prediction block is different from the intra prediction mode of the neighboring prediction block, the intra prediction mode information of the encoding / decoding target block may be encoded by performing entropy encoding.
[0166] Figure 7 is a diagram for explaining an embodiment of a process of inter-frame prediction.
[0167] Figure 7 The quadrilateral shown in may indicate an image (or picture). Figure 7 The arrow may indicate the prediction direction. That is, the image may be encoded or decoded, or encoded and decoded according to the prediction direction. According to the encoding type, each image may be classified into an I picture (intra picture), a P picture (unidirectional prediction picture), a B picture (bidirectional prediction picture), etc. Each picture may be encoded and decoded according to the encoding type of each picture.
[0168] When the image targeted for encoding is an I picture, the image itself can be intra-coded without inter-frame prediction. When the image targeted for encoding is a P picture, the image can be encoded by performing inter-frame prediction or motion compensation using a reference picture only in the forward direction. When the image targeted for encoding is a B picture, the image can be encoded by performing inter-frame prediction or motion compensation using a reference picture in both the forward and reverse directions. Alternatively, the image can be encoded by performing inter-frame prediction or motion compensation using a reference picture in one of the forward and reverse directions. Here, when the inter-frame prediction mode is used, the encoder can perform inter-frame prediction or motion compensation, and the decoder can perform motion compensation in response to the encoder. Images of P pictures and B pictures that are encoded or decoded or encoded and decoded by using reference pictures can be regarded as images for inter-frame prediction.
[0169] Hereinafter, inter prediction according to an embodiment will be described in detail.
[0170] Inter prediction or motion compensation may be performed by using both reference pictures and motion information. In addition, inter prediction may use the above-described skip mode.
[0171] The reference picture may be at least one of a previous picture and a subsequent picture of the current picture. Here, inter-frame prediction may predict a block of the current picture based on the reference picture. Here, the reference picture may mean an image used when predicting a block. Here, an area within the reference picture may be indicated by using a reference picture index (refIdx) indicating the reference picture, a motion vector, etc.
[0172] Inter prediction can select a reference picture and a reference block related to the current block in the reference picture. A prediction block of the current block can be generated by using the selected reference block. The current block can be a block of the current picture that is a current encoding target or a current decoding target.
[0173] The motion information may be derived from the processing of inter-frame prediction by the encoding device 100 and the decoding device 200. In addition, the derived motion information may be used when performing inter-frame prediction. Here, the encoding device 100 and the decoding device 200 may improve the encoding efficiency or the decoding efficiency or both by using the motion information of the reconstructed neighboring blocks or the motion information of the co-located blocks (col blocks) or both. The col block may be a block related to the spatial position of the encoding / decoding target block in the co-located picture (col picture) previously reconstructed. The reconstructed neighboring block may be a block in the current picture, and a block previously reconstructed by encoding or decoding or both encoding and decoding. In addition, the reconstructed block may be a block adjacent to the encoding / decoding target block, or a block located at the outer corner of the encoding / decoding target block, or both. Here, the block located at the outer corner of the encoding / decoding target block may be a block vertically adjacent to the neighboring block horizontally adjacent to the encoding / decoding target block. Alternatively, the block located at the outer corner of the encoding / decoding target block may be a block horizontally adjacent to the neighboring block vertically adjacent to the encoding / decoding target block.
[0174] The encoding device 100 and the decoding device 200 may respectively determine a block existing at a position spatially related to the encoding / decoding target block within the col picture, and may determine a predefined relative position based on the determined block. The predefined relative position may be an internal position or an external position or both of the internal position and the external position of the block existing at a position spatially related to the encoding / decoding target block. In addition, the encoding device 100 and the decoding device 200 may respectively derive the col block based on the determined predefined relative position. Here, the col picture may be one of at least one reference picture included in the reference picture list.
[0175] The method of deriving motion information may vary according to the prediction mode of the encoding / decoding target block. For example, the prediction mode applied to inter prediction may include advanced motion vector prediction (AMVP), merge mode, etc. Here, the merge mode may be referred to as motion merge mode.
[0176] For example, when AMVP is applied as a prediction mode, the encoding device 100 and the decoding device 200 may generate motion vector candidate lists respectively by using the motion vector of the reconstructed neighboring block or the motion vector of the col block or both. The motion vector of the reconstructed neighboring block or the motion vector of the col block or both may be used as motion vector candidates. Here, the motion vector of the col block may be referred to as a temporal motion vector candidate, and the motion vector of the reconstructed neighboring block may be referred to as a spatial motion vector candidate.
[0177] The encoding device 100 may generate a bitstream, and the bitstream may include a motion vector candidate index. That is, the encoding device 100 may generate a bitstream by entropy encoding the motion vector candidate index. The motion vector candidate index may indicate an optimal motion vector candidate selected from the motion vector candidates included in the motion vector candidate list. The motion vector candidate index may be sent from the encoding device 100 to the decoding device 200 through the bitstream.
[0178] The decoding apparatus 200 may entropy-decode a motion vector candidate index from a bitstream, and may select a motion vector candidate of a decoding target block among motion vector candidates included in a motion vector candidate list by using the entropy-decoded motion vector candidate index.
[0179] The encoding device 100 may calculate a motion vector difference (MVD) between a motion vector of a decoding target block and a motion vector candidate, and may entropy encode the MVD. The bitstream may include the entropy-encoded MVD. The MVD may be transmitted from the encoding device 100 to the decoding device 200 through the bitstream. Here, the decoding device 200 may entropy decode the MVD received from the bitstream. The decoding device 200 may derive the motion vector of the decoding target block by summing the decoded MVD and the motion vector candidate.
[0180] The bitstream may include a reference picture index indicating a reference picture, etc., and the reference picture index may be entropy encoded and transmitted from the encoding device 100 to the decoding device 200 through the bitstream. The decoding device 200 may predict a motion vector of a decoding target block by using motion information of a neighboring block, and may derive a motion vector of the decoding target block by using the predicted motion vector and a motion vector difference. The decoding device 200 may generate a prediction block of the decoding target block based on the derived motion vector and the reference picture index information.
[0181] As another method of deriving motion information, merge mode is used. Merge mode may mean the merging of motions of multiple blocks. Merge mode may mean that the motion information of one block is applied to another block. When merge mode is applied, the encoding device 100 and the decoding device 200 may generate merge candidate lists respectively by using the motion information of the reconstructed adjacent blocks or the motion information of the col block or both. The motion information may include at least one of the following items: 1) motion vector, 2) reference picture index, and 3) inter-frame prediction indicator. The prediction indicator may indicate unidirectional (L0 prediction, L1 prediction) or bidirectional.
[0182] Here, the merge mode may be applied to each CU or each PU. When the merge mode is performed on each CU or each PU, the encoding device 100 may generate a bitstream by entropy decoding the predefined information, and may send the bitstream to the decoding device 200. The bitstream may include the predefined information. The predefined information may include: 1) a merge flag as information indicating whether the merge mode is performed for each block partition, 2) a merge index as information indicating which block among the neighboring blocks adjacent to the encoding target block is merged. For example, the neighboring blocks adjacent to the encoding target block may include the left neighboring block of the encoding target block, the upper neighboring block of the encoding target block, the temporal neighboring block of the encoding target block, etc.
[0183] The merge candidate list may indicate a list storing motion information. In addition, the merge candidate list may be generated before executing the merge mode. The motion information stored in the merge candidate list may be at least one of the following motion information: motion information of a neighboring block adjacent to the encoding / decoding target block, motion information of a co-located block related to the encoding / decoding target block in a reference picture, motion information newly generated by pre-combining motion information present in the merge motion candidate list, and a zero merge candidate. Here, the motion information of a neighboring block adjacent to the encoding / decoding target block may be referred to as a spatial merge candidate. The motion information of a co-located block related to the encoding / decoding target block in a reference picture may be referred to as a temporal merge candidate.
[0184] The skip mode may be a mode in which the mode information of the neighboring block itself is applied to the encoding / decoding target block. The skip mode may be one of the modes for inter-frame prediction. When the skip mode is used, the encoding device 100 may entropy encode the information about which block's motion information is used as the motion information of the encoding target block, and may send the information to the decoding device 200 through the bitstream. The encoding device 100 may not send other information (e.g., syntax element information) to the decoding device 200. The syntax element information may include at least one of motion vector difference information, a coding block flag, and a transform coefficient level.
[0185] The residual signal generated after intra prediction or inter prediction can be transformed into the frequency domain by a transform process as part of a quantization process. Here, the first transform can use DCT type 2 (DCT-II) and various DCT, DST cores. These transform cores can perform a separable transform that performs a 1D transform in the horizontal and / or vertical direction on the residual signal, or can perform a 2D non-separable transform on the residual signal.
[0186] For example, in the case of 1D transformation, the DCT and DST types used in the transformation may use DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII as shown in the following table. For example, as shown in Tables 1 and 2, the DCT or DST type used in the transformation by forming a transformation set may be derived.
[0187] [Table 1]
[0188] Transformation Sets Transform 0 DST_VII, DCT-VIII 1 DST-VII, DST-I 2 DST-VII, DCT-V
[0189] [Table 2]
[0190] Transformation Sets Transform 0 DST_VII, DCT-VIII, DST-I 1 DST-VII, DST-I, DCT-VIII 2 DST-VII, DCT-V, DST-I
[0191] For example, Figure 8 As shown, different transform sets are defined for the horizontal direction and the vertical direction according to the intra prediction mode. Next, the encoder / decoder can perform transform and / or inverse transform by using the intra prediction mode of the current encoding / decoding target block and the transform of the relevant transform set. In this case, entropy coding / decoding is not performed on the transform set, and the encoder / decoder can define the transform set according to the same rule. In this case, entropy coding / decoding indicating which transform among the transforms of the transform set is used can be performed. For example, when the size of the block is equal to or less than 64×64, according to the intra prediction mode, three transform sets are composed as shown in Table 2, and three transforms are used for each horizontal direction transform and vertical direction transform to combine and perform a total of nine multi-transformation methods. Next, the residual signal is encoded / decoded by using the optimal transform method, thereby, the coding efficiency can be improved. Here, in order to perform entropy coding / decoding on information about which transform method is used among the three transforms of a transform set, truncated unary binarization can be used. Here, in order to perform at least one of vertical transformation and horizontal transformation, entropy coding / decoding can be performed on information indicating which transform among the transforms of the transform set is used.
[0192] After completing the above first transformation, Fig. 9As shown in , the encoder may perform a secondary transform on the transformed coefficients to improve energy concentration. The secondary transform may perform a separable transform that performs a 1D transform in the horizontal and / or vertical direction, or may perform a 2D inseparable transform. The transform information used may be sent, or may be derived by the encoder / decoder based on current encoding information and neighboring encoding information. For example, as with a 1D transform, a transform set for a secondary transform may be defined. Entropy encoding / decoding is not performed on the transform set, and the encoder / decoder may define the transform set according to the same rules. In this case, information indicating which transform among the transforms of the transform set is used may be sent, and the information may be applied to at least one residual signal through intra-frame prediction or inter-frame prediction.
[0193] At least one of the number or type of transform candidates is different for each transform set. At least one of the number or type of transform candidates may be determined differently based on at least one of the following items: the position, size, partition form, and prediction mode (intra / inter mode) of a block (CU, PU, TU, etc.) or direction / non-direction of an intra prediction mode.
[0194] The decoder may perform the secondary inverse transform depending on whether the secondary inverse transform is performed, and may perform the first inverse transform depending on whether the first inverse transform is performed from a result of the secondary inverse transform.
[0195] The above-mentioned first transform and second transform may be applied to at least one signal component in the luminance / chrominance component, or may be applied according to the size / shape of any coding block. Entropy encoding / decoding may be performed on an index indicating whether the first transform / secondary transform is used and the first transform / secondary transform used in any coding block. Optionally, the index may be derived by default by the encoder / decoder based on at least one current / neighboring coding information.
[0196] The residual signal generated after intra-frame prediction or inter-frame prediction is quantized after the first transform and / or the second transform, and the quantized transform coefficients are entropy encoded. Fig.10 As shown in , the quantized transform coefficients may be scanned in a diagonal direction, a vertical direction, and a horizontal direction based on at least one of an intra prediction mode or a size / shape of a minimum block.
[0197] In addition, the quantized transform coefficients on which entropy decoding has been performed may be arranged in a block form by being inversely scanned, and at least one of inverse quantization or inverse transformation may be performed on the relevant block. Here, as a method of inverse scanning, at least one of diagonal scanning, horizontal scanning, and vertical scanning may be performed.
[0198] For example, when the size of the current coding block is 8×8, the residual signal for the 8×8 block may be subjected to a first transform, a second transform, and quantization. Next, Fig.10 At least one of the three scanning order methods shown in the above is used to perform scanning and entropy encoding on the quantized transform coefficients for each of the four 4×4 sub-blocks. In addition, the quantized transform coefficients may be inversely scanned by performing entropy decoding. The quantized transform coefficients on which the inverse scanning is performed become transform coefficients after inverse quantization, and at least one of a secondary inverse transform or a primary inverse transform is performed, whereby a reconstructed residual signal may be generated.
[0199] In the video encoding process, a block can be Fig.11 The partition information may be partitioned as shown, and an indicator corresponding to the partition information may be sent with a signal. Here, the partition information may be at least one of the following items: a partition flag (split_flag), a quad / binary tree flag (QB_flag), a quadtree partition flag (quadtree_flag), a binary tree partition flag (binarytree_flag), and a binary tree partition type flag (Btype_flag). Here, split_flag is a flag indicating whether the block is partitioned, QB_flag is a flag indicating whether the block is partitioned in a quadtree form or a binary tree form, quadtree_flag is a flag indicating whether the block is partitioned in a quadtree form, binarytree_flag is a flag indicating whether the block is partitioned in a binary tree form, and Btype_flag is a flag indicating whether the block is partitioned vertically or horizontally in the case of partitioning in the form of a binary tree.
[0200] When the partition flag is 1, it may indicate that partitioning is performed, and when the partition flag is 0, it may indicate that partitioning is not performed. In the case of the quad / binary tree flag, 0 may indicate quadtree partitioning, and 1 may indicate binary tree partitioning. Alternatively, 0 may indicate binary tree partitioning, and 1 may indicate quadtree partitioning. In the case of the binary tree partition type flag, 0 may indicate horizontal direction partitioning, and 1 may indicate vertical direction partitioning. Alternatively, 0 may indicate vertical direction partitioning, and 1 may indicate horizontal direction partitioning.
[0201] For example, it may be derived by signaling at least one of quadtree_flag, binarytree_flag, and Btype_flag as shown in Table 3. Fig.11 Partition information.
[0202] [Table 3]
[0203]
[0204] For example, it may be derived by signaling at least one of split_flag, QB_flag, and Btype_flag as shown in Table 4. Fig.11 Partition information.
[0205] [Table 4]
[0206]
[0207] The partitioning method may be performed only in a quadtree form or only in a binary tree form according to the size / shape of the block. In this case, split_flag may mean a flag indicating whether partitioning is performed in a quadtree form or a binary tree form. The size / shape of the block may be derived according to the depth information of the block, and the depth information may be transmitted with a signal.
[0208] When the size of the block is within a predetermined range, partitioning can be performed only in the form of a quadtree. Here, the predetermined range may be defined as at least one of the size of the largest block or the size of the smallest block that can only be partitioned in the form of a quadtree. Information indicating the size of the largest block / smallest block that allows partitioning in the form of a quadtree may be signaled via a bitstream, and the information may be signaled in units of at least one of a sequence, a picture parameter, or a slice (segment). Optionally, the size of the largest block / smallest block may be a fixed size preset in the encoder / decoder. For example, when the size of the block ranges from 256×256 to 64×64, partitioning may be performed only in the form of a quadtree. In this case, split_flag may be a flag indicating whether partitioning is performed in the form of a quadtree.
[0209] When the size of the block is in a predetermined range, partitioning can be performed only in the form of a binary tree. Here, the predetermined range can be defined as at least one of the size of the largest block or the size of the smallest block that can only be partitioned in the form of a binary tree. Information indicating the size of the largest block / smallest block that allows partitioning in the form of a binary tree can be signaled via a bitstream, and the information can be signaled in units of at least one of a sequence, a picture parameter, or a slice (segment). Optionally, the size of the largest block / smallest block can be a fixed size preset in the encoder / decoder. For example, when the size of the block ranges from 16×16 to 8×8, partitioning can be performed only in the form of a binary tree. In this case, split_flag can be a flag indicating whether partitioning is performed in the form of a binary tree.
[0210] After partitioning a block in the binary tree form, when the partitioned block is further partitioned, the partitioning may be performed only in the binary tree form.
[0211] When the width dimension or the length dimension of the partitioned block cannot be further partitioned, at least one indicator may not be signaled.
[0212] In addition to quadtree-based binary tree partitioning, quadtree-based partitioning may be performed after binary tree partitioning.
[0213] When a block is partitioned based on a quadtree form or a binary tree form or both, a block corresponding to a leaf node according to the final partitioning of the block may be set as a single encoding / decoding unit. In other words, when a block of any size or any form is no longer partitioned, encoding / decoding may be performed on the corresponding block. In one embodiment, for a block of any size or any form and corresponding to a binary leaf node generated by quadtree form partitioning or binary tree form partitioning or both quadtree form partitioning and binary tree form partitioning, encoding / decoding processing such as prediction (e.g., inter-frame prediction or intra-frame prediction), transformation, etc. may be performed.
[0214] Fig.12 is a diagram showing an example of an encoding / decoding unit according to a partitioning form of a block. Fig.12 In the example shown in FIG. 1 , solid lines are used to distinguish blocks generated by quadtree partitioning, and dashed lines are used to distinguish blocks generated by binary tree partitioning. When it is assumed that the structure of the coding block is determined as Fig.12 In the example shown in , the nodes finally partitioned by the solid line and the dotted line can be defined as binary leaf nodes. Encoding / decoding (e.g., intra-frame prediction or inter-frame prediction, first transform, second transform, quantization, entropy encoding / decoding, etc.) can be performed on the blocks corresponding to the binary leaf nodes according to the block size or block form corresponding to the corresponding leaf nodes without additional partitioning according to the prediction sub-block or the transformation sub-block.
[0215] For convenience of explanation, in an embodiment to be described later, a partition form of blocks based on a quadtree form or a binary tree form or both is defined as a block structure.
[0216] When encoding / decoding, the block structure of each color component may be the same, or the block structure of each color component may be different. In one embodiment, according to any encoding parameter condition, the block structure may be the same for the luminance component and the chrominance component, or may be different for the luminance component and the chrominance component. Here, the block structure being the same for the luminance component and the chrominance component may mean that the block structure information determined for the luminance component is inherited to the chrominance component, or the block structure information determined for the chrominance component is inherited to the luminance component. For example, depending on the type of the current encoding / decoding picture or slice, the luminance signal and the chrominance signal may have the same block structure or different block structures within the intra-frame picture or in the intra-frame strip. Here, it can be determined whether the block structures of the luminance component and the chrominance component constituting the intra-frame picture or the intra-frame strip are set to be the same or different by deriving a rate-distortion cost function according to each block structure and selecting a coding process in which the cost function becomes the smallest.
[0217] The encoding device may entropy encode information indicating whether the same block structure is used for each color component and transmit the information to the decoding device. Here, the information may be encoded according to at least one of a sequence level (e.g., a sequence parameter set (SPS)), a picture level (e.g., a picture parameter set (PPS)), a slice header, a maximum coding unit (LCT or CTU), and a coding unit (or coding block).
[0218] For example, encoding parameter information indicating whether a block structure of each color component is the same for an intra picture, an intra slice, an inter picture, or an inter slice may be transmitted through an SPS or a PPS.
[0219] Furthermore, encoding parameter information indicating whether a block structure of each color component is the same within an intra slice or an inter slice may be transmitted through a slice header.
[0220] Also, encoding parameter information indicating whether a block structure of each color component is the same for a maximum coding unit or a coding unit may be transmitted in units of a maximum coding unit or a coding unit.
[0221] When the encoding / decoding target block meets the predetermined condition, the encoding / decoding target block may not be allowed to be block partitioned. Therefore, the encoding / decoding of the block partition information of the block that meets the predetermined condition may be omitted. Here, the predetermined condition may be related to at least one of the block size, block form and block partition depth, and may represent the size, form or depth of the block that allows or does not allow the partition in the form of a quadtree or a binary tree or both forms. The block size or form may be a base value representing the size, form or depth of the block that allows or does not allow the partition in the form of a quadtree or a binary tree or both forms. The block depth may represent a threshold value of the block depth that allows or does not allow the partition in the form of a quadtree or a binary tree or both forms. The block depth may be a factor that increases by 1 according to the partition in the form of a quadtree or a binary tree or both forms.
[0222] The block partition information may include at least one of information indicating whether block partitioning is performed (e.g., split_flag), information indicating whether quadtree partitioning is performed (e.g., Quadtree_flag or QB_flag), information indicating whether binary tree partitioning is performed (e.g., Binarytree_flag or QB_flag), and information indicating a binary tree partition type (e.g., Btype_flag).
[0223] For example, when it is assumed that the predetermined condition indicates that the block size is equal to or smaller than the base value and binary tree partitioning is not allowed for the block satisfying the predetermined condition, encoding / decoding of at least one of the information related to binary tree partitioning (e.g., a quad / binary tree form flag (QB_flag), a binary tree partition flag (binaraytree_flag), and a binary tree partition type flag (Btype_flag)) may be omitted for the block having a block size equal to or smaller than the base value. When encoding of the quad / binary tree form flag (QB_flag) is omitted, the partition flag (split_flag) may be used to indicate whether quadtree partitioning is performed on the block.
[0224] Without being limited to the above example, it may be set whether or not to allow quadtree partitioning of a block that satisfies a predetermined condition. Here, for a block that satisfies a predetermined condition, encoding / decoding of at least one of information related to quadtree partitioning (e.g., a quad / binary tree form flag (QB_flag) or a quadtree partition flag (quadtree_flag)) may be omitted. When encoding / decoding of the quad / binary tree form flag (QB_flag) may be omitted, a partition flag (split_flag) may be used to indicate whether binary tree partitioning is performed on a block.
[0225] In another embodiment, it may be set to allow arbitrary forms of partitioning to be performed on blocks that meet predetermined conditions. Here, for blocks that meet predetermined conditions, no piece of partition information may be encoded / decoded.
[0226] Referring to the accompanying drawings, a process of determining whether to omit encoding / decoding of partition information will be described in detail.
[0227] Fig.13 2 is a flowchart showing a process of determining whether to decode information related to binary tree partitioning. For convenience of explanation, in this embodiment, it is assumed that binary tree partitioning is not allowed for blocks that meet predetermined conditions.
[0228] First, in step S1301, information related to a predetermined condition may be obtained. Here, the information related to the predetermined condition may include at least one of a block size, a block form, and a partition depth. The predetermined condition may be set based on the information of the predetermined condition as whether the block size is equal to or greater than a threshold, whether the block size is equal to or less than a threshold, whether the block form is a preset form, whether the block depth is equal to or greater than a threshold, or whether the block depth is equal to or less than a threshold.
[0229] The information related to the predetermined condition may be predefined in the encoder and the decoder. Here, the information related to the predetermined condition may represent at least one of the block size, block form, and block depth that define the predetermined condition. In one embodiment, the block size / form or partition depth for which encoding / decoding of the partition information is omitted may have a fixed value predefined in the encoder and the decoder. Alternatively, the information related to the predetermined condition may be determined differently by encoding parameters representing the size / form of the encoding / decoding target block or the partition depth of the block.
[0230] In another embodiment, the information related to the predetermined condition may be encoded / decoded according to the sequence level, the picture level, the slice header, or the predetermined coding area unit. Here, the predetermined coding area may have a size / form smaller than the current encoding / decoding picture or slice, and may include a maximum coding unit (LCU or CTU) or a block of any size or form included in the maximum coding unit (e.g., a block generated by performing quadtree partitioning on the maximum coding unit). The information related to the predetermined condition may be expressed as a maximum size of a block or a minimum size of a block or both, or may be expressed as a maximum depth of a block or a minimum depth of a block or both.
[0231] The encoder can determine the block structure by comparing the rate distortion of the result obtained by encoding based on the quadtree form and the binary tree form and the rate distortion of the result obtained by encoding based on the quadtree form. The encoder can encode the information related to the predetermined condition by considering the size, form or depth of the block for which the binary tree partition is no longer performed according to the determined block structure. In addition, the decoder can decode the information related to the predetermined condition from the bit stream that does not allow binary tree partitioning, and determine whether the current block meets the predetermined condition based on the decoded information.
[0232] In step S1302, the decoder may determine whether the current block satisfies a predetermined condition. As a result, when the current block satisfies the predetermined condition, decoding of information related to the binary tree partition of the current block may be omitted.
[0233] Alternatively, when the current block does not meet the predetermined condition, in step S1303, information related to the binary tree partition of the current block may be decoded according to whether quadtree partition is performed on the current block. For example, when quadtree partition is not performed on the current block, information related to the binary tree partition of the current block may be decoded.
[0234] In other words, whether to encode / decode block partition information of the current block may be determined by comparing whether the size, form, or depth of the current block corresponds to the size, form, or depth of a block according to a predetermined condition.
[0235] In another embodiment, according to an embodiment of the present invention, information indicating whether block partitioning is allowed for a block having any size, any form, or any depth may be encoded / decoded. Here, the information indicating whether block partitioning is allowed may include information indicating whether quadtree partitioning exists (e.g., NoPresent_Quadtree_flag) or information indicating whether binary tree partitioning exists (e.g., NoPresent_Binarytree_flag).
[0236] When it is indicated that block partitioning of a block having an arbitrary size, an arbitrary form, or an arbitrary depth is not allowed, block partitioning of a lower layer block may not be allowed except for the corresponding block. Here, the lower layer block may include at least one of a block having a block size smaller than the corresponding block, a block having the same block form as the corresponding block, a block having a partition depth greater than the corresponding block, and a lower layer node block of the corresponding block.
[0237] In one embodiment, when information indicating whether binary tree partitioning exists for a block having an arbitrary size / form is transmitted by a signal, and the information indicates that there is no binary tree partitioning, encoding / decoding of information related to binary tree partitioning (e.g., information indicating whether binary tree partitioning is performed (e.g., at least one of a quad / binary tree flag (QB_flag), a binary tree partition flag (binaraytree_flag), and a binary tree partition type flag (Btype_flag)) may be omitted for blocks having a size / form smaller than the block, except for the block.
[0238] Without being limited to the above example, information indicating whether there is a quadtree partition for a block having an arbitrary size / form and whether there is a binary tree partition type flag may be signaled.
[0239] Information indicating whether block partitioning is allowed may be sent according to a predetermined coding area. Here, the predetermined coding area may have a size / form smaller than the current encoding / decoding picture or slice, and may include blocks of any size or form included in a maximum coding unit (LCU or CTU) or a coding unit (e.g., a block generated by performing quadtree partitioning on the maximum coding unit). The encoder may determine the block structure by comparing the rate-distortion of the result obtained by encoding a block of any size / form based on a quadtree form and a binary tree form, and the rate-distortion of the result obtained by encoding based on the quadtree form, and determine whether to encode the information indicating that binary tree partitioning is allowed based on the determined block structure.
[0240] Information indicating whether binary tree partitioning is allowed may be encoded / decoded per layer. In one embodiment, when information of a higher layer block transmitted with a signal indicates that block partitioning is allowed, information indicating whether block partitioning of a lower layer block generated by partitioning a higher layer block is allowed may be encoded / decoded.
[0241] In another embodiment, information of the size, form, or depth of a block in which information indicating whether block partitioning is performed is signaled may be encoded / decoded at a higher level. In one embodiment, information of the size, form, or depth of a block may be transmitted at least one of a sequence level, a picture level, and a slice header. Here, for a block corresponding to the size, form, or depth of a block signaled at a higher level, or for a higher layer block in the higher level, information indicating whether block partitioning is allowed may be signaled.
[0242] Fig.14 is a flowchart showing a process of determining whether to decode information related to a binary tree partition. For convenience of explanation, in the present embodiment, it is assumed that information indicating whether a binary tree partition is allowed only for a current block is signaled.
[0243] First, in step S1401, information indicating whether binary tree partitioning is performed may be decoded.
[0244] In step S1402, when the information indicates that binary tree partitioning is not allowed, decoding of binary tree partition information of the current block may be omitted. In addition, binary tree partition information for a lower layer block generated by the current block partitioned by the quadtree may not be decoded.
[0245] Meanwhile, in step S1402, when the information indicates that binary tree partitioning is allowed, in step S1403, information related to binary tree partitioning may be decoded according to whether quadtree partitioning is performed on the current block. For example, when quadtree partitioning is not performed on the current block, information related to binary tree partitioning for the current block may be decoded. In addition, for a lower layer block generated by performing quadtree partitioning or binary tree partitioning on the current block, information related to binary tree partitioning may be decoded according to whether quadtree partitioning is performed on the lower layer block.
[0246] Figures 15 to 17 is a diagram illustrating an example of a case where binary tree partitioning is no longer performed for a block having a predetermined size or smaller.
[0247] As Fig.15 In the example shown in , it is assumed that the size / form of the maximum coding unit is 128×128, binary tree partitioning is not performed, and only quadtree partitioning exists in the maximum coding unit through rate-distortion optimization performed by the encoding device.
[0248] like Fig.16 As shown in the example shown in , when information indicating that binary tree partitioning is not performed on a predetermined size block is not encoded / decoded, information indicating whether binary tree partitioning is performed on a block where quadtree partitioning is no longer performed may be encoded / decoded.
[0249] However, if Fig.17 As shown in the example shown in , when information indicating that binary tree partitioning is performed on a block having a size of 128×128 or less is encoded / decoded, information indicating whether binary tree partitioning is performed on a block having a size of 128×128 or less may not be encoded / decoded. Therefore, the amount of information to be encoded is reduced, thereby improving encoding / decoding efficiency.
[0250] As above Fig.13 The encoder may encode information on the size (e.g., information indicating 128×128), form, or depth of a block that does not allow binary tree partitioning, and send the encoded information to a decoding device. The decoding device may decode information on the block size on which binary tree partitioning is not performed from a bitstream, and no longer decode information related to binary tree partitioning of a block having a block size equal to or smaller than the size indicated by the decoded information.
[0251] In another embodiment, as mentioned above, Fig.14 As described above, the encoding device may encode information indicating that binary tree partitioning is not allowed for a block of any size (the block does not perform binary tree partitioning), and send the encoded information to the decoding device. Here, the information may be a 1-bit flag (e.g., NoPresent_BinaryTree_flag), but is not limited thereto. Fig.17 In the example shown in , for example, NoPresent_BinaryTree_flag for blocks having a size of 128×128 is signaled.
[0252] exist Fig.16 and Fig.17 In the example, when quadtree partitioning or binary tree partitioning is performed, the flag value is set to 1, and otherwise, the flag value is set to 0. However, the opposite setting is also possible.
[0253] Embodiments related to not allowing block partitioning can be applied to luminance components and chrominance components. Here, information indicating that block partitioning is not allowed (for example, information indicating the size, form or depth of the block for which block partitioning is not allowed, or information indicating whether block partitioning is allowed) can be universally applied to luminance components and chrominance components, or can be transmitted with signals independently for luminance components and chrominance components. When information is entropy encoded / decoded, any one of a truncated Rice binarization method, a K-order exponential Golomb binarization method, a restricted K-order exponential Golomb binarization method, a fixed-length binarization method, a unary binarization method and a truncated unary binarization method can be used as an entropy coding method. In addition, after the information is binarized, the information is finally encoded / decoded by using CABAC (ae(v)).
[0254] Next, transformation and scanning of the residual signal of the current block will be described.
[0255] When encoding / decoding the residual signal of the current block, at least one piece of encoding information of the residual signal of the current block may be implicitly derived in the encoder / decoder through the encoding information of the residual signal of the encoding / decoding block adjacent to the current block. Here, the encoding information of the residual signal may include information about a transform scheme of the residual signal (e.g., a transform scheme for a first transform and a second transform) and information for scanning quantized transform coefficients. Here, the quantized transform coefficient may indicate that a transform (e.g., a first transform and a second transform) and quantization are performed on the residual signal generated after intra prediction.
[0256] In detail, when the current block is encoded by intra-frame prediction, encoding information of the current block may be derived from neighboring blocks adjacent to the current block based on the intra-frame prediction mode of the current block. Alternatively, when the current block is encoded by inter-frame prediction, encoding information of the current block may be derived from neighboring blocks adjacent to the current block based on motion information of the current block. Fig.18 and Fig.19 , a process of deriving encoding information of a residual signal of a current block from neighboring blocks when the current block is encoded by intra prediction and when the current block is encoded by inter prediction will be described in detail.
[0257] Fig.18 is a flowchart illustrating a process of determining whether to derive encoding information of a residual signal of a current block from a neighboring block when the current block is encoded through intra prediction.
[0258] First, in step S1801, it may be determined whether there is a neighboring block encoded in the same intra-frame prediction mode as the intra-frame prediction mode of the current block. Here, the neighboring block of the current block may be included in the same picture (in other words, the current picture) as the current block, and represents a block encoded / decoded before the current block. In one embodiment, the neighboring block may include a block adjacent to the current block in a block encoded / decoded before the current block. Here, the block adjacent to the current block may include at least one of a block adjacent to a boundary (e.g., a left boundary or an upper boundary) of the current block and a block adjacent to a corner (e.g., an upper left corner, an upper right corner, or a lower left corner) of the current block.
[0259] When there is a neighboring block encoded in the same intra prediction mode as the intra prediction mode of the current block, in step S1802, encoding information of a residual signal for the corresponding neighboring block may be derived as encoding information of the current block. In detail, at least one of primary transform, secondary transform, and scanning information of the current block may be derived from the neighboring block having the same intra prediction mode as the intra prediction mode of the current block.
[0260] In one embodiment, when the intra prediction mode of the current block is the same as the intra prediction mode of the neighboring block of the current block and the corresponding neighboring block skips the first transformation (transform skipping), the residual signal of the current coding block may also skip the first transformation. When the first transformation of the current block is skipped, the secondary transformation of the current block may also be skipped.
[0261] Alternatively, when the intra prediction mode of the current block is the same as the intra prediction mode of the neighboring block of the current block, the first transforms for the horizontal and vertical directions of the current block may be set to be the same as the first transforms applied to the neighboring block having the same intra prediction mode as the intra prediction mode of the current block. Therefore, encoding / decoding of encoding information required for the first transform of the residual signal of the current block (for example, transform information (or transform index) used when performing the first transform for the horizontal and vertical directions) may be omitted.
[0262] For example, when the intra prediction mode of the current block is determined to be number 23 (mode 23), and the intra prediction mode of at least one neighboring block adjacent to the current block is determined to be number 23 (mode 23), the first transform of the residual signal of the neighboring block having the intra prediction mode number 23 may be used as the first transform of the residual signal of the current block. For example, when the first transform in the horizontal direction of the residual signal of the neighboring block having the same intra prediction mode as the intra prediction mode of the current block is performed by DCT-V, and the first transform in the vertical direction of the residual signal is performed by DST-VII, the first transform in the horizontal direction of the residual signal of the current block is performed by using DCT-V, and the first transform in the vertical direction is performed by using DST-VII.
[0263] In another embodiment, when the intra prediction mode of the current block is the same as the intra prediction mode of the neighboring block of the current block, the secondary transform of the current block may be set to be the same as the secondary transform applied to the neighboring block having the same intra prediction mode as the intra prediction mode of the current block. Therefore, encoding / decoding of encoding information (e.g., transform information (or transform index) of the secondary transform) required to perform the secondary transform on the residual signal of the current block may be omitted.
[0264] For example, when the intra-frame prediction mode of the current block is determined as number 35 (mode 35), and the intra-frame prediction mode of at least one neighboring block adjacent to the current block is also determined as number 35 (mode 35), the secondary transform applied to the residual signal of the neighboring block having the intra-frame prediction mode number 35 may be used as the secondary transform for the residual signal of the current block.
[0265] In another embodiment, when the intra prediction mode of the current block is the same as the intra prediction mode of the neighboring block of the current block, the scanning order of the current block may be set to be the same as the scanning order of the neighboring block having the same intra prediction mode as the intra prediction mode of the current block. Therefore, encoding / decoding of encoding information (e.g., a scanning index (scanning order index) of at least one of a diagonal direction, a horizontal direction, and a vertical direction (indicating a scanning order)) required for scanning the quantized transform coefficient of the residual signal for the current block may be omitted.
[0266] Without being limited to the above example, at least two of first transform, second transform, and scanning order of a neighboring block having the same intra prediction mode as that of the current block may be derived as encoding information of the current block.
[0267] In one embodiment, the first transform and the second transform of the neighboring block having the same intra prediction mode as the intra prediction mode of the current block may be applied to the current block, or the first transform and the scanning order of the neighboring block or the second transform and the scanning order of the neighboring block may be applied to the current block. Alternatively, all of the first transform, the second transform and the scanning order of the neighboring block having the same intra prediction mode as the intra prediction mode of the current block may be applied to the current block.
[0268] When a plurality of neighboring blocks having the same intra prediction mode as the current block are adjacent to the current block, the encoding information of the current block may be derived based on the priority between the neighboring blocks. In one embodiment, when a block adjacent to the left side of the current block and a block adjacent to the upper side of the current block respectively have the same intra prediction mode as the intra prediction mode of the current block, and the priority of the block adjacent to the left side of the current block is higher than the priority of the block adjacent to the upper side of the current block, the encoding information of the current block may be derived based on the encoding information of the block adjacent to the left side of the current block.
[0269] In another embodiment, when a plurality of neighboring blocks having the same intra prediction mode as the intra prediction mode of the current block are adjacent to the current block, information for identifying the neighboring blocks used to derive encoding information of the current block may be signaled through a bitstream. Here, encoding information of a residual signal of the current block may be derived from the neighboring blocks indicated by the information for identifying the neighboring blocks (e.g., neighboring block indexes).
[0270] When there is no neighboring block having the same intra prediction mode as the intra prediction mode of the current block, in step S1803, the encoding information of the residual signal of the current block may be entropy encoded / decoded. In one embodiment, when there is no neighboring block having the same intra prediction mode as the intra prediction mode of the current block, at least one of the transformation information (or transformation index) of the first transformation, the transformation information (or transformation index) of the second transformation, and the information of the scanning order (or scanning index) of the current block may be entropy encoded / decoded.
[0271] In the above-mentioned embodiment, the intra prediction mode of the current block is the same as the intra prediction mode of the neighboring block and the encoding information of the residual signal of the current block is derived from the neighboring block. In another embodiment, the second encoding information of the residual signal of the current block may be derived from the neighboring block having the first encoding information of the residual signal that is the same as the first encoding information of the current block. Here, the first encoding information and the second encoding information may include at least one of the information of the first transformation, the information of the second transformation, and the scanning order.
[0272] In one embodiment, when there is at least one neighboring block using the same first transform as the first transform determined for the current block, the secondary transform of the current block may be set to be applied to the secondary transform of the neighboring block using the same first transform as the first transform of the current block. Here, the encoding / decoding of the encoding information required to perform the secondary transform on the residual signal of the current block may be omitted. For example, it is assumed that the first transform in the horizontal direction of the residual signal of the current block is determined to be DCT-V, and the first transform in the vertical direction is determined to be DST-VII. When DCT-V is determined as the first transform in the horizontal direction of at least one neighboring block of the current block and DST-VII is determined as the first transform in the vertical direction, the secondary transform of the neighboring block to which the same first transform as the first transform of the current block is applied may be applied as the secondary transform of the current block.
[0273] In addition, the scanning order of the neighboring blocks using the same first transformation as the first transformation of the current block may be applied as the scanning order of the current block. In addition, the secondary transformation and scanning order of the neighboring blocks using the same first transformation as the first transformation of the current block may also be applied as the secondary transformation and scanning order of the current block.
[0274] In the above-mentioned embodiment, it has been described that at least one of the secondary transform and the scanning order of the current block is derived from the neighboring block using the same primary transform as the primary transform of the current block. However, at least one of the primary transform and the scanning order of the current block may be derived from the neighboring block using the same secondary transform as the secondary transform of the current block, or at least one of the primary transform and the secondary transform of the current block may be derived from the neighboring block using the same scanning order as the scanning order of the current block.
[0275] The second encoding information of the current block may be derived from a neighboring block having the same intra prediction mode and first encoding information as those of the current block.
[0276] In one embodiment, when there is at least one neighboring block that uses the same intra prediction mode and first transform as the intra prediction mode determined for the current block and the first transform determined for the current block, the secondary transform of the current block may be set to be applied to the secondary transform of the neighboring block having the same intra prediction mode as the intra prediction mode of the current block and using the same first transform as the first transform of the current block. Here, encoding / decoding of encoding information required to perform the secondary transform on the residual signal of the current block may be omitted.
[0277] In addition, the scanning order of the neighboring blocks using the same intra prediction mode and the first transform as the intra prediction mode and the first transform of the current block may be applied as the scanning order of the current block. Alternatively, the secondary transform and the scanning order of the neighboring blocks using the same intra prediction mode and the first transform as the intra prediction mode and the first transform of the current block may be applied to the current block.
[0278] In the above-mentioned embodiment, at least one of the secondary transform and the scanning order of the current block is derived from a neighboring block having the same intra prediction mode as the current block and using the same first transform as the first transform of the current block. In addition to this, at least one of the first transform and the scanning order of the current block may be derived from a neighboring block having the same intra prediction mode as the intra prediction mode of the current block and using the same second transform as the second transform of the current block, or at least one of the first transform and the secondary transform of the current block may be derived from a neighboring block having the same intra prediction mode as the intra prediction mode of the current block and using the same scanning order as the scanning order of the current block.
[0279] Fig.19 is a flowchart illustrating a process of determining whether to derive encoding information of a residual signal of a current block from a neighboring block when the current block is encoded through inter-frame prediction.
[0280] First, in step S1901, it may be determined whether the inter-frame prediction mode of the current block is a merge mode. When the inter-frame prediction mode of the current block is a merge mode, in order to derive the motion information of the current block, in step S1902, a neighboring block to be merged with the current block may be determined. In one embodiment, the neighboring block to be merged with the current block may be determined by a merge index representing the neighboring block to be merged with the current block in the merge candidate list. Here, the neighboring blocks of the current block may include neighboring blocks that are spatially adjacent to the current block and neighboring blocks that are temporally adjacent to the current block.
[0281] When the neighboring block merged with the current block is determined, in step S1903, the encoding information of the residual signal of the neighboring block merged with the current block can be derived as the encoding information of the residual signal of the current block. In one embodiment, at least one of the first transform, the second transform, and the scanning order of the current block can be set identically to at least one of the first transform, the second transform, and the scanning order of the neighboring block merged with the current block.
[0282] When the inter prediction mode of the current block is not the merge mode, in step S1904, it may be determined whether there is a neighboring block having the same motion information as the motion information of the current block among the neighboring blocks of the current block. Here, the motion information may include at least one of a motion vector, a reference picture index, and a reference picture direction.
[0283] When there is a neighboring block having the same motion information as that of the current block, in step S1905, the encoding information of the residual signal of the neighboring block having the same motion information as that of the current block may be derived as the encoding information of the residual signal of the current block. In one embodiment, at least one of the first transform, the second transform, and the scanning order of the current block may be identically set to at least one of the first transform, the second transform, and the scanning order of the neighboring block having at least one of the same motion vector, the reference picture index, and the reference picture direction as that of the current block.
[0284] When there is no neighboring block having the same motion information as the motion information of the current block, in step S1906, the encoding information of the residual signal of the current block may be entropy encoded / decoded. In one embodiment, when there is no neighboring block having the same motion information as the motion information of the current block, at least one of the transformation information (or transformation index) of the first transformation, the transformation information (or transformation index) of the second transformation, and the information of the scanning order (or scanning index) of the current block may be entropy encoded / decoded.
[0285] exist Fig.19 In the example shown in , the neighboring block for deriving the encoding information of the residual signal of the current block can be adaptively determined according to whether the inter-frame prediction mode of the current block is the merge mode. Fig.19 Unlike the example shown in , when the inter prediction mode of the current block is only the merge mode, the encoding information of the residual signal of the current block can be derived from the neighboring block. Alternatively, regardless of whether the inter prediction mode of the current block is the merge mode, the encoding information of the current block can be derived from the neighboring block having the same motion information as the motion information of the current block.
[0286] In the above-mentioned embodiment, the description has been made in the case where the motion vector of the current block is the same as the motion vector of the neighboring block and the encoding information of the residual signal of the current block is derived from the neighboring block. In another embodiment, the second encoding information of the residual signal of the current block may be derived from the neighboring block having the same first encoding information or motion vector as the first encoding information or motion vector of the residual signal of the current block.
[0287] After the motion information of the current block is derived as in the above embodiment, the encoding information of the current block can be derived from the adjacent block based on whether the motion information of the current block is the same as the motion information of the adjacent block. In addition, the encoding information of the current block can be derived based on the motion information of the adjacent block without considering the motion information of the current block.
[0288] The above encoding information (such as the first transformation, the second transformation, and the scan order) can be encoded / decoded based on at least one piece of information indicating whether a predefined type (e.g., a predefined transform type or a predefined scan type) is used and whether a residual type (e.g., a residual transform type or a residual scan type) other than the predefined type is used.
[0289] In one embodiment, when a residual signal is generated by intra prediction or inter prediction or both, information indicating whether a predefined transform type is applied to the residual signal can be encoded. Here, the predefined transform type can be the transform type mainly used when performing a transform on the residual signal (e.g., DCT-II), but is not limited thereto. The information can be a 1-bit flag (e.g., a transform flag, a TM flag). In one embodiment, when the TM flag is 0 (or 1), it can indicate that the predefined transform type is applied to the residual signal. When the TM flag is 1 (or 0), it can indicate that another transform type other than the predefined transform type is applied to the residual signal. In addition, the information can be configured with a flag having 2 bits or more. The first bit can indicate whether the predefined transform type is used for the first transform, and the second bit can indicate whether the predefined transform type is used for the second transform.
[0290] When the information indicates that another transform type other than the predefined transform type is applied to the residual signal, information for specifying any one of the residual transform types can be encoded. Here, the residual transform type can represent the remaining transform types other than the predefined transform type among the transform types that can be applied to the residual signal. For example, when the predefined transform type is DCT-II, the residual transform type can include at least one of DCT-V, DCT-VIII, DST-I, and DST-VII. The information can be index information (TM idx) for specifying any one of the residual transform types, and the index information can be any positive integer. For example, TM idx 1 can represent DCT-V, TM idx 2 can represent DCT-VIII, TM idx 3 can represent DST-I, and TM idx 4 can represent DST-VII.
[0291] The index information may indicate a transform type combination for the horizontal direction and the vertical direction of the residual signal. In other words, the 1D transform type for the horizontal / vertical direction may be determined by a single piece of index information. For example, when the TM flag is 1 and the TM idx is 1, the transform type combination matching the TM idx 1 may be determined as the transform type for the horizontal direction and the vertical direction of the current block. In one embodiment, when the TM idx indicates DCT-V for the horizontal direction and indicates DCT-VIII for the vertical direction, DCT-V and DCT-VIII may be determined as the horizontal direction transform type and the vertical direction transform type of the current block, respectively.
[0292] When determining the encoding parameters of the current block, at least one piece of information specifying any one of the following items may be derived from the neighboring blocks of the current block: whether the predefined type is used, and the residual type. For example, at least one piece of information (TM idx) for specifying any one of the following items may be derived from the neighboring blocks of the current block: information indicating whether the predefined transform type is applied to the current block (TM flag), and the residual transform type.
[0293] In one embodiment, at least one of the TM flag and the TM idx of the current block may be derived as the same value as that of a neighboring block of the current block.
[0294] In addition, when at least one TM flag of a neighboring block of the current block is 1, encoding / decoding may be performed by implicitly assuming that the TM flag of the current block is 1. Here, the TM idx of the current block may be implicitly transmitted through a bitstream or may be implicitly derived from a neighboring block.
[0295] Described by way of example, at least one piece of information (TM idx) for specifying any one of the following items: information indicating whether a predefined transform type is applied to the current block (TM flag), and a residual transform type may be derived from a neighboring block used when intra prediction or inter prediction is performed on the current block.
[0296] In one embodiment, when the inter prediction mode of the current block is a merge mode, at least one of the TM flag and TMidx may be considered to newly configure the merge candidate. The newly configured merge candidate list may include a merge candidate having a different value in at least one of the TM flag and TM idx. In one embodiment, the merge candidate list may be configured to have a first merge candidate and a second merge candidate, wherein the first merge candidate and the second merge candidate have the same motion information and have different TM flags or TM idx or different TM flags and TM idx. At least one of the TM flag and TM idx of the current block may be determined to be the same as at least one of the merge candidates indicated by the merge index (Merge_idx). Therefore, the motion information (motion vector, reference picture index, inter prediction direction indicator) of the current block and the TM flag or TM idx or both the TM flag and TM idx may be encoded / decoded based on the merge mode.
[0297] Here, information indicating that the merge candidate list is newly configured may be explicitly transmitted through the bitstream. The transmitted information may be a 1-bit flag, but is not limited thereto. In addition, when the TM flag of at least one neighboring block of the current block is 1, it may be implicitly recognized that the merge candidate list is newly configured. Here, the neighboring block may be a block whose TM flag first becomes 1 according to a predetermined neighboring block scanning order, or may be a predefined position block.
[0298] In the above-mentioned embodiments, a method for deriving information for determining a transform type (e.g., a TM flag or a TM idx or both a TM flag and a TM idx) from a neighboring block of a current block has been described. The embodiments may be applied to at least one of determining a transform type for a first transform of a current block and determining a transform type for a second transform. In one embodiment, in other words, at least one of transform information for a first transform (e.g., a TM flag (first TM flag) or a TM idx (first TM idx) or both a TM flag and a TM idx) and transform information for a second transform (e.g., a TM flag (second TM flag) or a TM idx (second TM idx)) may be derived from a neighboring block of the current block.
[0299] In addition, in addition to the merge candidate list generated based on motion information, a merge candidate list may be generated based on the transformation information of the current block. In one embodiment, when the merge candidate list generated based on the motion information of the neighboring blocks is defined as a "first merge candidate list" and the merge candidate list generated based on the transformation information of the neighboring blocks is defined as a "second merge candidate list", the motion information of the current block is derived from the merge candidate specified by the first merge index in the first merge candidate list. However, the transformation information of the current block may be derived from the merge candidate specified by the second merge index in the second merge candidate list.
[0300] In addition, information (e.g., a scan flag or a scan idx or both a scan flag and a scan idx) for determining a scan order of the current block from neighboring blocks of the current block may be derived. Here, the scan flag may indicate whether the scan order of the current block is the same as a predefined scan order, and the scan idx may be information indicating any one of the residual scan orders.
[0301] According to another embodiment of the present invention, the same coding information may be applied to all blocks located within a signaling block, wherein the signaling block is within a current encoding / decoding picture or slice. Here, the signaling block may represent an area having a size smaller than at least one of a horizontal resolution or a vertical resolution of a current picture or a current slice. In other words, the signaling block may be defined as a predetermined area having a size smaller than the current picture or the current slice.
[0302] The information of the signaling block may be transmitted through at least one of a sequence unit, a picture unit, and a slice header. In one embodiment, at least one of the size, form, or position of the signaling block may be transmitted through at least one of a sequence parameter set, a picture parameter set, and a slice header. Alternatively, the information of the signaling block may be implicitly derived through coding information of the current block or a neighboring block adjacent to the current block. The signaling block may have a square or rectangular form, but is not limited thereto.
[0303] The coding information of the signaling block may be applied to all blocks included in the signaling block. In one embodiment, at least one of the first transformation, the second transformation, and the scanning order may be set identically to all blocks included in the signaling block. The coding information applied to all blocks included in the signaling block may be transmitted through a bitstream. Alternatively, the coding information of a specific position block within the signaling block may be applied to all blocks included in the signaling block.
[0304] In the above-mentioned embodiment, it has been described that all blocks included in the signaling block have the same encoding information. In another embodiment, blocks satisfying a predetermined condition among the blocks included in the signaling block may be set to have the same encoding information. Here, the predetermined condition may be defined according to at least one of the size, form or depth of the block. In one embodiment, at least one of the first transform, the second transform and the scanning order may be set identically to blocks having a predetermined size or smaller (e.g., blocks having a size of 4×4 or smaller) among all blocks included in the signaling block.
[0305] The embodiment of obtaining the encoding information of the current block can be applied to the luminance component and the chrominance component. In addition, by using at least one of the embodiments, information indicating that at least one of the first transformation, the second transformation and the scanning is performed on the residual signal of the current block can be encoded / decoded. When the above information is entropy encoded / decoded, at least one of the truncated Rice binarization method, the K-order exponential Golomb binarization method, the restricted K-order exponential Golomb binarization method, the fixed-length binarization method, the unary binarization method and the truncated unary binarization method can be used as the entropy encoding method. In addition, after the above information is binarized, the above information can be finally encoded / decoded by using CABAC (ae(v)). Optionally, the encoding information of the current block can be implicitly derived by using at least one of the size and form of the current block.
[0306] Next, encoding / decoding of motion vector information will be described in detail.
[0307] When the current block is encoded through inter prediction, the encoder may transmit a motion vector difference (MVD) representing a difference between a motion vector encoded adjacent to the current block and a motion vector of the current block to the decoder.
[0308] The decoder may derive a motion vector encoded adjacent to the current block as a motion vector candidate of the current block. In detail, the decoder may derive a motion vector candidate from both a decoded temporal motion vector and a decoded spatial motion vector of the current block or at least one of the decoded temporal motion vector or the decoded spatial motion vector of the current block, and configure a motion vector candidate list (MVP list).
[0309] The encoder may transmit information indicating information (e.g., an MVP list index) of a motion vector predictor for deriving a motion vector difference among motion vector candidates included in the motion vector candidate list. Subsequently, the decoding device may determine the motion vector candidate indicated by the MVP list index as a motion vector predictor, and derive a motion vector of the current block by using the motion vector predictor and the motion vector difference.
[0310] Based on the above explanation, a method of encoding / decoding motion vector information of a current block according to the present invention will be described in detail.
[0311] Fig. 20 is a flowchart showing the decoding process of the motion vector of the current block.
[0312] First, in step S2001, a spatial motion vector candidate of a current block may be derived. The spatial motion vector candidate of the current block may be derived from an encoding / decoding block included in the same picture as the picture including the current block.
[0313] Fig.21is a diagram illustrating an example of deriving spatial motion vector candidates.
[0314] like Fig.21 , a spatial motion vector of the current block may be derived from a block B1 adjacent to the upper side of the current block X, a block A1 adjacent to the left side of the current block, a block B0 adjacent to the upper right corner of the current block, a block B2 located at the upper left corner, and a block A0 adjacent to the lower left corner of the current block. The spatial motion vector derived from the neighboring blocks of the current block may be determined as a spatial motion vector candidate of the current block.
[0315] Here, the spatial motion vector candidate may be derived in a predetermined order. In one embodiment, the spatial motion vector candidate may determine whether there is a motion vector in each block in the order of A0, A1, B0, B1, and B2. When there is a motion vector of a neighboring block, the motion vector of the corresponding neighboring block may be determined as a spatial motion vector candidate.
[0316] When the reference picture of the neighboring block and the reference picture of the current block are different, a motion vector obtained by scaling the motion vector of the neighboring block using the distance between the reference picture referenced by the current picture and the neighboring block and the distance between the reference picture referenced by the current picture and the current block can be determined as the spatial motion vector of the current block.
[0317] Then, in step S2002, a temporal motion vector candidate of the current block may be derived. The temporal motion vector of the current block may be derived from a reconstructed block in a co-located picture.
[0318] Fig. 22 is a diagram illustrating an example of deriving a temporal motion vector candidate.
[0319] like Fig. 22 In the example shown in , the temporal motion vector of the current block may be derived from a block at an H position existing outside the co-located block C or from a block at a C3 position existing inside the co-located block C, wherein the co-located block C corresponds to the same position as the current block X in the co-located picture of the current picture. The temporal motion vector candidate may be derived sequentially from the block at the H position and the block at the C3 position. In one embodiment, when the motion vector may be derived from the block at the H position, the temporal motion vector candidate may be derived from the block at the H position. Alternatively, when the motion vector may not be derived from the block at the H position, the temporal motion vector candidate may be derived from the block at the C3 position. When the block at the H position or the C3 position is encoded by intra-frame prediction, the temporal motion vector candidate of the current block is not derived.
[0320] Apart from Fig. 22In addition to the example shown in , at least one temporal motion vector candidate of the current block may be derived from a co-located picture indicated by the obtained motion information of the current block and a co-located block or a neighboring block of the co-located block included in the co-located picture indicated by the motion information. Here, the motion information may include at least one of a picture index indicating the co-located picture and a motion vector indicating the co-located block within the co-located picture. Motion information for specifying the co-located picture and the co-located block may be additionally signaled for the current block.
[0321] The temporal motion vector candidate of the current block may be obtained in sub-block units having a size smaller than the current block. For example, when the size of the current block is 8×8, the temporal motion vector candidate may be obtained in sub-block units having a size smaller than the current block (such as 2×2, 4×4, 8×4, 4×8, etc.). The sub-block may have a square or rectangular form. In addition, the size or form of the sub-block may be preset in the encoder / decoder, or may be determined according to the size or form of the current block.
[0322] Subsequently, in step S2003, a motion vector candidate list including at least one motion vector candidate of the spatial motion vector candidates and the temporal motion vector candidates may be generated.
[0323] Here, the motion vector candidate list may be configured to include at least one temporal motion vector candidate. In one embodiment, when the number of motion vector candidates that can be included in the motion vector candidate list is N (here, N is a positive integer greater than 0), the motion vector candidate list may be configured to necessarily include at least one motion vector candidate. Although a maximum of N spatial motion vector candidates that are different from each other can be derived when deriving spatial motion vector candidates, at least one of the N spatial motion vector candidates may be removed from the motion vector candidate list by arbitrary similarity determination. Therefore, the temporal motion vector candidate may be included in the motion vector candidate list. Here, arbitrary similarity determination may refer to a method of combining at least two spatial motion vectors into a single spatial motion vector by using a maximum value, a minimum value, an average value, a median value, or an arbitrary weighted sum even when the spatial motion vectors have different values from each other. The number of spatial motion vector candidates may be reduced by using arbitrary similarity determination.
[0324] Alternatively, when N spatial motion vector candidates are included in the motion vector candidate list according to a predetermined priority, at least one of the spatial motion vector candidates may be removed from the motion vector candidate list in reverse order of the predetermined priority. In other words, at least one of the spatial motion vector candidates may be removed from the motion vector candidate list starting from the back to the front. Therefore, the temporal motion vector candidate may be included in the motion vector candidate list.
[0325] Whether to remove the spatial motion vector candidate from the above-mentioned motion vector candidate list can be determined according to whether the temporal motion vector candidate is used. In addition, the number of spatial motion vector candidates to be removed from the motion vector candidate list can be determined according to the number of temporal motion vector candidates used for the current block or the number of temporal motion vector candidates available for the current block.
[0326] Furthermore, the number of motion vector candidates that may be included in the motion vector candidate list may be increased by 1 (in other words, increased to N+1) so that the temporal motion vector candidate is included in the motion vector candidate list.
[0327] Subsequently, in step S2004, any one of the motion vector candidates included in the motion vector candidate list may be determined as a motion vector predictor. In one embodiment, the decoder may determine a motion vector predictor for the current block based on information (e.g., an MVP list index) specifying any one of the motion vector candidates included in the motion vector candidate list.
[0328] In step S2005, when the motion vector prediction value of the current block is determined, the motion vector of the current block can be obtained by using the motion vector difference. The motion vector difference may represent the difference between the motion vector of the current block and the motion vector prediction value of the current block. The motion vector difference of the current block may be entropy encoded / decoded.
[0329] According to an embodiment of the present invention, in order to reduce the amount of information of the motion vector difference, the motion vector difference of the current block may be encoded by using the motion vector difference of a reconstructed block adjacent to the current block and encoded by inter-frame prediction. In one embodiment, a second motion vector difference of the current block may be encoded, wherein the second motion vector difference represents the difference between the following two motion vector differences: a motion vector difference representing the difference between the motion vector of the current block and the motion vector prediction and a motion vector difference representing the difference between the reconstructed blocks adjacent to the current block and encoded by inter-frame prediction.
[0330] Fig.23 is a diagram illustrating derivation of a second motion vector difference.
[0331] Assume that the motion vector difference (MVD) of the current block (block 2) is (5, 5). Here, the second motion vector difference of the current block may be encoded by using the motion vector difference of the upper block (block 1) located on the upper side of the current block.
[0332] In one embodiment, when it is assumed that the motion vector difference of the upper block is (5, 5), since the motion vector difference of the current block is the same as the motion vector difference of the upper block, the second motion vector difference of the current block may become (0, 0). When the motion vector difference (0, 0) is encoded instead of the motion vector difference (5, 5), the amount of information used to encode the motion vector difference of the current block can be reduced.
[0333] Also, when there is a block having the same motion vector difference as that of the current block, the motion vector difference of the current block may be derived from a neighboring block without transmitting the motion vector difference of the current block.
[0334] As in the above-mentioned example, the position of the neighboring block for deriving the second motion vector candidate of the current block or the information indicating the position of the neighboring block having the same motion vector difference as the motion vector difference of the current block may be explicitly transmitted through the bitstream. In one embodiment, information (e.g., MVD index) for identifying the neighboring block for deriving the second motion vector candidate or the neighboring block having the same motion vector candidate as the motion vector candidate of the current block among the neighboring blocks of the current block may be transmitted to the decoder through the bitstream.
[0335] In another embodiment, the position of the neighboring block used to derive the second motion vector candidate of the current block or information indicating the position of the neighboring block having the same motion vector difference as the motion vector difference of the current block may be implicitly derived in the encoder / decoder according to the same process. In one embodiment, the motion vector difference of the neighboring block used as the motion vector predictor (MVP) of the current block may be used as a motion vector difference predictor (MVD predictor) for deriving the second motion vector difference of the current block.
[0336] When the current block is encoded by bidirectional prediction, information indicating whether the motion vector differences of reference picture list 0 (List 0) and reference picture list 1 (List 1) are the same may be encoded. Here, the same motion vector difference may mean that the sign and size of the motion vector difference are the same, or may mean that the size of the motion vector difference is the same but the sign of the motion vector difference is different. When the motion vector differences of reference picture list 0 and reference picture list 1 are the same, encoding / decoding of any one of the motion vector differences of reference picture list 0 and reference picture list 1 may be omitted.
[0337] According to another embodiment of the present invention, all blocks within the signaling block of the current encoding / decoding picture or slice may have at least one identical motion vector predictor (MVP) to derive an optimal motion vector difference (MVD). Alternatively, according to another embodiment of the present invention, all blocks within the signaling block of the current encoding / decoding picture or slice may have at least one identical motion vector difference predictor (MVD predictor) to derive an optimal second motion vector difference. Here, a motion vector predictor or a motion vector difference predictor may be sent for each signaling block, or a motion vector predictor or a motion vector difference predictor may be implicitly derived by using encoding information of neighboring blocks adjacent to the signaling block. Here, a signaling block may represent an area having a size smaller than at least one of the horizontal resolution and the vertical resolution of the current picture or the current slice. In other words, a signaling block may be defined as a predetermined area having a size smaller than the current picture or the current slice.
[0338] The information of the signaling block may be transmitted through at least one of a sequence unit, a picture unit, and a slice header. In one embodiment, at least one of the size, form, or position of the signaling block may be transmitted through at least one of a sequence parameter set, a picture parameter set, and a slice header. Alternatively, the information of the signaling block may be implicitly derived through coding information of the current block or a neighboring block adjacent to the current block. The signaling block may have a square or rectangular form, but is not limited thereto.
[0339] The above inter-frame encoding / decoding process may be performed for each luminance signal and chrominance signal. For example, at least one method of obtaining an inter-frame prediction indicator, generating a motion vector candidate list, deriving a motion vector, and performing motion compensation in the above inter-frame encoding / decoding process may be applied differently to luminance signals and chrominance signals.
[0340] The above inter-frame encoding / decoding process may be performed equally for a luminance signal and a chrominance signal. For example, at least one of an inter-frame prediction indicator, a motion vector candidate list, a motion vector candidate, a motion vector, and a reference picture applied to a luminance signal when performing the above inter-frame encoding / decoding process may be applied equally to a chrominance signal.
[0341] The above method can be performed in the encoder and decoder in the same way. For example, at least one method of deriving a motion vector candidate list, deriving a motion vector candidate, deriving a motion vector, and performing motion compensation in the above inter-frame encoding / decoding process can be equally applied to the encoder and decoder. Alternatively, the order of the above method can be applied differently to the encoder and decoder.
[0342] The above embodiments of the present invention may be applied according to the size of at least one of the coding block, prediction block, block and unit. Here, the size may be defined as the minimum size or maximum size or both the minimum size and maximum size to which the above embodiments are applied, or may be defined as a fixed size to which the embodiments are applied. In addition, in the above embodiments, the first embodiment may be applied to the first size, and the second embodiment may be applied to the second size. In other words, the embodiments may be applied in combination according to the sizes. In addition, the above embodiments of the present invention may only apply the minimum size or a larger size and the maximum size or a smaller size. In other words, the above embodiments may be applied to block sizes included in a predetermined range.
[0343] For example, when the size of the encoding / decoding target block is 8×8 or larger, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 16×16 or larger, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 32×32 or larger, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 64×64 or larger, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 128×128 or larger, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 4×4, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 8×8 or smaller, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 16×16 or smaller, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 8×8 or larger and 16×16 or smaller, the above embodiment may be applied. For example, when the size of the encoding / decoding target block is 16×16 or more and 64×64 or less, the above embodiment can be applied.
[0344] The above embodiments of the present invention may be applied according to the time layer. An additional identifier for identifying the time layer to which the above embodiments may be applied may be sent with a signal, and the above embodiments may be applied to the time layer indicated by the corresponding identifier. Here, the identifier may be defined as indicating the minimum layer or the maximum layer or both the minimum layer and the maximum layer to which the embodiment may be applied, or may be defined as indicating a specific layer to which the above embodiments may be applied.
[0345] For example, when the time layer of the current picture is the lowest layer, the above embodiment may be applied. For example, when the time layer identifier of the current picture is 0, the above embodiment may be applied. For example, when the time layer identifier of the current picture is 1, the above embodiment may be applied. For example, when the time layer of the current picture is the highest layer, the above embodiment may be applied.
[0346] As in the above embodiments of the present invention, a reference picture set used when generating a reference picture list and modifying a reference picture list may use at least one of the reference picture lists L0, L1, L2, and L3.
[0347] According to an embodiment of the present invention, when calculating the boundary strength in the deblocking filter, at least one to a maximum of N motion vectors of the encoding / decoding target block may be used. Here, N is a positive integer equal to or greater than 1, and may be 2, 3, 4, etc.
[0348] The above embodiments of the present invention may be applied when a motion vector has at least one of the following units when predicting a motion vector: a 16-pixel (16-pel) unit, an 8-pixel (8-pel) unit, a 4-pixel (4-pel) unit, an integer-pixel (integer-pel) unit, a 1 / 2-pixel (1 / 2-pel) unit, a 1 / 4-pixel (1 / 4-pel) unit, a 1 / 8-pixel (1 / 8-pel) unit, a 1 / 16-pixel (1 / 16-pel) unit, a 1 / 32-pixel (1 / 32-pel) unit, and a 1 / 64-pixel (1 / 64-pel) unit. In addition, when predicting a motion vector, a motion vector may be optionally used according to the above pixel units.
[0349] A stripe type to which the above embodiments of the present invention are applied may be defined, and the above embodiments of the present invention may be applied according to the corresponding stripe type.
[0350] For example, when the slice type is T (three-way prediction)-slice, the prediction block may be generated by using at least three motion vectors, so that the weighted sum of at least three prediction blocks may be calculated and used as the final prediction block of the encoding / decoding target block. For example, when the slice type is Q (four-way prediction)-slice, the prediction block may be generated by using at least four motion vectors, so that the weighted sum of at least four prediction blocks may be calculated and used as the final prediction block of the encoding / decoding target block.
[0351] The above embodiments of the present invention may be applied to an inter prediction and motion compensation method using motion vector prediction, and may be applied to an inter prediction and motion compensation method using a skip mode or a merge mode.
[0352] The block form to which the above embodiments of the present invention can be applied may have a square form or a non-square form.
[0353] In the above-mentioned embodiment, the method is described based on a flow chart with a series of steps or units, but the present invention is not limited to the order of the steps. Instead, some steps may be performed simultaneously with other steps, or may be performed in a different order with other steps. In addition, it should be understood by those of ordinary skill in the art that the steps in the flow chart are not mutually exclusive, and other steps may be added to the flow chart, or some steps may be deleted from the flow chart without affecting the scope of the present invention.
[0354] The embodiments described above include examples of various aspects. Of course, it is not possible to describe every conceivable combination of components or methods for the purpose of describing various aspects, but those of ordinary skill in the art will be able to recognize that further combinations and arrangements are possible. Therefore, this specification is intended to include all such alternatives, modifications and changes that fall within the spirit and scope of the appended claims.
[0355] The computer-readable storage medium may include individual program instructions, data files, data structures, etc., or a combination of program instructions, data files, data structures, etc. The program instructions recorded in the computer-readable storage medium may be specially designed and constructed for the present invention or any program instructions known to a technician in the field of computer software technology. Examples of computer-readable storage media include: magnetic recording media (such as hard disks, floppy disks, and magnetic tapes); optical data storage media (such as CD-ROMs or DVD-ROMs); magneto-optical media (such as floppy disks); and hardware devices (such as read-only memory (ROM), random access memory (RAM), and flash memory) specially constructed to store and implement program instructions. Examples of program instructions include not only machine language codes formatted by a compiler, but also high-level language codes that can be implemented by a computer using an interpreter. The hardware device may be configured to be operated by one or more software modules to perform processing according to the present invention, or vice versa.
[0356] Although the present invention has been described according to specific terms (such as detailed elements) and limited embodiments and drawings, they are only provided to help more popularly understand the present invention, and the present invention is not limited to the above embodiments. It will be understood by those skilled in the art that various modifications and changes can be made from the above description.
[0357] Therefore, the spirit of the present invention should not be limited to the above embodiments, and the full scope of the appended claims and their equivalents will fall within the scope and spirit of the present invention.
[0358] Industrial availability
[0359] The present invention can be used in a device for encoding / decoding an image.
Claims
1. An image decoding method performed by an image decoding device, the method include: The current block is obtained by partitioning the image; Partitioning the current block using a partitioning method determined based on a size of the current block; generating a prediction block of the coding block obtained based on the partitioning method; generating a residual block of the coding block; generating a reconstructed block of the coding block using the prediction block and the residual block; as well as applying a deblocking filter to the reconstructed block of the coded block, Wherein, when the size of the current block is larger than 64×64, the partitioning method is implicitly determined as quadtree partitioning without signaling the partitioning information, wherein, when the size of the current block is less than or equal to 64×64, the partitioning method is explicitly determined based on the partitioning information sent by the signal, Therein, the current block is partitioned recursively and repeatedly until the size of the current block becomes 64×64 or smaller.
2. The image decoding method according to claim 1, in, The step of generating the prediction block includes: if the coding block satisfies a predetermined condition, binary tree partitioning is not allowed.
3. The image decoding method according to claim 2, in, The predetermined condition is derived based on the size of the coding block.
4. The image decoding method according to claim 1, in, The step of generating the prediction block includes filtering the prediction block based on at least one of an intra prediction mode of the coding block and a size of the coding block.
5. The image decoding method according to claim 1, in, The signaled partition information includes a first flag indicating whether to partition the current block, a second flag indicating whether to partition the current block into a quadtree, and a third flag indicating a partition type.
6. The image decoding method according to claim 5, in, The partition information that is signaled is signaled in the order of the first flag, the second flag, and the third flag.
7. A method for encoding an image performed by an image encoding device, the method include: The current block is obtained by partitioning the image; Partitioning the current block using a partitioning method determined based on a size of the current block; generating a prediction block of the coding block obtained based on the partitioning method; generating a residual block of the coding block; generating a reconstructed block of the coding block using the prediction block and the residual block; as well as applying a deblocking filter to the reconstructed block of the coded block, Wherein, when the size of the current block is larger than 64×64, the partitioning method is implicitly determined as quadtree partitioning without signaling the partitioning information, wherein, when the size of the current block is less than or equal to 64×64, the partitioning method is explicitly determined based on the partitioning information sent by the signal, Therein, the current block is partitioned recursively and repeatedly until the size of the current block becomes 64×64 or smaller.
8. A method for transmitting a bit stream containing coded video data, the method include: generating said bitstream for a current block in a picture; as well as sending the bit stream, The step of generating the bitstream for the image comprises: Obtaining a current block by partitioning the image; Partitioning the current block using a partitioning method determined based on a size of the current block; generating a prediction block of the coding block obtained based on the partitioning method; generating a residual block of the coding block; generating a reconstructed block of the coding block using the prediction block and the residual block; and applying a deblocking filter to the reconstructed block of the coded block, Wherein, when the size of the current block is larger than 64×64, the partitioning method is implicitly determined as quadtree partitioning without signaling the partitioning information, wherein, when the size of the current block is less than or equal to 64×64, the partitioning method is explicitly determined based on the partitioning information sent by the signal, Therein, the current block is partitioned recursively and repeatedly until the size of the current block becomes 64×64 or smaller.
Citation Information
Patent Citations
Method and apparatus for encoding and decoding image using object boundary based partition
CN101682778A
Video coding using multi-tree sub - divisions of images
CN102893608A