WO2017188779A2 - 영상 신호 부호화/복호화 방법 및 장치 - Google Patents

영상 신호 부호화/복호화 방법 및 장치 Download PDF

Info

Publication number
WO2017188779A2
WO2017188779A2 PCT/KR2017/004569 KR2017004569W WO2017188779A2 WO 2017188779 A2 WO2017188779 A2 WO 2017188779A2 KR 2017004569 W KR2017004569 W KR 2017004569W WO 2017188779 A2 WO2017188779 A2 WO 2017188779A2
Authority
WO
WIPO (PCT)
Prior art keywords
block
current block
intra prediction
prediction
mode
Prior art date
Application number
PCT/KR2017/004569
Other languages
English (en)
French (fr)
Other versions
WO2017188779A3 (ko
Inventor
문주희
임성원
원동재
Original Assignee
인텔렉추얼디스커버리 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to KR1020227013582A priority Critical patent/KR20220054470A/ko
Priority to CN202210313457.2A priority patent/CN114584767A/zh
Application filed by 인텔렉추얼디스커버리 주식회사 filed Critical 인텔렉추얼디스커버리 주식회사
Priority to US16/097,354 priority patent/US10834420B2/en
Priority to CN201780040691.XA priority patent/CN109417619B/zh
Priority to CN202210313456.8A priority patent/CN114584766A/zh
Priority to CN202210313414.4A priority patent/CN114584764A/zh
Priority to KR1020237021205A priority patent/KR20230101932A/ko
Priority to CN202210311692.6A priority patent/CN114584763A/zh
Priority to CN202210313451.5A priority patent/CN114584765A/zh
Priority to EP17789963.0A priority patent/EP3451662A4/en
Priority to KR1020187029180A priority patent/KR20180131570A/ko
Publication of WO2017188779A2 publication Critical patent/WO2017188779A2/ko
Publication of WO2017188779A3 publication Critical patent/WO2017188779A3/ko
Priority to US17/038,260 priority patent/US11297343B2/en
Priority to US17/684,607 priority patent/US11785244B2/en
Priority to US18/351,706 priority patent/US20230353773A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/523Motion estimation or motion compensation with sub-pixel accuracy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • H04N19/126Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/56Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
    • 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/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present invention relates to a video signal encoding / decoding method and apparatus.
  • inter prediction may include performing prediction using previously reconstructed images and motion information such as a motion vector, a reference picture index, and a prediction direction. it means.
  • the higher the correlation between images the higher the prediction efficiency can be obtained.
  • the prediction between screens may be inaccurate.
  • the present invention mainly aims at improving intra prediction and inter prediction performance in encoding / decoding an image.
  • an object of the present invention is to improve inter prediction performance by using weights in encoding / decoding an image.
  • an object of the present invention is to improve the accuracy of a motion vector by using reconstruction information around a current block.
  • an object of the present invention is to improve encoding / decoding efficiency by correcting intra prediction results in encoding / decoding an image.
  • Another object of the present invention is to efficiently encode an intra prediction mode in encoding / decoding an image.
  • Another object of the present invention is to improve encoding / decoding efficiency by dividing a current block into a plurality of subblocks and performing prediction for each subblock.
  • the video signal decoding method and apparatus determine whether a current block is merged with a neighboring block neighboring the current block, and based on the determination result, obtain motion information and a weight prediction parameter of the current block.
  • the prediction block for the current block may be generated by selecting a reference block for the current block based on the motion information and applying the weight prediction parameter to the reference block.
  • the weight prediction parameter of the current block when it is determined that the current block is merged with the neighboring block, the weight prediction parameter of the current block may be set equal to the weight prediction parameter of the neighboring block.
  • the weight prediction parameter of the current block may be obtained by information decoded from a bitstream.
  • the motion information may include a motion vector, and the motion vector may be upwardly adjusted with precision based on reconstructed pixels around the current block.
  • the image signal decoding method and apparatus may perform an intra prediction on the current block by using an intra prediction mode of the current block and correct a prediction sample generated as a result of the intra prediction. It is possible to determine whether or not to, and to correct the prediction sample according to the determination result.
  • decoding the intra prediction mode information for the current block may generate a candidate mode for the current block and may be the same candidate as the intra prediction mode of the current block.
  • the present invention may determine whether a mode exists and determine an intra prediction mode of the current block based on the determination result.
  • the candidate mode may include a frequency of use of at least one intra prediction picture among a top neighboring block adjacent to the top of the current block and a left neighboring block adjacent to the left of the current block. Can be determined on the basis.
  • decoding the intra prediction mode information for the current block decoding the intra prediction mode difference value between the current block and the previous block,
  • the intra prediction mode of the current block may be determined based on the intra prediction mode and the difference value.
  • the video signal encoding method and apparatus determine motion information and weight prediction parameters of a current block and indicate whether motion information and weight prediction parameters of the current block are merged with neighboring blocks neighboring the current block. And encoding the information.
  • the prediction block of the current block may be generated by applying the weight prediction parameter to a reference block selected based on the motion information.
  • the weight prediction parameter of the current block when the current block is merged with the neighboring block, the weight prediction parameter of the current block may be set equal to the weight prediction parameter of the neighboring block.
  • the current block when the current block is not merged with the neighboring block, information related to a weight prediction parameter of the current block may be encoded.
  • the motion information includes a motion vector, and based on reconstructed pixels around the current block, information indicating whether to adjust the precision of the motion vector upwards is obtained. Can be encoded.
  • the image signal encoding method and apparatus determine an intra prediction mode for the current block, correct a prediction sample generated based on the intra prediction mode, and correct the prediction sample and the corrected prediction sample. On the basis, the method may include encoding information indicating whether to correct the prediction sample.
  • the video signal encoding method and apparatus may generate a candidate mode for the current block, determine whether the same candidate mode exists as the intra prediction mode of the current block, and based on the determination result, Information indicating whether the same candidate mode as the intra prediction mode of the current block exists may be encoded.
  • the candidate mode may include a frequency of using at least one intra prediction picture among an upper peripheral block adjacent to an upper end of the current block and a left peripheral block adjacent to a left side of the current block. Can be determined on the basis.
  • the video signal encoding method and apparatus according to the present invention may further include encoding an intra prediction mode difference value between the current block and the previous block.
  • the present invention can improve intra prediction / inter prediction efficiency in encoding / decoding an image.
  • inter prediction performance when encoding / decoding an image, inter prediction performance may be improved by using a weight.
  • the present invention can improve the precision of the motion vector by using the reconstruction information around the current block.
  • encoding / decoding efficiency can be improved by correcting an intra prediction result.
  • the present invention can effectively encode the intra prediction mode in encoding / decoding an image.
  • the present invention has the effect of improving the encoding / decoding efficiency by dividing the current block into a plurality of subblocks and performing prediction for each subblock.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 is a block diagram schematically illustrating a motion estimation method according to an embodiment of the present invention.
  • FIG. 4 is a diagram illustrating a position of a neighboring block for obtaining motion information for applying to a block to be currently encoded according to an embodiment of the present invention.
  • FIG. 5 is a diagram illustrating a change in brightness between a current picture including a current block and a reference picture.
  • FIG. 6 illustrates an example of performing intra prediction using a plane mode.
  • FIG. 7 is a diagram for describing an example of performing intra prediction using a DC mode.
  • FIG. 8 is a diagram for describing an example of performing intra prediction using a horizontal prediction mode and a vertical direction prediction mode.
  • FIG. 9 is a diagram illustrating a change in brightness between a current picture including a current block and a reference picture.
  • FIG. 10 is a flowchart illustrating a method of applying a weight prediction parameter to a current block in the image encoding apparatus.
  • 11 is a flowchart illustrating a process of encoding a weight prediction parameter.
  • FIG. 12 is a flowchart illustrating a process of decoding a weight prediction parameter in a decoding apparatus.
  • FIG. 13 is a diagram for describing an example of deriving a weight prediction parameter for a current block.
  • FIG. 14 is a diagram for describing another example of deriving a weight prediction parameter for a current block.
  • 15 is a diagram illustrating an example of deriving a weight prediction parameter using one of a left reconstructed pixel area and an upper reconstructed pixel area.
  • 16 is a diagram illustrating a weight prediction parameter set.
  • 18 is a flowchart illustrating a process of determining whether to use a correction coefficient for a current block.
  • 19 is a diagram for describing an example of determining a correction coefficient for a current block.
  • 21 is a flowchart illustrating a method of encoding information related to correction coefficients.
  • 22 is a flowchart illustrating a process of determining whether to perform correction on a current block in a decoding apparatus.
  • FIG. 23 is a flowchart illustrating a process of determining, by an encoding apparatus, whether to perform prediction on an intra prediction mode of a current block by using a reconstructed pixel area of a current block.
  • 24 is a diagram for describing an intra prediction mode prediction method using an index.
  • 25 is a diagram for describing an example of determining an intra prediction mode of a current block without using a method of predicting an intra prediction mode.
  • FIG. 26 is a diagram for describing a method of predicting an intra prediction mode of a current block by using a reconstructed pixel area of the current block.
  • FIG. 27 is a flowchart illustrating a process of encoding information related to a method of determining an intra prediction mode for a current block.
  • 28 is a flowchart illustrating a process of decoding an intra prediction mode of a current block.
  • 29 is a diagram for describing a method of performing intra prediction using a reconstructed pixel area.
  • FIG. 30 is a flowchart illustrating a method of determining an intra prediction method of a current block by using a reconstructed pixel area.
  • 31 is a flowchart illustrating a method of encoding information related to whether intra prediction is performed using a reconstructed pixel area.
  • 32 is a flowchart illustrating a method of decoding information related to whether intra prediction is performed using a reconstructed pixel area.
  • 33 illustrates a method of performing inter prediction on a current block by using reconstructed pixels around a current block.
  • 34 is a diagram illustrating an example of motion estimation that may be performed in an encoding apparatus or a decoding apparatus.
  • FIG. 35 is a diagram for describing a process of determining a prediction block having a size of 4x4 by using a motion vector estimated in units of quarter-position pixels.
  • 36 is a flowchart illustrating a process of determining whether to perform inter prediction using a reconstructed pixel area.
  • 37 is a flowchart illustrating a process of encoding an inter-screen prediction method for a current block.
  • 38 is a flowchart illustrating a process of decoding an inter prediction method for a current block.
  • 39 is a diagram for describing an example of improving a motion vector of a current block by using a reconstructed pixel area.
  • 40 is a flowchart illustrating a process of determining a motion vector in an encoding apparatus.
  • FIG. 41 is a flowchart illustrating a process of selecting an optimal motion vector in an encoding apparatus when values of basic precision K and additional precision L are adaptively selected in units of blocks.
  • FIG. 42 is a diagram illustrating a process of encoding an optimal motion vector of a current block.
  • 43 is a diagram illustrating a process of decoding an optimal motion vector of a current block.
  • 44 is a flowchart illustrating a process of obtaining an improved motion vector in a decoding apparatus.
  • 45 is a flowchart illustrating a process of encoding intra prediction information about each sub block when a current block is divided into a plurality of sub blocks.
  • 46 and 47 illustrate an example in which a current block is divided into a plurality of subblocks.
  • 48 is a diagram for describing an example of determining a weight for a subblock.
  • 49 is a flowchart illustrating a process of encoding information related to a weight to be applied to each subblock.
  • 50 is a diagram for describing a process of encoding an intra prediction mode for a subblock to be currently encoded.
  • 51 is a diagram illustrating an example of numbering prediction modes in a residual picture.
  • 52 is a flowchart illustrating a process of encoding an intra prediction mode of a current block.
  • FIG. 53 is a diagram for explaining an example of determining an intra prediction mode on a subblock basis.
  • 54 is a flowchart illustrating a process of encoding an intra prediction mode for a subblock.
  • 55 is a diagram for describing an example of encoding an intra prediction mode according to subblocks in more detail.
  • 56 is a flowchart illustrating a process of decoding intra prediction information of a sub block by a decoding apparatus.
  • 57 is a flowchart illustrating a process of decoding weight related information.
  • 58 is a flowchart illustrating a process of decoding an intra prediction mode for a subblock to be currently decoded.
  • 59 is a diagram for describing another example of decoding an intra prediction mode for a subblock.
  • 60 is a diagram for describing an example of determining whether to use a curve mode.
  • FIG. 61 is a flowchart illustrating a process of encoding an intra prediction mode of each subblock based on curve mode information.
  • FIG. 62 is a flowchart illustrating a process of decoding an intra prediction mode of each sub block through information of a curve mode.
  • 63 to 65 are diagrams for describing a method of performing intra prediction on a sub block when a transformation is performed on a higher block basis.
  • 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.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
  • the image encoding apparatus 100 may include an image splitter 110, a predictor 120 and 125, a transformer 130, a quantizer 135, a realigner 160, and an entropy encoder. 165, an inverse quantizer 140, an inverse transformer 145, a filter 150, and a memory 155.
  • each of the components shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each of the components 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 divider 110 may divide the input image into at least one block.
  • the block may mean a coding unit (CU), a prediction unit (PU), or a transformation unit (TU).
  • the partitioning may be performed based on at least one of a quadtree or a binary tree.
  • Quad tree is a method of dividing an upper block into lower blocks having a width and a height of half of the upper block.
  • the binary tree divides the upper block into lower blocks, which are half of the upper block in either width or height.
  • blocks may have a square as well as non-square shape.
  • a coding unit may be used as a unit for encoding or may be used as a unit for decoding.
  • the prediction units 120 and 125 may include an inter prediction unit 120 performing inter prediction and an intra prediction unit 125 performing intra prediction. Whether to use inter prediction or intra prediction may be determined for the prediction unit, and specific information (eg, intra prediction mode, motion vector, reference image, etc.) according to each prediction method may be determined. In this case, the processing unit in which the prediction is performed may differ from the processing unit in which the prediction method and the details are determined. For example, the method of prediction and the prediction mode may be determined in the prediction unit, and the prediction may be performed in the transform unit.
  • the residual value (residual block) between the generated prediction block and the original block may be input to the transformer 130.
  • prediction mode information and motion vector information used for prediction may be encoded by the entropy encoder 165 together with the residual value and transmitted to the decoder.
  • the original block may be encoded as it is and transmitted to the decoder without generating the prediction block through the prediction units 120 and 125.
  • the inter prediction unit 120 may predict the prediction unit based on the information of at least one of the previous image or the subsequent image of the current image, and in some cases, based on the information of the partial region in which the encoding is completed in the current image.
  • the prediction unit may be predicted.
  • the inter prediction unit 120 may include a reference image interpolator, a motion information generator, and a motion compensator.
  • the reference image interpolator may receive reference image information from the memory 155 and generate pixel information of an integer pixel or less in the reference image.
  • a DCT based 8-tap interpolation filter having different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1/4 pixels.
  • a DCT-based interpolation filter having different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/8 pixels.
  • the motion information generator may generate motion information based on the reference image interpolated by the reference image interpolator.
  • the motion information means a motion vector, a reference picture index, a prediction direction, and the like.
  • various methods such as a full search-based block matching algorithm (FBMA), a three step search (TSS), and a new three-step search algorithm (NTS) may be used.
  • the motion vector may have a motion vector value of 1/2 or 1/4 pixel units based on the interpolated pixels.
  • the current prediction unit may be predicted by using different motion information generation methods.
  • various methods such as a merge method using a motion vector of a neighboring block, a motion estimation method (for example, an adaptive motion vector prediction (AMVP)), and the like may be used.
  • AMVP adaptive motion vector prediction
  • FIG. 3 illustrates an example of generating motion information through motion estimation.
  • the motion estimation is to determine a motion vector, a reference picture index, and an inter prediction prediction direction of the current block according to the determination if the same or similar reference block is determined as the prediction block in the reference picture that has already been encoded and decoded.
  • the encoding apparatus predicts a motion vector estimated in the current block to generate a predictive motion vector (MVP) and generates a difference value between the motion vector and the generated predicted motion vector (MVD: Motion Vector Difference) can be encoded.
  • MVP predictive motion vector
  • MVP Motion Vector Difference
  • the method of using the motion vector of the neighboring block is to apply motion information of the neighboring block neighboring the current block to the current block.
  • the neighboring block may include a spatial neighboring block adjacent to the current block and a temporal neighboring block existing at the same position as the current block included in the reference image.
  • FIG. 4 illustrates a neighboring block of the current block.
  • the encoding apparatus may determine the motion information of the current block by applying motion information of neighboring blocks (spatial neighboring blocks A to E and temporal neighboring block Col) shown in FIG. 4 to the current block.
  • Col means a block having the same or similar position as the current block existing in the reference picture.
  • the intra prediction unit 125 may generate a prediction unit based on reference pixel information around a current block that is pixel information in the current image. If the neighboring block of the current prediction unit is a block that performs inter prediction, and the reference pixel is a pixel that is reconstructed by performing inter prediction, the intra prediction of the neighboring reference pixels included in the block that performed the inter prediction is performed. It may be used instead of the reference pixel information of the performed block. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with at least one reference pixel among the available reference pixels.
  • a prediction mode may have a directional prediction mode using reference pixel information according to a prediction direction, and a non-directional mode using no directional information when performing prediction.
  • the mode for predicting the luminance information and the mode for predicting the color difference information may be different, and the intra prediction mode information or the predicted luminance signal information used for predicting the luminance information may be utilized to predict the color difference information. .
  • FIG. 5 is a diagram illustrating intra prediction modes.
  • 0 and 1 may be a non-directional prediction mode (or non-angular prediction mode), and may represent a planar mode and a DC mode, respectively.
  • 2 to 34 indicate a directional prediction mode (or an angular prediction mode).
  • FIG. 5 illustrates 35 intra prediction modes
  • a larger number of intra prediction modes may be used, or a smaller number of intra prediction modes may be used.
  • 67 intra prediction modes may be used to encode a current block
  • 19 intra prediction modes may be used to encode a current block.
  • the number of intra prediction modes available in the encoding target block may vary according to the size or shape of the block to be encoded.
  • FIG. 6 illustrates an example of performing intra prediction using a plane mode.
  • the prediction pixel may be generated based on the vertical prediction pixel and the horizontal prediction pixel.
  • the horizontal prediction pixel P1 may be generated by linear interpolation between the reconstructed pixel at the same position on the Y-axis as the P1 and the reconstructed pixel T present at the upper right of the current block.
  • the vertical prediction pixel P2 may be generated by linear interpolation between the reconstructed pixel at the same position on the X-axis as the P2 and the reconstructed pixel L present at the lower left of the current block.
  • the prediction pixel may be generated based on a value obtained by averaging the horizontal prediction pixel P1 and the vertical prediction pixel P2.
  • FIG. 7 is a diagram for describing an example of performing intra prediction using a DC mode.
  • the prediction pixel may be generated based on the average value of the reconstructed pixels around the current block. Since the average value of the reconstructed pixels around the current block is generated as the prediction pixel, the prediction pixels in the prediction block have a uniform pixel value.
  • FIG. 8 is a diagram for describing an example of performing intra prediction using a horizontal prediction mode and a vertical direction prediction mode.
  • the prediction pixel may be generated by copying a value of the reference pixel located in the horizontal direction (that is, the reference pixel adjacent to the left side of the current block).
  • the prediction pixel may be generated by copying a value of the reference pixel located in the vertical direction (ie, the reference pixel adjacent to the top of the current block).
  • a reference pixel located in the direction indicated by the directional prediction mode may be generated as the prediction pixel. If two or more reference pixels exist in the direction indicated by the directional prediction mode, the prediction pixels may be generated by interpolating two or more reference pixels.
  • the intra prediction method may generate a prediction block after applying an adaptive intra smoothing (AIS) filter to a reference pixel according to a prediction mode.
  • AIS adaptive intra smoothing
  • the intra prediction mode of the current prediction unit may be predicted from the intra prediction mode of the prediction unit existing around the current prediction unit.
  • the intra prediction mode of the current prediction unit is predicted by using the intra prediction mode information predicted from the neighboring prediction unit, if the intra prediction mode of the current prediction unit and the neighboring prediction unit are the same, the current flag is determined using predetermined flag information Information that the prediction modes of the prediction unit and the neighboring prediction unit are the same may be transmitted. If the prediction modes of the current prediction unit and the neighboring prediction unit are different, entropy encoding may be performed to encode the prediction mode information of the current block.
  • a residual block may include a prediction unit performing prediction based on the prediction units generated by the prediction units 120 and 125 and residual information including residual information that is a difference from an original block of the prediction unit.
  • the generated residual block may be input to the transformer 130.
  • the transform unit 130 may transform the residual block including the residual data by using a transformation method such as DCT, DST, or Karhunen Loeve Transform (KLT).
  • a transformation method such as DCT, DST, or Karhunen Loeve Transform (KLT).
  • the conversion method may be determined based on an intra prediction mode of the prediction unit used to generate the residual block. For example, according to the intra prediction mode, DCT may be used in the horizontal direction and DST may be used in the vertical direction.
  • the quantization unit 135 may quantize the values converted by the transformer 130 into the frequency domain.
  • the quantization coefficient may change depending on the block or the importance of the image.
  • the value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the reordering unit 160.
  • the transformer 130 and / or the quantizer 135 may be selectively included in the image encoding apparatus 100. That is, the image encoding apparatus 100 may encode the residual block by performing at least one of transform or quantization on the residual data of the residual block, or skipping both transform and quantization. Even if neither the transformation nor the quantization is performed or neither the transformation nor the quantization is performed in the image encoding apparatus 100, a block entering the input of the entropy encoder 165 is generally referred to as a transform block.
  • the reordering unit 160 may reorder coefficient values with respect to the quantized residual value.
  • the reordering unit 160 may change the two-dimensional block shape coefficients into a one-dimensional vector form through a coefficient scanning method. For example, the reordering unit 160 may scan a DC coefficient to a coefficient of a high frequency region by using a predetermined scan type and change it into a one-dimensional vector.
  • the entropy encoder 165 may perform entropy encoding based on the values calculated by the reordering unit 160. Entropy encoding may use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
  • Entropy encoding may use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
  • the entropy encoder 165 receives residual value coefficient information, block type information, prediction mode information, partition unit information, prediction unit information, transmission unit information, and motion of the coding unit from the reordering unit 160 and the prediction units 120 and 125. Various information such as vector information, reference image information, interpolation information of a block, and filtering information may be encoded.
  • the coefficient of the transform block is a flag indicating whether or not the partial block in the transform block is 0, a flag indicating whether the absolute value of the coefficient is greater than 1, and whether the absolute value of the coefficient is greater than 2
  • a flag indicating may be encoded.
  • the entropy encoder 165 encodes the sign of the coefficient only for coefficients other than zero. And the coefficient whose absolute value of a coefficient is larger than 2 codes the remaining value which subtracted 2 from the absolute value.
  • the entropy encoder 165 may entropy encode a coefficient value of a coding unit input from the reordering unit 160.
  • the inverse quantizer 140 and the inverse transformer 145 inverse quantize the quantized values in the quantizer 135 and inversely transform the transformed values in the transformer 130.
  • the residual value generated by the inverse quantizer 140 and the inverse transformer 145 may be combined with the prediction block generated for each prediction unit through the predictors 120 and 125 to generate a reconstructed block.
  • the filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • a deblocking filter may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • ALF adaptive loop filter
  • the deblocking filter may remove block distortion caused by boundaries between blocks in the reconstructed image.
  • it may be determined whether to apply the deblocking filter to the current block based on the pixels included in several columns or rows included in the block.
  • a strong filter or a weak filter may be applied according to the required deblocking filtering strength.
  • horizontal filtering and vertical filtering may be performed in parallel when vertical filtering and horizontal filtering are performed.
  • the offset correction unit may correct the offset with respect to the original image on a pixel-by-pixel basis for the deblocking image.
  • the pixels included in the image are divided into arbitrary regions, and then, an area to be offset is determined and an offset is applied to the corresponding region, or offset is determined in consideration of edge information of each pixel.
  • the method of application may be used.
  • Adaptive Loop Filtering may be performed based on a value of comparing the filtered reconstructed image with the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group may be determined and filtering may be performed for each group. Information regarding whether to apply the ALF may be transmitted for each coding unit (CU) in the case of a luminance signal, and the shape and filter coefficient of the ALF filter to be applied may vary according to each block. In addition, regardless of the characteristics of the block to be applied, the same type (fixed form) of the ALF filter may be applied.
  • CU coding unit
  • the same type (fixed form) of the ALF filter may be applied.
  • the memory 155 may store the reconstructed block or image calculated by the filter unit 150, and the stored reconstructed block or image may be provided to the predictors 120 and 125 when performing inter prediction.
  • FIG. 2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
  • the image decoder 200 includes an entropy decoder 210, a reordering unit 215, an inverse quantizer 220, an inverse transformer 225, a predictor 230, 235, and a filter unit ( 240, a memory 245 may be included.
  • the input bitstream may be decoded by a procedure opposite to that of the image encoder.
  • the entropy decoder 210 may perform entropy decoding in a procedure opposite to that of the entropy encoding performed by the entropy encoder of the image encoder. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied to the method performed by the image encoder.
  • the coefficient of the transform block is a flag indicating whether or not the partial block in the transform block is 0, a flag indicating whether the absolute value of the coefficient is greater than 1, and whether the absolute value of the coefficient is greater than 2 May be decoded.
  • the entropy decoding unit 210 then decodes the sign of the coefficient with respect to the nonzero coefficient. For a coefficient whose absolute value is greater than 2, the remaining value after subtracting 2 may be decoded.
  • the entropy decoder 210 may decode information related to intra prediction and inter prediction performed by the encoder.
  • the reordering unit 215 may reorder the entropy decoded bitstream by the entropy decoding unit 210 based on a method of rearranging the bitstream. Coefficients expressed in the form of a one-dimensional vector may be reconstructed by reconstructing the coefficients in a two-dimensional block form.
  • the reordering unit 215 may be realigned by receiving information related to coefficient scanning performed by the encoder and performing reverse scanning based on the scanning order performed by the corresponding encoder.
  • the inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoder and the coefficient values of the rearranged block.
  • the inverse transform unit 225 may perform inverse transform on the inverse quantized transform coefficients using a predetermined transform method.
  • the conversion method may be determined based on information on a prediction method (inter prediction / intra prediction), the size / shape of a block, an intra prediction mode, and the like.
  • the prediction units 230 and 235 may generate the prediction block based on the prediction block generation related information provided by the entropy decoder 210 and previously decoded blocks or image information provided by the memory 245.
  • the predictors 230 and 235 may include a prediction unit determiner, an inter prediction unit, and an intra prediction unit.
  • the prediction unit determiner receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and distinguishes the prediction unit from the current coding unit. In addition, it may be determined whether the prediction unit performs inter prediction or intra prediction.
  • the inter prediction unit 230 may use information necessary for inter prediction of the current prediction unit provided by the image encoder, based on information included in at least one of a previous image or a subsequent image of the current image including the current prediction unit. Inter-prediction of the current prediction unit may be performed. Alternatively, inter-screen prediction may be performed based on information of some pre-restored regions in the current image including the current prediction unit.
  • a motion information generating method of a prediction unit included in a coding unit is generated by a merge method or a motion estimation method based on a coding unit.
  • the intra prediction unit 235 may generate a prediction block based on pixel information in the current image.
  • the intra prediction may be performed based on the intra prediction mode information of the prediction unit provided by the image encoder.
  • the intra prediction unit 235 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter.
  • the AIS filter is a part of filtering the reference pixel of the current block and determines whether to apply the filter according to the prediction mode of the current prediction unit.
  • AIS filtering may be performed on the reference pixel of the current block by using the prediction mode and the AIS filter information of the prediction unit provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
  • the reference pixel interpolator may generate reference pixels having an integer value or less by interpolating the reference pixels. If the prediction mode of the current prediction unit is a prediction mode for generating a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated.
  • the DC filter may generate the prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the reconstructed block or image may be provided to the filter unit 240.
  • the filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
  • Information about whether a deblocking filter is applied to a corresponding block or an image and when the deblocking filter is applied to the corresponding block or the image may be provided from the image encoder as to whether a strong filter or a weak filter is applied.
  • the deblocking filter of the image decoder the deblocking filter related information provided by the image encoder may be provided and the deblocking filtering of the corresponding block may be performed in the image decoder.
  • the offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction and offset value information applied to the image during encoding.
  • the ALF may be applied to a coding unit based on ALF application information, ALF coefficient information, and the like provided from the encoder. Such ALF information may be provided included in a specific parameter set.
  • the memory 245 may store the reconstructed image or block to use as a reference image or reference block, and may provide the reconstructed image to the output unit.
  • the 'current block' may mean an encoding / decoding target block. Furthermore, the current block may mean a coding tree block, an encoding block, a prediction block, a transform block, or the like according to an encoding / decoding process.
  • FIG. 9 is a diagram illustrating a change in brightness between a current picture including a current block and a reference picture.
  • the greater the brightness change between the current picture and the reference picture the greater the brightness change between the prediction block to be selected in the current block and the reference picture. Therefore, as the error due to the inter prediction of the current block increases, it is expected that the energy of the residual signal of the current block also increases. And, as the energy for the residual signal increases, the error due to quantization can also be expected to increase. As a result, if there is a brightness change between the current picture and the reference picture, the error for the residual block will increase as compared to when there is no brightness change.
  • the present invention is to propose a method for generating a weight prediction parameter by estimating the brightness change between images and performing the inter prediction using the weight prediction parameter.
  • FIG. 10 is a flowchart illustrating a method of applying a weight prediction parameter to a current block in the image encoding apparatus.
  • the encoding apparatus may encode the motion information and the weight prediction information (weight prediction parameter, the weight prediction control information) of the neighboring block as the motion information and the weight prediction information of the current block.
  • the weight prediction control information may indicate whether to use a weight prediction parameter when performing inter prediction
  • the weight prediction parameter may indicate a weight value used in inter prediction.
  • the encoding apparatus may calculate a cost (cost A) when using the inter-prediction block for the current block by using the motion information and the weight prediction information derived from the neighboring block (S1001).
  • the neighboring block may include a spatial neighboring block adjacent to the current block and a temporal neighboring block having the same or similar position as the current block in the reference image.
  • the spatial neighboring blocks, A to E and the temporal neighboring block, Col, etc. illustrated in FIG. 4 may be defined as neighboring blocks of the current block.
  • the encoding apparatus determines optimal motion information for the current block through motion estimation, temporarily generates a prediction block for the current block using the estimated motion information, and based on the generated prediction block,
  • the weight prediction parameter for the block may be estimated (S1002).
  • the weight prediction parameter may include at least one of a multiplication parameter multiplied by the prediction pixel or an addition parameter added to the prediction pixel.
  • the multiplication parameter and the addition parameter may be derived based on the regression analysis. For example, Equation 1 below shows an example of a regression analysis model.
  • Equation 1 Y denotes original data of a current block, X denotes data of a prediction block temporarily generated for the current block, w denotes a slope of a regression line, o denotes an intercept value of the regression line, and e denotes a regression line prediction error.
  • Y is an original pixel value of the current block, and may be a range of all or a portion of the current block, and X is a pixel value of a prediction block temporarily generated for the current block. Can be made into a range.
  • the weight prediction parameter may be obtained by partial differential of Equation 1 into w and o, respectively.
  • w and o which minimize the square of the error e may be set as multiplication parameters and addition parameters, respectively.
  • the weight prediction parameter value calculated based on Equation 1 may have a real value.
  • the weight prediction parameter may be set to a real value calculated based on Equation 1, or may be set to an integer value in which the real value calculated based on Equation 1 is integerized.
  • the weight prediction parameter may be derived as an integer value derived by multiplying 2N by a real value calculated based on Equation 1.
  • the variable N used to integerize the weight prediction parameter may be encoded through a block unit, an area unit, or an upper header.
  • the encoding device and the decoding device may use the preset N. In the embodiments described below, it is assumed that multiply by 2 N to be used in the integer state.
  • the regression model described through Equation 1 may be used to estimate the weight prediction parameter for the current block, but the method for estimating the weight prediction parameter for the current block is described. It is not limited to the example. In addition to the regression analysis model, the weight prediction parameter for the current block may be estimated.
  • the encoding apparatus When the estimation of the weight prediction parameter for the current block is completed, the encoding apparatus does not apply the cost (cost B) and the estimated weight prediction parameter when the estimated weight prediction parameter is applied to the temporarily generated prediction block for the current block.
  • the cost (cost C) when not in operation can be calculated (S1003).
  • the encoding apparatus may determine whether to use the weight prediction information for the current block and whether to use the weight prediction information for the current block by merging with the neighboring block through the comparison between costs.
  • the encoding apparatus compares the cost (cost B) when the weight prediction parameter estimated in the current block is applied to the cost (cost C) when the weight prediction parameter estimated in the current block is not applied. For, it may be determined whether it is optimal to apply the estimated weight prediction parameter (S1004).
  • the encoding apparatus compares the cost (cost A) of the case in which the weight prediction parameter and the motion information of the neighboring block are applied with that determined to be optimal among the cost B and the cost C, and estimated motion information and estimated in the current block. Whether to use the weight prediction information or to merge the motion information and the weight prediction information existing in the neighboring block or whether to use the weight prediction information may be determined (S1005).
  • 11 is a flowchart illustrating a process of encoding weight prediction information.
  • the encoding apparatus may encode information indicating whether the motion information and the weight prediction information of the current block are merged with the neighboring block (S1101).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the encoding apparatus may encode information for identifying the neighboring block merged with the current block (S1103).
  • the information for identifying the neighboring block may be index information indicating the index of the neighboring block merged with the current block among the neighboring blocks.
  • the encoding apparatus encodes the motion information used to encode the current block (S1104), and then, for the current block.
  • Information indicating whether to use the weight prediction parameter (that is, weight prediction control information) may be encoded (S1105).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the encoding apparatus may not encode information related to the weight prediction parameter.
  • the encoding apparatus may encode information about the weight prediction parameter of the current block (S1107).
  • the information on the weight prediction parameter may be a weight prediction parameter or a difference value of the weight prediction parameter.
  • the encoding apparatus may set 1 ⁇ N as a predicted value of the weighted predictive parameter according to N used for integerization of the weighted predictive parameter, and then encode a difference value between the weighted predictive parameter and the predicted value.
  • the encoding using the prediction value and the difference value may be applied to at least one of a multiplication parameter and an addition parameter of the weight prediction parameter.
  • the multiplication parameter may be encoded using the difference between the multiplication parameter and the prediction value, while the addition parameter may be encoded as it is.
  • the encoding apparatus may encode a difference value between the weight prediction parameter of the current block and the weight prediction parameter of the neighboring block adjacent to the current block.
  • the weight prediction parameters are (59, 4).
  • w may represent a multiplication parameter
  • o may represent an addition parameter.
  • All the neighboring blocks AE and Col were inter-screen predicted in the past direction, and each weight prediction parameter was (51, 0), (62, 4), (59, 4), (64, -1), (59). , 2), (70, 4).
  • the encoding apparatus includes a neighboring block having the lowest cost among neighboring blocks, a weight prediction parameter of a neighboring block having a minimum difference value from a weight prediction parameter of a current block, or a difference value from a weight prediction parameter of a current block and an assigned index.
  • information related to the weight prediction parameter of the current block may be encoded using the weight prediction parameter of the neighboring block that is optimally determined. For example, when it is selected that the encoding apparatus uses optimally the weight prediction parameter of the C block as the prediction value among the weight prediction parameters of A to E and Col, the weight prediction parameter of the C block (ie, (59, 4)) is selected.
  • the encoding apparatus may encode index information for identifying the selected neighboring block (eg, C).
  • the cost may be determined after calculating using the difference value of the index information and the weight parameter when calculating the cost to select the best candidate.
  • the encoding apparatus may determine whether each of the motion information and the weight prediction parameter of the current block is merged with the neighboring block.
  • the motion information of the current block may be set to be the same as that of the neighboring block, while the weight prediction parameter of the current block may be set to a value by estimation.
  • whether the motion information of the current block is merged into the neighboring block, whether the weight prediction parameter of the current block is merged into the neighboring block, and the weight prediction parameter derived by the estimation may be encoded as separate information.
  • FIG. 12 is a flowchart illustrating a process of decoding a weight prediction parameter in a decoding apparatus.
  • the decoding apparatus may decode information indicating whether motion information and weight prediction information of the current block are merged with the neighboring block (S1201).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the decoding apparatus may decode information for identifying the neighboring block merged with the current block (S1203).
  • the information for identifying the neighboring block may be index information indicating the index of the neighboring block merged with the current block among the neighboring blocks.
  • the decoding apparatus may set the motion information and the weight prediction information of the neighboring block specified by the index information as the motion information and the weight prediction information of the current block.
  • the decoding apparatus decodes the motion information used to decode the current block (S1204), and the current block Information indicating whether to use the weight prediction parameter (that is, weight prediction control information) may be decoded (S1205).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the decoding apparatus may not decode information related to the weight prediction parameter.
  • the decoding apparatus may decode information about the weight prediction parameter of the current block (S1207).
  • the information on the weight prediction parameter may indicate a weight prediction parameter, or may indicate a difference value between the weight prediction parameter and the prediction value of the weight prediction parameter.
  • the decoding apparatus may use 1 ⁇ N as a prediction value of the weight prediction parameter based on the variable N for integerization of the weight prediction parameter.
  • the decoding apparatus may obtain the weight prediction parameter of the current block by adding the prediction value of the weight prediction parameter and the weight prediction parameter difference value decoded from the bitstream.
  • the decoding using the prediction value and the difference value may be applied to at least one of a multiplication parameter and an addition parameter of the weight prediction parameter.
  • the multiplication parameter may be decoded using the prediction value and the difference value, while the addition parameter may use the value decoded through the bitstream as it is.
  • the information related to the weight prediction parameter transmitted through the bitstream may indicate a difference value between the weight prediction parameter of the current block and the weight prediction parameter of the neighboring block.
  • the decoding apparatus decodes the identification information for identifying the neighboring block, and adds the decoded weight prediction parameter difference value to the weight prediction parameter of the neighboring block specified by the decoded identification information to thereby weight the prediction parameter for the current block. Can be obtained.
  • inter prediction of the current block may be performed using the weight prediction parameter.
  • the decoding apparatus may perform inter prediction by applying a weight prediction parameter to a prediction block for the current block. Specifically, the decoding apparatus may multiply a pixel included in the prediction block by a multiplication parameter, add an addition parameter to the multiplication result, and perform inter prediction on the current block.
  • the decoding apparatus may separately decode the information about whether the motion information of the current block is merged into the neighboring block and the information about whether the weight prediction parameter of the current block is merged with the neighboring block. According to each information, it may be determined whether to merge the motion information of the current block with the neighboring block and whether to merge the weight prediction parameter of the current block with the weight prediction parameter of the neighboring block.
  • the encoding apparatus encodes information related to the weight prediction parameter through a bitstream, and the decoding apparatus decodes information related to the weight prediction parameter from the bitstream, thereby obtaining a weight prediction parameter for the current block. As described above.
  • the encoding apparatus and the decoding apparatus may derive the weight prediction parameter in the same manner without encoding / decoding the weight prediction parameter for the current block.
  • the encoding / decoding step of the weight prediction parameter described above with reference to FIGS. 11 and 12 may be omitted.
  • FIG. 13 is a diagram for describing an example of deriving a weight prediction parameter for a current block.
  • the prediction block for the current block may be generated based on the reference block indicated by the motion vector of the current block in the reference picture.
  • the encoding apparatus and the decoding apparatus include reconstructed pixels around the current block in the current image (pixels denoted by 'B' in FIG. 13) and reconstructed pixels around the reference block (that is, the prediction block for the current block) in the reference image. 13, pixels denoted as 'A' may be used to derive a weight prediction parameter for the current block.
  • the reconstructed pixels B around the current block are applied to Y
  • the reconstructed pixels A around the reference block that is, the prediction block for the current block
  • the weight prediction parameter for the current block can be derived.
  • w and o calculated by applying the reconstruction pixels around the current block and the reconstruction pixels around the reference block may be set as multiplication parameters and an addition parameter, respectively.
  • a weight prediction parameter is derived using reconstructed pixels included in one line adjacent to the current block and the reference block.
  • a weight prediction parameter may be used by using reconstructed pixels included in a plurality of lines around a current block and a reference block. Whether to use a plurality of lines or the number of lines used to estimate the weight prediction parameter may be coded through a block unit or an upper header and transmitted to the decoding apparatus.
  • FIG. 14 is a diagram for describing another example of deriving a weight prediction parameter for a current block.
  • the encoding apparatus and the decoding apparatus may derive the weight prediction parameter for the current block based on the tendency of the neighboring pixels present in each of the current block and the reference block.
  • the encoding apparatus and the decoding apparatus derive the first weight prediction parameter based on the neighboring pixels adjacent to the current block or the reference block, and are not adjacent to the current block or the reference block, but are adjacent to the current block or the reference block. Based on the second neighboring pixels adjacent to the neighboring pixels, a second weight prediction parameter may be derived.
  • the encoding apparatus and the decoding apparatus may include a first weight based on neighboring pixels A adjacent to the current block and neighboring pixels C adjacent to the reference block (prediction block). Generate a prediction parameter and generate neighboring pixels B adjacent to the current block, but not adjacent to the current block, and adjacent pixels C, adjacent to the reference block, but not adjacent to the reference block. A second weight prediction parameter may be generated based on the adjacent neighboring pixels D.
  • the weight prediction parameter of the current block may be derived by applying the difference value of the first weight prediction parameter and the second weight prediction parameter to the first weight prediction parameter. For example, when the first weight prediction parameter is (59, 4) and the second weight prediction parameter is (59, 5), the difference between the first weight prediction parameter and the second weight prediction parameter is (0, -1). )to be. Accordingly, the weight prediction parameter for the current block may be determined as (59, 3) applying the difference value to the first weight prediction parameter.
  • the weight prediction parameter may be set for each position of a pixel in the prediction block. Assuming that the difference between the first weight prediction parameter and the second weight prediction parameter is (0, -1), the weight prediction parameter applied to the prediction block may be set differently according to the pixel position in the prediction block. .
  • a weight prediction parameter applied to a pixel present at an edge of a prediction block may be determined as (59, 3) applying the difference value to a first weight prediction parameter.
  • the pixels existing at the edge of the prediction block may include pixels adjacent to the left boundary and the upper boundary of the prediction block (eg, pixels positioned at 'a' in FIG. 14).
  • a weight prediction parameter obtained by applying the difference value may be applied to a pixel adjacent to a pixel existing at the edge of the prediction block and to a weight prediction parameter applied to the pixel existing at the edge of the prediction block.
  • a weight prediction parameter applied to a pixel adjacent to a pixel existing at an edge of the prediction block is a weight prediction applied to a pixel located at an edge of the prediction block. It can be determined as (59, 2) applying the difference value to the parameter (59, 3).
  • weight prediction parameters for each pixel position may be applied by repeatedly applying a difference value between the first weight prediction parameter and the second weight prediction parameter. Accordingly, in the example illustrated in FIG. 14, (59, 3) is used for pixels in the 'a' position, (59, 2) is used in the pixels in the 'b' position, and (59, 2) is used in the pixels in the 'c' position. 1), a weight prediction parameter of (59, 0) may be applied to the pixel at the 'd' position.
  • the weight prediction parameter is estimated using two lines around the current block and the reference block. Unlike the example shown, the weight prediction parameter may be estimated using two or more lines around the current block and the reference block. Whether to use two or more lines or the number of lines used to estimate the weight prediction parameter may be encoded in a block unit or higher header and transmitted to the decoding apparatus.
  • whether the weight prediction parameter of the current block is to be determined using the weight prediction parameter of the neighboring pixels present in each of the current block and the reference block, or the weight prediction of the pixels around the current block and the reference block.
  • Whether to determine the weight prediction parameter of the current block by reflecting the tendency of the parameter may be encoded through a block unit or an upper header. Alternatively, either method may be fixedly used in the encoding apparatus and the decoding apparatus.
  • the weight prediction parameter may be derived through any one of a reconstructed pixel area around the left side of the current block and the reference block and a reconstructed pixel area around the top side.
  • FIG. 15 illustrates an example of deriving a weight prediction parameter using one of a left reconstructed pixel area and an upper reconstructed pixel area.
  • the encoding apparatus may derive a first weight prediction parameter by using pixels A and C included in the reconstructed pixel region adjacent to the current block and the reference block.
  • the encoding apparatus may derive the second weight prediction parameter using pixels B and D included in the reconstructed pixel region adjacent to the left side of the current block and the reference block.
  • the encoding apparatus may determine an optimal weight prediction parameter for the current block by comparing the first weight prediction parameter and the second weight prediction parameter.
  • the encoding apparatus may include information indicating which area of the left reconstructed pixel area and the upper reconstructed pixel area of the current block and the reference block to use, or a weight that is optimal for the current block among the first weight prediction parameter and the second weight prediction parameter.
  • Information indicating a prediction parameter may be encoded and transmitted to the decoding apparatus.
  • the encoding apparatus and the decoding apparatus may estimate the weight prediction parameter by using any one of the fixed one of the upper reconstructed pixel region and the left reconstructed pixel region according to the shape of the block. For example, if the block to be encoded currently has a longer rectangular shape, the weight prediction parameter is estimated using only the upper reconstructed pixel area. If the block to be currently encoded is a longer rectangular shape, only the left reconstructed pixel area is used. It is also possible to estimate the weight prediction parameter. Alternatively, if the current block to be encoded is in a square shape, it is also possible to estimate the weight prediction parameter using all of the upper and left reconstructed pixel areas.
  • the encoding apparatus configures a weight prediction parameter set including a plurality of weight prediction parameters using the weight prediction parameters estimated through the reconstructed pixel region, and determines an optimal weight prediction parameter for the current block among the weight prediction parameter sets. Can be.
  • FIG. 16 is a diagram illustrating a weight prediction parameter set.
  • the encoding apparatus may derive the weight prediction parameters (w, o) using the reconstructed pixel areas around the current block and the reference block, and then generate an additional weight prediction parameter by applying an offset to the derived weight value.
  • five additional weight prediction parameters are generated by applying at least one of offsets ⁇ and ⁇ to the estimated weight prediction parameters w and o, respectively.
  • the initial values of ⁇ and ⁇ are set to 1, respectively.
  • ⁇ and ⁇ may tend to increase or decrease gradually.
  • the order of the candidates included in the weight prediction parameter set is not limited to the illustrated example, and may be changed in any order.
  • the encoding apparatus may determine an optimal weight prediction parameter of the current block among the weight prediction parameter sets, and then encode information (eg, index information) identifying the determined weight prediction parameter.
  • the encoding apparatus may encode information on the offset or the number of weight prediction parameters for generating the weight prediction parameter set through a block unit or an upper header.
  • the decoding apparatus may configure the weight prediction parameter in the same manner as the encoding apparatus, and may obtain the weight prediction parameter for the current block based on the received index information.
  • the range of neighboring pixels adjacent to the current block or reference block, used in deriving a weight prediction parameter for the current block, may be limited to some of the pixels adjacent to the current block or reference block.
  • FIG. 17 illustrates positions of pixels used for regression analysis. As in the example shown in FIG. 17A, all peripheral pixels adjacent to the current block or the reference block may be used to derive the weight prediction parameter of the current block, and FIGS. 17B and 17C. As in the example shown at), only some of the neighboring pixels adjacent to the current block or reference block may be used to derive the weight prediction parameter of the current block or reference block.
  • the encoding apparatus may encode information indicating a sampling method of neighboring pixels used to estimate the weight prediction parameter.
  • the encoding apparatus may encode information indicating how the neighboring samples are sampled in FIGS. 17A to 17C.
  • the weight prediction parameter for the current block is used by pixels included in the top M rows of the current block or the reference block or pixels included in the left N rows (where M and N are integers of 2 or more). May be
  • the range of neighboring pixels used to derive the weight prediction parameter of the current block may be extended by K times the width of the current block or L times the height of the current block (K and L are integers of 1 or more).
  • K and L are integers of 1 or more.
  • the upper peripheral pixels from (-1, -1) to (2K-1, -1) and (-1, Left peripheral pixels from -1) to (-1, 2L-1) may be used to derive the weight prediction parameter of the current block.
  • the prediction block for the current block is generated by intra prediction
  • the prediction block may be corrected by considering the reconstructed pixel value of the current block.
  • a method of performing correction on the prediction block generated by the intra prediction will be described in detail.
  • 18 is a flowchart illustrating a process of determining whether to use a correction coefficient for a current block.
  • the encoding apparatus may determine whether the current block is encoded by intra prediction (S1801). If the current block is encoded by the intra prediction, the cost (cost A) when the intra prediction is used may be calculated (S1802).
  • the process of determining a correction value for the current block may be terminated.
  • a correction may be performed on the prediction block for the current block generated as a result of the intra prediction using the reconstructed pixel area around the current block (S1803).
  • the reconstructed pixel area may include peripheral pixels around the current block.
  • the encoding apparatus may calculate a cost (cost B) when the correction is performed on the current block (S1804).
  • the encoding apparatus further corrects the cost (cost A) calculated by performing intra prediction on the current block and the predicted cost generated by performing intra prediction. In comparison, it may be determined whether to apply correction to the current block (S1805). For example, when the cost A is greater than the cost B, it is determined that the correction using the reconstructed pixel area is not applied to the current block, while when the cost B is larger than the cost A, the correction using the reconstructed pixel area is applied to the current block. Can be determined.
  • 19 is a diagram for describing an example of determining a correction coefficient for a current block.
  • the encoding apparatus determines the standard deviation of the reconstructed pixel area around the current block ( ) Can be calculated.
  • the reconstructed pixel area is illustrated to include a peripheral pixel adjacent to the left boundary of the current block, a peripheral pixel adjacent to the top boundary of the current block, and a peripheral pixel adjacent to the upper left corner of the current block.
  • the size or shape of the reconstructed pixel area is not limited to the illustrated example.
  • FIG. 20 illustrates various shapes of the reconstructed pixel area.
  • M, N, O, P, and the like mean pixel intervals. Assuming that O and P are smaller than the width and length of the current block, respectively, O and P may have negative values.
  • the example illustrated in FIG. 20 merely illustrates examples of various shapes that may be set as the reconstructed pixel areas, and the reconstructed pixel areas may be set to different sizes or shapes than those illustrated in FIG. 20.
  • the encoding apparatus may calculate a standard deviation using only some of the reconstructed pixels around the current block, and include M or more rows or N or more columns around the boundary of the current block.
  • the standard deviation can also be calculated using.
  • neighboring pixels within a range in which the width of the current block is expanded by K times or the height of the current block by L times may be used for the standard deviation calculation.
  • the encoding apparatus is a reconstructed pixel region that is most similar to the reconstructed pixel region of the current block, targeting blocks that are encoded with intra prediction from among blocks encoded / decoded before the current block and having the same intra prediction mode as the current block. It is possible to determine the block with.
  • the encoding apparatus may include a standard deviation equal to or similar to the standard deviation of the reconstructed pixel area of the current block. A block adjacent to the reconstructed pixel area having can be determined. For example, in the example illustrated in FIG. 19, the reconstructed pixel area B of block 1 among blocks encoded using the same intra prediction mode as that of the current block and the same intra prediction mode as the current block is used.
  • block 1 may be treated as having the most similar characteristics to the current block.
  • the encoding apparatus may determine the correction coefficient for the current block by using the reconstructed pixel area A of the current block and the reconstructed pixel area B of the block 1.
  • the encoding apparatus may search for a reconstructed pixel area similar to the reconstructed pixel area of the current block with respect to a reconstructed pixel area having the same size or shape as the reconstructed pixel area of the current block.
  • the correction coefficient may include at least one of a multiplication coefficient and an addition coefficient.
  • the multiplication coefficient and the addition coefficient may be derived based on the regression analysis.
  • the multiplication coefficient and the addition coefficient may be calculated based on Equation 1 described above.
  • Y is pixels included in the reconstructed pixel area A of the current block
  • X is a reconstructed pixel of the block (ie, block 1) having similar characteristics to the current block. Pixels included in the area B may be represented.
  • the correction coefficient can be obtained by partial differential of equation (1) into w and o, respectively. For example, after differentially formulating Equation 1 into w and o, respectively, w and o are minimized, and the derived w may be set as a multiplication coefficient and o as an addition coefficient.
  • the correction coefficient is applied to the residual block of the block having similar characteristics to the current block (ie, block 1) and the prediction block of the current block generated as a result of the intra prediction. Can be performed.
  • the intra prediction block of the current block may be corrected by Equation 2 below.
  • Equation 2 P 'represents a new prediction block for the current block to which correction has been applied, and D_block1 represents a residual block of a block having similar characteristics to that of the current block (that is, block 1 of FIG. 19). .
  • P represents a prediction block for the current block generated as a result of performing the intra prediction, and w and o represent a correction coefficient.
  • the correction of the current block is performed by using the residual block of the block having similar characteristics as the current block, the prediction block of the current block, and the correction coefficient, but the correction of the current block is different from that described. It may also be carried out in a manner. As an example, the correction of the current block may be performed using a prediction block of a block having characteristics similar to the current block, or may be performed without using a block having characteristics similar to the current block.
  • the correction is performed on the current block using the multiplication coefficient and the addition coefficient, it is also possible to correct the current block using only one of the multiplication coefficient and the addition coefficient.
  • the correction may be performed on the current block by using only the multiplication coefficient instead of the addition coefficient.
  • the process of deriving 'o' in Equation 1 may be omitted, and in Equation 2, the process of adding an addition coefficient to the prediction block to which the multiplication coefficient is applied may be omitted.
  • the encoding apparatus may set a plurality of search regions for the slice or the picture including the current block, and then encode information about the search region including the block having the most similar characteristics to the current block and transmit the encoded information to the decoding apparatus.
  • the decoding apparatus may search for a block having the most similar characteristics to the current block only within the set search area.
  • the encoding apparatus may search for a single reconstructed pixel area having the same or most similar standard deviation as the standard deviation of the reconstructed pixel area of the current block, and obtain a standard deviation equal to or similar to the standard deviation of the reconstructed pixel area of the current block.
  • a plurality of reconstructed pixel regions may be searched for.
  • the encoding apparatus may search for a plurality (N) of reconstructed pixel areas that are the same as or similar to the standard deviation of the reconstructed pixel areas of the current block.
  • information for setting a plurality of blocks adjacent to the retrieved reconstructed pixel areas as candidate blocks and specifying a block used for determining a correction coefficient of the current block among the plurality of candidate blocks can be encoded.
  • the information may be index information for specifying any one of a plurality of candidate blocks (or a plurality of standard deviations).
  • the number N of candidate blocks may be encoded through a block unit or an upper header.
  • the standard deviation of the reconstructed pixel area of the current block is calculated and the block most similar to the current block is searched using the calculated standard deviation.
  • the restored pixel area most similar to the restored pixel area of the current block may be searched using the average value of the pixel values in the restored pixel area, and a sum of absolute difference (SAD) or an SSD ( It is also possible to search for a reconstructed pixel area that is most similar to the reconstructed pixel area of the current block by measuring similarity using a Sum of Squared Difference).
  • a block encoded in the same intra prediction mode as the current block may be a candidate block for the current block (that is, a candidate block for determining a correction coefficient of the current block).
  • the encoding apparatus may also use a block having an intra prediction mode similar to the current block as a candidate block for the current block.
  • a block having an intra prediction mode similar to the current block may be encoded using an intra prediction mode of the current block and an intra prediction mode within a threshold (eg, ⁇ N).
  • a threshold eg, ⁇ N
  • 21 is a flowchart illustrating a method of encoding information related to correction coefficients.
  • the encoding apparatus may encode information about whether the current block is encoded by intra prediction (S2101).
  • the encoding apparatus may encode information about whether correction on the current block is performed using the reconstructed pixel area (S2103).
  • the encoding apparatus may encode information for deriving a correction coefficient of the current block (S2105). For example, when there are a plurality of candidates for deriving the correction coefficients of the current block (eg, when there are a plurality of candidate blocks for deriving the correction coefficients of the current block), the encoding apparatus corrects the current block among the plurality of candidates. Identification information identifying a block used for deriving the coefficient may be encoded.
  • the identification information may be index information indicating any one of the plurality of candidates. For example, if there are N candidates, the index information may indicate any one of 0 to N-1.
  • 22 is a flowchart illustrating a process of determining whether to perform correction on a current block in a decoding apparatus.
  • the decoding apparatus may decode information indicating whether a current block is encoded by intra prediction (S2201).
  • the decoding apparatus may decode information indicating whether correction using the reconstructed pixel area is used for the current block (S2203).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the decoding apparatus may derive a correction coefficient for the current block in the same manner as the encoding apparatus (S2205). For example, the decoding apparatus may search for a block having the most similar feature to the current block among the blocks decoded before the current block, and induce a correction coefficient of the current block by using the found block.
  • the decoding apparatus may obtain a correction coefficient for the current block based on information transmitted from the encoding apparatus.
  • the information transmitted from the encoding apparatus may include information for identifying a region including a block having a feature most similar to a current block, or identification information for identifying a block having a feature most similar to a current block among a plurality of candidate blocks. can do.
  • the encoding apparatus may directly encode the correction coefficient for the current block and transmit it to the decoding apparatus.
  • the decoding apparatus may decode the correction coefficients from the bitstream and perform correction on the current block by using the decoded correction coefficients.
  • the decoding apparatus may perform correction on the current block by using the obtained correction coefficients.
  • the correction may be performed through Equation 2 described above.
  • Correction for the current block may be applied between color components. For example, when an image is in Y, Cb, or Cr format, Cb and Cr, which are color difference signals, have a high probability of having similar characteristics. Accordingly, when the coding order is Y, Cb, and Cr, the correction component applied to the Cb image may be used as it is for the Cr component, or a reconstructed pixel region similar to the reconstructed pixel region of the current block may be searched for in the Cb image.
  • the encoding apparatus sets a reconstructed pixel area around the current block of the Cr component, and then reconstructs most similar to the neighboring pixel area of the current block in the already decoded Cb image in a manner similar to the motion estimation shown in FIG. 2.
  • the pixel area can be searched.
  • the criterion for determining similarity may be a standard deviation comparison, SAD, or SSD.
  • the correction coefficient of the current block which is a Cr component
  • the encoding apparatus may perform correction using a residual block of the Cb component present at the same position as the prediction block which is the Cr component in the Cb image.
  • FIG. 23 is a flowchart illustrating a process of determining, by an encoding apparatus, whether to perform prediction on an intra prediction mode of a current block by using a reconstructed pixel area of a current block.
  • the encoding apparatus calculates a cost (cost A) in the case of predicting the intra prediction mode of the current block by using the intra prediction mode of the neighboring block adjacent to the current block (S2301). Prediction of the intra prediction mode of the current block using the intra prediction mode of the neighboring block adjacent to the current block may be referred to as an intra prediction mode prediction method using an index. An intra prediction mode prediction method using an index will be described in detail with reference to FIG. 24.
  • the encoding apparatus may calculate a cost (hereinafter referred to as cost B) in the case of using a method that does not predict the intra prediction mode (S2302).
  • cost B a cost that does not predict the intra prediction mode
  • An intra prediction mode determination method using a method of not predicting the intra prediction mode will be described in detail with reference to FIG. 25.
  • the encoding apparatus may calculate a cost (hereinafter referred to as cost C) in the case of using the method of predicting the intra prediction mode of the current block by using the reconstructed pixel region of the current block (S2303).
  • cost C a cost (hereinafter referred to as cost C) in the case of using the method of predicting the intra prediction mode of the current block by using the reconstructed pixel region of the current block (S2303).
  • the encoding apparatus may compare the cost A, the cost B, and the cost C, and determine an optimal intra prediction mode determination method for the current block (S2304).
  • 24 is a diagram for describing an intra prediction mode prediction method using an index.
  • the current block is encoded by intra prediction
  • the intra prediction mode of the neighboring block adjacent to the top of the current block and the intra prediction mode of the neighboring block adjacent to the left of the current block are A and B, respectively.
  • the encoding apparatus may configure the candidate mode using the intra prediction mode of neighboring blocks adjacent to the current block.
  • the number of candidate modes is two, but there may be a larger number of candidate modes (for example, between three and six or more).
  • the encoding apparatus may determine whether A and B are the same, and when A and B are the same, set A as the first candidate mode and set an intra prediction mode as the second candidate mode.
  • the remaining candidate modes may be set based on the priority among any intra prediction modes.
  • any prediction mode may include intra prediction modes that are statistically high in frequency.
  • the arbitrary prediction mode may include a non-directional prediction mode such as DC or planar, a prediction mode in a direction similar to the candidate mode, or a directional prediction mode such as a vertical, horizontal, or diagonal direction.
  • a and B are different, A may be set as the first candidate mode and B may be set as the second candidate mode.
  • the remaining candidate modes may be set based on the priority between any prediction modes different from A and B.
  • the encoding apparatus encodes information for identifying the same candidate mode as the intra prediction mode of the current block.
  • the information may be index information indicating any one of a plurality of candidate modes.
  • the number of candidate modes may be a predetermined value or may be coded through a block unit or an upper header and transmitted to the decoding apparatus.
  • the process of generating the candidate mode may use the same method in the encoding apparatus and the decoding apparatus.
  • the encoding apparatus may set the cost A to higher values than the cost B and the cost C so that the intra prediction mode prediction method using the index may not be selected. have.
  • 25 is a diagram for describing an example of determining an intra prediction mode of a current block without using a method of predicting an intra prediction mode.
  • the encoding apparatus may directly encode the intra prediction mode of the current block among the remaining prediction modes except the candidate mode in all the intra prediction modes available to the current block. have.
  • the candidate mode is assumed.
  • the remaining prediction modes excluded are 1, 2, 4, 5, 6, 7, 8, and 9.
  • the encoding apparatus may number the remaining prediction modes in order. For example, if A is less than B, the residual prediction mode smaller than A will retain its existing index, and the residual prediction mode between A and B will have an index with a decrease of 1, and a residual prediction mode larger than B will have a value of 2 You will have a reduced index.
  • the encoding apparatus may encode identification information indicating the intra prediction mode of the current block among the residual prediction modes to which the index is reassigned.
  • the decoding apparatus may determine the intra prediction mode for the current block based on the received identification information.
  • the residual prediction mode is determined as the current intra prediction mode as it is, and when the residual prediction mode is larger than at least one or more of the candidate modes, the residual prediction mode is the residual prediction mode.
  • the index may be added by the number of smaller candidate modes to determine the intra prediction mode of the current block. For example, when the candidate modes, A and B are 3, and the residual prediction mode is 5, the intra prediction mode of the current block may be 5 plus 2 plus 7.
  • the candidate mode includes an intra prediction mode of a neighboring block adjacent to the current block.
  • the candidate mode may include an intra prediction mode of a block using a reconstructed pixel area similar to the reconstructed pixel area of the current block as a peripheral pixel, which will be described later with reference to FIG. 26.
  • FIG. 26 is a diagram for describing a method of predicting an intra prediction mode of a current block by using a reconstructed pixel area of the current block.
  • the encoding apparatus may search for a region that is most similar to the reconstructed pixel region around the current block, from the region where encoding / decoding has already been completed.
  • the search may be performed in units of blocks.
  • the encoding apparatus is based on an intra prediction mode of the block that uses the area most similar to the reconstructed pixel area around the current block as the reconstructed pixel area. Prediction mode can be predicted.
  • the encoding apparatus uses the intra prediction mode and the current prediction mode of the block 1, which is a block B as the reconstructed pixel area.
  • the residual value between the intra prediction modes of the block may be encoded.
  • the encoding apparatus may search for a plurality of reconstructed pixel areas similar to the reconstructed pixel areas of the current block.
  • the search number P of the reconstructed pixel area may be signaled by using a predetermined number or by a block unit or an upper header.
  • the encoding apparatus reconstructs the pixel areas of blocks 1 and C, which are blocks that use B as the reconstructed pixel area.
  • the intra prediction mode of the current block may be predicted by using any one of the intra prediction modes of block 2 as a block.
  • the encoding apparatus may include an index indicating a block that is more optimal for prediction of the intra prediction mode of the current block among blocks 1 and 2 (eg, a block having a minimum residual value with the intra prediction mode of the current block), and the index.
  • the difference between the intra prediction mode of the block indicated by the intra prediction mode and the current block may be encoded.
  • index information indicating any one of a plurality of blocks having characteristics similar to the current block is encoded, but index information indicating any one of the reconstructed pixel areas similar to the reconstructed pixel areas of the current block is encoded. It is also possible. In this case, the decoding apparatus selects any one of the plurality of reconstructed pixel areas similar to the reconstructed pixel areas of the current block and is identified by the index information, and uses the intra prediction mode of the block that uses the selected reconstructed pixel area as the peripheral pixel. Thus, the intra prediction mode of the current block can be decoded.
  • the encoding apparatus may also encode information indicating whether to search one reconstructed pixel area similar to the reconstructed pixel area of the current block or to search for a plurality (P).
  • the encoding apparatus and the decoding apparatus may adaptively determine the number of searches for the reconstructed region under preset conditions.
  • FIG. 27 is a flowchart illustrating a process of encoding information related to a method of determining an intra prediction mode for a current block.
  • the encoding apparatus may encode information indicating whether a method of predicting an intra prediction mode for a current block is used (S2701).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the encoding apparatus may encode information indicating whether the intra prediction mode prediction method using the reconstructed pixel area is used (S2703).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the intra prediction mode prediction method using the reconstructed pixel area When the intra prediction mode prediction method using the reconstructed pixel area is used (S2704), information necessary for predicting the intra prediction mode of the current block may be encoded (S2705). For example, in the case of searching for a plurality of reconstructed pixel areas similar to the reconstructed pixel areas of the current block, among the plurality of blocks having similar characteristics to the current block, the in-picture prediction mode is the same as or similar to the in-picture prediction mode of the current block.
  • Identification information for identifying a block can be encoded. The identification information may be index information indicating any one of a plurality of candidate blocks.
  • the encoding apparatus may encode a difference value between the intra prediction mode of the candidate block and the intra prediction mode of the current block.
  • the intra prediction mode of the current block uses the intra prediction mode of the neighboring blocks adjacent to the current block. Can be encoded. Accordingly, the encoding apparatus may encode identification information for identifying the same candidate mode as the intra prediction mode of the current block among candidate modes generated based on intra prediction modes of the neighboring blocks (S2706).
  • the intra prediction mode of the current block may be encoded for the remaining modes except the candidate mode among the intra prediction modes available to the current block (S2707). ).
  • 28 is a flowchart illustrating a process of decoding an intra prediction mode of a current block.
  • the decoding apparatus may decode information indicating whether a current block is encoded by intra prediction from a bitstream.
  • the decoding apparatus may decode information indicating whether a method of predicting the intra prediction mode for the current block is used (S2801).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the decoding apparatus may decode information indicating whether to predict the intra prediction mode of the current block by using the reconstructed pixel area of the current block.
  • the information may be a 1-bit flag, but is not limited thereto.
  • the intra prediction mode prediction method using the reconstructed pixel area When the intra prediction mode prediction method using the reconstructed pixel area is used (S2804), information necessary for predicting the intra prediction mode of the current block may be decoded (S2805). For example, when a plurality of reconstructed pixel areas similar to the reconstructed pixel areas of the current block are searched, among the plurality of blocks having similar characteristics to the current block, they have an intra picture prediction mode that is the same as or similar to the intra prediction mode of the current block. Identification information for identifying a block can be decoded. The identification information may be index information indicating any one of a plurality of candidate blocks. Also, the decoding apparatus may decode the difference value between the intra prediction mode of the candidate block identified by the identification information and the intra prediction mode of the current block. The encoding apparatus may determine the intra prediction mode of the current block based on the decoded information.
  • the decoding apparatus uses the prediction method using the intra prediction mode of the neighboring blocks adjacent to the current block. Intra prediction mode of the screen can be determined. To this end, the decoding apparatus configures a candidate mode by using the intra prediction mode of neighboring blocks neighboring the current block, and identifies identification information for identifying the same candidate mode as the intra prediction mode of the current block among the candidate modes. It can be decoded (S2806). The decoding apparatus may set the candidate mode indicated by the identification information to the intra prediction mode of the current block.
  • the decoding apparatus may decode the residual mode information on the current block (S2807). Thereafter, the decoding apparatus may determine the intra prediction mode of the current block based on the candidate mode and the remaining mode information of the current block.
  • the method of predicting the intra prediction mode of the current block using the intra prediction mode of the block having pixels is described as a separate prediction method.
  • the two prediction methods may be integrated into one prediction method and used.
  • the encoding apparatus has a reconstructed pixel area similar to the intra prediction mode and the reconstructed pixel area of the current block around the current block as surrounding pixels.
  • the candidate mode may be configured based on the intra prediction mode of the block.
  • the candidate mode may include an intra prediction mode of a neighboring block and an intra prediction mode of a block having characteristics similar to those of the current block, and may further include any intra prediction mode.
  • the encoding process (ie, S2703) and the decoding process (S2803) for specifying the prediction method of the intra prediction mode of the current block may be omitted.
  • 29 is a diagram for describing a method of performing intra prediction using a reconstructed pixel area.
  • a reconstructed pixel area most similar to the reconstructed pixel area around the current block may be searched in the current image.
  • a reconstructed pixel area most similar to the reconstructed pixel area A around the current block is B
  • a block having B as a reconstructed pixel area ie, block 1
  • the block to be used as the prediction block of the current block is determined according to the search result, so that the prediction in the general screen In contrast, the intra prediction mode is unnecessary. Accordingly, there is an advantage in that intra prediction can be performed without encoding the intra prediction mode.
  • an area used to search for a similar reconstructed pixel area may be limited.
  • the information indicating the search range may be encoded through a block unit or an upper header and transmitted to the decoding apparatus.
  • the encoding apparatus may set, as a search range, Q blocks reconstructed before the current block based on the current block.
  • the encoding apparatus may include the size of the search range in pixels, and encode information indicating the size of the search range through a block unit or an upper header.
  • FIG. 30 is a flowchart illustrating a method of determining an intra prediction method of a current block by using a reconstructed pixel area.
  • the encoding apparatus calculates the cost (cost A) when performing intra prediction using the reconstructed pixel region (S3001), and the cost (cost B when performing intra prediction without using the reconstructed pixel region). ) Can be calculated (S3002).
  • the encoding apparatus may compare cost A and cost B and determine whether to perform intra prediction using the reconstructed pixel area (S3003).
  • 31 is a flowchart illustrating a method of encoding information related to whether intra prediction is performed using a reconstructed pixel area.
  • the encoding apparatus may encode information indicating whether to perform intra prediction using the reconstructed pixel region (S3101).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the encoding apparatus may end without encoding information related to the intra prediction mode of the current block.
  • the encoding apparatus may encode information related to the intra prediction mode of the current block (S3103).
  • the information related to the intra prediction mode may include information indicating whether the intra prediction mode of the current block is the same as the MPM candidate, the MPM index, or the residual mode information.
  • 32 is a flowchart illustrating a method of decoding information related to whether intra prediction is performed using a reconstructed pixel area.
  • the decoding apparatus may decode information indicating whether to perform intra prediction using a reconstructed pixel area (S3201).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the decoding apparatus When intra prediction is performed using the reconstructed pixel area (S3202), the decoding apparatus does not decode information related to the intra prediction mode of the current block, and decodes a reconstructed pixel area similar to the reconstructed pixel area of the current block in the current image. By searching, intra prediction can be performed.
  • the decoding apparatus may decode information related to the intra prediction mode of the current block (S3203).
  • the information related to the intra prediction mode may include information indicating whether the intra prediction mode of the current block is the same as the MPM candidate, the MPM index, or the residual mode information.
  • the decoding apparatus may perform intra prediction on the current block by using the acquired intra prediction mode.
  • the method of finding the most similar reconstructed pixel area in the current image using the reconstructed pixel area adjacent to the current block and setting the corresponding block as the predictive block has been described. It is also possible to set it as a reconstruction block of the current block. In this case, information indicating whether to use a block having a reconstructed pixel area most similar to a reconstructed pixel area adjacent to the current block as a reconstructed block of the current block may be encoded.
  • the image encoding process can be efficiently performed without undergoing transform, quantization, and entropy encoding processes of transform coefficients. .
  • 33 illustrates a method of performing inter prediction on a current block by using reconstructed pixels around a current block.
  • the encoding apparatus may start motion estimation for the current block based on a pixel included in an arbitrary region of the reconstructed pixels around the current block.
  • the encoding apparatus may start motion estimation from a region at the same position as the reconstructed pixel region A around the current block in the reference image.
  • the encoding apparatus may set the distance between A and B as a motion vector.
  • the motion vector estimated using the reconstructed pixel area may be applied to the current block to determine a prediction block (that is, a reference block indicated by the motion vector in the reference image) for the current block.
  • the reconstructed pixel area around the current block and the searched reconstructed pixel area should have the same size or shape.
  • the reconstructed pixel area of the current block includes a pixel adjacent to an upper boundary of the current block, a pixel located at a left boundary of the current block, a corner of the current block (eg, an upper left corner of the current block, an upper right corner of the current block, and a current block).
  • a region including a pixel adjacent to the lower left corner of the block, etc. is described, but the shape of the reconstructed pixel region is not limited thereto.
  • the reconstructed pixel area may have various sizes or shapes as described with reference to FIG. 18.
  • some pixels included in the reconstructed pixel area may be searched for a reconstructed pixel area similar to the reconstructed pixel area of the current block.
  • the encoding apparatus uses only some of the reconstructed pixels included in the reconstructed pixel area, or uses the current block using M or more rows or N or more columns around the boundary of the current block.
  • the reconstructed pixel area similar to the reconstructed pixel area may be searched for.
  • the reconstructed pixel area similar to the reconstructed pixel area of the current block may be searched by using neighboring pixels within a range in which the width of the sub-current block is extended by K times or the height of the current block by L times.
  • the searching of the reconstructed pixel area similar to the reconstructed pixel area of the current block in the reference image may be performed by comparing the similarity in the reconstructed pixel area.
  • similarity search includes a standard deviation of a reconstructed pixel area, an average value of reconstructed pixels, a sum of absolute difference (SAD) or a sum of squared difference (SSD) between the reconstructed pixel areas. Similarity measurements used may be used.
  • the motion estimation is performed using the reconstructed pixel region of the current block, since the motion information is derived using only the encoded / decoded information around the current block, the motion information (eg, the motion vector) from the encoding apparatus to the decoding apparatus. There is no need to send it.
  • the motion information eg, the motion vector
  • the encoding apparatus may determine motion information such as a reference image, a prediction direction (eg, past, future, or bidirectional prediction) or a motion vector of the current block through an example having a minimum cost through motion estimation using a reconstructed pixel region. Can be.
  • the decoding apparatus may also determine motion information of the current block by performing motion estimation through a reconstructed pixel area around the current block and selecting a case having a minimum cost in the same manner as the encoding apparatus.
  • the complexity of the decoding apparatus may be extremely increased.
  • a method of encoding information representing a search range for searching for a similar reconstructed pixel region in a block unit or an upper header and transmitting the same to a decoding apparatus may be used.
  • the encoding apparatus may encode information (eg, a reference picture index) that specifies a reference picture or information (eg, a slice or tile index, etc.) indicating a location including a reference block in the reference picture.
  • the encoding apparatus may encode information specifying any one of a plurality of types of motion estimation methods in a block unit or an upper header.
  • the decoding apparatus may determine whether to perform motion estimation using the reconstructed pixel region of the current block based on the information transmitted from the encoding apparatus.
  • FIG. 34 is a diagram illustrating an example of motion estimation that may be performed in an encoding apparatus or a decoding apparatus.
  • the position at which motion estimation starts is A.
  • FIG. it is assumed that 1 is an integer position pixel, 2 is a half position pixel, and 3 is a quarter position pel.
  • 9 integer pixels are displayed, but a larger number of integer pixels can be used for motion estimation.
  • motion estimation is additionally performed in units of half-position pixels at the peripheral positions (a and 8 2) based on a. If the optimal motion vector among the plurality of 1/2 position pixels is selected to indicate the b position, motion estimation is additionally performed in units of 1/4 position pixels from the peripheral position (b and 8 3) based on b. If the optimal motion vector is selected to indicate c position as a result of motion estimation in units of 1/4 position pixels, the final motion vector represents (A-> c). Here, the coordinates become negative toward the left direction and the upward direction based on A, and become positive toward the right direction and the downward direction, or negative and positive standards may be reversed.
  • K becomes an integer of 0 or more
  • K can be set identically in the encoding apparatus and the decoding apparatus. It is also possible to send K in block units or in a higher header.
  • the motion vector obtained from 1 is referred to as mv_1 and the motion vector obtained from 2 is referred to as mv_2 and 3 the motion vector obtained from the position 3 is referred to as mv_3, the finally determined motion vector mv is (mv_1 ⁇ (K)) + (mv_2). It can be calculated as ⁇ (K-1)) + mv_3 ⁇ (K-2).
  • the motion vector mv_1 from A to a is (-1, -1)
  • the motion vector mv_2 from a to b is (0, -1)
  • the motion vector mv_3 from b to c is (1, 1).
  • FIG. 34 assumes K as 2 and performs motion estimation in units of 1 / 4-position pixels
  • the final motion vector mv may be determined as (mv_1 ⁇ 3) + (mv_2 ⁇ 2) + mv_3 ⁇ 1 + mv_4.
  • mv_4 means a motion vector estimated in units of 1/8 position pixels.
  • FIG. 35 is a diagram for describing a process of determining a prediction block having a size of 4x4 by using a motion vector estimated in units of quarter-position pixels.
  • the prediction block for the current block is -10 on the x axis, -10 on the y axis, in 1 / 4-position units from the same position block as the current image in the reference picture. It may include a position moved by.
  • 36 is a flowchart illustrating a process of determining whether to perform inter prediction using a reconstructed pixel area.
  • the encoding apparatus may calculate a cost (cost A) when inter prediction is performed without using the reconstructed pixel region (S3601).
  • the inter prediction without using the reconstructed pixel area may mean a case where inter prediction is performed using a merge mode, an AMVP mode, or the like.
  • the encoding apparatus may calculate a cost (cost B) when inter prediction is performed using the reconstructed pixel area (S3602).
  • the encoding apparatus may compare the cost A and the cost B and select an optimal inter prediction method for the current block (S3603). If cost A is less than cost B, the current block is encoded by inter-screen prediction that does not use the reconstructed pixel region. If cost A is greater than cost B, the current block is encoded by inter-screen prediction using the reconstructed pixel region. can do.
  • 37 is a flowchart illustrating a process of encoding an inter-screen prediction method for a current block.
  • the encoding apparatus may encode information for specifying an inter prediction method of the current block (S3701).
  • the information may include a 1-bit flag indicating whether inter-prediction using the reconstructed pixel area is performed in the current block.
  • the information may be index information for specifying any one of a plurality of inter prediction mode methods (eg, a method using a merge mode, an AMVP mode, a skip mode, and a reconstructed pixel area) that can be used by the current block.
  • the encoding apparatus may omit the motion information on the current block.
  • information indicating a search range for searching an area similar to the reconstructed pixel area of the current block may be encoded in a block unit or an upper header.
  • the encoding apparatus has information for determining motion information on the current block (eg, having the same motion information as the current block under merge mode).
  • Information specifying a block, information specifying one of a reference image index, a motion vector prediction candidate, a motion vector difference value, and the like) may be encoded in the AMVP mode (S3703).
  • 38 is a flowchart illustrating a process of decoding an inter prediction method for a current block.
  • the decoding apparatus may decode information for specifying the inter prediction method of the current block (S3801).
  • the information may include a 1-bit flag indicating whether inter-prediction using the reconstructed pixel area is performed in the current block.
  • the information may be index information specifying any one of a plurality of inter prediction mode methods (eg, a method using a merge mode, an AMVP mode, a skip mode, and a reconstructed pixel area) that can be used by the current block.
  • the decoding apparatus may determine the inter prediction method for the current block.
  • the decoding apparatus instead of decoding the motion information of the current block from the bitstream, the motion block for the current block is estimated through motion estimation.
  • Motion information may be obtained (S3803).
  • the motion information of the current block may be performed by searching for a reconstructed pixel area that is most similar to the reconstructed pixel area of the current block in the reference image.
  • the decoding apparatus may decode information indicating a search range for searching for an area similar to the reconstructed pixel area of the current block in a block unit or an upper header.
  • the decoding apparatus may search the reconstructed pixel area that is most similar to the reconstructed pixel area of the current block within the limited search range.
  • the decoding apparatus may have information for determining motion information on the current block (eg, having the same motion information as the current block under merge mode).
  • the encoding apparatus and the decoding apparatus have been described as searching for the region most similar to the reconstructed pixel region of the current block in the reference image.
  • the encoding apparatus and the decoding apparatus may search for a plurality of regions similar to the reconstructed pixel region of the current block in the reference image.
  • the encoding apparatus may encode information for specifying a region used for inter prediction of the current block among the found plurality of candidate regions.
  • the decoding apparatus may determine motion information on the current block by using the region specified by the information, and perform inter-screen prediction on the current block by using the determined motion information.
  • the motion vector may be improved in the same manner in the encoding apparatus and the decoding apparatus.
  • the encoding apparatus may perform motion estimation using blocks in units of 1 / 2K position pixels, and then use the reconstructed pixel region to improve motion estimation results in units of 1 / 2K + L positions.
  • K denotes the precision of a motion vector (that is, a motion vector derived without using a reconstructed pixel region) used when performing inter prediction
  • L denotes a precision of a motion vector that can be improved by using a reconstructed pixel region. It means precision.
  • K and L may be encoded and transmitted from the upper header to the decoding apparatus, or may be set in the same manner by the encoding apparatus and the decoding apparatus. For example, if K and L are set to 2 or 1, respectively, even if the encoder transmits motion information estimated in units of 1/4 position pixels to the decoder, the decoder additionally adds 1 to units of 1/4 position pixels. The motion information can be improved in units of / 8 position pixels.
  • L which indicates the degree of improvement of the motion information
  • motion estimation is performed based on a motion vector in units of 1/2 K pixels, and motion estimation is further performed in units of 1/2 K pixels using a reconstructed pixel region. It is also possible to carry out. Alternatively, when L is 0, motion estimation may be performed only for the current block, and motion estimation may not be performed in the reconstructed pixel area.
  • the motion vector can be used in units of 1/2 K + L position pixels.
  • the encoding apparatus and the decoding apparatus may store the motion vector in units of 1/2 K + L position pixels.
  • the motion vector to be encoded is in units of 1 / 2K position pixels
  • the motion vector precision of the neighboring block is also 1 / 2K. Can be aligned in position pixels.
  • FIG. 39 is a diagram for describing an example of improving a motion vector of a current block by using a reconstructed pixel area.
  • the motion vector encoding precision K is 2 and the motion vector improvement precision L is 1.
  • the motion vector to be encoded represents a 1/4 pixel position.
  • the improved motion vector represents 1/8 pixel position.
  • the motion vector since the reconstructed pixel region may be used in the encoding apparatus and the decoding apparatus, the motion vector may be improved without additional information.
  • the motion vector to be encoded is (7, -10)
  • the motion vector to be encoded is a 1/4 pixel position, so that the reference block indicated by the encoded motion vector (that is, the original prediction block) is shown in FIG. 39. Same as the example shown in
  • a 1/8 position pixel target motion estimation may be performed in 8 directions based on pixels spaced by the motion vector from the same position as the pixel included in the reconstructed pixel region of the current block in the reference image. Can be. In this case, interpolation must be additionally performed to generate 1/8 position pixels.
  • FIG. 39 pixels used when performing 1/8 position pixel object motion estimation among pixels included in the reconstructed pixel area are indicated by a rectangle.
  • the motion vector for the current block may be improved based on the motion vector between the 1/4 position pixel and the 1/8 position pixel.
  • the motion vector can be treated as (-1, -1). Accordingly, the motion vector of the current block can be improved in consideration of the motion vectors (-1, -1) for the 1/8 position pixels.
  • a shift operation ( ⁇ 1) is performed on the motion vector (7, -10) for the quarter position pixel.
  • the motion vector of the current block may be derived by using the motion vector of the previous block using inter-picture prediction as a motion vector candidate.
  • the motion vector of the previous block may be scaled according to the basic precision (K) of the current block.
  • the basic precision (K) is 2 and the additional precision (L) is 1 for all blocks
  • the motion vectors obtained for the basic precision (K) of the previous block are (7, -10) and the additional precision (L). It is assumed that the motion vector additionally derived by) is (3, -3).
  • the improved motion vector of the previous block can be (17, -23) by ((7, -10) ⁇ 1) + (3, -3).
  • the motion vector of the previous block calculated based on the basic precision may be used as the motion vector candidate of the current block. That is, instead of (17, -23), (7, -10) can be used as a motion vector candidate of the current block.
  • the motion vector precision of the previous block may be unified to an arbitrary precision.
  • the motion vector of the previous block may be scaled to the basic precision (K) of the current block and used as a motion vector candidate of the current block.
  • 40 is a flowchart illustrating a process of determining a motion vector in an encoding apparatus.
  • the encoding apparatus may perform motion estimation in units of 1/2 K pixels, and calculate a cost (hereinafter referred to as cost A) according to operation S4001. Thereafter, the encoding apparatus may perform motion estimation (or improvement) in units of 1/2 K + L pixels, and calculate a cost (hereinafter referred to as cost B) according to operation S4002.
  • the encoding apparatus may compare the cost A and the cost B (S4003) to determine whether to improve the motion vector for the current block. For example, if cost A is smaller than cost B, the improved motion vector is set not to be used (S4004). If cost B is smaller than cost A, the improved motion vector is set to be used (S4005).
  • the encoding apparatus may encode information indicating whether to use the improved motion vector through a block unit or an upper header.
  • the information may be a 1-bit flag, but is not limited thereto.
  • the decoding apparatus may determine whether to improve the motion vector based on the information received from the encoding apparatus.
  • the encoder and the decoder may be set to use motion vector enhancement without encoding the information.
  • FIG. 41 is a flowchart illustrating a process of selecting an optimal motion vector in an encoding apparatus when values of basic precision K and additional precision L are adaptively selected in units of blocks.
  • S4101 represents an initial value of parameters used to select an optimal motion vector.
  • K represents basic precision
  • L represents additional precision
  • END_K represents the maximum value of K
  • END_L represents the maximum value of L.
  • END_K, L, and END_L may be initialized to Val1, Val2, Val3, and Val4, respectively.
  • Val1 to Val4 represent any integer and may be encoded through an upper header.
  • BEST_K represents the best K and BEST_L represents the best L.
  • BEST_K and BEST_L may be initialized to Val1 and Val3, respectively.
  • MV_K represents a motion vector in units of 1/2 K pixels
  • MV_L represents a motion vector in units of 1/2 K + L
  • BESTMV_K represents an optimal MV_K
  • BESTMV_L represents an optimal MV_L.
  • Each motion vector parameter may be initialized to (0, 0).
  • COST represents the cost when prediction is performed using MV_K and MV_L
  • BEST_COST represents the optimal COST.
  • the COST may be initialized to zero and the BEST_COST may be initialized to the maximum recordable value (MAX).
  • the encoding device may update the MV_K by performing motion estimation with 1/2 pixel location K.
  • MV_L may be updated by performing additional motion estimation based on the determined MV_K to 1/2 K + L units.
  • the encoding apparatus may select the final MV using the derived MV_K and MV_L, and then update the COST by calculating the cost using the selected MV (S4102).
  • the encoder compares the cost (i.e., COST) and BEST_COST calculated using the final MV (S4103), and if COST is less than or equal to BEST_COST, updates BEST_COST to COST, and BESTMV_K and BESTMV_L to MV_K and MV_L, respectively. While updating, BEST_K and BEST_L can be updated to K and L, respectively (S4104).
  • COST Cost
  • BEST_COST calculated using the final MV
  • K may be updated to K + a (S4105).
  • a may be encoded through a block unit or an upper header, or the encoding apparatus and the decoding apparatus may use the same predetermined value.
  • K may be initialized to Val1 and then L may be updated to L + b (S4107).
  • b may be encoded through a block unit or an upper header, or the encoding apparatus and the decoding apparatus may use the same predetermined value.
  • the encoding device is a decoding device that encodes and transmits the optimal basic precision (value of the final BEST_K), the optimal additional precision (value of the final BEST_L), and the motion vector information (value of the final BESTMV_K) derived in the basic precision units. It may be.
  • the decoding apparatus may derive the basic precision information and the motion vector information derived in the basic precision unit, and then use the additional precision information to improve the motion vector.
  • the encoding apparatus may encode only the optimal basic precision (the value of the final BEST_K) and the motion vector information (the final BESTMV_K value) derived in the basic precision unit with the decoding apparatus.
  • the decoding apparatus may derive the optimal additional precision in the same manner as the encoding apparatus and then improve the motion vector based on the derived additional precision.
  • FIG. 42 is a diagram illustrating a process of encoding an optimal motion vector of a current block.
  • the encoding apparatus may encode information indicating whether to use motion vector enhancement (S4201).
  • the information indicating whether to improve the motion vector using the reconstructed pixel area may be encoded through a block unit or an upper header.
  • the encoding apparatus may encode basic precision related information about the current block (S4202).
  • the basic precision related information may be information indicating an optimal basic precision of the current block (for example, the value of the final BEST_K in FIG. 41) or an offset unit for searching for an optimal basic precision (for example, an offset added to K in FIG. 41). It may include at least one of a).
  • the encoding apparatus may further encode information indicating which of the selectable Ks are used.
  • the encoding apparatus may encode information (eg, index information) indicating which value of -2, 0, or 2 is used.
  • the encoding apparatus may encode an optimal motion vector (for example, the final BESTMV_K in FIG. 40) with respect to the optimal K (S4203).
  • an optimal motion vector for example, the final BESTMV_K in FIG. 40
  • the encoding apparatus may encode an optimal motion vector of the current block based on the motion vector of the neighboring block adjacent to the current block.
  • the motion vector of the neighboring block adjacent to the current block may be scaled according to the basic precision of the current block.
  • the motion vector of neighboring blocks adjacent to the current block may be scaled to 1/2 0 and then the scaled motion vector may be used for encoding BESTMV_K.
  • the encoding apparatus may encode a difference value between the scaled motion vector and the BESTMV_K.
  • 43 is a diagram illustrating a process of decoding an optimal motion vector of a current block.
  • the decoding apparatus may decode information indicating whether to use motion vector improvement (S4301).
  • the information indicating whether to improve the motion vector using the reconstructed pixel area may be decoded through a block unit or an upper header.
  • the decoding apparatus may decode basic precision related information about the current block (S4302).
  • the decoding apparatus may decode an optimal motion vector (for example, the final BESTMV_K in FIG. 41) with respect to the optimal K (S4303).
  • the motion vector of the neighboring block may be used to decode the optimal motion vector of the current block.
  • 44 is a flowchart illustrating a process of obtaining an improved motion vector in a decoding apparatus.
  • S4401 represents an initial value of each parameter.
  • L and END_L may be initialized to Val3 and Val4.
  • initial values of L and END_L may be decoded through an upper header.
  • BEST_L can also be initialized to Val3.
  • BEST_K represents an optimal K, and may be set to a value decoded above with reference to FIG. 43.
  • MV_L and BESTMV_L may be initialized to (0, 0), respectively.
  • the COST may be initialized to 0 and the BEST_COST_L may be initialized to the maximum value MAX that can be stored.
  • the decoding apparatus may set MV_L by motion estimation up to 1/2 BEST_K + L units, and calculate a cost when the set MV_L is used (S4402).
  • BEST_COST_L can be updated to COST and BESTMV_L can be updated to MV_L (S4404).
  • L may be updated by adding offset b to L (S4405).
  • the encoding apparatus may derive the final motion vector after scaling MV_K to MV_L using BEST_L and BEST_K.
  • the coding block may be divided into two or more subblocks, and each divided subblock may be divided into another two or more subblocks.
  • a prediction block equal to the size of the coding block is generated, and when the coding block is divided into two or more subblocks, a prediction block suitable for the size of the subblock may be generated for each subblock.
  • the prediction block may mean prediction samples in units of blocks generated through inter prediction or intra prediction.
  • an upper block of the divided subblock may be an encoding block.
  • an upper block of the divided subblock may be a subblock.
  • the current block may represent a coding block or may indicate a subblock. Therefore, the current block refers to a block to be currently encoded regardless of a coding block or a sub block.
  • the encoding apparatus may encode information indicating whether a current block is divided into two or more subblocks (S4501).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the encoding apparatus may encode information about whether the current block is divided into either horizontal or vertical (S4503).
  • the information may be a 1-bit flag, but is not limited thereto. For example, if the information is a flag of 1 bit, the value of the flag is true indicates that the current block is divided N (horizontal) N (N is an integer of 2 or more), and the value of the flag is false It may indicate that the block is divided N vertically (or horizontally).
  • the encoding apparatus may generate N subblocks by dividing the current block at least once in the horizontal or vertical direction according to the division type of the current block (S4504) (S4505 and S4506).
  • the number N of subblocks generated by dividing the current block may be set to use a preset value in the encoding apparatus and the decoding apparatus, or may be encoded through a block unit or an upper header.
  • N may be an integer represented by an exponential power of 2, such as 1, 2, 4, 8, 16, etc., and may be changed to a log value (Log 2 N) and encoded.
  • the encoding apparatus may encode a value 3 (Log 2 8) having a logarithm to 8.
  • the decoding device may decode 3 and set N to 8 (2 3 ).
  • N when N is 1, it means that the current block is not divided into two or more sub blocks. Accordingly, when N is 1, encoding of information indicating whether to be divided into subblocks may be omitted.
  • N a prediction block having the same size as the current block may be generated.
  • N may have an integer value that is not represented by an exponential power of two.
  • the encoding apparatus may generate a number of subblocks smaller than N by merging some of a plurality of subblocks generated by dividing a current block.
  • the encoding apparatus may generate one subblock by merging two or more subblocks consecutively located.
  • N when N is set to 4, the encoding apparatus may generate four subblocks by dividing the current block three times, and merge blocks at any position among the four subblocks according to a predetermined condition. For example, the encoding apparatus may merge blocks located at the middle of the current block into one block. In this case, even if N is 4, a total of three sub blocks having a ratio of 1: 2: 1 may be generated as the current block is divided.
  • the encoding apparatus and the decoding apparatus may use the same condition, or the encoding apparatus may encode and transmit the merge condition of the subblocks to the decoding apparatus.
  • the encoding apparatus may encode and transmit information indicating the index of the sub-blocks to be merged among the plurality of sub-blocks generated by dividing the current block to the decoding apparatus. That is, the encoding apparatus may generate N-1 (or N-M, where M is the number of merges) by merging some of the N subblocks generated by dividing the current block.
  • the encoding apparatus may use the first subblock among the plurality of subblocks included in the current block as the current block (S4507), and may repeatedly perform the above process.
  • the encoding apparatus may perform intra prediction encoding on the current block (S4508).
  • the encoding / decoding order between sub-blocks may be determined according to the encoding / decoding order such as raster scan, zigzag scan, Z scan, and the like.
  • 46 and 47 illustrate an example in which a current block is divided into a plurality of subblocks.
  • the number of sub blocks generated as the current block is divided is four (that is, N is four).
  • the information indicating whether the current block is divided into two or more sub-blocks is a 1-bit flag. For example, a flag of 1 indicates that the current block is divided into a plurality of sub blocks, and a flag of 0 indicates that the current block is no longer divided.
  • the information indicating the division direction of the current block is also a 1-bit flag. For example, a flag of 1 indicates that the current block is divided in the vertical direction, and a flag of 0 indicates that the current block is divided in the horizontal direction.
  • the block is divided into a plurality of sub-blocks, in which the division direction is horizontal, the flag indicating whether to divide the block is set to 1, and the flag indicating the division direction is 0.
  • the block may include four sub blocks.
  • the sub-block A of the four sub-blocks included in the block is further divided, the split direction is horizontal, the flag indicating whether to divide the sub-block A may be set to 1, the flag indicating the split direction may be set to 0.
  • the sub blocks 1 to 4 generated by the sub block A are not divided further, and the flags for them may be set to 0, respectively.
  • a flag indicating whether to divide the sub block B may be set to 0.
  • the sub block C may be further divided, the division direction may be horizontal, a flag indicating whether to divide the sub block C may be set to 1, and a flag indicating the division direction may be set to 0.
  • Subblocks 6 to 9 generated by dividing subblock C are not further divided, and flags for them may be set to 0, respectively.
  • a flag indicating whether to divide the sub block D may be set to 0.
  • the information required to divide the block into the form of (a) to (c) is 10 10 0000 0 10 0000 0.
  • FIG. 47 illustrates an example in which some of the subblocks generated as the block is divided are merged into one subblock.
  • a block is divided into a plurality of sub-blocks, in which the division direction is a horizontal direction, and a flag indicating whether to divide a block is set to 1 and indicates a division direction.
  • the flag can be set to zero.
  • the encoding apparatus may integrate two blocks located at the center of the block into one subblock.
  • the block may include three sub blocks. Since sub-block A is not further divided among the three sub-blocks included in the block, a flag indicating whether to divide the sub-block A may be set to zero.
  • the sub-block B is further divided, the division direction is vertical, the flag indicating whether to divide the sub block B is set to 1, the flag indicating the division direction may also be set to 1.
  • the sub block B is divided, two sub blocks located in the center of the four sub blocks generated may be integrated into one sub block. Accordingly, three sub blocks may be additionally generated due to the division of the sub block B.
  • FIG. Since the generated subblocks are no longer divided as the subblock B is divided, flags indicating whether to divide the subblocks included in the subblock B may be set to 0, respectively.
  • a flag indicating whether to divide the sub block C may be set to zero.
  • the information necessary for dividing the block (a) into the form of the block (c) is 10 0 11 000 0.
  • the division of the sub block may be limited according to the maximum depth or the minimum size of the sub block.
  • the maximum depth of the subblock or the minimum size of the subblock may be encoded through a block unit or an upper header.
  • Each subblock may have a different intra prediction mode. Accordingly, the encoding apparatus may encode intra prediction information for each subblock.
  • the intra prediction information may include not only the intra prediction mode for the sub block, but also information on weights considering the characteristics of the previous sub block.
  • an example of encoding intra prediction information on a subblock will be described in detail.
  • FIG. 48 is a diagram for describing an example of determining a weight for a subblock.
  • the number of intra prediction modes available to the block is 35 as shown in FIG. 5.
  • those close to the intra-picture prediction mode (No. 10) in the horizontal direction are referred to as landscape mode, and the intra-picture prediction mode (26) is used.
  • the ones closest to (b) are called a longitudinal mode.
  • the intra prediction mode in the upper left diagonal direction may be included in the horizontal mode or in the vertical mode. Even if the number of intra prediction modes available to the block is less than or greater than 35, the present embodiment may be applied.
  • intra prediction using weights is performed in units of higher blocks. That is, when it is determined that intra-screen prediction using weights is performed on the upper block, intra-screen prediction using weights may be performed on all of the plurality of sub-blocks generated by splitting the upper block.
  • the size of the upper block is 8x8, and the upper block is divided into four sub blocks in the horizontal direction. If subblocks located in the center of the subblocks generated by splitting the upper block are merged, a total of three subblocks may be generated. At this time, the size of the three sub-blocks may be 8x2, 8x4, 8x2, respectively, as shown in the example shown in FIG. In FIG. 48, the case in which some of the sub blocks are merged is illustrated, but the present embodiment may be applied even when the sub blocks are not merged.
  • the corresponding sub block is reflected by reflecting the amount of change of the inter pixel value or the amount of hot pixel value in the previous sub block. Can be encoded.
  • the intra prediction mode of subblock 1 having an 8x2 size is a vertical mode
  • the intra prediction mode used when encoding subblock 2 having an 8x4 size is also different from the previous subblock (ie, subblock 1).
  • a weight to be applied to the sub block 2 is derived by using the average value of the pixels included in the first row of the sub block 1 and the average change amount of the pixels included in the last row, and the derived weight is subblock 2.
  • the pixel value of the sub block 1 used to calculate the weight to be applied to the sub block 2 may be a prediction pixel generated by performing an intra prediction on the sub block 1, or a reconstructed pixel reconstructed based on the prediction pixel. It may be.
  • the encoding apparatus may generate the prediction block of sub-block 2 and apply the pixel average value increase amount ⁇ according to the position of each row.
  • the encoding apparatus is isochronous according to the position of each row of sub-block 2 by adding ⁇ to the first row (ie, line 3) of sub-block 2 and adding 2 ⁇ to the second row (ie, line 4). Can be weighted.
  • prediction pixels mean prediction pixels generated by performing intra prediction of sub-block 2.
  • the pixel average value variation between the first row (ie, region C) and the last row (ie, region D) of sub-block 2 is taken into consideration.
  • the weight to be applied to the sub block 3 may be determined.
  • the pixels included in the first row or the last row of the sub block 2, which are used to calculate the weight of the sub block 3, may mean that a weight is applied to the prediction pixel or the prediction pixel.
  • the pixel value of the previous subblock may be used.
  • the previous subblock may mean a subblock encoded before the current block.
  • the upper subblock neighboring the current block for the current block or the left subblock neighboring the left of the current block for the current block may be used when determining the weight of the current block.
  • the encoding apparatus may determine a weight to be applied to the current block using N consecutive rows in the upper subblock or M consecutive columns in the left subblock. .
  • the encoding apparatus compares weights when using N consecutive rows in the upper subblock with weights when using M consecutive columns in the left subblock, and then generates an optimal weight for the current block. You can decide how.
  • the pixel average value change amount is described as using the first row (or first column) and the last row (or last column) included in the previous sub-block. It is also possible to calculate.
  • the pixel average value change amount may be calculated using a last line and a line adjacent to the last line. For example, in the example shown in FIG. 48, it is possible to use lines 5 and 6 when trying to calculate the weight for sub block 3.
  • the pixel average value change amount may be calculated as the average value of the change amount for each line.
  • Intra prediction using weights may be applied not only to subblocks but also to arbitrary blocks such as coding blocks or higher blocks.
  • FIG. 49 is a flowchart illustrating a process of encoding information related to a weight to be applied to each subblock.
  • information indicating whether to apply a weight in higher block units may be encoded (S4901).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the information may be encoded in coding block units, higher block units, or subblock units.
  • the information may be encoded with respect to a first subblock among a plurality of subblocks generated by dividing an upper block.
  • the encoding apparatus may encode an intra prediction mode with respect to the current block (S4902). Thereafter, it is determined whether intra prediction mode encoding for all sub blocks existing in the upper block is completed (S4903). If the intra prediction mode encoding for all sub blocks is not completed, the next sub block is moved. Thereafter, the corresponding subblock may be set as the current block (S4904) and the intra prediction mode of the current block may be encoded.
  • 50 is a diagram for describing a process of encoding an intra prediction mode for a subblock to be currently encoded.
  • the subblock to be currently encoded is referred to as a 'current block'.
  • the encoding apparatus may predict the intra prediction mode for the current block.
  • prediction of the intra prediction mode may be performed using intra prediction modes of neighboring blocks adjacent to the current block or a higher block (or a coding block).
  • the encoding apparatus may configure candidate modes for prediction of an intra prediction mode corresponding to the current block by using intra prediction modes of neighboring blocks neighboring the current block or an upper block.
  • the number N of candidate modes may be encoded through a block unit or an upper header, or may be used by setting the same value in the encoding apparatus and the decoding apparatus. In this embodiment, it is assumed that N is 2, and the candidate mode is assumed to be determined using the intra prediction mode of neighboring blocks neighboring the upper block.
  • the encoding apparatus may configure the candidate mode by using an upper peripheral block adjacent to the upper end of the upper block and a left peripheral block adjacent to the left of the upper block. For example, the encoding apparatus may use intra prediction modes of a block including a specific position among upper neighboring blocks of an upper block and intra prediction modes of a block including a specific position among left neighboring blocks of the upper block.
  • the candidate mode can be configured.
  • the encoding apparatus may use a candidate mode by using modes having the highest frequency of use among intra prediction modes of the upper neighboring blocks of the upper block and modes having the highest frequency of use among the intra prediction modes of the left neighboring blocks of the upper block. It can also be configured.
  • the encoding apparatus may configure the candidate mode by using a predetermined number of modes having the highest frequency of use among intra prediction modes of the upper neighboring blocks of the upper block and the left neighboring blocks of the upper block.
  • the encoding apparatus may configure the candidate mode using the first mode and the zero mode.
  • the encoding apparatus determines whether the same candidate mode as the intra prediction mode of the current block exists. If it is determined that the same mode exists, the encoding apparatus may encode information indicating the same candidate mode as the intra prediction mode of the current block among the plurality of candidate modes.
  • the prediction modes in the remaining pictures except the candidate mode among the intra prediction pictures available to the current block are renumbered, and the newly numbered remaining pictures are renumbered.
  • Information specifying the intra prediction mode of the current block among the intra prediction modes may be encoded.
  • FIG. 51 is a diagram illustrating an example of numbering prediction modes in a residual picture.
  • the encoding apparatus may allocate a number obtained by subtracting the prediction in the residual picture by the number of candidate modes having a smaller value than the prediction mode in the residual picture.
  • the prediction mode in the remaining picture larger than mode 0 and mode 1 may be assigned a number obtained by subtracting 2. For example, if the intra prediction mode of the current block is 5, the encoding apparatus may encode 3 times of 5 minus 2.
  • the candidate mode is configured by using the intra prediction mode of the neighboring blocks adjacent to the current block or the upper block.
  • the block may be used to configure a candidate mode.
  • a candidate mode for the current block may be configured by using an intra prediction mode of a block that is not adjacent to the current block or higher block but adjacent to a neighboring block of the current block or higher block.
  • 52 is a flowchart illustrating a process of encoding an intra prediction mode of a current block.
  • the encoding apparatus configures a candidate mode for the current block (S5201), and may encode information indicating whether a candidate mode identical to the intra prediction mode of the current block exists among the candidate modes (S5202).
  • the encoding apparatus may encode index information indicating the same candidate mode as the intra prediction mode of the current block (S5204).
  • the encoding apparatus performs the intra prediction mode of the current block in the remaining intra prediction modes except the candidate mode among the available intra prediction modes.
  • residual mode information that specifies a may be encoded.
  • the encoding apparatus may encode a difference value with the intra prediction mode of the previous block.
  • FIG. 53 is a diagram for explaining an example of determining an intra prediction mode on a subblock basis.
  • an upper block is divided into four sub blocks, and each sub block is assumed to use 35 intra prediction modes.
  • the encoding apparatus may determine the intra prediction mode for the first sub block (sub block 1) and then determine the intra prediction mode of the sub block 2 using the intra prediction mode and the offset a used in the sub block 1. .
  • the encoding apparatus may determine the intra prediction mode of the subblock to be currently encoded within the range of the intra prediction mode ⁇ a of the previous sub block.
  • the encoding apparatus may determine one of the intra prediction pictures of the 22 to 30 prediction modes as the intra prediction mode of the sub block 2.
  • the intra prediction mode of sub-block 2 is determined to be 25
  • the intra prediction mode of sub-block 3 is within the offset range based on the intra prediction mode of sub block 2 and the intra predictions of the 21 to 29 predictions.
  • One of the modes may be determined.
  • the intra prediction mode of sub-block 4 is 23 to 31 intra predictions within the offset range based on the intra prediction mode of sub-block 4.
  • One of the modes may be determined.
  • the intra prediction modes of the sub blocks when the intra prediction mode of the sub blocks is determined within a given offset range, the intra prediction modes of the sub blocks have a similar direction. Considering that the intra prediction modes of each sub block have a similar direction, a difference value between the intra prediction mode between the sub block to be encoded and the previous sub block may be encoded.
  • the intra prediction mode for the sub-blocks should be determined within the offset range of the sub block within the offset range based on the intra prediction mode of the previous sub-block. It is not limited.
  • the encoding apparatus may encode information about whether the intra prediction mode of each sub block exists within an offset range based on the intra prediction mode of the previous sub block. It may be. If the intra prediction mode of each sub block is within an offset range based on the intra prediction mode of the previous sub block, the encoding apparatus uses the intra prediction mode difference value with the previous sub block to predict the intra block of the sub block. The mode can be encoded.
  • the offset a may use a value predefined in the encoding apparatus and the decoding apparatus, or may be encoded in a block unit or an upper header unit.
  • 54 is a flowchart illustrating a process of encoding an intra prediction mode for a subblock.
  • the encoding apparatus may encode an intra prediction mode for the first subblock (S5402).
  • the intra prediction mode for the first subblock may be encoded as it is, or may be encoded using the candidate mode described above.
  • the encoding apparatus encodes information indicating whether a candidate mode identical to the intra prediction mode of the first subblock exists, and the candidate according to whether the same candidate mode as the intra prediction mode of the first subblock exists. Information specifying the mode or residual mode information can be encoded.
  • the encoding apparatus may encode a difference value between the intra prediction mode of the previous subblock and the intra prediction mode of the current subblock (S5403).
  • the difference between the first subblock and the second subblock is different.
  • the value -1 and the third subblock +2, which is a difference value from the second subblock, and for the fourth subblock, +2, which is a difference value from the third subblock, can be encoded.
  • the encoding apparatus may further encode information about whether an intra prediction mode of each remaining sub block except the first sub block is within an offset range based on the intra prediction mode of the previous sub block.
  • the information may be a 1-bit flag, but is not limited thereto.
  • the difference value with the previous sub block may be encoded as in the above-described example. have.
  • the encoding apparatus encodes the intra prediction mode of each sub block as it is, or The intra prediction mode of each subblock may be encoded using the candidate mode.
  • this information may be encoded for the first subblock among the plurality of subblocks generated by dividing the upper block.
  • the remaining sub blocks except for the first sub block may use the number of available intra prediction modes from 35 to ax 2 +. Can be reduced to one.
  • the intra prediction mode of the subblocks may be encoded without using the offset.
  • 55 is a diagram for describing an example of encoding an intra prediction mode according to subblocks in more detail.
  • block1 is not divided so that only one subblock exists
  • block2 is divided into four subblocks s2 to s5
  • block3 is divided into four subblocks S6 to s9.
  • Block 4 is divided into four subblocks (H, s11 to s13).
  • H since H is the first sub block in the upper sub block, the predicted intra prediction mode is determined and encoded.
  • the candidate mode may be configured using the intra prediction mode of the neighboring block.
  • the encoding apparatus encodes whether or not a candidate mode identical to the intra prediction mode of H exists among the candidate modes, and if the same candidate mode as the intra prediction mode of H exists, selects the same candidate mode as the intra prediction mode of H.
  • the information to be specified can be encoded and transmitted.
  • the encoding apparatus may encode the intra prediction modes s11 to s13 with a difference value from the previous subblock.
  • the intra prediction mode of s11 is encoded with a difference value from the intra prediction mode of H
  • the intra prediction mode of s12 is encoded with a difference value with the intra prediction mode of s11
  • the screen of s13 The intra prediction mode may be encoded by a difference value with the intra prediction mode of s12.
  • the intra prediction mode of each of the remaining subblocks except the first subblock is encoded with a difference value from the previous subblock.
  • the intra prediction mode of each of the remaining sub blocks except for the first sub block may be encoded with a difference value from the sub blow at a specific position.
  • the intra prediction mode of the remaining sub blocks except for the first sub block may be encoded with a difference value from the first sub block.
  • the intra prediction mode of the second subblock may be encoded with a difference value from the first subblock, while the remaining subblocks except for the first and second subblocks may be encoded with a difference value from the second subblock.
  • 56 is a flowchart illustrating a process of decoding intra prediction information of a sub block by a decoding apparatus.
  • the decoding apparatus may decode information indicating whether a current block is divided into subblocks (S5601). If it is determined that the current block is divided into sub-blocks (S5602), the decoding apparatus may decode information indicating the split direction of the current block (S5603).
  • the decoding apparatus may generate a plurality of sub-blocks by dividing the current block in the horizontal or vertical direction (S5605, S5606).
  • the decoding apparatus may integrate a plurality of consecutive sub-blocks in the current block into one block by a predetermined method.
  • the decoding apparatus may use the first sub-block included in the current block as the current block (S5607), and may repeatedly perform the above process.
  • the decoding apparatus may perform intra prediction prediction decoding on the current block (S5608).
  • 57 is a flowchart illustrating a process of decoding weight related information.
  • the decoding apparatus may decode information indicating whether to apply a weight on a higher block basis (S5701).
  • the information may be a 1-bit flag, but is not limited thereto.
  • the information may be decoded through a first subblock generated by dividing an upper block, or may be decoded through an upper block (for example, a coding block) that is not a subblock.
  • the decoding apparatus may decode an intra prediction mode for a subblock (hereinafter, referred to as a "current block") to be decoded (S5702). After that, it is determined whether intra-picture prediction mode decoding for all subblocks included in the higher block is completed (S5703), and if the intra-picture prediction mode decoding for all subblocks is not completed, the operation moves to the next subblock. Subsequently, the corresponding subblock may be set as the current block (S5704), and the intra prediction mode of the current block may be decoded (S5704).
  • the decoding apparatus determines whether the intra-prediction mode between the current block and the previous block is similar when the intra prediction mode for the current block is decoded.
  • the weight of the current block may be determined in consideration of whether the average pixel value is changed between rows or columns of the previous block. Thereafter, the decoding apparatus may apply a weight to the prediction sample obtained using the intra prediction mode with respect to the current block.
  • 58 is a flowchart illustrating a process of decoding an intra prediction mode for a subblock to be currently decoded.
  • the subblock to be currently decoded will be referred to as a 'current block'.
  • the decoding apparatus may configure a candidate mode for the current block (S5801). Since the example of configuring the candidate mode has been described with reference to FIG. 50, a detailed description thereof will be omitted.
  • the decoding apparatus may decode information indicating whether the same candidate mode as the intra prediction mode of the current block exists among the candidate modes (S5802).
  • the decoding apparatus may decode index information indicating the same candidate mode as the intra prediction mode of the current block (S5804).
  • the decoding apparatus decodes the residual mode information (S5805) and uses the decoded residual mode information and the candidate mode in the current block. An intra prediction mode may be obtained.
  • 59 is a diagram for describing another example of decoding an intra prediction mode for a subblock.
  • the decoding apparatus may decode the intra prediction mode for the first subblock (S5902).
  • the decoded information may indicate an intra prediction mode value for the first subblock or may include information related to the candidate mode.
  • the information related to the candidate mode is a candidate mode according to information indicating whether or not the same candidate mode as the intra prediction mode of the first subblock exists and whether the same candidate mode as the intra prediction mode of the first sub block exists. It may include information specifying the remaining or residual mode information.
  • the decoding apparatus may decode a difference value between the intra prediction mode of the previous subblock and the intra prediction mode of the current subblock (S5903). Thereafter, the decoding apparatus may acquire the intra prediction mode of the current subblock based on the difference value between the previous subblock and the current subblock.
  • the intra prediction mode of sub block 2 is 26, and the difference values for sub block 2, sub block 3, and sub block 4 are -1, +2, and +2, respectively, the intra prediction mode of sub block 2 is used.
  • 25 denotes the difference value applied to the intra prediction mode of sub-block 1
  • 25 represents the intra prediction mode of sub-block 3
  • 27 applies the difference value to the intra prediction mode of sub-block 2.
  • 29 may be determined by applying a difference value to the intra prediction mode of block 3.
  • the decoding apparatus may further decode information about whether the intra prediction mode of each remaining sub block except the first sub block is within an offset range based on the intra prediction mode of the previous sub block.
  • the information may be a 1-bit flag, but is not limited thereto.
  • the difference value with the previous sub block may be decoded as in the above-described example. have.
  • the decoding apparatus decodes the intra prediction mode of each sub block as it is,
  • the candidate mode may be used to decode the intra prediction mode of each subblock.
  • the information may be decoded through a first subblock generated by dividing an upper block, or may be encoded in an arbitrary block unit.
  • the number of intra prediction modes available to the remaining sub blocks except the first sub block is reduced from 35 to ax 2 + 1 can do.
  • the intra prediction mode of the sub blocks may be decoded without using the offset.
  • the curve mode means that the slope of the intra prediction mode of the sub block belonging to the higher block unit gradually increases or decreases. For example, when the intra prediction mode within the sub-block is gradually increased or decreased (eg, isometric or equivalent), it may be determined that the curved mode is used for the sub-blocks enclosed in higher block units.
  • 60 is a diagram for describing an example of determining whether to use a curve mode.
  • the upper block is divided into four sub blocks as shown in FIG. 60.
  • the encoding apparatus may encode information indicating whether to use an intra prediction mode for a curve (hereinafter, referred to as a curve mode) for the sub block 1.
  • a curve mode an intra prediction mode for a curve
  • the intra prediction mode of the remaining sub blocks except for the first sub block may allocate a value obtained by adding an offset ß to the intra prediction mode of the previous sub block.
  • intra prediction mode for sub block 1 is 10 and the offset ß is 2
  • sub block 2 is 12
  • sub block 3 is 14 Times
  • 16 intra picture prediction modes may be allocated to subblock 4.
  • FIG. 61 is a flowchart illustrating a process of encoding an intra prediction mode of each subblock based on curve mode information.
  • the encoding apparatus may encode information indicating whether the curve mode is used (S6102).
  • the encoding apparatus may encode information related to the offset ß (S6104).
  • the information related to the offset may include information about an absolute value and a sign.
  • the information about the offset and the code may be encoded in the same layer, or may be encoded in different layers.
  • the absolute value of the information related to the offset may be encoded through an upper header, whereas the code may be encoded in a block unit (eg, a subblock unit or a prediction block unit).
  • the encoding apparatus may encode information about an intra prediction mode of the first subblock (S6105).
  • the encoding apparatus may check whether the curve mode is used in the first subblock (S6106). If the curve mode is not used, the encoding apparatus may encode the intra prediction mode for the current subblock (S6105).
  • the intra prediction mode of the current subblock may be encoded using the above-described candidate mode or a difference value with the previous subblock.
  • the intra prediction mode of the current subblock may not be encoded.
  • FIG. 62 is a flowchart illustrating a process of decoding an intra prediction mode of each sub block through information of a curve mode.
  • the decoding apparatus may decode information indicating whether the curved mode is used (S6202).
  • the decoding apparatus may decode information related to the offset ß (S6204).
  • the information related to the offset may include information about an absolute value and a sign.
  • the information about the offset and the sign may be decoded in the same layer or may be decoded in a different layer.
  • the absolute value of the information related to the offset may be decoded through an upper header, while the code may be decoded in a block unit (eg, a subblock unit or a prediction block unit).
  • the decoding apparatus may decode the intra prediction mode for the first subblock (S6205).
  • the decoding apparatus may check whether the curve mode is used in the first subblock (S6206). If the curve mode is not used, the decoding apparatus may decode the intra prediction mode for the current subblock (S6207).
  • the intra prediction mode of the current subblock may be decoded using the above-described candidate mode or a difference value with the previous subblock.
  • the intra prediction mode of the current sub block may be decoded using the intra prediction mode and the offset value of the previous sub block.
  • the intra prediction of the sub-block may include a reconstruction sample included in a neighboring sub-block neighboring the sub-block and a reconstruction included in the neighboring block neighboring the upper block including the sub-block. Can be performed on a sample basis.
  • the intra prediction of the sub block may include prediction samples included in neighboring sub blocks neighboring the sub blocks and reconstructed samples included in neighboring blocks neighboring the upper blocks including the sub blocks. Can be performed on a basic basis.
  • 63 to 65 are diagrams for describing a method of performing intra prediction on a sub block when a transformation is performed on a higher block basis.
  • P1 to P64 mean prediction pixels. That is, the prediction blocks of the sub blocks 1 to 4 may include the prediction pixels P1 to P16, P17 to P32, P33 to P48, and P49 to P64, respectively.
  • R1 to R33 denote reconstruction pixels around the upper block.
  • the upper block is shown divided into four sub blocks. At this time, if the curve mode is applied to the upper block, if the intra prediction mode of the first subblock is 27 and the offset ⁇ is 1, the intra prediction modes of the subblocks 1 to 4 are 27, 28, and 29, respectively. And 30.
  • the sub block 1 may perform intra prediction using the reconstructed pixels around the sub block 1.
  • the sub block 1 may perform intra prediction using reference pixels R1 to R33.
  • the sub block 2 may perform intra prediction using the prediction pixels included in the sub block 1.
  • the sub block 2 may perform intra prediction by using the reconstructed pixel existing on the left side of the sub block 2 and the prediction pixel existing on the upper side.
  • the sub block 2 may perform intra prediction using R19 to R33 and P9 to P16.
  • the sub block 3 may perform intra prediction using the prediction pixels included in the sub block 2.
  • the sub block 3 may perform intra prediction by using the reconstructed pixel existing on the left side of the sub block 3 and the prediction pixel existing on the upper side.
  • the sub block 3 may perform intra prediction using R21 to R33 and P25 to P32.
  • the sub block 4 may perform intra prediction using the prediction pixels included in the sub block 3.
  • the sub block 4 may perform intra prediction using R23 to R33 and P41 to P48.
  • additional reference pixels may be generated by padding prediction pixels included in neighboring sub blocks adjacent to each sub block.
  • an additional reference pixel is generated by copying the value of the rightmost pixel among the reconstructed samples included in the neighboring subblock, but generation of the additional reference pixel is not limited to the present method. Do not.
  • the intra prediction in which the transform is performed in the upper block may be considered to have a shape similar to a curve as in the example shown in FIG. 65. .
  • Exemplary methods of the present disclosure are represented as a series of operations for clarity of description, but are not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order as necessary.
  • the illustrated step may further include other steps, may include other steps except some, or may include additional other steps except some.
  • various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof.
  • one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), General Purpose It may be implemented by a general processor, a controller, a microcontroller, a microprocessor, and the like.
  • scope of the disclosure include software or machine-executable instructions (eg, an operating system, an application, firmware, a program, etc.) to cause an operation in accordance with various embodiments of the method to be executed on an apparatus or a computer, and such software or Instructions, and the like, including non-transitory computer-readable media that are stored and executable on a device or computer.
  • software or machine-executable instructions eg, an operating system, an application, firmware, a program, etc.
  • the present disclosure can be used to encode / decode an image.

Landscapes

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

Abstract

본 발명에 따른 영상 신호 복호화 방법은, 현재 블록을 포함하는 현재 영상과, 상기 현재 영상의 참조 영상 사이 밝기 변화가 존재하는지 여부를 판단하는 단계, 상기 현재 영상과 상기 참조 영상 사이 밝기 변화가 존재하는 것으로 판단되면, 현재 블록에 대한 가중치 예측 파라미터 후보를 결정하는 단계, 상기 가중치 예측 파라미터 후보 중 어느 하나를 특정하는 인덱스 정보에 기초하여, 상기 현재 블록에 대한 가중치 예측 파라미터를 결정하는 단계, 및 상기 가중치 예측 파라미터를 기초로, 상기 현재 블록에 대한 예측을 수행하는 단계를 포함할 수 있다.

Description

영상 신호 부호화/복호화 방법 및 장치
본 발명은 영상 신호 부호화/복호화 방법 및 장치에 관한 것이다.
최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이에 따라, 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)은 2014년 2월, 동영상 압축 표준인 HEVC(High Efficiency Video Coding) 버전1을 제정하였다.
HEVC에서는 화면 내 예측, 화면 간 예측, 변환, 양자화, 엔트로피 부호화 및 인-루프 필터 등의 기술을 정의하고 있다. 이 중, 화면 간 예측은, 기 복원된 영상들과, 움직임 벡터(Motion vector), 참조 영상 인덱스(Reference picture index), 예측 방향(Inter prediction indicator) 등과 같은 움직임 정보들을 이용하여 예측을 수행하는 것을 의미한다.
화면 간 예측은 영상간 상관도가 높을 수록, 높은 예측 효율을 얻을 수 있다. 다만, 페이드 인(Fade-In) 또는 페이드 아웃(Fade-Out) 등과 같은 영상 간 밝기 변화가 존재하여 영상간 상관도가 낮아진다면 화면 간 예측 결과가 부정확 할 염려가 있다.
또한, 화면 간 예측 또는 화면 내 예측을 통해 높은 부호화 효율을 얻기 위해서는, 더 정확한 움직임 정보 또는 더 정밀한 화면 내 예측 모드 등을 이용하여야 하는데, 이 경우, 복호화 장치로 전송해야 하는 정보량이 증가한다는 문제점이 있다.
이에, 화면 간 예측에서의 정확성을 개선하는 한편, 부호화 장치에서 복호화 장치로 전송되는 오버헤드 양을 줄이기 위한 노력이 계속되고 있다.
본 발명은 영상을 부호화/복호화함에 있어서, 화면 내 예측/화면 간 예측 효율을 향상시키는 것에 주된 목적이 있다.
또한, 본 발명은 영상을 부호화/복호화함에 있어서, 가중치를 이용해 화면 간 예측 효율을 향상시키는 것에 목적이 있다.
또한, 본 발명은 현재 블록 주변의 복원 정보를 이용하여, 움직임 벡터의 정밀도를 개선하는 것에 목적이 있다.
또한, 본 발명은 영상을 부호화/복호화함에 있어서, 화면 내 예측 결과를 보정함으로써, 부호화/복호화 효율을 향상시키는 것에 목적이 있다.
또한, 본 발명은 영상을 부호화/복호화함에 있어서, 화면 내 예측 모드를 효과적으로 부호화하는 것에 목적이 있다.
또한, 본 발명은 현재 블록을 복수의 서브 블록으로 분할하고, 각 서브 블록에 대해 예측을 수행함으로써 부호화/복호화 효율을 향상시키는 것에 목적이 있다.
본 발명에 따른 영상 신호 복호화 방법 및 장치는, 현재 블록이 상기 현재 블록에 이웃한 주변 블록과 병합되는지 여부를 판단하고, 상기 판단 결과에 기초하여, 상기 현재 블록의 움직임 정보 및 가중치 예측 파라미터를 획득하고, 상기 움직임 정보에 기초하여, 상기 현재 블록에 대한 참조 블록을 선택하고, 상기 참조 블록에 상기 가중치 예측 파라미터를 적용하여, 상기 현재 블록에 대한 예측 블록을 생성할 수 있다.
본 발명에 따른 영상 신호 복호화 방법 및 장치에 있어서, 상기 현재 블록이 상기 주변 블록과 병합되는 것으로 판단되는 경우, 상기 현재 블록의 가중치 예측 파라미터는 상기 주변 블록의 가중치 예측 파라미터와 동일하게 설정될 수 있다.
본 발명에 따른 영상 신호 복호화 방법 및 장치에 있어서, 상기 현재 블록이 상기 주변 블록과 병합되지 않는 것으로 판단되는 경우, 상기 현재 블록의 가중치 예측 파라미터는 비트스트림으로부터 복호화되는 정보에 의해 획득될 수 있다.
본 발명에 따른 영상 신호 복호화 방법 및 장치에 있어서, 상기 움직임 정보는, 움직임 벡터를 포함하고, 상기 움직임 벡터는, 상기 현재 블록 주변의 복원 화소들에 기초하여, 정밀도가 상향 조절될 수 있다.
본 발명에 따른 영상 신호 복호화 방법 및 장치는, 상기 현재 블록의 화면 내 예측 모드를 이용하여, 상기 현재 블록에 대한 화면 내 예측을 수행하고, 상기 화면 내 예측 수행 결과로 생성된 예측 샘플을 보정할 것인지 여부를 결정하고, 상기 결정 결과에 따라, 상기 예측 샘플을 보정할 수 있다.
본 발명에 따른 영상 신호 복호화 방법 및 장치에 있어서, 상기 현재 블록에 대한 화면 내 예측 모드 정보를 복호화하는 것은, 상기 현재 블록에 대한 후보 모드를 생성하고, 상기 현재 블록의 화면 내 예측 모드와 동일한 후보 모드와 존재하는지 여부를 판단하고, 상기 판단 결과를 기초로, 상기 현재 블록의 화면 내 예측 모드를 결정하는 것일 수 있다.
본 발명에 따른 영상 신호 복호화 방법 및 장치에 있어서, 상기 후보 모드는, 상기 현재 블록의 상단에 인접한 상단 주변 블록 및 상기 현재 블록의 좌측에 인접한 좌측 주변 블록 중 적어도 하나의 화면 내 예측 모드 이용 빈도를 기초로 결정될 수 있다.
본 발명에 따른 영상 신호 복호화 방법 및 장치에 있어서, 상기 현재 블록에 대한 화면 내 예측 모드 정보를 복호화하는 것은, 상기 현재 블록과 이전 블록 사이의 화면 내 예측 모드 차분값을 복호화고, 상기 이전 블록의 화면 내 예측 모드 및 상기 차분값에 기초하여, 상기 현재 블록의 화면 내 예측 모드를 결정하는 것일 수 있다.
본 발명에 따른 영상 신호 부호화 방법 및 장치는, 현재 블록의 움직임 정보 및 가중치 예측 파라미터를 결정하고, 상기 현재 블록의 움직임 정보 및 가중치 예측 파라미터가 상기 현재 블록에 이웃한 주변 블록과 병합되는지 여부를 나타내는 정보를 부호화하는 단계를 포함할 수 있다. 상기 현재 블록의 예측 블록은, 상기 움직임 정보에 기초하여 선택되는 참조 블록에 상기 가중치 예측 파라미터를 적용하여, 생성될 수 있다.
본 발명에 따른 영상 신호 부호화 방법 및 장치에 있어서, 상기 현재 블록이 상기 주변 블록과 병합되는 경우, 상기 현재 블록의 가중치 예측 파라미터는 상기 주변 블록의 가중치 예측 파라미터와 동일하게 설정될 수 있다.
본 발명에 따른 영상 신호 부호화 방법 및 장치에 있어서, 상기 현재 블록이 상기 주변 블록과 병합되지 않는 경우, 상기 현재 블록의 가중치 예측 파라미터와 관련한 정보를 부호화할 수 있다.
본 발명에 따른 영상 신호 부호화 방법 및 장치에 있어서, 상기 움직임 정보는, 움직임 벡터를 포함하고, 상기 현재 블록 주변의 복원 화소들에 기초하여, 상기 움직임 벡터의 정밀도를 상향 조절할 것인지 여부를 나타내는 정보를 부호화할 수 있다.
본 발명에 따른 영상 신호 부호화 방법 및 장치는, 상기 현재 블록에 대한 화면 내 예측 모드를 결정하고, 상기 화면 내 예측 모드를 기초로 생성된 예측 샘플을 보정하고, 상기 예측 샘플 및 보정된 예측 샘플을 기초로, 상기 예측 샘플을 보정할 것인지 여부를 나타내는 정보를 부호화하는 단계를 포함할 수 있다.
본 발명에 따른 영상 신호 부호화 방법 및 장치는, 상기 현재 블록에 대한 후보 모드를 생성하고, 상기 현재 블록의 화면 내 예측 모드와 동일한 후보 모드와 존재하는지 여부를 판단하고, 상기 판단 결과를 기초로, 상기 현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부를 나타내는 정보를 부호화할 수 있다.
본 발명에 따른 영상 신호 부호화 방법 및 장치에 있어서, 상기 후보 모드는, 상기 현재 블록의 상단에 인접한 상단 주변 블록 및 상기 현재 블록의 좌측에 인접한 좌측 주변 블록 중 적어도 하나의 화면 내 예측 모드 이용 빈도를 기초로 결정될 수 있다.
본 발명에 따른 영상 신호 부호화 방법 및 장치에 있어서, 상기 현재 블록과 이전 블록 사이의 화면 내 예측 모드 차분값을 부호화하는 것이 더 포함될 수 있다.
본 발명은 영상을 부호화/복호화함에 있어서, 화면 내 예측/화면 간 예측 효율을 향상시킬 수 있다.
또한, 본 발명은 영상을 부호화/복호화함에 있어서, 가중치를 이용해 화면 간 예측 효율을 향상시킬 수 있다.
또한, 본 발명은 현재 블록 주변의 복원 정보를 이용하여, 움직임 벡터의 정밀도를 개선할 수 있다.
또한, 본 발명은 영상을 부호화/복호화함에 있어서, 화면 내 예측 결과를 보정함으로써, 부호화/복호화 효율을 향상시킬 수 있다.
또한, 본 발명은 영상을 부호화/복호화함에 있어서, 화면 내 예측 모드를 효과적으로 부호화할 수 있다.
또한, 본 발명은 현재 블록을 복수의 서브 블록으로 분할하고, 각 서브 블록에 대해 예측을 수행함으로써 부호화/복호화 효율을 향상시킬 수 있는 효과가 있다.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 3은 본 발명의 일 실시예에 따른 움직임 추정 방법을 간략하게 나타낸 블록 구성도이다.
도 4는 본 발명의 일 실시예에 따라 현재 부호화 하려는 블록에 적용하기 위한 움직임 정보를 가져오는 주변 블록의 위치를 나타낸 예시이다.
도 5는 현재 블록을 포함하는 현재 영상과 참조 영상 사이의 밝기 변화 양상을 예시한 도면이다.
도 6은 평면 모드를 이용하여 화면 내 예측을 수행하는 예를 설명하기 위한 도면이다.
도 7은 DC 모드를 이용하여 화면 내 예측을 수행하는 예를 설명하기 위한 도면이다.
도 8은 수평 방향 예측 모드 및 수직 방향 예측 모드를 이용하여 화면 내 예측을 수행하는 예를 설명하기 위한 도면이다.
도 9는 현재 블록을 포함하는 현재 영상과 참조 영상 사이의 밝기 변화 양상을 예시한 도면이다.
도 10은 영상 부호화 장치에서 가중치 예측 파라미터를 현재 블록에 적용하는 방법을 나타낸 흐름도이다.
도 11은 가중치 예측 파라미터를 부호화하는 과정을 나타낸 흐름도이다.
도 12는 복호화 장치에서 가중치 예측 파라미터를 복호화하는 과정을 나타낸 흐름도이다.
도 13은 현재 블록에 대한 가중치 예측 파라미터를 유도하는 예를 설명하기 위한 도면이다.
도 14는 현재 블록에 대한 가중치 예측 파라미터를 유도하는 다른 예를 설명하기 위한 도면이다.
도 15는 좌측 복원 화소 영역 및 상단 복원 화소 영역 중 하나를 이용하여 가중치 예측 파라미터를 유도하는 예를 나타낸 도면이다.
도 16은 가중치 예측 파라미터 세트를 나타낸 도면이다.
도 17은 회귀 분석에 사용되는 화소들의 위치를 나타낸다.
도 18은 현재 블록에 대한 보정 계수를 이용할 것인지 여부를 결정하는 과정을 나타낸 흐름도이다.
도 19는 현재 블록에 대한 보정 계수를 결정하는 예를 설명하기 위한 도면이다.
도 20은 복원 화소 영역의 다양한 모양을 나타낸다.
도 21은 보정 계수와 관련한 정보를 부호화하는 방법을 나타낸 흐름도이다.
도 22는 복호화 장치에서 현재 블록에 대한 보정을 수행할 것인지 여부를 결정하는 과정을 나타내는 흐름도이다.
도 23은 부호화 장치에서, 현재 블록의 복원 화소 영역을 이용하여, 현재 블록의 화면 내 예측 모드에 대한 예측을 수행할 것인지 여부를 결정하는 과정을 나타낸 흐름도이다.
도 24는 인덱스를 이용한 화면 내 예측 모드 예측 방법을 설명하기 위한 도면이다.
도 25는 화면 내 예측 모드를 예측하는 방법을 이용하지 않고, 현재 블록의 화면 내 예측 모드를 결정하는 예를 설명하기 위한 도면이다.
도 26은 현재 블록의 복원 화소 영역을 이용하여, 현재 블록의 화면 내 예측 모드를 예측하는 방법을 설명하기 위한 도면이다.
도 27은 현재 블록에 대한 화면 내 예측 모드를 결정하는 방법과 관련한 정보를 부호화하는 과정을 나타낸 흐름도이다.
도 28은 현재 블록의 화면 내 예측 모드를 복호화하는 과정을 나타낸 흐름도이다.
도 29는 복원 화소 영역을 이용하여 화면 내 예측을 수행하는 방법을 설명하기 위한 도면이다.
도 30은 복원 화소 영역을 이용하여 현재 블록의 화면 내 예측 방법을 결정하는 방법을 나타낸 흐름도이다.
도 31은 복원 화소 영역을 이용한 화면 내 예측 수행 여부와 관련된 정보를 부호화하는 방법을 나타낸 흐름도이다.
도 32는 복원 화소 영역을 이용한 화면 내 예측 수행 여부와 관련된 정보를 복호화하는 방법을 나타낸 흐름도이다.
도 33은 현재 블록 주변의 복원 화소를 이용하여, 현재 블록에 대한 화면 간 예측을 수행하는 방법을 설명하기로 한다.
도 34는 부호화 장치 또는 복호화 장치에서 수행될 수 있는 움직임 추정의 일 예를 나타낸 도면이다.
도 35는 1/4 위치 화소 단위로 추정된 움직임 벡터를 이용하여, 4x4 크기의 예측 블록을 결정하는 과정을 설명하기 위한 도면이다.
도 36은 복원 화소 영역을 이용하여 화면 간 예측을 수행할 것인지 여부를 판단하는 과정을 나타내는 순서도이다.
도 37은 현재 블록에 대한 화면 간 예측 방법을 부호화하는 과정을 나타낸 흐름도이다.
도 38은 현재 블록에 대한 화면 간 예측 방법을 복호화하는 과정을 나타낸 흐름도이다.
도 39는 복원 화소 영역을 이용하여, 현재 블록의 움직임 벡터를 개선하는 예를 설명하기 위한 도면이다.
도 40은 부호화 장치에서 움직임 벡터를 결정하는 과정을 나타낸 흐름도이다.
도 41은 블록 단위로 기본 정밀도(K)와 추가 정밀도(L)의 값이 적응적으로 선택되는 경우, 부호화 장치에서 최적의 움직임 벡터를 선택하는 과정을 나타낸 흐름도이다.
도 42는 현재 블록의 최적의 움직임 벡터를 부호화하는 과정을 나타낸 도면이다.
도 43은 현재 블록의 최적의 움직임 벡터를 복호화하는 과정을 나타낸 도면이다.
도 44는 복호화 장치에서 개선된 움직임 벡터를 획득하는 과정을 나타낸 흐름도이다.
도 45는 현재 블록이 복수의 서브 블록으로 분할되는 경우, 각 서브 블록에 대한 화면 내 예측 정보가 부호화되는 과정을 나타낸 흐름도이다.
도 46 및 도 47은 현재 블록이 복수의 서브 블록으로 분할되는 예를 나타낸 도면이다.
도 48은 서브 블록에 대한 가중치를 결정하는 예를 설명하기 위한 도면이다.
도 49는 각 서브 블록에 적용될 가중치와 관련한 정보를 부호화하는 과정을 나타낸 흐름도이다.
도 50은 현재 부호화 하려는 서브 블록에 대한 화면 내 예측 모드를 부호화하는 과정을 설명하기 위한 도면이다.
도 51은 잔여 화면 내 예측 모드들을 넘버링하는 예를 나타낸 도면이다.
도 52는 현재 블록의 화면 내 예측 모드를 부호화하는 과정을 나타낸 흐름도이다.
도 53은 서브 블록 단위로 화면 내 예측 모드를 결정하는 예를 설명하기 위한 도면이다.
도 54는 서브 블록에 대한 화면 내 예측 모드를 부호화하는 과정을 나타낸 흐름도이다.
도 55는 서브 블록 별 화면 내 예측 모드를 부호화하는 예를 보다 상세히 설명하기 위한 도면이다.
도 56은 복호화 장치에서, 서브 블록의 화면 내 예측 정보를 복호화하는 과정을 나타낸 흐름도이다.
도 57은 가중치 관련 정보를 복호화하는 과정을 나타낸 흐름도이다.
도 58은 현재 복호화 하려는 서브 블록에 대한 화면 내 예측 모드를 복호화하는 과정을 나타낸 흐름도이다.
도 59는 서브 블록에 대한 화면 내 예측 모드를 복호화하는 또 다른 예를 설명하기 위한 도면이다.
도 60은 곡선 모드의 사용 여부를 결정하는 예를 설명하기 위한 도면이다.
도 61은 곡선 모드의 정보를 통해 각 서브 블록의 화면 내 예측 모드를 부호화 하는 과정을 나타낸 흐름도이다.
도 62은 곡선 모드의 정보를 통해 각 서브 블록의 화면 내 예측 모드를 복호화하는 과정을 나타낸 흐름도이다.
도 63 내지 도 65는 상위 블록 단위로 변환이 이루어진 경우, 서브 블록에 대한 화면 내 예측을 수행하는 방법을 설명하기 위한 도면이다.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 1을 참조하면, 영상 부호화 장치(100)는 영상 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.
도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.
또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.
영상 분할부(110)는 입력된 영상을 적어도 하나의 블록으로 분할할 수 있다. 이때, 블록은 부호화 단위(CU), 예측 단위(PU) 또는 변환 단위(TU)를 의미할 수 있다. 상기 분할은 쿼드 트리(Quadtree) 또는 바이너리 트리(Biniary tree) 중 적어도 하나에 기반하여 수행될 수 있다. 쿼드 트리는 상위 블록을 너비와 높이가 상위 블록의 절반인 하위 블록으로 사분할하는 방식이다. 바이너리 트리는 상위 블록을 너비 또는 높이 중 어느 하나가 상위 블록의 절반인 하위 블록으로 이분할하는 방식이다. 전술한 쿼드 트리 또는 바이너리 트리 기반의 분할을 통해, 블록은 정방형뿐만 아니라 비정방형의 형태도 가질 수 있다.
이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.
예측부(120, 125)는 화면 간 예측을 수행하는 화면 간 예측부(120)와 화면 내 예측을 수행하는 화면 내 예측부(125)를 포함할 수 있다. 예측 단위에 대해 화면 간 예측을 사용할 것인지 또는 화면 내 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 화면 내 예측 모드, 움직임 벡터, 참조 영상 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다.
생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 움직임 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.
화면 간 예측부(120)는 현재 영상의 이전 영상 또는 이후 영상 중 적어도 하나의 영상의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 영상 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 화면 간 예측부(120)는 참조 영상 보간부, 움직임 정보 생성부, 움직임 보상부를 포함할 수 있다.
참조 영상 보간부에서는 메모리(155)로부터 참조 영상 정보를 제공받고 참조 영상에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.
움직임 정보 생성부는 참조 영상 보간부에 의해 보간된 참조 영상를 기초로 움직임 정보를 생성할 수 있다. 여기서 움직임 정보는, 움직임 벡터, 참조 영상 인덱스, 예측 방향 등을 의미한다. 움직임 벡터를 추정하기 위한 방법으로는 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 또한 움직임 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 움직임 벡터값을 가질 수 있다. 화면 간 예측에서는 움직임 정보 생성 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 움직임 정보 생성 방법으로는, 이웃 블록의 움직임 벡터를 이용하는 머지(Merge) 방법, 움직임 추정 방법(예컨대, AMVP(Adaptive Motion Vector Prediction)) 등 다양한 방법이 사용될 수 있다.
일 예로, 도 3은 움직임 추정을 통해 움직임 정보를 생성하는 예를 나타낸 도면이다. 움직임 추정은 이미 부호화 및 복호화가 종료된 참조 영상 내 예측 블록과 동일 또는 유사한 참조 블록이 결정되면, 상기 결정에 따라 현재 블록의 움직임 벡터, 참조 영상 인덱스 및 화면 간 예측 방향을 결정하는 것이다.
AMVP 방법이 이용되는 경우, 부호화 장치는, 현재 블록에서 추정된 움직임 벡터를 예측하여 예측 움직임 벡터(MVP:Motion Vector Prediction)를 생성하고, 움직임 벡터와 생성된 예측 움직임 벡터 사이의 차분값(MVD : Motion Vector Difference)를 부호화 할 수 있다.
이웃 블록의 움직임 벡터를 이용하는 방법은, 현재 블록에 이웃한 이웃 블록의 움직임 정보를 현재 블록에 적용하는 것이다. 이때, 이웃 블록은, 현재 블록에 인접한 공간적 이웃 블록 및 참조 영상에 포함된 현재 블록과 동일한 위치에 존재하는 시간적 이웃 블록을 포함할 수 있다. 일 예로, 도 4는 현재 블록의 이웃 블록을 예시한 것이다. 부호화 장치는 도 4에 도시된 현재 블록의 이웃 블록(공간적 이웃 블록:A~E , 시간적 이웃 블록:Col)의 움직임 정보를 현재 블록에 적용함으로써, 현재 블록의 움직임 정보를 결정할 수도 있다. 여기서 Col은 참조 영상에 존재하는 현재 블록과 동일 또는 유사한 위치의 블록을 의미한다.
화면 내 예측부(125)는 현재 영상 내의 화소 정보인 현재 블록 주변의 참조 화소 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 화면 간 예측을 수행한 블록이어서, 참조 화소가 화면 간 예측을 수행하여 복원 된 화소일 경우, 화면 간 예측을 수행한 블록에 포함되는 참조 화소를 주변의 화면 내 예측을 수행한 블록의 참조 화소 정보로 대체하여 사용할 수 있다. 즉, 참조 화소가 가용하지 않는 경우, 가용하지 않은 참조 화소 정보를 가용한 참조 화소 중 적어도 하나의 참조 화소로 대체하여 사용할 수 있다.
화면 내 예측에서 예측 모드는 참조 화소 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 화면 내 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.
일 예로, 도 5는 화면 내 예측 모드들을 예시한 도면이다.
도 5에서는 35개의 화면 내 예측 모드들을 예시하였다. 이 때, 0번 및 1번은 비방향성 예측 모드(또는 비각도 예측 모드)이고, 각각 평면 모드(Planar mode) 및 DC 모드를 나타낼 수 있다. 2번부터 34번은 방향성 예측 모드(또는 각도 예측 모드)를 나타낸다.
도 5에서는 35개의 화면 내 예측 모드를 예시하였으나, 이보다 더 많은 수의 화면 내 예측 모드가 사용되거나, 이보다 더 적은 수의 화면 내 예측 모드가 사용될 수 있다. 일 예로, 67개의 화면 내 예측 모드가 현재 블록을 부호화하는데 이용될 수도 있고, 19개의 화면 내 예측 모드가 현재 블록을 부호화하는데 이용될 수도 있다.
또는, 부호화하고자 하는 블록의 크기 또는 형태 등에 따라, 부호화 대상 블록에서 이용 가능한 화면 내 예측 모드의 개수가 변화할 수도 있다.
도 6은 평면 모드를 이용하여 화면 내 예측을 수행하는 예를 설명하기 위한 도면이다.
평면 모드 하에서, 예측 화소는, 수직 방향 예측 화소 및 수평 방향 예측 화소에 기초하여 생성될 수 있다.
여기서, 수평 방향 예측 화소 P1은, P1과 Y축으로 같은 위치에 있는 복원된 화소와 현재 블록의 우측 상단에 존재하는 복원된 화소 T를 선형 보간함으로써 생성될 수 있다.
수직 방향 예측 화소 P2는, P2와 X축으로 같은 위치에 있는 복원된 화소와 현재 블록의 좌측 하단에 존재하는 복원된 화소 L을 선형 보간함으로써 생성될 수 있다.
예측 화소는, 수평 방향 예측 화소 P1과, 수직 방향 예측 화소 P2를 평균한 값에 기초하여 생성될 수 있다.
도 7은 DC 모드를 이용하여 화면 내 예측을 수행하는 예를 설명하기 위한 도면이다.
DC 모드 하에서, 예측 화소는, 현재 블록 주변의 복원된 화소들의 평균값에 기초하여 생성될 수 있다. 현재 블록 주변 복원된 화소들의 평균값이 예측 화소로 생성되는 바, 예측 블록 내 예측 화소들은 균일한 화소값을 갖게 된다.
도 8은 수평 방향 예측 모드 및 수직 방향 예측 모드를 이용하여 화면 내 예측을 수행하는 예를 설명하기 위한 도면이다.
수평 방향 예측 모드(도 5에 도시된 10번 모드)하에서, 예측 화소는, 수평 방향에 위치한 참조 화소(즉, 현재 블록의 좌측에 인접한 참조 화소)의 값을 복사함으로써 생성될 수 있다.
수직 방향 예측 모드(도 5에 도시된 26번 모드)하에서, 예측 화소는, 수직 방향에 위치한 참조 화소(즉, 현재 블록의 상단에 인접한 참조 화소)의 값을 복사함으로써 생성될 수 있다.
이처럼, 방향성 예측 모드 하에서는, 방향성 예측 모드가 가리키는 방향에 위치한 참조 화소가, 예측 화소로 생성될 수 있다. 만약, 방향성 예측 모드가 가리키는 방향에 둘 이상의 참조 화소가 존재할 경우, 둘 이상의 참조 화소를 보간함으로써, 예측 화소를 생성할 수 있다.
화면 내 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 화면 내 예측 방법을 수행하기 위해 현재 예측 단위의 화면 내 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 화면 내 예측 모드로부터 예측될 수 있다. 주변 예측 단위로부터 예측된 화면 내 예측 모드 정보를 이용하여 현재 예측 단위의 화면 내 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 화면 내 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다.
변환부(130)에서는 잔차 데이터를 포함한 잔차 블록을 DCT, DST, KLT(Karhunen Loeve Transform) 등과 같은 변환 방법을 사용하여 변환시킬 수 있다. 이때 변환 방법은 잔차 블록을 생성하기 위해 사용된 예측 단위의 화면 내 예측 모드에 기반하여 결정될 수 있다. 예를 들어, 화면 내 예측 모드에 따라, 가로 방향으로는 DCT를 사용하고, 세로 방향으로는 DST를 사용할 수도 있다.
양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.
상기 변환부(130) 및/또는 양자화부(135)는, 영상 부호화 장치(100)에 선택적으로 포함될 수 있다. 즉, 영상 부호화 장치(100)는, 잔차 블록의 잔차 데이터에 대해 변환 또는 양자화 중 적어도 하나를 수행하거나, 변환 및 양자화를 모두 스킵하여 잔차 블록을 부호화할 수 있다. 영상 부호화 장치(100)에서 변환 또는 양자화 중 어느 하나가 수행되지 않거나, 변환 및 양자화 모두 수행되지 않더라도, 엔트로피 부호화부(165)의 입력으로 들어가는 블록을 통상적으로 변환 블록이라 일컫는다.
재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.
재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 소정의 스캔 타입을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다.
엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.
엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 움직임 벡터 정보, 참조 영상 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. 엔트로피 부호화부(165)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로 0인지 여부를 나타내는 플래그, 계수의 절대값이 1보다 큰지 여부를 나타내는 플래그 및 계수의 절대값이 2보다 큰지 여부를 나타내는 플래그 등이 부호화될 수 있다. 엔트로피 부호화부(165)는 0이 아닌 계수에 한하여 계수의 부호를 부호화 한다. 그리고, 계수의 절대값이 2보다 큰 계수는, 절대값에 2를 뺀 나머지 값을 부호화 한다.
엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.
역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부를(120, 125)통해서 예측 단위마다 생성된 예측 블록과 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다.
필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.
디블록킹 필터는 복원된 영상에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹 필터를 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 화소를 기초로 현재 블록에 디블록킹 필터를 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.
오프셋 보정부는 디블록킹을 수행한 영상에 대해 화소 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 영상에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 화소를 임의의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 화소의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.
ALF(Adaptive Loop Filtering)는 필터링된 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 화소를 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는, 휘도 신호의 경우 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다.
메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 영상을 저장할 수 있고, 저장된 복원 블록 또는 영상은 화면 간 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 2를 참조하면, 영상 복호화기(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.
영상 부호화기에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화기와 반대의 절차로 복호화될 수 있다.
엔트로피 복호화부(210)는 영상 부호화기의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. 엔트로피 복호화부(210)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로 0인지 여부를 나타내는 플래그, 계수의 절대값이 1보다 큰지 여부를 나타내는 플래그 및 계수의 절대값이 2보다 큰지 여부를 나타내는 플래그 등이 복호화될 수 있다. 그리고, 엔트로피 복호화부(210)는, 0이 아닌 계수에 대하여, 계수의 부호를 복호화 한다. 절대값이 2보다 큰 계수는, 2를 뺀 나머지 값이 복호화될 수 있다.
엔트로피 복호화부(210)에서는 부호화기에서 수행된 화면 내 예측 및 화면 간 예측에 관련된 정보를 복호화할 수 있다.
재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.
역양자화부(220)는 부호화기에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다.
역변환부(225)는 역양자화된 변환 계수를 소정의 변환 방법으로 역변환을 수행할 수 있다. 이때, 변환 방법은 예측 방법(화면 간/화면 내 예측), 블록의 크기/형태, 화면 내 예측 모드 등에 관한 정보를 기반으로 결정될 수 있다.
예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 영상 정보를 기초로 예측 블록을 생성할 수 있다.
예측부(230, 235)는 예측 단위 판별부, 화면 간 예측부 및 화면 내 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 화면 내 예측 방법의 예측 모드 정보, 화면 간 예측 방법의 움직임 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 화면 간 예측을 수행하는지 아니면 화면 내 예측을 수행하는지 여부를 판별할 수 있다. 화면 간 예측부(230)는 영상 부호화기에서 제공된 현재 예측 단위의 화면 간 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 영상의 이전 영상 또는 이후 영상 중 적어도 하나의 영상에 포함된 정보를 기초로 현재 예측 단위에 대한 화면 간 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 영상 내에서 기-복원된 일부 영역의 정보를 기초로 화면 간 예측을 수행할 수도 있다.
화면 간 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 움직임 정보 생성 방법이 머지 방법(Merge), 움직임 추정 방법 중 어떠한 방법으로 생성되었는지 여부를 판단할 수 있다.
화면 내 예측부(235)는 현재 영상 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 화면 내 예측을 수행한 예측 단위인 경우, 영상 부호화기에서 제공된 예측 단위의 화면 내 예측 모드 정보를 기초로 화면 내 예측을 수행할 수 있다. 화면 내 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.
참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 화면 내 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.
복원된 블록 또는 영상은 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.
영상 부호화기로부터 해당 블록 또는 영상에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화기의 디블록킹 필터에서는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.
ALF는 부호화기로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라미터 셋에 포함되어 제공될 수 있다.
메모리(245)는 복원된 영상 또는 블록을 저장하여 참조 영상 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 영상을 출력부로 제공할 수 있다.
후술되는 실시예에서, '현재 블록'은 부호화/복호화 대상 블록을 의미할 수 있다. 나아가, 현재 블록은, 부호화/복호화 과정에 따라, 코딩 트리 블록, 부호화 블록, 예측 블록 또는 변환 블록 등을 의미할 수 있다.
도 9는 현재 블록을 포함하는 현재 영상과 참조 영상 사이의 밝기 변화 양상을 예시한 도면이다.
현재 블록에 대해 화면 간 예측을 수행하는 경우, 현재 영상과 참조 영상간에 밝기 변화가 심할수록, 현재 블록과 참조 영상에서 선택될 예측 블록간의 밝기 변화 역시 커질 것이다. 따라서 현재 블록의 화면간 예측으로 인한 오차가 증가함에 따라, 현재 블록의 잔차 신호에 대한 에너지도 증가하게 될 것을 예상할 수 있다. 그리고, 잔차 신호에 대한 에너지가 증가함에 따라, 양자화로 인한 오류도 증가할 것을 예상할 수 있다. 결국, 현재 영상과 참조 영상 사이 밝기 변화가 존재하는 경우, 밝기 변화가 없을 때에 비해, 잔차 블록에 대한 오류는 증가할 것이다.
이에, 본 발명에서는 영상 간 밝기 변화를 추정하여 가중치 예측 파라미터를 생성하고, 가중치 예측 파라미터를 이용하여 화면 간 예측을 수행하는 방법에 대해 제안하고자 한다. 화면 간 예측시 가중치 예측 파라미터를 이용함으로써, 잔차 블록의 에너지가 급격하게 증가하는 것을 방지하고 예측 효율을 높힐 수 있다.
이하, 도면을 참조하여, 가중치 예측 파라미터를 이용한 화면 간 예측에 대해 상세히 설명하기로 한다.
도 10은 영상 부호화 장치에서 가중치 예측 파라미터를 현재 블록에 적용하는 방법을 나타낸 흐름도이다.
부호화 장치는, 현재 블록에 대한 화면 간 예측을 수행할 때, 주변 블록의 움직임 정보와 가중치 예측 정보(가중치 예측 파라미터, 가중치 예측 제어 정보)를 현재 블록의 움직임 정보와 가중치 예측 정보로 설정하여 부호화할 수 있다. 여기서, 가중치 예측 제어 정보는, 화면 간 예측을 수행할 때, 가중치 예측 파라미터를 이용할 것인지 여부를 나타내고, 가중치 예측 파라미터는, 화면 간 예측시 이용되는 가중치 값을 나타낼 수 있다. 이 경우, 부호화 장치는 주변 블록으로부터 유도된 움직임 정보 및 가중치 예측 정보를 이용하여 현재 블록에 대한 화면 간 예측 블록을 이용하는 경우의 코스트(코스트 A)를 계산할 수 있다(S1001).
여기서, 주변 블록은 현재 블록에 인접한 공간적 이웃 블록 및 참조 영상 내 현재 블록과 동일 또는 유사한 위치를 갖는 시간적 이웃 블록을 포함할 수 있다. 일 예로, 도 4에 도시된 공간적 이웃 블록, A~E 및 시간적 이웃 블록, Col 등이 현재 블록의 주변 블록으로 정의될 수 있다.
이후, 부호화 장치는 움직임 추정을 통해 현재 블록에 대한 최적의 움직임 정보를 결정하고, 추정된 움직임 정보를 이용하여, 현재 블록에 대한 예측 블록을 임시로 생성하고, 생성된 예측 블록을 기초로, 현재 블록에 대한 가중치 예측 파라미터를 추정할 수 있다(S1002).
가중치 예측 파라미터는 예측 화소에 곱해지는 곱셈 파라미터 또는 예측 화소에 더해지는 덧셈 파라미터 중 적어도 하나를 포함할 수 있다. 이때, 곱셈 파라미터 및 덧셈 파라미터는 회귀분석에 기초하여 유도될 수 있다. 일 예로, 하기 수학식 1은 회귀 분석 모델의 한 예를 나타낸 것이다.
Figure PCTKR2017004569-appb-M000001
상기 수학식 1에서, Y는 현재 블록의 원본 데이터, X는 현재 블록에 대해 임시로 생성된 예측 블록의 데이터, w는 회귀선의 기울기, o는 회귀선의 절편값, e는 회귀선 예측 오차를 나타낸다. 일 예로, Y는 현재 블록의 원본 화소값으로, 현재 블록의 전체 또는 일부 영역을 범위로 할 수 있고, X는 현재 블록에 대해 임시로 생성된 예측 블록의 화소값으로 예측 블록의 전체 또는 일부 영역을 범위로 할 수 있다.
가중치 예측 파라미터는 수학식 1을 각각 w 및 o로 편미분함으로써 획득될 수 있다. 일 예로, 수학식 1을 각각 w 및 o로 편미분하였을 때, 오차(e)의 제곱이 최소가 되는 w 및 o를 각각 곱셈 파라미터 및 덧셈 파라미터로 설정할 수 있다.
수학식 1에 기초하여 계산된 가중치 예측 파라미터 값은 실수값을 가질 수 있다. 가중치 예측 파라미터는 수학식 1을 기초로 계산된 실수값으로 설정될 수도 있고, 수학식 1을 기초로 계산된 실수값을 정수화한 정수값으로 설정될 수도 있다. 일 예로, 가중치 예측 파라미터는 수학식 1을 기초로 계산된 실수값에 2N을 곱하여 유도되는 정수값으로 유도될 수 있다. 가중치 예측 파라미터를 정수화하기 위해 사용되는 변수 N은, 블록 단위, 영역 단위 또는 상위 헤더를 통해 부호화 될 수 있다. 또는, 부호화 장치 및 복호화 장치가 기 설정된 N을 사용하는 것도 가능하다. 후술되는 실시예들에서는, 2N을 곱하여, 정수화된 상태로 사용되는 것으로 가정한다.
현재 블록에 대한 가중치 예측 파라미터를 추정하기 위해, 수학식 1을 통해 설명한 회귀 분석 모델이 현재 블록에 대한 가중치 예측 파라미터를 추정하기 위해 사용될 수 있으나, 현재 블록에 대한 가중치 예측 파라미터를 추정하는 방법이 설명한 예에 한정되는 것은 아니다. 회귀 분석 모델 이외의 방법을 통해서도, 현재 블록에 대한 가중치 예측 파라미터를 추정할 수 있다.
현재 블록에 대한 가중치 예측 파라미터 추정이 완료되면, 부호화 장치는 현재 블록에 대해 임시로 생성된 예측 블록에 추정된 가중치 예측 파라미터를 적용했을 때의 코스트(코스트 B) 및 추정된 가중치 예측 파라미터를 적용하지 않았을 때의 코스트(코스트 C)를 계산할 수 있다(S1003).
부호화 장치는, 코스트 간 비교를 통해, 현재 블록에 대해 가중치 예측 정보를 이용할 것인지 여부 및 현재 블록에 대한 가중치 예측 정보를 이웃 블록과 병합하여 사용할 것인지 여부 등을 결정할 수 있다.
일 예로, 먼저 부호화 장치는 현재 블록에서 추정된 가중치 예측 파라미터를 적용하였을 경우의 코스트(코스트 B)와 현재 블록에서 추정된 가중치 예측 파라미터를 적용하지 않았을 경우의 코스트(코스트 C)를 비교하여 현재 블록에 대해, 추정된 가중치 예측 파라미터를 적용하는 것이 최적인지 여부를 결정할 수 있다(S1004).
또한 부호화 장치는, 코스트 B와 코스트 C중 최적이라고 판단된 것과, 주변 블록의 가중치 예측 파라미터 및 움직임 정보를 적용하였을 경우의 코스트(코스트 A)를 비교하여, 현재 블록에서 추정된 움직임 정보 및 추정된 가중치 예측 정보를 사용할 것인지, 혹은 주변 블록에 존재하는 움직임 정보 및 가중치 예측 정보와의 병합을 사용할지 여부 또는, 가중치 예측 정보를 이용할 것인지 여부 등을 결정할 수 있다(S1005).
다음으로, 부호화 장치에서 가중치 예측 정보를 부호화하는 것에 대해 살펴보기로 한다.
도 11은 가중치 예측 정보를 부호화하는 과정을 나타낸 흐름도이다.
부호화 장치는 현재 블록의 움직임 정보 및 가중치 예측 정보가 주변 블록과 병합되는지 여부를 나타내는 정보를 부호화할 수 있다(S1101). 상기 정보는 1비트의 플래그 일 수 있으나, 이에 한정되는 것은 아니다.
현재 블록의 움직임 정보 및 가중치 예측 정보가 주변 블록과 병합되는 것으로 결정되는 경우(S1102), 부호화 장치는 현재 블록과 병합되는 주변 블록을 식별하기 위한 정보를 부호화할 수 있다(S1103). 여기서, 주변 블록을 식별하기 위한 정보는, 주변 블록들 중 현재 블록과 병합되는 주변 블록의 인덱스를 나타내는 인덱스 정보일 수 있다.
반면, 현재 블록의 움직임 정보 및 가중치 예측 정보가 주변 블록과 병합되지 않는 것으로 판단되는 경우(S1102), 부호화 장치는, 현재 블록을 부호화하는데 이용된 움직임 정보를 부호화하고(S1104), 현재 블록에 대해 가중치 예측 파라미터를 이용할 것인지 여부를 나타내는 정보(즉, 가중치 예측 제어 정보)를 부호화할 수 있다(S1105). 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다.
현재 블록에 대해 가중치 예측 파라미터를 사용하지 않는 것으로 결정되는 경우(S1106), 부호화 장치는 가중치 예측 파라미터와 관련된 정보를 부호화하지 않을 수 있다.
반면, 현재 블록에 대해 가중치 예측 파라미터를 사용할 것으로 결정되는 경우(S1106), 부호화 장치는 현재 블록의 가중치 예측 파라미터에 대한 정보를 부호화할 수 있다(S1107).
여기서, 가중치 예측 파라미터에 대한 정보는, 가중치 예측 파라미터일 수도 있고, 가중치 예측 파라미터의 차분값일 수도 있다. 일 예로, 부호화 장치는, 가중치 예측 파라미터의 정수화를 위해 사용한 N에 따라, 1<<N을 가중치 예측 파라미터의 예측값으로 설정한 뒤, 가중치 예측 파라미터와 상기 예측값 사이의 차분값을 부호화할 수 있다. 상기 예측값 및 차분값을 이용한 부호화는 가중치 예측 파라미터의 곱셈 파라미터 또는 덧셈 파라미터 중 적어도 하나에 적용될 수 있다. 일 예로, 곱셈 파라미터는 곱셈 파라미터와, 예측값 사이의 차분값을 이용하여 부호화되는 한편, 덧셈 파라미터는 그대로 부호화될 수 있다.
부호화 장치는 현재 블록의 가중치 예측 파라미터와 현재 블록에 인접한 주변 블록의 가중치 예측 파라미터 사이의 차분값을 부호화할 수도 있다. 예를 들어, 현재 블록이 과거 방향으로 화면 간 예측을 수행하고, 이에 따른 가중치 예측 파라미터가 (59, 4)임을 가정한다. 여기서, (w, o)로 표시되는 가중치 예측 파라미터 중 w는 곱셈 파라미터를, o는 덧셈 파라미터를 나타낼 수 있다. 주변 블록 A-E 및 Col은 전부 과거 방향으로 화면 간 예측이 수행되었고, 각각의 가중치 예측 파라미터는 (51, 0), (62, 4), (59, 4),(64, -1), (59, 2), (70, 4)라고 가정한다.
부호화 장치는 주변 블록들 중 코스트가 가장 작은 주변 블록, 현재 블록의 가중치 예측 파라미터와의 차분값이 최소인 주변 블록의 가중치 예측 파라미터 또는, 현재 블록의 가중치 예측 파라미터와의 차분값 및 할당된 인덱스의 오버헤드를 고려하였을 때 최적으로 판단되는 주변 블록의 가중치 예측 파라미터를 이용하여, 현재 블록의 가중치 예측 파라미터와 관련된 정보를 부호화할 수 있다. 일 예로, 부호화 장치에서 상기 A~E 및 Col의 가중치 예측 파라미터 중 C블록의 가중치 예측 파라미터를 예측값으로 사용하는 것이 최적이라고 선택된 경우, C블록의 가중치 예측 파라미터(즉, (59,4))를 예측값으로 설정하고, 현재 블록의 가중치 예측 파라미터와의 차분값인 (0,0)을 부호화할 수 있다. 아울러, 부호화 장치는 선택된 주변 블록(예컨대, C)을 식별하기 위한 인덱스 정보도 부호화할 수 있다. 이때 최적의 후보를 선택하기 위해 코스트를 계산할 시에 인덱스 정보 및 가중치 파라미터의 차분값을 이용하여 계산한 후 결정될 수도 있다.
도 10 및 도 11에서는, 현재 블록이 주변 블록과 병합되는 경우, 현재 블록의 움직임 정보 및 가중치 예측 정보가 주변 블록의 것으로 설정되는 것으로 설명하였다. 다른 예로, 부호화 장치는, 현재 블록의 움직임 정보 및 가중치 예측 파라미터 각각이 주변 블록과 병합되는지 여부를 판단할 수도 있다. 일 예로, 현재 블록의 움직임 정보는 주변 블록의 것과 동일하게 설정하는 한편, 현재 블록의 가중치 예측 파라미터는 추정에 의한 값으로 설정할 수도 있다. 이 경우, 현재 블록의 움직임 정보가 주변 블록에 병합되는지 여부 및 현재 블록의 가중치 예측 파라미터가 주변 블록에 병합되는지 여부, 추정에 의해 유도된 가중치 예측 파라미터가 별개의 정보로 부호화될 수 있다.
다음으로, 복호화 장치에서 가중치 예측 파라미터를 복호화하는 예에 대해 설명하기로 한다.
도 12는 복호화 장치에서 가중치 예측 파라미터를 복호화하는 과정을 나타낸 흐름도이다.
복호화 장치는 현재 블록의 움직임 정보 및 가중치 예측 정보가 주변 블록과 병합되는지 여부를 나타내는 정보를 복호화할 수 있다(S1201). 상기 정보는 1비트의 플래그 일 수 있으나, 이에 한정되는 것은 아니다.
현재 블록의 움직임 정보 및 가중치 예측 정보가 주변 블록에 병합되는 것으로 결정되는 경우(S1202), 복호화 장치는 현재 블록과 병합되는 주변 블록을 식별하기 위한 정보를 복호화할 수 있다(S1203). 여기서, 주변 블록을 식별하기 위한 정보는, 주변 블록들 중 현재 블록과 병합되는 주변 블록의 인덱스를 나타내는 인덱스 정보일 수 있다. 복호화 장치는 인덱스 정보에 의해 특정되는 주변 블록의 움직임 정보 및 가중치 예측 정보를 현재 블록의 움직임 정보 및 가중치 예측 정보로 설정할 수 있다.
반면, 현재 블록의 움직임 정보 및 가중치 예측 정보가 주변 블록과 병합되지 않는 것으로 판단되는 경우(S1202), 복호화 장치는, 현재 블록을 복호화하는데 이용된 움직임 정보를 복호화하고(S1204), 현재 블록에 대해 가중치 예측 파라미터를 이용할 것인지 여부를 나타내는 정보(즉, 가중치 예측 제어 정보)를 복호화할 수 있다(S1205). 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다.
현재 블록에 대해 가중치 예측 파라미터를 사용하지 않는 것으로 결정되는 경우(S1206), 복호화 장치는 가중치 예측 파라미터와 관련된 정보를 복호화하지 않을 수 있다.
반면, 현재 블록에 대해 가중치 예측 파라미터를 사용할 것으로 결정되는 경우(S1206), 복호화 장치는 현재 블록의 가중치 예측 파라미터에 대한 정보를 복호화할 수 있다(S1207).
여기서, 가중치 예측 파라미터에 대한 정보는 가중치 예측 파라미터를 나타낼 수도 있고, 가중치 예측 파라미터와 가중치 예측 파라미터의 예측값 사이의 차분값을 나타낼 수도 있다. 일 예로, 복호화 장치는, 가중치 예측 파라미터의 정수화를 위한 변수 N을 기초로, 1<<N을 가중치 예측 파라미터의 예측값으로 사용할 수 있다. 복호화 장치는 가중치 예측 파라미터의 예측값 및 비트스트림으로부터 복호화된 가중치 예측 파라미터 차분값을 더하여 현재 블록의 가중치 예측 파라미터를 획득할 수 있다.
상기 예측값 및 차분값을 이용한 복호화는 가중치 예측 파라미터의 곱셈 파라미터 또는 덧셈 파라미터 중 적어도 하나에 적용될 수 있다. 일 예로, 곱셈 파라미터는 예측값 및 차분값을 이용하여 복호화되는 한편, 덧셈 파라미터는 비트스트림을 통해 복호화되는 값을 그대로 이용할 수 있다.
비트스트림을 통해 전송되는 가중치 예측 파라미터와 관련된 정보는, 현재 블록의 가중치 예측 파라미터와 주변 블록의 가중치 예측 파라미터 사이의 차분값을 나타낼 수도 있다. 이 경우, 복호화 장치는, 주변 블록을 식별하는 식별 정보를 복호화하고, 복호화된 식별 정보가 특정하는 주변 블록의 가중치 예측 파라미터에 복호화된 가중치 예측 파라미터 차분값을 더함으로써, 현재 블록에 대한 가중치 예측 파라미터를 획득할 수 있다.
현재 블록의 가중치 예측 파라미터가 획득되면, 가중치 예측 파라미터를 이용하여, 현재 블록에 대한 화면 간 예측을 수행할 수 있다. 일 예로, 복호화 장치는, 현재 블록에 대한 예측 블록에 가중치 예측 파라미터를 적용함으로써, 화면 간 예측을 수행할 수 있다. 구체적으로, 복호화 장치는 예측 블록에 포함된 화소에 곱셈 파라미터를 곱하고, 곱셈 결과에 덧셈 파라미터를 더하여, 현재 블록에 대한 화면 간 예측을 수행할 수 있다.
도 12에서는, 현재 블록이 주변 블록과 병합되는 경우, 현재 블록의 움직임 정보 및 가중치 예측 정보가 주변 블록의 것으로 설정되는 것으로 설명하였다. 다른 예로, 복호화 장치는, 현재 블록의 움직임 정보가 주변 블록에 병합되는지 여부에 관한 정보 및 현재 블록의 가중치 예측 파라미터가 주변 블록과 병합되는지 여부에 관한 정보를 개별적으로 복호화할 수도 있다. 각각의 정보에 따라, 현재 블록의 움직임 정보를 주변 블록과 병합할 것인지 여부 및 현재 블록의 가중치 예측 파라미터를 주변 블록의 가중치 예측 파라미터와 병합할 것인지 여부가 결정될 수 있다.
상술한 실시예들에서는, 부호화 장치가 가중치 예측 파라미터와 관련된 정보를 비트스트림을 통해 부호화하고, 복호화 장치가 비트스트림으로부터 가중치 예측 파라미터와 관련된 정보를 복호화함으로써, 현재 블록에 대한 가중치 예측 파라미터를 획득할 수 있는 것으로 설명하였다.
설명한 예와 달리, 현재 블록에 대한 가중치 예측 파라미터의 부호화/복호화 과정 없이, 부호화 장치와 복호화 장치가 동일한 방법으로 가중치 예측 파라미터를 유도할 수도 있다. 이 경우, 앞서, 도 11 및 도 12을 통해 설명한, 가중치 예측 파라미터의 부/복호화 단계가 생략될 수 있다.
일 예로, 도 13은 현재 블록에 대한 가중치 예측 파라미터를 유도하는 예를 설명하기 위한 도면이다.
현재 블록에 대한 예측 블록은, 참조 영상 내 현재 블록의 움직임 벡터가 지시하는 참조 블록을 기초로 생성될 수 있다. 부호화 장치 및 복호화 장치는, 현재 영상 내 현재 블록 주변의 복원 화소들(도 13에서, 'B'로 표기된 화소들) 및 참조 영상 내 참조 블록(즉, 현재 블록에 대한 예측 블록) 주변의 복원 화소들(도 13에서, 'A'로 표기된 화소들)을 이용하여, 현재 블록에 대한 가중치 예측 파라미터를 유도할 수 있다.
일 예로, 상기 수학식 1에서 Y에, 현재 블록 주변의 복원 화소들(B)을 적용하고, X에, 참조 블록(즉, 현재 블록에 대한 예측 블록) 주변의 복원 화소들(A)를 적용함으로써, 현재 블록에 대한 가중치 예측 파라미터를 유도할 수 있다. 일 예로, 현재 블록 주변의 복원 화소들 및 참조 블록 주변의 복원 화소들을 적용함으로써 계산된 w 및 o를 각각 곱셈 파라미터 및 덧셈 파라미터로 설정할 수 있다.
상술한 실시예들에서는, 현재 블록 및 참조 블록에 인접한 하나의 라인에 포함된 복원 화소들을 이용하여, 가중치 예측 파라미터를 유도하는 것으로 설명하였다. 도시된 예와 달리, 현재 블록 및 참조 블록 주변의 복수의 라인에 포함된 복원 화소들을 이용하여, 가중치 예측 파라미터를 이용할 수도 있다. 복수의 라인을 이용할 것인지 여부 또는 가중치 예측 파라미터를 추정하는데 이용되는 라인의 개수 등은 블록 단위 또는 상위 헤더를 통해 부호화되어 복호화 장치로 전송될 수도 있다.
도 14는 현재 블록에 대한 가중치 예측 파라미터를 유도하는 다른 예를 설명하기 위한 도면이다.
부호화 장치 및 복호화 장치는 현재 블록 및 참조 블록 각각에 존재하는 주변 화소들의 경향성에 기초하여, 현재 블록에 대한 가중치 예측 파라미터를 유도할 수도 있다.
일 예로, 부호화 장치 및 복호화 장치는, 현재 블록 또는 참조 블록에 인접한 주변 화소들에 기초하여, 제1 가중치 예측 파라미터를 유도하고, 현재 블록 또는 참조 블록에 인접하지 않으나, 현재 블록 또는 참조 블록에 인접한 주변 화소들에 인접한 제2 주변 화소들에 기초하여, 제2 가중치 예측 파라미터를 유도할 수 있다.
일 예로, 도 14에 도시된 예에서, 부호화 장치 및 복호화 장치는, 현재 블록에 인접한 주변 화소들(A) 및 참조 블록(예측 블록)에 인접한 주변 화소들(C)을 기초로, 제1 가중치 예측 파라미터를 생성하고, 현재 블록에 인접하지 않으나, 현재 블록에 인접한 주변 화소들(A)에 인접한 주변 화소들(B) 및 참조 블록에 인접하지 않으나, 참조 블록에 인접한 주변 화소들(C)에 인접한 주변 화소들(D)을 기초로 제2 가중치 예측 파라미터를 생성할 수 있다.
현재 블록의 가중치 예측 파라미터는, 제1 가중치 예측 파라미터에, 제1 가중치 예측 파라미터 및 제2 가중치 예측 파라미터의 차분값을 적용함으로써, 유도될 수 있다. 일 예로, 제1 가중치 예측 파라미터가 (59, 4)이고, 제2 가중치 예측 파라미터가 (59, 5)인 경우, 제1 가중치 예측 파라미터 및 제2 가중치 예측 파라미터의 차분값은 (0, -1)이다. 이에 따라, 현재 블록에 대한 가중치 예측 파라미터는 제1 가중치 예측 파라미터에 상기 차분값을 적용한 (59, 3)으로 결정될 수 있다.
다른 예로, 가중치 예측 파라미터는, 예측 블록 내 화소의 위치별로 설정될 수도 있다. 제1 가중치 예측 파라미터 및 제2 가중치 예측 파라미터 사이의 차분값이 (0, -1)이라 가정할 경우, 예측 블록에 적용되는 가중치 예측 파라미터는, 예측 블록 내 화소 위치에 따라 상이하게 설정될 수 있다. 일 예로, 예측 블록의 가장자리(Edge)에 존재하는 화소에 적용되는 가중치 예측 파라미터는, 제1 가중치 예측 파라미터에 상기 차분값을 적용한 (59, 3)으로 결정될 수 있다. 여기서, 예측 블록의 가장자리에 존재하는 화소는 예측 블록의 좌측 경계 및 상단 경계에 인접한 화소(예컨대, 도 14에서, 'a' 위치에 놓인 화소들) 등을 포함할 수 있다.
예측 블록의 가장자리에 존재하는 화소와 인접한 화소에는, 예측 블록의 가장자리에 존재하는 화소에 적용되는 가중치 예측 파라미터에 상기 차분값을 적용한 가중치 예측 파라미터가 적용될 수 있다. 일 예로, 예측 블록의 가장자리에 존재하는 화소와 인접한 화소(예컨대, 도 14에서, 'b'위치에 놓인 화소들)에 적용되는 가중치 예측 파라미터는 예측 블록의 가장자리에 위치하는 화소에 적용되는 가중치 예측 파라미터 (59, 3)에 차분값을 적용한 (59, 2)로 결정될 수 있다.
이처럼, 예측 블록의 가장자리에서 멀어질때마다, 제1 가중치 예측 파라미터 및 제2 가중치 예측 파라미터의 차분값을 반복적으로 적용함으로써, 화소 위치별 상이한 가중치 예측 파라미터를 적용할 수 있다. 이에 따라, 도 14에 도시된 예에서, 'a' 위치의 화소들에는 (59, 3), 'b' 위치의 화소들에는 (59, 2), 'c' 위치의 화소들에는 (59, 1), 'd' 위치의 화소에는 (59, 0)의 가중치 예측 파라미터가 적용될 수 있다.
상술한 실시예들에서는, 현재 블록 및 참조 블록 주변의 2개의 라인을 이용하여 가중치 예측 파라미터를 추정하는 것으로 설명하였다. 도시된 예와 달리, 현재 블록 및 참조 블록 주변의 2개 이상의 라인을 이용하여, 가중치 예측 파라미터를 추정할 수도 있다. 2개 이상의 라인을 이용할 것인지 여부 또는 가중치 예측 파라미터를 추정하는데 이용되는 라인의 개수 등은 블록 단위 또는 상위 헤더를 통해 부호화되어 복호화 장치로 전송될 수도 있다.
도 13 및 도 14에 도시된 예에서, 현재 블록 및 참조 블록 각각에 존재하는 주변 화소들의 가중치 예측 파라미터를 이용하여 현재 블록의 가중치 예측 파라미터를 결정할 것인지 여부 또는 현재 블록 및 참조 블록 주변 화소들의 가중치 예측 파라미터의 경향성을 반영하여 현재 블록의 가중치 예측 파라미터를 결정할 것인지 여부 등은 블록 단위 또는 상위 헤더를 통해 부호화될 수 있다. 또는, 부호화 장치 및 복호화 장치에서, 어느 하나의 방법을 고정적으로 이용하는 것도 가능하다.
다른 예로, 가중치 예측 파라미터는, 현재 블록 및 참조 블록의 좌측 주변의 복원 화소 영역 및 상단 주변의 복원 화소 영역 중 어느 하나의 영역을 통해 유도될 수도 있다.
일 예로, 도 15는 좌측 복원 화소 영역 및 상단 복원 화소 영역 중 하나를 이용하여 가중치 예측 파라미터를 유도하는 예를 나타낸 도면이다.
먼저, 부호화 장치는, 현재 블록 및 참조 블록 상단에 인접한 복원 화소 영역에 포함된 화소들 A 및 C를 이용하여 제1 가중치 예측 파라미터를 유도할 수 있다.
이후, 부호화 장치는, 현재 블록 및 참조 블록 좌측에 인접한 복원 화소 영역에 포함된 화소들 B 및 D를 이용하여 제2 가중치 예측 파라미터를 유도할 수 있다.
이후, 부호화 장치는, 제1 가중치 예측 파라미터 및 제2 가중치 예측 파라미터를 비교하여, 현재 블록에 대한 최적의 가중치 예측 파라미터를 결정할 수 있다.
이때, 부호화 장치는, 현재 블록 및 참조 블록의 좌측 복원 화소 영역 및 상단 복원 화소 영역 중 어느 영역을 사용할 것인지를 나타내는 정보 또는 제1 가중치 예측 파라미터 및 제2 가중치 예측 파라미터 중 현재 블록에 대해 최적인 가중치 예측 파라미터를 나타내는 정보 등을 부호화하여 복호화 장치로 전송할 수 있다.
다른 예로, 부호화 장치 및 복호화 장치가 블록의 모양에 따라 상단 복원 화소 영역 및 좌측 복원 화소 영역 중 고정된 어느 하나의 영역을 이용하여, 가중치 예측 파라미터를 추정하는 것도 가능하다. 예를 들어 현재 부호화 하려는 블록이 가로가 더 긴 직사각형 형태라면, 상단 복원 화소 영역만을 이용하여 가중치 예측 파라미터를 추정하고, 현재 부호화하고자 하는 블록이 세로가 더 긴 직사각형 형태라면, 좌측 복원 화소 영역만을 이용하여 가중치 예측 파라미터를 추정하는 것도 가능하다. 혹은, 현재 부호화 하려는 블록이 정사각형 형태라면 상단 및 좌측 복원 화소 영역을 전부 이용하여 가중치 예측 파라미터를 추정하는 것 또한 가능하다.
부호화 장치는, 복원 화소 영역을 통해 추정된 가중치 예측 파라미터를 이용하여, 복수의 가중치 예측 파라미터를 포함하는 가중치 예측 파라미터 세트를 구성하고, 가중치 예측 파라미터 세트 중 현재 블록에 대한 최적의 가중치 예측 파라미터를 결정할 수 있다.
일 예로, 도 16은 가중치 예측 파라미터 세트를 나타낸 도면이다.
부호화 장치는, 현재 블록 및 참조 블록 주변의 복원 화소 영역을 이용하여 가중치 예측 파라미터 (w, o)를 유도한 뒤, 유도된 가중치 값에 오프셋을 적용하여 추가 가중치 예측 파라미터를 생성할 수 있다.
일 예로, 도 16에서는, 추정된 가중치 예측 파라미터 (w, o)에 각각 오프셋 α 및 β 중 적어도 하나를 적용하여, 5개의 추가 가중치 예측 파라미터를 생성한 것으로 도시되었다. 여기서, α 및 β의 초기값은 각각 1로 설정된 것으로 가정하였다. 도시된 예와 달리, α 및 β는 점진적으로 증가 또는 감소하는 경향을 띨 수도 있다. 가중치 예측 파라미터 세트에 포함된 후보의 순서는 도시된 예에 한정되지 않으며, 임의의 방법을 통해 순서 변경이 가능하다.
부호화 장치는, 가중치 예측 파라미터 세트 중 현재 블록의 최적의 가중치 예측 파라미터를 결정한 뒤, 결정된 가중치 예측 파라미터를 식별하는 정보(예컨대, 인덱스 정보)를 부호화할 수 있다. 또한, 부호화 장치는 가중치 예측 파라미터 세트를 생성하기 위한 오프셋 또는 가중치 예측 파라미터의 개수 등에 관한 정보도 블록 단위 또는 상위 헤더를 통해 부호화할 수 있다.
복호화 장치는, 부호화 장치와 동일한 방법으로 가중치 예측 파라미터를 구성하고, 수신한 인덱스 정보를 기초로, 현재 블록에 대한 가중치 예측 파라미터를 획득할 수 있다.
현재 블록에 대한 가중치 예측 파라미터를 유도할 때 이용되는, 현재 블록 또는 참조 블록에 인접한 주변 화소들의 범위는, 현재 블록 또는 참조 블록에 인접한 화소들 중 일부에 한정될 수도 있다.
일 예로, 도 17은 회귀 분석에 사용되는 화소들의 위치를 나타낸다. 도 17의 (a)에 도시된 예에서와 같이, 현재 블록의 가중치 예측 파라미터를 유도하기 위해, 현재 블록 또는 참조 블록에 인접한 모든 주변 화소들이 이용될 수도 있고, 도 17의 (b) 및 (c)에 도시된 예에서와 같이, 현재 블록 또는 참조 블록의 가중치 예측 파라미터를 유도하기 위해, 현재 블록 또는 참조 블록에 인접한 주변 화소들 중 일부만이 이용될 수도 있다.
또는, 부호화 장치는, 가중치 예측 파라미터를 추정하는데 이용되는 주변 화소들의 샘플링 방식을 알려주는 정보를 부호화할 수도 있다. 일 예로, 부호화 장치는, 도 17의 (a)~(c) 중 어떤 방식으로 주변 샘플을 샘플링하였는지 나타내는 정보를 부호화 할 수 있다.
도 17의 (a) 내지 (c)에서는, 현재 블록 또는 참조 블록에 인접한 주변 화소들만이 이용되는 것으로 도시되었지만, 현재 블록 또는 참조 블록에 인접하지 않지만, 현재 블록 또는 참조 블록에 인접한 주변 화소들에 인접한 화소들 또한, 가중치 예측 파라미터를 결정하는 것에 이용될 수 있다. 일 예로, 현재 블록에 대한 가중치 예측 파라미터는, 현재 블록 또는 참조 블록의 상단 M개의 행에 포함된 화소들 또는 좌측 N개 행에 포함된 화소들(여기서, M,N은 2 이상의 정수)이 이용될 수도 있다.
또한, 현재 블록의 가중치 예측 파라미터를 유도하기 위해 이용되는 주변 화소의 범위는 현재 블록의 너비를 K배 또는 현재 블록의 높이를 L배(K 및 L은 1 이상의 정수)한 것으로 확장될 수도 있다. 일 예로, 현재 블록 또는 참조 블록의 좌측 상단 화소의 위치를 (0, 0)이라 했을 때, (-1, -1) 부터 (2K-1, -1) 까지의 상단 주변 화소 및 (-1, -1) 부터 (-1, 2L-1) 까지의 좌측 주변 화소가 현재 블록의 가중치 예측 파라미터를 유도하는 것에 이용될 수 있다.
화면 내 예측에 의해, 현재 블록에 대한 예측 블록을 생성하는 경우, 현재 블록에 대한 복원 화소값을 고려하여, 예측 블록에 대한 보정을 수행할 수 있다. 이하, 화면 내 예측에 의해 생성된 예측 블록에 대해 보정을 수행하는 방법에 대해 상세히 살펴보기로 한다.
도 18은 현재 블록에 대한 보정 계수를 이용할 것인지 여부를 결정하는 과정을 나타낸 흐름도이다.
먼저, 부호화 장치는, 현재 블록이 화면 내 예측으로 부호화되는지 여부를 판단할 수 있다(S1801). 현재 블록이 화면 내 예측으로 부호화되었다면, 화면 내 예측이 사용되었을 때의 코스트(코스트 A)를 계산할 수 있다(S1802).
반면, 현재 블록이 화면 내 예측으로 부호화되지 않았다면(S1801), 현재 블록에 대한 보정값을 결정하는 과정을 종료할 수 있다.
현재 블록이 화면 내 예측으로 부호화된 경우, 현재 블록 주변의 복원 화소 영역을 이용하여, 화면 내 예측의 결과로 생성되는 현재 블록에 대한 예측 블록에 보정을 수행할 수 있다(S1803). 여기서, 복원 화소 영역은, 현재 블록 주변의 주변 화소들을 포함할 수 있다.
그리고, 부호화 장치는, 현재 블록에 대해 보정이 수행되었을 때의 코스트(코스트 B)를 계산할 수 있다(S1804)
이후, 부호화 장치는, 현재 블록에 대해 화면 내 예측을 수행함에 따라 계산된 코스트(코스트 A) 및 화면 내 예측을 수행한 결과로 생성된 예측 블록을 추가적으로 보정함에 따라 계산된 코스트(코스트 B)를 비교하여, 현재 블록에 대해 보정을 적용할 것인지 여부를 결정할 수 있다(S1805). 예컨대, 코스트 A가 코스트 B보다 큰 경우, 현재 블록에 복원 화소 영역을 이용한 보정이 적용되지 않는 것으로 결정되는 반면, 코스트 B가 코스트 A보다 큰 경우, 현재 블록에 복원 화소 영역을 이용한 보정이 적용되는 것으로 결정될 수 있다.
도 19는 현재 블록에 대한 보정 계수를 결정하는 예를 설명하기 위한 도면이다.
현재 블록에 대해 화면 내 예측이 사용되었다면, 부호화 장치는 현재 블록 주변의 복원 화소 영역의 표준 편차(
Figure PCTKR2017004569-appb-I000001
)를 계산할 수 있다. 도 19에서, 복원 화소 영역은, 현재 블록의 좌측 경계에 인접한 주변 화소 및 현재 블록의 상단 경계에 인접한 주변 화소 및 현재 블록의 좌측 상단 코너에 인접한 주변 화소 등을 포함하는 것으로 도시되었다. 복원 화소 영역의 크기 또는 모양은 도시된 예에 한정되지 않는다.
일 예로, 도 20은 복원 화소 영역의 다양한 모양을 나타낸다.
도 20에 도시된 예에서, M, N, O, P 등은 화소 간격을 의미한다. O 및 P가 각각 현재 블록의 가로 및 세로 길이보다 작다고 가정할 경우, O와 P는 음수값을 가질수도 있다. 도 20에 도시된 예는 복원 화소 영역으로 설정될 수 있는 다양한 모양의 예시를 나타낸 것일 뿐, 도 20에 도시된 것과 다른 크기 또는 다른 모양으로, 복원 화소 영역이 설정되는 것도 가능하다.
또한, 서브 샘플링을 통해, 복원 화소 영역에 포함된 일부 화소들을 이용하여, 복원 화소 영역의 표준 편차를 계산하는 것도 가능하다. 일 예로, 도 11에 도시된 도면에서와 같이, 부호화 장치는, 현재 블록 주변의 복원 화소 중 일부만을 이용하여 표준 편차를 계산할 수도 있고, 현재 블록의 경계 주변의 M개 이상의 행 또는N 개 이상의 열을 이용하여 표준 편차를 계산할 수도 있다. 또는, 현재 블록의 너비를 K배 또는 현재 블록의 높이를 L배 확장한 범위 내의 주변 화소들을 표준 편차 계산에 이용할 수도 있다.
이후, 부호화 장치는 현재 블록 보다 앞서 부호화/복호화된 블록들 중 화면 내 예측으로 부호화 되고, 현재 블록과 동일한 화면 내 예측 모드를 갖는 블록들을 대상으로, 현재 블록의 복원 화소 영역과 가장 유사한 복원 화소 영역을 갖는 블록을 결정할 수 있다. 일 예로, 부호화 장치는, 현재 블록의 복원 화소 영역에 대한 표준 편차와 동일 또는 유사한 표준 편차(
Figure PCTKR2017004569-appb-I000002
)를 갖는 복원 화소 영역에 인접한 블록을 결정할 수 있다. 일 예로, 도 19에 도시된 예에서, 블록 1이 현재 블록과 동일한 화면 내 예측 모드를 이용하였고, 현재 블록과 동일한 화면 내 예측 모드를 이용하여 부호화된 블록들 중 블록 1의 복원 화소 영역(B)에서의 표준 편차가 현재 블록의 복원 화소 영역(A)에서의 표준 편차와 가장 유사하다면, 블록 1이 현재 블록과 가장 유사한 특성을 갖는 것으로 취급될 수 있다. 이 경우, 부호화 장치는, 현재 블록의 복원 화소 영역(A)과 블록 1의 복원 화소 영역(B)을 이용하여, 현재 블록에 대한 보정 계수를 결정할 수 있다.
이때, 부호화 장치는 현재 블록의 복원 화소 영역과 동일한 크기 또는 모양을 갖는 복원 화소 영역을 대상으로, 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 탐색할 수도 있다.
보정 계수는 곱셈 계수 또는 덧셈 계수 중 적어도 하나를 포함할 수 있다. 이때, 곱셈 계수 및 덧셈 계수는 회귀 분석에 기초하여 유도될 수 있다. 일 예로, 곱셈 계수 및 덧셈 계수는 전술한 수학식 1에 기초하여 산출될 수 있다. 수학식 1을 이용하여 보정 계수를 산출하고자 하는 경우, Y는 현재 블록의 복원 화소 영역(A)에 포함된 화소들, X는 현재 블록과 유사한 특성을 갖는 블록(즉, 블록 1)의 복원 화소 영역(B)에 포함된 화소들을 나타낼 수 있다. 보정 계수는 수학식 1을 각각 w 및 o로 편미분함으로써 획득될 수 있다. 일 예로, 수학식 1을 각각 w와 o로 편미분한 뒤, 오차의 제곱의 값이 최소가 되는 w와 o를 유도하고, 유도된 w를 곱셈 계수, o를 덧셈 계수로 설정할 수 있다.
보정 계수가 유도되면, 현재 블록과 유사한 특성을 갖는 블록(즉, 블록 1)의 잔차 블록과, 화면 내 예측의 결과로 생성된 현재 블록의 예측 블록에 보정 계수를 적용하여, 현재 블록에 대한 보정을 수행할 수 있다. 일 예로, 현재 블록의 화면내 예측 블록은, 하기 수학식 2에 의해 보정될 수 있다.
Figure PCTKR2017004569-appb-M000002
상기 수학식 2에서, P'은 보정이 적용된 현재 블록에 대한 새로운 예측 블록을 나타내고, D_블록1은, 현재 블록과 유사한 특성을 갖는 블록(즉, 도 19의 블록 1)의 잔차 블록을 나타낸다. 아울러, P는 화면 내 예측을 수행한 결과로 생성되는 현재 블록에 대한 예측 블록을 나타내고, w 및 o는 보정 계수를 나타낸다.
수학식 2에서는, 현재 블록과 유사한 특성을 갖는 블록의 잔차 블록, 현재 블록에 대한 예측 블록 및 보정 계수를 이용하여 현재 블록에 대한 보정이 수행되는 것으로 설명하였으나, 현재 블록에 대한 보정은 설명한 것과 다른 방법으로 수행될 수도 있다. 일 예로, 현재 블록의 보정은, 현재 블록과 유사한 특성을 갖는 블록의 예측 블록을 이용하여 수행될 수도 있고, 현재 블록과 유사한 특성을 갖는 블록을 이용하지 않고 수행될 수도 있다.
상술한 예에서는, 곱셈 계수 및 덧셈 계수를 이용하여 현재 블록에 대한 보정이 수행되는 것으로 예시되었지만, 곱셈 계수 및 덧셈 계수 중 어느 하나만을 이용하여 현재 블록을 보정하는 것도 가능하다. 일 예로, 덧셈 계수를 이용하지 않고, 곱셈 계수만을 이용하여, 현재 블록에 대한 보정이 수행될 수 있다. 이 경우, 수학식 1에서 'o'를 유도하는 과정이 생략되고, 수학식 2에서, 곱셈 계수가 적용된 예측 블록에 덧셈 계수를 더해주는 과정이 생략될 수 있다.
상술한 예에서는, 현재 블록보다 앞서 복호화된 블록들을 대상으로, 현재 블록과 가장 유사한 특성을 갖는 블록에 대한 탐색이 수행되는 것으로 설명하였다. 이때, 부호화 장치는, 현재 블록을 포함하는 슬라이스 또는 픽처에 대해 복수의 탐색 영역을 설정한 뒤, 현재 블록과 가장 유사한 특성을 갖는 블록을 포함하는 탐색 영역에 대한 정보를 부호화하여 복호화 장치로 전송할 수도 있다. 이 경우, 복호화 장치는, 설정된 탐색 영역 내에서만, 현재 블록과 가장 유사한 특성을 갖는 블록을 탐색할 수 있다.
또한, 부호화 장치는 현재 블록의 복원 화소 영역의 표준 편차와 동일 또는 가장 유사한 표준 편차를 갖는 단일의 복원 화소 영역을 탐색할 수도 있고, 현재 블록의 복원 화소 영역의 표준 편차와 동일 또는 유사한 표준 편차를 갖는 복수의 복원 화소 영역을 탐색할 수도 있다. 일 예로, 부호화 장치는 현재 블록의 복원 화소 영역의 표준 편차와 동일 또는 유사한 복수개(N개)의 복원 화소 영역을 탐색할 수 있다. 복수개(N개)의 복원 화소 영역이 탐색되면, 탐색된 복원 화소 영역에 인접한 복수개의 블록을 후보 블록으로 설정하고, 복수개의 후보 블록 중 현재 블록의 보정 계수를 결정하는데 이용되는 블록을 특정하는 정보를 부호화할 수 있다. 여기서, 상기 정보는 복수개의 후보 블록(또는 복수개의 표준 편차) 중 어느 하나를 특정하기 위한 인덱스 정보일 수 있다. 후보 블록의 개수 N은 블록 단위 또는 상위 헤더를 통해 부호화될 수 있다.
상술한 예에서는, 현재 블록의 복원 화소 영역의 표준 편차를 산출하고, 산출된 표준 편차를 이용하여, 현재 블록과 가장 유사한 블록을 탐색하는 것으로 설명하였다. 설명한 예와 달리, 복원 화소 영역에서의 화소값들의 평균값을 이용하여, 현재 블록의 복원 화소 영역과 가장 유사한 복원 화소 영역을 탐색할 수도 있고, 복원 화소 영역 간의 SAD(Sum of Absolute Difference) 또는 SSD(Sum of Squared Difference) 등을 이용한 유사도 측정을 통해, 현재 블록의 복원 화소 영역과 가장 유사한 복원 화소 영역을 탐색하는 것도 가능하다.
상술한 예에서는, 현재 블록과 동일한 화면 내 예측 모드로 부호화된 블록에 한하여, 현재 블록에 대한 후보 블록(즉, 현재 블록의 보정 계수를 결정하기 위한 후보 블록)이 될 수 있는 것으로 설명하였다. 다른 예로, 부호화 장치는 현재 블록과 유사한 화면 내 예측 모드를 갖는 블록도, 현재 블록에 대한 후보 블록으로 이용될 수 있다. 여기서, 현재 블록과 유사한 화면 내 예측 모드를 갖는 블록은, 현재 블록의 화면 내 예측 모드와 임계값(예컨대, ±N) 이내의 화면 내 예측 모드를 이용하여 부호화된 것일 수 있다. 또는, 현재 블록과 동일 또는 유사한 화면 내 예측 모드를 갖는지 여부를 불문하고, 화면 내 예측을 통해 부호화된 블록이라면, 해당 블록도 현재 블록에 대한 후보 블록으로 이용할 수도 있다.
도 21은 보정 계수와 관련한 정보를 부호화하는 방법을 나타낸 흐름도이다.
부호화 장치는, 현재 블록이 화면 내 예측으로 부호화되었는지 여부에 관한 정보를 부호화할 수 있다(S2101). 현재 블록이 화면 내 예측으로 부호화된 경우(S2102), 부호화 장치는, 복원 화소 영역을 이용하여 현재 블록에 대한 보정이 수행되는지 여부에 대한 정보를 부호화할 수 있다(S2103).
복원 화소 영역을 이용하여 현재 블록에 대한 보정이 수행되었다면(S2104), 부호화 장치는, 현재 블록의 보정 계수를 유도하기 위한 정보를 부호화할 수도 있다(S2105). 일 예로, 현재 블록의 보정 계수를 유도하기 위한 후보가 복수개 존재하는 경우(예컨대, 현재 블록의 보정 계수를 유도하기 위한 후보 블록이 복수개 존재하는 경우), 부호화 장치는 복수개의 후보 중 현재 블록의 보정 계수를 유도하기 위해 사용되는 블록을 식별하는 식별 정보를 부호화할 수 있다. 여기서, 식별 정보는 복수개의 후보 중 어느 하나를 나타내는 인덱스 정보일 수 있다. 일 예로, N 개의 후보가 존재한다면, 인덱스 정보는 0부터 N-1 중 어느 하나를 나타낼 수 있다.
도 22는 복호화 장치에서 현재 블록에 대한 보정을 수행할 것인지 여부를 결정하는 과정을 나타내는 흐름도이다.
도 22를 참조하면, 먼저, 복호화 장치는, 현재 블록이 화면 내 예측으로 부호화되었는지 여부를 나타내는 정보를 복호화할 수 있다(S2201).
현재 블록이 화면 내 예측으로 부호화된 경우(S2202), 복호화 장치는 현재 블록에 대해 복원 화소 영역을 이용한 보정이 이용되는지 여부를 나타내는 정보를 복호화할 수 있다(S2203). 이때, 상기 정보는 1비트의 플래그 일 수 있으나, 이에 한정되는 것은 아니다.
현재 블록에 대해 보정을 수행할 것으로 판단되는 경우(S2204), 복호화 장치는 부호화 장치와 동일한 방법으로, 현재 블록에 대한 보정 계수를 유도할 수 있다(S2205). 일 예로, 복호화 장치는 현재 블록보다 앞서 복호화된 블록 중 현재 블록과 가장 유사한 특징을 갖는 블록을 탐색하고, 탐색된 블록을 이용하여, 현재 블록의 보정 계수를 유도할 수 있다.
다른 예로, 복호화 장치는 부호화 장치로부터 전송되는 정보에 기초하여, 현재 블록에 대한 보정 계수를 획득할 수도 있다. 여기서, 부호화 장치로부터 전송되는 정보는, 현재 블록과 가장 유사한 특징을 갖는 블록이 포함된 영역을 식별하는 정보 또는 복수개의 후보 블록 중 현재 블록과 가장 유사한 특징을 갖는 블록을 식별하는 식별 정보 등을 포함할 수 있다.
부호화 장치는 현재 블록에 대한 보정 계수를 직접 부호화하고, 이를 복호화 장치로 전송할 수도 있다. 이 경우, 복호화 장치는 비트스트림으로부터 보정 계수를 복호화하고, 복호화된 보정 계수를 이용하여, 현재 블록에 대한 보정을 수행할 수 있다.
현재 블록에 대한 보정 계수가 획득되면, 복호화 장치는 획득된 보정 계수를 이용하여 현재 블록에 대한 보정을 수행할 수 있다. 일 예로, 보정은 앞서 설명한 수학식 2를 통해 수행될 수 있다.
현재 블록에 대한 보정은, 컬러 성분(color component) 간 적용될 수도 있다. 일 예로, 영상이 Y, Cb, Cr 포맷인 경우, 색차 신호인 Cb 및 Cr은 유사한 특성을 띨 확률이 높다. 이에 따라, 부호화 순서가 Y, Cb 및 Cr 순이라면, Cr 성분에 대해서는, Cb 영상에 적용된 보정 계수를 그대로 이용하거나, Cb 영상에서 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 탐색할 수도 있다.
일 예로, 부호화 장치는, Cr 성분의 현재 블록 주변에 복원 화소 영역을 설정한 뒤, 도 2에 도시된 움직임 추정과 유사한 방식으로, 이미 복호화된 Cb 영상에서 현재 블록의 주변 화소 영역과 가장 유사한 복원 화소 영역을 탐색할 수 있다. 이때, 유사성의 판단 기준은, 표준 편차 비교, SAD 또는 SSD 등일 수 있다. Cb 영상으로부터 Cr 성분인 현재 블록의 복원 화소 영역과 가장 유사한 복원 화소 영역이 탐색되면, 탐색된 복원 화소 영역에 기초하여 수학식 1을 통해 보정 계수를 유도하고, 유도된 보정 계수에 기초하여 수학식 2를 통해 현재 블록에 대한 보정을 수행할 수 있다.
다른 예로, Cr 성분인 현재 블록의 보정 계수는, Cr 성분의 복원 화소 영역 대신, 기 설정된 위치의 Cb 성분 블록의 복원 화소 영역을 이용하여 현재 블록의 보정 계수를 유도할 수도 있다. 일 예로, 부호화 장치는 Cb 영상 내 Cr 성분인 예측 블록과 동 위치에 존재하는 Cb 성분의 잔차 블록을 이용하여 보정을 수행할 수도 있다.
다음으로, 현재 블록에 대한 화면 내 예측 모드를 예측하는 방법에 대해 상세히 살펴보기로 한다.
도 23은 부호화 장치에서, 현재 블록의 복원 화소 영역을 이용하여, 현재 블록의 화면 내 예측 모드에 대한 예측을 수행할 것인지 여부를 결정하는 과정을 나타낸 흐름도이다.
먼저, 부호화 장치는, 현재 블록에 이웃한 주변 블록의 화면 내 예측 모드를 이용하여, 현재 블록의 화면 내 예측 모드를 예측하는 경우의 코스트(코스트 A)를 계산한다(S2301). 현재 블록에 이웃한 주변 블록의 화면 내 예측 모드를 이용하여, 현재 블록의 화면 내 예측 모드를 예측하는 것은, 인덱스를 이용한 화면 내 예측 모드 예측 방법이라 호칭될 수도 있다. 인덱스를 이용한 화면 내 예측 모드 예측 방법은 도 24를 통해 상세히 설명하기로 한다.
부호화 장치는 화면 내 예측 모드를 예측하지 않는 방법을 이용한 경우의 코스트(이하, 코스트 B라 호칭함)를 계산할 수 있다(S2302). 화면 내 예측 모드를 예측하지 않는 방법을 이용한 화면 내 예측 모드 결정 방법은 도 25을 통해 상세히 설명하기로 한다.
그리고, 부호화 장치는 현재 블록의 복원 화소 영역을 이용하여, 현재 블록의 화면 내 예측 모드를 예측하는 방법을 이용한 경우의 코스트(이하, 코스트 C라 호칭함)를 계산할 수 있다(S2303). 현재 블록의 복원 화소 영역을 이용하여, 현재 블록의 화면 내 예측 모드를 예측하는 방법은, 도 26를 통해 상세히 설명하기로 한다.
이후, 부호화 장치는 코스트 A, 코스트 B 및 코스트 C를 비교하여, 현재 블록에 대한 최적의 화면 내 예측 모드 결정 방법을 결정할 수 있다(S2304).
도 24는 인덱스를 이용한 화면 내 예측 모드 예측 방법을 설명하기 위한 도면이다.
설명의 편의를 위해, 현재 블록은 화면 내 예측으로 부호화되고, 현재 블록의 상단에 인접한 주변 블록의 화면 내 예측 모드 및 현재 블록의 좌측에 인접한 주변 블록의 화면 내 예측 모드는 각각 A, B인 것으로 가정한다.
현재 블록의 화면 내 예측 모드를 예측하기 위해, 부호화 장치는 현재 블록에 인접한 주변 블록들의 화면 내 예측 모드를 이용하여 후보 모드를 구성할 수 있다. 후보 모드는 복수개 존재할 수 있다. 설명의 편의를 위해, 본 실시예에서는, 후보 모드의 개수가 2개인 것으로 가정하나, 이보다 더 많은 수(예컨대, 3개부터 6개 사이, 또는 그 이상)의 후보 모드가 존재할 수도 있다.
일 예로, 부호화 장치는, A 및 B가 동일한지 여부를 판단하고, A 및 B가 동일한 경우, A를 첫번째 후보 모드로 설정하고, 임의의 화면 내 예측 모드를 두번째 후보 모드로 설정할 수 있다. 3개 이상의 후보 모드를 이용하는 경우, A를 첫번째 후보 모드로 설정한 뒤, 임의의 화면 내 예측 모드 간의 우선 순위에 기초하여, 잔여 후보 모드들을 설정할 수 있다. 여기서, 임의의 예측 모드는 통계적으로 발생 빈도수가 높은 화면 내 예측 모드들을 포함할 수 있다. 일 예로, 임의의 예측 모드는, DC 또는 Planar 등의 비 방향성 예측 모드, 후보 모드와 유사한 방향의 예측 모드, Vertical, Horizontal 또는 대각선 방향 등의 방향성 예측 모드 등을 포함할 수 있다.
A 와 B가 상이한 경우, A를 첫번째 후보 모드로 설정하고, B를 두번째 후보 모드로 설정할 수 있다. 3개 이상의 후보 모드를 이용하는 경우, A 및 B와 상이한 임의의 예측 모드 간의 우선 순위에 기초하여, 잔여 후보 모드들을 설정할 수 있다.
이후, 부호화 장치는 현재 블록의 화면 내 예측 모드와 동일한 후보 모드를 식별하는 정보를 부호화한다. 여기서, 상기 정보는 복수의 후보 모드 중 어느 하나를 나타내는 인덱스 정보일 수 있다.
후보 모드의 개수는, 기 설정된 값일 수도 있고, 블록 단위 또는 상위 헤더를 통해 부호화되어 복호화 장치로 전송될 수도 있다. 후보 모드를 생성하는 과정은 부호화 장치 및 복호화 장치에서 동일한 방법을 이용할 수 있다.
현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하지 않는 경우, 부호화 장치는 코스트 A를 코스트 B 및 코스트 C보다 높은 값으로 설정하여, 인덱스를 이용한 화면 내 예측 모드 예측 방법이 선택되지 않도록 할 수도 있다.
도 25는 화면 내 예측 모드를 예측하는 방법을 이용하지 않고, 현재 블록의 화면 내 예측 모드를 결정하는 예를 설명하기 위한 도면이다.
현재 블록의 인트라 예측 모드와 동일한 후보 모드가 존재하지 않는 경우, 부호화 장치는 현재 블록이 이용할 수 있는 모든 화면 내 예측 모드에서 후보 모드를 제외한 잔여 예측 모드 중 현재 블록의 인트라 예측 모드를 직접 부호화할 수 있다.
예를 들어, 현재 블록이 이용할 수 있는 인트라 예측 모드의 수가 10개이고, 후보 모드의 개수는 2개(예컨대, 첫번째 후보 모드 A = 0, 두번째 후보 모드 B = 3)라고 가정할 경우, 후보 모드를 제외한 잔여 예측 모드는 1, 2, 4, 5, 6, 7, 8, 9가 된다. 부호화 장치는 잔여 예측 모드를 순서에 따라 넘버링할 수 있다. 예컨대, A가 B보다 작은 경우, A보다 작은 잔여 예측 모드는 기존 인덱스를 그대로 갖고 있게 되고, A 및 B 사이의 잔여 예측 모드는 1이 감소한 인덱스를 갖게 되며, B보다 큰 잔여 예측 모드는 2가 감소한 인덱스를 갖게 된다. A가 0, B가 3인 것으로 가정한바, 1, 2는 인덱스가 1 감소한, 0, 1로 변경되고, 4~9는 인덱스가 2 감소한 2~7로 변경될 수 있다. 이후, 부호화 장치는 인덱스가 재할당된 잔여 예측 모드 중에서, 현재 블록의 화면 내 예측 모드를 나타내는 식별 정보를 부호화할 수 있다.
복호화 장치는, 부호화 장치로부터 식별 정보를 수신한 뒤, 수신한 식별 정보를 기초로, 현재 블록에 대한 화면 내 예측 모드를 결정할 수 있다. 이때, 복호화된 잔여 예측 모드가 후보 모드들보다 작은 경우, 잔여 예측 모드를 그대로 현재 인트라 예측 모드로 결정하고, 잔여 예측 모드가 후보 모드들 중 적어도 하나 이상보다 큰 경우, 잔여 예측 모드에 잔여 예측 모드보다 작은 후보 모드들의 개수 만큼 인덱스를 더하여, 현재 블록의 인트라 예측 모드를 결정할 수 있다. 일 예로, 후보 모드, A 및 B가 3이고, 잔여 예측 모드가 5일 경우, 현재 블록의 화면 내 예측 모드는, 5에 2를 더한 7이 될 수 있다.
도 25을 통해 설명한 예에서는, 앞서 도 24를 통해 설명한 바와 같이, 후보 모드가 현재 블록에 이웃한 주변 블록의 화면 내 예측 모드를 포함하는 것으로 가정하였다. 설명한 예에 그치지 않고, 후보 모드는 후술되는 도 26을 통해 설명할, 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 주변 화소로 삼는 블록의 화면 내 예측 모드를 포함할 수도 있다.
도 26은 현재 블록의 복원 화소 영역을 이용하여, 현재 블록의 화면 내 예측 모드를 예측하는 방법을 설명하기 위한 도면이다.
부호화 장치는, 이미 부호화/복호화가 완료된 영역으로부터, 현재 블록 주변의 복원 화소 영역과 가장 유사한 영역을 탐색할 수 있다. 이때, 탐색은 블록 단위로 이루어질 수 있다.
현재 블록 주변의 복원 화소 영역과 가장 유사한 영역이 탐색되었다면, 부호화 장치는 현재 블록 주변의 복원 화소 영역과 가장 유사한 영역을 복원 화소 영역으로 삼는 블록의 화면 내 예측 모드에 기초하여, 현재 블록의 화면 내 예측 모드를 예측할 수 있다.
일 예로, 도 26에 도시된 예에서, 현재 블록의 복원 화소 영역 A와 가장 유사한 복원 화소 영역이 B인 경우, 부호화 장치는 B를 복원 화소 영역으로 삼는 블록인 블록 1의 화면 내 예측 모드와 현재 블록의 화면 내 예측 모드 사이의 잔차값을 부호화할 수 있다.
부호화 장치는, 현재 블록의 복원 화소 영역와 유사한 복수개의 복원 화소 영역을 탐색할 수도 있다. 이때, 복원 화소 영역의 탐색 개수(P)는, 기 설정된 개수를 사용하거나, 블록 단위 또는 상위 헤더를 통해 시그널링될 수도 있다.
일 예로, 도 26에 도시된 예에서, 현재 블록의 복원 화소 영역 A와 유사한 복원 화소 영역 B 및 C가 검출되었다면, 부호화 장치는 B를 복원 화소 영역으로 삼는 블록인 블록 1 및 C를 복원 화소 영역으로 삼는 블록인 블록 2의 화면 내 예측 모드 중 어느 하나를 이용하여, 현재 블록의 화면 내 예측 모드를 예측할 수 있다. 이때, 부호화 장치는 블록 1 및 블록 2 중 현재 블록의 화면 내 예측 모드의 예측에 보다 최적인 블록을 나타내는 인덱스(예컨대, 현재 블록의 화면 내 예측 모드와의 잔차값이 최소인 블록)와, 인덱스가 가리키는 블록의 화면 내 예측 모드와 현재 블록의 화면 내 예측 모드 사이의 차분값을 부호화할 수 있다.
상술한 예에서는, 현재 블록과 유사한 특징을 갖는 복수의 블록 중 어느 하나를 나타내는 인덱스 정보가 부호화되는 것으로 설명하였지만, 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역 중 어느 하나를 나타내는 인덱스 정보를 부호화하는 것도 가능하다. 이 경우, 복호화 장치는, 현재 블록의 복원 화소 영역과 유사한 복수의 복원 화소 영역 중 인덱스 정보에 의해 식별되는 어느 하나를 선택하고, 선택된 복원 화소 영역을 주변 화소로 삼는 블록의 화면 내 예측 모드를 이용하여, 현재 블록의 화면 내 예측 모드를 복호화할 수 있다.
부호화 장치는 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 1개 탐색할 것인지 혹은 복수개(P) 탐색할 것인지 여부를 나타내는 정보도 부호화할 수도 있다. 또는, 부호화 장치 및 복호화 장치에서, 기 설정된 조건 하에, 복원 영역의 탐색 개수를 적응적으로 결정할 수도 있다.
다음으로, 현재 블록에 대한 화면 내 예측 모드를 결정하는 방법과 관련한 정보를 부호화하는 예에 대해 살펴보기로 한다.
도 27은 현재 블록에 대한 화면 내 예측 모드를 결정하는 방법과 관련한 정보를 부호화하는 과정을 나타낸 흐름도이다.
먼저, 부호화 장치는, 현재 블록에 대한 화면 내 예측 모드를 예측하는 방법이 이용되는지 여부를 나타내는 정보를 부호화할 수 있다(S2701). 여기서, 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다.
현재 블록의 화면 내 예측 모드를 예측하는 방법이 이용되는 경우(S2702), 부호화 장치는, 복원 화소 영역을 이용한 화면 내 예측 모드 예측 방법이 이용되는지 여부를 나타내는 정보를 부호화할 수 있다(S2703). 여기서, 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다.
복원 화소 영역을 이용한 화면 내 예측 모드 예측 방법이 이용되는 경우(S2704), 현재 블록의 화면 내 예측 모드를 예측하기 위해 필요한 정보를 부호화할 수 있다(S2705). 일 예로, 현재 블록의 복원 화소 영역과 유사한 복수개의 복원 화소 영역을 탐색하는 경우라면, 현재 블록과 유사한 특징을 갖는 복수개의 블록 중 현재 블록의 화면 내 예측 모드와 동일 또는 유사한 화면 내 예측 모드를 갖는 블록을 식별하기 위한 식별 정보를 부호화할 수 있다. 여기서, 상기 식별 정보는 복수의 후보 블록 중 어느 하나를 나타내는 인덱스 정보일 수 있다. 또한, 부호화 장치는 후보 블록의 화면 내 예측 모드와 현재 블록의 화면 내 예측 모드 사이의 차분값을 부호화할 수도 있다.
만약, 복원 화소 영역을 이용한 화면 내 예측 모드 예측 방법이 이용되지 않는 것으로 판단되는 경우(S2704), 현재 블록의 화면 내 예측 모드는 현재 블록에 이웃한 주변 블록들의 화면 내 예측 모드를 이용한 예측 방법을 이용하여 부호화될 수 있다. 이에 따라, 부호화 장치는, 주변 블록들의 화면 내 예측 모드들을 기초로 생성되는 후보 모드 중 현재 블록의 화면 내 예측 모드와 동일한 후보 모드를 식별하기 위한 식별 정보를 부호화할 수 있다(S2706).
만약, 화면 내 예측 모드를 예측하는 방법이 사용되지 않았다면, 현재 블록이 이용할 수 있는 화면 내 예측 모드 중 후보 모드를 제외한 잔여 모드를 대상으로, 현재 블록의 화면 내 예측 모드를 부호화할 수 있다(S2707).
도 28은 현재 블록의 화면 내 예측 모드를 복호화하는 과정을 나타낸 흐름도이다.
먼저, 복호화 장치는, 비트스트림으로부터, 현재 블록이 화면 내 예측으로 부호화되었는지 여부를 나타내는 정보를 복호화할 수 있다.
현재 블록이 화면 내 예측으로 부호화된 경우, 복호화 장치는, 현재 블록에 대한 화면 내 예측 모드를 예측하는 방법이 이용되는지 여부를 나타내는 정보를 복호화할 수 있다(S2801). 여기서, 상기 정보는 1비트의 플래그 일 수 있으나, 이에 한정되는 것은 아니다.
현재 블록의 화면 내 예측 모드를 예측하는 방법이 이용되는 경우(S2802), 복호화 장치는 현재 블록의 복원 화소 영역을 이용하여, 현재 블록의 화면 내 예측 모드를 예측하는지 여부를 나타내는 정보를 복호화할 수 있다(S2803). 여기서, 상기 정보는 1비트의 플래그 일 수 있으나, 이에 한정되는 것은 아니다.
복원 화소 영역을 이용한 화면 내 예측 모드 예측 방법이 이용되는 경우(S2804), 현재 블록의 화면 내 예측 모드를 예측하기 위해 필요한 정보를 복호화할 수 있다(S2805). 일 예로, 현재 블록의 복원 화소 영역과 유사한 복수개의 복원 화소 영역이 탐색된 경우라면, 현재 블록과 유사한 특징을 갖는 복수개의 블록 중 현재 블록의 화면 내 예측 모드와 동일 또는 유사한 화면 내 예측 모드를 갖는 블록을 식별하기 위한 식별 정보를 복호화할 수 있다. 여기서, 상기 식별 정보는 복수의 후보 블록 중 어느 하나를 나타내는 인덱스 정보일 수 있다. 또한, 복호화 장치는 식별 정보에 의해 식별되는 후보 블록의 화면 내 예측 모드와 현재 블록의 화면 내 예측 모드 사이의 차분값을 복호화할 수도 있다. 부호화 장치는 복호화된 정보에 기초하여, 현재 블록의 화면 내 예측 모드를 결정할 수 있다.
만약, 복원 화소 영역을 이용한 화면 내 예측 모드 예측 방법을 이용하지 않는 것으로 판단되는 경우(S2804), 복호화 장치는, 현재 블록에 이웃한 주변 블록들의 화면 내 예측 모드를 이용한 예측 방법을 이용하여 현재 블록의 화면 내 예측 모드를 결정할 수 있다. 이를 위해, 복호화 장치는, 현재 블록에 이웃한 주변 블록들의 화면 내 예측 모드를 이용하여, 후보 모드를 구성하고, 후보 모드 중 현재 블록의 화면 내 예측 모드와 동일한 후보 모드를 식별하기 위한 식별 정보를 복호화할 수 있다(S2806). 복호화 장치는, 식별 정보가 나타내는 후보 모드를 현재 블록의 화면 내 예측 모드로 설정할 수 있다.
만약, 화면 내 예측 모드를 예측하는 방법이 사용되지 않았다면, 복호화 장치는 현재 블록에 대한 잔여 모드 정보를 복호화할 수 있다(S2807). 이후, 복호화 장치는, 현재 블록의 후보 모드 및 잔여 모드 정보를 기초로, 현재 블록의 화면 내 예측 모드를 결정할 수 있다.
상술한 실시예에서는, 현재 블록에 이웃한 주변 블록의 화면 내 예측 모드를 이용하여, 현재 블록의 화면 내 예측 모드를 예측하는 방법과, 현재 블록의 복원 화소 영역과 동릴 또는 유사한 복원 화소 영역을 주변 화소로 갖는 블록의 화면 내 예측 모드를 이용하여, 현재 블록의 화면 내 예측 모드를 예측 하는 방법이, 별개의 예측 방법인 것으로 설명하였다. 다른 예로, 두 개의 예측 방법은, 하나의 예측 방법으로 통합되어 이용될 수도 있다. 일 예로, 현재 블록의 화면 내 예측 모드를 예측하는 방법을 이용하도록 설정되는 경우, 부호화 장치는, 현재 블록 주변의 화면 내 예측 모드 및 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 주변 화소로 갖는 블록의 화면 내 예측 모드를 기초로 후보 모드를 구성할 수 있다. 이때, 후보 모드는 주변 블록의 화면 내 예측 모드 및 현재 블록과 유사한 특징을 갖는 블록의 화면 내 예측 모드를 포함하고, 임의의 화면 내 예측 모드를 더 포함할 수도 있다. 이 경우, 현재 블록의 화면 내 예측 모드의 예측 방법을 특정하기 위한 부호화 과정(즉, S2703) 및 복호화 과정(S2803)은 생략될 수 있을 것이다.
다음으로, 복원 화소 영역을 이용하여, 화면 내 예측을 수행하는 방법에 대해 살펴보기로 한다.
도 29는 복원 화소 영역을 이용하여 화면 내 예측을 수행하는 방법을 설명하기 위한 도면이다.
현재 블록의 예측 블록을 유도하기 위해, 현재 영상 내, 현재 블록 주위의 복원 화소 영역과 가장 유사한 복원 화소 영역을 탐색할 수 있다. 일 예로, 현재 블록 주위의 복원 화소 영역 A와 가장 유사한 복원 화소 영역이 B라면, B를 복원 화소 영역으로 갖는 블록(즉, 블록 1)을 현재 블록의 예측 블록으로 이용할 수 있다.
복원 화소 영역을 이용할 경우, 현재 영상 내 현재 블록의 복원 화소 영역과 가장 유사한 복원 화소 영역을 탐색한 뒤, 탐색 결과에 따라, 현재 블록의 예측 블록으로 이용될 블록이 결정되기 때문에, 일반적인 화면 내 예측과는 달리, 화면 내 예측 모드가 불필요하다. 이에 따라, 화면 내 예측 모드의 부호화 없이도, 화면 내 예측을 수행할 수 있는 이점이 있다.
이때, 부호화/복호화 과정에서의 복잡성을 줄이기 위해, 유사한 복원 화소 영역을 탐색하는데 이용되는 영역을 제한할 수도 있다. 탐색 범위를 나타내는 정보는 블록 단위 또는 상위 헤더를 통해 부호화되어 복호화 장치로 전송될 수 있다. 일 예로, 부호화 장치는 현재 블록을 기준으로, 현재 블록보다 앞서 복원된 Q개의 블록들을 탐색 범위로 설정할 수 있다. 또는, 부호화 장치는 탐색 범위의 크기를 화소 단위로 포함하고, 탐색 범위의 크기를 나타내는 정보를 블록 단위 또는 상위 헤더를 통해 부호화할 수도 있다.
도 30은 복원 화소 영역을 이용하여 현재 블록의 화면 내 예측 방법을 결정하는 방법을 나타낸 흐름도이다.
먼저, 부호화 장치는, 복원 화소 영역을 이용한 화면 내 예측을 수행하였을 경우의 코스트(코스트 A)를 계산하고(S3001), 복원 화소 영역을 이용하지 않고 화면 내 예측을 수행하였을 경우의 코스트(코스트 B)를 계산할 수 있다(S3002).
부호화 장치는 코스트 A 및 코스트 B를 비교하여, 복원 화소 영역을 이용하여, 화면 내 예측을 수행할 것인지 여부를 결정할 수 있다(S3003).
도 31은 복원 화소 영역을 이용한 화면 내 예측 수행 여부와 관련된 정보를 부호화하는 방법을 나타낸 흐름도이다.
먼저, 부호화 장치는 복원 화소 영역을 이용하여 화면 내 예측을 수행할 것인지 여부를 나타내는 정보를 부호화할 수 있다(S3101). 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다.
복원 화소 영역을 이용하여 화면 내 예측을 수행하는 경우(S3102), 부호화 장치는 현재 블록의 화면 내 예측 모드와 관련한 정보를 부호화하지 않고 종료할 수 있다.
반면, 복원 화소 영역을 이용하지 않고 화면 내 예측을 수행하는 경우(S3102), 부호화 장치는 현재 블록의 화면 내 예측 모드와 관련된 정보를 부호화할 수 있다(S3103). 여기서, 화면 내 예측 모드와 관련된 정보는, 현재 블록의 화면 내 예측 모드가 MPM 후보와 동일한지 여부를 나타내는 정보, MPM 인덱스 또는 잔여 모드 정보 등을 포함할 수 있다.
도 32는 복원 화소 영역을 이용한 화면 내 예측 수행 여부와 관련된 정보를 복호화하는 방법을 나타낸 흐름도이다.
먼저, 복호화 장치는 복원 화소 영역을 이용하여 화면 내 예측을 수행할 것인지 여부를 나타내는 정보를 복호화할 수 있다(S3201). 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다.
복원 화소 영역을 이용하여 화면 내 예측을 수행하는 경우(S3202), 복호화 장치는 현재 블록의 화면 내 예측 모드와 관련한 정보를 복호화하지 않고, 현재 영상 내 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 탐색함으로써, 화면 내 예측을 수행할 수 있다.
반면, 복원 화소 영역을 이용하지 않고 화면 내 예측을 수행하는 경우(S3202), 복호화 장치는 현재 블록의 화면 내 예측 모드와 관련된 정보를 복호화할 수 있다(S3203). 여기서, 화면 내 예측 모드와 관련된 정보는, 현재 블록의 화면 내 예측 모드가 MPM 후보와 동일한지 여부를 나타내는 정보, MPM 인덱스 또는 잔여 모드 정보 등을 포함할 수 있다. 현재 블록의 화면 내 예측 모드가 획득되면, 복호화 장치는 획득된 화면 내 예측 모드를 이용하여, 현재 블록에 대한 화면 내 예측을 수행할 수 있다.
상기 실시예에서는 현재 블록에 인접한 복원 화소 영역을 이용하여 현재 영상 내에서 가장 유사한 복원 화소 영역을 찾은 후 그에 해당하는 블록을 예측 블록으로 설정하는 방법을 설명하였지만, 상기 블록을 현재 블록의 예측 블록으로 삼는 것이 아니라, 현재 블록의 복원 블록으로 설정하는 방법 또한 가능하다. 이때, 현재 블록에 인접한 복원 화소 영역과 가장 유사한 복원 화소 영역을 갖는 블록을, 현재 블록의 복원 블록으로 사용할 것인지 여부를 나타내는 정보가 부호화될 수 있다. 현재 블록에 인접한 복원 화소 영역과 가장 유사한 복원 화소 영역을 갖는 블록을, 현재 블록의 복원 블록으로 사용하는 경우, 변환, 양자화 및 변환 계수의 엔트로피 부호화 과정등을 거치지 않게 되어, 효율적인 영상 부호화가 가능하다.
다음으로, 복원 화소 영역을 이용하여, 현재 블록에 대해 화면 간 예측을 수행하는 방법에 대해 상세히 설명하기로 한다.
도 33은 현재 블록 주변의 복원 화소를 이용하여, 현재 블록에 대한 화면 간 예측을 수행하는 방법을 설명하기로 한다.
현재 블록을 부호화하고자 하는 경우, 현재 블록 주변에는 이미 부호화/복호화가 완료된 복원된 화소들이 존재할 수 있다. 이 경우, 부호화 장치는 현재 블록 주변의 복원 화소들 중 임의의 영역에 포함된 화소를 기준으로, 현재 블록에 대한 움직임 추정을 시작할 수 있다.
일 예로, 도 33에 도시된 예에서, 부호화 장치는, 참조 영상 내 현재 블록 주변의 복원 화소 영역 A와 동일 위치는 영역에서부터 움직임 추정을 시작할 수 있다. 현재 블록 주변의 복원 화소 영역 A과 유사한 복원 화소 영역 B가 탐색되면, 부호화 장치는 A와 B 사이의 거리를 움직임 벡터로 설정할 수 있다. 이후, 복원 화소 영역을 이용하여 추정된 움직임 벡터를 현재 블록에 적용하여, 현재 블록에 대한 예측 블록(즉, 참조 영상 내 움직임 벡터에 의해 지시되는 참조 블록)을 결정할 수 있다.
이때, 현재 블록 주변의 복원 화소 영역과 탐색된 복원 화소 영역은 동일한 크기 또는 모양을 가져야 한다. 도 33에서는, 현재 블록의 복원 화소 영역이, 현재 블록의 상단 경계에 인접한 화소, 현재 블록의 좌측 경계에 위치한 화소, 현재 블록의 코너(예컨대, 현재 블록의 좌상단 코너, 현재 블록의 우상단 코너, 현재 블록의 좌하단 코너 등)에 인접한 화소 등을 포함하는 영역인 것으로 설명하였으나, 복원 화소 영역의 모양은 이에 한정되지 않는다. 일 예로, 복원 화소 영역은 도 18을 통해 설명한 바와 같이, 복원 화소 영역은 다양한 크기 또는 모양을 가질 수 있다.
또한, 서브 샘플링을 통해, 복원 화소 영역에 포함된 일부 화소들을 이용하여, 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 탐색할 수도 있다. 일 예로, 부호화 장치는 앞서 도 15를 통해 설명한 바와 같이, 복원 화소 영역에 포함된 복원 화소들 중 일부만을 이용하거나, 현재 블록의 경계 주변의 M개 이상의 행 또는 N 개 이상의 열을 이용하여 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 탐색할 수도 있다. 부현재 블록의 너비를 K배 또는 현재 블록의 높이를 L배 확장한 범위 내의 주변 화소들을 이용하여, 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 탐색할 수도 있다.
참조 영상 내 현재 블록의 복원 화소 영역과 유사한 복원 화소 영역을 탐색하는 것은, 복원 화소 영역 내 유사도를 비교함으로써 수행될 수 있다. 앞서 화면 내 예측과 관련한 실시예을 통해 설명한 바와 같이, 유사도 탐색에는, 복원 화소 영역의 표준 편차, 복원 화소들의 평균값, 복원 화소 영역 간의 SAD(Sum of Absolute Difference) 또는 SSD(Sum of Squared Difference) 등을 이용한 유사도 측정 등이 이용될 수 있다.
현재 블록의 복원 화소 영역을 이용하여 움직임 추정을 수행하는 경우, 현재 블록 주변의 부호화/복호화가 완료된 정보들만 이용하여 움직임 정보를 유도하기 때문에, 부호화 장치에서 복호화 장치로 움직임 정보(예컨대, 움직임 벡터)를 전송할 필요가 없다.
부호화 장치는, 복원 화소 영역을 이용한 움직임 추정을 통해, 최소 비용을 갖는 사례를 통해, 현재 블록의 참조 영상, 예측 방향(예컨대, 과거, 미래 또는 양방향 예측 등) 또는 움직임 벡터 등의 움직임 정보를 결정할 수 있다. 복호화 장치 역시, 현재 블록 주변의 복원 화소 영역을 통해 움직임 추정을 수행하고, 부호화 장치와 동일한 방식으로 최소 비용을 갖는 사례를 선택함으로써, 현재 블록의 움직임 정보를 결정할 수 있다.
다만, 복호화 장치에서도, 참조 영상 대상 전체를 대상으로 움직임 추정을 수행한다면, 복호화 장치의 복잡도가 극단적으로 증가할 염려가 있다. 이를 해결하기 위해, 블록 단위 또는 상위 헤더에서, 유사 복원 화소 영역을 탐색하는 탐색 범위를 나타내는 정보를 부호화하고, 이를 복호화 장치로 전달하는 방법이 이용될 수 있다. 유사 복원 화소 영역을 탐색하는 탐색 범위를 제한함으로써, 복호화 장치의 복잡도를 낮출 수 있다. 일 예로, 부호화 장치는, 참조 영상을 특정하는 정보(예컨대, 참조 영상 인덱스) 또는 참조 영상 내 참조 블록이 포함된 위치를 나타내는 정보(예컨대, 슬라이스 또는 타일 인덱스 등) 등을 부호화할 수 있다. 참조 영상 및 참조 블록 위치에 대한 정보를 복호화 장치로 전송함으로써, 복호화 장치의 연산량을 줄이고, 복호화 장치의 복잡도를 낮출 수 있다.
또한, 부호화 장치는 블록 단위 또는 상위 헤더에서 복수의 움직임 추정 방식의 종류 중 어느 하나를 특정하는 정보를 부호화할 수도 있다. 이 경우, 복호화 장치는, 부호화 장치로부터 전송되는 정보에 기초하여, 현재 블록의 복원 화소 영역을 이용한 움직임 추정을 수행할 것인지 여부를 결정할 수 있다.
도 34은 부호화 장치 또는 복호화 장치에서 수행될 수 있는 움직임 추정의 일 예를 나타낸 도면이다. 본 도면에서, 움직임 추정을 시작하는 위치는 A인 것으로 가정한다. 아울러, 도시된 예에서, ①은 정수 위치 화소(integer pel), ②는 1/2 위치 화소(half pel), ③은 1/4 위치 화소(quarter pel)인 것으로 가정한다. 본 도면에서는, 9개의 정수 화소를 표시하고 있지만, 이보다 더 많은 수의 정수 화소가 움직임 추정에 이용될 수 있음은 물론이다.
다수의 정수 위치 화소들 중 최적의 움직임 벡터가 a위치를 가리키는 것으로 선택 되었다면 a를 기준으로 주변 위치(a와 8개의 ②)에서 추가적으로 1/2 위치 화소 단위로 움직임 추정을 수행한다. 만약 다수의 1/2 위치 화소들 중 최적의 움직임 벡터가 b위치를 가리키는 것으로 선택 되었다면 b를 기준으로 주변 위치(b와 8개의 ③)에서 추가적으로 1/4 위치화소 단위로 움직임 추정을 수행한다. 1/4 위치 화소 단위로 움직임 추정을 한 결과 최적의 움직임 벡터가 c위치를 가리키는 것으로 선택 되었다면 최종적인 움직임 벡터는 (A->c)를 나타낸다. 여기서 좌표는 A를 기준으로 왼쪽 방향과 위쪽 방향으로 갈수록 음수, 오른쪽 방향과 아래쪽 방향으로 갈수록 양수가 되며 혹은 음수와 양수 기준이 반대로 될 수도 있다. 도 34에서는 예시로 1/4 위치 화소까지 움직임 추정을 한다고 설명을 하였지만 1/2K위치 화소단위로 움직임 추정이 가능하다. 여기서 K는 0이상의 정수가 되며 K는 부호화 장치와 복호화 장치에서 동일하게 설정하는 것이 가능하다. 또한, 블록 단위 혹은 상위 헤더에서 K를 전송하는 것도 또한 가능하다. 이때, ①에서 구한 움직임 벡터를 mv_1라 하고 ②에서 구한 움직임 벡터를 mv_2, ③위치에서 구한 움직임 벡터를 mv_3이라 할 때, 최종적으로 결정되는 움직임 벡터 mv는 (mv_1<<(K)) + (mv_2<<(K-1)) + mv_3<<(K-2)로 계산될 수 있다. 이는, 움직임 벡터 mv를 실수 단위가 아닌 정수 단위로 맞추기 위함이다. 도 34의 경우, A부터 a까지의 움직임 벡터 mv_1은 (-1, -1), a부터 b까지의 움직임 벡터 mv_2는 (0, -1), b 부터 c까지의 움직임 벡터 mv_3은 (1, 1)이다. 도 34은 K를 2로 가정하고 1/4위치화소 단위로 움직임 추정을 수행하였기 때문에, 최종 움직임 벡터 mv는 ((-1, -1)<<2) + ((0, -1)<<1) + ((1, 1)<<0) = (-4, -4) + (0, -2) + (1, 1) = (-3, -5)로 결정될 수 있다.
만약 1/8위치 화소까지 움직임 추정을 수행한다면, 최종 움직임 벡터 mv는 (mv_1<<3) + (mv_2<<2) + mv_3<<1 + mv_4로 결정될 수 있다. 여기서, mv_4는 1/8 위치 화소 단위로 추정된 움직임 벡터를 의미한다.
도 35는 1/4 위치 화소 단위로 추정된 움직임 벡터를 이용하여, 4x4 크기의 예측 블록을 결정하는 과정을 설명하기 위한 도면이다.
본 도면에서, 동그라미는 정수 위치 화소, 세모는 분수 위치 화소를 나타낸다. 최종 움직임 벡터 mv가 (7, -10)이라 가정할 경우, 현재 블록에 대한 예측 블록은, 참조 영상 내 현재 영상과 동일 위치 블록으로부터 1/4 위치 단위로 x축으로 7, y축으로 -10만큼 이동한 위치를 포함할 수 있다.
도 36은 복원 화소 영역을 이용하여 화면 간 예측을 수행할 것인지 여부를 판단하는 과정을 나타내는 순서도이다.
먼저, 부호화 장치는 복원 화소 영역을 이용하지 않고 화면 간 예측을 수행하였을 때의 코스트(코스트 A)를 계산할 수 있다(S3601). 복원 화소 영역을 이용하지 않은 화면 간 예측은, 머지 모드, AMVP 모드 등을 이용하여, 화면 간 예측을 수행하였을 경우를 의미할 수 있다.
다음으로, 부호화 장치는 복원 화소 영역을 이용하여 화면 간 예측을 수행하였을 때의 코스트(코스트 B)를 계산할 수 있다(S3602).
이후, 부호화 장치는 코스트 A 및 코스트 B를 비교하여, 현재 블록에 대한 최적의 화면 간 예측 방법을 선택할 수 있다(S3603). 코스트 A가 코스트 B보다 작다면, 복원 화소 영역을 이용하지 않은 화면 간 예측을 통해 현재 블록을 부호화하고, 코스트 A가 코스트 B보다 크다면, 복원 화소 영역을 이용한 화면 간 예측을 통해 현재 블록을 부호화할 수 있다.
도 37은 현재 블록에 대한 화면 간 예측 방법을 부호화하는 과정을 나타낸 흐름도이다.
먼저, 부호화 장치는 현재 블록의 화면 간 예측 방법을 특정하기 위한 정보를 부호화할 수 있다(S3701). 상기 정보는 현재 블록이 복원 화소 영역을 이용한 화면 간 예측이 수행되는지 여부를 나타내는 1비트 플래그를 포함할 수 있다. 또는, 상기 정보는 현재 블록이 이용할 수 있는 복수의 화면 간 예측 모드 방법(예컨대, 머지 모드, AMVP 모드, 스킵 모드 및 복원 화소 영역을 이용한 방법) 중 어느 하나를 특정하는 인덱스 정보일 수도 있다.
현재 블록에 대해, 복원 화소 영역을 이용한 화면 간 예측이 수행된 것으로 판단된 경우(S3702), 부호화 장치는 현재 블록에 대한 움직임 정보를 부호화를 생략할 수 있다. 또는, 블록 단위 또는 상위 헤더에서, 현재 블록의 복원 화소 영역과 유사한 영역을 탐색하기 위한 탐색 범위를 나타내는 정보를 부호화할 수도 있다. 탐색 범위를 제한함으로써, 복호화 장치에서의 복잡도를 낮출 수 있다.
반면, 복원 화소 영역을 이용한 화면 간 예측이 수행되지 않은 것으로 판단되는 경우(S3702), 부호화 장치는 현재 블록에 대한 움직임 정보를 결정하기 위한 정보(예컨대, 머지 모드 하에서 현재 블록과 동일한 움직임 정보를 갖는 블록을 특정하는 정보, 또는 AMVP 모드 하에서 참조 영상 인덱스, 움직임 벡터 예측 후보 중 어느 하나를 특정하는 정보 및 움직임 벡터 차분값 등)를 부호화할 수 있다(S3703).
도 38는 현재 블록에 대한 화면 간 예측 방법을 복호화하는 과정을 나타낸 흐름도이다.
먼저, 복호화 장치는 현재 블록의 화면 간 예측 방법을 특정하기 위한 정보를 복호화할 수 있다(S3801). 상기 정보는 현재 블록이 복원 화소 영역을 이용한 화면 간 예측이 수행되는지 여부를 나타내는 1비트 플래그를 포함할 수 있다. 또는, 상기 정보는, 현재 블록이 이용할 수 있는 복수의 화면 간 예측 모드 방법(예컨대, 머지 모드, AMVP 모드, 스킵 모드 및 복원 화소 영역을 이용한 방법) 중 어느 하나를 특정하는 인덱스 정보일 수도 있다.
상기 정보에 기초하여, 복호화 장치는 현재 블록에 대한 화면 간 예측 방법을 결정할 수 있다. 이때, 현재 블록에 대해 복원 화소 영역을 이용한 화면 간 예측이 수행되는 것으로 판단된 경우(S3802), 복호화 장치는 비트스트림으로부터 현재 블록에 대한 움직임 정보를 복호화하는 대신, 움직임 추정을 통해 현재 블록에 대한 움직임 정보를 획득할 수 있다(S3803). 이때, 현재 블록의 움직임 정보는, 참조 영상 내 현재 블록의 복원 화소 영역과 가장 유사한 복원 화소 영역을 탐색함으로써 수행될 수 있다.
또는, 복호화 장치는 블록 단위 또는 상위 헤더에서, 현재 블록의 복원 화소 영역과 유사한 영역을 탐색하기 위한 탐색 범위를 나타내는 정보를 복호화할 수도 있다. 복호화 장치는 제한된 탐색 범위 내 현재 블록의 복원 화소 영역과 가장 유사한 복원 화소 영역을 탐색할 수 있다.
반면, 복원 화소 영역을 이용한 화면 간 예측이 수행되지 않은 것으로 판단되는 경우(S3802), 복호화 장치는 현재 블록에 대한 움직임 정보를 결정하기 위한 정보(예컨대, 머지 모드 하에서 현재 블록과 동일한 움직임 정보를 갖는 블록을 특정하는 정보, 또는 AMVP 모드 하에서 참조 픽처 인덱스, 움직임 벡터 예측 후보 중 어느 하나를 특정하는 정보 및 움직임 벡터 차분값 등)를 복호화하고, 복호화된 정보를 기초로, 현재 블록에 대한 움직임 정보를 결정할 수 있다(S3804).
상술한 실시예에서, 부호화 장치 및 복호화 장치는 참조 영상 내 현재 블록의 복원 화소 영역과 가장 유사한 영역을 탐색하는 것으로 설명하였다. 설명한 예와 달리, 부호화 장치 및 복호화 장치는 참조 영상 내 현재 블록의 복원 화소 영역과 유사한 복수개의 영역을 탐색할 수도 있다. 이 경우, 부호화 장치는 탐색된 복수개의 후보 영역 중 현재 블록의 화면 간 예측에 이용되는 영역을 특정하는 정보를 부호화할 수 있다. 복호화 장치는 상기 정보에 의해 특정되는 영역을 이용하여, 현재 블록에 대한 움직임 정보를 결정하고, 결정된 움직임 정보를 이용하여, 현재 블록에 대한 화면 간 예측을 수행할 수 있다.
다음으로, 복원 화소 영역을 이용하여, 움직임 정보를 개선하는 방법에 대해 설명하기로 한다.
현재 블록에 대한 움직임 벡터를 결정할 때, 부호화 장치 및 복호화 장치에서 동일한 방법으로, 움직임 벡터를 개선할 수 있다. 일 예로, 부호화 장치에서 1/2K 위치 화소 단위로 블록을 이용한 움직임 추정을 수행한 뒤, 복원 화소 영역을 이용하여 1/2K+L 위치 단위로 움직임 추정 결과를 개선할 수 있다. 여기서 K는 화면 간 예측을 수행할 시에 사용되는 움직임 벡터(즉, 복원 화소 영역을 이용하지 않고 유도한 움직임 벡터)의 정밀도를 나타내고, L은 복원 화소 영역을 이용하여 개선할 수 있는 움직임 벡터의 정밀도를 의미한다.
K와 L은 부호화 하여 상위 헤더에서 복호화 장치로 전송하는 것도 가능하며 또는 부호화 장치와 복호화 장치가 동일하게 기 설정하는 것도 또한 가능하다. 예를 들어 K 및 L이 각각 2 또는 1로 기 설정되어 있다면, 부호화 장치에서 1/4 위치 화소 단위로 추정된 움직임 정보를 복호화기에 전송하여도, 복호화 장치에서는 1/4 위치 화소 단위에 추가적으로 1/8 위치 화소 단위로 움직임 정보를 개선할 수 있다.
만약, 움직임 정보의 개선 정도를 나타내는 L이 0으로 설정된다면, 1/2K 화소 단위 움직임 벡터를 기반으로 움직임 추정을 수행하고, 추가로 복원 화소 영역을 이용하여 1/2K 화소 단위로 움직임 추정을 수행하는 것도 가능하다. 또는, L이 0인 경우, 현재 블록에 대해서만 움직음 추정을 수행하고, 복원 화소 영역에서는 움직임 추정을 수행하지 않을 수도 있다.
부호화 장치 및 복호화 장치가 동일한 방법으로 추정된 움직임 벡터를 개선하므로, 1/2K 위치 화소 단위로 추정된 움직임 벡터를 부호화하더라도, 1/2K+L 위치 화소 단위로 움직임 벡터를 이용할 수 있고, 부호화 장치 및 복호화 장치에서 1/2K+L 위치 화소 단위로 움직임 벡터를 저장할 수 있다.
이때, 부호화 되는 움직임 벡터는 1/2K 위치 화소 단위이므로, 현재 블록에 인접한 주변 블록의 움직임 벡터를 이용하여, 현재 블록의 움직임 벡터를 결정하는 경우, 주변 블록의 움직임 벡터 정밀도도 1/2K 위치 화소 단위로 맞출 수 있다.
일 예로, 도 39은 복원 화소 영역을 이용하여, 현재 블록의 움직임 벡터를 개선하는 예를 설명하기 위한 도면이다. 설명의 편의를 위해, 움직임 벡터 부호화 정밀도(K)는 2, 움직임 벡터 개선 정밀도(L)은 1인 것으로 가정한다.
움직임 벡터 부호화 정밀도가 2이므로, 부호화되는 움직임 벡터는 1/4 화소 위치를 나타낸다.
움직임 벡터 개선 정밀도는 1이므로, 개선된 움직임 벡터는 1/8 화소 위치를 나타낸다.
이때, 부호화 장치 및 복호화 장치에서 동일하게 복원 화소 영역을 이용할 수 있으므로, 추가 정보 없이 움직임 벡터 개선이 가능하다. 일 예로, 부호화되는 움직임 벡터가 (7, -10)이라 할 경우, 부호화되는 움직임 벡터는 1/4 화소 위치인 바, 부호화된 움직임 벡터가 나타내는 참조 블록(즉, 원래의 예측 블록)은 도 39에 나타난 예와 같다.
부/복호화시, 참조 영상 내 현재 블록의 복원 화소 영역에 포함된 화소와 동일한 위치로부터, 움직임 벡터가 지시하는 만큼 이격된 화소를 기준으로, 8방향으로 1/8 위치 화소 대상 움직임 추정을 수행할 수 있다. 이때, 1/8 위치 화소를 생성하기 위해서는 보간이 추가로 수행되어야 한다. 도 39에서는, 복원 화소 영역에 포함된 화소들 중 1/8 위치 화소 대상 움직임 추정을 수행할 때 이용되는 화소들을 사각형으로 표시하였다.
복원 화소 영역에 포함된 화소와 가장 유사한 1/8 위치 화소가 검출되면, 1/4 위치 화소와 1/8 위치 화소 사이의 움직임 벡터를 기초로, 현재 블록에 대한 움직임 벡터를 개선할 수 있다.
일 예로, 도 39에 도시된 예에서, 복원 화소 영역 B에 포함된 별표 위치의 화소가 복원 화소 영역에 포함된 화소와 가장 유사한 1/8 위치 화소라고 가정할 경우, 1/8 위치 화소에 대한 움직임 벡터는 (-1, -1)인 것으로 취급할 수 있다. 이에 따라, 현재 블록의 움직임 벡터는 1/8 위치 화소에 대한 움직임 벡터 (-1, -1)을 고려하여 개선될 수 있다. 부호화된 1/4 위치 화소에 대한 움직임 벡터의 정밀도를 1/8 위치 화소로 맞추기 위해, 1/4 위치 화소에 대한 움직임 벡터 (7, -10)에 대해 시프트 연산(<< 1)을 수행하고, 계산 결과에 1/8 위치 화소에 대한 움직임 벡터를 더해, 현재 블록에 대한 움직임 벡터를 개선할 수 있다. 이에 따라, 현재 블록의 움직임 벡터는, ((7, -10)<<1 + (-1, -1)) = (13, -21)이 될 수 있다.
K와 L은 각각 2와 1로 설정되어 있으므로, 이 개선된 움직임 벡터의 정밀도는 1/8 위치가 되며 마찬가지로 부호화 장치와 복호화 장치에서 저장되는 움직임 벡터의 정밀도는 1/8 위치가 된다.
현재 블록의 움직임 벡터는, 화면 간 예측을 사용하는 이전 블록의 움직임 벡터를 움직임 벡터 후보로 사용함으로써 유도될 수 있다. 이때, 이전 블록의 움직임 벡터를 움직임 벡터 후보로 이용하고자 하는 경우, 현재 블록의 기본 정밀도(K)에 맞춰 이전 블록의 움직임 벡터를 스케일링할 수 있다.
일 예로, 모든 블록에 대해 기본 정밀도(K)가 2, 추가 정밀도(L)이 1이고, 이전 블록의 기본 정밀도(K)에 대해 획득된 움직임 벡터는 (7, -10), 추가 정밀도(L)에 의해 추가 유도된 움직임 벡터는 (3, -3)인 경우를 가정한다. 이 경우, 이전 블록의 개선된 움직임 벡터는 ((7, -10)<<1) + (3, -3)에 의해 (17, -23)이 될 수 있다.
다만, 현재 블록의 기본 정밀도(K)는 2이므로, 이전 블록의 개선된 벡터 정밀도 대신, 기본 정밀도에 기초로 산출된 이전 블록의 움직임 벡터를 현재 블록의 움직임 벡터 후보로 사용할 수 있다. 즉, (17, -23)이 아닌 (7, -10)을 현재 블록의 움직임 벡터 후보로 사용할 수 잇다.
만약, K 및 L이 블록별로 상이하게 설정된다면, 현재 블록의 움직임 벡터 후보 유도시, 이전 블록의 움직임 벡터 정밀도를 임의의 정밀도로 통일할 수 있다. 일 예로, 이전 블록의 움직임 벡터를 현재 블록의 기본 정밀도(K)로 스케일링하여, 현재 블록의 움직임 벡터 후보로 이용할 수 있다.
도 40은 부호화 장치에서 움직임 벡터를 결정하는 과정을 나타낸 흐름도이다.
먼저, 부호화 장치는 1/2K 화소 단위로 움직임 추정을 수행하고, 이에 따른 코스트(이하, 코스트 A라 함)를 계산할 수 있다(S4001). 이후, 부호화 장치는 1/2K+L 화소 단위로 움직임 추정(혹은 개선)을 수행하고, 이에 따른 코스트(이하, 코스트 B라 함)를 계산할 수 있다(S4002).
이후, 부호화 장치는 코스트 A와 코스트 B를 비교하여(S4003), 현재 블록에 대한 움직임 벡터의 개선 여부를 결정할 수 있다. 일 예로, 코스트 A가 코스트 B보다 작다면, 개선된 움직임 벡터를 사용하지 않는 것으로 설정하고(S4004), 코스트 B가 코스트 A보다 작다면, 개선된 움직임 벡터를 사용하는 것으로 설정한다(S4005).
부호화 장치는 개선된 움직임 벡터를 사용할 것인지 여부를 나타내는 정보를 블록 단위 또는 상위 헤더를 통해 부호화할 수도 있다. 이때, 상기 정보는 1비트의 플래그 일수도 있으나, 이에 한정되는 것은 아니다. 복호화 장치는 부호화 장치로부터 수신하는 상기 정보를 기초로, 움직임 벡터를 개선할 것인지 여부를 결정할 수 있다.
또는, 상기 정보를 부호화함이 없이, 부호화 장치 및 복호화 장치 모두 움직임 벡터 개선을 사용하도록 설정하는 것도 가능하다.
도 41은 블록 단위로 기본 정밀도(K)와 추가 정밀도(L)의 값이 적응적으로 선택되는 경우, 부호화 장치에서 최적의 움직임 벡터를 선택하는 과정을 나타낸 흐름도이다.
먼저, S4101은 최적의 움직임 벡터를 선택하기 위해 사용되는 파라미터들의 초기값을 나타낸다.
도 41에서 K 는 기본 정밀도, L은 추가 정밀도를 나타내고, END_K는 K의 최대값, END_L은 L의 최대값을 나타낸다. K, END_K, L, END_L은 각각 Val1, Val2, Val3, Val4로 초기화될 수 있다. Val1 부터 Val4는 임의의 정수를 나타내고, 상위 헤더를 통해 부호화될 수 있다.
BEST_K는 최적의 K를 나타내고, BEST_L은 최적의 L을 나타낸다. BEST_K 및 BEST_L은 각각 Val1, Val3으로 초기화될 수 있다.
MV_K는 1/2K 화소 단위의 움직임 벡터를 나타내고, MV_L은 1/2K+L 단위의 움직임 벡터를 나타낸다. 또한, BESTMV_K는 최적의 MV_K를 나타내고, BESTMV_L은 최적의 MV_L을 나타낸다. 각 움직임 벡터 파라미터들은 (0, 0)으로 초기화될 수 있다.
COST는 MV_K와 MV_L을 이용하여 예측을 수행하였을 경우의 비용을 나타내고, BEST_COST는 최적의 COST를 나타낸다. COST는 0으로 초기화되고, BEST_COST는 저장 가능한 최대값(MAX)로 초기화될 수 있다.
초기화 이후, 부호화 장치는 1/2K 위치 화소 단위로 움직임 추정을 수행함으로써, MV_K를 갱신할 수 있다. 또한, 결정된 MV_K를 기반으로 1/2K+L 단위까지 추가 움직임 추정을 수행함으로써 MV_L을 갱신할 수 있다. MV_K 및 MV_L이 유도되면, 부호화 장치는 유도된 MV_K 및 MV_L 를 이용하여 최종 MV를 선택한 뒤, 선택된 MV를 이용하여 비용을 계산하여 COST를 갱신할 수 있다(S4102).
최종 MV는 MV_K 및 MV_L 사이의 정밀도를 맞춤으로써 획득될 수 있다. 일 예로, K 및 L이 각각 2라면, MV_K는 1/4 화소 단위의 움직임 벡터이고, MV_L은 1/16 화소 단위 움직임 벡터라 할 수 있다. 만약, MV_K가 (5, 7), MV_L이 (3, 7)이라면, 최종 MV는 두 움직임 벡터의 정밀도를 맞춘, ((5, 7) <<2)+(3, 7)=(25, 35)로 유도될 수 있다.
부호화 장치는 최종 MV를 이용하여 계산된 비용(즉, COST)과 BEST_COST를 비교하고(S4103), COST가 BEST_COST보다 작거나 같다면, BEST_COST를 COST로 갱신하고, BESTMV_K 및 BESTMV_L을 각각 MV_K 및 MV_L로 갱신하는 한편, BEST_K와 BEST_L을 각각 K 및 L로 갱신할 수 있다(S4104).
S4104에서 파라미터 갱신이 수행된거나, S4103에서 COST가 BEST_COST보다 크다면, K를 K+a로 갱신할 수 있다(S4105). 여기서, a는 블록 단위 또는 상위 헤더를 통해 부호화될 수도 있고, 부호화 장치 및 복호화 장치가 임의의 값을 동일하게 기 설정하여 사용하는 것도 가능하다.
갱신된 K와 END_K를 비교한 뒤(S4106), K 가 END_K보다 크지 않다면, 다시 S4102 로 돌아가 MV 및 COST 계산을 재수행할 수 있다.
반대로, K가 END_K보다 크다면, K를 Val1로 초기화한 뒤, L을 L+b로 갱신할 수 있다(S4107). 여기서, b는 블록 단위 또는 상위 헤더를 통해 부호화될 수도 있고, 부호화 장치 및 복호화 장치가 임의의 값을 동일하게 기 설정하여 사용하는 것도 가능하다.
갱신된 L과 END_L을 비교한 뒤(S4108), L이 END_L보다 크지 않다면, 다시 S1302로 돌아가 MV 및 COST 계산을 재수행할 수 있다.
만약, L이 END_L보다 크다면(S4108), 움직임 벡터 추정 알고리즘을 종료할 수 있다.
이처럼, K 및 L의 값을 a 및 b 만큼 갱신함으로써, 선택가능한 모든 K 및 L에 대해 MV 및 COST 계산을 수행하고, 이에 따라 최적의 움직임 벡터를 선택할 수 있게 된다.
부호화 장치는 복호화 장치로 최적의 기본 정밀도(최종 BEST_K의 값), 최적의 추가 정밀도(최종 BEST_L의 값) 및 기본 정밀도 단위로 유도된 움직임 벡터 정보(최종 BESTMV_K의 값)를 부호화하고 복호화 장치로 전송할 수도 있다. 이 경우, 복호화 장치는 기본 정밀도 정보 및 기본 정밀도 단위로 유도된 움직임 벡터 정보를 유도한 뒤, 추가 정밀도 정보를 이용하여, 움직임 벡터를 개선할 수 있다.
다른 예로, 부호화 장치는 복호화 장치로 최적의 기본 정밀도(최종 BEST_K의 값) 및 기본 정밀도 단위로 유도된 움직임 벡터 정보(최종 BESTMV_K의 값)만을 부호화할 수도 있다. 이 경우, 복호화 장치는 부호화 장치와 동일한 방법으로 최적의 추가 정밀도를 유도한 뒤, 유도된 추가 정밀도에 기초하여, 움직임 벡터를 개선할 수 있다.
후술되는 실시예는, 부호화 장치가, 복호화 장치로 최적의 기본 정밀도 정보 및 기본 정밀도 단위로 유도된 움직임 벡터 정보만을 부호화하는 것으로 가정하여 설명하기로 한다.
도 42는 현재 블록의 최적의 움직임 벡터를 부호화하는 과정을 나타낸 도면이다.
현재 블록이 화면 간 예측에 의해 부호화되는 경우, 부호화 장치는 움직임 벡터 개선을 이용할 것인지 여부를 타나내는 정보를 부호화할 수 있다(S4201). 이때, 복원 화소 영역을 이용하여 움직임 벡터를 개선할 것인지 여부를 나타내는 정보는 블록 단위 또는 상위 헤더를 통해 부호화될 수 있다.
복원 화소 영역을 이용하여, 움직임 벡터 개선을 수행할 것으로 판단되는 경우, 부호화 장치는 현재 블록에 대한 기본 정밀도 관련 정보을 부호화할 수 있다(S4202).
여기서, 기본 정밀도 관련 정보는, 현재 블록의 최적의 기본 정밀도를 나타내는 정보(예컨대, 도 41에서 최종 BEST_K의 값) 또는 최적의 기본 정밀도를 탐색하기 위한 오프셋 단위(예컨대, 도 41에서 K에 더해지는 오프셋 a) 중 적어도 하나를 포함할 수 있다. 오프셋 단위가 부호화되는 경우, 부호화 장치는 선택 가능한 K 중 어느 것이 사용되었는가를 나타내는 정보를 추가 부호화할 수 있다.
일 예로, 오프셋 a가 2, K의 초기값 Val1이 -2, END_K의 초기값 Val2이 2인 경우, 도 41의 프로세스 상 부호화 장치가 선택할 수 있는 K는 -2, 0 및 2가 된다. 이 경우, 부호화 장치는 -2, 0 및 2 중 어떤 값이 사용되는지 여부를 나타내는 정보(예컨대, 인덱스 정보)를 부호화할 수 있다.
부호화 장치는 최적의 K에 대해 최적의 움직임 벡터(예컨대, 도 40에서 최종 BESTMV_K)를 부호화할 수 있다(S4203).
부호화 장치는, 현재 블록에 인접한 주변 블록의 움직임 벡터에 기초하여, 현재 블록의 최적의 움직임 벡터를 부호화할 수도 있다. 이때, 현재 블록에 인접한 주변 블록의 움직임 벡터는 현재 블록의 기본 정밀도에 맞춰 스케일링될 수 있다.
예를 들어, 현재 블록의 기본 정밀도(K)가 0이라면, 현재 블록에 인접한 주변 블록들의 움직임 벡터를 1/20에 맞춰 스케일한 뒤, 스케일된 움직임 벡터를 BESTMV_K의 부호화에 이용할 수 있따. 일 예로, 부호화 장치는 스케일된 움직임 벡터와 BESTMV_K 사이의 차분값을 부호화할 수도 있다.
도 43은 현재 블록의 최적의 움직임 벡터를 복호화하는 과정을 나타낸 도면이다.
현재 블록이 화면 간 예측에 의해 복호화되는 경우, 복호화 장치는 움직임 벡터 개선을 이용할 것인지 여부를 타나내는 정보를 복호화할 수 있다(S4301). 이때, 복원 화소 영역을 이용하여 움직임 벡터를 개선할 것인지 여부를 나타내는 정보는 블록 단위 또는 상위 헤더를 통해 복호화될 수 있다.
복원 화소 영역을 이용하여, 움직임 벡터 개선을 수행할 것으로 판단되는 경우, 복호화 장치는 현재 블록에 대한 기본 정밀도 관련 정보을 복호화할 수 있다(S4302).
이후, 복호화 장치는 최적의 K에 대해 최적의 움직임 벡터(예컨대, 도 41에서 최종 BESTMV_K)를 복호화할 수 있다(S4303). 현재 블록의 최적 움직임 벡터를 복호화는 것에 이웃 블록의 움직임 벡터가 이용될 수 있음은 앞서 설명한 바와 같다.
도 44는 복호화 장치에서 개선된 움직임 벡터를 획득하는 과정을 나타낸 흐름도이다.
S4401은 각 파라미터의 초기값을 나타낸다.
도 44에서, L 및 END_L은 Val3 및 Val4로 초기화될 수 있다. 이때, L 및 END_L의 초기값은 상위 헤더를 통해 복호화될 수 있다. BEST_L 역시 Val3으로 초기화될 수 있다.
BEST_K는 최적의 K를 나타내고, 앞서, 도 43을 통해 복호화된 값으로 설정될 수 있다.
MV_L 및 BESTMV_L은 각각 (0, 0)으로 초기화될 수 있다. 아울러, COST는 0으로 초기화되고, BEST_COST_L는 저장 가능한 최대값(MAX)로 초기화될 수 있다.
복호화 장치는, 1/2 BEST_K+L 단위까지 움직임 추정 하여 MV_L을 설정하고, 설정된 MV_L을 이용하였을 경우의 비용을 계산할 수 있다(S4402).
COST와 BEST_COST_L을 비교하여, COST가 BEST_COST_L보다 크지 않다면(S4403), BEST_COST_L를 COST로 갱신하고, BESTMV_L을 MV_L로 갱신할 수 있다(S4404).
COST가 BEST_COST_L보다 크거나(S4403), S4404 의 파라미터 갱신이 완료되면, 오프셋 b를 L에 더하여 L을 갱신할 수 있다(S4405).
갱신된 L과 END_L을 비교하여, L이 END_L보다 크지 않다면(S4406), S4402로 돌아가 BEST_K와 L에 따른 움직임 벡터를 추정할 수 있다.
상기 과정을 통해 MV_L이 결정되면, 부호화 장치는 BEST_L과 BEST_K를 이용하여 MV_K를 MV_L에 맞게 스케일 한 후 최종적인 움직임 벡터를 유도할 수 있다.
다음으로, 현재 블록에 대해 개선된 화면 내 예측을 이용하는 방법에 대해 상세히 설명하기로 한다.
부호화 블록은 둘 이상의 서브 블록으로 분할될 수 있고, 분할된 서브 블록은 각각 또 다른 둘 이상의 서브 블록으로 분할될 수 있다. 부호화 블록이 분할되지 않은 경우, 부호화 블록의 크기와 동일한 예측 블록이 생성되며, 부호화 블록이 둘 이상의 서브 블록으로 분할된 경우, 각 서브 블록마다 서브 블록의 크기에 맞는 예측 블록이 생성될 수 있다. 여기서, 예측 블록은 화면 간 예측 또는 화면 내 예측을 통해 생성되는 블록 단위의 예측 샘플들을 의미할 수 있다.
설명의 편의를 위해, 후술되는 실시예들에서는, 서브 블록으로 분할되기 직전의 블록을 상위 블록이라 호칭하기로 한다. 일 예로, 부호화 블록이 둘 이상의 서브 블록으로 분할된 경우, 분할된 서브 블록의 상위 블록은 부호화 블록이 될 수 있다. 또는, 서브 블록이 다시 둘 이상의 서브 블록으로 분할된 경우, 분할된 서브 블록의 상위 블록은 서브 블록이 될 수도 있다.
도 45는 현재 블록이 복수의 서브 블록으로 분할되는 경우, 각 서브 블록에 대한 화면 내 예측 정보가 부호화되는 과정을 나타낸 흐름도이다. 여기서, 현재 블록은, 부호화 블록을 나타낼 수도 있고, 서브 블록을 나타낼 수도 있다. 따라서 현재 블록은, 부호화 블록, 서브 블록과 상관없이 현재 부호화 하려는 블록을 의미한다.
먼저, 부호화 장치는, 현재 블록이 둘 이상의 서브 블록으로 분할되는지 여부를 나타내는 정보를 부호화할 수 있다(S4501). 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다.
현재 블록이 둘 이상의 서브 블록으로 분할되는 것으로 판단되는 경우(S4502), 부호화 장치는 현재 블록이 가로 또는 세로 중 어느 쪽으로 분할되는지 여부에 관한 정보를 부호화할 수 있다(S4503). 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다. 일 예로, 상기 정보가 1비트의 플래그일 경우, 플래그의 값이 참인 것은, 현재 블록이 가로(또는 세로)로 N분할(N은 2이상의 정수) 됨을 나타내고, 플래그의 값이 거짓인 것은, 현재 블록이 세로(또는 가로)로 N분할 됨을 나타낼 수 있다.
부호화 장치는 현재 블록의 분할 형태에 따라(S4504), 현재 블록을 가로 또는 세로 방향으로 적어도 1회 이상 분할하여, N개의 서브 블록을 생성할 수 있다(S4505, S4506).
현재 블록이 분할됨으로써 생성되는 서브 블록의 개수 N은 부호화 장치 및 복호화 장치에서 기 설정된 값을 사용하도록 설정될 수도 있고, 블록 단위 또는 상위 헤더를 통해 부호화될 수도 있다. N은 1, 2, 4, 8, 16 등 2의 지수승으로 표현되는 정수일 수 있으며, 로그를 취한 값(Log2N)으로 변경되어 부호화될 수 있다. 예를 들어, N이 8인 경우, 부호화 장치는 8에 로그를 취한 값 3 (Log28)을 부호화할 수 있다. 이 경우, 복호화 장치는 3을 복호화하고, N을 8 (23)로 설정할 수 있다. 이때, N이 1인 경우는, 현재 블록이 둘 이상의 서브 블록으로 분할되지 않음을 의미한다. 이에 따라, N이 1인 경우, 서브 블록으로 분할되는지 여부를 나타내는 정보의 부호화를 생략할 수도 있다. N이 1인 경우, 현재 블록과 동일한 크기의 예측 블록이 생성될 수 있다.
또는, N은 2의 지수승으로 표현되지 않는 정수의 값을 가질 수도 있다.
다른 예로, 부호화 장치는, 현재 블록이 분할됨으로써 생성된 복수의 서브 블록 중 일부를 병합하여, N보다 작은 수의 서브 블록을 생성할 수도 있다. 이 경우, 부호화 장치는 연속적으로 위치한 2개 이상의 서브 블록들을 병합하여, 하나의 서브 블록을 생성할 수 있다. 일 예로, N이 4로 설정된 경우, 부호화 장치는 현재 블록을 3회 분할하여, 4개의 서브 블록을 생성하되, 기설정된 조건에 따라 4개의 서브 블록 중 임의 위치의 블록들을 병합할 수 있다. 예를 들어, 부호화 장치는 현재 블록의 중단에 위치한 블록들을 하나의 블록으로 병합할 수 있다. 이 경우, N이 4라 하더라도, 현재 블록이 분할됨에 따라 1:2:1의 비율을 가진 총 3개의 서브 블록이 생성될 수 있다.
서브 블록들의 병합 조건은, 부호화 장치 및 복호화 장치가 동일한 조건을 사용할 수도 있고, 부호화 장치가 서브 블록들의 병합 조건을 부호화하여 복호화 장치로 전송하는 것도 가능한다. 일 예로, 부호화 장치는 현재 블록이 분할함으로써 생성되는 복수의 서브 블록 중 병합 대상이 되는 서브 블록들의 인덱스를 나타내는 정보를 부호화하여 복호화 장치로 전송할 수 있다. 즉, 부호화 장치는, 현재 블록이 분할함으로써 생성된 N개의 서브 블록 중 일부를 병합함으로써, N-1개(또는 N-M개, 여기서, M은 병합 횟수)의 서브 블록을 생성할 수 있다.
이후, 부호화 장치는 현재 블록에 포함된 복수의 서브 블록 중 첫번째 서브 블록을 현재 블록으로 삼아(S4507), 상기 과정을 반복적으로 수행할 수 있다.
만약, 현재 블록이 둘 이상의 서브 블록으로 분할되지 않는다면(S4502), 부호화 장치는 현재 블록에 대해 화면 내 예측 부호화를 수행할 수 있다(S4508).
이후, 모든 서브 블록에 대한 부호화가 종료되었는지 여부를 확인하고(S4509), 모든 서브 블록에 대한 부호화가 종료된 것이 아니라면, 다음 서브 블록을 현재 블록으로 삼아(S4510), 상기 과정을 반복적으로 수행할 수 있다.
여기서, 서브 블록 간 부호화/복호화 순서는 래스터 스캔, 지그재그 스캔, Z 스캔 등 부호화/복호화 순서에 따라 결정될 수 있다.
도 46 및 도 47은 현재 블록이 복수의 서브 블록으로 분할되는 예를 나타낸 도면이다.
설명의 편의를 위해, 본 실시예에서, 현재 블록이 분할됨에 따라 생성되는 서브 블록의 개수는 4개라고 가정한다(즉, N은 4). 또한, 현재 블록이 둘 이상의 서브 블록으로 분할되는지 여부를 나타내는 정보는 1비트 플래그인 것으로 가정한다. 일 예로, 플래그가 1인 것은, 현재 블록이 복수의 서브 블록으로 분할되는 것을 나타내며, 플래그가 0인 것은, 현재 블록이 더 이상 분할되지 않음을 나타낸다.
아울러, 현재 블록의 분할 방향을 나타내는 정보 역시 1비트 플래그인 것으로 가정한다. 일 예로, 플래그가 1인 것은, 현재 블록이 세로방향으로 분할됨을 나타내며, 플래그가 0인 것은, 현재 블록이 가로 방향으로 분할됨을 나타낸다.
또한 블록 분할에 관련된 정보만 부호화의 예시로 설명한다.
도 46은 (a)가 (c)로 분할되는 과정을 설명하는 예시이다. (a) 및 (b)를 참조하면, 블록은 복수의 서브 블록으로 분할되고, 이때 분할 방향은 가로 방향인바, 블록에 대한 분할 여부를 나타내는 플래그는 1로 설정되고, 분할 방향을 나타내는 플래그는 0으로 설정될 수 있다. 이에 따라, 블록은 4개의 서브 블록을 포함할 수 있다. 블록에 포함된 4개의 서브 블록 중 서브 블록 A는 추가 분할되고, 분할 방향은 가로인바, 서브 블록 A에 대한 분할 여부를 나타내는 플래그는 1, 분할 방향을 나타내는 플래그는 0으로 설정될 수 있다. 서브 블록 A가 분할됨으로써 생성된 서브 블록 1 부터 4는 추가 분할되지 않는바, 이들에 대한 플래그는 각각 0으로 설정될 수 있다.
서브 블록 B는 추가 분할되지 않는 바, 서브 블록 B에 대한 분할 여부를 나타내는 플래그는 0으로 설정될 수 있다.
서브 블록 C는 추가 분할되고, 분할 방향은 가로인바, 서브 블록 C에 대한 분할 여부를 나타내는 플래그는 1, 분할 방향을 나타내는 플래그는 0으로 설정될 수 있다. 서브 블록 C가 분할됨으로써 생성된 서브 블록 6부터 9는 추가 분할되지 않는바, 이들에 대한 플래그는 각각 0으로 설정될 수 있다.
서브 블록 D는 추가 분할되지 않는 바, 서브 블록 D에 대한 분할 여부를 나타내는 플래그는 0으로 설정될 수 있다.
최종적으로, 블록에는 총 10개의 서브 블록이 존재할 수 있다.
이에 따라, 블록을 (a)에서 (c)의 형태로 분할하는데 필요한 정보는 10 10 0000 0 10 0000 0 이 된다.
도 47은 블록이 분할됨에 따라 생성된 서브 블록들 중 일부가 하나의 서브 블록으로 병합되는 예를 나타낸 도면이다.
도 47의 (a) 및 (b)를 참조하면, 블록은 복수의 서브 블록으로 분할되고, 이때 분할 방향은 가로 방향인바, 블록에 대한 분할 여부를 나타내는 플래그는 1로 설정되고, 분할 방향을 나타내는 플래그는 0으로 설정될 수 있다.
블록이 4개의 서브 블록으로 분할되는 경우, 블록 중앙에는, 블록 상단 및 하단 경계에 접하지 않은 2개의 서브 블록이 존재한다. 이 경우, 부호화 장치는, 블록 중앙에 위치한 2개의 블록을 하나의 서브 블록으로 통합할 수 있다.
이에 따라, 블록은 3개의 서브 블록을 포함할 수 있다. 블록에 포함된 3개의 서브 블록 중 서브 블록 A는 추가 분할되지 않은 바, 서브 블록 A에 대한 분할 여부를 나타내는 플래그는 0으로 설정될 수 있다.
서브 블록 B는 추가 분할되고, 분할 방향은 세로 방향인바, 서브 블록 B에 대한 분할 여부를 나타내는 플래그는 1로 설정되고, 분할 방향을 나타내는 플래그도 1로 설정될 수 있다. 서브 블록 B가 분할됨에 따라 생성된 4개의 서브 블록 중 중앙에 위치한 2개의 서브 블록은 하나의 서브 블록으로 통합될 수 있다. 이에 따라, 서브 블록 B의 분할로 인해 3개의 서브 블록이 추가 생성될 수 있다. 서브 블록 B가 분할됨에 따라 생성된 서브 블록들이 더 이상 분할되지 않으므로, 서브 블록 B에 포함된 서브 블록들에 대한 분할 여부를 나타내는 플래그는 각각 0으로 설정될 수 있다.
서브 블록 C는 추가 분할되지 않은 바, 서브 블록 C에 대한 분할 여부를 나타내는 플래그는 0으로 설정될 수 있다.
이 결과, 블록에는 총 5개의 서브 블록이 존재할 수 있다.
이에 따라, 블록 (a)를 블록 (c)의 형태로 분할하는데 필요한 정보는, 10 0 11 000 0 이 된다.
서브 블록의 분할은, 서브 블록의 최대 깊이 또는 최소 크기 등에 따라 제한될 수 있다. 이때, 서브 블록의 최대 깊이 또는 서브 블록의 최소 크기 등은 블록 단위 또는 상위 헤더를 통해 부호화될 수 있다.
각 서브 블록은 상이한 화면 내 예측 모드를 가질 수 있다. 이에 따라, 부호화 장치는, 서브 블록별 화면 내 예측 정보를 부호화할 수 있다. 이때, 화면 내 예측 정보는 서브 블록에 대한 화면 내 예측 모드뿐만 아니라, 이전 서브 블록의 특성을 고려한 가중치에 관한 정보도 포함될 수 있다. 이하, 서브 블록에 대한 화면 내 예측 정보를 부호화하는 예에 대해 상세히 살펴보기로 한다.
도 48은 서브 블록에 대한 가중치를 결정하는 예를 설명하기 위한 도면이다. 설명의 편의를 위해, 블록이 이용할 수 있는 화면 내 예측 모드의 개수는 도 5에 도시된 것과 같이 35개인 것으로 가정한다. 또한, 좌측 상단 대각선 방향의 화면 내 예측 모드(18번)을 기준으로, 수평 방향의 화면 내 예측 모드(10번)과 가까운 것들은, 가로 방향 모드라 호칭하고, 세로 방향의 화면 내 예측 모드(26번)과 가까운 것들은, 세로 방향 모드라 호칭한다. 아울러, 좌측 상단 대각선 방향의 화면 내 예측 모드는 가로 방향 모드에 포함될 수도 있고, 세로 방향 모드에 포함될 수도 있는 것으로 가정한다. 블록이 이용할 수 있는 화면 내 예측 모드의 개수가 35개보다 적거나 또는 이보다 많은 경우에도, 본 실시예가 적용될 수 있음은 물론이다.
또한, 가중치를 이용한 화면 내 예측은, 상위 블록 단위로 수행되는 것으로 가정한다. 즉, 상위 블록에 대해 가중치를 이용한 화면 내 예측이 수행되는 것으로 결정되는 경우, 상위 블록이 분할됨으로써 생성되는 복수의 서브 블록들 모두에 가중치를 이용한 화면 내 예측이 수행될 수 있다.
또한, 상위 블록의 크기가 8x8이고, 상위 블록이 가로 방향으로 4개의 서브 블록으로 분할된다고 가정한다. 만약, 상위 블록이 분할됨으로써 생성된 서브 블록 중 중앙에 위치한 서브 블록들이 병합된다면, 총 3개의 서브 블록이 생성될 수 있다. 이때, 3개의 서브 블록의 크기는 도 48에 도시된 예에서와 같이, 각각 8x2, 8x4, 8x2일 수 있다. 도 48에서는, 서브 블록 중 일부가 병합된 경우를 예시하였지만, 서브 블록들이 병합되지 않는 경우에도, 본 실시예가 적용될 수 있다 할 것이다.
서브 블록 중 어느 하나의 화면 내 예측 모드의 방향성이 이전 서브 블록의 화면 내 예측 모드의 방향성과 일치하는 경우, 이전 서브 블록에서의 행간 화소값 변화량 또는 열간 화소값 변화량을 반영하여, 해당 서브 블록을 부호화할 수 있다.
일 예로, 8x2 크기를 갖는 서브 블록 1의 화면 내 예측 모드가 세로 방향 모드이고, 8x4 크기를 갖는 서브 블록 2를 부호화할 때 사용하는 화면 내 예측 모드도 이전 서브 블록(즉, 서브 블록 1)과 같이 세로 방향 모드인 경우, 서브 블록 1의 첫번째 행에 포함된 화소들의 평균값과 마지막 행에 포함된 화소들의 평균값 변화량을 이용하여, 서브 블록 2에 적용될 가중치를 유도하고, 유도된 가중치를 서브 블록 2에 적용할 수 있다. 여기서, 서브 블록 2에 적용될 가중치를 계산하는데 이용되는 서브 블록 1의 화소값은, 서브 블록 1에 대한 화면 내 예측을 수행함으로써 생성된 예측 화소일 수도 있고, 상기 예측 화소에 기초하여 복원된 복원 화소일 수도 있다.
예를 들어, 서브 블록 2에 세로 방향 모드가 적용되고, 서브 블록 1의 최상단 행에 포함된 화소들의 평균값이 80이고, 마지막 행에 포함된 화소들의 평균값이 90인 경우, 서브 블록 1에서는 라인당 화소 평균값이 10만큼 증가한 것을 알 수 있다. 이에 따라, 부호화 장치는 서브 블록 2의 예측 블록을 생성한 뒤, 각 행의 위치에 따라, 화소 평균값 증가량 △을 적용할 수 있다. 일 예로, 부호화 장치는 서브 블록 2의 첫번째 행(즉, 라인 3)에는 △를 더하고, 두번째 행(즉, 라인 4)에는 2△를 더하는 등, 서브 블록 2의 각 행의 위치에 따라 등차적으로 가중치를 적용할 수 있다. 도 48에 도시된 예에서, 예측 화소는, 서브 블록 2의 화면 내 예측을 수행함에 따라 생성된 예측 화소들을 의미한다.
도시되지는 않았지만, 서브 블록 3도 서브 블록 2와 같이 세로 방향 모드를 이용할 경우, 서브 블록 2의 첫번째 행(즉, 영역 C) 및 마지막 행(즉, 영역 D) 사이의 화소 평균값 변화량을 고려하여, 서브 블록 3에 적용될 가중치를 결정할 수 있다. 이때, 서브 블록 3의 가중치를 계산하기 위해 이용되는, 서브 블록 2의 첫번째 행 또는 마지막 행에 포함된 화소들은, 예측 화소 또는 예측 화소에 가중치를 적용한 것을 의미할 수 있다.
현재 부호화 하려는 서브 블록(즉, 현재 블록)에 적용될 가중치를 결정함에 있어서, 이전 서브 블록의 화소값이 이용될 수 있다. 여기서, 이전 서브 블록은, 현재 블록보다 앞서 부호화되는 서브 블록을 의미할 수 있다. 예컨대, 현재 블록에 대해 현재 블록 상단에 이웃하는 상단 서브 블록 또는 현재 블록에 대해 현재 블록 좌측에 이웃하는 좌측 서브 블록이 현재블록의 가중치를 결정할 때 이용될 수 있다. 현재 블록에 대해 상단 서브 블록 및 좌측 서브 블록이 존재하는 경우, 부호화 장치는 상단 서브 블록 내 연속된 N개의 행 또는 좌측 서브 블록 내 연속된 M개의 열을 이용하여 현재블록에 적용될 가중치를 결정할 수 있다. 일 예로, 부호화 장치는 상단 서브 블록 내 연속된 N 개의 행을 이용하였을 때의 가중치 및 좌측 서브 블록 내 연속된 M개의 열을 이용하였을 때의 가중치를 비교한 뒤, 현재 블록에 대한 최적의 가중치 생성 방법을 결정할 수 있다.
또한, 상술한 실시예에서는, 화소 평균값 변화량은, 이전 서브 블록에 포함된 첫번째 행(또는 첫번째 열)과 마지막 행(또는 마지막 열)을 이용하는 것으로 설명하였으나, 설명한 예와 다른 방법으로 화소 평균값 변화량을 산출하는 것도 가능하다. 일 예로, 화소 평균값 변화량은, 마지막 라인과 마지막 라인에 인접한 라인을 이용하여 계산될 수도 있다. 예를 들어, 도 48에 도시된 예에서, 서브 블록 3에 대한 가중치를 계산하고자 할 때, 라인 5와 라인 6를 이용하는 것이 가능하다. 또는, 화소 평균값 변화량은 각 라인별 변화량의 평균값으로 계산될 수도 있다.
비단 서브 블록뿐만 아니라, 부호화 블록 또는 상위 블록 등 임의의 블록간에도, 가중치를 이용한 화면 내 예측이 적용될 수 있다.
도 49는 각 서브 블록에 적용될 가중치와 관련한 정보를 부호화하는 과정을 나타낸 흐름도이다. 먼저, 상위 블록 단위로 가중치를 적용할 것인지 여부를 나타내는 정보를 부호화할 수 있다(S4901).
여기서, 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다. 또한, 상기 정보는 부호화 블록 단위, 상위 블록 단위 또는 서브 블록 단위로 부호화될 수도 있다. 일 예로, 상기 정보는 상위 블록이 분할됨으로써 생성되는 복수의 서브 블록 중 첫번째 서브 블록에 대해 부호화될 수 있다.
상위 블록이 분할됨으로써 생성된 복수의 서브 블록 중 부호화 대상이 되는 서브 블록을 현재 블록이라 호칭할 경우, 부호화 장치는, 현재 블록에 대한 화면 내 예측 모드를 부호화할 수 있다(S4902). 그 후, 상위 블록 내에 존재하는 모든 서브 블록에 대한 화면 내 예측 모드 부호화가 완료되었는지 여부를 판단한 뒤(S4903), 모든 서브 블록에 대한 화면 내 예측 모드 부호화가 완료된 상태가 아니라면, 다음 서브 블록으로 이동 후 해당 서브 블록을 현재 블록으로 설정하고(S4904)현재 블록의 화면 내 예측 모드를 부호화할 수 있다.
도 50은 현재 부호화 하려는 서브 블록에 대한 화면 내 예측 모드를 부호화하는 과정을 설명하기 위한 도면이다. 설명의 편의를 위해, 현재 부호화하고자 하는 서브 블록을 '현재 블록'이라 호칭하기로 한다.
현재 블록에 대한 화면 내 예측 모드를 부호화하기 위해, 부호화 장치는, 현재 블록에 대한 화면 내 예측 모드를 예측할 수 있다. 여기서, 화면 내 예측 모드의 예측은, 현재 블록 또는 상위 블록 (또는 부호화 블록)에 인접한 주변 블록들의 화면 내 예측 모드들을 이용하여 이루어질 수 있다.
구체적으로, 부호화 장치는, 현재 블록 또는 상위 블록에 이웃한 주변 블록들의 화면 내 예측 모드들을 이용하여, 현재 블록에 해당하는 화면 내 예측 모드의 예측을 위한 후보 모드들을 구성할 수 있다. 후보 모드의 개수 N은 블록 단위 또는 상위 헤더를 통해 부호화될 수도 있고, 부호화 장치 및 복호화 장치에서 동일한 값을 설정하여 사용하는 것도 가능하다. 본 실시예에서, N은 2인 것으로 가정하고, 후보 모드는 상위 블록에 이웃한 주변 블록들의 화면 내 예측 모드를 이용하여 결정되는 것으로 가정한다.
부호화 장치는 상위 블록의 상단에 인접한 상단 주변 블록 및 상위 블록의 좌측에 인접한 좌측 주변 블록 등을 이용하여, 후보 모드를 구성할 수 있다. 일 예로, 부호화 장치는, 상위 블록의 상단 주변 블록들 중 특정 위치를 포함하는 블록의 화면 내 예측 모드들과 상위 블록의 좌측 주변 블록들 중 특정 위치를 포함하는 블록의 화면 내 예측 모드를 이용하여, 후보 모드를 구성할 수 있다.
또는, 부호화 장치는, 상위 블록의 상단 주변 블록들의 화면 내 예측 모드 중 사용 빈도수가 가장 높은 모드들과 상위 블록의 좌측 주변 블록들의 화면 내 예측 모드 중 사용 빈도수가 가장 높은 모드를 이용하여, 후보 모드를 구성할 수도 있다.
또는, 부호화 장치는, 상위 블록의 상단 주변 블록들과 상위 블록의 좌측 주변 블록들의 화면 내 예측 모드 중 사용 빈도수가 가장 높은 소정 개수의 모드들을 이용하여, 후보 모드를 구성할 수도 있다.
일 예로, 도 50에 도시된 예에서, 블록 내 숫자가 주변 블록들의 화면 내 예측 모드를 나타낸다면, 상위 블록의 상단에 인접한 주변 블록들 및 좌측에 인접한 주변 블록들의 화면 내 예측 모드 중 사용 빈도수가 가장 높은 것은 1번 모드(4회 사용)이고, 차순위는 0번 모드(3회 사용)이다. 이에 따라, 부호화 장치는 1번 모드 및 0번 모드를 이용하여 후보 모드를 구성할 수 있다.
후보 모드가 구성되면, 부호화 장치는 현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부를 판단한다. 동일한 모드가 존재하는 것으로 판단되면, 부호화 장치는 복수의 후보 모드 중 현재 블록의 화면 내 예측 모드와 동일한 후보 모드를 나타내는 정보를 부호화할 수 있다.
반대로, 현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하지 않는 경우, 현재 블록이 이용할 수 있는 화면 내 예측 모드들 중 후보 모드를 제외한 잔여 화면 내 예측 모드들을 다시 넘버링하고, 새롭게 넘버링된 잔여 화면 내 예측 모드들 중에서 현재 블록의 화면 내 예측 모드를 특정하는 정보를 부호화할 수 있다.
일 예로, 도 51은 잔여 화면 내 예측 모드들을 넘버링하는 예를 나타낸 도면이다.
부호화 장치는 잔여 화면 내 예측 모드가 후보 모드보다 큰 경우, 잔여 화면 내 예측 모드보다 값이 작은 후보 모드의 개수만큼 잔여 화면 내 예측 모드를 차감한 번호를 할당할 수 있다.
일 예로, 후보 모드가 0번 모드 및 1번 모드를 포함하는 경우, 0번 모드 및 1번모드보다 큰 잔여 화면 내 예측 모드는 2가 차감된 번호를 할당받을 수 있다. 일 예로, 현재 블록의 화면 내 예측 모드가 5번이라면, 부호화 장치는 5에서 2를 차감한 3번을 부호화할 수 있다.
상술한 예에서는, 현재 블록 혹은 상위 블록에 인접한 주변 블록들의 화면 내 예측 모드를 이용하여 후보 모드를 구성하는 것으로 설명하였다. 다만, 현재 블록 또는상위 블록에 인접하지 않은 블록이라 하더라도, 화면 내 예측으로 부호화된 블록이라면, 후보 모드를 구성하는데 이용될 수 있다. 일 예로, 현재 블록 또는 상위 블록에 인접하지 않지만, 현재 블록 또는 상위 블록의 주변 블록에 인접한 블록의 화면 내 예측 모드를 이용하여, 현재 블록에 대한 후보 모드를 구성할 수도 있다.
도 52는 현재 블록의 화면 내 예측 모드를 부호화하는 과정을 나타낸 흐름도이다.
부호화 장치는 현재 블록에 대한 후보 모드를 구성하고(S5201), 후보 모드 중에서 현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부를 나타내는 정보를 부호화할 수 있다(S5202).
현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는 경우(S5203), 부호화 장치는 현재 블록의 화면 내 예측 모드와 동일한 후보 모드를 나타내는 인덱스 정보를 부호화할 수 있다(S5204). 반면, 현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하지 않는 경우(S5203), 부호화 장치는 이용 가능한 화면 내 예측 모드 중 후보 모드를 제외한 잔여 화면 내 예측 모드에서, 현재 블록의 화면 내 예측 모드를 특정하는 잔여 모드 정보를 부호화할 수 있다(S5205).
상술한 실시예에서는, 서브 블록 단위로, 서브 블록의 화면 내 예측 모드가 후보 모드와 동일한지 여부, 서브 블록의 화면 내 예측 모드와 동일한 후보 모드를 특정하기 위한 정보 또는 잔여 모드 정보가 부호화/복호화되는 것으로 설명하였다. 다른 예로, 부호화 장치는 이전 블록의 화면 내 예측 모드와의 차분값을 부호화할 수도 있다. 이하, 후술되는 도면을 참조하여, 서브 블록의 화면 내 예측 모드를 부호화하는 실시예에 대해 상세히 살펴보기로 한다.
도 53은 서브 블록 단위로 화면 내 예측 모드를 결정하는 예를 설명하기 위한 도면이다.
설명의 편의를 위해 상위 블록은 4개의 서브 블록으로 분할되는 것으로 가정하고, 각 서브 블록은 35개의 화면 내 예측 모드를 이용할 수 있는 것으로 가정한다.
부호화 장치는 첫번째 서브 블록(서브 블록 1)에 대한 화면 내 예측 모드를 결정한 뒤, 서브 블록 1에서 사용된 화면 내 예측 모드 및 오프셋 a를 이용하여, 서브 블록 2의 화면 내 예측 모드를 결정할 수 있다. 구체적으로, 부호화 장치는 '이전 서브 블록의 화면 내 예측 모드 ± a'의 범위 내에서 현재 부호화 하려는 서브 블록의 화면 내 예측 모드를 결정할 수 있다.
일 예로, 서브 블록 1의 화면 내 예측 모드가 26이고, 오프셋 a가 4인 경우, 부호화 장치는 22번부터 30번 화면 내 예측 모드 중 하나를 서브 블록 2의 화면 내 예측 모드로 결정할 수 있다.
만약, 서브 블록 2의 화면 내 예측 모드가 25번으로 결정되었다면, 서브 블록 3의 화면 내 예측 모드는 서브 블록 2의 화면 내 예측 모드를 기준으로 오프셋 범위 내에 존재하는 21번부터 29번 화면 내 예측 모드 중 하나로 결정될 수 있다.
만약, 서브 블록 3의 화면 내 예측 모드가 27번으로 결정되었다면, 서브 블록 4의 화면 내 예측 모드는 서브 블록 4의 화면 내 예측 모드를 기준으로 오프셋 범위 내에 존재하는 23번부터 31번 화면 내 예측 모드 중 하나로 결정될 수 있다.
이처럼, 주어진 오프셋 범위 내에서 서브 블록의 화면 내 예측 모드를 결정하는 경우, 서브 블록들의 화면 내 예측 모드는 유사한 방향을 띠게 된다. 각 서브 블록의 화면 내 예측 모드가 유사한 방향을 띠는 것을 고려하여, 현재 부호화 하려는 서브 블록과 이전 서브 블록 사이의 화면 내 예측 모드와의 차분값을 부호화할 수 있다.
상술한 실시예에서는, 서브 블록에 대한 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위 내에서, 서브 블록의 화면 내 예측 모드를 결정해야 하는 것으로 설명하였으나, 본 발명이 이에 한정되는 것은 아니다. 부호화 장치는, 각 서브 블록별 최적의 화면 내 예측 모드를 결정한 뒤, 각 서브 블록의 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위 내에 존재하는지 여부에 대한 정보를 부호화할 수도 있다. 각 서브 블록의 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위 내에 존재한다면, 부호화 장치는 이전 서브 블록과의 화면 내 예측 모드 차분값을 이용하여, 서브 블록의 화면 내 예측 모드를 부호화할 수 있다.
오프셋 a 는 부호화 장치 및 복호화 장치에서 기 정의된 값을 사용할 수도 있고, 블록 단위 또는 상위 헤더 단위로 부호화될 수도 있다.
도 54는 서브 블록에 대한 화면 내 예측 모드를 부호화하는 과정을 나타낸 흐름도이다.
현재 부호화 하려는 서브 블록이 첫번째 서브 블록인 경우(S5401), 부호화 장치는 첫번째 서브 블록에 대한 화면 내 예측 모드를 부호화할 수 있다(S5402). 여기서, 첫번째 서브 블록에 대한 화면 내 예측 모드는, 화면 내 예측 모드의 값을 그대로 부호화할 수도 있고, 또는 앞서 설명한 후보 모드를 이용하여 부호화될 수도 있다. 일 예로, 부호화 장치는, 첫번째 서브 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부를 나타내는 정보를 부호화하고, 첫번째 서브 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부에 따라, 후보 모드를 특정하는 정보 또는 잔여 모드 정보를 부호화할 수 있다.
현재 부호화 하려는 서브 블록이 첫번째 서브 블록이 아닌 경우(S5401), 부호화 장치는, 이전 서브 블록의 화면 내 예측 모드와 현재 서브 블록의 화면 내 예측 모드 사이의 차분값을 부호화할 수 있다(S5403).
일 예로, 도 53에서, 서브 블록 1, 서브 블록 2, 서브 블록 3 및 서브 블록 4의 화면 내 예측 모드가 각각 26, 25, 27, 29였다면, 두번째 서브 블록에 대해서는, 첫번째 서브 블록과의 차분값인 -1, 세번째 서브 블록에 대해서는, 두번째 서브 블록과의 차분값인 +2, 네번째 서브 블록에 대해서는, 세번째 서브 블록과의 차분값인 +2를 부호화할 수 있다.
도시되지는 않았지만, 부호화 장치는 첫번째 서브 블록을 제외한 잔여 서브 블록 각각의 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위내에 존재하는지 여부에 관한 정보를 더 부호화할 수도 있다. 이때, 상기 정보는 1비트의 플래그일 수도 있으나, 이에 한정되는 것은 아니다. 첫번째 서브 블록을 제외한 잔여 서브 블록 각각의 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위내에 존재하는 경우, 상술한 예와 같이, 이전 서브 블록과의 차분값을 부호화할 수 있다. 반면, 첫번째 서브 블록을 제외한 잔여 서브 블록 각각의 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위를 벗어나는 경우, 부호화 장치는 각 서브 블록의 화면 내 예측 모드를 그대로 부호화하거나, 후보 모드를 이용하여, 각 서브 블록의 화면 내 예측 모드를 부호화할 수 있다.
또는, 상위 블록에 포함된 모든 서브 블록들의 화면 내 예측 모드가 오프셋을 이용하여 부호화되었는지 여부를 알려주는 정보를 부호화 하는 것 또한 가능하다. 이 정보는, 상위 블록이 분할됨으로써 생성된 복수의 서브 블록 중 첫번째 서브 블록에 대해 부호화될 수도 있다.
만약, 상위 블록에 포함된 모든 서브 블록들의 화면 내 예측 모드가 오프셋을 이용하여 부호화되었다면, 첫번째 서브 블록을 제외한 나머지 서브 블록들의 경우, 이용할 수 있는 화면 내 예측 모드의 개수가 35개에서 a x 2 + 1로 감소할 수 있다.
만약, 상위 블록에 포함된 서브 블록들이 오프셋을 이용하지 않는 것으로 결정 되었다면, 서브 블록들의 화면 내 예측 모드는 오프셋을 이용하지 않고 부호화될 수 있다.
도 55는 서브 블록 별 화면 내 예측 모드를 부호화하는 예를 보다 상세히 설명하기 위한 도면이다.
도 55에 도시된 예에서, 블록①은 분할되지 않아 하나의 서브블록만 존재하고 블록②는 4개의 서브블록(s2~s5)로 분할되었으며 블록③은 4개의 서브블록(S6~s9)로 분할되었고 블록④는 4개의 서브블록(H, s11~s13)으로 분할되었다고 가정한다. 블록④로 예를 들면, H는 상위 서브 블록 내 첫 번째 서브 블록이므로 결정된 화면 내 예측 모드를 예측하여 부호화 한다. 이때 H의 화면 내 예측 모드를 예측하기 위해 주변 블록의 화면 내 예측 모드를 이용하여 후보 모드를 구성할 수 있다. 부호화 장치는, 후보 모드 중에서 H의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부를 부호화하고, H의 화면 내 예측 모드와 동일한 후보 모드가 존재한다면, H의 화면 내 예측 모드와 동일한 후보 모드를 특정하는 정보를 부호화하여 전송할 수 있다.
이후, 부호화 장치는, s11 내지 s13의 화면 내 예측 모드는 이전 서브 블록과의 차분값으로 부호화될 수 있다. 일 예로, s11의 화면 내 예측 모드는, H의 화면 내 예측 모드와의 차분값으로 부호화되고, s12의 화면 내 예측 모드는, s11의 화면 내 예측 모드와의 차분값으로 부호화되며, s13의 화면 내 예측 모드는, s12의 화면 내 예측 모드와의 차분값으로 부호화될 수 있다.
상술한 실시예에서는, 첫번째 서브 블록을 제외한 잔여 서브 블록 각각의 화면 내 예측 모드는 이전 서브 블록과의 차분값으로 부호화되는 것으로 설명하였다. 설명한 예와 달리, 첫번째 서브 블록을 제외한 잔여 서브 블록 각각의 화면 내 예측 모드는 특정 위치의 서브 블로과의 차분값으로 부호화될 수도 있다. 일 예로, 첫번째 서브 블록을 제외한 잔여 서브 블록의 화면 내 예측 모드는 첫번째 서브 블록과의 차분값으로 부호화될 수 있다. 또는, 두번째 서브 블록의 화면내 예측 모드는 첫번째 서브 블록과의 차분값으로 부호화되는 한편, 첫번째 및 두번째 서브 블록을 제외한 잔여 서브 블록은 두번째 서브 블록과의 차분값으로 부호화될 수도 있다.
도 56은 복호화 장치에서, 서브 블록의 화면 내 예측 정보를 복호화하는 과정을 나타낸 흐름도이다.
먼저, 복호화 장치는 현재 블록이 서브 블록으로 분할되는지 여부를 나타내는 정보를 복호화할 수 있다(S5601). 현재 블록이 서브 블록으로 분할되는 것으로 판단되는 경우(S5602), 복호화 장치는 현재 블록의 분할 방향을 나타내는 정보를 복호화할 수 있다(S5603).
상기 정보에 따라(S5604), 복호화 장치는 현재 블록을 가로 방향 또는 세로 방향으로 분할하여, 복수의 서브 블록을 생성할 수 있다(S5605, S5606).
이때, 현재 블록의 분할 횟수가 2보다 큰 경우, 복호화 장치는 기설정된 방법에 의해 현재 블록내 연속된 복수의 서브 블록을 하나의 블록으로 통합할 수도 있다.
이후, 복호화 장치는, 현재 블록에 포함된 첫번째 서브 블록을 현재 블록으로 삼아(S5607), 상기 과정을 반복적으로 수행할 수 있다.
만약 현재 블록이 둘 이상의 서브 블록으로 분할되지 않는다면(S5602), 복호화 장치는 현재 블록에 대한 화면 내 예측 복호화를 수행할 수 있다(S5608).
이후, 모든 서브 블록에 대한 복호화가 종료되었는지 여부를 확인하고(S5609), 모든 서브 블록에 대한 복호화가 종료된 것이 아니라면, 다음 서브 블록을 현재 블록으로 삼아(S5610), 상기 과정을 반복적으로 수행할 수 있다.
도 57은 가중치 관련 정보를 복호화하는 과정을 나타낸 흐름도이다.
먼저, 복호화 장치는, 상위 블록 단위로 가중치를 적용할 것인지 여부를 나타내는 정보를 복호화할 수 있다(S5701). 여기서, 상기 정보는 1비트의 플래그일 수 있으나, 이에 한정되는 것은 아니다. 또한, 상기 정보는, 상위 블록이 분할됨으로써 생성된 첫번째 서브 블록을 통해 복호화되거나, 서브 블록이 아닌 상위 블록(예를 들어 부호화 블록)을 통해 복호화될 수도 있다.
이후, 복호화 장치는 복호화 대상이 되는 서브 블록(이하, "현재 블록"이라 호칭하기로 함)에 대한 화면 내 예측 모드를 복호화할 수 있다(S5702). 그 후, 상위 블록에 포함된 모든 서브 블록에 대한 화면 내 예측 모드 복호화가 완료되었는지 여부를 판단한 뒤(S5703), 모든 서브 블록에 대한 화면 내 예측 모드 복호화가 완료된 상태가 아니라면, 다음 서브 블록으로 이동 후 해당 서브 블록을 현재 블록으로 설정하고(S5704), 현재 블록의 화면 내 예측 모드를 복호화할 수 있다(S5704).
상위 블록안에 존재하는 모든 서브 블록에 대해 가중치를 적용하기로 결정되는 경우, 복호화 장치는 현재 블록에 대한 화면 내 예측 모드가 복호화되면, 현재 블록과 이전 블록 사이의 화면 내 예측 모드의 방향성이 유사한지 여부 및 이전 블록의 행간 또는 열간 평균 화소값 변화량을 고려하여, 현재 블록에 대한 가중치를 결정할 수 있다. 이후, 복호화 장치는, 현재 블록에 대해 화면 내 예측 모드를 이용하여 획득한 예측 샘플에, 가중치를 적용할 수 있다.
도 58은 현재 복호화 하려는 서브 블록에 대한 화면 내 예측 모드를 복호화하는 과정을 나타낸 흐름도이다. 설명의 편의를 위해, 현재 복호화하려는 서브 블록을 '현재 블록'이라 호칭하기로 한다.
복호화 장치는 현재 블록에 대한 후보 모드를 구성할 수 있다(S5801). 후보 모드를 구성하는 예는 도 50을 통해 설명한 바 있으므로, 이에 대한 상세한 설명은 생략한다.
이후, 복호화 장치는 후보 모드 중에서 현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부를 나타내는 정보를 복호화할 수 있다(S5802).
현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는 경우(S5803), 복호화 장치는 현재 블록의 화면 내 예측 모드와 동일한 후보 모드를 나타내는 인덱스 정보를 복호화할 수 있다(S5804).
반면, 현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하지 않는 경우(S5803), 복호화 장치는 잔여 모드 정보를 복호화하고(S5805), 복호화된 잔여 모드 정보와 후보 모드를 이용하여, 현재 블록에 대한 화면 내 예측 모드를 획득할 수 있다.
도 59는 서브 블록에 대한 화면 내 예측 모드를 복호화하는 또 다른 예를 설명하기 위한 도면이다.
현재 복호화 하려는 서브 블록이 첫번째 서브 블록인 경우(S5901), 복호화 장치는 첫번째 서브 블록에 대한 화면 내 예측 모드를 복호화할 수 있다(S5902). 여기서, 복호화되는 정보는, 첫번째 서브 블록에 대한 화면 내 예측 모드 값을 나타낼 수도 있고, 또는 후보 모드와 관련한 정보를 포함할 수도 있다. 여기서, 후보 모드와 관련한 정보는, 첫번째 서브 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부를 나타내는 정보 및 첫번째 서브 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부에 따라, 후보 모드를 특정하는 정보 또는 잔여 모드 정보를 포함할 수 있다.
현재 복호화 하려는 서브 블록이 첫번째 서브 블록이 아닌 경우(S5901), 복호화 장치는, 이전 서브 블록의 화면 내 예측 모드와 현재 서브 블록의 화면 내 예측 모드 사이의 차분값을 복호화할 수 있다(S5903). 이후, 복호화 장치는 이전 서브 블록과 현재 서브 블록 사이의 차분값을 기초로, 현재 서브 블록의 화면 내 예측 모드를 획득할 수 있다.
일 예로, 서브 블록 1의 화면 내 예측 모드가 26이고, 서브 블록 2, 서브 블록 3 및 서브 블록 4에 대한 차분값이 각각 -1, +2, +2라면, 서브 블록 2의 화면 내 예측 모드는 서브 블록 1의 화면 내 예측 모드에 차분값을 적용한 25, 서브 블록 3의 화면 내 예측 모드는 서브 블록 2의 화면 내 예측 모드에 차분값을 적용한 27, 서브 블록 4의 화면 내 예측 모드는 서브 블록 3의 화면 내 예측 모드에 차분값을 적용한 29로 결정될 수 있다.
도시되지는 않았지만, 복호화 장치는 첫번째 서브 블록을 제외한 잔여 서브 블록 각각의 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위내에 존재하는지 여부에 관한 정보를 더 복호화할 수도 있다. 이때, 상기 정보는 1비트의 플래그일 수도 있으나, 이에 한정되는 것은 아니다. 첫번째 서브 블록을 제외한 잔여 서브 블록 각각의 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위내에 존재하는 경우, 상술한 예와 같이, 이전 서브 블록과의 차분값을 복호화할 수 있다. 반면, 첫번째 서브 블록을 제외한 잔여 서브 블록 각각의 화면 내 예측 모드가 이전 서브 블록의 화면 내 예측 모드를 기준으로 오프셋 범위를 벗어나는 경우, 복호화 장치는 각 서브 블록의 화면 내 예측 모드를 그대로 복호화하거나, 후보 모드를 이용하여, 각 서브 블록의 화면 내 예측 모드를 복호화할 수 있다.
또는, 상위 블록이 포함하는 모든 서브 블록들이 오프셋을 이용한 화면 내 예측으로 수행되었는지 여부를 알려주는 정보를 복호화 하는 것 또한 가능하다. 이때, 상기 정보는 상위 블록이 분할됨으로써 생성되는 첫번쨰 서브 블록을 통해 복호화될 수도 있고, 또는 임의의 블록 단위로 부호화될 수도 있다.
만약, 상위 서브 블록이 포함하는 모든 서브 블록들이 오프셋을 이용한 화면 내 예측으로 수행되었다면, 첫번째 서브 블록을 제외한 나머지 서브 블록들이 이용할 수 있는 화면 내 예측 모드의 개수는 35개에서 a x 2 + 1로 감소할 수 있다.
만약 만약 상위 서브 블록안에 존재하는 모든 서브 블록들이 오프셋을 이용하지 않는 것으로 결정되었다면, 오프셋을 이용함이 없이, 서브 블록들의 화면 내 예측 모드를 복호화할 수 있다.
다음으로, 곡선 모드를 이용하여, 서브 블록을 부호화/복호화하는 예에 대해 설명하기로 한다.
곡선 모드는 상위 블록 단위에 속해있는 서브 블록의 화면 내 예측 모드의 기울기가 서서히 증가 또는 감소하는 형태를 띠는 것을 의미한다. 일 예로, 서브 블록간 화면 내 예측 모드가 점진적으로(예컨대, 등차적 또는 등비적) 증가 또는 감소하는 경우, 상위 블록 단위로 묶인 서브 블록들에 대해 곡선 모드가 사용되는 것으로 결정될 수 있다.
도 60은 곡선 모드의 사용 여부를 결정하는 예를 설명하기 위한 도면이다.
설명의 편의를 위해, 상위 블록은 도 60과 같이 4개의 서브 블록으로 분할 된 것으로 가정한다.
먼저, 부호화 장치는, 서브 블록 1에 대해, 곡선을 위한 화면 내 예측 모드(이하, 곡선 모드라 호칭함)의 사용 여부를 나타내는 정보를 부호화할 수 있다.
만약, 곡선 모드가 사용되는 것으로 판단되면 첫번째 서브 블록을 제외한 잔여 서브 블록의 화면 내 예측 모드는, 이전 서브 블록의 화면 내 예측 모드에 오프셋 ß를 더한 값을 할당할 수 있다.
일 예로, 사용 가능한 화면 내 예측 모드의 개수가 35개라고 할 때, 서브 블록 1에 대한 화면 내 예측 모드가 10번이고, 오프셋 ß가 2라면, 서브 블록 2는 12번, 서브 블록 3은 14번, 서브 블록 4에는 16번의 화면 내 예측 모드가 할당될 수 있다.
도 61은 곡선 모드의 정보를 통해 각 서브 블록의 화면 내 예측 모드를 부호화 하는 과정을 나타낸 흐름도이다.
부호화 하려는 서브 블록이 상위 서브 블록 안에서 첫 번째 서브 블록인 경우(S6101), 부호화 장치는 곡선 모드가 이용되는지 여부를 나타내는 정보를 부호화할 수 있다(S6102). 곡선 모드가 사용되는 경우(S6103), 부호화 장치는 오프셋 ß와 관련된 정보를 부호화할 수 있다(S6104). 여기서, 오프셋과 관련된 정보는, 절대값 및 부호에 대한 정보를 포함될 수 있다. 이때, 오프셋 및 부호에 대한 정보는 동일 계층에서 부호화될 수도 있으나, 상이한 계층에서 부호화될 수도 있다. 일 예로, 오프셋과 관련된 정보 중 절대값은, 상위 헤더를 통해 부호화하는 반면, 부호는 블록 단위(예컨대, 서브 블록 단위 또는 예측 블록 단위)에서 부호화 하는 것도 가능하다. 아울러, 부호화 장치는 첫번째 서브 블록의 화면 내 예측 모드에 대한 정보를 부호화할 수 있다(S6105)
현재 부호화 하려는 서브 블록이 첫 번째 서브 블록이 아니라면(S6101), 부호화 장치는, 첫 번째 서브 블록에서 곡선 모드가 사용되는지를 확인할 수 있다(S6106). 만약, 곡선 모드가 사용되지 않았다면, 부호화 장치는, 현재 서브 블록에 대한 화면 내 예측 모드를 부호화할 수 있다(S6105). 여기서, 현재 서브 블록의 화면 내 예측 모드는 앞서 설명한 후보 모드 또는 이전 서브 블록과의 차분값을 이용하여 부호화될 수 있다.
반면, 첫번째 서브 블록에서 곡선 모드가 사용된 것으로 판단된 경우, 현재 서브 블록의 화면 내 예측 모드를 부호화 하지 않을 수 있다.
모든 서브 블록에 대한 화면 내 예측 모드 부호화가 완료된 경우(S6107), 해당 절차를 종료하고, 그렇지 않은 경우, 다음 서브 블록에 대한 부호화를 시작한다(S6108).
도 62는 곡선 모드의 정보를 통해 각 서브 블록의 화면 내 예측 모드를 복호화하는 과정을 나타낸 흐름도이다.
현재 복호화 하려는 서브 블록이 상위 서브 블록안에서 첫 번째 서브 블록인 경우(S6201), 복호화 장치는 곡선 모드가 이용되는지 여부를 나타내는 정보를 복호화할 수 있다(S6202). 곡선 모드가 사용되는 경우(S6203), 복호화 장치는 오프셋 ß와 관련된 정보를 복호화할 수 있다(S6204). 여기서, 오프셋과 관련된 정보는, 절대값 및 부호에 대한 정보를 포함될 수 있다. 이때, 오프셋 및 부호에 대한 정보는 동일 계층에서 복호화될 수도 있으나, 상이한 계층에서 복호화될 수도 있다. 일 예로, 오프셋과 관련된 정보 중 절대값은, 상위 헤더를 통해 복호화하는 반면, 부호는 블록 단위(예컨대, 서브 블록 단위 또는 예측 블록 단위)에서 복호화 하는 것도 가능하다. 이후, 복호화 장치는 첫번쨰 서브 블록에 대한 화면 내 예측 모드를 복호화할 수 있다(S6205).
현재 복호화 하려는 서브 블록이 첫 번째 서브 블록이 아니라면(S6201), 복호화 장치는, 첫 번째 서브 블록에서 곡선 모드가 사용되는지를 확인할 수 있다(S6206). 만약, 곡선 모드가 사용되지 않았다면, 복호화 장치는, 현재 서브 블록에 대한 화면 내 예측 모드를 복호화할 수 있다(S6207). 여기서, 현재 서브 블록의 화면 내 예측 모드는 앞서 설명한 후보 모드 또는 이전 서브 블록과의 차분값을 이용하여 복호화될 수 있다.
반면, 첫번째 서브 블록에서 곡선 모드가 사용된 것으로 판단된 경우, 이전 서브 블록의 화면 내 예측 모드 및 오프셋 값을 이용하여, 현재 서브 블록의 화면 내 예측 모드를 복호화할 수 있다.
모든 서브 블록에 대한 화면 내 예측 모드 복호화가 완료된 경우(S6207), 해당 절차를 종료하고, 그렇지 않은 경우, 다음 서브 블록에 대한 복호화를 시작한다(S6208).
이하, 곡선 모드가 사용된 경우, 화면 내 예측을 수행하는 방법에 대해 구체적으로 설명하기로 한다.
각 서브 블록에 대해 화면 내 예측을 수행하는 경우, 서브 블록 단위로 변환이 이루어졌는지 여부 또는 상위 블록 단위로 변환이 이루어 졌는지 여부에 따라, 서브 블록의 화면 내 예측을 수행하기 위해 이용될 수 있는 참조 샘플의 성질이 달라질 수 있다. 일 예로, 서브 블록 단위로 변환이 이루어지는 경우, 서브 블록의 화면 내 예측은, 서브 블록에 이웃한 이웃 서브 블록에 포함된 복원 샘플 및 서브 블록을 포함하는 상위 블록에 이웃한 이웃 블록에 포함된 복원 샘플을 기초로 수행될 수 있다. 반면, 상위 블록 단위로 변환이 이루어지는 경우, 서브 블록의 화면 내 예측은 서브 블록에 이웃한 이웃 서브 블록에 포함된 예측 샘플 및 서브 블록을 포함하는 상위 블록에 이웃한 이웃 블록에 포함된 복원 샘플을 기초로 수행될 수 있다.
이하, 도면을 참조하여, 이웃 서브 블록을 이용하여, 서브 블록에 대해 화면 내 예측을 수행하는 방법을 상세히 설명하기로 한다.
도 63 내지 도 65는 상위 블록 단위로 변환이 이루어진 경우, 서브 블록에 대한 화면 내 예측을 수행하는 방법을 설명하기 위한 도면이다.
도 63 내지 도 65에 도시된 예에서, P1 부터 P64는 예측 화소를 의미한다. 즉, 서브 블록 1 내지 4의 예측 블록은, 각각 P1 부터 P16, P17 부터 P32, P33 부터 P48 및 P49 부터 P64의 예측 화소를 포함한다고 할 수 있다. R1 부터 R33은 상위 블록 주변 복원 화소를 의미한다.
도 63에 도시된 예에서, 상위 블록은 4개의 서브 블록으로 분할된 것으로 도시되었다. 이때, 상위 블록에 곡선 모드가 적용되고, 첫번째 서브 블록의 인트라 예측 모드가 27번, 오프셋 β가 1이라면, 서브 블록 1 부터 서브 블록 4의 화면 내 에측 모드는 각각 27번, 28번, 29번 및 30번으로 설정될 수 잇다.
서브 블록 1은 서브 블록 1 주변의 복원 화소를 이용하여 화면 내 예측을 수행할 수 있다. 일 예로, 서브 블록 1은 R1 부터 R33 의 참조 화소를 이용하여, 화면 내 예측을 수행할 수 있다.
서브 블록 2에 대한 화면 내 예측을 수행하는 경우, 서브 블록 1에는 복원된 화소가 존재하지 않는다. 이에 따라, 서브 블록 2는 서브 블록 1에 포함된 예측 화소를 이용하여 화면 내 예측을 수행할 수 있다. 일 예로, 서브 블록 2는, 서브 블록 2의 좌측에 존재하는 복원 화소 및 상단에 존재하는 예측 화소를 이용하여, 화면 내 예측을 수행할 수 있다. 일 예로, 서브 블록 2는 R19 부터 R33, P9부터 P16을 이용하여, 화면 내 예측을 수행할 수 있다.
서브 블록 3에 대한 화면 내 예측을 수행하는 경우, 서브 블록 3에 이웃한 서브 블록 2에는 복원된 화소가 존재하지 않는다. 이에 따라, 서브 블록 3은 서브 블록 2에 포함된 예측 화소를 이용하여 화면 내 예측을 수행할 수 있다. 일 예로, 서브 블록 3은, 서브 블록 3의 좌측에 존재하는 복원 화소 및 상단에 존재하는 예측 화소를 이용하여, 화면 내 예측을 수행할 수 있다. 일 예로, 서브 블록 3은 R21 부터 R33, P25 부터 P32을 이용하여, 화면 내 예측을 수행할 수 있다.
마찬가지로, 서브 블록 4에 대한 화면 내 예측을 수행하는 경우, 서브 블록 4에 이웃한 서브 블록 3에는 복원된 화소가 존재하지 않는다. 이에 따라, 서브 블록 4는 서브 블록 3에 포함된 예측 화소를 이용하여 화면 내 예측을 수행할 수 있다. 일 예로, 서브 블록 4는 R23 부터 R33, P41 부터 P48을 이용하여, 화면 내 예측을 수행할 수 있다.
서브 블록 2 내지 서브 블록 4의 화면 내 예측을 수행하는 경우 서브 블록 1과 달리 블록 우상단쪽에 복원된 화소가 존재하지 않는다. 이에 따라, 서브 블록 2 내지 서브 블록 4에 대한 화면 내 예측을 수행하는 경우, 각 서브 블록에 이웃한 이웃 서브 블록에 포함된 예측 화소를 패딩하여 추가 참조 화소를 생성할 수 있다.
도 64에 도시된 예에서는, 도 64에서는, 이웃 서브 블록에 포함된 복원 샘플 중 최우측 화소의 값을 복사함으로써 추가 참조 화소가 생성되는 것으로 예시하였지만, 추가 참조 화소의 생성은 본 방법에 한정되지 않는다.
서브 블록의 화면 내 예측 모드가 점진적으로 증가하는 형태를 띨 경우, 상위 블록에서 변환이 이루어지는 화면 내 예측은 결국, 도 65에 도시된 예에서와 같이 곡선과 유사한 형태를 띠는 것으로 간주될 수 있다.
본 개시의 예시적인 방법들은 설명의 명확성을 위해서 동작의 시리즈로 표현되어 있지만, 이는 단계가 수행되는 순서를 제한하기 위한 것은 아니며, 필요한 경우에는 각각의 단계가 동시에 또는 상이한 순서로 수행될 수도 있다. 본 개시에 따른 방법을 구현하기 위해서, 예시하는 단계에 추가적으로 다른 단계를 포함하거나, 일부의 단계를 제외하고 나머지 단계를 포함하거나, 또는 일부의 단계를 제외하고 추가적인 다른 단계를 포함할 수도 있다.
본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.
또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.
본 개시의 범위는 다양한 실시 예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.
본 개시는 영상을 부호화/복호화하는 것에 이용될 수 있다.

Claims (16)

  1. 현재 블록이 상기 현재 블록에 이웃한 주변 블록과 병합되는지 여부를 판단하는 단계;
    상기 판단 결과에 기초하여, 상기 현재 블록의 움직임 정보 및 가중치 예측 파라미터를 획득하는 단계;
    상기 움직임 정보에 기초하여, 상기 현재 블록에 대한 참조 블록을 선택하는 단계; 및
    상기 참조 블록에 상기 가중치 예측 파라미터를 적용하여, 상기 현재 블록에 대한 예측 블록을 생성하는 단계를 포함하는, 영상 복호화 방법.
  2. 제1항에 있어서,
    상기 현재 블록이 상기 주변 블록과 병합되는 것으로 판단되는 경우, 상기 현재 블록의 가중치 예측 파라미터는 상기 주변 블록의 가중치 예측 파라미터와 동일하게 설정되는 것을 특징으로 하는, 영상 복호화 방법.
  3. 제1항에 있어서,
    상기 현재 블록이 상기 주변 블로고가 병합되지 않는 것으로 판단되는 경우, 상기 현재 블록의 가중치 예측 파라미터는 비트스트림으로부터 복호화되는 정보에 의해 획득되는 것을 특징으로 하는, 영상 복호화 방법.
  4. 제1항에 있어서,
    상기 움직임 정보는, 움직임 벡터를 포함하고,
    상기 움직임 벡터는, 상기 현재 블록 주변의 복원 화소들에 기초하여, 정밀도가 상향 조절되는 것을 특징으로 하는, 영상 복호화 방법.
  5. 현재 블록에 대한 화면 내 예측 모드 정보를 복호화하는 단계;
    상기 현재 블록의 화면 내 예측 모드를 이용하여, 상기 현재 블록에 대한 화면 내 예측을 수행하는 단계;
    상기 화면 내 예측 수행 결과로 생성된 예측 샘플을 보정할 것인지 여부를 결정하는 단계; 및
    상기 결정 결과에 따라, 상기 예측 샘플을 보정하는 단계를 포함하는, 영상 복호화 방법.
  6. 제5항에 있어서,
    상기 현재 블록에 대한 화면 내 예측 모드 정보를 복호화하는 단계는,
    상기 현재 블록에 대한 후보 모드를 생성하는 단계;
    상기 현재 블록의 화면 내 예측 모드와 동일한 후보 모드와 존재하는지 여부를 판단하는 단계; 및
    상기 판단 결과를 기초로, 상기 현재 블록의 화면 내 예측 모드를 결정하는 단계를 포함하는 영상 복호화 방법.
  7. 제6항에 있어서,
    상기 후보 모드는, 상기 현재 블록의 상단에 인접한 상단 주변 블록 및 상기 현재 블록의 좌측에 인접한 좌측 주변 블록 중 적어도 하나의 화면 내 예측 모드 이용 빈도를 기초로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  8. 제5항에 있어서,
    상기 현재 블록에 대한 화면 내 예측 모드 정보를 복호화하는 단계는,
    상기 현재 블록과 이전 블록 사이의 화면 내 예측 모드 차분값을 복호화는 단계; 및
    상기 이전 블록의 화면 내 예측 모드 및 상기 차분값에 기초하여, 상기 현재 블록의 화면 내 예측 모드를 결정하는 단계를 포함하는, 영상 복호화 방법.
  9. 현재 블록의 움직임 정보 및 가중치 예측 파라미터를 결정하는 단계; 및
    상기 현재 블록의 움직임 정보 및 가중치 예측 파라미터가 상기 현재 블록에 이웃한 주변 블로고가 병합되는지 여부를 나타내는 정보를 부호화하는 단계를 포함하되
    상기 현재 블록의 예측 블록은,
    상기 움직임 정보에 기초하여 선택되는 참조 블록에 상기 가중치 예측 파라미터를 적용하여, 생성되는 것을 특징으로 하는, 영상 부호화 방법.
  10. 제9항에 있어서,
    상기 현재 블록이 상기 주변 블록과 병합되는 경우, 상기 현재 블록의 가중치 예측 파라미터는 상기 주변 블록의 가중치 예측 파라미터와 동일하게 설정되는 것을 특징으로 하는, 영상 부호화 방법.
  11. 제9항에 있어서,
    상기 현재 블록이 상기 주변 블록과 병합되지 않는 경우, 상기 현재 블록의 가중치 예측 파라미터와 관련한 정보를 부호화하는 단계를 더 포함하는, 영상 부호화 방법.
  12. 제9항에 있어서,
    상기 움직임 정보는, 움직임 벡터를 포함하고,
    상기 현재 블록 주변의 복원 화소들에 기초하여, 상기 움직임 벡터의 정밀도를 상향 조절할 것인지 여부를 나타내는 정보를 부호화하는 단계를 더 포함하는, 영상 부호화 방법.
  13. 상기 현재 블록에 대한 화면 내 예측 모드를 결정하는 단계;
    상기 화면 내 예측 모드를 기초로 생성된 예측 샘플을 보정하는 단계; 및
    상기 예측 샘플 및 보정된 예측 샘플을 기초로, 상기 예측 샘플을 보정할 것인지 여부를 나타내는 정보를 부호화하는 단계를 포함하는 영상 부호화 방법.
  14. 제13항에 있어서,
    상기 현재 블록에 대한 후보 모드를 생성하는 단계;
    상기 현재 블록의 화면 내 예측 모드와 동일한 후보 모드와 존재하는지 여부를 판단하는 단계; 및
    상기 판단 결과를 기초로, 상기 현재 블록의 화면 내 예측 모드와 동일한 후보 모드가 존재하는지 여부를 나타내는 정보를 부호화하는 단계를 더 포함하는 영상 부호화 방법.
  15. 제14항에 있어서,
    상기 후보 모드는, 상기 현재 블록의 상단에 인접한 상단 주변 블록 및 상기 현재 블록의 좌측에 인접한 좌측 주변 블록 중 적어도 하나의 화면 내 예측 모드 이용 빈도를 기초로 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  16. 제13항에 있어서,
    상기 현재 블록과 이전 블록 사이의 화면 내 예측 모드 차분값을 부호화하는 단계를 더 포함하는, 영상 부호화 방법.
PCT/KR2017/004569 2016-04-29 2017-04-28 영상 신호 부호화/복호화 방법 및 장치 WO2017188779A2 (ko)

Priority Applications (14)

Application Number Priority Date Filing Date Title
CN202210313451.5A CN114584765A (zh) 2016-04-29 2017-04-28 解码和编码视频的方法以及传送比特流的方法
CN202210311692.6A CN114584763A (zh) 2016-04-29 2017-04-28 解码和编码视频的方法以及传送比特流的方法
US16/097,354 US10834420B2 (en) 2016-04-29 2017-04-28 Method and apparatus for encoding/decoding video signal
CN202210313457.2A CN114584767A (zh) 2016-04-29 2017-04-28 解码和编码视频的方法以及传送比特流的方法
CN202210313456.8A CN114584766A (zh) 2016-04-29 2017-04-28 解码和编码视频的方法以及传送比特流的方法
CN202210313414.4A CN114584764A (zh) 2016-04-29 2017-04-28 解码和编码视频的方法以及传送比特流的方法
EP17789963.0A EP3451662A4 (en) 2016-04-29 2017-04-28 METHOD AND DEVICE FOR CODING / DECODING VIDEO SIGNALS
KR1020227013582A KR20220054470A (ko) 2016-04-29 2017-04-28 영상 신호 부호화/복호화 방법 및 장치
CN201780040691.XA CN109417619B (zh) 2016-04-29 2017-04-28 用于编码/解码视频信号的方法以及视频信号的传送方法
KR1020237021205A KR20230101932A (ko) 2016-04-29 2017-04-28 영상 신호 부호화/복호화 방법 및 장치
KR1020187029180A KR20180131570A (ko) 2016-04-29 2017-04-28 영상 신호 부호화/복호화 방법 및 장치
US17/038,260 US11297343B2 (en) 2016-04-29 2020-09-30 Method and apparatus for encoding/decoding video signal
US17/684,607 US11785244B2 (en) 2016-04-29 2022-03-02 Method and apparatus for encoding/decoding video signal
US18/351,706 US20230353773A1 (en) 2016-04-29 2023-07-13 Method and apparatus for encoding/decoding video signal

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
KR10-2016-0052712 2016-04-29
KR20160052940 2016-04-29
KR20160052710 2016-04-29
KR10-2016-0052947 2016-04-29
KR20160052697 2016-04-29
KR10-2016-0052697 2016-04-29
KR20160052947 2016-04-29
KR10-2016-0052940 2016-04-29
KR20160052712 2016-04-29
KR10-2016-0052710 2016-04-29

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US16/097,354 A-371-Of-International US10834420B2 (en) 2016-04-29 2017-04-28 Method and apparatus for encoding/decoding video signal
US17/038,260 Continuation US11297343B2 (en) 2016-04-29 2020-09-30 Method and apparatus for encoding/decoding video signal

Publications (2)

Publication Number Publication Date
WO2017188779A2 true WO2017188779A2 (ko) 2017-11-02
WO2017188779A3 WO2017188779A3 (ko) 2018-08-02

Family

ID=60159944

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/004569 WO2017188779A2 (ko) 2016-04-29 2017-04-28 영상 신호 부호화/복호화 방법 및 장치

Country Status (5)

Country Link
US (4) US10834420B2 (ko)
EP (1) EP3451662A4 (ko)
KR (3) KR20180131570A (ko)
CN (6) CN114584767A (ko)
WO (1) WO2017188779A2 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210064371A (ko) * 2018-12-10 2021-06-02 텐센트 아메리카 엘엘씨 비디오 코딩을 위한 방법 및 장치

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116614641A (zh) 2016-07-12 2023-08-18 韩国电子通信研究院 图像编码/解码方法和用于所述方法的记录介质
WO2019059107A1 (ja) * 2017-09-20 2019-03-28 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 符号化装置、復号装置、符号化方法及び復号方法
US11178405B2 (en) * 2017-10-18 2021-11-16 Samsung Electronics Co., Ltd. Method and apparatus for video decoding, and method and apparatus for video encoding
US11509924B2 (en) * 2018-06-01 2022-11-22 Panasonic Intellectual Property Corporation Of America Encoder, decoder, encoding method, and decoding method
SG11202106789YA (en) 2018-12-28 2021-07-29 B1 Institute Of Image Technology Inc Intra prediction-based video encoding/decoding method and device
US11178427B2 (en) * 2019-02-08 2021-11-16 Qualcomm Incorporated Dynamic sub-partition intra prediction for video coding
JP2022528331A (ja) * 2019-03-25 2022-06-10 オッポ広東移動通信有限公司 画像成分予測方法、エンコーダー、デコーダー及び記憶媒体
JP7328365B2 (ja) 2019-06-14 2023-08-16 エルジー エレクトロニクス インコーポレイティド 双予測(bi-prediction)が適用される場合、加重平均のための加重値インデックス情報を導出する画像デコード方法及びその装置
CA3143546A1 (en) 2019-06-14 2020-12-17 Lg Electronics Inc. Image decoding method for deriving weight index information for biprediction, and device for same
AU2020293843B2 (en) 2019-06-14 2023-12-07 Lg Electronics Inc. Image decoding method and device for deriving weight index information for generation of prediction sample
WO2020262902A1 (ko) * 2019-06-24 2020-12-30 엘지전자 주식회사 쌍 예측을 적용하는 영상 디코딩 방법 및 그 장치
KR20220066041A (ko) * 2019-09-20 2022-05-23 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 크로마 스케일링의 루마 매핑
US20220312004A1 (en) * 2021-03-23 2022-09-29 Tencent America LLC Method and apparatus for video coding
CN112804477B (zh) * 2021-03-29 2021-07-09 浙江华创视讯科技有限公司 预置点图像参数的确定方法、装置、电子设备及存储介质
KR20220157765A (ko) * 2021-05-21 2022-11-29 삼성전자주식회사 영상 부호화 장치 및 이의 동작 방법
CN115695812A (zh) * 2021-07-30 2023-02-03 中兴通讯股份有限公司 视频编码、视频解码方法、装置、电子设备和存储介质
WO2023085600A1 (ko) * 2021-11-10 2023-05-19 현대자동차주식회사 암시적 임의 블록분할 및 이에 따른 예측을 이용하는 비디오 코딩을 위한 방법 및 장치
KR20240001073A (ko) * 2022-06-24 2024-01-03 주식회사 케이티 영상 부호화/복호화 방법 및 비트스트림을 저장하는 기록 매체

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070012201A (ko) * 2005-07-21 2007-01-25 엘지전자 주식회사 영상 신호의 인코딩 및 디코딩 방법
KR101244917B1 (ko) * 2007-06-11 2013-03-18 삼성전자주식회사 조도 보상 방법 및 장치, 이를 이용한 영상의 부호화,복호화 방법 및 장치
EP2018070A1 (en) * 2007-07-17 2009-01-21 Thomson Licensing Method for processing images and the corresponding electronic device
KR101449696B1 (ko) 2009-08-21 2014-10-20 에스케이텔레콤 주식회사 차분 움직임 벡터의 정밀도를 고려한 움직임 벡터 부호화/복호화 방법 및 장치, 및 그를 위한 영상처리 장치 및 방법
KR20110071047A (ko) * 2009-12-20 2011-06-28 엘지전자 주식회사 비디오 신호 디코딩 방법 및 장치
KR101522850B1 (ko) * 2010-01-14 2015-05-26 삼성전자주식회사 움직임 벡터를 부호화, 복호화하는 방법 및 장치
WO2011096770A2 (ko) * 2010-02-02 2011-08-11 (주)휴맥스 영상 부호화/복호화 장치 및 방법
KR101611409B1 (ko) 2011-09-28 2016-04-14 한국전자통신연구원 인트라 예측 모드 부호화/복호화 방법 및 장치
JP5871628B2 (ja) * 2011-11-07 2016-03-01 キヤノン株式会社 画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラム
US9860558B2 (en) 2012-09-28 2018-01-02 Intel Corporation Inter-layer intra mode prediction
CN104838650B (zh) 2012-09-28 2018-03-30 日本电信电话株式会社 帧内预测编码方法、帧内预测解码方法、帧内预测编码装置、帧内预测解码装置以及记录程序的记录介质
US9357211B2 (en) * 2012-12-28 2016-05-31 Qualcomm Incorporated Device and method for scalable and multiview/3D coding of video information
US20140198846A1 (en) * 2013-01-16 2014-07-17 Qualcomm Incorporated Device and method for scalable coding of video information
KR20150014117A (ko) * 2013-07-29 2015-02-06 삼성전기주식회사 안테나 패턴이 매립되는 방사체 프레임 및 그 제조방법
KR101499696B1 (ko) 2013-10-16 2015-03-09 한국식품연구원 젓갈 유래 엔테로코쿠스속 미생물 및 이를 이용하여 s-아데노실-l-메티오닌을 대량 생산하는 방법
CN103561263B (zh) * 2013-11-06 2016-08-24 北京牡丹电子集团有限责任公司数字电视技术中心 基于运动矢量约束和加权运动矢量的运动补偿预测方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210064371A (ko) * 2018-12-10 2021-06-02 텐센트 아메리카 엘엘씨 비디오 코딩을 위한 방법 및 장치
KR102590368B1 (ko) * 2018-12-10 2023-10-19 텐센트 아메리카 엘엘씨 비디오 코딩을 위한 방법 및 장치
KR20230149855A (ko) * 2018-12-10 2023-10-27 텐센트 아메리카 엘엘씨 비디오 코딩을 위한 방법 및 장치
KR102667357B1 (ko) 2018-12-10 2024-05-21 텐센트 아메리카 엘엘씨 비디오 코딩을 위한 방법 및 장치

Also Published As

Publication number Publication date
EP3451662A4 (en) 2020-04-22
KR20180131570A (ko) 2018-12-10
CN114584763A (zh) 2022-06-03
CN114584764A (zh) 2022-06-03
KR20220054470A (ko) 2022-05-02
CN114584765A (zh) 2022-06-03
EP3451662A2 (en) 2019-03-06
US20190149836A1 (en) 2019-05-16
US11785244B2 (en) 2023-10-10
CN114584766A (zh) 2022-06-03
CN114584767A (zh) 2022-06-03
KR20230101932A (ko) 2023-07-06
US20220272373A1 (en) 2022-08-25
US10834420B2 (en) 2020-11-10
US20210076057A1 (en) 2021-03-11
WO2017188779A3 (ko) 2018-08-02
CN109417619A (zh) 2019-03-01
US11297343B2 (en) 2022-04-05
CN109417619B (zh) 2022-04-19
US20230421800A1 (en) 2023-12-28

Similar Documents

Publication Publication Date Title
WO2017188779A2 (ko) 영상 신호 부호화/복호화 방법 및 장치
WO2018226015A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018012886A1 (ko) 영상 부호화/복호화 방법 및 이를 위한 기록 매체
WO2019177354A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018030773A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2017176030A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018026166A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2017043816A1 (ko) 인터-인트라 병합 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2016204478A1 (ko) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2018016823A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018012851A1 (ko) 영상 부호화/복호화 방법 및 이를 위한 기록 매체
WO2018097692A2 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020222617A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2018131982A1 (ko) 영상 신호 부호화/복호화 방법 및 장치
WO2017183751A1 (ko) 인터 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2020060328A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2012044104A2 (ko) 계층적 구조의 심볼을 부호화하는 비디오 부호화 방법 및 그 장치, 계층적 구조의 심볼을 복호화하는 비디오 복호화 방법 및 그 장치
WO2018101700A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2017188509A1 (ko) 인터 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2018034373A1 (ko) 영상 처리 방법 및 이를 위한 장치
WO2020096426A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020060329A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2015133838A1 (ko) 폴리곤 유닛 기반 영상 인코딩/디코딩 방법 및 이를 위한 장치
WO2018174457A1 (ko) 영상 처리 방법 및 이를 위한 장치
WO2016190627A1 (ko) 비디오 신호 처리 방법 및 장치

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 20187029180

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2017789963

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2017789963

Country of ref document: EP

Effective date: 20181129

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

Ref document number: 17789963

Country of ref document: EP

Kind code of ref document: A2