[go: up one dir, main page]

WO2012044118A2 - Method and apparatus for encoding / decoding video using error compensation - Google Patents

Method and apparatus for encoding / decoding video using error compensation Download PDF

Info

Publication number
WO2012044118A2
WO2012044118A2 PCT/KR2011/007263 KR2011007263W WO2012044118A2 WO 2012044118 A2 WO2012044118 A2 WO 2012044118A2 KR 2011007263 W KR2011007263 W KR 2011007263W WO 2012044118 A2 WO2012044118 A2 WO 2012044118A2
Authority
WO
WIPO (PCT)
Prior art keywords
block
error
prediction
current block
deriving
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/KR2011/007263
Other languages
French (fr)
Korean (ko)
Other versions
WO2012044118A3 (en
Inventor
정세윤
이진호
김휘용
임성창
이하현
김종호
조숙희
최진수
김진웅
안치득
박현욱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Electronics and Telecommunications Research Institute ETRI
Korea Advanced Institute of Science and Technology KAIST
Original Assignee
Electronics and Telecommunications Research Institute ETRI
Korea Advanced Institute of Science and Technology KAIST
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
Application filed by Electronics and Telecommunications Research Institute ETRI, Korea Advanced Institute of Science and Technology KAIST filed Critical Electronics and Telecommunications Research Institute ETRI
Priority to US13/877,055 priority Critical patent/US20130182768A1/en
Priority claimed from KR1020110099680A external-priority patent/KR102006443B1/en
Publication of WO2012044118A2 publication Critical patent/WO2012044118A2/en
Publication of WO2012044118A3 publication Critical patent/WO2012044118A3/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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/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

Definitions

  • the present invention relates to image processing, and more particularly, to an image encoding / decoding method and apparatus.
  • Image compression techniques include inter prediction techniques for predicting pixel values included in a current picture from previous and / or subsequent pictures in time, and intra predicting pixel values included in a current picture using pixel information in the current picture.
  • (intra) prediction technique weight prediction technique to prevent deterioration of image quality due to lighting change, entropy encoding technique to assign a short code to a high frequency symbol and a long code to a low frequency symbol, etc.
  • entropy encoding technique to assign a short code to a high frequency symbol and a long code to a low frequency symbol, etc.
  • An object of the present invention is to provide an image encoding method and apparatus capable of improving image encoding / decoding efficiency while minimizing the amount of transmitted information.
  • Another object of the present invention is to provide an image decoding method and apparatus capable of improving image encoding / decoding efficiency while minimizing the amount of transmitted information.
  • Another technical problem of the present invention is to provide a skipping mode prediction method and apparatus which can improve image encoding / decoding efficiency while minimizing the amount of transmitted information.
  • One embodiment of the present invention is a video decoding method.
  • the method includes deriving a pixel value of a prediction block for a current block, deriving an error compensation value for the current block, and using the pixel value and the error compensation value of the prediction block. Deriving a pixel value of a final prediction block, wherein the error compensation value is a sample value of an error compensation block for compensating an error between the current block and a reference block, wherein the reference block is in a reference picture.
  • the block includes predictor related information of the pixels in the current block, and the prediction for the current block is performed in an intra skip mode (SKIP mode).
  • SKIP mode intra skip mode
  • Deriving a pixel value of the prediction block for the current block includes deriving motion information for the current block using a block that has already been decoded and using the derived motion information to obtain a pixel value of the prediction block. It may include the step of deriving.
  • the already decoded block may include neighboring blocks of the current block.
  • the already decoded block may include a neighboring block of the current block and a neighboring block of a collocated block in the reference image.
  • the pixel value of the derived prediction block may be a pixel value of a reference block indicated by the derived motion information.
  • the pixel value of the prediction block is derived by a weighted sum of the pixel values of the reference block
  • the reference block may be a block indicated by the derived motion information.
  • Deriving an error compensation value for the current block includes deriving an error parameter for an error model of the current block and using the error model and the derived error parameter for the current block. Deriving an error compensation value may be included.
  • the error model may be a zero-order error model or a first-order error model.
  • the error parameter may be derived using information included in the neighboring block of the current block and the block in the reference image.
  • the error compensation value is derived by a weighted sum of the error block values.
  • the error block value may be an error compensation value of the current block derived for each reference block.
  • the error compensation value is selectively used according to information indicating whether to apply the error compensation, and the error compensation is applied.
  • Information indicating whether the information is included in a slice header, a picture parameter set, or a sequence parameter set may be information transmitted from an encoder to a decoder.
  • Another embodiment of the present invention is an inter prediction mode prediction method.
  • the method includes deriving a pixel value of the prediction block for the current block, deriving an error compensation value for the current block, and using the pixel value of the prediction block and the error compensation value.
  • the error compensation value is a sample value of an error compensation block for compensating an error between the current block and a reference block, wherein the reference block is a block in a reference image and related to a predicted value of a pixel in the current block. It is a block that contains information.
  • Deriving a pixel value of the prediction block for the current block includes deriving motion information for the current block using a block that has already been decoded and using the derived motion information to obtain a pixel value of the prediction block. It may include the step of deriving.
  • Deriving an error compensation value for the current block includes deriving an error parameter for an error model of the current block and using the error model and the derived error parameter for the current block. Deriving an error compensation value may be included.
  • Another embodiment of the present invention is an image decoding device.
  • the apparatus entropy-decodes a bitstream received from the decoder according to a probability distribution to generate a residual block related information, a pixel value of a prediction block for the current block, and the current block.
  • a prediction unit for deriving an error compensation value for the prediction block and a pixel value of the final prediction block using the pixel value of the prediction block and the error compensation value, and generating a reconstruction block using the residual block and the final prediction block.
  • an adder wherein the error compensation value is a sample value of an error compensation block for compensating an error between the current block and a reference block, and the reference block is a block in a reference image and includes information related to prediction values of pixels in the current block.
  • the prediction unit may predict the current block in the inter-screen skip mode. The.
  • the prediction unit may derive motion information about the current block by using a block that has already been decoded, and may derive pixel values of the prediction block by using the derived motion information.
  • the prediction unit may derive an error parameter for the error model of the current block and derive an error compensation value for the current block by using the error model and the derived error parameter.
  • the video encoding / decoding efficiency is improved while minimizing the amount of transmitted information.
  • the amount of transmitted information is minimized and the image encoding / decoding efficiency is improved.
  • image encoding / decoding efficiency is improved while minimizing the amount of transmitted information.
  • FIG. 1 is a block diagram illustrating a configuration of an image encoding apparatus according to an embodiment.
  • FIG. 2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment.
  • FIG. 3 is a flowchart schematically illustrating a skip mode prediction method using error compensation according to an exemplary embodiment of the present invention.
  • FIG. 4 is a flowchart schematically illustrating a method of deriving pixel values of a prediction block according to an embodiment of the present invention.
  • FIG. 5 is a conceptual diagram schematically illustrating an embodiment of a neighboring block with respect to a current block, which is used when deriving motion information in the embodiment of FIG. 4.
  • FIG. 6 is a conceptual diagram schematically illustrating an embodiment of a neighboring block of a current block and a neighboring block of the same position block in a reference image, which are used when deriving motion information in the embodiment of FIG. 4.
  • FIG. 7 is a flowchart schematically illustrating a method for deriving an error compensation value according to an embodiment of the present invention.
  • FIG. 8 is a conceptual diagram schematically showing an embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention.
  • FIG. 9 is a conceptual diagram schematically showing another embodiment of an error parameter derivation method for a zero-order error model according to the present invention.
  • FIG. 10 is a conceptual diagram schematically showing still another embodiment of an error parameter derivation method for a zero-order error model according to the present invention.
  • 11 is a conceptual diagram schematically showing still another embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention.
  • FIG. 12 is a conceptual diagram schematically showing still another embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention.
  • FIG. 13 is a conceptual diagram schematically illustrating an embodiment of a motion vector used for deriving an error compensation value using weights in the embodiment of FIG. 7.
  • FIG. 14 is a conceptual diagram illustrating an embodiment of a method of deriving a pixel value of a final prediction block by using information about a position in a current block of a prediction target pixel.
  • first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
  • 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.
  • each component shown in the embodiments of the present invention are shown independently to represent different characteristic functions, and do not mean that each component is made of separate hardware or one software component unit.
  • each component is included in each component for convenience of description, and at least two of the components may be combined into one component, or one component may be divided into a plurality of components to perform a function.
  • Integrated and separate embodiments of the components are also included within the scope of the present invention without departing from the spirit of the invention.
  • the components may not be essential components for performing essential functions in the present invention, but may be optional components for improving performance.
  • the present invention can be implemented including only the components essential for implementing the essentials of the present invention except for the components used for improving performance, and the structure including only the essential components except for the optional components used for improving performance. Also included in the scope of the present invention.
  • the image encoding apparatus 100 may include a motion predictor 111, a motion compensator 112, an intra predictor 120, a switch 115, a subtractor 125, and a converter 130. And a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference image buffer 190.
  • An image may also be called a picture.
  • a picture may have the same meaning as an image according to context and need.
  • the image may include both a frame picture used in the progressive scan method and a field picture used in the interlace scan method.
  • the field picture may be composed of two fields including a top field and a bottom field.
  • a block means a basic unit of image encoding and decoding.
  • a coding or decoding unit refers to a divided unit when an image is divided and encoded or decoded. Therefore, a macroblock, a coding unit (CU), a prediction unit (PU), and a PU are used. It may be called a partition (PU partition), a transform unit (TU), a transform block, or the like.
  • a block may have one of the above-described block types according to a unit in which current encoding is performed.
  • the coding unit may be hierarchically divided based on a quad tree structure. In this case, whether to split the coding unit may be expressed using depth information and a split flag.
  • the largest coding unit is called a large coding unit (LCU), and the smallest coding unit is called a smallest coding unit (SCU).
  • the coding unit may have a size of 8x8, 16x16, 32x32, 64x64, 128x128, and the like.
  • the split flag indicates whether the current coding unit is split.
  • the division depth is n, it may indicate that n divisions have been performed in the LCU.
  • the partition depth 0 may indicate that the partition is not divided in the LCU
  • the partition depth 1 may indicate that the partition is divided once in the LCU.
  • the structure of the coding unit as described above may also be called a coding tree block (CTB).
  • CTB coding tree block
  • one coding unit in a CTB may be divided into a plurality of small coding units based on size information, depth information, split flag information, and the like of the coding unit.
  • each small coding unit may also be divided into a plurality of smaller coding units based on size information, depth information, split flag information, and the like.
  • the image encoding apparatus 100 may perform encoding in an intra mode or an inter mode on an input image and output a bit stream.
  • Intra prediction means intra prediction and inter prediction means inter prediction.
  • the switch 115 is switched to intra, and in the inter mode, the switch 115 is switched to inter.
  • the image encoding apparatus 100 may generate a prediction block for an input block of an input image and then encode a difference between the input block and the prediction block.
  • the intra predictor 120 may generate a prediction block by performing spatial prediction using pixel values of blocks that are already encoded around the current block.
  • the motion predictor 111 may obtain motion information by finding a region that best matches an input block in the reference image stored in the reference image buffer 190 during the motion prediction process. have.
  • Motion information including motion vector information and reference picture index information may be encoded by the encoder and transmitted to the decoder.
  • the motion compensator 112 may generate a prediction block by performing motion compensation using the motion information and the reference image stored in the reference image buffer 190.
  • the motion information refers to related information used to obtain the position of a reference block used for intra prediction or inter prediction.
  • the motion information may include motion vector information indicating a relative position between a current block and a reference block, and reference picture index information indicating whether a reference block exists in a reference picture when a plurality of reference pictures are used. If only one reference picture exists, the reference picture index information may not be included in the motion information.
  • the reference block is a block in the reference picture and is a block including related information corresponding to a predictor of pixels in the current block.
  • the position of a reference picture may be indicated by motion information such as a reference picture index value and a motion vector value.
  • the reference block in the picture means a reference block existing in the current image.
  • the position of the reference block in the picture may be indicated by explicit motion information.
  • the position of the reference block in the screen may be indicated by motion information inferred using a template or the like.
  • the encoder may adaptively apply a weight coefficient to the reference image and then perform prediction using the reference image to which the weight coefficient is applied.
  • This prediction method may be called weighted prediction.
  • weight prediction parameters used for weight prediction, including weight coefficients, may be transmitted from the encoder to the decoder. In this case, the encoder may perform weight prediction using the same parameter as the reference image unit used in the current image.
  • the encoder uses a difference value of a mean value of pixel values of an already encoded block adjacent to a current block and a mean value of neighboring block pixel values of a reference block as a DC offset value for the current block. It may be.
  • the encoder may perform prediction by considering lighting changes even when predicting a motion vector. This error compensation method may be referred to as local lighting change compensation. When a local illumination change compensation method is used for an image having a large change in illumination between screens, since the inter prediction is performed using the derived offset value, image compression performance may be improved.
  • the encoder may perform prediction on the current block using various motion prediction methods, and each prediction method may be applied in different prediction modes.
  • a prediction mode used in inter prediction may include a skip mode, a merge mode, an advanced motion vector prediction (AMVP) mode, and the like.
  • the mode in which the prediction is performed can be determined through a rate-distortion optimization process.
  • the encoder can send information about which mode is used for prediction to the decoder.
  • the skip mode is an encoding mode in which transmission of a residual signal and motion information, which is a difference between a prediction block and a current block, is omitted.
  • the skip mode may be applied to intra prediction, uni-directional prediction between screens, bi-prediction between screens, inter-screen or multi-hypothesis skip mode, and so on.
  • the skip mode applied to the unidirectional prediction between screens may be referred to as a P skip mode
  • the skip mode applied to the inter prediction between screens may be referred to as a B skip mode.
  • the encoder may generate the prediction block by deriving the motion information of the current block using the motion information provided from the neighboring block.
  • values of residual signals of the prediction block and the current block may be zero. Accordingly, the motion information and the residual signal may not be transmitted from the encoder to the decoder, and the encoder may generate the prediction block using only information provided from the previously encoded region.
  • Peripheral blocks that provide motion information to the current block may be selected in various ways.
  • the motion information may be derived from motion information of a predetermined number of neighboring blocks.
  • the number of neighboring blocks may be one or two or more.
  • neighboring blocks that provide motion information to the current block in the skipped mode may be the same as candidate blocks used to obtain the motion information in the merge mode.
  • the encoder may transmit a merge index indicating which neighboring block among the neighboring blocks is used to derive motion information to the decoder.
  • the decoder may derive the motion information of the current block from the neighboring block indicated by the merge index.
  • the skip mode in this case may also be called a merge skip mode.
  • the motion vector may be obtained through median calculation for each horizontal and vertical component.
  • the reference picture index may be selected as the closest picture on the time axis with the current picture among the pictures in the reference picture list.
  • the method of deriving the motion information is not limited to the above method, and the motion information for the current block may be derived in various ways.
  • the subtractor 125 may generate a residual block by the difference between the input block and the generated prediction block.
  • the transform unit 130 may output a transform coefficient by performing transform on the residual block.
  • the quantization unit 140 may output a quantized coefficient by quantizing the input transform coefficient according to the quantization parameter.
  • the entropy encoder 150 may output a bit stream by performing entropy encoding based on values calculated by the quantizer 140 or encoding parameter values calculated in the encoding process.
  • coding methods such as exponential golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) may be used.
  • the quantized coefficients may be inversely quantized by the inverse quantizer 160 and inversely transformed by the inverse transformer 170.
  • the inverse quantized and inverse transformed coefficients are added to the prediction block through the adder 175 and a reconstruction block can be generated.
  • the reconstruction block passes through the filter unit 180, and the filter unit 180 applies at least one or more of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstruction block or the reconstruction picture. can do.
  • the reconstructed block that has passed through the filter unit 180 may be stored in the reference image buffer 190.
  • the image decoding apparatus 200 may include an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, an intra predictor 240, a motion compensator 250, and a filter. 260 and a reference picture buffer 270.
  • the image decoding apparatus 200 may receive a bitstream output from the encoder and perform decoding in an intra mode or an inter mode, and output a reconstructed image, that is, a reconstructed image.
  • the switch In the intra mode, the switch may be switched to intra, and in the inter mode, the switch may be switched to inter.
  • the image decoding apparatus 200 may generate a reconstructed block, that is, a reconstructed block by obtaining a residual block reconstructed from the received bitstream, generating a prediction block, and adding the reconstructed residual block and the prediction block.
  • the entropy decoder 210 may entropy decode the input bitstream according to a probability distribution to generate symbols including symbols in the form of quantized coefficients.
  • the entropy decoding method is similar to the entropy coding method described above.
  • the entropy decoding method When the entropy decoding method is applied, a small number of bits are allocated to a symbol having a high probability of occurrence and a large number of bits are allocated to a symbol having a low probability of occurrence, whereby the size of the bit string for each symbol is increased. Can be reduced. Therefore, the compression performance of image decoding can be improved through an entropy decoding method.
  • the quantized coefficients are inversely quantized by the inverse quantizer 220 and inversely transformed by the inverse transformer 230, and as a result of the inverse quantization / inverse transformation of the quantized coefficients, a reconstructed residual block may be generated.
  • the intra predictor 240 may generate a predictive block by performing spatial prediction using pixel values of an already encoded block around the current block.
  • the motion compensator 250 may generate a prediction block by performing motion compensation using the motion information received from the encoder and the reference image stored in the reference image buffer 270.
  • the decoder may use an error compensation technique such as a weight prediction technique or a regional illumination change technique to prevent image degradation due to the change of illumination between screens.
  • an error compensation technique such as a weight prediction technique or a regional illumination change technique to prevent image degradation due to the change of illumination between screens.
  • the decoder may perform prediction on the current block using various prediction methods, and each prediction method may be applied in different prediction modes.
  • a prediction mode used in inter prediction may include a skip mode, a merge mode, an advanced motion vector prediction (AMVP) mode, and the like.
  • the decoder may receive information from the encoder about which mode is used for prediction.
  • the decoder may generate the prediction block by deriving the motion information of the current block by using the motion information provided from the neighboring block.
  • values of residual signals of the prediction block and the current block may be zero. Therefore, the decoder may not receive the separate motion information and the residual signal, and may generate the prediction block using only information provided from the previously encoded region.
  • the details of the omission mode are similar to those described above in the encoder.
  • the reconstructed residual block and the prediction block are added through the adder 255, and the added block passes 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 outputs a reconstructed image, that is, a reconstructed image.
  • the reconstructed picture may be stored in the reference picture buffer 270 to be used for inter prediction.
  • the amount of information transmitted may be smaller than in the case where other prediction modes are used. Therefore, if the frequency of selecting the skip mode is high by the rate-distortion optimization process, the image compression efficiency may be improved.
  • the encoder and the decoder perform prediction using only the information of the previous encoded / decoded region.
  • prediction is performed using only motion information of neighboring blocks and pixel values of a reference block. Therefore, when compared with other modes in terms of rate-distortion optimization, the rate required for encoding is minimal or distortion ( distortion can be large. Since the distortion between the screens is very large in the case of an image with a large lighting change between screens, the possibility that the skip mode is selected as the optimal prediction mode of the current block may be lowered.
  • the skip mode is selected as the optimal prediction mode of the current block. Can be less likely.
  • a skip mode prediction method using error compensation may be provided.
  • FIG. 3 is a flowchart schematically illustrating a skip mode prediction method using error compensation according to an exemplary embodiment of the present invention.
  • the encoder and the decoder perform prediction on the current block in the skipped mode.
  • prediction according to the embodiment of FIG. 3 may be performed by an intra predictor, a motion predictor, and / or a motion compensator of the encoder and the decoder.
  • embodiments of the present invention can be equally applied to an encoder and a decoder, and embodiments are described with reference to a decoder.
  • previously encoded blocks rather than previously decoded blocks, described below, may be used for prediction of the current block.
  • the previously encoded block may mean a block encoded before performing prediction and / or encoding on the current block
  • the previously decoded block may mean a block decoded before performing prediction and / or decoding on the current block.
  • the decoder derives pixel values of a prediction block for a current block from previously decoded blocks (S310).
  • the prediction block refers to a block generated as a result of performing prediction on the current block.
  • the decoder may derive motion information for the current block by using motion information of previously decoded blocks. Once the motion information is derived, a pixel value of the reference block in the reference image may be derived using the motion information. In the embodiment of FIG. 3, since the decoder performs prediction in the skipped mode, the pixel value of the reference block may be the pixel value of the prediction block. There may be one reference block or two or more reference blocks. When there are two or more reference blocks, the decoder may generate two or more prediction blocks by using each reference block separately, and use the weighted sum of the pixel values of the two or more reference blocks to determine the prediction block for the current block. It is also possible to derive the pixel value. In this case, the prediction block may also be called a motion prediction block.
  • the decoder derives a sample value of the error compensation block for the current block (S320).
  • the error compensation block may have the same size as the prediction block.
  • the error compensation value has the same meaning as the sample value of the error compensation block.
  • the decoder may derive an error parameter for an error model of the current block by using information included in a neighboring block of the current block and / or an error parameter included in a neighboring block of the current block.
  • the decoder may derive an error compensation value for the current block by using the error model information and the derived error parameter information. In this case, if there are two or more reference blocks, the decoder may derive an error compensation value using motion information and the like together with the error parameter information and the error model information.
  • the decoder derives the pixel value of the last prediction block for the current block by using the pixel value and the error compensation value of the prediction block (S330).
  • the pixel value derivation method of the final prediction block may vary depending on the number of reference blocks or the encoding / decoding method of the current image.
  • FIG. 4 is a flowchart schematically illustrating a method of deriving pixel values of a prediction block according to an embodiment of the present invention.
  • the decoder derives motion information for the current block from previously decoded blocks (S410).
  • the motion information may be used to derive the pixel value of the prediction block for the current block.
  • the decoder may derive the motion information from the motion information of the neighboring block for the current block.
  • the neighboring block is a block existing in the current image, and is a block previously decoded.
  • the decoder may derive one piece of motion information or may derive two or more pieces of motion information. If there is two or more pieces of motion information, two or more reference blocks may be used for prediction of the current block according to the number of motion information.
  • the decoder may derive the motion information using not only the motion information of the neighboring block with respect to the current block but also the motion information of the neighboring block with respect to the collocated block in the reference picture.
  • the encoder may derive one or two or more pieces of motion information. If there is two or more pieces of motion information, two or more reference blocks may be used for prediction of the current block according to the number of motion information.
  • the decoder may derive the motion information using at least one of the above-described methods, and details of the motion information derivation method for the above cases will be described later.
  • the decoder derives pixel values of the prediction block by using the derived motion information (S420).
  • the pixel values of the reference block in the reference image may be the pixel values of the prediction block with respect to the current block.
  • the reference block may be a block in which a co-located block in the reference image with respect to the current block is moved by the value of the motion vector.
  • the pixel value of the prediction block for the current block may be a block in which a block located at the same position as the prediction block in the reference image is moved by the value of the motion vector, that is, the pixel value of the reference block.
  • the pixel value of the prediction block with respect to the current block may be expressed as in Equation 1 below.
  • P cur denotes a pixel value of the prediction block with respect to the current block
  • P ref denotes a pixel value of the reference block
  • X represents coordinates in the x-axis direction of the pixel in the current block
  • Y represents coordinates in the y-axis direction of the pixel in the current block
  • MV (x) represents the magnitude of the motion vector in the x-axis direction
  • MV (y) represents the magnitude of the motion vector in the y-axis direction.
  • the pixel value of the prediction block for the current block may be derived by using the weighted sum of the pixel values of the reference blocks. That is, when N reference blocks are used to generate the prediction block, the weighted sum of the pixel values of the N reference blocks may be the pixel value of the prediction block.
  • the motion information for the current block derived when there are N reference blocks is ⁇ ref_idx1, MV1 ⁇ , ⁇ ref_idx2, MV2 ⁇ ,... , ⁇ ref_idxn, MVn ⁇ , the pixel value of the prediction block derived using only the reference block corresponding to the i-th motion information may be represented by Equation 2 below.
  • P cur_ref_i (t0, X, Y) P ref_i (X + MV i (x), Y + MV i (y))
  • P cur_ref_i denotes a pixel value of the prediction block derived using only the reference block corresponding to the i-th motion information
  • P ref_i denotes a pixel value of the reference block corresponding to the i-th motion information.
  • MV i (x) represents the magnitude in the x-axis direction of the i-th motion vector
  • MV i (y) represents the magnitude in the y-axis direction of the i-th motion vector.
  • the pixel value of the prediction block for the current block which is derived by the weighted sum of the pixel values of the N reference blocks, may be expressed as in Equation 3 below.
  • P cur_ref represents a pixel value of the prediction block for the current block
  • w i represents a weight applied to the pixel value of the reference block corresponding to the i-th motion information.
  • the sum of the weights may be 1.
  • the weights applied to the pixel values of each reference block may use a predetermined fixed value.
  • each weight may be set differently according to the distance between the reference picture including the reference block to which the weight is applied and the current picture.
  • the respective weights may be set differently according to the spatial position of the pixel in the prediction block.
  • the spatial position of the pixel in the prediction block may be the same as the spatial position of the pixel currently predicted in the current block.
  • the weight w i (X, Y) is a weight applied to the pixel value of the reference block corresponding to the i-th motion information.
  • the weight w i (X, Y) may have different values according to the coordinates (X, Y) of the pixels in the prediction block.
  • the decoder may use at least one of the aforementioned methods in deriving a pixel value of the prediction block using the derived motion information.
  • FIG. 5 is a conceptual diagram schematically illustrating an embodiment of a neighboring block with respect to a current block, which is used when deriving motion information in the embodiment of FIG. 4.
  • the neighboring block for the current block is a block in the current image, which is a block previously decoded previously.
  • the motion information may include information about the position of the reference block with respect to the current block.
  • the decoder may derive one piece of motion information or may derive two or more pieces of motion information. If there is two or more pieces of motion information, two or more reference blocks may be used for prediction of the current block according to the number of motion information.
  • the decoder may derive motion information for the current block using motion information of blocks A, B, and C.
  • the decoder may select, as a reference image, an image that is closest in time axis to an image including a current block among the images included in the reference image list.
  • the decoder may select only the motion information indicating the selected reference image among the motion information of the block A, the block B, and the block C, and use the same to derive the motion information of the current block.
  • the decoder can obtain the median of the selected motion information for the horizontal and vertical components, in which case the median can be the motion vector of the current block.
  • the position and number of neighboring blocks used for deriving the motion information of the current block are not limited to the above-described embodiments, and various positions and numbers of neighboring blocks different from the embodiment of FIG. 5 may be used to derive the motion information according to the implementation.
  • the motion information on the neighboring block may be information encoded / decoded by a merge method.
  • the decoder may use the motion information included in the block indicated by the merge index (merge idx) of the current block, as the motion information of the current block. Therefore, when the neighboring block is encoded / decoded in the merge mode, the motion information deriving method according to the embodiment may further include deriving motion information of the neighboring block by the merge method.
  • FIG. 6 is a conceptual diagram schematically illustrating an embodiment of a neighboring block of a current block and a neighboring block of the same position block in a reference image, which are used when deriving motion information in the embodiment of FIG. 4.
  • the decoder may derive the motion information using not only the motion information of the neighboring block for the current block but also the motion information of the neighboring block for the same position block in the reference image. .
  • all blocks in a reference picture may be blocks that have already been decoded. Therefore, all blocks around the same location block in the reference image may be selected as a block used for deriving motion information of the current block.
  • the neighboring block for the current block is a block in the current image, which is a block previously decoded.
  • the median of the blocks may be used.
  • a motion vector competition method may be used to derive motion information of the current block.
  • the decoder may select an optimal prediction candidate in consideration of rate control cost among a plurality of prediction candidates, and perform motion information prediction encoding using the selected prediction candidate. In this case, information about which candidate is selected from among the plurality of prediction candidates may be further needed.
  • the motion vector competition method may include, for example, an AVP (AdAdAdaptd Motion Vector Prediction).
  • FIG. 7 is a flowchart schematically illustrating a method for deriving an error compensation value according to an embodiment of the present invention.
  • the decoder derives an error parameter for an error model of a current block (S710).
  • an error model obtained by modeling an error between a current block and a reference block may be used.
  • error models used for error compensation of the current block, for example, there may be a zero-order error model, a first-order error model, an N-order error model, and a nonlinear error model.
  • the error compensation value of the zero-order error model may be represented by Equation 5 according to an embodiment.
  • (x, y) is the coordinate of the prediction target pixel in the current block.
  • b is a DC offset and corresponds to an error parameter of the 0th order error model.
  • the decoder may derive the pixel value of the final prediction block by using the pixel value of the prediction block and the error compensation value. This can be represented by the following equation (6).
  • Pixel value (x, y) of the final prediction block Pixel value (x, y) of the prediction block + b
  • the error compensation value of the first order error model may be represented by Equation 7 according to one embodiment.
  • Error compensation value (x, y) (a-1) * pixel value of prediction block (x, y) + b
  • a and b correspond to error parameters of the first order error model.
  • the decoder calculates the error parameters a and b and then performs compensation.
  • the pixel value of the final prediction block derived when error compensation is performed using the first order error model may be represented by Equation (8).
  • the error compensation value of the N-th order error model and the pixel value of the final prediction block may be represented by Equation 9 according to an embodiment.
  • Error compensation value (x, y) a n * P (x, y) n + a n-1 * P (x, y) n-1 +... + (a-1) P (x, y) + b
  • P means the pixel value of the prediction block for the current block.
  • the decoder may use other nonlinear error models.
  • the error compensation value may be represented by the following Equation 10 in one embodiment.
  • f may be any function that is not linear.
  • the error parameters used in the current block may all be the same value as described above in the above embodiments. However, different error parameters may be used according to the position of the prediction target pixel in the current block.
  • the decoder may derive the final error compensation value by applying a weight to an error compensation value derived using the same error parameter according to the spatial position of the pixel to be predicted in the current block. In this case, the final error compensation value may vary according to the position in the current block of the prediction target pixel.
  • the final error compensation value can be represented by the following equation (11).
  • the decoder may derive the error parameter according to the error model of the current block. Since the decoder cannot obtain the actual pixel value of the current block in the error parameter deriving step, an error parameter of the error model for the current block may be derived using information included in a neighboring block of the current block.
  • the neighboring block of the current block is a neighboring block adjacent to the current block and means a previously encoded block.
  • the decoder may use only pixel values of the neighboring block for the current block, pixel values of the reference block, and / or pixel values of the neighboring pixel for the reference block. Further, in deriving the error parameter, the decoder may use not only the pixel values but also motion information and / or encoding mode information included in a neighboring block for the current block, and motion information and / or included in the current block. Alternatively, encoding mode information may be used together.
  • the error parameter b can be represented by the following equation (12).
  • Mean (Current Block ') may be an average of pixel values of a block that is already encoded as a neighboring block of the current block.
  • the decoder can obtain an average of the neighboring block pixel values of the current block and use the same to derive the error parameter.
  • Mean (Reference Block ') may be an average of reference block pixel values or an average of neighboring block pixel values of the reference block.
  • the decoder since the decoder can obtain the reference block pixel value, not only the neighboring block pixel value of the reference block but also the reference block pixel value can be used for the error parameter derivation.
  • the error parameter a may be obtained by Equation 13 below.
  • Mean (Current Block ') and Mean (Reference Block') have the same meaning as Mean (Current Block ') and Mean (Reference Block') in Equation 12.
  • the error parameter b may be obtained in the same manner as in the zero order error model.
  • the decoder may derive an error parameter using a method used in weighted prediction (WP).
  • WP weighted prediction
  • the error parameter a can be obtained by the following equation (14).
  • w Y [n] is a weighting value and represents an error parameter a.
  • H represents the height of the current block and the reference block
  • W represents the width of the current block and the reference block.
  • c Y ij denotes a luma pixel value in the current frame
  • r Y [n] ij denotes a luma pixel value in the reference frame.
  • the value of iclip3 (a, b, c) is a when c is less than a, b when c is greater than b, and c otherwise.
  • the error parameter b can be obtained by the following equation (15).
  • offset Y [n] is an offset value and represents the error parameter b.
  • the decoder may derive the error parameter of the current block using the error parameter of the neighboring block for the current block.
  • the decoder when there is one neighboring block having error parameter information as a neighboring block having the same motion vector as the current block, the decoder may use the error parameter as an error parameter of the current block. In another embodiment, when there are two or more neighboring blocks having error parameter information as neighboring blocks having the same motion vector as the current block, the decoder obtains a weighted sum of the error parameters of the neighboring blocks and returns the value to the error parameter of the current block. Can also be used as In addition, the decoder may use the error parameter of the neighboring block with respect to the current block as the initial prediction value in deriving the error parameter.
  • the decoder may derive the error parameter using additional information received from the encoder.
  • the encoder may further transmit difference information between the actual error parameter and the prediction error parameter to the decoder.
  • the decoder may derive the actual error parameter by adding the difference information received to the prediction error parameter information.
  • the prediction error parameter means an error parameter predicted by the encoder and the decoder.
  • the parameter information additionally transmitted from the encoder is not limited to the difference information and may have various types.
  • the decoder derives an error compensation value for the current block by using the error model and the derived error parameter (S720).
  • the decoder may use the error compensation value derived by the error model and the error parameter as the error compensation value of the current block.
  • the decoder may generate two or more prediction blocks by using each reference block separately. In this case, the decoder may derive an error parameter for each prediction block and derive an error compensation value for each prediction block.
  • the error compensation value for each prediction block may be referred to as an error block value.
  • the decoder may derive an error compensation value for the current block by the weighted sum of the error block values.
  • the weight may be determined using distance information between a current block and a prediction block corresponding to each reference block.
  • there may be two or more pieces of motion information indicating each reference block and the weight may be determined using directional information of each piece of motion information.
  • the weight may be determined by using not only the directional information between the respective motion information but also the size information of each motion information.
  • the weight may be obtained using at least one or more of the above-described embodiments.
  • the method of determining the weight is not limited to the above-described embodiments, and the weight may be determined in various ways depending on the implementation.
  • N represents the height and width of the current block and the reference block.
  • D represents the number of lines of neighboring pixels adjacent to the current block and the reference block. For example, D is 1, 2, 3, 4,... , N, and the like.
  • the decoder may use pixel values of pixels around the current block and pixels of pixels around the reference block to derive an error parameter.
  • the error parameter of the 0th order model can be represented by the following equation (16).
  • offset represents an error parameter of the 0th order model.
  • Mean (Current Neighbor) represents an average of pixel values of neighboring pixels adjacent to the current block.
  • the decoder can obtain an average of pixel values of pixels around the current block and use the same to derive the error parameter.
  • Mean (Ref. Neighbor) represents an average of pixel values of neighboring pixels of the reference block.
  • the decoder may derive a difference value between a pixel value average of pixels around the current block and a pixel value average of pixels around the reference block as an error parameter value.
  • the range of pixels used to derive the error parameter may be determined in various ways.
  • D 1, only pixel values included in a line immediately adjacent to the current block and / or a reference block may be used for deriving an error parameter.
  • N and D in the embodiment of FIG. 9 have the same meaning as N and D in the embodiment of FIG. 8.
  • the decoder may use pixel values of pixels around a current block and pixel values of pixels in a reference block to derive an error parameter.
  • the error parameter of the 0th order model can be represented by the following equation (17).
  • Mean represents an average of pixel values of pixels in a reference block.
  • the decoder may derive the difference value between the pixel value average of the pixels around the current block and the pixel value average of the pixels in the reference block as an error parameter value.
  • the range of pixels used may be variously determined.
  • N and D in the embodiment of FIG. 10 have the same meaning as N and D in the embodiment of FIG. 8.
  • the decoder may use pixel values of pixels around the current block and pixel values of pixels around the reference block to derive an error parameter.
  • the decoder may derive an error parameter using not only the pixel values but also motion information derived for the current block.
  • the error parameter of the zero-order model can be represented by the following equation (18).
  • Mean (weight * Current Neighbor) represents a weighted average of pixel values of neighboring pixels adjacent to the current block.
  • Mean (weight * Ref. Neighbor) represents a weighted average of pixel values of neighboring pixels of the reference block.
  • the decoder may derive a difference value between a weighted average of pixel values of pixels around a current block and a weighted average of pixel values of pixels around a reference block as an error parameter value.
  • the weight may be obtained using the directionality of the motion information derived for the current block and / or neighboring blocks of the current block.
  • the decoder may use only pixel values of pixels included in a current block and a left block of a reference block to derive an error parameter.
  • a weight value of 1 may be applied to the pixel values of the left block
  • a weight value of 0 may be applied to the pixel values of the upper block.
  • the range of pixels used may be variously determined.
  • N and D in the embodiment of FIG. 11 have the same meanings as N and D in the embodiment of FIG. 8.
  • a decoder may use pixel values of pixels around a current block and pixel values of pixels in a reference block to derive an error parameter.
  • the error parameter of the 0th order model can be represented by the following equation (19).
  • the decoder may derive a difference value between a weighted average of pixel values of pixels around a current block and an average of pixel values of pixels in a reference block as an error parameter value.
  • the weight may be obtained using the directionality of the motion information derived for the current block and / or neighboring blocks of the current block.
  • the decoder may use only pixel values of pixels included in a left block of the current block among pixel values of a pixel adjacent to the current block to derive an error parameter. Can be.
  • a weight value of 1 may be applied to the pixel values of the left block
  • a weight value of 0 may be applied to the pixel values of the upper block.
  • the range of pixels used may be variously determined.
  • N and D in the embodiment of FIG. 12 have the same meaning as N and D in the embodiment of FIG. 8.
  • the decoder may use pixel values of pixels around the current block and pixels of pixels around the reference block to derive an error parameter.
  • the error parameter of the 0th order model can be represented by the following equation (20).
  • Mean (weight * Current Neighbor) represents a weighted average of pixel values of pixels around the current block.
  • Mean (weight * Ref. Neighbor) represents a weighted average of pixel values of pixels around the reference block.
  • the neighboring pixels of the current block may be pixel values included in block C illustrated in 1220 of FIG. 12.
  • the neighboring pixels of the reference block may also be pixel values included in the block in the reference image corresponding to the block C.
  • block C is referred to as an upper left block of the current block
  • a block in a reference image corresponding to block C is referred to as an upper left block of the reference block.
  • the decoder may derive the difference between the weighted average of the pixel values of the pixels around the current block and the weighted average of the pixel values of the pixels around the reference block as an error parameter value.
  • the weight may be obtained using the directionality of the motion information derived for the current block and / or neighboring blocks of the current block.
  • the decoder may determine the number of pixels included in the upper left block of the current block and the neighboring block. Only pixel values can be used to derive the error parameter. For example, a weight value of 1 may be applied to pixel values of an upper left block, and a weight value of 0 may be applied to pixel values of an upper block and a left block.
  • a weight value of 1 may be applied to pixel values of an upper left block
  • a weight value of 0 may be applied to pixel values of an upper block and a left block.
  • the upper block of the current block is block B
  • the left block of the current block is block A
  • the upper left block of the current block is block C.
  • the upper block, the left block, and the upper left block of the left block are blocks in the reference picture corresponding to the blocks B, Block A, and Block C, respectively.
  • the range of pixels used may be variously determined.
  • FIG. 13 is a conceptual diagram schematically illustrating an embodiment of a motion vector used for deriving an error compensation value using weights in the embodiment of FIG. 7.
  • 13 shows an embodiment in the case of two reference blocks.
  • T-1, T, and T + 1 mean time for each image.
  • an image of time T represents a current image
  • a block in the current image represents a current block.
  • the image of time T-1, T + 1 represents a reference image
  • the block in a reference image represents a reference block.
  • the motion vector of the current block indicating the reference block in the reference picture at time T-1 is the motion vector of the reference picture list 0 and the current block indicating the reference block in the reference picture at time T + 1.
  • the motion vector of is referred to as the motion vector of the reference picture list1.
  • the decoder may derive an error compensation value for the current block by a weighted sum of error block values.
  • the weight may be determined using motion information derived for the current block.
  • the motion vector of the reference picture list 0 and the motion vector of the reference picture list 1 are symmetric with each other.
  • the decoder may not apply an error compensation value when deriving the pixel value of the final prediction block. Therefore, when the motion vector of the reference picture list 0 and the motion vector of the reference picture list 1 are symmetric with each other, the weight may be set to zero.
  • the decoder may apply an error compensation value when deriving the pixel value of the final prediction block.
  • the weights used in deriving the error compensation value may be set to 1/2 respectively.
  • the decoder may derive the pixel value of the last prediction block for the current block by using the pixel value and the error compensation value of the prediction block.
  • Specific embodiments of the method of deriving the pixel value and the error compensation value of the prediction block have been described above with reference to the embodiments of FIGS. 4 to 13.
  • the decoder may derive the pixel value of the final prediction block by adding an error compensation value to the pixel value of the prediction block.
  • the decoder may use the pixel value and the error compensation value of the prediction block derived in the previous step as it is.
  • the error compensation values for the prediction target pixels in the current block may be values to which the same error parameters are applied.
  • the pixel value of the final prediction block for the zero-order error model may be represented by Equation 21 according to an embodiment.
  • Pixel value (x, y) of the final prediction block Pixel value (x, y) of the prediction block + b
  • (x, y) is the coordinate of the prediction target pixel in the current block.
  • b is a DC offset and corresponds to an error parameter of the 0th order error model.
  • the pixel value of the final prediction block for the first order error model may be represented by Equation 22 as an embodiment.
  • Pixel value (x, y) of the last prediction block a * pixel value (x, y) of the prediction block + b
  • the decoder can use not only the pixel value and the error compensation value of the prediction block derived in the previous step, but also information about the position in the current block of the prediction target pixel. have.
  • the pixel value of the final prediction block for the zero-order error model may be represented by Equation 23 according to an embodiment.
  • Pixel value (x, y) of the last prediction block pixel value (x, y) of the prediction block + b * w (x, y)
  • Pixel value (x, y) of the last prediction block pixel value (x, y) of the prediction block + b (x, y)
  • w (x, y) is a weight applied to the error parameter b.
  • the weight w (x, y) and the error parameter b (x, y) may have different values according to positions in the current block of the prediction target pixel. Therefore, the pixel value of the final prediction block may vary according to the position in the current block of the prediction target pixel.
  • the pixel value of the final prediction block for the first order error model may be represented by Equation 24 according to an embodiment.
  • Pixel value (x, y) of the last prediction block a * w1 (x, y) * pixel value (x, y) of the prediction block + b * w2 (x, y)
  • Pixel value (x, y) of the final prediction block a (x, y) * pixel value (x, y) + b (x, y) of the prediction block
  • w1 (x, y) is a weight applied to the error parameter a
  • w2 (x, y) is a weight applied to the error parameter b.
  • the weight w1 (x, y), the weight w2 (x, y), the error parameter a (x, y) and the error parameter b (x, y) are located at the position in the current block of the pixel to be predicted. It can have different values. Therefore, the pixel value of the final prediction block may vary according to the position in the current block of the prediction target pixel.
  • the encoder and the decoder may improve encoding / decoding performance by using information on the current block position of the prediction target pixel together with other information.
  • FIG. 14 is a conceptual diagram illustrating an embodiment of a method of deriving a pixel value of a final prediction block by using information about a position in a current block of a prediction target pixel.
  • a zero-order error model is used, and a method of deriving the final prediction block pixel value according to the second equation in the embodiment of Equation 23 is used.
  • reference numeral 1410 denotes a reference block
  • reference numeral 1420 of FIG. 14 indicates a current block
  • the size of the reference block and the current block is 4x4.
  • N1, N2, N3, and N4 represent neighboring pixels adjacent to the top of the current block and the reference block
  • NA, NB, NC, and ND represent neighboring pixels adjacent to the left of the current block and the reference block.
  • the pixel values of the pixels around the reference block and the pixels around the current block may be different from each other.
  • 16 error parameters b may be derived for 16 pixels in the current block. Each error parameter may have a different value depending on the position of the pixel corresponding to the error parameter.
  • the error parameter b (2,3) may be derived using only information included in the N3 and NB pixels among the pixels around the current block and the pixels around the reference block.
  • the decoder may derive only some b (i, j) of the error parameters and then derive the remaining error parameters by using the error parameter information and / or information included in the neighboring pixels.
  • the remaining error parameters may be derived by interpolation or extrapolation of already derived error parameters.
  • the decoder may first derive three parameters of b (1,1), b (4,1), and b (1,4). At this time, the decoder can obtain b (1,2) and b (1,3) by interpolation of b (1,1) and b (1,4), and b (1,1) and b (4). By interpolation of, 1, b (2,1) and b (3,1) can be obtained. Similarly, the remaining b (i, j) can also be obtained by interpolation or extrapolation of the closest error parameter b values around.
  • the decoder may generate two or more prediction blocks by using each reference block separately, and use the weighted sum of the pixel values of the two or more reference blocks to determine the prediction block for the current block. It is also possible to derive the pixel value. In this case, the decoder may derive an error block value for each prediction block, and may also derive one error compensation value for the current block by using the weighted sum of the error block values.
  • the decoder derives only one pixel value of the prediction block for the current block and one error compensation value for the current block, respectively, by the sum of weights, the pixel value of the final prediction block is derived in a similar manner to the case where there is one reference block. Can be.
  • the decoder derives pixel values of two or more prediction blocks using each reference block separately, and derives only error block values for each prediction block instead of one error compensation value
  • the decoder Only error block values greater than or equal to a certain size may be used to derive the final prediction block pixel value, or only error block values less than or equal to a certain size may be used to derive the final prediction block pixel value.
  • the method may be represented by the following equation (25).
  • Pixel value (x, y) of the final prediction block 1 / N (pixel value 1 (x, y) of the prediction block + error block value 1 (x, y) * W th ) + 1 / N (pixel of the prediction block) Value2 (x, y) + error block value2 (x, y) * W th ) +. + 1 / N (pixel value N (x, y) of prediction block + error block value N (x, y) * W th )
  • W th is a value multiplied by the error block value to indicate whether or not the error block value is used.
  • pixel values of the prediction block are values derived by using each reference block separately.
  • Equation 25 only an error block value whose value is greater than or equal to a certain size may be used to derive the final prediction block pixel value. That is, for each prediction block value, if the error parameter b is greater than a predetermined threshold, the value of W th may be 1, otherwise, the value of W th may be zero.
  • Equation 25 only an error block value whose value is equal to or less than a specific size may be used to derive the final prediction block pixel value. That is, for each prediction block value, if the error parameter b is smaller than a predetermined threshold, the value of W th may be 1, otherwise, the value of W th may be zero.
  • the decoder determines the prediction block.
  • the pixel value of the final prediction block can be derived by the weighted sum of the values and the error block values.
  • the pixel value of the final prediction block derived by the method may be represented by the following equation (26).
  • Pixel value (x, y) of the final prediction block W P1 * Pixel value 1 (x, y) of the prediction block + W E1 * Error block value 1 (x, y) + W P2 * Pixel value 2 of the prediction block x, y) + W E2 * error block value 2 (x, y) +... + W PN * Pixel value N (x, y) of prediction block + W EN * Error block value N (x, y)
  • each of W P and W E represents a weight.
  • the weight may be determined using distance information between a current block and a prediction block corresponding to each reference block.
  • there may be two or more pieces of motion information indicating each reference block and the weight may be determined using directional information of each piece of motion information.
  • the weight may also be determined using symmetry information between the pieces of motion information.
  • the weight may be adaptively obtained using at least one or more of the above-described embodiments.
  • the method of determining the weight is not limited to the above-described embodiments, and the weight may be determined in various ways depending on the implementation.
  • the above-described error compensation scheme applied to the prediction in the skipped mode may not be always applied but may be selectively applied according to a coding scheme, a block size, and the like of the current image.
  • the encoder decodes a slice header, a picture parameter set, and / or a sequence parameter set by including information indicating whether error compensation is applied. Can be transmitted to the device. For example, when the information is included in a slice header, the decoder applies error compensation to the slice when the value of the information is a first logical value, and applies the error compensation to the slice when the information is a second logical value. Error compensation may not be applied.
  • the slice header when the information is included in the slice header, whether or not error compensation is applied to each slice may be changed.
  • whether or not error compensation is applied to all slices using the picture parameter may be controlled.
  • whether or not error compensation is applied for each type of slice may be controlled.
  • the slice may be an I slice, a P slice, a B slice, or the like.
  • the information may differently indicate whether error compensation is applied according to a block size of a coding unit, a prediction unit, or the like.
  • the information may include information that error compensation is applied only in a coding unit CU and / or a prediction unit PU of a specific size. Even in such a case, the information may be included in the slice header, the picture parameter set, and / or the sequence parameter set and transmitted.
  • the maximum CU size is 128x128, the minimum CU size is 8x8, the depth of the coding tree block (CTB) is 5, and the error compensation is applied only to the 128x128 and 64x64 size CUs.
  • the flag information may be represented as 11000 and / or 00011.
  • a method of defining a table for some predefined cases and transmitting an index capable of indicating information on the defined table to the decoder may be used.
  • the defined table may be equally stored in the encoder and the decoder.
  • the method of selectively applying the error compensation is not limited to the above embodiment, and various methods may be used depending on the implementation or the need.
  • a prediction mode similar to that of the inter mode i.e., a prediction mode in which a prediction block is generated using information provided from neighboring blocks and a separate residual signal is not transmitted can be used.
  • the present invention described above may be applied.
  • the prediction method using the error compensation according to the embodiment of the present invention when the lighting change between the screens is severe, when the quantization of the large quantization step is applied and / or in other general cases, the error occurring in the skipped mode Can be reduced. Therefore, when the prediction mode is selected by the rate-distortion optimization method, the rate at which the skip mode is selected as the optimal prediction mode may be increased, and thus the compression performance of image encoding may be improved.
  • the decoder may also perform the same error compensation as the encoder without additional information transmitted from the encoder. have. Accordingly, since the encoder does not need to transmit additional additional information to the decoder for error compensation, the amount of information transmitted from the encoder to the decoder can be minimized.

Landscapes

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

Abstract

According to the present invention, a method for decoding a video in a skip mode comprises the steps of: deriving a pixel value of an estimation block for a current block; deriving an error compensation value for the current block; and deriving a pixel value of a final prediction block using the pixel value of the prediction block and the error compensation value. According to the present invention, the amount of transmitted information is minimized, and the efficiency of video encoding / decoding is improved.

Description

오차 보상을 이용한 영상 부호화/복호화 방법 및 장치Method and apparatus for image coding / decoding using error compensation

본 발명은 영상 처리에 관한 것으로서, 보다 상세하게는 영상 부호화/복호화 방법 및 장치에 관한 것이다.The present invention relates to image processing, and more particularly, to an image encoding / decoding method and apparatus.

최근 HD(High Definition) 해상도를 가지는 방송 서비스가 국내뿐만 아니라 세계적으로 확대되면서, 많은 사용자들이 고해상도, 고화질의 영상에 익숙해지고 있으며 이에 따라 많은 기관들이 차세대 영상기기에 대한 개발에 박차를 가하고 있다. 또한 HDTV와 더불어 HDTV의 4배 이상의 해상도를 갖는 UHD(Ultra High Definition)에 대한 관심이 증대되면서 보다 높은 해상도, 고화질의 영상에 대한 압축기술이 요구되고 있다.Recently, as broadcasting services having high definition (HD) resolution have been expanded not only in Korea but also in the world, many users are accustomed to high resolution and high quality images, and many organizations are accelerating the development of next generation video equipment. In addition, as interest in Ultra High Definition (UHD), which has four times the resolution of HDTV, is increasing along with HDTV, a compression technology for higher resolution and higher quality images is required.

영상 압축 기술에는 시간적으로 이전 및/또는 이후의 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 인터(inter) 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 인트라(intra) 예측 기술, 조명 변화 등에 의한 화질의 열화를 방지하기 위한 가중치 예측 기술, 출현 빈도가 높은 심볼(symbol)에 짧은 부호를 할당하고 출현 빈도가 낮은 심볼에 긴 부호를 할당하는 엔트로피 부호화 기술 등이 있다. 특히, 생략 모드(skip mode)에서 현재 블록에 대한 예측이 수행되는 경우, 이전 부호화된 영역으로부터 예측된 값만을 이용하여 예측 블록이 생성되고 별도의 움직임 정보(motion information)나 잔여(residual) 신호가 부호화기로부터 복호화기로 전송되지 않는다. 이러한 영상 압축 기술들에 의해 영상 데이터가 효율적으로 압축될 수 있다.Image compression techniques include inter prediction techniques for predicting pixel values included in a current picture from previous and / or subsequent pictures in time, and intra predicting pixel values included in a current picture using pixel information in the current picture. (intra) prediction technique, weight prediction technique to prevent deterioration of image quality due to lighting change, entropy encoding technique to assign a short code to a high frequency symbol and a long code to a low frequency symbol, etc. There is this. In particular, when prediction is performed on a current block in a skip mode, a prediction block is generated using only a value predicted from a previously coded region, and a separate motion information or residual signal is generated. It is not sent from the encoder to the decoder. Image data can be efficiently compressed by these image compression techniques.

본 발명의 기술적 과제는 전송되는 정보량을 최소화하면서 영상 부호화/복호화 효율을 향상시킬 수 있는 영상 부호화 방법 및 장치를 제공함에 있다.An object of the present invention is to provide an image encoding method and apparatus capable of improving image encoding / decoding efficiency while minimizing the amount of transmitted information.

본 발명의 다른 기술적 과제는 전송되는 정보량을 최소화하면서 영상 부호화/복호화 효율을 향상시킬 수 있는 영상 복호화 방법 및 장치를 제공함에 있다.Another object of the present invention is to provide an image decoding method and apparatus capable of improving image encoding / decoding efficiency while minimizing the amount of transmitted information.

본 발명의 또 다른 기술적 과제는 전송되는 정보량을 최소화하면서 영상 부호화/복호화 효율을 향상시킬 수 있는 생략 모드 예측 방법 및 장치를 제공함에 있다.Another technical problem of the present invention is to provide a skipping mode prediction method and apparatus which can improve image encoding / decoding efficiency while minimizing the amount of transmitted information.

본 발명의 일 실시 형태는 영상 복호화 방법이다. 상기 방법은 현재 블록에 대한 예측 블록의 화소(pixel)값을 도출하는 단계, 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계 및 상기 예측 블록의 화소값 및 상기 오차 보상(error compensation) 값을 이용하여 최종 예측 블록의 화소값을 도출하는 단계를 포함하고, 상기 오차 보상 값은 상기 현재 블록과 참조 블록 간의 오차를 보상하기 위한 오차 보상 블록의 샘플(sample)값이고, 상기 참조 블록은 참조 영상 내의 블록으로서 현재 블록 내 화소의 예측값(predictor) 관련 정보를 포함하는 블록이고, 상기 현재 블록에 대한 예측은 화면 간(intra) 생략 모드(SKIP mode)에서 수행된다.One embodiment of the present invention is a video decoding method. The method includes deriving a pixel value of a prediction block for a current block, deriving an error compensation value for the current block, and using the pixel value and the error compensation value of the prediction block. Deriving a pixel value of a final prediction block, wherein the error compensation value is a sample value of an error compensation block for compensating an error between the current block and a reference block, wherein the reference block is in a reference picture. As a block, the block includes predictor related information of the pixels in the current block, and the prediction for the current block is performed in an intra skip mode (SKIP mode).

상기 현재 블록에 대한 예측 블록의 화소값을 도출하는 단계는, 이미 복호화된 블록을 이용하여 상기 현재 블록에 대한 움직임 정보를 도출하는 단계 및 상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 단계를 포함할 수 있다.Deriving a pixel value of the prediction block for the current block includes deriving motion information for the current block using a block that has already been decoded and using the derived motion information to obtain a pixel value of the prediction block. It may include the step of deriving.

상기 이미 복호화된 블록은 상기 현재 블록의 주변 블록을 포함할 수 있다. The already decoded block may include neighboring blocks of the current block.

상기 이미 복호화된 블록은 상기 현재 블록의 주변 블록 및 상기 참조 영상 내 동일 위치 블록(collocated block)의 주변 블록을 포함할 수 있다.The already decoded block may include a neighboring block of the current block and a neighboring block of a collocated block in the reference image.

상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 단계에서 상기 도출된 예측 블록의 화소값은, 상기 도출된 움직임 정보가 지시하는 참조 블록의 화소값일 수 있다.In the deriving pixel value of the prediction block by using the derived motion information, the pixel value of the derived prediction block may be a pixel value of a reference block indicated by the derived motion information.

상기 참조 블록이 2개 이상인 경우 상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 단계에서는, 상기 참조 블록의 화소값들의 가중치 합에 의해 상기 예측 블록의 화소값을 도출하고, 상기 참조 블록은 상기 도출된 움직임 정보가 지시하는 블록일 수 있다.In the case of deriving the pixel value of the prediction block using the derived motion information when there are two or more reference blocks, the pixel value of the prediction block is derived by a weighted sum of the pixel values of the reference block, The reference block may be a block indicated by the derived motion information.

상기 현재 블록에 대한 오차 보상 값을 도출하는 단계는, 상기 현재 블록의 오차 모델(error model)에 대한 오차 파라미터를 도출하는 단계 및 상기 오차 모델 및 상기 도출된 오차 파라미터를 이용하여 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계를 포함할 수 있다.Deriving an error compensation value for the current block includes deriving an error parameter for an error model of the current block and using the error model and the derived error parameter for the current block. Deriving an error compensation value may be included.

상기 오차 모델은 0차 오차 모델 또는 1차 오차 모델일 수 있다.The error model may be a zero-order error model or a first-order error model.

상기 현재 블록의 오차 모델에 대한 오차 파라미터를 도출하는 단계에서는, 상기 현재 블록에 대한 주변 블록 및 상기 참조 영상 내 블록에 포함된 정보를 이용하여 상기 오차 파라미터를 도출할 수 있다.In the deriving of an error parameter for the error model of the current block, the error parameter may be derived using information included in the neighboring block of the current block and the block in the reference image.

상기 참조 블록이 2개 이상인 경우, 상기 오차 모델 및 상기 도출된 오차 파라미터를 이용하여 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계에서는, 오차 블록 값들의 가중치 합에 의해 상기 오차 보상 값을 도출하고, 상기 오차 블록 값은 각각의 참조 블록에 대해 도출된 상기 현재 블록의 오차 보상 값일 수 있다.When the reference block has two or more, in the step of deriving an error compensation value for the current block using the error model and the derived error parameter, the error compensation value is derived by a weighted sum of the error block values. The error block value may be an error compensation value of the current block derived for each reference block.

상기 예측 블록의 화소값 및 상기 오차 보상 값을 이용하여 최종 예측 블록의 화소값을 도출하는 단계에서는, 오차 보상 적용 여부를 지시하는 정보에 따라 상기 오차 보상 값을 선택적으로 이용하고, 상기 오차 보상 적용 여부를 지시하는 정보는 슬라이스 헤더(slice header), 픽쳐 파라미터 셋(picture parameter set) 또는 시퀀스 파라미터 셋(sequence parameter set)에 포함되어 부호화기로부터 복호화기로 전송되는 정보일 수 있다.In the deriving the pixel value of the final prediction block using the pixel value of the prediction block and the error compensation value, the error compensation value is selectively used according to information indicating whether to apply the error compensation, and the error compensation is applied. Information indicating whether the information is included in a slice header, a picture parameter set, or a sequence parameter set may be information transmitted from an encoder to a decoder.

본 발명의 다른 실시 형태는 화면 간 생략 모드 예측 방법이다. 상기 방법은 현재 블록에 대한 예측 블록의 화소값을 도출하는 단계, 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계 및 상기 예측 블록의 화소값 및 상기 오차 보상 값을 이용하여 최종 예측 블록의 화소값을 도출하는 단계를 포함하고, 상기 오차 보상 값은 상기 현재 블록과 참조 블록 간의 오차를 보상하기 위한 오차 보상 블록의 샘플값이고, 상기 참조 블록은 참조 영상 내의 블록으로서 상기 현재 블록 내 화소의 예측값 관련 정보를 포함하는 블록이다. Another embodiment of the present invention is an inter prediction mode prediction method. The method includes deriving a pixel value of the prediction block for the current block, deriving an error compensation value for the current block, and using the pixel value of the prediction block and the error compensation value. Wherein the error compensation value is a sample value of an error compensation block for compensating an error between the current block and a reference block, wherein the reference block is a block in a reference image and related to a predicted value of a pixel in the current block. It is a block that contains information.

상기 현재 블록에 대한 예측 블록의 화소값을 도출하는 단계는, 이미 복호화된 블록을 이용하여 상기 현재 블록에 대한 움직임 정보를 도출하는 단계 및 상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 단계를 포함할 수 있다.Deriving a pixel value of the prediction block for the current block includes deriving motion information for the current block using a block that has already been decoded and using the derived motion information to obtain a pixel value of the prediction block. It may include the step of deriving.

상기 현재 블록에 대한 오차 보상 값을 도출하는 단계는, 상기 현재 블록의 오차 모델(error model)에 대한 오차 파라미터를 도출하는 단계 및 상기 오차 모델 및 상기 도출된 오차 파라미터를 이용하여 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계를 포함할 수 있다.Deriving an error compensation value for the current block includes deriving an error parameter for an error model of the current block and using the error model and the derived error parameter for the current block. Deriving an error compensation value may be included.

본 발명의 또 다른 실시 형태는 영상 복호화 장치이다. 상기 장치는 복호화기로부터 수신된 비트스트림(bitstream)을 확률 분포에 따라 엔트로피 복호화하여 잔여 블록(residual block) 관련 정보를 생성하는 엔트로피 복호화부, 현재 블록에 대한 예측 블록의 화소값 및 상기 현재 블록에 대한 오차 보상 값을 도출하고, 상기 예측 블록의 화소값 및 상기 오차 보상 값을 이용하여 최종 예측 블록의 화소값을 도출하는 예측부 및 상기 잔여 블록 및 상기 최종 예측 블록을 이용하여 복원 블록을 생성하는 가산부를 포함하고, 상기 오차 보상 값은 상기 현재 블록과 참조 블록 간의 오차를 보상하기 위한 오차 보상 블록의 샘플값이고, 상기 참조 블록은 참조 영상 내의 블록으로서 상기 현재 블록 내 화소의 예측값 관련 정보를 포함하는 블록이고, 상기 예측부는 화면 간 생략 모드에서 상기 현재 블록에 대한 예측을 수행한다.Another embodiment of the present invention is an image decoding device. The apparatus entropy-decodes a bitstream received from the decoder according to a probability distribution to generate a residual block related information, a pixel value of a prediction block for the current block, and the current block. A prediction unit for deriving an error compensation value for the prediction block and a pixel value of the final prediction block using the pixel value of the prediction block and the error compensation value, and generating a reconstruction block using the residual block and the final prediction block. And an adder, wherein the error compensation value is a sample value of an error compensation block for compensating an error between the current block and a reference block, and the reference block is a block in a reference image and includes information related to prediction values of pixels in the current block. The prediction unit may predict the current block in the inter-screen skip mode. The.

상기 예측부는 이미 복호화된 블록을 이용하여 상기 현재 블록에 대한 움직임 정보를 도출하고, 상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출할 수 있다.The prediction unit may derive motion information about the current block by using a block that has already been decoded, and may derive pixel values of the prediction block by using the derived motion information.

상기 예측부는 상기 현재 블록의 오차 모델에 대한 오차 파라미터를 도출하고, 상기 오차 모델 및 상기 도출된 오차 파라미터를 이용하여 상기 현재 블록에 대한 오차 보상 값을 도출할 수 있다.The prediction unit may derive an error parameter for the error model of the current block and derive an error compensation value for the current block by using the error model and the derived error parameter.

본 발명에 따른 영상 부호화 방법에 의하면 전송되는 정보량이 최소화되면서 영상 부호화/복호화 효율이 향상된다.According to the video encoding method of the present invention, the video encoding / decoding efficiency is improved while minimizing the amount of transmitted information.

본 발명에 따른 영상 복호화 방법에 의하면 전송되는 정보량이 최소화되면서 영상 부호화/복호화 효율이 향상된다.According to the image decoding method according to the present invention, the amount of transmitted information is minimized and the image encoding / decoding efficiency is improved.

본 발명에 따른 생략 모드 예측 방법에 의하면 전송되는 정보량이 최소화되면서 영상 부호화/복호화 효율이 향상된다.According to the skipped mode prediction method according to the present invention, image encoding / decoding efficiency is improved while minimizing the amount of transmitted information.

도 1은 영상 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.1 is a block diagram illustrating a configuration of an image encoding apparatus according to an embodiment.

도 2는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment.

도 3은 본 발명의 실시예에 따른, 오차 보상을 이용한 생략 모드 예측 방법을 개략적으로 나타내는 흐름도이다.3 is a flowchart schematically illustrating a skip mode prediction method using error compensation according to an exemplary embodiment of the present invention.

도 4는 본 발명의 실시예에 따른 예측 블록의 화소값 도출 방법을 개략적으로 나타내는 흐름도이다. 4 is a flowchart schematically illustrating a method of deriving pixel values of a prediction block according to an embodiment of the present invention.

도 5는 도 4의 실시예에서의 움직임 정보 도출시에 사용되는, 현재 블록에 대한 주변 블록의 실시예를 개략적으로 나타내는 개념도이다.FIG. 5 is a conceptual diagram schematically illustrating an embodiment of a neighboring block with respect to a current block, which is used when deriving motion information in the embodiment of FIG. 4.

도 6은 도 4의 실시예에서의 움직임 정보 도출시에 사용되는, 현재 블록의 주변 블록 및 참조 영상 내 동일 위치 블록의 주변 블록의 실시예를 개략적으로 나타내는 개념도이다. FIG. 6 is a conceptual diagram schematically illustrating an embodiment of a neighboring block of a current block and a neighboring block of the same position block in a reference image, which are used when deriving motion information in the embodiment of FIG. 4.

도 7은 본 발명의 실시예에 따른 오차 보상 값 도출 방법을 개략적으로 나타내는 흐름도이다. 7 is a flowchart schematically illustrating a method for deriving an error compensation value according to an embodiment of the present invention.

도 8은 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 일 실시예를 개략적으로 나타내는 개념도이다.8 is a conceptual diagram schematically showing an embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention.

도 9는 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 다른 실시예를 개략적으로 나타내는 개념도이다.9 is a conceptual diagram schematically showing another embodiment of an error parameter derivation method for a zero-order error model according to the present invention.

도 10은 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 또 다른 실시예를 개략적으로 나타내는 개념도이다.10 is a conceptual diagram schematically showing still another embodiment of an error parameter derivation method for a zero-order error model according to the present invention.

도 11은 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 또 다른 실시예를 개략적으로 나타내는 개념도이다.11 is a conceptual diagram schematically showing still another embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention.

도 12는 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 또 다른 실시예를 개략적으로 나타내는 개념도이다.12 is a conceptual diagram schematically showing still another embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention.

도 13은 도 7의 실시예에서의 가중치를 이용한 오차 보상 값 도출에 사용되는 움직임 벡터의 실시예를 개략적으로 나타내는 개념도이다.FIG. 13 is a conceptual diagram schematically illustrating an embodiment of a motion vector used for deriving an error compensation value using weights in the embodiment of FIG. 7.

도 14는 예측 대상 화소의 현재 블록 내 위치에 관한 정보를 이용하여 최종 예측 블록의 화소값을 도출하는 방법의 일 실시예를 나타내는 개념도이다.14 is a conceptual diagram illustrating an embodiment of a method of deriving a pixel value of a final prediction block by using information about a position in a current block of a prediction target pixel.

이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명한다. 본 명세서의 실시예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.EMBODIMENT OF THE INVENTION Hereinafter, embodiment of this invention is described concretely with reference to drawings. In describing the embodiments of the present specification, when it is determined that a detailed description of a related well-known configuration or function may obscure the gist of the present specification, the detailed description thereof will be omitted.

어떤 구성 요소가 다른 구성 요소에 “연결되어” 있다거나 “접속되어” 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있으나, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 아울러, 본 발명에서 특정 구성을 “포함”한다고 기술하는 내용은 해당 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 본 발명의 실시 또는 본 발명의 기술적 사상의 범위에 포함될 수 있음을 의미한다. When a component is said to be “connected” or “connected” to another component, it may be directly connected to or connected to that other component, but it may be understood that another component may exist in between. Should be. In addition, the description "include" a specific configuration in the present invention does not exclude a configuration other than the configuration, it means that additional configuration may be included in the scope of the technical spirit of the present invention or the present invention.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.Terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, 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 of the present invention are shown independently to represent different characteristic functions, and do not mean that each component is made of separate hardware or one software component unit. In other words, each component is included in each component for convenience of description, and at least two of the components may be combined into one component, or one component may be divided into a plurality of components to perform a function. Integrated and separate embodiments of the components are also included within the scope of the present invention without departing from the spirit of the invention.

또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.In addition, some of the components may not be essential components for performing essential functions in the present invention, but may be optional components for improving performance. The present invention can be implemented including only the components essential for implementing the essentials of the present invention except for the components used for improving performance, and the structure including only the essential components except for the optional components used for improving performance. Also included in the scope of the present invention.


도 1은 영상 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다. 도 1을 참조하면, 상기 영상 부호화 장치(100)는 움직임 예측부(111), 움직임 보상부(112), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조영상 버퍼(190)를 포함한다. 1 is a block diagram illustrating a configuration of an image encoding apparatus according to an embodiment. Referring to FIG. 1, the image encoding apparatus 100 may include a motion predictor 111, a motion compensator 112, an intra predictor 120, a switch 115, a subtractor 125, and a converter 130. And a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference image buffer 190.

영상은 픽쳐로도 불릴 수 있으며 이하, 픽쳐는 문맥과 필요에 따라 영상과 동일한 의미를 가질 수 있다. 영상은 순행 주사(progressive) 방식에서 사용되는 프레임(frame) 픽쳐와 격행 주사(interlace) 방식에서 사용되는 필드(field) 픽쳐를 모두 포함할 수 있다. 이 때, 필드 픽쳐는 탑(top) 필드와 바텀(bottom) 필드를 포함한 두 개의 필드로 구성될 수 있다. An image may also be called a picture. Hereinafter, a picture may have the same meaning as an image according to context and need. The image may include both a frame picture used in the progressive scan method and a field picture used in the interlace scan method. In this case, the field picture may be composed of two fields including a top field and a bottom field.

블록은 영상 부호화 및 복호화의 기본 단위를 의미한다. 영상 부호화 및 복호화 시 부호화 혹은 복호화 단위는, 영상을 분할하여 부호화 혹은 복호화 할 때 그 분할된 단위를 말하므로, 매크로 블록, 부호화 유닛 (CU: Coding Unit), 예측 유닛 (PU: Prediction Unit), PU 파티션(PU partition), 변환 유닛(TU: Transform Unit), 변환 블록(transform block) 등으로 불릴 수 있다. 이하, 블록은 현재 부호화가 수행되는 단위에 따라 상술한 블록 타입들 중 하나의 타입을 가질 수 있다.A block means a basic unit of image encoding and decoding. When encoding or decoding an image, a coding or decoding unit refers to a divided unit when an image is divided and encoded or decoded. Therefore, a macroblock, a coding unit (CU), a prediction unit (PU), and a PU are used. It may be called a partition (PU partition), a transform unit (TU), a transform block, or the like. Hereinafter, a block may have one of the above-described block types according to a unit in which current encoding is performed.

상기 부호화 유닛은 쿼드 트리 구조(quad tree structure)를 기초로 계층적으로 분할될 수 있다. 이 때, 부호화 유닛의 분할 여부는 깊이(depth) 정보와 분할 플래그(split flag)를 이용하여 표현될 수 있다. 가장 큰 크기의 부호화 유닛은 LCU(Largest Coding Unit), 가장 작은 크기의 부호화 유닛은 SCU(Smallest Coding Unit)라 한다. 부호화 유닛은 8x8, 16x16, 32x32, 64x64, 128x128 등의 크기를 가질 수 있다. 여기서, 분할 플래그는 현재 부호화 유닛의 분할 여부를 지시한다. 또한 분할 깊이가 n인 경우, LCU에서 n번 분할된 것을 표시할 수 있다. 예를 들어 분할 깊이 0은 LCU에서 분할이 되지 않은 것을 표시하고, 분할 깊이 1은 LCU에서 한 번 분할된 것을 표시할 수 있다. 상술한 바와 같은 부호화 유닛의 구조는 CTB(Coding Tree Block)로도 불릴 수 있다.The coding unit may be hierarchically divided based on a quad tree structure. In this case, whether to split the coding unit may be expressed using depth information and a split flag. The largest coding unit is called a large coding unit (LCU), and the smallest coding unit is called a smallest coding unit (SCU). The coding unit may have a size of 8x8, 16x16, 32x32, 64x64, 128x128, and the like. Here, the split flag indicates whether the current coding unit is split. In addition, when the division depth is n, it may indicate that n divisions have been performed in the LCU. For example, the partition depth 0 may indicate that the partition is not divided in the LCU, and the partition depth 1 may indicate that the partition is divided once in the LCU. The structure of the coding unit as described above may also be called a coding tree block (CTB).

예를 들어, CTB에서 하나의 부호화 유닛은 부호화 유닛의 크기 정보, 깊이 정보 및 분할 플래그 정보 등을 기초로 복수개의 작은 부호화 유닛으로 분할될 수 있다. 이 때, 각각의 작은 부호화 유닛도 크기 정보, 깊이 정보 및 분할 플래그 정보 등을 기초로 복수개의 더 작은 부호화 유닛으로 분할될 수 있다.For example, one coding unit in a CTB may be divided into a plurality of small coding units based on size information, depth information, split flag information, and the like of the coding unit. At this time, each small coding unit may also be divided into a plurality of smaller coding units based on size information, depth information, split flag information, and the like.

영상 부호화 장치(100)는 입력 영상에 대해 인트라(intra) 모드 또는 인터(inter) 모드로 부호화를 수행하고 비트스트림(bit stream)을 출력할 수 있다. 인트라 예측은 화면 내 예측, 인터 예측은 화면 간 예측을 의미한다. 인트라 모드인 경우 스위치(115)가 인트라로 전환되고, 인터 모드인 경우 스위치(115)가 인터로 전환된다. 영상 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성한 후, 입력 블록과 예측 블록의 차분을 부호화할 수 있다.The image encoding apparatus 100 may perform encoding in an intra mode or an inter mode on an input image and output a bit stream. Intra prediction means intra prediction and inter prediction means inter prediction. In the intra mode, the switch 115 is switched to intra, and in the inter mode, the switch 115 is switched to inter. The image encoding apparatus 100 may generate a prediction block for an input block of an input image and then encode a difference between the input block and the prediction block.


인트라 모드인 경우, 인트라 예측부(120)는 현재 블록 주변의 이미 부호화된 블록의 화소값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다.In the intra mode, the intra predictor 120 may generate a prediction block by performing spatial prediction using pixel values of blocks that are already encoded around the current block.

인터 모드인 경우, 움직임 예측부(111)는, 움직임 예측 과정에서 참조 영상 버퍼(190)에 저장되어 있는 참조 영상에서 입력 블록과 가장 매치가 잘 되는 영역을 찾아 움직임 정보(motion information)를 구할 수 있다. 움직임 벡터(motion vector) 정보와 참조 영상 인덱스(reference picture index) 정보 등을 포함한 움직임 정보는 부호화기에서 부호화되어 복호화기로 전송될 수 있다. 움직임 보상부(112)는 움직임 정보와 참조 영상 버퍼(190)에 저장되어 있는 참조 영상을 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다.In the inter mode, the motion predictor 111 may obtain motion information by finding a region that best matches an input block in the reference image stored in the reference image buffer 190 during the motion prediction process. have. Motion information including motion vector information and reference picture index information may be encoded by the encoder and transmitted to the decoder. The motion compensator 112 may generate a prediction block by performing motion compensation using the motion information and the reference image stored in the reference image buffer 190.

여기서, 움직임 정보란 화면 내 또는 화면 간 예측에 사용되는 참조(reference) 블록의 위치를 구하기 위해 사용되는 관련 정보를 의미한다. 움직임 정보에는 현재 블록과 참조 블록간의 상대적 위치를 지시하는 움직임 벡터 정보, 다수의 참조 영상이 사용되는 경우 어떤 참조 영상에 참조 블록이 존재하는지 여부를 지시하는 참조 영상 인덱스 정보 등이 포함될 수 있다. 참조 영상이 한 장만 존재하는 경우, 참조 영상 인덱스 정보는 움직임 정보에 포함되지 않을 수 있다. 참조 블록은 참조 영상 내의 블록으로, 현재 블록 내 화소의 예측값(predictor)에 해당하는 관련 정보를 포함하는 블록이다. 화면 간 예측의 경우 참조 영상의 위치는 참조 영상 인덱스 값과 움직임 벡터 값 등의 움직임 정보에 의해 지시될 수 있다. 화면 내 참조 블록은 현재 영상 내에 존재하는 참조 블록을 의미한다. 움직임 벡터가 부호화되는 경우, 화면 내 참조 블록의 위치는 명시적인 움직임 정보에 의해 지시될 수 있다. 또한 화면 내 참조 블록의 위치는 템플릿 등을 이용하여 유추된 움직임 정보에 의해 지시될 수 있다.Here, the motion information refers to related information used to obtain the position of a reference block used for intra prediction or inter prediction. The motion information may include motion vector information indicating a relative position between a current block and a reference block, and reference picture index information indicating whether a reference block exists in a reference picture when a plurality of reference pictures are used. If only one reference picture exists, the reference picture index information may not be included in the motion information. The reference block is a block in the reference picture and is a block including related information corresponding to a predictor of pixels in the current block. In the case of inter prediction, the position of a reference picture may be indicated by motion information such as a reference picture index value and a motion vector value. The reference block in the picture means a reference block existing in the current image. When the motion vector is encoded, the position of the reference block in the picture may be indicated by explicit motion information. In addition, the position of the reference block in the screen may be indicated by motion information inferred using a template or the like.


화면 간 조명 변화가 심한 영상의 경우, 예를 들어 밝기가 시간적으로 변화하는 영상의 경우에는, 부호화시 조명 변화가 고려되지 않으면 화질의 열화가 발생할 수 있다. 이 경우 부호화기는 조명 변화에 의한 오차(error)를 보상(compensation)하기 위해, 참조 영상에 적응적으로 가중치 계수를 적용한 후 가중치 계수가 적용된 참조 영상을 이용하여 예측을 수행할 수 있다. 이러한 예측 방법은 가중치 예측(weighted prediction)으로 불릴 수 있다. 가중치 예측이 사용되는 경우, 가중치 계수를 포함한, 가중치 예측에 사용되는 파라미터들은 부호화기에서 복호화기로 전송될 수 있다. 이 때 부호화기는 현재 영상에서 사용되는 참조 영상 단위로 동일한 파라미터를 이용하여 가중치 예측을 수행할 수 있다.In the case of an image with a significant change in illumination between screens, for example, an image in which brightness changes in time, deterioration of image quality may occur if the change in illumination is not taken into account during encoding. In this case, in order to compensate for an error due to a lighting change, the encoder may adaptively apply a weight coefficient to the reference image and then perform prediction using the reference image to which the weight coefficient is applied. This prediction method may be called weighted prediction. When weight prediction is used, parameters used for weight prediction, including weight coefficients, may be transmitted from the encoder to the decoder. In this case, the encoder may perform weight prediction using the same parameter as the reference image unit used in the current image.

부호화기는, 오차 보상을 수행함에 있어, 현재 블록에 인접한 이미 부호화된 블록의 화소값의 평균값, 참조 블록의 주변 블록 화소값의 평균값의 차이값을 현재 블록에 대한 DC 오프셋(DC offset) 값으로 사용할 수도 있다. 또한 부호화기는 움직임 벡터 예측시에도 조명 변화를 고려하여 예측을 수행할 수 있다. 이러한 오차 보상 방법은 지역(local) 조명 변화 보상이라 불릴 수 있다. 화면 간 조명 변화가 큰 영상에 대해 지역 조명 변화 보상 방법이 사용되는 경우, 도출된 오프셋 값을 이용하여 화면 간 예측을 수행하므로, 영상 압축 성능이 향상될 수 있다. In performing the error compensation, the encoder uses a difference value of a mean value of pixel values of an already encoded block adjacent to a current block and a mean value of neighboring block pixel values of a reference block as a DC offset value for the current block. It may be. In addition, the encoder may perform prediction by considering lighting changes even when predicting a motion vector. This error compensation method may be referred to as local lighting change compensation. When a local illumination change compensation method is used for an image having a large change in illumination between screens, since the inter prediction is performed using the derived offset value, image compression performance may be improved.


부호화기는 다양한 움직임 예측 방법을 이용하여 현재 블록에 대한 예측을 수행할 수 있으며, 각각의 예측 방법은 서로 다른 예측 모드에서 적용될 수 있다. 예를 들어, 화면 간 예측에서 사용되는 예측 모드에는 생략(skip) 모드, 머지(merge) 모드, AMVP(Advanced Motion Vector Prediction) 모드 등이 있을 수 있다. 예측이 수행되는 모드는 율-왜곡 최적화 프로세스를 통해 결정될 수 있다. 부호화기는 어떤 모드가 예측에 사용되는지에 대한 정보를 복호화기로 전송할 수 있다.The encoder may perform prediction on the current block using various motion prediction methods, and each prediction method may be applied in different prediction modes. For example, a prediction mode used in inter prediction may include a skip mode, a merge mode, an advanced motion vector prediction (AMVP) mode, and the like. The mode in which the prediction is performed can be determined through a rate-distortion optimization process. The encoder can send information about which mode is used for prediction to the decoder.

생략 모드는 예측 블록과 현재 블록의 차이인 잔여(residual) 신호 및 움직임 정보의 전송이 생략되는 부호화 모드이다. 생략 모드는 화면 내 예측, 화면 간 단방향 예측(uni-directional prediction), 화면 간 쌍예측(bi-prediction), 화면 간 또는 화면 내 다중 참조 예측(multi-hypothesis skip mode) 등에 적용될 수 있다. 화면 간 단방향 예측에 적용되는 생략 모드는 P 생략 모드(P skip mode), 화면 간 쌍예측에 적용되는 생략 모드는 B 생략 모드(B skip mode)라 할 수 있다.The skip mode is an encoding mode in which transmission of a residual signal and motion information, which is a difference between a prediction block and a current block, is omitted. The skip mode may be applied to intra prediction, uni-directional prediction between screens, bi-prediction between screens, inter-screen or multi-hypothesis skip mode, and so on. The skip mode applied to the unidirectional prediction between screens may be referred to as a P skip mode, and the skip mode applied to the inter prediction between screens may be referred to as a B skip mode.

생략 모드에서 부호화기는, 주변 블록으로부터 제공받은 움직임 정보를 이용하여 현재 블록의 움직임 정보를 도출하여 예측 블록을 생성할 수 있다. 또한 생략 모드에서는 예측 블록과 현재 블록의 잔여(residual) 신호의 값이 0일 수 있다. 따라서, 부호화기에서 복호화기로 움직임 정보 및 잔여 신호가 전송되지 않을 수 있으며, 부호화기는 이전에 부호화된 영역으로부터 제공받은 정보만을 이용하여 예측 블록을 생성할 수 있다.In the skip mode, the encoder may generate the prediction block by deriving the motion information of the current block using the motion information provided from the neighboring block. In addition, in the skipped mode, values of residual signals of the prediction block and the current block may be zero. Accordingly, the motion information and the residual signal may not be transmitted from the encoder to the decoder, and the encoder may generate the prediction block using only information provided from the previously encoded region.

현재 블록에 움직임 정보를 제공하는 주변의 블록들은 다양한 방법으로 선택될 수 있다. 예를 들어, 움직임 정보는 소정 개수의 주변 블록의 움직임 정보로부터 유도될 수 있다. 주변 블록의 개수는 1개일 수도 있고, 2 이상일 수도 있다.Peripheral blocks that provide motion information to the current block may be selected in various ways. For example, the motion information may be derived from motion information of a predetermined number of neighboring blocks. The number of neighboring blocks may be one or two or more.

또한 생략 모드에서 현재 블록에 움직임 정보를 제공하는 주변의 블록들은 머지 모드에서 움직임 정보를 얻기 위해 사용되는 후보 블록(candidate block)들과 동일할 수 있다. 그리고 부호화기는 주변 블록들 중 어떤 주변 블록이 움직임 정보 도출에 사용되는지 여부를 지시하는 머지 인덱스(merge index)를 복호화기로 전송할 수 있다. 이 때, 복호화기는 머지 인덱스(merge index)가 지시하는 주변 블록으로부터 현재 블록의 움직임 정보를 도출할 수 있다. 이러한 경우의 생략 모드는 머지 생략 모드(merge skip mode)로도 불릴 수 있다.In addition, neighboring blocks that provide motion information to the current block in the skipped mode may be the same as candidate blocks used to obtain the motion information in the merge mode. The encoder may transmit a merge index indicating which neighboring block among the neighboring blocks is used to derive motion information to the decoder. In this case, the decoder may derive the motion information of the current block from the neighboring block indicated by the merge index. The skip mode in this case may also be called a merge skip mode.

움직임 벡터는 수평, 수직 성분 별로 중간값(median) 연산을 통해 구해질 수 있다. 참조 영상 인덱스는 참조 영상 리스트에 있는 영상 중 현재 영상과 시간축 상에서 가장 가까운 영상으로 선택될 수 있다. 움직임 정보의 유도 방법은 상기 방법에 한하지 않으며, 현재 블록에 대한 움직임 정보는 다양한 방법으로 유도될 수 있다. The motion vector may be obtained through median calculation for each horizontal and vertical component. The reference picture index may be selected as the closest picture on the time axis with the current picture among the pictures in the reference picture list. The method of deriving the motion information is not limited to the above method, and the motion information for the current block may be derived in various ways.


감산기(125)는 입력 블록과 생성된 예측 블록의 차분에 의해 잔여 블록(residual block)을 생성할 수 있다. 변환부(130)는 잔여 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 출력할 수 있다. 양자화부(140)는 입력된 변환 계수를 양자화 파라미터에 따라 양자화하여 양자화된 계수(quantized coefficient)를 출력할 수 있다. The subtractor 125 may generate a residual block by the difference between the input block and the generated prediction block. The transform unit 130 may output a transform coefficient by performing transform on the residual block. The quantization unit 140 may output a quantized coefficient by quantizing the input transform coefficient according to the quantization parameter.

엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값들 또는 부호화 과정에서 산출된 부호화 파라미터 값 등을 기초로 엔트로피 부호화를 수행하여 비트스트림(bit stream)을 출력할 수 있다. 엔트로피 부호화를 위해 지수 골룸(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법이 사용될 수 있다.The entropy encoder 150 may output a bit stream by performing entropy encoding based on values calculated by the quantizer 140 or encoding parameter values calculated in the encoding process. For entropy coding, coding methods such as exponential golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) may be used.

엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 높아질 수 있다. When entropy encoding is applied, a small number of bits are assigned to a symbol having a high probability of occurrence and a large number of bits are assigned to a symbol having a low probability of occurrence, thereby representing bits for encoding symbols. The size of the heat can be reduced. Therefore, compression performance of image encoding may be increased through entropy encoding.


양자화된 계수는 역양자화부(160)에서 역양자화되고 역변환부(170)에서 역변환될 수 있다. 역양자화, 역변환된 계수는 가산기(175)를 통해 예측 블록과 더해지고 복원 블록이 생성될 수 있다. The quantized coefficients may be inversely quantized by the inverse quantizer 160 and inversely transformed by the inverse transformer 170. The inverse quantized and inverse transformed coefficients are added to the prediction block through the adder 175 and a reconstruction block can be generated.

복원 블록은 필터부(180)를 거치고, 필터부(180)는 디블록킹 필터(deblocking filter), SAO(Sample Adaptive Offset), ALF(Adaptive Loop Filter) 중 적어도 하나 이상을 복원 블록 또는 복원 픽쳐에 적용할 수 있다. 필터부(180)를 거친 복원 블록은 참조 영상 버퍼(190)에 저장될 수 있다.The reconstruction block passes through the filter unit 180, and the filter unit 180 applies at least one or more of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstruction block or the reconstruction picture. can do. The reconstructed block that has passed through the filter unit 180 may be stored in the reference image buffer 190.


도 2는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다. 도 2를 참조하면, 상기 영상 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 필터부(260) 및 참조 영상 버퍼(270)를 포함한다.2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment. 2, the image decoding apparatus 200 may include an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, an intra predictor 240, a motion compensator 250, and a filter. 260 and a reference picture buffer 270.

영상 복호화 장치(200)는 부호화기에서 출력된 비트스트림을 입력 받아 인트라 모드 또는 인터 모드로 복호화를 수행하고 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 인트라 모드인 경우 스위치가 인트라로 전환되고, 인터 모드인 경우 스위치가 인터로 전환될 수 있다. 영상 복호화 장치(200)는 입력 받은 비트스트림으로부터 복원된 잔여 블록(residual block)을 얻고 예측 블록을 생성한 후 복원된 잔여 블록과 예측 블록을 더하여 재구성된 블록, 즉 복원 블록을 생성할 수 있다.The image decoding apparatus 200 may receive a bitstream output from the encoder and perform decoding in an intra mode or an inter mode, and output a reconstructed image, that is, a reconstructed image. In the intra mode, the switch may be switched to intra, and in the inter mode, the switch may be switched to inter. The image decoding apparatus 200 may generate a reconstructed block, that is, a reconstructed block by obtaining a residual block reconstructed from the received bitstream, generating a prediction block, and adding the reconstructed residual block and the prediction block.


엔트로피 복호화부(210)는, 입력된 비트스트림을 확률 분포에 따라 엔트로피 복호화하여, 양자화된 계수(quantized coefficient) 형태의 심볼을 포함한 심볼들을 생성할 수 있다. 엔트로피 복호화 방법은 상술한 엔트로피 부호화 방법과 유사하다.The entropy decoder 210 may entropy decode the input bitstream according to a probability distribution to generate symbols including symbols in the form of quantized coefficients. The entropy decoding method is similar to the entropy coding method described above.

엔트로피 복호화 방법이 적용되는 경우, 높은 발생 확률을 갖는 심볼에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 각 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 복호화 방법을 통해서 영상 복호화의 압축 성능이 높아질 수 있다. When the entropy decoding method is applied, a small number of bits are allocated to a symbol having a high probability of occurrence and a large number of bits are allocated to a symbol having a low probability of occurrence, whereby the size of the bit string for each symbol is increased. Can be reduced. Therefore, the compression performance of image decoding can be improved through an entropy decoding method.


양자화된 계수는 역양자화부(220)에서 역양자화되고 역변환부(230)에서 역변환되며, 양자화된 계수가 역양자화/역변환 된 결과, 복원된 잔여 블록(residual block)이 생성될 수 있다. The quantized coefficients are inversely quantized by the inverse quantizer 220 and inversely transformed by the inverse transformer 230, and as a result of the inverse quantization / inverse transformation of the quantized coefficients, a reconstructed residual block may be generated.

인트라 모드인 경우, 인트라 예측부(240)는 현재 블록 주변의 이미 부호화된 블록의 화소값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다. 인터 모드인 경우, 움직임 보상부(250)는 부호화기로부터 전송받은 움직임 정보 및 참조 영상 버퍼(270)에 저장되어 있는 참조 영상을 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the intra mode, the intra predictor 240 may generate a predictive block by performing spatial prediction using pixel values of an already encoded block around the current block. In the inter mode, the motion compensator 250 may generate a prediction block by performing motion compensation using the motion information received from the encoder and the reference image stored in the reference image buffer 270.

복호화기는 화면 간 조명 변화에 의한 화질 열화를 방지하기 위해 가중치 예측 기술, 지역적 조명 변화 기술 등의 오차 보상 기술을 사용할 수 있다. 조명 변화에 의한 오차를 보상하기 위한 방법은 도 1의 실시예에서 상술한 바 있다.The decoder may use an error compensation technique such as a weight prediction technique or a regional illumination change technique to prevent image degradation due to the change of illumination between screens. A method for compensating for an error caused by a change in illumination has been described above with reference to the embodiment of FIG. 1.

상술한 부호화기의 경우와 마찬가지로 복호화기도 다양한 예측 방법을 이용하여 현재 블록에 대한 예측을 수행할 수 있으며, 각각의 예측 방법은 서로 다른 예측 모드에서 적용될 수 있다. 예를 들어, 화면 간 예측에서 사용되는 예측 모드에는 생략(skip) 모드, 머지(merge) 모드, AMVP(Advanced Motion Vector Prediction) 모드 등이 있을 수 있다. 복호화기는 어떤 모드가 예측에 사용되는지에 대한 정보를 부호화기로부터 수신할 수 있다.As in the case of the above-described encoder, the decoder may perform prediction on the current block using various prediction methods, and each prediction method may be applied in different prediction modes. For example, a prediction mode used in inter prediction may include a skip mode, a merge mode, an advanced motion vector prediction (AMVP) mode, and the like. The decoder may receive information from the encoder about which mode is used for prediction.

특히 생략 모드에서 복호화기는 주변 블록으로부터 제공받은 움직임 정보를 이용하여 현재 블록의 움직임 정보를 도출함으로써 예측 블록을 생성할 수 있다. 또한 생략 모드에서는 예측 블록과 현재 블록의 잔여(residual) 신호의 값이 0일 수 있다. 따라서 복호화기는 별도의 움직임 정보 및 잔여 신호를 수신하지 않을 수 있으며, 이전에 부호화된 영역으로부터 제공받은 정보만을 이용하여 예측 블록을 생성할 수 있다. 생략 모드의 상세는 부호화기에서 상술한 바와 유사하다.In particular, in the skip mode, the decoder may generate the prediction block by deriving the motion information of the current block by using the motion information provided from the neighboring block. In addition, in the skipped mode, values of residual signals of the prediction block and the current block may be zero. Therefore, the decoder may not receive the separate motion information and the residual signal, and may generate the prediction block using only information provided from the previously encoded region. The details of the omission mode are similar to those described above in the encoder.


복원된 잔여 블록과 예측 블록은 가산기(255)를 통해 더해지고, 더해진 블록은 필터부(260)를 거친다. 필터부(260)는 디블록킹 필터, SAO, ALF 중 적어도 하나 이상을 복원 블록 또는 복원 픽쳐에 적용할 수 있다. 필터부(260)는 재구성된 영상, 즉 복원 영상을 출력한다. 복원 영상은 참조 영상 버퍼(270)에 저장되어 화면 간 예측에 사용될 수 있다.The reconstructed residual block and the prediction block are added through the adder 255, and the added block passes 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 outputs a reconstructed image, that is, a reconstructed image. The reconstructed picture may be stored in the reference picture buffer 270 to be used for inter prediction.


도 1 및 도 2의 실시예에서 상술한 생략 모드에서는 움직임 정보 및 잔여 신호가 복호화기로 전송되지 않으므로, 다른 예측 모드가 사용되는 경우에 비해 전송되는 정보량이 적을 수 있다. 따라서 율-왜곡 최적화 과정에 의해 생략 모드가 선택되는 빈도가 높으면 영상 압축 효율이 향상될 수 있다. In the skipping mode described above in the embodiments of FIGS. 1 and 2, since the motion information and the residual signal are not transmitted to the decoder, the amount of information transmitted may be smaller than in the case where other prediction modes are used. Therefore, if the frequency of selecting the skip mode is high by the rate-distortion optimization process, the image compression efficiency may be improved.

생략 모드에서 부호화기 및 복호화기는 이전 부호화/복호화된 영역의 정보만을 사용하여 예측을 수행한다. 생략 모드에서는 주변 블록의 움직임 정보, 참조 블록의 화소값만으로 예측이 수행되므로, 율-왜곡 최적화(rate-distortion optimization) 측면에서 다른 모드와 비교할 때, 부호화에 필요한 율(rate)은 최소이나 왜곡(distortion)은 클 수 있다. 화면 간 조명 변화가 심한 영상의 경우에는 화면 간 왜곡이 매우 크기 때문에, 생략 모드가 현재 블록의 최적 예측 모드로 선택될 가능성이 낮아질 수 있다. 또한 부호화/복호화가 저비트율로 수행되는 경우, 즉 큰 양자화 스텝(quantization step)을 이용하여 양자화/역양자화가 수행되는 경우에도 화면 간 왜곡이 커지므로, 생략 모드가 현재 블록의 최적 예측 모드로 선택될 가능성이 낮아질 수 있다.In the skipped mode, the encoder and the decoder perform prediction using only the information of the previous encoded / decoded region. In the skipped mode, prediction is performed using only motion information of neighboring blocks and pixel values of a reference block. Therefore, when compared with other modes in terms of rate-distortion optimization, the rate required for encoding is minimal or distortion ( distortion can be large. Since the distortion between the screens is very large in the case of an image with a large lighting change between screens, the possibility that the skip mode is selected as the optimal prediction mode of the current block may be lowered. In addition, when encoding / decoding is performed at a low bit rate, that is, even when quantization / dequantization is performed using a large quantization step, the inter-screen distortion increases, so the skip mode is selected as the optimal prediction mode of the current block. Can be less likely.

생략 모드를 제외한 다른 화면 간 예측 모드에서 지역적 조명 변화 보상 등이 사용되는 경우, 생략 모드가 아닌 예측 모드가 적용되는 블록들에 대해서는, 조명 변화를 고려한 오차 보상 예측이 수행된다. 또한 상기 블록들의 움직임 벡터 도출에 있어서도 오차 보상이 반영될 수 있다. 이 때, 현재 블록에 대해 생략 모드로 부호화가 수행되는 경우를 가정하면, 주변 블록으로부터 얻어진 움직임 벡터 값들은 오차 보상이 반영된 값들일 수 있고 상기 주변 블록들은 0이 아닌 DC 오프셋 값을 가질 수 있다. 그러나, 생략 모드에서는 별도의 움직임 보상 없이 참조 블록의 화소값이 그대로 현재 블록 화소의 예측값으로 사용되므로, 예측값에 오차 보상이 반영될 수 없다. 이 경우, 생략 모드에서 화면 간 왜곡이 커질 가능성이 높아진다. 따라서 생략 모드를 제외한 다른 화면 간 예측 모드에서 조명 변화를 반영하기 위해 MRSAD(Mean-Removed Sum of Absolute Difference) 등의 오차 보상이 사용되는 경우, 생략 모드가 현재 블록의 최적 예측 모드로 선택될 가능성이 더 낮아질 수 있다. When local illumination change compensation is used in another inter prediction mode except the omission mode, error compensation prediction considering the illumination change is performed on blocks to which the prediction mode other than the omission mode is applied. In addition, error compensation may be reflected in deriving the motion vector of the blocks. In this case, assuming that encoding is performed in a skipped mode for the current block, motion vector values obtained from neighboring blocks may be values reflecting error compensation, and the neighboring blocks may have a DC offset value other than zero. However, in the skipped mode, since the pixel value of the reference block is used as the prediction value of the current block pixel without additional motion compensation, error compensation cannot be reflected in the prediction value. In this case, there is a high possibility that the distortion between the screens increases in the skipped mode. Therefore, if error compensation such as Mean-Removed Sum of Absolute Difference (MRSAD) is used to reflect the lighting change in other inter prediction modes except skip mode, the skip mode is likely to be selected as the optimal prediction mode of the current block. Can be lowered.

따라서 최적의 예측 모드로 생략 모드가 선택되는 비율을 증가시키기 위해, 오차 보상을 이용한 생략 모드 예측 방법이 제공될 수 있다.Therefore, in order to increase the rate at which the skip mode is selected as the optimal prediction mode, a skip mode prediction method using error compensation may be provided.


도 3은 본 발명의 실시예에 따른, 오차 보상을 이용한 생략 모드 예측 방법을 개략적으로 나타내는 흐름도이다. 도 3의 실시예에서 부호화기 및 복호화기는 생략 모드에서 현재 블록에 대한 예측을 수행한다. 일 실시예로 도 3의 실시예에 따른 예측은 부호화기 및 복호화기의 인트라 예측부, 움직임 예측부 및/또는 움직임 보상부에서 수행될 수 있다. 3 is a flowchart schematically illustrating a skip mode prediction method using error compensation according to an exemplary embodiment of the present invention. In the embodiment of FIG. 3, the encoder and the decoder perform prediction on the current block in the skipped mode. As an example, prediction according to the embodiment of FIG. 3 may be performed by an intra predictor, a motion predictor, and / or a motion compensator of the encoder and the decoder.

이하, 본 발명의 실시예들은 부호화기 및 복호화기에 동일하게 적용될 수 있으며, 실시예들은 복호화기를 중심으로 서술된다. 부호화기에서는, 후술되는 이전에 복호화된 블록이 아닌, 이전에 부호화된 블록이 현재 블록의 예측에 사용될 수 있다. 이전에 부호화된 블록은 현재 블록에 대한 예측 및/또는 부호화 수행 전에 부호화된 블록을 의미하고, 이전에 복호화된 블록은 현재 블록에 대한 예측 및/또는 복호화 수행 전에 복호화된 블록을 의미할 수 있다.Hereinafter, embodiments of the present invention can be equally applied to an encoder and a decoder, and embodiments are described with reference to a decoder. In the encoder, previously encoded blocks, rather than previously decoded blocks, described below, may be used for prediction of the current block. The previously encoded block may mean a block encoded before performing prediction and / or encoding on the current block, and the previously decoded block may mean a block decoded before performing prediction and / or decoding on the current block.

도 3을 참조하면, 복호화기는 이전에 복호화된 블록들로부터 현재 블록에 대한 예측 블록의 화소값을 도출한다(S310). 예측 블록은 현재 블록에 대한 예측 수행 결과 생성된 블록을 의미한다.Referring to FIG. 3, the decoder derives pixel values of a prediction block for a current block from previously decoded blocks (S310). The prediction block refers to a block generated as a result of performing prediction on the current block.

복호화기는 이전에 복호화된 블록들의 움직임 정보를 이용하여 현재 블록에 대한 움직임 정보를 도출할 수 있다. 움직임 정보가 도출되면, 이를 이용하여 참조 영상 내 참조 블록의 화소(pixel)값을 도출할 수 있다. 도 3의 실시예에서 복호화기는 생략 모드에서 예측을 수행하므로, 참조 블록의 화소값이 예측 블록의 화소값이 될 수 있다. 참조 블록은 1개일 수 있고, 2개 이상일 수도 있다. 참조 블록이 2개 이상인 경우, 복호화기는 각각의 참조 블록을 별개로 이용하여 2개 이상의 예측 블록을 생성할 수도 있고, 2 이상 참조 블록의 화소값들의 가중치 합을 이용하여 현재 블록에 대한 예측 블록의 화소값을 도출할 수도 있다. 이 때, 예측 블록은 움직임 예측 블록으로도 불릴 수 있다.The decoder may derive motion information for the current block by using motion information of previously decoded blocks. Once the motion information is derived, a pixel value of the reference block in the reference image may be derived using the motion information. In the embodiment of FIG. 3, since the decoder performs prediction in the skipped mode, the pixel value of the reference block may be the pixel value of the prediction block. There may be one reference block or two or more reference blocks. When there are two or more reference blocks, the decoder may generate two or more prediction blocks by using each reference block separately, and use the weighted sum of the pixel values of the two or more reference blocks to determine the prediction block for the current block. It is also possible to derive the pixel value. In this case, the prediction block may also be called a motion prediction block.

복호화기는 현재 블록에 대한 오차 보상 블록의 샘플(sample)값을 도출한다(S320). 오차 보상 블록은 예측 블록과 동일한 크기를 가질 수 있다. 이하, 오차 보상 값은 오차 보상 블록의 샘플값과 동일한 의미를 가진다.The decoder derives a sample value of the error compensation block for the current block (S320). The error compensation block may have the same size as the prediction block. Hereinafter, the error compensation value has the same meaning as the sample value of the error compensation block.

복호화기는 현재 블록의 주변 블록에 포함된 정보 및/또는 현재 블록의 주변 블록에 포함된 오차 파라미터 등을 이용하여, 현재 블록의 오차 모델에 대한 오차 파라미터를 도출할 수 있다. 오차 파라미터가 도출되면, 복호화기는 오차 모델 정보 및 도출된 오차 파라미터 정보를 이용하여 현재 블록에 대한 오차 보상 값을 도출할 수 있다. 이 때 복호화기는, 참조 블록이 2개 이상이면, 움직임 정보 등을 오차 파라미터 정보 및 오차 모델 정보와 함께 이용하여 오차 보상 값을 도출할 수도 있다.The decoder may derive an error parameter for an error model of the current block by using information included in a neighboring block of the current block and / or an error parameter included in a neighboring block of the current block. When the error parameter is derived, the decoder may derive an error compensation value for the current block by using the error model information and the derived error parameter information. In this case, if there are two or more reference blocks, the decoder may derive an error compensation value using motion information and the like together with the error parameter information and the error model information.

복호화기는 예측 블록의 화소값과 오차 보상 값을 이용하여 현재 블록에 대한 최종 예측 블록의 화소값을 도출한다(S330). 최종 예측 블록의 화소값 도출 방법은 참조 블록의 개수 또는 현재 영상의 부호화/복호화 방식에 따라 달라질 수 있다.The decoder derives the pixel value of the last prediction block for the current block by using the pixel value and the error compensation value of the prediction block (S330). The pixel value derivation method of the final prediction block may vary depending on the number of reference blocks or the encoding / decoding method of the current image.

상술한 도 3의 실시예의 각 단계에 대한 상세는 후술한다.Details of each step of the embodiment of FIG. 3 described above will be described later.


도 4는 본 발명의 실시예에 따른 예측 블록의 화소값 도출 방법을 개략적으로 나타내는 흐름도이다. 4 is a flowchart schematically illustrating a method of deriving pixel values of a prediction block according to an embodiment of the present invention.

도 4를 참조하면, 복호화기는 이전에 복호화된 블록들로부터 현재 블록에 대한 움직임 정보를 도출한다(S410). 상기 움직임 정보는 현재 블록에 대한 예측 블록의 화소값 도출에 사용될 수 있다.Referring to FIG. 4, the decoder derives motion information for the current block from previously decoded blocks (S410). The motion information may be used to derive the pixel value of the prediction block for the current block.

복호화기는 현재 블록에 대한 주변 블록의 움직임 정보들로부터 움직임 정보를 도출할 수 있다. 이 때, 주변 블록은 현재 영상 내에 존재하는 블록으로서, 이전에 이미 복호화된 블록이다. 복호화기는 1개의 움직임 정보를 도출할 수도 있고, 2개 이상의 움직임 정보를 도출할 수도 있다. 움직임 정보가 2개 이상인 경우, 움직임 정보의 개수에 따라 2개 이상의 참조 블록이 현재 블록의 예측에 사용될 수 있다. The decoder may derive the motion information from the motion information of the neighboring block for the current block. In this case, the neighboring block is a block existing in the current image, and is a block previously decoded. The decoder may derive one piece of motion information or may derive two or more pieces of motion information. If there is two or more pieces of motion information, two or more reference blocks may be used for prediction of the current block according to the number of motion information.

복호화기는 현재 블록에 대한 주변 블록의 움직임 정보만이 아니라, 참조 영상 내 동일 위치 블록(collocated block)에 대한 주변 블록의 움직임 정보들을 함께 이용하여 움직임 정보를 도출할 수도 있다. 이 때, 부호화기는 1개 또는 2개 이상의 움직임 정보를 도출할 수 있다. 움직임 정보가 2개 이상인 경우, 움직임 정보의 개수에 따라 2개 이상의 참조 블록이 현재 블록의 예측에 사용될 수 있다.The decoder may derive the motion information using not only the motion information of the neighboring block with respect to the current block but also the motion information of the neighboring block with respect to the collocated block in the reference picture. In this case, the encoder may derive one or two or more pieces of motion information. If there is two or more pieces of motion information, two or more reference blocks may be used for prediction of the current block according to the number of motion information.

복호화기는 상술한 방법들 중 적어도 하나를 이용하여 움직임 정보를 도출할 수 있으며, 상기 경우들에 대한 움직임 정보 도출 방법의 상세는 후술한다.The decoder may derive the motion information using at least one of the above-described methods, and details of the motion information derivation method for the above cases will be described later.


복호화기는 도출된 움직임 정보를 이용하여 예측 블록의 화소값을 도출한다(S420). The decoder derives pixel values of the prediction block by using the derived motion information (S420).

생략 모드에서는 참조 블록과 현재 블록의 잔여(residual) 신호의 값이 0이고, 참조 블록이 1개일 때에는 참조 영상 내 참조 블록의 화소값이 그대로 현재 블록에 대한 예측 블록의 화소값이 될 수 있다. In the skipped mode, when the values of the residual signals of the reference block and the current block are 0 and there is one reference block, the pixel values of the reference block in the reference image may be the pixel values of the prediction block with respect to the current block.

참조 블록은, 현재 블록에 대한 참조 영상 내 동일 위치 블록(collocated block)이 움직임 벡터의 값만큼 이동된 블록일 수 있다. 이 때, 현재 블록에 대한 예측 블록의 화소값은, 참조 영상 내에서 예측 블록과 동일한 위치에 있는 블록이 움직임 벡터의 값만큼 이동된 블록, 즉 참조 블록의 화소값일 수 있다. 현재 블록에 대한 예측 블록의 화소값은 다음 수학식 1과 같이 나타내어질 수 있다.The reference block may be a block in which a co-located block in the reference image with respect to the current block is moved by the value of the motion vector. In this case, the pixel value of the prediction block for the current block may be a block in which a block located at the same position as the prediction block in the reference image is moved by the value of the motion vector, that is, the pixel value of the reference block. The pixel value of the prediction block with respect to the current block may be expressed as in Equation 1 below.

[수학식 1][Equation 1]

Pcur(t0, X, Y) = Pref(X+MV(x), Y+MV(y))P cur (t0, X, Y) = P ref (X + MV (x), Y + MV (y))


여기서, Pcur는 현재 블록에 대한 예측 블록의 화소값, Pref는 참조 블록의 화소값을 나타낸다. X는 현재 블록 내 화소의 x축 방향의 좌표, Y는 현재 블록 내 화소의 y축 방향의 좌표를 나타낸다. 또한 MV(x)는 움직임 벡터의 x축 방향 크기를 나타내고 MV(y)는 움직임 벡터의 y축 방향 크기를 나타낸다.Here, P cur denotes a pixel value of the prediction block with respect to the current block, and P ref denotes a pixel value of the reference block. X represents coordinates in the x-axis direction of the pixel in the current block, and Y represents coordinates in the y-axis direction of the pixel in the current block. In addition, MV (x) represents the magnitude of the motion vector in the x-axis direction and MV (y) represents the magnitude of the motion vector in the y-axis direction.

참조 블록이 2개 이상일 때에는, 참조 블록들의 화소값의 가중치 합을 이용하여, 현재 블록에 대한 예측 블록의 화소값을 도출할 수 있다. 즉, N개의 참조 블록이 예측 블록 생성에 사용되는 경우, N개 참조 블록의 화소값의 가중치 합이 예측 블록의 화소값이 될 수 있다. 참조 블록이 N개일 때 도출된 현재 블록에 대한 움직임 정보가 {{ref_idx1, MV1}, {ref_idx2, MV2}, … , {ref_idxn, MVn}}으로 표현되는 경우, i번째 움직임 정보에 대응하는 참조 블록만을 이용하여 도출되는 예측 블록의 화소값은 다음 수학식 2과 같이 나타내어질 수 있다.When there are two or more reference blocks, the pixel value of the prediction block for the current block may be derived by using the weighted sum of the pixel values of the reference blocks. That is, when N reference blocks are used to generate the prediction block, the weighted sum of the pixel values of the N reference blocks may be the pixel value of the prediction block. The motion information for the current block derived when there are N reference blocks is {{ref_idx1, MV1}, {ref_idx2, MV2},... , {ref_idxn, MVn}}, the pixel value of the prediction block derived using only the reference block corresponding to the i-th motion information may be represented by Equation 2 below.

[수학식 2][Equation 2]

Pcur_ref_i(t0, X, Y) = Pref_i(X+MVi(x), Y+MVi(y))P cur_ref_i (t0, X, Y) = P ref_i (X + MV i (x), Y + MV i (y))


여기서, Pcur_ref_i는 i번째 움직임 정보에 대응하는 참조 블록만을 이용하여 도출된 예측 블록의 화소값, Pref_i는 i번째 움직임 정보에 대응하는 참조 블록의 화소값을 나타낸다. 또한 MVi(x)는 i번째 움직임 벡터의 x축 방향 크기를 나타내고 MVi(y)는 i번째 움직임 벡터의 y축 방향 크기를 나타낸다.Here, P cur_ref_i denotes a pixel value of the prediction block derived using only the reference block corresponding to the i-th motion information, and P ref_i denotes a pixel value of the reference block corresponding to the i-th motion information. In addition, MV i (x) represents the magnitude in the x-axis direction of the i-th motion vector and MV i (y) represents the magnitude in the y-axis direction of the i-th motion vector.

이 때, N개의 참조 블록의 화소값들의 가중치 합에 의해 도출되는, 현재 블록에 대한 예측 블록의 화소값은 다음 수학식 3과 같이 나타내어질 수 있다.In this case, the pixel value of the prediction block for the current block, which is derived by the weighted sum of the pixel values of the N reference blocks, may be expressed as in Equation 3 below.

[수학식 3][Equation 3]

Figure PCTKR2011007263-appb-I000001
Figure PCTKR2011007263-appb-I000001


여기서, Pcur_ref는 현재 블록에 대한 예측 블록의 화소값을 나타내고, wi는 i번째 움직임 정보에 대응하는 참조 블록의 화소값에 적용되는 가중치를 나타낸다. 이 때, 상기 가중치들의 합은 1일 수 있다. 일 실시예로, 2개의 참조 블록이 사용되는 쌍예측에서, N=2일 때 w1=1/2, w2=1/2일 수 있다.Here, P cur_ref represents a pixel value of the prediction block for the current block, and w i represents a weight applied to the pixel value of the reference block corresponding to the i-th motion information. In this case, the sum of the weights may be 1. In one embodiment, in pair prediction where two reference blocks are used, w 1 = 1/2 and w 2 = 1/2 when N = 2.

상술한 수학식 3의 실시예에서, 각각의 참조 블록의 화소값에 적용되는 가중치들은, 미리 정해진 고정된 값이 사용될 수 있다. 또한 각각의 가중치들은, 그 가중치가 적용되는 참조 블록이 포함된 참조 영상과 현재 영상의 거리에 따라 달리 설정될 수도 있다. 또한 각각의 가중치들은, 예측 블록 내 화소의 공간적 위치에 따라 달리 설정될 수도 있다. 상기 예측 블록 내 화소의 공간적 위치는, 현재 블록 내에서 현재 예측되는 화소의 공간적 위치와 동일할 수 있다. 가중치들이 예측 블록 내 화소의 공간적 위치에 따라 달리 설정되는 경우, 현재 블록에 대한 예측 블록의 화소값은 다음 수학식 4와 같이 나타내어질 수 있다.In the above-described embodiment of Equation 3, the weights applied to the pixel values of each reference block may use a predetermined fixed value. In addition, each weight may be set differently according to the distance between the reference picture including the reference block to which the weight is applied and the current picture. In addition, the respective weights may be set differently according to the spatial position of the pixel in the prediction block. The spatial position of the pixel in the prediction block may be the same as the spatial position of the pixel currently predicted in the current block. When the weights are set differently according to the spatial position of the pixel in the prediction block, the pixel value of the prediction block with respect to the current block may be expressed as in Equation 4 below.

[수학식 4][Equation 4]

Figure PCTKR2011007263-appb-I000002
Figure PCTKR2011007263-appb-I000002


여기서, 가중치 wi(X,Y)는 i번째 움직임 정보에 대응하는 참조 블록의 화소값에 적용되는 가중치이다. 수학식 4를 참조하면, 가중치 wi(X,Y)는 예측 블록 내 화소의 좌표 (X,Y)에 따라 서로 다른 값을 가질 수 있다.Here, the weight w i (X, Y) is a weight applied to the pixel value of the reference block corresponding to the i-th motion information. Referring to Equation 4, the weight w i (X, Y) may have different values according to the coordinates (X, Y) of the pixels in the prediction block.

복호화기는, 도출된 움직임 정보를 이용하여 예측 블록의 화소값을 도출함에 있어, 상술한 방법들 중 적어도 하나를 이용할 수 있다.The decoder may use at least one of the aforementioned methods in deriving a pixel value of the prediction block using the derived motion information.


도 5는 도 4의 실시예에서의 움직임 정보 도출시에 사용되는, 현재 블록에 대한 주변 블록의 실시예를 개략적으로 나타내는 개념도이다. 현재 블록에 대한 주변 블록은 현재 영상 내의 블록으로서, 이전에 이미 복호화된 블록이다.FIG. 5 is a conceptual diagram schematically illustrating an embodiment of a neighboring block with respect to a current block, which is used when deriving motion information in the embodiment of FIG. 4. The neighboring block for the current block is a block in the current image, which is a block previously decoded previously.

움직임 정보는 현재 블록에 대한 참조 블록의 위치에 관한 정보를 포함할 수 있다. 복호화기는 1개의 움직임 정보를 도출할 수도 있고, 2개 이상의 움직임 정보를 도출할 수도 있다. 움직임 정보가 2개 이상인 경우, 움직임 정보의 개수에 따라 2개 이상의 참조 블록이 현재 블록의 예측에 사용될 수 있다.The motion information may include information about the position of the reference block with respect to the current block. The decoder may derive one piece of motion information or may derive two or more pieces of motion information. If there is two or more pieces of motion information, two or more reference blocks may be used for prediction of the current block according to the number of motion information.

도 5의 실시예를 참조하면, 복호화기는 블록A, 블록B, 블록C의 움직임 정보를 사용하여 현재 블록에 대한 움직임 정보를 도출할 수 있다. 일 실시예로 복호화기는 참조 영상 리스트에 포함된 영상 중, 현재 블록이 포함된 영상과 시간축으로 가장 가까운 영상을 참조 영상으로 선택할 수 있다. 이 때, 복호화기는 블록A, 블록B, 블록C의 움직임 정보 중 상기 선택된 참조 영상을 지시하는 움직임 정보들만을 선택하여 현재 블록의 움직임 정보 도출에 사용할 수도 있다. 복호화기는 수평 및 수직 성분에 대해 선택된 움직임 정보의 중간값(median)을 구할 수 있으며, 이 경우, 그 중간값이 현재 블록의 움직임 벡터일 수 있다. Referring to the embodiment of FIG. 5, the decoder may derive motion information for the current block using motion information of blocks A, B, and C. According to an embodiment, the decoder may select, as a reference image, an image that is closest in time axis to an image including a current block among the images included in the reference image list. In this case, the decoder may select only the motion information indicating the selected reference image among the motion information of the block A, the block B, and the block C, and use the same to derive the motion information of the current block. The decoder can obtain the median of the selected motion information for the horizontal and vertical components, in which case the median can be the motion vector of the current block.

현재 블록의 움직임 정보 도출에 사용되는 주변 블록의 위치 및 개수는 상기 실시예에 한하지 않으며, 구현에 따라 도 5의 실시예와 다른 다양한 위치와 개수의 주변 블록들이 움직임 정보 도출에 사용될 수 있다.The position and number of neighboring blocks used for deriving the motion information of the current block are not limited to the above-described embodiments, and various positions and numbers of neighboring blocks different from the embodiment of FIG. 5 may be used to derive the motion information according to the implementation.

상기 주변 블록에 대한 움직임 정보는 머지(merge) 방법으로 부호화/복호화된 정보일 수 있다. 머지 모드에서 복호화기는 현재 블록의 머지 인덱스(merge idx)가 지시하는 블록에 포함된 움직임 정보를, 현재 블록의 움직임 정보로 사용할 수 있다. 따라서 주변 블록이 머지 모드에서 부호화/복호화된 경우, 상기 실시예에 따른 움직임 정보 도출 방법은, 머지 방법에 의해 상기 주변 블록의 움직임 정보를 도출하는 과정을 추가로 포함할 수 있다.The motion information on the neighboring block may be information encoded / decoded by a merge method. In the merge mode, the decoder may use the motion information included in the block indicated by the merge index (merge idx) of the current block, as the motion information of the current block. Therefore, when the neighboring block is encoded / decoded in the merge mode, the motion information deriving method according to the embodiment may further include deriving motion information of the neighboring block by the merge method.


도 6은 도 4의 실시예에서의 움직임 정보 도출시에 사용되는, 현재 블록의 주변 블록 및 참조 영상 내 동일 위치 블록의 주변 블록의 실시예를 개략적으로 나타내는 개념도이다. FIG. 6 is a conceptual diagram schematically illustrating an embodiment of a neighboring block of a current block and a neighboring block of the same position block in a reference image, which are used when deriving motion information in the embodiment of FIG. 4.

도 4의 실시예에서 상술한 바와 같이, 복호화기는 현재 블록에 대한 주변 블록의 움직임 정보만이 아니라, 참조 영상 내 동일 위치 블록에 대한 주변 블록의 움직임 정보들을 함께 이용하여 움직임 정보를 도출할 수 있다.As described above in the embodiment of FIG. 4, the decoder may derive the motion information using not only the motion information of the neighboring block for the current block but also the motion information of the neighboring block for the same position block in the reference image. .

도 6을 참조하면, 참조 영상 내의 블록들은 모두 이미 복호화된 블록일 수 있다. 따라서 참조 영상 내 동일 위치 블록 주변의 모든 블록이, 현재 블록의 움직임 정보 도출에 사용되는 블록으로 선택될 수 있다. 현재 블록에 대한 주변 블록은 현재 영상 내의 블록으로서, 이전에 이미 복호화된 블록이다.Referring to FIG. 6, all blocks in a reference picture may be blocks that have already been decoded. Therefore, all blocks around the same location block in the reference image may be selected as a block used for deriving motion information of the current block. The neighboring block for the current block is a block in the current image, which is a block previously decoded.

현재 블록의 움직임 정보를 도출하기 위해, 일 실시예로 상기 블록들의 중간값(median)이 사용될 수 있다. 또한 현재 블록의 움직임 정보를 도출하기 위해 움직임 벡터 경쟁(motion vector competition) 방법이 사용될 수도 있다. 움직임 벡터 경쟁 방법에서 움직임 정보 예측 부호화가 수행되는 경우에는, 복수 개의 예측 후보들이 사용될 수 있다. 복호화기는 복수의 예측 후보들 중 율 제어 비용 측면을 고려하여 최적의 예측 후보를 선택하고, 상기 선택된 예측 후보를 사용하여 움직임 정보 예측 부호화를 수행할 수 있다. 이 때, 복수 개의 예측 후보들 중 어떤 후보가 선택이 되는지에 대한 정보가 추가로 필요할 수 있다. 움직임 벡터 경쟁 방법에는, 예를 들어 AMVP(Adavanced Motion Vector Prediction) 등이 있을 수 있다.In order to derive the motion information of the current block, in one embodiment, the median of the blocks may be used. In addition, a motion vector competition method may be used to derive motion information of the current block. When motion information prediction encoding is performed in the motion vector competition method, a plurality of prediction candidates may be used. The decoder may select an optimal prediction candidate in consideration of rate control cost among a plurality of prediction candidates, and perform motion information prediction encoding using the selected prediction candidate. In this case, information about which candidate is selected from among the plurality of prediction candidates may be further needed. The motion vector competition method may include, for example, an AVP (Adavanced Motion Vector Prediction).


도 7은 본 발명의 실시예에 따른 오차 보상 값 도출 방법을 개략적으로 나타내는 흐름도이다. 7 is a flowchart schematically illustrating a method for deriving an error compensation value according to an embodiment of the present invention.

도 7을 참조하면, 복호화기는 현재 블록의 오차 모델에 대한 오차 파라미터를 도출한다(S710). Referring to FIG. 7, the decoder derives an error parameter for an error model of a current block (S710).


본 발명의 실시예에 따른 오차 보상 값을 도출하기 위해, 현재 블록과 참조 블록 간의 오차를 모델링(modeling)하여 얻어진 오차 모델이 사용될 수 있다. 현재 블록의 오차 보상에 사용되는 오차 모델에는 다양한 유형이 있을 수 있으며, 예를 들어 0차 오차 모델, 1차 오차 모델, N차 오차 모델, 비선형 오차 모델 등이 있을 수 있다.In order to derive an error compensation value according to an embodiment of the present invention, an error model obtained by modeling an error between a current block and a reference block may be used. There may be various types of error models used for error compensation of the current block, for example, there may be a zero-order error model, a first-order error model, an N-order error model, and a nonlinear error model.

0차 오차 모델의 오차 보상 값은, 일 실시예로 다음 수학식 5에 의해 나타내어질 수 있다.The error compensation value of the zero-order error model may be represented by Equation 5 according to an embodiment.

[수학식 5][Equation 5]

오차 보상 값(x,y) = bError compensation value (x, y) = b


여기서, (x,y)는 현재 블록 내의 예측 대상 화소의 좌표이다. b는 DC 오프셋(DC offset)으로, 0차 오차 모델의 오차 파라미터에 해당한다. 0차 오차 모델을 이용하여 오차 보상이 수행되는 경우, 복호화기는 예측 블록의 화소값과 오차 보상 값을 이용하여 최종 예측 블록의 화소값을 도출할 수 있다. 이는 다음 수학식 6에 의해 나타내어질 수 있다.Here, (x, y) is the coordinate of the prediction target pixel in the current block. b is a DC offset and corresponds to an error parameter of the 0th order error model. When error compensation is performed using the zero-order error model, the decoder may derive the pixel value of the final prediction block by using the pixel value of the prediction block and the error compensation value. This can be represented by the following equation (6).

[수학식 6][Equation 6]

최종 예측 블록의 화소값(x,y) = 예측 블록의 화소값(x,y) + bPixel value (x, y) of the final prediction block = Pixel value (x, y) of the prediction block + b


1차 오차 모델의 오차 보상 값은, 일 실시예로 다음 수학식 7에 의해 나타내어질 수 있다.The error compensation value of the first order error model may be represented by Equation 7 according to one embodiment.

[수학식 7][Equation 7]

오차 보상 값(x,y) = (a-1)*예측 블록의 화소값(x,y) + bError compensation value (x, y) = (a-1) * pixel value of prediction block (x, y) + b


여기서, a와 b는 1차 오차 모델의 오차 파라미터에 해당한다. 1차 오차 모델이 사용되는 경우, 복호화기는 오차 파라미터 a와 b를 구한 후 보상을 수행한다. 1차 오차 모델을 이용하여 오차 보상이 수행되는 경우에 도출되는 최종 예측 블록의 화소값은 다음 수학식 8에 의해 나타내어질 수 있다.Here, a and b correspond to error parameters of the first order error model. When the first order error model is used, the decoder calculates the error parameters a and b and then performs compensation. The pixel value of the final prediction block derived when error compensation is performed using the first order error model may be represented by Equation (8).

[수학식 8][Equation 8]

최종 예측 블록의 화소값(x,y) Pixel value of the last prediction block (x, y)

= 예측 블록의 화소값(x,y) + 오차 보상 값(x,y)= Pixel value (x, y) of the prediction block + error compensation value (x, y)

= a*예측 블록의 화소값(x,y) + b= a * pixel value of the prediction block (x, y) + b


N차 오차 모델의 오차 보상 값과 최종 예측 블록의 화소값은, 일 실시예로 다음 수학식 9에 의해 나타내어질 수 있다.The error compensation value of the N-th order error model and the pixel value of the final prediction block may be represented by Equation 9 according to an embodiment.

[수학식 9][Equation 9]

오차 보상 값(x,y) = an*P(x,y)n + an-1*P(x,y)n-1 +…+ (a-1)P(x,y) + bError compensation value (x, y) = a n * P (x, y) n + a n-1 * P (x, y) n-1 +... + (a-1) P (x, y) + b

최종 예측 블록의 화소값(x,y) Pixel value of the last prediction block (x, y)

= 예측 블록의 화소값(x,y) + 오차 보상 값(x,y)= Pixel value (x, y) of the prediction block + error compensation value (x, y)

= an*P(x,y)n + an-1*P(x,y)n-1 +…+ a*P(x,y) + b= a n * P (x, y) n + a n-1 * P (x, y) n-1 +... + a * P (x, y) + b


여기서, P는 현재 블록에 대한 예측 블록의 화소값을 의미한다.Here, P means the pixel value of the prediction block for the current block.

복호화기는 기타 비선형 오차 모델을 이용할 수도 있다. 이 때, 오차 보상 값은 일 실시예로 다음 수학식 10에 의해 나타내어질 수 있다.The decoder may use other nonlinear error models. In this case, the error compensation value may be represented by the following Equation 10 in one embodiment.

[수학식 10][Equation 10]

오차 보상 값(x,y) = f(P(x,y))Error Compensation Value (x, y) = f (P (x, y))


여기서 f는 선형이 아닌 임의의 함수일 수 있다.Where f may be any function that is not linear.

현재 블록 내에서 사용되는 오차 파라미터들은 상기 실시예들에서 상술한 바와 같이 모두 동일한 값일 수 있다. 그러나, 현재 블록 내의 예측 대상 화소의 위치에 따라 서로 다른 오차 파라미터가 사용될 수도 있다. 복호화기는 동일한 오차 파라미터를 사용하여 도출한 오차 보상 값에, 현재 블록 내 예측 대상 화소의 공간적 위치에 따라, 가중치를 적용하여 최종 오차 보상 값을 도출할 수도 있다. 이 때, 최종 오차 보상 값은 예측 대상 화소의 현재 블록 내 위치에 따라 달라질 수 있다. 상기 최종 오차 보상 값은 다음 수학식 11에 의해 나타내어질 수 있다.The error parameters used in the current block may all be the same value as described above in the above embodiments. However, different error parameters may be used according to the position of the prediction target pixel in the current block. The decoder may derive the final error compensation value by applying a weight to an error compensation value derived using the same error parameter according to the spatial position of the pixel to be predicted in the current block. In this case, the final error compensation value may vary according to the position in the current block of the prediction target pixel. The final error compensation value can be represented by the following equation (11).

[수학식11][Equation 11]

최종 오차 보상 값(x,y) = 동일 오차 파라미터를 사용하여 도출된 오차 보상 값(x,y) * w(x,y)Final error compensation value (x, y) = error compensation value derived using the same error parameter (x, y) * w (x, y)


여기서 w는 가중치를 의미한다.Where w means weight.


복호화기는 현재 블록의 오차 모델에 따라 오차 파라미터를 도출할 수 있다. 오차 파라미터 도출 단계에서 현재 블록의 실제 화소값은 복호화기가 구할 수 없으므로, 현재 블록의 주변 블록에 포함된 정보를 이용하여, 현재 블록에 대한 오차 모델의 오차 파라미터를 도출할 수 있다. 여기서, 현재 블록의 주변 블록은 현재 블록에 인접한 주변 블록으로서, 이전에 부호화된 블록을 의미한다.The decoder may derive the error parameter according to the error model of the current block. Since the decoder cannot obtain the actual pixel value of the current block in the error parameter deriving step, an error parameter of the error model for the current block may be derived using information included in a neighboring block of the current block. Here, the neighboring block of the current block is a neighboring block adjacent to the current block and means a previously encoded block.

상기 오차 파라미터를 도출함에 있어 복호화기는, 현재 블록에 대한 주변 블록의 화소값, 참조 블록의 화소값 및/또는 참조 블록에 대한 주변 화소의 화소값들만을 이용할 수 있다. 또한 상기 오차 파라미터를 도출함에 있어 복호화기는 상기 화소값들뿐만 아니라, 현재 블록에 대한 주변 블록에 포함된 움직임 정보 및/또는 부호화 모드 정보 등을 함께 이용할 수 있고, 현재 블록에 포함된 움직임 정보 및/또는 부호화 모드 정보 등을 함께 이용할 수도 있다.In deriving the error parameter, the decoder may use only pixel values of the neighboring block for the current block, pixel values of the reference block, and / or pixel values of the neighboring pixel for the reference block. Further, in deriving the error parameter, the decoder may use not only the pixel values but also motion information and / or encoding mode information included in a neighboring block for the current block, and motion information and / or included in the current block. Alternatively, encoding mode information may be used together.


0차 오차 모델이 오차 보상에 사용되고, 현재 블록에 대한 주변 블록의 화소값, 참조 블록의 화소값 및/또는 참조 블록에 대한 주변 화소의 화소값들만이 오차 파라미터 도출에 사용되는 경우, 일 실시예로 오차 파라미터 b는 다음 수학식 12에 의해 나타내어질 수 있다.When the zero-order error model is used for error compensation, and only pixel values of the neighboring block for the current block, pixel values of the reference block, and / or pixel values of the neighboring pixel for the reference block are used for error parameter derivation, an embodiment The error parameter b can be represented by the following equation (12).

[수학식 12] [Equation 12]

b = Mean(Current Block’) - Mean(Reference Block’)b = Mean (Current Block ’)-Mean (Reference Block’)


여기서 Mean(Current Block’)은 현재 블록의 주변 블록으로서 이미 부호화된 블록의 화소값의 평균일 수 있다. 오차 파라미터 도출 단계에서 복호화기는 현재 블록 화소값의 평균을 구할 수 없으므로, 현재 블록의 주변 블록 화소값의 평균을 구하여 오차 파라미터 도출에 이용할 수 있다. Mean(Reference Block’)은 참조 블록 화소값의 평균이거나 참조 블록의 주변 블록 화소값의 평균일 수 있다. 오차 파라미터 도출 단계에서 복호화기는 참조 블록 화소값을 얻을 수 있으므로, 참조 블록의 주변 블록 화소값 뿐만 아니라 참조 블록 화소값도 오차 파라미터 도출에 사용할 수 있다.Here, Mean (Current Block ') may be an average of pixel values of a block that is already encoded as a neighboring block of the current block. In the error parameter deriving step, since the decoder cannot obtain an average of the current block pixel values, the decoder can obtain an average of the neighboring block pixel values of the current block and use the same to derive the error parameter. Mean (Reference Block ') may be an average of reference block pixel values or an average of neighboring block pixel values of the reference block. In the error parameter deriving step, since the decoder can obtain the reference block pixel value, not only the neighboring block pixel value of the reference block but also the reference block pixel value can be used for the error parameter derivation.

0차 오차 모델에 대한 오차 파라미터 도출 방법의 구체적인 실시예들은 후술한다.Specific embodiments of the error parameter derivation method for the 0 th order error model will be described later.

1차 오차 모델이 오차 보상에 사용되는 경우, 일 실시예로 오차 파라미터 a는 다음 수학식 13에 의해 구해질 수 있다.When the first order error model is used for error compensation, the error parameter a may be obtained by Equation 13 below.

[수학식 13][Equation 13]

a = Mean(Current Block’) / Mean(Reference Block’)a = Mean (Current Block ’) / Mean (Reference Block’)


여기서 Mean(Current Block’) 및 Mean(Reference Block’)은 수학식 12의 Mean(Current Block’) 및 Mean(Reference Block’)과 동일한 의미를 가진다. 이 때, 오차 파라미터 b는 0차 오차 모델에서와 동일한 방식으로 구해질 수 있다.Here, Mean (Current Block ') and Mean (Reference Block') have the same meaning as Mean (Current Block ') and Mean (Reference Block') in Equation 12. In this case, the error parameter b may be obtained in the same manner as in the zero order error model.

1차 오차 모델이 오차 보상에 오차 보상에 사용되는 경우, 다른 실시예로 복호화기는 가중치 예측(WP: Weighted Prediction)에서 사용되는 방식을 이용하여 오차 파라미터를 도출할 수 있다. 이 때, 오차 파라미터 a는 다음 수학식 14에 의해 구해질 수 있다.When the first error model is used for error compensation for error compensation, in another embodiment, the decoder may derive an error parameter using a method used in weighted prediction (WP). At this time, the error parameter a can be obtained by the following equation (14).

[수학식 14][Equation 14]

Figure PCTKR2011007263-appb-I000003
Figure PCTKR2011007263-appb-I000003


여기서, wY[n]은 가중치 값(weighting value)으로서, 오차 파라미터 a를 나타낸다. 또한 H는 현재 블록 및 참조 블록의 높이(height)를 나타내고, W는 현재 블록 및 참조 블록의 폭(width)을 나타낸다. cY ij는 현재 프레임 내의 루마(luma) 화소값, rY[n]ij는 참조 프레임 내의 루마 화소값을 나타낸다. 또한 iclip3(a, b, c)의 값은 c가 a보다 작은 경우에는 a, c가 b보다 클 때는 b, 그렇지 않은 경우에는 c가 된다.Here, w Y [n] is a weighting value and represents an error parameter a. In addition, H represents the height of the current block and the reference block, and W represents the width of the current block and the reference block. c Y ij denotes a luma pixel value in the current frame, and r Y [n] ij denotes a luma pixel value in the reference frame. Also, the value of iclip3 (a, b, c) is a when c is less than a, b when c is greater than b, and c otherwise.

또한 가중치 예측에서 사용되는 방식이 오차 파라미터 도출에 사용되는 경우, 오차 파라미터 b는 다음 수학식 15에 의해 구해질 수 있다.In addition, when the method used in the weight prediction is used for error parameter derivation, the error parameter b can be obtained by the following equation (15).

[수학식 15][Equation 15]

Figure PCTKR2011007263-appb-I000004
Figure PCTKR2011007263-appb-I000004


여기서, offsetY[n]은 오프셋 값으로서, 오차 파라미터 b를 나타낸다.Here, offset Y [n] is an offset value and represents the error parameter b.


현재 블록의 주변 블록에 대한 오차 파라미터 정보가 존재하는 경우, 복호화기는 현재 블록에 대한 주변 블록의 오차 파라미터를 이용하여 현재 블록의 오차 파라미터를 도출할 수도 있다. If the error parameter information for the neighboring block of the current block exists, the decoder may derive the error parameter of the current block using the error parameter of the neighboring block for the current block.

일 실시예로, 현재 블록과 움직임 벡터가 동일한 주변 블록으로서 오차 파라미터 정보를 갖는 주변 블록이 1개 존재할 때, 복호화기는 그 오차 파라미터를 현재 블록의 오차 파라미터로 사용할 수 있다. 다른 실시예로, 현재 블록과 움직임 벡터가 동일한 주변 블록으로서 오차 파라미터 정보를 갖는 주변 블록이 2개 이상 존재할 때, 복호화기는 상기 주변 블록들의 오차 파라미터들의 가중치 합을 구하여 그 값을 현재 블록의 오차 파라미터 로 사용할 수도 있다. 또한 복호화기는, 오차 파라미터를 도출함에 있어, 현재 블록에 대한 주변 블록의 오차 파라미터를 초기 예측값으로 이용할 수도 있다.In an embodiment, when there is one neighboring block having error parameter information as a neighboring block having the same motion vector as the current block, the decoder may use the error parameter as an error parameter of the current block. In another embodiment, when there are two or more neighboring blocks having error parameter information as neighboring blocks having the same motion vector as the current block, the decoder obtains a weighted sum of the error parameters of the neighboring blocks and returns the value to the error parameter of the current block. Can also be used as In addition, the decoder may use the error parameter of the neighboring block with respect to the current block as the initial prediction value in deriving the error parameter.


복호화기는 부호화기로부터 전송 받은 추가적인 정보를 이용하여 오차 파라미터를 도출할 수도 있다. 일 실시예로, 부호화기는 실제 오차 파라미터와 예측 오차 파라미터의 차분 정보를 추가로 복호화기로 전송할 수 있다. 이 때, 복호화기는 예측 오차 파라미터 정보에 전송 받은 차분 정보를 더하여 실제 오차 파라미터를 도출할 수 있다. 여기서, 예측 오차 파라미터는 부호화기 및 복호화기에서 예측되는 오차 파라미터를 의미한다. 부호화기로부터 추가로 전송되는 파라미터 정보는 상기 차분 정보에 한정되지 않으며, 다양한 유형을 가질 수 있다.The decoder may derive the error parameter using additional information received from the encoder. In an embodiment, the encoder may further transmit difference information between the actual error parameter and the prediction error parameter to the decoder. In this case, the decoder may derive the actual error parameter by adding the difference information received to the prediction error parameter information. Here, the prediction error parameter means an error parameter predicted by the encoder and the decoder. The parameter information additionally transmitted from the encoder is not limited to the difference information and may have various types.


다시 도 7을 참조하면, 복호화기는 오차 모델 및 도출된 오차 파라미터를 이용하여 현재 블록에 대한 오차 보상 값을 도출한다(S720).Referring back to FIG. 7, the decoder derives an error compensation value for the current block by using the error model and the derived error parameter (S720).

사용되는 참조 블록이 1개인 경우, 복호화기는 오차 모델 및 오차 파라미터에 의해 도출되는 오차 보상 값을 그대로 현재 블록의 오차 보상값으로 사용할 수 있다.When one reference block is used, the decoder may use the error compensation value derived by the error model and the error parameter as the error compensation value of the current block.

사용되는 참조 블록이 2개 이상인 경우, 복호화기는 각각의 참조 블록을 별개로 이용하여 2개 이상의 예측 블록을 생성할 수도 있다. 이 때 복호화기는 각 예측 블록에 대한 오차 파라미터를 도출하여, 각 예측 블록에 대해 오차 보상 값을 도출할 수 있다. 이하, 각 예측 블록에 대한 오차 보상 값은 오차 블록 값으로 불릴 수 있다. 복호화기는 상기 오차 블록 값들의 가중치 합에 의해, 현재 블록에 대한 오차 보상 값을 도출할 수 있다.If there are two or more reference blocks used, the decoder may generate two or more prediction blocks by using each reference block separately. In this case, the decoder may derive an error parameter for each prediction block and derive an error compensation value for each prediction block. Hereinafter, the error compensation value for each prediction block may be referred to as an error block value. The decoder may derive an error compensation value for the current block by the weighted sum of the error block values.

일 실시예로 상기 가중치는 현재 블록 및 각 참조 블록에 대응하는 예측 블록 간의 거리 정보를 이용하여 정해질 수 있다. 또한 참조 블록이 2개 이상인 경우 각 참조 블록을 지시하는 2 이상의 움직임 정보가 존재할 수 있고, 상기 가중치는 각 움직임 정보의 방향성 정보를 이용하여 정해질 수도 있다. 또한 상기 가중치는 상기 각 움직임 정보 간의 방향성 정보 뿐만 아니라, 각 움직임 정보들의 크기 정보를 함께 이용하여 정해질 수도 있다. 2 이상의 참조 블록이 사용되는 경우, 오차 보상 값 도출에 사용되는 가중치의 구체적인 실시예는 후술한다.In one embodiment, the weight may be determined using distance information between a current block and a prediction block corresponding to each reference block. In addition, when there are two or more reference blocks, there may be two or more pieces of motion information indicating each reference block, and the weight may be determined using directional information of each piece of motion information. In addition, the weight may be determined by using not only the directional information between the respective motion information but also the size information of each motion information. When two or more reference blocks are used, specific embodiments of the weights used to derive the error compensation value will be described later.

가중치는 상술한 실시예들 중 적어도 하나 이상의 방법을 이용하여 구해질 수 있다. 또한 가중치가 정해지는 방법은 상술한 실시예들에 한하지 않으며, 가중치는 구현에 따라 다양한 방법으로 정해질 수 있다. The weight may be obtained using at least one or more of the above-described embodiments. In addition, the method of determining the weight is not limited to the above-described embodiments, and the weight may be determined in various ways depending on the implementation.


도 8은 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 일 실시예를 개략적으로 나타내는 개념도이다. 도 8의 실시예에서 N은 현재 블록 및 참조 블록의 높이(height)와 폭(width)을 나타낸다. 또한 D는 현재 블록 및 참조 블록에 인접한 주변 화소들의 라인(line) 수를 나타낸다. 예를 들어, D는 1, 2, 3, 4, …, N 등의 값을 가질 수 있다.8 is a conceptual diagram schematically showing an embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention. In the embodiment of FIG. 8, N represents the height and width of the current block and the reference block. D represents the number of lines of neighboring pixels adjacent to the current block and the reference block. For example, D is 1, 2, 3, 4,... , N, and the like.

도 8을 참조하면, 복호화기는 현재 블록 주변 화소들의 화소값 및 참조 블록 주변 화소들의 화소값을 오차 파라미터 도출에 사용할 수 있다. 이 때, 0차 모델의 오차 파라미터는 다음 수학식 16에 의해 나타내어질 수 있다.Referring to FIG. 8, the decoder may use pixel values of pixels around the current block and pixels of pixels around the reference block to derive an error parameter. At this time, the error parameter of the 0th order model can be represented by the following equation (16).

[수학식 16][Equation 16]

offset = Mean(Current Neighbor) - Mean(Ref. Neighbor)offset = Mean (Current Neighbor)-Mean (Ref.Neighbor)


여기서, offset은 0차 모델의 오차 파라미터를 나타낸다. 또한 Mean(Current Neighbor)은 현재 블록에 인접한 주변 화소의 화소값들의 평균을 나타낸다. 오차 파라미터 도출 단계에서 복호화기는 현재 블록 화소값의 평균을 구할 수 없으므로, 현재 블록 주변 화소의 화소값들의 평균을 구하여 오차 파라미터 도출에 사용할 수 있다. Mean(Ref. Neighbor)은 참조 블록의 주변 화소의 화소값들의 평균을 나타낸다. Here, offset represents an error parameter of the 0th order model. Mean (Current Neighbor) represents an average of pixel values of neighboring pixels adjacent to the current block. In the error parameter deriving step, since the decoder cannot obtain an average of the current block pixel values, the decoder can obtain an average of pixel values of pixels around the current block and use the same to derive the error parameter. Mean (Ref. Neighbor) represents an average of pixel values of neighboring pixels of the reference block.

수학식 16을 참조하면, 복호화기는 현재 블록 주변 화소의 화소값 평균과 참조 블록 주변 화소의 화소값 평균의 차이값을 오차 파라미터 값으로 도출할 수 있다. 이 때, 오차 파라미터 도출에 사용되는 화소들의 범위는 다양하게 정해질 수 있다. 일 실시예로, D=1인 경우 현재 블록 및/또는 참조 블록에 바로 인접한 라인에 포함되는 화소값들만이 오차 파라미터 도출에 이용될 수 있다.Referring to Equation 16, the decoder may derive a difference value between a pixel value average of pixels around the current block and a pixel value average of pixels around the reference block as an error parameter value. In this case, the range of pixels used to derive the error parameter may be determined in various ways. In an embodiment, when D = 1, only pixel values included in a line immediately adjacent to the current block and / or a reference block may be used for deriving an error parameter.


도 9는 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 다른 실시예를 개략적으로 나타내는 개념도이다. 도 9의 실시예에서의 N, D는 도 8의 실시예에서의 N, D와 동일한 의미를 가진다. 9 is a conceptual diagram schematically showing another embodiment of an error parameter derivation method for a zero-order error model according to the present invention. N and D in the embodiment of FIG. 9 have the same meaning as N and D in the embodiment of FIG. 8.

도 9를 참조하면, 복호화기는 현재 블록 주변 화소들의 화소값 및 참조 블록 내 화소들의 화소값을 오차 파라미터 도출에 사용할 수 있다. 이 때, 0차 모델의 오차 파라미터는 다음 수학식 17에 의해 나타내어질 수 있다.Referring to FIG. 9, the decoder may use pixel values of pixels around a current block and pixel values of pixels in a reference block to derive an error parameter. At this time, the error parameter of the 0th order model can be represented by the following equation (17).

[수학식 17][Equation 17]

offset = Mean(Current Neighbor) - Mean(Ref. Block)offset = Mean (Current Neighbor)-Mean (Ref. Block)


여기서, Mean(Ref. Block)은 참조 블록 내 화소의 화소값들의 평균을 나타낸다. Here, Mean (Ref. Block) represents an average of pixel values of pixels in a reference block.

수학식 17을 참조하면, 복호화기는 현재 블록 주변 화소의 화소값 평균과 참조 블록 내 화소의 화소값 평균의 차이값을 오차 파라미터 값으로 도출할 수 있다. 이 때 도 8의 실시예에서와 마찬가지로, 사용되는 화소들의 범위는 다양하게 정해질 수 있다. Referring to Equation 17, the decoder may derive the difference value between the pixel value average of the pixels around the current block and the pixel value average of the pixels in the reference block as an error parameter value. In this case, as in the embodiment of FIG. 8, the range of pixels used may be variously determined.


도 10은 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 또 다른 실시예를 개략적으로 나타내는 개념도이다. 도 10의 실시예에서의 N, D는 도 8의 실시예에서의 N, D와 동일한 의미를 가진다. 10 is a conceptual diagram schematically showing still another embodiment of an error parameter derivation method for a zero-order error model according to the present invention. N and D in the embodiment of FIG. 10 have the same meaning as N and D in the embodiment of FIG. 8.

도 10을 참조하면, 복호화기는 현재 블록 주변 화소들의 화소값 및 참조 블록 주변 화소들의 화소값을 오차 파라미터 도출에 사용할 수 있다. 또한 도 7의 실시예에서 상술한 바와 같이, 복호화기는 상기 화소값들 뿐만 아니라 현재 블록에 대해 도출된 움직임 정보를 함께 이용하여 오차 파라미터를 도출할 수도 있다. 이 때, 0차 모델의 오차 파라미터는 다음 수학식 18에 의해 나타내어질 수 있다.Referring to FIG. 10, the decoder may use pixel values of pixels around the current block and pixel values of pixels around the reference block to derive an error parameter. In addition, as described above in the embodiment of FIG. 7, the decoder may derive an error parameter using not only the pixel values but also motion information derived for the current block. At this time, the error parameter of the zero-order model can be represented by the following equation (18).

[수학식 18]Equation 18

offset = Mean(weight*Current Neighbor) - Mean(weight*Ref. Neighbor)offset = Mean (weight * Current Neighbor)-Mean (weight * Ref.Neighbor)


Mean(weight*Current Neighbor)은 현재 블록에 인접한 주변 화소의 화소값들의 가중치 평균을 나타낸다. Mean(weight*Ref. Neighbor)은 참조 블록의 주변 화소의 화소값들의 가중치 평균을 나타낸다. Mean (weight * Current Neighbor) represents a weighted average of pixel values of neighboring pixels adjacent to the current block. Mean (weight * Ref. Neighbor) represents a weighted average of pixel values of neighboring pixels of the reference block.

수학식 18을 참조하면, 복호화기는 현재 블록 주변 화소의 화소값들의 가중치 평균과 참조 블록 주변 화소의 화소값들의 가중치 평균의 차이값을 오차 파라미터 값으로 도출할 수 있다. Referring to Equation 18, the decoder may derive a difference value between a weighted average of pixel values of pixels around a current block and a weighted average of pixel values of pixels around a reference block as an error parameter value.

가중치는 현재 블록 및/또는 현재 블록의 주변 블록에 대해 도출된 움직임 정보의 방향성을 이용하여 구해질 수 있다. 도 10의 실시예를 참조하면, 상기 움직임 벡터가 수평 성분만을 가지는 경우, 복호화기는 현재 블록 및 참조 블록의 좌측 블록에 포함된 화소의 화소값들만을 오차 파라미터 도출에 이용할 수 있다. 이 때, 좌측 블록의 화소값들에는 1의 가중치 값이 적용되고, 상단 블록의 화소값들에는 0의 가중치가 적용될 수 있다.The weight may be obtained using the directionality of the motion information derived for the current block and / or neighboring blocks of the current block. Referring to the embodiment of FIG. 10, when the motion vector has only a horizontal component, the decoder may use only pixel values of pixels included in a current block and a left block of a reference block to derive an error parameter. In this case, a weight value of 1 may be applied to the pixel values of the left block, and a weight value of 0 may be applied to the pixel values of the upper block.

이 때 도 8의 실시예에서와 마찬가지로, 사용되는 화소들의 범위는 다양하게 정해질 수 있다. In this case, as in the embodiment of FIG. 8, the range of pixels used may be variously determined.


도 11은 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 또 다른 실시예를 개략적으로 나타내는 개념도이다. 도 11의 실시예에서의 N, D는 도 8의 실시예에서의 N, D와 동일한 의미를 가진다. 11 is a conceptual diagram schematically showing still another embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention. N and D in the embodiment of FIG. 11 have the same meanings as N and D in the embodiment of FIG. 8.

도 11을 참조하면, 복호화기는 현재 블록 주변 화소들의 화소값 및 참조 블록 내 화소들의 화소값을 오차 파라미터 도출에 사용할 수 있다. 이 때, 0차 모델의 오차 파라미터는 다음 수학식 19에 의해 나타내어질 수 있다.Referring to FIG. 11, a decoder may use pixel values of pixels around a current block and pixel values of pixels in a reference block to derive an error parameter. At this time, the error parameter of the 0th order model can be represented by the following equation (19).

[수학식 19][Equation 19]

offset = Mean(weight*Current Neighbor) - Mean(Ref.Block)offset = Mean (weight * Current Neighbor)-Mean (Ref.Block)


수학식 19를 참조하면, 복호화기는 현재 블록 주변 화소의 화소값들의 가중치 평균과 참조 블록 내 화소의 화소값들의 평균의 차이값을 오차 파라미터 값으로 도출할 수 있다. Referring to Equation 19, the decoder may derive a difference value between a weighted average of pixel values of pixels around a current block and an average of pixel values of pixels in a reference block as an error parameter value.

가중치는 현재 블록 및/또는 현재 블록의 주변 블록에 대해 도출된 움직임 정보의 방향성을 이용하여 구해질 수 있다. 도 11의 실시예를 참조하면, 상기 움직임 벡터가 수평 성분만을 가지는 경우, 복호화기는 현재 블록에 인접한 화소의 화소값들 중 현재 블록의 좌측 블록에 포함된 화소의 화소값들만을 오차 파라미터 도출에 이용할 수 있다. 이 때, 좌측 블록의 화소값들에는 1의 가중치 값이 적용되고, 상단 블록의 화소값들에는 0의 가중치가 적용될 수 있다.The weight may be obtained using the directionality of the motion information derived for the current block and / or neighboring blocks of the current block. Referring to the embodiment of FIG. 11, when the motion vector has only a horizontal component, the decoder may use only pixel values of pixels included in a left block of the current block among pixel values of a pixel adjacent to the current block to derive an error parameter. Can be. In this case, a weight value of 1 may be applied to the pixel values of the left block, and a weight value of 0 may be applied to the pixel values of the upper block.

이 때 도 8의 실시예에서와 마찬가지로, 사용되는 화소들의 범위는 다양하게 정해질 수 있다.In this case, as in the embodiment of FIG. 8, the range of pixels used may be variously determined.


도 12는 본 발명에 따른 0차 오차 모델에 대한 오차 파라미터 도출 방법의 또 다른 실시예를 개략적으로 나타내는 개념도이다. 도 12의 실시예에서의 N, D는 도 8의 실시예에서의 N, D와 동일한 의미를 가진다. 12 is a conceptual diagram schematically showing still another embodiment of a method for deriving an error parameter for a zero-order error model according to the present invention. N and D in the embodiment of FIG. 12 have the same meaning as N and D in the embodiment of FIG. 8.

도 12의 1210을 참조하면, 복호화기는 현재 블록 주변 화소들의 화소값 및 참조 블록 주변 화소들의 화소값을 오차 파라미터 도출에 사용할 수 있다. 이 때, 0차 모델의 오차 파라미터는 다음 수학식 20에 의해 나타내어질 수 있다.Referring to 1210 of FIG. 12, the decoder may use pixel values of pixels around the current block and pixels of pixels around the reference block to derive an error parameter. At this time, the error parameter of the 0th order model can be represented by the following equation (20).

[수학식 20][Equation 20]

offset = Mean(weight*Current Neighbor) - Mean(weight*Ref. Neighbor)offset = Mean (weight * Current Neighbor)-Mean (weight * Ref.Neighbor)


Mean(weight*Current Neighbor)은 현재 블록 주변 화소의 화소값들의 가중치 평균을 나타낸다. Mean(weight*Ref. Neighbor)은 참조 블록 주변 화소의 화소값들의 가중치 평균을 나타낸다. 도 12의 실시예에서, 현재 블록의 주변 화소들은 도 12의 1220에 도시된 블록C에 포함된 화소값들일 수 있다. 또한 참조 블록의 주변 화소들도, 블록C에 대응하는 참조 영상 내의 블록에 포함된 화소값들일 수 있다. 이하, 도 12의 실시예에서 블록C는 현재 블록의 좌측 상단 블록, 블록C에 대응하는 참조 영상 내의 블록은 참조 블록의 좌측 상단 블록이라 한다.Mean (weight * Current Neighbor) represents a weighted average of pixel values of pixels around the current block. Mean (weight * Ref. Neighbor) represents a weighted average of pixel values of pixels around the reference block. In the embodiment of FIG. 12, the neighboring pixels of the current block may be pixel values included in block C illustrated in 1220 of FIG. 12. In addition, the neighboring pixels of the reference block may also be pixel values included in the block in the reference image corresponding to the block C. FIG. Hereinafter, in the embodiment of FIG. 12, block C is referred to as an upper left block of the current block, and a block in a reference image corresponding to block C is referred to as an upper left block of the reference block.

수학식 20을 참조하면, 복호화기는 현재 블록 주변 화소의 화소값들의 가중치 평균과 참조 블록 주변 화소의 화소값들의 가중치 평균의 차이값을 오차 파라미터 값으로 도출할 수 있다. Referring to Equation 20, the decoder may derive the difference between the weighted average of the pixel values of the pixels around the current block and the weighted average of the pixel values of the pixels around the reference block as an error parameter value.

가중치는 현재 블록 및/또는 현재 블록의 주변 블록에 대해 도출된 움직임 정보의 방향성을 이용하여 구해질 수 있다. 도 12의 실시예를 참조하면, 현재 블록에 대해 도출된 움직임 벡터가 도 12의 1220에 도시된 블록C의 움직임 벡터와 동일한 경우, 복호화기는 현재 블록 및 주변 블록의 좌측 상단 블록에 포함된 화소의 화소값들만을 오차 파라미터 도출에 이용할 수 있다. 예를 들어, 좌측 상단 블록의 화소값들에는 1의 가중치 값이 적용되고, 상단 블록 및 좌측 블록의 화소값들에는 0의 가중치가 적용될 수 있다. 이 때, 도 12의 1210을 참조하면, 현재 블록의 상단 블록은 블록B, 현재 블록의 좌측 블록은 블록A, 현재 블록의 좌측 상단 블록은 블록C이다. 좌측 블록의 상단 블록, 좌측 블록 및 좌측 상단 블록은 각각 블록B, 블록A, 블록C에 대응하는 참조 영상 내의 블록이다.The weight may be obtained using the directionality of the motion information derived for the current block and / or neighboring blocks of the current block. Referring to the embodiment of FIG. 12, when the motion vector derived for the current block is the same as the motion vector of block C illustrated in 1220 of FIG. 12, the decoder may determine the number of pixels included in the upper left block of the current block and the neighboring block. Only pixel values can be used to derive the error parameter. For example, a weight value of 1 may be applied to pixel values of an upper left block, and a weight value of 0 may be applied to pixel values of an upper block and a left block. At this time, referring to 1210 of FIG. 12, the upper block of the current block is block B, the left block of the current block is block A, and the upper left block of the current block is block C. The upper block, the left block, and the upper left block of the left block are blocks in the reference picture corresponding to the blocks B, Block A, and Block C, respectively.

이 때 도 8의 실시예에서와 마찬가지로, 사용되는 화소들의 범위는 다양하게 정해질 수 있다.In this case, as in the embodiment of FIG. 8, the range of pixels used may be variously determined.


도 13은 도 7의 실시예에서의 가중치를 이용한 오차 보상 값 도출에 사용되는 움직임 벡터의 실시예를 개략적으로 나타내는 개념도이다. 도 13은 참조 블록이 2개인 경우의 실시예를 나타낸다. T-1, T, T+1은 각각의 영상에 대한 시간을 의미한다. 도 13의 실시예에서 시간 T의 영상은 현재 영상을 나타내고, 현재 영상 내의 블록은 현재 블록을 나타낸다. 또한 시간 T-1, T+1의 영상은 참조 영상을 나타내고, 참조 영상 내의 블록은 참조 블록을 나타낸다. 또한 도 13의 실시예에서, 시간 T-1의 참조 영상 내 참조 블록을 지시하는 현재 블록의 움직임 벡터는 참조 영상 리스트0의 움직임 벡터, 시간 T+1의 참조 영상 내 참조 블록을 지시하는 현재 블록의 움직임 벡터는 참조 영상 리스트1의 움직임 벡터라 한다.FIG. 13 is a conceptual diagram schematically illustrating an embodiment of a motion vector used for deriving an error compensation value using weights in the embodiment of FIG. 7. 13 shows an embodiment in the case of two reference blocks. T-1, T, and T + 1 mean time for each image. In the embodiment of FIG. 13, an image of time T represents a current image, and a block in the current image represents a current block. In addition, the image of time T-1, T + 1 represents a reference image, and the block in a reference image represents a reference block. Also, in the embodiment of FIG. 13, the motion vector of the current block indicating the reference block in the reference picture at time T-1 is the motion vector of the reference picture list 0 and the current block indicating the reference block in the reference picture at time T + 1. The motion vector of is referred to as the motion vector of the reference picture list1.

도 7의 실시예에서 상술한 바와 같이, 참조 블록이 2개 이상인 경우, 복호화기는 오차 블록 값들의 가중치 합에 의해, 현재 블록에 대한 오차 보상 값을 도출할 수 있다. 또한 일 실시예로 상기 가중치는 현재 블록에 대해 도출된 움직임 정보를 이용하여 정해질 수 있다.As described above in the embodiment of FIG. 7, when there are two or more reference blocks, the decoder may derive an error compensation value for the current block by a weighted sum of error block values. In an embodiment, the weight may be determined using motion information derived for the current block.

도 13의 1310을 참조하면, 참조 영상 리스트0의 움직임 벡터와 참조 영상 리스트1의 움직임 벡터는 서로 대칭이다. 이 때, 복호화기는 최종 예측 블록의 화소값 도출시에 오차 보상 값을 적용하지 않을 수 있다. 따라서, 참조 영상 리스트0의 움직임 벡터와 참조 영상 리스트1의 움직임 벡터는 서로 대칭인 경우, 가중치는 0으로 정해질 수 있다.Referring to 1310 of FIG. 13, the motion vector of the reference picture list 0 and the motion vector of the reference picture list 1 are symmetric with each other. In this case, the decoder may not apply an error compensation value when deriving the pixel value of the final prediction block. Therefore, when the motion vector of the reference picture list 0 and the motion vector of the reference picture list 1 are symmetric with each other, the weight may be set to zero.

도 13의 1320을 참조하면, 참조 영상 리스트0의 움직임 벡터와 참조 영상 리스트1의 움직임 벡터는 서로 대칭이 아니다. 이 때, 복호화기는 최종 예측 블록의 화소값 도출시에 오차 보상 값을 적용할 수 있다. 예를 들어, 오차 보상 값 도출시에 사용되는 가중치는 각각 1/2로 정해질 수 있다.Referring to 1320 of FIG. 13, the motion vector of the reference picture list 0 and the motion vector of the reference picture list 1 are not symmetric with each other. In this case, the decoder may apply an error compensation value when deriving the pixel value of the final prediction block. For example, the weights used in deriving the error compensation value may be set to 1/2 respectively.


도 3의 실시예에서 상술한 바와 같이, 복호화기는 예측 블록의 화소값과 오차 보상 값을 이용하여 현재 블록에 대한 최종 예측 블록의 화소값을 도출할 수 있다. 예측 블록의 화소값과 오차 보상 값을 도출하는 방법의 구체적인 실시예는 도 4 내지 도 13의 실시예에서 상술한 바 있다.As described above in the embodiment of FIG. 3, the decoder may derive the pixel value of the last prediction block for the current block by using the pixel value and the error compensation value of the prediction block. Specific embodiments of the method of deriving the pixel value and the error compensation value of the prediction block have been described above with reference to the embodiments of FIGS. 4 to 13.


참조 블록이 1개인 경우, 복호화기는 예측 블록의 화소값에 오차 보상 값을 더하여 최종 예측 블록의 화소값을 도출할 수 있다.When there is one reference block, the decoder may derive the pixel value of the final prediction block by adding an error compensation value to the pixel value of the prediction block.

참조 블록이 1개일 때 최종 예측 블록 화소값을 도출함에 있어, 복호화기는 이전 단계에서 도출된 예측 블록의 화소값 및 오차 보상 값을 그대로 이용할 수 있다. 이 때, 현재 블록 내의 예측 대상 화소들에 대한 오차 보상 값들은 서로 동일한 오차 파라미터가 적용된 값들일 수도 있다.In deriving the final prediction block pixel value when there is one reference block, the decoder may use the pixel value and the error compensation value of the prediction block derived in the previous step as it is. In this case, the error compensation values for the prediction target pixels in the current block may be values to which the same error parameters are applied.

상기의 경우, 0차 오차 모델에 대한 최종 예측 블록의 화소값은 일 실시예로 다음 수학식 21에 의해 나타내어질 수 있다.In this case, the pixel value of the final prediction block for the zero-order error model may be represented by Equation 21 according to an embodiment.

[수학식 21][Equation 21]

최종 예측 블록의 화소값(x,y) = 예측 블록의 화소값(x,y) + bPixel value (x, y) of the final prediction block = Pixel value (x, y) of the prediction block + b


여기서, (x,y)는 현재 블록 내의 예측 대상 화소의 좌표이다. b는 DC 오프셋(DC offset)으로, 0차 오차 모델의 오차 파라미터에 해당한다.Here, (x, y) is the coordinate of the prediction target pixel in the current block. b is a DC offset and corresponds to an error parameter of the 0th order error model.

또한 상기의 경우, 1차 오차 모델에 대한 최종 예측 블록의 화소값은 일 실시예로 다음 수학식 22에 의해 나타내어질 수 있다.Also, in the above case, the pixel value of the final prediction block for the first order error model may be represented by Equation 22 as an embodiment.

[수학식 22][Equation 22]

최종 예측 블록의 화소값(x,y) = a*예측 블록의 화소값(x,y) + bPixel value (x, y) of the last prediction block = a * pixel value (x, y) of the prediction block + b


여기서 a 및 b는 1차 오차 모델의 오차 파라미터에 해당한다.Where a and b correspond to error parameters of the first order error model.

참조 블록이 1개일 때 최종 예측 블록 화소값을 도출함에 있어, 복호화기는 이전 단계에서 도출된 예측 블록의 화소값 및 오차 보상 값뿐만 아니라, 예측 대상 화소의 현재 블록 내 위치에 관한 정보를 함께 이용할 수 있다.In deriving the final prediction block pixel value when there is one reference block, the decoder can use not only the pixel value and the error compensation value of the prediction block derived in the previous step, but also information about the position in the current block of the prediction target pixel. have.

상기의 경우, 0차 오차 모델에 대한 최종 예측 블록의 화소값은 일 실시예로 다음 수학식 23에 의해 나타내어질 수 있다.In this case, the pixel value of the final prediction block for the zero-order error model may be represented by Equation 23 according to an embodiment.

[수학식 23][Equation 23]

최종 예측 블록의 화소값(x,y) = 예측 블록의 화소값(x,y) + b*w(x,y)Pixel value (x, y) of the last prediction block = pixel value (x, y) of the prediction block + b * w (x, y)

또는or

최종 예측 블록의 화소값(x,y) = 예측 블록의 화소값(x,y) + b(x,y)Pixel value (x, y) of the last prediction block = pixel value (x, y) of the prediction block + b (x, y)


여기서, w(x,y)는 오차 파라미터 b에 적용되는 가중치이다. 수학식 23을 참조하면, 가중치 w(x,y) 및 오차 파라미터 b(x,y)는 예측 대상 화소의 현재 블록 내 위치에 따라 서로 다른 값을 가질 수 있다. 따라서, 예측 대상 화소의 현재 블록 내 위치에 따라서 최종 예측 블록의 화소값이 달라질 수 있다.Here, w (x, y) is a weight applied to the error parameter b. Referring to Equation 23, the weight w (x, y) and the error parameter b (x, y) may have different values according to positions in the current block of the prediction target pixel. Therefore, the pixel value of the final prediction block may vary according to the position in the current block of the prediction target pixel.

또한 상기의 경우, 1차 오차 모델에 대한 최종 예측 블록의 화소값은 일 실시예로 다음 수학식 24에 의해 나타내어질 수 있다.Also, in the above case, the pixel value of the final prediction block for the first order error model may be represented by Equation 24 according to an embodiment.

[수학식 24][Equation 24]

최종 예측 블록의 화소값(x,y) = a*w1(x,y)*예측 블록의 화소값(x,y) + b*w2(x,y)Pixel value (x, y) of the last prediction block = a * w1 (x, y) * pixel value (x, y) of the prediction block + b * w2 (x, y)

또는or

최종 예측 블록의 화소값(x,y) = a(x,y)*예측 블록의 화소값(x,y) + b(x,y)Pixel value (x, y) of the final prediction block = a (x, y) * pixel value (x, y) + b (x, y) of the prediction block


여기서, w1(x,y)는 오차 파라미터 a에 적용되는 가중치이고, w2(x,y)는 오차 파라미터 b에 적용되는 가중치이다. 수학식 24를 참조하면, 가중치 w1(x,y), 가중치 w2(x,y), 오차 파라미터 a(x,y) 및 오차 파라미터 b(x,y)는 예측 대상 화소의 현재 블록 내 위치에 따라 서로 다른 값을 가질 수 있다. 따라서, 예측 대상 화소의 현재 블록 내 위치에 따라서 최종 예측 블록의 화소값이 달라질 수 있다.Here, w1 (x, y) is a weight applied to the error parameter a, and w2 (x, y) is a weight applied to the error parameter b. Referring to Equation 24, the weight w1 (x, y), the weight w2 (x, y), the error parameter a (x, y) and the error parameter b (x, y) are located at the position in the current block of the pixel to be predicted. It can have different values. Therefore, the pixel value of the final prediction block may vary according to the position in the current block of the prediction target pixel.

큰 부호화 유닛(large CU)이 사용되는 경우, 상기 큰 부호화 유닛 내의 모든 화소에 대해 동일한 오차 파라미터가 적용되는 경우 부호화/복호화 효율이 감소될 수 있다. 이 때, 부호화기 및 복호화기는 예측 대상 화소의 현재 블록 내 위치에 관한 정보를 다른 정보와 함께 이용함으로써 부호화/복호화 성능을 향상시킬 수 있다.When a large coding unit (large CU) is used, when the same error parameter is applied to all the pixels in the large coding unit, encoding / decoding efficiency may be reduced. In this case, the encoder and the decoder may improve encoding / decoding performance by using information on the current block position of the prediction target pixel together with other information.


도 14는 예측 대상 화소의 현재 블록 내 위치에 관한 정보를 이용하여 최종 예측 블록의 화소값을 도출하는 방법의 일 실시예를 나타내는 개념도이다. 도 14의 실시예에서는 0차 오차 모델이 사용되고, 수학식 23의 실시예에서의 두 번째 수학식에 따른 최종 예측 블록 화소값 도출 방법이 사용된다고 가정한다.14 is a conceptual diagram illustrating an embodiment of a method of deriving a pixel value of a final prediction block by using information about a position in a current block of a prediction target pixel. In the embodiment of FIG. 14, it is assumed that a zero-order error model is used, and a method of deriving the final prediction block pixel value according to the second equation in the embodiment of Equation 23 is used.

도 14의 1410은 참조 블록, 도 14의 1420은 현재 블록을 나타내며, 참조 블록 및 현재 블록의 크기는 4x4라 가정한다. 도 14의 실시예에서 N1, N2, N3, N4는 현재 블록 및 참조 블록 상단에 인접한 주변 화소를 나타내고, NA, NB, NC, ND는 현재 블록 및 참조 블록 좌측에 인접한 주변 화소를 나타낸다. 참조 블록 주변 화소의 화소값과 현재 블록 주변 화소의 화소값은 서로 다를 수 있다.In FIG. 14, reference numeral 1410 denotes a reference block, and reference numeral 1420 of FIG. 14 indicates a current block, and the size of the reference block and the current block is 4x4. In the embodiment of FIG. 14, N1, N2, N3, and N4 represent neighboring pixels adjacent to the top of the current block and the reference block, and NA, NB, NC, and ND represent neighboring pixels adjacent to the left of the current block and the reference block. The pixel values of the pixels around the reference block and the pixels around the current block may be different from each other.

도 14를 참조하면, 현재 블록 내의 16개 화소에 대해, 16개의 오차 파라미터 b가 도출될 수 있다. 각각의 오차 파라미터들은 그 오차 파라미터에 대응하는 화소의 위치에 따라 서로 다른 값을 가질 수 있다. Referring to FIG. 14, 16 error parameters b may be derived for 16 pixels in the current block. Each error parameter may have a different value depending on the position of the pixel corresponding to the error parameter.

일 실시예로 오차 파라미터 b(2,3)은 현재 블록 주변의 화소 및 참조 블록 주변의 화소 중 N3 화소와 NB 화소에 포함되는 정보만을 이용하여 도출될 수 있다.In an embodiment, the error parameter b (2,3) may be derived using only information included in the N3 and NB pixels among the pixels around the current block and the pixels around the reference block.

다른 실시예로 복호화기는 오차 파라미터들 중 일부 b(i,j)만을 도출한 후 나머지 오차 파라미터들은 이미 도출된 오차 파라미터 정보 및/또는 주변 화소에 포함된 정보를 이용하여 도출할 수 있다. 예를 들어, 상기 나머지 오차 파라미터들은 이미 도출된 오차 파라미터들의 내삽(interpolation) 또는 외삽(extrapolation)에 의해 도출될 수 있다.In another embodiment, the decoder may derive only some b (i, j) of the error parameters and then derive the remaining error parameters by using the error parameter information and / or information included in the neighboring pixels. For example, the remaining error parameters may be derived by interpolation or extrapolation of already derived error parameters.

예를 들어, 도 14를 참조하면, 복호화기는 b(1,1), b(4,1), b(1,4) 3개의 파라미터를 먼저 도출할 수 있다. 이 때, 복호화기는 b(1,1), b(1,4)의 내삽에 의해 b(1,2), b(1,3)을 구할 수 있고, b(1,1), b(4,1)의 내삽에 의해 b(2,1), b(3,1)을 구할 수 있다. 유사하게, 나머지 b(i,j)들도 주변의 가장 가까운 오차 파라미터 b 값들의 내삽 또는 외삽에 의해 구해질 수 있다.For example, referring to FIG. 14, the decoder may first derive three parameters of b (1,1), b (4,1), and b (1,4). At this time, the decoder can obtain b (1,2) and b (1,3) by interpolation of b (1,1) and b (1,4), and b (1,1) and b (4). By interpolation of, 1, b (2,1) and b (3,1) can be obtained. Similarly, the remaining b (i, j) can also be obtained by interpolation or extrapolation of the closest error parameter b values around.


참조 블록이 2개 이상인 경우, 복호화기는 각각의 참조 블록을 별개로 이용하여 2개 이상의 예측 블록을 생성할 수도 있고, 2 이상 참조 블록의 화소값들의 가중치 합을 이용하여 현재 블록에 대한 예측 블록의 화소값을 도출할 수도 있다. 또한 이 때 복호화기는 각각의 예측 블록에 대한 오차 블록 값을 도출할 수 있으며, 상기 오차 블록 값들의 가중치 합을 이용하여 현재 블록에 대한 1개의 오차 보상 값을 도출할 수도 있다.When there are two or more reference blocks, the decoder may generate two or more prediction blocks by using each reference block separately, and use the weighted sum of the pixel values of the two or more reference blocks to determine the prediction block for the current block. It is also possible to derive the pixel value. In this case, the decoder may derive an error block value for each prediction block, and may also derive one error compensation value for the current block by using the weighted sum of the error block values.

복호화기가 현재 블록에 대한 예측 블록의 화소값 및 현재 블록에 대한 오차 보상 값을 각각 가중치 합에 의해 1개씩만 도출한 경우, 최종 예측 블록의 화소값은 참조 블록이 1개인 경우와 유사한 방법으로 도출될 수 있다.When the decoder derives only one pixel value of the prediction block for the current block and one error compensation value for the current block, respectively, by the sum of weights, the pixel value of the final prediction block is derived in a similar manner to the case where there is one reference block. Can be.

복호화기가 각각의 참조 블록을 별개로만 이용하여 2개 이상의 예측 블록의 화소값을 도출하고, 1개의 오차 보상 값이 아닌 각각의 예측 블록에 대한 오차 블록 값들만을 도출한 경우, 복호화기는 그 값이 특정 크기 이상인 오차 블록 값만을 최종 예측 블록 화소값 도출에 사용할 수 있고, 또는 그 값이 특정 크기 이하인 오차 블록 값만을 최종 예측 블록 화소값 도출에 사용할 수도 있다. 일 실시예로, 0차 오차 모델이 사용되는 경우, 상기 방법은 다음 수학식 25에 의해 나타내어질 수 있다. If the decoder derives pixel values of two or more prediction blocks using each reference block separately, and derives only error block values for each prediction block instead of one error compensation value, the decoder Only error block values greater than or equal to a certain size may be used to derive the final prediction block pixel value, or only error block values less than or equal to a certain size may be used to derive the final prediction block pixel value. In one embodiment, when a zero-order error model is used, the method may be represented by the following equation (25).

[수학식 25][Equation 25]

최종 예측 블록의 화소값(x,y) = 1/N(예측 블록의 화소값1(x,y)+오차 블록 값1(x,y)*Wth) + 1/N(예측 블록의 화소값2(x,y)+오차 블록 값2(x,y)*Wth) + … + 1/N(예측 블록의 화소값N(x,y)+오차 블록 값N(x,y)*Wth) Pixel value (x, y) of the final prediction block = 1 / N (pixel value 1 (x, y) of the prediction block + error block value 1 (x, y) * W th ) + 1 / N (pixel of the prediction block) Value2 (x, y) + error block value2 (x, y) * W th ) +. + 1 / N (pixel value N (x, y) of prediction block + error block value N (x, y) * W th )


여기서, Wth는 오차 블록 값의 사용 여부를 나타내기 위해 오차 블록 값에 곱해지는 값이다. 또한 수학식 25의 실시예에서 예측 블록의 화소값들은 각각의 참조 블록이 별개로 이용되어 도출된 값들이다.Here, W th is a value multiplied by the error block value to indicate whether or not the error block value is used. In addition, in the embodiment of Equation 25, pixel values of the prediction block are values derived by using each reference block separately.

수학식 25의 실시예에서는 예를 들어, 그 값이 특정 크기 이상인 오차 블록 값만이 최종 예측 블록 화소값 도출에 사용될 수 있다. 즉, 각 예측 블록 값에 대해, 오차 파라미터 b가 일정 임계값(threshold)보다 큰 경우에는 상기 Wth 값이 1, 그렇지 않은 경우에는 상기 Wth 값이 0일 수 있다.In the embodiment of Equation 25, for example, only an error block value whose value is greater than or equal to a certain size may be used to derive the final prediction block pixel value. That is, for each prediction block value, if the error parameter b is greater than a predetermined threshold, the value of W th may be 1, otherwise, the value of W th may be zero.

또한 수학식 25의 실시예에서는 예를 들어, 그 값이 특정 크기 이하인 오차 블록 값만이 최종 예측 블록 화소값 도출에 사용될 수도 있다. 즉, 각 예측 블록 값에 대해, 오차 파라미터 b가 일정 임계값(threshold)보다 작은 경우에는 상기 Wth 값이 1, 그렇지 않은 경우에는 상기 Wth 값이 0일 수 있다.In addition, in the embodiment of Equation 25, for example, only an error block value whose value is equal to or less than a specific size may be used to derive the final prediction block pixel value. That is, for each prediction block value, if the error parameter b is smaller than a predetermined threshold, the value of W th may be 1, otherwise, the value of W th may be zero.

복호화기가 각각의 참조 블록을 별개로만 이용하여 2개 이상의 예측 블록의 화소값을 도출하고, 1개의 오차 보상 값이 아닌 각각의 예측 블록에 대한 오차 블록 값들만을 도출한 경우, 복호화기는 상기 예측 블록들과 오차 블록 값들의 가중치 합에 의해 최종 예측 블록의 화소값을 도출할 수 있다. 일 실시예로, 상기 방법에 의해 도출되는 최종 예측 블록의 화소값은 다음 수학식 26에 의해 나타내어질 수 있다.When the decoder derives pixel values of two or more prediction blocks by using each reference block separately, and derives only error block values for each prediction block instead of one error compensation value, the decoder determines the prediction block. The pixel value of the final prediction block can be derived by the weighted sum of the values and the error block values. In one embodiment, the pixel value of the final prediction block derived by the method may be represented by the following equation (26).

[수학식 26][Equation 26]

최종 예측 블록의 화소값(x,y) = WP1*예측 블록의 화소값1(x,y)+WE1*오차 블록 값1(x,y) + WP2*예측 블록의 화소값2(x,y)+WE2*오차 블록 값2(x,y) + … + WPN*예측 블록의 화소값N(x,y)+WEN*오차 블록 값N(x,y)Pixel value (x, y) of the final prediction block = W P1 * Pixel value 1 (x, y) of the prediction block + W E1 * Error block value 1 (x, y) + W P2 * Pixel value 2 of the prediction block x, y) + W E2 * error block value 2 (x, y) +… + W PN * Pixel value N (x, y) of prediction block + W EN * Error block value N (x, y)


여기서, 각각의 WP, WE들은 가중치를 나타낸다. 이 때, 상기 가중치는 현재 블록 및 각 참조 블록에 대응하는 예측 블록 간의 거리 정보를 이용하여 정해질 수 있다. 또한 참조 블록이 2개 이상인 경우 각 참조 블록을 지시하는 2 이상의 움직임 정보가 존재할 수 있고, 상기 가중치는 각 움직임 정보의 방향성 정보를 이용하여 정해질 수도 있다. 또한 상기 가중치는 상기 각 움직임 정보 간의 대칭성 정보를 이용하여 정해질 수도 있다.Here, each of W P and W E represents a weight. In this case, the weight may be determined using distance information between a current block and a prediction block corresponding to each reference block. In addition, when there are two or more reference blocks, there may be two or more pieces of motion information indicating each reference block, and the weight may be determined using directional information of each piece of motion information. The weight may also be determined using symmetry information between the pieces of motion information.

가중치는 상술한 실시예들 중 적어도 하나 이상의 방법을 이용하여 적응적으로 구해질 수 있다. 또한 가중치가 정해지는 방법은 상술한 실시예들에 한하지 않으며, 가중치는 구현에 따라 다양한 방법으로 정해질 수 있다. The weight may be adaptively obtained using at least one or more of the above-described embodiments. In addition, the method of determining the weight is not limited to the above-described embodiments, and the weight may be determined in various ways depending on the implementation.


생략 모드에서의 예측에 적용되는 상술한 오차 보상 방식은, 항상 적용되는 것이 아니라 현재 영상의 부호화 방식, 블록 크기 등에 따라 선택적으로 적용될 수도 있다.The above-described error compensation scheme applied to the prediction in the skipped mode may not be always applied but may be selectively applied according to a coding scheme, a block size, and the like of the current image.

일 실시예로, 부호화기는, 슬라이스 헤더(slice header), 픽쳐 파라미터 셋(picture parameter set) 및/또는 시퀀스 파라미터 셋(sequence parameter set)에, 오차 보상이 적용되는지 여부를 지시하는 정보를 포함하여 복호화기로 전송할 수 있다. 예를 들어 상기 정보가 슬라이스 헤더에 포함되는 경우 복호화기는, 상기 정보의 값이 제1 논리값인 경우 상기 슬라이스에 대해 오차 보상을 적용하고, 상기 정보의 값이 제2 논리값인 경우 상기 슬라이스에 대해 오차 보상을 적용하지 않을 수 있다.In one embodiment, the encoder decodes a slice header, a picture parameter set, and / or a sequence parameter set by including information indicating whether error compensation is applied. Can be transmitted to the device. For example, when the information is included in a slice header, the decoder applies error compensation to the slice when the value of the information is a first logical value, and applies the error compensation to the slice when the information is a second logical value. Error compensation may not be applied.

이 때, 상기 정보가 슬라이스 헤더에 포함되는 경우, 슬라이스마다 오차 보상 적용 여부가 변경될 수 있다. 상기 정보가 픽쳐 파라미터 셋에 포함되는 경우, 해당 픽쳐 파라미터를 사용하는 모든 슬라이스에 대해, 오차 보상 적용 여부가 제어될 수 있다. 상기 정보가 시퀀스 파라미터 셋에 포함되는 경우, 슬라이스의 종류별로 오차 보상 적용 여부가 제어될 수도 있다. 슬라이스의 종류에는 I 슬라이스, P 슬라이스, B 슬라이스 등이 있을 수 있다.In this case, when the information is included in the slice header, whether or not error compensation is applied to each slice may be changed. When the information is included in the picture parameter set, whether or not error compensation is applied to all slices using the picture parameter may be controlled. When the information is included in the sequence parameter set, whether or not error compensation is applied for each type of slice may be controlled. The slice may be an I slice, a P slice, a B slice, or the like.

상기 정보는 부호화 유닛, 예측 유닛 등의 블록 크기에 따라 오차 보상 적용 여부를 다르게 지시할 수 있다. 예를 들어 상기 정보는 특정 크기의 부호화 유닛(CU) 및/또는 예측 유닛(PU)에서만 오차 보상이 적용된다는 정보를 포함할 수 있다. 이러한 경우에도 상기 정보는 슬라이스 헤더, 픽쳐 파라미터 셋 및/또는 시퀀스 파라미터 셋에 포함되어 전송될 수 있다.The information may differently indicate whether error compensation is applied according to a block size of a coding unit, a prediction unit, or the like. For example, the information may include information that error compensation is applied only in a coding unit CU and / or a prediction unit PU of a specific size. Even in such a case, the information may be included in the slice header, the picture parameter set, and / or the sequence parameter set and transmitted.

예를 들어, 최대 CU 크기가 128x128이고, 최소 CU 크기가 8x8이고 CTB(Coding Tree Block)의 깊이(depth)가 5이며, 오차 보상은 128x128, 64x64 크기의 CU에만 적용된다고 가정한다. 이 때, CU 크기별로 오차 보상이 적용되는 경우, CU가 가질 수 있는 크기는 5이고 CTB의 깊이가 5이므로, 오차 보상 적용 여부를 지시하기 위해 5개의 플래그(flag) 정보가 필요하다. 일 실시예로 상기 플래그 정보는 11000 및/또는 00011 등으로 표현될 수 있다. For example, suppose that the maximum CU size is 128x128, the minimum CU size is 8x8, the depth of the coding tree block (CTB) is 5, and the error compensation is applied only to the 128x128 and 64x64 size CUs. In this case, when error compensation is applied for each CU size, since the size of the CU can be 5 and the depth of the CTB is 5, five flag information is required to indicate whether the error compensation is applied. In one embodiment, the flag information may be represented as 11000 and / or 00011.

CTB의 깊이가 큰 경우 CU 크기별로 오차 보상 적용 여부에 관한 정보가 전송되는 것은 비효율적일 수 있다. 이 때는 미리 정해진 몇 가지의 경우에 대해 테이블(Table)을 정의하여 정의된 테이블 상에 나타난 정보를 지시할 수 있는 인덱스(index)를 복호화기로 전송하는 방법이 사용될 수도 있다. 상기 정의된 테이블은 부호화기 및 복호화기에 동일하게 저장될 수 있다.When the depth of the CTB is large, it may be inefficient to transmit information on whether error compensation is applied for each CU size. In this case, a method of defining a table for some predefined cases and transmitting an index capable of indicating information on the defined table to the decoder may be used. The defined table may be equally stored in the encoder and the decoder.

오차 보상을 선택적으로 적용하는 방법은 상기 실시예에 한정되는 것이 아니고, 구현 또는 필요에 따라 다양한 방법이 사용될 수 있다.The method of selectively applying the error compensation is not limited to the above embodiment, and various methods may be used depending on the implementation or the need.


인트라 모드에서도, 인터 모드의 생략 모드와 유사한 예측 모드가 사용될 수 있는 경우, 즉 주변 블록으로부터 제공 받은 정보를 이용하여 에측 블록이 생성되고 별도의 잔여 신호가 전송되지 않는 예측 모드가 사용될 수 있는 경우에는, 상술한 본 발명이 적용될 수 있다.Even in intra mode, when a prediction mode similar to that of the inter mode can be used, i.e., a prediction mode in which a prediction block is generated using information provided from neighboring blocks and a separate residual signal is not transmitted can be used. The present invention described above may be applied.


본 발명의 실시예에 따른 오차 보상을 이용한 예측 방법이 사용되는 경우, 화면 간의 조명 변화가 심한 경우, 큰 양자화 스텝의 양자화가 적용되는 경우 및/또는 다른 일반적인 경우에, 생략 모드에서 발생하는 오차가 감소될 수 있다. 따라서 율-왜곡 최적화 방식에 의해 예측 모드가 선택되는 경우, 생략 모드가 최적의 예측 모드로 선택되는 비율이 높아질 수 있고, 따라서 영상 부호화의 압축 성능이 향상될 수 있다.When the prediction method using the error compensation according to the embodiment of the present invention is used, when the lighting change between the screens is severe, when the quantization of the large quantization step is applied and / or in other general cases, the error occurring in the skipped mode Can be reduced. Therefore, when the prediction mode is selected by the rate-distortion optimization method, the rate at which the skip mode is selected as the optimal prediction mode may be increased, and thus the compression performance of image encoding may be improved.

생략 모드에 사용되는 본 발명의 실시예에 따른 오차 보상은, 이전에 부호화된 블록의 정보들만을 이용하여 수행될 수 있으므로, 복호화기도 부호화기로부터 전송되는 추가적인 정보 없이 부호화기와 동일한 오차 보상을 수행할 수 있다. 따라서 부호화기가 오차 보상을 위해 별도의 추가 정보를 복호화기로 전송할 필요가 없으므로, 부호화기에서 복호화기로 전송되는 정보량이 최소화될 수 있다.Since the error compensation according to the embodiment of the present invention used in the skip mode may be performed using only information of a previously encoded block, the decoder may also perform the same error compensation as the encoder without additional information transmitted from the encoder. have. Accordingly, since the encoder does not need to transmit additional additional information to the decoder for error compensation, the amount of information transmitted from the encoder to the decoder can be minimized.


상술한 실시예에서, 방법들은 일련의 단계 또는 블록으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiment, the methods are described based on a flowchart as a series of steps or blocks, but the present invention is not limited to the order of steps, and any steps may occur in a different order or at the same time than the other steps described above. have. 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.

상술한 실시예는 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위한 모든 가능한 조합을 기술할 수는 없지만, 해당 기술 분야의 통상의 지식을 가진 자는 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.The above-described embodiments include examples of various aspects. While not all possible combinations may be described to represent the various aspects, one of ordinary skill in the art will recognize that other combinations are possible. Accordingly, the invention is intended to embrace all other replacements, modifications and variations that fall within the scope of the following claims.

Claims (17)

현재 블록에 대한 예측 블록의 화소(pixel)값을 도출하는 단계;
상기 현재 블록에 대한 오차 보상 값을 도출하는 단계; 및
상기 예측 블록의 화소값 및 상기 오차 보상(error compensation) 값을 이용하여 최종 예측 블록의 화소값을 도출하는 단계를 포함하고,
상기 오차 보상 값은 상기 현재 블록과 참조 블록 간의 오차를 보상하기 위한 오차 보상 블록의 샘플(sample)값이고, 상기 참조 블록은 참조 영상 내의 블록으로서 상기 현재 블록 내 화소의 예측값(predictor) 관련 정보를 포함하는 블록이고,
상기 현재 블록에 대한 예측은 화면 간(intra) 생략 모드(SKIP mode)에서 수행되는 영상 복호화 방법.
Deriving a pixel value of the prediction block for the current block;
Deriving an error compensation value for the current block; And
Deriving a pixel value of a final prediction block by using the pixel value of the prediction block and the error compensation value,
The error compensation value is a sample value of an error compensation block for compensating for an error between the current block and the reference block, and the reference block is a block in a reference image and includes information related to predictor values of pixels in the current block. Is the containing block,
The prediction of the current block is performed in an intra skip mode (SKIP mode).
청구항 1에 있어서, 상기 현재 블록에 대한 예측 블록의 화소값을 도출하는 단계는,
이미 복호화된 블록을 이용하여 상기 현재 블록에 대한 움직임 정보를 도출하는 단계; 및
상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 단계를 포함하는 영상 복호화 방법.
The method of claim 1, wherein the deriving pixel value of the prediction block for the current block comprises:
Deriving motion information on the current block using an already decoded block; And
And deriving a pixel value of the prediction block by using the derived motion information.
청구항 2에 있어서, 상기 이미 복호화된 블록은 상기 현재 블록의 주변 블록을 포함하는 영상 복호화 방법.The image decoding method of claim 2, wherein the already decoded block includes a neighboring block of the current block. 청구항 2에 있어서, 상기 이미 복호화된 블록은 상기 현재 블록의 주변 블록 및 상기 참조 영상 내 동일 위치 블록(collocated block)의 주변 블록을 포함하는 영상 복호화 방법.The image decoding method of claim 2, wherein the already decoded block includes a neighboring block of the current block and a neighboring block of a colocated block in the reference image. 청구항 2에 있어서, 상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 단계에서 상기 도출된 예측 블록의 화소값은,
상기 도출된 움직임 정보가 지시하는 참조 블록의 화소값인 영상 복호화 방법.
The method according to claim 2, wherein in the step of deriving the pixel value of the prediction block using the derived motion information, the pixel value of the derived prediction block,
And a pixel value of a reference block indicated by the derived motion information.
청구항 2에 있어서, 상기 참조 블록이 2개 이상인 경우 상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 단계에서는,
상기 참조 블록의 화소값들의 가중치 합에 의해 상기 예측 블록의 화소값을 도출하고, 상기 참조 블록은 상기 도출된 움직임 정보가 지시하는 블록인 참조 영상 복호화 방법.
The method of claim 2, wherein in the case of deriving the pixel value of the prediction block by using the derived motion information when the reference block is two or more,
A pixel value of the prediction block is derived by a weighted sum of pixel values of the reference block, and the reference block is a block indicated by the derived motion information.
청구항 1에 있어서, 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계는,
상기 현재 블록의 오차 모델(error model)에 대한 오차 파라미터를 도출하는 단계; 및
상기 오차 모델 및 상기 도출된 오차 파라미터를 이용하여 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계를 포함하는 영상 복호화 방법.
The method of claim 1, wherein the derivation of an error compensation value for the current block comprises:
Deriving an error parameter for an error model of the current block; And
Deriving an error compensation value for the current block by using the error model and the derived error parameter.
청구항 7에 있어서, 상기 오차 모델은 0차 오차 모델 또는 1차 오차 모델인 영상 복호화 방법.The method of claim 7, wherein the error model is a zero-order error model or a first-order error model. 청구항 7에 있어서, 상기 현재 블록의 오차 모델에 대한 오차 파라미터를 도출하는 단계에서는,
상기 현재 블록에 대한 주변 블록 및 상기 참조 영상 내 블록에 포함된 정보를 이용하여 상기 오차 파라미터를 도출하는 영상 복호화 방법.
The method of claim 7, wherein the deriving the error parameter for the error model of the current block,
And an error parameter is derived using information included in a neighboring block of the current block and a block in the reference image.
청구항 7에 있어서, 상기 참조 블록이 2개 이상인 경우, 상기 오차 모델 및 상기 도출된 오차 파라미터를 이용하여 현재 블록에 대한 오차 보상 값을 도출하는 단계에서는,
오차 블록 값들의 가중치 합에 의해 상기 오차 보상 값을 도출하고, 상기 오차 블록 값은 각각의 참조 블록에 대해 도출된 상기 현재 블록의 오차 보상 값인 영상 복호화 방법.
The method of claim 7, wherein when the reference block is two or more, in the step of deriving an error compensation value for the current block by using the error model and the derived error parameter,
The error compensation value is derived by a weighted sum of error block values, and the error block value is an error compensation value of the current block derived for each reference block.
청구항 1에 있어서, 상기 예측 블록의 화소값 및 상기 오차 보상 값을 이용하여 최종 예측 블록의 화소값을 도출하는 단계에서는,
오차 보상 적용 여부를 지시하는 정보에 따라 상기 오차 보상 값을 선택적으로 이용하고, 상기 오차 보상 적용 여부를 지시하는 정보는 슬라이스 헤더(slice header), 픽쳐 파라미터 셋(picture parameter set) 또는 시퀀스 파라미터 셋(sequence parameter set)에 포함되어 부호화기로부터 복호화기로 전송되는 정보인 영상 복호화 방법.
The method of claim 1, wherein in the deriving the pixel value of the final prediction block by using the pixel value of the prediction block and the error compensation value,
The error compensation value may be selectively used according to the information indicating whether the error compensation is applied, and the information indicating whether the error compensation is applied may be a slice header, a picture parameter set, or a sequence parameter set. sequence parameter set), which is information transmitted from an encoder to a decoder.
현재 블록에 대한 예측 블록의 화소값을 도출하는 단계;
상기 현재 블록에 대한 오차 보상 값을 도출하는 단계; 및
상기 예측 블록의 화소값 및 상기 오차 보상 값을 이용하여 최종 예측 블록의 화소값을 도출하는 단계를 포함하고,
상기 오차 보상 값은 상기 현재 블록과 참조 블록 간의 오차를 보상하기 위한 오차 보상 블록의 샘플값이고, 상기 참조 블록은 참조 영상 내의 블록으로서 상기 현재 블록 내 화소의 예측값 관련 정보를 포함하는 블록인
화면 간 생략 모드 예측 방법.
Deriving a pixel value of the prediction block for the current block;
Deriving an error compensation value for the current block; And
Deriving a pixel value of a final prediction block by using the pixel value of the prediction block and the error compensation value;
The error compensation value is a sample value of an error compensation block for compensating an error between the current block and a reference block, and the reference block is a block in a reference image and includes a block containing information related to prediction values of pixels in the current block.
How to predict skip mode between screens.
청구항 12에 있어서, 상기 현재 블록에 대한 예측 블록의 화소값을 도출하는 단계는,
이미 복호화된 블록을 이용하여 상기 현재 블록에 대한 움직임 정보를 도출하는 단계; 및
상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 단계를 포함하는 화면 간 생략 모드 예측 방법.
The method of claim 12, wherein the step of deriving the pixel value of the prediction block for the current block,
Deriving motion information on the current block using an already decoded block; And
And deriving a pixel value of the prediction block by using the derived motion information.
청구항 12에 있어서, 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계는,
상기 현재 블록의 오차 모델(error model)에 대한 오차 파라미터를 도출하는 단계; 및
상기 오차 모델 및 상기 도출된 오차 파라미터를 이용하여 상기 현재 블록에 대한 오차 보상 값을 도출하는 단계를 포함하는 화면 간 생략 모드 예측 방법.
The method of claim 12, wherein the deriving the error compensation value for the current block,
Deriving an error parameter for an error model of the current block; And
And deriving an error compensation value for the current block by using the error model and the derived error parameter.
복호화기로부터 수신된 비트스트림(bitstream)을 확률 분포에 따라 엔트로피 복호화하여 잔여 블록(residual block) 관련 정보를 생성하는 엔트로피 복호화부;
현재 블록에 대한 예측 블록의 화소값 및 상기 현재 블록에 대한 오차 보상 값을 도출하고, 상기 예측 블록의 화소값 및 상기 오차 보상 값을 이용하여 최종 예측 블록의 화소값을 도출하는 예측부; 및
상기 잔여 블록 및 상기 최종 예측 블록을 이용하여 복원 블록을 생성하는 가산부를 포함하고,
상기 오차 보상 값은 상기 현재 블록과 참조 블록 간의 오차를 보상하기 위한 오차 보상 블록의 샘플값이고, 상기 참조 블록은 참조 영상 내의 블록으로서 상기 현재 블록 내 화소의 예측값 관련 정보를 포함하는 블록이고,
상기 예측부는 화면 간 생략 모드에서 상기 현재 블록에 대한 예측을 수행하는 영상 복호화 장치.
An entropy decoder configured to entropy decode a bitstream received from the decoder according to a probability distribution to generate residual block related information;
A prediction unit for deriving a pixel value of the prediction block for the current block and an error compensation value for the current block, and deriving a pixel value of the final prediction block using the pixel value of the prediction block and the error compensation value; And
An adder for generating a reconstruction block using the residual block and the last prediction block;
The error compensation value is a sample value of an error compensation block for compensating for an error between the current block and a reference block, and the reference block is a block in a reference image and includes a block containing information related to prediction values of pixels in the current block.
And the predictor performs prediction on the current block in an inter-screen skip mode.
청구항 15에 있어서, 상기 예측부는
이미 복호화된 블록을 이용하여 상기 현재 블록에 대한 움직임 정보를 도출하고, 상기 도출된 움직임 정보를 이용하여 상기 예측 블록의 화소값을 도출하는 영상 복호화 장치.
The method of claim 15, wherein the prediction unit
And a pixel value of the predicted block is derived using the derived motion information.
청구항 15에 있어서, 상기 예측부는
상기 현재 블록의 오차 모델에 대한 오차 파라미터를 도출하고, 상기 오차 모델 및 상기 도출된 오차 파라미터를 이용하여 현재 블록에 대한 오차 보상 값을 도출하는 영상 복호화 장치.
The method of claim 15, wherein the prediction unit
And an error parameter for the error model of the current block, and an error compensation value for the current block using the error model and the derived error parameter.
PCT/KR2011/007263 2010-09-30 2011-09-30 Method and apparatus for encoding / decoding video using error compensation Ceased WO2012044118A2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/877,055 US20130182768A1 (en) 2010-09-30 2011-09-30 Method and apparatus for encoding / decoding video using error compensation

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2010-0094955 2010-09-30
KR20100094955 2010-09-30
KR1020110099680A KR102006443B1 (en) 2010-09-30 2011-09-30 Method and apparatus for video encoding/decoding using error compensation
KR10-2011-0099680 2011-09-30

Publications (2)

Publication Number Publication Date
WO2012044118A2 true WO2012044118A2 (en) 2012-04-05
WO2012044118A3 WO2012044118A3 (en) 2012-06-14

Family

ID=45893696

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2011/007263 Ceased WO2012044118A2 (en) 2010-09-30 2011-09-30 Method and apparatus for encoding / decoding video using error compensation

Country Status (1)

Country Link
WO (1) WO2012044118A2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105103556A (en) * 2013-04-10 2015-11-25 联发科技股份有限公司 Method and apparatus for bidirectional prediction with brightness compensation
CN111194553A (en) * 2017-10-05 2020-05-22 交互数字Vc控股公司 Method and apparatus for adaptive illumination compensation in video encoding and decoding
CN114697679A (en) * 2015-09-11 2022-07-01 株式会社Kt Image decoding method, image encoding method and apparatus including bitstream
CN116112687A (en) * 2016-07-14 2023-05-12 三星电子株式会社 Video decoding method and device thereof, video encoding method and device thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100316770B1 (en) * 1997-06-20 2002-07-03 윤종용 Method and system for encoding images in consideration of perceptual color tolerance
JP3963296B2 (en) * 1999-12-27 2007-08-22 株式会社Kddi研究所 Video transmission rate conversion device
US8107748B2 (en) * 2005-09-16 2012-01-31 Sony Corporation Adaptive motion search range
JP2010074347A (en) * 2008-09-17 2010-04-02 Renesas Technology Corp Device and method for encoding moving image

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105103556A (en) * 2013-04-10 2015-11-25 联发科技股份有限公司 Method and apparatus for bidirectional prediction with brightness compensation
US9961347B2 (en) 2013-04-10 2018-05-01 Hfi Innovation Inc. Method and apparatus for bi-prediction of illumination compensation
CN105103556B (en) * 2013-04-10 2018-07-31 寰发股份有限公司 Method and apparatus for bi-directional prediction for illumination compensation
CN114697679A (en) * 2015-09-11 2022-07-01 株式会社Kt Image decoding method, image encoding method and apparatus including bitstream
US12143566B2 (en) 2015-09-11 2024-11-12 Kt Corporation Method and device for processing video signal
CN116112687A (en) * 2016-07-14 2023-05-12 三星电子株式会社 Video decoding method and device thereof, video encoding method and device thereof
CN111194553A (en) * 2017-10-05 2020-05-22 交互数字Vc控股公司 Method and apparatus for adaptive illumination compensation in video encoding and decoding

Also Published As

Publication number Publication date
WO2012044118A3 (en) 2012-06-14

Similar Documents

Publication Publication Date Title
KR102420975B1 (en) Method and apparatus for video encoding/decoding using error compensation
KR102678522B1 (en) Method for intra prediction and apparatus thereof
KR102631638B1 (en) Method and apparatus for picture encoding/decoding
JP7145252B2 (en) Video decoding method
KR102070719B1 (en) Method for inter prediction and apparatus thereof
KR102626368B1 (en) Method for inter prediction and apparatus thereof
JP2013545372A (en) Video information encoding method and decoding method
KR20130034559A (en) Method for encoding/decoding an intra prediction mode and apparatus for the same
KR20220020314A (en) Method for intra prediction and apparatus thereof
WO2013048033A1 (en) Method and apparatus for encoding/decoding intra prediction mode
WO2012044118A2 (en) Method and apparatus for encoding / decoding video using error compensation
WO2012121575A2 (en) Method and device for intra-prediction
KR102618379B1 (en) Method for inter prediction and apparatus thereof
KR20200013254A (en) Method for inter prediction and apparatus thereof

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: 11829624

Country of ref document: EP

Kind code of ref document: A2

WWE Wipo information: entry into national phase

Ref document number: 13877055

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11829624

Country of ref document: EP

Kind code of ref document: A2