WO2017131473A1 - Method and device for encoding and decoding video by using prediction - Google Patents

Method and device for encoding and decoding video by using prediction Download PDF

Info

Publication number
WO2017131473A1
WO2017131473A1 PCT/KR2017/000965 KR2017000965W WO2017131473A1 WO 2017131473 A1 WO2017131473 A1 WO 2017131473A1 KR 2017000965 W KR2017000965 W KR 2017000965W WO 2017131473 A1 WO2017131473 A1 WO 2017131473A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction
block
reconstructed
unit
current block
Prior art date
Application number
PCT/KR2017/000965
Other languages
French (fr)
Korean (ko)
Inventor
임성창
고현석
강정원
이진호
전동산
김휘용
전병우
김남욱
전승수
최진수
Original Assignee
한국전자통신연구원
성균관대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020170012160A external-priority patent/KR20170089777A/en
Application filed by 한국전자통신연구원, 성균관대학교산학협력단 filed Critical 한국전자통신연구원
Priority to CN202211613836.XA priority Critical patent/CN115733979A/en
Priority to CN202211613450.9A priority patent/CN116016911A/en
Priority to CN202211615144.9A priority patent/CN116016912A/en
Priority to CN202211613078.1A priority patent/CN115733977A/en
Priority to CN202211613933.9A priority patent/CN115941949A/en
Priority to CN202211613690.9A priority patent/CN115733978A/en
Priority to CN201780009090.2A priority patent/CN108605123B/en
Priority to CN202211613703.2A priority patent/CN115941948A/en
Publication of WO2017131473A1 publication Critical patent/WO2017131473A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/567Motion estimation based on rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution

Definitions

  • the following embodiments relate to a video decoding method, a decoding device, an encoding method, and an encoding device, and more particularly, to a method and an apparatus for encoding and decoding a video using prediction on a target block.
  • Ultra High Definition (UHD) TVs which have four times the resolution of FHD TVs, as well as High Definition TV (HDTV) and Full HD (FHD) TVs.
  • HDTV High Definition TV
  • FHD Full HD
  • An image encoding / decoding apparatus and method include an inter prediction technique, an intra prediction technique, an entropy encoding technique, etc. in order to perform encoding / decoding of high resolution and high quality images.
  • the inter prediction technique may be a technique for predicting a value of a pixel included in a current picture using a temporally previous picture and / or temporally following picture.
  • An intra prediction technique may be a technique of predicting a value of a pixel included in a current picture by using information of a pixel in a current picture.
  • the entropy encoding technique may be a technique of allocating a short code to a symbol having a high appearance frequency and a long code to a symbol having a low appearance frequency.
  • prediction may mean generating a prediction signal similar to the original signal.
  • Predictions can be broadly classified into predictions referring to spatially reconstructed images, predictions referring to temporal reconstructed images, and predictions for other symbols.
  • a temporal reference may refer to a temporally reconstructed image
  • a spatial reference may refer to a spatially reconstructed image.
  • the current block may be a block that is currently subjected to encoding or decoding.
  • the current block may be named a target block or a target unit.
  • the current block may be called an encoding target block or an encoding target unit.
  • the current block may be called a decoding target block or a decoding target unit.
  • Inter prediction may be a technique for predicting the current block using temporal and spatial references.
  • Intra prediction may be a technique for predicting the current block using only spatial references.
  • the image encoding / decoding technique encodes the current block using one prediction mode among a plurality of prediction modes when performing intra prediction to reduce spatial repetition.
  • HEVC High Efficiency Video Coding
  • the encoding apparatus generates prediction blocks of the current block using all available prediction modes among the plurality of prediction modes, and selects one prediction modes that produce the best result as a prediction mode of encoding of the current block. However, even using the prediction mode that produces the best results, there is still an error between the original block and the prediction block. This error is represented as a residual block.
  • One embodiment may provide a method and apparatus for reducing a prediction error of a prediction unit generated by the prediction.
  • One embodiment may provide a method and apparatus for reducing a prediction error caused by a prediction direction of a prediction mode.
  • An embodiment may provide a method and apparatus for performing a second prediction selectively in a direction of a first prediction mode with respect to a prediction error according to the first prediction.
  • An embodiment may provide a method and apparatus for performing a selective second prediction on a part of a prediction error according to a first prediction.
  • An embodiment may provide a method and apparatus for performing a selective second prediction on a portion with a severe distortion among prediction errors according to the first prediction.
  • One embodiment provides a method and apparatus for preventing an additional prediction error that may occur when performing a second prediction on the entirety of the prediction error by performing a second prediction selectively on a part of the prediction error according to the first prediction. Can provide.
  • One embodiment can provide a method and apparatus for obtaining sufficient spatial iteration reduction through the progress of transform quantization by reducing large prediction errors generated in the prediction direction.
  • the restored residual signal generator for generating a restored residual signal for the current block; And a reconstructed block generator that generates a reconstructed block for the current block based on the reconstructed residual signal, the second prediction, and the first prediction.
  • generating a reconstructed residual signal for a current block And generating a reconstructed block for the current block based on the reconstructed residual signal, the second prediction, and the first prediction.
  • the reconstructed block may correspond to the sum of the reconstructed residual signal, the first prediction signal generated by the first prediction, and the second prediction signal generated by the second prediction.
  • the first prediction and the second prediction may be intra prediction.
  • the prediction direction of the second prediction may be the same as the first prediction direction.
  • At least some of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction may be different from each other.
  • the type of the first reference block of the first prediction and the type of the second reference block of the second prediction may be different from each other.
  • the first reference block of the first prediction may be a reconstructed neighboring block neighboring the current block.
  • the second reference block of the second prediction may be a reconstructed neighbor residual block neighboring the current block.
  • the reconstructed neighboring residual block may be a difference between the reconstructed neighboring block and the first prediction block of the reconstructed neighboring block.
  • the area of the reference sample of the second prediction may be part of the area of the reference sample of the first prediction.
  • the region to which the second prediction is to be applied may be specified based on a range of reference samples used for the second prediction.
  • An area to which the second prediction is to be applied may be specified based on a prediction direction of the second prediction.
  • the range of reference samples is specified by information indicating a first reference sample to be used for the second prediction and information indicating the number of reference samples to be used for the second prediction.
  • the region to which the second prediction is to be applied may be a region generated as the reference samples of the range proceed in the prediction direction of the second prediction.
  • the second prediction usage information indicating whether the second prediction is used in encoding the current block indicates that the second prediction is not used, the second prediction may not be used.
  • the second prediction may not be used.
  • the second prediction may not be used.
  • the boundary may be a boundary of a picture, a boundary of a slice, or a boundary of a tile.
  • Whether the second prediction is to be used may be determined based on the number of reconstructed blocks adjacent to the current block.
  • the reconstructed block may be generated based on the reconstructed residual signal and the first prediction signal by the first prediction.
  • a method and apparatus are provided for reducing a prediction error of a prediction unit generated by prediction.
  • a method and apparatus are provided for reducing a prediction error caused by a prediction direction of a prediction mode.
  • a method and apparatus are provided for performing selective second prediction in a direction of a first prediction mode with respect to a prediction error according to the first prediction.
  • a method and apparatus are provided for performing a selective second prediction on some of the prediction errors according to the first prediction.
  • a method and an apparatus for performing selective second prediction on a portion of a distortion that is severe among prediction errors according to a first prediction are provided.
  • a method and apparatus are provided for preventing additional prediction errors that may occur when performing a second prediction on the entirety of the prediction error by performing a second prediction selectively for only a part of the prediction errors according to the first prediction.
  • a method and apparatus are provided for obtaining sufficient spatial iteration reduction through the progress of transform quantization by reducing large prediction errors generated in the prediction direction.
  • FIG. 1 is a block diagram illustrating a configuration of an encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating a configuration of a decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 is a diagram schematically illustrating a division structure of an image when encoding and decoding an image.
  • FIG. 4 is a diagram illustrating a form of a prediction unit PU that a coding unit CU may include.
  • FIG. 5 is a diagram illustrating a form of a transform unit (TU) that may be included in a coding unit (CU).
  • TU transform unit
  • CU coding unit
  • FIG. 6 is a diagram for explaining an embodiment of an intra prediction process.
  • FIG. 7 is a diagram for describing a position of a reference sample used in an intra prediction process.
  • FIG. 8 is a diagram for explaining an embodiment of an inter prediction process.
  • FIG 9 illustrates a prediction error when the original image is predicted in the vertical direction according to an example.
  • FIG. 10 is a structural diagram of an encoding apparatus according to an embodiment.
  • FIG. 11 is a flowchart of an encoding method according to an embodiment.
  • FIG 12 illustrates first prediction and second prediction using intra prediction, according to an embodiment.
  • FIG. 13 is a flowchart of a method of generating a residual block, according to an exemplary embodiment.
  • FIG. 14 is a flowchart of a method of generating a restored block, according to an example.
  • 16 is a structural diagram of a decoding apparatus according to an embodiment.
  • 17 is a flowchart of a decoding method according to an embodiment.
  • FIG. 18 is a flowchart of a method of generating a restored block, according to an exemplary embodiment.
  • FIG. 19 illustrates a decoding process according to an embodiment.
  • first and second may be used to describe various components, but the above components should not be limited by the above terms. The above terms are used to distinguish one component from another component.
  • first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
  • each component shown in the embodiments are shown independently to represent different characteristic functions, and do not mean that each component is composed of only separate hardware or one software component unit. That is, each component is listed as each component for convenience of description. For example, at least two of the components may be combined into one component. In addition, one component may be divided into a plurality of components. The integrated and separated embodiments of each of these components are also included in the scope of the present invention without departing from the essence.
  • components may not be essential components for performing essential functions, but may be optional components for improving performance.
  • Embodiments may be implemented including only components necessary to implement the nature of the embodiments, and structures including the optional components, such as, for example, components used only for performance improvement, are also included in the scope of rights.
  • an image may mean one picture constituting a video and may represent a video itself.
  • "encoding and / or decoding of an image” may mean “encoding and / or decoding of a video” and may mean “encoding and / or decoding of one of images constituting the video.” It may be.
  • video and “motion picture” may be used interchangeably and may be used interchangeably.
  • image may be used in the same sense, and may be used interchangeably.
  • each of the specified information, data, flags and elements, attributes, etc. may have a value.
  • the value "0" of information, data, flags and elements, attributes, etc. may represent a logical false or first predefined value. In other words, the value "0", logic false and the first predefined value can be used interchangeably.
  • the value "1" of information, data, flags and elements, attributes, etc. may represent logical true or second predefined values. In other words, the value "1", the logical true and the second predefined value can be used interchangeably.
  • a variable such as i or j may be used to indicate a row, column or index, and the value of i may be an integer of 0 or more and may be an integer of 1 or more. In other words, in embodiments, rows, columns, indexes, etc. may be counted from zero and counted from one.
  • a “unit” may represent a unit of encoding and decoding of an image.
  • the meanings of the unit and the block may be the same.
  • the terms “unit” and “block” may be used interchangeably.
  • the unit may be an M ⁇ N array of samples.
  • M and N may each be a positive integer.
  • a unit can often mean an array of two-dimensional samples.
  • the sample may be a pixel or pixel value.
  • pixel and “sample” can be used interchangeably and can be used interchangeably.
  • a unit may be an area generated by division of one image.
  • One image may be divided into a plurality of units.
  • a predefined process for the unit may be performed according to the type of the unit.
  • the type of unit may be classified into a macro unit, a coding unit (CU), a prediction unit (PU), a transform unit (TU), and the like.
  • One unit may be further divided into subunits having a smaller size than the unit.
  • the unit division information may include information about the depth of the unit.
  • the depth information may indicate the number and / or degree of division of the unit.
  • One unit may be divided into a plurality of sub-units hierarchically with depth information based on a tree structure.
  • the unit and the lower unit generated by the division of the unit may correspond to the node and the child node of the node, respectively.
  • Each divided subunit may have depth information. Since the depth information of the unit indicates the number and / or degree of division of the unit, the division information of the lower unit may include information about the size of the lower unit.
  • the highest node may correspond to the first unit that is not split.
  • the highest node may be referred to as a root node.
  • the highest node may have a minimum depth value. At this time, the highest node may have a depth of level 0.
  • a node with a depth of level 1 may represent a unit created as the first unit is divided once.
  • a node with a depth of level 2 may represent a unit created as the first unit is split twice.
  • a node with a depth of level n may represent a unit generated as the first unit is divided n times.
  • the leaf node may be the lowest node or may be a node that cannot be further divided.
  • the depth of the leaf node may be at the maximum level.
  • the predefined value of the maximum level may be three.
  • a transform unit may be a basic unit in residual signal coding and / or residual signal decoding such as transform, inverse transform, quantization, inverse quantization, transform coefficient encoding, and transform coefficient decoding. .
  • One transform unit may be divided into a plurality of transform units having a smaller size.
  • a prediction unit may be a basic unit in performing prediction or compensation.
  • the prediction unit can be a number of partitions by partitioning. Multiple partitions may also be the basic unit in performing prediction or compensation.
  • the partition generated by the partitioning of the prediction unit may also be the prediction unit.
  • the reconstructed neighbor unit may be a unit that has already been encoded or decoded around the encoding target unit or the decoding target unit.
  • the reconstructed neighbor unit may be a spatial neighbor unit or a temporal neighbor unit to the target unit.
  • Prediction unit partition may mean a form in which a prediction unit is divided.
  • a parameter set may correspond to header information among structures in the bitstream.
  • the parameter set may include a sequence parameter set, a picture parameter set, an adaptation parameter set, and the like.
  • Rate-distortion optimization The encoding apparatus uses a combination of the size of the coding unit, the prediction mode, the size of the prediction unit, the motion information, and the size of the transform unit to provide high coding efficiency. Distortion optimization can be used.
  • the rate-distortion optimization method can calculate the rate-distortion cost of each combination in order to select the optimal combination among the above combinations.
  • the rate-distortion cost may be calculated using Equation 1 below.
  • a combination in which the rate-distortion cost is minimized may be selected as an optimal combination in the rate-distortion optimization scheme.
  • D may represent distortion.
  • D may be the mean square error of the squares of difference values between the original transform coefficients and the reconstructed transform coefficients in the transform block.
  • R can represent the rate.
  • R may indicate a bit rate using the associated context information.
  • may represent a Lagrangian multiplier.
  • R may include not only encoding parameter information such as a prediction mode, motion information, and a coded block flag, but also bits generated by encoding of transform coefficients.
  • the encoding apparatus performs processes such as inter prediction and / or intra prediction, transformation, quantization, entropy encoding, inverse quantization, and inverse transformation to calculate accurate D and R, which can greatly increase the complexity in the encoding apparatus. have.
  • the reference picture may be an image used for inter prediction or motion compensation.
  • the reference picture may be a picture including a reference unit referenced by the target unit for inter prediction or motion compensation.
  • the meanings of the picture and the image may be the same.
  • the terms "picture” and “image” may be used interchangeably.
  • the reference picture list may be a list including reference pictures used for inter prediction or motion compensation.
  • the type of the reference picture list may be List Combined (LC), List 0 (List 0; L0), List 1 (List 1; L1), and the like.
  • Motion Vector The motion vector may be a two-dimensional vector used in inter prediction.
  • MV may be expressed in the form of (mv x , mv y ).
  • mv x may represent a horizontal component
  • mv y may represent a vertical component.
  • the MV may indicate an offset between the target picture and the reference picture.
  • the search range may be a two-dimensional area in which a search for MV is performed during inter prediction.
  • the size of the search region may be M ⁇ N.
  • M and N may each be a positive integer.
  • FIG. 1 is a block diagram illustrating a configuration of an encoding apparatus according to an embodiment of the present invention.
  • the encoding apparatus 100 may be a video encoding apparatus or an image encoding apparatus.
  • the video may include one or more images.
  • the encoding apparatus 110 may sequentially encode one or more images of the video over time.
  • the encoding apparatus 100 may include an inter predictor 110, an intra predictor 120, a switch 115, a subtractor 125, a transformer 130, a quantizer 140, and entropy decoding.
  • the unit 150 may include an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.
  • the encoding apparatus 100 may encode the input image in an intra mode and / or an inter mode.
  • the input image may be referred to as a current image that is a target of current encoding.
  • the encoding apparatus 100 may generate a bitstream including encoding information by encoding the input image, and may output the generated bitstream.
  • the switch 115 When the intra mode is used, the switch 115 can be switched to intra. When the inter mode is used, the switch 115 can be switched to inter.
  • the encoding apparatus 100 may generate a prediction block for the input block of the input image. In addition, after the prediction block is generated, the encoding apparatus 100 may encode a residual between the input block and the prediction block.
  • the input block may be referred to as a current block that is a target of current encoding.
  • the intra prediction unit 120 may use a pixel value of an already encoded block in the vicinity of the current block as a reference pixel.
  • the intra predictor 120 may perform spatial prediction on the current block by using the reference pixel, and generate prediction samples on the current block through spatial prediction.
  • the inter predictor 110 may include a motion predictor and a motion compensator.
  • the motion predictor may search an area that best matches the current block from the reference image in the motion prediction process, and may derive a motion vector for the current block and the searched area.
  • the reference picture may be stored in the reference picture buffer 190 and may be stored in the reference picture buffer 190 when encoding and / or decoding of the reference picture is processed.
  • the motion compensator may generate a prediction block by performing motion compensation using a motion vector.
  • the motion vector may be a two-dimensional vector used for inter prediction.
  • the motion vector may indicate an offset between the current picture and the reference picture.
  • the subtractor 125 may generate a residual block that is a difference between the input block and the prediction block.
  • the residual block may be referred to as a residual signal.
  • the transform unit 130 may generate transform coefficients by performing transform on the residual block, and output the generated transform coefficients.
  • the transform coefficient may be a coefficient value generated by performing transform on the residual block.
  • the transform unit 130 may omit the transform on the residual block.
  • Quantized transform coefficient levels may be generated by applying quantization to the transform coefficients.
  • the quantized transform coefficient level may also be referred to as transform coefficient.
  • the quantization unit 140 may generate a quantized transform coefficient level by quantizing the transform coefficients according to the quantization parameter.
  • the quantization unit 140 may output the generated quantized transform coefficient level. In this case, the quantization unit 140 may quantize the transform coefficients using the quantization matrix.
  • the entropy decoder 150 may generate a bitstream by performing entropy encoding according to a probability distribution based on the values calculated by the quantizer 140 and / or encoding parameter values calculated in the encoding process. .
  • the entropy decoder 150 may output the generated bitstream.
  • the entropy decoder 150 may perform entropy encoding on information for decoding an image in addition to information about pixels of an image.
  • the information for decoding the image may include a syntax element.
  • the encoding parameter may be information required for encoding and / or decoding.
  • the encoding parameter may include information encoded by the encoding apparatus and transmitted to the decoding apparatus, and may include information that may be inferred in the encoding or decoding process. For example, there is a syntax element as information transmitted to the decoding apparatus.
  • coding parameters include prediction modes, motion vectors, reference picture indexes, coding block patterns, residual signals, transform coefficients, quantized transform coefficients, quantization parameters, block sizes, block partitions. It may include values or statistics such as information.
  • the prediction mode may indicate an intra prediction mode or an inter prediction mode.
  • the residual signal may mean a difference between the original signal and the prediction signal.
  • the residual signal may be a signal generated by transforming a difference between the original signal and the prediction signal.
  • 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 in block units.
  • entropy coding When entropy coding is applied, a small number of bits may be allocated to a symbol having a high occurrence probability, and a large number of bits may be allocated to a symbol having a low occurrence probability. As the symbol is represented through this assignment, the size of the bitstring for the symbols to be encoded may be reduced. Therefore, compression performance of image encoding may be improved through entropy encoding.
  • the entropy decoder 150 may perform entropy encoding by using a variable length coding (VLC) table.
  • VLC variable length coding
  • the entropy decoder 150 may derive a binarization method for the target symbol.
  • the entropy decoder 150 may derive a probability model of the target symbol / bin.
  • the entropy decoder 150 may perform entropy encoding using the derived binarization method or the probability model.
  • the encoded current image may be used as a reference image with respect to other image (s) to be processed later. Therefore, the encoding apparatus 100 may decode the encoded current image again and store the decoded image as a reference image. Inverse quantization and inverse transform on the encoded current image may be processed for decoding.
  • the quantized coefficients may be inversely quantized in the inverse quantization unit 160 and inversely transformed in the inverse transformer 170.
  • the inverse quantized and inverse transformed coefficients may be summed with the prediction block via the adder 175.
  • a reconstructed block may be generated by adding the inverse quantized and inverse transformed coefficients and the prediction block.
  • the restored block may pass through the filter unit 180.
  • the filter unit 180 may apply at least one or more of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or the reconstructed picture. have.
  • the filter unit 180 may be referred to as an adaptive in-loop filter.
  • the deblocking filter may remove block distortion generated at boundaries between blocks.
  • the SAO may add an appropriate offset value to the pixel value to compensate for coding errors.
  • the ALF may perform filtering based on a value obtained by comparing the reconstructed image and the original image.
  • the reconstructed block that has passed through the filter unit 180 may be stored in the reference picture buffer 190.
  • FIG. 2 is a block diagram illustrating a configuration of a decoding apparatus according to an embodiment of the present invention.
  • the decoding apparatus 200 may be a video decoding apparatus or an image decoding apparatus.
  • the decoding apparatus 200 may include an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, an intra predictor 240, an inter predictor 250, and an adder 255.
  • the filter unit 260 may include a reference picture buffer 270.
  • the decoding apparatus 200 may receive a bitstream output from the encoding apparatus 100.
  • the decoding apparatus 200 may perform intra mode and / or inter mode decoding on the bitstream.
  • the decoding apparatus 200 may generate a reconstructed image by decoding, and output the generated reconstructed image.
  • switching to the intra mode or the inter mode according to the prediction mode used for decoding may be made by a switch.
  • the prediction mode used for decoding is an intra mode
  • the switch may be switched to intra.
  • the prediction mode used for decoding is an inter mode
  • the switch may be switched to inter.
  • the decoding apparatus 200 may obtain a reconstructed residual block from the input bitstream, and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding apparatus 200 may generate the reconstructed block by adding the reconstructed residual block and the prediction block.
  • the entropy decoder 210 may generate symbols by performing entropy decoding on the bitstream based on the probability distribution.
  • the generated symbols may include symbols in the form of quantized coefficients.
  • the entropy decoding method may be similar to the entropy encoding method described above.
  • the entropy decoding method may be an inverse process of the above-described entropy encoding method.
  • the quantized coefficient may be inverse quantized by the inverse quantization unit 220.
  • the inverse quantized coefficient may be inversely transformed by the inverse transformer 230.
  • a reconstructed residual block may be generated.
  • the inverse quantization unit 220 may apply a quantization matrix to the quantized coefficients.
  • the intra predictor 240 may generate a predictive block by performing spatial prediction using pixel values of blocks already decoded around the current block.
  • the inter predictor 250 may include a motion compensator.
  • the motion compensator may generate a prediction block by performing motion compensation using a motion vector and a reference image.
  • the reference picture may be stored in the reference picture buffer 270.
  • the reconstructed residual block and the prediction block may be added through the adder 255.
  • the adder 255 may generate the reconstructed block by adding the reconstructed residual block and the predictive block.
  • the restored block may pass through the filter unit 260.
  • the filter unit 260 may apply at least one or more of the deblocking filter, SAO, and ALF to the reconstructed block or the reconstructed picture.
  • the filter unit 260 may output the restored image.
  • the reconstructed picture may be stored in the reference picture buffer 270 and used for inter prediction.
  • FIG. 3 is a diagram schematically illustrating a division structure of an image when encoding and decoding an image.
  • a coding unit may be used in encoding and decoding.
  • a unit may be a term that collectively refers to 1) a block including image samples and 2) a syntax element.
  • “division of a unit” may mean “division of a block corresponding to a unit”.
  • the image 300 may be sequentially divided in units of a largest coding unit (LCU), and the division structure of the image 300 may be determined according to the LCU.
  • LCU may be used as the same meaning as a coding tree unit (CTU).
  • the partition structure may mean a distribution of a coding unit (CU) for efficiently encoding an image in the LCU 310. This distribution may be determined according to whether to divide one CU into four CUs.
  • the horizontal size and the vertical size of the CU generated by the split may be half of the horizontal size and half of the vertical size, respectively, before the split.
  • the partitioned CU may be recursively divided into four CUs whose width and length are reduced by half in the same manner.
  • Depth information may be information indicating the size of a CU. Depth information may be stored for each CU. For example, the depth of the LCU may be zero, and the depth of the smallest coding unit (SCU) may be a predefined maximum depth.
  • the LCU may be a CU having a maximum coding unit size as described above, and the SCU may be a CU having a minimum coding unit size.
  • the division may start from the LCU 310, and the depth of the CU may increase by one whenever the horizontal and vertical sizes of the CU are reduced by half by the division. For each depth, the CU that is not divided may have a size of 2N ⁇ 2N.
  • a CU of 2N ⁇ 2N size may be divided into four CUs having an N ⁇ N size. The size of N can be reduced by half for every 1 increase in depth.
  • an LCU having a depth of 0 may be 64 ⁇ 64 pixels. 0 may be the minimum depth.
  • An SCU of depth 3 may be 8x8 pixels. 3 may be the maximum depth.
  • a CU of 64x64 pixels, which is an LCU may be represented by a depth of zero.
  • a CU of 32x32 pixels may be represented by depth one.
  • a CU of 16 ⁇ 16 pixels may be represented by depth two.
  • a CU of 8x8 pixels, which is an SCU, may be represented by depth three.
  • information on whether the CU is split may be expressed through split information of the CU.
  • the split information may be 1 bit of information. All CUs except the SCU may include partition information. For example, when the CU is not split, the value of partition information of the CU may be 0, and when the CU is split, the value of partition information of the CU may be 1.
  • FIG. 4 is a diagram illustrating a form of a prediction unit PU that a coding unit CU may include.
  • a CU that is no longer split among CUs split from the LCU may be split into one or more prediction units (PUs). This partition may also be called a partition.
  • PUs prediction units
  • the PU may be a basic unit for prediction.
  • the PU may be encoded and decoded in any one of a skip mode, an inter mode, and an intra mode.
  • PU may be divided into various types according to each mode.
  • skip mode there may be no partition in the CU.
  • 2N ⁇ 2N mode 410 having the same size of PU and CU without splitting may be supported.
  • inter mode eight divided forms in a CU may be supported.
  • 2Nx2N mode 410, 2NxN mode 415, Nx2N mode 420, NxN mode 425, 2NxnU mode 430, 2NxnD mode 435, nLx2N mode 440, and nRx2N Mode 445 may be supported.
  • 2Nx2N mode 410 and NxN mode 425 may be supported.
  • a PU having a size of 2Nx2N may be encoded.
  • a PU having a size of 2N ⁇ 2N may mean a PU having a size equal to the size of a CU.
  • a PU having a size of 2N ⁇ 2N may have a size of 64 ⁇ 64, 32 ⁇ 32, 16 ⁇ 16, or 8 ⁇ 8.
  • a PU having a size of NxN may be encoded.
  • the size of the PU when the size of the PU is 8x8, four divided PUs may be encoded.
  • the size of the partitioned PU may be 4 ⁇ 4.
  • the PU When the PU is encoded by the intra mode, the PU may be encoded using one intra prediction mode among the plurality of intra prediction modes.
  • HEVC High Efficiency Video Coding
  • the PU can be coded in one of the 35 intra prediction modes.
  • Which of the 2Nx2N mode 410 and NxN mode 425 is to be coded may be determined by the rate-distortion cost.
  • the encoding apparatus 100 may perform an encoding operation on a PU having a size of 2N ⁇ 2N.
  • the encoding operation may be to encode the PU in each of a plurality of intra prediction modes that the encoding apparatus 100 may use.
  • an optimal intra prediction mode for a 2N ⁇ 2N size PU may be derived.
  • the optimal intra prediction mode may be an intra prediction mode that generates a minimum rate-distortion cost for encoding a 2N ⁇ 2N size PU among a plurality of intra prediction modes that can be used by the encoding apparatus 100.
  • the encoding apparatus 100 may sequentially perform encoding operations on each PU of the PUs divided by N ⁇ N.
  • the encoding operation may be to encode the PU in each of a plurality of intra prediction modes that the encoding apparatus 100 may use.
  • an optimal intra prediction mode for a N ⁇ N size PU may be derived.
  • the optimal intra prediction mode may be an intra prediction mode that generates a minimum rate-distortion cost for encoding of a PU of an N ⁇ N size among a plurality of intra prediction modes that can be used by the encoding apparatus 100.
  • the encoding apparatus 100 may determine which of 2Nx2N size PU and NxN size PU to encode based on a comparison of the rate-distortion cost of the 2Nx2N size PU and the rate-distortion costs of the NxN size PUs.
  • FIG. 5 is a diagram illustrating a form of a transform unit (TU) that may be included in a coding unit (CU).
  • TU transform unit
  • CU coding unit
  • a transform unit may be a basic unit used for a process of transform, quantization, inverse transform, inverse quantization, entropy encoding, and entropy decoding in a CU.
  • the TU may have a square shape or a rectangular shape.
  • a CU that is no longer split into CUs may be split into one or more TUs.
  • the partition structure of the TU may be a quad-tree structure.
  • one CU 510 may be divided one or more times according to the quad-tree structure. Through division, one CU 510 may be configured with TUs of various sizes.
  • FIG. 6 is a diagram for explaining an embodiment of an intra prediction process.
  • Arrows outward from the center of the graph of FIG. 6 may indicate prediction directions of intra prediction modes.
  • the number displayed near the arrow may represent an example of a mode value allocated to the intra prediction mode or the prediction direction of the intra prediction mode.
  • Intra encoding and / or decoding may be performed using reference samples of units around the target unit. Peripheral units may be peripheral restored units. For example, intra encoding and / or decoding may be performed using a value or encoding parameter of a reference sample included in a neighboring reconstructed unit.
  • the encoding apparatus 100 and / or the decoding apparatus 200 may generate the prediction block by performing intra prediction on the target unit based on the information of the sample in the current picture.
  • the encoding apparatus 100 and / or the decoding apparatus 200 may generate a prediction block for a target unit by performing intra prediction based on information of a sample in a current picture.
  • the encoding apparatus 100 and / or the decoding apparatus 200 may perform directional prediction and / or non-directional prediction based on at least one reconstructed reference sample.
  • the prediction block may mean a block generated as a result of performing intra prediction.
  • the prediction block may correspond to at least one of a CU, a PU, and a TU.
  • the unit of a prediction block may be the size of at least one of a CU, a PU, and a TU.
  • the prediction block may have a square shape, having a size of 2N ⁇ 2N or a size of N ⁇ N.
  • the size of NxN may include 4x4, 8x8, 16x16, 32x32 and 64x64.
  • the prediction block may be a block in the form of a square having a size of 2x2, 4x4, 16x16, 32x32, or 64x64, or a rectangular block having a size of 2x8, 4x8, 2x16, 4x16, and 8x16.
  • Intra prediction may be performed according to an intra prediction mode for the target unit.
  • the number of intra prediction modes that the target unit may have may be a predefined fixed value or may be a value determined differently according to the attributes of the prediction block.
  • the attributes of the prediction block may include the size of the prediction block and the type of the prediction block.
  • the number of intra prediction modes may be fixed to 35 regardless of the size of the prediction unit.
  • the number of intra prediction modes may be 3, 5, 9, 17, 34, 35, 36, or the like.
  • the intra prediction mode may include two non-directional modes and 33 directional modes as shown in FIG. 6.
  • Two non-directional modes may include a DC mode and a planar mode.
  • prediction may be performed in the vertical direction based on the pixel value of the reference sample.
  • prediction may be performed in the horizontal direction based on the pixel value of the reference sample.
  • prediction may be performed in the vertical direction based on the pixel value of the reference sample.
  • the encoding apparatus 100 and the decoding apparatus 200 may perform intra prediction on the target unit using the reference sample according to the angle corresponding to the directional mode.
  • the intra prediction mode located on the right side of the vertical mode may be referred to as a vertical right mode.
  • the intra prediction mode located at the bottom of the horizontal mode may be referred to as a horizontal-below mode.
  • intra prediction modes in which the mode value is one of 27, 28, 29, 30, 31, 32, 33, and 34 may be vertical right modes 613.
  • Intra prediction modes with a mode value of one of 2, 3, 4, 5, 6, 7, 8, and 9 may be horizontal bottom modes 616.
  • the non-directional mode may include a DC mode and a planar mode.
  • the mode value of the DC mode may be 1.
  • the mode value of the planner mode may be zero.
  • the directional mode may include an angular mode.
  • a mode other than the DC mode and the planner mode may be a directional mode.
  • a prediction block may be generated based on an average of pixel values of the plurality of reference samples. For example, the value of a pixel of the prediction block may be determined based on an average of pixel values of the plurality of reference samples.
  • the number of intra prediction modes described above and the mode value of each intra prediction modes may be exemplary only.
  • the number of intra prediction modes described above and the mode value of each intra prediction modes may be defined differently according to an embodiment, implementation, and / or need.
  • the number of intra prediction modes may differ depending on the type of color component.
  • the number of prediction modes may vary depending on whether the color component is a luma signal or a chroma signal.
  • FIG. 7 is a diagram for describing a position of a reference sample used in an intra prediction process.
  • a reconstructed reference pixel used for intra prediction of a current block includes, for example, lower-left reference samples 731 and left reference samples 733. , Upper-left corner reference sample 735, upper-reference samples 737, upper-right reference samples 739, and the like.
  • the left reference samples 733 may refer to a reconstructed reference pixel adjacent to the left side of the target unit.
  • the top reference samples 737 may refer to a reconstructed reference pixel adjacent to the top of the target unit.
  • the upper left corner reference pixel 735 may mean a restored reference pixel located at the upper left corner of the target unit.
  • the lower left reference samples 731 may refer to a reference sample located at the bottom of the left sample line among samples positioned on the same line as the left sample line composed of the left reference samples 733.
  • the upper right reference samples 739 may refer to reference samples positioned to the right of the upper pixel line among samples positioned on the same line as the upper sample line formed of the upper reference samples 737.
  • the lower left reference samples 731, the left reference samples 733, the upper reference samples 737, and the upper right reference samples 739 may each be N pieces.
  • the prediction block may be generated through intra prediction on the target unit. Generation of the predictive block may include determining a value of pixels of the predictive block. The size of the target unit and the prediction block may be the same.
  • the reference sample used for intra prediction of the target unit may vary according to the intra prediction mode of the target unit.
  • the direction of the intra prediction mode may indicate a dependency relationship between the reference samples and the pixels of the prediction block.
  • the value of the specified reference sample can be used as the value of the specified one or more pixels of the prediction block.
  • the specified one or more specified pixels of the specified reference sample and prediction block may be samples and pixels designated by a straight line in the direction of the intra prediction mode.
  • the value of the specified reference sample may be copied to the value of the pixel located in the reverse direction of the intra prediction mode.
  • the pixel value of the prediction block may be a value of a reference sample located in the direction of the intra prediction mode based on the position of the pixel.
  • the intra prediction mode of the target unit is a vertical mode having a mode value of 26
  • the upper reference samples 737 may be used for intra prediction.
  • the value of the pixel of the prediction block may be the value of the reference pixel located vertically above the position of the pixel.
  • the top reference samples 737 adjacent to the top of the target unit can be used for intra prediction.
  • the values of the pixels of one row of the prediction block may be the same as the values of the top reference samples 737.
  • the left reference samples 733 may be used for intra prediction.
  • the pixel value of the prediction block may be a value of a reference pixel located horizontally on the left side with respect to the pixel.
  • left reference samples 733 adjacent to the target unit to the left may be used for intra prediction.
  • the values of the pixels of one column of the prediction block may be the same as the values of the left reference samples 733.
  • the mode value of the intra prediction mode of the current block is 18, at least some of the left reference samples 733, the upper left corner reference sample 735, and the at least some intra prediction of the top reference samples 737 are included. Can be used.
  • the mode value of the intra prediction mode is 18, the value of the pixel of the prediction block may be the value of the reference pixel located at the top left diagonally with respect to the pixel.
  • At least some of the upper right reference pixels 439 may be used for intra prediction.
  • At least some of the lower left reference pixels 431 may be used for intra prediction.
  • the upper left corner reference samples 735 may be used for intra prediction.
  • the reference sample used to determine the pixel value of one pixel of the prediction block may be one, or may be two or more.
  • the pixel value of the pixel of the prediction block may be determined according to the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode. If the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode is an integer position, the value of one reference sample indicated by the integer position may be used to determine the pixel value of the pixel of the prediction block.
  • an interpolated reference sample may be generated based on the two reference samples closest to the position of the reference sample. have.
  • the value of the interpolated reference sample can be used to determine the pixel value of the pixel of the prediction block. In other words, when the position of the reference sample indicated by the position of the pixel of the prediction block and the direction of the intra prediction mode indicates between the two reference samples, an interpolated value is generated based on the values of the two samples. Can be.
  • the prediction block generated by the prediction may not be the same as the original target unit.
  • a prediction error that is a difference between the target unit and the prediction block may exist, and the prediction error may exist between the pixel of the target unit and the pixel of the prediction block.
  • the greater the distance between the pixel and the reference sample of the prediction block the larger prediction error may occur.
  • Discontinuity may occur between the prediction block and the neighboring block generated by such a prediction error.
  • Filtering on the prediction block may be used to reduce the prediction error.
  • the filtering may be to adaptively apply a filter to a region that is considered to have a large prediction error in the prediction block.
  • an area considered to have a large prediction error may be a boundary of a prediction block.
  • an area considered to have a large prediction error among the prediction blocks may be different, and characteristics of the filter may be different.
  • FIG. 8 is a diagram for explaining an embodiment of an inter prediction process.
  • the rectangle illustrated in FIG. 8 may represent an image (or picture).
  • arrows in FIG. 8 may indicate prediction directions. That is, the image may be encoded and / or decoded according to the prediction direction.
  • Each picture may be classified into an I picture (Intra Picture), a P picture (Uni-prediction Picture), and a B picture (Bi-prediction Picture) according to an encoding type.
  • Each picture may be encoded according to an encoding type of each picture.
  • the image to be encoded When the image to be encoded is an I picture, the image may be encoded with respect to the image itself without inter prediction.
  • the image to be encoded When the image to be encoded is a P picture, the image may be encoded through inter prediction using a reference picture only in the forward direction.
  • the image to be encoded When the image to be encoded is a B picture, it may be encoded through inter prediction using reference pictures in both the forward and reverse directions, and may be encoded through inter prediction using the reference picture in one of the forward and reverse directions.
  • the P picture and the B picture encoded and / or decoded using the reference picture may be regarded as an image using inter prediction.
  • the encoding apparatus 100 and the decoding apparatus 200 may perform prediction and / or motion compensation on the encoding target unit and the decoding target unit.
  • the encoding apparatus 100 or the decoding apparatus 200 may perform prediction and / or motion compensation by using the reconstructed motion information of the neighboring unit as the motion information of the encoding target unit or the decoding target unit.
  • the encoding target unit or the decoding target unit may mean a prediction unit and / or a prediction unit partition.
  • Inter prediction may be performed using a reference picture and motion information.
  • inter prediction may use the skip mode described above.
  • the reference picture may be at least one of a previous picture of the current picture or a subsequent picture of the current picture.
  • the inter prediction may perform prediction on a block of the current picture based on the reference picture.
  • the reference picture may mean an image used for prediction of a block.
  • an area in the reference picture may be specified by using a reference picture index refIdx indicating a reference picture, a motion vector to be described later, and the like.
  • the inter prediction may select a reference picture and a reference block corresponding to the current block within the reference picture, and generate the prediction block for the current block using the selected reference block.
  • the current block may be a block that is a target of current encoding or decoding among blocks of the current picture.
  • the motion information may be derived during inter prediction by each of the encoding apparatus 100 and the decoding apparatus 200.
  • the derived motion information may be used to perform inter prediction.
  • the encoding apparatus 100 and the decoding apparatus 200 may use encoding information and / or decoding efficiency by using motion information of a restored neighboring block and / or motion information of a collocated block (col block). Can improve.
  • the call block may be a block corresponding to the current block in a collocated picture (col picture).
  • the reconstructed neighboring block may be a block in the current picture and may be a block already reconstructed through encoding and / or decoding.
  • the reconstructed block may be a neighboring block adjacent to the current block and / or a block located at an outer corner of the current block.
  • the block located at the outer corner of the current block may be a block vertically adjacent to a neighboring block horizontally adjacent to the current block or a block horizontally adjacent to a neighboring block vertically adjacent to the current block.
  • a restored peripheral unit may be a unit located to the left of the target unit, a unit located at the top of the target unit, a unit located at the lower left corner of the target unit, a unit located at the upper right corner of the target unit, or an upper left of the target unit. It may be a unit located at the corner.
  • Each of the encoding apparatus 100 and the decoding apparatus 200 may determine a block existing at a position corresponding to a current block spatially in the call picture, and may determine a predetermined relative position based on the determined block.
  • the predefined relative position may be a position inside and / or outside of a block that exists spatially at a position corresponding to the current block.
  • each of the encoding apparatus 100 and the decoding apparatus 200 may derive a call block based on the determined predetermined relative position.
  • the call picture may be one picture among at least one reference picture included in the reference picture list.
  • the block in the reference picture may exist at a position spatially corresponding to the position of the current block in the reconstructed reference picture.
  • the position of the current block in the current picture and the position of the block in the reference picture may correspond to each other.
  • motion information of a block included in the reference picture may be referred to as temporal motion information.
  • the method of deriving the motion information may vary according to the prediction mode of the current block.
  • a prediction mode applied for inter prediction there may be an advanced motion vector predictor (AMVP) and merge.
  • AMVP advanced motion vector predictor
  • each of the encoding apparatus 100 and the decoding apparatus 200 may predict the motion vector candidate using the motion vector of the reconstructed neighboring block and / or the motion vector of the call block. You can create a list. The motion vector of the reconstructed neighboring block and / or the motion vector of the collocated block may be used as a prediction motion vector candidate.
  • the bitstream generated by the encoding apparatus 100 may include a predicted motion vector index.
  • the prediction motion vector index may indicate an optimal prediction motion vector selected from the prediction motion vector candidates included in the prediction motion vector candidate list.
  • the predicted motion vector index may be transmitted from the encoding apparatus 100 to the decoding apparatus 200 through the bitstream.
  • the decoding apparatus 200 may select the prediction motion vector of the current block from the prediction motion vector candidates included in the prediction motion vector candidate list by using the prediction motion vector index.
  • the encoding apparatus 100 may calculate a motion vector difference (MVD) between the motion vector and the predictive motion vector of the current block, and may encode the MVD.
  • the bitstream may include encoded MVD.
  • the MVD may be transmitted from the encoding apparatus 100 to the decoding apparatus 200 through a bitstream.
  • the decoding apparatus 200 may decode the received MVD.
  • the decoding apparatus 200 may derive the motion vector of the current block through the sum of the decoded MVD and the predictive motion vector.
  • the bitstream may include a reference picture index and the like indicating the reference picture.
  • the reference picture index may be transmitted from the encoding apparatus 100 to the decoding apparatus 200 through a bitstream.
  • the decoding apparatus 200 may predict the motion vector of the current block by using the motion information of the neighboring block, and may derive the motion vector of the current block by using the predicted motion vector and the motion vector difference.
  • the decoding apparatus 200 may generate a prediction block for the current block based on the derived motion vector and the reference picture index information.
  • the encoding apparatus 100 may not separately encode the motion information for the target unit. If the motion information of the target unit is not encoded, the amount of bits transmitted to the decoding apparatus 200 may be reduced, and encoding efficiency may be improved.
  • the inter prediction mode in which the motion information of the target unit is not encoded may include a skip mode and / or a merge mode. In this case, the encoding apparatus 100 and the decoding apparatus 200 may use an identifier and / or an index indicating which unit of the reconstructed neighboring units is used as the movement information of the target unit.
  • Merge may mean merging of motions for a plurality of blocks. Merge may mean applying motion information of one block to other blocks.
  • each of the encoding apparatus 100 and the decoding apparatus 200 may generate a merge candidate list using the motion information of the reconstructed neighboring block and / or the motion information of the call block.
  • the motion information may include at least one of 1) a motion vector, 2) an index for a reference image, and 3) a prediction direction.
  • the prediction direction may be unidirectional or bidirectional.
  • the merge may be applied in a CU unit or a PU unit.
  • the encoding apparatus 100 may transmit predefined information to the decoding apparatus 200 through a bitstream.
  • the bitstream may include predefined information.
  • the predefined information may include 1) information indicating whether to merge for each block partition, and 2) information about which one of neighboring blocks adjacent to the current block to merge with.
  • the neighboring blocks of the current block may include a left neighboring block of the current block, a top neighboring block of the current block, a temporal neighboring block of the current block, and the like.
  • the merge candidate list may represent a list in which motion information is stored.
  • the merge candidate list may be generated before the merge is performed.
  • the motion information stored in the merge candidate list may be 1) motion information of a neighboring block adjacent to the current block or 2) collocated block motion information corresponding to the current block in the reference image.
  • the motion information stored in the merge candidate list may be new motion information generated by a combination of motion information already present in the merge candidate list.
  • the skip mode may be a mode in which information of neighboring blocks is applied to the current block as it is.
  • the skip mode may be one of modes used for inter prediction.
  • the encoding apparatus 100 may transmit only information on which block motion information to use as the motion information of the current block to the decoding apparatus 200 through the bitstream.
  • the encoding apparatus 100 may not transmit other information to the decoding apparatus 200.
  • the other information may be syntax information.
  • the syntax information may include motion vector difference information.
  • FIG 9 illustrates a prediction error when the original image is predicted in the vertical direction according to an example.
  • one PU and a prediction mode may be selected after the calculation for all possible PUs and prediction modes is performed.
  • the prediction on the original image is performed according to the selected PU and the prediction mode, a tendency for distortion of the prediction error remains in the direction of the prediction mode.
  • the second second intra prediction may be performed after performing the first first intra prediction using the selected prediction mode of one of the plurality of prediction modes for the PU.
  • the secondary intra prediction may be intra prediction defined in the region of pixels specified in the direction of the prediction mode of the first intra prediction.
  • the prediction mode of the secondary intra prediction may be the same as the prediction mode of the first intra prediction.
  • the first intra prediction is applied to the whole of the PU, but the secondary intra prediction may be applied to only a part of the PU.
  • the encoding apparatus may determine a part of the PU to which secondary intra prediction is to be applied. For example, the encoding apparatus may calculate a rate-distortion cost when secondary intra prediction is applied to the candidate region for each candidate region of the plurality of candidate regions. The encoding apparatus may determine the candidate region of the smallest rate-distortion cost as part of the PU to which secondary intra prediction is to be applied.
  • the PU may include a plurality of pixels.
  • the plurality of candidate regions may be portions determined by a specified manner of the plurality of pixels of the PU.
  • the plurality of candidate regions may be determined by the prediction direction of the first intra prediction.
  • the prediction error for the PU can be further reduced compared to the case where only the first intra prediction is applied.
  • the following embodiments can present a method and apparatus for improving the performance of intra prediction and reducing the prediction error by efficiently using the aforementioned tendency.
  • FIG. 10 is a structural diagram of an encoding apparatus according to an embodiment.
  • the encoding apparatus 1000 may be a general-purpose computer system that performs encoding.
  • the encoding apparatus 1000 may include at least one processor 1010, a memory 1030, a user interface (UI) input device 1050, which communicates with each other via a bus 1090, and the like.
  • UI output device 1060 and storage 1040 may further include a communication unit 1020 connected to the network 1099.
  • the processor 1010 may be a semiconductor device that executes processing instructions stored in a central processing unit (CPU), a memory 1030, or a storage 1040.
  • Memory 1030 and storage 1040 may be various types of volatile or nonvolatile storage media.
  • the memory may include at least one of a ROM 1031 and a RAM 1032.
  • the processor 1010 is an inter predictor 110, an intra predictor 120, a switch 115, a subtractor 125, a transformer 130, a quantizer 140, and an entropy decoder of the encoding apparatus 100.
  • 150 an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.
  • the recording medium may store at least one module for the operation of the encoding apparatus 1000.
  • the memory 1030 may store at least one module and may be configured to be executed by the at least one processor 1010.
  • the inter prediction unit 110, the intra prediction unit 120, the switch 115, the subtractor 125, the transform unit 130, the quantization unit 140, and the entropy decoding of the encoding apparatus 100 may be used.
  • At least some of the unit 150, the inverse quantizer 160, the inverse transform unit 170, the adder 175, the filter unit 180, and the reference picture buffer 190 may be program modules, and may be an external device or system. Communicate with The program modules may be included in the encoding apparatus 1000 in the form of an operating system, an application module, and other program modules.
  • the program modules may be physically stored on various known storage devices.
  • at least some of these program modules may be stored in a remote storage device that can communicate with the encoding apparatus 1000.
  • Program modules perform routines or subroutines, programs, objects, components, and data to perform functions or operations, or to implement abstract data types, according to one embodiment. Data structures and the like, but is not limited thereto.
  • the program modules may be composed of instructions or code performed by the processor 1010.
  • Functions related to communication of data or information of the encoding apparatus 1000 may be performed through the communication unit 1020.
  • FIG. 11 is a flowchart of an encoding method according to an embodiment.
  • the encoding method of the embodiment may be performed by the encoding apparatus 100 or the encoding apparatus 1000.
  • the prediction unit may generate a residual signal of the current block based on the current block, the first prediction, and the second prediction.
  • the predictor may include an inter predictor 110, an intra predictor 120, and a subtractor 125.
  • the residual signal may represent a residual block.
  • the residual block may be the difference between the current block and the prediction block.
  • the residual block may be generated based on the difference between the current block and the prediction block.
  • the prediction block may be the sum of the first prediction block and the second prediction block.
  • the residual block may be obtained by subtracting the sum of the first prediction block and the second prediction block from the current block.
  • the second prediction may be a prediction for a prediction error of the first prediction.
  • the first prediction block may be a block generated by the first prediction.
  • the second prediction block may be a block generated by the second prediction. If the second prediction is not used, the second prediction block may be a null block.
  • the null block may be a block in which the values of all pixels of the block are "0".
  • the prediction unit may generate a residual block of the current block by performing inter prediction or intra prediction.
  • the prediction unit may generate a second prediction block based on the current block and / or the first prediction block.
  • the prediction unit may generate a residual signal of the current block by performing a first prediction on the current block and performing a second prediction on the first prediction error that is a result of the first prediction.
  • the first prediction error may be a difference between the current block and the first prediction signal.
  • the residual signal may be a difference between the first prediction error and the second prediction signal.
  • the first prediction and the second prediction may be different kinds of predictions.
  • the first prediction and the second prediction may be the same kind of predictions.
  • each of the first prediction and the second prediction may be intra prediction. If the first prediction is intra prediction, the second prediction may also be set to intra prediction.
  • the prediction direction of the first prediction and the prediction direction of the second prediction may be the same.
  • the prediction direction of the second prediction may be set to be the same as the prediction direction of the first prediction.
  • each of the first prediction and the second prediction may be inter prediction.
  • a block that is the target of the first prediction and a block that is the target of the second prediction may be different from each other.
  • the "block to be predicted” may mean to which block the "prediction” generates a prediction block.
  • the type of the block targeted for the first prediction and the type of the block targeted for the second prediction may be different from each other.
  • the type of block may be an original block, a luma block, a chroma block, a depth block, a residual block, or the like.
  • the block that is the target of the first prediction may be the current block or the original block.
  • the first prediction error generated by the first prediction may represent the first prediction error block.
  • the first prediction error may be a first residual signal.
  • the first residual signal may represent a first residual block.
  • the block that is the target of the second prediction may be a first prediction error block or a first residual block.
  • the first residual signal may be generated by the first prediction
  • the second prediction error may be generated by the second prediction.
  • the second prediction error may be a second residual signal.
  • the second residual signal may represent a second residual block.
  • Reference blocks may be used for prediction.
  • the first reference block of the first prediction and the second reference block of the second prediction may be different from each other.
  • the reference blocks may differ from each other in terms of type and / or location.
  • the position of the first reference block of the first prediction and the position of the second reference block of the second prediction may be different from each other.
  • the position of the first reference block may be a position relative to the block that is the target of the first prediction.
  • the position of the second reference block may be a position relative to the block that is the target of the second prediction.
  • the first reference block of the first prediction may be plural.
  • the second reference block of the second prediction may be plural. At least some of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction may be different from each other.
  • the position of at least one of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction is the positions of the plurality of first reference blocks and the positions of the plurality of second reference blocks. Can only be included in one of the
  • the type of the first reference block of the first prediction and the type of the second reference block of the second prediction may be different from each other.
  • the type of block may be a reconstructed block, a reconstructed luma block, a reconstructed chroma block, a reconstructed depth block, a reconstructed first residual block, a reconstructed second residual block, or the like.
  • the first reference block of the first prediction may be a reconstructed block.
  • the second reference block of the second prediction may be a reconstructed first residual block.
  • the first reference sample of the first prediction may be a pixel of the reconstructed block.
  • the second reference sample of the second prediction may be a pixel of the reconstructed first residual block.
  • the first reference block of the first prediction may be a reconstructed neighboring block neighboring the current block.
  • the second reference block of the second prediction may be a reconstructed first residual block neighboring the current block.
  • the reconstructed neighbor residual block neighboring the current block may be obtained by adding the reconstructed residual block of the reconstructed neighboring block to the second prediction block of the reconstructed neighboring block.
  • the reconstructed neighbor residual block neighboring the current block may be a difference between the reconstructed neighboring block and the first prediction block of the reconstructed neighboring block.
  • a reconstructed block around the current block may be used as a reference block for prediction of the current block.
  • the target of the second prediction is the first residual block
  • a reconstructed first residual block around the current block or the first residual block may be used as the second reference block for prediction on the first residual block.
  • the region of the first prediction and the region of the second prediction may be different from each other.
  • the "prediction area” may indicate an area in which a prediction value is generated among blocks that are to be predicted.
  • the “area of prediction” may indicate an area to which a prediction value generated by prediction is allocated among prediction blocks corresponding to a block that is a prediction target.
  • the first prediction may be a prediction for an area of the current block.
  • the second prediction may be a prediction for a portion of the above area. At least some of the area of the current block may be excluded from the second prediction.
  • the block that is the target of the first prediction may be a block within a rectangular area.
  • the second prediction may be made for some of the above rectangular regions. At least some of the areas of the quadrangle may not be the target of the second prediction.
  • the area of the first prediction may be the entire block that is the target of the first prediction.
  • the area of the second prediction may be part of a block that is the target of the second prediction.
  • the second prediction may be excluded for at least a portion of the block that is the target of the second prediction.
  • the first prediction may be performed on the entire block that is the target of the first prediction.
  • the second prediction may be performed on the selected portion of the block that is the target of the second prediction.
  • prediction values determined by the first prediction may be assigned only to pixels in the region of the first prediction among blocks that are the targets of the first prediction.
  • the prediction value according to the first prediction may not be allocated to pixels outside the region of the first prediction among the blocks that are the targets of the first prediction.
  • a predefined value may be assigned to pixels outside the region of the first prediction among blocks that are the target of the first prediction. The predefined value may be "0".
  • prediction values determined by the second prediction may be assigned only to pixels in the region of the second prediction among blocks that are the target of the second prediction. Pixels outside the region of the second prediction among the blocks that are the target of the second prediction may not be assigned a prediction value by the second prediction.
  • a predefined value may be assigned to pixels outside the region of the second prediction among blocks that are the target of the second prediction. For example, the predefined value may be "0".
  • each of the NxN pixels may be assigned a prediction value determined by the first prediction.
  • the prediction value determined by the first prediction may be assigned to all pixels of the block that are the targets of the first prediction.
  • the size of the block that is the target of the second prediction is N ⁇ N
  • one or more pixels among the N ⁇ N pixels may not be assigned a prediction value determined by the first prediction.
  • the size of the block that is the target of the second prediction is N ⁇ N
  • one or more pixels among the N ⁇ N pixels may be assigned a predefined value.
  • the predefined value may be "0".
  • the region of the first prediction may be determined based on the type of the first prediction. For example, the region of the first prediction may be determined based on whether the first prediction is inter prediction. Alternatively, the region of the first prediction may be determined based on whether the first prediction is intra prediction. Alternatively, the region of the first prediction may be determined based on the prediction direction of the first prediction.
  • the region of the second prediction may be determined based on the type of the second prediction. For example, the region of the second prediction may be determined based on whether the second prediction is inter prediction. Alternatively, the region of the second prediction may be determined based on whether the second prediction is intra prediction. Alternatively, the region of the second prediction may be determined based on the prediction direction of the second prediction.
  • the second prediction may be performed using a second reference sample within an optional range.
  • the region of the first reference sample used for the first prediction and the region of the second reference sample used for the second prediction may be different from each other.
  • the region of the first prediction and the region of the second prediction may be different from each other.
  • the area of the first reference sample may be an area of reference samples required for generating prediction values for the area of the first prediction through the first prediction.
  • the area of the second reference sample may be an area of reference samples required for generating prediction values for the area of the second prediction through the second prediction.
  • the region of the first prediction may be the entirety of the block that is the target of the first prediction.
  • the area of the second prediction may be part of a block that is the target of the second prediction.
  • the region of the second reference sample may be part of the region of the first reference sample.
  • the encoder may perform encoding on the residual signal.
  • the encoder may generate information about the encoded residual signal by performing encoding on the residual signal.
  • the encoder may include a transformer 130, a quantizer 140, and an entropy encoder 150.
  • Step 1120 may include steps 1121, 1122, and 1123.
  • the transformer 130 may generate transform coefficients of the residual signal.
  • the quantization unit 140 may generate quantized transform coefficients by performing quantization on the transform coefficients.
  • the entropy encoder 150 may generate information on the encoded residual signal by performing entropy encoding on the quantized transform coefficients.
  • the entropy encoder 150 may generate a bitstream including information about the encoded residual signal.
  • the bitstream may include information about the encoded residual signal, and may include information related to prediction.
  • the entropy encoder 150 may include information related to prediction in the bitstream. Related information of the prediction may be entropy coded.
  • the information related to the prediction may include prediction scheme information indicating how the current block is encoded.
  • the prediction scheme information may indicate whether the current block is encoded by intra prediction or intra prediction.
  • the prediction scheme information may indicate whether the current block is encoded by intra prediction.
  • the prediction scheme information may indicate whether the current block is encoded by inter prediction.
  • the information related to the prediction may include intra prediction mode information indicating a prediction mode of the intra prediction.
  • the information related to the prediction may include second prediction usage information indicating whether the second prediction is used in encoding the current block.
  • the information related to the prediction may include first prediction region information indicating the region of the first prediction and / or second prediction region information indicating the second prediction region of the second prediction.
  • Information related to the prediction may include information used for the prediction described in the embodiments.
  • the entropy encoder 150 may include the information related to the prediction in the bitstream in the order described in the embodiment or the generation order according to the embodiment.
  • the communication unit 1020 may transmit the bitstream to the decoding apparatus 200 or the decoding apparatus 1700.
  • the reconstructed residual signal generator may generate a reconstructed residual signal based on the information about the residual signal.
  • the reconstructed residual signal generator may include an inverse quantizer 160 and an inverse transformer 170.
  • Step 1150 may include steps 1151 and 1152.
  • the inverse quantization unit 160 may generate the reconstructed transform coefficients by performing inverse quantization on the quantized transform coefficients.
  • the transformer 130 may generate the reconstructed residual signal by performing transform on the reconstructed transform coefficients.
  • the reconstructed block generator may generate a reconstructed block based on the reconstructed residual signal, the first prediction, and the second prediction.
  • the restored block generator may include an adder 175.
  • the sum of the reconstructed residual signal and the prediction signal may represent a reconstructed block.
  • the reconstructed block may be generated based on the sum of the reconstructed residual signal and the prediction signal.
  • the reconstructed block may be the sum of the reconstructed residual block and the prediction block.
  • the prediction block may be the sum of the first prediction block and the second prediction block.
  • the reconstructed block may be generated based on the sum of the reconstructed residual block and the prediction block.
  • the reconstructed block may be a block generated by the reconstructed residual block, the second prediction block, and the first prediction block.
  • the reconstructed block generator may generate the reconstructed first residual signal by adding the reconstructed residual signal and the second prediction signal.
  • the reconstructed block generator may generate the reconstructed block by adding the reconstructed first residual signal and the first prediction signal.
  • the reconstructed block generator may generate the reconstructed first residual block by adding the reconstructed residual block and the second prediction block.
  • the reconstructed block generator may generate the reconstructed block by adding the reconstructed first residual block and the first prediction block.
  • the reconstructed block and the reconstructed first residual signal may be used as reference blocks for encoding other blocks.
  • FIG 12 illustrates first prediction and second prediction using intra prediction, according to an embodiment.
  • the first prediction and the second prediction may be intra prediction.
  • 12 illustrates an example of encoding of a current block when the first prediction and the second prediction are intra prediction.
  • the current block may be a PU.
  • a PU having a size of 2N ⁇ 2N is illustrated as a current block.
  • the prediction unit may determine which prediction mode from among a plurality of prediction modes to use the first prediction.
  • the prediction unit may perform the first prediction by using each of the plurality of prediction modes.
  • the prediction directions of the plurality of prediction modes may be different.
  • reconstructed blocks around the current block can be used as reference blocks. Also, pixels of reconstructed blocks around the current block can be used as reference samples.
  • the prediction unit may generate first prediction blocks of the plurality of prediction modes through the first prediction.
  • the prediction unit may generate first prediction errors of the plurality of prediction modes through the first prediction. For one prediction mode, the first prediction block and the first prediction error can be calculated.
  • the first prediction error may indicate a difference between the current block and the first prediction block.
  • the first prediction error may represent the first residual block.
  • the prediction unit may select a region to which the second prediction is to be applied in the first residual block by referring to the first prediction error.
  • the selected area may be part of the first residual block.
  • the prediction unit may determine which part of the first residual block to apply the second prediction to.
  • the second prediction may be applied to the portion of the first residual block that is the selected region.
  • Various methods can be used to select the region to which the second prediction is to be applied.
  • the prediction region of the second prediction may be specified by the range of reference samples used for the second prediction.
  • reconstructed residual blocks neighboring the current block may be used as reference blocks. Also, pixels of reconstructed residual blocks neighboring the current block can be used as reference samples.
  • the prediction direction of the first prediction and the prediction direction of the second prediction may be the same.
  • the intra prediction mode of the first prediction and the intra prediction mode of the second prediction may be the same.
  • an intra prediction mode having a mode value of 30 is illustrated as an example.
  • the range of reference samples of the first prediction and the reference samples of the second prediction may be the same.
  • the second prediction may be applied to a portion of the first residual block.
  • the range of reference samples of the second prediction may be part of the range of reference samples of the first prediction.
  • the range of reference samples of the second prediction is shown as a range between ⁇ and ⁇ + ⁇ .
  • may indicate the first reference sample to be used for the second prediction among the reference samples for the prediction direction of the second prediction.
  • may indicate the starting position of the second prediction.
  • ⁇ + ⁇ may indicate the last reference sample to be used for the second prediction among the reference samples for the prediction direction of the second prediction.
  • ⁇ + ⁇ may indicate the last position of the second prediction.
  • may represent the number of reference samples to be used for the second prediction.
  • may represent the range of the second prediction or the length of the second prediction.
  • an area of the second prediction may be specified according to the determined range of reference samples and the prediction direction.
  • regions specified by dotted lines in the residual block are shown.
  • the region of the second prediction may be a region generated as the reference samples in the range between ⁇ and ⁇ + ⁇ advance in the prediction direction.
  • the prediction unit may select a range of reference samples to be used for the second prediction among the reference samples for the prediction direction.
  • the prediction unit may perform the second prediction by using the reference samples in the selected range among the entire reference samples for the prediction direction.
  • the entire reference samples may correspond to the reference samples used in the first prediction.
  • the value of the reference sample outside of the selected range may be considered null or "0".
  • the value of the previous reference sample of ⁇ may be considered zero, and the value of the subsequent reference sample of ⁇ + ⁇ may be considered zero.
  • the prediction unit may generate second prediction blocks for the plurality of candidate regions through the second prediction.
  • the plurality of candidate regions may be different from each other.
  • the plurality of candidate regions may be different portions of the first residual block.
  • the region of the first residual block can be specified as reference samples used for the second prediction.
  • a part of the first residual block or the region of the second prediction for the first residual block may be represented by an ordered pair ( ⁇ , ⁇ ).
  • Order pairs of ( ⁇ , ⁇ ) corresponding to the plurality of candidate regions may be different from each other.
  • the ordered pairs ⁇ and ⁇ may indicate a range of reference samples to be used for the second prediction.
  • the plurality of candidate regions may be all different regions that may be selected by the manner specified for the first residual block.
  • the specified scheme may be a prediction direction.
  • the region of the first residual block can be specified as reference samples used for the second prediction.
  • may be greater than or equal to 0 and less than or equal to n ⁇ 1.
  • may be 0 or more and n-1- ⁇ or less.
  • the number of ordered pairs of ( ⁇ , ⁇ ) may be (n + 1) n / 2.
  • the number of the plurality of candidate regions may be (n + 1) n / 2.
  • the plurality of candidate regions may respectively correspond to ranges of reference samples to be used for the second prediction.
  • ⁇ and ⁇ may each be an index of a list of reference samples in a specified prediction direction.
  • the order of the reference samples may be determined.
  • the order of the reference sample may be given in the order of 737 and the above right-above reference samples 739.
  • the lower left reference samples 731 the lower reference sample may have a faster order than the upper reference sample.
  • the left reference samples 733 the bottom reference sample may have a faster order than the top reference sample.
  • the top reference samples 737 the reference sample located on the left side may have a faster order than the reference sample located on the right side.
  • the upper right reference samples 739 the left reference sample may have a faster order than the right reference sample.
  • the order of the reference samples may be given for the reference samples determined according to the prediction direction.
  • the above-described lower-left reference samples 731, left-reference samples 733, upper-left corner reference sample 735, and upper reference samples Only some of the reference samples 737 and upper-right reference samples 739 determined according to the prediction direction of the second prediction may be used for the prediction of the entirety of the first residual block. Order may be given for some of the determined reference samples.
  • the reference samples that may be used for the entirety of the first residual block may be upper reference samples 737.
  • the size of the current block is 2N ⁇ 2N
  • the order of the leftmost reference sample among the top reference samples 737 may be 0, and the order of the rightmost reference sample among the top reference samples 737 may be 2N ⁇ 1. Can be.
  • reference samples that may be used for the entirety of the first residual block may be left reference samples 733.
  • the size of the current block is 2N ⁇ 2N
  • the order of the lowest reference sample of the left reference samples 737 may be 0, and the order of the highest reference sample of the left reference samples 737 may be 2N-1.
  • the prediction unit may generate second prediction errors for the plurality of candidate regions through the second prediction. For one region, the second prediction block and the second prediction error can be calculated.
  • the second prediction error may indicate a residual between the first residual block and the second prediction block.
  • the second prediction error may represent the second residual block.
  • the prediction unit may generate a plurality of first prediction errors for the plurality of prediction modes. Further, for each first prediction error of the plurality of first prediction errors, the prediction unit may generate the first prediction error through the second prediction. Second prediction errors of the plurality of candidate regions of the first residual block indicated by the first prediction error may be generated.
  • the prediction unit may generate second prediction errors for all candidate regions of the plurality of prediction modes.
  • the prediction unit may select a second prediction error having a minimum rate-distortion cost among the generated second prediction errors.
  • the candidate region corresponding to the selected second prediction error among the plurality of candidate regions may be a part to which the second prediction of the current block is applied.
  • a prediction mode corresponding to the selected second prediction error among the plurality of prediction modes may be a prediction mode to be used in the first prediction.
  • the prediction unit may determine the prediction mode of the first prediction and the region of the second prediction to be used for encoding the current block, depending on whether the second prediction error for which region of the prediction mode has a minimum rate-distortion cost. have.
  • the prediction unit may select a prediction mode having a minimum rate-distortion cost among the plurality of prediction modes.
  • the second prediction may be performed on the first prediction error or the first residual block generated by the selected prediction mode.
  • the prediction unit may select a second prediction error having a minimum rate-distortion cost among the second prediction errors.
  • the prediction unit may determine the prediction mode of the first prediction to be used for encoding the current block according to which first prediction error has the minimum rate-distortion cost, and which second prediction error is the minimum rate-distortion cost. It is possible to determine the region of the second prediction to be used for encoding the current block according to whether
  • the information related to the prediction described above with reference to FIG. 11 may include information about the selective intra-picture prediction described above.
  • the information related to the prediction may include SSIP_flag, which is a flag indicating whether to use the optional Secondary Intra-Prediction (SSIP).
  • SSIP_flag is a flag indicating whether to use the optional Secondary Intra-Prediction (SSIP).
  • the information related to the prediction may include information representing ⁇ described above and information representing ⁇ described above.
  • the information related to the prediction may include information indicating the first reference sample to be used for the second prediction and information indicating the number of reference samples to be used for the second prediction.
  • the information related to the prediction may include information indicating the first reference sample to be used for the second prediction and information indicating the last reference sample to be used for the second prediction.
  • the information related to the prediction may include information indicating a position at which the second prediction starts and to which position the second prediction proceeds.
  • the information related to the prediction may include information indicating a position where the second prediction starts and a position where the second prediction ends.
  • the information indicating ⁇ or the information indicating the position where the second prediction starts may be SSIP_start_point, and the information indicating ⁇ or the information indicating to which position the second prediction may proceed may be SSIP_length.
  • the prediction error of the current block can be further reduced compared to performing only the existing first prediction.
  • the second prediction may effectively reduce the prediction error with respect to the tendency of the distortion of the prediction error to remain in the direction of the prediction mode described above with reference to FIG. 9. In other words, by effectively using the tendency of the distortion of the prediction error to remain in the direction of the prediction mode through the second prediction, the performance of the prediction may be improved and the prediction error may be reduced.
  • FIG. 13 is a flowchart of a method of generating a residual block, according to an exemplary embodiment.
  • Step 1110 described above with reference to FIG. 11 may include steps 1310, 1320, 1330, 1340, 1350, 1360, 1370, and 1380.
  • the block that is the target of the first prediction may be the current block.
  • the first prediction may be intra prediction.
  • the prediction unit may generate a first prediction signal by performing a first prediction on the current block.
  • the first prediction signal may represent the first prediction block.
  • the prediction unit may perform the first prediction for each prediction mode of the plurality of prediction modes to find the prediction mode of the first prediction best for the encoding of the current block.
  • steps 1310, 1320, and 1325 may be performed for each prediction mode of the plurality of prediction modes.
  • the plurality of prediction modes may correspond to different prediction directions.
  • the prediction unit may generate a first prediction error based on the current block and the first prediction signal.
  • the first prediction error may represent a first prediction error block or a first residual block.
  • the first residual block may represent a residual of the current block and the first prediction block.
  • the prediction unit may generate the first prediction error by subtracting the first prediction block indicated by the first prediction signal from the current block.
  • the prediction unit may calculate the rate-distortion cost of the first prediction using the first prediction error.
  • the prediction unit may store the calculated first prediction error and / or the rate-distortion cost of the first prediction in the memory 1030, the storage 1040, or a buffer.
  • the prediction unit may perform the first prediction for each prediction mode of the plurality of prediction modes to find the prediction mode of the first prediction best for the encoding of the current block.
  • the prediction unit may calculate rate-distortion costs of the plurality of prediction modes using the first prediction errors of the plurality of prediction modes.
  • the prediction unit may store the minimum rate-distortion cost of the calculated rate-distortion costs as the minimum first rate-distortion cost RDcost_1.
  • RDcost_1 may be the rate-distortion cost of the mode with the minimum rate-distortion cost in the first intra picture prediction.
  • the prediction unit may store a first prediction error and RDcost_1 corresponding to RDcost_1.
  • the second prediction can optionally be performed based on the predefined conditions.
  • the prediction unit may determine whether to perform a second prediction.
  • the determination of step 1330 may not ultimately determine that the current block is encoded using the second prediction.
  • the prediction unit may determine whether a second prediction is possible with respect to the current block or the first residual block.
  • the current block may be encoded without using the second prediction.
  • the second prediction signal and the second prediction error may be generated by the second prediction, but in encoding of the current block through comparison of the rate-distortion costs in step 1360. It may be determined whether to use the second prediction.
  • the prediction unit performs a second prediction after performing the first prediction on each prediction mode of the plurality of prediction modes to find the prediction mode of the first prediction best for the encoding of the current block. You can decide whether or not to do so. In other words, step 1330 may be performed for each prediction mode of the plurality of prediction modes.
  • the residual block of the current block may be a block indicated by the first prediction error.
  • the first prediction error may be provided as a residual block.
  • the residual block of the current block may be a block indicated by the second prediction error signal to be described later.
  • the second prediction error signal may be provided as a residual block.
  • the prediction unit may determine whether to perform the second prediction based on the predefined condition.
  • the prediction unit may determine whether to perform the second prediction based on the prediction mode of the first prediction.
  • the prediction unit may not perform the second prediction.
  • the prediction unit may perform the second prediction when the prediction mode of the first prediction is the directional mode.
  • the prediction mode of the first prediction is a non-directional mode among the plurality of prediction modes, it may not be possible to perform prediction on a selective region or range because there is no direction of the prediction mode. Therefore, the second prediction may be performed only when the prediction mode of the first prediction is the directional mode.
  • the prediction unit may determine whether to perform the second prediction based on the position of the current block.
  • the prediction unit may not perform the second prediction when the current block is adjacent to the boundary.
  • the prediction unit may not perform the second prediction when the current block is adjacent to the upper boundary and the left boundary.
  • the boundary may be a boundary of a picture, a boundary of a slice, or a boundary of a tile.
  • the first residual block for the second prediction may not be sufficient. If the first residual block is lacking, a second reference sample for performing the second prediction cannot be generated intact.
  • the prediction unit may determine whether to perform the second prediction based on the number of reconstructed blocks adjacent to the current block.
  • the prediction unit may not perform the second prediction.
  • step 1340 may be performed.
  • step 1370 or step 1120 may be performed.
  • the residual signal of step 1120 may be a first prediction error.
  • the first prediction error generated by the first prediction may be used as the residual signal of the current block.
  • the prediction unit may generate a second prediction signal by performing a second prediction on the first prediction error.
  • the second prediction signal may represent the second prediction block.
  • the second prediction may be intra prediction, and the prediction direction of the second prediction may be the same as the prediction direction of the first prediction.
  • the predictor may perform second prediction on a portion of the first residual block. Some area may be specified by reference samples to be used in the second prediction.
  • the area of the reference samples of the second prediction may be part of the area of the reference samples of the first prediction.
  • the prediction unit may perform second prediction on each candidate region of the plurality of candidate regions to find an optimal second prediction region for encoding a current block.
  • the prediction unit is configured for each candidate region of each prediction mode in order to find the prediction mode of the optimal first prediction and the region of the optimal second prediction for encoding the current block. 2 Predictions can be performed. In other words, step 1340 may be performed for each candidate region of each prediction mode.
  • the prediction mode of the optimal first prediction and the region of the optimal second prediction may be prediction modes and regions corresponding to candidate regions having a minimum rate-distortion cost among the plurality of candidate regions of the plurality of prediction modes.
  • the prediction unit encodes the current block based on which prediction mode and which region among the plurality of candidate regions of the plurality of prediction modes is the minimum rate-distortion cost incurred when the first prediction and the second prediction are performed.
  • the prediction mode of the first prediction and the region of the second prediction may be determined.
  • the plurality of candidate regions may respectively correspond to ranges of reference samples to be used for the second prediction.
  • the prediction unit may select a range of reference samples to be used for the second prediction among the reference samples for the prediction direction.
  • the prediction unit may perform the second prediction by using the reference samples in the selected range among the entire reference samples for the prediction direction. For the second prediction, the value of the reference sample outside the selected range may be considered "0".
  • the prediction unit may generate a second prediction error based on the first prediction error and the second prediction signal.
  • the second prediction error may represent a second prediction error block or a second residual block.
  • the second residual block may represent a residual of the first residual block and the second prediction block.
  • the prediction unit may generate the second prediction error signal by subtracting the second prediction block indicated by the second prediction signal from the first residual block indicated by the first prediction error.
  • the prediction unit may calculate the rate-distortion cost of the second prediction using the second prediction error.
  • the prediction unit may store the calculated second prediction error and / or the rate-distortion cost of the second prediction in the memory 1030, the storage 1040, or a buffer.
  • the prediction unit may perform second prediction on each region of the plurality of regions to find an optimal second prediction region for encoding the current block.
  • the prediction unit may calculate rate-distortion costs of the plurality of regions using second prediction errors of the plurality of regions.
  • the prediction unit may store the minimum rate-distortion cost of the calculated rate-distortion costs as the minimum second rate-distortion cost RDcost_2.
  • RDcost_2 may be the rate-distortion cost of the region with the lowest rate-distortion cost in the optional second intra prediction.
  • the prediction unit may store a second prediction error and RDcost_2 corresponding to RDcost_2.
  • the second prediction can optionally be used based on the predefined conditions.
  • the prediction unit may determine whether to use the second prediction in encoding of the current block.
  • the prediction unit may determine whether to use the second prediction in encoding of the current block based on the predefined condition.
  • the prediction unit may determine to use the second prediction if the rate-distortion cost is further reduced by using the second prediction.
  • the prediction unit may determine not to use the second prediction if the rate-distortion cost is not further reduced even if the second prediction is used.
  • the prediction unit may determine to use the second prediction when the minimum rate-distortion cost when the second prediction is used is smaller than the minimum rate-distortion cost when the second prediction is not used.
  • the prediction unit may determine whether to use the second prediction in encoding of the current block based on the comparison between RDcost_1 and RDcost_2.
  • RDcost_2 is smaller than RDcost_1 may indicate that the rate-distortion cost of encoding of the current block may be further reduced by using the second prediction than when using only the first prediction.
  • the prediction unit may determine not to use the second prediction for encoding the current block. If RDcost_1 is greater than RDcost_2, the prediction unit may determine to use the second prediction for encoding the current block.
  • step 1370 may be performed.
  • step 1380 may be performed.
  • the prediction unit may perform a setting indicating that the second prediction is not used.
  • the prediction unit may set a value of the second prediction usage information to indicate that the second prediction usage information does not use the second prediction. For example, if the value of the second prediction usage information is "0", the second prediction usage information may indicate that the second prediction usage information is not used.
  • the residual signal of step 1120 may be a first prediction error.
  • the first prediction error generated based on the first prediction may be used as the residual signal.
  • the prediction unit may perform setting indicating to use the second prediction.
  • the prediction unit may set a value of the second prediction usage information to indicate that the second prediction usage information uses the second prediction. For example, if the value of the second prediction usage information is "1", the second prediction usage information may indicate that the second prediction usage information is used.
  • the residual signal of step 1120 may be a second prediction error.
  • the second prediction error generated based on the first prediction and the second prediction may be used as the residual signal.
  • FIG. 14 is a flowchart of a method of generating a restored block, according to an example.
  • Step 1160 described above with reference to FIG. 11 may include steps 1410, 1420, and 1430 below.
  • step 1420 may be performed.
  • step 1430 may be performed. If the second prediction is not used, the reconstructed first prediction error of the current block may be a reconstructed residual signal.
  • the reconstructed block generator may generate a reconstructed first prediction error based on the reconstructed residual signal and the second prediction signal.
  • the reconstructed block generator may generate a reconstructed first prediction error of the current block based on the residual signal of the current block and the second prediction signal for a portion of the current block.
  • the reconstructed first prediction error may be the sum of the reconstructed residual signal and the second prediction signal.
  • the reconstructed first prediction error may be generated based on the reconstructed residual signal and the second prediction signal.
  • the reconstructed block generator may generate a reconstructed block based on the reconstructed first prediction error and the first prediction signal.
  • the reconstructed block generator may generate a signal of the reconstructed block based on the reconstructed first prediction error of the current block and the first prediction signal of the current block.
  • the signal representing the reconstructed block may be the sum of the reconstructed residual signal, the second prediction signal, and the first prediction signal.
  • a signal representing the reconstructed block may be generated based on the reconstructed residual signal, the second prediction signal, and the first prediction signal.
  • the signal representing the reconstructed block may be the sum of the reconstructed residual signal and the first prediction signal.
  • a signal representing the reconstructed block may be generated based on the reconstructed residual signal and the first prediction signal.
  • the signal of the reconstructed block may be the sum of the reconstructed first prediction error and the first prediction signal.
  • the reconstructed first prediction error may be generated based on the reconstructed residual signal and the second prediction signal.
  • plus and minus The symbol may represent generating an error signal for two signals.
  • An error signal may be generated by subtracting an input signal input with a minus sign from an input signal input with a plus sign.
  • the symbol may represent generating a signal that combines two signals.
  • a signal that is the sum of the two signals can be generated by adding input signals that are respectively input as + symbols.
  • the prediction unit described above with reference to FIG. 11 may include a first predictor and a second predictor.
  • the process within the dashed line may represent the SSIP.
  • Rhombus may represent a conditional divergence
  • A may represent a target to which a value is assigned
  • B may represent a value to be assigned to a target
  • TQ may represent transform and quantization.
  • (TQ) ⁇ 1 may represent inverse transformation and inverse quantization.
  • e 1 may represent a signal of the first prediction error. May represent a signal of the reconstructed first prediction error.
  • e 2 may represent a signal of the second prediction error. May represent a signal of the reconstructed second prediction error. Although not shown in FIG. 15, when the second prediction is used, Is May be the same as If no second prediction is used, Is May be the same as
  • e may represent a residual signal. May represent the reconstructed residual signal.
  • 16 is a structural diagram of a decoding apparatus according to an embodiment.
  • the decryption apparatus 1600 may be a general purpose computer system for performing decryption.
  • the decoding apparatus 1600 may include at least one processor 1610, a memory 1630, a user interface (UI) input device 1650, which communicates with each other via a bus 1690, UI output device 1660 and storage 1640.
  • the decoding apparatus 1600 may further include a communication unit 1620 connected to the network 1699.
  • the processor 1610 may be a semiconductor device that executes processing instructions stored in a central processing unit (CPU), a memory 1630, or a storage 1640.
  • Memory 1630 and storage 1640 may be various forms of volatile or nonvolatile storage media.
  • the memory may include at least one of a ROM 1631 and a RAM 1632.
  • the processor 1610 may include an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, an intra predictor 240, an inter predictor 250, an adder 255 of the decoding apparatus 200.
  • the filter unit 260 and the reference picture buffer 270 may be included.
  • the recording medium may store at least one module for the operation of the decoding apparatus 1600.
  • the memory 1630 may store at least one module and may be configured to be executed by the at least one processor 1610.
  • the entropy decoder 210, the inverse quantizer 220, the inverse transformer 230, the intra predictor 240, the inter predictor 250, and the adder 255 of the decoder 1600 may be described.
  • At least some of the filter unit 260 and the reference picture buffer 270 may be program modules, and may communicate with an external device or system.
  • the program modules may be included in the decryption apparatus 1600 in the form of an operating system, an application program module, and other program modules.
  • the program modules may be physically stored on various known storage devices.
  • at least some of these program modules may be stored in a remote storage device that can communicate with the decryption apparatus 1600.
  • Program modules perform routines or subroutines, programs, objects, components, and data to perform functions or operations, or to implement abstract data types, according to one embodiment. Data structures and the like, but is not limited thereto.
  • the program modules may be composed of instructions or code performed by the processor 1610.
  • Functions related to communication of data or information of the decoding apparatus 1600 may be performed through the communication unit 1620.
  • 17 is a flowchart of a decoding method according to an embodiment.
  • the decoding method of the embodiment may be performed by the decoding apparatus 200 or the decoding apparatus 1600.
  • the communication unit 1620 may receive a bitstream from the encoding apparatus 100 or the encoding apparatus 1100.
  • the bitstream may include information about the encoded residual signal, and may include information related to prediction.
  • the information about the encoded residual signal may include entropy coded quantized transform coefficients.
  • Information related to the prediction may be entropy decoded.
  • the entropy decoder 210 may generate quantized transform coefficients by performing entropy decoding on the bitstream.
  • the entropy decoding unit 210 may generate information related to prediction by performing entropy decoding on the bitstream.
  • the information related to the prediction may include prediction scheme information indicating how the current block is encoded.
  • the prediction scheme information may indicate whether the current block is encoded by intra prediction or intra prediction.
  • the prediction scheme information may indicate whether the current block is encoded by intra prediction.
  • the prediction scheme information may indicate whether the current block is encoded by inter prediction.
  • the information related to the prediction may include intra prediction mode information indicating a prediction mode of the intra prediction.
  • the information related to the prediction may include second prediction usage information indicating whether the second prediction is used in encoding the current block.
  • the information related to the prediction includes current block type information indicating the type of the current block, first prediction block type information indicating the type of the first prediction block, second prediction block type information indicating the type of the second prediction block, First reference block type information indicating a type of a reference block, second reference block type information indicating a type of a second reference block, first reference sample type information indicating a type of a first reference sample, and a type of a second reference sample Second reference sample type information indicating the information may be included.
  • the information related to the prediction may include first prediction region information indicating the region of the first prediction and / or second prediction region information indicating the region of the second prediction.
  • the information related to the prediction may include information used for the prediction described in the embodiments.
  • Information related to the prediction may be included in the bitstream according to the order described in the embodiment or the order of generation according to the embodiment.
  • the reconstructed residual signal generator may generate a reconstructed residual signal for the current block based on the quantized transform coefficients.
  • the reconstructed residual signal generator may include an inverse quantizer 220 and an inverse transformer 230.
  • Step 1730 may include steps 1731 and 1732.
  • the inverse quantization unit 220 may generate inverse quantized transform coefficients by performing inverse quantization on the quantized transform coefficients.
  • the transformer 230 may generate the reconstructed residual signal by performing inverse transform on the inverse quantized transform coefficients.
  • a reconstructed residual signal for the current block may be generated.
  • the reconstructed block generator may generate a reconstructed block based on the reconstructed residual signal, the second prediction, and the first prediction.
  • the reconstructed block generator may include an adder 225, an intra predictor 240, an inter predictor 250, a filter 260, and a reference picture buffer 270.
  • the recovered residual signal may be a recovered residual block.
  • the reconstructed block may be the sum of the reconstructed residual block and the prediction block.
  • the reconstructed block may be generated based on the sum of the reconstructed residual block and the prediction block.
  • the prediction block may be the sum of the first prediction block and the second prediction block.
  • the prediction signal may be the sum of the first prediction signal and the second prediction signal.
  • the reconstructed block may be the sum of the reconstructed residual block, the first prediction block, and the second prediction block.
  • the reconstructed signal may be the sum of the reconstructed residual signal, the first prediction signal, and the second prediction signal.
  • the reconstructed block may correspond to the sum of the reconstructed residual block, the first prediction block, and the second prediction block.
  • the first prediction block may be a block generated by the first prediction or a block indicated by the prediction signal generated by the first prediction.
  • the second prediction block may be a block generated by the second prediction or a block indicated by the prediction signal generated by the second prediction.
  • the second prediction signal may be a null signal and the second prediction block may be a null block.
  • the null block may be a block in which the values of all pixels of the block are "0".
  • the reconstructed residual signal when the second prediction is used for encoding of the current block, the reconstructed residual signal may be the reconstructed second prediction error described above with reference to FIG. 14.
  • the reconstructed residual signal when the second prediction is used for encoding of the current block, the reconstructed residual signal may be a signal in which the second prediction error described above with reference to FIG. 11 is reconstructed by inverse quantization and inverse transformation.
  • the reconstructed residual signal in which the second prediction is not used for the encoding of the current block may be the reconstructed first prediction error described above with reference to FIG. 14.
  • the reconstructed residual signal may be a signal in which the first prediction error described above with reference to FIG. 11 is reconstructed by inverse quantization and inverse transformation.
  • the reconstructed block generator may generate a reconstructed block by performing inter prediction or intra prediction.
  • the first prediction and the second prediction may be different kinds of predictions.
  • the first prediction and the second prediction may be the same kind of predictions.
  • each of the first prediction and the second prediction may be intra prediction. If the first prediction is intra prediction, the second prediction may also be set to intra prediction.
  • the prediction direction of the first prediction and the prediction direction of the second prediction may be the same.
  • the prediction direction of the second prediction may be set to be the same as the prediction direction of the first prediction.
  • each of the first prediction and the second prediction may be inter prediction.
  • a block that is the target of the first prediction and a block that is the target of the second prediction may be different from each other.
  • the "block to be predicted” may mean to which block the "prediction” generates a prediction block.
  • the type of the block targeted for the first prediction and the type of the block targeted for the second prediction may be different from each other.
  • the type of block may be an original block, a luma block, a chroma block, a depth block, a residual block, or the like.
  • the block targeted for the first prediction may be a reconstructed block.
  • the block that is the target of the second prediction may be a prediction error block.
  • Reference blocks may be used for prediction.
  • the first reference block of the first prediction and the second reference block of the second prediction may be different from each other.
  • the reference blocks may differ from each other in terms of type and / or location.
  • the position of the first reference block of the first prediction and the position of the second reference block of the second prediction may be different from each other.
  • the position of the first reference block may be a position relative to the block that is the target of the first prediction.
  • the position of the second reference block may be a position relative to the block that is the target of the second prediction.
  • the first reference block of the first prediction may be plural.
  • the second reference block of the second prediction may be plural. At least some of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction may be different from each other.
  • the position of at least one of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction is the positions of the plurality of first reference blocks and the positions of the plurality of second reference blocks. Can only be included in one of the
  • the type of the first reference block of the first prediction and the type of the second reference block of the second prediction may be different from each other.
  • the type of block may be a reconstructed block, a reconstructed luma block, a reconstructed chroma block, a reconstructed depth block, a reconstructed first residual block, a reconstructed second residual block, or the like.
  • the first reference block of the first prediction may be a reconstructed block.
  • the second reference block of the second prediction may be a reconstructed first residual block.
  • the first reference sample of the first prediction may be a pixel of the reconstructed block.
  • the second reference sample of the second prediction may be a pixel of the reconstructed first residual block.
  • the first reference block of the first prediction may be a reconstructed neighboring block neighboring the current block.
  • the second reference block of the second prediction may be a reconstructed first residual block neighboring the current block.
  • the reconstructed neighbor residual block neighboring the current block may be obtained by adding the reconstructed residual block of the reconstructed neighboring block to the second prediction block of the reconstructed neighboring block.
  • the reconstructed neighbor residual block neighboring the current block may be a difference between the reconstructed neighboring block and the first prediction block of the reconstructed neighboring block.
  • a reconstructed block around the current block may be used as a reference block for prediction of the current block.
  • the target of the second prediction is the first residual block
  • a reconstructed first residual block around the current block or the first residual block may be used as the second reference block for prediction on the first residual block.
  • the region of the first prediction and the region of the second prediction may be different from each other.
  • the "prediction area” may indicate an area in which a prediction value is generated among blocks that are to be predicted.
  • the “area of prediction” may indicate an area to which a prediction value generated by prediction is allocated among prediction blocks corresponding to a block that is a prediction target.
  • the first prediction may be a prediction for an area of the current block.
  • the second prediction may be a prediction for a portion of the above area. At least some of the area of the current block may be excluded from the second prediction.
  • the block that is the target of the first prediction may be a block within a rectangular area.
  • the second prediction may be made for some of the above rectangular regions. At least some of the areas of the quadrangle may not be the target of the second prediction.
  • the area of the first prediction may be the entire block that is the target of the first prediction.
  • the area of the second prediction may be part of a block that is the target of the second prediction.
  • the second prediction may be excluded for at least a portion of the block that is the target of the second prediction.
  • the first prediction may be performed on the entire block that is the target of the first prediction.
  • the second prediction may be performed on the selected portion of the block that is the target of the second prediction.
  • prediction values determined by the first prediction may be assigned only to pixels in the region of the first prediction among blocks that are the targets of the first prediction.
  • the prediction value according to the first prediction may not be allocated to pixels outside the region of the first prediction among the blocks that are the targets of the first prediction.
  • a predefined value may be assigned to pixels outside the region of the first prediction among blocks that are the target of the first prediction. For example, the predefined value may be "0".
  • prediction values determined by the second prediction may be assigned only to pixels in the region of the second prediction among blocks that are the target of the second prediction. Pixels outside the region of the second prediction among the blocks that are the target of the second prediction may not be assigned a prediction value by the second prediction.
  • a predefined value may be assigned to pixels outside the region of the second prediction among blocks that are the target of the second prediction. For example, the predefined value may be "0".
  • each of the NxN pixels may be assigned a prediction value determined by the first prediction.
  • the prediction value determined by the first prediction may be assigned to all pixels of the block that are the targets of the first prediction.
  • the size of the block that is the target of the second prediction is N ⁇ N
  • one or more pixels among the N ⁇ N pixels may not be assigned a prediction value determined by the first prediction.
  • the size of the block that is the target of the second prediction is N ⁇ N
  • one or more pixels among the N ⁇ N pixels may be assigned a predefined value.
  • the predefined value may be "0".
  • the region of the first prediction may be determined based on the type of the first prediction. For example, the region of the first prediction may be determined based on whether the first prediction is inter prediction. Alternatively, the region of the first prediction may be determined based on whether the first prediction is intra prediction. Alternatively, the region of the first prediction may be determined based on the prediction direction of the first prediction.
  • the region of the second prediction may be determined based on the type of the second prediction. For example, the region of the second prediction may be determined based on whether the second prediction is inter prediction. Alternatively, the region of the second prediction may be determined based on whether the second prediction is intra prediction. Alternatively, the region of the second prediction may be determined based on the prediction direction of the second prediction.
  • the second prediction may be performed using a second reference sample within an optional range.
  • the region of the first reference sample used for the first prediction and the region of the second reference sample used for the second prediction may be different from each other.
  • the region of the first prediction and the region of the second prediction may be different from each other.
  • the area of the first reference sample may be an area of reference samples required for generating prediction values for the area of the first prediction through the first prediction.
  • the area of the second reference sample may be an area of reference samples required for generating prediction values for the area of the second prediction through the second prediction.
  • the region of the first prediction may be the entirety of the block that is the target of the first prediction.
  • the area of the second prediction may be part of a block that is the target of the second prediction.
  • the region of the second reference sample may be part of the region of the first reference sample.
  • FIG. 18 is a flowchart of a method of generating a restored block, according to an exemplary embodiment.
  • Step 1740 described above with reference to FIG. 17 may include the following steps 1810, 1820, 1830, 1840, and 1850.
  • the second prediction can optionally be performed based on the predefined conditions.
  • the reconstructed block generator may determine whether to use the second prediction for generation of the reconstructed block.
  • the reconstructed block generator may determine whether to use the second prediction for the generation of the reconstructed block based on a predefined condition.
  • the reconstructed block generator may determine whether to use the second prediction based on the prediction mode of the first prediction.
  • the reconstructed block generator may obtain intra prediction mode information indicating a prediction mode of intra prediction from the bitstream.
  • the reconstructed block generator may not use the second prediction if the prediction mode of the first prediction is a non-directional mode.
  • the reconstructed block generator may determine whether to use the second prediction based on the position of the current block.
  • the reconstructed block generator may not use the second prediction when the current block is adjacent to the boundary.
  • the prediction unit may not use the second prediction when the current block is adjacent to the upper boundary and the left boundary.
  • the boundary may be a boundary of a picture, a boundary of a slice, or a boundary of a tile.
  • the reconstructed block generator may determine whether to use the second prediction based on the number of reconstructed blocks adjacent to the current block.
  • the recovered block may be a PU.
  • the reconstructed block generator may not use the second prediction when the number of reconstructed blocks adjacent to the current block is two or less.
  • the reconstructed block generator after the determination is made whether to use the second prediction by the prediction mode, the position of the current block, and / or the number of adjacent reconstructed blocks, the reconstructed block generator then performs a second prediction on the encoding of the current block. It may be determined whether to use the second prediction based on whether it is used.
  • the reconstructed block generator may obtain second prediction usage information from the bitstream.
  • the reconstructed block generator may use the second prediction when the second prediction usage information indicates that the second prediction use information is used.
  • the reconstructed block generator may not use the second prediction when the second prediction usage information indicates that the second prediction usage information does not use the second prediction.
  • step 1820 may be performed.
  • step 1840 may be performed.
  • the reconstructed first prediction error of the current block may be a reconstructed residual signal.
  • the reconstructed block generator may generate a second prediction signal by performing a second prediction.
  • the second prediction may correspond to the second prediction in encoding of the current block described above with reference to FIGS. 11 and 13.
  • the second prediction signal may correspond to the second prediction in encoding of the current block described above with reference to FIGS. 11 and 13.
  • the second prediction signal may represent the second prediction block.
  • the second prediction may be intra prediction, and the prediction direction of the second prediction may be the same as the prediction direction of the first prediction.
  • the reference block of the second prediction may be a reconstructed residual block.
  • the reconstructed block generator may generate a second prediction signal by performing a second prediction using a reconstructed residual block of a block neighboring the current block as a reference block.
  • the region of the second prediction may be part of the region of the current block.
  • the reconstructed block generator may obtain second prediction region information indicating a prediction region of the second prediction from the bitstream.
  • the reconstructed block generator may perform second prediction on the second prediction region.
  • the region to which the second prediction is to be applied may be specified based on the range of reference samples used for the second prediction.
  • the region to which the second prediction is to be applied may be specified based on the prediction direction of the second prediction.
  • the region to which the second prediction is to be applied may be specified by the range of reference samples used for the second prediction and the prediction direction of the second prediction.
  • the reconstructed block generator may perform second prediction using reference samples in a selected range of the entire reference samples for the prediction direction. For the second prediction, the value of the reference sample outside the selected range may be considered "0".
  • the reconstructed block generator may obtain information ⁇ indicating the first reference sample to be used for the second prediction and information ⁇ indicating the number of reference samples to be used for the second prediction from the bitstream.
  • the range of reference samples used for the second prediction may be specified by ⁇ and ⁇ .
  • the range of reference samples may be specified by information ⁇ indicating the first reference sample to be used for the second prediction and information ⁇ indicating the number of reference samples to be used for the second prediction.
  • the region of the second prediction may be a region generated as the reference samples in the range between ⁇ and ⁇ + ⁇ advance in the prediction direction.
  • the value of the reference sample outside of the selected range may be considered null or "0".
  • the value of the previous reference sample of ⁇ may be considered zero, and the value of the subsequent reference sample of ⁇ + ⁇ may be considered zero.
  • the reconstructed block generator may generate a reconstructed first prediction error based on the reconstructed residual signal and the second prediction signal.
  • the reconstructed block generator may generate the reconstructed first prediction error by adding the second prediction signal to the reconstructed residual signal.
  • the reconstructed block generator may generate a reconstructed first prediction error of the current block based on the reconstructed residual signal and the second prediction signal for the partial region.
  • the reconstructed first prediction error may be the sum of the reconstructed residual signal and the second prediction signal. Alternatively, the reconstructed first prediction error may be generated based on the reconstructed residual signal and the second prediction signal. Alternatively, the reconstructed first prediction error may be generated based on the sum of the reconstructed residual signal and the second prediction signal.
  • the reconstructed block generator may generate a first prediction signal by performing a first prediction on the current block.
  • the first prediction signal may represent the first prediction block.
  • reconstructed blocks around the current block can be used as reference blocks. Also, pixels of reconstructed blocks around the current block can be used as reference samples.
  • the reconstructed block generator may generate a signal of the reconstructed block based on the reconstructed first prediction error and the first prediction signal.
  • the reconstructed block generator may generate a signal of the reconstructed block by adding the first prediction signal to the reconstructed first prediction error.
  • the reconstructed block when the second prediction is used, the reconstructed block may be the sum of the reconstructed residual signal, the second prediction signal, and the first prediction signal.
  • a signal representing the reconstructed block when the second prediction is used, may be generated based on the reconstructed residual signal, the second prediction signal, and the first prediction signal.
  • the signal representing the reconstructed block may be the sum of the reconstructed residual signal and the first prediction signal. Or, if the second prediction is not used, a signal representing the reconstructed block may be generated based on the sum of the reconstructed residual signal and the first prediction signal.
  • the reconstructed block and the reconstructed first residual signal may be used as reference blocks for decoding other blocks.
  • FIG. 19 illustrates a decoding process according to an embodiment.
  • plus and plus The symbol may represent generating a signal that combines two signals.
  • a signal that is the sum of the two signals can be generated by adding input signals that are respectively input as + symbols.
  • the reconstructed block generator described above with reference to FIG. 19 may include a first predictor and a second predictor.
  • the process within the dashed line may represent the SSIP.
  • Rhombus may represent a conditional divergence
  • TQ TQ ⁇ 1
  • (TQ) ⁇ 1 may represent inverse transformation and inverse quantization.
  • the selected part to which the first prediction is applied and the remaining part to which the second prediction is applied may be separated.
  • the first prediction when the second prediction is used, the first prediction may be applied to the entirety of the current block.
  • the reconstructed block for the selected portion to which the second prediction is applied is based on the sum of the reconstructed residual block, the second prediction signal generated by the second prediction, and the first prediction signal generated by the first prediction. Can be generated.
  • a reconstructed block for the remaining part to which the second prediction is not applied may be generated based on the sum of the reconstructed residual block and the first prediction signal generated by the first prediction.
  • the second prediction may be a prediction for the residual.
  • the second prediction may be a prediction for a first residual signal that is a difference between the current block and the first prediction signal.
  • the reference block of the second prediction may be a reconstructed residual block, and the reference pixel of the second prediction may be a pixel of the reconstructed residual block.
  • a second residual signal which is a difference between the first residual signal and the second prediction signal, may be generated through the second prediction on the first residual signal, and encoded information of the current block is generated using the second residual signal. Can be.
  • the reconstructed block for the selected portion to which the second prediction is applied may be a weighted-sum of the reconstructed residual block, the second prediction signal, and the first prediction signal.
  • the information related to the prediction may include a first weight of the reconstructed residual block, a second weight of the second prediction signal, and a third weight of the first prediction signal.
  • the fact that the second prediction is not used may be considered that the second weight of the second prediction signal is set to zero.
  • the second weight of the second prediction signal may be considered to be set to 0 with respect to the remaining part to which the second prediction is not applied.
  • the methods are described based on a flowchart as a series of steps or units, but the present invention is not limited to the order of steps, and certain steps may occur in a different order or simultaneously from other steps as described above. Can be. Also, one of ordinary skill in the art appreciates that the steps shown in the flowcharts are not exclusive, that other steps may be included, or that one or more steps in the flowcharts may be deleted without affecting the scope of the present invention. I can understand.
  • Embodiments according to the present invention described above may be implemented in the form of program instructions that may be executed by various computer components, and may be recorded in a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
  • Program instructions recorded on the computer-readable recording medium may be those specially designed and configured for the present invention, or may be known and available to those skilled in the computer software arts.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like.
  • Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
  • the hardware device may be configured to operate as one or more software modules to perform the process according to the invention, and vice versa.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A method and a device for performing encoding and decoding by using first prediction and second prediction are disclosed. In the encoding of a current block, a residual signal of the current block is generated on the basis of the current block, the first prediction, and the second prediction. In addition, information on the residual signal encoded by encoding the residual signal is generated. In the decoding of the current block, a restored residual signal of the current block is generated. A restored block of the current block is generated on the basis of the restored residual signal, the second prediction, and the first prediction.

Description

예측을 사용하는 비디오의 부호화 및 복호화를 위한 방법 및 장치Method and apparatus for encoding and decoding video using prediction
아래의 실시예들은 비디오의 복호화 방법, 복호화 장치, 부호화 방법 및 부호화 장치에 관한 것으로서, 보다 상세하게는 대상 블록에 대한 예측을 사용하여 동영상에 대한 부호화 및 복호화를 수행하는 방법 및 장치에 관한 것이다.The following embodiments relate to a video decoding method, a decoding device, an encoding method, and an encoding device, and more particularly, to a method and an apparatus for encoding and decoding a video using prediction on a target block.
정보 통신 산업의 지속적인 발달을 통해 HD(High Definition) 해상도를 가지는 방송 서비스가 세계적으로 확산되었다. 이러한 확산을 통해, 많은 사용자들이 고해상도이며 고화질인 영상(image) 및/또는 비디오(video)에 익숙해지게 되었다.Through the continuous development of the information and telecommunications industry, broadcasting services having high definition (HD) resolution have spread worldwide. This proliferation has resulted in many users becoming accustomed to high resolution, high quality images and / or video.
높은 화질에 대한 사용자들의 수요를 만족시키기 위하여, 많은 기관들이 차세대 영상 기기에 대한 개발에 박차를 가하고 있다. 에이치디티브이(High Definition TV; HDTV) 및 풀에이치디(Full HD; FHD) TV뿐만 아니라, FHD TV에 비해 4배 이상의 해상도를 갖는 울트라에이치디(Ultra High Definition; UHD) TV에 대한 사용자들의 관심이 증대하였고, 이러한 관심의 증대에 따라, 더 높은 해상도 및 화질을 갖는 영상에 대한 영상 부호화(encoding)/복호화(decoding) 기술이 요구된다.In order to satisfy users' demand for high image quality, many organizations are spurring the development of next generation video devices. Users are interested in Ultra High Definition (UHD) TVs, which have four times the resolution of FHD TVs, as well as High Definition TV (HDTV) and Full HD (FHD) TVs. This has increased, and as the interest increases, an image encoding / decoding technique for an image having higher resolution and image quality is required.
영상 부호화(encoding)/복호화(decoding) 장치 및 방법은 고해상도 및 고화질의 영상에 대한 부호화/복호화를 수행하기 위해, 인터(inter) 예측(prediction) 기술, 인트라(intra) 예측 기술 및 엔트로피 부호화 기술 등을 사용할 수 있다. 인터 예측 기술은 시간적으로(temporally) 이전의 픽쳐 및/또는 시간적으로 이후의 픽쳐를 이용하여 현재 픽쳐에 포함된 픽셀의 값을 예측하는 기술일 수 있다. 인트라 예측 기술은 현재 픽쳐 내의 픽셀의 정보를 이용하여 현재 픽쳐에 포함된 픽셀의 값을 예측하는 기술일 수 있다. 엔트로피 부호화 기술은 출현 빈도가 높은 심볼에는 짧은 코드(code)를 할당하고, 출현 빈도가 낮은 심볼에는 긴 코드를 할당하는 기술일 수 있다.An image encoding / decoding apparatus and method include an inter prediction technique, an intra prediction technique, an entropy encoding technique, etc. in order to perform encoding / decoding of high resolution and high quality images. Can be used. The inter prediction technique may be a technique for predicting a value of a pixel included in a current picture using a temporally previous picture and / or temporally following picture. An intra prediction technique may be a technique of predicting a value of a pixel included in a current picture by using information of a pixel in a current picture. The entropy encoding technique may be a technique of allocating a short code to a symbol having a high appearance frequency and a long code to a symbol having a low appearance frequency.
영상의 부호화 및 복호화에 있어서, 예측은 원본 신호와 유사한 예측 신호를 생성하는 것을 의미할 수 있다. 예측은 크게 공간적(spatial) 복원된(reconstructed) 영상을 참조하는 예측, 시간적(temporal) 복원된 영상을 참조하는 예측 및 그 밖의 심볼에 대한 예측으로 분류될 수 있다. 말하자면, 시간적 참조는 시간적 복원된 영상을 참조하는 것을 의미할 수 있고, 공간적 참조는 공간적 복원된 영상을 참조하는 것을 의미할 수 있다.In encoding and decoding of an image, prediction may mean generating a prediction signal similar to the original signal. Predictions can be broadly classified into predictions referring to spatially reconstructed images, predictions referring to temporal reconstructed images, and predictions for other symbols. In other words, a temporal reference may refer to a temporally reconstructed image, and a spatial reference may refer to a spatially reconstructed image.
현재 블록은 현재 부호화 또는 복호화의 대상인 블록일 수 있다. 현재 블록은 대상 블록 또는 대상 유닛으로 명명될 수 있다. 부호화에 있어서, 현재 블록은 부호화 대상 블록 또는 부호화 대상 유닛으로 명명될 수 있다. 복호화에 있어서, 현재 블록은 복호화 대상 블록 또는 복호화 대상 유닛으로 명명될 수 있다.The current block may be a block that is currently subjected to encoding or decoding. The current block may be named a target block or a target unit. In encoding, the current block may be called an encoding target block or an encoding target unit. In decoding, the current block may be called a decoding target block or a decoding target unit.
인터(inter) 예측은 시간적 참조 및 공간적 참조를 사용하여 현재 블록을 예측하는 기술일 수 있다. 인트라(intra) 예측은 공간적 참조만을 사용하여 현재 블록을 예측하는 기술일 수 있다.Inter prediction may be a technique for predicting the current block using temporal and spatial references. Intra prediction may be a technique for predicting the current block using only spatial references.
영상 부호화/복호화 기술은 공간적인 반복을 감소시키기 위해 인트라 예측을 수행할 때 복수의 예측 모드들 중 하나의 예측 모드를 사용하여 현재 블록을 부호화한다. 예를 들면, 고 효율 비디오 코딩(High Efficiency Video Coding; HEVC) 기술에서는 35 개의 인트라 예측 모드들을 사용한다.The image encoding / decoding technique encodes the current block using one prediction mode among a plurality of prediction modes when performing intra prediction to reduce spatial repetition. For example, High Efficiency Video Coding (HEVC) technology uses 35 intra prediction modes.
부호화 장치는 복수의 예측 모드들 중 가용한 모든 예측 모드들을 사용하여 현재 블록의 예측 블록들을 생성하고, 가장 우수한 결과를 낳는 하나의 예측 모드들 현재 블록의 부호화의 예측 모드로서 선택한다. 그러나, 가장 우수한 결과를 낳는 예측 모드를 사용하더라도, 원래의 블록 및 예측 블록 간에는 여전히 오차가 존재한다. 이러한 오차는 잔차 블록으로서 표현된다.The encoding apparatus generates prediction blocks of the current block using all available prediction modes among the plurality of prediction modes, and selects one prediction modes that produce the best result as a prediction mode of encoding of the current block. However, even using the prediction mode that produces the best results, there is still an error between the original block and the prediction block. This error is represented as a residual block.
픽셀들 중 일부에 대해서는, 원래의 블록 및 예측 블록 간에 큰 오차가 존재한다. 이러한 큰 오차에 의해 잔차 블록에 대한 변환 및/또는 양자화가 적용된 이후에도 충분한 공간적 반복 감소가 이루어지지 않을 수 있다.For some of the pixels, there is a large error between the original block and the prediction block. This large error may not result in sufficient spatial iteration reduction even after transform and / or quantization is applied to the residual block.
일 실시예는 예측에 의해 발생하는 예측 단위의 예측 오차를 감소시키는 방법 및 장치를 제공할 수 있다.One embodiment may provide a method and apparatus for reducing a prediction error of a prediction unit generated by the prediction.
일 실시예는 예측 모드의 예측 방향에 의해 발생하는 예측 오차를 감소시키는 방법 및 장치를 제공할 수 있다.One embodiment may provide a method and apparatus for reducing a prediction error caused by a prediction direction of a prediction mode.
일 실시예는 제1 예측에 따른 예측 오차에 대해 제1 예측 모드의 방향으로 선택적인 제2 예측을 수행하는 방법 및 장치를 제공할 수 있다. An embodiment may provide a method and apparatus for performing a second prediction selectively in a direction of a first prediction mode with respect to a prediction error according to the first prediction.
일 실시예는 제1 예측에 따른 예측 오차 중 일부에 대해 선택적인 제2 예측을 수행하는 방법 및 장치를 제공할 수 있다.An embodiment may provide a method and apparatus for performing a selective second prediction on a part of a prediction error according to a first prediction.
일 실시예는 제1 예측에 따른 예측 오차 중 왜곡이 심한 부분에 대해 선택적인 제2 예측을 수행하는 방법 및 장치를 제공할 수 있다.An embodiment may provide a method and apparatus for performing a selective second prediction on a portion with a severe distortion among prediction errors according to the first prediction.
일 실시예는 제1 예측에 따른 예측 오차 중 일부에 대해서만 선택적인 제2 예측을 수행함으로써 예측 오차의 전체에 대해 제2 예측을 수행할 경우에 발생할 수 있는 추가적인 예측 오차를 방지하는 방법 및 장치를 제공할 수 있다.One embodiment provides a method and apparatus for preventing an additional prediction error that may occur when performing a second prediction on the entirety of the prediction error by performing a second prediction selectively on a part of the prediction error according to the first prediction. Can provide.
일 실시예는 예측 방향으로 생성되는 큰 예측 오차를 감소시킴으로써 변환 양자화의 진행을 통해 충분한 공간적 반복 감소를 획득하는 방법 및 장치를 제공할 수 있다.One embodiment can provide a method and apparatus for obtaining sufficient spatial iteration reduction through the progress of transform quantization by reducing large prediction errors generated in the prediction direction.
일 측에 있어서, 현재 블록, 제1 예측 및 제2 예측에 기반하여 현재 블록의 잔차 신호를 생성하는 단계; 및 상기 잔차 신호에 대한 부호화를 수행함으로써 부호화된 잔차 신호에 대한 정보를 생성하는 단계를 포함하고, 상기 제2 예측은 상기 제1 예측의 예측 오차에 대한 예측인, 부호화 방법이 제공된다.The method of claim 1, further comprising: generating a residual signal of the current block based on the current block, the first prediction, and the second prediction; And generating information on the encoded residual signal by performing encoding on the residual signal, wherein the second prediction is a prediction for a prediction error of the first prediction.
다른 일 측에 있어서, 현재 블록에 대한 복원된 잔차 신호를 생성하는 복원된 잔차 신호 생성부; 및 상기 복원된 잔차 신호, 제2 예측 및 제1 예측에 기반하여 현재 블록에 대한 복원된 블록을 생성하는 복원된 블록 생성부를 포함하는, 복호화 방법이 제공된다.On the other side, the restored residual signal generator for generating a restored residual signal for the current block; And a reconstructed block generator that generates a reconstructed block for the current block based on the reconstructed residual signal, the second prediction, and the first prediction.
또 다른 일 측에 있어서, 현재 블록에 대한 복원된 잔차 신호를 생성하는 단계; 및 상기 복원된 잔차 신호, 제2 예측 및 제1 예측에 기반하여 현재 블록에 대한 복원된 블록을 생성하는 단계를 포함하는, 복호화 방법이 제공된다.In another aspect, generating a reconstructed residual signal for a current block; And generating a reconstructed block for the current block based on the reconstructed residual signal, the second prediction, and the first prediction.
상기 복원된 블록은 상기 복원된 잔차 신호, 상기 제1 예측에 의해 생성된 제1 예측 신호 및 상기 제2 예측에 의해 생성된 제2 예측 신호의 합에 대응할 수 있다.The reconstructed block may correspond to the sum of the reconstructed residual signal, the first prediction signal generated by the first prediction, and the second prediction signal generated by the second prediction.
상기 제1 예측 및 상기 제2 예측은 인트라 예측일 수 있다.The first prediction and the second prediction may be intra prediction.
상기 제2 예측의 예측 방향은 상기 제1 예측 방향과 동일할 수 있다.The prediction direction of the second prediction may be the same as the first prediction direction.
제1 예측의 복수의 제1 참조 블록들 및 제2 예측의 복수의 제2 참조 블록들 중 적어도 일부는 서로 상이할 수 있다.At least some of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction may be different from each other.
제1 예측의 제1 참조 블록의 종류 및 제2 예측의 제2 참조 블록의 종류는 서로 상이할 수 있다.The type of the first reference block of the first prediction and the type of the second reference block of the second prediction may be different from each other.
제1 예측의 제1 참조 블록은 현재 블록에 이웃한 복원된 이웃 블록일 수 있다.The first reference block of the first prediction may be a reconstructed neighboring block neighboring the current block.
제2 예측의 제2 참조 블록은 현재 블록에 이웃한 복원된 이웃 잔차 블록일 수 있다.The second reference block of the second prediction may be a reconstructed neighbor residual block neighboring the current block.
상기 복원된 이웃 잔차 블록은 상기 복원된 이웃 블록 및 상기 복원된 이웃 블록의 제1 예측 블록 간의 차분일 수 있다.The reconstructed neighboring residual block may be a difference between the reconstructed neighboring block and the first prediction block of the reconstructed neighboring block.
상기 제2 예측의 참조 샘플의 영역은 상기 제1 예측의 참조 샘플의 영역의 일부일 수 있다.The area of the reference sample of the second prediction may be part of the area of the reference sample of the first prediction.
상기 제2 예측이 적용될 영역은 상기 제2 예측에 사용되는 참조 샘플들의 범위에 기반하여 특정될 수 있다.The region to which the second prediction is to be applied may be specified based on a range of reference samples used for the second prediction.
상기 제2 예측이 적용될 영역은 상기 제2 예측의 예측 방향에 기반하여 특정될 수 있다.An area to which the second prediction is to be applied may be specified based on a prediction direction of the second prediction.
상기 참조 샘플들의 범위는 상기 제2 예측에 사용될 첫 번째의 참조 샘플을 가리키는 정보 및 상기 제2 예측에 사용될 참조 샘플의 개수를 가리키는 정보에 의해 특정되는, 복호화 방법.And the range of reference samples is specified by information indicating a first reference sample to be used for the second prediction and information indicating the number of reference samples to be used for the second prediction.
상기 제2 예측이 적용될 영역은 상기 범위의 참조 샘플들이 제2 예측의 예측 방향으로 진행함에 따라 생성된 영역일 수 있다.The region to which the second prediction is to be applied may be a region generated as the reference samples of the range proceed in the prediction direction of the second prediction.
상기 범위의 바깥의 참조 샘플의 값은 널 또는 0으로 간주될 수 있다.Values of reference samples outside this range may be considered null or zero.
상기 현재 블록의 부호화에 있어서 상기 제2 예측의 사용 여부를 나타내는 제2 예측 사용 정보가 상기 제2 예측을 사용하지 않는다는 것을 나타내는 경우 상기 제2 예측은 사용되지 않을 수 있다.When the second prediction usage information indicating whether the second prediction is used in encoding the current block indicates that the second prediction is not used, the second prediction may not be used.
상기 제1 예측의 예측 모드가 비방향성 모드이면 상기 제2 예측은 사용되지 않을 수 있다.If the prediction mode of the first prediction is a non-directional mode, the second prediction may not be used.
상기 현재 블록이 상단의 경계 및 좌측의 경계에 인접하면 상기 제2 예측은 사용되지 않을 수 있다.If the current block is adjacent to an upper boundary and a left boundary, the second prediction may not be used.
상기 경계는 픽쳐의 경계, 슬라이스의 경계 또는 타일의 경계일 수 있다.The boundary may be a boundary of a picture, a boundary of a slice, or a boundary of a tile.
상기 제2 예측이 사용될지 여부는 상기 현재 블록에 인접한 복원된 블록의 개수에 기반하여 결정될 수 있다.Whether the second prediction is to be used may be determined based on the number of reconstructed blocks adjacent to the current block.
상기 제2 예측이 사용되지 않은 경우 상기 복원된 블록은 상기 복원된 잔차 신호 및 상기 제1 예측에 의한 제1 예측 신호에 기반하여 생성될 수 있다.When the second prediction is not used, the reconstructed block may be generated based on the reconstructed residual signal and the first prediction signal by the first prediction.
예측에 의해 발생하는 예측 단위의 예측 오차를 감소시키는 방법 및 장치가 제공된다.A method and apparatus are provided for reducing a prediction error of a prediction unit generated by prediction.
예측 모드의 예측 방향에 의해 발생하는 예측 오차를 감소시키는 방법 및 장치가 제공된다.A method and apparatus are provided for reducing a prediction error caused by a prediction direction of a prediction mode.
제1 예측에 따른 예측 오차에 대해 제1 예측 모드의 방향으로 선택적인 제2 예측을 수행하는 방법 및 장치가 제공된다.A method and apparatus are provided for performing selective second prediction in a direction of a first prediction mode with respect to a prediction error according to the first prediction.
제1 예측에 따른 예측 오차 중 일부에 대해 선택적인 제2 예측을 수행하는 방법 및 장치가 제공된다.A method and apparatus are provided for performing a selective second prediction on some of the prediction errors according to the first prediction.
제1 예측에 따른 예측 오차 중 왜곡이 심한 부분에 대해 선택적인 제2 예측을 수행하는 방법 및 장치가 제공된다.Provided are a method and an apparatus for performing selective second prediction on a portion of a distortion that is severe among prediction errors according to a first prediction.
제1 예측에 따른 예측 오차 중 일부에 대해서만 선택적인 제2 예측을 수행함으로써 예측 오차의 전체에 대해 제2 예측을 수행할 경우에 발생할 수 있는 추가적인 예측 오차를 방지하는 방법 및 장치가 제공된다.A method and apparatus are provided for preventing additional prediction errors that may occur when performing a second prediction on the entirety of the prediction error by performing a second prediction selectively for only a part of the prediction errors according to the first prediction.
예측 방향으로 생성되는 큰 예측 오차를 감소시킴으로써 변환 양자화의 진행을 통해 충분한 공간적 반복 감소를 획득하는 방법 및 장치가 제공된다.A method and apparatus are provided for obtaining sufficient spatial iteration reduction through the progress of transform quantization by reducing large prediction errors generated in the prediction direction.
도 1은 본 발명이 적용되는 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.1 is a block diagram illustrating a configuration of an encoding apparatus according to an embodiment of the present invention.
도 2는 본 발명이 적용되는 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.2 is a block diagram illustrating a configuration of a decoding apparatus according to an embodiment of the present invention.
도 3은 영상을 부호화 및 복호화할 때의 영상의 분할 구조를 개략적으로 나타내는 도면이다.3 is a diagram schematically illustrating a division structure of an image when encoding and decoding an image.
도 4는 코딩 유닛(CU)이 포함할 수 있는 예측 유닛(PU)의 형태를 도시한 도면이다.4 is a diagram illustrating a form of a prediction unit PU that a coding unit CU may include.
도 5는 코딩 유닛(CU)에 포함될 수 있는 변환 유닛(TU)의 형태를 도시한 도면이다.FIG. 5 is a diagram illustrating a form of a transform unit (TU) that may be included in a coding unit (CU).
도 6은 인트라 예측 과정의 실시예를 설명하기 위한 도면이다.6 is a diagram for explaining an embodiment of an intra prediction process.
도 7은 인트라 예측 과정에서 사용되는 참조 샘플의 위치를 설명하기 위한 도면이다.7 is a diagram for describing a position of a reference sample used in an intra prediction process.
도 8은 인터 예측 과정의 실시예를 설명하기 위한 도면이다.8 is a diagram for explaining an embodiment of an inter prediction process.
도 9는 일 예에 따른 원본 영상이 수직 방향으로 예측된 경우의 예측 오차를 나타낸다.9 illustrates a prediction error when the original image is predicted in the vertical direction according to an example.
도 10은 일 실시예에 따른 부호화 장치의 구조도이다.10 is a structural diagram of an encoding apparatus according to an embodiment.
도 11은 일 실시예에 따른 부호화 방법의 흐름도이다.11 is a flowchart of an encoding method according to an embodiment.
도 12는 일 실시예에 따른 인트라 예측을 사용하는 제1 예측 및 제2 예측을 나타낸다.12 illustrates first prediction and second prediction using intra prediction, according to an embodiment.
도 13은 일 실시예에 따른 잔차 블록의 생성 방법의 흐름도이다.13 is a flowchart of a method of generating a residual block, according to an exemplary embodiment.
도 14는 일 예에 따른 복원된 블록의 생성 방법의 흐름도이다.14 is a flowchart of a method of generating a restored block, according to an example.
도 15는 일 실시예에 따른 부호화 과정을 도시한다.15 illustrates an encoding process according to an embodiment.
도 16은 일 실시예에 따른 복호화 장치의 구조도이다.16 is a structural diagram of a decoding apparatus according to an embodiment.
도 17은 일 실시예에 따른 복호화 방법의 흐름도이다.17 is a flowchart of a decoding method according to an embodiment.
도 18은 일 실시예에 따른 복원된 블록의 생성 방법의 흐름도이다.18 is a flowchart of a method of generating a restored block, according to an exemplary embodiment.
도 19는 일 실시예에 따른 복호화 과정을 도시한다.19 illustrates a decoding process according to an embodiment.
후술하는 예시적 실시예들에 대한 상세한 설명은, 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 실시예를 실시할 수 있기에 충분하도록 상세히 설명된다. 다양한 실시예들은 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 실시예의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 예시적 실시예들의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다.DETAILED DESCRIPTION For the following detailed description of exemplary embodiments, reference is made to the accompanying drawings that show, by way of illustration, specific embodiments. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments are different but need not be mutually exclusive. For example, certain shapes, structures, and characteristics described herein may be embodied in other embodiments without departing from the spirit and scope of the invention with respect to one embodiment. In addition, it is to be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the embodiments. The following detailed description, therefore, is not to be taken in a limiting sense, and the scope of the exemplary embodiments, if properly described, is defined only by the appended claims, along with the full scope of equivalents to which such claims are entitled.
도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다. 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다.Like reference numerals in the drawings refer to the same or similar functions throughout the several aspects. Shape and size of the elements in the drawings may be exaggerated for clarity.
어떤 구성요소(component)가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 상기의 2개의 구성요소들이 서로 간에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있으나, 상기의 2개의 구성요소들의 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 또한, 예시적 실시예들에서 특정 구성을 "포함"한다고 기술하는 내용은 상기의 특정 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 예시적 실시예들의 실시 또는 예시적 실시예들의 기술적 사상의 범위에 포함될 수 있음을 의미한다.When a component is said to be "connected" or "connected" to another component, the above two components may be directly connected to or connected to each other, It is to be understood that other components may exist in the middle of the two components. In addition, the description "including" a specific configuration in the exemplary embodiments does not exclude a configuration other than the specific configuration described above, the additional configuration is the implementation of the exemplary embodiments or the technical spirit of the exemplary embodiments. It can be included in the range.
제1 및 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기의 구성요소들은 상기의 용어들에 의해 한정되어서는 안 된다. 상기의 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하여 지칭하기 위해서 사용된다. 예를 들어, 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.Terms such as first and second may be used to describe various components, but the above components should not be limited by the above terms. The above terms are used to distinguish one component from another component. For example, without departing from the scope of rights, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
또한 실시예들에 나타나는 구성요소들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성요소가 분리된 하드웨어나 하나의 소프트웨어 구성 단위로만 이루어짐을 의미하지 않는다. 즉, 각 구성요소는 설명의 편의상 각각의 구성요소로 나열된 것이다. 예를 들면, 구성요소들 중 적어도 두 개의 구성요소들이 하나의 구성요소로 합쳐질 수 있다. 또한, 하나의 구성요소가 복수의 구성요소들로 나뉠 수 있다. 이러한 각 구성요소의 통합된 실시예 및 분리된 실시예 또한 본질에서 벗어나지 않는 한 권리범위에 포함된다.In addition, the components shown in the embodiments are shown independently to represent different characteristic functions, and do not mean that each component is composed of only separate hardware or one software component unit. That is, each component is listed as each component for convenience of description. For example, at least two of the components may be combined into one component. In addition, one component may be divided into a plurality of components. The integrated and separated embodiments of each of these components are also included in the scope of the present invention without departing from the essence.
또한, 일부의 구성요소는 본질적인 기능을 수행하는 필수적인 구성요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성요소일 수 있다. 실시예들은 실시예의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 예를 들면, 단지 성능 향상을 위해 사용되는 구성요소와 같은, 선택적 구성요소가 제외된 구조 또한 권리 범위에 포함된다.In addition, some of the components may not be essential components for performing essential functions, but may be optional components for improving performance. Embodiments may be implemented including only components necessary to implement the nature of the embodiments, and structures including the optional components, such as, for example, components used only for performance improvement, are also included in the scope of rights.
이하에서는, 기술분야에서 통상의 지식을 가진 자가 실시예들을 용이하게 실시할 수 있도록 하기 위하여, 첨부된 도면을 참조하여 실시예들을 상세히 설명하기로 한다. 실시예들을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, in order to enable those skilled in the art to easily implement the embodiments, embodiments will be described in detail with reference to the accompanying drawings. In describing the embodiments, when it is determined that the detailed description of the related well-known configuration or function may obscure the subject matter of the present specification, the detailed description thereof will be omitted.
이하에서, 영상은 비디오(video)을 구성하는 하나의 픽쳐(picture)를 의미할 수 있으며, 비디오 자체를 나타낼 수도 있다. 예를 들면, "영상의 부호화 및/또는 복호화"는 "비디오의 부호화 및/또는 복호화"를 의미할 수 있으며, "비디오를 구성하는 영상들 중 하나의 영상의 부호화 및/또는 복호화"를 의미할 수도 있다.In the following description, an image may mean one picture constituting a video and may represent a video itself. For example, "encoding and / or decoding of an image" may mean "encoding and / or decoding of a video" and may mean "encoding and / or decoding of one of images constituting the video." It may be.
이하에서, "비디오" 및 "동영상(motion picture)"은 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다.Hereinafter, "video" and "motion picture" may be used interchangeably and may be used interchangeably.
이하에서, "영상", "픽쳐", "프레임(frame)" 및 "스크린(screen)"은 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다.Hereinafter, "image", "picture", "frame" and "screen" may be used in the same sense, and may be used interchangeably.
실시예들에서, 특정된 정보, 데이터, 플래그(flag) 및 요소(element), 속성(attribute) 등의 각각은 값을 가질 수 있다. 정보, 데이터, 플래그(flag) 및 요소(element), 속성(attribute) 등의 값 "0"은 논리 거짓(logical false) 또는 제1 기정의된(predefined) 값을 나타낼 수 있다. 말하자면, 값 "0", 논리 거짓 및 제1 기정의된 값은 서로 대체되어 사용될 수 있다. 정보, 데이터, 플래그(flag) 및 요소(element), 속성(attribute) 등의 값 "1"은 논리 참(logical true) 또는 제2 기정의된(predefined) 값을 나타낼 수 있다. 말하자면, 값 "1", 논리 참 및 제2 기정의된 값은 서로 대체되어 사용될 수 있다.In embodiments, each of the specified information, data, flags and elements, attributes, etc. may have a value. The value "0" of information, data, flags and elements, attributes, etc. may represent a logical false or first predefined value. In other words, the value "0", logic false and the first predefined value can be used interchangeably. The value "1" of information, data, flags and elements, attributes, etc. may represent logical true or second predefined values. In other words, the value "1", the logical true and the second predefined value can be used interchangeably.
행, 열 또는 인덱스(index)를 나타내기 위해 i 또는 j 등의 변수가 사용될 -, i의 값은 0 이상의 정수일 수 있으며, 1 이상의 정수일 수도 있다. 말하자면, 실시예들에서 행, 열 및 인덱스 등은 0에서부터 카운트될 수 있으며, 1에서부터 카운트될 수 있다.A variable such as i or j may be used to indicate a row, column or index, and the value of i may be an integer of 0 or more and may be an integer of 1 or more. In other words, in embodiments, rows, columns, indexes, etc. may be counted from zero and counted from one.
아래에서는, 실시예들에서 사용되는 용어가 설명된다.In the following, terms used in the embodiments are described.
유닛(unit): "유닛"은 영상의 부호화 및 복호화의 단위를 나타낼 수 있다. 유닛 및 블록(block)의 의미들은 동일할 수 있다. 또한, 용어 "유닛" 및 "블록"은 서로 교체되어 사용될 수 있다.Unit: A “unit” may represent a unit of encoding and decoding of an image. The meanings of the unit and the block may be the same. In addition, the terms "unit" and "block" may be used interchangeably.
- 유닛(또는, 블록)은 샘플의 MxN 배열일 수 있다. M 및 N은 각각 양의 정수일 수 있다. 유닛은 흔히 2차원의 샘플의 배열을 의미할 수 있다. 샘플은 픽셀 또는 픽셀 값일 수 있다.The unit (or block) may be an M × N array of samples. M and N may each be a positive integer. A unit can often mean an array of two-dimensional samples. The sample may be a pixel or pixel value.
- 용어 "픽셀" 및 "샘플"은 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다.-The terms "pixel" and "sample" can be used interchangeably and can be used interchangeably.
- 영상의 부호화 및 복호화에 있어서, 유닛은 하나의 영상의 분할에 의해 생성된 영역일 수 있다. 하나의 영상은 복수의 유닛들로 분할될 수 있다. 영상의 부호화 및 복호화에 있어서, 유닛의 종류에 따라서 유닛에 대한 기정의된 처리가 수행될 수 있다. 기능에 따라서, 유닛의 타입은 매크로 유닛(Macro Unit), 코딩 유닛(Coding Unit; CU), 예측 유닛(Prediction Unit; PU) 및 변환 유닛(transform Unit; TU) 등으로 분류될 수 있다. 하나의 유닛은 유닛에 비해 더 작은 크기를 갖는 하위 유닛으로 더 분할될 수 있다.In encoding and decoding of an image, a unit may be an area generated by division of one image. One image may be divided into a plurality of units. In the encoding and decoding of the image, a predefined process for the unit may be performed according to the type of the unit. Depending on the function, the type of unit may be classified into a macro unit, a coding unit (CU), a prediction unit (PU), a transform unit (TU), and the like. One unit may be further divided into subunits having a smaller size than the unit.
- 유닛 분할 정보는 유닛의 깊이(depth)에 관한 정보를 포함할 수 있다. 깊이 정보는 유닛이 분할되는 회수 및/또는 정도를 나타낼 수 있다.The unit division information may include information about the depth of the unit. The depth information may indicate the number and / or degree of division of the unit.
- 하나의 유닛은 트리 구조(tree structure)에 기반하여 깊이 정보(depth)를 가지면서 계층적으로 복수의 하위 유닛들로 분할될 수 있다. 말하자면, 유닛 및 상기의 유닛의 분할에 의해 생성된 하위 유닛은 노드 및 상기의 노드의 자식 노드에 각각 대응할 수 있다. 각각의 분할된 하위 유닛은 깊이 정보를 가질 수 있다. 유닛의 깊이 정보는 유닛이 분할된 회수 및/또는 정도를 나타내므로, 하위 유닛의 분할 정보는 하위 유닛의 크기에 관한 정보를 포함할 수도 있다.One unit may be divided into a plurality of sub-units hierarchically with depth information based on a tree structure. In other words, the unit and the lower unit generated by the division of the unit may correspond to the node and the child node of the node, respectively. Each divided subunit may have depth information. Since the depth information of the unit indicates the number and / or degree of division of the unit, the division information of the lower unit may include information about the size of the lower unit.
- 트리 구조에서, 가장 상위 노드는 분할되지 않은 최초의 유닛에 대응할 수 있다. 가장 상위 노드는 루트 노드(root node)로 칭해질 수 있다. 또한, 가장 상위 노드는 최소의 깊이 값을 가질 수 있다. 이 때, 가장 상위 노드는 레벨 0의 깊이를 가질 수 있다. In the tree structure, the highest node may correspond to the first unit that is not split. The highest node may be referred to as a root node. In addition, the highest node may have a minimum depth value. At this time, the highest node may have a depth of level 0.
- 레벨 1의 깊이를 갖는 노드는 최초의 유닛이 한 번 분할됨에 따라 생성된 유닛을 나타낼 수 있다. 레벨 2의 깊이를 갖는 노드는 최초의 유닛이 두 번 분할됨에 따라 생성된 유닛을 나타낼 수 있다.A node with a depth of level 1 may represent a unit created as the first unit is divided once. A node with a depth of level 2 may represent a unit created as the first unit is split twice.
- 레벨 n의 깊이를 갖는 노드는 최초의 유닛이 n번 분할됨에 따라 생성된 유닛을 나타낼 수 있다.A node with a depth of level n may represent a unit generated as the first unit is divided n times.
- 리프 노드는 가장 하위의 노드일 수 있으며, 더 분할될 수 없는 노드일 수 있다. 리프 노드의 깊이는 최대 레벨일 수 있다. 예를 들면, 최대 레벨의 기정의된 값은 3일 수 있다.The leaf node may be the lowest node or may be a node that cannot be further divided. The depth of the leaf node may be at the maximum level. For example, the predefined value of the maximum level may be three.
변환 유닛(Transform Unit): 변환 유닛은 변환, 역변환, 양자화, 역양자화, 변환 계수 부호화, 및 변환 계수 복호화 등과 같은 잔차 신호(residual signal) 부호화 및/또는 잔여 신호 복호화에 있어서의 기본 유닛일 수 있다. 하나의 변환 유닛은 더 작은 크기를 갖는 다수의 변환 유닛들 분할될 수 있다.Transform Unit: A transform unit may be a basic unit in residual signal coding and / or residual signal decoding such as transform, inverse transform, quantization, inverse quantization, transform coefficient encoding, and transform coefficient decoding. . One transform unit may be divided into a plurality of transform units having a smaller size.
예측 유닛(Prediction Unit) : 예측 유닛은 예측 또는 보상(compensation)의 수행에 있어서의 기본 단위일 수 있다. 예측 유닛은 분할에 의해 다수의 파티션(partition)들이 될 수 있다. 다수의 파티션들 또한 예측 또는 보상의 수행에 있어서의 기본 단위일 수 있다. 예측 유닛의 분할에 의해 생성된 파티션 또한 예측 유닛일 수 있다.Prediction Unit A prediction unit may be a basic unit in performing prediction or compensation. The prediction unit can be a number of partitions by partitioning. Multiple partitions may also be the basic unit in performing prediction or compensation. The partition generated by the partitioning of the prediction unit may also be the prediction unit.
복원된 이웃 유닛(Reconstructed Neighbor Unit) : 복원된 이웃 유닛은 부호화 대상 유닛 또는 복호화 대상 유닛의 주변에 이미 부호화 또는 복호화되어 복원된 유닛일 수 있다. 복원된 이웃 유닛은 대상 유닛에 대한 공간적(spatial) 인접 유닛 또는 시간적(temporal) 인접 유닛일 수 있다.Reconstructed Neighbor Unit: The reconstructed neighbor unit may be a unit that has already been encoded or decoded around the encoding target unit or the decoding target unit. The reconstructed neighbor unit may be a spatial neighbor unit or a temporal neighbor unit to the target unit.
예측 유닛 파티션 : 예측 유닛 파티션은 예측 유닛이 분할된 형태를 의미할 수 있다.Prediction unit partition: A prediction unit partition may mean a form in which a prediction unit is divided.
파라미터 세트(Parameter Set): 파라미터 세트는 비트스트림 내의 구조(structure) 중 헤더(header) 정보에 해당할 수 있다. 예를 들면, 파라미터 세트는 시퀀스 파라미터 세트(sequence parameter set), 픽쳐 파라미터 세트(picture parameter set) 및 적응 파라미터 세트(adaptation parameter set) 등을 포함할 수 있다.Parameter Set: A parameter set may correspond to header information among structures in the bitstream. For example, the parameter set may include a sequence parameter set, a picture parameter set, an adaptation parameter set, and the like.
율-왜곡 최적화(rate-distortion optimization): 부호화 장치는 코딩 유닛의 크기, 예측 모드, 예측 유닛의 크기, 움직임 정보 및, 변환 유닛의 크기 등의 조합을 이용해서 높은 부호화 효율을 제공하기 위해 율-왜곡 최적화를 사용할 수 있다.Rate-distortion optimization: The encoding apparatus uses a combination of the size of the coding unit, the prediction mode, the size of the prediction unit, the motion information, and the size of the transform unit to provide high coding efficiency. Distortion optimization can be used.
- 율-왜곡 최적화 방식은 상기의 조합들 중에서 최적의 조합을 선택하기 위해 각 조합의 율-왜곡 비용(rate-distortion cost)을 계산할 수 있다. 율-왜곡 비용은 아래의 수학식 1을 이용하여 계산될 수 있다. 일반적으로 상기 율-왜곡 비용이 최소가 되는 조합이 율-왜곡 최적화 방식에 있어서의 최적의 조합으로 선택될 수 있다.The rate-distortion optimization method can calculate the rate-distortion cost of each combination in order to select the optimal combination among the above combinations. The rate-distortion cost may be calculated using Equation 1 below. In general, a combination in which the rate-distortion cost is minimized may be selected as an optimal combination in the rate-distortion optimization scheme.
Figure PCTKR2017000965-appb-M000001
Figure PCTKR2017000965-appb-M000001
D는 왜곡을 나타낼 수 있다. D는 변환 블록 내에서 원래의 변환 계수들 및 복원된 변환 계수들 간의 차이 값들의 제곱들의 평균(mean square error)일 수 있다.D may represent distortion. D may be the mean square error of the squares of difference values between the original transform coefficients and the reconstructed transform coefficients in the transform block.
R은 율을 나타낼 수 있다. R은 관련된 문맥 정보를 이용한 비트 율을 나타낼 수 있다.R can represent the rate. R may indicate a bit rate using the associated context information.
λ는 라그랑지안 승수(Lagrangian multiplier)를 나타낼 수 있다. R은 예측 모드, 움직임 정보 및 부호화 블록 플래그(coded block flag) 등과 같은 부호화 파라미터 정보뿐만 아니라, 변환 계수의 부호화에 의해 발생하는 비트도 포함할 수 있다.λ may represent a Lagrangian multiplier. R may include not only encoding parameter information such as a prediction mode, motion information, and a coded block flag, but also bits generated by encoding of transform coefficients.
부호화 장치는 정확한 D 및 R을 계산하기 위해 인터 예측 및/또는 인트라 예측, 변환, 양자화, 엔트로피 부호화, 역양자화, 역변환 등의 과정을 수행하는데, 이러한 과정은 부호화 장치에서의 복잡도를 크게 증가시킬 수 있다.The encoding apparatus performs processes such as inter prediction and / or intra prediction, transformation, quantization, entropy encoding, inverse quantization, and inverse transformation to calculate accurate D and R, which can greatly increase the complexity in the encoding apparatus. have.
참조 픽쳐(reference picture) : 참조 픽쳐는 인터 예측 또는 움직임 보상에 사용되는 영상일 수 있다. 참조 픽쳐는 인터 예측 또는 움직임 보상을 위해 대상 유닛이 참조하는 참조 유닛을 포함하는 픽쳐일 수 있다. 픽쳐 및 영상의 의미들은 동일할 수 있다. 또한, 용어 "픽쳐" 및 "영상"은 서로 교체되어 사용될 수 있다.Reference picture: The reference picture may be an image used for inter prediction or motion compensation. The reference picture may be a picture including a reference unit referenced by the target unit for inter prediction or motion compensation. The meanings of the picture and the image may be the same. In addition, the terms "picture" and "image" may be used interchangeably.
참조 픽쳐 리스트(reference picture list) : 참조 픽쳐 리스트는 인터 예측 또는 움직임 보상에 사용되는 참조 영상들을 포함하는 리스트일 수 있다. 참조 픽쳐 리스트의 종류는 리스트 조합(List Combined; LC), 리스트 0(List 0; L0) 및 리스트 1(List 1; L1) 등이 있을 수 있다.Reference picture list: The reference picture list may be a list including reference pictures used for inter prediction or motion compensation. The type of the reference picture list may be List Combined (LC), List 0 (List 0; L0), List 1 (List 1; L1), and the like.
움직임 벡터(Motion Vector; MV) : 움직임 벡터는 인터 예측에서 사용되는 2차원의 벡터일 수 있다. 예를 들면, MV는 (mvx, mvy)와 같은 형태로 표현될 수 있다. mvx는 수평(horizontal) 성분을 나타낼 수 있고, mvy 는 수직(vertical) 성분을 나타낼 수 있다.Motion Vector (MV): The motion vector may be a two-dimensional vector used in inter prediction. For example, MV may be expressed in the form of (mv x , mv y ). mv x may represent a horizontal component and mv y may represent a vertical component.
- MV는 대상 픽쳐 및 참조 픽쳐 간의 오프셋(offset)을 나타낼 수 있다.The MV may indicate an offset between the target picture and the reference picture.
탐색 영역(search range) : 탐색 영역은 인터 예측 중 MV에 대한 탐색이 이루어지는 2차원의 영역일 수 있다. 예를 들면, 탐색 영역의 크기는 MxN일 수 있다. M 및 N은 각각 양의 정수일 수 있다.Search range: The search range may be a two-dimensional area in which a search for MV is performed during inter prediction. For example, the size of the search region may be M × N. M and N may each be a positive integer.
도 1은 본 발명이 적용되는 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.1 is a block diagram illustrating a configuration of an encoding apparatus according to an embodiment of the present invention.
부호화 장치(100)는 비디오 부호화 장치 또는 영상 부호화 장치일 수 있다. 비디오는 하나 이상의 영상들을 포함할 수 있다. 부호화 장치(110)는 비디오의 하나 이상의 영상들을 시간에 따라 순차적으로 부호화할 수 있다.The encoding apparatus 100 may be a video encoding apparatus or an image encoding apparatus. The video may include one or more images. The encoding apparatus 110 may sequentially encode one or more images of the video over time.
도 1을 참조하면, 부호화 장치(100)는 인터 예측부(110), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 복호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽쳐 버퍼(190)를 포함할 수 있다.Referring to FIG. 1, the encoding apparatus 100 may include an inter predictor 110, an intra predictor 120, a switch 115, a subtractor 125, a transformer 130, a quantizer 140, and entropy decoding. The unit 150 may include an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.
부호화 장치(100)는 입력 영상에 대해 인트라 모드 및/또는 인터 모드로 부호화를 수행할 수 있다. 입력 영상은 현재 부호화의 대상인 현재 영상으로 칭해질 수 있다.The encoding apparatus 100 may encode the input image in an intra mode and / or an inter mode. The input image may be referred to as a current image that is a target of current encoding.
또한, 부호화 장치(100)는 입력 영상에 대한 부호화를 통해 부호화의 정보를 포함하는 비트스트림을 생성할 수 있고, 생성된 비트스트림을 출력할 수 있다.In addition, the encoding apparatus 100 may generate a bitstream including encoding information by encoding the input image, and may output the generated bitstream.
인트라 모드가 사용되는 경우, 스위치(115)는 인트라로 전환될 수 있다. 인터 모드가 사용되는 경우, 스위치(115)는 인터로 전환될 수 있다.When the intra mode is used, the switch 115 can be switched to intra. When the inter mode is used, the switch 115 can be switched to inter.
부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성할 수 있다. 또한, 부호화 장치(100)는 예측 블록이 생성된 후, 입력 블록 및 예측 블록의 차분(residual)을 부호화할 수 있다. 입력 블록은 현재 부호화의 대상인 현재 블록으로 칭해질 수 있다.The encoding apparatus 100 may generate a prediction block for the input block of the input image. In addition, after the prediction block is generated, the encoding apparatus 100 may encode a residual between the input block and the prediction block. The input block may be referred to as a current block that is a target of current encoding.
예측 모드가 인트라 모드인 경우, 인트라 예측부(120)는 현재 블록의 주변에 있는, 이미 부호화된 블록의 픽셀 값을 참조 픽셀로서 이용할 수 있다. 인트라 예측부(120)는 참조 픽셀을 이용하여 현재 블록에 대한 공간적 예측을 수행할 수 있고, 공간적 예측을 통해 현재 블록에 대한 예측 샘플들을 생성할 수 있다.When the prediction mode is the intra mode, the intra prediction unit 120 may use a pixel value of an already encoded block in the vicinity of the current block as a reference pixel. The intra predictor 120 may perform spatial prediction on the current block by using the reference pixel, and generate prediction samples on the current block through spatial prediction.
인터 예측부(110)는 움직임 예측부 및 움직임 보상부를 포함할 수 있다.The inter predictor 110 may include a motion predictor and a motion compensator.
예측 모드가 인터 모드인 경우, 움직임 예측부는, 움직임 예측 과정에서 참조 영상으로부터 현재 블록과 가장 매치가 잘 되는 영역을 검색할 수 있고, 현재 블록 및 검색된 영역에 대한 움직임 벡터를 도출할 수 있다. 참조 영상은 참조 픽쳐 버퍼(190)에 저장될 수 있으며, 참조 영상에 대한 부호화 및/또는 복호화가 처리될 때 참조 픽쳐 버퍼(190)에 저장될 수 있다.When the prediction mode is the inter mode, the motion predictor may search an area that best matches the current block from the reference image in the motion prediction process, and may derive a motion vector for the current block and the searched area. The reference picture may be stored in the reference picture buffer 190 and may be stored in the reference picture buffer 190 when encoding and / or decoding of the reference picture is processed.
움직임 보상부는 움직임 벡터를 이용하는 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 여기에서, 움직임 벡터는 인터 예측에 사용되는 2차원 벡터일 수 있다. 또한 움직임 벡터는 현재 영상 및 참조 영상 간의 오프셋(offset)을 나타낼 수 있다.The motion compensator may generate a prediction block by performing motion compensation using a motion vector. Here, the motion vector may be a two-dimensional vector used for inter prediction. In addition, the motion vector may indicate an offset between the current picture and the reference picture.
감산기(125)는 입력 블록 및 예측 블록의 차분인 잔차 블록(residual block)을 생성할 수 있다. 잔차 블록은 잔차 신호로 칭해질 수도 있다.The subtractor 125 may generate a residual block that is a difference between the input block and the prediction block. The residual block may be referred to as a residual signal.
변환부(130)는 잔차 블록에 대해 변환(transform)을 수행하여 변환 계수를 생성할 수 있고, 생성된 변환 계수(transform coefficient)를 출력할 수 있다. 여기서, 변환 계수는 잔차 블록에 대한 변환을 수행함으로써 생성된 계수 값일 수 있다. 변환 생략(transform skip) 모드가 적용되는 경우, 변환부(130)는 잔차 블록에 대한 변환을 생략할 수도 있다.The transform unit 130 may generate transform coefficients by performing transform on the residual block, and output the generated transform coefficients. Here, the transform coefficient may be a coefficient value generated by performing transform on the residual block. When the transform skip mode is applied, the transform unit 130 may omit the transform on the residual block.
변환 계수에 양자화를 적용함으로써 양자화된 변환 계수 레벨(transform coefficient level)이 생성될 수 있다. 이하, 실시예들에서는 양자화된 변환 계수 레벨도 변환 계수로 칭해질 수 있다.Quantized transform coefficient levels may be generated by applying quantization to the transform coefficients. In the following embodiments, the quantized transform coefficient level may also be referred to as transform coefficient.
양자화부(140)는 변환 계수를 양자화 파라미터에 맞춰 양자화함으로써 양자화된 변환 계수 레벨(quantized transform coefficient level)을 생성할 수 있다. 양자화부(140)는 생성된 양자화된 변환 계수 레벨을 출력할 수 있다. 이때, 양자화부(140)에서는 양자화 행렬을 사용하여 변환 계수를 양자화할 수 있다.The quantization unit 140 may generate a quantized transform coefficient level by quantizing the transform coefficients according to the quantization parameter. The quantization unit 140 may output the generated quantized transform coefficient level. In this case, the quantization unit 140 may quantize the transform coefficients using the quantization matrix.
엔트로피 복호화부(150)는, 양자화부(140)에서 산출된 값들 및/또는 부호화 과정에서 산출된 부호화 파라미터 값들 등에 기초하여 확률 분포에 따른 엔트로피 부호화를 수행함으로써 비트스트림(bitstream)을 생성할 수 있다. 엔트로피 복호화부(150)는 생성된 비트스트림을 출력할 수 있다.The entropy decoder 150 may generate a bitstream by performing entropy encoding according to a probability distribution based on the values calculated by the quantizer 140 and / or encoding parameter values calculated in the encoding process. . The entropy decoder 150 may output the generated bitstream.
엔트로피 복호화부(150)는 영상의 픽셀의 정보 외에 영상의 복호화를 위한 정보에 대한 엔트로피 부호화를 수행할 수 있다. 예를 들면, 영상의 복호화를 위한 정보는 신택스 엘리먼트(syntax element) 등을 포함할 수 있다. The entropy decoder 150 may perform entropy encoding on information for decoding an image in addition to information about pixels of an image. For example, the information for decoding the image may include a syntax element.
부호화 파라미터는 부호화 및/또는 복호화를 위해 요구되는 정보일 수 있다. 부호화 파라미터는 부호화 장치에서 부호화되어 복호화 장치로 전달되는 정보를 포함할 수 있고, 부호화 혹은 복호화 과정에서 유추될 수 있는 정보를 포함할 수 있다. 예를 들면, 복호화 장치로 전달되는 정보로서, 신택스 엘리먼트가 있다.The encoding parameter may be information required for encoding and / or decoding. The encoding parameter may include information encoded by the encoding apparatus and transmitted to the decoding apparatus, and may include information that may be inferred in the encoding or decoding process. For example, there is a syntax element as information transmitted to the decoding apparatus.
예를 들면, 부호화 파라미터는 예측 모드, 움직임 벡터, 참조 픽쳐 색인(index), 부호화 블록 패턴(pattern), 잔차 신호 유무, 변환 계수, 양자화된 변환 계수, 양자화 파라미터, 블록 크기, 블록 분할(partition) 정보 등의 값 또는 통계를 포함할 수 있다. 예측 모드는 인트라 예측 모드 또는 인터 예측 모드를 가리킬 수 있다.For example, coding parameters include prediction modes, motion vectors, reference picture indexes, coding block patterns, residual signals, transform coefficients, quantized transform coefficients, quantization parameters, block sizes, block partitions. It may include values or statistics such as information. The prediction mode may indicate an intra prediction mode or an inter prediction mode.
잔차 신호는 원 신호 및 예측 신호 간의 차이(difference)를 의미할 수 있다. 또는, 잔차 신호는 원신호 및 예측 신호 간의 차이를 변환(transform)함으로써 생성된 신호일 수 있다. 또는, 잔차 신호는 원 신호 및 예측 신호 간의 차이를 변환 및 양자화함으로써 생성된 신호일 수 있다. 잔차 블록은 블록 단위의 잔차 신호일 수 있다.The residual signal may mean a difference between the original signal and the prediction signal. Alternatively, the residual signal may be a signal generated by transforming a 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 in block units.
엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼에 적은 수의 비트가 할당될 수 있고, 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당될 수 있다. 이러한 할당을 통해 심볼이 표현됨에 따라, 부호화의 대상인 심볼들에 대한 비트열(bitstring)의 크기가 감소될 수 있다. 따라서, 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 향상될 수 있다. When entropy coding is applied, a small number of bits may be allocated to a symbol having a high occurrence probability, and a large number of bits may be allocated to a symbol having a low occurrence probability. As the symbol is represented through this assignment, the size of the bitstring for the symbols to be encoded may be reduced. Therefore, compression performance of image encoding may be improved through entropy encoding.
또한, 엔트로피 부호화를 위해 지수 골롬(exponential golomb), 문맥-적응형 가변 길이 코딩(Context-Adaptive Variable Length Coding; CAVLC) 및 문맥-적응형 이진 산술 코딩(Context-Adaptive Binary Arithmetic Coding; CABAC) 등과 같은 부호화 방법이 사용될 수 있다. 예를 들면, 엔트로피 복호화부(150)는 가변 길이 부호화(Variable Lenghth Coding/Code; VLC) 테이블을 이용하여 엔트로피 부호화를 수행할 수 있다. 예를 들면, 엔트로피 복호화부(150)는 대상 심볼에 대한 이진화(binarization) 방법을 도출할 수 있다. 또한, 엔트로프 복호화부(150)는 대상 심볼/빈(bin)의 확률 모델(probability model)을 도출할 수 있다. 엔트로피 복호화부(150)는 도출된 이진화 방법 또는 확률 모델을 사용하여 엔트로피 부호화를 수행할 수도 있다.In addition, for entropy coding, such as exponential golomb, context-adaptive variable length coding (CAVLC) and context-adaptive binary arithmetic coding (CABAC), etc. An encoding method can be used. For example, the entropy decoder 150 may perform entropy encoding by using a variable length coding (VLC) table. For example, the entropy decoder 150 may derive a binarization method for the target symbol. In addition, the entropy decoder 150 may derive a probability model of the target symbol / bin. The entropy decoder 150 may perform entropy encoding using the derived binarization method or the probability model.
부호화 장치(100)에 의해 인터 예측을 통한 부호화를 수행되기 때문에, 부호화된 현재 영상은 이후에 처리되는 다른 영상(들)에 대하여 참조 영상으로서 사용될 수 있다. 따라서, 부호화 장치(100)는 부호화된 현재 영상을 다시 복호화할 수 있고, 복호화된 영상을 참조 영상으로서 저장할 수 있다. 복호화를 위해 부호화된 현재 영상에 대한 역양자화 및 역변환이 처리될 수 있다.Since encoding is performed through inter prediction by the encoding apparatus 100, the encoded current image may be used as a reference image with respect to other image (s) to be processed later. Therefore, the encoding apparatus 100 may decode the encoded current image again and store the decoded image as a reference image. Inverse quantization and inverse transform on the encoded current image may be processed for decoding.
양자화된 계수는 역양자화부(160)에서 역양자화될(inversely quantized) 수 있고, 역변환부(170)에서 역변환될(inversely transformed) 수 있다. 역양자화 및 역변환된 계수는 가산기(175)를 통해 예측 블록과 합해질 수 있다, 역양자화 및 역변환된 계수 및 예측 블록을 합함으로써 복원된(reconstructed) 블록이 생성될 수 있다.The quantized coefficients may be inversely quantized in the inverse quantization unit 160 and inversely transformed in the inverse transformer 170. The inverse quantized and inverse transformed coefficients may be summed with the prediction block via the adder 175. A reconstructed block may be generated by adding the inverse quantized and inverse transformed coefficients and the prediction block.
복원된 블록은 필터부(180)를 거칠 수 있다. 필터부(180)는 디블록킹 필터(deblocking filter), 에스에이오(Sample Adaptive Offset; SAO), 에이엘에프(Adaptive Loop Filter; ALF) 중 적어도 하나 이상을 복원된 블록 또는 복원된 픽쳐에 적용할 수 있다. 필터부(180)는 적응적(adaptive) 인루프(in-loop) 필터로 칭해질 수도 있다.The restored block may pass through the filter unit 180. The filter unit 180 may apply at least one or more of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or the reconstructed picture. have. The filter unit 180 may be referred to as an adaptive in-loop filter.
디블록킹 필터는 블록들 간의 경계에서 발생한 블록 왜곡을 제거할 수 있다. SAO는 코딩 에러에 대한 보상을 위해 픽셀 값에 적정 오프셋(offset) 값을 더할 수 있다. ALF는 복원된 영상 및 원래의 영상을 비교한 값에 기반하여 필터링을 수행할 수 있다. 필터부(180)를 거친 복원된 블록은 참조 픽쳐 버퍼(190)에 저장될 수 있다.The deblocking filter may remove block distortion generated at boundaries between blocks. The SAO may add an appropriate offset value to the pixel value to compensate for coding errors. The ALF may perform filtering based on a value obtained by comparing the reconstructed image and the original image. The reconstructed block that has passed through the filter unit 180 may be stored in the reference picture buffer 190.
도 2는 본 발명이 적용되는 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.2 is a block diagram illustrating a configuration of a decoding apparatus according to an embodiment of the present invention.
복호화 장치(200)는 비디오 복호화 장치 또는 영상 복호화 장치일 수 있다.The decoding apparatus 200 may be a video decoding apparatus or an image decoding apparatus.
도 2를 참조하면, 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 인터 예측부(250), 가산기(255), 필터부(260) 및 참조 픽쳐 버퍼(270)를 포함할 수 있다.Referring to FIG. 2, the decoding apparatus 200 may include an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, an intra predictor 240, an inter predictor 250, and an adder 255. The filter unit 260 may include a reference picture buffer 270.
복호화 장치(200)는 부호화 장치(100)에서 출력된 비트스트림을 수신할 수 있다. 복호화 장치(200)는 비트스트림에 대하여 인트라 모드 및/또는 인터 모드의 복호화를 수행할 수 있다. 또한, 복호화 장치(200)는 복호화를 통해 복원된 영상을 생성할 수 있고, 생성된 복원된 영상을 출력할 수 있다.The decoding apparatus 200 may receive a bitstream output from the encoding apparatus 100. The decoding apparatus 200 may perform intra mode and / or inter mode decoding on the bitstream. In addition, the decoding apparatus 200 may generate a reconstructed image by decoding, and output the generated reconstructed image.
예를 들면, 복호화에 사용되는 예측 모드에 따른 인트라 모드 또는 인터 모드로의 전환은 스위치에 의해 이루어질 수 있다. 복호화에 사용되는 예측 모드가 인트라 모드인 경우 스위치가 인트라로 전환될 수 있다. 복호화에 사용되는 예측 모드가 인터 모드인 경우 스위치가 인터로 전환될 수 있다.For example, switching to the intra mode or the inter mode according to the prediction mode used for decoding may be made by a switch. When the prediction mode used for decoding is an intra mode, the switch may be switched to intra. When the prediction mode used for decoding is an inter mode, the switch may be switched to inter.
복호화 장치(200)는 입력된 비트스트림으로부터 복원된 잔차 블록(reconstructed residual block)을 획득할 수 있고, 예측 블록을 생성할 수 있다. 복원된 잔차 블록 및 예측 블록이 획득되면, 복호화 장치(200)는 복원된 잔차 블록 및 예측 블록을 더함으로써 복원된 블록을 생성할 수 있다.The decoding apparatus 200 may obtain a reconstructed residual block from the input bitstream, and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding apparatus 200 may generate the reconstructed block by adding the reconstructed residual block and the prediction block.
엔트로피 복호화부(210)는 확률 분포에 기초하여 비트스트림에 대한 엔트로피 복호화를 수행함으로써 심볼들을 생성할 수 있다. 생성된 심볼들은 양자화된 계수(quantized coefficient) 형태의 심볼을 포함할 수 있다. 여기에서, 엔트로피 복호화 방법은 상술된 엔트로피 부호화 방법과 유사할 수 있다. 예를 들면, 엔트로피 복호화 방법은 상술된 엔트로피 부호화 방법의 역과정일 수 있다.The entropy decoder 210 may generate symbols by performing entropy decoding on the bitstream based on the probability distribution. The generated symbols may include symbols in the form of quantized coefficients. Here, the entropy decoding method may be similar to the entropy encoding method described above. For example, the entropy decoding method may be an inverse process of the above-described entropy encoding method.
양자화된 계수는 역양자화부(220)에서 역양자화될 수 있다. 또한, 역양자화된 계수는 역변환부(230)에서 역변환될 수 있다. 양자화된 계수가 역양자화 및 역변환 된 결과로서, 복원된 잔차 블록이 생성될 수 있다. 이때, 역양자화부(220)는 양자화된 계수에 양자화 행렬을 적용할 수 있다.The quantized coefficient may be inverse quantized by the inverse quantization unit 220. In addition, the inverse quantized coefficient may be inversely transformed by the inverse transformer 230. As a result of inverse quantization and inverse transformation of the quantized coefficients, a reconstructed residual block may be generated. In this case, the inverse quantization unit 220 may apply a quantization matrix to the quantized coefficients.
인트라 모드가 사용되는 경우, 인트라 예측부(240)는 현재 블록 주변의 이미 복호화된 블록의 픽셀 값을 이용하는 공간적 예측을 수행함으로써 예측 블록을 생성할 수 있다.When the intra mode is used, the intra predictor 240 may generate a predictive block by performing spatial prediction using pixel values of blocks already decoded around the current block.
인터 예측부(250)는 움직임 보상부를 포함할 수 있다. 인터 모드가 사용되는 경우, 움직임 보상부는 움직임 벡터 및 참조 영상을 이용하는 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 참조 영상은 참조 픽쳐 버퍼(270)에 저장될 수 있다.The inter predictor 250 may include a motion compensator. When the inter mode is used, the motion compensator may generate a prediction block by performing motion compensation using a motion vector and a reference image. The reference picture may be stored in the reference picture buffer 270.
복원된 잔차 블록 및 예측 블록은 가산기(255)를 통해 더해질 수 있다. 가산기(255)는 복원된 잔차 블록 및 예측 블록을 더함으로써 복원된 블록을 생성할 수 있다.The reconstructed residual block and the prediction block may be added through the adder 255. The adder 255 may generate the reconstructed block by adding the reconstructed residual block and the predictive block.
복원된 블록은 필터부(260)를 거칠 수 있다. 필터부(260)는 디블록킹 필터, SAO 및 ALF 중 적어도 하나 이상을 복원된 블록 또는 복원된 픽쳐에 적용할 수 있다. 필터부(260)는 복원된 영상을 출력할 수 있다. 복원된 영상은 참조 픽쳐 버퍼(270)에 저장되어 인터 예측에 사용될 수 있다.The restored block may pass through the filter unit 260. The filter unit 260 may apply at least one or more of the deblocking filter, SAO, and ALF to the reconstructed block or the reconstructed picture. The filter unit 260 may output the restored image. The reconstructed picture may be stored in the reference picture buffer 270 and used for inter prediction.
도 3은 영상을 부호화 및 복호화할 때의 영상의 분할 구조를 개략적으로 나타내는 도면이다.3 is a diagram schematically illustrating a division structure of an image when encoding and decoding an image.
영상을 효율적으로 분할하기 위해, 부호화 및 복호화에 있어서, 코딩 유닛(Coding Unit; CU)이 사용될 수 있다. 유닛은 1) 영상 샘플들을 포함하는 블록 및 2) 구문 요소(syntax element)을 합쳐서 지칭하는 용어일 수 있다. 예를 들면, "유닛의 분할"은 "유닛에 해당하는 블록의 분할"을 의미할 수 있다.In order to efficiently divide an image, a coding unit (CU) may be used in encoding and decoding. A unit may be a term that collectively refers to 1) a block including image samples and 2) a syntax element. For example, "division of a unit" may mean "division of a block corresponding to a unit".
도 3을 참조하면, 영상(300)은 최대 코딩 유닛(Largest Coding Unit; LCU)의 단위로 순차적으로 분할될 수 있고, 영상(300)의 분할 구조는 LCU에 따라서 결정될 수 있다. 여기서, LCU는 코딩 트리 유닛(Coding Tree Unit; CTU)과 동일한 의미로 사용될 수 있다.Referring to FIG. 3, the image 300 may be sequentially divided in units of a largest coding unit (LCU), and the division structure of the image 300 may be determined according to the LCU. Here, the LCU may be used as the same meaning as a coding tree unit (CTU).
분할 구조는 LCU(310) 내에서의, 영상을 효율적으로 부호화하기 위한, 코딩 유닛(Coding Unit; CU)의 분포를 의미할 수 있다. 이러한 분포는 하나의 CU를 4개의 CU들로 분할할지 여부에 따라 결정될 수 있다. 분할에 의해 생성된 CU의 가로 크기 및 세로 크기는 각각 분할 전의 CU의 가로 크기의 절반 및 세로 크기의 절반일 수 있다. 분할된 CU는 동일한 방식으로 가로 크기 및 세로 크기가 절반으로 감소된 4개의 CU로 재귀적으로 분할될 수 있다.The partition structure may mean a distribution of a coding unit (CU) for efficiently encoding an image in the LCU 310. This distribution may be determined according to whether to divide one CU into four CUs. The horizontal size and the vertical size of the CU generated by the split may be half of the horizontal size and half of the vertical size, respectively, before the split. The partitioned CU may be recursively divided into four CUs whose width and length are reduced by half in the same manner.
이때, CU의 분할은 기정의된 깊이까지 재귀적으로 이루어질 수 있다. 깊이 정보는 CU의 크기를 나타내는 정보일 수 있다. 각 CU 별로 깊이 정보가 저장될 수 있다. 예컨대, LCU의 깊이는 0일 수 있고, 최소 코딩 유닛(Smallest Coding Unit; SCU)의 깊이는 기정의된 최대 깊이일 수 있다. 여기서, LCU는 상술된 것과 같이 최대의 코딩 유닛 크기를 가지는 CU일 수 있고, SCU는 최소의 코딩 유닛 크기를 가지는 CU일 수 있다. At this time, partitioning of the CU may be performed recursively up to a predetermined depth. Depth information may be information indicating the size of a CU. Depth information may be stored for each CU. For example, the depth of the LCU may be zero, and the depth of the smallest coding unit (SCU) may be a predefined maximum depth. Here, the LCU may be a CU having a maximum coding unit size as described above, and the SCU may be a CU having a minimum coding unit size.
LCU(310)로부터 분할이 시작될 수 있고, 분할에 의해 CU의 가로 크기 및 세로 크기가 절반으로 줄어들 때마다 CU의 깊이는 1씩 증가할 수 있다. 각각의 깊이 별로, 분할되지 않는 CU는 2Nx2N 크기를 가질 수 있다. 또한, 분할되는 CU의 경우, 2Nx2N 크기의 CU가 NxN 크기를 가지는 4개의 CU들로 분할될 수 있다. N의 크기는 깊이가 1씩 증가할 때마다 절반으로 감소할 수 있다. The division may start from the LCU 310, and the depth of the CU may increase by one whenever the horizontal and vertical sizes of the CU are reduced by half by the division. For each depth, the CU that is not divided may have a size of 2N × 2N. In addition, in the case of a partitioned CU, a CU of 2N × 2N size may be divided into four CUs having an N × N size. The size of N can be reduced by half for every 1 increase in depth.
도 3을 참조하면, 깊이가 0인 LCU는 64x64 픽셀들일 수 있다. 0은 최소 깊이일 수 있다. 깊이가 3인 SCU는 8x8 픽셀들일 수 있다. 3은 최대 깊이일 수 있다. 이때, LCU인 64x64 픽셀들의 CU는 깊이 0으로 표현될 수 있다. 32x32 픽셀들의 CU는 깊이 1로 표현될 수 있다. 16x16 픽셀들의 CU는 깊이 2로 표현될 수 있다. SCU인 8x8 픽셀들의 CU는 깊이 3으로 표현될 수 있다. Referring to FIG. 3, an LCU having a depth of 0 may be 64 × 64 pixels. 0 may be the minimum depth. An SCU of depth 3 may be 8x8 pixels. 3 may be the maximum depth. At this time, a CU of 64x64 pixels, which is an LCU, may be represented by a depth of zero. A CU of 32x32 pixels may be represented by depth one. A CU of 16 × 16 pixels may be represented by depth two. A CU of 8x8 pixels, which is an SCU, may be represented by depth three.
또한, CU가 분할되는지 여부에 대한 정보는 CU의 분할 정보를 통해 표현될 수 있다. 분할 정보는 1비트의 정보일 수 있다. SCU를 제외한 모든 CU는 분할 정보를 포함할 수 있다. 예를 들면, CU가 분할되지 않는 경우 CU의 분할 정보의 값은 0일 수 있고, CU가 분할되는 경우 CU의 분할 정보의 값은 1일 수 있다.In addition, information on whether the CU is split may be expressed through split information of the CU. The split information may be 1 bit of information. All CUs except the SCU may include partition information. For example, when the CU is not split, the value of partition information of the CU may be 0, and when the CU is split, the value of partition information of the CU may be 1.
도 4는 코딩 유닛(CU)이 포함할 수 있는 예측 유닛(PU)의 형태를 도시한 도면이다.4 is a diagram illustrating a form of a prediction unit PU that a coding unit CU may include.
LCU로부터 분할된 CU 중 더 이상 분할되지 않는 CU는 하나 이상의 예측 유닛(Prediction Unit; PU)들로 분할될 수 있다. 이러한 분할 또한, 파티션(partition)로 칭해질 수 있다.A CU that is no longer split among CUs split from the LCU may be split into one or more prediction units (PUs). This partition may also be called a partition.
PU는 예측에 대한 기본 단위일 수 있다. PU는 스킵(skip) 모드, 인터 모드 및 인트라 모드 중 어느 하나로 부호화 및 복호화될 수 있다. PU는 각 모드에 따라서 다양한 형태로 분할될 수 있다.The PU may be a basic unit for prediction. The PU may be encoded and decoded in any one of a skip mode, an inter mode, and an intra mode. PU may be divided into various types according to each mode.
스킵 모드에서는, CU 내에 분할이 존재하지 않을 수 있다. 스킵 모드에서는 분할 없이 PU 및 CU의 크기들이 동일한 2Nx2N 모드(410)가 지원될 수 있다.In skip mode, there may be no partition in the CU. In the skip mode, 2N × 2N mode 410 having the same size of PU and CU without splitting may be supported.
인터 모드에서는, CU 내에서 8가지로 분할된 형태들이 지원될 수 있다. 예를 들면, 인터 모드에서는 2Nx2N 모드(410), 2NxN 모드(415), Nx2N 모드(420), NxN 모드(425), 2NxnU 모드(430), 2NxnD 모드(435), nLx2N 모드(440) 및 nRx2N 모드(445)가 지원될 수 있다.In the inter mode, eight divided forms in a CU may be supported. For example, in the inter mode, 2Nx2N mode 410, 2NxN mode 415, Nx2N mode 420, NxN mode 425, 2NxnU mode 430, 2NxnD mode 435, nLx2N mode 440, and nRx2N Mode 445 may be supported.
인트라 모드에서는, 2Nx2N 모드(410) 및 NxN 모드(425)가 지원될 수 있다.In intra mode, 2Nx2N mode 410 and NxN mode 425 may be supported.
2Nx2N 모드(410)에서는 2Nx2N의 크기의 PU가 부호화될 수 있다. 2Nx2N의 크기의 PU는 CU의 크기와 동일한 크기의 PU를 의미할 수 있다. 예를 들면, 2Nx2N의 크기의 PU는 64x64, 32x32, 16x16 또는 8x8의 크기를 가질 수 있다.In the 2Nx2N mode 410, a PU having a size of 2Nx2N may be encoded. A PU having a size of 2N × 2N may mean a PU having a size equal to the size of a CU. For example, a PU having a size of 2N × 2N may have a size of 64 × 64, 32 × 32, 16 × 16, or 8 × 8.
NxN 모드(425)에서는 NxN의 크기의 PU가 부호화될 수 있다.In the NxN mode 425, a PU having a size of NxN may be encoded.
예를 들면, 인트라 예측에서, PU의 크기가 8x8일 때, 4개의 분할된 PU들이 부호화될 수 있다. 분할된 PU의 크기는 4x4일 수 있다.For example, in intra prediction, when the size of the PU is 8x8, four divided PUs may be encoded. The size of the partitioned PU may be 4 × 4.
PU가 인트라 모드에 의해 부호화될 경우, PU는 복수의 인트라 예측 모드들 중 하나의 인트라 예측 모드를 사용하여 부호화될 수 있다. 예를 들면, 고 효율 비디오 코딩(High Efficiency Video Coding; HEVC) 기술에서는 35 개의 인트라 예측 모드들을 제공할 수 있고, PU는 35 개의 인트라 예측 모드들 중 하나의 인트라 예측 모드로 부호화될 수 있다.When the PU is encoded by the intra mode, the PU may be encoded using one intra prediction mode among the plurality of intra prediction modes. For example, High Efficiency Video Coding (HEVC) technology can provide 35 intra prediction modes, and the PU can be coded in one of the 35 intra prediction modes.
PU가 2Nx2N 모드(410) 및 NxN 모드(425) 중 어느 모드에 의해 부호화될 것인가는 율-왜곡 비용(rate-distortion cost)에 의해 결정될 수 있다.Which of the 2Nx2N mode 410 and NxN mode 425 is to be coded may be determined by the rate-distortion cost.
부호화 장치(100)는 2Nx2N 크기의 PU에 대해 부호화 연산을 수행할 수 있다. 여기에서, 부호화 연산은 부호화 장치(100)가 사용할 수 있는 복수의 인트라 예측 모드들의 각각으로 PU를 부호화하는 것일 수 있다. 부호화 연산을 통해 2Nx2N 크기의 PU에 대한 최적의 인트라 예측 모드가 도출될 수 있다. 최적의 인트라 예측 모드는 부호화 장치(100)가 사용할 수 있는 복수의 인트라 예측 모드들 중 2Nx2N 크기의 PU의 부호화에 대하여 최소의 율-왜곡 비용을 발생시키는 인트라 예측 모드일 수 있다.The encoding apparatus 100 may perform an encoding operation on a PU having a size of 2N × 2N. Here, the encoding operation may be to encode the PU in each of a plurality of intra prediction modes that the encoding apparatus 100 may use. Through the coding operation, an optimal intra prediction mode for a 2N × 2N size PU may be derived. The optimal intra prediction mode may be an intra prediction mode that generates a minimum rate-distortion cost for encoding a 2N × 2N size PU among a plurality of intra prediction modes that can be used by the encoding apparatus 100.
또한, 부호화 장치(100)는 NxN으로 분할된 PU들의 각 PU에 대해서 순차적으로 부호화 연산을 수행할 수 있다. 여기에서, 부호화 연산은 부호화 장치(100)가 사용할 수 있는 복수의 인트라 예측 모드들의 각각으로 PU를 부호화하는 것일 수 있다. 부호화 연산을 통해 NxN 크기의 PU에 대한 최적의 인트라 예측 모드가 도출될 수 있다. 최적의 인트라 예측 모드는 부호화 장치(100)가 사용할 수 있는 복수의 인트라 예측 모드들 중 NxN 크기의 PU의 부호화에 대하여 최소의 율-왜곡 비용을 발생시키는 인트라 예측 모드일 수 있다.In addition, the encoding apparatus 100 may sequentially perform encoding operations on each PU of the PUs divided by N × N. Here, the encoding operation may be to encode the PU in each of a plurality of intra prediction modes that the encoding apparatus 100 may use. Through the coding operation, an optimal intra prediction mode for a N × N size PU may be derived. The optimal intra prediction mode may be an intra prediction mode that generates a minimum rate-distortion cost for encoding of a PU of an N × N size among a plurality of intra prediction modes that can be used by the encoding apparatus 100.
부호화 장치(100)는 2Nx2N 크기의 PU의 율-왜곡 비용 및 NxN 크기의 PU들의 율-왜곡 비용들의 비교에 기반하여 2Nx2N 크기의 PU 및 NxN 크기의 PU들 중 어느 것을 부호화할 지를 결정할 수 있다.The encoding apparatus 100 may determine which of 2Nx2N size PU and NxN size PU to encode based on a comparison of the rate-distortion cost of the 2Nx2N size PU and the rate-distortion costs of the NxN size PUs.
도 5는 코딩 유닛(CU)에 포함될 수 있는 변환 유닛(TU)의 형태를 도시한 도면이다.FIG. 5 is a diagram illustrating a form of a transform unit (TU) that may be included in a coding unit (CU).
변환 유닛(Transform Unit; TU)은 CU 내에서 변환, 양자화, 역변환, 역양자화, 엔트로피 부호화 및 엔트로피 복호화의 과정을 위해 사용되는 기본 단위일 수 있다. TU는 정사각형 형태 또는 직사각형 형태를 가질 수 있다.A transform unit (TU) may be a basic unit used for a process of transform, quantization, inverse transform, inverse quantization, entropy encoding, and entropy decoding in a CU. The TU may have a square shape or a rectangular shape.
LCU로부터 분할된 CU 중, 더 이상 CU들로 분할되지 않는 CU는 하나 이상의 TU들로 분할될 수 있다. 이때, TU의 분할 구조는 쿼드-트리(quad-tree) 구조일 수 있다. 예컨대, 도 5에서 도시된 것과 같이, 하나의 CU(510)가 쿼드-트리 구조에 따라서 한 번 혹은 그 이상 분할될 수 있다. 분할을 통해, 하나의 CU(510)는 다양한 크기의 TU들로 구성될 수 있다.Of the CUs partitioned from the LCU, a CU that is no longer split into CUs may be split into one or more TUs. In this case, the partition structure of the TU may be a quad-tree structure. For example, as shown in FIG. 5, one CU 510 may be divided one or more times according to the quad-tree structure. Through division, one CU 510 may be configured with TUs of various sizes.
도 6은 인트라 예측 과정의 실시예를 설명하기 위한 도면이다.6 is a diagram for explaining an embodiment of an intra prediction process.
도 6의 그래프의 중심으로부터 외곽으로의 화살표들은 인트라 예측 모드들의 예측 방향들을 나타낼 수 있다. 또한, 화살표에 근접하게 표시된 숫자는 인트라 예측 모드 또는 인트라 예측 모드의 예측 방향에 할당된 모드 값의 일 예를 나타낼 수 있다.Arrows outward from the center of the graph of FIG. 6 may indicate prediction directions of intra prediction modes. In addition, the number displayed near the arrow may represent an example of a mode value allocated to the intra prediction mode or the prediction direction of the intra prediction mode.
인트라 부호화 및/또는 복호화는 대상 유닛의 주변의 유닛의 참조 샘플을 이용하여 수행될 수 있다. 주변의 유닛은 주변의 복원된 유닛일 수 있다. 예를 들면, 인트라 부호화 및/또는 복호화는 주변의 복원된 유닛이 포함하는 참조 샘플의 값 또는 부호화 파라미터를 이용하여 수행될 수 있다.Intra encoding and / or decoding may be performed using reference samples of units around the target unit. Peripheral units may be peripheral restored units. For example, intra encoding and / or decoding may be performed using a value or encoding parameter of a reference sample included in a neighboring reconstructed unit.
부호화 장치(100) 및/또는 복호화 장치(200)는 현재 픽쳐 내의 샘플의 정보에 기초하여 대상 유닛에 대한 인트라 예측을 수행함으로써 예측 블록을 생성할 수 있다. 인트라 예측을 수행할 때, 부호화 장치(100) 및/또는 복호화 장치(200)는 현재 픽쳐 내의 샘플의 정보에 기반하여 인트라 예측을 수행함으로써 대상 유닛에 대한 예측 블록을 생성할 수 있다. 인트라 예측을 수행할 때, 부호화 장치(100) 및/또는 복호화 장치(200)는 적어도 하나의 복원된 참조 샘플에 기반하여 방향성 예측 및/또는 비방향성 예측을 수행할 수 있다.The encoding apparatus 100 and / or the decoding apparatus 200 may generate the prediction block by performing intra prediction on the target unit based on the information of the sample in the current picture. When performing intra prediction, the encoding apparatus 100 and / or the decoding apparatus 200 may generate a prediction block for a target unit by performing intra prediction based on information of a sample in a current picture. When performing intra prediction, the encoding apparatus 100 and / or the decoding apparatus 200 may perform directional prediction and / or non-directional prediction based on at least one reconstructed reference sample.
예측 블록은 인트라 예측의 수행의 결과로 생성된 블록을 의미할 수 있다. 예측 블록은 CU, PU 및 TU 중 적어도 하나에 해당할 수 있다.The prediction block may mean a block generated as a result of performing intra prediction. The prediction block may correspond to at least one of a CU, a PU, and a TU.
예측 블록의 단위는 CU, PU 및 TU 중 적어도 하나의 크기일 수 있다. 예측 블록은 2Nx2N의 크기 또는 NxN의 크기를 갖는, 정사각형의 형태를 가질 수 있다. NxN의 크기는 4x4, 8x8, 16x16, 32x32 및 64x64 등을 포함할 수 있다.The unit of a prediction block may be the size of at least one of a CU, a PU, and a TU. The prediction block may have a square shape, having a size of 2N × 2N or a size of N × N. The size of NxN may include 4x4, 8x8, 16x16, 32x32 and 64x64.
또는, 예측 블록은 2x2, 4x4, 16x16, 32x32 또는 64x64 등의 크기를 갖는 정사각형의 형태의 블록일 수 있고, 2x8, 4x8, 2x16, 4x16 및 8x16 등의 크기를 갖는 직사각형 모양의 블록일 수도 있다.Alternatively, the prediction block may be a block in the form of a square having a size of 2x2, 4x4, 16x16, 32x32, or 64x64, or a rectangular block having a size of 2x8, 4x8, 2x16, 4x16, and 8x16.
인트라 예측은 대상 유닛에 대한 인트라 예측 모드에 따라 수행될 수 있다. 대상 유닛이 가질 수 있는 인트라 예측 모드의 개수는 기정의된 고정된 값일 수 있으며, 예측 블록의 속성에 따라 다르게 결정된 값일 수 있다. 예를 들면, 예측 블록의 속성은 예측 블록의 크기 및 예측 블록의 타입 등을 포함할 수 있다.Intra prediction may be performed according to an intra prediction mode for the target unit. The number of intra prediction modes that the target unit may have may be a predefined fixed value or may be a value determined differently according to the attributes of the prediction block. For example, the attributes of the prediction block may include the size of the prediction block and the type of the prediction block.
예를 들면, 인트라 예측 모드의 개수는 예측 유닛의 크기에 관계없이 35개로 고정될 수 있다. 또는, 예를 들면, 인트라 예측 모드의 개수는 3, 5, 9, 17, 34, 35 또는 36 등일 수 있다.For example, the number of intra prediction modes may be fixed to 35 regardless of the size of the prediction unit. Or, for example, the number of intra prediction modes may be 3, 5, 9, 17, 34, 35, 36, or the like.
인트라 예측 모드는 도 6에서 도시된 것과 같이 2개의 비방향성 모드들 및 33개의 방향성 모드들을 포함할 수 있다. 2개의 비방향성 모드들은 디씨(DC) 모드 및 플래너(Planar) 모드를 포함할 수 있다.The intra prediction mode may include two non-directional modes and 33 directional modes as shown in FIG. 6. Two non-directional modes may include a DC mode and a planar mode.
예를 들면, 모드 값이 26인 수직 모드의 경우, 참조 샘플의 픽셀 값에 기반하여 수직 방향으로 예측이 수행될 수 있다. 예를 들면, 모드 값이 10인 수평 모드의 경우, 참조 샘플의 픽셀 값에 기반하여 수평 방향으로 예측이 수행될 수 있다. 예를 들면, 모드 값이 26인 수직 모드의 경우, 참조 샘플의 픽셀 값에 기반하여 수직 방향으로 예측이 수행될 수 있다.For example, in the vertical mode having a mode value of 26, prediction may be performed in the vertical direction based on the pixel value of the reference sample. For example, in the horizontal mode having a mode value of 10, prediction may be performed in the horizontal direction based on the pixel value of the reference sample. For example, in the vertical mode having a mode value of 26, prediction may be performed in the vertical direction based on the pixel value of the reference sample.
전술된 모드 이외의 방향성 모드인 경우에도 부호화 장치(100) 및 복호화 장치(200)는 방향성 모드에 대응하는 각도에 따라 참조 샘플을 이용하여 대상 유닛에 대한 인트라 예측을 수행할 수 있다.Even in the directional mode other than the above-described mode, the encoding apparatus 100 and the decoding apparatus 200 may perform intra prediction on the target unit using the reference sample according to the angle corresponding to the directional mode.
수직 모드의 우측에 위치한 인트라 예측 모드는 수직 우측 모드(vertical-right mode)로 명명될 수 있다. 수평 모드의 하단에 위치한 인트라 예측 모드는 수형 하단 모드(horizontal-below mode)로 명명될 수 있다. 예를 들면, 도 6에서, 모드 값이 27, 28, 29, 30, 31, 32, 33 및 34 중 하나인 인트라 예측 모드들은 수직 우측 모드들(613)일 수 있다. 모드 값이 2, 3, 4, 5, 6, 7, 8 및 9 중 하나인 인트라 예측 모드들은 수평 하단 모드들(616)일 수 있다.The intra prediction mode located on the right side of the vertical mode may be referred to as a vertical right mode. The intra prediction mode located at the bottom of the horizontal mode may be referred to as a horizontal-below mode. For example, in FIG. 6, intra prediction modes in which the mode value is one of 27, 28, 29, 30, 31, 32, 33, and 34 may be vertical right modes 613. Intra prediction modes with a mode value of one of 2, 3, 4, 5, 6, 7, 8, and 9 may be horizontal bottom modes 616.
비방향성 모드는 디씨(DC) 모드 및 플래너(planar) 모드를 포함할 수 있다. 예를 들면, 디씨 모드의 모드 값은 1일 수 있다. 플래너 모드의 모드 값은 0일 수 있다.The non-directional mode may include a DC mode and a planar mode. For example, the mode value of the DC mode may be 1. The mode value of the planner mode may be zero.
방향성 모드는 각진(angular) 모드를 포함할 수 있다. 복수의 인트라 예측 모드들 중 DC 모드 및 플래너 모드를 제외한 나머지의 모드는 방향성 모드일 수 있다.The directional mode may include an angular mode. Among the plurality of intra prediction modes, a mode other than the DC mode and the planner mode may be a directional mode.
DC 모드인 경우, 복수의 참조 샘플들의 픽셀 값들의 평균에 기반하여 예측 블록이 생성될 수 있다. 예를 들면, 예측 블록의 픽셀의 값은 복수의 참조 샘플들의 픽셀 값들의 평균에 기반하여 결정될 수 있다.In the DC mode, a prediction block may be generated based on an average of pixel values of the plurality of reference samples. For example, the value of a pixel of the prediction block may be determined based on an average of pixel values of the plurality of reference samples.
전술된 인트라 예측 모드들의 개수 및 각 인트라 예측 모드들의 모드 값은 단지 예시적인 것일 수 있다. 전술된 인트라 예측 모드들의 개수 및 각 인트라 예측 모드들의 모드 값은 실시예, 구현 및/또는 필요에 따라 다르게 정의될 수도 있다.The number of intra prediction modes described above and the mode value of each intra prediction modes may be exemplary only. The number of intra prediction modes described above and the mode value of each intra prediction modes may be defined differently according to an embodiment, implementation, and / or need.
인트라 예측 모드의 개수는 색 성분(color component)의 타입에 따라 상이할 수 있다. 예를 들면, 색 성분이 휘도(luma) 신호인지 아니면 색차(chroma) 신호인지에 따라 예측 모드의 개수가 다를 수 있다.The number of intra prediction modes may differ depending on the type of color component. For example, the number of prediction modes may vary depending on whether the color component is a luma signal or a chroma signal.
도 7은 인트라 예측 과정에서 사용되는 참조 샘플의 위치를 설명하기 위한 도면이다.7 is a diagram for describing a position of a reference sample used in an intra prediction process.
도 7은 대상 유닛의 인트라 예측을 위해 사용되는 참조 샘플의 위치를 도시한다. 도 7을 참조하면, 현재 블록의 인트라 예측에 사용되는 복원된 참조 픽셀에는 예를 들어, 참조 샘플은 하단 좌측(below-left) 참조 샘플들(731), 좌측(left) 참조 샘플들(733), 상단 좌측(above-left) 코너 참조 샘플(735), 상단(above) 참조 샘플들(737) 및 상단 우측(above-right) 참조 샘플들(739) 등을 포함할 수 있다.7 shows the location of a reference sample used for intra prediction of a target unit. Referring to FIG. 7, a reconstructed reference pixel used for intra prediction of a current block includes, for example, lower-left reference samples 731 and left reference samples 733. , Upper-left corner reference sample 735, upper-reference samples 737, upper-right reference samples 739, and the like.
예를 들면, 좌측 참조 샘플들(733)은 대상 유닛의 좌측에 인접한 복원된 참조 픽셀을 의미할 수 있다. 상단 참조 샘플들(737)은 대상 유닛의 상단에 인접한 복원된 참조 픽셀을 의미할 수 있다. 상단 좌측 코너 참조 픽셀(735)은 대상 유닛의 상단 좌측 코너에 위치한 복원된 참조 픽셀을 의미할 수 있다. 또한, 하단 좌측 참조 샘플들(731)은 좌측 참조 샘플들(733)로 구성된 좌측 샘플 라인과 동일 선상에 위치한 샘플들 중에서 좌측 샘플 라인의 하단에 위치한 참조 샘플을 의미할 수 있다. 상단 우측 참조 샘플들(739)은 상단 참조 샘플들(737)로 구성된 상단 샘플 라인과 동일 선상에 위치한 샘플들 중에서 상단 픽셀 라인의 우측에 위치한 참조 샘플들을 의미할 수 있다.For example, the left reference samples 733 may refer to a reconstructed reference pixel adjacent to the left side of the target unit. The top reference samples 737 may refer to a reconstructed reference pixel adjacent to the top of the target unit. The upper left corner reference pixel 735 may mean a restored reference pixel located at the upper left corner of the target unit. Also, the lower left reference samples 731 may refer to a reference sample located at the bottom of the left sample line among samples positioned on the same line as the left sample line composed of the left reference samples 733. The upper right reference samples 739 may refer to reference samples positioned to the right of the upper pixel line among samples positioned on the same line as the upper sample line formed of the upper reference samples 737.
대상 유닛의 크기가 NxN일 때, 하단 좌측 참조 샘플들(731), 좌측 참조 샘플들(733), 상단 참조 샘플들(737) 및 상단 우측 참조 샘플들(739)은 각각 N개일 수 있다.When the size of the target unit is N × N, the lower left reference samples 731, the left reference samples 733, the upper reference samples 737, and the upper right reference samples 739 may each be N pieces.
대상 유닛에 대한 인트라 예측을 통해 예측 블록이 생성될 수 있다. 예측 블록의 생성은 예측 블록의 픽셀들의 값이 결정되는 것을 포함할 수 있다. 대상 유닛 및 예측 블록의 크기는 동일할 수 있다.The prediction block may be generated through intra prediction on the target unit. Generation of the predictive block may include determining a value of pixels of the predictive block. The size of the target unit and the prediction block may be the same.
대상 유닛의 인트라 예측에 사용되는 참조 샘플은 대상 유닛의 인트라 예측 모드에 따라 달라질 수 있다. 인트라 예측 모드의 방향은 참조 샘플들 및 예측 블록의 픽셀들 간의 의존 관계를 나타낼 수 있다. 예를 들면, 특정된 참조 샘플의 값이 예측 블록의 특정된 하나 이상의 픽셀들의 값으로서 사용될 수 있다. 이 경우, 특정된 참조 샘플 및 예측 블록의 특정된 하나 이상의 픽셀들은 인트라 예측 모드의 방향의 직선으로 지정되는 샘플 및 픽셀들일 수 있다. 말하자면, 특정된 참조 샘플의 값은 인트라 예측 모드의 방향의 역방향에 위치한 픽셀의 값으로 복사될 수 있다. 또는, 예측 블록의 픽셀의 값은 상기의 픽셀의 위치를 기준으로 인트라 예측 모드의 방향에 위치한 참조 샘플의 값일 수 있다.The reference sample used for intra prediction of the target unit may vary according to the intra prediction mode of the target unit. The direction of the intra prediction mode may indicate a dependency relationship between the reference samples and the pixels of the prediction block. For example, the value of the specified reference sample can be used as the value of the specified one or more pixels of the prediction block. In this case, the specified one or more specified pixels of the specified reference sample and prediction block may be samples and pixels designated by a straight line in the direction of the intra prediction mode. In other words, the value of the specified reference sample may be copied to the value of the pixel located in the reverse direction of the intra prediction mode. Alternatively, the pixel value of the prediction block may be a value of a reference sample located in the direction of the intra prediction mode based on the position of the pixel.
예를 들면, 대상 유닛의 인트라 예측 모드가 모드 값이 26인 수직 모드인 경우, 상단 참조 샘플들(737)이 인트라 예측에 사용될 수 있다. 인트라 예측 모드가 수직 모드인 경우, 예측 블록의 픽셀의 값은 상기의 픽셀의 위치를 기준으로 수직으로 위에 위치한 참조 픽셀의 값일 수 있다. 따라서, 대상 유닛에 상단으로 인접한 상단 참조 샘플들(737)이 인트라 예측을 위해 사용될 수 있다. 또한, 예측 블록의 한 행의 픽셀들의 값들은 상단 참조 샘플들(737)의 값들과 동일할 수 있다.For example, when the intra prediction mode of the target unit is a vertical mode having a mode value of 26, the upper reference samples 737 may be used for intra prediction. When the intra prediction mode is the vertical mode, the value of the pixel of the prediction block may be the value of the reference pixel located vertically above the position of the pixel. Thus, the top reference samples 737 adjacent to the top of the target unit can be used for intra prediction. Also, the values of the pixels of one row of the prediction block may be the same as the values of the top reference samples 737.
예를 들면, 현재 블록의 인트라 예측 모드가 모드 값이 10인 수평 모드인 경우, 좌측 참조 샘플들(733)이 인트라 예측에 사용될 수 있다. 인트라 예측 모드가 수평 모드인 경우, 예측 블록의 픽셀의 값은 상기의 픽셀을 기준으로 수평으로 좌측에 위치한 참조 픽셀의 값일 수 있다. 따라서, 대상 유닛에 좌측으로 인접한 좌측 참조 샘플들(733)이 인트라 예측을 위해 사용될 수 있다. 또한, 예측 블록의 한 열의 픽셀들의 값들은 좌측 참조 샘플들(733)의 값들과 동일할 수 있다.For example, when the intra prediction mode of the current block is a horizontal mode with a mode value of 10, the left reference samples 733 may be used for intra prediction. When the intra prediction mode is the horizontal mode, the pixel value of the prediction block may be a value of a reference pixel located horizontally on the left side with respect to the pixel. Thus, left reference samples 733 adjacent to the target unit to the left may be used for intra prediction. In addition, the values of the pixels of one column of the prediction block may be the same as the values of the left reference samples 733.
예를 들면, 현재 블록의 인트라 예측 모드의 모드 값이 18인 경우 좌측 참조 샘플들(733)의 적어도 일부, 상단 좌측 코너 참조 샘플(735) 및 상단 참조 샘플들(737)의 적어도 일부 인트라 예측에 사용될 수 있다. 인트라 예측 모드의 모드 값이 18인 경우, 예측 블록의 픽셀의 값은 상기의 픽셀을 기준으로 대각선으로 상단 좌측에 위치한 참조 픽셀의 값일 수 있다.For example, if the mode value of the intra prediction mode of the current block is 18, at least some of the left reference samples 733, the upper left corner reference sample 735, and the at least some intra prediction of the top reference samples 737 are included. Can be used. When the mode value of the intra prediction mode is 18, the value of the pixel of the prediction block may be the value of the reference pixel located at the top left diagonally with respect to the pixel.
또한, 모드 값이 27, 28, 29, 30, 31, 32, 33 또는 34인 인트라 예측 모드가 사용되는 경우에는 상단 우측 참조 픽셀들(439) 중 적어도 일부가 인트라 예측에 사용될 수 있다.In addition, when an intra prediction mode having a mode value of 27, 28, 29, 30, 31, 32, 33, or 34 is used, at least some of the upper right reference pixels 439 may be used for intra prediction.
또한, 모드 값이 2, 3, 4, 5, 6, 7, 8 또는 9인 인트라 예측 모드가 사용되는 경우에는 하단 좌측 참조 픽셀들(431) 중 적어도 일부가 인트라 예측에 사용될 수 있다.In addition, when an intra prediction mode having a mode value of 2, 3, 4, 5, 6, 7, 8, or 9 is used, at least some of the lower left reference pixels 431 may be used for intra prediction.
또한, 모드 값이 11 내지 25 중 하나인 인트라 예측 모드가 사용되는 경우에는 상단 좌측 코너 참조 샘플들(735)이 인트라 예측에 사용될 수 있다.In addition, when an intra prediction mode having a mode value of 11 to 25 is used, the upper left corner reference samples 735 may be used for intra prediction.
예측 블록의 하나의 픽셀의 픽셀 값을 결정하기 위해 사용되는 참조 샘플은 1개일 수 있고, 2개 이상일 수도 있다.The reference sample used to determine the pixel value of one pixel of the prediction block may be one, or may be two or more.
전술된 것과 같이 예측 블록의 픽셀의 픽셀 값은 상기의 픽셀의 위치 및 인트라 예측 모드의 방향에 의해 가리켜지는 참조 샘플의 위치에 따라 결정될 수 있다. 픽셀의 위치 및 인트라 예측 모드의 방향에 의해 가리켜지는 참조 샘플의 위치가 정수 위치인 경우, 정수 위치가 가리키는 하나의 참조 샘플의 값이 예측 블록의 픽셀의 픽셀 값을 결정하기 위해 사용될 수 있다.As described above, the pixel value of the pixel of the prediction block may be determined according to the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode. If the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode is an integer position, the value of one reference sample indicated by the integer position may be used to determine the pixel value of the pixel of the prediction block.
픽셀의 위치 및 인트라 예측 모드의 방향에 의해 가리켜지는 참조 샘플의 위치가 정수 위치가 아닌 경우, 참조 샘플의 위치에 가장 가까운 2개의 참조 샘플들에 기반하여 보간된(interpolated) 참조 샘플이 생성될 수 있다. 보간된 참조 샘플의 값이 예측 블록의 픽셀의 픽셀 값을 결정하기 위해 사용될 수 있다. 말하자면, 예측 블록의 픽셀의 위치 및 인트라 예측 모드의 방향에 의해 가리켜지는 참조 샘플의 위치가 2개의 참조 샘플들 간의 사이를 나타낼 때, 상기의 2개의 샘플들의 값들에 기반하여 보간된 값이 생성될 수 있다.If the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode is not an integer position, an interpolated reference sample may be generated based on the two reference samples closest to the position of the reference sample. have. The value of the interpolated reference sample can be used to determine the pixel value of the pixel of the prediction block. In other words, when the position of the reference sample indicated by the position of the pixel of the prediction block and the direction of the intra prediction mode indicates between the two reference samples, an interpolated value is generated based on the values of the two samples. Can be.
예측에 의해 생성된 예측 블록은 원래의 대상 유닛과는 동일하지 않을 수 있다. 말하자면, 대상 유닛 및 예측 블록 간의 차이인 예측 오차가 존재할 수 있으며, 대상 유닛의 픽셀 및 예측 블록의 픽셀 간에도 예측 오차가 존재할 수 있다. 예를 들면, 방향성 인트라 예측의 경우, 예측 블록의 픽셀 및 참조 샘플 간의 거리가 더 멀수록 더 큰 예측 오차가 발생할 수 있다. 이러한 예측 오차에 등 의해 생성된 예측 블록 및 주변 블록 간에는 불연속성이 발생할 수 있다.The prediction block generated by the prediction may not be the same as the original target unit. In other words, a prediction error that is a difference between the target unit and the prediction block may exist, and the prediction error may exist between the pixel of the target unit and the pixel of the prediction block. For example, in the case of directional intra prediction, the greater the distance between the pixel and the reference sample of the prediction block, the larger prediction error may occur. Discontinuity may occur between the prediction block and the neighboring block generated by such a prediction error.
예측 오차의 감소를 위해 예측 블록에 대한 필터링이 사용될 수 있다. 필터링은 예측 블록 중 큰 예측 오차를 갖는 것으로 간주되는 영역에 대해 적응적으로 필터를 적용하는 것일 수 있다. 예를 들면, 큰 예측 오차를 갖는 것으로 간주되는 영역은 예측 블록의 경계일 수 있다. 또한, 인트라 예측 모드에 따라서 예측 블록 중 큰 예측 오차를 갖는 것으로 간주되는 영역이 다를 수 있으며, 필터의 특징이 다를 수 있다.Filtering on the prediction block may be used to reduce the prediction error. The filtering may be to adaptively apply a filter to a region that is considered to have a large prediction error in the prediction block. For example, an area considered to have a large prediction error may be a boundary of a prediction block. In addition, according to the intra prediction mode, an area considered to have a large prediction error among the prediction blocks may be different, and characteristics of the filter may be different.
도 8은 인터 예측 과정의 실시예를 설명하기 위한 도면이다.8 is a diagram for explaining an embodiment of an inter prediction process.
도 8에 도시된 사각형은 영상(또는, 픽쳐)를 나타낼 수 있다. 또한, 도 8에서 화살표는 예측 방향을 나타낼 수 있다. 즉, 영상은 예측 방향에 따라 부호화 및/또는 복호화될 수 있다.The rectangle illustrated in FIG. 8 may represent an image (or picture). In addition, arrows in FIG. 8 may indicate prediction directions. That is, the image may be encoded and / or decoded according to the prediction direction.
각 영상(또는, 픽쳐)는 부호화 타입에 따라 I 픽쳐(Intra Picture), P 픽쳐(Uni-prediction Picture), B 픽쳐(Bi-prediction Picture)로 분류될 수 있다. 각 픽쳐는 각 픽쳐의 부호화 타입에 따라 부호화될 수 있다.Each picture (or picture) may be classified into an I picture (Intra Picture), a P picture (Uni-prediction Picture), and a B picture (Bi-prediction Picture) according to an encoding type. Each picture may be encoded according to an encoding type of each picture.
부호화의 대상인 영상이 I 픽쳐인 경우, 영상은 인터 예측 없이 영상 자체에 대해 부호화될 수 있다. 부호화의 대상인 영상이 P 픽쳐인 경우, 영상은 순방향으로만 참조 픽쳐를 이용하는 인터 예측을 통해 부호화될 수 있다. 부호화의 대상인 영상이 B 픽쳐인 경우, 순방향 및 역방향의 양측으로 참조 픽쳐들을 이용하는 인터 예측을 통해 부호화될 수 있으며, 순방향 및 역방향 중 일 방향으로 참조 픽쳐를 이용하는 인터 예측을 통해 부호화될 수 있다.When the image to be encoded is an I picture, the image may be encoded with respect to the image itself without inter prediction. When the image to be encoded is a P picture, the image may be encoded through inter prediction using a reference picture only in the forward direction. When the image to be encoded is a B picture, it may be encoded through inter prediction using reference pictures in both the forward and reverse directions, and may be encoded through inter prediction using the reference picture in one of the forward and reverse directions.
참조 픽쳐를 이용하여 부호화 및/또는 복호화되는 P 픽쳐 및 B 픽쳐는 인터 예측이 사용되는 영상으로 간주될 수 있다.The P picture and the B picture encoded and / or decoded using the reference picture may be regarded as an image using inter prediction.
아래에서, 실시예에 따른 인터 모드에서의 인터 예측에 대해 구체적으로 설명된다.In the following, inter prediction in inter mode according to an embodiment is described in detail.
인터 모드에서, 부호화 장치(100) 및 복호화 장치(200)는 부호화 대상 유닛 및 복호화 대상 유닛에 대한 예측 및/또는 움직임 보상을 수행할 수 있다. 예를 들면, 부호화 장치(100) 또는 복호화 장치(200)는 복원된 주변 유닛의 움직임 정보를 부호화 대상 유닛 또는 복호화 대상 유닛의 움직임 정보로 사용함으로써 예측 및/또는 움직임 보상을 수행할 수 있다. 여기에서, 부호화 대상 유닛 또는 복호화 대상 유닛은 예측 유닛 및/또는 예측 유닛 파티션을 의미할 수 있다.In the inter mode, the encoding apparatus 100 and the decoding apparatus 200 may perform prediction and / or motion compensation on the encoding target unit and the decoding target unit. For example, the encoding apparatus 100 or the decoding apparatus 200 may perform prediction and / or motion compensation by using the reconstructed motion information of the neighboring unit as the motion information of the encoding target unit or the decoding target unit. Here, the encoding target unit or the decoding target unit may mean a prediction unit and / or a prediction unit partition.
인터 예측은 참조 픽쳐 및 움직임 정보를 이용하여 수행될 수 있다. 또한, 인터 예측은 전술된 스킵 모드를 이용할 수도 있다.Inter prediction may be performed using a reference picture and motion information. In addition, inter prediction may use the skip mode described above.
참조 픽쳐(reference picture)는 현재 픽쳐의 이전 픽쳐 또는 현재 픽쳐의 이후 픽쳐 중 적어도 하나일 수 있다. 이때, 인터 예측은 참조 픽쳐에 기반하여 현재 픽쳐의 블록에 대한 예측을 수행할 수 있다. 여기에서, 참조 픽쳐는 블록의 예측에 이용되는 영상을 의미할 수 있다.The reference picture may be at least one of a previous picture of the current picture or a subsequent picture of the current picture. In this case, the inter prediction may perform prediction on a block of the current picture based on the reference picture. Here, the reference picture may mean an image used for prediction of a block.
이때, 참조 픽쳐 내의 영역은 참조 픽쳐를 지시하는 참조 픽쳐 인덱스(refIdx) 및 후술될 움직임 벡터(motion vector) 등을 이용함으로써 특정될 수 있다.In this case, an area in the reference picture may be specified by using a reference picture index refIdx indicating a reference picture, a motion vector to be described later, and the like.
인터 예측은 참조 픽쳐 및 참조 픽쳐 내에서 현재 블록에 대응하는 참조 블록을 선택할 수 있고, 선택된 참조 블록을 사용하여 현재 블록에 대한 예측 블록을 생성할 수 있다. 현재 블록은 현재 픽쳐의 블록들 중 현재 부호화 또는 복호화의 대상인 블록일 수 있다.The inter prediction may select a reference picture and a reference block corresponding to the current block within the reference picture, and generate the prediction block for the current block using the selected reference block. The current block may be a block that is a target of current encoding or decoding among blocks of the current picture.
움직임 정보는 부호화 장치(100) 및 복호화 장치(200)의 각각에 의해 인터 예측 중 도출될 수 있다. 또한, 도출된 움직임 정보는 인터 예측을 수행하는데 사용될 수 있다.The motion information may be derived during inter prediction by each of the encoding apparatus 100 and the decoding apparatus 200. In addition, the derived motion information may be used to perform inter prediction.
이때, 부호화 장치(100) 및 복호화 장치(200)는 복원된 주변 블록(neighboring block)의 움직임 정보 및/또는 콜 블록(collocated block; col block)의 움직임 정보를 이용함으로써 부호화 효율 및/또는 복호화 효율을 향상시킬 수 있다. 콜 블록은 이미 복원된 콜 픽쳐(collocated picture; col picture) 내의 현재 블록에 대응하는 블록일 수 있다.In this case, the encoding apparatus 100 and the decoding apparatus 200 may use encoding information and / or decoding efficiency by using motion information of a restored neighboring block and / or motion information of a collocated block (col block). Can improve. The call block may be a block corresponding to the current block in a collocated picture (col picture).
복원된 주변 블록은 현재 픽쳐 내의 블록이면서, 이미 부호화 및/또는 복호화를 통해 복원된 블록일 수 있다. 복원된 블록은 현재 블록에 인접한 이웃 블록 및/또는 현재 블록의 외부 코너에 위치한 블록일 수 있다. 여기에서, 현재 블록의 외부 코너에 위치한 블록이란, 현재 블록에 가로로 인접한 이웃 블록에 세로로 인접한 블록 또는 현재 블록에 세로로 인접한 이웃 블록에 가로로 인접한 블록일 수 있다.The reconstructed neighboring block may be a block in the current picture and may be a block already reconstructed through encoding and / or decoding. The reconstructed block may be a neighboring block adjacent to the current block and / or a block located at an outer corner of the current block. Here, the block located at the outer corner of the current block may be a block vertically adjacent to a neighboring block horizontally adjacent to the current block or a block horizontally adjacent to a neighboring block vertically adjacent to the current block.
예를 들면, 복원된 주변 유닛은 대상 유닛의 좌측에 위치한 유닛, 대상 유닛의 상단에 위치한 유닛, 대상 유닛의 좌측 하단 코너에 위치한 유닛, 대상 유닛의 우측 상단 코너에 위치한 유닛 또는 대상 유닛의 좌측 상단 코너에 위치한 유닛일 수 있다.For example, a restored peripheral unit may be a unit located to the left of the target unit, a unit located at the top of the target unit, a unit located at the lower left corner of the target unit, a unit located at the upper right corner of the target unit, or an upper left of the target unit. It may be a unit located at the corner.
부호화 장치(100) 및 복호화 장치(200)의 각각은 콜 픽쳐 내에서 공간적으로 현재 블록에 대응하는 위치에 존재하는 블록을 결정할 수 있고, 결정된 블록을 기준으로 기정의된 상대적인 위치를 결정할 수 있다. 기정의된 상대적인 위치는 공간적으로 현재 블록에 대응하는 위치에 존재하는 블록의 내부 및/또는 외부의 위치일 수 있다. 또한, 부호화 장치(100) 및 복호화 장치(200)의 각각은 결정된 기정의된 상대적인 위치에 기반하여 콜 블록을 도출할 수 있다. 여기서, 콜 픽쳐는 참조 픽쳐 리스트에 포함된 적어도 하나의 참조 픽쳐 중에서 하나의 픽쳐일 수 있다.Each of the encoding apparatus 100 and the decoding apparatus 200 may determine a block existing at a position corresponding to a current block spatially in the call picture, and may determine a predetermined relative position based on the determined block. The predefined relative position may be a position inside and / or outside of a block that exists spatially at a position corresponding to the current block. In addition, each of the encoding apparatus 100 and the decoding apparatus 200 may derive a call block based on the determined predetermined relative position. Here, the call picture may be one picture among at least one reference picture included in the reference picture list.
참조 픽쳐 내의 블록은 복원된 참조 픽쳐 내에서 현재 블록의 위치에 공간적으로 대응되는 위치에 존재할 수 있다. 말하자면, 현재 픽쳐 내에서의 현재 블록의 위치 및 참조 픽쳐 내에서의 블록의 위치는 서로 대응할 수 있다. 이하, 참조 픽쳐에 포함된 블록의 움직임 정보는 시간적 움직임 정보로 불릴 수 있다.The block in the reference picture may exist at a position spatially corresponding to the position of the current block in the reconstructed reference picture. In other words, the position of the current block in the current picture and the position of the block in the reference picture may correspond to each other. Hereinafter, motion information of a block included in the reference picture may be referred to as temporal motion information.
움직임 정보의 도출 방식은 현재 블록의 예측 모드에 따라 변할 수 있다. 예를 들면, 인터 예측을 위해 적용되는 예측 모드로서, 향상된 움직임 벡터 예측자(Advanced Motion Vector Predictor; AMVP) 및 머지(merge) 등이 있을 수 있다.The method of deriving the motion information may vary according to the prediction mode of the current block. For example, as a prediction mode applied for inter prediction, there may be an advanced motion vector predictor (AMVP) and merge.
예를 들면, 예측 모드로서, AMVP가 적용되는 경우, 부호화 장치(100) 및 복호화 장치(200)의 각각은 복원된 주변 블록의 움직임 벡터 및/또는 콜 블록의 움직임 벡터를 이용하여 예측 움직임 벡터 후보 리스트를 생성할 수 있다. 복원된 주변 블록의 움직임 벡터 및/또는 콜 블록의 움직임 벡터는 예측 움직임 벡터 후보로 사용될 수 있다.For example, when AMVP is applied as the prediction mode, each of the encoding apparatus 100 and the decoding apparatus 200 may predict the motion vector candidate using the motion vector of the reconstructed neighboring block and / or the motion vector of the call block. You can create a list. The motion vector of the reconstructed neighboring block and / or the motion vector of the collocated block may be used as a prediction motion vector candidate.
부호화 장치(100)에 의해 생성된 비트스트림은 예측 움직임 벡터 인덱스를 포함할 수 있다. 예측 움직임 벡터 인덱스는 예측 움직임 벡터 후보 리스트에 포함된 예측 움직임 벡터 후보 중에서 선택된 최적의 예측 움직임 벡터를 지시할 수 있다. 비트스트림을 통해 예측 움직임 벡터 인덱스는 부호화 장치(100)로부터 복호화 장치(200)로 전송될 수 있다.The bitstream generated by the encoding apparatus 100 may include a predicted motion vector index. The prediction motion vector index may indicate an optimal prediction motion vector selected from the prediction motion vector candidates included in the prediction motion vector candidate list. The predicted motion vector index may be transmitted from the encoding apparatus 100 to the decoding apparatus 200 through the bitstream.
복호화 장치(200)는 예측 움직임 벡터 인덱스를 이용하여 예측 움직임 벡터 후보 리스트에 포함된 예측 움직임 벡터 후보 중에서 현재 블록의 예측 움직임 벡터를 선택할 수 있다.The decoding apparatus 200 may select the prediction motion vector of the current block from the prediction motion vector candidates included in the prediction motion vector candidate list by using the prediction motion vector index.
부호화 장치(100)는 현재 블록의 움직임 벡터 및 예측 움직임 벡터 간의 움직임 벡터 차분(MVD: Motion Vector Difference)을 계산할 수 있고, MVD를 부호화할 수 있다. 비트스트림은 부호화된 MVD를 포함할 수 있다. MVD는 비트스트림을 통해 부호화 장치(100)로부터 복호화 장치(200)로 전송될 수 있다. 이 때, 복호화 장치(200)는 수신된 MVD를 복호화할 수 있다. 복호화 장치(200)는 복호화된 MVD 및 예측 움직임 벡터의 합을 통해 현재 블록의 움직임 벡터를 도출할 수 있다.The encoding apparatus 100 may calculate a motion vector difference (MVD) between the motion vector and the predictive motion vector of the current block, and may encode the MVD. The bitstream may include encoded MVD. The MVD may be transmitted from the encoding apparatus 100 to the decoding apparatus 200 through a bitstream. At this time, the decoding apparatus 200 may decode the received MVD. The decoding apparatus 200 may derive the motion vector of the current block through the sum of the decoded MVD and the predictive motion vector.
비트스트림은 참조 픽쳐를 지시하는 참조 픽쳐 인덱스 등을 포함할 수 있다. 참조 픽쳐 인덱스는 비트스트림을 통해 부호화 장치(100)로부터 복호화 장치(200)로 전송될 수 있다. 복호화 장치(200)는 주변 블록의 움직임 정보들을 이용하여 현재 블록의 움직임 벡터를 예측할 수 있고, 예측된 움직임 벡터 및 움직임 벡터 차분을 이용하여 현재 블록의 움직임 벡터를 유도할 수 있다. 복호화 장치(200)는 유도된 움직임 벡터와 참조 픽쳐 인덱스 정보에 기반하여 현재 블록에 대한 예측 블록을 생성할 수 있다.The bitstream may include a reference picture index and the like indicating the reference picture. The reference picture index may be transmitted from the encoding apparatus 100 to the decoding apparatus 200 through a bitstream. The decoding apparatus 200 may predict the motion vector of the current block by using the motion information of the neighboring block, and may derive the motion vector of the current block by using the predicted motion vector and the motion vector difference. The decoding apparatus 200 may generate a prediction block for the current block based on the derived motion vector and the reference picture index information.
부호화 대상 유닛 및 복호화 대상 유닛에 대해서 복원된 주변 유닛의 움직임 정보가 사용될 수 있기 때문에, 특정한 인터 예측 모드에서는, 부호화 장치(100)가 대상 유닛에 대한 움직임 정보를 별도로 부호화하지 않을 수도 있다. 대상 유닛의 움직임 정보가 부호화되지 않으면, 복호화 장치(200)로 전송되는 비트량이 감소될 수 있고, 부호화 효율이 향상될 수 있다. 예를 들면, 이러한 대상 유닛의 움직임 정보가 부호화되지 않는 인터 예측 모드로서, 스킵 모드(skip mode) 및/또는 머지 모드(merge mode) 등이 있을 수 있다. 이때, 부호화 장치(100) 및 복호화 장치(200)는 복원된 주변 유닛 중 어떤 유닛의 움직임 정보를 대상 유닛의 움직임 정보로서 사용되는지를 지시하는 식별자 및/또는 인덱스를 사용할 수 있다.Since the motion information of the neighboring unit reconstructed with respect to the encoding target unit and the decoding target unit may be used, in a specific inter prediction mode, the encoding apparatus 100 may not separately encode the motion information for the target unit. If the motion information of the target unit is not encoded, the amount of bits transmitted to the decoding apparatus 200 may be reduced, and encoding efficiency may be improved. For example, the inter prediction mode in which the motion information of the target unit is not encoded may include a skip mode and / or a merge mode. In this case, the encoding apparatus 100 and the decoding apparatus 200 may use an identifier and / or an index indicating which unit of the reconstructed neighboring units is used as the movement information of the target unit.
움직임 정보의 도출 방식의 다른 예로, 머지(merge)가 있다. 머지란 복수의 블록들에 대한 움직임의 병합을 의미할 수 있다. 머지는 하나의 블록의 움직임 정보를 다른 블록에도 함께 적용시키는 것을 의미할 수 있다. 머지가 적용되는 경우, 부호화 장치(100) 및 복호화 장치(200)의 각각은 복원된 주변 블록의 움직임 정보 및/또는 콜 블록의 움직임 정보를 이용하여 머지 후보 목록(merge candidate list)를 생성할 수 있다. 움직임 정보는 1) 움직임 벡터, 2) 참조 영상에 대한 인덱스, 및 3) 예측 방향 중 적어도 하나를 포함할 수 있다. 예측 방향은 단방향 또는 양방향일 수 있다.Another example of a method of deriving motion information is merge. Merge may mean merging of motions for a plurality of blocks. Merge may mean applying motion information of one block to other blocks. When the merge is applied, each of the encoding apparatus 100 and the decoding apparatus 200 may generate a merge candidate list using the motion information of the reconstructed neighboring block and / or the motion information of the call block. have. The motion information may include at least one of 1) a motion vector, 2) an index for a reference image, and 3) a prediction direction. The prediction direction may be unidirectional or bidirectional.
이때, 머지는 CU 단위 또는 PU 단위로 적용될 수 있다. CU 단위 또는 PU 단위로 머지가 수행되는 경우, 부호화 장치(100)는 비트스트림을 통해 기정의된 정보를 복호화 장치(200)로 전송할 수 있다. 비트스트림은 기정의된 정보를 포함할 수 있다. 기정의된 정보는, 1) 블록 파티션(partition)별로 머지를 수행할지 여부를 나타내는 정보, 2) 현재 블록에 인접한 주변 블록들 중 어떤 블록과 머지를 할 것인가에 대한 정보를 포함할 수 있다. 예를 들면, 현재 블록의 주변 블록들은 현재 블록의 좌측 인접 블록, 현재 블록의 상단 인접 블록 및 현재 블록의 시간적(temporal) 인접 블록 등을 포함할 수 있다.In this case, the merge may be applied in a CU unit or a PU unit. When merging is performed in a CU unit or a PU unit, the encoding apparatus 100 may transmit predefined information to the decoding apparatus 200 through a bitstream. The bitstream may include predefined information. The predefined information may include 1) information indicating whether to merge for each block partition, and 2) information about which one of neighboring blocks adjacent to the current block to merge with. For example, the neighboring blocks of the current block may include a left neighboring block of the current block, a top neighboring block of the current block, a temporal neighboring block of the current block, and the like.
머지 후보 목록은 움직임 정보들이 저장된 목록을 나타낼 수 있다. 또한, 머지 후보 목록은 머지가 수행되기 전에 생성될 수 있다. 머지 후보 목록에 저장되는 움직임 정보는, 1) 현재 블록에 인접한 주변 블록의 움직임 정보 또는 2) 참조 영상 에서 현재 블록에 대응하는 콜 블록(collocated block) 움직임 정보일 수 있다. 또한, 머지 후보 목록에 저장된 움직임 정보는 이미 머지 후보 목록에 존재하는 움직임 정보들의 조합에 의해 생성된 새로운 움직임 정보일 수 있다.The merge candidate list may represent a list in which motion information is stored. In addition, the merge candidate list may be generated before the merge is performed. The motion information stored in the merge candidate list may be 1) motion information of a neighboring block adjacent to the current block or 2) collocated block motion information corresponding to the current block in the reference image. In addition, the motion information stored in the merge candidate list may be new motion information generated by a combination of motion information already present in the merge candidate list.
스킵 모드는 주변 블록의 정보를 그대로 현재 블록에 적용하는 모드일 수 있다. 스킵 모드는 인터 예측에 이용되는 모드 중 하나일 수 있다. 스킵 모드가 사용되는 경우, 부호화 장치(100)는 어떤 블록의 움직임 정보를 현재 블록의 움직임 정보로서 이용할 것인지에 대한 정보만을 비트스트림을 통해 복호화 장치(200)에 전송할 수 있다. 부호화 장치(100)는 다른 정보는 복호화 장치(200)에 전송하지 않을 수 있다. 예를 들면, 다른 정보는 신택스(syntax) 정보일 수 있다. 신택스 정보는 움직임 벡터 차분 정보를 포함할 수 있다.The skip mode may be a mode in which information of neighboring blocks is applied to the current block as it is. The skip mode may be one of modes used for inter prediction. When the skip mode is used, the encoding apparatus 100 may transmit only information on which block motion information to use as the motion information of the current block to the decoding apparatus 200 through the bitstream. The encoding apparatus 100 may not transmit other information to the decoding apparatus 200. For example, the other information may be syntax information. The syntax information may include motion vector difference information.
도 9는 일 예에 따른 원본 영상이 수직 방향으로 예측된 경우의 예측 오차를 나타낸다.9 illustrates a prediction error when the original image is predicted in the vertical direction according to an example.
전술된 것과 같이, 인트라 예측으로 원본 영상에 대한 부호화가 수행될 때, 가능한 모든 PU들 및 예측 모드들에 대한 연산이 수행된 뒤, 하나의 PU 및 예측 모드가 선택될 수 있다. 선택된 PU 및 예측 모드에 따라서 원본 영상에 대한 예측이 수행될 때, 예측 모드의 방향으로 예측 오차의 왜곡이 남는 경향성이 발견된다.As described above, when encoding is performed on the original image with intra prediction, one PU and a prediction mode may be selected after the calculation for all possible PUs and prediction modes is performed. When the prediction on the original image is performed according to the selected PU and the prediction mode, a tendency for distortion of the prediction error remains in the direction of the prediction mode.
따라서, PU에 대해 복수의 예측 모드들 중 하나의 선택된 예측 모드를 사용하여 1차의 제1 인트라 예측을 수행한 후, 2차의 제2 인트라 예측이 수행될 수 있다. 여기에서, 2차의 인트라 예측은 제1 인트라 예측의 예측 모드의 방향으로 특정된 픽셀들의 영역에 한정된 인트라 예측일 수 있다. 말하자면, 2차의 인트라 예측의 예측 모드는 제1 인트라 예측의 예측 모드와 동일할 수 있다. 반면, 제1 인트라 예측은 PU의 전체에 대해 적용되지만, 2차의 인트라 예측은 PU의 일부에만 적용될 수 있다.Therefore, after performing the first first intra prediction using the selected prediction mode of one of the plurality of prediction modes for the PU, the second second intra prediction may be performed. Here, the secondary intra prediction may be intra prediction defined in the region of pixels specified in the direction of the prediction mode of the first intra prediction. In other words, the prediction mode of the secondary intra prediction may be the same as the prediction mode of the first intra prediction. On the other hand, the first intra prediction is applied to the whole of the PU, but the secondary intra prediction may be applied to only a part of the PU.
부호화 장치는 2차의 인트라 예측이 적용될 PU의 일부를 결정할 수 있다. 예를 들면, 부호화 장치는 복수의 후보 영역들의 각 후보 영역에 대해, 상기의 후보 영역에 2차의 인트라 예측이 적용될 경우의 율-왜곡 비용을 계산할 수 있다. 부호화 장치는 가장 작은 율-왜곡 비용의 후보 영역을 2차의 인트라 예측이 적용될 PU의 일부로서 결정할 수 있다.The encoding apparatus may determine a part of the PU to which secondary intra prediction is to be applied. For example, the encoding apparatus may calculate a rate-distortion cost when secondary intra prediction is applied to the candidate region for each candidate region of the plurality of candidate regions. The encoding apparatus may determine the candidate region of the smallest rate-distortion cost as part of the PU to which secondary intra prediction is to be applied.
PU는 복수의 픽셀들을 포함할 수 있다. 복수의 후보 영역들은 PU의 복수의 픽셀들 중 특정된 방식에 의해 결정된 일부들일 수 있다. 예를 들면, 복수의 후보 영역들은 제1 인트라 예측의 예측 방향에 의해 결정될 수 있다.The PU may include a plurality of pixels. The plurality of candidate regions may be portions determined by a specified manner of the plurality of pixels of the PU. For example, the plurality of candidate regions may be determined by the prediction direction of the first intra prediction.
제1 인트라 예측 및 제2 인트라 예측을 적용함으로써 PU에 대한 예측 오차가 제1 인트라 예측만이 적용되는 경우에 비해 더 감소될 수 있다.By applying the first intra prediction and the second intra prediction, the prediction error for the PU can be further reduced compared to the case where only the first intra prediction is applied.
아래의 실시예들은 전술된 경향성을 효율적으로 사용함으로써 인트라 예측의 성능을 향상시키고 예측 오차를 감소시키는 방법 및 장치를 제시할 수 있다The following embodiments can present a method and apparatus for improving the performance of intra prediction and reducing the prediction error by efficiently using the aforementioned tendency.
도 10은 일 실시예에 따른 부호화 장치의 구조도이다.10 is a structural diagram of an encoding apparatus according to an embodiment.
부호화 장치(1000)는 부호화를 수행하는 범용의 컴퓨터 시스템일 수 있다.The encoding apparatus 1000 may be a general-purpose computer system that performs encoding.
도 10에서 도시된 바와 같이, 부호화 장치(1000)는 버스(1090)를 통하여 서로 통신하는 적어도 하나의 프로세서(1010), 메모리(1030), 사용자 인터페이스(User Interface; UI) 입력 디바이스(1050), UI 출력 디바이스(1060) 및 저장소(1040)를 포함할 수 있다. 또한, 부호화 장치(1000)는 네트워크(1099)에 연결되는 통신부(1020)를 더 포함할 수 있다. 프로세서(1010)는 중앙 처리 장치(Central Processing Unit; CPU), 메모리(1030) 또는 저장소(1040)에 저장된 프로세싱(processing) 명령어(instruction)들을 실행하는 반도체 장치일 수 있다. 메모리(1030) 및 저장소(1040)는 다양한 형태의 휘발성 또는 비휘발성 저장 매체일 수 있다. 예를 들면, 메모리는 롬(ROM)(1031) 및 램(RAM)(1032) 중 적어도 하나를 포함할 수 있다.As shown in FIG. 10, the encoding apparatus 1000 may include at least one processor 1010, a memory 1030, a user interface (UI) input device 1050, which communicates with each other via a bus 1090, and the like. UI output device 1060 and storage 1040. In addition, the encoding apparatus 1000 may further include a communication unit 1020 connected to the network 1099. The processor 1010 may be a semiconductor device that executes processing instructions stored in a central processing unit (CPU), a memory 1030, or a storage 1040. Memory 1030 and storage 1040 may be various types of volatile or nonvolatile storage media. For example, the memory may include at least one of a ROM 1031 and a RAM 1032.
프로세서(1010)는 부호화 장치(100)의 인터 예측부(110), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 복호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽쳐 버퍼(190)를 포함할 수 있다.The processor 1010 is an inter predictor 110, an intra predictor 120, a switch 115, a subtractor 125, a transformer 130, a quantizer 140, and an entropy decoder of the encoding apparatus 100. 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.
기록 매체는 부호화 장치(1000)의 동작을 위한 적어도 하나의 모듈을 저장할 수 있다. 메모리(1030)는 적어도 하나의 모듈을 저장할 수 있고, 적어도 하나의 프로세서(1010)에 의하여 실행되도록 구성될 수 있다.The recording medium may store at least one module for the operation of the encoding apparatus 1000. The memory 1030 may store at least one module and may be configured to be executed by the at least one processor 1010.
일 실시예에 따르면, 부호화 장치(100)의 인터 예측부(110), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 복호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽쳐 버퍼(190)의 적어도 일부는 프로그램 모듈들일 수 있으며, 외부의 장치 또는 시스템과 통신할 수 있다. 프로그램 모듈들은 운영 체제, 응용 프로그램 모듈 및 기타 프로그램 모듈의 형태로 부호화 장치(1000)에 포함될 수 있다.According to an embodiment, the inter prediction unit 110, the intra prediction unit 120, the switch 115, the subtractor 125, the transform unit 130, the quantization unit 140, and the entropy decoding of the encoding apparatus 100 may be used. At least some of the unit 150, the inverse quantizer 160, the inverse transform unit 170, the adder 175, the filter unit 180, and the reference picture buffer 190 may be program modules, and may be an external device or system. Communicate with The program modules may be included in the encoding apparatus 1000 in the form of an operating system, an application module, and other program modules.
프로그램 모듈들은 물리적으로는 여러 가지 공지의 기억 장치 상에 저장될 수 있다. 또한, 이러한 프로그램 모듈 중 적어도 일부는 부호화 장치(1000)와 통신 가능한 원격 기억 장치 에 저장될 수도 있다.The program modules may be physically stored on various known storage devices. In addition, at least some of these program modules may be stored in a remote storage device that can communicate with the encoding apparatus 1000.
프로그램 모듈들은 일 실시예에 따른 기능 또는 동작을 수행하거나, 일 실시예에 따른 추상 데이터 유형을 구현하는 루틴(routine), 서브루틴(subroutine), 프로그램, 오브젝트(object), 컴포넌트(component) 및 데이터 구조(data structure) 등을 포괄할 수 있지만, 이에 제한되지는 않는다.Program modules perform routines or subroutines, programs, objects, components, and data to perform functions or operations, or to implement abstract data types, according to one embodiment. Data structures and the like, but is not limited thereto.
프로그램 모듈들은 프로세서(1010)에 의해 수행되는 명령어(instruction) 또는 코드(code)로 구성될 수 있다.The program modules may be composed of instructions or code performed by the processor 1010.
부호화 장치(1000)의 데이터 또는 정보의 통신과 관련된 기능은 통신부(1020)를 통해 수행될 수 있다.Functions related to communication of data or information of the encoding apparatus 1000 may be performed through the communication unit 1020.
도 11은 일 실시예에 따른 부호화 방법의 흐름도이다.11 is a flowchart of an encoding method according to an embodiment.
실시예의 부호화 방법은 부호화 장치(100) 또는 부호화 장치(1000)에 의해 수행될 수 있다.The encoding method of the embodiment may be performed by the encoding apparatus 100 or the encoding apparatus 1000.
단계(1110)에서, 예측부는 현재 블록, 제1 예측 및 제2 예측에 기반하여 현재 블록의 잔차 신호를 생성할 수 있다.In operation 1110, the prediction unit may generate a residual signal of the current block based on the current block, the first prediction, and the second prediction.
예측부는 인터 예측부(110), 인트라 예측부(120) 및 감산기(125)를 포함할 수 있다.The predictor may include an inter predictor 110, an intra predictor 120, and a subtractor 125.
예를 들면, 잔차 신호는 잔차 블록을 나타낼 수 있다.For example, the residual signal may represent a residual block.
예를 들면, 잔차 블록은 현재 블록 및 예측 블록의 차분일 수 있다. 또는, 잔차 블록은 현재 블록 및 예측 블록의 차분에 기반하여 생성될 수 있다.For example, the residual block may be the difference between the current block and the prediction block. Alternatively, the residual block may be generated based on the difference between the current block and the prediction block.
예를 들면, 예측 블록은 제1 예측 블록 및 제2 예측 블록의 합일 수 있다. 잔차 블록은 현재 블록에서 제1 예측 블록 및 제2 예측 블록의 합을 뺀 것일 수 있다.For example, the prediction block may be the sum of the first prediction block and the second prediction block. The residual block may be obtained by subtracting the sum of the first prediction block and the second prediction block from the current block.
예를 들면, 제2 예측은 제1 예측의 예측 오차에 대한 예측일 수 있다.For example, the second prediction may be a prediction for a prediction error of the first prediction.
제1 예측 블록은 제1 예측에 의해 생성된 블록일 수 있다. 제2 예측 블록은 제2 예측에 의해 생성된 블록일 수 있다. 제2 예측이 사용되지 않은 경우 제2 예측 블록은 널(null) 블록일 수 있다. 널 블록은 블록의 모든 픽셀들의 값들이 "0"인 블록일 수 있다.The first prediction block may be a block generated by the first prediction. The second prediction block may be a block generated by the second prediction. If the second prediction is not used, the second prediction block may be a null block. The null block may be a block in which the values of all pixels of the block are "0".
예측부는 인터 예측 또는 인트라 예측을 수행함으로써 현재 블록의 잔차 블록을 생성할 수 있다.The prediction unit may generate a residual block of the current block by performing inter prediction or intra prediction.
일 실시예에서, 예측부는 현재 블록 및/또는 제1 예측 블록에 기반하여 제2 예측 블록을 생성할 수 있다.In an embodiment, the prediction unit may generate a second prediction block based on the current block and / or the first prediction block.
일 실시예에서, 예측부는 현재 블록에 대하여 제1 예측을 수행하고, 제1 예측의 결과인 제1 예측 오차에 대해 제2 예측을 수행함으로써 현재 블록의 잔차 신호를 생성할 수 있다. 여기에서, 제1 예측 오차는 현재 블록 및 제1 예측 신호 간의 차이일 수 있다. 잔차 신호는 제1 예측 오차 및 제2 예측 신호 간의 차이일 수 있다.In one embodiment, the prediction unit may generate a residual signal of the current block by performing a first prediction on the current block and performing a second prediction on the first prediction error that is a result of the first prediction. Here, the first prediction error may be a difference between the current block and the first prediction signal. The residual signal may be a difference between the first prediction error and the second prediction signal.
일 실시예에서, 제1 예측 및 제2 예측은 서로 상이한 종류의 예측들일 수 있다.In one embodiment, the first prediction and the second prediction may be different kinds of predictions.
일 실시예에서, 제1 예측 및 제2 예측은 서로 동일한 종류의 예측들일 수 있다. 예를 들면, 제1 예측 및 제2 예측의 각각은 인트라 예측일 수 있다. 제1 예측이 인트라 예측이면, 제2 예측도 인트라 예측으로 설정될 수 있다.In one embodiment, the first prediction and the second prediction may be the same kind of predictions. For example, each of the first prediction and the second prediction may be intra prediction. If the first prediction is intra prediction, the second prediction may also be set to intra prediction.
일 실시예에서, 제1 예측의 예측 방향 및 제2 예측의 예측 방향은 동일할 수 있다. 제2 예측의 예측 방향은 제1 예측의 예측 방향과 동일하게 설정될 수 있다. In one embodiment, the prediction direction of the first prediction and the prediction direction of the second prediction may be the same. The prediction direction of the second prediction may be set to be the same as the prediction direction of the first prediction.
예를 들면, 일 실시예에서, 제1 예측 및 제2 예측의 각각은 인터 예측일 수 있다.For example, in one embodiment, each of the first prediction and the second prediction may be inter prediction.
일 실시예에서, 제1 예측의 대상인 블록 및 제2 예측의 대상인 블록은 서로 상이할 수 있다. 여기에서, "예측의 대상인 블록"은 "예측"이 어떤 블록에 대한 예측 블록을 생성하는가를 의미할 수 있다.In one embodiment, a block that is the target of the first prediction and a block that is the target of the second prediction may be different from each other. Here, the "block to be predicted" may mean to which block the "prediction" generates a prediction block.
예를 들면, 제1 예측의 대상인 블록의 종류 및 제2 예측의 대상인 블록의 종류는 서로 상이할 수 있다. 블록의 종류는 원본 블록, 루마(luma) 블록, 색차(chroma) 블록, 깊이(depth) 블록 및 잔차 블록 등일 수 있다.For example, the type of the block targeted for the first prediction and the type of the block targeted for the second prediction may be different from each other. The type of block may be an original block, a luma block, a chroma block, a depth block, a residual block, or the like.
예를 들면, 제1 예측의 대상인 블록은 현재 블록 또는 원본 블록일 수 있다.For example, the block that is the target of the first prediction may be the current block or the original block.
예를 들면, 제1 예측에 의해 생성된 제1 예측 오차는 제1 예측 오차 블록을 나타낼 수 있다. 제1 예측 오차는 제1 잔차 신호일 수 있다. 또한, 제1 잔차 신호는 제1 잔차 블록을 나타낼 수 있다. 제2 예측의 대상인 블록은 제1 예측 오차 블록 또는 제1 잔차 블록일 수 있다. 이러한 경우, 제1 예측에 의해서는 제1 잔차 신호가 생성될 수 있고, 제2 예측에 의해서는 제2 예측에 제2 예측 오차가 생성될 수 있다. 제2 예측 오차는 제2 잔차 신호일 수 있다. 제2 잔차 신호는 제2 잔차 블록을 나타낼 수 있다.For example, the first prediction error generated by the first prediction may represent the first prediction error block. The first prediction error may be a first residual signal. Also, the first residual signal may represent a first residual block. The block that is the target of the second prediction may be a first prediction error block or a first residual block. In this case, the first residual signal may be generated by the first prediction, and the second prediction error may be generated by the second prediction. The second prediction error may be a second residual signal. The second residual signal may represent a second residual block.
예측을 위해서는 참조 블록이 사용될 수 있다. 일 실시예에서, 제1 예측의 제1 참조 블록 및 제2 예측의 제2 참조 블록은 서로 상이할 수 있다. 참조 블록들은 종류 및/또는 위치의 측면에서 서로 상이할 수 있다.Reference blocks may be used for prediction. In one embodiment, the first reference block of the first prediction and the second reference block of the second prediction may be different from each other. The reference blocks may differ from each other in terms of type and / or location.
일 실시예에서, 제1 예측의 제1 참조 블록의 위치 및 제2 예측의 제2 참조 블록의 위치는 서로 상이할 수 있다. 여기에서, 제1 참조 블록의 위치는 제1 예측의 대상인 블록에 대한 상대적인 위치일 수 있다. 제2 참조 블록의 위치는 제2 예측의 대상인 블록에 대한 상대적인 위치일 수 있다.In one embodiment, the position of the first reference block of the first prediction and the position of the second reference block of the second prediction may be different from each other. Here, the position of the first reference block may be a position relative to the block that is the target of the first prediction. The position of the second reference block may be a position relative to the block that is the target of the second prediction.
일 실시예에서, 제1 예측의 제1 참조 블록은 복수일 수 있다. 제2 예측의 제2 참조 블록은 복수일 수 있다. 제1 예측의 복수의 제1 참조 블록들 및 제2 예측의 복수의 제2 참조 블록들 중 적어도 일부는 서로 상이할 수 있다.In one embodiment, the first reference block of the first prediction may be plural. The second reference block of the second prediction may be plural. At least some of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction may be different from each other.
제1 예측의 복수의 제1 참조 블록들 및 제2 예측의 복수의 제2 참조 블록들 중 적어도 하나의 블록의 위치는 복수의 제1 참조 블록들의 위치들 및 복수의 제2 참조 블록들의 위치들 중 하나에만 포함될 수 있다.The position of at least one of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction is the positions of the plurality of first reference blocks and the positions of the plurality of second reference blocks. Can only be included in one of the
일 실시예에서, 제1 예측의 제1 참조 블록의 종류 및 제2 예측의 제2 참조 블록의 종류는 서로 상이할 수 있다. 블록의 종류는 복원된 블록, 복원된 루마(luma) 블록, 복원된 색차(chroma) 블록, 복원된 깊이(depth) 블록, 복원된 제1 잔차 블록 및 복원된 제2 잔차 블록 등일 수 있다.In one embodiment, the type of the first reference block of the first prediction and the type of the second reference block of the second prediction may be different from each other. The type of block may be a reconstructed block, a reconstructed luma block, a reconstructed chroma block, a reconstructed depth block, a reconstructed first residual block, a reconstructed second residual block, or the like.
예를 들면, 제1 예측의 제1 참조 블록은 복원된 블록일 수 있다. 제2 예측의 제2 참조 블록은 복원된 제1 잔차 블록일 수 있다. 제1 예측의 제1 참조 샘플은 복원된 블록의 픽셀일 수 있다. 제2 예측의 제2 참조 샘플은 복원된 제1 잔차 블록의 픽셀일 수 있다.For example, the first reference block of the first prediction may be a reconstructed block. The second reference block of the second prediction may be a reconstructed first residual block. The first reference sample of the first prediction may be a pixel of the reconstructed block. The second reference sample of the second prediction may be a pixel of the reconstructed first residual block.
예를 들면, 제1 예측의 제1 참조 블록은 현재 블록에 이웃한 복원된 이웃 블록일 수 있다. 제2 예측의 제2 참조 블록은 현재 블록에 이웃한 복원된 제1 잔차 블록일 수 있다.For example, the first reference block of the first prediction may be a reconstructed neighboring block neighboring the current block. The second reference block of the second prediction may be a reconstructed first residual block neighboring the current block.
현재 블록에 이웃한 복원된 이웃 잔차 블록은 복원된 이웃 블록의 복원된 잔차 블록에 복원된 이웃 블록의 제2 예측 블록을 더한 것일 수 있다. 또는, 현재 블록에 이웃한 복원된 이웃 잔차 블록은 복원된 이웃 블록 및 복원된 이웃 블록의 제1 예측 블록 간의 차분일 수 있다.The reconstructed neighbor residual block neighboring the current block may be obtained by adding the reconstructed residual block of the reconstructed neighboring block to the second prediction block of the reconstructed neighboring block. Alternatively, the reconstructed neighbor residual block neighboring the current block may be a difference between the reconstructed neighboring block and the first prediction block of the reconstructed neighboring block.
예를 들면, 제1 예측의 대상이 현재 블록인 경우, 현재 블록에 대한 예측을 위해 참조 블록으로서 현재 블록의 주변의 복원된 블록이 사용될 수 있다. 제2 예측의 대상이 제1 잔차 블록인 경우, 제1 잔차 블록에 대한 예측을 위해 제2 참조 블록으로서 현재 블록 또는 제1 잔차 블록의 주변의 복원된 제1 잔차 블록이 사용될 수 있다.For example, when the object of the first prediction is the current block, a reconstructed block around the current block may be used as a reference block for prediction of the current block. When the target of the second prediction is the first residual block, a reconstructed first residual block around the current block or the first residual block may be used as the second reference block for prediction on the first residual block.
일 실시예에서, 제1 예측의 영역 및 제2 예측의 영역은 서로 상이할 수 있다. 여기에서, "예측의 영역"은 예측의 대상인 블록 중 예측 값이 생성되는 영역을 나타낼 수 있다. 또는, "예측의 영역"은 예측의 대상인 블록에 대응하는 예측 블록 중 예측에 의해 생성된 예측 값이 할당되는 영역을 나타낼 수 있다.In one embodiment, the region of the first prediction and the region of the second prediction may be different from each other. Here, the "prediction area" may indicate an area in which a prediction value is generated among blocks that are to be predicted. Alternatively, the “area of prediction” may indicate an area to which a prediction value generated by prediction is allocated among prediction blocks corresponding to a block that is a prediction target.
예를 들면, 제1 예측은 현재 블록의 영역에 대한 예측일 수 있다. 제2 예측은 상기의 영역의 일부에 대한 예측일 수 있다. 현재 블록의 영역 중 적어도 일부는 제2 예측에서 제외될 수 있다. 제1 예측의 대상인 블록은 사각형의 영역 내의 블록일 수 있다. 제2 예측은 상기의 사각형의 영역 중 일부에 대해 이루어질 수 있다. 상기의 사각형의 영역 중 적어도 일부는 제2 예측의 대상이 아닐 수 있다.For example, the first prediction may be a prediction for an area of the current block. The second prediction may be a prediction for a portion of the above area. At least some of the area of the current block may be excluded from the second prediction. The block that is the target of the first prediction may be a block within a rectangular area. The second prediction may be made for some of the above rectangular regions. At least some of the areas of the quadrangle may not be the target of the second prediction.
제1 예측의 대상인 블록의 영역 및 제2 예측의 대상인 블록의 영역이 동일하다고 보는 경우, 제1 예측의 영역은 제1 예측의 대상인 블록의 전체일 수 있다. 제2 예측의 영역은 제2 예측의 대상인 블록의 일부일 수 있다. 또는, 제2 예측은 제2 예측의 대상인 블록의 적어도 일부에 대해서는 제외될 수 있다. 말하자면, 제1 예측은 제1 예측의 대상인 블록의 전체에 대해 수행될 수 있다. 제2 예측은 제2 예측의 대상인 블록의 선택된 일부에 대해 수행될 수 있다.When the area of the block that is the target of the first prediction and the area of the block that is the target of the second prediction are considered to be the same, the area of the first prediction may be the entire block that is the target of the first prediction. The area of the second prediction may be part of a block that is the target of the second prediction. Alternatively, the second prediction may be excluded for at least a portion of the block that is the target of the second prediction. In other words, the first prediction may be performed on the entire block that is the target of the first prediction. The second prediction may be performed on the selected portion of the block that is the target of the second prediction.
예를 들면, 제1 예측의 대상인 블록 중 제1 예측의 영역 내의 픽셀에 대해서만 제1 예측에 의해 결정된 예측 값들이 할당될 수 있다. 제1 예측의 대상인 블록 중 제1 예측의 영역 외의 픽셀에는 제1 예측에 의한 예측 값이 할당되지 않을 수 있다. 또는, 제1 예측의 대상인 블록 중 제1 예측의 영역 외의 픽셀에는 기정의된 값이 할당될 수 있다. 기정의된 값은 "0"일 수 있다.For example, prediction values determined by the first prediction may be assigned only to pixels in the region of the first prediction among blocks that are the targets of the first prediction. The prediction value according to the first prediction may not be allocated to pixels outside the region of the first prediction among the blocks that are the targets of the first prediction. Alternatively, a predefined value may be assigned to pixels outside the region of the first prediction among blocks that are the target of the first prediction. The predefined value may be "0".
예를 들면, 제2 예측의 대상인 블록 중 제2 예측의 영역 내의 픽셀에 대해서만 제2 예측에 의해 결정된 예측 값들이 할당될 수 있다. 제2 예측의 대상인 블록 중 제2 예측의 영역 외의 픽셀에는 제2 예측에 의한 예측 값이 할당되지 않을 수 있다. 또는, 제2 예측의 대상인 블록 중 제2 예측의 영역 외의 픽셀에는 기정의된 값이 할당될 수 있다. 예를 들면, 기정의된 값은 "0"일 수 있다.For example, prediction values determined by the second prediction may be assigned only to pixels in the region of the second prediction among blocks that are the target of the second prediction. Pixels outside the region of the second prediction among the blocks that are the target of the second prediction may not be assigned a prediction value by the second prediction. Alternatively, a predefined value may be assigned to pixels outside the region of the second prediction among blocks that are the target of the second prediction. For example, the predefined value may be "0".
예를 들면, 제1 예측의 대상인 블록의 크기가 NxN일 때, NxN개의 픽셀들의 각각에게 제1 예측에 의해 결정된 예측 값이 할당될 수 있다. 말하자면, 제1 예측의 대상인 블록의 전체의 픽셀들에게 제1 예측에 의해 결정된 예측 값이 할당될 수 있다.For example, when the size of the block that is the target of the first prediction is NxN, each of the NxN pixels may be assigned a prediction value determined by the first prediction. In other words, the prediction value determined by the first prediction may be assigned to all pixels of the block that are the targets of the first prediction.
예를 들면, 제2 예측의 대상인 블록의 크기가 NxN일 때, NxN개의 픽셀들 중 하나 이상의 픽셀에게는 제1 예측에 의해 결정된 예측 값이 할당되지 않을 수 있다. 또는, 제2 예측의 대상인 블록의 크기가 NxN일 때, NxN개의 픽셀들 중 하나 이상의 픽셀에게는 기정의된 값이 할당될 수 있다. 예를 들면, 기정의된 값은 "0"일 수 있다.For example, when the size of the block that is the target of the second prediction is N × N, one or more pixels among the N × N pixels may not be assigned a prediction value determined by the first prediction. Alternatively, when the size of the block that is the target of the second prediction is N × N, one or more pixels among the N × N pixels may be assigned a predefined value. For example, the predefined value may be "0".
일 실시예에서, 제1 예측의 영역은 제1 예측의 종류에 기반하여 결정될 수 있다. 예를 들면, 제1 예측의 영역은 제1 예측이 인터 예측인지 여부에 기반하여 결정될 수 있다. 또는, 제1 예측의 영역은 제1 예측이 인트라 예측인지 여부에 기반하여 결정될 수 있다. 또는, 제1 예측의 영역은 제1 예측의 예측 방향에 기반하여 결정될 수 있다.In one embodiment, the region of the first prediction may be determined based on the type of the first prediction. For example, the region of the first prediction may be determined based on whether the first prediction is inter prediction. Alternatively, the region of the first prediction may be determined based on whether the first prediction is intra prediction. Alternatively, the region of the first prediction may be determined based on the prediction direction of the first prediction.
일 실시예에서, 제2 예측의 영역은 제2 예측의 종류에 기반하여 결정될 수 있다. 예를 들면, 제2 예측의 영역은 제2 예측이 인터 예측인지 여부에 기반하여 결정될 수 있다. 또는, 제2 예측의 영역은 제2 예측이 인트라 예측인지 여부에 기반하여 결정될 수 있다. 또는, 제2 예측의 영역은 제2 예측의 예측 방향에 기반하여 결정될 수 있다.In one embodiment, the region of the second prediction may be determined based on the type of the second prediction. For example, the region of the second prediction may be determined based on whether the second prediction is inter prediction. Alternatively, the region of the second prediction may be determined based on whether the second prediction is intra prediction. Alternatively, the region of the second prediction may be determined based on the prediction direction of the second prediction.
일 실시예에서, 제2 예측은 선택적인 범위 내의 제2 참조 샘플을 사용하여 수행될 수 있다.In one embodiment, the second prediction may be performed using a second reference sample within an optional range.
일 실시예에서, 제1 예측을 위해 사용되는 제1 참조 샘플의 영역 및 제2 예측을 위해 사용되는 제2 참조 샘플의 영역은 서로 상이할 수 있다.In one embodiment, the region of the first reference sample used for the first prediction and the region of the second reference sample used for the second prediction may be different from each other.
전술된 것과 같이, 제1 예측의 영역 및 제2 예측의 영역은 서로 상이할 수 있다. 제1 참조 샘플의 영역은 제1 예측을 통해 제1 예측의 영역에 대한 예측 값들을 생성하기 위해 요구되는 참조 샘플들의 영역일 수 있다. 제2 참조 샘플의 영역은 제2 예측을 통해 제2 예측의 영역에 대한 예측 값들을 생성하기 위해 요구되는 참조 샘플들의 영역일 수 있다.As described above, the region of the first prediction and the region of the second prediction may be different from each other. The area of the first reference sample may be an area of reference samples required for generating prediction values for the area of the first prediction through the first prediction. The area of the second reference sample may be an area of reference samples required for generating prediction values for the area of the second prediction through the second prediction.
전술된 것과 같이, 제1 예측의 영역은 제1 예측의 대상인 블록의 전체일 수 있다. 제2 예측의 영역은 제2 예측의 대상인 블록의 일부일 수 있다. 이러한 경우, 제2 참조 샘플의 영역은 제1 참조 샘플의 영역의 일부일 수 있다.As described above, the region of the first prediction may be the entirety of the block that is the target of the first prediction. The area of the second prediction may be part of a block that is the target of the second prediction. In this case, the region of the second reference sample may be part of the region of the first reference sample.
단계(1120)에서, 부호화부는 잔차 신호에 대한 부호화를 수행할 수 있다. 부호화부는 잔차 신호에 대한 부호화를 수행함으로써 부호화된 잔차 신호에 대한 정보를 생성할 수 있다.In operation 1120, the encoder may perform encoding on the residual signal. The encoder may generate information about the encoded residual signal by performing encoding on the residual signal.
부호화부는 변환부(130), 양자화부(140) 및 엔트로피 부호화부(150)를 포함할 수 있다.The encoder may include a transformer 130, a quantizer 140, and an entropy encoder 150.
단계(1120)는 단계들(1121, 1122 및 1123)을 포함할 수 있다. Step 1120 may include steps 1121, 1122, and 1123.
단계(1121)에서, 변환부(130)는 잔차 신호의 변환 계수를 생성할 수 있다.In operation 1121, the transformer 130 may generate transform coefficients of the residual signal.
단계(1122)에서, 양자화부(140)는 변환 계수에 대한 양자화를 수행함으로써 양자화된 변환 계수를 생성할 수 있다.In operation 1122, the quantization unit 140 may generate quantized transform coefficients by performing quantization on the transform coefficients.
단계(1123)에서, 엔트로피 부호화부(150)는 양자화된 변환 계수에 대한 엔트로피 부호화를 수행함으로써 부호화된 잔차 신호에 대한 정보를 생성할 수 있다.In operation 1123, the entropy encoder 150 may generate information on the encoded residual signal by performing entropy encoding on the quantized transform coefficients.
단계(1130)에서, 엔트로피 부호화부(150)는 부호화된 잔차 신호에 대한 정보를 포함하는 비트스트림을 생성할 수 있다.In operation 1130, the entropy encoder 150 may generate a bitstream including information about the encoded residual signal.
비트스트림은 부호화된 잔차 신호에 대한 정보를 포함할 수 있고, 예측에 관련된 정보를 포함할 수 있다. The bitstream may include information about the encoded residual signal, and may include information related to prediction.
엔트로피 부호화부(150)는 예측에 관련된 정보를 비트스트림에 포함시킬 수 있다. 예측의 관련된 정보는 엔트로피 부호화될 수 있다.The entropy encoder 150 may include information related to prediction in the bitstream. Related information of the prediction may be entropy coded.
예를 들면, 예측에 관련된 정보는 현재 블록이 어떠한 방식에 의해 부호화되었는지를 나타내는 예측 방식 정보를 포함할 수 있다.For example, the information related to the prediction may include prediction scheme information indicating how the current block is encoded.
예를 들면, 예측 방식 정보는 현재 블록이 인트라 예측 및 인트라 예측 중 어떤 예측으로 부호화되었는지를 나타낼 수 있다. 또는, 예측 방식 정보는 현재 블록이 인트라 예측에 의해 부호화되었는지 여부를 나타낼 수 있다. 또는, 예측 방식 정보는 현재 블록이 인터 예측에 의해 부호화되었는지 여부를 나타낼 수 있다.For example, the prediction scheme information may indicate whether the current block is encoded by intra prediction or intra prediction. Alternatively, the prediction scheme information may indicate whether the current block is encoded by intra prediction. Alternatively, the prediction scheme information may indicate whether the current block is encoded by inter prediction.
예를 들면, 예측에 관련된 정보는 인트라 예측의 예측 모드를 나타내는 인트라 예측 모드 정보를 포함할 수 있다.For example, the information related to the prediction may include intra prediction mode information indicating a prediction mode of the intra prediction.
예를 들면, 예측에 관련된 정보는 현재 블록의 부호화에 있어서 제2 예측의 사용 여부를 나타내는 제2 예측 사용 정보를 포함할 수 있다.For example, the information related to the prediction may include second prediction usage information indicating whether the second prediction is used in encoding the current block.
예를 들면 예측에 관련된 정보는 현재 블록의 종류를 나타내는 현재 블록 종류 정보, 제1 예측 블록의 종류를 나타내는 제1 예측 블록 종류 정보, 제2 예측 블록의 종류를 나타내는 제2 예측 블록 종류 정보, 제1 참조 블록의 종류를 나타내는 제1 참조 블록 종류 정보, 제2 참조 블록의 종류를 나타내는 제2 참조 블록 종류 정보, 제1 참조 샘플의 종류를 나타내는 제1 참조 샘플 종류 정보 및 제2 참조 샘플의 종류를 나타내는 제2 참조 샘플 종류 정보 등을 포함할 수 있다.For example, the information related to the prediction includes current block type information indicating the type of the current block, first prediction block type information indicating the type of the first prediction block, second prediction block type information indicating the type of the second prediction block, First reference block type information indicating a type of a reference block, second reference block type information indicating a type of a second reference block, first reference sample type information indicating a type of a first reference sample, and a type of a second reference sample Second reference sample type information indicating the information may be included.
예를 들면, 예측에 관련된 정보는 제1 예측의 영역을 나타내는 제1 예측 영역 정보 및/또는 제2 예측의 제2 예측 영역을 나타내는 제2 예측 영역 정보를 포함할 수 있다.For example, the information related to the prediction may include first prediction region information indicating the region of the first prediction and / or second prediction region information indicating the second prediction region of the second prediction.
예측에 관련된 정보는 실시예들에서 설명된 예측을 위해 사용된 정보를 포함할 수 있다. 엔트로피 부호화부(150)는 예측에 관련된 정보들을 실시예에서 설명된 순서 또는 실시예에 따른 생성의 순서에 따라서 비트스트림에 포함시킬 수 있다.Information related to the prediction may include information used for the prediction described in the embodiments. The entropy encoder 150 may include the information related to the prediction in the bitstream in the order described in the embodiment or the generation order according to the embodiment.
단계(1140)에서, 통신부(1020)는 비트스트림을 복호화 장치(200) 또는 복호화 장치(1700)로 전송할 수 있다.In operation 1140, the communication unit 1020 may transmit the bitstream to the decoding apparatus 200 or the decoding apparatus 1700.
단계(1150)에서, 복원된 잔차 신호 생성부는 잔차 신호에 대한 정보에 기반하여 복원된 잔차 신호를 생성할 수 있다.In operation 1150, the reconstructed residual signal generator may generate a reconstructed residual signal based on the information about the residual signal.
복원된 잔차 신호 생성부는 역양자화부(160) 및 역변환부(170)를 포함할 수 있다.The reconstructed residual signal generator may include an inverse quantizer 160 and an inverse transformer 170.
단계(1150)는 단계들(1151 및 1152)를 포함할 수 있다. Step 1150 may include steps 1151 and 1152.
단계(1151)에서, 역양자화부(160)는 양자화된 변환 계수에 대한 역양자화를 수행함으로써 복원된 변환 계수를 생성할 수 있다.In operation 1151, the inverse quantization unit 160 may generate the reconstructed transform coefficients by performing inverse quantization on the quantized transform coefficients.
단계(1152)에서, 변환부(130)는 복원된 변환 계수에 대한 변환을 수행함으로써 복원된 잔차 신호를 생성할 수 있다.In operation 1152, the transformer 130 may generate the reconstructed residual signal by performing transform on the reconstructed transform coefficients.
단계(1160)에서, 복원된 블록 생성부는 복원된 잔차 신호, 제1 예측 및 제2 예측에 기반하여 복원된 블록을 생성할 수 있다.In operation 1160, the reconstructed block generator may generate a reconstructed block based on the reconstructed residual signal, the first prediction, and the second prediction.
복원된 블록 생성부는 가산부(175)를 포함할 수 있다.The restored block generator may include an adder 175.
예를 들면, 복원된 잔차 신호 및 예측 신호의 합은 복원된 블록을 나타낼 수 있다. 또는, 복원된 블록은 복원된 잔차 신호 및 예측 신호의 합에 기반하여 생성될 수 있다.For example, the sum of the reconstructed residual signal and the prediction signal may represent a reconstructed block. Alternatively, the reconstructed block may be generated based on the sum of the reconstructed residual signal and the prediction signal.
예를 들면, 복원된 블록은 복원된 잔차 블록 및 예측 블록의 합일 수 있다. 예측 블록은 제1 예측 블록 및 제2 예측 블록의 합일 수 있다. 또는, 복원된 블록은 복원된 잔차 블록 및 예측 블록의 합에 기반하여 생성될 수 있다.For example, the reconstructed block may be the sum of the reconstructed residual block and the prediction block. The prediction block may be the sum of the first prediction block and the second prediction block. Alternatively, the reconstructed block may be generated based on the sum of the reconstructed residual block and the prediction block.
예를 들면, 복원된 블록은 복원된 잔차 블록, 제2 예측 블록 및 제1 예측 블록에 의해 생성된 블록일 수 있다. 복원된 블록 생성부는 복원된 잔차 신호 및 제2 예측 신호를 더함으로써 복원된 제1 잔차 신호를 생성할 수 있다. 복원된 블록 생성부는 복원된 제1 잔차 신호 및 제1 예측 신호를 더함으로써 복원된 블록을 생성할 수 있다.For example, the reconstructed block may be a block generated by the reconstructed residual block, the second prediction block, and the first prediction block. The reconstructed block generator may generate the reconstructed first residual signal by adding the reconstructed residual signal and the second prediction signal. The reconstructed block generator may generate the reconstructed block by adding the reconstructed first residual signal and the first prediction signal.
또는, 복원된 블록 생성부는 복원된 잔차 블록 및 제2 예측 블록을 더함으로써 복원된 제1 잔차 블록을 생성할 수 있다. 복원된 블록 생성부는 복원된 제1 잔차 블록 및 제1 예측 블록을 더함으로써 복원된 블록을 생성할 수 있다.Alternatively, the reconstructed block generator may generate the reconstructed first residual block by adding the reconstructed residual block and the second prediction block. The reconstructed block generator may generate the reconstructed block by adding the reconstructed first residual block and the first prediction block.
복원된 블록 및 복원된 제1 잔차 신호는 다른 블록의 부호화를 위한 참조 블록으로서 사용될 수 있다.The reconstructed block and the reconstructed first residual signal may be used as reference blocks for encoding other blocks.
도 12는 일 실시예에 따른 인트라 예측을 사용하는 제1 예측 및 제2 예측을 나타낸다.12 illustrates first prediction and second prediction using intra prediction, according to an embodiment.
도 11을 참조하여 전술된 단계(1110)에서, 제1 예측 및 제2 예측은 인트라 예측일 수 있다. 도 12에서는 제1 예측 및 제2 예측이 인트라 예측인 경우의 현재 블록의 부호화의 일 예를 도시한다.In step 1110 described above with reference to FIG. 11, the first prediction and the second prediction may be intra prediction. 12 illustrates an example of encoding of a current block when the first prediction and the second prediction are intra prediction.
현재 블록은 PU일 수 있다. 도 12에서는 현재 블록으로서, 2Nx2N의 크기의 PU가 도시되었다.The current block may be a PU. In FIG. 12, a PU having a size of 2N × 2N is illustrated as a current block.
우선, 현재 블록의 부호화를 위해서, 예측부는 복수의 예측 모드들 중 어떤 예측 모드를 사용하여 제1 예측을 사용할 것인가를 결정할 수 있다.First, for encoding the current block, the prediction unit may determine which prediction mode from among a plurality of prediction modes to use the first prediction.
예측부는 복수의 예측 모드들의 각각을 사용하여 제1 예측을 수행할 수 있다. 예를 들면, 복수의 예측 모드들의 예측 방향들은 서로 다를 수 있다.The prediction unit may perform the first prediction by using each of the plurality of prediction modes. For example, the prediction directions of the plurality of prediction modes may be different.
제1 예측에 있어서, 현재 블록의 주변의 복원된 블록들이 참조 블록들로서 사용될 수 있다. 또한, 현재 블록의 주변의 복원된 블록들의 픽셀들이 참조 샘플들로서 사용될 수 있다.In the first prediction, reconstructed blocks around the current block can be used as reference blocks. Also, pixels of reconstructed blocks around the current block can be used as reference samples.
예측부는 제1 예측을 통해 복수의 예측 모드들의 제1 예측 블록들을 생성할 수 있다.The prediction unit may generate first prediction blocks of the plurality of prediction modes through the first prediction.
또한, 예측부는 제1 예측을 통해 복수의 예측 모드들의 제1 예측 오차들을 생성할 수 있다. 하나의 예측 모드에 대해, 제1 예측 블록 및 제1 예측 오차가 계산될 수 있다.Also, the prediction unit may generate first prediction errors of the plurality of prediction modes through the first prediction. For one prediction mode, the first prediction block and the first prediction error can be calculated.
제1 예측 오차는 현재 블록 및 제1 예측 블록의 차분(residual)을 나타낼 수 있다. 제1 예측 오차는 제1 잔차 블록을 나타낼 수 있다.The first prediction error may indicate a difference between the current block and the first prediction block. The first prediction error may represent the first residual block.
제1 예측 오차가 생성되면, 예측부는 제1 예측 오차를 참조하여, 제1 잔차 블록에서 제2 예측이 적용될 영역을 선택할 수 있다. 선택된 영역은 제1 잔차 블록의 일부일 수 있다.When the first prediction error is generated, the prediction unit may select a region to which the second prediction is to be applied in the first residual block by referring to the first prediction error. The selected area may be part of the first residual block.
다음으로, 현재 블록의 부호화를 위해서, 예측부는 제1 잔차 블록의 어떤 일부에 대해서 제2 예측이 적용될 것인가를 결정할 수 있다.Next, for encoding the current block, the prediction unit may determine which part of the first residual block to apply the second prediction to.
제2 예측은 선택된 영역인 제1 잔차 블록의 일부에 적용될 수 있다. 제2 예측이 적용될 영역을 선택하기 위해 다양한 방법들이 사용될 수 있다.The second prediction may be applied to the portion of the first residual block that is the selected region. Various methods can be used to select the region to which the second prediction is to be applied.
제2 예측의 예측 영역은 제2 예측에 사용되는 참조 샘플들의 범위에 의해 특정될 수 있다.The prediction region of the second prediction may be specified by the range of reference samples used for the second prediction.
제2 예측에 있어서, 현재 블록에 이웃한 복원된 잔차 블록들이 참조 블록들로서 사용될 수 있다. 또한, 현재 블록에 이웃한 복원된 잔차 블록들의 픽셀들이 참조 샘플들로서 사용될 수 있다.In the second prediction, reconstructed residual blocks neighboring the current block may be used as reference blocks. Also, pixels of reconstructed residual blocks neighboring the current block can be used as reference samples.
제1 예측의 예측 방향 및 제2 예측의 예측 방향은 동일할 수 있다. 말하자면, 제1 예측의 인트라 예측 모드 및 제2 예측의 인트라 예측 모드는 동일할 수 있다.The prediction direction of the first prediction and the prediction direction of the second prediction may be the same. In other words, the intra prediction mode of the first prediction and the intra prediction mode of the second prediction may be the same.
도 12에서는, 모드 값이 30인 인트라 예측 모드가 예시적으로 도시되었다.In FIG. 12, an intra prediction mode having a mode value of 30 is illustrated as an example.
일반적으로, 제1 예측의 예측 방향 및 제2 예측의 예측 방향이 동일하다면, 제1 예측의 참조 샘플들의 범위 및 제2 예측의 참조 샘플들의 범위는 동일할 수 있다.In general, if the prediction direction of the first prediction and the prediction direction of the second prediction are the same, the range of reference samples of the first prediction and the reference samples of the second prediction may be the same.
제2 예측은 제1 잔차 블록의 일부에 적용될 수 있다. 제2 예측의 참조 샘플들의 범위는 제1 예측의 참조 샘플들의 범위의 일부일 수 있다.The second prediction may be applied to a portion of the first residual block. The range of reference samples of the second prediction may be part of the range of reference samples of the first prediction.
도 12에서, 제2 예측의 참조 샘플들의 범위는 α 및 α+β 사이의 범위로 도시되었다.In FIG. 12, the range of reference samples of the second prediction is shown as a range between α and α + β.
α는 제2 예측의 예측 방향에 대한 참조 샘플들 중 제2 예측에 사용될 첫 번째의 참조 샘플을 가리킬 수 있다. 또는, α는 제2 예측의 시작 위치를 가리킬 수 있다.α may indicate the first reference sample to be used for the second prediction among the reference samples for the prediction direction of the second prediction. Alternatively, α may indicate the starting position of the second prediction.
α+β는 제2 예측의 예측 방향에 대한 참조 샘플들 중 제2 예측에 사용될 마지막의 참조 샘플을 가리킬 수 있다. 또는, α+β는 제2 예측의 마지막 위치를 가리킬 수 있다.α + β may indicate the last reference sample to be used for the second prediction among the reference samples for the prediction direction of the second prediction. Alternatively, α + β may indicate the last position of the second prediction.
β는 제2 예측에 사용될 참조 샘플들의 개수를 나타낼 수 있다. 또는, β는 제2 예측의 범위 또는 제2 예측의 길이를 나타낼 수 있다.β may represent the number of reference samples to be used for the second prediction. Alternatively, β may represent the range of the second prediction or the length of the second prediction.
참조 샘플들의 범위가 결정되면, 결정된 참조 샘플들의 범위 및 예측 방향에 따라서 제2 예측의 영역이 특정될 수 있다. 도 12에서는 잔차 블록 내의 점선들로 특정된 영역이 도시되었다. 제2 예측의 영역은 α 및 α+β의 사이의 범위의 참조 샘플들이 예측 방향으로 진행함에 따라 생성된 영역일 수 있다.Once the range of reference samples is determined, an area of the second prediction may be specified according to the determined range of reference samples and the prediction direction. In FIG. 12, regions specified by dotted lines in the residual block are shown. The region of the second prediction may be a region generated as the reference samples in the range between α and α + β advance in the prediction direction.
예측부는 예측 방향에 대한 참조 샘플들 중 제2 예측에 사용할 참조 샘플의 범위를 선택할 수 있다. 예측부는 예측 방향에 대한 전체의 참조 샘플들 중 선택된 범위의 참조 샘플들을 사용하여 제2 예측을 수행할 수 있다. 여기에서, 전체의 참조 샘플들은 제1 예측에서 사용된 참조 샘플들에 대응할 수 있다.The prediction unit may select a range of reference samples to be used for the second prediction among the reference samples for the prediction direction. The prediction unit may perform the second prediction by using the reference samples in the selected range among the entire reference samples for the prediction direction. Here, the entire reference samples may correspond to the reference samples used in the first prediction.
제2 예측에 있어서, 선택된 범위의 바깥의 참조 샘플의 값은 널(NULL) 또는 "0"으로 간주될 수 있다. 예를 들면, α의 이전의 참조 샘플의 값은 0으로 간주될 수 있고, α+β의 이후의 참조 샘플의 값은 0으로 간주될 수 있다.For the second prediction, the value of the reference sample outside of the selected range may be considered null or "0". For example, the value of the previous reference sample of α may be considered zero, and the value of the subsequent reference sample of α + β may be considered zero.
예측부는 제2 예측을 통해 복수의 후보 영역들에 대한 제2 예측 블록들을 생성할 수 있다.The prediction unit may generate second prediction blocks for the plurality of candidate regions through the second prediction.
복수의 후보 영역들은 서로 상이할 수 있다. 복수의 후보 영역들은 제1 잔차 블록의 서로 다른 일부들일 수 있다.The plurality of candidate regions may be different from each other. The plurality of candidate regions may be different portions of the first residual block.
예를 들면, 제1 잔차 블록의 영역이 제2 예측에 사용되는 참조 샘플들로서 특정될 수 있다. 이러한 경우 제1 잔차 블록의 일부 또는 제1 잔차 블록에 대한 제2 예측의 영역은 순서쌍 (α, β)으로 표현될 수 있다. 복수의 후보 영역들에 대응하는 (α, β)의 순서쌍들은 서로 상이할 수 있다. 말하자면, 순서쌍 (α, β)은 제2 예측에 사용될 참조 샘플들의 범위를 나타낼 수 있다.For example, the region of the first residual block can be specified as reference samples used for the second prediction. In this case, a part of the first residual block or the region of the second prediction for the first residual block may be represented by an ordered pair (α, β). Order pairs of (α, β) corresponding to the plurality of candidate regions may be different from each other. In other words, the ordered pairs α and β may indicate a range of reference samples to be used for the second prediction.
복수의 후보 영역들은 제1 잔차 블록에 대해 특정된 방식에 의해 선택될 수 있는 모든 서로 다른 영역들일 수 있다. 예를 들면, 특정된 방식은 예측 방향일 수 있다.The plurality of candidate regions may be all different regions that may be selected by the manner specified for the first residual block. For example, the specified scheme may be a prediction direction.
예를 들면, 제1 잔차 블록의 영역이 제2 예측에 사용되는 참조 샘플들로서 특정될 수 있다. 제2 예측의 예측 모드에서 제1 잔차 블록의 전체에 대해 사용될 수 있는 참조 샘플의 개수가 n 일 때, α는 0 이상 n-1 이하일 수 있다. β는 0 이상 n-1-α 이하일 수 있다. 또한, 제2 예측의 예측 모드에서 제1 잔차 블록의 전체에 대해 사용될 수 있는 참조 샘플이 n개 일 때, (α, β)의 순서쌍들의 개수는 (n+1)n/2 일 수 있다. 말하자면, 제2 예측의 예측 모드에서 제1 잔차 블록의 전체에 대해 사용될 수 있는 참조 샘플이 n개일 때, 복수의 후보 영역들의 개수는 (n+1)n/2 일 수 있다.For example, the region of the first residual block can be specified as reference samples used for the second prediction. When the number of reference samples that can be used for the whole of the first residual block in n in the prediction mode of the second prediction is n, α may be greater than or equal to 0 and less than or equal to n−1. β may be 0 or more and n-1-α or less. Further, when there are n reference samples that can be used for the entirety of the first residual block in the prediction mode of the second prediction, the number of ordered pairs of (α, β) may be (n + 1) n / 2. In other words, when there are n reference samples that can be used for the entirety of the first residual block in the prediction mode of the second prediction, the number of the plurality of candidate regions may be (n + 1) n / 2.
예를 들면, 복수의 후보 영역들은 제2 예측에 사용될 참조 샘플들의 범위들에 각각 대응할 수 있다.For example, the plurality of candidate regions may respectively correspond to ranges of reference samples to be used for the second prediction.
α 및 β는 각각 특정된 예측 방향에서의 참조 샘플들의 목록의 인덱스(index)일 수 있다.α and β may each be an index of a list of reference samples in a specified prediction direction.
α 및 β 등을 사용하여 참조 샘플들의 목록에서의 위치를 가리키기 위해서는 참조 샘플들의 순서가 정해져야 할 수 있다.In order to indicate the position in the list of reference samples using α and β, etc., the order of the reference samples may be determined.
일 실시예에서, 우선적으로, 참조 샘플의 X 좌표의 값이 작을수록 참조 샘플의 순서가 더 빠를 수 있다. 다음으로, X 좌표들의 값들의 동일한 참조 샘플들 중에서는 참조 샘플의 Y 좌표의 값이 클수록 참조 샘플의 순서가 더 빠를 수 있다. 예를 들면, 하단 좌측(below-left) 참조 샘플들(731), 좌측(left) 참조 샘플들(733), 상단 좌측(above-left) 코너 참조 샘플(735), 상단(above) 참조 샘플들(737) 및 상단 우측(above-right) 참조 샘플들(739)의 순서로 참조 샘플의 순서가 부여될 수 있다. 하단 좌측 참조 샘플들(731) 중에서는 아래에 위치한 참조 샘플이 위에 위치한 참조 샘플보다 더 빠른 순서를 가질 수 있다. 좌측 참조 샘플들(733) 중에서는 아래에 위치한 참조 샘플이 위에 위치한 참조 샘플보다 더 빠른 순서를 가질 수 있다. 상단 참조 샘플들(737) 중에서는 좌측에 위치한 참조 샘플이 우측에 위치한 참조 샘플보다 더 빠른 순서를 가질 수 있다. 상단 우측 참조 샘플들(739) 중에서는 좌측에 위치한 참조 샘플이 우측에 위치한 참조 샘플보다 더 빠른 순서를 가질 수 있다.In one embodiment, first of all, the smaller the value of the X coordinate of the reference sample, the faster the order of the reference sample. Next, among the same reference samples of the values of the X coordinates, the larger the value of the Y coordinate of the reference sample, the faster the order of the reference samples. For example, the lower left reference samples 731, the left reference samples 733, the upper left-left corner reference sample 735, and the upper reference samples. The order of the reference sample may be given in the order of 737 and the above right-above reference samples 739. Among the lower left reference samples 731, the lower reference sample may have a faster order than the upper reference sample. Among the left reference samples 733, the bottom reference sample may have a faster order than the top reference sample. Among the top reference samples 737, the reference sample located on the left side may have a faster order than the reference sample located on the right side. Among the upper right reference samples 739, the left reference sample may have a faster order than the right reference sample.
전술된 참조 샘플들의 순서는 일 예에 대한 것이고, 다른 방식의 순서도 사용될 수 있다. 예를 들면, 전술된 순서의 역순으로 참조 샘플들의 순서가 부여될 수 있다.The order of reference samples described above is for one example, and other manners of order may be used. For example, the order of the reference samples may be given in the reverse order described above.
또한, 참조 샘플들의 순서는 예측 방향에 따라서 결정된 참조 샘플들에 대해서 부여될 수 있다. 말하자면, 전술된 하단 좌측(below-left) 참조 샘플들(731), 좌측(left) 참조 샘플들(733), 상단 좌측(above-left) 코너 참조 샘플(735), 상단(above) 참조 샘플들(737) 및 상단 우측(above-right) 참조 샘플들(739) 중 제2 예측의 예측 방향에 따라 결정된 일부의 참조 샘플들만이 제1 잔차 블록의 전체의 예측을 위해 사용될 수 있다. 결정된 일부의 참조 샘플들에 대해서 순서가 부여될 수 있다.Further, the order of the reference samples may be given for the reference samples determined according to the prediction direction. In other words, the above-described lower-left reference samples 731, left-reference samples 733, upper-left corner reference sample 735, and upper reference samples Only some of the reference samples 737 and upper-right reference samples 739 determined according to the prediction direction of the second prediction may be used for the prediction of the entirety of the first residual block. Order may be given for some of the determined reference samples.
예를 들면, 제2 예측의 예측 방향이 수직 방향일 경우, 제1 잔차 블록의 전체에 대해 사용될 수 있는 참조 샘플들은 상단 참조 샘플들(737)일 수 있다. 현재 블록의 크기가 2Nx2N일 때, 상단 참조 샘플들(737) 중 최좌측의 참조 샘플의 순서는 0일 수 있고, 상단 참조 샘플들(737) 중 최우측의 참조 샘플의 순서는 2N-1일 수 있다.For example, when the prediction direction of the second prediction is the vertical direction, the reference samples that may be used for the entirety of the first residual block may be upper reference samples 737. When the size of the current block is 2N × 2N, the order of the leftmost reference sample among the top reference samples 737 may be 0, and the order of the rightmost reference sample among the top reference samples 737 may be 2N−1. Can be.
또는, 예를 들면, 제2 예측의 예측 방향이 수평 방향일 경우, 제1 잔차 블록의 전체에 대해 사용될 수 있는 참조 샘플들은 좌측 참조 샘플들(733)일 수 있다. 현재 블록의 크기가 2Nx2N일 때, 좌측 참조 샘플들(737) 중 최하단 참조 샘플의 순서는 0일 수 있고, 좌측 참조 샘플들(737) 중 최상단 참조 샘플의 순서는 2N-1일 수 있다.Or, for example, when the prediction direction of the second prediction is the horizontal direction, reference samples that may be used for the entirety of the first residual block may be left reference samples 733. When the size of the current block is 2N × 2N, the order of the lowest reference sample of the left reference samples 737 may be 0, and the order of the highest reference sample of the left reference samples 737 may be 2N-1.
예측부는 제2 예측을 통해 복수의 후보 영역들에 대한 제2 예측 오차들을 생성할 수 있다. 하나의 영역에 대해, 제2 예측 블록 및 제2 예측 오차가 계산될 수 있다.The prediction unit may generate second prediction errors for the plurality of candidate regions through the second prediction. For one region, the second prediction block and the second prediction error can be calculated.
제2 예측 오차는 제1 잔차 블록 및 제2 예측 블록의 차분(residual)을 나타낼 수 있다. 제2 예측 오차는 제2 잔차 블록을 나타낼 수 있다.The second prediction error may indicate a residual between the first residual block and the second prediction block. The second prediction error may represent the second residual block.
전술된 것과 같이, 예측부는 복수의 예측 모드들에 대해 복수의 제1 예측 오차들을 생성할 수 있다 또한, 복수의 제1 예측 오차들의 각 제1 예측 오차에 대해서, 예측부는 제2 예측을 통해 제1 예측 오차가 나타내는 제1 잔차 블록의 복수의 후보 영역들에 대한 제2 예측 오차들을 생성할 수 있다.As described above, the prediction unit may generate a plurality of first prediction errors for the plurality of prediction modes. Further, for each first prediction error of the plurality of first prediction errors, the prediction unit may generate the first prediction error through the second prediction. Second prediction errors of the plurality of candidate regions of the first residual block indicated by the first prediction error may be generated.
전술된 과정들을 통해, 예측부는 복수의 예측 모드들의 전체의 후보 영역들에 대하여 제2 예측 오차들을 생성할 수 있다.Through the above-described processes, the prediction unit may generate second prediction errors for all candidate regions of the plurality of prediction modes.
예측부는 생성된 제2 예측 오차들 중 최소의 율-왜곡 비용을 갖는 제2 예측 오차를 선택할 수 있다. 복수의 후보 영역들 중 선택된 제2 예측 오차에 대응하는 후보 영역이 현재 블록의 제2 예측이 적용될 일부일 수 있다. 또한, 복수의 예측 모드들 중 선택된 제2 예측 오차에 대응하는 예측 모드가 제1 예측에서 사용될 예측 모드일 수 있다. 말하자면, 어떤 예측 모드의 어떤 영역에 대한 제2 예측 오차가 최소의 율-왜곡 비용을 갖는가에 따라서, 예측부는 현재 블록의 부호화를 위해 사용될 제1 예측의 예측 모드 및 제2 예측의 영역을 결정할 수 있다.The prediction unit may select a second prediction error having a minimum rate-distortion cost among the generated second prediction errors. The candidate region corresponding to the selected second prediction error among the plurality of candidate regions may be a part to which the second prediction of the current block is applied. In addition, a prediction mode corresponding to the selected second prediction error among the plurality of prediction modes may be a prediction mode to be used in the first prediction. In other words, the prediction unit may determine the prediction mode of the first prediction and the region of the second prediction to be used for encoding the current block, depending on whether the second prediction error for which region of the prediction mode has a minimum rate-distortion cost. have.
또는, 우선, 예측부는 복수의 예측 모드들 중 최소의 율-왜곡 비용을 갖는 예측 모드를 선택할 수 있다. 이러한 경우, 선택된 예측 모드에 의해 생성된 제1 예측 오차 또는 제1 잔차 블록에 대해서 제2 예측이 수행될 수 있다. 다음으로, 예측부는 제2 예측 오차들 중 최소의 율-왜곡 비용을 갖는 제2 예측 오차를 선택할 수 있다. 말하자면, 예측부는 어떤 제1 예측 오차가 최소의 율-왜곡 비용을 갖는가에 따라서 현재 블록의 부호화를 위해 사용될 제1 예측의 예측 모드를 결정할 수 있고, 어떤 제2 예측 오차가 최소의 율-왜국 비용을 갖는가에 따라서 현재 블록의 부호화를 위해 사용될 제2 예측의 영역을 결정할 수 있다.Or, first, the prediction unit may select a prediction mode having a minimum rate-distortion cost among the plurality of prediction modes. In this case, the second prediction may be performed on the first prediction error or the first residual block generated by the selected prediction mode. Next, the prediction unit may select a second prediction error having a minimum rate-distortion cost among the second prediction errors. In other words, the prediction unit may determine the prediction mode of the first prediction to be used for encoding the current block according to which first prediction error has the minimum rate-distortion cost, and which second prediction error is the minimum rate-distortion cost. It is possible to determine the region of the second prediction to be used for encoding the current block according to whether
도 11을 참조하여 전술된 예측에 관련된 정보는 전술된 선택적인 2차 화면내 예측에 대한 정보를 포함할 수 있다.The information related to the prediction described above with reference to FIG. 11 may include information about the selective intra-picture prediction described above.
예를 들면, 예측에 관련된 정보는 선택적인 2차 화면내 예측(Secondary Secondary Intra-Prediction; SSIP)의 사용 여부를 나타내는 플래그인 SSIP_flag를 포함할 수 있다.For example, the information related to the prediction may include SSIP_flag, which is a flag indicating whether to use the optional Secondary Intra-Prediction (SSIP).
예를 들면, 예측에 관련된 정보는 전술된 α를 나타내는 정보 및 전술된 β를 나타내는 정보를 포함할 수 있다. 말하자면, 예측에 관련된 정보는 제2 예측에 사용될 첫 번째의 참조 샘플을 가리키는 정보 및 제2 예측에 사용될 참조 샘플의 개수를 가리키는 정보를 포함할 수 있다. 또는, 예측에 관련된 정보는 제2 예측에 사용될 첫 번째의 참조 샘플을 가리키는 정보 및 제2 예측에 사용될 마지막의 참조 샘플을 가리키는 정보를 포함할 수 있다.For example, the information related to the prediction may include information representing α described above and information representing β described above. In other words, the information related to the prediction may include information indicating the first reference sample to be used for the second prediction and information indicating the number of reference samples to be used for the second prediction. Alternatively, the information related to the prediction may include information indicating the first reference sample to be used for the second prediction and information indicating the last reference sample to be used for the second prediction.
또는, 예측에 관련된 정보는 제2 예측이 시작하는 위치 및 제2 예측이 어느 위치까지 진행할 것인가를 나타내는 정보를 포함할 수 있다. 예측에 관련된 정보는 제2 예측이 시작하는 위치 및 제2 예측이 끝나는 위치를 나타내는 정보를 포함할 수 있다.Alternatively, the information related to the prediction may include information indicating a position at which the second prediction starts and to which position the second prediction proceeds. The information related to the prediction may include information indicating a position where the second prediction starts and a position where the second prediction ends.
예를 들면, α를 나타내는 정보 또는 제2 예측이 시작하는 위치를 나타내는 정보는 SSIP_start_point일 수 있고, β를 나타내는 정보 또는 제2 예측이 어느 위치까지 진행할 것인가를 나타내는 정보는 SSIP_length일 수 있다.For example, the information indicating α or the information indicating the position where the second prediction starts may be SSIP_start_point, and the information indicating β or the information indicating to which position the second prediction may proceed may be SSIP_length.
전술된 결정을 통해 현재 블록의 예측 오차가, 기존의 제1 예측만을 수행하는 것에 비해, 더 감소될 수 있다. 제2 예측은 도 9를 참조하여 전술된 예측 모드의 방향으로 예측 오차의 왜곡이 남는 경향성에 대해서 효율적으로 예측 오차를 감소시킬 수 있다. 말하자면, 제2 예측을 통해 예측 모드의 방향으로 예측 오차의 왜곡이 남는 경향성을 효율적으로 사용함으로써 예측의 성능이 향상될 수 있고, 예측 오차가 감소될 수 있다.Through the above-described determination, the prediction error of the current block can be further reduced compared to performing only the existing first prediction. The second prediction may effectively reduce the prediction error with respect to the tendency of the distortion of the prediction error to remain in the direction of the prediction mode described above with reference to FIG. 9. In other words, by effectively using the tendency of the distortion of the prediction error to remain in the direction of the prediction mode through the second prediction, the performance of the prediction may be improved and the prediction error may be reduced.
도 13은 일 실시예에 따른 잔차 블록의 생성 방법의 흐름도이다.13 is a flowchart of a method of generating a residual block, according to an exemplary embodiment.
도 11을 참조하여 전술된 단계(1110)는 단계들(1310, 1320, 1330, 1340, 1350, 1360, 1370 및 1380)을 포함할 수 있다. Step 1110 described above with reference to FIG. 11 may include steps 1310, 1320, 1330, 1340, 1350, 1360, 1370, and 1380.
일 실시예에서, 제1 예측의 대상인 블록은 현재 블록일 수 있다. 제1 예측은 인트라 예측일 수 있다.In one embodiment, the block that is the target of the first prediction may be the current block. The first prediction may be intra prediction.
단계(1310)에서, 예측부는 현재 블록에 대한 제1 예측을 수행함으로써 제1 예측 신호를 생성할 수 있다.In operation 1310, the prediction unit may generate a first prediction signal by performing a first prediction on the current block.
제1 예측 신호는 제1 예측 블록을 나타낼 수 있다.The first prediction signal may represent the first prediction block.
도 12를 참조하여 전술된 것과 같이, 예측부는 현재 블록의 부호화를 위한 최적의 제1 예측의 예측 모드를 찾기 위해 복수의 예측 모드들의 각 예측 모드에 대하여 제1 예측을 수행할 수 있다. 말하자면, 단계들(1310, 1320 및 1325)은 복수의 예측 모드들의 각 예측 모드에 대하여 수행될 수 있다.As described above with reference to FIG. 12, the prediction unit may perform the first prediction for each prediction mode of the plurality of prediction modes to find the prediction mode of the first prediction best for the encoding of the current block. In other words, steps 1310, 1320, and 1325 may be performed for each prediction mode of the plurality of prediction modes.
복수의 예측 모드들은 서로 다른 예측 방향들에 대응할 수 있다.The plurality of prediction modes may correspond to different prediction directions.
단계(1320)에서, 예측부는 현재 블록 및 제1 예측 신호에 기반하여 제1 예측 오차를 생성할 수 있다.In operation 1320, the prediction unit may generate a first prediction error based on the current block and the first prediction signal.
제1 예측 오차는 제1 예측 오차 블록 또는 제1 잔차 블록을 나타낼 수 있다.The first prediction error may represent a first prediction error block or a first residual block.
제1 잔차 블록은 현재 블록 및 제1 예측 블록의 차분(residual)을 나타낼 수 있다. 말하자면, 예측부는 현재 블록으로부터 제1 예측 신호가 나타내는 제1 예측 블록을 뺌으로써 제1 예측 오차를 생성할 수 있다.The first residual block may represent a residual of the current block and the first prediction block. In other words, the prediction unit may generate the first prediction error by subtracting the first prediction block indicated by the first prediction signal from the current block.
단계(1325)에서, 예측부는 제1 예측 오차를 사용하여 제1 예측의 율-왜곡 비용을 계산할 수 있다.In operation 1325, the prediction unit may calculate the rate-distortion cost of the first prediction using the first prediction error.
예측부는 계산된 제1 예측 오차 및/또는 제1 예측의 율-왜곡 비용을 메모리(1030), 저장소(1040) 또는 버퍼에 저장할 수 있다.The prediction unit may store the calculated first prediction error and / or the rate-distortion cost of the first prediction in the memory 1030, the storage 1040, or a buffer.
도 12를 참조하여 전술된 것과 같이, 예측부는 현재 블록의 부호화를 위한 최적의 제1 예측의 예측 모드를 찾기 위해 복수의 예측 모드들의 각 예측 모드에 대하여 제1 예측을 수행할 수 있다. 예측부는 복수의 예측 모드들의 제1 예측 오차들을 사용하여 복수의 예측 모드의 율-왜곡 비용들을 계산할 수 있다. 예측부는 계산된 율-왜곡 비용들 중 최소의 율-왜곡 비용을 최소 제1 율-왜곡 비용 RDcost_1로서 저장할 수 있다. 예를 들면, RDcost_1는 1차의 화면내 예측에 있어서 최소의 율-왜곡 비용을 갖는 모드의 율-왜곡 비용일 수 있다.As described above with reference to FIG. 12, the prediction unit may perform the first prediction for each prediction mode of the plurality of prediction modes to find the prediction mode of the first prediction best for the encoding of the current block. The prediction unit may calculate rate-distortion costs of the plurality of prediction modes using the first prediction errors of the plurality of prediction modes. The prediction unit may store the minimum rate-distortion cost of the calculated rate-distortion costs as the minimum first rate-distortion cost RDcost_1. For example, RDcost_1 may be the rate-distortion cost of the mode with the minimum rate-distortion cost in the first intra picture prediction.
예측부는 RDcost_1에 대응하는 제1 예측 오차 및 RDcost_1를 저장할 수 있다.The prediction unit may store a first prediction error and RDcost_1 corresponding to RDcost_1.
제2 예측은 기정의된 조건에 기반하여 선택적으로 수행될 수 있다.The second prediction can optionally be performed based on the predefined conditions.
단계(1330)에서, 예측부는 제2 예측을 수행할지 여부를 결정할 수 있다.In operation 1330, the prediction unit may determine whether to perform a second prediction.
일 실시예에서, 단계(1330)의 결정은 현재 블록이 제2 예측을 사용하여 부호화되는 것을 최종적으로 결정하는 것은 아닐 수 있다. 단계(1130)에서, 예측부는 현재 블록 또는 제1 잔차 블록에 대해 제2 예측이 가능한지 여부를 판단할 수 있다.In one embodiment, the determination of step 1330 may not ultimately determine that the current block is encoded using the second prediction. In operation 1130, the prediction unit may determine whether a second prediction is possible with respect to the current block or the first residual block.
예를 들면, 제2 예측을 수행하지 않기로 결정된 경우 현재 블록은 제2 예측을 사용하지 않고 부호화될 수 있다. 제2 예측을 수행하기로 결정된 경우, 제2 예측에 의해 제2 예측 신호 및 제2 예측 오차 등이 생성될 수 있으나, 단계(1360)의 율-왜곡 비용들의 비교를 통해 현재 블록의 부호화에 있어서 제2 예측을 사용할지 여부가 결정될 수 있다.For example, if it is determined not to perform the second prediction, the current block may be encoded without using the second prediction. When it is determined to perform the second prediction, the second prediction signal and the second prediction error may be generated by the second prediction, but in encoding of the current block through comparison of the rate-distortion costs in step 1360. It may be determined whether to use the second prediction.
도 12를 참조하여 전술된 것과 같이, 예측부는 현재 블록의 부호화를 위한 최적의 제1 예측의 예측 모드를 찾기 위해 복수의 예측 모드들의 각 예측 모드에 대하여 제1 예측의 수행 후 제2 예측을 수행할지 여부를 결정할 수 있다. 말하자면, 단계(1330)은 복수의 예측 모드들의 각 예측 모드에 대하여 수행될 수 있다.As described above with reference to FIG. 12, the prediction unit performs a second prediction after performing the first prediction on each prediction mode of the plurality of prediction modes to find the prediction mode of the first prediction best for the encoding of the current block. You can decide whether or not to do so. In other words, step 1330 may be performed for each prediction mode of the plurality of prediction modes.
제2 예측을 수행하지 않기로 결정된 경우, 현재 블록의 잔차 블록은 제1 예측 오차가 나타내는 블록일 수 있다. 말하자면, 제1 예측 오차가 잔차 블록으로서 제공될 수 있다.If it is determined not to perform the second prediction, the residual block of the current block may be a block indicated by the first prediction error. In other words, the first prediction error may be provided as a residual block.
제2 예측을 수행하기로 결정된 경우, 현재 블록의 잔차 블록은 후술될 제2 예측 오차 신호가 나타내는 블록일 수 있다. 말하자면, 제2 예측 오차 신호가 잔차 블록으로서 제공될 수 있다.When it is determined to perform the second prediction, the residual block of the current block may be a block indicated by the second prediction error signal to be described later. In other words, the second prediction error signal may be provided as a residual block.
예측부는 기정의된 조건에 기반하여 제2 예측을 수행할지 여부를 결정할 수 잇다.The prediction unit may determine whether to perform the second prediction based on the predefined condition.
일 실시예에서, 예측부는 제1 예측의 예측 모드에 기반하여 제2 예측을 수행할지 여부를 결정할 수 있다.In an embodiment, the prediction unit may determine whether to perform the second prediction based on the prediction mode of the first prediction.
예를 들면, 예측부는 제1 예측의 예측 모드가 비방향성 모드이면 제2 예측을 수행하지 않을 수 있다. 또는, 예측부는 제1 예측의 예측 모드가 방향성 모드이면 제2 예측을 수행할 수 있다.For example, if the prediction mode of the first prediction is the non-directional mode, the prediction unit may not perform the second prediction. Alternatively, the prediction unit may perform the second prediction when the prediction mode of the first prediction is the directional mode.
제1 예측의 예측 모드가 복수의 예측 모드들 중 비방향성 모드인 경우, 예측 모드의 방향이 없기 때문에 선택적인 영역 또는 범위에 대한 예측의 수행이 불가능할 수 있다. 따라서, 제1 예측의 예측 모드가 방향성 모드일 경우에만 제2 예측이 수행될 수도 있다.When the prediction mode of the first prediction is a non-directional mode among the plurality of prediction modes, it may not be possible to perform prediction on a selective region or range because there is no direction of the prediction mode. Therefore, the second prediction may be performed only when the prediction mode of the first prediction is the directional mode.
일 실시예에서, 예측부는 현재 블록의 위치에 기반하여 제2 예측을 수행할지 여부를 결정할 수 있다.In an embodiment, the prediction unit may determine whether to perform the second prediction based on the position of the current block.
예를 들면, 예측부는 현재 블록이 경계에 인접하면 제2 예측을 수행하지 않을 수 있다. 예를 들면, 예측부는 현재 블록이 상단의 경계 및 좌측의 경계에 인접하면 제2 예측을 수행하지 않을 수 있다. 경계는 픽쳐의 경계, 슬라이스의 경계 또는 타일의 경계일 수 있다.For example, the prediction unit may not perform the second prediction when the current block is adjacent to the boundary. For example, the prediction unit may not perform the second prediction when the current block is adjacent to the upper boundary and the left boundary. The boundary may be a boundary of a picture, a boundary of a slice, or a boundary of a tile.
현재 블록이 상단의 경계 및 좌측의 경계에 인접한 경우, 제2 예측을 위한 제1 잔차 블록이 충분하지 않을 수 있다. 제1 잔차 블록이 부족한 경우, 제2 예측을 수행하기 위한 제2 참조 샘플이 온전하게 생성될 수 없다.If the current block is adjacent to the upper boundary and the left boundary, the first residual block for the second prediction may not be sufficient. If the first residual block is lacking, a second reference sample for performing the second prediction cannot be generated intact.
일 실시예에서, 예측부는 현재 블록에 인접한 복원된 블록의 개수에 기반하여 제2 예측을 수행할지 여부를 결정할 수 있다.In an embodiment, the prediction unit may determine whether to perform the second prediction based on the number of reconstructed blocks adjacent to the current block.
예를 들면, 예측부는 현재 블록에 인접한 복원된 블록의 개수가 2개 이하이면 제2 예측을 수행하지 않을 수 있다.For example, if the number of reconstructed blocks adjacent to the current block is two or less, the prediction unit may not perform the second prediction.
제2 예측을 수행하기로 결정된 경우, 단계(1340)가 수행될 수 있다.If it is determined to perform the second prediction, step 1340 may be performed.
재2 예측을 수행하지 않기로 결정된 경우, 단계(1370) 또는 단계(1120)가 수행될 수 있다. 단계(1120)가 수행되는 경우, 단계(1120)의 잔차 신호는 제1 예측 오차일 수 있다. 말하자면, 제2 예측 없이 제1 예측 만이 수행되는 경우, 제1 예측에 의해 생성된 제1 예측 오차가 현재 블록의 잔차 신호로서 사용될 수 있다.If it is determined not to perform the second prediction, step 1370 or step 1120 may be performed. When step 1120 is performed, the residual signal of step 1120 may be a first prediction error. In other words, when only the first prediction is performed without the second prediction, the first prediction error generated by the first prediction may be used as the residual signal of the current block.
단계(1340)에서, 예측부는 제1 예측 오차에 대한 제2 예측을 수행함으로써 제2 예측 신호를 생성할 수 있다.In operation 1340, the prediction unit may generate a second prediction signal by performing a second prediction on the first prediction error.
제2 예측 신호는 제2 예측 블록을 나타낼 수 있다.The second prediction signal may represent the second prediction block.
제2 예측은 인트라 예측일 수 있고, 제2 예측의 예측 방향은 제1 예측의 예측 방향과 동일할 수 있다.The second prediction may be intra prediction, and the prediction direction of the second prediction may be the same as the prediction direction of the first prediction.
예측부는 제1 잔차 블록의 일부의 영역에 대하여 제2 예측을 수행할 수 있다. 일부의 영역은 제2 예측에 사용될 참조 샘플들에 의해 특정될 수 있다.The predictor may perform second prediction on a portion of the first residual block. Some area may be specified by reference samples to be used in the second prediction.
제2 예측의 참조 샘플들의 영역은 제1 예측의 참조 샘플들의 영역의 일부일 수 있다.The area of the reference samples of the second prediction may be part of the area of the reference samples of the first prediction.
도 12를 참조하여 전술된 것과 같이, 예측부는 현재 블록의 부호화를 위한 최적의 제2 예측의 영역을 찾기 위해 복수의 후보 영역들의 각 후보 영역에 대하여 제2 예측을 수행할 수 있다.As described above with reference to FIG. 12, the prediction unit may perform second prediction on each candidate region of the plurality of candidate regions to find an optimal second prediction region for encoding a current block.
또한, 도 12를 참조하여 전술된 것과 같이, 예측부는 현재 블록의 부호화를 위한 최적의 제1 예측의 예측 모드 및 최적의 제2 예측의 영역을 찾기 위해, 각 예측 모드의 각 후보 영역에 대하여 제2 예측을 수행할 수 있다. 말하자면, 단계(1340)는 각 예측 모드의 각 후보 영역에 대하여 수행될 수 있다.In addition, as described above with reference to FIG. 12, the prediction unit is configured for each candidate region of each prediction mode in order to find the prediction mode of the optimal first prediction and the region of the optimal second prediction for encoding the current block. 2 Predictions can be performed. In other words, step 1340 may be performed for each candidate region of each prediction mode.
여기에서, 최적의 제1 예측의 예측 모드 및 최적의 제2 예측의 영역은 복수의 예측 모드들의 복수의 후보 영역들 중 최소의 율-왜곡 비용을 갖는 후보 영역에 대응하는 예측 모드 및 영역일 수 있다. 말하자면, 복수의 예측 모드들의 복수의 후보 영역들 중 어떤 예측 모드 및 어떤 영역에 대해 제1 예측 및 제2 예측이 수행되었을 때 최소의 율-왜곡 비용이 발생하는가에 기반하여 예측부는 현재 블록의 부호화를 위한 제1 예측의 예측 모드 및 제2 예측의 영역을 결정할 수 있다.Here, the prediction mode of the optimal first prediction and the region of the optimal second prediction may be prediction modes and regions corresponding to candidate regions having a minimum rate-distortion cost among the plurality of candidate regions of the plurality of prediction modes. have. In other words, the prediction unit encodes the current block based on which prediction mode and which region among the plurality of candidate regions of the plurality of prediction modes is the minimum rate-distortion cost incurred when the first prediction and the second prediction are performed. The prediction mode of the first prediction and the region of the second prediction may be determined.
복수의 후보 영역들은 제2 예측에 사용될 참조 샘플들의 범위들에 각각 대응할 수 있다.The plurality of candidate regions may respectively correspond to ranges of reference samples to be used for the second prediction.
예측부는 예측 방향에 대한 참조 샘플들 중 제2 예측에 사용할 참조 샘플의 범위를 선택할 수 있다. 예측부는 예측 방향에 대한 전체의 참조 샘플들 중 선택된 범위의 참조 샘플들을 사용하여 제2 예측을 수행할 수 있다. 제2 예측에 있어서, 선택된 범위 바깥의 참조 샘플의 값은 "0"으로 간주될 수 있다.The prediction unit may select a range of reference samples to be used for the second prediction among the reference samples for the prediction direction. The prediction unit may perform the second prediction by using the reference samples in the selected range among the entire reference samples for the prediction direction. For the second prediction, the value of the reference sample outside the selected range may be considered "0".
단계(1350)에서, 예측부는 제1 예측 오차 및 제2 예측 신호에 기반하여 제2 예측 오차를 생성할 수 있다.In operation 1350, the prediction unit may generate a second prediction error based on the first prediction error and the second prediction signal.
제2 예측 오차는 제2 예측 오차 블록 또는 제2 잔차 블록을 나타낼 수 있다.The second prediction error may represent a second prediction error block or a second residual block.
제2 잔차 블록은 제1 잔차 블록 및 제2 예측 블록의 차분(residual)을 나타낼 수 있다. 말하자면, 예측부는 제1 예측 오차가 나타내는 제1 잔차 블록으로부터 제2 예측 신호가 나타내는 제2 예측 블록을 뺌으로써 제2 예측 오차 신호를 생성할 수 있다.The second residual block may represent a residual of the first residual block and the second prediction block. In other words, the prediction unit may generate the second prediction error signal by subtracting the second prediction block indicated by the second prediction signal from the first residual block indicated by the first prediction error.
단계(1355)에서, 예측부는 제2 예측 오차를 사용하여 제2 예측의 율-왜곡 비용을 계산할 수 있다.In operation 1355, the prediction unit may calculate the rate-distortion cost of the second prediction using the second prediction error.
예측부는 계산된 제2 예측 오차 및/또는 제2 예측의 율-왜곡 비용을 메모리(1030), 저장소(1040) 또는 버퍼에 저장할 수 있다.The prediction unit may store the calculated second prediction error and / or the rate-distortion cost of the second prediction in the memory 1030, the storage 1040, or a buffer.
도 12를 참조하여 전술된 것과 같이, 예측부는 현재 블록의 부호화를 위한 최적의 제2 예측의 영역을 찾기 위해 복수의 영역들의 각 영역에 대하여 제2 예측을 수행할 수 있다. 예측부는 복수의 영역들의 제2 예측 오차들을 사용하여 복수의 영역들의 율-왜곡 비용들을 계산할 수 있다. 예측부는 계산된 율-왜곡 비용들 중 최소의 율-왜곡 비용을 최소 제2 율-왜곡 비용 RDcost_2로서 저장할 수 있다. 예를 들면, RDcost_2는 선택적인 제2 화면내 예측에 있어서 최소의 율-왜곡 비용을 갖는 영역의 율-왜곡 비용일 수 있다.As described above with reference to FIG. 12, the prediction unit may perform second prediction on each region of the plurality of regions to find an optimal second prediction region for encoding the current block. The prediction unit may calculate rate-distortion costs of the plurality of regions using second prediction errors of the plurality of regions. The prediction unit may store the minimum rate-distortion cost of the calculated rate-distortion costs as the minimum second rate-distortion cost RDcost_2. For example, RDcost_2 may be the rate-distortion cost of the region with the lowest rate-distortion cost in the optional second intra prediction.
예측부는 RDcost_2에 대응하는 제2 예측 오차 및 RDcost_2를 저장할 수 있다.The prediction unit may store a second prediction error and RDcost_2 corresponding to RDcost_2.
제2 예측은 기정의된 조건에 기반하여 선택적으로 사용될 수 있다.The second prediction can optionally be used based on the predefined conditions.
단계(1360)에서, 예측부는 현재 블록의 부호화에 있어서 제2 예측을 사용할지 여부를 결정할 수 있다.In operation 1360, the prediction unit may determine whether to use the second prediction in encoding of the current block.
예측부는 기정의된 조건에 기반하여 현재 블록의 부호화에 있어서 제2 예측을 사용할지 여부를 결정할 수 있다.The prediction unit may determine whether to use the second prediction in encoding of the current block based on the predefined condition.
예를 들면, 예측부는 제2 예측을 사용함으로써 율-왜곡 비용이 더 감소될 경우 제2 예측을 사용할 것을 결정할 수 있다. 예측부는 제2 예측을 사용하더라도 율-왜곡 비용이 더 감소되지 않는 경우 제2 예측을 사용하지 않을 것을 결정할 수 있다.For example, the prediction unit may determine to use the second prediction if the rate-distortion cost is further reduced by using the second prediction. The prediction unit may determine not to use the second prediction if the rate-distortion cost is not further reduced even if the second prediction is used.
예를 들면, 예측부는 제2 예측을 사용하였을 경우의 최소의 율-왜곡 비용이 제2 예측을 사용하지 않았을 경우의 최소의 율-왜곡 비용보다 더 작은 경우 제2 예측을 사용할 것을 결정할 수 있다.For example, the prediction unit may determine to use the second prediction when the minimum rate-distortion cost when the second prediction is used is smaller than the minimum rate-distortion cost when the second prediction is not used.
일 실시예에서, 예측부는 RDcost_1 및 RDcost_2 간의 비교에 기반하여 현재 블록의 부호화에 있어서 제2 예측을 사용할지 여부를 결정할 수 있다.In an embodiment, the prediction unit may determine whether to use the second prediction in encoding of the current block based on the comparison between RDcost_1 and RDcost_2.
RDcost_2가 RDcost_1 보다 더 작다는 것은 제1 예측만을 사용하였을 때에 비해 제2 예측을 사용함에 따라 현재 블록의 부호화의 율-왜곡 비용이 더 감소할 수 있다는 것을 나타낼 수 있다.The fact that RDcost_2 is smaller than RDcost_1 may indicate that the rate-distortion cost of encoding of the current block may be further reduced by using the second prediction than when using only the first prediction.
예를 들면, RDcost_1가 RDcost_2의 이하이면, 예측부는 현재 블록의 부호화를 위해 제2 예측을 사용하지 않을 것을 결정할 수 있다. RDcost_1가 RDcost_2보다 더 크면, 예측부는 현재 블록의 부호화를 위해 제2 예측을 사용할 것을 결정할 수 있다.For example, if RDcost_1 is less than or equal to RDcost_2, the prediction unit may determine not to use the second prediction for encoding the current block. If RDcost_1 is greater than RDcost_2, the prediction unit may determine to use the second prediction for encoding the current block.
현재 블록의 부호화를 위해 제2 예측이 사용되지 않을 경우 단계(1370)가 수행될 수 있다.If the second prediction is not used for encoding the current block, step 1370 may be performed.
현재 블록의 부호화를 위해 제2 예측이 사용될 경우 단계(1380)가 수행될 수 있다.When the second prediction is used for encoding the current block, step 1380 may be performed.
단계(1370)에서, 예측부는 제2 예측을 사용하지 않는 것을 나타내는 설정을 수행할 수 있다.In operation 1370, the prediction unit may perform a setting indicating that the second prediction is not used.
예측부는 제2 예측 사용 정보가 제2 예측을 사용하지 않는다는 것을 나타내도록 제2 예측 사용 정보의 값을 설정할 수 있다. 예를 들면, 제2 예측 사용 정보의 값이 "0"이면, 제2 예측 사용 정보는 제2 예측을 사용하지 않는다는 것을 나타낼 수 있다.The prediction unit may set a value of the second prediction usage information to indicate that the second prediction usage information does not use the second prediction. For example, if the value of the second prediction usage information is "0", the second prediction usage information may indicate that the second prediction usage information is not used.
단계(1370)가 수행되는 경우, 단계(1120)의 잔차 신호는 제1 예측 오차일 수 있다. 말하자면, 현재 블록에 대해 제2 예측이 수행되지 않는 경우, 제1 예측에 기반하여 생성된 제1 예측 오차가 잔차 신호로서 사용될 수 있다.When step 1370 is performed, the residual signal of step 1120 may be a first prediction error. In other words, when the second prediction is not performed on the current block, the first prediction error generated based on the first prediction may be used as the residual signal.
단계(1380)에서, 예측부는 제2 예측을 사용하는 것을 나타내는 설정을 수행할 수 있다.In operation 1380, the prediction unit may perform setting indicating to use the second prediction.
예측부는 제2 예측 사용 정보가 제2 예측을 사용한다는 것을 나타내도록 제2 예측 사용 정보의 값을 설정할 수 있다. 예를 들면, 제2 예측 사용 정보의 값이 "1"이면, 제2 예측 사용 정보는 제2 예측을 사용한다는 것을 나타낼 수 있다.The prediction unit may set a value of the second prediction usage information to indicate that the second prediction usage information uses the second prediction. For example, if the value of the second prediction usage information is "1", the second prediction usage information may indicate that the second prediction usage information is used.
단계(1380)가 수행되는 경우, 단계(1120)의 잔차 신호는 제2 예측 오차일 수 있다. 말하자면, 현재 블록에 대해 제2 예측이 수행되는 경우, 제1 예측 및 제2 예측에 기반하여 생성된 제2 예측 오차가 잔차 신호로서 사용될 수 있다.When step 1380 is performed, the residual signal of step 1120 may be a second prediction error. In other words, when the second prediction is performed on the current block, the second prediction error generated based on the first prediction and the second prediction may be used as the residual signal.
도 14는 일 예에 따른 복원된 블록의 생성 방법의 흐름도이다.14 is a flowchart of a method of generating a restored block, according to an example.
도 11을 참조하여 전술된 단계(1160)는 아래의 단계들(1410, 1420 및 1430)을 포함할 수 있다. Step 1160 described above with reference to FIG. 11 may include steps 1410, 1420, and 1430 below.
단계(1410)에서, 복원된 블록 생성부 현재 블록의 부호화에 대해서 제2 예측이 사용되었는지 여부를 판단할 수 있다.In operation 1410, it may be determined whether a second prediction is used for encoding of the reconstructed block generator current block.
현재 블록의 부호화에 대해서 제2 예측이 사용된 경우 단계(1420)가 수행될 수 있다.If second prediction is used for encoding of the current block, step 1420 may be performed.
현재 블록의 부호화에 대해서 제2 예측이 사용되지 않은 경우 단계(1430)가 수행될 수 있다, 제2 예측이 사용되지 않은 경우, 현재 블록의 복원된 제1 예측 오차는 복원된 잔차 신호일 수 있다.If the second prediction is not used for encoding of the current block, step 1430 may be performed. If the second prediction is not used, the reconstructed first prediction error of the current block may be a reconstructed residual signal.
단계(1420)에서, 복원된 블록 생성부는 복원된 잔차 신호 및 제2 예측 신호에 기반하여 복원된 제1 예측 오차를 생성할 수 있다.In operation 1420, the reconstructed block generator may generate a reconstructed first prediction error based on the reconstructed residual signal and the second prediction signal.
복원된 블록 생성부는 현재 블록의 잔차 신호 및 현재 블록의 일부의 영역에 대한 제2 예측 신호에 기반하여 현재 블록의 복원된 제1 예측 오차를 생성할 수 있다.The reconstructed block generator may generate a reconstructed first prediction error of the current block based on the residual signal of the current block and the second prediction signal for a portion of the current block.
복원된 제1 예측 오차는 복원된 잔차 신호 및 제2 예측 신호의 합일 수 있다. 또는, 복원된 제1 예측 오차는 복원된 잔차 신호 및 제2 예측 신호에 기반하여 생성될 수 있다.The reconstructed first prediction error may be the sum of the reconstructed residual signal and the second prediction signal. Alternatively, the reconstructed first prediction error may be generated based on the reconstructed residual signal and the second prediction signal.
단계(1430)에서, 복원된 블록 생성부는 복원된 제1 예측 오차 및 제1 예측 신호에 기반하여 복원된 블록을 생성할 수 있다.In operation 1430, the reconstructed block generator may generate a reconstructed block based on the reconstructed first prediction error and the first prediction signal.
복원된 블록 생성부는 현재 블록의 복원된 제1 예측 오차 및 현재 블록의 제1 예측 신호에 기반하여 복원된 블록의 신호를 생성할 수 있다.The reconstructed block generator may generate a signal of the reconstructed block based on the reconstructed first prediction error of the current block and the first prediction signal of the current block.
말하자면, 제2 예측이 사용된 경우, 복원된 블록을 나타내는 신호는 복원된 잔차 신호, 제2 예측 신호 및 제1 예측 신호의 합일 수 있다. 또는, 제2 예측이 사용된 경우, 복원된 블록을 나타내는 신호는 복원된 잔차 신호, 제2 예측 신호 및 제1 예측 신호에 기반하여 생성될 수 있다.In other words, when the second prediction is used, the signal representing the reconstructed block may be the sum of the reconstructed residual signal, the second prediction signal, and the first prediction signal. Alternatively, when the second prediction is used, a signal representing the reconstructed block may be generated based on the reconstructed residual signal, the second prediction signal, and the first prediction signal.
말하자면, 제2 예측이 사용되지 않은 경우, 복원된 블록을 나타내는 신호는 복원된 잔차 신호 및 제1 예측 신호의 합일 수 있다. 또는, 제2 예측이 사용되지 않은 경우, 복원된 블록을 나타내는 신호는 복원된 잔차 신호 및 제1 예측 신호에 기반하여 생성될 수 있다.In other words, when the second prediction is not used, the signal representing the reconstructed block may be the sum of the reconstructed residual signal and the first prediction signal. Alternatively, when the second prediction is not used, a signal representing the reconstructed block may be generated based on the reconstructed residual signal and the first prediction signal.
복원된 블록의 신호는 복원된 제1 예측 오차 및 제1 예측 신호의 합일 수 있다. 또는, 복원된 제1 예측 오차는 복원된 잔차 신호 및 제2 예측 신호에 기반하여 생성될 수 있다.The signal of the reconstructed block may be the sum of the reconstructed first prediction error and the first prediction signal. Alternatively, the reconstructed first prediction error may be generated based on the reconstructed residual signal and the second prediction signal.
도 15는 일 실시예에 따른 부호화 과정을 도시한다.15 illustrates an encoding process according to an embodiment.
도 15에서, + 및 -가 붙은
Figure PCTKR2017000965-appb-I000001
기호는 2개의 신호들에 대한 오차 신호를 생성하는 것을 나타낼 수 있다. + 기호로 입력되는 입력 신호로부터 - 기호로 입력되는 입력 신호를 -으로써 오차 신호가 생성될 수 있다.
In Figure 15, plus and minus
Figure PCTKR2017000965-appb-I000001
The symbol may represent generating an error signal for two signals. An error signal may be generated by subtracting an input signal input with a minus sign from an input signal input with a plus sign.
+ 및 +가 붙은
Figure PCTKR2017000965-appb-I000002
기호는 2개의 신호들을 합한 신호를 생성하는 것을 나타낼 수 있다. + 기호들로 각각 입력되는 입력 신호들을 더함으로써 2개의 신호들의 합인 신호가 생성될 수 있다.
With + and +
Figure PCTKR2017000965-appb-I000002
The symbol may represent generating a signal that combines two signals. A signal that is the sum of the two signals can be generated by adding input signals that are respectively input as + symbols.
도 11을 참조하여 전술된 예측부는 제1 예측기 및 제2 예측기를 포함할 수 있다.The prediction unit described above with reference to FIG. 11 may include a first predictor and a second predictor.
점선 내의 과정은 SSIP를 나타낼 수 있다.The process within the dashed line may represent the SSIP.
마름모는 조건에 따른 분기를 나타낼 수 있다.Rhombus may represent a conditional divergence.
"A = B"와 같은 수식에서, "A"는 값이 할당되는 대상을 나타낼 수 있고, "B"는 대상에 할당되는 값을 나타낼 수 있다.In an expression such as "A = B", "A" may represent a target to which a value is assigned, and "B" may represent a value to be assigned to a target.
TQ는 변환 및 양자화를 나타낼 수 있다. (TQ)-1은 역변환 및 역양자화를 나타낼 수 있다.TQ may represent transform and quantization. (TQ) −1 may represent inverse transformation and inverse quantization.
e1는 제1 예측 오차의 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000003
는 복원된 제1 예측 오차의 신호를 나타낼 수 있다.
e 1 may represent a signal of the first prediction error.
Figure PCTKR2017000965-appb-I000003
May represent a signal of the reconstructed first prediction error.
e2는 제2 예측 오차의 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000004
는 복원된 제2 예측 오차의 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000005
는 도 15에서 도시되지 않았으나, 제2 예측이 사용된 경우,
Figure PCTKR2017000965-appb-I000006
Figure PCTKR2017000965-appb-I000007
와 같을 수 있다. 제2 예측이 사용되지 않은 경우,
Figure PCTKR2017000965-appb-I000008
Figure PCTKR2017000965-appb-I000009
와 같을 수 있다.
e 2 may represent a signal of the second prediction error.
Figure PCTKR2017000965-appb-I000004
May represent a signal of the reconstructed second prediction error.
Figure PCTKR2017000965-appb-I000005
Although not shown in FIG. 15, when the second prediction is used,
Figure PCTKR2017000965-appb-I000006
Is
Figure PCTKR2017000965-appb-I000007
May be the same as If no second prediction is used,
Figure PCTKR2017000965-appb-I000008
Is
Figure PCTKR2017000965-appb-I000009
May be the same as
e는 잔차 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000010
는 복원된 잔차 신호를 나타낼 수 있다.
e may represent a residual signal.
Figure PCTKR2017000965-appb-I000010
May represent the reconstructed residual signal.
Figure PCTKR2017000965-appb-I000011
는 제1 예측 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000012
는 제2 예측 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000011
May represent the first prediction signal.
Figure PCTKR2017000965-appb-I000012
May represent a second prediction signal.
도 16은 일 실시예에 따른 복호화 장치의 구조도이다.16 is a structural diagram of a decoding apparatus according to an embodiment.
복호화 장치 (1600)는 복호화를 수행하는 범용의 컴퓨터 시스템일 수 있다.The decryption apparatus 1600 may be a general purpose computer system for performing decryption.
도 16에서 도시된 바와 같이, 복호화 장치(1600)는 버스(1690)를 통하여 서로 통신하는 적어도 하나의 프로세서(1610), 메모리(1630), 사용자 인터페이스(User Interface; UI) 입력 디바이스(1650), UI 출력 디바이스(1660) 및 저장소(1640)를 포함할 수 있다. 또한, 복호화 장치(1600)는 네트워크(1699)에 연결되는 통신부(1620)를 더 포함할 수 있다. 프로세서(1610)는 중앙 처리 장치(Central Processing Unit; CPU), 메모리(1630) 또는 저장소(1640)에 저장된 프로세싱(processing) 명령어(instruction)들을 실행하는 반도체 장치일 수 있다. 메모리(1630) 및 저장소(1640)는 다양한 형태의 휘발성 또는 비휘발성 저장 매체일 수 있다. 예를 들면, 메모리는 롬(ROM)(1631) 및 램(RAM)(1632) 중 적어도 하나를 포함할 수 있다.As illustrated in FIG. 16, the decoding apparatus 1600 may include at least one processor 1610, a memory 1630, a user interface (UI) input device 1650, which communicates with each other via a bus 1690, UI output device 1660 and storage 1640. In addition, the decoding apparatus 1600 may further include a communication unit 1620 connected to the network 1699. The processor 1610 may be a semiconductor device that executes processing instructions stored in a central processing unit (CPU), a memory 1630, or a storage 1640. Memory 1630 and storage 1640 may be various forms of volatile or nonvolatile storage media. For example, the memory may include at least one of a ROM 1631 and a RAM 1632.
프로세서(1610)는 복호화 장치(200)의 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 인터 예측부(250), 가산기(255), 필터부(260) 및 참조 픽쳐 버퍼(270)를 포함할 수 있다.The processor 1610 may include an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, an intra predictor 240, an inter predictor 250, an adder 255 of the decoding apparatus 200. The filter unit 260 and the reference picture buffer 270 may be included.
기록 매체는 복호화 장치(1600)의 동작을 위한 적어도 하나의 모듈을 저장할 수 있다. 메모리(1630)는 적어도 하나의 모듈을 저장할 수 있고, 적어도 하나의 프로세서(1610)에 의하여 실행되도록 구성될 수 있다.The recording medium may store at least one module for the operation of the decoding apparatus 1600. The memory 1630 may store at least one module and may be configured to be executed by the at least one processor 1610.
일 실시예에 따르면, 복호화 장치(1600)의 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 인터 예측부(250), 가산기(255), 필터부(260) 및 참조 픽쳐 버퍼(270)의 적어도 일부는 프로그램 모듈들일 수 있으며, 외부의 장치 또는 시스템과 통신할 수 있다. 프로그램 모듈들은 운영 체제, 응용 프로그램 모듈 및 기타 프로그램 모듈의 형태로 복호화 장치(1600)에 포함될 수 있다.According to an embodiment, the entropy decoder 210, the inverse quantizer 220, the inverse transformer 230, the intra predictor 240, the inter predictor 250, and the adder 255 of the decoder 1600 may be described. At least some of the filter unit 260 and the reference picture buffer 270 may be program modules, and may communicate with an external device or system. The program modules may be included in the decryption apparatus 1600 in the form of an operating system, an application program module, and other program modules.
프로그램 모듈들은 물리적으로는 여러 가지 공지의 기억 장치 상에 저장될 수 있다. 또한, 이러한 프로그램 모듈 중 적어도 일부는 복호화 장치(1600)와 통신 가능한 원격 기억 장치 에 저장될 수도 있다.The program modules may be physically stored on various known storage devices. In addition, at least some of these program modules may be stored in a remote storage device that can communicate with the decryption apparatus 1600.
프로그램 모듈들은 일 실시예에 따른 기능 또는 동작을 수행하거나, 일 실시예에 따른 추상 데이터 유형을 구현하는 루틴(routine), 서브루틴(subroutine), 프로그램, 오브젝트(object), 컴포넌트(component) 및 데이터 구조(data structure) 등을 포괄할 수 있지만, 이에 제한되지는 않는다.Program modules perform routines or subroutines, programs, objects, components, and data to perform functions or operations, or to implement abstract data types, according to one embodiment. Data structures and the like, but is not limited thereto.
프로그램 모듈들은 프로세서(1610)에 의해 수행되는 명령어(instruction) 또는 코드(code)로 구성될 수 있다.The program modules may be composed of instructions or code performed by the processor 1610.
복호화 장치(1600)의 데이터 또는 정보의 통신과 관련된 기능은 통신부(1620)를 통해 수행될 수 있다.Functions related to communication of data or information of the decoding apparatus 1600 may be performed through the communication unit 1620.
도 17은 일 실시예에 따른 복호화 방법의 흐름도이다.17 is a flowchart of a decoding method according to an embodiment.
실시예의 복호화 방법은 복호화 장치(200) 또는 복호화 장치(1600)에 의해 수행될 수 있다.The decoding method of the embodiment may be performed by the decoding apparatus 200 or the decoding apparatus 1600.
단계(1710)에서, 통신부(1620)는 부호화 장치(100) 또는 부호화 장치(1100)로부터 비트스트림을 수신할 수 있다.In operation 1710, the communication unit 1620 may receive a bitstream from the encoding apparatus 100 or the encoding apparatus 1100.
비트스트림은 부호화된 잔차 신호에 대한 정보를 포함할 수 있고, 예측에 관련된 정보를 포함할 수 있다.The bitstream may include information about the encoded residual signal, and may include information related to prediction.
부호화된 잔차 신호에 대한 정보는 엔트로피 부호화된 양자화된 변환 계수를 포함할 수 있다.The information about the encoded residual signal may include entropy coded quantized transform coefficients.
예측에 관련된 정보는 엔트로피 복호화될 수 있다.Information related to the prediction may be entropy decoded.
단계(1720)에서, 엔트로피 복호화부(210)는 비트스트림에 대한 엔트로피 복호화를 수행함으로써 양자화된 변환 계수를 생성할 수 있다. 또한, 엔트로피 복호화부(210)는 비트스트림에 대한 엔트로피 복호화를 수행함으로써 예측에 관련된 정보를 생성할 수 있다.In operation 1720, the entropy decoder 210 may generate quantized transform coefficients by performing entropy decoding on the bitstream. In addition, the entropy decoding unit 210 may generate information related to prediction by performing entropy decoding on the bitstream.
예를 들면, 예측에 관련된 정보는 현재 블록이 어떠한 방식에 의해 부호화되었는지를 나타내는 예측 방식 정보를 포함할 수 있다.For example, the information related to the prediction may include prediction scheme information indicating how the current block is encoded.
예를 들면, 예측 방식 정보는 현재 블록이 인트라 예측 및 인트라 예측 중 어떤 예측으로 부호화되었는지를 나타낼 수 있다. 또는, 예측 방식 정보는 현재 블록이 인트라 예측에 의해 부호화되었는지 여부를 나타낼 수 있다. 또는, 예측 방식 정보는 현재 블록이 인터 예측에 의해 부호화되었는지 여부를 나타낼 수 있다.For example, the prediction scheme information may indicate whether the current block is encoded by intra prediction or intra prediction. Alternatively, the prediction scheme information may indicate whether the current block is encoded by intra prediction. Alternatively, the prediction scheme information may indicate whether the current block is encoded by inter prediction.
예를 들면, 예측에 관련된 정보는 인트라 예측의 예측 모드를 나타내는 인트라 예측 모드 정보를 포함할 수 있다.For example, the information related to the prediction may include intra prediction mode information indicating a prediction mode of the intra prediction.
예를 들면, 예측에 관련된 정보는 현재 블록의 부호화에 있어서 제2 예측의 사용 여부를 나타내는 제2 예측 사용 정보를 포함할 수 있다.For example, the information related to the prediction may include second prediction usage information indicating whether the second prediction is used in encoding the current block.
예를 들면 예측에 관련된 정보는 현재 블록의 종류를 나타내는 현재 블록 종류 정보, 제1 예측 블록의 종류를 나타내는 제1 예측 블록 종류 정보, 제2 예측 블록의 종류를 나타내는 제2 예측 블록 종류 정보, 제1 참조 블록의 종류를 나타내는 제1 참조 블록 종류 정보, 제2 참조 블록의 종류를 나타내는 제2 참조 블록 종류 정보, 제1 참조 샘플의 종류를 나타내는 제1 참조 샘플 종류 정보 및 제2 참조 샘플의 종류를 나타내는 제2 참조 샘플 종류 정보 등을 포함할 수 있다.For example, the information related to the prediction includes current block type information indicating the type of the current block, first prediction block type information indicating the type of the first prediction block, second prediction block type information indicating the type of the second prediction block, First reference block type information indicating a type of a reference block, second reference block type information indicating a type of a second reference block, first reference sample type information indicating a type of a first reference sample, and a type of a second reference sample Second reference sample type information indicating the information may be included.
예를 들면, 예측에 관련된 정보는 제1 예측의 영역을 나타내는 제1 예측 영역 정보 및/또는 제2 예측의 영역을 나타내는 제2 예측 영역 정보를 포함할 수 있다.For example, the information related to the prediction may include first prediction region information indicating the region of the first prediction and / or second prediction region information indicating the region of the second prediction.
또한, 예측에 관련된 정보는 실시예들에서 설명된 예측을 위해 사용된 정보를 포함할 수 있다. 예측에 관련된 정보들은 실시예에서 설명된 순서 또는 실시예에 따른 생성의 순서에 따라서 비트스트림에 포함될 수 있다.In addition, the information related to the prediction may include information used for the prediction described in the embodiments. Information related to the prediction may be included in the bitstream according to the order described in the embodiment or the order of generation according to the embodiment.
단계(1730)에서, 복원된 잔차 신호 생성부는 양자화된 변환 계수에 기반하여 현재 블록에 대한 복원된 잔차 신호를 생성할 수 있다.In operation 1730, the reconstructed residual signal generator may generate a reconstructed residual signal for the current block based on the quantized transform coefficients.
복원된 잔차 신호 생성부는 역양자화부(220) 및 역변환부(230)를 포함할 수 있다.The reconstructed residual signal generator may include an inverse quantizer 220 and an inverse transformer 230.
단계(1730)은 단계들(1731 및 1732)를 포함할 수 있다. Step 1730 may include steps 1731 and 1732.
단계(1731)에서, 역양자화부(220)는 양자화된 변환 계수에 대한 역양자화를 수행함으로써 역양자화된 변환 계수를 생성할 수 있다.In operation 1731, the inverse quantization unit 220 may generate inverse quantized transform coefficients by performing inverse quantization on the quantized transform coefficients.
단계(1732)에서, 변환부(230)는 역양자화된 변환 계수에 대한 역변환을 수행함으로써 복원된 잔차 신호를 생성할 수 있다.In operation 1732, the transformer 230 may generate the reconstructed residual signal by performing inverse transform on the inverse quantized transform coefficients.
단계들(1710, 1720 및 1730)을 통해 현재 블록에 대한 복원된 잔차 신호가 생성될 수 있다.Through steps 1710, 1720, and 1730, a reconstructed residual signal for the current block may be generated.
단계(1740)에서, 복원된 블록 생성부는 복원된 잔차 신호, 제2 예측 및 제1 예측에 기반하여 복원된 블록을 생성할 수 있다.In operation 1740, the reconstructed block generator may generate a reconstructed block based on the reconstructed residual signal, the second prediction, and the first prediction.
복원된 블록 생성부는 가산부(225), 인트라 예측부(240), 인터 예측부(250), 필터부(260) 및 참조 픽쳐 버퍼(270)를 포함할 수 있다.The reconstructed block generator may include an adder 225, an intra predictor 240, an inter predictor 250, a filter 260, and a reference picture buffer 270.
복원된 잔차 신호는 복원된 잔차 블록일 수 있다.The recovered residual signal may be a recovered residual block.
예를 들면, 복원된 블록은 복원된 잔차 블록 및 예측 블록의 합일 수 있다. 또는, 복원된 블록은 복원된 잔차 블록 및 예측 블록의 합에 기반하여 생성될 수 있다.For example, the reconstructed block may be the sum of the reconstructed residual block and the prediction block. Alternatively, the reconstructed block may be generated based on the sum of the reconstructed residual block and the prediction block.
예를 들면, 예측 블록은 제1 예측 블록 및 제2 예측 블록의 합일 수 있다. 또는, 예측 신호는 제1 예측 신호 및 제2 예측 신호의 합일 수 있다.For example, the prediction block may be the sum of the first prediction block and the second prediction block. Alternatively, the prediction signal may be the sum of the first prediction signal and the second prediction signal.
예를 들면, 복원된 블록은 복원된 잔차 블록, 제1 예측 블록 및 제2 예측 블록의 합일 수 있다. 복원된 신호는 복원된 잔차 신호, 제1 예측 신호 및 제2 예측 신호의 합일 수 있다. 또는, 복원된 블록은 복원된 잔차 블록, 제1 예측 블록 및 제2 예측 블록의 합에 대응할 수 있다.For example, the reconstructed block may be the sum of the reconstructed residual block, the first prediction block, and the second prediction block. The reconstructed signal may be the sum of the reconstructed residual signal, the first prediction signal, and the second prediction signal. Alternatively, the reconstructed block may correspond to the sum of the reconstructed residual block, the first prediction block, and the second prediction block.
제1 예측 블록은 제1 예측에 의해 생성된 블록 또는 제1 예측에 의해 생성된 예측 신호가 나타내는 블록일 수 있다. 제2 예측 블록은 제2 예측에 의해 생성된 블록 또는 제2 예측에 의해 생성된 예측 신호가 나타내는 블록일 수 있다.The first prediction block may be a block generated by the first prediction or a block indicated by the prediction signal generated by the first prediction. The second prediction block may be a block generated by the second prediction or a block indicated by the prediction signal generated by the second prediction.
제2 예측이 사용되지 않은 경우, 제2 예측 신호는 널(null) 신호일 수 있고, 제2 예측 블록은 널(null) 블록일 수 있다. 널 블록은 블록의 모든 픽셀들의 값들이 "0"인 블록일 수 있다.If the second prediction is not used, the second prediction signal may be a null signal and the second prediction block may be a null block. The null block may be a block in which the values of all pixels of the block are "0".
예를 들면, 현재 블록의 부호화에 대해서 제2 예측이 사용된 경우 복원된 잔차 신호는 도 14를 참조하여 전술된 복원된 제2 예측 오차일 수 있다. 또는, 현재 블록의 부호화에 대해서 제2 예측이 사용된 경우 복원된 잔차 신호는 도 11을 참조하여 전술된 제2 예측 오차가 역양자화 및 역변환에 의해 복원된 신호일 수 있다.For example, when the second prediction is used for encoding of the current block, the reconstructed residual signal may be the reconstructed second prediction error described above with reference to FIG. 14. Alternatively, when the second prediction is used for encoding of the current block, the reconstructed residual signal may be a signal in which the second prediction error described above with reference to FIG. 11 is reconstructed by inverse quantization and inverse transformation.
예를 들면, 현재 블록의 부호화에 대해서 제2 예측이 사용되지 않은 복원된 잔차 신호는 도 14를 참조하여 전술된 복원된 제1 예측 오차일 수 있다. 또는, 현재 블록의 부호화에 대해서 제2 예측이 사용되지 않은 경우 복원된 잔차 신호는 도 11을 참조하여 전술된 제1 예측 오차가 역양자화 및 역변환에 의해 복원된 신호일 수 있다.For example, the reconstructed residual signal in which the second prediction is not used for the encoding of the current block may be the reconstructed first prediction error described above with reference to FIG. 14. Alternatively, when the second prediction is not used for encoding of the current block, the reconstructed residual signal may be a signal in which the first prediction error described above with reference to FIG. 11 is reconstructed by inverse quantization and inverse transformation.
복원된 블록 생성부는 인터 예측 또는 인트라 예측을 수행함으로써 복원된 블록을 생성할 수 있다.The reconstructed block generator may generate a reconstructed block by performing inter prediction or intra prediction.
일 실시예에서, 제1 예측 및 제2 예측은 서로 상이한 종류의 예측들일 수 있다.In one embodiment, the first prediction and the second prediction may be different kinds of predictions.
일 실시예에서, 제1 예측 및 제2 예측은 서로 동일한 종류의 예측들일 수 있다. 예를 들면, 제1 예측 및 제2 예측의 각각은 인트라 예측일 수 있다. 제1 예측이 인트라 예측이면, 제2 예측도 인트라 예측으로 설정될 수 있다.In one embodiment, the first prediction and the second prediction may be the same kind of predictions. For example, each of the first prediction and the second prediction may be intra prediction. If the first prediction is intra prediction, the second prediction may also be set to intra prediction.
일 실시예에서, 제1 예측의 예측 방향 및 제2 예측의 예측 방향은 동일할 수 있다. 제2 예측의 예측 방향은 제1 예측의 예측 방향과 동일하게 설정될 수 있다. In one embodiment, the prediction direction of the first prediction and the prediction direction of the second prediction may be the same. The prediction direction of the second prediction may be set to be the same as the prediction direction of the first prediction.
예를 들면, 일 실시예에서, 제1 예측 및 제2 예측의 각각은 인터 예측일 수 있다.For example, in one embodiment, each of the first prediction and the second prediction may be inter prediction.
일 실시예에서, 제1 예측의 대상인 블록 및 제2 예측의 대상인 블록은 서로 상이할 수 있다. 여기에서, "예측의 대상인 블록"은 "예측"이 어떤 블록에 대한 예측 블록을 생성하는가를 의미할 수 있다.In one embodiment, a block that is the target of the first prediction and a block that is the target of the second prediction may be different from each other. Here, the "block to be predicted" may mean to which block the "prediction" generates a prediction block.
예를 들면, 제1 예측의 대상인 블록의 종류 및 제2 예측의 대상인 블록의 종류는 서로 상이할 수 있다. 블록의 종류는 원본 블록, 루마(luma) 블록, 색차(chroma) 블록, 깊이(depth) 블록 및 잔차 블록 등일 수 있다.For example, the type of the block targeted for the first prediction and the type of the block targeted for the second prediction may be different from each other. The type of block may be an original block, a luma block, a chroma block, a depth block, a residual block, or the like.
예를 들면, 제1 예측의 대상인 블록은 복원된 블록일 수 있다. 제2 예측의 대상인 블록은 예측 오차 블록일 수 있다.For example, the block targeted for the first prediction may be a reconstructed block. The block that is the target of the second prediction may be a prediction error block.
예측을 위해서는 참조 블록이 사용될 수 있다. 일 실시예에서, 제1 예측의 제1 참조 블록 및 제2 예측의 제2 참조 블록은 서로 상이할 수 있다. 참조 블록들은 종류 및/또는 위치의 측면에서 서로 상이할 수 있다.Reference blocks may be used for prediction. In one embodiment, the first reference block of the first prediction and the second reference block of the second prediction may be different from each other. The reference blocks may differ from each other in terms of type and / or location.
일 실시예에서, 제1 예측의 제1 참조 블록의 위치 및 제2 예측의 제2 참조 블록의 위치는 서로 상이할 수 있다. 여기에서, 제1 참조 블록의 위치는 제1 예측의 대상인 블록에 대한 상대적인 위치일 수 있다. 제2 참조 블록의 위치는 제2 예측의 대상인 블록에 대한 상대적인 위치일 수 있다.In one embodiment, the position of the first reference block of the first prediction and the position of the second reference block of the second prediction may be different from each other. Here, the position of the first reference block may be a position relative to the block that is the target of the first prediction. The position of the second reference block may be a position relative to the block that is the target of the second prediction.
일 실시예에서, 제1 예측의 제1 참조 블록은 복수일 수 있다. 제2 예측의 제2 참조 블록은 복수일 수 있다. 제1 예측의 복수의 제1 참조 블록들 및 제2 예측의 복수의 제2 참조 블록들 중 적어도 일부는 서로 상이할 수 있다.In one embodiment, the first reference block of the first prediction may be plural. The second reference block of the second prediction may be plural. At least some of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction may be different from each other.
제1 예측의 복수의 제1 참조 블록들 및 제2 예측의 복수의 제2 참조 블록들 중 적어도 하나의 블록의 위치는 복수의 제1 참조 블록들의 위치들 및 복수의 제2 참조 블록들의 위치들 중 하나에만 포함될 수 있다.The position of at least one of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction is the positions of the plurality of first reference blocks and the positions of the plurality of second reference blocks. Can only be included in one of the
일 실시예에서, 제1 예측의 제1 참조 블록의 종류 및 제2 예측의 제2 참조 블록의 종류는 서로 상이할 수 있다. 블록의 종류는 복원된 블록, 복원된 루마(luma) 블록, 복원된 색차(chroma) 블록, 복원된 깊이(depth) 블록, 복원된 제1 잔차 블록 및 복원된 제2 잔차 블록 등일 수 있다.In one embodiment, the type of the first reference block of the first prediction and the type of the second reference block of the second prediction may be different from each other. The type of block may be a reconstructed block, a reconstructed luma block, a reconstructed chroma block, a reconstructed depth block, a reconstructed first residual block, a reconstructed second residual block, or the like.
예를 들면, 제1 예측의 제1 참조 블록은 복원된 블록일 수 있다. 제2 예측의 제2 참조 블록은 복원된 제1 잔차 블록일 수 있다. 제1 예측의 제1 참조 샘플은 복원된 블록의 픽셀일 수 있다. 제2 예측의 제2 참조 샘플은 복원된 제1 잔차 블록의 픽셀일 수 있다.For example, the first reference block of the first prediction may be a reconstructed block. The second reference block of the second prediction may be a reconstructed first residual block. The first reference sample of the first prediction may be a pixel of the reconstructed block. The second reference sample of the second prediction may be a pixel of the reconstructed first residual block.
예를 들면, 제1 예측의 제1 참조 블록은 현재 블록에 이웃한 복원된 이웃 블록일 수 있다. 제2 예측의 제2 참조 블록은 현재 블록에 이웃한 복원된 제1 잔차 블록일 수 있다.For example, the first reference block of the first prediction may be a reconstructed neighboring block neighboring the current block. The second reference block of the second prediction may be a reconstructed first residual block neighboring the current block.
현재 블록에 이웃한 복원된 이웃 잔차 블록은 복원된 이웃 블록의 복원된 잔차 블록에 복원된 이웃 블록의 제2 예측 블록을 더한 것일 수 있다. 또는, 현재 블록에 이웃한 복원된 이웃 잔차 블록은 복원된 이웃 블록 및 복원된 이웃 블록의 제1 예측 블록 간의 차분일 수 있다.The reconstructed neighbor residual block neighboring the current block may be obtained by adding the reconstructed residual block of the reconstructed neighboring block to the second prediction block of the reconstructed neighboring block. Alternatively, the reconstructed neighbor residual block neighboring the current block may be a difference between the reconstructed neighboring block and the first prediction block of the reconstructed neighboring block.
예를 들면, 제1 예측의 대상이 현재 블록인 경우, 현재 블록에 대한 예측을 위해 참조 블록으로서 현재 블록의 주변의 복원된 블록이 사용될 수 있다. 제2 예측의 대상이 제1 잔차 블록인 경우, 제1 잔차 블록에 대한 예측을 위해 제2 참조 블록으로서 현재 블록 또는 제1 잔차 블록의 주변의 복원된 제1 잔차 블록이 사용될 수 있다.For example, when the object of the first prediction is the current block, a reconstructed block around the current block may be used as a reference block for prediction of the current block. When the target of the second prediction is the first residual block, a reconstructed first residual block around the current block or the first residual block may be used as the second reference block for prediction on the first residual block.
일 실시예에서, 제1 예측의 영역 및 제2 예측의 영역은 서로 상이할 수 있다. 여기에서, "예측의 영역"은 예측의 대상인 블록 중 예측 값이 생성되는 영역을 나타낼 수 있다. 또는, "예측의 영역"은 예측의 대상인 블록에 대응하는 예측 블록 중 예측에 의해 생성된 예측 값이 할당되는 영역을 나타낼 수 있다.In one embodiment, the region of the first prediction and the region of the second prediction may be different from each other. Here, the "prediction area" may indicate an area in which a prediction value is generated among blocks that are to be predicted. Alternatively, the “area of prediction” may indicate an area to which a prediction value generated by prediction is allocated among prediction blocks corresponding to a block that is a prediction target.
예를 들면, 제1 예측은 현재 블록의 영역에 대한 예측일 수 있다. 제2 예측은 상기의 영역의 일부에 대한 예측일 수 있다. 현재 블록의 영역 중 적어도 일부는 제2 예측에서 제외될 수 있다. 제1 예측의 대상인 블록은 사각형의 영역 내의 블록일 수 있다. 제2 예측은 상기의 사각형의 영역 중 일부에 대해 이루어질 수 있다. 상기의 사각형의 영역 중 적어도 일부는 제2 예측의 대상이 아닐 수 있다.For example, the first prediction may be a prediction for an area of the current block. The second prediction may be a prediction for a portion of the above area. At least some of the area of the current block may be excluded from the second prediction. The block that is the target of the first prediction may be a block within a rectangular area. The second prediction may be made for some of the above rectangular regions. At least some of the areas of the quadrangle may not be the target of the second prediction.
제1 예측의 대상인 블록의 영역 및 제2 예측의 대상인 블록의 영역이 동일하다고 보는 경우, 제1 예측의 영역은 제1 예측의 대상인 블록의 전체일 수 있다. 제2 예측의 영역은 제2 예측의 대상인 블록의 일부일 수 있다. 또는, 제2 예측은 제2 예측의 대상인 블록의 적어도 일부에 대해서는 제외될 수 있다. 말하자면, 제1 예측은 제1 예측의 대상인 블록의 전체에 대해 수행될 수 있다. 제2 예측은 제2 예측의 대상인 블록의 선택된 일부에 대해 수행될 수 있다.When the area of the block that is the target of the first prediction and the area of the block that is the target of the second prediction are considered to be the same, the area of the first prediction may be the entire block that is the target of the first prediction. The area of the second prediction may be part of a block that is the target of the second prediction. Alternatively, the second prediction may be excluded for at least a portion of the block that is the target of the second prediction. In other words, the first prediction may be performed on the entire block that is the target of the first prediction. The second prediction may be performed on the selected portion of the block that is the target of the second prediction.
예를 들면, 제1 예측의 대상인 블록 중 제1 예측의 영역 내의 픽셀에 대해서만 제1 예측에 의해 결정된 예측 값들이 할당될 수 있다. 제1 예측의 대상인 블록 중 제1 예측의 영역 외의 픽셀에는 제1 예측에 의한 예측 값이 할당되지 않을 수 있다. 또는, 제1 예측의 대상인 블록 중 제1 예측의 영역 외의 픽셀에는 기정의된 값이 할당될 수 있다. 예를 들면, 기정의된 값은 "0"일 수 있다.For example, prediction values determined by the first prediction may be assigned only to pixels in the region of the first prediction among blocks that are the targets of the first prediction. The prediction value according to the first prediction may not be allocated to pixels outside the region of the first prediction among the blocks that are the targets of the first prediction. Alternatively, a predefined value may be assigned to pixels outside the region of the first prediction among blocks that are the target of the first prediction. For example, the predefined value may be "0".
예를 들면, 제2 예측의 대상인 블록 중 제2 예측의 영역 내의 픽셀에 대해서만 제2 예측에 의해 결정된 예측 값들이 할당될 수 있다. 제2 예측의 대상인 블록 중 제2 예측의 영역 외의 픽셀에는 제2 예측에 의한 예측 값이 할당되지 않을 수 있다. 또는, 제2 예측의 대상인 블록 중 제2 예측의 영역 외의 픽셀에는 기정의된 값이 할당될 수 있다. 예를 들면, 기정의된 값은 "0"일 수 있다.For example, prediction values determined by the second prediction may be assigned only to pixels in the region of the second prediction among blocks that are the target of the second prediction. Pixels outside the region of the second prediction among the blocks that are the target of the second prediction may not be assigned a prediction value by the second prediction. Alternatively, a predefined value may be assigned to pixels outside the region of the second prediction among blocks that are the target of the second prediction. For example, the predefined value may be "0".
예를 들면, 제1 예측의 대상인 블록의 크기가 NxN일 때, NxN개의 픽셀들의 각각에게 제1 예측에 의해 결정된 예측 값이 할당될 수 있다. 말하자면, 제1 예측의 대상인 블록의 전체의 픽셀들에게 제1 예측에 의해 결정된 예측 값이 할당될 수 있다.For example, when the size of the block that is the target of the first prediction is NxN, each of the NxN pixels may be assigned a prediction value determined by the first prediction. In other words, the prediction value determined by the first prediction may be assigned to all pixels of the block that are the targets of the first prediction.
예를 들면, 제2 예측의 대상인 블록의 크기가 NxN일 때, NxN개의 픽셀들 중 하나 이상의 픽셀에게는 제1 예측에 의해 결정된 예측 값이 할당되지 않을 수 있다. 또는, 제2 예측의 대상인 블록의 크기가 NxN일 때, NxN개의 픽셀들 중 하나 이상의 픽셀에게는 기정의된 값이 할당될 수 있다. 예를 들면, 기정의된 값은 "0"일 수 있다.For example, when the size of the block that is the target of the second prediction is N × N, one or more pixels among the N × N pixels may not be assigned a prediction value determined by the first prediction. Alternatively, when the size of the block that is the target of the second prediction is N × N, one or more pixels among the N × N pixels may be assigned a predefined value. For example, the predefined value may be "0".
일 실시예에서, 제1 예측의 영역은 제1 예측의 종류에 기반하여 결정될 수 있다. 예를 들면, 제1 예측의 영역은 제1 예측이 인터 예측인지 여부에 기반하여 결정될 수 있다. 또는, 제1 예측의 영역은 제1 예측이 인트라 예측인지 여부에 기반하여 결정될 수 있다. 또는, 제1 예측의 영역은 제1 예측의 예측 방향에 기반하여 결정될 수 있다.In one embodiment, the region of the first prediction may be determined based on the type of the first prediction. For example, the region of the first prediction may be determined based on whether the first prediction is inter prediction. Alternatively, the region of the first prediction may be determined based on whether the first prediction is intra prediction. Alternatively, the region of the first prediction may be determined based on the prediction direction of the first prediction.
일 실시예에서, 제2 예측의 영역은 제2 예측의 종류에 기반하여 결정될 수 있다. 예를 들면, 제2 예측의 영역은 제2 예측이 인터 예측인지 여부에 기반하여 결정될 수 있다. 또는, 제2 예측의 영역은 제2 예측이 인트라 예측인지 여부에 기반하여 결정될 수 있다. 또는, 제2 예측의 영역은 제2 예측의 예측 방향에 기반하여 결정될 수 있다.In one embodiment, the region of the second prediction may be determined based on the type of the second prediction. For example, the region of the second prediction may be determined based on whether the second prediction is inter prediction. Alternatively, the region of the second prediction may be determined based on whether the second prediction is intra prediction. Alternatively, the region of the second prediction may be determined based on the prediction direction of the second prediction.
일 실시예에서, 제2 예측은 선택적인 범위 내의 제2 참조 샘플을 사용하여 수행될 수 있다.In one embodiment, the second prediction may be performed using a second reference sample within an optional range.
일 실시예에서, 제1 예측을 위해 사용되는 제1 참조 샘플의 영역 및 제2 예측을 위해 사용되는 제2 참조 샘플의 영역은 서로 상이할 수 있다.In one embodiment, the region of the first reference sample used for the first prediction and the region of the second reference sample used for the second prediction may be different from each other.
전술된 것과 같이, 제1 예측의 영역 및 제2 예측의 영역은 서로 상이할 수 있다. 제1 참조 샘플의 영역은 제1 예측을 통해 제1 예측의 영역에 대한 예측 값들을 생성하기 위해 요구되는 참조 샘플들의 영역일 수 있다. 제2 참조 샘플의 영역은 제2 예측을 통해 제2 예측의 영역에 대한 예측 값들을 생성하기 위해 요구되는 참조 샘플들의 영역일 수 있다.As described above, the region of the first prediction and the region of the second prediction may be different from each other. The area of the first reference sample may be an area of reference samples required for generating prediction values for the area of the first prediction through the first prediction. The area of the second reference sample may be an area of reference samples required for generating prediction values for the area of the second prediction through the second prediction.
전술된 것과 같이, 제1 예측의 영역은 제1 예측의 대상인 블록의 전체일 수 있다. 제2 예측의 영역은 제2 예측의 대상인 블록의 일부일 수 있다. 이러한 경우, 제2 참조 샘플의 영역은 제1 참조 샘플의 영역의 일부일 수 있다.As described above, the region of the first prediction may be the entirety of the block that is the target of the first prediction. The area of the second prediction may be part of a block that is the target of the second prediction. In this case, the region of the second reference sample may be part of the region of the first reference sample.
도 18은 일 실시예에 따른 복원된 블록의 생성 방법의 흐름도이다.18 is a flowchart of a method of generating a restored block, according to an exemplary embodiment.
도 17을 참조하여 전술된 단계(1740)는 아래의 단계들(1810, 1820, 1830, 1840 및 1850)을 포함할 수 있다. Step 1740 described above with reference to FIG. 17 may include the following steps 1810, 1820, 1830, 1840, and 1850.
제2 예측은 기정의된 조건에 기반하여 선택적으로 수행될 수 있다.The second prediction can optionally be performed based on the predefined conditions.
단계(1810)에서, 복원된 블록 생성부는 복원된 블록의 생성에 대해서 제2 예측을 사용할 것인지 여부를 판단할 수 있다.In operation 1810, the reconstructed block generator may determine whether to use the second prediction for generation of the reconstructed block.
복원된 블록 생성부는 기정의된 조건에 기반하여 복원된 블록의 생성에 대해서 제2 예측을 사용할 것인지 여부를 판단할 수 있다.The reconstructed block generator may determine whether to use the second prediction for the generation of the reconstructed block based on a predefined condition.
일 실시예에서, 복원된 블록 생성부는 제1 예측의 예측 모드에 기반하여 제2 예측을 사용할지 여부를 결정할 수 있다.In an embodiment, the reconstructed block generator may determine whether to use the second prediction based on the prediction mode of the first prediction.
예를 들면, 복원된 블록 생성부는 비트스트림으로부터 인트라 예측의 예측 모드를 나타내는 인트라 예측 모드 정보를 획득할 수 있다. 복원된 블록 생성부는 제1 예측의 예측 모드가 비방향성 모드이면 제2 예측을 사용하지 않을 수 있다.For example, the reconstructed block generator may obtain intra prediction mode information indicating a prediction mode of intra prediction from the bitstream. The reconstructed block generator may not use the second prediction if the prediction mode of the first prediction is a non-directional mode.
일 실시예에서, 복원된 블록 생성부는 현재 블록의 위치에 기반하여 제2 예측을 사용할지 여부를 결정할 수 있다.In an embodiment, the reconstructed block generator may determine whether to use the second prediction based on the position of the current block.
예를 들면, 복원된 블록 생성부는 현재 블록이 경계에 인접하면 제2 예측을 사용하지 않을 수 있다. 예를 들면, 예측부는 현재 블록이 상단의 경계 및 좌측의 경계에 인접하면 제2 예측을 사용하지 않을 수 있다. 경계는 픽쳐의 경계, 슬라이스의 경계 또는 타일의 경계일 수 있다.For example, the reconstructed block generator may not use the second prediction when the current block is adjacent to the boundary. For example, the prediction unit may not use the second prediction when the current block is adjacent to the upper boundary and the left boundary. The boundary may be a boundary of a picture, a boundary of a slice, or a boundary of a tile.
일 실시예에서, 복원된 블록 생성부는 현재 블록에 인접한 복원된 블록의 개수에 기반하여 제2 예측을 사용할지 여부를 결정할 수 있다. 복원된 블록은 PU일 수 있다.In an embodiment, the reconstructed block generator may determine whether to use the second prediction based on the number of reconstructed blocks adjacent to the current block. The recovered block may be a PU.
예를 들면, 복원된 블록 생성부는 현재 블록에 인접한 복원된 블록의 개수가 2개 이하이면 제2 예측을 사용하지 않을 수 있다.For example, the reconstructed block generator may not use the second prediction when the number of reconstructed blocks adjacent to the current block is two or less.
일 실시예에서, 예측 모드, 현재 블록의 위치 및/또는 인접한 복원된 블록의 개수 등에 의해 제2 예측을 사용할 것인지에 대한 판단이 이루어진 다음으로, 복원된 블록 생성부는 현재 블록의 부호화에 대해서 제2 예측이 사용되었는지 여부에 기반하여 제2 예측을 사용할지 여부를 결정할 수 있다.In one embodiment, after the determination is made whether to use the second prediction by the prediction mode, the position of the current block, and / or the number of adjacent reconstructed blocks, the reconstructed block generator then performs a second prediction on the encoding of the current block. It may be determined whether to use the second prediction based on whether it is used.
예를 들면, 복원된 블록 생성부는 비트스트림으로부터 제2 예측 사용 정보를 획득할 수 있다. 복원된 블록 생성부는 제2 예측 사용 정보가 제2 예측을 사용한다는 것을 나타내는 경우 제2 예측을 사용할 수 있다. 복원된 블록 생성부는 제2 예측 사용 정보가 제2 예측을 사용하지 않는다는 것을 나타낼 경우 제2 예측을 사용하지 않을 수 있다.For example, the reconstructed block generator may obtain second prediction usage information from the bitstream. The reconstructed block generator may use the second prediction when the second prediction usage information indicates that the second prediction use information is used. The reconstructed block generator may not use the second prediction when the second prediction usage information indicates that the second prediction usage information does not use the second prediction.
현재 블록의 부호화에 대해서 제2 예측을 사용할 경우 단계(1820)가 수행될 수 있다.When using the second prediction for encoding the current block, step 1820 may be performed.
현재 블록의 부호화에 대해서 제2 예측이 사용하지 않을 경우 단계(1840)가 수행될 수 있다, 제2 예측이 사용되지 않은 경우, 현재 블록의 복원된 제1 예측 오차는 복원된 잔차 신호일 수 있다.When the second prediction is not used for encoding the current block, step 1840 may be performed. When the second prediction is not used, the reconstructed first prediction error of the current block may be a reconstructed residual signal.
단계(1820)에서, 복원된 블록 생성부는 제2 예측을 수행하여 제2 예측 신호를 생성할 수 있다.In operation 1820, the reconstructed block generator may generate a second prediction signal by performing a second prediction.
제2 예측은 도 11 및 도 13을 참조하여 전술된 현재 블록의 부호화에서의 제2 예측에 대응할 수 있다. 예를 들면, 제2 예측 신호는 도 11 및 도 13을 참조하여 전술된 현재 블록의 부호화에서의 제2 예측에 대응할 수 있다.The second prediction may correspond to the second prediction in encoding of the current block described above with reference to FIGS. 11 and 13. For example, the second prediction signal may correspond to the second prediction in encoding of the current block described above with reference to FIGS. 11 and 13.
제2 예측 신호는 제2 예측 블록을 나타낼 수 있다.The second prediction signal may represent the second prediction block.
제2 예측은 인트라 예측일 수 있고, 제2 예측의 예측 방향은 제1 예측의 예측 방향과 동일할 수 있다.The second prediction may be intra prediction, and the prediction direction of the second prediction may be the same as the prediction direction of the first prediction.
제2 예측의 참조 블록은 복원된 잔차 블록일 수 있다. 예를 들면, 복원된 블록 생성부는 현재 블록에 이웃한 블록의 복원된 잔차 블록을 참조 블록으로서 사용하는 제2 예측을 수행하여 제2 예측 신호를 생성할 수 있다.The reference block of the second prediction may be a reconstructed residual block. For example, the reconstructed block generator may generate a second prediction signal by performing a second prediction using a reconstructed residual block of a block neighboring the current block as a reference block.
일 실시예에서, 전술된 것과 같이 제2 예측의 영역은 현재 블록의 영역의 일부일 수 있다. 복원된 블록 생성부는 비트스트림으로부터 제2 예측의 예측 영역을 나타내는 제2 예측 영역 정보를 획득할 수 있다. 복원된 블록 생성부는 제2 예측 영역에 대한 제2 예측을 수행할 수 있다.In one embodiment, as described above, the region of the second prediction may be part of the region of the current block. The reconstructed block generator may obtain second prediction region information indicating a prediction region of the second prediction from the bitstream. The reconstructed block generator may perform second prediction on the second prediction region.
일 실시예에서, 제2 예측이 적용될 영역은 제2 예측에 사용되는 참조 샘플들의 범위에 기반하여 특정될 수 있다. 제2 예측이 적용될 영역은 제2 예측의 예측 방향에 기반하여 특정될 수 있다. 예를 들면, 제2 예측이 적용될 영역은 제2 예측에 사용되는 참조 샘플들의 범위 및 제2 예측의 예측 방향에 의해 특정될 수 있다.In one embodiment, the region to which the second prediction is to be applied may be specified based on the range of reference samples used for the second prediction. The region to which the second prediction is to be applied may be specified based on the prediction direction of the second prediction. For example, the region to which the second prediction is to be applied may be specified by the range of reference samples used for the second prediction and the prediction direction of the second prediction.
일 실시예에서, 복원된 블록 생성부는 예측 방향에 대한 전체의 참조 샘플들 중 선택된 범위의 참조 샘플들을 사용하여 제2 예측을 수행할 수 있다. 제2 예측에 있어서, 선택된 범위 바깥의 참조 샘플의 값은 "0"으로 간주될 수 있다.In an embodiment, the reconstructed block generator may perform second prediction using reference samples in a selected range of the entire reference samples for the prediction direction. For the second prediction, the value of the reference sample outside the selected range may be considered "0".
일 실시예에서, 복원된 블록 생성부는 비트스트림으로부터 제2 예측에 사용될 첫 번째의 참조 샘플을 가리키는 정보 α 및 제2 예측에 사용될 참조 샘플의 개수를 가리키는 정보 β를 획득할 수 있다. 제2 예측에 사용되는 참조 샘플들의 범위는 α 및 β에 의해 특정될 수 있다.In an embodiment, the reconstructed block generator may obtain information α indicating the first reference sample to be used for the second prediction and information β indicating the number of reference samples to be used for the second prediction from the bitstream. The range of reference samples used for the second prediction may be specified by α and β.
일 실시예에서, 참조 샘플들의 범위는 제2 예측에 사용될 첫 번째의 참조 샘플을 가리키는 정보 α 및 상기 제2 예측에 사용될 참조 샘플의 개수를 가리키는 정보 β에 의해 특정될 수 있다. 제2 예측의 영역은 α 및 α+β의 사이의 범위의 참조 샘플들이 예측 방향으로 진행함에 따라 생성된 영역일 수 있다.In one embodiment, the range of reference samples may be specified by information α indicating the first reference sample to be used for the second prediction and information β indicating the number of reference samples to be used for the second prediction. The region of the second prediction may be a region generated as the reference samples in the range between α and α + β advance in the prediction direction.
제2 예측에 있어서, 선택된 범위의 바깥의 참조 샘플의 값은 널(NULL) 또는 "0"으로 간주될 수 있다. 예를 들면, α의 이전의 참조 샘플의 값은 0으로 간주될 수 있고, α+β의 이후의 참조 샘플의 값은 0으로 간주될 수 있다.For the second prediction, the value of the reference sample outside of the selected range may be considered null or "0". For example, the value of the previous reference sample of α may be considered zero, and the value of the subsequent reference sample of α + β may be considered zero.
단계(1830)에서, 복원된 블록 생성부는 복원된 잔차 신호 및 제2 예측 신호에 기반하여 복원된 제1 예측 오차를 생성할 수 있다. 복원된 블록 생성부는 복원된 잔차 신호에 제2 예측 신호를 더함으로써 복원된 제1 예측 오차를 생성할 수 있다.In operation 1830, the reconstructed block generator may generate a reconstructed first prediction error based on the reconstructed residual signal and the second prediction signal. The reconstructed block generator may generate the reconstructed first prediction error by adding the second prediction signal to the reconstructed residual signal.
복원된 블록 생성부는 복원된 잔차 신호 및 일부의 영역에 대한 제2 예측 신호에 기반하여 현재 블록의 복원된 제1 예측 오차를 생성할 수 있다.The reconstructed block generator may generate a reconstructed first prediction error of the current block based on the reconstructed residual signal and the second prediction signal for the partial region.
복원된 제1 예측 오차는 복원된 잔차 신호 및 제2 예측 신호의 합일 수 있다. 또는, 복원된 제1 예측 오차는 복원된 잔차 신호 및 제2 예측 신호에 기반하여 생성될 수 있다. 또는, 복원된 제1 예측 오차는 복원된 잔차 신호 및 제2 예측 신호의 합에 기반하여 생성될 수 있다.The reconstructed first prediction error may be the sum of the reconstructed residual signal and the second prediction signal. Alternatively, the reconstructed first prediction error may be generated based on the reconstructed residual signal and the second prediction signal. Alternatively, the reconstructed first prediction error may be generated based on the sum of the reconstructed residual signal and the second prediction signal.
단계(1840)에서, 복원된 블록 생성부는 현재 블록에 대한 제1 예측을 수행하여 제1 예측 신호를 생성할 수 있다.In operation 1840, the reconstructed block generator may generate a first prediction signal by performing a first prediction on the current block.
제1 예측 신호는 제1 예측 블록을 나타낼 수 있다.The first prediction signal may represent the first prediction block.
제1 예측에 있어서, 현재 블록의 주변의 복원된 블록들이 참조 블록들로서 사용될 수 있다. 또한, 현재 블록의 주변의 복원된 블록들의 픽셀들이 참조 샘플들로서 사용될 수 있다.In the first prediction, reconstructed blocks around the current block can be used as reference blocks. Also, pixels of reconstructed blocks around the current block can be used as reference samples.
단계(1850)에서, 복원된 블록 생성부는 복원된 제1 예측 오차 및 제1 예측 신호에 기반하여 복원된 블록의 신호를 생성할 수 있다. 복원된 블록 생성부는 복원된 제1 예측 오차에 제1 예측 신호를 더함으로써 복원된 블록의 신호를 생성할 수 있다.In operation 1850, the reconstructed block generator may generate a signal of the reconstructed block based on the reconstructed first prediction error and the first prediction signal. The reconstructed block generator may generate a signal of the reconstructed block by adding the first prediction signal to the reconstructed first prediction error.
전술된 단계들(1810, 1820, 1830, 1840 및 1850)에 따르면, 제2 예측이 사용된 경우, 복원된 블록은 복원된 잔차 신호, 제2 예측 신호 및 제1 예측 신호의 합일 수 있다. 또는, 제2 예측이 사용된 경우, 복원된 블록을 나타내는 신호는 복원된 잔차 신호, 제2 예측 신호 및 제1 예측 신호에 기반하여 생성될 수 있다.According to the steps 1810, 1820, 1830, 1840, and 1850 described above, when the second prediction is used, the reconstructed block may be the sum of the reconstructed residual signal, the second prediction signal, and the first prediction signal. Alternatively, when the second prediction is used, a signal representing the reconstructed block may be generated based on the reconstructed residual signal, the second prediction signal, and the first prediction signal.
전술된 단계들(1810, 1820, 1830, 1840 및 1850)에 따르면, 제2 예측이 사용되지 않은 경우, 복원된 블록을 나타내는 신호는 복원된 잔차 신호 및 제1 예측 신호의 합일 수 있다. 또는, 제2 예측이 사용되지 않은 경우, 복원된 블록을 나타내는 신호는 복원된 잔차 신호 및 제1 예측 신호의 합에 기반하여 생성될 수 있다.According to the above-described steps 1810, 1820, 1830, 1840, and 1850, when the second prediction is not used, the signal representing the reconstructed block may be the sum of the reconstructed residual signal and the first prediction signal. Or, if the second prediction is not used, a signal representing the reconstructed block may be generated based on the sum of the reconstructed residual signal and the first prediction signal.
복원된 블록 및 복원된 제1 잔차 신호는 다른 블록의 복호화를 위한 참조 블록으로서 사용될 수 있다.The reconstructed block and the reconstructed first residual signal may be used as reference blocks for decoding other blocks.
도 19는 일 실시예에 따른 복호화 과정을 도시한다.19 illustrates a decoding process according to an embodiment.
도 19에서, + 및 +가 붙은
Figure PCTKR2017000965-appb-I000013
기호는 2개의 신호들을 합한 신호를 생성하는 것을 나타낼 수 있다. + 기호들로 각각 입력되는 입력 신호들을 더함으로써 2개의 신호들의 합인 신호가 생성될 수 있다.
In Figure 19, plus and plus
Figure PCTKR2017000965-appb-I000013
The symbol may represent generating a signal that combines two signals. A signal that is the sum of the two signals can be generated by adding input signals that are respectively input as + symbols.
도 19을 참조하여 전술된 복원된 블록 생성부는 제1 예측기 및 제2 예측기를 포함할 수 있다.The reconstructed block generator described above with reference to FIG. 19 may include a first predictor and a second predictor.
점선 내의 과정은 SSIP를 나타낼 수 있다.The process within the dashed line may represent the SSIP.
마름모는 조건에 따른 분기를 나타낼 수 있다.Rhombus may represent a conditional divergence.
(TQ)-1은 역변환 및 역양자화를 나타낼 수 있다.(TQ) −1 may represent inverse transformation and inverse quantization.
Figure PCTKR2017000965-appb-I000014
는 예측 오차일 수 있다. 또는,
Figure PCTKR2017000965-appb-I000015
는 복원된 잔차 신호일 수 있다.
Figure PCTKR2017000965-appb-I000014
May be a prediction error. or,
Figure PCTKR2017000965-appb-I000015
May be a reconstructed residual signal.
Figure PCTKR2017000965-appb-I000016
는 복원된 제1 예측 오차의 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000016
May represent a signal of the reconstructed first prediction error.
Figure PCTKR2017000965-appb-I000017
는 복원된 제2 예측 오차의 신호를 나타낼 수 있다. 제2 예측이 사용된 경우,
Figure PCTKR2017000965-appb-I000018
Figure PCTKR2017000965-appb-I000019
와 같을 수 있다. 또는, 제2 예측이 사용된 경우,
Figure PCTKR2017000965-appb-I000020
Figure PCTKR2017000965-appb-I000021
가 될 수 있다. 제2 예측이 사용되지 않은 경우,
Figure PCTKR2017000965-appb-I000022
Figure PCTKR2017000965-appb-I000023
와 같을 수 있다. 또는, 제2 예측이 사용되지 않은 경우,
Figure PCTKR2017000965-appb-I000024
Figure PCTKR2017000965-appb-I000025
가 될 수 있다.
Figure PCTKR2017000965-appb-I000017
May represent a signal of the reconstructed second prediction error. If a second prediction is used,
Figure PCTKR2017000965-appb-I000018
Is
Figure PCTKR2017000965-appb-I000019
May be the same as Or, if a second prediction is used,
Figure PCTKR2017000965-appb-I000020
Is
Figure PCTKR2017000965-appb-I000021
Can be If no second prediction is used,
Figure PCTKR2017000965-appb-I000022
Is
Figure PCTKR2017000965-appb-I000023
May be the same as Or, if the second prediction is not used,
Figure PCTKR2017000965-appb-I000024
Is
Figure PCTKR2017000965-appb-I000025
Can be
Figure PCTKR2017000965-appb-I000026
는 제1 예측 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000027
는 제2 예측 신호를 나타낼 수 있다.
Figure PCTKR2017000965-appb-I000026
May represent the first prediction signal.
Figure PCTKR2017000965-appb-I000027
May represent a second prediction signal.
전술된 실시예에 따르면, 제2 예측이 사용되는 경우, 제1 예측이 적용되는 선택된 부분 및 제2 예측이 적용되는 나머지의 부분이 분리될 수 있다.According to the above-described embodiment, when the second prediction is used, the selected part to which the first prediction is applied and the remaining part to which the second prediction is applied may be separated.
일 실시예에서, 제2 예측이 사용되는 경우, 제1 예측은 현재 블록의 전체에 적용될 수 있다. 이러한 경우, 제2 예측이 적용되는 선택된 부분에 대한 복원된 블록은 복원된 잔차 블록, 제2 예측에 의해 생성된 제2 예측 신호 및 제1 예측에 의해 생성된 제1 예측 신호의 합에 기반하여 생성될 수 있다. 또한, 제2 예측이 적용되지 않는 나머지의 부분에 대한 복원된 블록은 복원된 잔차 블록 및 제1 예측에 의해 생성된 제1 예측 신호의 합에 기반하여 생성될 수 있다.In one embodiment, when the second prediction is used, the first prediction may be applied to the entirety of the current block. In this case, the reconstructed block for the selected portion to which the second prediction is applied is based on the sum of the reconstructed residual block, the second prediction signal generated by the second prediction, and the first prediction signal generated by the first prediction. Can be generated. In addition, a reconstructed block for the remaining part to which the second prediction is not applied may be generated based on the sum of the reconstructed residual block and the first prediction signal generated by the first prediction.
이러한 경우, 제2 예측은 잔차에 대한 예측일 수 있다. 제2 예측은 현재 블록 및 제1 예측 신호 간의 차이인 제1 잔차 신호에 대한 예측일 수 있다. 제2 예측의 참조 블록은 복원된 잔차 블록일 수 있고, 제2 예측의 참조 픽셀은 복원된 잔차 블록의 픽셀일 수 있다. 말하자면, 제1 잔차 신호에 대한 제2 예측을 통해 제1 잔차 신호 및 제2 예측 신호 간의 차이인 제2 잔차 신호가 생성될 수 있고, 제2 잔차 신호를 사용하여 현재 블록의 부호화된 정보가 생성될 수 있다.In this case, the second prediction may be a prediction for the residual. The second prediction may be a prediction for a first residual signal that is a difference between the current block and the first prediction signal. The reference block of the second prediction may be a reconstructed residual block, and the reference pixel of the second prediction may be a pixel of the reconstructed residual block. In other words, a second residual signal, which is a difference between the first residual signal and the second prediction signal, may be generated through the second prediction on the first residual signal, and encoded information of the current block is generated using the second residual signal. Can be.
또는, 이러한 경우, 제2 예측이 적용되는 선택된 부분에 대한 복원된 블록은 복원된 잔차 블록, 제2 예측 신호 및 제1 예측 신호의 가중치가 부여된 합(weighted-sum)일 수 있다. 예측에 관련된 정보는 복원된 잔차 블록의 제1 가중치, 제2 예측 신호의 제2 가중치 및 제1 예측 신호의 제3 가중치를 포함할 수 있다. 제2 예측이 사용되지 않는 것은 제2 예측 신호의 제2 가중치가 0으로 설정된 것으로 간주될 수 있다. 또는, 제2 예측이 적용되지 않는 나머지의 부분에 대해서는 제2 예측 신호의 제2 가중치가 0으로 설정된 것으로 간주될 수 있다.Alternatively, in this case, the reconstructed block for the selected portion to which the second prediction is applied may be a weighted-sum of the reconstructed residual block, the second prediction signal, and the first prediction signal. The information related to the prediction may include a first weight of the reconstructed residual block, a second weight of the second prediction signal, and a third weight of the first prediction signal. The fact that the second prediction is not used may be considered that the second weight of the second prediction signal is set to zero. Alternatively, the second weight of the second prediction signal may be considered to be set to 0 with respect to the remaining part to which the second prediction is not applied.
전술된 현재 블록의 부호화에 대한 설명은 현재 블록의 복호화에도 적용될 수 있다. 중복되는 설명은 생략된다. 또한, 전술된 현재 블록의 복호화에 대한 설명은 현재 블록의 부호화에도 적용될 수 있다. 중복되는 설명은 생략된다.The above description of encoding of the current block may also be applied to decoding of the current block. Duplicate explanations are omitted. In addition, the above description of decoding of the current block may be applied to encoding of the current block. Duplicate explanations are omitted.
상술한 실시예들에서, 방법들은 일련의 단계 또는 유닛으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiments, the methods are described based on a flowchart as a series of steps or units, but the present invention is not limited to the order of steps, and certain steps may occur in a different order or simultaneously from other steps as described above. Can be. Also, one of ordinary skill in the art appreciates that the steps shown in the flowcharts are not exclusive, that other steps may be included, or that one or more steps in the flowcharts may be deleted without affecting the scope of the present invention. I can understand.
이상 설명된 본 발명에 따른 실시예들은 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Embodiments according to the present invention described above may be implemented in the form of program instructions that may be executed by various computer components, and may be recorded in a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination. Program instructions recorded on the computer-readable recording medium may be those specially designed and configured for the present invention, or may be known and available to those skilled in the computer software arts. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device may be configured to operate as one or more software modules to perform the process according to the invention, and vice versa.
이상에서 본 발명이 구체적인 구성요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명이 상기 실시예들에 한정되는 것은 아니며, 본 발명이 속하는 기술분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형을 꾀할 수 있다.Although the present invention has been described by specific embodiments such as specific components and the like, but the embodiments and the drawings are provided to assist in a more general understanding of the present invention, the present invention is not limited to the above embodiments. For those skilled in the art, various modifications and variations can be made from these descriptions.
따라서, 본 발명의 사상은 상기 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등하게 또는 등가적으로 변형된 모든 것들은 본 발명의 사상의 범주에 속한다고 할 것이다.Accordingly, the spirit of the present invention should not be limited to the above-described embodiments, and all of the equivalents or equivalents of the claims, as well as the appended claims, fall within the scope of the spirit of the present invention. I will say.

Claims (20)

  1. 현재 블록, 제1 예측 및 제2 예측에 기반하여 현재 블록의 잔차 신호를 생성하는 단계; 및Generating a residual signal of the current block based on the current block, the first prediction, and the second prediction; And
    상기 잔차 신호에 대한 부호화를 수행함으로써 부호화된 잔차 신호에 대한 정보를 생성하는 단계Generating information on the encoded residual signal by performing encoding on the residual signal
    를 포함하고,Including,
    상기 제2 예측은 상기 제1 예측의 예측 오차에 대한 예측인, 부호화 방법.And the second prediction is a prediction for a prediction error of the first prediction.
  2. 현재 블록에 대한 복원된 잔차 신호를 생성하는 복원된 잔차 신호 생성부; 및A reconstructed residual signal generator for generating a reconstructed residual signal for the current block; And
    상기 복원된 잔차 신호, 제2 예측 및 제1 예측에 기반하여 현재 블록에 대한 복원된 블록을 생성하는 복원된 블록 생성부A reconstructed block generator for generating a reconstructed block for the current block based on the reconstructed residual signal, the second prediction, and the first prediction
    를 포함하는, 복호화 방법.It includes, the decoding method.
  3. 현재 블록에 대한 복원된 잔차 신호를 생성하는 단계; 및Generating a reconstructed residual signal for the current block; And
    상기 복원된 잔차 신호, 제2 예측 및 제1 예측에 기반하여 현재 블록에 대한 복원된 블록을 생성하는 단계Generating a reconstructed block for the current block based on the reconstructed residual signal, a second prediction and a first prediction
    를 포함하는, 복호화 방법.It includes, the decoding method.
  4. 제3항에 있어서,The method of claim 3,
    상기 복원된 블록은 상기 복원된 잔차 신호, 상기 제1 예측에 의해 생성된 제1 예측 신호 및 상기 제2 예측에 의해 생성된 제2 예측 신호의 합에 대응하는, 복호화 방법.And the reconstructed block corresponds to the sum of the reconstructed residual signal, the first prediction signal generated by the first prediction, and the second prediction signal generated by the second prediction.
  5. 제3항에 있어서,The method of claim 3,
    상기 제1 예측 및 상기 제2 예측은 인트라 예측인, 복호화 방법.And the first prediction and the second prediction are intra prediction.
  6. 제2항에 있어서,The method of claim 2,
    상기 제2 예측의 예측 방향은 상기 제1 예측 방향과 동일한, 복호화 방법.The prediction direction of the second prediction is the same as the first prediction direction.
  7. 제3항에 있어서,The method of claim 3,
    제1 예측의 복수의 제1 참조 블록들 및 제2 예측의 복수의 제2 참조 블록들 중 적어도 일부는 서로 상이한, 복호화 방법.And at least some of the plurality of first reference blocks of the first prediction and the plurality of second reference blocks of the second prediction are different from each other.
  8. 제3항에 있어서,The method of claim 3,
    제1 예측의 제1 참조 블록의 종류 및 제2 예측의 제2 참조 블록의 종류는 서로 상이한, 복호화 방법.The kind of the first reference block of the first prediction and the kind of the second reference block of the second prediction are different from each other.
  9. 제3항에 있어서,The method of claim 3,
    제1 예측의 제1 참조 블록은 현재 블록에 이웃한 복원된 이웃 블록이고,The first reference block of the first prediction is a reconstructed neighbor block neighboring the current block,
    제2 예측의 제2 참조 블록은 현재 블록에 이웃한 복원된 이웃 잔차 블록이고,The second reference block of the second prediction is a reconstructed neighbor residual block neighboring the current block,
    상기 복원된 이웃 잔차 블록은 상기 복원된 이웃 블록 및 상기 복원된 이웃 블록의 제1 예측 블록 간의 차분인, 복호화 방법.And the reconstructed neighbor residual block is a difference between the reconstructed neighboring block and a first prediction block of the reconstructed neighboring block.
  10. 제3항에 있어서,The method of claim 3,
    상기 제2 예측의 참조 샘플의 영역은 상기 제1 예측의 참조 샘플의 영역의 일부인, 복호화 방법.And the region of the reference sample of the second prediction is part of the region of the reference sample of the first prediction.
  11. 제3항에 있어서,The method of claim 3,
    상기 제2 예측이 적용될 영역은 상기 제2 예측에 사용되는 참조 샘플들의 범위에 기반하여 특정되는, 복호화 방법.And a region to which the second prediction is to be applied is specified based on a range of reference samples used for the second prediction.
  12. 제3항에 있어서,The method of claim 3,
    상기 제2 예측이 적용될 영역은 상기 제2 예측의 예측 방향에 기반하여 특정되는, 복호화 방법.And a region to which the second prediction is to be applied is specified based on a prediction direction of the second prediction.
  13. 제11항에 있어서,The method of claim 11,
    상기 참조 샘플들의 범위는 상기 제2 예측에 사용될 첫 번째의 참조 샘플을 가리키는 정보 및 상기 제2 예측에 사용될 참조 샘플의 개수를 가리키는 정보에 의해 특정되는, 복호화 방법.And the range of reference samples is specified by information indicating a first reference sample to be used for the second prediction and information indicating the number of reference samples to be used for the second prediction.
  14. 제11항에 있어서,The method of claim 11,
    상기 제2 예측이 적용될 영역은 상기 범위의 참조 샘플들이 제2 예측의 예측 방향으로 진행함에 따라 생성된 영역인, 복호화 방법.And the region to which the second prediction is to be applied is a region generated as the reference samples of the range advance in the prediction direction of the second prediction.
  15. 제11항에 있어서,The method of claim 11,
    상기 범위의 바깥의 참조 샘플의 값은 널 또는 0으로 간주되는, 복호화 방법.And a value of a reference sample outside of the range is considered null or zero.
  16. 제3항에 있어서,The method of claim 3,
    상기 현재 블록의 부호화에 있어서 상기 제2 예측의 사용 여부를 나타내는 제2 예측 사용 정보가 상기 제2 예측을 사용하지 않는다는 것을 나타내는 경우 상기 제2 예측은 사용되지 않는, 복호화 방법.And the second prediction is not used when the second prediction usage information indicating whether or not the second prediction is used in encoding the current block indicates that the second prediction is not used.
  17. 제3항에 있어서,The method of claim 3,
    상기 제1 예측의 예측 모드가 비방향성 모드이면 상기 제2 예측은 사용되지 않는, 복호화 방법.If the prediction mode of the first prediction is a non-directional mode, the second prediction is not used.
  18. 제3항에 있어서,The method of claim 3,
    상기 현재 블록이 상단의 경계 및 좌측의 경계에 인접하면 상기 제2 예측은 사용되지 않고,If the current block is adjacent to an upper boundary and a left boundary, the second prediction is not used;
    상기 경계는 픽쳐의 경계, 슬라이스의 경계 또는 타일의 경계인, 복호화 방법.Wherein the boundary is a picture boundary, a slice boundary, or a tile boundary.
  19. 제3항에 있어서,The method of claim 3,
    상기 제2 예측이 사용될지 여부는 상기 현재 블록에 인접한 복원된 블록의 개수에 기반하여 결정되는, 복호화 방법.Whether the second prediction is to be used is determined based on the number of reconstructed blocks adjacent to the current block.
  20. 제3항에 있어서,The method of claim 3,
    상기 제2 예측이 사용되지 않은 경우 상기 복원된 블록은 상기 복원된 잔차 신호 및 상기 제1 예측에 의한 제1 예측 신호에 기반하여 생성되는, 복호화 방법.And when the second prediction is not used, the reconstructed block is generated based on the reconstructed residual signal and the first prediction signal by the first prediction.
PCT/KR2017/000965 2016-01-27 2017-01-26 Method and device for encoding and decoding video by using prediction WO2017131473A1 (en)

Priority Applications (8)

Application Number Priority Date Filing Date Title
CN202211613836.XA CN115733979A (en) 2016-01-27 2017-01-26 Method and apparatus for encoding and decoding video by using prediction
CN202211613450.9A CN116016911A (en) 2016-01-27 2017-01-26 Method and apparatus for encoding and decoding video by using prediction
CN202211615144.9A CN116016912A (en) 2016-01-27 2017-01-26 Method and apparatus for encoding and decoding video by using prediction
CN202211613078.1A CN115733977A (en) 2016-01-27 2017-01-26 Method and apparatus for encoding and decoding video by using prediction
CN202211613933.9A CN115941949A (en) 2016-01-27 2017-01-26 Method and apparatus for encoding and decoding video by using prediction
CN202211613690.9A CN115733978A (en) 2016-01-27 2017-01-26 Method and apparatus for encoding and decoding video by using prediction
CN201780009090.2A CN108605123B (en) 2016-01-27 2017-01-26 Method and apparatus for encoding and decoding video by using prediction
CN202211613703.2A CN115941948A (en) 2016-01-27 2017-01-26 Method and apparatus for encoding and decoding video by using prediction

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2016-0010260 2016-01-27
KR20160010260 2016-01-27
KR10-2017-0012160 2017-01-25
KR1020170012160A KR20170089777A (en) 2016-01-27 2017-01-25 Method and apparatus for encoding and decoding video using prediction

Publications (1)

Publication Number Publication Date
WO2017131473A1 true WO2017131473A1 (en) 2017-08-03

Family

ID=59398440

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/000965 WO2017131473A1 (en) 2016-01-27 2017-01-26 Method and device for encoding and decoding video by using prediction

Country Status (2)

Country Link
CN (7) CN115941949A (en)
WO (1) WO2017131473A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090095407A (en) * 2008-03-05 2009-09-09 경희대학교 산학협력단 Method and apparatus for up/down sampling of image block in the integer DCT domain
JP2010045853A (en) * 2009-11-20 2010-02-25 Mitsubishi Electric Corp Moving image coding apparatus and moving image coding method
KR101411315B1 (en) * 2007-01-22 2014-06-26 삼성전자주식회사 Method and apparatus for intra/inter prediction
KR20150027530A (en) * 2013-09-04 2015-03-12 한국전자통신연구원 High efficiency video coding intra frame prediction apparatus and method thereof
KR20150093633A (en) * 2010-11-08 2015-08-18 성균관대학교산학협력단 Methods of encoding and decoding using multi-level prediction and apparatuses for using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101411315B1 (en) * 2007-01-22 2014-06-26 삼성전자주식회사 Method and apparatus for intra/inter prediction
KR20090095407A (en) * 2008-03-05 2009-09-09 경희대학교 산학협력단 Method and apparatus for up/down sampling of image block in the integer DCT domain
JP2010045853A (en) * 2009-11-20 2010-02-25 Mitsubishi Electric Corp Moving image coding apparatus and moving image coding method
KR20150093633A (en) * 2010-11-08 2015-08-18 성균관대학교산학협력단 Methods of encoding and decoding using multi-level prediction and apparatuses for using the same
KR20150027530A (en) * 2013-09-04 2015-03-12 한국전자통신연구원 High efficiency video coding intra frame prediction apparatus and method thereof

Also Published As

Publication number Publication date
CN115941949A9 (en) 2023-07-11
CN115941948A (en) 2023-04-07
CN116016911A (en) 2023-04-25
CN115733977A9 (en) 2023-07-11
CN116016912A (en) 2023-04-25
CN115941949A (en) 2023-04-07
CN115733978A (en) 2023-03-03
CN115733979A (en) 2023-03-03
CN115733979A9 (en) 2023-06-16
CN115733977A (en) 2023-03-03

Similar Documents

Publication Publication Date Title
WO2018097693A2 (en) Image encoding/decoding method and device, and recording medium having bitstream stored thereon
WO2018030773A1 (en) Method and apparatus for image encoding/decoding
WO2019190224A1 (en) Image encoding/decoding method and device, and recording medium in which bitstream is stored
WO2018226015A1 (en) Video encoding/decoding method and device, and recording medium storing bit stream
WO2018012886A1 (en) Image encoding/decoding method and recording medium therefor
WO2019177354A1 (en) Method and device for encoding/decoding image and recording medium having bitstream stored thereon
WO2019112394A1 (en) Method and apparatus for encoding and decoding using selective information sharing between channels
WO2018016823A1 (en) Image encoding/decoding method and device, and recording medium in which bitstream is stored
WO2018026166A1 (en) Image encoding/decoding method and apparatus, and recording medium storing bitstream
WO2018174617A1 (en) Block form-based prediction method and device
WO2017222237A1 (en) Intra prediction method and device
WO2019182385A1 (en) Image encoding/decoding method and device, and recording medium in which bitstream is stored
WO2018097692A2 (en) Method and apparatus for encoding/decoding image, and recording medium in which bit stream is stored
WO2018097607A1 (en) Image encoding/decoding image method and device, and recording medium storing bit stream
WO2019172705A1 (en) Image encoding/decoding method and apparatus using sample filtering
WO2020005035A1 (en) Image encoding/decoding method and apparatus for throughput enhancement, and recording medium storing bitstream
WO2017086748A1 (en) Method and device for encrypting/decrypting image by using geometrically changed image
WO2019107927A1 (en) Bidirectional intra prediction method and apparatus
WO2017176092A1 (en) Method and device for inducing motion prediction information
WO2021015581A1 (en) Method, apparatus, and recording medium for encoding/decoding image by using geometric partitioning
WO2019240493A1 (en) Context adaptive binary arithmetic coding method and device
WO2018174618A1 (en) Prediction method and device using reference block
WO2020032531A1 (en) Image encoding/decoding method and device, and recording medium storing bitstream
WO2018101700A1 (en) Image encoding/decoding method and device, and recording medium having stored bitstream therein
WO2020256422A1 (en) Inter prediction information encoding/decoding method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17744594

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17744594

Country of ref document: EP

Kind code of ref document: A1