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

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

Info

Publication number
WO2020141962A1
WO2020141962A1 PCT/KR2020/000211 KR2020000211W WO2020141962A1 WO 2020141962 A1 WO2020141962 A1 WO 2020141962A1 KR 2020000211 W KR2020000211 W KR 2020000211W WO 2020141962 A1 WO2020141962 A1 WO 2020141962A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
block
candidate
prediction
motion information
Prior art date
Application number
PCT/KR2020/000211
Other languages
English (en)
French (fr)
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
Application filed by 세종대학교산학협력단 filed Critical 세종대학교산학협력단
Priority to US17/420,784 priority Critical patent/US20220116588A1/en
Priority to CN202080007897.4A priority patent/CN113287302A/zh
Priority claimed from KR1020200001229A external-priority patent/KR102319033B1/ko
Priority claimed from KR1020200001230A external-priority patent/KR20200085667A/ko
Priority claimed from KR1020200001231A external-priority patent/KR20200085236A/ko
Publication of WO2020141962A1 publication Critical patent/WO2020141962A1/ko

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • 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/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
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • 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/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame 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/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

Definitions

  • the present invention relates to an image encoding/decoding method and apparatus.
  • HEVC defines techniques such as intra-picture prediction (or intra prediction), inter-picture prediction (or inter prediction), transformation, quantization, entropy encoding, and in-loop filters.
  • the present invention is to propose a method for improving prediction efficiency by efficiently deriving motion information used when generating a MERGE/AMVP candidate list.
  • the present invention is to provide a method and apparatus for searching a motion vector predictor for a current block among reconstructed motion information around a current block when generating a prediction block of the current block.
  • the present invention is to provide a method and apparatus for efficiently transmitting motion information of a current block.
  • the present invention is to provide a method and apparatus for more efficiently predicting a current block using reconstruction information in a current picture.
  • the present invention is to provide a method and apparatus for encoding/decoding a transform coefficient of a current block.
  • the video encoding/decoding method and apparatus may generate a candidate list of a current block, and perform inter prediction of the current block by using any one of a plurality of candidates belonging to the candidate list.
  • the plurality of candidates include at least one of a spatial candidate, a temporal candidate, or a reconstruction information-based candidate, and the reconstruction information-based candidate is motion information decoded before the current block. It can be added from the buffer to store.
  • motion information stored in the buffer is added to the candidate list in the order of motion information stored in the buffer later, or the candidate list in the order of motion information stored in the buffer first. Can be added to
  • the order or number of motion information stored in the buffer to be added to the candidate list may be differently determined according to a prediction mode between screens of the current block.
  • the candidate list is filled using motion information stored in the buffer until the maximum number of candidates of the candidate list is reached, or 1 is selected from the maximum number of candidates. It can be filled using the motion information stored in the buffer until it reaches the subtracted number.
  • the buffer may be initialized in any one of a coding tree unit (CTU), a CTU row, a slice, or a picture.
  • CTU coding tree unit
  • the computer-readable recording medium can store a bitstream decoded by an image decoding method.
  • the image decoding method comprises generating a candidate list of a current block and using one of a plurality of candidates belonging to the candidate list, And performing prediction.
  • the plurality of candidates include at least one of a spatial candidate, a temporal candidate, or a reconstruction information-based candidate
  • the reconstruction information-based candidate is a motion decoded before the current block. It can be added from a buffer that stores information.
  • the motion information stored in the buffer is added to the candidate list in the order of motion information stored in the buffer later, or in the order of motion information stored in the buffer first. Can be added.
  • the order or number of motion information stored in the buffer added to the candidate list may be differently determined according to a prediction mode between screens of the current block.
  • the candidate list is filled with motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or 1 is subtracted from the maximum number of candidates Until the number is reached, it may be filled using motion information stored in the buffer.
  • the buffer may be initialized by any one of coding tree unit (CTU), CTU row, slice, or picture.
  • CTU coding tree unit
  • the video encoding/decoding method and apparatus may generate a candidate list of a current block, and perform inter prediction of the current block by using any one of a plurality of candidates belonging to the candidate list.
  • the plurality of candidates include a temporal sub-block temporal candidate, and the temporal sub-block temporal candidate is for deriving motion information for each sub-block of the current block.
  • the temporal sub-block temporal candidate is for deriving motion information for each sub-block of the current block.
  • As a candidate it is possible to have motion information of a target block temporally adjacent to the current block.
  • the sub-block may be an NxM block having a fixed size preset in the decoding apparatus.
  • a sub-block of the target block may be determined as a block at a position shifted by a predetermined temporal motion vector from a position of the sub-block of the current block.
  • the temporal motion vector is set using only a neighboring block at a specific position among spatial neighboring blocks of the current block, and the neighboring block at the specific position is the current block It may be the left block.
  • setting of the temporal motion vector may be performed only when the reference picture of the neighboring block at the specific location and the target picture to which the target block belongs are the same.
  • the computer-readable recording medium can store a bitstream decoded by an image decoding method.
  • the image decoding method comprises generating a candidate list of a current block and inter prediction of the current block using any one of a plurality of candidates belonging to the candidate list It may include the step of performing.
  • the plurality of candidates include sub-block temporal temporal candidates, and the sub-block temporal temporal candidates are candidates for deriving motion information for each sub-block of the current block.
  • the sub-block temporal temporal candidates are candidates for deriving motion information for each sub-block of the current block.
  • the sub-block may be an NxM block having a fixed size preset in the decoding apparatus.
  • the sub-block of the target block may be determined as a block at a position shifted by a predetermined temporal motion vector from the position of the sub-block of the current block.
  • the temporal motion vector is set using only the peripheral block at a specific position among the spatial neighboring blocks of the current block, and the peripheral block at the specific position is the left side of the current block It can be a block.
  • setting of the temporal motion vector may be performed only when the reference picture of the neighboring block at the specific location and the target picture to which the target block belongs are the same.
  • the video encoding/decoding method and apparatus constitute a merge candidate list of a current block, set any one of a plurality of merge candidates belonging to the merge candidate list as motion information of the current block, and motion information of the current block
  • a motion vector difference value (MVD) is added to a medium motion vector to derive the final motion vector of the current block, and motion compensation is performed based on the final motion vector to generate a prediction block of the current block.
  • MMD motion vector difference value
  • the merge candidate list is composed of k merge candidates, and k may be a natural number of 4, 5, 6 or more.
  • the motion information of the current block is either one of a first merge candidate or a second merge candidate belonging to the merge candidate list according to the merge candidate index information transmitted from the encoding apparatus. It can be set using.
  • the motion vector difference value is derived based on a predetermined offset vector
  • the offset vector is derived based on at least one of the length or direction of the offset vector.
  • the length of the offset vector is determined based on at least one of a distance index or a predetermined flag, and the motion vector is an integer pixel in the merge mode of the current block. It may mean information indicating whether to use precision.
  • the direction of the offset vector is determined based on a direction index, and the direction is any one of left, right, top, bottom, left, top, bottom, right, or bottom right Can mean
  • the offset vector may be corrected in consideration of a difference in POC between a reference picture of the current block and a current picture to which the current block belongs.
  • the video encoding/decoding method and apparatus uses a pre-restored region in a current picture to determine a prediction block of a current block belonging to the current picture, and encode/decode a transform block of the current block. , The current block may be reconstructed based on the prediction block and the transform block.
  • the determining of the prediction block may include determining a candidate for deriving motion information of the current block, and a candidate list of the current block based on the candidate And determining motion information of the current block from the candidate list.
  • the candidate may refer to motion information of neighboring blocks spatially adjacent to the current block.
  • the prediction block may be limited to belong to the same coding tree unit (CTU) or CTU row as the current block.
  • CTU coding tree unit
  • motion information of the neighboring block may be selectively added to the candidate list based on whether the size of the current block is greater than a predetermined threshold size.
  • the candidate list may further include motion information stored in a buffer of the encoding/decoding apparatus.
  • the current block is divided into a plurality of sub-blocks, and encoding/decoding the transform block encodes sub-block information for the sub-block of the current block.
  • encoding/decoding the transform block encodes sub-block information for the sub-block of the current block.
  • the step of /decoding and the sub-block information if there is at least one non-zero coefficient in the sub-block, 0 or more coefficient information, 1 or more coefficient information, Parity information or 3 for the current coefficient in the sub-block And encoding/decoding at least one of the excess coefficient information.
  • the number information for the sub-block is encoded/decoded, and the number information may mean the maximum number of coefficient information allowed for the sub-block.
  • the coefficient information may include at least one of the 0 excess coefficient information, the 1 excess coefficient information, the parity information, or the 3 excess coefficient information.
  • the number information is each time at least one of the zero excess coefficient information, the one excess coefficient information, the parity information, or the three excess coefficient information is respectively encoded/decoded. It can be increased/decreased by 1.
  • prediction information can be improved by efficiently deriving motion information used when generating a MERGE/AMVP candidate list.
  • the present invention can improve coding efficiency by selecting a motion vector predictor using the reconstructed motion information around the current block and efficiently transmitting the motion information.
  • FIG. 1 is a flowchart briefly showing an image encoding apparatus.
  • FIG. 2 is a view for explaining in detail the prediction unit of the video encoding apparatus.
  • 3 is a diagram for explaining a method for deriving candidate motion information in SKIP and MERGE modes.
  • FIG. 4 is a flowchart showing a method of deriving candidate motion information in the AMVP mode.
  • FIG. 5 is a flowchart illustrating a method of encoding prediction information.
  • FIG. 6 is a flowchart briefly illustrating an image decoding apparatus.
  • FIG. 7 is a view for explaining a prediction unit of an image decoding apparatus.
  • FIG. 8 is a flowchart illustrating a method of decoding prediction information.
  • FIG. 9 is a flowchart illustrating a method of configuring a MERGE/AMVP candidate list according to the present embodiment.
  • FIG. 10 is a view for explaining a method of deriving temporal candidate motion information according to the present embodiment.
  • FIG. 11 is a diagram for explaining a first method of determining a target block in a target picture when deriving temporal candidate motion information according to the present embodiment.
  • FIG. 12 is a diagram for describing a second method of determining a target block in a target picture when deriving temporal candidate motion information according to the present embodiment.
  • FIG. 13 is a diagram for explaining a third method of determining a target block in a target picture when deriving temporal candidate motion information according to the present embodiment.
  • FIG. 14 is a diagram for explaining a first method for deriving history-based candidate motion information according to the present embodiment.
  • 15 is a view for explaining a second method for deriving the history-based candidate motion information according to the present embodiment.
  • 16 is a diagram for describing a first method of deriving average candidate motion information according to the present embodiment.
  • 17 is a diagram for describing a second method of deriving average candidate motion information according to the present embodiment.
  • 18 is an exemplary diagram for explaining a method of predicting MVD information.
  • 19 is an exemplary table for explaining a method of constructing a Merge/AMVP candidate list for a motion vector according to an embodiment of the present invention.
  • 20 is an exemplary table for explaining a method of configuring a Merge/AMVP candidate list for MVD according to an embodiment of the present invention.
  • 21 is a flowchart illustrating a flow of encoding prediction information including MVD candidate motion information according to an embodiment of the present invention.
  • FIG. 22 is a flowchart illustrating a flow of decoding prediction information including MVD candidate motion information according to an embodiment of the present invention.
  • FIG. 23 is a flowchart illustrating a flow of encoding prediction information including additional MVD information according to an embodiment of the present invention.
  • 24 is a flowchart illustrating a flow of decoding prediction information including additional MVD information according to an embodiment of the present invention.
  • 25 is a table showing a configuration example of a reference picture set according to an embodiment of the present invention.
  • 26 is a table for explaining a method of adaptively determining the inter-picture prediction direction and binarization of reference picture index information according to a configuration state of a reference picture set according to an embodiment of the present invention.
  • 27 is a table showing initial occurrence probability information of MPS and LPS according to the context of the bin when transmitting the bin of the inter prediction direction information according to an embodiment of the present invention.
  • FIG. 28 is a diagram illustrating a rule for updating the probability of occurrence of LPS according to an embodiment of the present invention.
  • 29 is a block diagram showing an intra prediction unit of the video encoding apparatus.
  • FIG. 30 is a block diagram showing an inter-screen prediction unit of the video encoding apparatus.
  • 31 is a method of encoding prediction mode information.
  • 33 shows an inter-screen prediction unit of the video decoding apparatus.
  • 34 is a method of decoding prediction mode information.
  • 35 is a flowchart illustrating a method of encoding a transform block.
  • 36 is a flowchart illustrating a method of decoding a transform block.
  • FIG. 37 is a flowchart illustrating a context-adaptive binary arithmetic coding method.
  • 38 is a flowchart illustrating a context-adaptive binary arithmetic decoding method.
  • 39 is a diagram illustrating an example in which probability information is differently applied according to information of neighboring coefficients.
  • 40 is a diagram illustrating an example in which probability information is differently applied according to information of neighboring coefficients.
  • 41 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 42 illustrates a method of generating a prediction block using block copy prediction in a screen according to an embodiment of the present invention.
  • FIG. 43 illustrates a method of generating a prediction block using block copy prediction in a screen according to an embodiment of the present invention.
  • 44 illustrates a method of generating a prediction block using block copy prediction in a picture according to an embodiment of the present invention.
  • 45 illustrates a method of generating a prediction block using block copy prediction in a screen according to an embodiment of the present invention.
  • 46 illustrates a method of generating a prediction block using block copy prediction in a screen according to an embodiment of the present invention.
  • 47 illustrates a method of generating a prediction block using block copy prediction in a screen according to an embodiment of the present invention.
  • FIG. 48 illustrates a method of generating a prediction block using block copy prediction in a screen according to an embodiment of the present invention.
  • 49 illustrates a method of generating a prediction block using intra-screen block copy prediction according to an embodiment of the present invention.
  • 50 is a block diagram illustrating an intra-screen block copy prediction unit of an image encoding apparatus according to an embodiment of the present invention.
  • 53 is a block diagram illustrating an in-screen block copy prediction unit of an image decoding apparatus according to an embodiment of the present invention.
  • 54 is a block diagram illustrating an intra-screen block copy prediction unit of an image decoding apparatus according to an embodiment of the present invention.
  • 55 is a method of decoding prediction mode information according to an embodiment of the present invention.
  • 56 is a flowchart illustrating a method of encoding quantized transform coefficients according to an embodiment of the present invention.
  • 57 is a flowchart illustrating a method of decoding quantized transform coefficients according to an embodiment of the present invention.
  • the video encoding/decoding method and apparatus may generate a candidate list of a current block, and perform inter prediction of the current block by using any one of a plurality of candidates belonging to the candidate list.
  • the plurality of candidates include at least one of a spatial candidate, a temporal candidate, or a reconstruction information-based candidate, and the reconstruction information-based candidate is motion information decoded before the current block. It can be added from the buffer to store.
  • motion information stored in the buffer is added to the candidate list in the order of motion information stored in the buffer later, or the candidate list in the order of motion information stored in the buffer first. Can be added to
  • the order or number of motion information stored in the buffer to be added to the candidate list may be differently determined according to a prediction mode between screens of the current block.
  • the candidate list is filled using motion information stored in the buffer until the maximum number of candidates of the candidate list is reached, or 1 is selected from the maximum number of candidates. It can be filled using the motion information stored in the buffer until it reaches the subtracted number.
  • the buffer may be initialized in any one of coding tree unit (CTU), CTU row, slice, or picture.
  • CTU coding tree unit
  • the computer-readable recording medium can store a bitstream decoded by an image decoding method.
  • the image decoding method comprises generating a candidate list of a current block and using one of a plurality of candidates belonging to the candidate list, And performing prediction.
  • the plurality of candidates include at least one of a spatial candidate, a temporal candidate, or a reconstruction information-based candidate
  • the reconstruction information-based candidate is a motion decoded before the current block. It can be added from a buffer that stores information.
  • the motion information stored in the buffer is added to the candidate list in the order of motion information stored in the buffer later, or in the order of motion information stored in the buffer first. Can be added.
  • the order or number of motion information stored in the buffer added to the candidate list may be differently determined according to a prediction mode between screens of the current block.
  • the candidate list is filled with motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or 1 is subtracted from the maximum number of candidates Until the number is reached, it may be filled using motion information stored in the buffer.
  • the buffer may be initialized by any one of coding tree unit (CTU), CTU row, slice, or picture.
  • CTU coding tree unit
  • the video encoding/decoding method and apparatus may generate a candidate list of a current block, and perform inter prediction of the current block by using any one of a plurality of candidates belonging to the candidate list.
  • the plurality of candidates include a temporal sub-block temporal candidate, and the temporal sub-block temporal candidate is for deriving motion information for each sub-block of the current block.
  • the temporal sub-block temporal candidate is for deriving motion information for each sub-block of the current block.
  • As a candidate it is possible to have motion information of a target block temporally adjacent to the current block.
  • the sub-block may be an NxM block having a fixed size preset in the decoding apparatus.
  • a sub-block of the target block may be determined as a block at a position shifted by a predetermined temporal motion vector from a position of the sub-block of the current block.
  • the temporal motion vector is set using only a neighboring block at a specific position among spatial neighboring blocks of the current block, and the neighboring block at the specific position is the current block It may be the left block.
  • setting of the temporal motion vector may be performed only when the reference picture of the neighboring block at the specific location and the target picture to which the target block belongs are the same.
  • the computer-readable recording medium can store a bitstream decoded by an image decoding method.
  • the image decoding method comprises generating a candidate list of a current block and inter prediction of the current block using any one of a plurality of candidates belonging to the candidate list It may include the step of performing.
  • the plurality of candidates include sub-block temporal temporal candidates, and the sub-block temporal temporal candidates are candidates for deriving motion information for each sub-block of the current block.
  • the sub-block temporal temporal candidates are candidates for deriving motion information for each sub-block of the current block.
  • the sub-block may be an NxM block having a fixed size preset in the decoding apparatus.
  • the sub-block of the target block may be determined as a block at a position shifted by a predetermined temporal motion vector from the position of the sub-block of the current block.
  • the temporal motion vector is set using only the peripheral block at a specific position among the spatial neighboring blocks of the current block, and the peripheral block at the specific position is the left side of the current block It can be a block.
  • the setting of the temporal motion vector can be performed only when the reference picture of the neighboring block at the specific location and the target picture to which the target block belongs are the same.
  • the video encoding/decoding method and apparatus constitute a merge candidate list of a current block, set any one of a plurality of merge candidates belonging to the merge candidate list as motion information of the current block, and motion information of the current block
  • a motion vector difference value (MVD) is added to a medium motion vector to derive the final motion vector of the current block, and motion compensation is performed based on the final motion vector to generate a prediction block of the current block.
  • MMD motion vector difference value
  • the merge candidate list is composed of k merge candidates, and k may be a natural number of 4, 5, 6 or more.
  • the motion information of the current block is either one of a first merge candidate or a second merge candidate belonging to the merge candidate list according to the merge candidate index information transmitted from the encoding apparatus. It can be set using.
  • the motion vector difference value is derived based on a predetermined offset vector
  • the offset vector is derived based on at least one of the length or direction of the offset vector.
  • the length of the offset vector is determined based on at least one of a distance index or a predetermined flag, and the motion vector is an integer pixel in the merge mode of the current block. It may mean information indicating whether to use precision.
  • the direction of the offset vector is determined based on a direction index, and the direction is any one of left, right, top, bottom, left, top, bottom, right, or bottom right Can mean
  • the offset vector may be corrected in consideration of a difference in POC between a reference picture of the current block and a current picture to which the current block belongs.
  • the video encoding/decoding method and apparatus uses a pre-restored region in a current picture to determine a prediction block of a current block belonging to the current picture, and encode/decode a transform block of the current block. , The current block may be reconstructed based on the prediction block and the transform block.
  • the determining of the prediction block may include determining a candidate for deriving motion information of the current block, and a candidate list of the current block based on the candidate And determining motion information of the current block from the candidate list.
  • the candidate may refer to motion information of neighboring blocks spatially adjacent to the current block.
  • the prediction block may be limited to belong to the same coding tree unit (CTU) or CTU row as the current block.
  • CTU coding tree unit
  • motion information of the neighboring block may be selectively added to the candidate list based on whether the size of the current block is greater than a predetermined threshold size.
  • the candidate list may further include motion information stored in a buffer of the encoding/decoding apparatus.
  • the current block is divided into a plurality of sub-blocks, and encoding/decoding the transform block encodes sub-block information for the sub-block of the current block.
  • encoding/decoding the transform block encodes sub-block information for the sub-block of the current block.
  • the step of /decoding and the sub-block information if there is at least one non-zero coefficient in the sub-block, 0 or more coefficient information, 1 or more coefficient information, Parity information or 3 for the current coefficient in the sub-block And encoding/decoding at least one of the excess coefficient information.
  • the number information for the sub-block is encoded/decoded, and the number information may mean the maximum number of coefficient information allowed for the sub-block.
  • the coefficient information may include at least one of the 0 excess coefficient information, the 1 excess coefficient information, the parity information, or the 3 excess coefficient information.
  • the number information is each time at least one of the zero excess coefficient information, the one excess coefficient information, the parity information, or the three excess coefficient information is respectively encoded/decoded. It can be increased/decreased by 1.
  • 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 other components.
  • a part of the configuration of the apparatus or a part of the method may be omitted.
  • the order of some of the components of the device or the steps of the method may be changed.
  • other configurations or other steps may be inserted in some of the configuration of the device or in some of the steps of the method.
  • each component shown in the embodiments of the present invention are shown independently to indicate different characteristic functions, and do not mean that each component is composed of separate hardware or one software component unit. That is, for convenience of description, each component is listed as each component, and at least two components of each component may be combined to form one component, or one component may be divided into a plurality of components to perform a function.
  • the integrated and separated embodiments of each of these components are also included in the scope of the present invention without departing from the essence of the present invention.
  • blocks may be variously expressed in units, regions, units, partitions, and the like, and samples may be variously expressed in pixels, pels, pixels, and the like.
  • the image encoding apparatus is an apparatus for encoding an image, and includes a block division unit, a prediction unit, a transformation unit, a quantization unit, an entropy encoding unit, an inverse quantization unit, an inverse transformation unit, an addition unit, an in-loop filter unit, a memory unit, and a subtraction unit. can do.
  • the block dividing unit 101 divides blocks from a maximum sized block (hereinafter referred to as a maximum coding block) to a minimum sized block (hereinafter referred to as a minimum coding block).
  • a maximum sized block hereinafter referred to as a maximum coding block
  • a minimum sized block hereinafter referred to as a minimum coding block.
  • Quad-tree splitting (hereinafter referred to as QT (Quad-Tree) splitting) is a split that accurately divides the current coding block.
  • Binary-tree partitioning hereinafter, referred to as BT (Binary-Tree) partitioning
  • a ternary-tree split is a split that divides an encoded block into either a horizontal or vertical direction.
  • the ratio of the height of the divided block may be ⁇ 1:n:1 ⁇ .
  • the ratio of the width of the divided block may be ⁇ 1:n:1 ⁇ .
  • n may be 1, 2, 3, or more natural numbers.
  • partitioning methods there may be various partitioning methods.
  • the prediction unit 102 generates a prediction block using neighboring pixels of a block to be currently predicted (hereinafter referred to as a prediction block) from a current original block or pixels in a reference picture that has been previously encoded/decoded.
  • the prediction block may generate one or more prediction blocks in the coding block.
  • the prediction block has the same form as the coding block.
  • the prediction technique of a video signal is largely composed of intra-screen prediction and inter-screen prediction.
  • In-screen prediction is a method of generating a prediction block using surrounding pixels of a current block, and inter-screen prediction has been previously encoded/decoded. This is a method of finding a block most similar to the current block in the finished reference picture and generating a predictive block.
  • the optimal prediction mode of the prediction block is determined by using various techniques such as rate-distortion optimization (RDO) of the residual block minus the original block and the prediction block.
  • RDO cost calculation equation is as shown in Equation 1.
  • D, R, and J are deterioration by quantization, rate of compressed stream, and RD cost
  • is the encoding mode
  • is the Lagrangian multiplier, which is a scale correction factor to match the unit between the amount of error and the amount of bit. use.
  • J when the corresponding mode is applied that is, the RD-cost value must be smaller than when other modes are applied.
  • bit rate and error are considered simultaneously. To calculate.
  • the intra prediction unit may generate a prediction block based on reference pixel information around the current block, which is pixel information in the current picture.
  • the prediction mode of the neighboring block of the current block to which the intra prediction is to be performed is inter prediction prediction
  • the reference pixel included in the neighboring block to which the inter prediction prediction is applied is referred to as a reference pixel in another block around the intra prediction is applied.
  • the prediction mode may have a directional prediction mode that uses reference pixel information according to a prediction direction and a non-directional mode that does not use 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 prediction prediction mode information or the predicted luminance signal information used in the screen used to predict the luminance information may be used to predict the color difference information. have.
  • the intra prediction unit may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter.
  • AIS filter is a filter that performs filtering on the reference pixel of the current block and can adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. When 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 interpolation unit of the on-screen prediction unit interpolates the reference pixel and the reference pixel at a fractional unit position when the intra-prediction prediction mode of the prediction unit is a prediction unit that performs intra-prediction prediction based on the pixel value interpolated with the reference pixel Can generate If the prediction mode of the current prediction unit is a prediction mode in which a prediction block is generated without interpolating a reference pixel, the reference pixel may not be interpolated.
  • the DC filter may generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the inter-screen prediction unit (not shown) generates a prediction block using pre-restored reference images and motion information stored in the memory 110.
  • the motion information may include, for example, a motion vector, a reference picture index, a list 1 prediction flag, a list 0 prediction flag, and the like.
  • the inter-screen prediction unit may derive a prediction block based on information of at least one of a previous picture or a subsequent picture of the current picture.
  • a prediction block of a current block may be derived based on information of some regions in which encoding in a current picture is completed.
  • the inter-screen prediction unit according to an embodiment of the present invention may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
  • the reference picture interpolator may receive reference picture information from the memory 110 and generate pixel information of an integer pixel or less in the reference picture.
  • a DCT-based 8-tap interpolation filter (DCT-based 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 (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 prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit.
  • various methods such as Full Search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) can be used.
  • the motion vector may have a motion vector value in units of 1/2 or 1/4 pixels based on the interpolated pixels.
  • the motion prediction unit may predict a prediction block of a current block by differently using a motion prediction method.
  • Various methods such as a skip mode, a merge mode, and an advanced motion vector prediction (AMVP) mode may be used as a motion prediction method.
  • AMVP advanced motion vector prediction
  • FIG. 2 is a flowchart illustrating a flow in the prediction unit of the video encoding apparatus.
  • the optimal intra prediction mode for each prediction mode is determined using an RD-cost value (202), and a prediction block is generated.
  • RD-cost values are calculated for the SKIP mode, the MERGE mode, and the AMVP mode.
  • the MERGE candidate search unit 204 configures a SKIP mode and a set of candidate motion information for the MERGE mode.
  • optimal motion information is determined using an RD-cost value (205).
  • the AMVP candidate search unit 206 configures a candidate motion information set for the AMVP mode.
  • Motion estimation is performed using the corresponding candidate motion information sets (207), and optimal motion information is determined.
  • Motion compensation is performed using the optimal motion information determined in each mode (208) to generate a prediction block.
  • the above-described inter-screen prediction may be composed of three modes (SKIP mode, MERGE mode, and AMVP mode).
  • Each prediction mode may obtain a prediction block of a current block using motion information (prediction direction information, reference picture information, motion vector), and there may be an additional prediction mode using motion information.
  • the SKIP mode determines optimal prediction information using motion information of an already restored region.
  • a motion information candidate group is constructed in the reconstructed region, and among the candidate groups, a candidate having the smallest RD-cost value is used as prediction information to generate a prediction block.
  • a method of configuring the motion information candidate group is described in the MERGE mode described below. Since it is the same as the method of configuring the motion information candidate group, it is omitted in this description.
  • the MERGE mode is the same as the SKIP mode in that optimal prediction information is determined using motion information of an already restored region.
  • the SKIP mode differs in that the motion information that causes the prediction error to be 0 is searched for in the motion information candidate group, and the MERGE mode searches the motion information candidate group for which the prediction error is not 0.
  • a motion information candidate group is configured in the reconstructed region, and among the candidate groups, a candidate having a minimum RD-cost value is used as prediction information to generate a prediction block.
  • 3, 301 shows a method of generating candidate motion information groups in the SKIP mode and the MERGE mode.
  • the maximum number of motion information candidate groups may be determined in the same manner by the video encoding device and the video decoding device, and transmitted from the upper end of the block, such as the upper header of the video encoding device (eg, the upper header, video parameter stage, sequence parameter stage, picture parameter stage)
  • the corresponding number information may be previously transmitted in the meaning of the parameters.
  • steps S305 and S306 only when the spatial candidate block and the temporal candidate block are encoded in the inter prediction mode, motion information derived using the corresponding motion information is included in the motion information candidate group.
  • step S305 four candidates are selected from among five spatial candidate blocks around the current block in the same picture.
  • the location of the spatial candidate is referred to 302 in FIG. 3, and the location of each candidate can be changed to any block in the reconstructed region.
  • Spatial candidates are considered in order of A 1 , A 2 , A 3 , A 4 , and A 5 , and first, motion information of usable spatial candidate blocks is determined as spatial candidates. However, this is only an example of priority, and the priority may be in the order of A 2 , A 1 , A 3 , A 4 , A 5 , or A 2 , A 1 , A 4 , A 3 , A 5 .
  • step S306 one candidate among two temporal candidate blocks is selected.
  • the location of the temporal candidate is referred to 302 of FIG. 3, and the location of each candidate is determined based on a block of the same location as the current block location of the current picture in the collocated picture.
  • the collocated picture can be set under the same conditions in the video encoding device and the video decoding device in the reconstructed picture.
  • the temporal candidates are considered in the order of B 1 and B 2 blocks, and motion information of the available candidate block is first determined as a temporal candidate.
  • the candidate block (B 1 , B 2 ) motion information in the collocated picture points to the prediction block in the reference picture B. (However, the reference pictures of each candidate block may be different from each other. For convenience, this is referred to as reference picture B).
  • the motion vector of the candidate block is scaled by the corresponding ratio to determine the motion vector of temporal candidate motion information. Equation 2 means a scaling equation.
  • MV is a motion vector of temporal candidate block motion information
  • MV scale is a scaled motion vector
  • TB is a temporal distance between a collocated picture and reference picture B
  • TD is a temporal distance between a current picture and a reference picture A.
  • the reference pictures A and B may be the same reference picture.
  • the scaled motion vector is determined as the motion vector of the temporal candidate
  • the reference picture information of the temporal candidate motion information is determined as the reference picture of the current picture to derive the motion information of the temporal candidate.
  • Steps S307 are performed only when the maximum number of motion information candidate groups is not satisfied in steps S305 and S306, and a new bidirectional motion information candidate group is added with a combination of motion information candidates derived in the previous step.
  • the bidirectional motion information candidate is obtained by combining the motion information of the past or future direction derived one by one and combining them as a new candidate.
  • Table 304 of FIG. 3 shows the priority of the bidirectional motion information candidate combination. In addition to the combinations of this table, additional combinations may appear, and this table shows one example. If the maximum number of motion information candidate groups is not satisfied even when using the bidirectional motion information candidate, step S307 is performed. In step S308, the motion vector of the motion information candidate is fixed to the zero motion vector, and the reference picture according to the prediction direction is varied to fill the maximum number of motion information candidate groups.
  • the AMVP mode determines the optimal motion information through motion estimation for each reference picture according to the prediction direction.
  • the prediction direction may be unidirectional using only one direction of the past/future, or it may be bidirectional using both the past and future directions.
  • Motion compensation is performed using the optimal motion information determined through motion estimation to generate a prediction block.
  • a candidate motion information group for motion estimation is derived for each reference picture according to the prediction direction.
  • the candidate motion information group is used as a starting point for motion estimation. 4 for a method of deriving a candidate motion information group for motion estimation in the AMVP mode.
  • the maximum number of motion information candidate groups may be determined in the same manner by the video encoding apparatus and the video decoding apparatus, or the corresponding number information may be previously transmitted from the upper header of the video encoding apparatus.
  • steps S401 and S402 only when the spatial candidate block and the temporal candidate block are encoded in the inter prediction mode, motion information derived using the corresponding motion information is included in the motion information candidate group.
  • step S401 unlike the description of step S305, the number (two) derived as the spatial candidate may be different, and the priority for selecting the spatial candidate may also be different. The rest of the explanation is the same as that of step S305.
  • Step S402 is the same as the description of step S306.
  • Step S403 if there is overlapping motion information among candidates derived so far, it is removed.
  • Step S404 is the same as the description of step S308.
  • the motion information candidate having the smallest RD-cost value is selected as the optimum motion information candidate, and then the motion estimation process is performed based on the motion information to obtain the optimum motion information in the AMVP mode.
  • the transform unit 103 generates a transform block by transforming a residual block that is a difference between the original block and the predictive block.
  • the transform block is the smallest unit used for transform and quantization processes.
  • the transform unit converts the residual signal into the frequency domain to generate a transform block having a transform coefficient.
  • various transform techniques such as Discrete Cosine Transform (DCT)-based transform, Discrete Sine Transform (DST), and Karhunen Loeve Transform (KLT) can be used.
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Karhunen Loeve Transform
  • the residual signal is transformed into the frequency domain to generate a transform coefficient.
  • matrix operations are performed using a basis vector.
  • a discrete cosine transform may be used in the horizontal direction and a discrete sine transform may be used in the vertical direction.
  • the quantization unit 104 quantizes a transform block to generate a quantized transform block. That is, the quantization unit quantizes transform coefficients of a transform block generated by the transform unit 103 to generate a quantized transform block having a quantized transform coefficient.
  • a dead zone uniform threshold quantization (DZUTQ) or a quantization weighted matrix (DZUTQ) may be used as the quantization method, but various quantization methods such as improved quantization may be used.
  • the image encoding apparatus is shown and described as including a transform unit and a quantization unit, the transform unit and the quantization unit may be selectively included. That is, the image encoding apparatus may transform the residual block to generate a transform block and not perform a quantization process, and not only transform the residual block into frequency coefficients, but also perform a quantization process, and even transform and quantize processes You may not do all of them.
  • a block that enters an input of an entropy encoding unit is usually referred to as a'quantized transformation block' even if some of the transformation units and the quantization units are not performed or all of the processes are not performed.
  • the entropy encoding unit 105 encodes a quantized transform block and outputs a bitstream. That is, the entropy encoding unit encodes coefficients of the quantized transform block output from the quantization unit using various encoding techniques such as entropy encoding, and additional information necessary for decoding the block in an image decoding apparatus described later (for example, a bitstream including information about a prediction mode (information on a prediction mode may include motion information determined by a prediction unit or information on a prediction mode in a screen, etc.) and quantization coefficients are generated and output.
  • various encoding techniques such as entropy encoding, and additional information necessary for decoding the block in an image decoding apparatus described later.
  • a bitstream including information about a prediction mode information on a prediction mode may include motion information determined by a prediction unit or information on a prediction mode in a screen, etc.
  • the inverse quantization unit 106 restores the inverse quantized transform block by inversely performing a quantization technique used for quantization on the quantized transform block.
  • the inverse transform unit 107 inversely transforms the inverse quantized transform block using the same method used for transform to restore the residual block, and performs an inverse transform by performing the transform technique used by the transform unit inversely.
  • the inverse quantization unit and the inverse transformation unit may perform inverse quantization and inverse transformation using the quantization method and the transformation method used by the quantization unit and the transformation unit inversely.
  • the quantization unit and the quantization unit do not perform the transformation, only the inverse quantization may be performed and the inverse transformation may not be performed. If both the transform and the quantization are not performed, the inverse quantization unit and the inverse transform unit do not perform both inverse transform and inverse quantization or may be omitted without being included in the image encoding apparatus.
  • the adder 108 restores the current block by adding the residual signal generated by the inverse transform unit and the prediction block generated through prediction.
  • the filter unit 109 is a process of additionally filtering the entire picture after all blocks in the current picture are restored, and includes deblocking filtering, sample adaptive offset (SAO), and adaptive loop filter (ALF).
  • Deblocking filtering refers to the task of reducing block distortion that occurs while coding an image in block units.
  • Sample adaptive offset (SAO) is a method of minimizing the difference between the reconstructed image and the original image by subtracting or adding a specific value to the reconstructed pixel. Says the job.
  • ALF Adaptive Loop Filtering
  • one filter to be applied to the group may be determined to perform filtering differently for each group.
  • Information related to whether to apply the ALF may be transmitted for each coding unit (CU), and the shape and/or filter coefficient of the ALF filter to be applied may be changed according to each block. Also, the ALF filter of the same form (fixed form) may be applied regardless of the characteristics of the block to be applied.
  • the memory 110 adds the residual signal generated by the inverse transform unit and the prediction block generated through prediction, and then stores the restored current block through additional filtering in the in-loop filter unit, such as the next block or the next picture. It can be used to predict.
  • the subtraction unit 111 subtracts the prediction block from the current original block to generate a residual block.
  • step S501 operation information of the SKIP mode is encoded.
  • step S502 the operation of the SKIP mode is determined. If the SKIP mode is operated in step S502, after the MERGE candidate index information for the SKIP mode is encoded in step S507, this flow chart ends. If the SKIP mode does not operate in step S502, the prediction mode is encoded in step S503. In step S503, it is determined whether the prediction mode is inter-screen prediction or intra-screen prediction mode. If the prediction mode was the inter prediction mode in step S504, the operation information of the MERGE mode is encoded in step S505.
  • step S506 it is determined whether the MERGE mode is activated. If the MERGE mode is operated in step S506, the process proceeds to step S507, after encoding the MERGE candidate index information for the MERGE mode, the flowchart ends. If the MERGE mode does not operate in step S506, the prediction direction is encoded in step S508.
  • the prediction direction may be one of a past direction, a future direction, and two directions.
  • step S509 it is determined whether the prediction direction is the future direction or not. If the prediction direction is not the future direction in step S509, the reference picture index information of the past direction is encoded in step S510.
  • step S511 motion vector difference (MVD) information of a past direction is encoded.
  • step S512 the motion vector predictor (MVP) information of the past direction is encoded.
  • step S509 it is determined whether the prediction direction is in the future direction or in both directions, or in step S513, when the prediction direction is in the past direction. If the prediction direction is not the past direction in step S513, the future direction reference picture index information is encoded in step S514.
  • step S515 MVD information of a future direction is encoded.
  • step S516 after encoding the MVP information in the future direction, this flow chart ends. If the prediction mode was the intra prediction mode in step S504, after encoding the intra prediction mode information in step S517, the flowchart ends.
  • FIG. 6 is a block flow diagram briefly showing the configuration of the video decoding apparatus 600.
  • the image decoding apparatus 600 is an apparatus for decoding an image, and may largely include a block entropy decoding unit, an inverse-quantization unit, an inverse-transformation unit, a prediction unit, an adder unit, an in-loop filter unit, and a memory.
  • the encoding block in the image encoding apparatus is referred to as a decoding block in the image decoding apparatus.
  • the entropy decoding unit 601 interprets the bitstream transmitted from the image encoding apparatus and reads various information and quantized transform coefficients necessary for decoding the corresponding block.
  • the inverse quantization unit 602 reconstructs an inverse quantized block having an inverse quantized coefficient by inversely performing a quantization technique used for quantization on the quantization coefficient decoded by the entropy decoding unit.
  • the inverse transform unit 603 inversely transforms the inverse-quantized transform block using the same method used for transform to restore a residual block having a differential signal. Inverse transform is performed by performing the inverse transform technique used by the transform unit do.
  • the prediction unit 604 generates a prediction block using prediction mode information decoded by the entropy decoding unit, which uses the same method as the prediction method performed by the prediction unit of the image encoding apparatus.
  • the adder 605 restores the current block by adding the residual signal restored by the inverse transform unit and the prediction block generated through prediction.
  • the filter unit 606 After restoring all blocks in the current picture, the filter unit 606 performs de-blocking filtering, sample adaptive offset (SAO), and ALF as a process of performing additional filtering throughout the picture. This is the same as described in the in-loop filter section of the device.
  • the memory 607 adds the residual signal generated by the inverse transform unit and the prediction block generated through prediction, and then stores the restored current block that has undergone additional filtering in the in-loop filter unit, such as the next block or the next picture. It can be used to predict.
  • the optimal intra prediction mode information is determined (701), and intra prediction is performed (702) to generate a prediction block.
  • the prediction mode is inter-screen prediction, an optimal prediction mode among SKIP, MERGE, and AMVP modes is determined (703).
  • the MERGE candidate search unit 704 configures a SKIP mode and a set of candidate motion information for the MERGE mode.
  • optimal motion information is determined using the transmitted candidate index (e.g., merge index) (705).
  • the AMVP candidate search unit 706 configures a candidate motion information set for the AMVP mode.
  • optimal motion information is determined using the transmitted candidate index (e.g., MVP information) (707). Thereafter, motion compensation is performed using the optimal motion information determined in each mode (708) to generate a prediction block.
  • step S801 the operation information of the SKIP mode is decoded.
  • step S802 it is determined whether the SKIP mode operates. If the SKIP mode is operated in step S802, after decoding the MERGE candidate index information for the SKIP mode in step S807, the flow diagram ends. If the SKIP mode does not operate in step S802, the prediction mode is decoded in step S803. In step S803, it is determined whether the prediction mode is inter-screen prediction or intra-screen prediction mode. If the prediction mode was the inter-screen prediction mode in step S804, the operation information of the MERGE mode is decoded in step S805.
  • step S806 it is determined whether the MERGE mode is activated. If the MERGE mode is operated in step S806, the process proceeds to step S807, after decoding the MERGE candidate index information for the MERGE mode, the flowchart ends. If the MERGE mode does not operate in step S806, the prediction direction is decoded in step S808.
  • the prediction direction may be one of a past direction, a future direction, and two directions.
  • step S809 it is determined whether the prediction direction is the future direction or not. If the prediction direction is not the future direction in step S809, the reference picture index information of the past direction is decoded in step S810. In step S811, MVD (Motion Vector Difference) information of a past direction is decoded.
  • MVD Motion Vector Difference
  • step S812 the past direction MVP (Motion Vector Predictor) information is decoded.
  • step S809 it is determined whether the prediction direction is in the future direction or in both directions, or in step S813, when the prediction direction is in the past direction. If the prediction direction is not the past direction in step S813, the future direction reference picture index information is decoded in step S814.
  • step S815 the MVD information in the future direction is decoded.
  • step S816 after decoding the MVP information in the future direction, this flow chart ends. If the prediction mode was the intra prediction mode in step S804, after decoding the intra prediction mode information in step S1317, the flow diagram ends.
  • the candidate motion information is directly determined as motion information of the current block in the MERGE candidate search unit, and used as a predictor for transmitting optimal motion information of the current block in the AMVP candidate search unit.
  • FIG. 9 is a flowchart illustrating a method of deriving candidate motion information for a MERGE/AMVP mode.
  • the method for deriving the candidate motion information of the Merge mode and the AMVP mode in this flow chart is shown in the same flow chart, some candidates for each mode may not be used. Accordingly, candidate motion information derived for each mode may be different, and the number of derived candidate motion information may also be different. For example, in the Merge mode, 4 (B) candidates among 5 (A) spatial candidates can be selected, and in the AMVP mode, only 2 (B) candidates among 4 (A) spatial candidates can be selected.
  • A, B, C, and D are integers of 1 or more are the number of spatial candidates, the number of spatial candidates, the number of temporal candidates, and the number of temporal candidates, respectively.
  • step S901 is the same as the description of steps S305 and S401 described above.
  • the positions of neighboring blocks for spatial candidates may be different.
  • the neighboring block for the spatial candidate may belong to at least one of the first group, the second group, or the third group.
  • the first group includes at least one of the left block (A 1 ) or the lower left block (A 4 ) of the current block
  • the second group is the upper block (A 2 ) or the upper right block (A 3 ) of the current block.
  • the third group may include at least one of an upper left block A 5 of the current block, a block adjacent to the bottom of the upper left block, or a block adjacent to the left of the upper left block.
  • step S902 is the same as the description of steps S306 and S402 described above. Similarly, the positions of blocks for temporal candidates may be different.
  • step S903 temporal candidates for each sub-block are added.
  • a temporal candidate for each sub-block is added from the list of AMVP candidates, only one candidate motion information of one arbitrary sub-block should be used as a predictor based on the above-described AMVP mode motion vector derivation method. It can also be used as a predictor by using block candidate motion information. The contents of this step will be described in detail in Example 1 below.
  • step S904 a history-based candidate is added.
  • the contents of this step will be described in detail in Example 2 below.
  • step S905 an average candidate between candidate motion information of the Merge/AMVP list is added. The contents of this step will be described in detail in Example 3 below.
  • the candidate motion information of the Merge/AMVP list is not filled up to the maximum number, after adding zero motion information in step S906 to fill up to the maximum number, the flowchart is terminated, and the candidate motion for each mode Complete the information list configuration.
  • the candidate motion information described in this embodiment may be utilized in various prediction modes in addition to the Merge/AMVP mode. 9, the candidate list does not limit the order of added candidates. For example, temporal candidates in sub-block units may be added to the candidate list in preference to spatial candidates. Alternatively, the average candidate may be added to the candidate list in preference to the History-based candidate.
  • the candidate motion information list, the candidate motion information set, the motion information candidate group, and the candidate list may be understood to have the same meaning.
  • the temporal candidate means a block-unit temporal candidate and can be distinguished from a sub-block-unit temporal candidate.
  • the sub-block refers to a basic block unit for deriving motion information of a current block by dividing a block to be encoded or decoded (hereinafter, a current block) into a block having an arbitrary NxM (N, M ⁇ 0) size.
  • the sub-block may have a pre-set size in the encoder and/or decoder.
  • the sub-block may be a square having a fixed size, such as 4x4 or 8x8.
  • the present invention is not limited thereto, and the shape of the sub-block may be non-square, and at least one of the width and height of the sub-block may be greater than 8.
  • the temporal candidate for each sub-block may be limited to be added to the candidate list only when the current block is larger than NxM. For example, when N and M are 8 each, only a case in which the width and height of the current block is greater than 8, a temporal candidate for each sub-block may be added to the candidate list.
  • FIG. 10 is a basic conceptual diagram for explaining the present embodiment.
  • FIG. 10 shows one current (sub) block of the current picture.
  • the target (sub) block for the corresponding (sub) block is searched for in the target picture.
  • the target picture and the target (sub) block information may be transmitted in an upper header or a current block unit, respectively, and the target picture and the target (sub) block may be designated under the same conditions in the video encoding device and the video decoding device.
  • motion information of the current (sub) block is derived using the motion information of the target (sub) block.
  • each sub-block of the current block has a corresponding relationship with each sub-block of the target block.
  • the temporal candidate for each sub-block has motion information for each sub-block in the current block, and motion information of each sub-block can be derived using motion information of a sub-block having a corresponding relationship in the target block.
  • motion information of the corresponding sub-block may be set as default motion information.
  • the default motion information may mean motion information of neighboring sub-blocks adjacent to the corresponding sub-block in a horizontal direction or a vertical direction.
  • the default motion information may mean motion information of a sub-block including a central sample of the target block.
  • the default motion information may mean motion information of a sub-block including any one of n corner samples of the target block.
  • n can be 1, 2, 3, or 4.
  • a sub block having available motion information is searched according to a predetermined priority order, and motion information of the first searched sub block is defaulted. It can also be set as motion information.
  • the motion vector of the motion information may mean a motion vector that has been scaled.
  • the temporal distance between the target picture and the reference picture of the target (sub) block is TD, and the temporal distance between the current picture and the reference picture of the current (sub) block is set to TB.
  • (MV) is scaled.
  • the scaled motion vector (MV scale ) is used to point the prediction (sub) block of the current (sub) block within the reference picture, or may be used as a motion vector of a temporal candidate or a sub-block temporal candidate of the current (sub) block. Can be.
  • the variable MV used in Equation 2 means the motion vector of the target (sub) block
  • the MV scale means the scaled motion vector of the current (sub) block.
  • the reference picture information of the current (sub) block may be designated under the same conditions as the video encoding device and the video decoding device, and it is also possible to transmit the reference picture information of the current (sub) block in units of the current (sub) block. .
  • the target (sub) block of the current (sub) block can be indicated using one of the candidate motion information in the Merge/AMVP candidate list. More specifically, after determining the prediction mode of the candidate motion information in the candidate list, priority may be given to the prediction mode. For example, by prioritizing in the order of AMVP mode, MERGE mode, and SKIP mode, one of the motion information in the candidate list can be selected to indicate the target (sub) block.
  • the first candidate motion information in the candidate list may be unconditionally selected to indicate a target (sub) block.
  • various priority conditions can be used, such as selecting in the order of highest priority on the candidate list.
  • the candidate motion information may be excluded.
  • the target (sub) block in the target picture corresponding to the same position as the current (sub) block may be determined.
  • the target (sub) block may be determined as a block at a position shifted by a predetermined temporal motion vector (temporal MV) from the position of the current (sub) block.
  • the temporal motion vector may be set as a motion vector of neighboring blocks spatially adjacent to the current block.
  • the neighboring block may be any one of the left, top, bottom left, top right, or top left blocks of the current block.
  • the temporal motion vector may be derived by using only a peripheral block at a fixed position pre-promised in the encoding/decoding device.
  • the peripheral block in the fixed position may be the left block A1 of the current block.
  • the peripheral block in the fixed position may be the upper block A2 of the current block.
  • the peripheral block in the fixed position may be the lower left block A3 of the current block.
  • the peripheral block in the fixed position may be the upper right block A4 of the current block.
  • the peripheral block in the fixed position may be the upper left block A5 of the current block.
  • the setting may be performed only when the reference picture and the target picture of the neighboring block are the same (for example, when the POC difference between the reference picture and the target picture is 0).
  • the temporal motion vector may be set to (0,0).
  • the set temporal motion vector may be rounded based on at least one of a predetermined offset or shift value.
  • the offset is derived based on the shift value
  • the shift value may include at least one of a right shift value (rightShift) or a left shift value (leftShift).
  • the shift value may be an integer preset in the encoding/decoding device. For example, rightShift may be set to 4 and leftShift may be set to 0, respectively.
  • rounding of a temporal motion vector may be performed as shown in Equation 3 below.
  • the first is to store and store motion information in 4x4 sub-block units within a picture that has already been coded (here, the 4x4 sub-block unit boundaries for storing motion information and the target (sub) block boundaries in the target picture coincide) )
  • the second is that the size of the sub-block in the current block is 4x4.
  • the size of the aforementioned blocks can be variously determined.
  • the target point indicated in the target picture using the motion information in the target (sub) block position in the current (sub) block or the target (sub) block in the Merge/AMVP candidate list of the current (sub) block may not correspond to each 4x4 sub-block unit in which motion information is stored in the target picture.
  • the coordinates of the top left pixel of the current (sub) block are (12, 12), but the top left coordinate of the target (sub) block may be (8, 8), such a mismatch may occur. This is an unavoidable phenomenon that occurs because the block division structure of the target picture is different from the current picture.
  • FIG. 11 is an exemplary diagram for explaining a method of determining a target block when deriving temporal candidate motion information in a current block unit rather than a sub-block unit.
  • the motion information of the target sub-block is derived from the scaled motion vector of the current block. It can be used to do this, but if it refers to a plurality of 4x4 target sub-blocks, it can also be used to derive the scaled motion vector of the current block by using the average motion information of each target sub-block.
  • the target point may use two target positions of the current block center area, as in the example of FIG. 11, but it can be used anywhere other than the pixel position within the current block. Of course, there may be two or more motion information for calculating the average motion information.
  • a plurality of scaled motion vectors may be derived using each of the plurality of target sub-blocks, and then a plurality of prediction blocks may be generated to weight the corresponding prediction blocks to generate a final prediction block.
  • 12 and 13 are exemplary views for explaining a method of determining a target block when deriving temporal candidate motion information in units of sub-blocks in a current block.
  • 12 is an exemplary diagram in a case where one reference position is in sub-block units
  • FIG. 13 is an exemplary diagram when a plurality of reference positions are used in sub-block units.
  • the reference position in units of sub blocks is illustrated as the position of the upper left pixel of the sub block.
  • the target position of the target picture is determined through the motion vector indicating the target position in the reference coordinates of the sub-block, and when the motion information of the 4x4 target sub-block including the target position is derived to derive the scaled motion vector of the current sub-block. Can be used.
  • FIG. 13 is an exemplary view for explaining a method of deriving a scaled motion vector using a plurality of target sub-blocks for each current sub-block.
  • the target position in the target picture is determined based on a plurality of reference coordinates in sub-block D.
  • the scaled motion vector of the current sub-block can be derived using the motion information of the target sub-block, but as illustrated in FIG. 13, target locations have different target sub-blocks.
  • the average motion information of each target sub-block may be calculated to derive a scaled motion vector of the current sub-block.
  • a prediction sub-block may be respectively generated, and a final prediction block may be generated by weighting each prediction sub-block.
  • Other sub-blocks in the current block (sub-blocks A, B, and C) can also generate a predictive sub-block in the manner described above.
  • the history-based candidate (hereinafter referred to as a'recovery information-based candidate') is a sequence, picture, or slice unit, and a motion information-based motion candidate storage buffer (hereinafter,'for storing motion information encoded/decoded before the current block).
  • H buffer' The buffer manages the coded motion information by updating the buffer in a FIFO (First-in First-out) method.
  • the H buffer may be initialized in units of CTU, CTU rows, slices, or pictures, and when the current block is predicted and coded by motion information, corresponding motion information is updated to the H buffer.
  • the motion information stored in the H buffer may be used as a Merge/AMVP candidate in step S904 of FIG. 9.
  • the candidate motion information of the H buffer is added to the candidate list, the most recently updated motion information may be added to the H buffer, and vice versa.
  • it may be determined in which order the motion information of the H buffer is extracted and added to the candidate list.
  • motion information of the H buffer may be added to the candidate list.
  • redundancy check may be performed on a part of the merge candidate of the candidate list and a part of the motion information of the H buffer.
  • a part of the candidate list may include a left block and an upper block among spatial merge candidates.
  • the present invention is not limited thereto, and may be limited to any one of the spatial merge candidates, and may further include at least one of a lower left block, an upper right block, an upper left block, or a temporal merge candidate.
  • a part of the H buffer may mean m pieces of motion information most recently added to the H buffer.
  • m is 1, 2, 3 or more, and may be a fixed value pre-promised in the encoding/decoding device. It is assumed that 5 motion information is stored in the H buffer, and 1 to 5 indexes are allocated to each motion information. The larger the index, the later the stored motion information. At this time, redundancy between motion information having indexes 5, 4, and 3 and merge candidates of the candidate list may be checked. Alternatively, redundancy between motion information having indexes 5 and 4 and merge candidates of the candidate list may be checked. Alternatively, the redundancy between the motion information having the indexes 4 and 3 and the merge candidate of the candidate list may be checked, except for the motion information of the index 5 added last.
  • the motion information of the H buffer may not be added to the candidate list.
  • the motion information of the H buffer can be added to the last position of the candidate list.
  • the motion information stored in the H buffer may be added to the candidate list in the order of the recently stored motion information (that is, from the largest index to the smallest index).
  • the motion information (motion information having the largest index) stored last in the H buffer may be restricted so that it is not added to the candidate list.
  • the motion information (especially motion vector) stored first in the H buffer may be added to the candidate list in order. That is, among the motion information stored in the H buffer, motion information having a small index may be added to a candidate list before motion information having a large index.
  • the motion vector stored in the H buffer may be added to the candidate list in the same way, or the motion vector to which the above-described rounding process is applied may be added to the candidate list.
  • Rounding is to adjust the accuracy of candidate motion information so as to correspond to the accuracy of the motion vector of the current block.
  • mvX R may mean a motion vector to which a rounding process is applied
  • mvX may mean a motion vector stored in an H buffer.
  • at least one of the shift value rightShift or leftShift may be determined in consideration of the accuracy (or resolution) of the motion vector. For example, when the accuracy of the motion vector is 1/4 sample, the shift value may be determined as 2, and in the case of 1/2 sample, the shift value may be determined as 3. When the accuracy of the motion vector is 1 sample, the shift value may be determined as 4, and in the case of 4 samples, the shift value may be determined as 6.
  • RightShift and leftShift can be set to the same value.
  • the number of motion information that can be added may be limited. For example, although the maximum number of candidates in the Merge/AMVP candidate list may be filled using motion information in the H buffer, only (maximum number of candidates-1) may be filled.
  • the number of candidate motion information stored in the H buffer may be determined under the same conditions in the video encoding device and the video decoding device, or may be transmitted from the upper header to the video decoding device.
  • n may be an integer of 1, 2, or more.
  • the maximum number of candidates is determined by a fixed number (for example, 5, 6, 7, 8) pre-defined in the encoding/decoding device, or in signaled information to indicate the maximum number of candidates It may be determined variably on the basis of.
  • the maximum number of candidates may be filled using motion information of the H buffer.
  • the maximum number of candidates in the AMVP candidate list may be 2, 3, 4, or more.
  • the maximum number of candidates may not be variable.
  • the H buffer updates motion information in the coding order of blocks in the first CTU row. From the second CTU row, it is the same to update the motion information in the coding order of the block, but the H buffer may be updated by further considering motion information stored in reconstructed blocks adjacent to the current CTU row in the upper CTU.
  • mi in CTU is an abbreviation for Motion Information, and is reconstructed motion information stored in the bottom blocks in the remaining CTU lines except the last CTU line.
  • P is an integer greater than or equal to 1
  • motion information may be updated in the H buffer, and the update method may vary according to the unit in which the H buffer is initialized.
  • each CTU in the second CTU row can initialize the H buffer using mi before starting coding.
  • the meaning of initialization means that any motion information is updated again in the completely empty H buffer.
  • the H buffer can be initialized using the lower 4 mi of CTU 3 .
  • the order of updating mi can also be determined in various ways. You can update from the mi on the left now, or vice versa.
  • the H buffer may be emptied for each initialization unit to initialize. Meanwhile, if the most recently encoded/decoded motion information is the same as the motion information pre-stored in the H buffer, the most recent motion information may not be added to the H buffer. Alternatively, the same motion information as the most recent motion information may be removed from the H buffer, and the most recent motion information may be stored in the H buffer. At this time, the most recent motion information may be stored in the last position of the H buffer.
  • This buffer is a buffer (hereinafter referred to as a'V buffer') that stores the reconstructed motion information of the upper CTU (hereinafter referred to as'Vmi').
  • This V buffer may be available when the aforementioned H buffer is initialized in units of CTU rows or slices, and the V buffer may be initialized in units of CTU rows.
  • Vmi in the V buffer must be updated for the lower CTU line.
  • up to Q Q is an integer of 1 or more
  • motion information can be updated in the V buffer, and motion information corresponding to Vmi can be determined in various ways.
  • Vmi may be reconstructed motion information of a block containing the center coordinate of the CTU, or may be the most recent motion information included in the H buffer when coding a block containing the center coordinate in the upper CTU. have. There may be more than one Vmi updated in one CTU, and the updated Vmi is used to update the H buffer of the lower CTU. In the remaining CTU rows except the first CTU row, Vmi stored in the V buffer of the upper CTU row is updated to the current H buffer for each CTU row. When there are multiple Vmis stored in the V buffer in the upper CTU row, the first updated motion information can be retrieved first and updated in the H buffer or vice versa.
  • the update time may be before coding each CTU, or before coding blocks that border the upper CTU in each CTU.
  • the Vmi of the upper CTU stored in the V buffer can be updated to the H buffer. Can.
  • the Vmi of the upper left CTU as well as the upper left CTU and the upper right CTU can be updated in the H buffer.
  • the above-described candidate motion information of the V buffer may be independently added to the MERGE/AMVP candidate list derivation process of FIG. 9.
  • the corresponding priority in the MERGE/AMVP candidate list can be variously determined. For example, if there is valid motion information in the V buffer after step S904, the candidate motion information may be added between steps S904 and S905.
  • step 905 of FIG. 9 will be described in detail. If there is less than one motion information filled in the Merge/AMVP candidate list through steps S901 to S904, this step is omitted. If there is more than two motion information filled in the Merge/AMVP candidate list, the average candidate motion information may be generated between each candidate to fill the candidate list.
  • the motion vector of the average candidate motion information is derived for each prediction direction (List 0 or List 1) of the motion information, and means a motion vector generated by averaging motion vectors in the same direction stored in the candidate list.
  • the reference picture information of the motion information used when averaging may be determined as the reference picture index information of the average candidate motion information.
  • the reference picture information of the motion information having a low priority may be determined as reference picture index information of the average candidate motion information.
  • the generated average candidate motion information may be used when generating another average candidate motion information. See FIG. 16 to illustrate this example.
  • the left table is a list of Merge/AMVP candidates before step S905 of FIG. 9, and the right table is a list of Merge/AMVP candidates after step S905 of FIG. Looking at the table on the left, the candidate motion information corresponding to 0 and 1 is filled in the two candidate lists. Using these two pieces of motion information, it is possible to generate average candidate motion information corresponding to number two. In the example of FIG.
  • the motion information of List 0 direction motion vector (1, 1) of candidate 0 the motion information of reference picture index 1 and the motion vector of List 0 direction of candidate 1 (3, -1), motion of reference picture index 0
  • the information is averaged to fill the motion information of candidate 2 in the List 0 direction.
  • the motion information of candidate No. 1 in which the candidate in the direction of List 1 is present is taken as it is and the motion information of candidate No. 1 in the direction of No. 2 is filled.
  • the corresponding direction is not separately derived.
  • Additional average candidate motion information may be generated using the derived average motion information of the two times.
  • the average candidate motion information of number 3 is the average candidate motion information of candidates 0 and 2
  • the average candidate motion information of number 4 is the average candidate motion information of candidates 1 and 2.
  • the method for generating the average candidate motion information is as described above.
  • Duplicate candidate motion information may exist in the Merge/AMVP candidate list before step S905 of FIG. 9.
  • the average candidate motion information may be used to remove such duplicate candidate motion information.
  • 17 shows this example.
  • the left and right tables are as described in FIG. 16. Looking at the table on the left, the candidate motion information for 0 and 2 is completely the same. In this case, the second candidate motion information having a low priority may be replaced with the average candidate motion information.
  • the existing candidate motion information is replaced with the average candidate motion information of 0 and 1
  • 3 is the average candidate motion information of 0 and 2
  • 4 is the candidate using the average candidate motion information of 1 and 2
  • the list is filled.
  • the number of Merge/AMVP candidate lists that can be filled using the average candidate motion information may also be limited. For example, it is possible to fill up to the maximum number of candidates in the Merge/AMVP candidate list using the average candidate motion information, but only up to (the maximum number of candidate lists-1).
  • three or more candidate motion information may be used when calculating the average candidate motion information, and median information, not information obtained by averaging three or more candidate motion information, may be determined as the average candidate motion information.
  • the motion vector difference (MVD in FIGS. 5 and 8) information obtained by differentiating the motion vector of the current block determined by the video encoding device from the motion vector predictor (MVP in FIGS. 5 and 8) information is a video decoding device. Transfer to.
  • motion information of a selected merge candidate is set as motion information of a current block without transmission of MVD information.
  • additional MVD information is transmitted, the accuracy of motion information may be increased to improve prediction efficiency.
  • MVD information is generally known as random information that cannot find a certain pattern. However, if a specific situation is a premise, such MVD information may be changed into predictable information.
  • FIG. 18 there is a current block to be coded in the current picture. There are reconstructed blocks A to D around the current block. At this time, assuming that a specific object moves through the current block from the top to the bottom in the same acceleration motion, it can be predicted that the motion vector will increase to a certain size through blocks C, B, and the current block. Or, you can think of the same principle as doing an equal speed movement.
  • the motion vector indicating the point where the MVD of the block is added to the motion vector of the neighboring block is the optimal motion information in the current block. It is likely to be determined.
  • the optimal motion vector of block B is determined and then the motion vector of block C (ie, block) B's MVP) If the calm MVD information and the current block use the block B motion vector as the MVP, and the current block's optimal motion vector and the block B MVP's MVD information are very similar, use this to make the motion information more efficient. Will be able to code Looking at the MERGE mode point of view, it will be possible to perform more efficient coding by additionally transmitting MVD information.
  • 19 is an exemplary table of candidate lists of the MERGE candidate search unit and the AMVP candidate search unit in the prediction unit in the video encoding device and the video decoding device.
  • the left table of FIG. 19 is a list of Merge/AMVP candidates that may appear after completing step S307 of FIG. 3 or step S403 of FIG. 4.
  • the table on the right is a candidate list after generating a new motion candidate using motion information whose MVD is not (0, 0) among motion candidates already present in the Merge/AMVP candidate list.
  • the new candidate motion information is generated and filled in the candidate list by adding the motion vector and MVD of the motion information whose MVD is not (0, 0). If at least one candidate motion information that is a bi-directional prediction is not MVD (0, 0), new candidate motion information may be generated by the aforementioned method.
  • motion information can be coded using the flowcharts of FIGS. 5 and 8 described above.
  • a motion vector combining the motion vector in the Merge/AMVP candidate list and the MVD may be determined as the final candidate motion vector.
  • the candidate motion vector is compared with the motion vector in the current candidate motion information.
  • Information indicating that the MVD has been added may be additionally transmitted.
  • the left table of FIG. 20 is an example table in which the Merge/AMVP candidate list for a motion vector is completed, and the right table is an MVD Merge/AMVP candidate list created using MVD information in the Merge/AMVP candidate list for a motion vector.
  • the MVD in the right table was determined using the MVD in the candidate motion information of 0 and 1 in the left table, and the MVD in the right table was determined using the MVD in the 4 and 5 candidate motion information. .
  • the video encoding apparatus and the video decoding apparatus may add another candidate MVD information to the MVD Merge/AMVP candidate list using the reconstructed motion information.
  • MVD information may be additionally transmitted in the Merge mode or may be merged without transmitting the MVD information in the AMVP mode. 21 and 22 for detailed motion information encoding/decoding flows.
  • step S2108 operation information indicating whether to perform MVD merge is encoded.
  • MVD Merge may mean that a final motion vector is derived by adding a predetermined MVD to a motion vector reconstructed through a MERGE mode or AMVP mode.
  • step S2109 it is determined whether the corresponding motion information is true or false, and if the motion information is false, the flow chart is terminated. If the motion information is true, the MVD information in the candidate list for MVD Merge is added to the current motion vector.
  • Step S2111 to S2113 are the same as the description of steps S508 to S510 in FIG. 5.
  • step S2114 motion information for determining whether to transmit the MVD in the past direction is encoded.
  • step S2115 it is determined whether the corresponding operation information is true or false, and if true, the process goes to step S2116, and if false, the process goes to step S2117.
  • the description of steps S2116 and S2117 is the same as the description of steps S511 and S512 of FIG. 5.
  • step S2118 candidate index information indicating the MVD of the motion information in the past direction is encoded in the MVD AMVP candidate list.
  • step S2121 motion information for determining whether to transmit the MVD in the future direction is encoded.
  • step S2122 it is determined whether the corresponding operation information is true or false, and if true, the process goes to step S2123, and if false, the process goes to step S2124.
  • step S2125 candidate index information indicating MVD of motion information in the future direction is encoded in the MVD AMVP candidate list, and the flow chart ends.
  • the description of step S2126 is the same as the description of step S517.
  • step S2208 operation information indicating whether to perform MVD merge or not is decoded.
  • MVD Merge may mean that a final motion vector is derived by adding a predetermined MVD to a motion vector reconstructed through a MERGE mode or AMVP mode.
  • step S2209 it is determined whether the corresponding motion information is true or false, and if the motion information is false, the flowchart is terminated. If the motion information is true, the MVD information in the candidate list of MVD merge is added to the current motion vector.
  • Step S2211 to S2213 are the same as the description of steps S808 to S810 in FIG. 8.
  • step S2214 operation information for determining whether to transmit the MVD in the past direction is decoded.
  • step S2215 it is determined whether the corresponding operation information is true or false, and if true, the process goes to step S2216, and if false, the process goes to step S2217.
  • the description of steps S2216 and S2217 is the same as the description of steps S811 and S812 of FIG. 8.
  • step S2218 candidate index information indicating the MVD of the motion information in the past direction is decoded from the MVD AMVP candidate list.
  • step S2221 operation information for determining whether to transmit the MVD in the future direction is decoded.
  • step S2222 it is determined whether the corresponding operation information is true or false, and if true, the process goes to step S2223, and if false, the process goes to step S2224.
  • step S2225 candidate index information indicating MVD of motion information in the future direction is decoded from the MVD AMVP candidate list, and the flow chart ends.
  • step S2226 is the same as the description of step S817.
  • the motion vector may be determined by adding additional MVD information to the motion vector of the motion information indicated by the Merge candidate index by transmitting additional MVD information in addition to the motion information indicated by the Merge candidate index information.
  • the candidate list for the Mege mode is composed of k merge candidates, where k may be a natural number of 4, 5, 6 or more. An index is assigned to each merge candidate, and the index has a value of 0 to (k-1).
  • the Merge candidate index information may have only a value of 0 or 1. That is, when MVD Merge is applied, motion information of the current block may be derived from either the first merge candidate or the second merge candidate belonging to the candidate list according to the Merge candidate index information.
  • Additional MVD information may be transmitted in various forms. Rather than transmitting MVD in a vector format such as (x, y), the top, bottom, left, right, bottom right diagonal, bottom left diagonal, top right diagonal, based on the motion vector indicated by the current Merge candidate index information, MVD may be expressed through direction information such as a diagonal on the top left and distance information indicating how far apart in each direction is.
  • direction information such as a diagonal on the top left and distance information indicating how far apart in each direction is.
  • the MVD of the current block can be derived based on an offset vector (offsetMV).
  • offsetMV includes at least one of MVD in the L0 direction (MVD0) or MVD in the L1 direction (MVD1), and each of MVD0 and MVD1 can be derived using an offset vector.
  • the offset vector may be determined based on the length (mvdDistance) and direction (mvdDirection) of the offset vector.
  • the offset vector (offsetMV) may be determined by Equation 4 below.
  • offsetMV[ x0 ][ y0 ][ 0] (mvdDistance[ x0 ][ y0] ⁇ 2) * mvdDirection[ x0 ][ y0 ][0]
  • offsetMV[ x0 ][ y0 ][ 1] (mvdDistance[ x0 ][ y0] ⁇ 2) * mvdDirection[ x0 ][ y0 ][1]
  • mvdDistance may be determined by considering at least one of a distance index (distance_idx) or a predetermined flag (pic_fpel_mmvd_enabled_flag).
  • the distance index (distance_idx) may mean an index coded to specify the length or distance of the MVD.
  • pic_fpel_mmvd_enabled_flag may indicate whether the motion vector uses integer pixel precision in the merge mode of the current block. For example, when pic_fpel_mmvd_enabled_flag is the first value, the merge mode of the current block uses integer pixel precision. That is, this may mean that the motion vector resolution of the current block is an integer sample (integer pel).
  • the merge mode of the current block may use decimal pixel precision.
  • the merge mode of the current block may use integer pixel precision or decimal pixel precision.
  • the merge mode of the current block may be restricted to use only a few pixel precision. Examples of decimal pixel precision may include 1/2 sample, 1/4 sample, 1/8 sample, 1/16 sample, and the like.
  • At least one of the distance index (distance_idx) or the aforementioned flag (pic_fpel_mmvd_enabled_flag) may be encoded and transmitted by the encoding device.
  • mvdDistance may be determined as shown in Table 1 below.
  • mvdDirection indicates the direction of the offset vector, and may be determined based on the direction index (direction_idx).
  • the direction may include at least one of left, right, top, bottom, top left, bottom left, top right or bottom right.
  • mvdDirection may be determined as shown in Table 2 below.
  • the direction index (direction_idx) may be encoded and transmitted by the encoding device.
  • mvdDirection[x0][y0][0] means the sign of the x component of the MVD
  • mvdDirection[x0][y0][1] can mean the sign of the y component of the MVD. If direction_idx is 0, the direction of MVD is right, when direction_idx is 1, direction of MVD is left, when direction_idx is 2, direction of MVD is downward, when direction_idx is 3, MVD The directions may be respectively determined in the upward direction.
  • the MVD may be set to be the same as the offset vector previously determined.
  • the offset vector may be corrected in consideration of a POC difference (PocDiff) between the reference picture of the current block and the current picture to which the current block belongs, and the corrected offset vector may be set to MVD.
  • the current block encodes/decodes bidirectional prediction
  • the reference picture of the current block may include a first reference picture (reference picture in the L0 direction) and a second reference picture (reference picture in the L1 direction).
  • the POC difference between the first reference picture and the current picture is referred to as PocDiff0
  • the POC difference between the second reference picture and the current picture is referred to as PocDiff1.
  • MVD0 and MVD1 of the current block may be set to be the same as an offset vector, respectively.
  • MVD0 may be set equal to the offset vector.
  • MVD1 may be derived based on a pre-set MVD0. For example, when the first and second reference pictures are long-term reference pictures, MVD1 may be derived by applying a first scaling factor to MVD0. The first scaling factor may be determined based on PocDiff0 and PocDiff1. On the other hand, if at least one of the first or second reference pictures is a short-term reference picture, MVD1 may be derived by applying a second scaling factor to MVD0.
  • the second scaling factor may be a fixed value (eg, -1/2, -1, etc.) pre-promised in the encoding/decoding device. However, the second scaling factor can be applied only when the code of PocDiff0 and the code of PocDiff1 are different. If the sign of PocDiff0 and the sign of PocDiff1 are the same, MVD1 is set to be the same as MVD0, and separate scaling may not be performed.
  • MVD1 may be set equally as an offset vector.
  • MVD0 may be derived based on a pre-set MVD1. For example, when the first and second reference pictures are long-term reference pictures, MVD0 may be derived by applying a first scaling factor to MVD1. The first scaling factor may be determined based on PocDiff0 and PocDiff1. On the other hand, if at least one of the first or second reference pictures is a short-term reference picture, MVD0 may be derived by applying a second scaling factor to MVD1.
  • the second scaling factor may be a fixed value (eg, -1/2, -1, etc.) pre-promised in the encoding/decoding device. However, the second scaling factor can be applied only when the code of PocDiff0 and the code of PocDiff1 are different. If the sign of PocDiff0 and the sign of PocDiff1 are the same, MVD0 is set to be the same as MVD1, and separate scaling may not be performed. 23 and 24 for detailed encoding and decoding flows for MVD.
  • step S2301 to S2307 is the same as the description of steps S501 to S507 of FIG. 5.
  • step S2308 motion information indicating whether to encode additional MVD information in the Skip mode or the Merge mode is encoded.
  • step S2309 it is determined whether the corresponding operation information is true or false, and if true, the present flowchart is terminated after encoding additional MVD information in step S2310, and if false, the present flowchart is immediately terminated.
  • the description of steps S2311 to S2320 is the same as the description of steps S508 to S517 of FIG. 5.
  • step S2401 to S2407 is the same as the description of steps S801 to S807 of FIG. 8.
  • step S2408 operation information indicating whether to decode additional MVD information in the skip mode or the merge mode is decoded.
  • step S2409 it is determined whether the corresponding operation information is true or false, and if true, the present flowchart is terminated after decoding the additional MVD information in step S2410, and if false, the present flowchart is immediately terminated.
  • the description of steps S2411 to S2420 is the same as the description of steps S808 to S817 of FIG. 8.
  • the prediction direction information and the reference picture index information may have different binarization methods depending on the configuration state of the reference picture set (hereinafter referred to as'RPS').
  • RPS information may be transmitted in an upper header.
  • the components of the RPS information may include the number of reference pictures for each prediction direction, the reference picture corresponding to the reference picture index, and the difference POC information between the reference picture and the current picture.
  • 25 illustrates how RPS is configured as examples of RPS information.
  • the RPS consists of reference pictures used for list 0 and list 1 directions, respectively. A method for binarizing prediction direction information and reference picture index information for each example of FIGS. 26 to 25 will be described using these examples.
  • the first step determines whether reference pictures in the list 0 and list 1 directions are stored in the RPS in the same order as the index. However, the number of reference pictures in the list 0 direction must be greater than or equal to the number of reference pictures in the list 1 direction.
  • the second step determines whether the reference pictures in the list 1 direction are all included regardless of the index order of the reference pictures of the RPS in the list 0 direction.
  • the third step determines whether the number of reference pictures in the list 0 direction is the same as the number of reference pictures in the list 1 direction.
  • the binarization method of the prediction direction information and the reference picture index information may be changed based on the above-mentioned three judgments.
  • a first RPS check As a method of binarizing the prediction direction information, a first RPS check, a bidirectional prediction restriction according to a block size, etc. may be considered. For example, if the sum of the horizontal and vertical lengths is less than or equal to a predetermined threshold length, bidirectional prediction may be limited.
  • the threshold length is a value pre-set in the encoding/decoding device, and may be 8, 12, 16, or the like.
  • binarization may be performed by assigning 1 to the bidirectional prediction, 00 to the list 0 direction, and 01 to the list 1 direction.
  • a second bin indicating whether the prediction direction is list 0 or list 1 should be coded.
  • entropy encoding/decoding using CABAC may be performed in consideration of the first RPS check. For example, when considering the first RPS check condition as the context of prediction direction information second bin, if the condition is true, List 1 prediction cannot occur, so the initial probability that context index information is 4 in the context initial probability table of FIG. If the condition is false, the probability of occurrence of MPS (Most Probable Symbol) and LPS (Least Probable Symbol) can be updated using the initial probability of 1.
  • the probability state index ( ⁇ ) of the horizontal axis is index information indicating a change in the probability of occurrence of LPS in advance
  • the vertical axis represents the probability of occurrence of LPS. For example, when ⁇ is 5, the probability of occurrence of LPS is about 40%, but if an update is performed in a direction to increase the probability of occurrence of LPS, the probability of LPS occurrence when ⁇ is 3 according to the LPS occurrence probability change rule of FIG. 19 is about It can be updated with a 44% chance. Referring back to FIG.
  • the probability state of MPS and LPS can be continuously updated in consideration of the context of the second bin of the prediction direction information.
  • the reference picture index information can be binarized by considering all of the first, second, and third RPS checks. Binarization of the reference picture index information may be binarized based on the number of reference pictures in the RPS for each prediction direction. Referring to FIG. 26, when the first RPS check is false, the second RPS check is true, and the third RPS check is false, the binarization method of the reference picture index information is different, and the rest of the conditions are the same.
  • the reference picture index information can be binarized to 0, 10, 110, 1110, and 1111.
  • the reference pictures in the list 1 direction are the same for the reference pictures in the list 0 direction.
  • the index order of reference pictures is different. In this case, there are two ways to binarize.
  • RPS may be separately binarized by dividing it into a common reference picture group and a non-reference picture group for each prediction direction.
  • the RPS common POC is a common reference picture group
  • the RPS non-common POC is a non-common reference picture group.
  • RPS D of FIG. 25 there are three reference pictures 1, 3, and 4 in the common reference picture group, and 2 reference pictures 0 and 2 in the non-common reference picture group. Therefore, RPS common POC 1, 3, and 4 reference pictures can be binarized with reference picture index information as 00, 010, and 011, and RPS common POC 0, 2 reference pictures can be binarized with reference picture index information as 10 and 11. have.
  • the second method corresponds to a case where the prediction direction is not bidirectional prediction.
  • reference pictures for each prediction direction of the RPS are divided into a common reference picture group and a non-common reference picture group.
  • the first bin indicating which current reference picture belongs to which group is not transmitted from the reference picture index information and is list 0 or list 1 of prediction direction information. It transmits using a bin indicating whether it is recognized (underlined bin in the prediction direction information binarization method table in FIG. 26).
  • the meaning of the underlined bin is not used to indicate whether the prediction direction is list 0 or list 1 direction, but as information indicating whether the reference picture of the current block is a common reference picture group or not. will be. In this case, when binarizing the prediction direction information, only the bin indicating whether the prediction direction is bidirectional prediction or not needs to be transmitted. If bidirectional prediction is limited, prediction direction information is not transmitted.
  • 29 is a block diagram showing an intra prediction unit of the video encoding apparatus.
  • the reference pixel generation unit 2901 After intra prediction is selected for the prediction mode of the current block, the reference pixel generation unit 2901 performs reference pixel derivation and reference pixel filtering around the current block.
  • the reference pixel is determined using a reconstructed pixel around the current block. If some reconstructed pixels are not available around the current block or there are no reconstructed pixels, padding may be performed in an area where the available reference pixels are not available, or padding may be performed with an intermediate value among a range of values the pixels may have.
  • filtering is performed using an adaptive intra smoothing (AIS) filter.
  • AIS adaptive intra smoothing
  • the optimal intra prediction mode determination unit is an apparatus for determining one prediction mode among the M intra prediction modes (2902).
  • M represents the total number of prediction modes in the screen.
  • the intra prediction mode generates a prediction block generated using a reference pixel filtered according to a directional prediction mode and a non-directional prediction mode. RD-Cost is compared for each prediction mode within the screen to select one prediction mode with the lowest cost value.
  • FIG. 30 is a block diagram showing in detail the inter prediction unit 3000 of the video encoding apparatus.
  • the inter-screen prediction unit may be divided into a Merge candidate search unit 3002 and an AMVP candidate search unit 3004 according to a method for deriving motion information.
  • the Merge candidate search unit S302 sets a reference block in which inter-frame prediction is used among blocks reconstructed around the current block as a Merge candidate.
  • the Merge candidate is derived in the same way from the encoding/decoding device, the same number is used, and the number of Merge candidates is transmitted from the encoding device to the decoding device.
  • the set number of Megre candidates is not set as a reference block restored around the current block, motion information of a block existing in the same position as the current block is obtained from a picture other than the current picture.
  • a candidate for merge is set by combining past and future motion information based on the current picture as a candidate, or by setting a block at the same location of another reference picture as motion information.
  • the AMVP candidate search unit 3004 determines the motion information of the current block by the motion estimation unit 3005.
  • the motion estimation unit 3005 finds a prediction block most similar to the current block among the reconstructed pictures.
  • motion information of the current block is determined using one of the Merge candidate search unit and the AMVP candidate search unit, and then a prediction block is generated through motion compensation 3006.
  • 31 is a method of encoding prediction mode information.
  • Skip mode operation information encoding (S3101) is information that indicates whether prediction mode information of a current block is used as Merge information of inter prediction, and a decoding block is used as a reconstruction block.
  • the determined Merge candidate index encoding (S3103) is performed, and if the operation is not performed, the prediction mode encoding (S3104) is performed.
  • the prediction mode encoding (S3104) encodes whether the prediction mode of the current block is inter-frame prediction or intra-frame prediction. When the inter prediction mode is selected, Merge mode operation information is encoded (S3106). If the Merge mode operates (S3107), Merge candidate index encoding (S3103) is performed. If the Merge mode does not operate, prediction direction encoding is performed (S3108).
  • the prediction direction encoding (S3108) indicates whether the direction of the reference picture to be used is in the past direction, the future direction, or both directions based on the current picture.
  • the prediction direction is the past or bidirectional (S3109)
  • the past reference picture index information encoding (S3110), the past direction MVD information encoding (S3111), the past direction MVP information is encoded (S3112), and the prediction direction is the future or bidirectional.
  • future direction reference picture index information encoding (S3114), future direction MVD information encoding (S3115), and future MVP information is encoded (S3116)
  • prediction motion information between screens of the current block may be reported.
  • Information encoded in the inter prediction process is referred to as inter prediction mode information encoding.
  • MPM operation information is encoded (S3117).
  • MPM motion information encoding is information that informs us to use the same prediction mode information as the reconstructed block without encoding the prediction mode information of the current block when the current block has the same prediction mode information as the current block among the restored blocks around the current block.
  • the MPM index encoding (S3119) is performed to inform which reconstructed block prediction mode is used as the prediction mode of the current block, and when the MPM operation is not performed (S3118), the residual prediction mode encoding is performed. (S3120).
  • Residual prediction mode encoding encodes a prediction mode index used as a prediction mode of a current block among remaining prediction modes, excluding a prediction mode selected as an MPM candidate.
  • Information encoded in the intra prediction process is referred to as intra prediction mode information encoding.
  • 32 and 33 show an intra-screen prediction unit and an inter-screen prediction unit of the video decoding apparatus.
  • the intra prediction unit 3200 is omitted from the process of determining the optimal prediction mode of FIG. 29, and the process of generating the prediction block by receiving the prediction mode determined to be optimal is substantially the same as the intra prediction unit of the image encoding apparatus. It works.
  • the inter-screen prediction unit 3300 is missing only the process of determining the optimal prediction mode in FIG. 30, and the process of generating the prediction block by receiving the prediction mode determined as optimal is substantially the same as the inter-screen prediction unit of the image encoding apparatus. Works.
  • the 34 is a method of decoding prediction mode information. The method operates substantially the same as the method of encoding the prediction mode information of FIG. 31.
  • 35 is a flowchart illustrating a method of encoding a transform block.
  • the encoding method of the transform block of FIG. 35 may be performed by the entropy encoding unit 105 of the image encoding apparatus 100.
  • the first non-zero coefficient is determined as a reference coefficient, and the position information Last_sig is encoded (S3501).
  • the sub-block including the reference coefficient is selected (S3502), and transform coefficient information in the corresponding sub-block is encoded. If the sub-block including the reference coefficient is not, the sub-block information is encoded before encoding the coefficient in the transform block (S3503).
  • the sub-block information Coded_sub_blk_flag is a flag indicating whether there is at least one non-zero coefficient in the current sub-block. Thereafter, non-zero coefficient information is encoded (S3504).
  • the non-zero coefficient information Sig_coeff_flag indicates whether the value of each coefficient existing in the sub-block is 0 or not.
  • the N excess coefficient information is encoded (S3505).
  • the N excess coefficient information indicates whether an absolute value of each coefficient exceeds a value from 1 to N for all coefficients present in the sub-block.
  • N uses an arbitrary predetermined value for encoding and decoding, but it is possible to encode the value of N to use the same value for encoding and decoding.
  • the number of N excess coefficient information may use any preset value or may be differently used depending on the position of the reference coefficient.
  • the N excess coefficient information is encoded for all or part of the coefficients in the sub-block, and may be sequentially encoded according to the scan order of each coefficient.
  • N when N is set to 3, it is coded whether or not the absolute value of each coefficient is greater than 1 for all non-zero coefficients (non-zero coefficients) in the sub-block.
  • the flag Abs_greater1_flag which indicates whether the absolute value of the coefficient is greater than 1 is used.
  • the flag Abs_greater2_flag which indicates whether the absolute value of the coefficient is greater than 2 is used.
  • the flag Abs_greater3_flag which indicates whether the absolute value of the coefficient is greater than 3, may be used.
  • the flag Abs_greater1_flag which indicates whether the absolute value of the coefficient is greater than 1 is used. Thereafter, only the coefficient determined to be a value greater than 1 can be coded to determine whether the coefficient is an even number. For this, parity information indicating whether the coefficient is even or odd may be used. Furthermore, it is possible to code whether the absolute value of the coefficient is greater than 3. For this, the flag Abs_greater3_flag indicating whether the absolute value of the coefficient is greater than 3 may be used.
  • the N excess coefficient information may include at least one of Abs_greaterN_flag or a flag indicating whether it is even.
  • N may be 1, 2, 3, but is not limited thereto.
  • N may be a natural number greater than 3, such as 4, 5, 6, 7, 8, 9, and the like.
  • code information indicating whether it is negative or positive is coded for each coefficient determined to be non-zero (S3506).
  • Sign_flag can be used for sign information.
  • the residual value obtained by subtracting N is defined as residual coefficient information only for the coefficient determined to have an absolute value greater than N, and residual value information remaining_coeff of the coefficient is encoded (S3507).
  • information encoding for each coefficient may be performed as a method of passing to the next coefficient after performing steps S3504, S3505, S3506, and S3507 for each coefficient.
  • information on coefficients in a sub-block may be coded for each step at a time. For example, if there are 16 coefficients in a sub-block, S3504 for each of the 16 coefficients is first encoded, and all processes S3505 are performed only for coefficients determined in S3504 to have the absolute value of the coefficient not equal to 0, S3506. You can carry out the process.
  • step S3507 may be performed.
  • the absolute value of the non-zero coefficient may be derived by decoding at least one of Sig_coeff_flag, one or more Abs_greaterN_flag, Parity information, or residual value information.
  • next sub-block After encoding coefficient information for the current sub-block, it is checked whether the next sub-block exists (S3509). If the next sub-block exists, it moves to the next sub-block (S3510) and encodes the sub-block information (S3503).
  • the corresponding sub-block information Coded_sub_blk_flag is checked (S3508), and when it is determined that the value of Coded_sub_blk_flag is true, Sig_coeff_flag, which is non-zero coefficient information, is encoded. If the value of the corresponding sub-block information Coded_sub_blk_flag is false, it means that there is no coefficient to be encoded in the corresponding sub-block, so check whether the next sub-block exists.
  • the corresponding sub-block is a sub-block located at the lowest frequency side, it is set to the same at the time of encoding and decoding as being true without encoding and decoding of sub-block information on the assumption that there will be a non-zero coefficient. It is also possible to do.
  • code information encoding (S3506) is described as the following process of S3505, but may exist between S3504 and S3505 or may perform S3506 after S3507.
  • 36 is a flowchart illustrating a method of decoding a transform block.
  • the transform block decoding method of FIG. 36 corresponds to the transform block coding method of FIG. 35.
  • the decoding method of the transform block of FIG. 36 may be performed by the entropy decoding unit 601 of the image decoding apparatus 600 of FIG. 6.
  • a context-adaptive binarization arithmetic process is performed through a binarization process.
  • the context-adaptive binarization arithmetic process refers to a process of symbolizing coded information in a block and applying and encoding the probability of occurrence of symbols differently using probability information according to circumstances.
  • symbols 0 and 1 are used, but the number of symbols may be N (N is a natural number of 2 or more).
  • Probability information refers to the probability of occurrence of 0 and 1 in binarized information.
  • the probability of occurrence of the two information may be the same or different depending on the previously restored information. It is also possible to have M probability information according to the information. At this time, the M probability information may be made into a probability table.
  • Probability initialization is a process of dividing the binarized intervals into the probability set in the probability information. However, what kind of probability information to use may use the same condition according to a predetermined rule arbitrarily in the encoding device or the decoding device, or the probability information may be separately coded.
  • the initial probability interval may be determined in the same manner in the encoding/decoding process according to a preset rule. Alternatively, the initial probability interval may be newly encoded and used. Alternatively, probability intervals and probability information of previously used coding parameters may be obtained without probability initialization.
  • the binarized information of the current coding parameter is encoded using the probability interval state up to the previous step of step S3702 and the previous probability information of the same coding parameter (S3703). . Then, probability information and probability intervals may be updated (S3704) for binary information to be encoded later. Then, when the coding parameter information to be encoded is present (S3705), the next coding parameter information is shifted (S3706), and the above-described process is repeated. If the coding parameter information to be encoded next does not exist, this flow chart ends.
  • the decoding device decodes the binary information of the coding parameter using the probability information and the interval (S3802), and then determines the information of the current coding parameter (S3803).
  • S3802 the probability information and the interval
  • S3803 the information of the current coding parameter
  • encoding is performed by selectively using optimal probability information among M probability information preset using information (or coding parameters) already restored around each coding parameter.
  • decoding may proceed.
  • probability information of a coding parameter may use probability information having a high probability of generating information according to the size of a transform block.
  • probability information may be differently applied according to information of neighbor coefficients of a coefficient to be encoded or decoded, and probability information of information to be currently encoded or decoded may be selected using probability information of previously encoded or decoded information.
  • 39 and 40 are diagrams showing an example in which probability information is differently applied according to information of neighboring coefficients.
  • 39 is an example of a probability information table used for encoding or decoding the Sig_coeff_flag information value of the current coefficient. If the number of coefficients having the same information value as the Sig_coeff_flag information value of the current coefficient among coefficients adjacent to the current encoding or decoding coefficient is 1, index 8 is assigned to the current coefficient. At this time, the probability of symbol 1, which is the Sig_coeff_flag binary information of the current coefficient, is 61%, and the probability of symbol 0 is 39%.
  • index 5 is allocated to the current coefficient, and the probability of symbol 1, which is the Sig_coeff_flag binary information of the current coefficient at this time, is 71% and symbol 0 The probability of is 29%. If the number of neighbor coefficients having the same information value as the Sig_coeff_flag information value of the current coefficient is 3, index 2 is allocated to the current coefficient, and the probability of symbol 1, which is the Sig_coeff_flag binary information of the current coefficient, is 87%, and the probability of symbol 0 is 13%. It becomes.
  • probability information may be updated as shown in FIG. 39.
  • the probability information of the N excess coefficient information is set to the probability information of the current N excess coefficient information by using the probability information of the previously encoded/decoded N excess coefficient information, or the N excess that is initially encoded/decoded in units of sub-blocks Probability information of coefficient information may be used as it is.
  • the N excess coefficient information may include at least one of Abs_greater1_flag, Abs_greater2_flag, Abs_greater3_flag, ..., or Abs_greaterN_flag.
  • sub-block information Coded_sub_blk_flag may use probability information of neighboring coded/decoded M sub-blocks, or may use probability information of the immediately coded/decoded sub-block.
  • FIG. 41 is a diagram in which an in-screen block copy prediction unit is added to the image encoding apparatus 100 of FIG. 1.
  • the block copy prediction unit in the screen may generate a prediction block of a block to be currently encoded using a reconstructed region in a current picture.
  • CB indicates a current block
  • PB indicates a prediction block
  • the motion search range may be limited within the reconstructed area.
  • the motion search range may be limited to only the reconstructed area in the current picture.
  • the motion search range may be set.
  • the current block and the prediction block when it partially overlap, it may be set as a motion search range.
  • the overlapping region may be padded using adjacent reconstructed pixels, but the overlapped regions may be predicted using the reconstructed pixels.
  • FIG. 45 to 47 are examples illustrating a method of generating a prediction block when the prediction block and the current block overlap.
  • A is a region in which the current block and the prediction block overlap, and B is adjacent reconstructed pixels used to predict A.
  • the reconstructed pixels that can be used may vary depending on which direction the prediction block is in, for example, the upper left, upper, upper right, or left of the current block.
  • region A may be predicted using M (M is an integer of 1 or more) intra prediction modes.
  • M is the number of prediction modes of intra prediction that can be used in the current block.
  • FIG. 48 is an exemplary diagram illustrating A region pixel prediction using a left upper direction mode among M available modes of a reconstructed pixel line and an intra prediction mode in FIG. 45 that can be used for A region pixel prediction.
  • the motion vector of the current block may be used to indicate the reconstructed pixel line for deriving the reference pixel line of the current block, not the predicted block of the current block in the reconstructed region in the current picture as shown in FIG. 49.
  • In-frame prediction may be performed using M prediction modes using a reference pixel line of a reconstructed region that is not adjacent to the current block, and a prediction mode generating an optimal prediction block may be selected.
  • a prediction block may be generated by using an optimal reference pixel line and a prediction mode among W (W is an integer of 1 or more) reference pixels, and different prediction modes or the same prediction mode for each of the W reference pixel lines After generating the prediction blocks by using, weighted sum of the generated prediction blocks, an optimal prediction block may be generated.
  • the prediction blocks may be generated using the block copy prediction and the intra-prediction, respectively, and then weighted sum of the generated prediction blocks to generate an optimal prediction block, and prediction using the inter-block prediction and intra-frame prediction After generating each block, an optimal prediction block may be generated by weighting the generated prediction blocks.
  • the reference pixel line may use only the reconstructed pixel at the top or the reconstructed pixel at the left.
  • a prediction block may be generated using a reference pixel line used when generating the prediction block.
  • the motion search range is exemplified as the current picture, but it may be limited to the CTU or CTU row to which the current block belongs, or to a neighboring CTU.
  • the prediction block PB indicated by the motion vector of the current block CB may be restricted to belong to the same CTU or CTU row as the current block.
  • FIG. 50 is a detailed block diagram illustrating an intra-screen block copy prediction unit of the video encoding apparatus, and the intra-block copy prediction (S5001) may be divided into a CPR_Merge candidate search unit (S5002) and a CPR_AMVP candidate search unit (S5004).
  • the CPR_Merge candidate search unit S5002 may use the reconstructed blocks as a CPR_Merge candidate.
  • the reconstructed block may be a block that is encoded/decoded through inter-frame prediction, or may be limited to a block that is encoded/decoded in an intra-block copy (IBC) mode among neighboring blocks.
  • IBC intra-block copy
  • the maximum number of CPR_Merge candidates can be used in the same manner in the encoding/decoding device or transmitted in the upper header.
  • the maximum number may be 2, 3, 4, 5 or more.
  • the upper header means upper header information including picture and block information such as a video parameter stage, a sequence parameter stage, a picture parameter stage, and a slice stage.
  • the CPR_Merge candidate derivation method will be described using FIG. 50.
  • AL, A, AR, L, BL are the same picture as the current block and are the positions of the reconstructed blocks that can be used as CPR_Merge candidates. For example, when inter-frame prediction or intra-screen block copy prediction is used in the reconstructed blocks of the AL, A, AR, L, BL positions, it can be used as a CPR_Merge candidate. In the reconstruction block, L, A, AR, BL, AL order, or other order considered by various priorities may be determined. The spatially adjacent reconstructed block may be used as a CPR_Merge candidate only when the size of the current block is larger than a predetermined threshold size.
  • the size of the current block can be expressed as the width of the block, the height, the sum of the width and height, the product of the width and height, and the minimum/maximum value of the width and height. For example, if the product of the width and height of the current block is greater than 16, the reconstructed block is used as a CPR_Merge candidate, otherwise, the reconstructed block may not be used as a CPR_Merge candidate.
  • motion information stored in the H buffer may be added to the CPR_Merge candidate list.
  • the H buffer may store motion information of a block that has been encoded/decoded before the current block.
  • the maximum number of candidates is not filled in the CPR_Merge candidate list, when the block copy prediction technique in the reconstructed block existing in the same position as the current block in the previously reconstructed picture is used, the motion information of the reconstructed block is displayed. Can be added as a CPR_Merge candidate.
  • a default vector candidate may be added.
  • the default vector may mean a vector determined in the same manner by the encoding/decoding device. For example, if the default vectors are (0, 0), (-10, 0), (0, -10), (-15, 0), (0, -15), and two CPR_Merge candidates are insufficient, Two default vectors can be added to the CPR_Merge candidate list in order from the front. Thereafter, the RD-cost of each motion information is calculated in the CPR_Merge candidate list, and the most suitable motion information for the RD-cost is determined (S5003).
  • the CPR_AMVP candidate search unit S5004 may obtain at least one of CPR_MVP candidate or CPR_MVD information using motion information of a neighboring block.
  • the maximum number of CPR_MVP candidates may be used in the same manner in the encoding/decoding device or transmitted in an upper header. Here, the maximum number may be 2, 3, 4, 5 or more.
  • the number of CPR_MVP information can be used in the same manner in the encoding/decoding device or transmitted in the upper header. The method for deriving the CPR_MVP candidate will be described with reference to FIG. 50.
  • AL, A, AR, L, BL belong to the same picture as the current block and are the positions of the reconstructed blocks that can be used as CPR_MVP candidates.
  • inter-frame prediction or intra-screen block copy prediction is used in the reconstructed blocks of the AL, A, AR, L, and BL positions, it may be used as a CPR_MVP candidate.
  • an order considered by L, A, AR, BL, AL order or various other priorities may be determined.
  • the spatially adjacent reconstructed block may be used as a CPR_MVP candidate only when the size of the current block is larger than a predetermined threshold size.
  • the size of the current block can be expressed as the width of the block, the height, the sum of the width and height, the product of the width and height, and the minimum/maximum value of the width and height. For example, if the product of the width and height of the current block is greater than 16, the reconstruction block may be used as a CPR_MVP candidate, otherwise, the reconstruction block may not be used as a CPR_MVP candidate.
  • motion information stored in the H buffer may be added to the CPR_MVP candidate list.
  • the H buffer may store motion information of a block that has been encoded/decoded before the current block.
  • motion information of the reconstructed block is used. It can be added as a CPR_MVP candidate.
  • the CPR_MVD information may be CPR_MVD information, which is a difference between a motion information of a current block and motion information stored in a CPR_MVP candidate. For example, if the motion vector of the current block is (-14, -14) and the motion vector of the CPR_MVP candidate is (-13, -13), the CPR_MVD information is ((-14)-(-13), ( -14)-(-13)) It can be the difference value (1, 1). Alternatively, when the motion search range cannot overlap the current block and the prediction block, the motion vector may be represented by the following equations 5 and 6 according to the size of the current block.
  • Curr_MV.x and Curr_MV.y are the x and y components of the current block motion vector.
  • Curr_blk_width and Curr_blk_height may be determined by various values, such as horizontal or vertical size of the current block, 1/2 of horizontal size, or 1/2 of vertical size.
  • MV is a motion vector of the current block finally derived. For example, when the motion vector of the current block is (-14, -14) and the size of the current block is (4, 4), the motion vector may be set to (-10, -10). The motion vector of the current block may be determined by subtracting only half the length and width of the current block from the motion vector of the current block. Thereafter, the RD-cost of each motion information is calculated in the CPR_MVP candidate list, and the most suitable motion information for the RD-cost is determined (S5005).
  • motion information of the current block is determined using one of the CPR_Merge candidate search unit and the CPR_AMVP candidate search unit, and then a prediction block is generated through motion compensation (S5006).
  • 52 is a method of encoding prediction mode information.
  • Skip mode operation information encoding (S5201) is information that indicates whether a prediction block is used as a reconstruction block in an encoding device.
  • the prediction mode encoding may encode whether the prediction mode of the current block is inter-prediction, intra-prediction, or intra-block copy prediction.
  • inter-screen prediction S5203
  • inter-screen prediction unit mode information may be encoded (S5204).
  • the inter-prediction mode information encoding (S5204) may perform the same function as the inter-prediction mode information encoding.
  • intra-prediction mode information may be encoded (S5206).
  • the intra prediction mode information encoding may perform the same function as the intra prediction mode information encoding of FIG. 31.
  • CPR_Merge mode operation information may be encoded (S5207).
  • CPR_Merge candidate index encoding (S5209) may be performed. If the CPR_Merge mode does not operate, CPR_MVD information encoding (S5210) and CPR_MVP candidates may be encoded (S5211). If it is determined that the current block and the prediction block overlap using the CPR_MVP candidate and the CPR_MVD information, the prediction mode for the overlapping region may be additionally encoded. In addition, if intra prediction is performed by the example of FIG. 49, after CPR_Merge candidate encoding (S5209) and CPR_MVP candidate encoding (S5211), intra prediction mode information encoding (S5206) may be performed.
  • inter-prediction mode information may be omitted during prediction mode encoding (S5202 ).
  • Prediction mode information encoding may be performed using FIG. 31.
  • In-screen block copy prediction unit mode information may be represented as inter-screen prediction unit mode information.
  • the current picture information may be displayed by adding the reference picture index information set in the inter-screen prediction information.
  • 0 to 3 may mean a previously reconstructed picture, and 4 may refer to a current picture.
  • the past direction reference picture index information is the current picture while using the past direction information during the Merge candidate index encoding (S3103), an intra-screen block copy prediction technique may be performed, and in other cases, an inter-screen prediction technique may be performed.
  • the past direction MVD information (S3111) and the past direction MVP candidate are predicted.
  • S3112 is information for predicting block copy in the screen, and in other cases, it may be inter-screen prediction technology information.
  • prediction direction encoding S3108
  • past direction reference picture index information encoding S3110
  • future direction reference picture index information encoding S3114
  • future direction MVD information encoding S3115
  • future direction MVP information encoding S3116
  • FIG. 53 is a diagram illustrating an in-screen block copy prediction unit added to the image decoding apparatus 600 of FIG. 6.
  • 54 shows an in-screen block copy prediction unit of an image decoding apparatus.
  • the in-screen block copy prediction unit only skips the process of determining the optimal prediction mode of FIG. 50, and the process of generating the prediction block by receiving the prediction mode determined to be optimal is substantially the same as the in-screen block copy prediction unit of the image encoding apparatus. It works.
  • 55 is a method of decoding prediction mode information.
  • Skip mode operation information decoding (S5501) is information that indicates whether a prediction block is used as a reconstruction block in a decoding device.
  • the prediction mode decoding (S5502) may decode whether the prediction mode of the current block is inter-screen prediction, intra-screen prediction, or intra-block copy prediction.
  • inter-screen prediction unit mode information may be decoded (S5504).
  • the inter-prediction mode information decoding (S5504) may perform the same function as the inter-prediction mode information decoding of FIG. 34.
  • the prediction mode is decoded by intra-prediction (S5505)
  • the intra-prediction mode information may be decoded (S5506). Decoding the intra prediction unit mode information may perform the same function as decoding the intra prediction unit mode information of FIG. 34.
  • CPR_Merge mode operation information may be decoded (S5507). If the CPR_Merge mode operates (S5508), CPR_Merge candidate index decoding (S5509) may be performed. If the CPR_Merge mode does not operate, CPR_MVD information decoding (S5510) and CPR_MVP candidates may be decoded (S5511). If it is determined that the current block and the prediction block overlap using the CPR_MVP candidate and the CPR_MVD information, the prediction mode for the overlapping region may be additionally decoded. In addition, when intra-prediction is performed by the example of FIG. 49, after CPR_Merge candidate decoding (S5509) and CPR_MVP candidate decoding (S5511), intra-screen prediction mode information decoding (S5506) may be performed.
  • inter-prediction mode information may be omitted during prediction mode decoding (S5502 ).
  • In-screen block copy prediction unit mode information may be represented as inter-screen prediction unit mode information.
  • the current picture information may be displayed by adding the reference picture index information set in the inter-screen prediction information.
  • 0 to 3 may mean a previously reconstructed picture, and 4 may refer to a current picture.
  • the past direction reference picture index information is the current picture while using the past direction information during Merge candidate index decoding (S3403), an intra-screen block copy prediction technique may be performed, and in other cases, an inter-screen prediction technique may be performed.
  • prediction direction decoding (S3408), past direction reference picture index information decoding (S3410), future direction reference picture index information decoding (S3414), future direction MVD information decoding (S3415), future direction MVP information decoding (S3416) process can be omitted, and if the prediction between the screen decoding in the prediction mode decoding step is decoded, this is not inter-screen prediction, but block copy prediction within the screen Can mean
  • transform coefficient 56 is a flowchart illustrating a method of encoding a quantized transform coefficient (hereinafter, referred to as a “transform coefficient”). It can be performed by the entropy encoding unit of the video encoding device.
  • the first non-zero coefficient may be determined as a reference coefficient, and the location information (Last_sig) may be encoded (S5601).
  • a sub-block including a reference coefficient may be selected (S5602), and transform coefficient information in the corresponding sub-block may be encoded. If the sub-block including the reference coefficient is not, the sub-block information may be encoded before encoding the coefficient in the transform block (S5603).
  • the sub-block information Coded_sub_blk_flag is a flag indicating whether there is at least one non-zero transform coefficient in the current sub-block.
  • the number of first coded information and the number of second coded information may be initialized to zero.
  • the first coded information is the number of coded 0-coefficient information (S5606), 1-coefficient coefficient information (S5606), and Parity information (S5607).
  • the second coded information is the number of codes of which the 3 time factor information S5610 is coded.
  • the first step coefficient information encoding refers to a step of encoding the 0 excess coefficient information, the 1 excess coefficient information, and the parity information (S5606, S5607, S5608).
  • the second step coefficient information encoding is a step of encoding the coefficient information exceeding 3 (S5610 ).
  • the transform coefficients to be currently coded may be selected in an inverse scan order (S5604).
  • PosL means the first position of the transform coefficient that is not encoded in the inverse scan order in the current sub-block by the first step coefficient information encoding process.
  • parity information is encoded (S5608) to inform the parity of the current transform coefficient.
  • parity information may indicate whether the absolute value of the current transform coefficient is even or odd.
  • the number of the first encoded information is increased (S5606, S5607, S5608). For example, when at least one of the coefficient information exceeding 0, the coefficient exceeding 1, or the parity information is encoded, the number of the first encoded information may be increased by 1. Alternatively, the number of first coded information may be increased by 1 whenever at least one of the coefficient information exceeding 0, the coefficient exceeding 1, or the parity information is respectively coded.
  • the number of first coded information may mean the maximum number of coefficient information allowed for one block.
  • the block may mean a transform block or a sub-block of the transform block.
  • the coefficient information may include at least one of coefficient information exceeding 0, coefficient information exceeding 1, or parity information.
  • the number of first coded information may be defined in units of a video sequence, picture, slice, coding tree block (CTU), coding block (CU), transform block (TU), or subblock of the transform block. That is, the same number of first coded information may be determined/set for all transform blocks or sub-blocks belonging to the corresponding unit.
  • the PosL value is decreased by 1 to change the transform coefficient to be encoded into the next coefficient.
  • the number of the first coded information exceeds the first threshold value, or if the first step coefficient information encoding in the current sub-block is completed, it may be skipped to the step 3 coefficient information encoding. Otherwise, the next coefficient information can be encoded.
  • the first threshold is a maximum number of at least one of 0 excess coefficient information, 1 excess coefficient information, and parity information that can be coded in units of subblocks (S5606, S5607, and S5608).
  • the second threshold value is a maximum number of 3 or more coefficient information that can be coded in units of sub-blocks.
  • the first coded information may mean the maximum number of coefficient information that can be coded in a predetermined unit.
  • the count information may include at least one of 0 count coefficient information, 1 time count information, Parity information, or 3 time count information.
  • the step of encoding the coefficient information exceeding 3 may be included in the step of encoding the coefficient information.
  • the number of first coded information is increased. For example, if at least one of the 0 excess coefficient information, the 1 excess coefficient information, the parity information, or the 3 excess coefficient information is encoded, the number of first coded information may be increased by 1. Alternatively, the number of first coded information may be increased by 1 whenever at least one of the 0 excess coefficient information, 1 excess coefficient information, Parity information, or 3 excess coefficient information is respectively coded.
  • the number of first coded information may mean the maximum number of coefficient information allowed for one block.
  • the block may mean a transform block or a sub-block of the transform block.
  • the coefficient information may include at least one of 0 excess coefficient information, 1 excess coefficient information, Parity information, or 3 excess coefficient information.
  • the number of first coded information may be defined in units of a video sequence, picture, slice, coding tree block (CTU), coding block (CU), transform block (TU), or subblock of the transform block. That is, the same number of first coded information may be determined/set for all transform blocks or sub-blocks belonging to the corresponding unit.
  • PosC means the position of a transform coefficient to be currently coded.
  • PosL is smaller than PosC (S5612)
  • the first step coefficient information is encoded.
  • the minimum absolute value of the current transform coefficient which can be known as the parity information of the current transform coefficient, is subtracted from the current coefficient value, and then the absolute value of the difference coefficient can be encoded (S5613).
  • N represents a number of 3 or more, and the same value can be used in the encoding/decoding device or transmitted in an upper header.
  • the N value is 5
  • information on coefficients exceeding 4 may be encoded for coefficients determined that the absolute value of the current coefficient is 4 or more.
  • the 5 excess coefficient information may be encoded. If the value of the current transform coefficient is completely encoded by encoding the N excess coefficient information, the step of encoding the absolute value of the difference coefficient may be omitted (S5613). If PosL is greater than PosC, the absolute value of the current transform coefficient itself may be encoded (S5614). Subsequently, sine information encoding indicating the sign information of the current transform coefficient may be performed (S5615).
  • the next transform coefficient in the sub-block can be selected as the current transform coefficient by reducing the PosC value by 1 (S5617), and if the current transform coefficient is the last transform coefficient in the sub-block, the first threshold The value and the second threshold may be updated (S5618).
  • the first and second threshold values may be adjusted when the number of transform coefficients in which the absolute values of the current coefficients themselves are encoded in the current sub-block is C (C is an integer of 0 or more). For example, if the first threshold value is 13, the first coded information number is 15, the second threshold value is 2, and the second coded information number is 2, the first and second coded information are first. In this case, since the second threshold value is reached, the first and second threshold values can be updated. In addition, for example, if the first threshold is 13, the first coded information number is 15, the second threshold value is 2, and the second coded information number is 1, the first coded information is the first threshold value.
  • the first threshold value may be increased and the second threshold value may be updated in a direction of decreasing.
  • the first and second threshold values may be updated to decrease the first and second threshold values.
  • updates may also be performed in a direction to maintain the first and second threshold values.
  • the current sub-block is not the last sub-block (S5619), it moves to the next sub-block (S5620), and if it is the last sub-block (S5619), encoding of the transform block may be ended.
  • 57 is a flowchart illustrating a method of decoding a quantized transform coefficient. It can be performed by the entropy decoding unit of the image decoding apparatus.
  • the first non-zero coefficient may be determined as a reference coefficient (S5701).
  • the sub-block including the reference coefficient may be selected (S5702), and transform coefficient information in the corresponding sub-block may be decoded. If the sub-block including the reference coefficient is not, the sub-block information may be decoded before decoding the coefficient in the transform block (S5703).
  • the sub-block information Coded_sub_blk_flag is a flag indicating whether there is at least one non-zero coefficient in the current sub-block.
  • the number of first decoded information and the number of second decoded information may be initialized to zero.
  • the first decoded information is the number of decoded 0-time count information (S5706), 1-time count information (S5706), and Parity information (S5707).
  • the second decoded information is the number of 3 excess coefficient information (S5710) decoded.
  • the transform coefficients to be currently decoded may be selected in an inverse scan order (S5704).
  • PosL means the first position of the transform coefficient that is not decoded in the inverse scan order in the current sub-block by the first step coefficient information decoding process.
  • the parity information may be decoded (S5708) to know the parity of the current transform coefficient.
  • the number of the first decoded information is reduced (S5706, S5707, S5708). For example, if at least one of the coefficient information exceeding 0, information exceeding 1, or parity information is decoded, the number of first decoded information may be reduced by 1. Alternatively, the number of the first decoded information may be reduced by 1 whenever at least one of the over 0 coefficient information, the over 1 coefficient information, or the parity information is respectively decoded.
  • the number of first decoded information may mean the maximum number of coefficient information transmitted for one block.
  • the block may mean a transform block or a sub-block of the transform block.
  • the coefficient information may include at least one of 0 or more coefficient information, 1 or more coefficient information, or parity information.
  • the number of first decoded information may be defined in units of a video sequence, picture, slice, coding tree block (CTU), coding block (CU), transform block (TU), or sub block of the transform block. That is, the same number of first decoded information may be set for all transform blocks or sub blocks belonging to the corresponding unit.
  • the PosL value is decreased by 1 to convert the coefficient to be decoded into the next transform coefficient.
  • the number of the first decoded information exceeds the first threshold value or decoding of the first step coefficient information in the current sub-block is completed, it may be skipped to a step of decoding the third-order coefficient information. Otherwise, the next transform coefficient information can be decoded.
  • the first threshold value is the maximum number of 0 excess coefficient information, 1 excess coefficient information, and parity information that can be decoded in units of sub-blocks (S5706, S5707, S5708).
  • the first step coefficient information refers to a step of decoding the 0 excess coefficient information, the 1 excess coefficient information, and the parity information (S5706, S5707, S5708).
  • the second threshold is the maximum number of over 3 coefficient information that can be decoded in sub-block units.
  • the second step of decoding the coefficient information is a step of decoding the coefficient information exceeding 3 (S5710).
  • the first decoded information may mean the maximum number of coefficient information that can be transmitted in a predetermined unit.
  • the coefficient information may include at least one of 0 excess coefficient information, 1 excess coefficient information, Parity information, or 3 excess coefficient information.
  • the step of decoding the coefficient information exceeding 3 may be included in the step of decoding the coefficient information.
  • the zero-over coefficient information indicating whether the absolute value of the current transform coefficient is greater than zero. If it is determined that the current transform coefficient is not 0, it is possible to decode the coefficient information exceeding 1 indicating whether the current transform coefficient exceeds the absolute value 1. Thereafter, when it is determined that the absolute value of the current transform coefficient is greater than 1 by the excess coefficient information, the parity information and the excess coefficient information 3 can be decoded.
  • the number of first decoded information is reduced. For example, if at least one of the 0 excess coefficient information, 1 excess coefficient information, Parity information, or 3 excess coefficient information is decoded, the number of first decoded information may be reduced by 1. Alternatively, the number of the first decoded information may be decreased by 1 whenever at least one of the 0 excess coefficient information, 1 excess coefficient information, Parity information, or 3 excess coefficient information is respectively decoded.
  • the number of first decoded information may mean the maximum number of coefficient information allowed for one block.
  • the block may mean a transform block or a sub-block of the transform block.
  • the coefficient information may include at least one of 0 excess coefficient information, 1 excess coefficient information, Parity information, or 3 excess coefficient information.
  • the number of first decoded information may be defined in units of a video sequence, picture, slice, coding tree block (CTU), coding block (CU), transform block (TU), or sub block of the transform block. That is, the same number of first decoded information may be set for all transform blocks or sub-blocks belonging to the corresponding unit.
  • PosC means the position of the transform coefficient to be currently decoded.
  • PosL is smaller than PosC (S5712)
  • PosC absolute value decoding capable of decoding the current transform coefficient information at once can be performed (S5714).
  • the sine information decoding indicating the sine information of the current transform coefficient may be decoded (S5715). If all information about the current transform coefficient is decoded, the next coefficient in the sub-block can be selected as the current coefficient by reducing the PosC value by 1 (S5717), and if the current transform coefficient is the last coefficient in the sub-block, the first threshold value, the first 2 The threshold may be updated (S5718).
  • the first and second threshold values may be adjusted when the number of transform coefficients in which the absolute value of the current coefficient itself is decoded in the current sub-block is C (C is an integer of 0 or more) or more. For example, when the first threshold value is 13, the first decrypted information number is 15, the second threshold value is 2, and the second decrypted information number is 2, the first and second decrypted information are first. In this case, since the second threshold value is reached, the first and second threshold values can be updated. Also, for example, if the first threshold is 13, the first decrypted information number is 15, the second threshold value is 2, and the second decrypted information number is 1, the first decrypted information is the first threshold value.
  • the first threshold value may be increased and the second threshold value may be updated in a direction of decreasing.
  • the first and second threshold values may be updated to decrease the first and second threshold values.
  • updates may also be performed in a direction to maintain the first and second threshold values.
  • decoding the transform block may be ended.
  • various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • Universal It can be implemented by a processor (general processor), a controller, a microcontroller, a microprocessor.
  • the scope of the present disclosure includes software or machine-executable instructions (eg, operating systems, applications, firmware, programs, etc.) that cause an operation according to the method of various embodiments to be executed on a device or computer, and such software or Instructions include a non-transitory computer-readable medium that is stored and executable on a device or computer.
  • software or Instructions include a non-transitory computer-readable medium that is stored and executable on a device or computer.
  • the present invention can be used to encode/decode an image.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (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에서는 화면 내 예측(또는 인트라 예측), 화면 간 예측(또는 인터 예측), 변환, 양자화, 엔트로피 부호화 및 인-루프 필터 등의 기술을 정의하고 있다.
본 발명은 MERGE/AMVP 후보 리스트를 생성할 때 이용되는 움직임정보들을 효율적으로 유도하여 예측 효율을 향상시킬 수 있는 방법을 제안하고자 한다.
본 발명은 현재 블록의 예측 블록 생성 시, 현재 블록 주변의 복원된 움직임 정보 중 현재 블록을 위한 움직임벡터 예측기를 탐색하는 방법 및 장치를 제공하고자 한다.
본 발명은 현재 블록의 움직임정보를 효율적으로 전송하는 방법 및 장치를 제공하고자 한다.
본 발명은 현재 픽쳐 내 복원 정보를 이용하여 현재 블록을 보다 효율적으로 예측하는 방법 및 장치를 제공하고자 한다.
본 발명은 현재 블록의 변환 계수를 부호화/복호화하는 방법 및 장치를 제공하고자 한다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 후보 리스트를 생성하고, 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 복수의 후보는 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고, 복원정보기반 후보는 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워질 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체는, 영상 복호화 방법에 의해 복호화되는 비트스트림을 저장할 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있이서, 상기 영상 복호화 방법은, 현재 블록의 후보 리스트를 생성하는 단계 및 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함할 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고, 복원정보기반 후보는, 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워질 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 후보 리스트를 생성하고, 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 복수의 후보는, 서브 블록 단위 시간적 후보를 포함하고, 상기 서브 블록 단위 시간적 후보는, 상기 현재 블록의 서브 블록 별로 움직임정보를 유도하기 위한 후보로서, 상기 현재 블록에 시간적으로 인접한 타깃 블록의 움직임정보를 가질 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 서브 블록은, 복호화 장치에 기-설정된 고정된 크기인 NxM 블록일 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 타깃 블록의 서브 블록은, 상기 현재 블록의 서브 블록의 위치에서 소정의 시간적 움직임벡터만큼 쉬프트된 위치의 블록으로 결정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 시간적 움직임벡터는, 상기 현재 블록의 공간적 주변 블록 중 특정 위치의 주변 블록만을 이용하여 설정되고, 상기 특정 위치의 주변 블록은 상기 현재 블록의 좌측 블록일 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 시간적 움직임벡터의 설정은, 상기 특정 위치의 주변 블록의 참조 픽쳐와 상기 타깃 블록이 속한 타깃 픽쳐가 동일한 경우에 한하여 수행될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체는 영상 복호화 방법에 의해 복호화되는 비트스트림을 저장할 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 영상 복호화 방법은, 현재 블록의 후보 리스트를 생성하는 단계 및 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함할 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 복수의 후보는, 서브 블록 단위 시간적 후보를 포함하고, 상기 서브 블록 단위 시간적 후보는, 상기 현재 블록의 서브 블록 별로 움직임정보를 유도하기 위한 후보로서, 상기 현재 블록에 시간적으로 인접한 타깃 블록의 움직임정보를 가질수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 서브 블록은, 복호화 장치에 기-설정된 고정된 크기인 NxM 블록일 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 타깃 블록의 서브 블록은, 상기 현재 블록의 서브 블록의 위치에서 소정의 시간적 움직임벡터만큼 쉬프트된 위치의 블록으로 결정될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 시간적 움직임벡터는, 상기 현재 블록의 공간적 주변 블록 중 특정 위치의 주변 블록만을 이용하여 설정되고, 상기 특정 위치의 주변 블록은 상기 현재 블록의 좌측 블록일 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 시간적 움직임벡터의 설정은, 상기 특정 위치의 주변 블록의 참조 픽쳐와 상기 타깃 블록이 속한 타깃 픽쳐가 동일한 경우에 한하여 수행될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 머지 후보 리스트를 구성하고, 머지 후보 리스트에 속한 복수의 머지 후보 중 어느 하나를 현재 블록의 움직임 정보로 설정하며, 현재 블록의 움직임 정보 중 움직임 벡터에 소정의 움직임 벡터 차이값(MVD)를 가산하여, 상기 현재 블록의 최종 움직임 벡터를 유도하고, 상기 최종 움직임 벡터를 기반으로 움직임 보상을 수행하여, 상기 현재 블록의 예측 블록을 생성할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 머지 후보 리스트는, k개의 머지 후보로 구성되고, k는 4, 5, 6 또는 그 이상의 자연수일 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 움직임 정보는, 부호화 장치에서 전송된 머지 후보 색인 정보에 따라, 상기 머지 후보 리스트에 속한 첫번째 머지 후보 또는 두번째 머지 후보 중 어느 하나를 이용하여 설정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 움직임 벡터 차이값은, 소정의 오프셋 벡터에 기초하여 유도되고, 상기 오프셋 벡터는 상기 오프셋 벡터의 길이 또는 방향 중 적어도 하나에 기초하여 유도될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 오프셋 벡터의 길이는 디스턴스 인덱스 또는 소정의 플래그 중 적어도 하나에 기초하여 결정되고, 상기 플래그는 상기 현재 블록의 머지 모드에서 움직임 벡터가 정수 화소 정밀도를 사용하는지 여부를 지시하는 정보를 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 오프셋 벡터의 방향은, 방향 인덱스에 기초하여 결정되고, 상기 방향은 좌, 우, 상, 하, 좌상, 좌하, 우상 또는 우하 중 어느 하나를 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 오프셋 벡터는 상기 현재 블록의 참조 픽쳐와 상기 현재 블록이 속한 현재 픽쳐 간의 POC 차이를 고려하여 보정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 픽쳐 내 기-복원된 영역을 이용하여, 상기 현재 픽쳐에 속한 현재 블록의 예측 블록을 결정하고, 상기 현재 블록의 변환 블록을 부호화/복호화하며, 상기 예측 블록과 상기 변환 블록을 기반으로, 상기 현재 블록을 복원할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 예측 블록을 결정하는 단계는, 상기 현재 블록의 움직임 정보를 유도하기 위한 후보를 결정하는 단계, 상기 후보를 기반으로 상기 현재 블록의 후보 리스트를 구성하는 단계 및 상기 후보 리스트로부터 상기 현재 블록의 움직임 정보를 결정하는 단계를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 후보는 상기 현재 블록에 공간적으로 인접한 주변 블록의 움직임 정보를 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 예측 블록은 상기 현재 블록과 동일한 코딩 트리 유닛(CTU) 또는 CTU 행 내에 속하도록 제한될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 주변 블록의 움직임 정보는, 상기 현재 블록의 크기가 소정의 문턱크기보다 큰지 여부에 기초하여 상기 후보 리스트에 선택적으로 추가될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 후보 리스트는, 부호화/복호화 장치의 버퍼에 저장된 움직임 정보를 더 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록은 복수의 서브 블록으로 구분되고, 상기 변환 블록을 부호화/복호화하는 단계는, 상기 현재 블록의 서브 블록에 대한 서브 블록 정보를 부호화/복호화하는 단계 및 상기 서브 블록 정보에 따라, 상기 서브 블록 내에 적어도 하나의 0이 아닌 계수가 존재하는 경우, 상기 서브 블록 내 현재 계수에 대해 0 초과 계수 정보, 1 초과 계수 정보, Parity 정보 또는 3 초과 계수 정보 중 적어도 하나를 부호화/복호화하는 단계를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 서브 블록에 대한 개수 정보가 부호화/복호화되고, 상기 개수 정보는 상기 서브 블록에 대해 허용되는 계수 정보의 최대 개수를 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 계수 정보는 상기 0 초과 계수 정보, 상기 1 초과 계수 정보, 상기 Parity 정보 또는 상기 3 초과 계수 정보 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 개수 정보는 상기 0 초과 계수 정보, 상기 1초과 계수 정보, 상기 Parity 정보 또는 상기 3 초과 계수 정보 중 적어도 하나가 각각 부호화/복호화될 때마다 1씩 증가/감소될 수 있다.
본 발명에 따르면, MERGE/AMVP 후보 리스트를 생성할 때 이용되는 움직임정보들을 효율적으로 유도하여 예측 효율을 향상시킬 수 있다.
본 발명은 현재 블록 주변의 복원된 움직임정보를 이용하여 움직임벡터 예측기를 선택하고, 움직임정보를 효율적으로 전송함으로써 코딩 효율을 향상시킬 수 있다.
본 발명에서는 블록의 움직임 정보를 이전 복원 픽쳐가 아닌 현재 픽쳐 내에서도 탐색함으로써 예측 신호의 정확도를 높일 수 있고, 그에 따른 변환 계수를 보다 효율적으로 전송하는 영상 부호화/복호화 방법 및 장치를 제공할 수 있다.
도 1은 영상 부호화 장치를 간략하게 나타낸 흐름도이다.
도 2는 영상 부호화 장치의 예측부를 상세히 설명하기 위한 도면이다.
도 3은 SKIP, MERGE 모드의 후보 움직임정보를 유도하는 방법을 설명하기 위한 도면이다.
도 4는 AMVP 모드의 후보 움직임정보를 유도하는 방법을 나타낸 흐름도이다.
도 5는 예측 정보를 부호화하는 방법을 나타낸 흐름도이다.
도 6은 영상 복호화 장치를 간략하게 나타낸 흐름도이다.
도 7은 영상 복호화 장치의 예측부를 설명하기 위한 도면이다.
도 8은 예측 정보를 복호화하는 방법을 나타낸 흐름도이다.
도 9는 본 실시예에 따른 MERGE/AMVP 후보 리스트를 구성하는 방법을 설명하기 위한 흐름도이다.
도 10은 본 실시예에 따른 시간적 후보 움직임정보를 유도하는 방법을 설명하기 위한 도면이다.
도 11은 본 실시예에 따른 시간적 후보 움직임정보를 유도할 때, 타깃 픽쳐에서 타깃 블록을 결정하는 제1 방법을 설명하기 위한 도면이다.
도 12는 본 실시예에 따른 시간적 후보 움직임정보를 유도할 때, 타깃 픽쳐에서 타깃 블록을 결정하는 제2 방법을 설명하기 위한 도면이다.
도 13은 본 실시예에 따른 시간적 후보 움직임정보를 유도할 때, 타깃 픽쳐에서 타깃 블록을 결정하는 제3 방법을 설명하기 위한 도면이다.
도 14는 본 실시예에 따른 History-based 후보 움직임정보를 유도하는 제1 방법을 설명하기 위한 도면이다.
도 15는 본 실시예에 따른 History-based 후보 움직임정보를 유도하는 제2 방법을 설명하기 위한 도면이다.
도 16은 본 실시예에 따른 평균 후보 움직임정보를 유도하는 제1 방법을 설명하기 위한 도면이다.
도 17은 본 실시예에 따른 평균 후보 움직임정보를 유도하는 제2 방법을 설명하기 위한 도면이다.
도 18은 MVD 정보를 예측하는 방법을 설명하기 위한 예시도이다.
도 19는 본 발명의 일 실시예에 따른 움직임벡터를 위한 Merge/AMVP 후보 리스트를 구성하는 방법을 설명하기 위한 예시표이다.
도 20은 본 발명의 일 실시예에 따른 MVD를 위한 Merge/AMVP 후보 리스트를 구성하는 방법을 설명하기 위한 예시표이다.
도 21은 본 발명의 일 실시예에 따른 MVD 후보 움직임정보를 포함한 예측 정보를 부호화하는 흐름을 나타낸 흐름도이다.
도 22는 본 발명의 일 실시예에 따른 MVD 후보 움직임정보를 포함한 예측 정보를 복호화하는 흐름을 나타낸 흐름도이다.
도 23은 본 발명의 일 실시예에 따른 추가 MVD 정보를 포함한 예측 정보를 부호화하는 흐름을 나타낸 흐름도이다.
도 24는 본 발명의 일 실시예에 따른 추가 MVD 정보를 포함한 예측 정보를 복호화하는 흐름을 나타낸 흐름도이다.
도 25는 본 발명의 일 실시예에 따른 참조 픽쳐 세트의 구성 예시를 나타낸 표이다.
도 26은 본 발명의 일 실시예에 따른 화면 간 예측 방향과 참조 픽쳐 색인 정보의 이진화를 참조 픽쳐 세트의 구성 상태에 따라서 적응적으로 결정하는 방법을 설명한 표이다.
도 27은 본 발명의 일 실시예에 따른 화면 간 예측 방향 정보의 빈을 전송할 때, 해당 빈의 context에 따라서 MPS, LPS의 초기 발생 확률 정보를 나타낸 표이다.
도 28은 본 발명의 일 실시예에 따른 LPS의 발생 확률 업데이트 규칙을 나타낸 그림이다.
도 29는 영상 부호화 장치의 화면 내 예측부를 나타낸 블록도이다.
도 30은 영상 부호화 장치의 화면 간 예측부를 나타낸 블록도이다.
도 31은 예측 모드 정보를 부호화 하는 방법이다.
도 32는 영상 복호화 장치의 화면 내 예측부를 도시한다.
도 33은 영상 복호화 장치의 화면 간 예측부를 도시한다.
도 34는 예측 모드 정보를 복호화 하는 방법이다.
도 35는 변환 블록의 부호화 방법을 나타낸 흐름도이다.
도 36은 변환 블록의 복호화 방법을 나타낸 흐름도이다.
도 37은 문맥 적응적 이진화 산술 부호화 방법을 나타내는 흐름도이다.
도 38은 문맥 적응적 이진화 산술 복호화 방법을 나타내는 흐름도이다.
도 39는 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다.
도 40은 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다.
도 41은 본 발명의 일 실시예에 따라 영상 부호화 장치를 나타낸 블록도이다.
도 42는 본 발명의 일 실시예에 따라 화면 내 블록 카피 예측을 이용한 예측 블록 생성 방법을 도시한다.
도 43은 본 발명의 일 실시예에 따라 화면 내 블록 카피 예측을 이용한 예측 블록 생성 방법을 도시한다.
도 44는 본 발명의 일 실시예에 따라 화면 내 블록 카피 예측을 이용한 예측 블록 생성 방법을 도시한다.
도 45는 본 발명의 일 실시예에 따라 화면 내 블록 카피 예측을 이용한 예측 블록 생성 방법을 도시한다.
도 46은 본 발명의 일 실시예에 따라 화면 내 블록 카피 예측을 이용한 예측 블록 생성 방법을 도시한다.
도 47은 본 발명의 일 실시예에 따라 화면 내 블록 카피 예측을 이용한 예측 블록 생성 방법을 도시한다.
도 48은 본 발명의 일 실시예에 따라 화면 내 블록 카피 예측을 이용한 예측 블록 생성 방법을 도시한다.
도 49는 본 발명의 일 실시예에 따라 화면 내 블록 카피 예측을 이용한 예측 블록 생성 방법을 도시한다.
도 50은 본 발명의 일 실시예에 따라 영상 부호화 장치의 화면 내 블록 카피 예측부를 나타낸 블록도이다.
도 51은 현재 블록 주변에 인접한 공간적 후보의 위치를 나타낸다.
도 52는 본 발명의 일 실시예에 따라 예측 모드 정보를 부호화 하는 방법이다.
도 53은 본 발명의 일 실시예에 따라 영상 복호화 장치의 화면 내 블록 카피 예측부를 나타낸 블록도이다.
도 54는 본 발명의 일 실시예에 따라 영상 복호화 장치의 화면 내 블록 카피 예측부를 나타낸 블록도이다.
도 55는 본 발명의 일 실시예에 따라 예측 모드 정보를 복호화 하는 방법이다.
도 56은 본 발명의 일 실시예에 따라 양자화된 변환 계수 부호화 방법을 나타낸 흐름도이다.
도 57은 본 발명의 일 실시예에 따라 양자화된 변환 계수 복호화 방법을 나타낸 흐름도이다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 후보 리스트를 생성하고, 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 복수의 후보는 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고, 복원정보기반 후보는 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워질 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체는, 영상 복호화 방법에 의해 복호화되는 비트스트림을 저장할 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있이서, 상기 영상 복호화 방법은, 현재 블록의 후보 리스트를 생성하는 단계 및 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함할 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고, 복원정보기반 후보는, 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워질 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 후보 리스트를 생성하고, 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 복수의 후보는, 서브 블록 단위 시간적 후보를 포함하고, 상기 서브 블록 단위 시간적 후보는, 상기 현재 블록의 서브 블록 별로 움직임정보를 유도하기 위한 후보로서, 상기 현재 블록에 시간적으로 인접한 타깃 블록의 움직임정보를 가질 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 서브 블록은, 복호화 장치에 기-설정된 고정된 크기인 NxM 블록일 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 타깃 블록의 서브 블록은, 상기 현재 블록의 서브 블록의 위치에서 소정의 시간적 움직임벡터만큼 쉬프트된 위치의 블록으로 결정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 시간적 움직임벡터는, 상기 현재 블록의 공간적 주변 블록 중 특정 위치의 주변 블록만을 이용하여 설정되고, 상기 특정 위치의 주변 블록은 상기 현재 블록의 좌측 블록일 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 시간적 움직임벡터의 설정은, 상기 특정 위치의 주변 블록의 참조 픽쳐와 상기 타깃 블록이 속한 타깃 픽쳐가 동일한 경우에 한하여 수행될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체는 영상 복호화 방법에 의해 복호화되는 비트스트림을 저장할 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 영상 복호화 방법은, 현재 블록의 후보 리스트를 생성하는 단계 및 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함할 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 복수의 후보는, 서브 블록 단위 시간적 후보를 포함하고, 상기 서브 블록 단위 시간적 후보는, 상기 현재 블록의 서브 블록 별로 움직임정보를 유도하기 위한 후보로서, 상기 현재 블록에 시간적으로 인접한 타깃 블록의 움직임정보를 가질수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 서브 블록은, 복호화 장치에 기-설정된 고정된 크기인 NxM 블록일 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 타깃 블록의 서브 블록은, 상기 현재 블록의 서브 블록의 위치에서 소정의 시간적 움직임벡터만큼 쉬프트된 위치의 블록으로 결정될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 시간적 움직임벡터는, 상기 현재 블록의 공간적 주변 블록 중 특정 위치의 주변 블록만을 이용하여 설정되고, 상기 특정 위치의 주변 블록은 상기 현재 블록의 좌측 블록일 수 있다.
*본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 시간적 움직임벡터의 설정은, 상기 특정 위치의 주변 블록의 참조 픽쳐와 상기 타깃 블록이 속한 타깃 픽쳐가 동일한 경우에 한하여 수행될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 머지 후보 리스트를 구성하고, 머지 후보 리스트에 속한 복수의 머지 후보 중 어느 하나를 현재 블록의 움직임 정보로 설정하며, 현재 블록의 움직임 정보 중 움직임 벡터에 소정의 움직임 벡터 차이값(MVD)를 가산하여, 상기 현재 블록의 최종 움직임 벡터를 유도하고, 상기 최종 움직임 벡터를 기반으로 움직임 보상을 수행하여, 상기 현재 블록의 예측 블록을 생성할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 머지 후보 리스트는, k개의 머지 후보로 구성되고, k는 4, 5, 6 또는 그 이상의 자연수일 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 움직임 정보는, 부호화 장치에서 전송된 머지 후보 색인 정보에 따라, 상기 머지 후보 리스트에 속한 첫번째 머지 후보 또는 두번째 머지 후보 중 어느 하나를 이용하여 설정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 움직임 벡터 차이값은, 소정의 오프셋 벡터에 기초하여 유도되고, 상기 오프셋 벡터는 상기 오프셋 벡터의 길이 또는 방향 중 적어도 하나에 기초하여 유도될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 오프셋 벡터의 길이는 디스턴스 인덱스 또는 소정의 플래그 중 적어도 하나에 기초하여 결정되고, 상기 플래그는 상기 현재 블록의 머지 모드에서 움직임 벡터가 정수 화소 정밀도를 사용하는지 여부를 지시하는 정보를 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 오프셋 벡터의 방향은, 방향 인덱스에 기초하여 결정되고, 상기 방향은 좌, 우, 상, 하, 좌상, 좌하, 우상 또는 우하 중 어느 하나를 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 오프셋 벡터는 상기 현재 블록의 참조 픽쳐와 상기 현재 블록이 속한 현재 픽쳐 간의 POC 차이를 고려하여 보정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 픽쳐 내 기-복원된 영역을 이용하여, 상기 현재 픽쳐에 속한 현재 블록의 예측 블록을 결정하고, 상기 현재 블록의 변환 블록을 부호화/복호화하며, 상기 예측 블록과 상기 변환 블록을 기반으로, 상기 현재 블록을 복원할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 예측 블록을 결정하는 단계는, 상기 현재 블록의 움직임 정보를 유도하기 위한 후보를 결정하는 단계, 상기 후보를 기반으로 상기 현재 블록의 후보 리스트를 구성하는 단계 및 상기 후보 리스트로부터 상기 현재 블록의 움직임 정보를 결정하는 단계를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 후보는 상기 현재 블록에 공간적으로 인접한 주변 블록의 움직임 정보를 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 예측 블록은 상기 현재 블록과 동일한 코딩 트리 유닛(CTU) 또는 CTU 행 내에 속하도록 제한될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 주변 블록의 움직임 정보는, 상기 현재 블록의 크기가 소정의 문턱크기보다 큰지 여부에 기초하여 상기 후보 리스트에 선택적으로 추가될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 후보 리스트는, 부호화/복호화 장치의 버퍼에 저장된 움직임 정보를 더 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록은 복수의 서브 블록으로 구분되고, 상기 변환 블록을 부호화/복호화하는 단계는, 상기 현재 블록의 서브 블록에 대한 서브 블록 정보를 부호화/복호화하는 단계 및 상기 서브 블록 정보에 따라, 상기 서브 블록 내에 적어도 하나의 0이 아닌 계수가 존재하는 경우, 상기 서브 블록 내 현재 계수에 대해 0 초과 계수 정보, 1 초과 계수 정보, Parity 정보 또는 3 초과 계수 정보 중 적어도 하나를 부호화/복호화하는 단계를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 서브 블록에 대한 개수 정보가 부호화/복호화되고, 상기 개수 정보는 상기 서브 블록에 대해 허용되는 계수 정보의 최대 개수를 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 계수 정보는 상기 0 초과 계수 정보, 상기 1 초과 계수 정보, 상기 Parity 정보 또는 상기 3 초과 계수 정보 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 개수 정보는 상기 0 초과 계수 정보, 상기 1초과 계수 정보, 상기 Parity 정보 또는 상기 3 초과 계수 정보 중 적어도 하나가 각각 부호화/복호화될 때마다 1씩 증가/감소될 수 있다.
본 명세서에 첨부된 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.
본 명세서 전체에서, 어떤 부분이 다른 부분과 '연결'되어 있다고 할 때, 이는 직접적으로 연결되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 전기적으로 연결되어 있는 경우도 포함한다.
또한, 본 명세서 전체에서 어떤 부분이 어떤 구성요소를 '포함'한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것을 의미한다.
또한, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.
또한, 본 명세서에서 설명되는 장치 및 방법에 관한 실시예에 있어서, 장치의 구성 일부 또는 방법의 단계 일부는 생략될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부의 순서가 변경될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부에 다른 구성 또는 다른 단계가 삽입될 수 있다.
또한, 본 발명의 제1 실시예의 일부 구성 또는 일부 단계는 본 발명의 제2 실시예에 부가되거나, 제2 실시예의 일부 구성 또는 일부 단계를 대체할 수 있다.
덧붙여, 본 발명의 실시예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 기술되고, 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있다. 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리 범위에 포함된다.
본 명세서에서, 블록은 단위, 영역, 유닛, 파티션 등으로 다양하게 표현될 수 있고, 샘플은 화소, 펠(pel), 픽셀 등으로 다양하게 표현될 수 있다.
이하, 첨부한 도면들을 참조하여, 본 발명의 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 동일한 구성요소에 대해서 중복된 설명은 생략한다.
도 1은 영상 부호화 장치의 구성을 간략하게 나타낸 블록 흐름도이다. 영상 부호화 장치는 영상을 부호화하는 장치로써 크게 블록 분할부, 예측부, 변환부, 양자화부, 엔트로피 부호화부, 역 양자화부, 역 변환부, 가산부, 인루프 필터부, 메모리부, 감산부를 포함할 수 있다.
블록 분할부(101)는 최대 크기의 부호화 하고자 하는 블록(이하, 최대 부호화 블록이라 칭함)으로부터 최소 크기의 부호화 하고자 하는 블록(이하, 최소 부호화 블록이라 칭함)까지 분할해 나간다. 블록 분할 방법에는 다양한 방법이 있다. 쿼드-트리 분할(이하, QT(Quad-Tree) 분할이라 칭함)은 현재 부호화 블록을 정확히 사분하는 분할이다. 이진-트리 분할(이하, BT(Binary-Tree) 분할이라 칭함)은 부호화 블록을 가로 방향 혹은 세로 방향으로 정확히 이분하는 분할이다. 터너리-트리(Ternary-tree) 분할은 부호화 블록을 가로 또는 세로 방향 중 어느 하나의 방향으로 삼분할하는 분할이다. 부호화 블록이 가로 방향으로 분할된 경우, 분할된 블록의 높이의 비는 {1:n:1}일 수 있다. 또는, 부호화 블록이 세로 방향으로 분할된 경우, 분할된 블록의 너비의 비는 {1:n:1}일 수 있다. 여기서, n은 1, 2, 3, 또는 그 이상의 자연수일 수 있다. 이 외에 다양한 분할 방법이 있을 수 있다. 또한, 여러 분할 방법들을 동시에 고려하여 분할해 나가는 방법도 가능하다.
예측부(102)는 현재 원본 블록에서 현재 예측 하고자 하는 블록(이하, 예측 블록이라 칭함)의 주변 화소나 이전에 이미 부호화/복호화가 끝난 참조 픽쳐 내 화소들을 이용하여 예측 블록을 생성한다. 예측 블록은 부호화 블록 내에서 1개 혹은 그 이상의 예측 블록들이 생성될 수 있다. 부호화 블록 내 예측 블록이 1개일 경우, 예측 블록은 부호화 블록과 동일한 형태이다. 동영상 신호의 예측 기술에는 크게 화면 내 예측과 화면 간 예측으로 구성 되어 있는데, 화면 내 예측은 현재 블록의 주변 화소들을 이용하여 예측 블록을 생성하는 방식이고, 화면 간 예측은 이전에 이미 부호화/복호화가 끝난 참조 픽쳐에서 현재 블록과 가장 유사한 블록을 찾아서 예측 블록을 생성하는 방식이다. 그 후, 원본 블록과 예측 블록을 뺀 잔차 블록을 율-왜곡 최적화(RDO: Rate-Distortion Optimization) 등 다양한 기법을 이용하여 예측 블록의 최적 예측 모드를 결정한다. RDO 비용 계산식은 수학식 1과 같다.
Figure PCTKR2020000211-appb-M000001
D, R, J는 각각 양자화에 의한 열화, 압축 스트림의 레이트, RD 비용이고, Φ는 부호화 모드, λ는 라그랑지안 승수(Lagrangian multiplier)로 에러의 양과 비트량 간의 단위를 일치시키기 위한 스케일 보정용 계수로 사용한다. 부호화 과정에서 최적의 부호화 모드로 선택되기 위해서는 해당 모드를 적용했을 때의 J 즉, RD-비용값이 다른 모드를 적용했을 때보다 작아야 하는데, RD-비용값을 구하는 식에는 비트율과 에러를 동시에 고려하여 계산한다.
화면 내 예측부(미도시)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 화면 내 예측이 수행될 현재 블록의 주변 블록의 예측 모드가 화면 간 예측 예측인 경우, 화면 간 예측 예측이 적용된 주변 블록에 포함되는 참조 픽셀을, 화면 내 예측이 적용된 주변의 다른 블록 내의 참조 픽셀로 대체될 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를, 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.
화면 내 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 화면 내 예측 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.
화면 내 예측부는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.
화면 내 예측부의 참조 화소 보간부는 예측 단위의 화면 내 예측 예측 모드가 참조 화소를 보간한 화소값을 기초로 화면 내 예측 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.
화면 간 예측부(미도시)는, 메모리(110)에 저장된 기-복원된 참조영상과 움직임 정보를 이용하여 예측 블록을 생성한다. 움직임 정보는 예컨대 움직임 벡터, 참조픽처 인덱스, 리스트 1 예측 플래그, 리스트 0 예측 플래그 등을 포함할 수 있다.
화면 간 예측부는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 블록을 유도할 수 있다. 또한, 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로, 현재 블록의 예측 블록을 유도할 수도 있다. 본 발명의 일 실시예에 따른 화면 간 예측부는 참조 픽쳐 보간부, 움직임 예측부, 움직임 보상부를 포함할 수 있다.
참조 픽쳐 보간부에서는 메모리(110)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 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 화소 단위의 움직임 벡터값을 가질 수 있다. 움직임 예측부에서는 움직임 예측 방법을 다르게 하여 현재 블록의 예측 블록을 예측할 수 있다. 움직임 예측 방법으로 스킵(Skip) 모드, 머지(Merge) 모드, AMVP(Advanced Motion Vector Prediction) 모드 등 다양한 방법이 사용될 수 있다.
도 2는 영상 부호화 장치의 예측부 내의 흐름을 설명한 흐름도이다. 원본 정보와 복원 정보를 이용하여 화면 내 예측을 수행(201)하는 경우, 각 예측 모드 별로 최적 화면 내 예측 모드를 RD-비용값을 이용하여 결정(202)하고, 예측 블록을 생성한다. 원본 정보와 복원 정보를 이용하여 화면 간 예측을 수행(203)하는 경우, SKIP 모드, MERGE 모드, AMVP 모드에 대해서 RD-비용값을 계산한다. MERGE 후보 탐색부(204)에서는 SKIP 모드와, MERGE 모드를 위한 후보 움직임정보 세트를 구성한다. 해당 후보 움직임정보 세트 중, 최적 움직임정보를 RD-비용값을 이용하여 결정(205)한다. AMVP 후보 탐색부(206)에서는 AMVP 모드를 위한 후보 움직임정보 세트를 구성한다. 해당 후보 움직임정보 세트들을 이용하여 움직임 추정을 수행(207)하고, 최적 움직임정보를 결정한다. 각 모드들에서 결정된 최적 움직임정보를 이용하여 움직임보상을 수행(208)하여 예측 블록을 생성한다.
상기 전술한 화면 간 예측은 3가지 모드(SKIP 모드, MERGE 모드, AMVP 모드)로 구성되어 있을 수 있다. 각 예측 모드는 움직임정보(예측 방향 정보, 참조 픽쳐 정보, 움직임 벡터)를 이용하여 현재 블록의 예측 블록을 구하고, 움직임정보를 이용한 추가적인 예측 모드가 있을 수 있다.
SKIP 모드는 이미 복원된 영역의 움직임정보를 이용하여 최적 예측 정보를 결정한다. 복원된 영역 내에서 움직임정보 후보군을 구성하여 해당 후보군 중, RD-비용값이 최소인 후보를 예측 정보로 사용하여 예측 블록을 생성하는데, 여기서 움직임정보 후보군을 구성하는 방법은 하기 설명할 MERGE 모드의 움직임정보 후보군을 구성하는 방법과 동일하므로, 본 설명에서는 생략한다.
MERGE 모드는 이미 복원된 영역의 움직임정보를 이용하여 최적 예측 정보를 결정한다는 점에서 SKIP 모드와 동일하다. 그러나 SKIP 모드는 예측 에러가 0이 되도록 하는 움직임정보를 움직임정보 후보군에서 탐색하고, MERGE 모드는 예측 에러가 0이 아닌 움직임 정보를 움직임정보 후보군에서 탐색한다는 점에서 그 차이를 달리한다. SKIP 모드와 마찬가지로, 복원된 영역 내에서 움직임정보 후보군을 구성하여 해당 후보군 중, RD-비용값이 최소인 후보를 예측 정보로 사용하여 예측 블록을 생성한다.
도 3의 301은 SKIP 모드와 MERGE 모드의 움직임정보 후보군을 생성하는 방법을 나타낸 것이다. 움직임정보 후보군의 최대 개수는 영상 부호화 장치와 영상 복호화 장치에서 동일하게 결정할 수도 있고, 영상 부호화 장치의 상위 헤더(상위 헤더란, 비디오 파라미터단, 시퀀스 파라미터단, 픽쳐 파라미터단 등 블록의 상위단에서 전송되는 파라미터들을 의미함)에서 해당 개수 정보가 기 전송될 수도 있다. S305 단계와 S306 단계의 설명에서 공간적 후보 블록과 시간적 후보 블록이 화면 간 예측 모드로 부호화 되었을 때에만, 해당 움직임정보를 이용하여 유도된 움직임정보를 움직임정보 후보군에 포함시킨다. S305 단계에서는 동일 픽쳐 내에서 현재 블록 주변의 공간적 후보 블록 5개 중, 4개 후보를 선택한다. 공간적 후보의 위치는 도 3의 302를 참조하고, 각 후보들의 위치는 복원된 영역 내에서 어떤 블록으로든 변경 가능하다. 공간적 후보는 A1, A2, A3, A4, A5 순으로 고려하여 먼저 사용 가능한 공간적 후보 블록의 움직임정보를 공간적 후보로 결정한다. 다만, 이는 우선 순위의 일예에 불과하며, 우선 순위는 A2, A1, A3, A4, A5 순일 수도 있고, A2, A1, A4, A3, A5 순일 수도 있다. 중복되는 움직임정보가 있을 경우, 우선 순위가 높은 후보의 움직임정보만을 고려한다. S306 단계에서는 시간적 후보 블록 2개 중, 1개 후보를 선택한다. 시간적 후보의 위치는 도 3의 302를 참조하고, 각 후보들의 위치는 Collocated 픽쳐 내에서 현재 픽쳐의 현재 블록 위치와 동일한 위치의 블록을 기준으로 결정된다. 여기서, Collocated 픽쳐는 복원 픽쳐 내에서 영상 부호화 장치와 영상 복호화 장치에서 동일한 조건으로 설정 가능하다. 시간적 후보는 B1, B2 블록 순으로 고려하여 먼저 사용 가능한 후보 블록의 움직임 정보를 시간적 후보로 결정한다. 시간적 후보의 움직임정보를 결정하는 방법은 도 3의 303을 참조한다. Collocated 픽쳐 내의 후보 블록(B1, B2) 움직임정보는 참조 픽쳐 B에 있는 예측 블록을 가리키고 있다. (단, 각 후보 블록의 참조 픽쳐는 서로 다를 수 있음. 본 설명에서는 편의상 이를 모두 참조 픽쳐 B라고 표현함) 해당 움직임벡터를 Collocated 픽쳐와 참조 픽쳐 B의 거리 대비, 현재 픽쳐와 참조 픽쳐 A의 거리의 비율을 계산하여 해당 비율만큼 후보 블록의 움직임벡터를 스케일하여 시간적 후보 움직임정보의 움직임벡터를 결정한다. 수학식 2는 스케일링 수식을 의미한다.
Figure PCTKR2020000211-appb-M000002
MV는 시간적 후보 블록 움직임정보의 움직임벡터, MVscale은 스케일링된 움직임벡터, TB는 Collocated 픽쳐와 참조 픽쳐 B의 시간적 거리, TD는 현재 픽쳐와 참조 픽쳐 A의 시간적 거리를 의미한다. 또한, 참조 픽쳐 A, 참조 픽쳐 B는 동일한 참조 픽쳐일 수도 있다. 이렇게 스케일링된 움직임벡터를 시간적 후보의 움직임벡터로 결정하고, 시간적 후보 움직임정보의 참조 픽쳐 정보는 현재 픽쳐의 참조 픽쳐로 결정하여, 시간적 후보의 움직임정보를 유도한다. S307 단계는 S305, S306 단계에서 최대 움직임정보 후보군 개수를 채우지 못했을 경우에만 수행되며, 이전 단계에서 유도된 움직임정보 후보들의 조합으로 새로운 양방향 움직임정보 후보군을 추가하는 단계이다. 양방향 움직임정보 후보란, 이전까지 유도된 과거 혹은 미래 방향의 움직임정보들을 하나씩 가져와서 새로운 후보로 조합하여 만들어내는 것이다. 도 3의 304 표는 양방향 움직임정보 후보 조합의 우선순위를 나타낸 것이다. 본 표의 조합 이외에 추가적인 조합이 나올 수 있으며, 본 표는 하나의 예시를 나타낸 것이다. 양방향 움직임정보 후보를 이용하여도 최대 움직임정보 후보군 개수를 채우지 못했을 경우, S307 단계를 수행한다. S308 단계에서는 움직임정보 후보의 움직임벡터를 제로 움직임벡터로 고정하고, 예측 방향에 따른 참조 픽쳐를 달리하여서 최대 움직임정보 후보군의 개수를 채운다.
AMVP 모드는 예측 방향에 따른 참조 픽쳐 별로 움직임 추정을 거쳐 최적 움직임정보를 결정한다. 여기서, 예측 방향은 과거/미래 중 한 방향만을 사용하는 단방향 일수도 있고, 과거와 미래 방향 모두를 사용하는 양방향 일수도 있다. 움직임 추정을 통해 결정된 최적 움직임정보를 이용하여 움직임 보상을 수행하여 예측 블록을 생성한다. 여기서, 예측 방향에 따른 참조 픽쳐마다 움직임 추정을 위한 움직임정보 후보군을 유도한다. 해당 움직임정보 후보군은 움직임 추정의 시작 지점으로 사용된다. AMVP 모드의 움직임 추정을 위한 움직임정보 후보군을 유도하는 방법은 도 4를 참조한다.
움직임정보 후보군의 최대 개수는 영상 부호화 장치와 영상 복호화 장치에서 동일하게 결정할 수도 있고, 영상 부호화 장치의 상위 헤더에서 해당 개수 정보가 기 전송될 수도 있다. S401 단계와 S402 단계의 설명에서 공간적 후보 블록과 시간적 후보 블록이 화면 간 예측 모드로 부호화 되었을 때에만, 해당 움직임정보를 이용하여 유도된 움직임정보를 움직임정보 후보군에 포함시킨다. S401 단계에서는 S305 단계의 설명과 다르게, 공간적 후보로서 유도되는 개수(2개)가 다를 수 있고, 공간적 후보를 선택하기 위한 우선 순위 또한 다를 수 있다. 나머지 설명은 S305 단계의 그것과 동일하다. S402 단계는 S306 단계의 설명과 동일하다. S403 단계에서는 현재까지 유도된 후보들 중, 중복되는 움직임정보가 있다면 제거한다. S404 단계는 S308 단계의 설명과 동일하다. 이렇게 유도된 움직임정보 후보들 중, RD-비용값이 최소인 움직임정보 후보를 최적 움직임정보 후보로 선택하여 해당 움직임정보를 기준으로 움직임 추정 과정을 거쳐 AMVP 모드의 최적 움직임정보를 구한다.
변환부(103)는 원본 블록과 예측 블록의 차이인 잔차 블록을 변환하여 변환 블록을 생성한다. 변환 블록은 변환 및 양자화 과정을 위해 사용되는 가장 작은 단위이다. 변환부는 잔차 신호를 주파수 영역으로 변환하여 변환 계수를 가지는 변환 블록을 생성한다. 여기서 잔차 신호를 주파수 영역으로 변환하는 방법으로는 이산 코사인 변환(DCT: Discrete Cosine Transform)기반 변환, 이산 사인 변환(DST: Discrete Sine Transform), KLT(Karhunen Loeve Transform) 등 다양한 변환 기법을 이용할 수 있으며, 이를 이용하여 잔차 신호가 주파수 영역으로 변환되어 변환 계수가 생성 된다. 변환 기법을 편하게 사용하기 위해 기저벡터(basis vector)를 이용하여 행렬 연산을 하게 되는데 예측 블록이 어떤 예측 모드로 부호화 되었는지에 따라서 행렬 연산 시 변환 기법들을 다양하게 섞어 사용할 수 있다. 예를 들어, 화면 내 예측 시 예측 모드에 따라 가로 방향으로는 이산 코사인 변환을 사용하고 세로 방향으로는 이산 사인 변환을 사용 할 수도 있다.
양자화부(104)는 변환 블록을 양자화 하여 양자화된 변환 블록을 생성한다. 즉, 양자화부는 변환부(103)로부터 생성되는 변환 블록의 변환 계수들을 양자화 하여 양자화된 변환 계수를 가지는 양자화된 변환 블록(Quantized Transform Coefficient)을 생성한다. 양자화 방법으로는 데드존 균일 경계 양자화(DZUTQ: Dead Zone Uniform Threshold Quantization) 또는 양자화 가중치 행렬 (Quantization Weighted Matrix) 등이 이용될 수 있지만, 이를 개량한 양자화 등 다양한 양자화 방법이 이용될 수 있다.
한편, 이상에서는 영상 부호화 장치가 변환부 및 양자화부를 포함하는 것을 도시하고 설명 했지만, 변환부 및 양자화부는 선택적으로 포함될 수 있다. 즉, 영상 부호화 장치는 잔차 블록을 변환하여 변환 블록을 생성하고 양자화 과정은 수행하지 않을 수 있으며, 잔차 블록을 주파수 계수로 변환하지 않고 양자화 과정만을 수행할 수 있을 뿐만 아니라, 심지어는 변환과 양자화 과정을 모두 수행하지 않을 수 있다. 영상 부호화 장치에서 변환부와 양자화부 중 일부 과정이 수행되지 않거나, 모든 과정이 수행 되지 않더라도 엔트로피 부호화부의 입력으로 들어가는 블록을 통상적으로 '양자화된 변환 블록'이라 일컫는다.
엔트로피 부호화부(105)는 양자화된 변환 블록을 부호화하여 비트스트림을 출력한다. 즉, 엔트로피 부호화부는 양자화부로부터 출력되는 양자화된 변환 블록의 계수들을 엔트로피 부호화(Entropy Encoding) 등 다양한 부호화 기법을 이용하여 부호화하고, 후술하는 영상 복호화 장치에서 해당 블록을 복호화 하는데 필요한 부가적인 정보들(예를 들면, 예측 모드에 대한 정보(예측 모드에 대한 정보란 예측부에서 결정된 움직임정보 혹은 화면 내 예측 모드 정보 등이 포함될 수 있음), 양자화 계수 등)을 포함하는 비트스트림을 생성하고 출력한다.
역 양자화부(106)는 양자화된 변환 블록에 대하여 양자화 시에 사용한 양자화 기법을 역으로 수행하여 역 양자화 변환 블록을 복원한다.
역 변환부(107)는 변환 시에 사용한 방법과 동일한 방법을 이용하여 역 양자화 변환 블록을 역 변환하여 잔차 블록을 복원하는데, 변환부에서 이용한 변환 기법을 역으로 수행하여 역 변환한다.
한편, 이상에서는 역 양자화부와 역 변환부는 양자화부와 변환부에서 사용한 양자화 방식과 변환 방식을 역으로 사용하여 역 양자화 및 역 변환 할 수 있다. 또한 변환부와 양자화부에서 양자화만을 수행하고 변환을 수행하지 않은 경우에는 역 양자화만을 수행하고 역 변환을 수행하지 않을 수 있다. 만약, 변환 및 양자화를 모두 수행하지 않은 경우, 역 양자화부와 역 변환부도 역 변환 및 역 양자화를 모두 수행하지 않거나 영상 부호화 장치에 포함되지 않고 생략 될 수 있다.
가산부(108)는 역 변환부에서 생성된 잔차 신호와, 예측을 통하여 생성된 예측 블록을 가산하여 현재 블록을 복원한다.
필터부(109)는 현재 픽쳐 내 모든 블록들이 복원된 이후, 픽쳐 전체에 걸쳐서 추가적으로 필터링 해주는 과정으로 디블로킹 필터링, SAO(Sample Adaptive Offset), ALF(Adaptive Loop Filter) 등이 있다. 디블로킹 필터링이란 영상을 블록 단위로 부호화하면서 발생하는 블록 왜곡을 감소시키는 작업을 말하며, SAO(Sample Adaptive Offset)란 복원 화소에 특정 값을 감산하거나 가산함으로써, 복원 영상과 원본 영상간 차이를 최소화시키는 작업을 말한다. ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및/또는 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다.
메모리(110)는 역 변환부에서 생성된 잔차 신호와, 예측을 통하여 생성된 예측 블록을 가산한 후, 인루프 필터부에서 추가적인 필터링을 거친 복원된 현재 블록을 저장하며, 다음 블록 또는 다음 사진 등을 예측하는데 활용 될 수 있다.
감산부(111)는 현재 원본 블록에서 예측 블록을 감산하여 잔차 블록을 생성한다.
도 5는 영상 부호화 장치 내 엔트로피 부호화부에서 코딩 정보의 부호화 흐름을 나타낸 흐름도이다. S501 단계에서는 SKIP 모드의 동작 정보를 부호화한다. S502 단계에서는 SKIP 모드의 동작 여부를 판단한다. S502 단계에서 SKIP 모드가 동작한다면 S507 단계에서 SKIP 모드를 위한 MERGE 후보 색인 정보를 부호화한 후, 본 흐름도를 종료한다. S502 단계에서 SKIP 모드가 동작하지 않는다면 S503 단계에서 예측 모드를 부호화한다. S503 단계에서는 예측 모드가 화면 간 예측인지 화면 내 예측 모드인지를 판단한다. S504 단계에서 예측 모드가 화면 간 예측 모드였다면, S505 단계에서 MERGE 모드의 동작 정보를 부호화한다. S506 단계에서는 MERGE 모드의 동작 여부를 판단한다. S506 단에서 MERGE 모드가 동작한다면 S507 단계로 넘어가서 MERGE 모드를 위한 MERGE 후보 색인 정보를 부호화한 후, 본 흐름도를 종료한다. S506 단계에서 MERGE 모드가 동작하지 않는다면 S508 단계에서 예측 방향을 부호화한다. 여기서 예측 방향은 과거 방향, 미래 방향, 양방향 중 하나일 수 있다. S509 단계에서는 예측 방향이 미래방향인지 아닌지를 판단한다. S509 단계에서 예측 방향이 미래 방향이 아니었다면 S510 단계에서 과거 방향의 참조 픽쳐 색인 정보를 부호화한다. S511 단계에서는 과거 방향의 MVD(Motion Vector Difference) 정보를 부호화한다. S512 단계에서는 과거 방향의 MVP(Motion Vector Predictor) 정보를 부호화한다. S509 단계에서 예측 방향이 미래 방향 혹은 양방향이거나 S512 단계가 끝나면 S513 단계에서 예측 방향이 과거 방향인지 아닌지를 판단한다. S513 단계에서 예측 방향이 과거 방향이 아니었다면 S514 단계에서 미래 방향 참조 픽쳐 색인 정보를 부호화한다. S515 단계에서는 미래 방향의 MVD 정보를 부호화한다. S516 단계에서는 미래 방향의 MVP 정보를 부호화한 후, 본 흐름도를 종료한다. S504 단계에서 예측 모드가 화면 내 예측 모드였다면, S517 단계에서 화면 내 예측 모드 정보를 부호화한 후, 본 흐름도를 종료한다.
도 6은 영상 복호화 장치(600)의 구성을 간략하게 나타낸 블록 흐름도이다.
영상 복호화 장치(600)는 영상을 복호화하는 장치로서, 크게 블록 엔트로피 복호화부, 역-양자화부, 역-변환부, 예측부, 가산부, 인루프 필터부, 메모리를 포함할 수 있다. 영상 부호화 장치에서 부호화 블록은 영상 복호화 장치에서 복호화 블록이라 칭한다.
엔트로피 복호화부(601)는 영상 부호화 장치로부터 전송받은 비트스트림을 해석하여 해당 블록을 복호화 하는데 필요한 여러 정보들과 양자화된 변환 계수를 읽어 들인다.
역 양자화부(602)는 엔트로피 복호화부에서 복호화한 양자화 계수에 대하여 양자화 시에 사용한 양자화 기법을 역으로 수행하여 역 양자화된 계수를 가지는 역 양자화된 블록을 복원한다.
역 변환부(603)는 변환 시에 사용한 방법과 동일한 방법을 이용하여 역 양자화된 변환 블록을 역 변환하여 차분 신호를 가지는 잔차 블록을 복원하는데, 변환부에서 이용한 변환 기법을 역으로 수행하여 역 변환한다.
예측부(604)는 엔트로피 복호화부에서 복호화한 예측 모드 정보를 이용하여 예측 블록을 생성하는데, 이는 영상 부호화 장치의 예측부에서 수행했던 예측 방식과 동일한 방식을 이용한다.
가산부(605)는 역 변환부에서 복원된 잔차 신호와, 예측을 통하여 생성된 예측 블록을 가산하여 현재 블록을 복원한다.
필터부(606)는 현재 픽쳐 내 모든 블록을 복원한 이후, 픽쳐 전체에 걸쳐서 추가적인 필터링은 하는 과정으로 디블로킹 필터링, SAO(Sample Adaptive Offset), ALF 등이 있으며, 상세한 내용은 기 전술한 영상 부호화 장치의 인루프 필터부에서 설명한 바와 동일하다.
메모리(607)는 역 변환부에서 생성된 잔차 신호와, 예측을 통하여 생성된 예측 블록을 가산한 후, 인루프 필터부에서 추가적인 필터링을 거친 복원된 현재 블록을 저장하며, 다음 블록 또는 다음 사진 등을 예측하는데 활용 될 수 있다.
도 7은 영상 복호화 장치의 예측부 내의 흐름을 설명한 흐름도이다. 예측 모드가 화면 내 예측이라면, 최적 화면 내 예측 모드 정보를 결정(701)하고, 화면 내 예측을 수행(702)하여 예측 블록을 생성한다. 예측 모드가 화면 간 예측이라면, SKIP, MERGE, AMVP 모드 중 최적 예측 모드를 결정(703)한다. SKIP 모드 혹은 MERGE 모드로 복호화할 경우, MERGE 후보 탐색부(704)에서 SKIP 모드와, MERGE 모드를 위한 후보 움직임정보 세트를 구성한다. 해당 후보 움직임정보 세트 중, 전송된 후보 인덱스(e.g., 머지 인덱스)를 이용하여 최적 움직임정보를 결정(705)한다. AMVP 모드로 복호화할 경우, AMVP 후보 탐색부(706)에서는 AMVP 모드를 위한 후보 움직임정보 세트를 구성한다. 해당 후보 움직임정보 후보들 중, 전송된 후보 인덱스(e.g., MVP 정보)를 이용하여 최적 움직임 정보를 결정(707)한다. 이후, 각 모드들에서 결정된 최적 움직임정보를 이용하여 움직임 보상을 수행(708)하여 예측 블록을 생성한다.
도 8은 영상 복호화 장치에서 코딩 정보의 복호화 흐름을 나타낸 흐름도이다. S801 단계에서는 SKIP 모드의 동작 정보를 복호화한다. S802 단계에서는 SKIP 모드의 동작 여부를 판단한다. S802 단계에서 SKIP 모드가 동작한다면 S807 단계에서 SKIP 모드를 위한 MERGE 후보 색인 정보를 복호화한 후, 본 흐름도를 종료한다. S802 단계에서 SKIP 모드가 동작하지 않는다면 S803 단계에서 예측 모드를 복호화한다. S803 단계에서는 예측 모드가 화면 간 예측인지 화면 내 예측 모드인지를 판단한다. S804 단계에서 예측 모드가 화면 간 예측 모드였다면, S805 단계에서 MERGE 모드의 동작 정보를 복호화한다. S806 단계에서는 MERGE 모드의 동작 여부를 판단한다. S806 단계에서 MERGE 모드가 동작한다면 S807 단계로 넘어가서 MERGE 모드를 위한 MERGE 후보 색인 정보를 복호화한 후, 본 흐름도를 종료한다. S806 단계에서 MERGE 모드가 동작하지 않는다면 S808 단계에서 예측 방향을 복호화한다. 여기서 예측 방향은 과거 방향, 미래 방향, 양방향 중 하나일 수 있다. S809 단계에서는 예측 방향이 미래방향인지 아닌지를 판단한다. S809 단계에서 예측 방향이 미래 방향이 아니었다면 S810 단계에서 과거 방향의 참조 픽쳐 색인 정보를 복호화한다. S811 단계에서는 과거 방향의 MVD(Motion Vector Difference) 정보를 복호화한다. S812 단계에서는 과거 방향의 MVP(Motion Vector Predictor) 정보를 복호화한다. S809 단계에서 예측 방향이 미래 방향 혹은 양방향이거나 S812 단계가 끝나면 S813 단계에서 예측 방향이 과거 방향인지 아닌지를 판단한다. S813 단계에서 예측 방향이 과거 방향이 아니었다면 S814 단계에서 미래 방향 참조 픽쳐 색인 정보를 복호화한다. S815 단계에서는 미래 방향의 MVD 정보를 복호화한다. S816 단계에서는 미래 방향의 MVP 정보를 복호화한 후, 본 흐름도를 종료한다. S804 단계에서 예측 모드가 화면 내 예측 모드였다면, S1317 단계에서 화면 내 예측 모드 정보를 복호화한 후, 본 흐름도를 종료한다.
하기 실시예에서는 영상 부호화 장치와 영상 복호화 장치의 예측부에서 MERGE 후보 탐색부(204, 704), AMVP 후보 탐색부(206, 706)에서 현재 블록의 화면 간 예측을 위한 후보 움직임정보를 유도하는 방법에 대해서 설명할 것이다. 후보 움직임정보는 MERGE 후보 탐색부에서는 현재 블록의 움직임정보로 바로 결정되고, AMVP 후보 탐색부에서는 현재 블록의 최적 움직임정보를 전송하기 위한 예측기(Predictor)로 사용된다.
도 9는 MERGE/AMVP 모드를 위한 후보 움직임정보를 유도하는 방법을 나타낸 흐름도이다. 본 흐름도에서 Merge 모드와 AMVP 모드의 후보 움직임정보를 유도하는 방법을 동일한 흐름도에 나타냈지만, 각 모드 별로 일부 후보들은 사용하지 않을 수도 있다. 따라서 모드 별로 유도 되는 후보 움직임정보는 다를 수 있으며, 유도되는 후보 움직임정보의 개수 또한 다를 수 있다. 예를 들어, Merge 모드는 공간적 후보 5(A)개 중 4(B)개의 후보를 선택할 수 있으며 AMVP 모드에서는 공간적 후보 4(A)개 중 2(B)개의 후보만을 선택할 수 있다. S901, S902 단계에서 A, B, C, D (A, B, C, D는 1 이상의 정수)는 각각 공간적 후보의 개수, 선택되는 공간적 후보의 개수, 시간적 후보의 개수, 선택되는 시간적 후보의 개수를 의미한다.
S901 단계의 설명은 전술한 S305, S401단계의 설명과 동일하다. 단, 공간적 후보를 위한 주변 블록들의 위치는 상이할 수 있다. 또한, 공간적 후보를 위한 주변 블록은, 제1 그룹, 제2 그룹 또는 제3 그룹 중 적어도 하나에 속할 수 있다. 여기서, 제1 그룹은, 현재 블록의 좌측 블록(A1) 또는 좌하단 블록(A4) 중 적어도 하나를 포함하고, 제2 그룹은 현재 블록의 상단 블록(A2) 또는 우상단 블록(A3) 중 적어도 하나를 포함하고, 제3 그룹은 현재 블록의 좌상단 블록(A5), 좌상단 블록의 하단에 인접한 블록 또는 좌상단 블록의 좌측에 인접한 블록 중 적어도 하나를 포함할 수 있다.
S902 단계의 설명은 전술한 S306, S402 단계의 설명과 동일하다. 마찬가지로 시간적 후보를 위한 블록들의 위치는 상이할 수 있다.
S903 단계에서는 서브 블록 단위 시간적 후보를 추가한다. 단, AMVP 후보 리스트에서 서브 블록 단위 시간적 후보를 추가할 경우, 전술한 AMVP 모드의 움직임벡터 유도 방법에 의거하여 임의의 서브 블록 1개의 후보 움직임정보만을 예측기로 이용해야 하지만, 때에 따라서 2개 이상의 서브 블록 후보 움직임정보를 이용하여 예측기로 이용할 수도 있다. 본 단계의 내용은 하기 실시예 1에서 상세히 설명할 것이다.
S904 단계에서는 History-based 후보를 추가한다. 본 단계의 내용은 하기 실시예 2에서 상세히 설명할 것이다.
S905 단계에서는 Merge/AMVP list의 후보 움직임정보들 간 평균 후보를 추가한다. 본 단계의 내용은 하기 실시예 3에서 상세히 설명할 것이다.
S905 단계까지 거친 후, Merge/AMVP list의 후보 움직임정보들이 최대 개수까지 채워지지 않을 경우, S906 단계에서 제로 움직임정보를 추가하여 최대 개수까지 채운 후, 본 흐름도를 종료하고, 각 모드를 위한 후보 움직임정보 리스트 구성을 완료한다. 본 실시예에서 설명한 후보 움직임정보는 Merge/AMVP 모드 이외에 다양한 예측 모드에서 활용될 수도 있다. 또한, 도 9는 후보 리스트는 추가된 후보의 순서를 한정하는 것은 아니다. 예를 들어, 서브 블록 단위 시간적 후보는 공간적 후보보다 우선적으로 후보 리스트에 추가될 수 있다. 또는 평균 후보가 History-based 후보보다 우선적으로 후보 리스트에 추가될 수도 있다. 본 명세서에서, 후보 움직임정보 리스트, 후보 움직임정보 세트, 움직임정보 후보군, 후보 리스트는 서로 동일한 의미로 이해될 수 있다.
본 실시예에서는 도 9의 S902, S903 단계의 시간적 후보, 서브 블록 단위 시간적 후보를 유도하는 방법에 대해서 상세히 설명할 것이다. 시간적 후보는 블록 단위 시간적 후보를 의미하며, 서브 블록 단위 시간적 후보와 구별될 수 있다. 여기서 서브 블록이란 현재 부호화 또는 복호화하고자 하는 블록(이하, 현재 블록)을 임의의 NxM (N, M ≥ 0) 크기의 블록으로 나눈 것으로, 현재 블록의 움직임정보를 유도하기 위한 기본 블록 단위를 의미한다. 서브 블록은 부호화기 및/또는 복호화기에 기-설정된 크기를 가질 수 있다. 예를 들어, 서브 블록은 4x4 또는 8x8와 같이 고정된 크기를 가진 정방형일 수 있다. 다만, 이에 한정되지 아니하며, 서브 블록의 형태는 비정방형일 수 있고, 서브 블록의 너비와 높이 중 적어도 하나는 8보다 클 수도 있다. 서브 블록 단위 시간적 후보는, 현재 블록이 NxM보다 큰 경우에 한하여 후보 리스트에 추가되도록 제한될 수 있다. 예를 들어, N과 M이 각각 8인 경우, 현재 블록의 너비와 높이가 각각 8보다 큰 경우에 한하여, 서브 블록 단위 시간적 후보가 후보 리스트에 추가될 수 있다.
도 10은 본 실시예를 설명하기 위한 기본 개념도이다. 도 10에는 현재 픽쳐의 현재 (서브) 블록 1개가 도시되어 있다. 해당 (서브) 블록에 대한 타깃 (서브) 블록을 타깃 픽쳐 내에서 탐색한다. 여기서 타깃 픽쳐와 타깃 (서브) 블록 정보는 각각 상위 헤더 혹은 현재 블록 단위로 전송될 수도 있고, 영상 부호화 장치와 영상 복호화 장치에서 동일한 조건으로 타깃 픽쳐와 타깃 (서브) 블록을 지정할 수도 있다. 현재 (서브) 블록의 타깃 픽쳐와 타깃 (서브) 블록이 결정된 후, 타깃 (서브) 블록의 움직임정보를 이용하여 현재 (서브) 블록의 움직임정보를 유도한다.
구체적으로, 현재 블록의 각 서브 블록은 타깃 블록의 각 서브 블록과 대응 관계를 가진다. 서브 블록 단위 시간적 후보는 현재 블록 내 서브 블록 별로 움직임 정보를 가지며, 각 서브 블록의 움직임정보는 타깃 블록 내에서 대응 관계를 가진 서브 블록의 움직임정보를 이용하여 유도될 수 있다. 다만, 상기 대응 관계를 가진 서브 블록의 움직임정보가 가용하지 않은 경우가 존재할 수 있다. 이 경우, 해당 서브 블록의 움직임정보는, 디폴트 움직임정보로 설정될 수 있다. 여기서, 디폴트 움직임 정보는, 해당 서브 블록에 수평 방향 또는 수직 방향으로 인접한 주변 서브 블록의 움직임정보를 의미할 수 있다. 또는, 디폴트 움직임정보는, 타깃 블록의 중앙 샘플을 포함한 서브 블록의 움직임정보를 의미할 수도 있다. 다만, 이에 한정되지 아니하며, 디폴트 움직임정보는, 타깃 블록의 n개의 코너 샘플 중 어느 하나를 포함한 서브 블록의 움직임정보를 의미할 수 있다. n은 1, 2, 3, 또는 4일 수 있다. 또는, 중앙 샘플을 포함한 서브 블록 및/또는 n개의 코너 샘플을 포함한 서브 블록 중에서, 소정의 우선순서에 따라 가용한 움직임정보를 가진 서브 블록을 탐색하고, 가장 먼저 탐색된 서브 블록의 움직임정보를 디폴트 움직임정보로 설정할 수도 있다.
한편, 전술한 디폴트 움직임정보가 가용한지 여부에 대한 판단을 선제적으로 수행할 수 있다. 판단 결과, 디폴트 움직임정보가 가용하지 않은 경우에는 서브 블록 단위 시간적 후보의 움직임정보 유도 및 후보 리스트에의 추가 과정은 생략될 수 있다. 즉, 디폴트 움직임정보가 가용한 경우에 한하여, 서브 블록 단위 시간적 후보가 유도되고, 후보 리스트에 추가될 수 있다.
한편, 움직임정보의 움직임벡터는 스케일링 처리가 된 움직임벡터를 의미할 수도 있다. 타깃 픽쳐와 타깃 (서브) 블록의 참조 픽쳐의 시간적 거리를 TD, 현재 픽쳐와 현재 (서브) 블록의 참조 픽쳐의 시간적 거리를 TB로 정하고, 수학식 2를 이용하여 타깃 (서브) 블록의 움직임벡터(MV)를 스케일링한다. 스케일링된 움직임벡터(MVscale)는 현재 (서브) 블록의 예측 (서브) 블록을 참조 픽쳐 내에서 가리킬 때 사용되거나, 현재 (서브) 블록의 시간적 후보 또는 서브 블록 단위 시간적 후보의 움직임벡터로 이용될 수 있다. 단, 스케일링된 움직임벡터 유도 시에 수학식 2에서 사용된 변수 MV는 타깃 (서브) 블록의 움직임벡터를 의미하고, MVscale은 현재 (서브) 블록의 스케일링된 움직임벡터를 의미한다.
또한, 현재 (서브) 블록의 참조 픽쳐 정보는 영상 부호화 장치와 영상 복호화 장치가 동일한 조건으로 지정될 수도 있고, 현재 (서브) 블록의 참조 픽쳐 정보를 현재 (서브) 블록 단위로 전송하는 것도 가능하다.
하기 현재 (서브) 블록의 타깃 (서브) 블록을 영상 부호화 장치와 영상 복호화 장치에서 동일한 조건으로 결정하는 방법에 대해서 좀 더 상세히 설명할 것이다. 현재 (서브) 블록의 타깃 (서브) 블록은 Merge/AMVP 후보 리스트에 있는 후보 움직임정보들 중 하나를 이용하여 가리킬 수 있다. 좀 더 상세하게는 후보 리스트에 있는 후보 움직임정보들의 예측 모드를 파악한 후, 예측 모드에 우선 순위를 부여하여 결정할 수도 있다. 예를 들어, AMVP 모드, MERGE 모드, SKIP 모드 순으로 우선순위를 두어서 후보 리스트에 있는 움직임정보들 중 하나를 선택하여 타깃 (서브) 블록을 가리킬 수 있다.
또한 단순하게, 후보 리스트에 있는 가장 첫번째 후보 움직임정보를 무조건적으로 선택하여 타깃 (서브) 블록을 가리킬 수도 있다. 만약 동일한 예측 모드로 코딩된 후보 움직임정보들의 경우에는 후보 리스트상에서 우선 순위가 높았던 순으로 선택을 하는 등 다양한 우선 순위 조건을 이용할 수 있다. 단, 후보 움직임정보의 참조 픽쳐와 타깃 픽쳐가 다를 경우에는 해당 후보 움직임정보는 제외할 수도 있다. 혹은 현재 (서브) 블록과 동일 위치에 해당하는 타깃 픽쳐 내 타깃 (서브) 블록으로 결정할 수도 있다.
구체적으로, 타킷 (서브) 블록은, 현재 (서브) 블록의 위치에서 소정의 시간적 움직임벡터(temporal MV)만큼 쉬프트된 위치의 블록으로 결정될 수 있다. 여기서, 시간적 움직임벡터는, 현재 블록에 공간적으로 인접한 주변 블록의 움직임벡터로 설정될 수 있다. 상기 주변 블록은, 현재 블록의 좌측, 상단, 좌하단, 우상단 또는 좌상단 블록 중 어느 하나일 수 있다. 또는, 시간적 움직임벡터는, 부호화/복호화 장치에 기-약속된 고정된 위치의 주변 블록만을 이용하여 유도될 수도 있다. 예를 들어, 상기 고정된 위치의 주변 블록은 현재 블록의 좌측 블록(A1)일 수 있다. 또는, 상기 고정된 위치의 주변 블록은 현재 블록의 상단 블록(A2)일 수 있다. 또는, 상기 고정된 위치의 주변 블록은 현재 블록의 좌하단 블록(A3)일 수 있다. 또는, 상기 고정된 위치의 주변 블록은 현재 블록의 우상단 블록(A4)일 수 있다. 또는, 상기 고정된 위치의 주변 블록은 현재 블록의 좌상단 블록(A5)일 수 있다.
상기 설정은, 주변 블록의 참조 픽쳐와 타깃 픽쳐가 동일한 경우(예를 들어, 참조 픽쳐와 타깃 픽쳐 간의 POC 차이가 0인 경우)에 한하여 수행될 수 있다. 주변 블록의 참조 픽쳐와 타깃 픽쳐가 동일하지 않은 경우, 시간적 움직임벡터는 (0,0)으로 설정될 수 있다.
상기 설정된 시간적 움직임벡터는 소정의 오프셋 또는 쉬프트값 중 적어도 하나에 기초하여 라운딩될 수 있다. 여기서, 오프셋은, 쉬프트값에 기초하여 유도되고, 쉬프트값은 우측 방향의 쉬프트값(rightShift) 또는 좌측 방향의 쉬프트값(leftShift) 중 적어도 하나를 포함할 수 있다. 쉬프트값은 부호화/복호화 장치에 기-설정된 정수일 수 있다. 예를 들어, rightShift는 4로, leftShift는 0으로 각각 설정될 수 있다. 예를 들어, 시간적 움직임벡터의 라운딩은 다음 수학식 3과 같이 수행될 수 있다.
[수학식 3]
offset = ( rightShift = = 0 ) ? 0 : ( 1 << ( rightShift - 1 ) )
mvXR[ 0 ] = ( ( mvX[ 0 ] + offset - ( mvX[ 0 ] >= 0 ) ) >> rightShift ) << leftShift
mvXR[ 1 ] = ( ( mvX[ 1 ] + offset - ( mvX[ 1 ] >= 0 ) ) >> rightShift ) << leftShift
좀 더 상세한 설명을 위해서 2가지 조건을 가정한다. 첫번째는 이미 코딩이 끝난 픽쳐 내에서는 움직임정보를 4x4 서브 블록 단위로 저장하여 보관하고, (여기서, 움직임정보 저장을 위한 4x4 서브 블록 단위 경계들과 타깃 픽쳐 내 타깃 (서브) 블록의 경계들은 일치함) 두번째는 현재 블록 내 서브 블록의 크기를 4x4로 한다는 것이다. 전술한 블록들의 크기는 다양하게 결정할 수 있다. 이 때, 현재 (서브) 블록에서 동일 위치에 해당하는 타깃 픽쳐 내 타깃 (서브) 블록의 위치 혹은 현재 (서브) 블록의 Merge/AMVP 후보 리스트에 있는 움직임정보를 이용하여 타깃 픽쳐 내에서 가리킨 타깃 (서브) 블록의 위치를 결정하는 경우, 타깃 픽쳐 내에서 움직임 정보가 저장된 4x4 서브 블록 단위상에서 각 서브 블록의 기준 좌표와 현재 (서브) 블록의 기준 좌표가 대응하지 못할 수도 있다. 예를 들어, 현재 (서브) 블록의 맨 좌상단 화소의 좌표는 (12, 12) 인데 타깃 (서브) 블록의 맨 좌상단 좌표는 (8, 8) 일 수도 있는 등의 불일치가 발생할 수 있다. 이는 타깃 픽쳐의 블록 분할 구조가 현재 픽쳐와 다르기 때문에 발생하는 어쩔 수 없는 현상이다.
도 11은 서브 블록 단위가 아닌 현재 블록 단위에서 시간적 후보 움직임정보를 유도할 때, 타깃 블록을 결정하는 방법을 설명하기 위한 예시 도면이다. 현재 블록의 기준 좌표에서 타깃 위치를 가리키는 움직임벡터가 (동일 위치 (즉, 제로 움직임) 혹은 후보 리스트에서 유도된 움직임벡터) 결정된 후, 타깃 픽쳐 내에서 해당 움직임벡터가 가리키는 지점을 찾는다. 타깃 픽쳐 내에서 해당 타깃 지점을 포함하는 4x4 타깃 서브 블록의 움직임정보를 현재 블록의 스케일링된 움직임벡터를 유도할 때 이용할 수 있다. 혹은 현재 블록에서 복수개의 기준 좌표를 두고 각 기준 좌표들이 가리키는 타깃 지점을 탐색하여, 타깃 지점이 모두 동일한 4x4 타깃 서브 블록을 가리킨다면 해당 타깃 서브 블록의 움직임정보를 현재 블록의 스케일링된 움직임벡터를 유도할 때 사용하면 되지만, 복수개의 4x4 타깃 서브 블록들을 가리킨다면 각 타깃 서브 블록들의 평균 움직임정보를 이용하여 현재 블록의 스케일링된 움직임벡터를 유도할 때 사용할 수도 있다. 타깃 지점은 도 11의 예시처럼 현재 블록 중앙 영역의 2개의 타깃 위치를 사용할 수도 있지만 그 이상을 사용하는 것도 물론이고 다른 현재 블록 내 있는 화소 위치 어디든 사용 가능하다. 평균 움직임정보를 계산하기 위한 움직임 정보도 당연히 2개 이상이 될 수 있다. 혹은 각 복수개의 타깃 서브 블록들을 이용하여 복수개의 스케일링된 움직임벡터를 유도 후, 복수개의 예측 블록을 생성하여 해당 예측 블록들을 가중합하여 최종 예측 블록을 생성할 수도 있다.
도 12, 13은 현재 블록 내 서브 블록 단위로 시간적 후보 움직임정보를 유도할 때, 타깃 블록을 결정하는 방법에 대해서 설명하기 위한 예시 도면이다. 도 12는 서브 블록 단위로 기준 위치가 1개인 경우의 예시 도면이고, 도 13은 서브 블록 단위로 복수개의 기준 위치가 사용될 때의 예시 도면이다.
도 12에서는 서브 블록 단위로 기준 위치가 서브 블록의 좌상단 화소 위치로 예시하였다. 현재 블록의 맨 우하단 서브 블록의 기준 좌표를 기점으로 찾은 타깃 픽쳐의 4x4 타깃 서브 블록을 기준으로 현재 블록과 동일한 크기의 타깃 블록을 결정한 후, 현재 블록과 타깃 블록의 동일 위치 서브 블록들끼리 타깃 서브 블록들의 움직임 정보를 이용하여 현재 서브 블록의 스케일링된 움직임벡터를 각각 유도할 수도 있다. 혹은 서브 블록의 기준 좌표에서 타깃 위치를 가리키는 움직임벡터를 통해 타깃 픽쳐의 타깃 위치를 파악한 후, 해당 타깃 위치가 포함된 4x4 타깃 서브 블록의 움직임정보를 현재 서브 블록의 스케일링된 움직임벡터를 유도할 때 사용할 수 있다.
도 13에서는 현재 서브 블록 별로 복수개의 타깃 서브 블록을 이용하여 스케일링된 움직임벡터를 유도하는 방법을 설명하기 위한 예시 도면이다. 도 13의 예시처럼 서브 블록 D의 스케일링된 움직임벡터를 유도할 경우에는, 서브 블록 D 내의 복수개의 기준 좌표를 기점으로 타깃 픽쳐 내 타깃 위치를 파악한다. 이 후, 타깃 위치가 동일한 타깃 서브 블록을 가리킬 경우 해당 타깃 서브 블록의 움직임정보를 이용하여 현재 서브 블록의 스케일링된 움직임벡터를 유도할 수 있지만, 도 13처럼 타깃 위치들이 서로 다른 타깃 서브 블록을 가리킬 경우에는 각 타깃 서브 블록들의 평균 움직임정보를 계산하여 현재 서브 블록의 스케일링된 움직임벡터를 유도할 수도 있다. 또한, 각 타깃 서브 블록들의 움직임정보를 이용하여 서로 다른 스케일링된 움직임벡터를 따로 유도한 후, 예측 서브 블록을 각각 생성하고, 각 예측 서브 블록들을 가중합하여 최종 예측 블록을 생성할 수도 있다. 현재 블록 내 다른 서브 블록들(서브 블록 A, B, C)도 전술한 방법으로 예측 서브 블록을 생성할 수 있다.
본 실시예에서는 도 9의 904 단계를 상세히 설명할 것이다. History-based 후보는 (이하, '복원정보기반 후보'라 칭함) 시퀀스, 픽쳐 혹은 슬라이스 단위로, 현재 블록 이전에 부호화/복호화된 움직임정보를 저장하기 위한 복원정보기반 움직임 후보 저장 버퍼(이하, 'H 버퍼'라 칭함)가 존재한다. 해당 버퍼는 코딩된 움직임정보를 FIFO(First-in First-out) 방식으로 버퍼를 업데이트하면서 관리한다. H 버퍼는 CTU, CTU행, 슬라이스 혹은 픽쳐 단위로 초기화될 수 있고, 현재 블록이 움직임 정보에 의해 예측되어 코딩된 경우, 해당 움직임 정보들을 H 버퍼에 업데이트 한다. H 버퍼에 저장된 움직임정보들은 도 9의 S904 단계에서 Merge/AMVP 후보로 이용될 수 있다. H 버퍼의 후보 움직임정보를 후보 리스트에 추가할 때에는 H 버퍼에 가장 최근에 업데이트된 움직임정보 순으로 추가할 수도 있고, 그 반대도 가능하다. 혹은 화면 간 예측 모드에 따라서, H 버퍼의 움직임정보를 어느 순서로 꺼내어 후보 리스트에 추가할지를 결정할 수도 있다.
구체적으로, 일 예로, H 버퍼와 후보 리스트 간의 중복성 체크를 통해서, H 버퍼의 움직임정보가 후보 리스트에 추가될 수 있다. 머지 모드(Merge mode)의 경우, 중복성 체크는, 후보 리스트의 머지 후보 일부와 H 버퍼의 움직임정보 일부에 대해서 수행될 수 있다. 후보 리스트의 일부는, 공간적 머지 후보 중 좌측 블록 및 상단 블록을 포함할 수 있다. 다만, 이에 한정되지 아니하며, 공간적 머지 후보 중 어느 하나의 블록으로 제한될 수도 있고, 좌하단 블록, 우상단 블록, 좌상단 블록 또는 시간적 머지 후보 중 적어도 하나를 더 포함할 수도 있다. 한편, H 버퍼의 일부는, H 버퍼에 가장 최근에 추가된 m개의 움직임정보를 의미할 수 있다. 여기서, m은 1, 2, 3 또는 그 이상이고, 부호화/복호화 장치에 기-약속된 고정된 값일 수 있다. H 버퍼에 5개의 움직임정보가 저장되어 있고, 각 움직임정보에 1 내지 5의 인덱스가 할당되어 있다고 가정한다. 인덱스가 클수록 나중에 저장된 움직임정보를 의미한다. 이때, 인덱스 5, 4 및 3을 가진 움직임정보와 상기 후보 리스트의 머지 후보 간의 중복성을 체크할 수 있다. 또는, 인덱스 5 및 4를 가진 움직임정보와 상기 후보 리스트의 머지 후보 간의 중복성을 체크할 수도 있다. 또는, 가장 나중에 추가된 인덱스 5의 움직임정보는 제외하고, 인덱스 4 및 3을 가진 움직임정보와 상기 후보 리스트의 머지 후보 간의 중복성을 체크할 수도 있다. 중복성 체크 결과, 동일한 움직임정보가 하나라도 존재하는 경우, H 버퍼의 움직임정보는 후보 리스트에 추가되지 않을 수 있다. 반면 동일한 움직임정보가 존재하지 않는 경우, H 버퍼의 움직임정보는 후보 리스트의 마지막 위치에 추가될 수 있다. 이때, H 버퍼에서 최근에 저장된 움직임정보의 순서로(즉, 인덱스가 큰 순서부터 작은 순서로) 후보 리스트에 추가될 수 있다. 다만, H 버퍼에서 가장 나중에 저장된 움직임정보(가장 큰 인덱스를 가진 움직임정보)는 후보 리스트에 추가되지 않도록 제한될 수도 있다.
반면, AMVP 모드의 경우, H 버퍼에 먼저 저장된 움직임정보(특히, 움직임벡터)의 순서로 후보 리스트에 추가될 수 있다. 즉, H 버퍼에 저장된 움직임정보 중 작은 인덱스를 가진 움직임정보가 큰 인덱스를 가진 움직임정보보다 먼저 후보 리스트에 추가될 수 있다.
한편, H 버퍼에 저장된 움직임벡터가 후보 리스트에 동일하게 추가될 수도 있고, 전술한 라운딩 과정이 적용된 움직임벡터가 후보 리스트에 추가될 수도 있다. 라운딩은, 현재 블록의 움직임벡터의 정확도에 대응되도록 후보 움직임정보의 정확도를 조절하기 위함이다. 수학식 3을 참조하면, mvXR는 라운딩 과정이 적용된 움직임벡터를, mvX는 H 버퍼에 저장된 움직임벡터를 각각 의미할 수 있다. 또한, 쉬프트값인 rightShift 또는 leftShift 중 적어도 하나는, 움직임벡터의 정확도(혹은 해상도)를 고려하여 결정될 수 있다. 예를 들어, 움직임벡터의 정확도가 1/4 샘플인 경우, 쉬프트값은 2로 결정되고, 1/2 샘플인 경우, 쉬프트값은 3으로 결정될 수 있다. 움직임벡터의 정확도가 1 샘플인 경우, 쉬프트값은 4로 결정되고, 4 샘플인 경우, 쉬프트값은 6으로 결정될 수 있다. RightShift와 leftShift는 동일한 값으로 설정될 수 있다.
H 버퍼에 저장되는 움직임정보를 Merge/AMVP 후보 리스트에 추가할 때, 추가 될 수 있는 움직임정보의 개수를 제한할 수도 있다. 예를 들어, Merge/AMVP 후보 리스트의 최대 후보 개수까지 모두 H 버퍼에 있는 움직임정보를 이용하여 채울 수도 있지만, (최대 후보 개수 - 1)개 까지만 채울 수도 있다.
H 버퍼에 저장되는 후보 움직임정보의 개수는 영상 부호화 장치와 영상 복호화 장치에서 동일한 조건으로 결정할 수도 있고, 상위 헤더에서 영상 복호화 장치로 전송될 수도 있다.
구체적으로, Merge 후보 리스트의 경우, H 버퍼의 움직임정보를 이용하여 (최대 후보 개수-n)개까지만 채울 수 있다. 여기서, n은 1, 2, 또는 그 이상의 정수일 수 있다. 최대 후보 개수는, 부호화/복호화 장치에 기-정의된 고정된 개수(예를 들어, 5개, 6개, 7개, 8개)로 결정되거나, 최대 후보 개수를 지시하기 위해 시그날링된 정보에 기초하여 가변적으로 결정될 수도 있다. 한편, AMVP 후보 리스트의 경우, H 버퍼의 움직임정보를 이용하여 최대 후보 개수까지 채울 수 있다. AMVP 후보 리스트의 최대 후보 개수는 2개, 3개, 4개 또는 그 이상일 수 있다. AMVP 후보 리스트의 경우, Merge 후보 리스트와 달리 최대 후보 개수가 가변적이지 않을 수 있다.
H 버퍼를 업데이트하는 제1 방법은 도 14를 참조한다. H 버퍼는 첫번째 CTU 행에서는 블록의 코딩 순으로 움직임정보들을 업데이트 한다. 두번째 CTU행부터는 블록의 코딩 순으로 움직임정보들을 업데이트 하는 것은 동일하지만, 상단 CTU 내에서 현재 CTU행과 인접한 복원 블록들에 저장된 움직임정보들을 추가 고려하여 H 버퍼를 업데이트할 수도 있다. 도 14에서 CTU 내의 mi는 Motion Information의 약어로써, 마지막 CTU행을 제외한 나머지 CTU행에서 맨 하단 블록들에 저장되어 있는 복원 움직임정보이다. H 버퍼에는 최대 P(P는 1 이상의 정수)개의 움직임정보가 업데이트 될 수 있으며, H 버퍼가 초기화되는 단위에 따라서 업데이트 방법이 달라질 수 있다. 본 실시예에서는 CTU 단위로 초기화될 때와, CTU행 단위로 초기화될 때에 따른 H 버퍼 업데이트 방법에 대해서 설명할 것이다. 먼저 H 버퍼가 CTU 단위로 초기화될 때 두번째 CTU행의 각 CTU는 코딩을 시작하기 전에 H 버퍼를 mi를 이용하여 초기화할 수 있다. 여기서 초기화의 의미는 완전히 비워진 H 버퍼에 어떠한 움직임정보를 다시 업데이트한다는 것을 의미한다. 예를 들어, CTU8을 코딩 하기 전에 CTU3의 하단 4개의 mi를 이용하여 H 버퍼를 초기화할 수 있다. mi를 업데이트하는 순서 또한 다양하게 결정할 수 있다. 현재 좌측에 있는 mi부터 업데이트할 수도 있고, 그 반대로 우측에 있는 mi부터 업데이트할 수도 있다. H 버퍼가 CTU행 단위로 초기화될 때에는 각 CTU행의 첫번째 CTU에서만 상단 CTU의 mi를 이용해서 업데이트할 수도 있다. 또한, 각 초기화 단위로 H 버퍼를 모두 비워서 초기화를 할 수도 있다. 한편, 가장 최근에 부호화/복호화된 움직임정보가 H 버퍼에 기-저장된 움직임정보와 동일한 경우, 가장 최근의 움직임정보는 H 버퍼에 추가되지 않을 수 있다. 또는, 가장 최근의 움직임정보와 동일한 움직임정보를 H 버퍼에서 제거하고, 가장 최근의 움직임정보를 H 버퍼에 저장할 수도 있다. 이때, 가장 최근의 움직임 정보는, H 버퍼의 가장 마지막 위치에 저장될 수 있다.
H 버퍼를 업데이트하는 제2 방법은 도 15를 참조한다. 제2 방법은 H 버퍼 이외에 추가 움직임후보 저장 버퍼를 둔다. 이 버퍼는 상단 CTU의 복원 움직임정보(이하, 'Vmi'라 칭함)를 저장하는 버퍼(이하, 'V 버퍼'라 칭함)이다. 이 V 버퍼는 전술한 H 버퍼가 CTU행 혹은 슬라이스 단위로 초기화될 때 이용 가능할 수 있으며, V 버퍼는 CTU행 단위로 초기화될 수 있다. 현재 픽쳐에서 마지막 CTU행을 제외한 나머지 CTU행에서는 하단 CTU행을 위해서 V 버퍼 내 Vmi를 업데이트 해야 한다. 여기서 V 버퍼에는 최대 Q(Q는 1 이상의 정수)개의 움직임정보가 업데이트 될 수 있고, Vmi에 해당하는 움직임정보는 다양한 방법으로 결정할 수 있다. 예를 들어, Vmi는 CTU의 센터 좌표가 포함된 블록의 복원 움직임정보가 될 수도 있고, 상단 CTU에서 센터 좌표가 포함된 블록을 코딩 할 때, H 버퍼에 포함된 가장 최신 순의 움직임정보일 수도 있다. 하나의 CTU에서 업데이트되는 Vmi는 1개 이상일 수 있으며 업데이트된 Vmi는 하단 CTU의 H 버퍼를 업데이트할 때 사용된다. 첫번째 CTU행을 제외한 나머지 CTU행에서는 각 CTU 별로 상단 CTU행의 V 버퍼에 저장된 Vmi를 현재 H 버퍼에 업데이트한다. 상단 CTU행의 V 버퍼에 저장된 Vmi가 복수개일 경우, 가장 먼저 업데이트 된 움직임 정보를 먼저 꺼내어 H 버퍼에 업데이트 할 수도 있고 그 반대의 순서로 업데이트 할 수도 있다. 업데이트를 하는 시기는 각 CTU를 코딩 하기 전 일 수도 있고, 각 CTU에서 상단 CTU와 접경하는 블록들을 코딩 하기 전 일 수도 있는 등 다양한 시점에서 V 버퍼에 저장된 상단 CTU의 Vmi를 H 버퍼에 업데이트를 할 수 있다. 또한, 상단 CTU 뿐 아니라 좌상단 CTU, 우상단 CTU의 Vmi도 H 버퍼에 업데이트할 수 있다.
전술한 V 버퍼의 후보 움직임정보는 도 9의 MERGE/AMVP 후보 리스트 유도 과정에 독립적으로 추가될 수도 있다. V 버퍼 후보 움직임정보를 추가할 때 MERGE/AMVP 후보 리스트 내에서의 해당 우선 순위는 다양하게 결정할 수 있다. 예를 들어, S904 단계 이후에 V 버퍼 내 유효한 움직임정보가 있다면 해당 후보 움직임정보를 S904, S905 단계 사이에서 추가될 수도 있다.
본 실시예에서는 도 9의 905 단계를 상세히 설명할 것이다. S901~S904 단계를 거쳐서 Merge/AMVP 후보 리스트에 채워진 움직임정보가 1개 이하인 경우에는 본 단계를 생략한다. Merge/AMVP 후보 리스트에 채워진 움직임정보가 2개 이상인 경우에는 각 후보들 간 평균 후보 움직임정보를 생성하여 후보 리스트를 채울 수 있다. 평균 후보 움직임정보의 움직임벡터는 움직임정보의 각 예측 방향 별로(List 0 혹은 List 1) 유도되는데, 후보 리스트에 저장된 동일한 방향의 움직임벡터를 평균하여 생성한 움직임벡터를 의미한다. 평균 후보 움직임정보를 유도할 때, 평균할 때 이용된 움직임정보의 참조 픽쳐 색인 정보가 다르다면 우선 순위가 높았던 움직임정보의 참조 픽쳐 정보를 평균 후보 움직임정보의 참조 픽쳐 색인 정보로 결정할 수 있다. 혹은 우선 순위가 낮았던 움직임정보의 참조 픽쳐 정보를 평균 후보 움직임정보의 참조 픽쳐 색인 정보로 결정할 수도 있다.
평균 후보 움직임정보를 Merge/AMVP 후보 리스트에 추가할 때, 생성된 평균 후보 움직임정보를 또 다른 평균 후보 움직임정보를 생성할 때 이용할 수도 있다. 이러한 예시를 설명하기 위해 도 16을 참조한다. 도 16에서 좌측 테이블은 도 9의 S905 단계를 거치기 전 Merge/AMVP 후보 리스트이고, 우측 테이블은 도 9의 S905 단계를 거친 후 Merge/AMVP 후보 리스트이다. 좌측 테이블을 보면 2개의 후보 리스트에는 0, 1번에 해당하는 후보 움직임정보가 채워져 있다. 이 2개의 움직임정보를 이용하여 2번에 해당하는 평균 후보 움직임정보를 생성할 수 있다. 도 16의 예시에서는 0번 후보의 List 0 방향 움직임벡터 (1, 1), 참조 픽쳐 색인 1인 움직임 정보와 1번 후보의 List 0 방향 움직임벡터 (3, -1), 참조 픽쳐 색인 0인 움직임정보를 평균하여 2번 후보의 List 0 방향 움직임정보를 채운다. List 1 방향의 경우 0번 후보의 움직임정보가 존재하지 않는다. 이런 경우에는 List 1 방향의 후보가 존재하는 1번 후보의 움직임정보를 그대로 가져와서 2번 후보의 List 1 방향 움직임정보를 채운다. 만약 평균 후보 움직임정보를 유도할 때 어느 한 방향의 움직임정보가 모두 없을 경우에는, 해당 방향은 따로 유도하지 않는다. 이렇게 유도된 2번의 평균 후보 움직임정보를 이용하여 추가적인 평균 후보 움직임정보를 생성할 수 있다. 3번의 평균 후보 움직임정보는 0, 2번 후보의 평균 후보 움직임정보이고, 4번의 평균 후보 움직임정보는 1, 2번 후보의 평균 후보 움직임정보이다. 평균 후보 움직임정보를 생성하는 방법은 전술한 바와 같다.
도 9의 S905 단계를 거치기 전의 Merge/AMVP 후보 리스트에는 중복된 후보 움직임정보가 존재할 수도 있다. 평균 후보 움직임정보를 이러한 중복된 후보 움직임정보를 제거하는데 이용할 수도 있다. 도 17은 이러한 예시를 나타낸 것이다. 좌측, 우측 테이블은 도 16에서 설명한 바와 같다. 좌측 테이블을 보면 0, 2번의 후보 움직임정보가 완전히 동일하다. 이럴 경우, 우선 순위가 낮은 2번 후보 움직임정보를 평균 후보 움직임정보로 대체할 수 있다. 도 17의 예시에서는 0, 1번의 평균 후보 움직임정보로 기존의 2번 후보 움직임정보를 대체하였고, 3번은 0, 2번의 평균 후보 움직임정보, 4번은 1, 2번의 평균 후보 움직임정보를 이용하여 후보 리스트를 채운 것이다.
평균 후보 움직임정보를 이용하여 Merge/AMVP 후보 리스트를 채울 수 있는 개수 또한 제한될 수 있다. 예를 들어, Merge/AMVP 후보 리스트의 최대 후보 개수까지 모두 평균 후보 움직임정보를 이용하여 채울 수도 있지만, (후보 리스트 최대 개수 - 1)개 까지만 채울 수도 있다. 또한 평균 후보 움직임정보를 계산할 때 이용되는 후보 움직임정보가 3개 이상일 수 있으며, 3개 이상의 후보 움직임정보를 평균한 정보가 아닌 Median 정보를 평균 후보 움직임정보로 결정할 수도 있다.
하기 본 실시예에서는 움직임정보의 움직임벡터를 효율적으로 전송하는 방법에 대해서 설명할 것이다. 전술한 AMVP 모드에서는 영상 부호화 장치에서 결정된 현재 블록의 움직임벡터를 움직임벡터 예측기(도 5, 8에서의 MVP) 정보와 차분하여 얻은 움직임벡터 차분(도 5, 8에서의 MVD) 정보를 영상 복호화 장치로 전송한다. 또한, 전술한 MERGE 모드에서는 MVD 정보의 전송 없이 선택된 머지 후보의 움직임정보를 현재 블록의 움직임정보로 설정한다. 그러나 MERGE 모드에서도 추가적인 MVD 정보를 전송한다면 움직임정보의 정확성을 높여 예측 효율을 향상시킬 수 있을 것이다. 이 때, MVD 정보는 통상적으로 일정한 패턴을 찾을 수 없는 랜덤한 정보라고 알려져 있다. 다만, 특정 상황이 전제가 된다면 이러한 MVD 정보도 예측 가능한 정보로 바뀔 수 있다.
도 18을 이용하여 전술한 특정 상황에 대해서 설명하고자 한다. 도 18에서 현재 픽쳐 내에서 코딩하고자 하는 현재 블록이 있다. 현재 블록 주변에는 복원된 블록 A~D가 있다. 이 때, 상단에서 하단 방향으로 특정 물체가 등가속도 운동을 하며 현재 블록을 관통한다고 가정해보면, 블록 C, 블록 B, 현재 블록을 거쳐 움직임벡터가 일정한 크기로 증가할 것이라는 것을 예측해 볼 수 있다. 혹은 등감속도 운동을 하는 것도 동일한 원리로 생각해 볼 수 있다. 다시 돌아와서 특정 물체가 등가속도 운동을 하며 현재 블록을 관통할 때, 움직임벡터가 일정한 크기로 증가한다면 현재 블록에서는 주변 블록의 움직임벡터에 해당 블록의 MVD가 더해진 지점을 가리키는 움직임벡터가 최적 움직임정보로 결정될 확률이 높다. 전술한 상황을 전제하여 도 18을 AMVP 모드 관점에서 상세히 살펴보면, 블록 C의 움직임벡터를 블록 B에서 MVP 정보로 이용하면서, 블록 B의 최적 움직임벡터가 결정된 후 블록 C의 움직임벡터와 (즉, 블록 B의 MVP) 차분한 MVD 정보와, 현재 블록이 블록 B의 움직임벡터를 MVP로 이용하고 현재 블록의 최적 움직임벡터와 블록 B의 MVP를 차분한 MVD 정보가 아주 유사하다면 이를 이용하여 움직임정보를 좀 더 효율적으로 코딩 할 수 있을 것이다. MERGE 모드 관점에서 살펴보면, MVD 정보를 추가로 전송하여 더 효율적인 코딩을 할 수 있을 것이다.
하기 실시예에서는 이러한 MVD 정보를 효율적으로 예측 및 부호화/복호화하는 방법에 대해서 상세히 설명할 것이다.
도 19는 영상 부호화 장치와 영상 복호화 장치 내 예측부에서 MERGE 후보 탐색부와 AMVP 후보 탐색부의 후보 리스트 예시표이다.
도 19의 좌측 테이블은 도 3의 S307 단계 혹은 도 4의 S403 단계를 마친 후에 나올 수 있는 Merge/AMVP 후보 리스트이다. 우측 테이블은 이미 Merge/AMVP 후보 리스트에 존재하는 움직임후보들 중 MVD가 (0, 0)이 아닌 움직임정보들을 이용한 새로운 움직임후보를 생성한 뒤의 후보 리스트이다. MVD가 (0, 0)이 아닌 움직임정보의 움직임벡터와 MVD를 더하여 새로운 후보 움직임정보를 생성하여 후보 리스트에 채워 넣는 것이다. 양방향 예측인 후보 움직임정보는 하나라도 MVD가 (0, 0)이 아니면 전술한 방법으로 새로운 후보 움직임정보를 생성할 수도 있다. 이러한 방법들은 새로운 부호화, 복호화 정보가 필요한 것이 아니므로 전술한 도 5, 8의 흐름도를 이용하여 움직임정보를 코딩할 수 있다. 혹은 이러한 새로운 후보 움직임정보를 생성하지 않고, Merge/AMVP 후보 리스트 내 움직임벡터와 그 MVD를 합한 움직임벡터를 최종 후보 움직임벡터로 결정할 수도 있고, 이럴 경우 후보 움직임벡터가 현재 후보 움직임정보 내 움직임벡터와 MVD가 더해진 것이라는 것을 알려주는 정보를 추가로 전송할 수도 있다.
도 20은 움직임벡터를 위한 Merge/AMVP 후보 리스트가 아닌 MVD를 위한 Merge/AMVP 후보 리스트를 추가로 생성하여, 복원 영역의 MVD를 현재 블록의 MVD로 이용하는 방법에 대해서 설명하기 위한 예시표이다. 도 20의 좌측 테이블은 움직임벡터를 위한 Merge/AMVP 후보 리스트가 완성된 예시표이고, 우측 테이블은 움직임벡터를 위한 Merge/AMVP 후보 리스트 내 MVD 정보를 이용하여 만든 MVD Merge/AMVP 후보 리스트이다. 좌측 테이블의 0, 1번의 후보 움직임정보 내 MVD를 이용하여 우측 테이블의 0, 1번 MVD를 결정하였고, 4, 5번의 후보 움직임정보 내 MVD를 이용하여 우측 테이블의 2, 3번 MVD를 결정하였다. 여기에 추가로, 영상 부호화 장치와 영상 복호화 장치가 복원 움직임정보들을 이용하여 또다른 후보 MVD 정보를 MVD Merge/AMVP 후보 리스트에 추가할 수도 있다. 이렇게 유도된 MVD Merge/AMVP 후보 리스트 정보를 이용하여 Merge 모드에서는 MVD 정보를 추가로 전송할 수도 있고, AMVP 모드에서는 MVD 정보를 전송하지 않고 Merge 할 수도 있다. 상세한 움직임정보의 부호화/복호화 흐름은 도 21 및 22를 참조한다.
도 21은 MVD Merge/AMVP 후보 리스트 정보를 이용한 움직임정보를 부호화하는 흐름도이다. S2101~S2107 단계의 설명은 도 5의 S501~S507 단계의 설명과 동일하다. S2108 단계에서는 MVD Merge를 할 것인지 말 것인지를 알려주는 동작 정보를 부호화한다. MVD Merge는, MERGE 모드 또는 AMVP 모드를 통해 복원된 움직임벡터에 소정의 MVD를 가산하여 최종 움직임벡터를 유도하는 것을 의미할 수 있다. S2109 단계에서는 해당 동작 정보가 참인지 거짓인지 판단하고, 해당 동작 정보가 거짓이면 본 흐름도를 종료하고 해당 동작 정보가 참이면 MVD Merge 후보 리스트 내에서 어떤 MVD 정보를 현재 움직임벡터에 더해줄 것인지를 알려주는 후보 색인 정보를 부호화하고 본 흐름도를 종료한다. S2111~S2113 단계는 도 5의 S508~S510 단계의 설명과 동일하다. S2114 단계에서는 과거 방향의 MVD를 전송할지 말지를 결정하는 동작 정보를 부호화한다. S2115 단계에서는 해당 동작 정보가 참인지 거짓인지를 판단하고, 참이면 S2116 단계로 넘어가고 거짓이면 S2117 단계로 넘어간다. S2116, S2117 단계의 설명은 도 5의 S511, S512 단계의 설명과 동일하다. S2118 단계에서는 MVD AMVP 후보 리스트에서 과거 방향의 움직임정보의 MVD를 가리키는 후보 색인 정보를 부호화한다. S2119, S2120 단계의 설명은 도 5의 S513, S514 단계의 설명과 동일하다. S2121 단계에서는 미래 방향의 MVD를 전송할지 말지를 결정하는 동작 정보를 부호화한다. S2122 단계에서는 해당 동작 정보가 참인지 거짓인지를 판단하고, 참이면 S2123 단계로 넘어가고 거짓이면 S2124 단계로 넘어간다. S2125 단계에서는 MVD AMVP 후보 리스트에서 미래 방향의 움직임정보의 MVD를 가리키는 후보 색인 정보를 부호화하고 본 흐름도를 종료한다. S2126 단계의 설명은 S517 단계의 설명과 동일하다.
도 22는 MVD Merge/AMVP 후보 리스트 정보를 이용한 움직임정보를 복호화하는 흐름도이다. S2201~S2207 단계의 설명은 도 8의 S801~S807 단계의 설명과 동일하다. S2208 단계에서는 MVD Merge를 할 것인지 말 것인지를 알려주는 동작 정보를 복호화한다. MVD Merge는, MERGE 모드 또는 AMVP 모드를 통해 복원된 움직임벡터에 소정의 MVD를 가산하여 최종 움직임벡터를 유도하는 것을 의미할 수 있다. S2209 단계에서는 해당 동작 정보가 참인지 거짓인지 판단하고, 해당 동작 정보가 거짓이면 본 흐름도를 종료하고 해당 동작 정보가 참이면 MVD Merge 후보 리스트 내에서 어떤 MVD 정보를 현재 움직임벡터에 더해줄 것인지를 알려주는 후보 색인 정보를 복호화하고 본 흐름도를 종료한다. S2211~S2213 단계는 도 8의 S808~S810 단계의 설명과 동일하다. S2214 단계에서는 과거 방향의 MVD를 전송할지 말지를 결정하는 동작 정보를 복호화한다. S2215 단계에서는 해당 동작 정보가 참인지 거짓인지를 판단하고, 참이면 S2216 단계로 넘어가고 거짓이면 S2217 단계로 넘어간다. S2216, S2217 단계의 설명은 도 8의 S811, S812 단계의 설명과 동일하다. S2218 단계에서는 MVD AMVP 후보 리스트에서 과거 방향의 움직임정보의 MVD를 가리키는 후보 색인 정보를 복호화한다. S2219, S2220 단계의 설명은 도 8의 S813, S814 단계의 설명과 동일하다. S2221 단계에서는 미래 방향의 MVD를 전송할지 말지를 결정하는 동작 정보를 복호화한다. S2222 단계에서는 해당 동작 정보가 참인지 거짓인지를 판단하고, 참이면 S2223 단계로 넘어가고 거짓이면 S2224 단계로 넘어간다. S2225 단계에서는 MVD AMVP 후보 리스트에서 미래 방향의 움직임정보의 MVD를 가리키는 후보 색인 정보를 복호화하고 본 흐름도를 종료한다. S2226 단계의 설명은 S817 단계의 설명과 동일하다.
Merge 모드에서는 Merge 후보 색인 정보가 가리키는 움직임정보에 더하여 추가적인 MVD 정보를 전송하여 Merge 후보 색인이 가리키는 움직임정보의 움직임벡터에 추가적인 MVD 정보를 더하여 움직임벡터를 결정할 수도 있다. 이 때, Mege 모드를 위한 후보 리스트는 k개의 머지 후보로 구성되고, 여기서 k는 4, 5, 6 또는 그 이상의 자연수일 수 있다. 각 머지 후보에 인덱스가 할당되며, 인덱스는 0 내지 (k-1)의 값을 가진다. 다만, MVD Merge가 적용되는 경우, Merge 후보 색인 정보는 0 또는 1의 값만을 가질 수 있다. 즉, MVD Merge가 적용되는 경우, Merge 후보 색인 정보에 따라, 후보 리스트에 속한 첫번째 머지 후보 또는 두번째 머지 후보 중 어느 하나로부터 현재 블록의 움직임정보가 유도될 수 있다. 추가적인 MVD 정보는 다양한 형태로 전송될 수 있다. MVD를 (x, y)와 같은 벡터 형태로 전송하는 것이 아니라 현재 Merge 후보 색인 정보가 가리키는 움직임정보의 움직임벡터를 기준으로 상단, 하단, 좌측, 우측, 우하단 대각, 좌하단 대각, 우상단 대각, 좌상단 대각 등의 방향 정보와 각 방향으로 얼마나 떨어져 있는지를 알려주는 거리 정보를 통해 MVD를 표현할 수도 있다.
구체적으로, 현재 블록의 MVD는 오프셋 벡터(offsetMV)에 기초하여 유도될 수 있다. MVD는 L0 방향의 MVD(MVD0) 또는 L1 방향의 MVD(MVD1) 중 적어도 하나를 포함하며, MVD0와 MVD1 각각은 오프셋 벡터를 이용하여 유도될 수 있다.
오프셋 벡터는, 오프셋 벡터의 길이(mvdDistance)와 방향(mvdDirection)에 기초하여 결정될 수 있다. 예를 들어, 오프셋 벡터(offsetMV)는, 다음 수학식 4와 같이 결정될 수 있다.
[수학식 4]
offsetMV[ x0 ][ y0 ][ 0 ] = ( mvdDistance[ x0 ][ y0 ] << 2 ) * mvdDirection[ x0 ][ y0 ][0]
offsetMV[ x0 ][ y0 ][ 1 ] = ( mvdDistance[ x0 ][ y0 ] << 2 ) * mvdDirection[ x0 ][ y0 ][1]
여기서, mvdDistance는 디스턴스 인덱스(distance_idx) 또는 소정의 플래그(pic_fpel_mmvd_enabled_flag) 중 적어도 하나를 고려하여 결정될 수 있다. 디스턴스 인덱스(distance_idx)는, MVD의 길이 또는 거리를 특정하기 위해 부호화된 인덱스를 의미할 수 있다. pic_fpel_mmvd_enabled_flag는, 현재 블록의 머지 모드에서 움직임 벡터가 정수 화소 정밀도를 사용하는지 여부를 지시할 수 있다. 예를 들어, pic_fpel_mmvd_enabled_flag가 제1 값인 경우, 현재 블록의 머지 모드는 정수 화소 정밀도를 사용한다. 즉, 이는 현재 블록의 움직임 벡터 해상도가 정수 샘플(integer pel)임을 의미할 수 있다. 반면, pic_fpel_mmvd_enabled_flag가 제2 값인 경우, 현재 블록의 머지 모드는 소수 화소 정밀도를 사용할 수 있다. 다시 말해, pic_fpel_mmvd_enabled_flag가 제2 값인 경우, 현재 블록의 머지 모드는 정수 화소 정밀도를 사용할 수도 있고, 소수 화소 정밀도를 사용할 수도 있다. 또는, pic_fpel_mmvd_enabled_flag가 제2 값인 경우, 현재 블록의 머지 모드는 소수 화소 정밀도만을 사용하도록 제한될 수도 있다. 소수 화소 정밀도의 예로, 1/2 샘플, 1/4 샘플, 1/8 샘플, 1/16 샘플 등이 있을 수 있다. 디스턴스 인덱스(distance_idx) 또는 전술한 플래그(pic_fpel_mmvd_enabled_flag) 중 적어도 하나는 부호화 장치에서 부호화되어 전송될 수 있다.
예를 들어, mvdDistance는 다음 표 1과 같이 결정될 수 있다.
distance_idx[ x0 ][ y0 ] MmvdDistance[ x0 ][ y0 ]
pic_fpel_mmvd_enabled_flag = = 0 pic_fpel_mmvd_enabled_flag = = 1
0 1 4
1 2 8
2 4 16
3 8 32
4 16 64
5 32 128
6 64 256
7 128 512
또한, mvdDirection는, 오프셋 벡터의 방향을 나타내며, 방향 인덱스(direction_idx)에 기초하여 결정될 수 있다. 여기서, 방향은, 좌, 우, 상, 하, 좌상, 좌하, 우상 또는 우하 중 적어도 하나의 방향을 포함할 수 있다. 예를 들어, mvdDirection는 다음 표 2와 같이 결정될 수 있다. 방향 인덱스(direction_idx)는 부호화 장치에서 부호화되어 전송될 수 있다.
direction_idx[ x0 ][ y0 ] mvdDirection[ x0 ][ y0 ][0] mvdDirection[ x0 ][ y0 ][1]
0 +1 0
1 -1 0
2 0 +1
3 0 -1
표 2에서, mvdDirection[ x0 ][ y0 ][0]는 MVD의 x 성분의 부호를 의미하고, mvdDirection[ x0 ][ y0 ][1]는 MVD의 y 성분의 부호를 의미할 수 있다. direction_idx가 0인 경우, MVD의 방향은 우 방향으로, direction_idx가 1인 경우, MVD의 방향은 좌 방향으로, direction_idx가 2인 경우, MVD의 방향은 하 방향으로, direction_idx가 3인 경우, MVD의 방향은 상 방향으로 각각 결정될 수 있다.
한편, MVD는 앞서 결정된 오프셋 벡터와 동일하게 설정될 수 있다. 또는, 오프셋 벡터는, 현재 블록의 참조 픽쳐와 현재 블록이 속한 현재 픽쳐 간의 POC 차이(PocDiff)를 고려하여 보정될 수 있고, 보정된 오프셋 벡터가 MVD로 설정될 수도 있다. 이 경우, 현재 블록은 양방향 예측을 부호화/복호화되며, 상기 현재 블록의 참조 픽쳐는 제1 참조 픽쳐(L0 방향의 참조 픽쳐)와 제2 참조 픽쳐(L1 방향의 참조 픽쳐)를 포함할 수 있다. 설명의 편의를 위해, 이하 제1 참조 픽쳐와 현재 픽쳐 간의 POC 차이를 PocDiff0라 하고, 제2 참조 픽쳐와 현재 픽쳐 간의 POC 차이를 PocDiff1라 한다.
PocDiff0와 PocDiff1이 동일한 경우, 현재 블록의 MVD0과 MVD1은 각각 오프셋 벡터로 동일하게 설정될 수 있다.
PocDiff0와 PocDiff1이 동일하지 않은 경우에 있어서, PocDiff0의 절대값이 PocDiff1의 절대값보다 크거나 같은 경우, MVD0는 오프셋 벡터로 동일하게 설정될 수 있다. 한편, MVD1은 기-설정된 MVD0에 기초하여 유도될 수 있다. 예를 들어, 제1 및 제2 참조 픽쳐가 롱텀 참조 픽쳐인 경우, MVD1은 MVD0에 제1 스케일링 팩터를 적용하여 유도될 수 있다. 제1 스케일링 팩터는 PocDiff0와 PocDiff1에 기초하여 결정될 수 있다. 반면, 제1 또는 제2 참조 픽쳐 중 적어도 하나가 숏텀 참조 픽쳐인 경우, MVD1은 MVD0에 제2 스케일링 팩터를 적용하여 유도될 수 있다. 제2 스케일링 팩터는 부호화/복호화 장치에 기-약속된 고정된 값(예를 들어, -1/2, -1 등)일 수 있다. 다만, 제2 스케일링 팩터는, PocDiff0의 부호와 PocDiff1의 부호가 서로 다른 경우에 한하여 적용될 수 있다. 만일, PocDiff0의 부호와 PocDiff1의 부호가 서로 동일한 경우, MVD1은 MVD0와 동일하게 설정되고, 별도의 스케일링이 수행되지 않을 수 있다.
한편, PocDiff0와 PocDiff1이 동일하지 않은 경우에 있어서, PocDiff0의 절대값이 PocDiff1의 절대값보다 작은 경우, MVD1은 오프셋 벡터로 동일하게 설정될 수 있다. 한편, MVD0은 기-설정된 MVD1에 기초하여 유도될 수 있다. 예를 들어, 제1 및 제2 참조 픽쳐가 롱텀 참조 픽쳐인 경우, MVD0은 MVD1에 제1 스케일링 팩터를 적용하여 유도될 수 있다. 제1 스케일링 팩터는 PocDiff0와 PocDiff1에 기초하여 결정될 수 있다. 반면, 제1 또는 제2 참조 픽쳐 중 적어도 하나가 숏텀 참조 픽쳐인 경우, MVD0은 MVD1에 제2 스케일링 팩터를 적용하여 유도될 수 있다. 제2 스케일링 팩터는 부호화/복호화 장치에 기-약속된 고정된 값(예를 들어, -1/2, -1 등)일 수 있다. 다만, 제2 스케일링 팩터는, PocDiff0의 부호와 PocDiff1의 부호가 서로 다른 경우에 한하여 적용될 수 있다. 만일, PocDiff0의 부호와 PocDiff1의 부호가 서로 동일한 경우, MVD0은 MVD1과 동일하게 설정되고, 별도의 스케일링이 수행되지 않을 수 있다. MVD에 관한 상세한 부호화, 복호화 흐름은 도 23 및 24를 참조한다.
도 23은 Merge 모드에서 추가적인 MVD를 포함한 움직임정보를 부호화하는 흐름도이다. S2301~S2307 단계의 설명은 도 5의 S501~S507 단계의 설명과 동일하다. S2308 단계에서는 Skip 모드 혹은 Merge 모드에서 추가 MVD 정보를 부호화 할 것인지 말 것인지를 알려주는 동작 정보를 부호화한다. S2309 단계에서는 해당 동작 정보가 참인지 거짓인지를 판단하고, 참이면 S2310 단계에서 추가 MVD 정보를 부호화한 후 본 흐름도를 종료하고, 거짓이면 바로 본 흐름도를 종료한다. S2311~S2320 단계의 설명은 도 5의 S508~S517 단계의 설명과 동일하다.
도 24는 Merge 모드에서 추가적인 MVD를 포함한 움직임정보를 복호화하는 흐름도이다. S2401~S2407 단계의 설명은 도 8의 S801~S807 단계의 설명과 동일하다. S2408 단계에서는 Skip 모드 혹은 Merge 모드에서 추가 MVD 정보를 복호화 할 것인지 말 것인지를 알려주는 동작 정보를 복호화한다. S2409 단계에서는 해당 동작 정보가 참인지 거짓인지를 판단하고, 참이면 S2410 단계에서 추가 MVD 정보를 복호화한 후 본 흐름도를 종료하고, 거짓이면 바로 본 흐름도를 종료한다. S2411~S2420 단계의 설명은 도 8의 S808~S817 단계의 설명과 동일하다.
본 실시예에서는 움직임정보를 부호화할 때, 움직임정보의 구성 요소 중 예측 방향 정보와 참조 픽쳐 색인 정보의 이진화 방법에 대해서 상세히 설명할 것이다.
예측 방향 정보와 참조 픽쳐 색인 정보는 참조 픽쳐 세트(이하, 'RPS'라 칭함)의 구성 상태에 따라서 이진화 방법이 달라질 수 있다. RPS 정보는 상위 헤더에서 전송될 수 있다. RPS 정보의 구성 요소는 예측 방향 별 참조 픽쳐의 개수, 참조 픽쳐 색인에 해당하는 참조 픽쳐와 해당 참조 픽쳐와 현재 픽쳐와의 차분 POC 정보 등이 포함될 수 있다. 도 25는 RPS 정보의 예시들로서 RPS가 어떻게 구성되어 있는지 알 수 있다. RPS는 list 0, list 1 방향에 각각 사용 되는 참조 픽쳐들로 구성되어 있다. 이러한 예시들을 이용하여 도 26에서 도 25의 각 예시 별로 예측 방향 정보와 참조 픽쳐 색인 정보의 이진화 방법을 설명할 것이다.
RPS 구성 상태를 확인하는 3가지 단계가 있다. 첫번째 단계는 (이하, '제1 RPS check'라 칭함) list 0, list 1 방향의 참조 픽쳐들이 RPS에 그 색인 순서까지 동일하게 저장되어 있는지를 판단한다. 단, list 0 방향의 참조 픽쳐 개수가 list 1 방향의 참조 픽쳐 개수보다 많거나 같아야 한다. 두번째 단계는 (이하, '제2 RPS check'라 칭함) list 1 방향의 참조 픽쳐들이 list 0 방향의 RPS의 참조 픽쳐 색인 순서에 상관없이 모두 포함되어 있는지를 판단한다. 세번째 단계는 (이하, '제3 RPS check'라 칭함) list 0 방향의 참조 픽쳐 개수가 list 1 방향의 참조 픽쳐 개수와 동일한지를 판단한다. 전술한 3가지 판단에 의거하여 예측 방향 정보와 참조 픽쳐 색인 정보의 이진화 방법이 달라질 수 있다.
예측 방향 정보를 이진화 하는 방법은 제1 RPS check, 블록 크기에 따른 양방향 예측 제한 등이 고려될 수 있다. 예를 들면, 가로와 세로 길이의 합이 소정의 문턱길이 이하인 경우에는 양방향 예측을 제한할 수 있다. 여기서, 문턱길이는 부호화/복호화 장치에 기-설정된 값으로서, 8, 12, 16 등일 수 있다. 제1 RPS check가 거짓이면서 양방향 예측이 허용된 블록에서는 양방향 예측에 1, list 0 방향에 00, list 1 방향에 01을 할당하여 이진화를 할 수 있다. 제1 RPS check가 거짓이면서 양방향 예측이 제한된 블록에서는 list 0 방향에 0, list 1 방향에 1을 할당하여 이진화를 할 수 있다. 제1 RPS check가 참이면서 양방향 예측이 허용된 블록에서는 양방향 예측에 1, list 0 방향에 0을 할당하여 이진화를 할 수 있다. 이는 list 1 방향의 참조 픽쳐들이 이미 list 0 방향에도 존재하므로, list 1 방향 예측을 수행할 필요가 없기 때문이다. 제1 RPS check가 참이면서 양방향 예측이 제한된 블록에서는 예측 방향 정보를 보낼 필요가 없으므로, 해당 정보의 이진화를 수행할 필요가 없다. 여기서 제1 RPS check가 거짓인 경우는 도 25의 RPS A를 참조하고, 제1 RPS check가 참인 경우는 도 25의 RPS B 혹은 C를 참조한다.
예측 방향 정보를 제1 RPS check 결과와 상관 없이 제1 RPS check가 거짓일 때의 방법으로만 이진화를 할 수도 있다. 이럴 경우, 양방향 예측이 제한되지 않았을 때 예측 방향이 list 0 혹은 list 1인지 알려주는 두번째 빈을 코딩해야 하는데, 이 때 제1 RPS check를 고려하여 CABAC을 이용한 엔트로피 부호화/복호화를 할 수도 있다. 예를 들어, 예측 방향 정보 두번째 빈의 context로써 제1 RPS check 조건을 고려할 때 해당 조건이 참이면 List 1 예측은 발생할 수 없으므로 도 27의 context 초기 확률 테이블에서 context 색인 정보가 4번인 초기 확률을, 해당 조건이 거짓이면 1번인 초기 확률을 사용하여 MPS (Most Probable Symbol), LPS (Least Probable Symbol)의 발생 확률 상태를 업데이트해 나갈 수 있다. 본 예시에서는 (도 17) list 0임을 알려주는 두번째 빈이 0 이므로 MPS 정보는 0 이고, LPS 정보는 1이다. 확률 정보는 도 28의 LPS 발생 확률 변화 규칙에 의해서 업데이트 될 수 있다. 도 28에서 가로축의 probability state index (σ)는 LPS의 발생 확률의 변화 정도를 기 설정하여 나타낸 색인 정보이고, 세로축은 LPS의 발생 확률을 나타낸 것이다. 예를 들어 σ가 5일 때, LPS 발생 확률은 약 40%인데 LPS의 발생 확률을 높이는 방향으로 업데이트가 진행된다면 도 19의 LPS 발생 확률 변화 규칙에 의해서 σ가 3일 때의 LPS 발생 확률인 약 44%의 확률로 업데이트 될 수 있다. 이러한 방법으로 도 27을 다시 보면, context 색인 정보가 4번일 때 LPS의 초기 발생 확률은 5%인데 이를 도 28에서 살펴보면 σ가 31번일 때와 같고, context 색인 정보가 1번일 때 LPS의 초기 발생 확률은 35%인데 이를 도 28에서 살펴보면 σ가 7번일 때와 같다. 이러한 발생 확률 상태를 초기 정보로 삼아서, 예측 방향 정보 두번째 빈의 context를 고려하여 MPS, LPS의 발생 확률 상태를 지속적으로 업데이트해 나갈 수 있다.
참조 픽쳐 색인 정보는 제1, 제2, 제3 RPS check를 모두 고려하여 이진화를 할 수 있다. 참조 픽쳐 색인 정보의 이진화는 각 예측 방향 별로 RPS에 있는 참조 픽쳐 개수에 기반하여 이진화가 수행될 수 있다. 도 26을 참조하면, 제1 RPS check가 거짓, 제2 RPS check가 참, 제3 RPS check가 거짓인 경우 참조 픽쳐 색인 정보의 이진화 방법이 다르고 나머지 조건의 경우는 동일하다.
여기서 나머지 조건의 경우에는 참조 픽쳐의 색인 순서와 참조 픽쳐의 개수에 따라서 이진화할 수 있다. 예를 들어, 참조 픽쳐의 개수가 5개이면 0, 10, 110, 1110, 1111로 참조 픽쳐 색인 정보를 이진화할 수 있다.
나머지 조건이 아닌 경우를 보면, (제1 RPS check가 거짓, 제2 RPS check가 참, 제3 RPS check가 거짓) list 1 방향의 참조 픽쳐들이 list 0 방향의 참조 픽쳐에도 동일하게 존재하지만, 각 참조 픽쳐들의 색인 순서는 다르다. 이런 경우 2가지 방법으로 이진화를 할 수 있다.
제1 방법은 RPS에서 예측 방향 별로 공통되는 참조 픽쳐 그룹과 그렇지 않은 참조 픽쳐 그룹으로 나누어서 따로 이진화를 할 수도 있다. 참조 픽쳐 색인 정보 이진화 방법을 나타낸 표에서 RPS 공통 POC는 공통되는 참조 픽쳐 그룹이고, RPS 비공통 POC는 공통되지 않은 참조 픽쳐 그룹이다. 도 25의 RPS D를 이용하여 설명하면, 공통 참조 픽쳐 그룹에는 1, 3, 4번 3개의 참조 픽쳐가 있고 비공통 참조 픽쳐 그룹에는 0, 2번 2개의 참조 픽쳐가 있다. 따라서, RPS 공통 POC 1, 3, 4번 참조 픽쳐에는 00, 010, 011로 참조 픽쳐 색인 정보를 이진화하고 RPS 비공통 POC 0, 2번 참조 픽쳐에는 10, 11로 참조 픽쳐 색인 정보를 이진화할 수 있다.
제2 방법은 예측 방향이 양방향 예측이 아닌 경우에 해당한다. 제1 방법과 동일하게 RPS의 예측 방향 별 참조 픽쳐들을 공통 참조 픽쳐 그룹과 비공통 참조 픽쳐 그룹으로 나눈다. 다만, 어떤 현재 참조 픽쳐가 어떤 그룹에 속하는지를 알려주는 첫번째 빈을 (도 26에서 참조 픽쳐 색인 정보 이진화 방법 표의 밑줄 친 빈) 참조 픽쳐 색인 정보에서 전송하지 않고, 예측 방향 정보의 list 0 인지 list 1인지 알려주는 빈을 (도 26에서 예측 방향 정보 이진화 방법 표의 밑줄 친 빈) 이용하여 전송한다. 도 26의 예측 방향 정보 이진화 방법 표에서 밑줄 친 빈의 의미를 예측 방향이 list 0 방향인지 list 1 방향인지를 알려주는 것이 아니라 현재 블록의 참조 픽쳐가 공통 참조 픽쳐 그룹인지 아닌지를 알려주는 정보로 이용하는 것이다. 이렇게 될 경우, 예측 방향 정보를 이진화 할 때는 예측 방향이 양방향 예측인지 아닌지를 알려주는 빈만 전송되면 된다. 양방향 예측이 제한되는 경우라면 예측 방향 정보가 전송되지 않는다.
도 29는 영상 부호화 장치의 화면 내 예측부를 나타낸 블록도이다.
현재 블록의 예측 모드가 화면 내 예측이 선택된 후, 참조 화소 생성부(2901)에서 현재 블록 주변에 참조 화소 유도 및 참조 화소 필터링을 한다. 참조 화소는 현재 블록 주변에 복원 화소를 이용하여 결정한다. 현재 블록 주변에 일부 복원된 화소를 이용할 수 없거나 복원된 화소가 없는 경우, 이용 가능한 참조 화소를 이용할 수 없는 영역에 패딩하거나 화소가 가질 수 있는 값의 범위 중 중간 값을 가지고 패딩을 할 수 있다. 참조 화소를 모두 유도한 후, AIS(Adaptive Intra Smoothing) 필터를 이용하여 필터링을 한다.
최적 화면 내 예측 모드 결정부에서는 M가지의 화면 내 예측 모드 중 하나의 예측 모드를 결정하는 장치이다(2902). 여기서 M은 화면 내 예측 모드 총 개수를 나타낸다. 화면 내 예측 모드는 방향성 예측 모드와 비방향성 예측 모드에 따라 필터링 된 참조 화소를 이용하여 생성한 예측 블록을 생성한다. 화면 내 예측 모드 별로 RD-Cost를 비교하여 비용값이 가장 낮은 하나의 화면 내 예측 모드를 선택한다.
도 30은 영상 부호화 장치의 화면 간 예측부(3000)를 자세하게 나타낸 블록도이다.
화면 간 예측부는 움직임 정보를 유도하는 방법에 따라 Merge 후보 탐색부(3002)와 AMVP 후보 탐색부(3004)로 나눌 수 있다. Merge 후보 탐색부(S302)는 현재 블록 주변에 복원된 블록 중 화면 간 예측이 사용된 참조 블록을 Merge 후보로 설정한다. Merge 후보는 부호화/복호화 장치에서 동일한 방법으로 유도하고, 동일한 개수를 사용하며 Merge 후보 개수는 부호화 장치에서 복호화 장치로 전송을 한다. 이때, 현재 블록 주변에 복원된 참조 블록으로 Megre 후보를 약속된 개수만큼 설정하지 못한 경우, 현재 픽쳐가 아닌 다른 픽쳐에서 현재 블록과 동일한 위치에 존재하는 블록의 움직임 정보를 가져온다. 혹은 현재 픽쳐를 기준으로 과거 방향, 미래방향 움직임 정보들을 조합해서 후보로 채우거나 다른 참조 픽쳐의 동일한 위치의 블록을 움직임 정보라고 설정하여 Merge 후보를 설정한다.
AMVP 후보 탐색부(3004)는 현재 블록의 움직임 정보를 움직임 추정부(3005)에서 결정한다. 움직임 추정부(3005)는 복원된 픽쳐들 중 현재 블록과 가장 유사한 예측 블록을 찾는다.
화면 간 예측부에서는 Merge 후보 탐색부와 AMVP 후보 탐색부 중 하나를 이용하여 현재 블록의 움직임 정보를 결정한 후, 움직임 보상(3006)을 통해 예측 블록이 생성된다.
도 31은 예측 모드 정보를 부호화 하는 방법이다.
Skip 모드 동작 정보 부호화(S3101)는 현재 블록의 예측 모드 정보를 화면 간 예측의 Merge 정보를 이용하고, 복호화 장치에서 예측 블록을 복원 블록으로 사용하는 여부를 알려주는 정보이다.
Skip 모드가 동작을 한다면 결정된 Merge 후보 색인 부호화(S3103)를 하고, 동작을 안한다면 예측 모드 부호화(S3104)를 한다.
예측 모드 부호화(S3104)는 현재 블록의 예측 모드가 화면 간 예측과 화면 내 예측인지를 부호화 한다. 화면 간 예측 모드가 선택된 경우, Merge모드 동작 정보를 부호화 한다(S3106). Merge 모드가 동작을 한다면(S3107) Merge 후보 색인 부호화(S3103)를 한다. Merge 모드가 동작을 안한다면 예측 방향 부호화를 한다(S3108). 예측 방향 부호화(S3108)는 이용하는 참조 픽쳐의 방향이 현재 픽쳐를 기준으로 과거 방향에 있는지, 미래 방향에 있는지 혹은 양방향 둘다 이용하는지 여부를 알려준다. 예측 방향이 과거 혹은 양방향인 경우(S3109), 과거방향 참조 픽쳐 색인 정보 부호화(S3110), 과거 방향 MVD 정보 부호화(S3111), 과거 방향 MVP 정보를 부호화(S3112)하고, 예측 방향이 미래 혹은 양방향인 경우(S3113), 미래 방향 참조 픽쳐 색인 정보 부호화(S3114), 미래 방향 MVD 정보 부호화(S3115), 미래 방향 MVP 정보를 부호화(S3116) 하여 현재 블록의 화면 간 예측 움직임 정보를 알려줄 수 있다. 화면 간 예측 과정에서 부호화 되는 정보들은 화면 간 예측부 모드 정보 부호화로 지칭한다.
예측 모드가 화면 내 예측 모드인 경우, MPM 동작 정보를 부호화(S3117)한다. MPM 동작 정보 부호화는 현재 블록 주변에 복원된 블록 중 현재 블록과 동일한 예측 모드 정보를 가지고 있는 경우 현재 블록의 예측 모드 정보를 부호화 하지 않고, 복원된 블록과 동일한 예측 모드 정보를 사용하라고 알려주는 정보이다. MPM 동작을 하는 경우(S3118), MPM 색인 부호화(S3119)를 하여 어느 복원된 블록의 예측 모드를 현재 블록의 예측 모드로 사용하는지 알려주고, MPM 동작을 하지 않는 경우(S3118), 잔여 예측 모드 부호화를 한다(S3120). 잔여 예측 모드 부호화는 MPM 후보로 선택된 예측 모드를 뺀 나머지 예측 모드들 중 현재 블록의 예측 모드로 사용되는 예측 모드 색인을 부호화 한다. 화면 내 예측 과정에서 부호화 되는 정보들은 화면 내 예측부 모드 정보 부호화로 지칭한다.
도 32 및 도 33은 영상 복호화 장치의 화면 내 예측부, 화면 간 예측부를 도시한다.
화면 내 예측부(3200)는 도 29의 최적의 예측 모드를 결정하는 과정만 빠져 있고, 최적이라고 판단된 예측 모드를 받아서 예측 블록을 생성하는 과정은 영상 부호화 장치의 화면 내 예측부와 실질적으로 동일하게 동작한다.
화면 간 예측부(3300)는 도 30 최적의 예측 모드를 결정하는 과정만 빠져 있고, 최적이라고 판단된 예측 모드를 받아서 예측 블록을 생성하는 과정은 영상 부호화 장치의 화면 간 예측부와 실질적으로 동일하게 동작한다.
도 34는 예측 모드 정보를 복호화 하는 방법이다. 도 31의 예측 모드 정보를 부호화 하는 방법과 실질적으로 동일하게 동작한다.
도 35는 변환 블록의 부호화 방법을 나타낸 흐름도이다.
도 35의 변환 블록의 부호화 방법은, 영상 부호화 장치(100)의 엔트로피 부호화부(105)에 의해 수행될 수 있다.
먼저 역 스캔 순서에 따라서 변환 계수들을 스캔할 때 최초의 0이 아닌 계수를 기준 계수로 정하고, 그 위치 정보 Last_sig를 부호화 한다(S3501).
기준 계수가 포함된 서브 블록을 선택하고(S3502) 해당 서브 블록 내 변환 계수 정보를 부호화 한다. 기준 계수가 포함된 서브 블록이 아닌 경우, 변환 블록 내 계수를 부호화 하기 전에 서브 블록 정보를 부호화 한다(S3503). 서브 블록 정보인 Coded_sub_blk_flag 는 현재 서브 블록 내에 0이 아닌 계수가 적어도 하나 이상 있는지를 알리는 플래그이다. 그 후, 0이 아닌 계수 정보를 부호화 한다(S3504). 여기서 0이 아닌 계수 정보인 Sig_coeff_flag 는 서브 블록안에 존재하는 각 계수의 값이 0인지 아닌지를 나타낸다.
그리고, N 초과 계수 정보를 부호화 한다(S3505). 여기서, N 초과 계수 정보는 서브 블록 안에 존재하는 모든 계수에 대해 각 계수의 절대값이 1부터 N까지 값을 각각 초과하는지를 나타낸다. N은 부호화 및 복호화 시 임의의 기 설정된 값을 사용하지만 N의 값을 부호화 하여 부호화 및 복호화 시에 동일한 값을 사용하게 할 수 있다. N초과 계수 정보의 개수는 임의의 기 설정된 값을 사용할 수도 있고, 기준 계수의 위치에 따라 다르게 사용할 수도 있다. N 초과 계수 정보는, 서브 블록 내의 계수 전부 또는 일부에 대해서 부호화되며, 각 계수의 스캔 순서에 따라 순차적으로 부호화될 수 있다.
예를 들어 N이 3으로 설정된 경우, 서브 블록 안의 모든 0이 아니라고 판단된 계수(넌-제로 계수, non-zero coefficient)에 대해 각 계수의 절대값이 1보다 큰 값인지 여부를 부호화 한다. 이를 위해 계수의 절대값이 1 보다 큰지를 알리는 플래그인 Abs_greater1_flag 가 이용된다. 그 후, 1보다 큰 값으로 판단이 된 계수에 대해서만 2보다 큰 값인지 여부를 부호화 한다. 이를 위해 계수의 절대값이 2 보다 큰지를 알리는 플래그인 Abs_greater2_flag가 사용된다. 마지막으로 2 보다 큰 값으로 판단이 된 계수에 대해서만 3보다 큰 값인지 여부를 부호화 한다. 이를 위해서는 계수의 절대값이 3 보다 큰지를 알리는 플래그인 Abs_greater3_flag가 사용될 수 있다.
또는, 서브 블록 안의 넌-제로 계수에 대해 각 계수의 절대값이 1보다 큰 값인지 여부를 부호화 한다. 이를 위해 계수의 절대값이 1 보다 큰지를 알리는 플래그인 Abs_greater1_flag 가 이용된다. 그 후, 1보다 큰 값으로 판단이 된 계수에 대해서만 해당 계수가 짝수인지 여부를 부호화할 수 있다. 이를 위해 이를 위해 계수가 짝수인지 아니면 홀수인지를 나타내는 Parity 정보가 사용될 수 있다. 나아가, 해당 계수의 절대값이 3보다 큰지 여부를 부호화할 수 있다. 이를 위해 계수의 절대값이 3보다 큰지를 알리는 플래그인 Abs_greater3_flag가 사용될 수 있다.
전술한 바와 같이, N 초과 계수 정보는, Abs_greaterN_flag 또는 짝수인지를 나타내는 플래그 중 적어도 하나를 포함할 수 있다. 여기서, N은 1, 2, 3일 수 있으나, 이에 한정되지 아니한다. N은 4, 5, 6, 7, 8, 9 등과 같이 3보다 큰 자연수일 수 있다.
그 후, 0이 아니라고 판단된 각 계수에 대해 음수인지 양수인지 나타내는 부호 정보가 부호화 된다(S3506). 부호 정보는 Sign_flag가 사용될 수 있다.
그리고 절대값이 N보다 크다고 판단된 계수에 대해서만 N을 뺀 나머지 값을 잔차 계수 정보로 정의하고 이 계수의 잔여값 정보 remaining_coeff가 부호화 된다(S3507). 이때, 각 계수에 대한 정보 부호화를 계수 마다 S3504, S3505, S3506, S3507과정을 수행한 후에 다음 계수로 넘어가는 방법으로 할 수 있다. 혹은 서브 블록 내 계수에 대한 정보를 각 단계 별로 한번에 부호화 할 수 있다. 예를 들어, 서브 블록 내 계수가 16개 존재하는 경우, 각 16개의 계수에 대한 S3504를 먼저 부호화 하고, S3504에서 계수의 절대값이 0이 아니라고 판단 된 계수에 대해서만 S3505 과정을 전부 수행하고, S3506과정을 수행할 수 있다. 그후, S3505 과정에서 현재 계수의 절대값을 표현 불가능한 경우, S3507과정을 수행할 수 있다. 넌-제로 계수의 절대값은 Sig_coeff_flag, 하나 이상의 Abs_greaterN_flag, Parity 정보 또는 잔여값 정보 중 적어도 하나를 복호화하여 유도될 수 있다.
현재 서브 블록에 대한 계수 정보를 모두 부호화 한 후, 다음 서브 블록이 존재하는지 확인한다(S3509). 다음 서브 블록이 존재한다면 다음 서브 블록으로 이동하고(S3510) 서브 블록 정보를 부호화 한다(S3503). 해당 서브 블록 정보 Coded_sub_blk_flag를 확인하고(S3508) Coded_sub_blk_flag의 값이 참인 것으로 확인되면 0이 아닌 계수 정보인 Sig_coeff_flag 를 부호화 한다. 만약 해당 서브 블록 정보 Coded_sub_blk_flag의 값이 거짓이라면 해당 서브 블록에 부호화 할 계수가 존재하지 않는다는 뜻이기 때문에 다음 서브 블록의 존재 여부를 확인한다. 혹은, 다음 서브 블록으로 이동한 후, 해당 서브 블록이 가장 저주파 쪽에 위치한 서브 블록일 경우, 0이 아닌 계수가 존재할 것이라는 가정하에 서브 블록 정보의 부호화 및 복호화 없이 참인 것으로 부호화 및 복호화 시에 동일하게 설정하는 것 또한 가능하다.
도 35에서는 설명의 편의성을 위해 부호 정보 부호화(S3506)를 S3505 다음 과정으로 설명하였으나 S3504와 S3505 사이에 존재하거나 S3507 이후에 S3506과정을 수행할 수도 있다.
도 36은 변환 블록의 복호화 방법을 나타낸 흐름도이다.
도 36의 변환 블록 복호화 방법은 도 35의 변환 블록 부호화 방법에 대응된다. 도 36의 변환 블록의 복호화 방법은 도 6의 영상 복호화 장치(600)의 엔트로피 복호화부(601)에 의해 수행될 수 있다.
부호화 되는 정보들은 이진화 과정을 통해 문맥 적응적 이진화 산술 과정이 수행된다. 문맥 적응적 이진화 산술 과정이란 블록 내의 부호화 된 정보를 심볼화하고 상황에 따라 확률 정보를 이용하여 심볼의 발생 확률을 다르게 적용하고 부호화 하는 과정을 말한다. 본 예시에서는 설명의 편의성을 위해 심볼을 0과 1만을 사용하였지만, 심볼의 개수는 N개(N은 2이상의 자연수)가 사용될 수 있다.
확률 정보란 이진화 된 정보에서 0과 1의 발생 확률을 말한다. 두 정보의 발생 확률을 이전 복원된 정보에 따라서 동일하게 할 수도 있고, 다르게 할 수도 있다. 정보에 따라 M개의 확률 정보를 가질 수도 있다. 이때 M개의 확률 정보는 확률 테이블로 만들어질 수도 있다.
도 37은 문맥 적응적 이진화 산술 부호화 방법을 나타내는 흐름도이다. 먼저, 확률 초기화가 수행된다(S3701). 확률 초기화란 이진화 된 정보들을 확률 정보에 설정되어 있는 확률로 확률 구간을 나누는 과정이다. 단, 어떤 확률 정보를 사용할 것인지는 부호화 장치 또는 복호화 장치에서 임의로 기 설정된 규칙에 의해 동일한 조건을 사용할 수도 있고, 별도로 확률 정보가 부호화 될 수도 있다. 초기 확률 구간은 기 설정된 규칙에 의해 부호화/복호화 과정에서 동일하게 결정될 수도 있다. 혹은 초기 확률 구간을 새로 부호화 하여 사용 할 수도 있다. 혹은 확률 초기화를 안하고 이전에 사용한 코딩 파라미터의 확률 구간과 확률 정보를 가져올 수도 있다.
부호화할 현재 코딩 파라미터의 이진 정보가 결정되면 (S3702), 현재 코딩 파라미터의 이진화 된 정보는 단계 S3702의 이전 단계까지의 확률 구간 상태와, 동일 코딩 파라미터의 이전 확률 정보를 이용하여 부호화된다(S3703). 그리고, 이후에 부호화될 이진 정보들을 위해 확률 정보와 확률 구간이 업데이트(S3704)될 수 있다. 그리고, 다음 부호화될 코딩 파라미터 정보가 존재하는 경우(S3705), 다음 코딩 파라미터 정보로 이동하여(S3706), 전술한 과정을 반복한다. 만약 다음 부호화될 코딩 파라미터 정보가 존재하지 않는다면 본 흐름도는 종료된다.
도 38은 문맥 적응적 이진화 산술 복호화 방법을 나타내는 흐름도이다. 부호화 장치와 달리, 복호화 장치에서는 확률 정보 및 구간을 이용하여 코딩 파라미터의 이진 정보를 복호화(S3802)한 후, 현재 코딩 파라미터의 정보를 결정(S3803)한다. 이 외 도 38의 복호화 방법은 도 37의 부호화 방법에 대응되므로 상세한 설명은 생략한다.
상기 설명한 도 37 및 도 38의 단계 S3703과 S3802에서, 각 코딩 파라미터 별로 주변에 이미 복원된 정보(또는 코딩 파라미터)들을 이용하여 기 설정된 M개의 확률 정보들 중, 최적 확률 정보를 선택적으로 사용하여 부호화 또는 복호화가 진행될 수 있다.
예를 들어, 코딩 파라미터의 확률 정보는 변환 블록의 크기에 따라 정보가 발생할 확률이 높은 확률 정보를 사용할 수도 있다.
또는, 현재 부호화 또는 복호화 할 계수의 주변 계수들의 정보에 따라 확률 정보를 다르게 적용할 수 있고, 이전의 부호화 또는 복호화된 정보의 확률 정보를 이용하여 현재 부호화 또는 복호화 하는 정보의 확률 정보를 선택할 수도 있다.
도 39 및 도 40은 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다.
도 39는 현재 계수의 Sig_coeff_flag 정보값을 부호화 또는 복호화에 사용되는 확률 정보 테이블의 예시이다. 현재 부호화 또는 복호화 할 계수와 인접한 계수들 중 현재 계수의 Sig_coeff_flag 정보값과 동일한 정보값을 갖는 계수의 수가 1개인 경우, 현재 계수에는 인덱스 8이 할당된다. 이 때 현재 계수의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 61% 이고 심볼 0의 확률은 39%가 된다. 만약, 현재 계수의 Sig_coeff_flag 정보값과 동일한 정보값을 갖는 주변 계수의 수가 2개인 경우 현재 계수에는 인덱스 5가 할당되고, 이 때의 현재 계수의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 71% 이고 심볼 0의 확률은 29%이다. 만약 현재 계수의 Sig_coeff_flag 정보값과 동일한 정보값을 갖는 주변 계수의 수가 3개인 경우 현재 계수에는 인덱스 2가 할당되고 현재 계수의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 87%, 심볼 0의 확률은 13%이 된다.
도 39에 도시된 확률 정보 테이블을 이용하여 현재 계수가 부호화 또는 복호화된 후 도 40과 같이 확률 정보는 업데이트될 수 있다.
한편, 0이 아닌 계수 정보 Sig_coeff_flag의 경우, 저주파 영역에 가까울수록, 0이 아닌 계수 정보 Sig_coeff_flag의 발생 확률이 높은 확률 정보가 사용될 수 있다.
그리고, N 초과 계수 정보의 확률 정보는 직전에 부호화/복호화한 N 초과 계수 정보의 확률 정보를 이용하여 현재의 N 초과 계수 정보의 확률 정보를 설정하거나, 서브 블록 단위로 처음 부호화/복호화 하는 N 초과 계수 정보의 확률 정보를 그대로 사용할 수도 있다. 상술한 바와 같이, N 초과 계수 정보는 Abs_greater1_flag, Abs_greater2_flag, Abs_greater3_flag, ..., 또는 Abs_greaterN_flag 중 적어도 하나를 포함할 수 있다
그리고, 서브 블록 정보 Coded_sub_blk_flag는 주변의 부호화/복호화 된 M개의 서브 블록의 확률 정보를 이용하거나 직전에 부호화/복호화 된 서브 블록의 확률 정보를 이용할 수도 있다.
도 41은 도 1의 영상 부호화 장치(100)에 화면 내 블록 카피 예측부를 추가한 도면이다. 화면 내 블록 카피 예측부는 현재 부호화 하려는 블록의 예측 블록을 현재 픽쳐 내 복원된 영역을 이용하여 생성할 수 있다.
도 42 내지 도 47은 화면 내 블록 카피 예측부에서 예측 블록을 생성한 예시이다. 도면에서 CB는 현재 블록, PB는 예측 블록을 나타낸다.
움직임 탐색 범위는 복원된 영역 내에서 제한될 수 있다. 예를 들어, 도 42와 같이 현재 픽쳐 내 복원된 영역으로만 움직임 탐색 범위를 제한할 수 있고, 도 43과 같이 예측 블록 내 일부라도 복원된 영역에 속한다면 움직임 탐색 범위로 설정할 수 있다. 혹은 도 44의 예시와 같이 현재 블록과 예측 블록이 일부 겹치는 경우도 움직임 탐색 범위로 설정할 수 있다. 해당 일부 겹치는 영역에 대해서는 인접한 복원 화소를 이용하여 패딩할 수도 있지만, 복원 화소를 이용하여 겹치는 영역을 예측할 수도 있다.
도 45 내지 도 47은 예측 블록과 현재 블록이 겹치는 경우 예측 블록 생성 방법을 나타낸 예시이다. A는 현재 블록과 예측 블록이 겹치는 영역을 의미하고, B는 A를 예측하기 위해 사용하는 주변의 인접한 복원 화소들이다. 예측 블록이 현재 블록의 좌상단, 상단, 우상단, 좌측 등 어느 방향에 존재하느냐에 따라 이용될 수 있는 복원 화소가 달라질 수 있다. 이때 M(M은 1 이상의 정수)개의 화면 내 예측 모드를 이용하여 A영역을 예측할 수 있다. M은 현재 블록에서 이용될 수 있는 화면 내 예측의 예측 모드 개수이다. 도 48은 도 45에서 A영역 화소 예측을 위해 사용될 수 있는 복원 화소 라인과 화면 내 예측 모드의 이용 가능한 M개의 모드 중 좌상단 방향 모드를 이용하여 A영역 화소 예측을 나타낸 예시 도면이다.
현재 블록의 움직임 벡터는 도 49의 도면처럼 현재 픽쳐 내 복원 영역에서 현재 블록의 예측 블록을 가리키는 것이 아닌 현재 블록의 참조 화소 라인을 유도하기 위한 복원 화소 라인을 가리키는 것으로 이용할 수도 있다. 현재 블록과 인접하지 않은 복원된 영역의 참조 화소 라인을 이용하여 M개의 예측 모드로 화면 내 예측을 수행하고, 최적의 예측 블록을 생성한 예측 모드를 선택할 수 있다. 이때, W(W는 1개 이상의 정수)개 참조 화소 라인 중 최적의 참조 화소 라인과 예측 모드를 이용하여 예측 블록을 생성할 수 있고, W개 참조 화소 라인에 대하여 각각 다른 예측 모드 혹은 같은 예측 모드를 이용하여 예측 블록들을 생성 후, 생성된 예측 블록들을 가중합하여 최적의 예측 블록을 생성할 수도 있다.
혹은 화면 내 블록 카피 예측과 화면 내 예측을 이용하여 예측 블록들을 각각 생성 후, 생성된 예측 블록들을 가중합하여 최적의 예측 블록을 생성할 수 있고, 화면 내 블록 카피 예측과 화면 간 예측을 이용하여 예측 블록들을 각각 생성 후, 생성된 예측 블록들을 가중합하여 최적의 예측 블록을 생성할 수도 있다.
또한, 참조 화소 라인은 상단의 복원된 화소 혹은 좌측의 복원된 화소만을 이용할 수도 있다. 이때, 예측 블록과 현재 블록이 겹치는 경우, 예측 블록 생성시 이용하는 참조 화소 라인을 이용하여 예측 블록을 생성할 수 있다.
도 42 내지 도 48의 도면에서는 움직임 탐색 범위를 현재 픽쳐로 예시를 들었으나 현재 블록이 속한 CTU 또는 CTU 행 내로 제한하거나 이웃한 CTU까지로 제한할 수도 있다. 예를 들어, 현재 블록(CB)의 움직임 벡터에 의해 지시된 예측 블록(PB)은 현재 블록과 동일한 CTU 또는 CTU 행 내에 속하도록 제한될 수 있다.
도 50은 영상 부호화 장치의 화면 내 블록 카피 예측부를 자세하게 나타낸 블록도이고, 화면 내 블록 카피 예측(S5001)은 CPR_Merge 후보 탐색부(S5002)와 CPR_AMVP 후보 탐색부(S5004)로 나눌 수 있다. CPR_Merge 후보 탐색부(S5002)는 복원 블록들을 CPR_Merge 후보로 사용할 수 있다. 상기 복원 블록은, 화면 간 예측을 통해 부호화/복호화된 블록일 수도 있고, 주변 블록 중 화면 내 블록 카피(IBC) 모드로 부호화/복호화된 블록으로 제한될 수도 있다. CPR_Merge 후보의 최대 개수는 부호화/복호화 장치에서 동일하게 사용하거나 상위 헤더에서 전송할 수 있다. 여기서, 최대 개수는 2개, 3개, 4개, 5개 또는 그 이상일 수 있다. 상위 헤더란 비디오 파라미터단, 시퀀스 파라미터단, 픽쳐 파라미터단, 슬라이스단 등 픽쳐 및 블록 정보를 포함하는 상위 헤더 정보를 의미한다. CPR_Merge 후보 유도 방법은 도 50을 이용하여 설명한다.
도 51은 현재 블록에 인접한 공간적 후보를 나타낸다. AL, A, AR, L, BL은 현재 블록과 같은 픽쳐이면서 CPR_Merge 후보로 이용될 수 있는 복원 블록의 위치이다. 예를 들어, AL, A, AR, L, BL 위치의 복원 블록에서 화면 간 예측 또는 화면 내 블록 카피 예측이 사용된 경우, 이는 CPR_Merge 후보로 사용될 수 있다. 복원 블록은 L, A, AR, BL, AL 순서 혹은 이외에 다양한 우선 순위에 의해서 고려되는 순서가 결정될 수 있다. 공간적으로 인접한 복원 블록은, 현재 블록의 크기가 소정의 문턱크기보다 큰 경우에 한하여 CPR_Merge 후보로 사용될 수 있다. 현재 블록의 크기는, 블록의 너비, 높이, 너비와 높이의 합, 너비와 높이의 곱, 너비와 높이 중 최소값/최대값 등으로 표현될 수 있다. 예를 들어, 현재 블록의 너비와 높이의 곱이 16보다 큰 경우, 상기 복원 블록은 CPR_Merge 후보로 사용되고, 그렇지 않은 경우, 상기 복원 블록은 CPR_Merge 후보로 사용되지 않을 수 있다
만약, CPR_Merge 후보 리스트에 최대 후보 개수가 채워지지 않을 경우, H 버퍼에 저장된 움직임정보가 CPR_Merge 후보 리스트에 추가될 수도 있다. H 버퍼는 현재 블록 이전에 부호화/복호화가 완료된 블록의 움직임정보를 저장할 수 있다. 또는, CPR_Merge 후보 리스트에 최대 후보 개수가 채워지지 않을 경우, 이전에 복원된 픽쳐에서 현재 블록과 동일한 위치에 존재하는 복원 블록이 화면 내 블록 카피 예측 기술이 사용된 경우, 해당 복원 블록의 움직임 정보를 CPR_Merge 후보로 추가될 수 있다.
혹은 현재까지 추가된 CPR_MVP 후보의 개수가 최대 후보 개수보다 적은 경우, 디폴트 벡터 후보가 추가될 수 있다. 디폴트 벡터란, 부호화/복호화 장치에서 동일하게 정해놓은 벡터를 의미할 수 있다. 예를 들어, 디폴트 벡터가 (0, 0), (-10, 0), (0, -10), (-15, 0), (0, -15)이고, CPR_Merge 후보가 2개 부족한 경우, 앞에서부터 차례대로 디폴트 벡터 2개가 CPR_Merge 후보 리스트에 추가될 수 있다. 이후, CPR_Merge 후보 리스트에 각 움직임정보들의 RD-cost를 계산하고 RD-cost가 가장 최적인 움직임정보를 결정한다(S5003).
CPR_AMVP 후보 탐색부(S5004)는 움직임 탐색 범위 내에서 예측 블록을 생성한 후, 주변 블록의 움직임 정보를 이용하여 CPR_MVP 후보 또는 CPR_MVD 정보 중 적어도 하나를 구할 수 있다. CPR_MVP 후보의 최대 개수는 부호화/복호화 장치에서 동일하게 사용하거나 상위 헤더에서 전송할 수 있다. 여기서, 최대 개수는 2개, 3개, 4개, 5개 또는 그 이상일 수 있다. CPR_MVP 정보의 개수는 부호화/복호화 장치에서 동일하게 사용하거나 상위 헤더에서 전송할 수 있다. CPR_MVP 후보를 유도하는 방법은 도 50을 이용하여 설명한다. AL, A, AR, L, BL은 현재 블록과 같은 픽쳐에 속하면서 CPR_MVP 후보로 이용될 수 있는 복원 블록의 위치이다. AL, A, AR, L, BL 위치의 복원 블록에서 화면 간 예측 또는 화면 내 블록 카피 예측이 사용된 경우 CPR_MVP 후보로 사용될 수 있다. 복원 블록은 L, A, AR, BL, AL 순서 혹은 이외에 다양한 우선 순위에 의해서 고려되는 순서가 결정될 수 있다. 공간적으로 인접한 복원 블록은, 현재 블록의 크기가 소정의 문턱크기보다 큰 경우에 한하여 CPR_MVP 후보로 사용될 수 있다. 현재 블록의 크기는, 블록의 너비, 높이, 너비와 높이의 합, 너비와 높이의 곱, 너비와 높이 중 최소값/최대값 등으로 표현될 수 있다. 예를 들어, 현재 블록의 너비와 높이의 곱이 16보다 큰 경우, 상기 복원 블록은 CPR_MVP 후보로 사용되고, 그렇지 않은 경우, 상기 복원 블록은 CPR_MVP 후보로 사용되지 않을 수 있다.
만약, CPR_MVP 후보 리스트에 최대 후보 개수가 채워지지 않을 경우, H 버퍼에 저장된 움직임정보가 CPR_MVP 후보 리스트에 추가될 수도 있다. H 버퍼는 현재 블록 이전에 부호화/복호화가 완료된 블록의 움직임정보를 저장할 수 있다. 또는, CPR_MVP 후보 리스트에 최대 후보 개수가 채워지지 않을 경우, 이전에 복원된 픽쳐에서 현재 블록과 동일한 위치에 존재하는 복원 블록이 화면 내 블록 카피 예측 기술이 사용된 경우, 해당 복원 블록의 움직임 정보가 CPR_MVP 후보로 추가될 수 있다.
현재까지 추가된 CPR_MVP 후보의 개수가 최대 후보 개수보다 적은 경우, 디폴트 벡터가 CPR_MVP 후보 리스트에 추가될 수 있다. CPR_MVD 정보는 현재 블록의 움직임 정보와 CPR_MVP 후보에 저장된 움직임 정보의 차분값을 CPR_MVD 정보가 될 수 있다. 예를 들어, 현재 블록의 움직임 벡터는 (-14, -14)이고, CPR_MVP 후보의 움직임 벡터는 (-13, -13)인 경우, CPR_MVD 정보는 ((-14) - (-13), (-14) - (-13)) 차분값인 (1, 1)이 될 수 있다. 혹은 움직임 탐색 범위가 현재 블록과 예측 블록이 중첩될 수 없는 경우, 현재 블록의 크기에 따라 움직임 벡터를 다음 수학식5, 6으로 나타낼 수 있다.
Figure PCTKR2020000211-appb-M000003
Figure PCTKR2020000211-appb-M000004
수학식 5, 6에서 Curr_MV.x와 Curr_MV.y는 현재 블록 움직임 벡터의 x, y 성분이다. Curr_blk_width와 Curr_blk_height은 현재 블록의 가로, 세로 크기일 수도 있고, 가로 크기의 1/2, 세로 크기의 1/2일 수도 있는 등 다양한 값으로 결정될 수 있다. MV는 최종적으로 유도된 현재 블록의 움직임 벡터이다. 예를 들어, 현재 블록의 움직임 벡터는 (-14, -14)이고, 현재 블록의 크기는 (4, 4)인 경우, 움직임 벡터를 (-10, -10)으로 설정할 수 있다. 현재 블록의 움직임 벡터에서 현재 블록의 가로, 세로 길이의 절반만을 빼 준 것을 현재 블록의 움직임 벡터로 결정할 수도 있다. 이후, CPR_MVP 후보 리스트에 각 움직임정보들의 RD-cost를 계산하고 RD-cost가 가장 최적인 움직임정보를 결정한다(S5005).
화면 내 블록 카피 예측부에서는 CPR_Merge 후보 탐색부와 CPR_AMVP 후보 탐색부 중 하나를 이용하여 현재 블록의 움직임 정보를 결정한 후, 움직임 보상(S5006)을 통해 예측 블록이 생성된다.
도 52는 예측 모드 정보를 부호화 하는 방법이다.
Skip 모드 동작 정보 부호화(S5201)는 부호화 장치에서 예측 블록을 복원 블록으로 사용하는지에 대한 여부를 알려주는 정보이다.
예측 모드 부호화(S5202)는 현재 블록의 예측 모드가 화면 간 예측, 화면 내 예측, 화면 내 블록 카피 예측인지를 부호화할 수 있다. 화면 간 예측으로 부호화된 경우(S5203), 화면 간 예측부 모드 정보를 부호화(S5204) 할 수 있다. 화면 간 예측부 모드 정보 부호화(S5204)는 도 31 화면 간 예측부 모드 정보 부호화와 동일한 역할을 수행할 수 있다. 예측 모드가 화면 내 예측으로 부호화된 경우(S5205), 화면 내 예측부 모드 정보를 부호화(S5206) 할 수 있다. 화면 내 예측부 모드 정보 부호화는 도 31의 화면 내 예측부 모드 정보 부호화와 동일한 역할을 수행할 수 있다. 화면 내 블록 카피 예측 모드가 선택된 경우, CPR_Merge모드 동작 정보를 부호화할 수 있다(S5207). CPR_Merge 모드가 동작을 한다면(S5208) CPR_Merge 후보 색인 부호화(S5209)를 할 수 있다. CPR_Merge 모드가 동작을 안한다면 CPR_MVD 정보 부호화(S5210), CPR_MVP 후보를 부호화(S5211) 할 수 있다. 만약, CPR_MVP 후보와 CPR_MVD 정보를 이용하여 현재 블록과 예측 블록이 겹친다고 판단된다면 추가적으로 겹치는 영역에 대한 예측 모드를 부호화 할 수 있다. 또한, 도 49의 예시에 의해 화면 내 예측이 수행되는 경우, CPR_Merge 후보 부호화(S5209), CPR_MVP 후보 부호화(S5211) 이후, 화면 내 예측 모드 정보 부호화(S5206)가 수행될 수 있다.
이때, 상위 헤더 설정에 의해 현재 픽쳐에서 이용할 수 있는 이전에 복원된 픽쳐가 존재하지 않는 경우, 예측 모드 부호화(S5202)시 화면 간 예측부 모드 정보는 생략될 수 있다.
도 31을 이용하여 예측 모드 정보 부호화를 할 수도 있다.
화면 내 블록 카피 예측부 모드 정보를 화면 간 예측부 모드 정보로 나타낼 수 있다. 화면 간 예측 정보에 설정된 참조 픽쳐 색인 정보에 현재 픽쳐 정보를 추가하여 나타낼 수 있다. 예를 들어, 참조 픽쳐 색인이 0번부터 4번까지 존재 하는 경우, 0번부터 3번은 이전에 복원된 픽쳐를 의미하고, 4번은 현재 픽쳐를 의미할 수 있다. Merge 후보 색인 부호화(S3103)시 과거 방향 정보를 이용하면서 과거 방향 참조 픽쳐 색인 정보가 현재 픽쳐인 경우, 화면 내 블록 카피 예측 기술이 수행될 수 있고, 나머지 경우, 화면 간 예측 기술이 수행될 수 있다. 또한, AMVP 모드 정보 부호화시, 예측 방향 정보는 과거 방향이 부호화(S3108) 되고, 과거 방향 참조 픽쳐 색인 정보가 현재 픽쳐로 부호화(S3110) 되는 경우, 과거 방향 MVD정보(S3111)와 과거 방향 MVP 후보(S3112)는 화면 내 블록 카피 예측을 위한 정보이고, 나머지 경우, 화면 간 예측 기술 정보일 수도 있다. 이때, 상위 헤더 설정에 의해 현재 픽쳐에서 이용할 수 있는 이전에 복원된 픽쳐가 존재하지 않는 경우, 예측 방향 부호화(S3108), 과거 방향 참조 픽쳐 색인 정보 부호화(S3110), 미래 방향 참조 픽쳐 색인 정보 부호화(S3114), 미래 방향 MVD 정보 부호화(S3115), 미래 방향 MVP 정보 부호화(S3116) 과정을 생략할 수 있고, 예측 모드 부호화 단계에서 화면 간 예측이 부호화 된다면 이는 화면 간 예측이 아닌 화면 내 블록 카피 예측을 의미할 수 있다.
도 53은 도 6의 영상 복호화 장치(600)에 화면 내 블록 카피 예측부를 추가한 도면이다.
도 54는 영상 복호화 장치의 화면 내 블록 카피 예측부를 도시한다.
화면 내 블록 카피 예측부는 도 50의 최적의 예측 모드를 결정하는 과정만 빠져 있고, 최적이라고 판단된 예측 모드를 받아서 예측 블록을 생성하는 과정은 영상 부호화 장치의 화면 내 블록 카피 예측부와 실질적으로 동일하게 동작한다.
도 55는 예측 모드 정보를 복호화 하는 방법이다.
Skip 모드 동작 정보 복호화(S5501)는 복호화 장치에서 예측 블록을 복원 블록으로 사용하는지에 대한 여부를 알려주는 정보이다.
예측 모드 복호화(S5502)는 현재 블록의 예측 모드가 화면 간 예측, 화면 내 예측, 화면 내 블록 카피 예측인지를 복호화할 수 있다. 화면 간 예측으로 복호화된 경우(S5503), 화면 간 예측부 모드 정보를 복호화(S5504) 할 수 있다. 화면 간 예측부 모드 정보 복호화(S5504)는 도 34의 화면 간 예측부 모드 정보 복호화와 동일한 역할을 수행할 수 있다. 예측 모드가 화면 내 예측으로 복호화된 경우(S5505), 화면 내 예측부 모드 정보를 복호화(S5506) 할 수 있다. 화면 내 예측부 모드 정보 복호화는 도 34의 화면 내 예측부 모드 정보 복호화와 동일한 역할을 수행할 수 있다. 화면 내 블록 카피 예측 모드가 선택된 경우, CPR_Merge모드 동작 정보를 복호화할 수 있다(S5507). CPR_Merge 모드가 동작을 한다면(S5508) CPR_Merge 후보 색인 복호화(S5509)를 할 수 있다. CPR_Merge 모드가 동작을 안한다면 CPR_MVD 정보 복호화(S5510), CPR_MVP 후보를 복호화(S5511) 할 수 있다. 만약, CPR_MVP 후보와 CPR_MVD 정보를 이용하여 현재 블록과 예측 블록이 겹친다고 판단된다면 추가적으로 겹치는 영역에 대한 예측 모드를 복호화 할 수 있다. 또한, 도 49의 예시에 의해 화면 내 예측이 수행되는 경우, CPR_Merge 후보 복호화(S5509), CPR_MVP 후보 복호화(S5511) 이후, 화면 내 예측 모드 정보 복호화(S5506)가 수행될 수 있다.
이때, 상위 헤더 설정에 의해 현재 픽쳐에서 이용할 수 있는 이전에 복원된 픽쳐가 존재하지 않는 경우, 예측 모드 복호화(S5502)시 화면 간 예측부 모드 정보는 생략될 수 있다.
도 34를 이용하여 예측 모드 정보 복호화를 할 수도 있다.
화면 내 블록 카피 예측부 모드 정보를 화면 간 예측부 모드 정보로 나타낼 수 있다. 화면 간 예측 정보에 설정된 참조 픽쳐 색인 정보에 현재 픽쳐 정보를 추가하여 나타낼 수 있다. 예를 들어, 참조 픽쳐 색인이 0번부터 4번까지 존재 하는 경우, 0번부터 3번은 이전에 복원된 픽쳐를 의미하고, 4번은 현재 픽쳐를 의미할 수 있다. Merge 후보 색인 복호화(S3403)시 과거 방향 정보를 이용하면서 과거 방향 참조 픽쳐 색인 정보가 현재 픽쳐인 경우, 화면 내 블록 카피 예측 기술이 수행될 수 있고, 나머지 경우, 화면 간 예측 기술이 수행될 수 있다. 또한, AMVP 모드 정보 복호화시, 예측 방향 정보는 과거 방향이 복호화(S3408) 되고, 과거 방향 참조 픽쳐 색인 정보가 현재 픽쳐로 복호화(S3410) 되는 경우, 과거 방향 MVD정보(S3411)와 과거 방향 MVP 후보(S3412)는 화면 내 블록 카피 예측을 위한 정보이고, 나머지 경우, 화면 간 예측 기술 정보일 수도 있다. 이때, 상위 헤더 설정에 의해 현재 픽쳐에서 이용할 수 있는 이전에 복원된 참조 픽쳐가 존재하지 않는 경우, 예측 방향 복호화(S3408), 과거 방향 참조 픽쳐 색인 정보 복호화(S3410), 미래 방향 참조 픽쳐 색인 정보 복호화(S3414), 미래 방향 MVD 정보 복호화(S3415), 미래 방향 MVP 정보 복호화(S3416) 과정을 생략할 수 있고, 예측 모드 복호화 단계에서 화면 간 예측이 복호화 된다면 이는 화면 간 예측이 아닌 화면 내 블록 카피 예측을 의미할 수 있다.
도 56은 양자화된 변환 계수(이하, '변환 계수'라 칭함)의 부호화 방법을 나타낸 흐름도이다. 영상 부호화 장치의 엔트로피 부호화부에 의해 수행될 수 있다.
먼저 역 스캔 순서에 따라서 변환 계수들을 스캔할 때 최초의 0이 아닌 계수를 기준 계수로 정하고, 그 위치 정보(Last_sig)를 부호화 할 수 있다(S5601).
기준 계수가 포함된 서브 블록을 선택하고(S5602) 해당 서브 블록 내 변환 계수 정보를 부호화 할 수 있다. 기준 계수가 포함된 서브 블록이 아닌 경우, 변환 블록 내 계수를 부호화 하기 전에 서브 블록 정보를 부호화 할 수 있다(S5603). 서브 블록 정보인 Coded_sub_blk_flag 는 현재 서브 블록 내에 0이 아닌 변환 계수가 적어도 하나 이상 있는지를 알려주는 플래그이다. 서브 블록 내 계수 정보를 부호화 하기 전에 제1 부호화된 정보 개수와 제2 부호화된 정보 개수를 0으로 초기화 할 수 있다. 제1 부호화된 정보는 0초과 계수 정보(S5606), 1초과 계수 정보(S5606), Parity 정보(S5607)가 부호화된 개수이다. 제2 부호화된 정보는 3초과 계수 정보(S5610)가 부호화된 개수이다. 제1 단계 계수 정보 부호화란 0초과 계수 정보, 1 초과 계수 정보, Parity 정보 부호화하는 단계를 의미한다(S5606, S5607, S5608). 제2 단계 계수 정보 부호화는 3 초과 계수 정보를 부호화 하는 단계이다(S5610).
그 후, 역 스캔 순으로 현재 부호화될 변환 계수를 선택할 수 있다(S5604). PosL은 제1 단계 계수 정보 부호화 과정에 의해 현재 서브 블록 내 역 스캔 순서상 부호화 되지 않은 변환 계수의 첫번째 위치를 의미한다. 서브 블록 내 가장 먼저 부호화 할 변환 계수를 선택한 후, 현재 변환 계수의 절대값이 0초과인지를 나타내는 0 초과 계수 정보(S5606)를 부호화할 수 있다. 현재 변환 계수가 0이 아니라고 판단되면 현재 변환 계수가 절대값 1을 초과 하는지를 나타내는 1 초과 계수 정보를 부호화(S5607)할 수 있다. 그후, 1 초과 계수 정보로 인해 현재 변환 계수의 절대값이 1보다 크다고 판단되면 Parity 정보를 부호화(S5608)하여 현재 변환 계수의 Parity를 알려준다. 예를 들어, Parity 정보는 현재 변환 계수의 절대값이 짝수인지 아니면 홀수인지를 나타낼 수 있다.
이때 0 초과 계수 정보, 1초과 계수 정보, Parity 정보가 부호화 된다면 제1 부호화된 정보 개수를 증가시킨다(S5606, S5607, S5608). 예를 들어, 0 초과 계수 정보, 1초과 계수 정보 또는 Parity 정보 중 적어도 하나가 부호화되면, 제1 부호화된 정보 개수가 1만큼 증가될 수 있다. 또는, 0 초과 계수 정보, 1초과 계수 정보 또는 Parity 정보 중 적어도 하나가 각각 부호화될 때마다 제1 부호화된 정보 개수가 1씩 증가될 수 있다.
다시 말해, 제1 부호화된 정보 개수는, 하나의 블록에 대해서 허용되는 계수 정보의 최대 개수를 의미할 수 있다. 여기서, 블록은 변환 블록을 의미하거나, 변환 블록의 서브 블록을 의미할 수 있다. 또한, 상기 계수 정보는, 0 초과 계수 정보, 1초과 계수 정보, 또는 Parity 정보 중 적어도 하나를 포함할 수 있다. 제1 부호화된 정보 개수는, 비디오 시퀀스, 픽쳐, 슬라이스, 코딩 트리 블록(CTU), 코딩 블록(CU), 변환 블록(TU) 또는 변환 블록의 서브 블록의 단위로 정의될 수 있다. 즉, 해당 단위에 속한 모든 변환 블록 또는 서브 블록에 대해서 동일한 제1 부호화된 정보 개수가 결정/설정될 수 있다.
그 후, PosL 값을 1 감소하여 부호화할 변환 계수를 다음 계수로 바꿔준다. 이때, 제1 부호화된 정보 개수가 제1 임계값을 넘어가거나 현재 서브 블록 내 제1 단계 계수 정보 부호화가 완료 되었다면, 3초과 계수 정보 부호화 단계로 넘어갈 수 있다. 그렇지 않은 경우, 다음 계수 정보를 부호화할 수 있다. 제1 임계값은 서브 블록 단위로 부호화할 수 있는 0 초과 계수 정보, 1 초과 계수 정보, Parity 정보 중 적어도 하나의 최대 개수이다(S5606, S5607, S5608).
역 스캔 순으로 Parity 정보가 부호화된 변환 계수에 대해서만 3초과 계수 정보를 부호화 할 수 있다(S5610). 3 초과 계수 정보를 부호화 하는 경우, 제2 부호화된 정보 개수를 증가시킬 수 있다. 제2 부호화된 정보 개수가 제2 임계값을 넘어가거나 현재 서브 블록의 제2 단계의 계수 정보 부호화가 완료 되는 경우, 다음 단계로 넘어갈 수 있다(S5611). 제2 임계값은 서브 블록 단위로 부호화할 수 있는 3 초과 계수 정보의 최대 개수이다.
또는, 제1 부호화된 정보는 소정의 단위로 부호화할 수 있는 계수 정보의 최대 개수를 의미할 수 있다. 계수 정보는, 0초과 계수 정보, 1초과 계수 정보, Parity 정보 또는 3초과 계수 정보 중 적어도 하나를 포함할 수 있다. 이 경우, 제1 단계 계수 정보 부호화 단계에 3 초과 계수 정보를 부호화하는 단계가 포함될 수도 있다.
구체적으로, 현재 변환 계수의 절대값이 0초과인지를 나타내는 0 초과 계수 정보를 부호화할 수 있다. 현재 변환 계수가 0이 아니라고 판단되면, 현재 변환 계수가 절대값 1을 초과 하는지를 나타내는 1 초과 계수 정보를 부호화할 수 있다. 그후, 1 초과 계수 정보로 인해 현재 변환 계수의 절대값이 1보다 크다고 판단되면, Parity 정보를 부호화하고, 3 초과 계수 정보를 부호화할 수 있다.
이때 0 초과 계수 정보, 1초과 계수 정보, Parity 정보, 3 초과 계수 정보가 부호화되면, 제1 부호화된 정보 개수를 증가시킨다. 예를 들어, 0 초과 계수 정보, 1초과 계수 정보, Parity 정보 또는 3 초과 계수 정보 중 적어도 하나가 부호화되면, 제1 부호화된 정보 개수가 1만큼 증가될 수 있다. 또는, 0 초과 계수 정보, 1초과 계수 정보, Parity 정보 또는 3 초과 계수 정보 중 적어도 하나가 각각 부호화될 때마다 제1 부호화된 정보 개수가 1씩 증가될 수 있다.
다시 말해, 제1 부호화된 정보 개수는, 하나의 블록에 대해서 허용되는 계수 정보의 최대 개수를 의미할 수 있다. 여기서, 블록은 변환 블록을 의미하거나, 변환 블록의 서브 블록을 의미할 수 있다. 또한, 상기 계수 정보는, 0 초과 계수 정보, 1초과 계수 정보, Parity 정보 또는 3 초과 계수 정보 중 적어도 하나를 포함할 수 있다. 제1 부호화된 정보 개수는, 비디오 시퀀스, 픽쳐, 슬라이스, 코딩 트리 블록(CTU), 코딩 블록(CU), 변환 블록(TU) 또는 변환 블록의 서브 블록의 단위로 정의될 수 있다. 즉, 해당 단위에 속한 모든 변환 블록 또는 서브 블록에 대해서 동일한 제1 부호화된 정보 개수가 결정/설정될 수 있다.
PosC는 현재 부호화할 변환 계수의 위치를 의미한다. PosL이 PosC보다 작은 경우(S5612), 제1 단계 계수 정보가 부호화 되었다는 것을 알 수 있다. N초과 계수 정보를 부호화 한 후, 현재 변환 계수의 Parity 정보로 알 수 있는 현재 변환 계수 최소 절대값을 현재 계수 값에서 뺀 후, 차분 계수의 절대값을 부호화할 수 있다(S5613). 여기서 N은 3이상의 수를 나타내고, 부호화/복호화 장치에서 동일한 값을 사용하거나 상위 헤더에서 전송할 수 있다. N값이 5인 경우, 현재 계수의 절대값이 4이상이라고 판단된 계수에 대하여 4 초과 계수 정보를 부호화 할 수 있다. 4초과 계수 정보에 의해 현재 계수의 절대값이 5이상이라고 판단되면 5초과 계수 정보 부호화를 할 수 있다. 만약, N초과 계수 정보까지 부호화하여 현재 변환 계수의 값을 완전히 부호화 하였다면 차분 계수의 절대값 부호화 단계는 생략할 수 있다(S5613). PosL이 PosC보다 큰 경우, 현재 변환 계수 자체의 절대값을 부호화 할 수 있다(S5614). 그 후, 현재 변환 계수의 사인(sign) 정보를 알려주는 사인 정보 부호화를 할 수 있다(S5615). 현재 변환 계수에 대한 모든 정보가 부호화 되었다면 PosC 값을 1 감소하여 서브 블록 내 다음 변환 계수를 현재 변환 계수로 선택할 수 있고(S5617), 현재 변환 계수가 서브 블록 내 마지막 변환 계수인 경우, 제1 임계값, 제2 임계값을 업데이트 할 수 있다(S5618).
제1, 제2 임계값은 현재 서브 블록에서 현재 계수 자체의 절대값이 부호화된 변환 계수의 개수가 C(C는 0이상의 정수)개 이상인 경우에 해당 임계값들을 조절할 수 있다. 예를 들어, 제1 임계값이 13이고 제1 부호화된 정보 개수가 15개이고, 제2 임계값이 2이고 제2 부호화된 정보 개수가 2개인 경우는 제1, 제2 부호화된 정보가 제1, 제2 임계값에 다다른 경우이므로 제1, 제2 임계값을 증가시키는 방향으로 업데이트를 할 수 있다. 또한 예를 들어, 제1 임계값이 13이고 제1 부호화된 정보 개수가 15개이고, 제2 임계값이 2이고 제2 부호화된 정보 개수가 1개인 경우는 제1 부호화된 정보는 제1 임계값을 넘었지만 제2 부호화된 정보는 제2 임계값이 다다르지 못했으므로, 제1 임계값은 증가시키고, 제2 임계값은 감소시키는 방향으로 업데이트를 할 수도 있다. 혹은 제1, 제2 부호화된 정보가 제1, 제2 임계값에 모두 다다르지 못한 경우는 제1, 제2 임계값을 감소시키는 방향으로 업데이트를 할 수도 있다. 혹은 제1, 제2 임계값을 유지시키는 방향으로도 업데이트를 할 수도 있다.
현재 서브 블록이 마지막 서브 블록이 아닌 경우(S5619), 다음 서브 블록으로 이동하고(S5620), 마지막 서브 블록인 경우(S5619), 변환 블록 부호화를 종료할 수 있다.
도 57은 양자화된 변환 계수의 복호화 방법을 나타낸 흐름도이다. 영상 복호화 장치의 엔트로피 복호화부에 의해 수행될 수 있다.
먼저 Last_sig를 복호화 하여 역 스캔 순서에 따라서 변환 계수들을 스캔할 때 최초의 0이 아닌 계수를 기준 계수로 정할 수 있다(S5701).
기준 계수가 포함된 서브 블록을 선택하고(S5702) 해당 서브 블록 내 변환 계수 정보를 복호화 할 수 있다. 기준 계수가 포함된 서브 블록이 아닌 경우, 변환 블록 내 계수를 복호화 하기 전에 서브 블록 정보를 복호화 할 수 있다(S5703). 서브 블록 정보인 Coded_sub_blk_flag 는 현재 서브 블록 내에 0이 아닌 계수가 적어도 하나 이상 있는지를 알리는 플래그이다. 서브 블록 내 계수 정보를 복호화 하기 전에 제1 복호화된 정보 개수와 제2 복호화된 정보 개수를 0으로 초기화 할 수 있다. 제1 복호화된 정보는 0초과 계수 정보(S5706), 1초과 계수 정보(S5706), Parity 정보(S5707)가 복호화된 개수이다. 제2 복호화된 정보는 3초과 계수 정보(S5710)가 복호화된 개수이다.
그 후, 역 스캔 순으로 현재 복호화될 변환 계수를 선택할 수 있다(S5704). PosL은 제1 단계 계수 정보 복호화 과정에 의해 현재 서브 블록 내 역 스캔 순서상 복호화 되지 않은 변환 계수의 첫번째 위치를 의미한다. 서브 블록 내 가장 먼저 복호화 할 변환 계수를 선택한 후, 현재 변환 계수의 절대값이 0초과인지를 나타내는 0 초과 계수 정보(S5706)를 복호화할 수 있다. 현재 변환 계수가 0이 아니라고 판단되면 현재 변환 계수가 절대값 1을 초과 하는지를 나타내는 1 초과 계수 정보를 복호화(S5707)할 수 있다. 그후, 1 초과 계수 정보로 인해 현재 변환 계수의 절대값이 1보다 크다고 판단되면 Parity 정보를 복호화(S5708)하여 현재 변환 계수의 Parity를 알 수 있다. 이때 0 초과 계수 정보, 1초과 계수 정보, Parity 정보가 복호화 된다면 제1 복호화된 정보 개수를 감소시킨다(S5706, S5707, S5708). 예를 들어, 0 초과 계수 정보, 1초과 계수 정보 또는 Parity 정보 중 적어도 하나가 복호화되면, 제1 복호화된 정보 개수가 1만큼 감소될 수 있다. 또는, 0 초과 계수 정보, 1초과 계수 정보 또는 Parity 정보 중 적어도 하나가 각각 복호화될 때마다 제1 복호화된 정보 개수가 1씩 감소될 수 있다. 즉, 제1 복호화된 정보 개수는, 하나의 블록에 대해서 전송되는 계수 정보의 최대 개수를 의미할 수 있다. 여기서, 블록은 변환 블록을 의미하거나, 변환 블록의 서브 블록을 의미할 수 있다. 또한, 상기 계수 정보는, 0 초과 계수 정보, 1초과 계수 정보 또는 Parity 정보 중 적어도 하나를 포함할 수 있다. 제1 복호화된 정보 개수는, 비디오 시퀀스, 픽쳐, 슬라이스, 코딩 트리 블록(CTU), 코딩 블록(CU), 변환 블록(TU) 또는 변환 블록의 서브 블록의 단위로 정의될 수 있다. 즉, 해당 단위에 속한 모든 변환 블록 또는 서브 블록에 대해서 동일한 제1 복호화된 정보 개수가 설정될 수 있다.
그 후, PosL 값을 1 감소하여 복호화할 계수를 다음 변환 계수로 바꿔준다. 이때, 제1 복호화된 정보 개수가 제1 임계값을 넘어가거나 현재 서브 블록 내 제1 단계 계수 정보 복호화가 완료 되었다면, 3초과 계수 정보 복호화 단계로 넘어갈 수 있다. 그렇지 않은 경우, 다음 변환 계수 정보를 복호화할 수 있다. 제1 임계값은 서브 블록 단위로 복호화할 수 있는 0 초과 계수 정보, 1 초과 계수 정보, Parity 정보의 최대 개수이다(S5706, S5707, S5708). 제1 단계 계수 정보란 0초과 계수 정보, 1 초과 계수 정보, Parity 정보 복호화 하는 단계를 의미한다(S5706, S5707, S5708).
역 스캔 순으로 Parity 정보가 복호화된 변환 계수에 대해서만 3초과 계수 정보를 복호화 할 수 있다(S5710). 3 초과 계수 정보를 복호화 하는 경우, 제2 복호화된 정보 개수를 증가시킬 수 있다. 제2 복호화된 정보 개수가 제2 임계값을 넘어가거나 현재 서브 블록의 제2 단계의 계수 정보 복호화가 완료 되는 경우, 다음 단계로 넘어갈 수 있다(S5711). 제2 임계값은 서브 블록 단위로 복호화할 수 있는 3 초과 계수 정보의 최대 개수이다. 제2 단계 계수 정보 복호화는 3 초과 계수 정보를 복호화 하는 단계이다(S5710).
또는, 제1 복호화된 정보는 소정의 단위로 전송 가능한 계수 정보의 최대 개수를 의미할 수 있다. 여기서, 계수 정보는 0초과 계수 정보, 1초과 계수 정보, Parity 정보 또는 3초과 계수 정보 중 적어도 하나를 포함할 수 있다. 이 경우, 제1 단계 계수 정보 복호화 단계에 3 초과 계수 정보를 복호화하는 단계가 포함될 수도 있다.
구체적으로, 현재 변환 계수의 절대값이 0초과인지를 나타내는 0 초과 계수 정보를 복호화할 수 있다. 현재 변환 계수가 0이 아니라고 판단되면, 현재 변환 계수가 절대값 1을 초과하는지를 나타내는 1 초과 계수 정보를 복호화할 수 있다. 그 후, 1 초과 계수 정보에 의해 현재 변환 계수의 절대값이 1보다 크다고 판단되면, Parity 정보 및 3 초과 계수 정보를 복호화할 수 있다.
이때, 0 초과 계수 정보, 1초과 계수 정보, Parity 정보, 3 초과 계수 정보가 복호화되면, 제1 복호화된 정보 개수를 감소시킨다. 예를 들어, 0 초과 계수 정보, 1초과 계수 정보, Parity 정보 또는 3 초과 계수 정보 중 적어도 하나가 복호화되면, 제1 복호화된 정보 개수가 1만큼 감소될 수 있다. 또는, 0 초과 계수 정보, 1초과 계수 정보, Parity 정보 또는 3 초과 계수 정보 중 적어도 하나가 각각 복호화될 때마다 제1 복호화된 정보 개수가 1씩 감소될 수 있다.
다시 말해, 제1 복호화된 정보 개수는, 하나의 블록에 대해서 허용되는 계수 정보의 최대 개수를 의미할 수 있다. 여기서, 블록은 변환 블록을 의미하거나, 변환 블록의 서브 블록을 의미할 수 있다. 또한, 상기 계수 정보는, 0 초과 계수 정보, 1초과 계수 정보, Parity 정보 또는 3 초과 계수 정보 중 적어도 하나를 포함할 수 있다. 제1 복호화된 정보 개수는, 비디오 시퀀스, 픽쳐, 슬라이스, 코딩 트리 블록(CTU), 코딩 블록(CU), 변환 블록(TU) 또는 변환 블록의 서브 블록의 단위로 정의될 수 있다. 즉, 해당 단위에 속한 모든 변환 블록 또는 서브 블록에 대해서 동일한 제1 복호화된 정보 개수가 설정될 수 있다.
PosC는 현재 복호화할 변환 계수의 위치를 의미한다. PosL이 PosC보다 작은 경우(S5712), 제1 단계 계수 정보 복호화에서 현재 변환 계수에 대한 정보가 복호화 되었다는 것을 알 수 있다. N초과 계수 정보를 복호화 한 후, 현재 변환 계수의 Parity 정보로 알 수 있는 현재 계수 최소 절대값을 현재 계수 값에서 뺀 후, 차분 계수의 절대값을 복호화할 수 있다(S5713). N초과 계수 정보까지 복호화하여 현재 계수의 값을 완전히 복호화 하였다면 차분 계수의 절대값 복호화 단계는 생략할 수 있다(S5713). PosL이 PosC보다 큰 경우, 현재 변환 계수 정보를 한번에 복호화 하는 절대값 복호화를 할 수 있다(S5714). 그 후, 현재 변환 계수의 사인 정보를 알려주는 사인 정보 복호화를 할 수 있다(S5715). 현재 변환 계수에 대한 모든 정보가 복호화 되었다면 PosC 값을 1 감소하여 서브 블록 내 다음 계수를 현재 계수로 선택할 수 있고(S5717), 현재 변환 계수가 서브 블록 내 마지막 계수 인 경우, 제1 임계값, 제2 임계값을 업데이트 할 수 있다(S5718).
제1, 제2 임계값은 현재 서브 블록에서 현재 계수 자체의 절대값이 복호화된 변환 계수의 개수가 C(C는 0이상의 정수)개 이상인 경우에 해당 임계값들을 조절할 수 있다. 예를 들어, 제1 임계값이 13이고 제1 복호화된 정보 개수가 15개이고, 제2 임계값이 2이고 제2 복호화된 정보 개수가 2개인 경우는 제1, 제2 복호화된 정보가 제1, 제2 임계값에 다다른 경우이므로 제1, 제2 임계값을 증가시키는 방향으로 업데이트를 할 수 있다. 또한 예를 들어, 제1 임계값이 13이고 제1 복호화된 정보 개수가 15개이고, 제2 임계값이 2이고 제2 복호화된 정보 개수가 1개인 경우는 제1 복호화된 정보는 제1 임계값을 넘었지만 제2 복호화된 정보는 제2 임계값이 다다르지 못했으므로, 제1 임계값은 증가시키고, 제2 임계값은 감소시키는 방향으로 업데이트를 할 수도 있다. 혹은 제1, 제2 복호화된 정보가 제1, 제2 임계값에 모두 다다르지 못한 경우는 제1, 제2 임계값을 감소시키는 방향으로 업데이트를 할 수도 있다. 혹은 제1, 제2 임계값을 유지시키는 방향으로도 업데이트를 할 수도 있다.
현재 서브 블록이 마지막 서브 블록이 아닌 경우(S5719), 다음 서브 블록으로 이동하고(S5720), 마지막 서브 블록인 경우(S5719), 변환 블록 복호화를 종료할 수 있다.
본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.
또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(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 (15)

  1. 현재 블록의 후보 리스트를 생성하는 단계; 및
    상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함하되,
    상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고,
    복원정보기반 후보는, 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가되는, 영상 복호화 방법.
  2. 제1항에 있어서,
    상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가되는, 영상 복호화 방법.
  3. 제2항에 있어서,
    상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정되는, 영상 복호화 방법.
  4. 제3항에 있어서,
    상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지는, 영상 복호화 방법.
  5. 제1항에 있어서,
    상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화되는, 영상 복호화 방법.
  6. 현재 블록의 후보 리스트를 생성하는 단계; 및
    상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함하되,
    상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고,
    복원정보기반 후보는, 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가되는, 영상 부호화 방법.
  7. 제6항에 있어서,
    상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가되는, 영상 부호화 방법.
  8. 제7항에 있어서,
    상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정되는, 영상 부호화 방법.
  9. 제8항에 있어서,
    상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지는, 영상 부호화 방법.
  10. 제6항에 있어서,
    상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화되는, 영상 부호화 방법.
  11. 영상 복호화 방법에 의해 복호화되는 비트스트림을 저장하는 컴퓨터로 판독가능한 기록 매체에 있어서,
    상기 영상 복호화 방법은,
    현재 블록의 후보 리스트를 생성하는 단계; 및
    상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함하되,
    상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고,
    복원정보기반 후보는, 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가되는, 컴퓨터로 판독가능한 기록 매체.
  12. 제11항에 있어서,
    상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가되는, 컴퓨터로 판독가능한 기록 매체.
  13. 제12항에 있어서,
    상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정되는, 컴퓨터로 판독가능한 기록 매체.
  14. 제13항에 있어서,
    상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지는, 컴퓨터로 판독가능한 기록 매체.
  15. 제11항에 있어서,
    상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화되는, 컴퓨터로 판독가능한 기록 매체.
PCT/KR2020/000211 2019-01-04 2020-01-06 영상 부호화/복호화 방법 및 장치 WO2020141962A1 (ko)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/420,784 US20220116588A1 (en) 2019-01-04 2020-01-06 Method and apparatus for image encoding/decoding
CN202080007897.4A CN113287302A (zh) 2019-01-04 2020-01-06 用于图像编码/解码的方法和装置

Applications Claiming Priority (14)

Application Number Priority Date Filing Date Title
KR10-2019-0001414 2019-01-04
KR20190001416 2019-01-04
KR20190001414 2019-01-04
KR10-2019-0001416 2019-01-04
KR20190001730 2019-01-07
KR10-2019-0001730 2019-01-07
KR10-2020-0001228 2020-01-06
KR1020200001229A KR102319033B1 (ko) 2019-01-04 2020-01-06 효율적인 움직임 정보 예측을 이용한 영상 부호화/복호화 방법과 장치
KR10-2020-0001229 2020-01-06
KR1020200001230A KR20200085667A (ko) 2019-01-07 2020-01-06 효율적인 움직임벡터 예측기를 이용한 영상 신호 예측 부호화/복호화 방법 및 장치
KR10-2020-0001230 2020-01-06
KR10-2020-0001231 2020-01-06
KR1020200001231A KR20200085236A (ko) 2019-01-04 2020-01-06 효율적인 예측 및 변환 부호화/복호화 방법 및 장치
KR1020200001228A KR102342157B1 (ko) 2019-01-04 2020-01-06 효율적인 움직임 정보 예측을 이용한 영상 부호화/복호화 방법과 장치

Publications (1)

Publication Number Publication Date
WO2020141962A1 true WO2020141962A1 (ko) 2020-07-09

Family

ID=71407018

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/000211 WO2020141962A1 (ko) 2019-01-04 2020-01-06 영상 부호화/복호화 방법 및 장치

Country Status (2)

Country Link
US (1) US20220116588A1 (ko)
WO (1) WO2020141962A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023131546A1 (en) * 2022-01-04 2023-07-13 Telefonaktiebolaget Lm Ericsson (Publ) Motion vector difference derivation

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BR112021001384A2 (pt) * 2018-08-06 2021-04-20 Electronics And Telecommunications Research Institute método e dispositivo para codificação/decodificação de imagens, e mídia de gravação que armazena fluxo de bits
CN118055250A (zh) * 2018-09-22 2024-05-17 Lg 电子株式会社 使用间预测处理视频信号的方法和装置
US20230069984A1 (en) * 2021-08-24 2023-03-09 Tencent America LLC Hardware friendly design for intra mode coding

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013098745A (ja) * 2011-10-31 2013-05-20 Fujitsu Ltd 動画像復号装置、動画像符号化装置、動画像復号方法、動画像符号化方法、動画像復号プログラム及び動画像符号化プログラム
JP2013118625A (ja) * 2011-10-31 2013-06-13 Jvc Kenwood Corp 動画像復号装置、動画像復号方法、動画像復号プログラム、受信装置、受信方法及び受信プログラム
KR20160132893A (ko) * 2014-03-31 2016-11-21 삼성전자주식회사 서브블록 기반 예측을 수행하는 인터 레이어 비디오 복호화 방법 및 그 장치 및 서브블록 기반 예측을 수행하는 인터 레이어 비디오 부호화 방법 및 그 장치
KR20170059423A (ko) * 2015-11-20 2017-05-30 한국전자통신연구원 기하 변환 영상을 이용하는 영상의 부호화/복호화 방법 및 장치
KR20180000303A (ko) * 2016-06-22 2018-01-02 한국전자통신연구원 화면 내 예측 방법 및 장치

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130114717A1 (en) * 2011-11-07 2013-05-09 Qualcomm Incorporated Generating additional merge candidates
US20130272412A1 (en) * 2012-04-12 2013-10-17 Qualcomm Incorporated Common motion information candidate list construction process
US20130294513A1 (en) * 2012-05-07 2013-11-07 Qualcomm Incorporated Inter layer merge list construction for video coding
KR102254599B1 (ko) * 2013-10-18 2021-05-21 엘지전자 주식회사 멀티-뷰 비디오 코딩에 있어서, 뷰 합성 예측 방법 및 이를 이용한 머지 후보 리스트 구성 방법
US11539958B2 (en) * 2018-07-17 2022-12-27 Lg Electronics Inc. Method for predicting subblock-based temporal motion vector and apparatus therefor
US11336914B2 (en) * 2018-08-16 2022-05-17 Qualcomm Incorporated History-based candidate list with classification
CN113016187B (zh) * 2018-11-07 2023-06-06 寰发股份有限公司 利用当前画面参照编码方式的视频区块编码或解码方法和装置
US11184633B2 (en) * 2018-11-27 2021-11-23 Qualcomm Incorporated Simplification of history-based motion vector prediction
US11558606B2 (en) * 2018-12-28 2023-01-17 Godo Kaisha Ip Bridge 1 Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013098745A (ja) * 2011-10-31 2013-05-20 Fujitsu Ltd 動画像復号装置、動画像符号化装置、動画像復号方法、動画像符号化方法、動画像復号プログラム及び動画像符号化プログラム
JP2013118625A (ja) * 2011-10-31 2013-06-13 Jvc Kenwood Corp 動画像復号装置、動画像復号方法、動画像復号プログラム、受信装置、受信方法及び受信プログラム
KR20160132893A (ko) * 2014-03-31 2016-11-21 삼성전자주식회사 서브블록 기반 예측을 수행하는 인터 레이어 비디오 복호화 방법 및 그 장치 및 서브블록 기반 예측을 수행하는 인터 레이어 비디오 부호화 방법 및 그 장치
KR20170059423A (ko) * 2015-11-20 2017-05-30 한국전자통신연구원 기하 변환 영상을 이용하는 영상의 부호화/복호화 방법 및 장치
KR20180000303A (ko) * 2016-06-22 2018-01-02 한국전자통신연구원 화면 내 예측 방법 및 장치

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023131546A1 (en) * 2022-01-04 2023-07-13 Telefonaktiebolaget Lm Ericsson (Publ) Motion vector difference derivation

Also Published As

Publication number Publication date
US20220116588A1 (en) 2022-04-14

Similar Documents

Publication Publication Date Title
WO2018066867A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019190224A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018097693A2 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018097692A2 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019182385A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018030773A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2019112394A1 (ko) 채널들 간의 선택적인 정보 공유를 사용하는 부호화 및 복호화를 위한 방법 및 장치
WO2019022568A1 (ko) 영상 처리 방법, 그를 이용한 영상 부호화/복호화 방법 및 그 장치
WO2019172705A1 (ko) 샘플 필터링을 이용한 영상 부호화/복호화 방법 및 장치
WO2020141962A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2019083334A1 (ko) 비대칭 서브 블록 기반 영상 부호화/복호화 방법 및 장치
WO2020076116A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020171444A1 (ko) Dmvr 기반의 인터 예측 방법 및 장치
WO2018097589A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020189893A1 (ko) Bdof 기반의 인터 예측 방법 및 장치
WO2019182292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018097590A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2017003063A1 (ko) 인터 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2018101700A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020171681A1 (ko) 인트라 예측 기반 비디오 신호 처리 방법 및 장치
WO2011129672A2 (ko) 영상 부호화/복호화 장치 및 방법
WO2020184952A1 (ko) 비디오 신호에서 인터 예측을 위한 움직임 벡터 차분 정보를 처리하기 위한 비디오 신호의 처리 방법 및 장치
WO2019194653A1 (ko) 움직임 정보의 복합적 머지 모드 처리를 제공하는 영상 처리 방법, 그를 이용한 영상 복호화, 부호화 방법 및 그 장치
WO2020130714A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020159199A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치

Legal Events

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

Ref document number: 20735956

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20735956

Country of ref document: EP

Kind code of ref document: A1